/* ============================================================
   Wilx Catalog Link Generator — Design System
   Premium Dark Theme with Glassmorphism
   ============================================================ */

/* ---- CSS Variables ---- */
:root {
    --bg-primary: #0a0a1a;
    --bg-secondary: #0f0f2d;
    --bg-card: rgba(20, 20, 55, 0.7);
    --bg-card-solid: #141437;
    --bg-input: rgba(25, 25, 60, 0.6);
    --bg-sidebar: #0d0d28;
    --bg-hover: rgba(102, 126, 234, 0.1);

    --border-color: rgba(102, 126, 234, 0.15);
    --border-active: rgba(102, 126, 234, 0.4);

    --text-primary: #e8e8ff;
    --text-secondary: #a0a0c8;
    --text-muted: #6a6a90;
    --text-accent: #667eea;

    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --accent-success: #38ef7d;
    --accent-warning: #f7b731;
    --accent-danger: #ff6b6b;
    --accent-info: #4ecdc4;

    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-danger: linear-gradient(135deg, #eb3349 0%, #f45c43 100%);
    --gradient-warning: linear-gradient(135deg, #f7b731 0%, #fc5c7d 100%);
    --gradient-info: linear-gradient(135deg, #4ecdc4 0%, #667eea 100%);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 20px rgba(102, 126, 234, 0.15);

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

    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 64px;

    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Base ---- */
*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: var(--font-family);
    background: var(--bg-primary);
    color: var(--text-primary);
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--text-accent); text-decoration: none; transition: var(--transition); }
a:hover { color: #8b9cf7; }

::selection { background: var(--accent-primary); color: #fff; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--accent-primary); border-radius: 3px; }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.auth-bg-animation {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
}

.floating-shape {
    position: absolute;
    border-radius: 50%;
    opacity: 0.06;
    filter: blur(60px);
    animation: float 20s ease-in-out infinite;
}
.shape-1 { width: 500px; height: 500px; background: var(--accent-primary); top: -10%; left: -10%; animation-delay: 0s; }
.shape-2 { width: 400px; height: 400px; background: var(--accent-secondary); top: 50%; right: -10%; animation-delay: -5s; }
.shape-3 { width: 350px; height: 350px; background: var(--accent-success); bottom: -10%; left: 30%; animation-delay: -10s; }
.shape-4 { width: 300px; height: 300px; background: var(--accent-info); top: 20%; right: 20%; animation-delay: -15s; }

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(30px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(15px, 10px) scale(1.02); }
}

.auth-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

/* ---- Glass Card ---- */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.auth-card {
    overflow: hidden;
}

.auth-header {
    padding: 32px 32px 0;
    text-align: center;
}

.auth-logo .logo-icon {
    width: 64px; height: 64px;
    margin: 0 auto 16px;
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
}

.logo-text {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.5px;
}

.logo-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin: 4px 0 0;
}

.auth-body-inner {
    padding: 24px 32px;
}

.auth-title {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-primary);
}

.auth-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0 0 24px;
}

.auth-footer {
    padding: 16px 32px 24px;
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    border-top: 1px solid var(--border-color);
}

.auth-link {
    color: var(--accent-primary);
    font-weight: 600;
}
.auth-link:hover { color: #8b9cf7; text-decoration: underline; }

.auth-link-muted {
    color: var(--text-muted);
    font-size: 13px;
}
.auth-link-muted:hover { color: var(--text-secondary); }

/* ---- Glass Input ---- */
.glass-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-md) !important;
    color: var(--text-primary) !important;
    padding: 14px 16px 14px 44px !important;
    font-size: 15px;
    transition: var(--transition);
    height: auto !important;
}

.glass-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15) !important;
    background: rgba(25, 25, 60, 0.8) !important;
    outline: none;
}

.glass-input::placeholder {
    color: var(--text-muted) !important;
}

.input-icon-wrapper {
    position: relative;
}

.input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
    z-index: 2;
    transition: var(--transition);
}

.glass-input:focus ~ .input-icon,
.input-icon-wrapper:focus-within .input-icon {
    color: var(--accent-primary);
}

/* ---- Username Live Validation ---- */
.username-status {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    z-index: 2;
}
.status-success { color: var(--accent-success); }
.status-error { color: var(--accent-danger); }
.status-loading { color: var(--text-muted); }

.form-hint {
    margin-top: 6px;
    padding-left: 4px;
    font-size: 12px;
    color: var(--text-muted);
    min-height: 18px;
}

/* ---- Gradient Buttons ---- */
.btn-primary-gradient {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 16px;
    padding: 14px 24px;
    border-radius: var(--radius-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.35);
    color: #fff;
}

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

.btn-arrow {
    transition: transform 0.3s ease;
}
.btn-primary-gradient:hover .btn-arrow {
    transform: translateX(4px);
}

/* ---- OTP Input ---- */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.otp-digit {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
    caret-color: var(--accent-primary);
}

.otp-digit:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    outline: none;
    background: rgba(25, 25, 60, 0.8);
}

.otp-email-badge {
    background: rgba(102, 126, 234, 0.1);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-secondary);
    text-align: center;
}

.text-accent { color: var(--accent-primary) !important; }

/* ---- Flash/Alert Messages ---- */
.glass-alert {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    backdrop-filter: blur(10px);
    margin-bottom: 16px;
    font-size: 14px;
}
.glass-alert.alert-danger { border-left: 4px solid var(--accent-danger) !important; }
.glass-alert.alert-success { border-left: 4px solid var(--accent-success) !important; }
.glass-alert.alert-warning { border-left: 4px solid var(--accent-warning) !important; }
.glass-alert.alert-info { border-left: 4px solid var(--accent-info) !important; }
.glass-alert .btn-close { filter: invert(1) brightness(0.6); }

/* ============================================================
   DASHBOARD LAYOUT (Sidebar + Topbar)
   ============================================================ */
.app-body {
    min-height: 100vh;
    background: var(--bg-primary);
}

/* ---- Sidebar ---- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-color);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-brand {
    padding: 20px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    flex-shrink: 0;
}

.sidebar-brand .brand-icon {
    width: 40px; height: 40px;
    background: var(--gradient-primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: #fff;
    flex-shrink: 0;
}

.sidebar-brand .brand-name {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.sidebar-brand .brand-sub {
    font-size: 11px;
    color: var(--text-muted);
    display: block;
    margin-top: -2px;
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 12px 6px;
    margin-top: 8px;
}

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

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    text-decoration: none;
}

.nav-link i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.nav-link.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--accent-primary);
    font-weight: 600;
}

.nav-link .badge {
    margin-left: auto;
    font-size: 11px;
    padding: 3px 8px;
}

/* ---- Topbar ---- */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: rgba(10, 10, 26, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 999;
    transition: var(--transition);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.topbar-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 22px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.sidebar-toggle:hover { color: var(--text-primary); background: var(--bg-hover); }

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 20px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    position: relative;
    transition: var(--transition);
}
.topbar-btn:hover { background: var(--bg-hover); color: var(--text-primary); }

.topbar-btn .notif-badge {
    position: absolute;
    top: 4px; right: 4px;
    width: 8px; height: 8px;
    background: var(--accent-danger);
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.topbar-user:hover { background: var(--bg-hover); }

.topbar-avatar {
    width: 34px; height: 34px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
}

.topbar-user-info .user-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}
.topbar-user-info .user-role {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: capitalize;
}

/* ---- Main Content ---- */
.main-content {
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    transition: var(--transition);
}

.content-wrapper {
    padding: 24px;
}

.page-header {
    margin-bottom: 24px;
}
.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 4px;
    color: var(--text-primary);
}
.page-header p {
    font-size: 14px;
    color: var(--text-secondary);
    margin: 0;
}

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

.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 3px;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

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

.stat-card.card-primary::before { background: var(--gradient-primary); }
.stat-card.card-success::before { background: var(--gradient-success); }
.stat-card.card-warning::before { background: var(--gradient-warning); }
.stat-card.card-danger::before { background: var(--gradient-danger); }
.stat-card.card-info::before { background: var(--gradient-info); }

.stat-card .stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.stat-card .stat-icon.icon-primary { background: rgba(102,126,234,0.15); color: var(--accent-primary); }
.stat-card .stat-icon.icon-success { background: rgba(56,239,125,0.15); color: var(--accent-success); }
.stat-card .stat-icon.icon-warning { background: rgba(247,183,49,0.15); color: var(--accent-warning); }
.stat-card .stat-icon.icon-danger { background: rgba(255,107,107,0.15); color: var(--accent-danger); }
.stat-card .stat-icon.icon-info { background: rgba(78,205,196,0.15); color: var(--accent-info); }

.stat-card .stat-value {
    font-size: 28px;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-card .stat-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

/* ---- Data Tables ---- */
.data-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.data-card .card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.data-card .card-header h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}

.data-table {
    width: 100%;
    margin: 0;
}

.data-table th {
    background: rgba(15, 15, 45, 0.5);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text-secondary);
    border: none;
    border-bottom: 1px solid rgba(102, 126, 234, 0.06);
    vertical-align: middle;
}

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

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

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

/* ---- Badges ---- */
.badge {
    font-weight: 600;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
}
.badge.bg-success { background: rgba(56,239,125,0.15) !important; color: var(--accent-success) !important; }
.badge.bg-danger { background: rgba(255,107,107,0.15) !important; color: var(--accent-danger) !important; }
.badge.bg-warning { background: rgba(247,183,49,0.15) !important; color: var(--accent-warning) !important; }
.badge.bg-info { background: rgba(78,205,196,0.15) !important; color: var(--accent-info) !important; }
.badge.bg-primary { background: rgba(102,126,234,0.15) !important; color: var(--accent-primary) !important; }
.badge.bg-secondary { background: rgba(106,106,144,0.15) !important; color: var(--text-muted) !important; }
.badge.bg-dark { background: rgba(50,50,80,0.4) !important; color: var(--text-muted) !important; }

/* ---- Progress Bar ---- */
.progress {
    background: rgba(25, 25, 60, 0.5);
    border-radius: 20px;
    height: 8px;
    overflow: hidden;
}

.progress-bar {
    background: var(--gradient-primary);
    border-radius: 20px;
    transition: width 0.6s ease;
}

/* ---- Buttons ---- */
.btn-glass {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
}
.btn-glass:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
    color: var(--text-primary);
}

.btn-sm-gradient {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
}
.btn-sm-gradient:hover { box-shadow: 0 4px 15px rgba(102,126,234,0.3); color: #fff; }

/* ---- Empty States ---- */
.empty-state {
    text-align: center;
    padding: 48px 24px;
}
.empty-state .empty-icon {
    font-size: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
    opacity: 0.5;
}
.empty-state h3 {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}
.empty-state p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ---- Upload Zone ---- */
.upload-zone {
    border: 2px dashed var(--border-color);
    border-radius: var(--radius-lg);
    padding: 48px 24px;
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    background: rgba(15, 15, 45, 0.3);
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: var(--accent-primary);
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 0 30px rgba(102, 126, 234, 0.1);
}

.upload-zone .upload-icon {
    font-size: 48px;
    color: var(--accent-primary);
    margin-bottom: 16px;
    opacity: 0.7;
}

.upload-zone h3 {
    font-size: 18px;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.upload-zone p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ---- Job Timeline ---- */
.timeline {
    position: relative;
    padding-left: 28px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border-color);
    border: 2px solid var(--bg-primary);
}

.timeline-item.active::before { background: var(--accent-primary); box-shadow: 0 0 8px rgba(102,126,234,0.4); }
.timeline-item.completed::before { background: var(--accent-success); }
.timeline-item.failed::before { background: var(--accent-danger); }

/* ---- Toast Notifications ---- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast-custom {
    background: var(--bg-card-solid);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    color: var(--text-primary);
    font-size: 14px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 320px;
    animation: slideIn 0.3s ease;
}

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

/* ---- Pagination ---- */
.pagination-custom .page-link {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    margin: 0 2px;
    font-size: 14px;
    padding: 6px 12px;
    transition: var(--transition);
}
.pagination-custom .page-link:hover {
    background: var(--bg-hover);
    border-color: var(--border-active);
    color: var(--text-primary);
}
.pagination-custom .page-item.active .page-link {
    background: var(--gradient-primary);
    border-color: transparent;
    color: #fff;
}

/* ---- Search & Filters ---- */
.search-bar {
    position: relative;
}
.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 16px;
}
.search-bar input {
    padding-left: 40px !important;
}

/* ---- Modal ---- */
.modal-content {
    background: var(--bg-card-solid) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: var(--radius-lg) !important;
    color: var(--text-primary);
}
.modal-header { border-bottom-color: var(--border-color) !important; }
.modal-footer { border-top-color: var(--border-color) !important; }
.modal-title { color: var(--text-primary); font-weight: 600; }

/* ---- Form Controls (Dashboard) ---- */
.form-control, .form-select {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-sm) !important;
    font-size: 14px;
    transition: var(--transition);
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.15) !important;
}
.form-label {
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
}

/* ---- Animations ---- */
.animate-fade-in {
    animation: fadeIn 0.5s ease;
}

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

.animate-slide-up {
    animation: slideUp 0.4s ease;
}

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

/* ---- Error Pages ---- */
.error-page {
    text-align: center;
    padding: 60px 20px;
}
.error-page .error-code {
    font-size: 80px;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}
.error-page h2 { font-size: 24px; margin: 16px 0 8px; color: var(--text-primary); }
.error-page p { color: var(--text-muted); font-size: 15px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0,0,0,0.5);
    }
    .topbar {
        left: 0;
    }
    .main-content {
        margin-left: 0;
    }
    .sidebar-toggle {
        display: block;
    }
    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    .sidebar-overlay.active {
        display: block;
    }
}

@media (max-width: 575.98px) {
    .auth-container { padding: 12px; }
    .auth-body-inner { padding: 20px; }
    .auth-header { padding: 24px 20px 0; }
    .auth-footer { padding: 12px 20px 20px; }
    .otp-digit { width: 44px; height: 52px; font-size: 20px; }
    .stat-card .stat-value { font-size: 22px; }
    .content-wrapper { padding: 16px; }
}
