/* =============================================
       ROOT & BASE
    ============================================= */
:root {
    /* Convention A — canonical names */
    --clr-bg: #07090f;
    --clr-surface: #0e1117;
    --clr-card: #131720;
    --clr-border: rgba(255, 255, 255, 0.07);
    --clr-primary: #6366f1;
    --clr-primary-2: #818cf8;
    --clr-accent: #06b6d4;
    --clr-green: #10b981;
    --clr-amber: #f59e0b;
    --clr-text: #e2e8f0;
    --clr-muted: #83a2ce;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --glow-primary: 0 0 60px rgba(99, 102, 241, 0.25);
    --glow-accent: 0 0 60px rgba(6, 182, 212, 0.2);

    /* ── Border radius ── */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 50px;

    /* ── Primary color opacity variants ── */
    --primary-12: rgba(99, 102, 241, 0.12);
    --primary-15: rgba(99, 102, 241, 0.15);
    --primary-25: rgba(99, 102, 241, 0.25);
    --primary-35: rgba(99, 102, 241, 0.35);

    /* ── Box shadows ── */
    --shadow-primary-sm: 0 4px 15px rgba(99, 102, 241, 0.35);
    --shadow-primary-md: 0 8px 24px rgba(99, 102, 241, 0.35);
    --shadow-primary-lg: 0 12px 32px rgba(99, 102, 241, 0.5);

    /* ── Color opacity variants ── */
    --green-12: rgba(16, 185, 129, 0.12);
    --green-15: rgba(16, 185, 129, 0.15);
    --amber-12: rgba(245, 158, 11, 0.12);
    --amber-15: rgba(245, 158, 11, 0.15);
    --red-12: rgba(239, 68, 68, 0.12);
    --red-15: rgba(239, 68, 68, 0.15);
    --purple-12: rgba(168, 85, 247, 0.12);
    --purple-15: rgba(168, 85, 247, 0.15);
    --accent-12: rgba(6, 182, 212, 0.12);
    --accent-15: rgba(6, 182, 212, 0.15);

    /* ── Semantic surface variables ── */
    --clr-surface-glass: rgba(17, 24, 39, 0.7);
    --clr-surface-elevated: rgba(7, 9, 15, 0.9);
    --clr-white-soft: rgba(255, 255, 255, 0.55);
    --clr-white-hover: rgba(255, 255, 255, 0.05);
    --clr-grid-line: rgba(255, 255, 255, 0.04);

    /* ── Theme-safe accent text colors ── */
    --clr-green-text: #34d399;
    --clr-amber-text: #fbbf24;
    --clr-red-text: #f87171;
    --clr-purple-text: #c084fc;
    --clr-accent-text: #22d3ee;

    /* ── Gradients ── */
    --gradient-primary: linear-gradient(135deg, var(--clr-primary), #4f46e5);

    /* Convention B — short-name aliases */
    --bg: var(--clr-bg);
    --surface: var(--clr-surface);
    --card: var(--clr-card);
    --border: var(--clr-border);
    --primary: var(--clr-primary);
    --p2: var(--clr-primary-2);
    --accent: var(--clr-accent);
    --green: var(--clr-green);
    --yellow: var(--clr-amber);
    --amber: var(--clr-amber);
    --red: #ef4444;
    --purple: #a855f7;
    --purple-light: #a78bfa;
    --cyan: #06b6d4;
    --muted: var(--clr-muted);
    --text: var(--clr-text);

    /* ── On-surface (text that sits on dark/light surfaces) ── */
    --clr-on-surface: #ffffff;
    --on-surface: var(--clr-on-surface);
}

/* =============================================
       LIGHT MODE
    ============================================= */
html[data-theme="light"] {
    --clr-bg: #f8f9fc;
    --clr-surface: #ffffff;
    --clr-card: #ffffff;
    --clr-border: rgba(0, 0, 0, 0.08);
    --clr-text: #1e293b;
    --clr-on-surface: #1e293b;
    --clr-muted: #64748b;

    /* Primary stays the same but slightly deeper for contrast on white */
    --clr-primary: #4f46e5;
    --clr-primary-2: #6366f1;

    /* Opacity variants — toned down for light backgrounds */
    --primary-12: rgba(99, 102, 241, 0.08);
    --primary-15: rgba(99, 102, 241, 0.10);
    --primary-25: rgba(99, 102, 241, 0.15);
    --primary-35: rgba(99, 102, 241, 0.20);

    /* Glows & Shadows — subtle on light */
    --glow-primary: 0 0 60px rgba(99, 102, 241, 0.08);
    --glow-accent: 0 0 60px rgba(6, 182, 212, 0.06);
    --shadow-primary-sm: 0 4px 15px rgba(99, 102, 241, 0.12);
    --shadow-primary-md: 0 8px 24px rgba(99, 102, 241, 0.12);
    --shadow-primary-lg: 0 12px 32px rgba(99, 102, 241, 0.18);

    /* Gradient — same direction, adjusted colors */
    --gradient-primary: linear-gradient(135deg, var(--clr-primary), #6366f1);

    /* Color opacity variants — toned down for light backgrounds */
    --green-12: rgba(16, 185, 129, 0.08);
    --green-15: rgba(16, 185, 129, 0.10);
    --amber-12: rgba(245, 158, 11, 0.08);
    --amber-15: rgba(245, 158, 11, 0.10);
    --red-12: rgba(239, 68, 68, 0.08);
    --red-15: rgba(239, 68, 68, 0.10);
    --purple-12: rgba(168, 85, 247, 0.08);
    --purple-15: rgba(168, 85, 247, 0.10);
    --accent-12: rgba(6, 182, 212, 0.08);
    --accent-15: rgba(6, 182, 212, 0.10);

    /* Semantic surfaces — inverted for light */
    --clr-surface-glass: rgba(255, 255, 255, 0.85);
    --clr-surface-elevated: rgba(248, 249, 252, 0.95);
    --clr-white-soft: rgba(0, 0, 0, 0.55);
    --clr-white-hover: rgba(0, 0, 0, 0.04);
    --clr-grid-line: rgba(0, 0, 0, 0.06);

    /* Accent text — darker for contrast on white */
    --clr-green-text: #059669;
    --clr-amber-text: #d97706;
    --clr-red-text: #dc2626;
    --clr-purple-text: #7c3aed;
    --clr-accent-text: #0891b2;
}

/* ── Theme Toggle Button ── */
.btn-theme-toggle {
    background: var(--clr-border);
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--clr-text);
    font-size: 1rem;
    transition: background 0.2s, color 0.2s;
}
.btn-theme-toggle:hover {
    background: var(--primary-25);
    color: var(--clr-primary);
}

/* ── Language Toggle Button ── */
.btn-lang-toggle {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    border: 1px solid rgba(6, 182, 212, 0.45);
    border-radius: 999px;
    height: 36px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
    text-decoration: none;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(6, 182, 212, 0.25);
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.btn-lang-toggle:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
    filter: brightness(1.08);
    box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
}
.btn-lang-toggle .lang-toggle-icon {
    font-size: 0.95rem;
    line-height: 1;
    display: inline-flex;
}
.btn-lang-toggle .lang-toggle-label {
    display: inline-block;
    transform: translateY(0);
}
html[data-theme="light"] .btn-lang-toggle {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    border-color: rgba(8, 145, 178, 0.35);
    box-shadow: 0 2px 8px rgba(8, 145, 178, 0.2);
}
html[data-theme="light"] .btn-lang-toggle:hover {
    box-shadow: 0 4px 14px rgba(8, 145, 178, 0.35);
}
/* Dark mode: show sun (click → go light), hide moon */
.theme-icon-dark { display: none; }
.theme-icon-light { display: inline; }
/* Light mode: show moon (click → go dark), hide sun */
html[data-theme="light"] .theme-icon-dark { display: inline; }
html[data-theme="light"] .theme-icon-light { display: none; }

/* ── Logo Visibility ── */
.logo-light { display: none; }
html[data-theme="light"] .logo-dark { display: none; }
html[data-theme="light"] .logo-light { display: inline; }

.navbar-custom.scrolled {
    background: rgba(7, 9, 15, 0.95);
}

/* ── Light Mode: Navbar ── */
html[data-theme="light"] .navbar-custom {
    background: rgba(255, 255, 255, 0.85);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    backdrop-filter: blur(20px);
}
html[data-theme="light"] .navbar-custom.scrolled {
    background: rgba(255, 255, 255, 0.97);
}
html[data-theme="light"] .nav-link-custom {
    color: #475569 !important;
}
html[data-theme="light"] .nav-link-custom:hover,
html[data-theme="light"] .nav-link-custom.active {
    color: #1e293b !important;
    background: rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .nav-link {
    color: #475569 !important;
}
html[data-theme="light"] .nav-link:hover {
    color: #1e293b !important;
}
html[data-theme="light"] .btn-nav-login {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #334155;
}
html[data-theme="light"] .btn-nav-login:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.15);
}
html[data-theme="light"] .dropdown-menu-custom {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .dropdown-item-custom {
    color: #475569;
}
html[data-theme="light"] .dropdown-item-custom:hover {
    color: #1e293b;
}
html[data-theme="light"] .profile-dropdown {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .pd-item {
    color: #475569;
}
html[data-theme="light"] .pd-item:hover {
    background: rgba(0, 0, 0, 0.04);
    color: #1e293b;
}
html[data-theme="light"] .pd-divider {
    background: rgba(0, 0, 0, 0.07);
}
html[data-theme="light"] .form-label-dark {
    color: #475569;
}

/* ── Light Mode: Blobs ── */
html[data-theme="light"] .blob-1 {
    background: rgba(99, 102, 241, 0.05);
}
html[data-theme="light"] .blob-2 {
    background: rgba(6, 182, 212, 0.04);
}
html[data-theme="light"] .blob-3 {
    background: rgba(16, 185, 129, 0.04);
}

/* ── Light Mode: Hero ── */
html[data-theme="light"] .btn-hero-secondary {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.1);
    color: #334155;
}
html[data-theme="light"] .btn-hero-secondary:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.15);
}
html[data-theme="light"] .hero-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.08), var(--glow-primary);
}

/* ── Light Mode: Stat Number Gradient Text ── */
html[data-theme="light"] .stat-number {
    background: linear-gradient(135deg, #1e293b 0%, #475569 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

/* ── Light Mode: Cards ── */
html[data-theme="light"] .bento-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .pricing-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .testimonial-card {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* ── Light Mode: Forms ── */
html[data-theme="light"] .form-control-dark,
html[data-theme="light"] .form-select-dark {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.12);
}
html[data-theme="light"] .form-control-dark:focus,
html[data-theme="light"] .form-select-dark:focus {
    background: rgba(99, 102, 241, 0.04);
}
html[data-theme="light"] .form-select-dark option {
    background: #ffffff;
    color: #1e293b;
}
html[data-theme="light"] .cta-form-card {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

/* ── Light Mode: FAQ ── */
html[data-theme="light"] .faq-item {
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

/* ── Light Mode: CTA Feature Cards ── */
.cta-card-wrapper {
    background: linear-gradient(135deg, #0e1117 0%, #131720 100%);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 24px;
    overflow: hidden;
}
html[data-theme="light"] .cta-card-wrapper {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.cta-card-visual {
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}
html[data-theme="light"] .cta-card-visual {
    border-left-color: rgba(0, 0, 0, 0.06);
}
.cta-card-wrapper h2 {
    color: var(--clr-on-surface);
}
.cta-card-wrapper .cta-subtitle {
    color: var(--clr-muted);
}

/* ── Light Mode: Stats Bar ── */
html[data-theme="light"] #stats {
    border-top-color: rgba(0, 0, 0, 0.06);
}
html[data-theme="light"] .stat-card {
    border-left-color: rgba(0, 0, 0, 0.06);
}

/* ── Light Mode: Final CTA ── */
html[data-theme="light"] .final-cta-inner {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 50%, #eef2ff 100%);
    border-color: rgba(99, 102, 241, 0.2);
}
html[data-theme="light"] .final-cta-inner::before {
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.1), transparent 70%);
}
html[data-theme="light"] .final-cta-inner p {
    color: #475569;
}

/* ── Light Mode: Footer ── */
html[data-theme="light"] .social-btn {
    background: rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .social-btn:hover {
    background: var(--primary-15);
}

/* ── Smooth Theme Transitions ── */
html[data-theme] body {
    transition: background-color 0.3s ease, color 0.3s ease;
}
html[data-theme] .navbar-custom,
html[data-theme] .hero-card,
html[data-theme] .bento-card,
html[data-theme] .pricing-card,
html[data-theme] .testimonial-card,
html[data-theme] .faq-item,
html[data-theme] .cta-form-card {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

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

html,
body {
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Cairo", sans-serif;
    background-color: var(--clr-bg);
    color: var(--clr-text);
}
.text-truncate-3lines {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    contain: content;
}
.h-120px {
    height: 120px;
}
.text-muted {
    color: var(--clr-muted) !important;
}
.iti {
    flex: 1;
    display: flex !important;
    direction: ltr !important;
    width: 100%;
}
.iti__selected-flag,
.iti__selected-country {
    font-size: 12px;
}
[dir="rtl"] .iti__country-container,
[dir="rtl"] .iti__flag-container {
    left: 0 !important;
    right: auto !important;
}
[dir="rtl"] .iti input[type="tel"] {
    padding-right: 12px !important;
}
.iti--inline-dropdown .iti__dropdown-content {
    left: 1px;
}

/* =============================================
   NOISE TEXTURE OVERLAY
============================================= */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.4;
}

@keyframes aiProgress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}
/* =============================================
   AMBIENT GLOW BLOBS
============================================= */
.blob {
    display: none;
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    pointer-events: none;
    z-index: 0;
}

@media (min-width: 768px) {
    .blob {
        display: block;
    }
}
.blob-1 {
    width: 600px;
    height: 600px;
    background: rgba(99, 102, 241, 0.18);
    top: -200px;
    right: -150px;
}
.blob-2 {
    width: 500px;
    height: 500px;
    background: rgba(6, 182, 212, 0.12);
    top: 200px;
    left: -200px;
}
.blob-3 {
    width: 400px;
    height: 400px;
    background: rgba(16, 185, 129, 0.1);
    bottom: -100px;
    right: 100px;
}

/* =============================================
   NAVBAR
============================================= */
.navbar-custom {
    background: rgba(7, 9, 15, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--clr-border);
    transition: background 0.3s ease;
    /* Above measurement progress (99), mobile UX bar (999), and question overlays (998); below #alert-container (10000) */
    z-index: 1050;
    overflow: visible;
}
#nav-user,
.profile-wrapper {
    overflow: visible;
}
.navbar-brand-custom {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--clr-on-surface);
    text-decoration: none;
    letter-spacing: -0.5px;
}
.navbar-brand-custom .brand-dot {
    color: var(--clr-primary);
}
.nav-link-custom {
    color: var(--clr-muted) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.4rem 0.8rem !important;
    border-radius: var(--radius-sm);
    transition:
        color 0.2s,
        background 0.2s;
}
.nav-link-custom:hover,
.nav-link-custom.active {
    color: var(--clr-on-surface) !important;
    background: rgba(255, 255, 255, 0.06);
}
.nav-link {
    color: var(--clr-muted) !important;
    font-weight: 600;
    font-size: 0.85rem;
    transition: color 0.2s;
}
.nav-link:hover {
    color: var(--clr-on-surface) !important;
}
.dropdown-menu-custom {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    padding: 8px;
    min-width: 220px;
}
.dropdown-item-custom {
    color: var(--clr-text);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-size: 0.875rem;
    transition:
        background 0.15s,
        color 0.15s;
}
.dropdown-item-custom:hover {
    background: var(--primary-15);
    color: var(--clr-on-surface);
}
.btn-nav-login {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 18px;
    transition: all 0.2s;
}
.btn-nav-login:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--clr-on-surface);
    border-color: rgba(255, 255, 255, 0.2);
}
.btn-nav-register {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 7px 18px;
    transition: all 0.2s;
    box-shadow: var(--shadow-primary-sm);
}
.btn-nav-register:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    color: #fff;
}

/* Profile Dropdown */
.profile-btn {
    position: relative;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: var(--clr-on-surface);
    display: flex;
    align-items: center;
    gap: 8px;
}
.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(99, 102, 241, 0.4);
    transition: border-color 0.2s;
}
.profile-btn:hover .profile-avatar {
    border-color: var(--primary);
}
.profile-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    border: 2px solid rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 800;
    color: #fff;
    transition: border-color 0.2s;
}
.profile-btn:hover .profile-avatar-placeholder {
    border-color: var(--primary);
}
.notif-badge {
    position: absolute;
    top: -4px;
    left: -4px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.62rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(7, 9, 15, 0.97);
    line-height: 1;
    pointer-events: none;
}
.profile-name {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--clr-text);
    max-width: 90px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.profile-role {
    font-size: 0.68rem;
    color: var(--clr-muted);
    line-height: 1;
}

/* Dropdown menu */
.profile-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: auto;
    min-width: 220px;
    background: var(--clr-surface);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    /* Above in-nav UI; nav itself is z-index 1050 so this stays on top of page content */
    z-index: 1100;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(0.97);
    pointer-events: none;
    transition:
        opacity 0.18s ease,
        transform 0.18s ease;
}
.profile-dropdown.open {
    opacity: 1;
    transform: none;
    pointer-events: all;
}
.pd-header {
    padding: 14px 16px 12px;
    border-bottom: 1px solid var(--clr-border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.pd-avatar-lg {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #06b6d4);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
}
.pd-user-name {
    font-size: 0.85rem;
    font-weight: 800;
    color: var(--clr-on-surface);
}
.pd-user-email {
    font-size: 0.72rem;
    color: var(--muted);
}
.pd-body {
    padding: 6px;
}
.pd-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--clr-text);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    transition:
        background 0.15s,
        color 0.15s;
    font-family: "Cairo", sans-serif;
}
.pd-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--clr-on-surface);
}
.pd-item .pd-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.pd-item-notif {
    position: relative;
}
.pd-notif-count {
    margin-right: auto;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    border-radius: var(--radius-pill);
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}
.pd-divider {
    height: 1px;
    background: var(--clr-border);
    margin: 4px 6px;
}
.pd-item-danger {
    color: rgba(248, 113, 113, 0.8) !important;
}
.pd-item-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}
.pd-item-danger .pd-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

/* Wrapper for positioning */
.profile-wrapper {
    position: relative;
}

/* Breadcrumb */
.breadcrumb-bar {
    background: rgba(14, 17, 23, 0.6);
    border-bottom: 1px solid var(--border);
    padding: 10px 0;
}
.breadcrumb-item,
.breadcrumb-item a {
    font-size: 0.8rem;
    color: var(--muted);
    text-decoration: none;
}
.breadcrumb-item.active {
    color: var(--text);
}
.breadcrumb-item + .breadcrumb-item::before {
    color: var(--muted);
}

/* =============================================
   HERO
============================================= */
#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    /*padding-top: 80px;*/
}
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--clr-primary-2);
    border-radius: var(--radius-pill);
    padding: 6px 16px;
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}
.hero-badge .dot {
    width: 7px;
    height: 7px;
    background: var(--clr-primary);
    border-radius: 50%;
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.4);
    }
}
.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 900;
    line-height: 1.2;
    letter-spacing: -1px;
    color: var(--clr-on-surface);
}
.hero-title .gradient-text {
    background: linear-gradient(135deg, var(--clr-primary-2) 0%, var(--clr-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.hero-desc {
    font-size: 1.05rem;
    color: var(--clr-muted);
    line-height: 1.8;
    max-width: 520px;
}
.btn-hero-primary {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 700;
    padding: 14px 32px;
    box-shadow: 0 8px 30px rgba(99, 102, 241, 0.4);
    transition: all 0.25s;
}
.btn-hero-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(99, 102, 241, 0.55);
    color: #fff;
}
.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    border-radius: 14px;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px 32px;
    transition: all 0.25s;
}
.btn-hero-secondary:hover {
    background: rgba(255, 255, 255, 0.09);
    color: var(--clr-on-surface);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Hero Card */
.hero-card {
    background: rgba(19, 23, 32, 0.8);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xl);
    backdrop-filter: blur(20px);
    padding: 28px;
    box-shadow:
        0 24px 80px rgba(0, 0, 0, 0.5),
        var(--glow-primary);
}
.hero-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}
.hero-card-icon {
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
}
.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    margin-bottom: 6px;
}
.progress-label .name {
    color: var(--clr-text);
}
.progress-label .val {
    font-weight: 700;
}
.progress-dark {
    height: 8px;
    background: rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-pill);
    overflow: hidden;
}
.progress-dark .bar {
    height: 100%;
    border-radius: var(--radius-pill);
    transition: width 1s ease;
}
.bar-indigo {
    background: linear-gradient(90deg, var(--clr-primary), var(--clr-primary-2));
}
.bar-cyan {
    background: linear-gradient(90deg, var(--clr-accent), #22d3ee);
}
.bar-green {
    background: linear-gradient(90deg, var(--clr-green), #34d399);
}
.bar-amber {
    background: linear-gradient(90deg, var(--clr-amber), #fbbf24);
}
.score-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #34d399;
    border-radius: var(--radius-pill);
    padding: 5px 14px;
    font-size: 0.82rem;
    font-weight: 700;
}

/* Trusted logos strip */
.trusted-strip {
    border-top: 1px solid var(--clr-border);
    padding-top: 2rem;
}
.trusted-logo {
    color: var(--clr-muted);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.2s;
}
.trusted-logo:hover {
    color: var(--clr-text);
}

/* =============================================
   STATS
============================================= */
#stats {
    position: relative;
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
    background: var(--clr-surface);
}
.stat-card {
    text-align: center;
    padding: 2rem 1rem;
    border-left: 1px solid var(--clr-border);
}
.stat-card:last-child {
    border-left: none;
}
.stat-number {
    font-size: 2.4rem;
    font-weight: 900;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.6) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    color: var(--clr-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* =============================================
   SECTION HEADERS
============================================= */
.section-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--clr-primary-2);
    border-radius: var(--radius-pill);
    padding: 5px 16px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}
.section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    color: var(--clr-on-surface);
    letter-spacing: -0.5px;
    line-height: 1.25;
}
.section-desc {
    color: var(--clr-muted);
    font-size: 1rem;
    line-height: 1.8;
}

/* =============================================
   WHY SECTION — BENTO GRID
============================================= */
#why {
    position: relative;
    overflow: hidden;
}
.bento-card {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    height: 100%;
    transition:
        border-color 0.3s,
        transform 0.3s,
        box-shadow 0.3s;
    position: relative;
    overflow: hidden;
}
.bento-card::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.06), transparent 60%);
    pointer-events: none;
}
.bento-card:hover {
    border-color: var(--primary-35);
    transform: translateY(-4px);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(99, 102, 241, 0.1);
}
.bento-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}
.bento-card h5 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--clr-on-surface);
    margin-bottom: 0.6rem;
}
.bento-card p {
    color: var(--clr-muted);
    font-size: 0.88rem;
    line-height: 1.7;
    margin: 0;
}
.bento-card-large {
    min-height: 220px;
}

/* =============================================
   ASSESSMENTS / PRICING
============================================= */
#measurements {
    position: relative;
}
.pricing-card {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    height: 100%;
    position: relative;
    overflow: hidden;
    transition:
        transform 0.3s,
        box-shadow 0.3s,
        border-color 0.3s;
}
.pricing-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    background: linear-gradient(90deg, transparent, var(--clr-border), transparent);
    transition: background 0.3s;
}
.pricing-card:hover {
    transform: translateY(-6px);
}
.pricing-card.featured {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow:
        0 0 0 1px var(--primary-15),
        var(--glow-primary);
}
.pricing-card.featured::after {
    background: linear-gradient(90deg, transparent, var(--clr-primary), transparent);
}
.pricing-card.featured:hover {
    box-shadow:
        0 20px 60px var(--primary-25),
        0 0 0 1px var(--primary-25);
}
.pricing-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
}
.pricing-label {
    display: inline-block;
    padding: 3px 12px;
    border-radius: var(--radius-pill);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.label-free {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.label-paid {
    background: var(--primary-15);
    color: var(--clr-primary-2);
    border: 1px solid var(--primary-25);
}
.label-team {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.pricing-card h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--clr-on-surface);
    margin-bottom: 0.5rem;
}
.pricing-card .desc {
    color: var(--clr-muted);
    font-size: 0.85rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}
.price-amount {
    font-size: 2.4rem;
    font-weight: 900;
    color: var(--clr-on-surface);
    line-height: 1;
}
.price-amount span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--clr-muted);
}
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.feature-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--clr-text);
    font-size: 0.875rem;
    padding: 6px 0;
    border-bottom: 1px solid var(--clr-border);
}
.feature-list li:last-child {
    border-bottom: none;
}
.feature-list li .check {
    color: var(--clr-green);
    font-size: 0.9rem;
    flex-shrink: 0;
}
.btn-pricing {
    width: 100%;
    padding: 13px;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.25s;
    border: none;
}
.btn-pricing-free {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}
.btn-pricing-free:hover {
    background: rgba(16, 185, 129, 0.2);
    color: #34d399;
}
.btn-pricing-primary {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: var(--shadow-primary-md);
}
.btn-pricing-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-lg);
    color: #fff;
}
.btn-pricing-team {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}
.btn-pricing-team:hover {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

/* Popular badge */
.popular-badge {
    position: absolute;
    top: 20px;
    inset-inline-end: 20px;
    background: var(--gradient-primary);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
}

/* =============================================
   HOW IT WORKS
============================================= */
#how {
    position: relative;
}
.step-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}
.step-num {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--primary-12);
    border: 1px solid var(--primary-25);
    color: var(--clr-primary-2);
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition:
        background 0.3s,
        border-color 0.3s;
}
.step-item:hover .step-num {
    background: rgba(99, 102, 241, 0.2);
    border-color: rgba(99, 102, 241, 0.5);
}
.step-content h5 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--clr-on-surface);
    margin-bottom: 4px;
}
.step-content p {
    color: var(--clr-muted);
    font-size: 0.875rem;
    line-height: 1.7;
    margin: 0;
}
.step-connector {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, rgba(99, 102, 241, 0.3), transparent);
    margin: 4px 0 4px 23px;
}

/* =============================================
   ORG CTA
============================================= */
#org-cta {
    position: relative;
    overflow: hidden;
}
.org-cta-bg {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(6, 182, 212, 0.05) 100%);
    border: 1px solid var(--clr-border);
    border-radius: 32px;
    padding: 60px 48px;
    position: relative;
    overflow: hidden;
}
.org-cta-bg::before {
    content: "";
    position: absolute;
    top: -100px;
    right: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--primary-15), transparent 70%);
    pointer-events: none;
}
.org-cta-bg::after {
    content: "";
    position: absolute;
    bottom: -80px;
    left: -80px;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.1), transparent 70%);
    pointer-events: none;
}
.feature-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--clr-border);
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 0.83rem;
    color: var(--clr-text);
    transition:
        border-color 0.2s,
        background 0.2s;
}
.feature-chip:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.06);
    color: var(--clr-on-surface);
}
.feature-chip i {
    color: var(--clr-primary-2);
}

/* CTA Form */
.cta-form-card {
    background: rgba(19, 23, 32, 0.9);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-xl);
    padding: 32px;
    backdrop-filter: blur(20px);
}
.form-control-dark,
.form-select-dark {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--clr-border);
    border-radius: 10px;
    color: var(--clr-on-surface);
    font-size: 0.875rem;
    padding: 10px 14px;
    transition:
        border-color 0.2s,
        background 0.2s;
}
.form-control-dark::placeholder {
    color: var(--clr-muted);
}
.form-control-dark:focus,
.form-select-dark:focus {
    background: rgba(99, 102, 241, 0.06);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--clr-on-surface);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
    outline: none;
}
.form-select-dark option {
    background: #131720;
    color: var(--clr-on-surface);
}
.form-label-dark {
    color: var(--clr-muted);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 6px;
}
.btn-submit-cta {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 13px;
    width: 100%;
    box-shadow: var(--shadow-primary-md);
    transition: all 0.25s;
}
.btn-submit-cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary-lg);
    color: #fff;
}

/* =============================================
   TESTIMONIALS
============================================= */
#testimonials {
    position: relative;
}
.testimonial-card {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: var(--radius-lg);
    padding: 28px;
    height: 100%;
    transition:
        border-color 0.3s,
        transform 0.3s;
}
.testimonial-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    transform: translateY(-4px);
}
.testimonial-stars {
    color: var(--clr-amber);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}
.testimonial-text {
    color: var(--clr-text);
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
}
.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}
.author-avatar {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    flex-shrink: 0;
}
.author-name {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--clr-on-surface);
}
.author-role {
    font-size: 0.78rem;
    color: var(--clr-muted);
}

/* =============================================
   FAQ
============================================= */
#faq {
    position: relative;
}
.faq-item {
    background: var(--clr-card);
    border: 1px solid var(--clr-border);
    border-radius: 14px;
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}
.faq-item:hover {
    border-color: var(--primary-25);
}
.faq-btn {
    width: 100%;
    background: none;
    border: none;
    color: var(--clr-text);
    font-family: "Cairo", sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: right;
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.2s;
}
.faq-btn:hover {
    color: var(--clr-on-surface);
}
.faq-btn[aria-expanded="true"] {
    color: var(--clr-primary-2);
}
.faq-btn .faq-icon {
    transition: transform 0.3s;
    color: var(--clr-muted);
    flex-shrink: 0;
    margin-right: 12px;
}
.faq-btn[aria-expanded="true"] .faq-icon {
    transform: rotate(45deg);
    color: var(--clr-primary-2);
}
.faq-body {
    color: var(--clr-muted);
    font-size: 0.875rem;
    line-height: 1.8;
    padding: 0 22px 18px;
}

/* =============================================
   FINAL CTA BANNER
============================================= */
#final-cta {
    position: relative;
    overflow: hidden;
}
.final-cta-inner {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #1e1b4b 100%);
    border: 1px solid var(--primary-25);
    border-radius: 32px;
    padding: 80px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.final-cta-inner::before {
    content: "";
    position: absolute;
    top: -150px;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(99, 102, 241, 0.3), transparent 70%);
    pointer-events: none;
}
.final-cta-inner h2 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--clr-on-surface);
    letter-spacing: -0.5px;
    margin-bottom: 1rem;
}
.final-cta-inner p {
    color: var(--clr-muted);
    font-size: 1.05rem;
    max-width: 500px;
    margin: 0 auto 2rem;
}

/* =============================================
   FOOTER
============================================= */
footer {
    background: var(--clr-surface);
    border-top: 1px solid var(--clr-border);
}
.footer-brand {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--clr-on-surface);
    text-decoration: none;
}
.footer-brand .brand-dot {
    color: var(--clr-primary);
}
.footer-desc {
    color: var(--clr-muted);
    font-size: 0.85rem;
    line-height: 1.7;
}
.footer-heading {
    color: var(--clr-muted);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}
.footer-link {
    display: block;
    color: var(--clr-muted);
    font-size: 0.875rem;
    text-decoration: none;
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-link:hover {
    color: var(--clr-on-surface);
}
.footer-links-inline {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.footer-links-inline a {
    color: var(--clr-muted);
    font-size: 0.78rem;
    text-decoration: none;
    transition: color 0.2s;
}
.footer-links-inline a:hover {
    color: var(--clr-text);
}
.social-btn {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--clr-border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-muted);
    text-decoration: none;
    transition: all 0.2s;
}
.social-btn:hover {
    background: var(--primary-15);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--clr-primary-2);
}
.footer-divider {
    border-color: var(--clr-border);
}
.footer-copy {
    color: var(--clr-muted);
    font-size: 0.8rem;
}

/* =============================================
   SCROLL TO TOP
============================================= */
#scrollTop {
    position: fixed;
    bottom: 28px;
    left: 28px;
    z-index: 999;
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    background: var(--primary-15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--clr-primary-2);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}
#scrollTop:hover {
    background: var(--primary-25);
}

/* ── Alert System ── */
#alert-container {
    position: fixed;
    top: 58px;
    left: 0;
    right: 0;
    z-index: 10000;
    padding: 8px 16px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    pointer-events: none;
}
#alert-container .ai-alert {
    width: 100%;
    max-width: 540px;
}
.ai-alert {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid;
    backdrop-filter: blur(16px);
    pointer-events: all;
    animation: alertIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    position: relative;
    overflow: hidden;
}
.ai-alert.hiding {
    animation: alertOut 0.25s ease forwards;
}
@keyframes alertIn {
    from {
        opacity: 0;
        transform: translateY(-18px) scale(0.96);
    }
    to {
        opacity: 1;
        transform: none;
    }
}
@keyframes alertOut {
    to {
        opacity: 0;
        transform: translateY(-12px) scale(0.96);
    }
}

.ai-alert-icon {
    font-size: 1.15rem;
    flex-shrink: 0;
    margin-top: 1px;
}
.ai-alert-body {
    flex: 1;
    min-width: 0;
}
.ai-alert-title {
    font-size: 0.85rem;
    font-weight: 800;
    margin-bottom: 2px;
}
.ai-alert-msg {
    font-size: 0.78rem;
    line-height: 1.6;
    opacity: 0.85;
}
.ai-alert-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px 4px;
    font-size: 0.8rem;
    opacity: 0.55;
    flex-shrink: 0;
    line-height: 1;
    transition: opacity 0.15s;
}
.ai-alert-close:hover {
    opacity: 1;
}
.ai-alert-progress {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 3px;
    border-radius: 0 0 14px 14px;
    animation: alertProgress linear forwards;
}
@keyframes alertProgress {
    from {
        width: 100%;
    }
    to {
        width: 0;
    }
}

/* success */
.ai-alert-success {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.25);
    color: #d1fae5;
}
.ai-alert-success .ai-alert-title {
    color: #34d399;
}
.ai-alert-success .ai-alert-close {
    color: #34d399;
}
.ai-alert-success .ai-alert-progress {
    background: #10b981;
}

/* error */
.ai-alert-error {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fee2e2;
}
.ai-alert-error .ai-alert-title {
    color: #f87171;
}
.ai-alert-error .ai-alert-close {
    color: #f87171;
}
.ai-alert-error .ai-alert-progress {
    background: #ef4444;
}

/* warning */
.ai-alert-warning {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fef3c7;
}
.ai-alert-warning .ai-alert-title {
    color: #fbbf24;
}
.ai-alert-warning .ai-alert-close {
    color: #fbbf24;
}
.ai-alert-warning .ai-alert-progress {
    background: #f59e0b;
}

/* info */
.ai-alert-info {
    background: rgba(6, 182, 212, 0.12);
    border-color: rgba(6, 182, 212, 0.25);
    color: #cffafe;
}
.ai-alert-info .ai-alert-title {
    color: #22d3ee;
}
.ai-alert-info .ai-alert-close {
    color: #22d3ee;
}
.ai-alert-info .ai-alert-progress {
    background: #06b6d4;
}

/* confirm */
.ai-alert-confirm {
    background: var(--primary-12);
    border-color: var(--primary-25);
    color: #e0e7ff;
}
.ai-alert-confirm .ai-alert-title {
    color: #818cf8;
}
.ai-alert-confirm .ai-alert-close {
    color: #818cf8;
}
.ai-alert-confirm .ai-alert-progress {
    background: #6366f1;
}
.ai-alert-confirm-btns {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}
.ai-alert-confirm-btns button {
    padding: 5px 14px;
    border-radius: var(--radius-sm);
    font-family: "Cairo", sans-serif;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
}
.btn-confirm-yes {
    background: rgba(99, 102, 241, 0.3);
    color: #c7d2fe;
}
.btn-confirm-yes:hover {
    background: rgba(99, 102, 241, 0.5);
}
.btn-confirm-no {
    background: rgba(255, 255, 255, 0.07);
    color: rgba(255, 255, 255, 0.6);
}
.btn-confirm-no:hover {
    background: rgba(255, 255, 255, 0.12);
}

/* ── Alert Light Mode ── */
html[data-theme="light"] .ai-alert-success {
    background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.30); color: #065f46;
}
html[data-theme="light"] .ai-alert-success .ai-alert-title,
html[data-theme="light"] .ai-alert-success .ai-alert-close { color: #047857; }

html[data-theme="light"] .ai-alert-error {
    background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.30); color: #991b1b;
}
html[data-theme="light"] .ai-alert-error .ai-alert-title,
html[data-theme="light"] .ai-alert-error .ai-alert-close { color: #dc2626; }

html[data-theme="light"] .ai-alert-warning {
    background: rgba(245,158,11,0.10); border-color: rgba(245,158,11,0.30); color: #92400e;
}
html[data-theme="light"] .ai-alert-warning .ai-alert-title,
html[data-theme="light"] .ai-alert-warning .ai-alert-close { color: #d97706; }

html[data-theme="light"] .ai-alert-info {
    background: rgba(6,182,212,0.10); border-color: rgba(6,182,212,0.30); color: #155e75;
}
html[data-theme="light"] .ai-alert-info .ai-alert-title,
html[data-theme="light"] .ai-alert-info .ai-alert-close { color: #0891b2; }

html[data-theme="light"] .ai-alert-confirm {
    background: rgba(99,102,241,0.10); border-color: rgba(99,102,241,0.30); color: #3730a3;
}
html[data-theme="light"] .ai-alert-confirm .ai-alert-title,
html[data-theme="light"] .ai-alert-confirm .ai-alert-close { color: #4f46e5; }
html[data-theme="light"] .btn-confirm-yes { background: rgba(99,102,241,0.15); color: #4338ca; }
html[data-theme="light"] .btn-confirm-yes:hover { background: rgba(99,102,241,0.25); }
html[data-theme="light"] .btn-confirm-no { background: rgba(0,0,0,0.05); color: #64748b; }
html[data-theme="light"] .btn-confirm-no:hover { background: rgba(0,0,0,0.10); }

@media (max-width: 576px) {
    #alert-container {
        top: 68px;
    }
}

/* Shared toast animation state */
#toast.show {
    transform: translateX(-50%) translateY(0);
}

/* =============================================
   UTILITIES
============================================= */
.z-1 {
    position: relative;
    z-index: 1;
}
.divider-line {
    border-color: var(--clr-border);
}
@media (max-width: 768px) {
    .org-cta-bg {
        padding: 36px 24px;
    }
    .final-cta-inner {
        padding: 48px 20px;
    }
    .stat-card {
        border-left: none;
        border-bottom: 1px solid var(--clr-border);
    }
    .stat-card:last-child {
        border-bottom: none;
    }
}

/* =============================================
   MOBILE DRAWER
============================================= */
.drawer-toggle {
    background: none;
    border: none;
    color: var(--clr-muted);
    font-size: 1.5rem;
    padding: 4px 8px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
    line-height: 1;
}
.drawer-toggle:hover {
    color: var(--clr-on-surface);
    background: rgba(255, 255, 255, 0.06);
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 300px;
    max-width: 85vw;
    background: var(--clr-surface);
    border-left: 1px solid var(--clr-border);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.3);
}
.mobile-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--clr-border);
    flex-shrink: 0;
}
.drawer-close {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--clr-border);
    color: var(--clr-muted);
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}
.drawer-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--clr-on-surface);
    border-color: rgba(255, 255, 255, 0.15);
}

.drawer-user-section {
    padding: 20px;
    border-bottom: 1px solid var(--clr-border);
}
.drawer-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}
.drawer-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    font-weight: 800;
    color: #fff;
    flex-shrink: 0;
    border: 2px solid rgba(99, 102, 241, 0.4);
}
.drawer-user-name {
    font-size: 0.9rem;
    font-weight: 800;
    color: var(--clr-on-surface);
    line-height: 1.3;
}
.drawer-user-email {
    font-size: 0.75rem;
    color: var(--clr-muted);
}

.drawer-nav {
    padding: 12px 12px 0;
}
.drawer-nav-label {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--clr-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 10px 8px;
}
.drawer-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 12px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--clr-text);
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: right;
    transition: background 0.15s, color 0.15s;
    font-family: "Cairo", sans-serif;
}
.drawer-link:hover,
.drawer-link.active {
    background: rgba(255, 255, 255, 0.06);
    color: var(--clr-on-surface);
}
.drawer-link.active {
    background: var(--primary-12);
    color: var(--clr-primary-2);
}
.drawer-link-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    color: var(--clr-muted);
}
.drawer-link.active .drawer-link-icon {
    background: var(--primary-12);
    color: var(--clr-primary-2);
}

.drawer-badge {
    margin-right: auto;
    background: #ef4444;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 900;
    border-radius: var(--radius-pill);
    padding: 1px 7px;
    min-width: 20px;
    text-align: center;
}

.drawer-link-danger {
    color: rgba(248, 113, 113, 0.8) !important;
}
.drawer-link-danger:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    color: #f87171 !important;
}
.drawer-link-danger .drawer-link-icon {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
}

.drawer-footer {
    margin-top: auto;
    padding: 16px 16px 24px;
    border-top: 1px solid var(--clr-border);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.drawer-btn-login {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--clr-border);
    color: var(--clr-text);
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 18px;
    text-align: center;
    text-decoration: none;
    transition: all 0.2s;
}
.drawer-btn-login:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--clr-on-surface);
}
.drawer-btn-register {
    background: var(--gradient-primary);
    border: none;
    color: #fff;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 600;
    padding: 10px 18px;
    text-align: center;
    text-decoration: none;
    box-shadow: var(--shadow-primary-sm);
    transition: all 0.2s;
}
.drawer-btn-register:hover {
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
    color: #fff;
}

@media (max-width: 991.98px) {
    #nav-user .profile-dropdown {
        display: none !important;
    }
    #nav-user .profile-btn #profileChevron {
        display: none !important;
    }
    #nav-user .profile-btn .d-lg-block {
        display: none !important;
    }
}

@media (min-width: 992px) {
    .drawer-overlay,
    .mobile-drawer,
    .drawer-toggle {
        display: none !important;
    }
}

/* ── Light Mode: Drawer ── */
html[data-theme="light"] .mobile-drawer {
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.1);
}
html[data-theme="light"] .drawer-link:hover,
html[data-theme="light"] .drawer-link.active {
    background: rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .drawer-link.active {
    background: var(--primary-12);
}
html[data-theme="light"] .drawer-close {
    background: rgba(0, 0, 0, 0.04);
    border-color: rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .drawer-close:hover {
    background: rgba(0, 0, 0, 0.08);
}
html[data-theme="light"] .drawer-link-icon {
    background: rgba(0, 0, 0, 0.04);
}
html[data-theme="light"] .drawer-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* PAGINATION */
.pagination-custom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}
.page-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--clr-border);
    color: var(--clr-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}
.page-btn:hover,
.page-btn.active {
    background: var(--primary-15);
    border-color: var(--primary-35);
    color: var(--clr-primary-2);
}
.page-btn.active {
    background: var(--clr-primary);
    border-color: var(--clr-primary);
    color: #fff;
}
.page-btn.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* =============================================
   LTR dashboard overrides (sidebar on the left)
   Dashboards were authored RTL-only with `.sidebar { right:0 }`
   and `.main-content { margin-right:240px }` baked into every
   per-page CSS file. These rules flip them for English.
============================================= */
html[dir="ltr"] .sidebar {
    right: auto;
    left: 0;
    border-left: none;
    border-right: 1px solid var(--border);
}
html[dir="ltr"] .main-content {
    margin-right: 0;
    margin-left: 240px;
}
@media (max-width: 768px) {
    html[dir="ltr"] .sidebar {
        transform: translateX(-100%);
    }
    html[dir="ltr"] .sidebar.open {
        transform: translateX(0);
    }
    html[dir="ltr"] .main-content {
        margin-left: 0;
    }
}

/* =============================================
   TOKEN UTILITIES
   Replace the most-repeated inline `style="..."` patterns.
   `.text-muted` already exists above — do not redefine.
   ============================================= */
.text-yellow       { color: var(--yellow); }
.text-green        { color: var(--green); }
.text-accent       { color: var(--accent); }
.text-p2           { color: var(--p2); }
.text-purple-light { color: var(--purple-light); }
.text-meta         { font-size: 0.78rem; color: var(--muted); }
.h-28              { height: 28px; }
