/* ============================================
   LinkURL - Encurtador de Links
   Estilos Principais
   ============================================ */

/* ---- Google Fonts ---- */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=JetBrains+Mono:wght@400;500;600&display=swap');

/* ---- CSS Variables ---- */
:root {
    --primary: #6C5CE7;
    --primary-dark: #5A4BD1;
    --primary-light: #A29BFE;
    --primary-glow: rgba(108, 92, 231, 0.35);
    --secondary: #00CEC9;
    --secondary-dark: #00B5B0;
    --accent: #FD79A8;
    --accent-dark: #E84393;

    --bg-dark: #0a0a1a;
    --bg-card: #12122a;
    --bg-card-hover: #1a1a3e;
    --bg-surface: #16163a;
    --bg-input: #1e1e46;
    --bg-glass: rgba(18, 18, 42, 0.75);

    --text-primary: #EAEAFF;
    --text-secondary: #8B8BAF;
    --text-muted: #5C5C7A;
    --text-link: #A29BFE;

    --border-color: rgba(108, 92, 231, 0.15);
    --border-active: rgba(108, 92, 231, 0.4);

    --success: #00B894;
    --warning: #FDCB6E;
    --danger: #FF6B6B;
    --info: #74B9FF;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 30px var(--primary-glow);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;

    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ---- Reset & Base ---- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---- Animated Background ---- */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(ellipse at 20% 20%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(0, 206, 201, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(253, 121, 168, 0.04) 0%, transparent 50%);
    pointer-events: none;
    z-index: 0;
}

/* ---- Grid Pattern Overlay ---- */
body::after {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(108, 92, 231, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(108, 92, 231, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

.main-wrapper {
    position: relative;
    z-index: 1;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

/* ---- Navbar ---- */
.navbar-custom {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar-custom.scrolled {
    background: rgba(10, 10, 26, 0.95);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.navbar-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.navbar-brand span {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-custom .nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(108, 92, 231, 0.1);
}

.navbar-toggler {
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.6rem;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(234,234,255,0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='m4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---- Hero Section ---- */
.hero-section {
    padding: 6rem 0 4rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, var(--primary-glow) 0%, transparent 70%);
    animation: pulse 4s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { opacity: 0.4; transform: translateX(-50%) scale(1); }
    50% { opacity: 0.7; transform: translateX(-50%) scale(1.1); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(108, 92, 231, 0.15);
    border: 1px solid rgba(108, 92, 231, 0.3);
    color: var(--primary-light);
    padding: 0.4rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-badge i {
    font-size: 0.7rem;
}

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.15;
    margin-bottom: 1.25rem;
    letter-spacing: -0.02em;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    animation: gradientShift 3s ease-in-out infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
}

/* ---- Shortener Form ---- */
.shortener-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2rem;
    max-width: 720px;
    margin: 0 auto;
    box-shadow: var(--shadow-lg), 0 0 60px rgba(108, 92, 231, 0.1);
    position: relative;
    overflow: hidden;
}

.shortener-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.shortener-input-group {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.shortener-input-group .form-control {
    flex: 1;
}

.form-control-custom {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.85rem 1.2rem;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: var(--transition);
}

.form-control-custom:focus {
    background: var(--bg-input);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    color: var(--text-primary);
    outline: none;
}

.form-control-custom::placeholder {
    color: var(--text-muted);
}

/* ---- Buttons ---- */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    padding: 0.85rem 2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    transition: var(--transition);
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--primary-glow);
    color: white;
}

.btn-primary-custom:hover::before {
    left: 100%;
}

.btn-primary-custom:active {
    transform: translateY(0);
}

.btn-secondary-custom {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn-secondary-custom:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-active);
    color: var(--text-primary);
}

.btn-success-custom {
    background: linear-gradient(135deg, var(--success), #00a383);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-success-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 184, 148, 0.3);
    color: white;
}

.btn-danger-custom {
    background: linear-gradient(135deg, var(--danger), #e55555);
    border: none;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    transition: var(--transition);
    cursor: pointer;
}

.btn-danger-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary-light);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    transition: var(--transition);
    cursor: pointer;
}

.btn-outline-custom:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--primary-light);
    border-color: var(--primary-light);
}

.btn-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    padding: 0;
    font-size: 0.9rem;
}

/* ---- Advanced Options Toggle ---- */
.advanced-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0;
    transition: var(--transition);
}

.advanced-toggle:hover {
    color: var(--primary-light);
}

.advanced-toggle i {
    transition: transform 0.3s ease;
}

.advanced-toggle[aria-expanded="true"] i {
    transform: rotate(180deg);
}

.advanced-options {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1rem;
}

/* ---- Result Box ---- */
.result-box {
    background: rgba(0, 184, 148, 0.08);
    border: 1px solid rgba(0, 184, 148, 0.25);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    margin-top: 1.25rem;
    display: none;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.result-box .short-url {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary);
    word-break: break-all;
}

.result-box .copy-btn {
    background: var(--secondary);
    border: none;
    color: #0a0a1a;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.result-box .copy-btn:hover {
    background: var(--secondary-dark);
    transform: translateY(-1px);
}

/* ---- Feature Cards ---- */
.features-section {
    padding: 5rem 0;
}

.section-title {
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: 0.75rem;
    letter-spacing: -0.02em;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto 3rem;
    font-size: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    opacity: 0;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.25rem;
}

.feature-icon.purple { background: rgba(108, 92, 231, 0.15); color: var(--primary-light); }
.feature-icon.teal { background: rgba(0, 206, 201, 0.15); color: var(--secondary); }
.feature-icon.pink { background: rgba(253, 121, 168, 0.15); color: var(--accent); }
.feature-icon.blue { background: rgba(116, 185, 255, 0.15); color: var(--info); }
.feature-icon.green { background: rgba(0, 184, 148, 0.15); color: var(--success); }
.feature-icon.yellow { background: rgba(253, 203, 110, 0.15); color: var(--warning); }

.feature-card h5 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 0;
}

/* ---- Stats Counter ---- */
.stats-section {
    padding: 3rem 0;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 0.25rem;
}

/* ---- Cards ---- */
.card-custom {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
}

.card-custom:hover {
    border-color: var(--border-active);
}

.card-header-custom {
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header-custom h5,
.card-header-custom h6 {
    margin: 0;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-body-custom {
    padding: 1.5rem;
}

/* ---- Table ---- */
.table-custom {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table-custom thead th {
    background: var(--bg-surface);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}

.table-custom tbody td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
    vertical-align: middle;
}

.table-custom tbody tr {
    transition: var(--transition-fast);
}

.table-custom tbody tr:hover {
    background: rgba(108, 92, 231, 0.04);
}

.table-custom tbody tr:last-child td {
    border-bottom: none;
}

.url-cell {
    max-width: 280px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.url-cell a {
    color: var(--text-link);
    text-decoration: none;
    transition: var(--transition-fast);
}

.url-cell a:hover {
    color: var(--primary-light);
    text-decoration: underline;
}

.short-code-badge {
    font-family: 'JetBrains Mono', monospace;
    background: rgba(108, 92, 231, 0.12);
    color: var(--primary-light);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-block;
}

.clicks-badge {
    background: rgba(0, 206, 201, 0.12);
    color: var(--secondary);
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.status-badge {
    padding: 0.3rem 0.7rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active {
    background: rgba(0, 184, 148, 0.12);
    color: var(--success);
}

.status-inactive {
    background: rgba(255, 107, 107, 0.12);
    color: var(--danger);
}

/* ---- Dashboard Layout ---- */
.dashboard-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-right: 1px solid var(--border-color);
    padding: 1.5rem 0;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 0 1.5rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1rem;
}

.sidebar-brand a {
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text-primary);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-brand .brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    color: white;
}

.sidebar-nav {
    list-style: none;
    padding: 0 0.75rem;
}

.sidebar-nav .nav-item {
    margin-bottom: 2px;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.75rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.sidebar-nav .nav-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

.sidebar-nav .nav-link:hover {
    background: rgba(108, 92, 231, 0.1);
    color: var(--text-primary);
}

.sidebar-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.2), rgba(0, 206, 201, 0.1));
    color: var(--primary-light);
    font-weight: 600;
}

.sidebar-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--text-muted);
    padding: 1rem 0.75rem 0.5rem;
}

.sidebar-user {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    flex-shrink: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.sidebar-user-email {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.dashboard-content {
    flex: 1;
    margin-left: 260px;
    padding: 1.5rem 2rem;
    min-height: 100vh;
}

/* ---- Page Header ---- */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.page-header h2 {
    font-weight: 800;
    font-size: 1.6rem;
    margin: 0;
    letter-spacing: -0.02em;
}

.page-header .breadcrumb-custom {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.page-header .breadcrumb-custom a {
    color: var(--text-secondary);
    text-decoration: none;
}

.page-header .breadcrumb-custom a:hover {
    color: var(--primary-light);
}

/* ---- Stats Cards ---- */
.stats-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.stats-card:hover {
    transform: translateY(-3px);
    border-color: var(--border-active);
    box-shadow: var(--shadow-glow);
}

.stats-card-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.stats-card h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 0.25rem;
    line-height: 1;
}

.stats-card p {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 500;
    margin: 0;
}

/* ---- Modals ---- */
.modal-content-custom {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header-custom {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-header-custom .modal-title {
    font-weight: 700;
    color: var(--text-primary);
}

.modal-header-custom .btn-close {
    filter: invert(1) brightness(0.7);
}

.modal-body-custom {
    padding: 1.5rem;
}

.modal-footer-custom {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* ---- Forms ---- */
.form-label-custom {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.4rem;
}

.form-text-custom {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.form-select-custom {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    transition: var(--transition);
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%238B8BAF' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
}

.form-select-custom:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}

/* ---- Search Bar ---- */
.search-bar {
    position: relative;
    max-width: 300px;
}

.search-bar input {
    padding-left: 2.5rem;
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.88rem;
    width: 100%;
    padding: 0.65rem 1rem 0.65rem 2.5rem;
    transition: var(--transition);
}

.search-bar input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}

.search-bar input::placeholder {
    color: var(--text-muted);
}

.search-bar i {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.85rem;
}

/* ---- Pagination ---- */
.pagination-custom {
    display: flex;
    gap: 0.3rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.pagination-custom .page-link {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 0.5rem 0.85rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.pagination-custom .page-link:hover {
    background: rgba(108, 92, 231, 0.15);
    border-color: var(--primary);
    color: var(--primary-light);
}

.pagination-custom .page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* ---- Alert Messages ---- */
.alert-custom {
    border: none;
    border-radius: var(--radius-md);
    padding: 0.85rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.alert-success-custom {
    background: rgba(0, 184, 148, 0.1);
    color: var(--success);
    border-left: 3px solid var(--success);
}

.alert-danger-custom {
    background: rgba(255, 107, 107, 0.1);
    color: var(--danger);
    border-left: 3px solid var(--danger);
}

.alert-warning-custom {
    background: rgba(253, 203, 110, 0.1);
    color: var(--warning);
    border-left: 3px solid var(--warning);
}

.alert-info-custom {
    background: rgba(116, 185, 255, 0.1);
    color: var(--info);
    border-left: 3px solid var(--info);
}

/* ---- Auth Pages ---- */
.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--accent));
}

.auth-logo {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-logo a {
    font-weight: 800;
    font-size: 1.6rem;
    color: var(--text-primary);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-logo .brand-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.auth-title {
    text-align: center;
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 0.3rem;
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.75rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: 0.82rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border-color);
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.auth-footer a {
    color: var(--primary-light);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* ---- QR Code Modal ---- */
.qr-container {
    text-align: center;
    padding: 1rem;
}

.qr-container canvas,
.qr-container img {
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

/* ---- Footer ---- */
.footer-custom {
    border-top: 1px solid var(--border-color);
    background: var(--bg-card);
    padding: 2rem 0;
    margin-top: 4rem;
}

.footer-custom p {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin: 0;
}

.footer-custom a {
    color: var(--primary-light);
    text-decoration: none;
}

.footer-custom a:hover {
    text-decoration: underline;
}

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
}

.toast-custom {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1rem 1.5rem;
    min-width: 300px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
    animation: slideInRight 0.4s ease;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ---- Password Protected Page ---- */
.password-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 2rem;
}

.password-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.password-icon {
    width: 64px;
    height: 64px;
    background: rgba(253, 203, 110, 0.15);
    color: var(--warning);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1.5rem;
}

/* ---- Empty State ---- */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-muted);
}

.empty-state-icon {
    width: 80px;
    height: 80px;
    background: rgba(108, 92, 231, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    margin: 0 auto 1.25rem;
}

.empty-state h5 {
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-state p {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* ---- Loading Spinner ---- */
.spinner-custom {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .dashboard-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
}

@media (max-width: 767.98px) {
    .shortener-input-group {
        flex-direction: column;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hero-section {
        padding: 4rem 0 3rem;
    }
    
    .table-responsive-custom {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .stats-card {
        margin-bottom: 0.75rem;
    }
}

@media (max-width: 575.98px) {
    .auth-card {
        padding: 1.75rem;
    }
    
    .shortener-card {
        padding: 1.5rem;
    }
}

/* ---- Utility Classes ---- */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.mono {
    font-family: 'JetBrains Mono', monospace;
}

.glow-border {
    border: 1px solid var(--border-active);
    box-shadow: 0 0 20px var(--primary-glow);
}
