@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* ═══════════════════════════════════════════════════════════
   FADA APP — DESIGN SYSTEM v2
   Dark Mode (default) + Light Mode via [data-theme="light"]
═══════════════════════════════════════════════════════════ */

/* ─── Modern White + Green Tokens ─── */
:root {
    --bg-base:          #f3fdf6;
    --bg-surface:       #ffffff;
    --bg-card:          rgba(255, 255, 255, 0.9);
    --bg-card-hover:    rgba(255, 255, 255, 0.98);
    --glass-border:     rgba(22, 163, 74, 0.16);
    --glass-border-hov: rgba(22, 163, 74, 0.28);
    --glass-shadow:     0 18px 42px rgba(22, 101, 52, 0.12);
    --glass-blur:       blur(18px);

    --text-primary:     #102b1d;
    --text-secondary:   #355c49;
    --text-muted:       #5f7d6d;

    --accent-cyan:      #22c55e;
    --accent-violet:    #16a34a;
    --accent-coral:     #10b981;
    --accent-emerald:   #15803d;
    --accent-amber:     #65a30d;
    --accent-indigo:    #4ade80;

    --glow-1: rgba(34,197,94,0.12);
    --glow-2: rgba(22,163,74,0.08);

    --sidebar-bg:       rgba(255,255,255,0.94);
    --sidebar-w:        265px;

    --input-bg:         rgba(255,255,255,0.96);
    --input-border:     rgba(34, 197, 94, 0.18);

    --stat-1: linear-gradient(135deg,#ecfdf5,#f0fdf4);
    --stat-2: linear-gradient(135deg,#dcfce7,#ecfdf5);
    --stat-3: linear-gradient(135deg,#bbf7d0,#86efac);
    --stat-4: linear-gradient(135deg,#f0fdf4,#ecfccb);

    --scrollbar-track:  #edf9f1;
    --scrollbar-thumb:  #9ad9ab;
}

/* ─── Light Mode Tokens ─── */
[data-theme="light"] {
    --bg-base:          #f3fdf7;
    --bg-surface:       #ffffff;
    --bg-card:          rgba(255,255,255,0.84);
    --bg-card-hover:    rgba(255,255,255,0.98);
    --glass-border:     rgba(20, 83, 45, 0.12);
    --glass-border-hov: rgba(34, 197, 94, 0.28);
    --glass-shadow:     0 12px 30px rgba(16, 185, 129, 0.12);
    --glass-blur:       blur(16px);

    --text-primary:     #10281d;
    --text-secondary:   #355547;
    --text-muted:       #5d766b;

    --accent-cyan:      #16a34a;
    --accent-violet:    #22c55e;
    --accent-coral:     #f59e0b;
    --accent-emerald:   #15803d;
    --accent-amber:     #d97706;
    --accent-indigo:    #0f766e;

    --glow-1: rgba(34,197,94,0.11);
    --glow-2: rgba(22,163,74,0.08);

    --sidebar-bg:       rgba(255,255,255,0.92);

    --input-bg:         rgba(255,255,255,0.96);
    --input-border:     rgba(34, 197, 94, 0.18);

    --stat-1: linear-gradient(135deg,#ecfdf5,#f0fdf4);
    --stat-2: linear-gradient(135deg,#dcfce7,#ecfdf5);
    --stat-3: linear-gradient(135deg,#bbf7d0,#86efac);
    --stat-4: linear-gradient(135deg,#fef3c7,#fef9c3);

    --scrollbar-track:  #edf9f1;
    --scrollbar-thumb:  #9fd9b3;
}

/* ─── Dark Mode Tokens ─── */
[data-theme="dark"] {
    --bg-base:          #071912;
    --bg-surface:       #0d1f19;
    --bg-card:          rgba(13, 31, 25, 0.76);
    --bg-card-hover:    rgba(19, 41, 33, 0.9);
    --glass-border:     rgba(110, 231, 183, 0.18);
    --glass-border-hov: rgba(110, 231, 183, 0.34);
    --glass-shadow:     0 18px 42px rgba(2, 18, 12, 0.42);
    --glass-blur:       blur(18px);

    --text-primary:     #ecfff5;
    --text-secondary:   #c4f0d6;
    --text-muted:       #8fc7ab;

    --accent-cyan:      #36d399;
    --accent-violet:    #4ade80;
    --accent-coral:     #fbbf24;
    --accent-emerald:   #22c55e;
    --accent-amber:     #facc15;
    --accent-indigo:    #86efac;

    --glow-1: rgba(34,197,94,0.18);
    --glow-2: rgba(16,185,129,0.14);

    --sidebar-bg:       rgba(7, 25, 18, 0.9);

    --input-bg:         rgba(12, 28, 22, 0.8);
    --input-border:     rgba(134, 239, 172, 0.2);

    --stat-1: linear-gradient(135deg,#052e1f,#0d3b2d);
    --stat-2: linear-gradient(135deg,#123224,#103d34);
    --stat-3: linear-gradient(135deg,#0d3c2b,#155d46);
    --stat-4: linear-gradient(135deg,#3b3321,#2c3a2c);

    --scrollbar-track:  #0b1c17;
    --scrollbar-thumb:  #2c7a57;
}

[data-theme="dark"] body {
    background: #04150f;
}
[data-theme="dark"] .auth-shell {
    background: rgba(8, 18, 14, 0.72);
    border-color: rgba(134, 239, 172, 0.14);
    box-shadow: 0 28px 60px rgba(2, 18, 12, 0.45);
}
[data-theme="dark"] .auth-visual {
    background: linear-gradient(135deg, #071d15 0%, #0d2b21 30%, #102f27 60%, #0d1f19 100%);
    border-right-color: rgba(134, 239, 172, 0.18);
}
[data-theme="dark"] .auth-visual::before {
    background: radial-gradient(circle, rgba(52,211,153,0.26), rgba(52,211,153,0.05) 42%, transparent 72%);
}
[data-theme="dark"] .auth-visual::after {
    background: radial-gradient(circle, rgba(110,231,183,0.2), rgba(110,231,183,0.04) 40%, transparent 72%);
}
[data-theme="dark"] .auth-brand-badge {
    background: rgba(9, 23, 18, 0.7);
    border-color: rgba(134, 239, 172, 0.2);
    color: #eafef3;
    box-shadow: 0 8px 22px rgba(7, 25, 18, 0.28);
}
[data-theme="dark"] .auth-brand-badge i,
[data-theme="dark"] .auth-kicker,
[data-theme="dark"] .auth-visual h1,
[data-theme="dark"] .auth-visual p,
[data-theme="dark"] .feature-list li,
[data-theme="dark"] .device-stat,
[data-theme="dark"] .floating-card,
[data-theme="dark"] .floating-card strong,
[data-theme="dark"] .floating-card .mini-label,
[data-theme="dark"] .device-stat small,
[data-theme="dark"] .device-stat strong,
[data-theme="dark"] .feature-list li i,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .auth-subtitle,
[data-theme="dark"] .signup-text,
[data-theme="dark"] .remember-row label,
[data-theme="dark"] .form-label,
[data-theme="dark"] .form-control,
[data-theme="dark"] .auth-visual h1,
[data-theme="dark"] .auth-visual p {
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
[data-theme="dark"] .auth-kicker { color: #a7f3d0; }
[data-theme="dark"] .auth-visual h1 { color: #f0fff7; }
[data-theme="dark"] .auth-visual p { color: rgba(218, 255, 232, 0.8); }
[data-theme="dark"] .device-card {
    background: rgba(10, 18, 15, 0.68);
    border-color: rgba(134, 239, 172, 0.2);
    box-shadow: 0 32px 70px rgba(2, 18, 12, 0.4);
}
[data-theme="dark"] .device-stat {
    background: rgba(14, 32, 25, 0.86);
    border-color: rgba(134, 239, 172, 0.15);
    color: #e9fff2;
}
[data-theme="dark"] .device-stat i {
    background: rgba(52,211,153,0.14);
    color: #9ae6b4;
}
[data-theme="dark"] .device-stat small { color: #aedfc1; }
[data-theme="dark"] .device-stat strong { color: #f0fff7; }
[data-theme="dark"] .floating-card {
    background: rgba(12, 24, 20, 0.8);
    border-color: rgba(134, 239, 172, 0.18);
    color: #eefff6;
    box-shadow: 0 20px 38px rgba(2, 18, 12, 0.28);
}
[data-theme="dark"] .floating-card .mini-label { color: #a4d4b5; }
[data-theme="dark"] .floating-card strong { color: #f0fff7; }
[data-theme="dark"] .feature-list li {
    background: rgba(10, 22, 17, 0.82);
    border-color: rgba(134, 239, 172, 0.15);
    color: #effff6;
    box-shadow: 0 10px 22px rgba(2, 18, 12, 0.2);
}
[data-theme="dark"] .feature-list li i {
    background: rgba(52,211,153,0.14);
    color: #9ae6b4;
}
[data-theme="dark"] .auth-form-panel {
    background: linear-gradient(135deg, #051811, #0a1d16 45%, #0b1f19 100%);
}
[data-theme="dark"] .auth-card {
    background: linear-gradient(180deg, rgba(9, 22, 17, 0.93), rgba(10, 19, 16, 0.98));
    border-color: rgba(134, 239, 172, 0.2);
    box-shadow: 0 22px 48px rgba(2, 18, 12, 0.42), inset 0 1px 0 rgba(255,255,255,0.04);
}
[data-theme="dark"] .auth-subtitle,
[data-theme="dark"] .signup-text { color: #9bb9a7; }
[data-theme="dark"] .remember-row label { color: var(--text-secondary); }
[data-theme="dark"] .form-control {
    background: rgba(8, 18, 14, 0.9);
    border-color: rgba(134, 239, 172, 0.2);
    color: #eefdf4;
}
[data-theme="dark"] .form-control::placeholder { color: #82a694; }
[data-theme="dark"] .form-label { color: #d3f5dd; }
[data-theme="dark"] .btn-primary { box-shadow: 0 10px 28px rgba(34,197,94,0.22); }
[data-theme="dark"] .auth-theme-toggle {
    color: var(--accent-amber);
    border-color: rgba(134, 239, 172, 0.2);
}
[data-theme="dark"] .alert-success {
    background: rgba(34,197,94,0.12);
    border-color: rgba(52,211,153,0.32);
    color: #b7f7d3;
}
[data-theme="dark"] .alert-danger {
    background: rgba(251,113,133,0.14);
    border-color: rgba(251,113,133,0.32);
    color: #fecdd3;
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    transition: background-color 0.35s ease, color 0.35s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 8px; }

/* ═══════════════════════════════════════════════════════════
   AMBIENT GLOW BACKGROUNDS
═══════════════════════════════════════════════════════════ */
.ambient-glow {
    position: fixed;
    width: 700px; height: 700px;
    border-radius: 50%;
    filter: blur(140px);
    z-index: 0;
    pointer-events: none;
}
.glow-1 { top:-150px; right:-150px; background: var(--glow-1); }
.glow-2 { bottom:-150px; left:-150px; background: var(--glow-2); }

/* ═══════════════════════════════════════════════════════════
   GLASSMORPHISM PANELS
═══════════════════════════════════════════════════════════ */
.glass-panel {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 18px;
    transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}
.glass-panel-hover:hover {
    border-color: var(--glass-border-hov);
    box-shadow: 0 16px 48px rgba(0,0,0,0.35);
    transform: translateY(-3px);
    background: var(--bg-card-hover);
}

/* ═══════════════════════════════════════════════════════════
   APP LAYOUT
═══════════════════════════════════════════════════════════ */
.app-container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ─── Sidebar ─── */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    background: var(--sidebar-bg);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-right: 1px solid var(--glass-border);
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 20;
    transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.3s cubic-bezier(0.4, 0, 0.2, 1), background 0.35s;
}

/* Collapsible Desktop Sidebar */
.sidebar.collapsed {
    width: 76px !important;
    min-width: 76px !important;
    padding: 20px 10px;
}
.sidebar.collapsed .sidebar-brand span,
.sidebar.collapsed .sidebar-section-label,
.sidebar.collapsed .sidebar-link span,
.sidebar.collapsed .sidebar-footer {
    display: none !important;
}
.sidebar.collapsed .sidebar-brand {
    justify-content: center;
    padding: 0;
}
.sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px 0;
}
.sidebar.collapsed .sidebar-link .nav-icon {
    font-size: 18px;
}

.sidebar-toggle-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-primary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    transition: all 0.2s ease;
}
.sidebar-toggle-btn:hover {
    background: rgba(34, 197, 94, 0.12);
    color: var(--accent-emerald);
}

.sidebar-brand {
    font-family: 'Outfit', sans-serif;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 8px;
}
.sidebar-brand .brand-icon {
    width: 38px; height: 38px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-violet));
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
    -webkit-text-fill-color: white;
    box-shadow: 0 12px 20px rgba(34,197,94,0.24);
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 16px 8px 6px;
}

.sidebar-menu { list-style: none; display: flex; flex-direction: column; gap: 2px; flex-grow: 1; }

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}
.sidebar-link .nav-icon {
    width: 20px;
    text-align: center;
    font-size: 15px;
    transition: color 0.2s;
    flex-shrink: 0;
}
.sidebar-link:hover {
    color: var(--text-primary);
    background: rgba(99,102,241,0.08);
}
.sidebar-link.active {
    color: var(--text-primary);
    background: linear-gradient(90deg, rgba(99,102,241,0.18), rgba(34,211,238,0.08));
    border: 1px solid rgba(99,102,241,0.2);
}
.sidebar-link.active .nav-icon { color: var(--accent-cyan); }
.sidebar-link.active::before {
    content: '';
    position: absolute;
    left: 0; top: 20%; bottom: 20%;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet));
}

/* ─── Top-Right User Profile & Logout Bar ─── */
.user-profile-topbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 6px;
}
.user-profile-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 6px;
    border-radius: 30px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s ease;
}
.user-profile-pill:hover {
    border-color: var(--glass-border-hov);
    background: var(--bg-card-hover);
    transform: translateY(-1px);
}
.user-avatar-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
    color: white;
    font-weight: 700;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.2);
}
.user-info-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role-badge {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 500;
}
.btn-logout-top {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 600;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.08);
}
.btn-logout-top:hover {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: #ffffff;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-logout-top .logout-icon {
    font-size: 14px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-logout-top:hover .logout-icon {
    transform: translateX(3px);
}
.mobile-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-emerald), var(--accent-cyan));
    color: white;
    font-weight: 700;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

/* ─── Navbar Brand Logo & Divider ─── */
.app-brand-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 4px 10px 4px 4px;
    border-radius: 12px;
    transition: background 0.2s ease;
}
.app-brand-link:hover {
    background: rgba(34, 197, 94, 0.08);
}
.brand-logo-img {
    width: 32px;
    height: 32px;
}
.brand-title-text {
    font-family: 'Outfit', sans-serif;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 0.5px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.navbar-divider {
    width: 1px;
    height: 24px;
    background: var(--glass-border);
}

/* ─── Main Content ─── */
.main-content {
    flex-grow: 1;
    padding: 24px 32px 40px;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-y: auto;
}

/* ─── Quick Actions Grid & Cards ─── */
.quick-actions-section {
    margin-bottom: 28px;
    padding: 20px 22px;
    border-radius: 20px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.quick-actions-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 12px;
}

.quick-actions-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.quick-actions-icon-badge {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(22, 163, 74, 0.1));
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.quick-actions-heading {
    font-family: 'Outfit', sans-serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    letter-spacing: -0.2px;
}

.quick-actions-role-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.2);
    color: var(--accent-emerald);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.quick-action-card {
    display: block;
    text-decoration: none;
    position: relative;
    border-radius: 16px;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    padding: 16px 18px;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.quick-action-card-inner {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    z-index: 2;
}

.quick-action-icon-box {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.12), rgba(22, 163, 74, 0.06));
    border: 1px solid rgba(34, 197, 94, 0.16);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    transition: all 0.25s ease;
}

.quick-action-content {
    flex: 1;
    min-width: 0;
}

.quick-action-title {
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    transition: color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-action-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin: 3px 0 0 0;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.quick-action-arrow {
    color: var(--text-muted);
    font-size: 11px;
    opacity: 0.6;
    transition: transform 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}

.quick-action-card:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border-hov);
    box-shadow: 0 10px 24px rgba(22, 163, 74, 0.12);
    background: var(--bg-card-hover);
}

.quick-action-card:hover .quick-action-icon-box {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
    color: #ffffff;
    border-color: transparent;
    transform: scale(1.05);
}

.quick-action-card:hover .quick-action-title {
    color: var(--accent-emerald);
}

.quick-action-card:hover .quick-action-arrow {
    transform: translateX(3px);
    color: var(--accent-cyan);
    opacity: 1;
}

.quick-action-card.active {
    border-color: var(--accent-cyan);
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.1), rgba(34, 197, 94, 0.03));
    box-shadow: 0 4px 18px rgba(34, 197, 94, 0.12);
}

.quick-action-card.active .quick-action-icon-box {
    background: var(--accent-cyan);
    color: #ffffff;
    border-color: transparent;
}

.quick-action-card.active .quick-action-title {
    color: var(--accent-cyan);
}

.quick-action-card.active::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-emerald));
    border-radius: 16px 16px 0 0;
}

@media (max-width: 768px) {
    .main-content {
        padding: 14px 14px 30px;
    }
    .quick-actions-section {
        padding: 14px 14px;
        margin-bottom: 20px;
        border-radius: 16px;
    }
    .quick-actions-header {
        margin-bottom: 12px;
    }
    .quick-actions-heading {
        font-size: 14px;
    }
    .quick-actions-role-tag {
        font-size: 11px;
        padding: 3px 8px;
    }
    .quick-actions-grid {
        grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
        gap: 10px;
    }
    .quick-action-card {
        padding: 12px;
        border-radius: 14px;
    }
    .quick-action-card-inner {
        gap: 10px;
    }
    .quick-action-icon-box {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 15px;
        border-radius: 10px;
    }
    .quick-action-title {
        font-size: 12px;
        line-height: 1.25;
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .quick-action-desc {
        font-size: 10px;
        margin-top: 2px;
        line-height: 1.2;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        display: block;
        opacity: 0.8;
    }
    .quick-action-arrow {
        display: none;
    }
}

@media (max-width: 480px) {
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    .quick-action-card {
        padding: 10px 10px;
    }
    .quick-action-icon-box {
        width: 32px;
        height: 32px;
        min-width: 32px;
        font-size: 13px;
    }
    .quick-action-title {
        font-size: 11px;
    }
    .quick-action-desc {
        font-size: 9px;
    }
}



.dashboard-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 28px 28px 24px;
    margin-bottom: 24px;
    background: linear-gradient(135deg, rgba(34,197,94,0.12), rgba(255,255,255,0.65));
    border: 1px solid rgba(34, 197, 94, 0.18);
}

/* ═══════════════════════════════════════════════════════════
   FADA SPLASH OVERLAY (PRE-LOADER)
═══════════════════════════════════════════════════════════ */
.fada-splash-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: var(--bg-base);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.fada-splash-card {
    width: 100%;
    max-width: 400px;
    padding: 40px 32px;
    border-radius: 28px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.18);
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: splashFadeRiseZoom 3.4s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes splashFadeRiseZoom {
    0% {
        opacity: 0;
        transform: translateY(35px) scale(0.75);
        box-shadow: 0 0 0 rgba(34, 197, 94, 0);
    }
    30% {
        opacity: 1;
        transform: translateY(-6px) scale(1.05);
        box-shadow: 0 24px 60px rgba(34, 197, 94, 0.35);
    }
    60% {
        opacity: 0.9;
        transform: translateY(3px) scale(0.97);
        box-shadow: 0 10px 30px rgba(34, 197, 94, 0.15);
    }
    85% {
        opacity: 1;
        transform: translateY(-2px) scale(1.03);
        box-shadow: 0 20px 50px rgba(34, 197, 94, 0.28);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
    }
}

.splash-light-flare {
    position: absolute;
    top: -20%;
    left: 50%;
    transform: translateX(-50%);
    width: 140%;
    height: 80%;
    background: radial-gradient(ellipse at top, rgba(34, 197, 94, 0.35) 0%, rgba(22, 163, 74, 0.12) 45%, rgba(0,0,0,0) 80%);
    pointer-events: none;
    animation: splashLightGlowPulse 3.4s ease-in-out infinite alternate;
}

@keyframes splashLightGlowPulse {
    0% { opacity: 0.3; transform: translateX(-50%) scale(0.8); }
    50% { opacity: 1; transform: translateX(-50%) scale(1.2); }
    100% { opacity: 0.5; transform: translateX(-50%) scale(1); }
}

.splash-glow-bg {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(34,197,94,0.18) 0%, rgba(0,0,0,0) 65%);
    animation: splashGlowRotate 8s linear infinite;
    pointer-events: none;
}

@keyframes splashGlowRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.splash-logo-wrap {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.splash-logo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px dashed var(--accent-cyan);
    animation: splashRingPulse 3s linear infinite;
    opacity: 0.6;
}

@keyframes splashRingPulse {
    0% { transform: rotate(0deg) scale(0.95); opacity: 0.4; }
    50% { transform: rotate(180deg) scale(1.08); opacity: 0.8; }
    100% { transform: rotate(360deg) scale(0.95); opacity: 0.4; }
}

.splash-logo-img {
    width: 56px;
    height: 56px;
    position: relative;
    z-index: 2;
    filter: drop-shadow(0 4px 12px rgba(34, 197, 94, 0.4));
    animation: splashLogoBounce 2.6s cubic-bezier(0.4, 0, 0.2, 1) infinite alternate;
}

@keyframes splashLogoBounce {
    0% { transform: scale(1); }
    50% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.splash-app-title {
    font-family: 'Outfit', sans-serif;
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 1px;
    margin: 0 0 6px 0;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-emerald));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.splash-connect-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.8px;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.15), rgba(22, 163, 74, 0.08));
    border: 1px solid rgba(34, 197, 94, 0.25);
    color: var(--accent-cyan);
    margin-bottom: 12px;
    text-transform: uppercase;
    animation: splashBadgePulse 2.6s ease-in-out infinite;
}

@keyframes splashBadgePulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.splash-slogan {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
    margin: 0;
    line-height: 1.45;
}

@media (max-width: 480px) {
    .fada-splash-overlay {
        padding: 16px;
    }
    .fada-splash-card {
        padding: 28px 20px;
        border-radius: 20px;
        max-width: 94vw;
    }
    .splash-logo-wrap {
        width: 60px;
        height: 60px;
        margin-bottom: 14px;
    }
    .splash-logo-img {
        width: 46px;
        height: 46px;
    }
    .splash-app-title {
        font-size: 24px;
    }
    .splash-connect-badge {
        font-size: 11px;
        padding: 5px 12px;
        letter-spacing: 0.5px;
    }
    .splash-slogan {
        font-size: 11px;
        margin-bottom: 18px;
    }
}



.dashboard-hero-content {
    flex: 1;
    min-width: 0;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(34,197,94,0.12);
    color: var(--accent-emerald);
    border: 1px solid rgba(34,197,94,0.22);
    font-size: 11px;
    letter-spacing: 0.13em;
    text-transform: uppercase;
    font-weight: 800;
}

.dashboard-hero-title {
    margin: 14px 0 10px;
    font-size: clamp(24px, 3vw, 36px);
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-primary);
}

.dashboard-hero-title i {
    color: var(--accent-emerald);
}

.dashboard-hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    max-width: 680px;
    margin-bottom: 18px;
}

.dashboard-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mini-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,0.5);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
    min-width: 200px;
}

.hero-btn {
    width: 100%;
    justify-content: center;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    gap: 16px;
    margin: 0 0 28px;
}

.action-tile {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    min-height: 120px;
    padding: 18px 14px;
    text-decoration: none;
    border-radius: 18px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    box-shadow: var(--glass-shadow);
    transition: all 0.25s ease;
}

.action-tile:hover {
    transform: translateY(-3px);
    border-color: var(--glass-border-hov);
    box-shadow: 0 14px 22px rgba(34,197,94,0.12);
}

.action-tile i {
    font-size: 24px;
    color: var(--accent-emerald);
}

.action-tile span {
    font-weight: 700;
    font-size: 13px;
    color: var(--text-primary);
}

/* ─── Top Navbar ─── */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--glass-border);
    gap: 16px;
    flex-wrap: wrap;
}
.page-title {
    font-family: 'Outfit', sans-serif;
    font-size: 26px;
    font-weight: 700;
    background: linear-gradient(90deg, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.navbar-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }

.language-selector-wrap {
    display: flex;
    align-items: center;
    min-width: 150px;
}
.language-select {
    min-width: 140px;
    padding: 8px 12px;
    border-radius: 10px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Theme Toggle Button */
.theme-toggle {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    color: var(--accent-amber);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px;
    transition: all 0.25s;
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.theme-toggle:hover {
    border-color: var(--accent-amber);
    box-shadow: 0 0 12px rgba(251,191,36,0.25);
    transform: rotate(20deg);
}

/* ═══════════════════════════════════════════════════════════
   TYPOGRAPHY
═══════════════════════════════════════════════════════════ */
h1,h2,h3,h4,h5,h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
}
p { color: var(--text-secondary); line-height: 1.65; }
a { color: var(--accent-cyan); }

/* ═══════════════════════════════════════════════════════════
   FORM CONTROLS
═══════════════════════════════════════════════════════════ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}
.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    transition: all 0.2s ease;
}
.form-control:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(34,211,238,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control option { background: var(--bg-surface); color: var(--text-primary); }

/* ═══════════════════════════════════════════════════════════
   BUTTONS
═══════════════════════════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
    transition: all 0.22s ease;
    white-space: nowrap;
    font-family: inherit;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    color: white;
    box-shadow: 0 4px 16px rgba(34,211,238,0.25);
}
.btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 24px rgba(34,211,238,0.35); }

.btn-secondary {
    background: var(--bg-card);
    border-color: var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
}
.btn-secondary:hover { border-color: var(--glass-border-hov); background: var(--bg-card-hover); }

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 14px rgba(239,68,68,0.25);
}
.btn-danger:hover { opacity: 0.9; }

.btn-success {
    background: linear-gradient(135deg, var(--accent-emerald), #059669);
    color: white;
    box-shadow: 0 4px 14px rgba(52,211,153,0.25);
}

.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: 8px; }
.btn-xs { padding: 5px 10px; font-size: 11px; border-radius: 6px; }

/* ═══════════════════════════════════════════════════════════
   STAT CARDS
═══════════════════════════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px,1fr));
    gap: 20px;
    margin-bottom: 32px;
}
.stat-card {
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: -20px; right: -20px;
    width: 80px; height: 80px;
    border-radius: 50%;
    opacity: 0.06;
    background: currentColor;
}
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}
.stat-icon-1 { background: var(--stat-1); color: var(--accent-cyan); }
.stat-icon-2 { background: var(--stat-2); color: var(--accent-violet); }
.stat-icon-3 { background: var(--stat-3); color: var(--accent-emerald); }
.stat-icon-4 { background: var(--stat-4); color: var(--accent-amber); }

.stat-value {
    font-size: 28px;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    line-height: 1;
    margin-bottom: 4px;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 500; }

/* ═══════════════════════════════════════════════════════════
   TABLES
═══════════════════════════════════════════════════════════ */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 16px;
    border-bottom: 1px solid var(--glass-border);
}
.table { width: 100%; border-collapse: collapse; }
.table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-bottom: 1px solid var(--glass-border);
}
.table td {
    padding: 14px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--glass-border);
    vertical-align: middle;
}
.table tbody tr {
    transition: background 0.15s;
}
.table tbody tr:hover td {
    background: rgba(99,102,241,0.05);
}
.table tbody tr:last-child td { border-bottom: none; }

/* ═══════════════════════════════════════════════════════════
   BADGES
═══════════════════════════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}
.badge-cyan    { background: rgba(34,211,238,0.15);   color: var(--accent-cyan);    border: 1px solid rgba(34,211,238,0.3);   }
.badge-violet  { background: rgba(167,139,250,0.15);  color: var(--accent-violet);  border: 1px solid rgba(167,139,250,0.3);  }
.badge-coral   { background: rgba(251,113,133,0.15);  color: var(--accent-coral);   border: 1px solid rgba(251,113,133,0.3);  }
.badge-emerald { background: rgba(52,211,153,0.15);   color: var(--accent-emerald); border: 1px solid rgba(52,211,153,0.3);   }
.badge-amber   { background: rgba(251,191,36,0.15);   color: var(--accent-amber);   border: 1px solid rgba(251,191,36,0.3);   }
.badge-indigo  { background: rgba(129,140,248,0.15);  color: var(--accent-indigo);  border: 1px solid rgba(129,140,248,0.3);  }

/* Legacy aliases */
.badge-blue   { background: rgba(34,211,238,0.15);   color: var(--accent-cyan);    border: 1px solid rgba(34,211,238,0.25);  }
.badge-green  { background: rgba(52,211,153,0.15);   color: var(--accent-emerald); border: 1px solid rgba(52,211,153,0.25);  }
.badge-red    { background: rgba(251,113,133,0.15);  color: var(--accent-coral);   border: 1px solid rgba(251,113,133,0.25); }

/* ═══════════════════════════════════════════════════════════
   ALERTS
═══════════════════════════════════════════════════════════ */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.alert-success {
    background: rgba(52,211,153,0.12);
    border-color: rgba(52,211,153,0.3);
    color: #6ee7b7;
}
.alert-danger {
    background: rgba(251,113,133,0.12);
    border-color: rgba(251,113,133,0.3);
    color: #fda4af;
}
[data-theme="light"] .alert-success { color: #065f46; }
[data-theme="light"] .alert-danger  { color: #9f1239; }

/* ═══════════════════════════════════════════════════════════
   TIMELINE
═══════════════════════════════════════════════════════════ */
.timeline { position: relative; padding-left: 36px; }
.timeline::before {
    content: '';
    position: absolute;
    top: 0; bottom: 0; left: 14px;
    width: 2px;
    background: linear-gradient(180deg, var(--accent-cyan), var(--accent-violet), var(--accent-amber));
    opacity: 0.4;
    border-radius: 2px;
}
.timeline-item { position: relative; margin-bottom: 28px; }
.timeline-marker {
    position: absolute;
    left: -36px;
    top: 4px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-base);
    border: 2px solid var(--accent-cyan);
    display: flex; align-items: center; justify-content: center;
    font-size: 10px;
    color: var(--accent-cyan);
    z-index: 1;
    box-shadow: 0 0 8px rgba(34,211,238,0.3);
}
.timeline-marker-violet { border-color: var(--accent-violet); color: var(--accent-violet); box-shadow: 0 0 8px rgba(167,139,250,0.3); }
.timeline-marker-amber  { border-color: var(--accent-amber);  color: var(--accent-amber);  box-shadow: 0 0 8px rgba(251,191,36,0.3); }
.timeline-marker-red,
.timeline-marker-coral  { border-color: var(--accent-coral);  color: var(--accent-coral);  box-shadow: 0 0 8px rgba(251,113,133,0.3); }
.timeline-marker-emerald{ border-color: var(--accent-emerald);color: var(--accent-emerald);box-shadow: 0 0 8px rgba(52,211,153,0.3); }

.timeline-date {
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-cyan);
    margin-bottom: 6px;
    display: block;
}
.timeline-content { padding: 18px 20px; }

/* ═══════════════════════════════════════════════════════════
   VERSION FILE CARDS
═══════════════════════════════════════════════════════════ */
.version-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    margin-bottom: 8px;
    background: rgba(255,255,255,0.02);
    transition: border-color 0.2s;
}
.version-item:hover { border-color: var(--glass-border-hov); }

/* ═══════════════════════════════════════════════════════════
   MEMBER / PROFILE CARDS
═══════════════════════════════════════════════════════════ */
.member-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    gap: 12px;
    transition: all 0.25s;
}
.member-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--glass-border);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    font-weight: 800;
    color: white;
    font-family: 'Outfit', sans-serif;
}
.member-name { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; }

/* ═══════════════════════════════════════════════════════════
   PAGINATION (plain HTML — no Blade components)
═══════════════════════════════════════════════════════════ */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    list-style: none;
    margin-top: 28px;
    flex-wrap: wrap;
}
.pagination li a,
.pagination li span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s;
    background: var(--bg-card);
}
.pagination li.active span,
.pagination li a:hover {
    color: var(--text-primary);
    border-color: var(--accent-cyan);
    background: rgba(34,211,238,0.12);
}

/* Bootstrap-style pagination from ->links() */
nav[aria-label="pagination"] ul {
    display: flex; gap: 6px; list-style: none; justify-content: center; margin-top: 24px; flex-wrap: wrap;
}
nav[aria-label="pagination"] ul li a,
nav[aria-label="pagination"] ul li span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 38px; height: 38px; padding: 0 12px;
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    background: var(--bg-card);
    transition: all 0.2s;
}
nav[aria-label="pagination"] ul li .active,
nav[aria-label="pagination"] ul li a:hover { color: var(--text-primary); border-color: var(--accent-cyan); background: rgba(34,211,238,0.12); }

/* ═══════════════════════════════════════════════════════════
   AVATAR
═══════════════════════════════════════════════════════════ */
.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--glass-border);
}

/* ═══════════════════════════════════════════════════════════
   COLLECTION / FOLDER CARDS
═══════════════════════════════════════════════════════════ */
.collection-card {
    padding: 24px;
    position: relative;
    overflow: hidden;
}
.collection-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-cyan), var(--accent-violet));
    border-radius: 18px 18px 0 0;
}

/* ═══════════════════════════════════════════════════════════
   AUTH PAGES
═══════════════════════════════════════════════════════════ */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(circle at top left, rgba(34, 211, 238, 0.18), transparent 25%),
        radial-gradient(circle at bottom right, rgba(99, 102, 241, 0.2), transparent 30%),
        var(--bg-base);
    position: relative;
    overflow: hidden;
}
.auth-wrapper::before {
    content: '';
    position: fixed;
    width: 600px; height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99,102,241,0.25) 0%, transparent 70%);
    top: -200px; right: -200px;
    pointer-events: none;
    animation: pulse-glow 6s ease-in-out infinite alternate;
}
.auth-wrapper::after {
    content: '';
    position: fixed;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34,211,238,0.18) 0%, transparent 70%);
    bottom: -150px; left: -150px;
    pointer-events: none;
    animation: pulse-glow 8s ease-in-out infinite alternate-reverse;
}
@keyframes pulse-glow {
    from { transform: scale(1); opacity: 0.8; }
    to   { transform: scale(1.15); opacity: 1; }
}

.auth-shell {
    width: min(1180px, 100%);
    min-height: 750px;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    overflow: hidden;
    border-radius: 30px;
    position: relative;
    z-index: 1;
    background: rgba(255,255,255,0.72);
    border: 1px solid rgba(22,163,74,0.12);
    box-shadow: 0 28px 60px rgba(22, 101, 52, 0.08);
}

.auth-shell-single {
    display: block !important;
    width: 100% !important;
    max-width: 460px !important;
    min-height: auto !important;
    margin: 0 auto !important;
    border-radius: 28px !important;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.15) !important;
}

.auth-shell-single .auth-form-panel {
    padding: 32px 28px !important;
    width: 100% !important;
}

.auth-shell-single .auth-card {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 0 !important;
}

.auth-visual {
    position: relative;
    padding: 48px 42px 38px;
    background: linear-gradient(135deg, #f7fff8 0%, #effff4 25%, #ebf9f0 58%, #f9fff9 100%);
    border-right: 1px solid rgba(22, 163, 74, 0.12);
    overflow: hidden;
}
.auth-visual::before {
    content: '';
    position: absolute;
    width: 420px; height: 420px;
    right: -120px; top: -140px;
    background: radial-gradient(circle, rgba(34,197,94,0.18), rgba(34,197,94,0.04) 42%, transparent 72%);
    border-radius: 50%;
    pointer-events: none;
}
.auth-visual::after {
    content: '';
    position: absolute;
    width: 320px; height: 320px;
    left: -90px; bottom: -110px;
    background: radial-gradient(circle, rgba(22,163,74,0.12), rgba(22,163,74,0.03) 40%, transparent 72%);
    border-radius: 50%;
    pointer-events: none;
}
.auth-visual > * {
    position: relative;
    z-index: 1;
}
.auth-brand-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: 999px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(22, 163, 74, 0.12);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    color: #186a3d;
    box-shadow: 0 8px 22px rgba(22, 163, 74, 0.08);
}
.auth-brand-badge i {
    color: #16a34a;
}
.auth-kicker {
    margin-top: 24px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: #2f7a56;
}
.auth-visual h1 {
    margin-top: 18px;
    font-size: clamp(2.2rem, 3vw, 4.1rem);
    line-height: 0.98;
    letter-spacing: -1.8px;
    max-width: 500px;
    color: #102f1f;
    text-shadow: none;
}
.auth-visual p {
    margin-top: 18px;
    max-width: 520px;
    font-size: 16px;
    line-height: 1.75;
    color: #446b5d;
}

.auth-visual-scene {
    position: relative;
    min-height: 320px;
    margin-top: 28px;
}
.device-card {
    position: absolute;
    right: 18px;
    bottom: 18px;
    width: min(360px, 78%);
    padding: 18px 18px 12px;
    border-radius: 26px;
    background: rgba(255,255,255,0.86);
    border: 1px solid rgba(22,163,74,0.14);
    box-shadow: 0 32px 70px rgba(22, 101, 52, 0.12);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    animation: float-card 6s ease-in-out infinite;
}
.device-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
}
.device-header span {
    display: inline-block;
    width: 10px; height: 10px; border-radius: 50%;
    background: rgba(22, 163, 74, 0.7);
}
.device-header span:nth-child(2) { opacity: 0.75; }
.device-header span:nth-child(3) { opacity: 0.55; }
.device-content {
    display: grid;
    gap: 14px;
}
.device-stat {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(243,253,246,0.96);
    border: 1px solid rgba(22,163,74,0.12);
    color: #114d2d;
}
.device-stat.primary { background: linear-gradient(135deg, rgba(34,197,94,0.08), rgba(134,239,172,0.12)); }
.device-stat.secondary { background: linear-gradient(135deg, rgba(22,163,74,0.08), rgba(187,247,208,0.12)); }
.device-stat i {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(22,163,74,0.08);
    font-size: 17px;
    color: #15803d;
}
.device-stat small {
    display: block;
    font-size: 11px;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #507a60;
}
.device-stat strong {
    display: block;
    margin-top: 3px;
    font-size: 24px;
    font-family: 'Outfit', sans-serif;
    color: #133b29;
}
.floating-card {
    position: absolute;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 138px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(22,163,74,0.12);
    backdrop-filter: blur(18px);
    color: #123d2d;
    box-shadow: 0 20px 38px rgba(22, 101, 52, 0.09);
}
.floating-card .mini-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.7px;
    text-transform: uppercase;
    color: #4f7d66;
}
.floating-card strong {
    font-size: 20px;
    font-family: 'Outfit', sans-serif;
    color: #113d2d;
}
.card-one { left: 0; top: 36px; animation: float-card 7s ease-in-out infinite; }
.card-two { right: 100px; top: 10px; animation: float-card 5.5s ease-in-out infinite reverse; }
@keyframes float-card {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

.feature-list {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 14px;
    margin-top: 32px;
    max-width: 520px;
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(255,255,255,0.85);
    border: 1px solid rgba(22,163,74,0.1);
    color: #204b39;
    font-weight: 500;
    font-size: 14px;
    box-shadow: 0 10px 22px rgba(22, 101, 52, 0.06);
}
.feature-list li i {
    width: 28px; height: 28px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center; justify-content: center;
    background: rgba(34,197,94,0.08);
    color: #15803d;
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 36px 28px;
    background: linear-gradient(135deg, #fbfffc, #f3faf6 42%, #f8fff9 100%);
}
.auth-card {
    width: 100%;
    max-width: 470px;
    padding: 38px 32px;
    position: relative;
    z-index: 1;
    background: linear-gradient(180deg, rgba(255,255,255,0.97), rgba(247,255,249,0.98));
    border: 1px solid rgba(22,163,74,0.12);
    border-radius: 24px;
    box-shadow: 0 22px 48px rgba(13, 60, 33, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
.auth-logo {
    text-align: left;
    margin-bottom: 28px;
}
.auth-logo-mark {
    width: 64px; height: 64px;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    display: flex; align-items: center; justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 16px;
    box-shadow: 0 8px 32px rgba(34,211,238,0.35);
}
.auth-title {
    font-family: 'Outfit', sans-serif;
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 8px 18px rgba(34,211,238,0.12);
}
.auth-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 8px; }

.remember-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}
.remember-check {
    width: 16px;
    height: 16px;
    accent-color: var(--accent-cyan);
}
.remember-row label {
    font-size: 13px;
    color: var(--text-secondary);
    cursor: pointer;
}
.auth-submit-btn {
    width: 100%;
    padding: 15px 18px;
    font-size: 15px;
    margin-top: 8px;
}
.signup-text {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
}
.signup-text a {
    color: var(--accent-cyan);
    font-weight: 600;
    text-decoration: none;
}
.auth-controls-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
}
.auth-language-selector {
    flex: 1;
    min-width: 0;
}
.auth-theme-row {
    text-align: center;
    margin-top: 20px;
}
.auth-theme-toggle {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--accent-amber);
    box-shadow: none;
}

@media (max-width: 900px) {
    .auth-shell {
        grid-template-columns: 1fr;
    }
    .auth-visual {
        border-right: none;
        border-bottom: 1px solid var(--glass-border);
    }
    .auth-form-panel {
        padding: 24px 18px 28px;
    }
}

@media (max-width: 520px) {
    .auth-wrapper {
        padding: 14px;
    }
    .auth-visual,
    .auth-card {
        padding-left: 22px;
        padding-right: 22px;
    }
    .feature-list {
        grid-template-columns: 1fr;
    }
    .device-card {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        margin-top: 18px;
    }
}
/* ═══════════════════════════════════════════════════════════
   DIVIDERS & HELPERS
═══════════════════════════════════════════════════════════ */
.text-cyan    { color: var(--accent-cyan) !important; }
.text-violet  { color: var(--accent-violet) !important; }
.text-coral   { color: var(--accent-coral) !important; }
.text-emerald { color: var(--accent-emerald) !important; }
.text-amber   { color: var(--accent-amber) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-secondary{ color: var(--text-secondary) !important; }

.gradient-text {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.divider {
    height: 1px;
    background: var(--glass-border);
    margin: 24px 0;
}

/* ═══════════════════════════════════════════════════════════
   FAMILY TREE SVG Canvas
═══════════════════════════════════════════════════════════ */
.tree-canvas {
    width: 100%;
    min-height: 500px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE & MOBILE DRAWER SYSTEM
═══════════════════════════════════════════════════════════ */
.mobile-header {
    display: none;
}
.sidebar-overlay {
    display: none;
}
.mobile-close-btn {
    display: none;
}
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 14px;
    margin-bottom: 18px;
}
.table-responsive > table {
    width: 100%;
    min-width: 600px;
    margin-bottom: 0;
}

@media (max-width: 900px) {
    :root {
        --sidebar-w: 0px;
    }

    .app-container {
        flex-direction: column;
    }

    /* Mobile Top Header Bar */
    .mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 12px 18px;
        background: var(--sidebar-bg);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--glass-border);
        position: sticky;
        top: 0;
        z-index: 999;
    }
    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        font-family: 'Outfit', sans-serif;
        font-size: 18px;
        font-weight: 800;
        text-decoration: none;
        color: var(--text-primary);
    }
    .mobile-menu-toggle {
        width: 42px;
        height: 42px;
        border-radius: 12px;
        border: 1px solid var(--glass-border);
        background: var(--bg-card);
        color: var(--text-primary);
        font-size: 18px;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: background 0.2s;
    }
    .mobile-menu-toggle:active {
        background: rgba(34,197,94,0.15);
    }

    /* Off-Canvas Mobile Drawer Sidebar */
    .sidebar {
        position: fixed !important;
        top: 0;
        left: -300px !important;
        width: 280px !important;
        min-width: 280px !important;
        height: 100vh !important;
        height: 100dvh !important;
        z-index: 1001 !important;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        box-shadow: none;
        display: flex !important;
    }
    .sidebar.open {
        left: 0 !important;
        box-shadow: 0 0 50px rgba(0,0,0,0.5) !important;
    }
    .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.55);
        backdrop-filter: blur(4px);
        -webkit-backdrop-filter: blur(4px);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    .mobile-close-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 8px;
        border: none;
        background: rgba(255,255,255,0.1);
        color: var(--text-muted);
        cursor: pointer;
        font-size: 16px;
    }

    /* Main Content Layout for Mobile */
    .main-content {
        max-width: 100% !important;
        width: 100% !important;
        padding: 18px 14px !important;
        min-height: calc(100vh - 60px);
    }

    .navbar {
        margin-bottom: 20px;
        padding-bottom: 14px;
        gap: 10px;
    }
    .page-title {
        font-size: 20px;
    }

    .dashboard-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 20px 16px;
        gap: 16px;
    }
    .dashboard-hero-title {
        font-size: 22px;
    }
    .hero-actions {
        min-width: 0;
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
    }

    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .action-tile {
        min-height: 100px;
        padding: 14px 10px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
}

@media (max-width: 540px) {
    .main-content {
        padding: 14px 10px !important;
    }
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .dashboard-meta-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .navbar-right {
        width: 100%;
        justify-content: space-between;
    }
    .language-selector-wrap {
        flex: 1;
    }
    .btn {
        padding: 10px 14px;
        font-size: 13px;
    }
}

/* ═══════════════════════════════════════════════════════════
   HIGH-END MODAL & TOAST NOTIFICATION SYSTEM
═══════════════════════════════════════════════════════════ */

/* --- Modal System --- */
.fada-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 250ms cubic-bezier(0.16, 1, 0.3, 1), visibility 250ms cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.fada-modal-backdrop.active {
    opacity: 1;
    visibility: visible;
}

.fada-modal-dialog {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1);
    width: 100%;
    max-width: 540px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.94) translateY(12px);
    opacity: 0;
    transition: transform 280ms cubic-bezier(0.16, 1, 0.3, 1), opacity 280ms cubic-bezier(0.16, 1, 0.3, 1);
}
.fada-modal-backdrop.active .fada-modal-dialog {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.fada-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--glass-border);
}
.fada-modal-title {
    font-family: 'Outfit', sans-serif;
    font-size: 19px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}
.fada-modal-close-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    background: var(--bg-card);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: all 0.2s ease;
}
.fada-modal-close-btn:hover {
    color: var(--text-primary);
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
}

.fada-modal-body {
    padding: 24px;
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.6;
}

.fada-modal-footer {
    padding: 16px 24px 20px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
}

/* --- Toast Notification System --- */
.fada-toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
    max-width: 420px;
    width: calc(100vw - 48px);
}

.fada-toast {
    pointer-events: auto;
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    box-shadow: 0 20px 40px -8px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(255, 255, 255, 0.1);
    padding: 16px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    position: relative;
    overflow: hidden;
    transform: translateX(40px) scale(0.95);
    opacity: 0;
    transition: transform 300ms cubic-bezier(0.16, 1, 0.3, 1), opacity 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.fada-toast.show {
    transform: translateX(0) scale(1);
    opacity: 1;
}
.fada-toast.hide {
    transform: translateY(-20px) scale(0.92);
    opacity: 0;
}

.fada-toast-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}
.fada-toast-success .fada-toast-icon {
    background: rgba(34, 197, 94, 0.15);
    color: var(--accent-emerald);
    border: 1px solid rgba(34, 197, 94, 0.25);
}
.fada-toast-error .fada-toast-icon {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.25);
}
.fada-toast-warning .fada-toast-icon {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.fada-toast-info .fada-toast-icon {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue);
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.fada-toast-content {
    flex: 1;
    min-width: 0;
}
.fada-toast-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 3px 0;
    line-height: 1.3;
}
.fada-toast-message {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.45;
}

.fada-toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    font-size: 14px;
    transition: color 0.2s;
    line-height: 1;
}
.fada-toast-close:hover {
    color: var(--text-primary);
}

.fada-toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
}
.fada-toast-progress-bar {
    height: 100%;
    width: 100%;
    transform-origin: left;
    transition: transform linear;
}
.fada-toast-success .fada-toast-progress-bar { background: var(--accent-emerald); }
.fada-toast-error .fada-toast-progress-bar   { background: var(--accent-red); }
.fada-toast-warning .fada-toast-progress-bar { background: var(--accent-amber); }
.fada-toast-info .fada-toast-progress-bar    { background: var(--accent-blue); }

@media (max-width: 540px) {
    .fada-toast-container {
        top: auto;
        bottom: 20px;
        right: 50%;
        transform: translateX(50%);
        width: calc(100vw - 32px);
    }
}

/* ═══════════════════════════════════════════════════════════
   CINEMATIC PAGE ROUTE TRANSITIONS & LOADING SWAG
═══════════════════════════════════════════════════════════ */

/* Page Exit / Entry Animations */
.main-content {
    transition: opacity 300ms cubic-bezier(0.4, 0, 0.2, 1), transform 300ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity;
}

.page-enter-forward {
    animation: fadaPageInRight 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.page-exit-left {
    animation: fadaPageOutLeft 280ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.page-enter-backward {
    animation: fadaPageInLeft 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.page-exit-right {
    animation: fadaPageOutRight 280ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes fadaPageInRight {
    from { opacity: 0; transform: translateX(20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadaPageOutLeft {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(-20px); }
}
@keyframes fadaPageInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}
@keyframes fadaPageOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(20px); }
}

/* Button Loading Swag */
.btn-loading {
    position: relative !important;
    pointer-events: none !important;
    opacity: 0.88 !important;
}
.btn-loading .btn-text-wrap {
    opacity: 0.15;
    transition: opacity 0.2s;
}
.btn-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: fadaSpin 0.6s linear infinite;
}

@keyframes fadaSpin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Skeleton Screens & Pulsing Shimmer */
.skeleton {
    background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
    background-size: 200% 100%;
    animation: fadaShimmer 1.5s infinite linear;
    border-radius: 8px;
    display: block;
}
.skeleton-text {
    height: 14px;
    width: 80%;
    margin-bottom: 8px;
}
.skeleton-title {
    height: 24px;
    width: 50%;
    margin-bottom: 14px;
}
.skeleton-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
}
.skeleton-card {
    min-height: 120px;
    border-radius: 16px;
    padding: 20px;
}

@keyframes fadaShimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* ═══════════════════════════════════════════════════════════
   320PX FLUID LAYOUT FAULT TOLERANCE
═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
    box-sizing: border-box;
}

body, .app-container, .main-content, .glass-panel, .card, .table-responsive {
    max-width: 100%;
    overflow-wrap: break-word;
    word-break: break-word;
}

@media (max-width: 360px) {
    .main-content {
        padding: 12px 8px !important;
    }
    .navbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    .user-profile-topbar {
        width: 100%;
        justify-content: space-between;
    }
    .fada-modal-dialog {
        padding: 12px;
        margin: 10px;
        max-width: calc(100vw - 20px);
    }
    .fada-toast-container {
        width: calc(100vw - 20px);
        left: 10px;
        right: 10px;
        transform: none;
    }
    .stats-grid {
        grid-template-columns: 1fr !important;
    }
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 10px !important;
    }
    .btn {
        width: 100%;
    }
}

/* ═══════════════════════════════════════════════════════════
   VERTICAL GENERATIONAL FAMILY TREE CANVAS & FLEX WRAPPING
═══════════════════════════════════════════════════════════ */
.family-tree-canvas,
.generation-row,
.generation-level-wrapper {
    display: flex !important;
    flex-direction: column !important; /* Forces generations down vertically */
    align-items: center !important;
    width: 100% !important;
    white-space: normal !important;
}

.generation-level {
    width: 100% !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 16px 0 !important;
}

.parents-container,
.couples-container,
.children-container {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important; /* Prevents long rows from stretching sideways */
    justify-content: center !important;
    align-items: center !important;
    gap: 24px !important;
    width: 100% !important;
    white-space: normal !important;
}

.union-block {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
}

.generation-gap-line {
    width: 2px !important;
    height: 32px !important;
    background: rgba(59, 130, 246, 0.35) !important;
    margin: 12px 0 !important;
}



