/* ============================================================
   SHADOW BULK SMS — DASHBOARD STYLE CSS v2.2
   Sidebar • Topbar • Components • Dark Mode • Auth Pages
   Shadow Innovations © 2024
   ============================================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --secondary: #06b6d4;
    --accent: #8b5cf6;

    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;

    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #0f172a;

    /* Semantic vars (dark mode flips these) */
    --bg: #f8fafc;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --border: #e2e8f0;
    --text: #0f172a;
    --text-soft: #475569;
    --text-muted: #94a3b8;

    --shadow-sm: 0 1px 2px rgb(15 23 42 / 0.05);
    --shadow: 0 1px 3px rgb(15 23 42 / 0.08);
    --shadow-md: 0 4px 8px -2px rgb(15 23 42 / 0.08);
    --shadow-lg: 0 14px 28px -6px rgb(15 23 42 / 0.12);
    --shadow-xl: 0 24px 48px -12px rgb(15 23 42 / 0.18);
    --shadow-primary: 0 8px 24px -6px var(--primary-glow);

    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 50px;

    --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: 0.25s cubic-bezier(0.4, 0, 0.2, 1);

    --sidebar-width: 264px;
    --topbar-height: 68px;
}

/* ---------- 🌙 DARK MODE ---------- */
body[data-theme="dark"] {
    color-scheme: dark;
    --bg: #0b1120;
    --surface: #111a2e;
    --surface-2: #16203a;
    --border: #24304d;
    --text: #e2e8f0;
    --text-soft: #b0bdd4;
    --text-muted: #7c8aa5;
    --gray-50: #16203a;
    --gray-100: #1c2942;
    --shadow-md: 0 4px 14px rgb(0 0 0 / 0.4);
    --shadow-lg: 0 14px 34px rgb(0 0 0 / 0.5);
}

/* ---------- 2. RESET & BASE ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 0.95rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background var(--transition), color var(--transition);
}

a { color: var(--primary); text-decoration: none; }
img, svg { max-width: 100%; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

:focus-visible {
    outline: 2px solid var(--primary-light);
    outline-offset: 2px;
}

/* ---------- 3. LAYOUT ---------- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.dashboard-body { background: var(--bg); min-height: 100vh; }

/* ---------- 4. SIDEBAR ---------- */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-width);
    background: var(--surface);
    border-right: 1px solid var(--border);
    z-index: 200;
    display: flex; flex-direction: column;
    transition: transform var(--transition), width var(--transition);
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    min-height: var(--topbar-height);
}
.sidebar-header .brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sidebar-header .brand-icon {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1rem;
    box-shadow: var(--shadow-primary);
    flex-shrink: 0;
}
.sidebar-header .brand-text {
    font-weight: 800; font-size: 1.05rem; color: var(--text);
    line-height: 1.2; white-space: nowrap;
}
.sidebar-header .brand-sub {
    font-size: 0.62rem; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 1.2px; font-weight: 700;
    display: block; white-space: nowrap;
}
.sidebar-close {
    display: none; background: none; border: none;
    color: var(--text-muted); font-size: 1.2rem; cursor: pointer;
    width: 34px; height: 34px; border-radius: var(--radius-sm);
}
.sidebar-close:hover { background: var(--gray-100); color: var(--text); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.sidebar-section { margin-bottom: 22px; }
.sidebar-section-title {
    font-size: 0.66rem; text-transform: uppercase;
    letter-spacing: 1.5px; color: var(--text-muted);
    padding: 0 12px; margin-bottom: 8px; font-weight: 700;
}

.sidebar-link {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius);
    color: var(--text-soft);
    text-decoration: none;
    font-weight: 600; font-size: 0.88rem;
    transition: var(--transition-fast);
    margin-bottom: 3px;
    position: relative;
}
.sidebar-link:hover { background: var(--gray-100); color: var(--text); }
.sidebar-link.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    box-shadow: var(--shadow-primary);
}
.sidebar-link i { width: 20px; text-align: center; font-size: 1rem; flex-shrink: 0; }
.sidebar-link .badge {
    margin-left: auto;
    background: var(--danger); color: #fff;
    font-size: 0.65rem; padding: 2px 8px;
    border-radius: var(--radius-full);
}
.sidebar-link.active .badge { background: rgba(255,255,255,0.25); }
.sidebar-link.active::before {
    content: ''; position: absolute; left: 0; top: 20%;
    height: 60%; width: 3px;
    background: #fff; border-radius: 0 3px 3px 0;
}

.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }
.sidebar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 10px;
    border-radius: var(--radius);
    background: var(--surface-2);
}
.sidebar-user .user-avatar { width: 36px; height: 36px; font-size: 0.85rem; }
.sidebar-user .user-name {
    font-weight: 700; font-size: 0.85rem; color: var(--text);
    display: block; line-height: 1.3;
}
.sidebar-user .user-role { font-size: 0.72rem; color: var(--text-muted); display: block; }
.sidebar-user a.logout-link {
    margin-left: auto; color: var(--danger);
    font-size: 0.95rem; padding: 6px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}
.sidebar-user a.logout-link:hover { background: #fef2f2; }

/* Collapsed sidebar */
body.sidebar-collapsed .sidebar { width: 74px; }
body.sidebar-collapsed .sidebar-header .brand-text,
body.sidebar-collapsed .sidebar-header .brand-sub,
body.sidebar-collapsed .sidebar-section-title,
body.sidebar-collapsed .sidebar-link span,
body.sidebar-collapsed .sidebar-link .badge,
body.sidebar-collapsed .sidebar-user .user-name,
body.sidebar-collapsed .sidebar-user .user-role { display: none; }
body.sidebar-collapsed .sidebar-link { justify-content: center; padding: 12px; }
body.sidebar-collapsed .main-content { margin-left: 74px; }

/* Mobile overlay */
.sidebar-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(2px);
    z-index: 150;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
}
.sidebar-overlay.show { opacity: 1; visibility: visible; }

/* ---------- 5. MAIN CONTENT + TOPBAR ---------- */
.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin var(--transition);
}

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: 0 28px;
    height: var(--topbar-height);
    display: flex; align-items: center; justify-content: space-between;
    gap: 16px;
    position: sticky; top: 0; z-index: 100;
}

.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }

.menu-toggle {
    display: none; background: none; border: none;
    font-size: 1.25rem; color: var(--text-soft);
    cursor: pointer; padding: 6px;
    border-radius: var(--radius-sm);
}
.menu-toggle:hover { background: var(--gray-100); }

.breadcrumb {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.9rem; white-space: nowrap; overflow: hidden;
}
.breadcrumb span { color: var(--text-muted); }
.breadcrumb .current { color: var(--text); font-weight: 700; }

.topbar-search { position: relative; flex: 1; max-width: 380px; }
.topbar-search i {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.9rem;
}
.search-input {
    width: 100%;
    padding: 10px 14px 10px 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--surface-2);
    color: var(--text);
    font-family: inherit; font-size: 0.88rem;
    transition: var(--transition-fast);
}
.search-input:focus {
    outline: none; border-color: var(--primary);
    background: var(--surface);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.search-input::placeholder { color: var(--text-muted); }

.topbar-right { display: flex; align-items: center; gap: 12px; }

.balance-display {
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(139,92,246,0.1));
    border: 1px solid rgba(99,102,241,0.2);
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-weight: 700; font-size: 0.85rem;
    color: var(--text);
    display: flex; align-items: center; gap: 8px;
}
.balance-display i { color: var(--primary); }

.notification-btn {
    position: relative;
    width: 40px; height: 40px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft); font-size: 1rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-fast);
}
.notification-btn:hover { border-color: var(--primary); color: var(--primary); }
.notification-dot {
    position: absolute; top: 8px; right: 9px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--surface);
}

.user-menu {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; padding: 5px 10px 5px 5px;
    border-radius: var(--radius-full);
    border: 1px solid transparent;
    transition: var(--transition-fast);
}
.user-menu:hover { background: var(--gray-100); border-color: var(--border); }
.user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.88rem;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.user-avatar.avatar-sm { width: 32px; height: 32px; font-size: 0.75rem; }
.user-avatar.avatar-lg { width: 64px; height: 64px; font-size: 1.3rem; }
.user-info { display: flex; flex-direction: column; line-height: 1.3; }
.user-info .user-name { font-weight: 700; font-size: 0.88rem; color: var(--text); }
.user-info .user-role { font-size: 0.72rem; color: var(--text-muted); }
.user-menu > i { color: var(--text-muted); font-size: 0.75rem; }

.theme-toggle {
    width: 40px; height: 40px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-soft); font-size: 0.95rem;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-fast);
}
.theme-toggle:hover { border-color: var(--primary); color: var(--primary); transform: rotate(15deg); }

/* ---------- 6. PAGE CONTENT ---------- */
.page-content { padding: 28px; animation: page-in 0.35s ease; }
@keyframes page-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.page-title { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 4px; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 24px; }
.page-header-row {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 16px; margin-bottom: 24px;
}

/* ---------- 7. STATS CARDS ---------- */
.stats-row {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 18px; margin-bottom: 28px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: ''; position: absolute;
    top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0; transition: var(--transition);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card:hover::after { opacity: 1; }

.stat-card .stat-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 14px;
}
.stat-card .stat-icon {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
}
.stat-card .stat-icon.blue   { background: #eff6ff; color: #3b82f6; }
.stat-card .stat-icon.green  { background: #ecfdf5; color: #10b981; }
.stat-card .stat-icon.purple { background: #f5f3ff; color: #8b5cf6; }
.stat-card .stat-icon.orange { background: #fff7ed; color: #f97316; }
.stat-card .stat-icon.rose   { background: #fff1f2; color: #f43f5e; }
.stat-card .stat-icon.cyan   { background: #ecfeff; color: #06b6d4; }

.stat-card .stat-value {
    font-size: 1.75rem; font-weight: 800;
    color: var(--text);
    margin-bottom: 2px; line-height: 1.2;
}
.stat-card .stat-label { color: var(--text-muted); font-size: 0.85rem; }
.stat-card .stat-change { font-size: 0.78rem; font-weight: 700; }
.stat-card .stat-change.positive { color: var(--success); }
.stat-card .stat-change.negative { color: var(--danger); }

/* ---------- 8. CARDS ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
    transition: var(--transition);
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 12px;
}
.card-header h5 { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.card-header p { font-size: 0.8rem; color: var(--text-muted); }
.card-body { padding: 22px; }
.card-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    background: var(--surface-2);
    display: flex; align-items: center; justify-content: space-between;
}

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2-1 { display: grid; grid-template-columns: 2fr 1fr; gap: 24px; }

/* ---------- 9. TABLES ---------- */
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; }
.table thead th {
    background: var(--surface-2);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700; font-size: 0.72rem;
    text-transform: uppercase; letter-spacing: 0.6px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}
.table tbody td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 0.88rem;
    color: var(--text-soft);
    vertical-align: middle;
}
.table tbody tr { transition: background var(--transition-fast); }
.table tbody tr:hover { background: var(--surface-2); }
.table tbody tr:last-child td { border-bottom: none; }

.table .cell-main { font-weight: 700; color: var(--text); }
.table .cell-sub { font-size: 0.76rem; color: var(--text-muted); display: block; }

.table-actions { display: flex; gap: 6px; }
.table-actions button, .table-actions a {
    width: 32px; height: 32px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: var(--radius-sm);
    color: var(--text-soft); font-size: 0.8rem;
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: var(--transition-fast);
}
.table-actions button:hover, .table-actions a:hover {
    border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,0.06);
}
.table-actions .danger:hover { border-color: var(--danger); color: var(--danger); background: #fef2f2; }

/* ---------- 10. BADGES ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-weight: 700; font-size: 0.7rem;
    text-transform: uppercase; letter-spacing: 0.4px;
    white-space: nowrap;
}
.badge-success { background: #ecfdf5; color: #059669; }
.badge-danger  { background: #fef2f2; color: #dc2626; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-info    { background: #eff6ff; color: #2563eb; }
.badge-primary { background: #f5f3ff; color: #7c3aed; }
.badge-neutral { background: var(--gray-100); color: var(--text-muted); }
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- 11. BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 700; font-size: 0.88rem;
    text-decoration: none;
    transition: var(--transition-fast);
    cursor: pointer; border: none;
    font-family: inherit;
    white-space: nowrap; line-height: 1.4;
}
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn.disabled {
    opacity: 0.55; cursor: not-allowed;
    transform: none !important;
}

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 28px; font-size: 0.95rem; }
.btn-block { width: 100%; }

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff; box-shadow: var(--shadow-primary);
}
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 10px 22px -6px var(--primary-glow); }

.btn-outline {
    background: transparent; color: var(--text-soft);
    border: 2px solid var(--border);
}
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: rgba(99,102,241,0.05); }

.btn-white { background: var(--surface); color: var(--text); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.btn-white:hover:not(:disabled) { box-shadow: var(--shadow-md); }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover:not(:disabled) { background: #059669; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #dc2626; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover:not(:disabled) { background: #d97706; }

.btn-icon {
    width: 40px; height: 40px; padding: 0;
    border-radius: var(--radius);
}

.btn .spinner-border {
    width: 14px; height: 14px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 12. FORMS ---------- */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block; font-weight: 700; font-size: 0.85rem;
    color: var(--text-soft); margin-bottom: 7px;
}
.form-label .required { color: var(--danger); }

.form-control, .form-select {
    width: 100%;
    padding: 11px 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 16px; /* iOS auto-zoom fix */
    font-family: inherit;
    background: var(--surface);
    color: var(--text);
    transition: var(--transition-fast);
}
.form-control:focus, .form-select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { background: var(--gray-100); cursor: not-allowed; }
textarea.form-control { resize: vertical; min-height: 110px; }

.form-hint { font-size: 0.78rem; color: var(--text-muted); margin-top: 6px; line-height: 1.5; }
.form-error { font-size: 0.78rem; color: var(--danger); margin-top: 5px; font-weight: 600; }
.form-control.is-invalid { border-color: var(--danger); }
.form-control.is-valid { border-color: var(--success); }

.input-group { position: relative; }
.input-group .input-icon {
    position: absolute; left: 14px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted); font-size: 0.9rem;
    pointer-events: none;
}
.input-group .form-control { padding-left: 42px; }

.char-counter {
    font-size: 0.78rem; color: var(--text-muted);
    text-align: right; margin-top: 6px; font-weight: 600;
}
.char-counter.limit-reached { color: var(--danger); }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex-shrink: 0; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider {
    position: absolute; inset: 0;
    background: var(--gray-300);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-fast);
}
.switch .slider::before {
    content: ''; position: absolute;
    width: 20px; height: 20px; left: 3px; top: 3px;
    background: #fff; border-radius: 50%;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.switch input:checked + .slider { background: var(--primary); }
.switch input:checked + .slider::before { transform: translateX(20px); }

.form-check {
    display: flex; align-items: center; gap: 10px;
    cursor: pointer; font-size: 0.88rem; color: var(--text-soft);
}
.form-check input[type="checkbox"] {
    width: 18px; height: 18px;
    accent-color: var(--primary);
    cursor: pointer;
}

/* Upload zone */
.upload-zone {
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 40px 24px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-fast);
    background: var(--surface-2);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(99,102,241,0.05);
}
.upload-zone i { font-size: 2.2rem; color: var(--primary); margin-bottom: 12px; }
.upload-zone h4 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; color: var(--text); }
.upload-zone p { color: var(--text-muted); font-size: 0.83rem; }
.upload-zone input[type="file"] { display: none; }

/* ---------- 13. ALERTS ---------- */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 0.9rem;
    animation: alert-in 0.3s ease;
}
@keyframes alert-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}
.alert i { margin-top: 2px; flex-shrink: 0; }
.alert-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.alert-danger  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.alert-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.alert-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.alert .alert-close {
    margin-left: auto; background: none; border: none;
    color: inherit; cursor: pointer; opacity: 0.6;
    font-size: 1rem; padding: 0 4px;
}
.alert .alert-close:hover { opacity: 1; }

/* ---------- 14. MODAL ---------- */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
    opacity: 0; visibility: hidden;
    transition: var(--transition);
}
.modal-overlay.show { opacity: 1; visibility: visible; }

.modal-content {
    background: var(--surface);
    border-radius: var(--radius-xl);
    width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transform: translateY(20px) scale(0.97);
    transition: transform var(--transition);
}
.modal-overlay.show .modal-content { transform: translateY(0) scale(1); }
.modal-content.modal-sm { max-width: 400px; }
.modal-content.modal-lg { max-width: 720px; }

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h5 { font-size: 1.1rem; font-weight: 800; color: var(--text); }
.modal-close {
    background: var(--gray-100); border: none;
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    color: var(--text-soft); cursor: pointer; font-size: 0.95rem;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition-fast);
}
.modal-close:hover { background: #fef2f2; color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 12px;
    background: var(--surface-2);
}

/* ---------- 15. DROPDOWN MENUS ---------- */
.dropdown-wrapper { position: relative; }
.dropdown-menu {
    position: absolute; top: calc(100% + 10px); right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xl);
    min-width: 220px;
    z-index: 500;
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: var(--transition-fast);
    overflow: hidden;
}
.dropdown-menu.show { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-header {
    padding: 12px 16px;
    font-size: 0.75rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.8px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border);
    background: var(--surface-2);
}
.dropdown-item {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 16px;
    color: var(--text-soft);
    font-size: 0.87rem; font-weight: 600;
    transition: var(--transition-fast);
    cursor: pointer;
}
.dropdown-item i { width: 18px; text-align: center; color: var(--text-muted); }
.dropdown-item:hover { background: var(--gray-100); color: var(--text); }
.dropdown-item:hover i { color: var(--primary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger i { color: var(--danger); }
.dropdown-item.danger:hover { background: #fef2f2; }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

.dropdown-item .nd-content { flex: 1; min-width: 0; }
.dropdown-item .nd-title { font-weight: 700; font-size: 0.85rem; color: var(--text); }
.dropdown-item .nd-time { font-size: 0.72rem; color: var(--text-muted); }
.dropdown-item.unread { background: rgba(99,102,241,0.05); }

/* ---------- 16. TABS ---------- */
.tabs {
    display: flex; gap: 4px;
    border-bottom: 2px solid var(--border);
    margin-bottom: 24px;
    overflow-x: auto;
}
.tab-btn {
    padding: 12px 20px;
    background: none; border: none;
    font-family: inherit; font-size: 0.9rem; font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition-fast);
    white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-btn i { margin-right: 6px; }
.tab-content { display: none; }
.tab-content.active { display: block; animation: page-in 0.3s ease; }

/* ---------- 17. PAGINATION ---------- */
.pagination { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.page-link {
    min-width: 38px; height: 38px;
    padding: 0 12px;
    display: inline-flex; align-items: center; justify-content: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-soft);
    font-size: 0.85rem; font-weight: 600;
    transition: var(--transition-fast);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { opacity: 0.45; pointer-events: none; }

/* ---------- 18. PROGRESS BARS ---------- */
.progress {
    width: 100%; height: 8px;
    background: var(--gray-100);
    border-radius: var(--radius-full);
    overflow: hidden;
}
.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: var(--radius-full);
    transition: width 0.6s ease;
}
.progress-bar.success { background: var(--success); }
.progress-bar.warning { background: var(--warning); }
.progress-bar.danger  { background: var(--danger); }

/* ---------- 19. TIMELINE ---------- */
.timeline { position: relative; padding-left: 28px; }
.timeline::before {
    content: ''; position: absolute;
    left: 8px; top: 6px; bottom: 6px;
    width: 2px;
    background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 24px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
    position: absolute; left: -28px; top: 3px;
    width: 18px; height: 18px;
    background: var(--primary);
    border: 3px solid var(--surface);
    border-radius: 50%;
    box-shadow: 0 0 0 2px var(--primary);
}
.timeline-dot.green  { background: var(--success); box-shadow: 0 0 0 2px var(--success); }
.timeline-dot.orange { background: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.timeline-dot.red    { background: var(--danger);  box-shadow: 0 0 0 2px var(--danger); }
.timeline-content h5 { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.timeline-content p { font-size: 0.82rem; color: var(--text-muted); }
.timeline-content small { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }

/* ---------- 20. EMPTY STATE ---------- */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}
.empty-state .empty-icon {
    width: 80px; height: 80px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; color: var(--gray-400);
    margin: 0 auto 18px;
}
.empty-state h4 { font-size: 1.05rem; font-weight: 700; color: var(--text); margin-bottom: 6px; }
.empty-state p { font-size: 0.88rem; max-width: 340px; margin: 0 auto 20px; }

/* ---------- 21. SKELETON LOADERS ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 50%, var(--gray-100) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.4s infinite;
    border-radius: var(--radius-sm);
    min-height: 14px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.skeleton.skeleton-text { height: 12px; margin-bottom: 8px; }
.skeleton.skeleton-title { height: 20px; width: 55%; margin-bottom: 12px; }
.skeleton.skeleton-avatar { width: 40px; height: 40px; border-radius: 50%; }
.skeleton.skeleton-card { height: 120px; border-radius: var(--radius-lg); }

/* ---------- 22. QUICK ACTIONS ---------- */
.quick-actions {
    display: grid; grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}
.quick-action {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 14px;
    text-align: center;
    text-decoration: none;
    transition: var(--transition);
}
.quick-action:hover {
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.quick-action i {
    width: 46px; height: 46px;
    border-radius: 14px;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.15rem; margin-bottom: 10px;
}
.quick-action i.blue   { background: #eff6ff; color: #3b82f6; }
.quick-action i.purple { background: #f5f3ff; color: #8b5cf6; }
.quick-action i.green  { background: #ecfdf5; color: #10b981; }
.quick-action i.orange { background: #fff7ed; color: #f97316; }
.quick-action span {
    display: block; font-size: 0.83rem;
    font-weight: 700; color: var(--text);
}

/* ---------- 23. API KEY BOX ---------- */
.api-key-box {
    display: flex; align-items: center; gap: 12px;
    background: var(--gray-900);
    border-radius: var(--radius);
    padding: 14px 18px;
    font-family: 'SF Mono', Consolas, monospace;
    font-size: 0.85rem;
    color: #a5b4fc;
    overflow-x: auto;
}
.api-key-box .copy-btn {
    margin-left: auto; flex-shrink: 0;
    background: rgba(255,255,255,0.1);
    color: #fff; border: none;
    padding: 6px 14px; border-radius: var(--radius-sm);
    cursor: pointer; font-size: 0.78rem; font-weight: 700;
    font-family: 'Plus Jakarta Sans', sans-serif;
    transition: var(--transition-fast);
}
.api-key-box .copy-btn:hover { background: var(--primary); }

/* ---------- 24. CHART PLACEHOLDER ---------- */
.chart-placeholder {
    background: var(--surface-2);
    border: 2px dashed var(--gray-200);
    border-radius: var(--radius);
    min-height: 260px;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--text-muted);
    gap: 10px;
    font-size: 0.88rem;
}
.chart-placeholder i { font-size: 2rem; color: var(--gray-300); }

/* ============================================================
   25. AUTH PAGES v2.2 — login • register • forgot-password
   Split panel • Mobile strip • OTP • Fully responsive
   ============================================================ */

.auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--bg);
}

/* Left brand panel (desktop only) */
.auth-brand-panel {
    background:
        radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.12), transparent 50%),
        linear-gradient(135deg, var(--primary), var(--primary-dark) 60%, var(--accent));
    color: #fff;
    display: flex; flex-direction: column;
    justify-content: center;
    padding: clamp(32px, 5vw, 72px);
    position: relative;
    overflow: hidden;
}
.auth-brand-panel::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
    background-size: 26px 26px; opacity: 0.35;
    pointer-events: none;
}
.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-panel .brand-icon {
    width: 56px; height: 56px; font-size: 1.5rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 28px;
    box-shadow: none;
    color: #fff;
}
.auth-brand-panel h2 {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
    font-weight: 800; margin-bottom: 14px;
    letter-spacing: -0.02em; line-height: 1.25;
    color: #fff;
}
.auth-brand-panel p {
    opacity: 0.9; max-width: 400px;
    line-height: 1.7; font-size: clamp(0.9rem, 1.2vw, 1rem);
    color: rgba(255,255,255,0.92);
}
.auth-brand-points {
    margin-top: 32px; display: flex; flex-direction: column;
    gap: 14px; list-style: none; padding: 0;
}
.auth-brand-points li {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.92rem; font-weight: 600; color: #fff;
}
.auth-brand-points i {
    width: 28px; height: 28px; flex-shrink: 0;
    background: rgba(255,255,255,0.15);
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.72rem;
}

/* Right form panel */
.auth-form-panel {
    display: flex; align-items: center; justify-content: center;
    padding: clamp(20px, 4vw, 48px) 24px;
    overflow-y: auto;
}
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    width: 100%;
    max-width: 460px;
    padding: clamp(24px, 4vw, 44px);
}

/* Mobile brand strip (mobile pe hi dikhta hai) */
.mobile-brand-strip {
    display: none;
    align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    margin: -6px -6px 24px;
    padding: 14px;
    border-radius: var(--radius-lg);
    color: #fff; font-weight: 800; font-size: 1rem;
}
.mobile-brand-strip .strip-icon {
    width: 34px; height: 34px;
    background: rgba(255,255,255,0.18);
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
}

/* Auth header */
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-header .auth-icon {
    width: 64px; height: 64px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 1.5rem;
    margin: 0 auto 16px;
    box-shadow: var(--shadow-primary);
}
.auth-header h2 {
    font-size: clamp(1.3rem, 4vw, 1.55rem);
    font-weight: 800; color: var(--text);
    margin-bottom: 6px; letter-spacing: -0.02em;
}
.auth-header p {
    color: var(--text-muted); font-size: 0.9rem;
    line-height: 1.5;
    overflow-wrap: break-word;
}

/* Step indicator */
.auth-steps {
    display: flex; align-items: center; justify-content: center;
    gap: 6px; margin-bottom: 28px;
}
.astep {
    display: flex; flex-direction: column;
    align-items: center; gap: 6px;
    flex-shrink: 0;
}
.astep-dot {
    width: 38px; height: 38px; border-radius: 50%;
    background: var(--gray-100); color: var(--text-muted);
    border: 2px solid var(--border);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem;
    transition: var(--transition-fast);
}
.astep small {
    font-size: 0.62rem; font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.5px;
}
.astep.active .astep-dot {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-color: transparent; color: #fff;
    box-shadow: var(--shadow-primary);
}
.astep.active small { color: var(--primary); }
.astep.done .astep-dot {
    background: var(--success); border-color: transparent; color: #fff;
}
.astep-line {
    flex: 1 1 auto; min-width: 16px; max-width: 40px;
    height: 2px; background: var(--border);
    border-radius: 2px; margin-bottom: 22px;
    flex-shrink: 1;
}

/* OTP digits (fluid — chhote phones pe bhi fit) */
.otp-display {
    display: flex; gap: clamp(6px, 2vw, 10px);
    justify-content: center;
}
.otp-digit {
    width: clamp(40px, 11.5vw, 52px);
    height: clamp(50px, 13.5vw, 60px);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    text-align: center;
    font-size: clamp(1.2rem, 4vw, 1.5rem);
    font-weight: 800;
    color: var(--text);
    background: var(--surface);
    transition: var(--transition-fast);
    -webkit-appearance: none;
    appearance: none;
}
.otp-digit:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15);
    transform: translateY(-2px);
}

/* Password fields */
.password-wrapper { position: relative; }
.password-toggle {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 8px; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
}
.password-toggle:hover { color: var(--primary); }

.pw-strength { display: flex; gap: 5px; margin-top: 8px; }
.pw-strength span {
    height: 4px; flex: 1;
    background: var(--gray-200);
    border-radius: 2px;
    transition: background 0.2s ease;
}
.pw-strength.weak   span:nth-child(1)    { background: var(--danger); }
.pw-strength.fair   span:nth-child(-n+2) { background: var(--warning); }
.pw-strength.good   span:nth-child(-n+3) { background: var(--secondary); }
.pw-strength.strong span                 { background: var(--success); }

/* Resend row */
.resend-row {
    text-align: center; margin-top: 18px;
    font-size: 0.86rem; color: var(--text-muted);
    line-height: 2;
}
.resend-row a { color: var(--primary); font-weight: 700; }
.resend-row button {
    background: none; border: none; color: var(--primary);
    font-weight: 700; cursor: pointer; font-family: inherit;
    font-size: 0.86rem; padding: 4px 8px;
    border-radius: var(--radius-sm);
}
.resend-row button:disabled { color: var(--text-muted); cursor: not-allowed; }

/* Mail note (OTP step) */
.mail-note {
    display: flex; align-items: flex-start; gap: 10px;
    background: var(--gray-50);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 12px 14px;
    font-size: 0.82rem; color: var(--text-muted);
    margin-bottom: 20px; line-height: 1.6;
}
.mail-note i { color: var(--primary); flex-shrink: 0; margin-top: 2px; }

/* Debug OTP box */
.debug-otp {
    background: #fffbeb; border: 1px dashed var(--warning);
    color: #92400e; padding: 12px 16px; border-radius: var(--radius);
    text-align: center; font-weight: 700;
    margin-bottom: 16px; font-size: 0.95rem;
}

/* Auth footer text */
.auth-footer-text {
    text-align: center; margin-top: 22px;
    font-size: 0.86rem; color: var(--text-muted);
    line-height: 1.8;
}
.auth-footer-text a { color: var(--primary); font-weight: 700; }

/* ---------- 26. SETTINGS / PROFILE ---------- */
.settings-nav {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin-bottom: 24px;
}
.settings-nav a {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 20px;
    color: var(--text-soft); font-weight: 600; font-size: 0.9rem;
    border-left: 3px solid transparent;
    transition: var(--transition-fast);
}
.settings-nav a:hover { background: var(--gray-100); }
.settings-nav a.active {
    background: rgba(99,102,241,0.06);
    border-left-color: var(--primary);
    color: var(--primary);
}
.settings-nav a i { width: 20px; text-align: center; }

/* ---------- 27. UTILITIES ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }

.mt-1 { margin-top: 8px; }  .mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; } .mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px;}.mb-4 { margin-bottom: 32px; }

.d-flex { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-1 { gap: 8px; } .gap-2 { gap: 16px; } .gap-3 { gap: 24px; }
.w-full { width: 100%; }
.flex-wrap { flex-wrap: wrap; }

/* ---------- 28. RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .grid-2, .grid-3, .grid-2-1 { grid-template-columns: 1fr; }
    .quick-actions { grid-template-columns: repeat(2, 1fr); }
    .form-row-3 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        box-shadow: none;
    }
    .sidebar.active { transform: translateX(0); box-shadow: var(--shadow-xl); }
    .sidebar-close { display: flex; align-items: center; justify-content: center; }
    body.sidebar-collapsed .sidebar { width: 280px; }
    body.sidebar-collapsed .sidebar-header .brand-text,
    body.sidebar-collapsed .sidebar-header .brand-sub,
    body.sidebar-collapsed .sidebar-section-title,
    body.sidebar-collapsed .sidebar-link span { display: block; }
    body.sidebar-collapsed .sidebar-link { justify-content: flex-start; padding: 11px 14px; }
    body.sidebar-collapsed .main-content { margin-left: 0; }

    .main-content { margin-left: 0; }
    .menu-toggle { display: flex; align-items: center; justify-content: center; }

    .topbar { padding: 0 16px; }
    .topbar-search { display: none; }
    .balance-display { display: none; }
    .user-info { display: none; }

    .page-content { padding: 16px; }
    .stats-row { grid-template-columns: 1fr; gap: 14px; }
    .page-header-row { flex-direction: column; align-items: flex-start; }
    .modal-footer { flex-direction: column; }
    .modal-footer .btn { width: 100%; }
}

@media (max-width: 480px) {
    .card-body { padding: 16px; }
    .table thead th, .table tbody td { padding: 10px 12px; font-size: 0.8rem; }
    .quick-actions { grid-template-columns: 1fr 1fr; gap: 10px; }
}

/* ---------- AUTH RESPONSIVE ---------- */

/* Tablet ≤ 900px: brand panel hide, single column */
@media (max-width: 900px) {
    .auth-page { grid-template-columns: 1fr; }
    .auth-brand-panel { display: none; }
    .mobile-brand-strip { display: flex; }
}

/* Mobile ≤ 600px */
@media (max-width: 600px) {
    .auth-page { background: var(--surface); }
    .auth-form-panel {
        padding: 28px 14px calc(16px + env(safe-area-inset-bottom));
        align-items: flex-start;
    }
    .auth-card {
        border-radius: 18px;
        border: none;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
        max-width: 100%;
    }
    .auth-header .auth-icon { width: 56px; height: 56px; font-size: 1.3rem; border-radius: 16px; }
    .auth-steps { margin-bottom: 22px; }
    .astep-dot { width: 34px; height: 34px; font-size: 0.75rem; }
    .astep small { font-size: 0.56rem; }
    .auth-form-panel .btn { width: 100%; }
}

/* Small mobile ≤ 400px */
@media (max-width: 400px) {
    .auth-card { padding: 20px 16px; }
    .otp-digit { width: 38px; height: 48px; font-size: 1.1rem; border-radius: 10px; }
    .astep-line { min-width: 10px; }
    .astep small { display: none; }
    .mail-note { font-size: 0.78rem; }
}

/* ---------- 29. REDUCED MOTION ---------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ---------- 30. PRINT ---------- */
@media print {
    .sidebar, .topbar, .btn, .sidebar-overlay, .auth-brand-panel { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: #fff; color: #000; }
}