/* ========================================
   CX B2B/B2G — Core Bundle
   Merged: style + tools-pages + nav + a11y-print + notes
          + celebrations + next-action + search + mobile + ux-enhancements
   ======================================== */

/* ========================================
   CX B2B/B2G Excellence Training - Main Styles
   ======================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #06b6d4;
    --accent: #f59e0b;
    --danger: #ef4444;
    --success: #10b981;
    --dark: #0f172a;
    --dark-2: #1e293b;
    --dark-3: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f1f5f9;
    --light-2: #e2e8f0;
    --white: #ffffff;
    --gradient-1: linear-gradient(135deg, #6366f1, #06b6d4);
    --gradient-2: linear-gradient(135deg, #f59e0b, #ef4444);
    --gradient-3: linear-gradient(135deg, #10b981, #06b6d4);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Tajawal', 'Cairo', sans-serif;
    background: var(--dark);
    color: var(--light);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ========================================
   Splash Screen
   ======================================== */
.splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.splash-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    text-align: center;
}

.splash-icon {
    font-size: 4rem;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
    animation: pulse 1.5s infinite;
}

.splash-content h1 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    color: var(--white);
}

.splash-content h2 {
    font-size: 1.2rem;
    font-weight: 400;
    color: var(--primary-light);
    margin-bottom: 30px;
}

.splash-loader {
    width: 200px;
    height: 4px;
    background: var(--dark-3);
    border-radius: 4px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.loader-bar {
    height: 100%;
    width: 0%;
    background: var(--gradient-1);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.splash-text {
    color: var(--gray);
    font-size: 0.9rem;
    transition: opacity 0.3s;
}

/* ========================================
   Navigation
   ======================================== */
.main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
    transform: translateY(-100%);
}

.main-nav.visible {
    transform: translateY(0);
}

.main-nav.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
}

.nav-brand i {
    color: var(--primary);
    font-size: 1.4rem;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 4px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    color: var(--gray-light);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--white);
    background: rgba(99, 102, 241, 0.15);
}

.nav-links a.active {
    color: var(--primary-light);
}

.nav-links a i {
    font-size: 0.8rem;
}

.nav-progress {
    display: flex;
    align-items: center;
}

.progress-ring {
    position: relative;
    width: 40px;
    height: 40px;
}

.progress-ring svg {
    transform: rotate(-90deg);
    width: 40px;
    height: 40px;
}

.progress-bg {
    fill: none;
    stroke: var(--dark-3);
    stroke-width: 3;
}

.progress-fill {
    fill: none;
    stroke: var(--primary);
    stroke-width: 3;
    stroke-linecap: round;
    transition: stroke-dasharray 0.5s ease;
}

.progress-ring span {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.6rem;
    font-weight: 700;
    color: var(--primary-light);
}

/* ========================================
   Hero Section
   ======================================== */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 24px;
    overflow: hidden;
    background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.15) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.1) 0%, transparent 50%),
                var(--dark);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
}

.hero-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 24px;
}

.hero-title {
    font-size: 3.2rem;
    font-weight: 900;
    line-height: 1.3;
    margin-bottom: 20px;
    color: var(--white);
}

.gradient-text {
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-light);
    margin-bottom: 48px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 48px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--gray);
    margin-top: 4px;
}

.hero-cta {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-md);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: var(--gradient-1);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--primary-light);
    border: 2px solid rgba(99, 102, 241, 0.4);
}

.btn-outline:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.hero-scroll {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    animation: bounceDown 2s infinite;
}

.hero-scroll a {
    color: var(--gray);
    font-size: 1.5rem;
    text-decoration: none;
}

@keyframes bounceDown {
    0%, 20%, 50%, 80%, 100% { transform: translateX(-50%) translateY(0); }
    40% { transform: translateX(-50%) translateY(10px); }
    60% { transform: translateX(-50%) translateY(5px); }
}

/* ========================================
   Sections Common
   ======================================== */
.section {
    padding: 100px 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-tag {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 16px;
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 12px;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 650px;
    margin: 0 auto;
}

/* ========================================
   Overview Section
   ======================================== */
.overview-section {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
}

.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.philosophy-card {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.philosophy-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-1);
    opacity: 0;
    transition: var(--transition);
}

.philosophy-card:hover {
    transform: translateY(-5px);
    border-color: rgba(99, 102, 241, 0.3);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

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

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-md);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 20px;
}

.philosophy-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 12px;
}

.philosophy-card p {
    color: var(--gray-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* Audience Section */
.audience-section {
    margin-top: 40px;
}

.audience-section h3 {
    text-align: center;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 32px;
}

.audience-section h3 i {
    color: var(--accent);
    margin-left: 8px;
}

.audience-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 24px;
}

.audience-card {
    background: rgba(30, 41, 59, 0.6);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
}

.audience-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.audience-card.b2b { border-top: 3px solid var(--primary); }
.audience-card.b2g { border-top: 3px solid var(--secondary); }

.audience-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 16px;
}

.b2b .audience-icon { background: rgba(99, 102, 241, 0.15); color: var(--primary-light); }
.b2g .audience-icon { background: rgba(6, 182, 212, 0.15); color: var(--secondary); }

.audience-card h4 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 8px;
}

.audience-card p {
    color: var(--gray);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.audience-card ul {
    list-style: none;
    padding: 0;
}

.audience-card ul li {
    padding: 6px 0;
    color: var(--gray-light);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.audience-card ul li::before {
    content: '✦';
    color: var(--primary-light);
    font-size: 0.7rem;
}

.b2g ul li::before { color: var(--secondary); }

/* ========================================
   Units Section
   ======================================== */
.units-section {
    background: var(--dark);
}

.units-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.unit-card {
    display: flex;
    gap: 24px;
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid rgba(99, 102, 241, 0.08);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.unit-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 4px;
    transition: var(--transition);
}

.unit-card[data-phase="foundation"]::before { background: var(--primary); }
.unit-card[data-phase="intermediate"]::before { background: var(--secondary); }
.unit-card[data-phase="advanced"]::before { background: var(--accent); }
.unit-card[data-phase="mastery"]::before { background: var(--danger); }

.unit-card:hover {
    transform: translateX(-5px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.unit-number {
    font-size: 3rem;
    font-weight: 900;
    min-width: 80px;
    text-align: center;
    line-height: 1;
    padding-top: 8px;
}

.unit-card[data-phase="foundation"] .unit-number { color: var(--primary); }
.unit-card[data-phase="intermediate"] .unit-number { color: var(--secondary); }
.unit-card[data-phase="advanced"] .unit-number { color: var(--accent); }
.unit-card[data-phase="mastery"] .unit-number { color: var(--danger); }

.unit-content {
    flex: 1;
}

.unit-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.unit-phase {
    font-size: 0.8rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.unit-card[data-phase="foundation"] .unit-phase { background: rgba(99,102,241,0.15); color: var(--primary-light); }
.unit-card[data-phase="intermediate"] .unit-phase { background: rgba(6,182,212,0.15); color: var(--secondary); }
.unit-card[data-phase="advanced"] .unit-phase { background: rgba(245,158,11,0.15); color: var(--accent); }
.unit-card[data-phase="mastery"] .unit-phase { background: rgba(239,68,68,0.15); color: var(--danger); }

.unit-hours {
    font-size: 0.85rem;
    color: var(--gray);
}

.unit-hours i { margin-left: 4px; }

.unit-content h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 8px;
}

.unit-content > p {
    color: var(--gray-light);
    font-size: 0.95rem;
    margin-bottom: 16px;
}

.unit-topics {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.topic-tag {
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    color: var(--gray-light);
    transition: var(--transition);
}

.topic-tag:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.unit-expand-btn {
    background: none;
    border: none;
    color: var(--primary-light);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    transition: var(--transition);
}

.unit-expand-btn:hover {
    color: var(--white);
}

.unit-expand-btn i {
    transition: var(--transition);
}

.unit-expand-btn.active i {
    transform: rotate(45deg);
}

.unit-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.unit-detail-link {
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(6, 182, 212, 0.25);
    transition: var(--transition);
    background: rgba(6, 182, 212, 0.05);
}

.unit-detail-link:hover {
    background: rgba(6, 182, 212, 0.15);
    color: var(--white);
    border-color: var(--secondary);
}

.unit-detail {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.unit-detail.open {
    max-height: 800px;
}

.detail-section {
    margin-top: 20px;
    padding: 20px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.detail-section + .detail-section {
    margin-top: 12px;
}

.detail-section h4 {
    font-size: 1rem;
    color: var(--primary-light);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.detail-section ul {
    list-style: none;
    padding: 0;
}

.detail-section ul li {
    padding: 6px 0;
    color: var(--gray-light);
    font-size: 0.9rem;
    padding-right: 20px;
    position: relative;
}

.detail-section ul li::before {
    content: '→';
    position: absolute;
    right: 0;
    color: var(--primary);
}

.detail-section p {
    color: var(--gray-light);
    font-size: 0.9rem;
    padding: 12px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: var(--radius-sm);
    border-right: 3px solid var(--primary);
}

/* ========================================
   Assessment Section
   ======================================== */
.assessment-section {
    background: linear-gradient(180deg, var(--dark-2) 0%, var(--dark) 100%);
}

.assessment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.cert-card {
    background: rgba(30, 41, 59, 0.6);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.1);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cert-card[data-level="1"] { border-top: 3px solid var(--primary); }
.cert-card[data-level="2"] { border-top: 3px solid var(--secondary); }
.cert-card[data-level="3"] { border-top: 3px solid var(--accent); }
.cert-card[data-level="4"] { border-top: 3px solid var(--danger); }

.cert-badge {
    font-size: 3rem;
    margin-bottom: 16px;
}

.cert-card[data-level="1"] .cert-badge { color: var(--primary); }
.cert-card[data-level="2"] .cert-badge { color: var(--secondary); }
.cert-card[data-level="3"] .cert-badge { color: var(--accent); }
.cert-card[data-level="4"] .cert-badge { color: var(--danger); }

.cert-level {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cert-card h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 20px;
}

.cert-details {
    margin-bottom: 20px;
}

.cert-details p {
    color: var(--gray-light);
    font-size: 0.9rem;
    padding: 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cert-details i {
    color: var(--primary-light);
    width: 20px;
}

.cert-requirements {
    text-align: right;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-requirements h4 {
    font-size: 0.9rem;
    color: var(--gray);
    margin-bottom: 8px;
}

.cert-requirements ul {
    list-style: none;
    padding: 0;
}

.cert-requirements li {
    font-size: 0.85rem;
    color: var(--gray-light);
    padding: 4px 0;
    padding-right: 16px;
    position: relative;
}

.cert-requirements li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--success);
    font-weight: 700;
}

/* Assessment Methods */
.assessment-methods {
    background: rgba(30, 41, 59, 0.4);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.assessment-methods h3 {
    text-align: center;
    font-size: 1.5rem;
    color: var(--white);
    margin-bottom: 32px;
}

.assessment-methods h3 i {
    color: var(--accent);
    margin-left: 8px;
}

.methods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.method-item {
    text-align: center;
    padding: 24px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    position: relative;
    transition: var(--transition);
}

.method-item:hover {
    transform: translateY(-3px);
    background: rgba(15, 23, 42, 0.8);
}

.method-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.2rem;
    color: var(--white);
}

.method-item h4 {
    color: var(--white);
    margin-bottom: 8px;
    font-size: 1rem;
}

.method-item p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 12px;
}

.method-weight {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    font-size: 1.1rem;
    font-weight: 700;
}

/* ========================================
   Tools Section
   ======================================== */
.tools-section {
    background: var(--dark);
}

.tools-categories {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.tool-filter {
    padding: 8px 20px;
    border-radius: 50px;
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.1);
    color: var(--gray-light);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tool-filter:hover,
.tool-filter.active {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.3);
    color: var(--primary-light);
}

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tool-card {
    background: rgba(30, 41, 59, 0.5);
    border-radius: var(--radius-md);
    padding: 24px;
    border: 1px solid rgba(99, 102, 241, 0.08);
    transition: var(--transition);
    position: relative;
}

.tool-card:hover {
    transform: translateY(-3px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.tool-card.hidden {
    display: none;
}

.tool-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    background: var(--gradient-1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--white);
    margin-bottom: 16px;
}

.tool-card h4 {
    font-size: 1rem;
    color: var(--white);
    margin-bottom: 8px;
}

.tool-card p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 12px;
    line-height: 1.6;
}

.tool-unit {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 50px;
    background: rgba(6, 182, 212, 0.1);
    color: var(--secondary);
    font-size: 0.75rem;
    font-weight: 600;
}

/* ========================================
   Quiz Section
   ======================================== */
.quiz-section {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-2) 100%);
}

.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(30, 41, 59, 0.6);
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.quiz-header {
    margin-bottom: 32px;
}

.quiz-progress-bar {
    height: 6px;
    background: var(--dark-3);
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 16px;
}

.quiz-progress-fill {
    height: 100%;
    background: var(--gradient-1);
    border-radius: 6px;
    transition: width 0.5s ease;
    width: 10%;
}

.quiz-info {
    display: flex;
    justify-content: space-between;
    color: var(--gray);
    font-size: 0.9rem;
}

.quiz-body {
    min-height: 300px;
}

.quiz-question {
    margin-bottom: 24px;
}

.quiz-question h3 {
    font-size: 1.2rem;
    color: var(--white);
    margin-bottom: 24px;
    line-height: 1.6;
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.quiz-option {
    padding: 16px 20px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.08);
    color: var(--light);
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.quiz-option:hover {
    border-color: rgba(99, 102, 241, 0.4);
    background: rgba(99, 102, 241, 0.08);
}

.quiz-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
}

.quiz-option.correct {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.15);
}

.quiz-option.wrong {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.15);
}

.option-letter {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.quiz-option.selected .option-letter {
    background: var(--primary);
    color: var(--white);
}

.quiz-option.correct .option-letter {
    background: var(--success);
    color: var(--white);
}

.quiz-option.wrong .option-letter {
    background: var(--danger);
    color: var(--white);
}

.quiz-explanation {
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--radius-sm);
    background: rgba(99, 102, 241, 0.08);
    border-right: 3px solid var(--primary);
    color: var(--gray-light);
    font-size: 0.9rem;
    display: none;
}

.quiz-explanation.show {
    display: block;
}

.quiz-footer {
    display: flex;
    justify-content: space-between;
    margin-top: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Quiz Results */
.quiz-results {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    background: rgba(30, 41, 59, 0.6);
    border-radius: var(--radius-lg);
    padding: 48px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}

.results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.quiz-results h3 {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 12px;
}

.quiz-results > p {
    color: var(--gray);
    margin-bottom: 24px;
}

.results-score {
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 32px;
}

.results-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

.breakdown-item {
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.5);
}

.breakdown-item .num {
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
}

.breakdown-item .label {
    font-size: 0.8rem;
    color: var(--gray);
}

/* ========================================
   Footer
   ======================================== */
.main-footer {
    background: var(--dark-2);
    padding: 60px 0 0;
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    padding-bottom: 40px;
}

.footer-brand h3 {
    font-size: 1.3rem;
    color: var(--white);
    margin-bottom: 12px;
}

.footer-brand h3 i {
    color: var(--primary);
}

.footer-brand p {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 4px;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 1rem;
}

.footer-links a {
    display: block;
    color: var(--gray);
    text-decoration: none;
    padding: 4px 0;
    font-size: 0.9rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
    padding-right: 8px;
}

.footer-contact p {
    color: var(--gray);
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    text-align: center;
}

.footer-bottom p {
    color: var(--dark-3);
    font-size: 0.85rem;
}

/* ========================================
   Back to Top
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-1);
    border: none;
    color: var(--white);
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
    z-index: 100;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .hero-title { font-size: 2.5rem; }
    .section-header h2 { font-size: 2rem; }
    .footer-content { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }
    
    .nav-links {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 64px);
        background: var(--dark-2);
        flex-direction: column;
        padding: 24px;
        gap: 4px;
        transition: var(--transition);
        border-left: 1px solid rgba(99, 102, 241, 0.1);
        overflow-y: auto;
    }
    
    .nav-links.open {
        right: 0;
    }
    
    .nav-progress {
        display: none;
    }
    
    .hero-title { font-size: 2rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 24px; }
    .stat-number { font-size: 2rem; }
    
    .unit-card {
        flex-direction: column;
        gap: 16px;
    }
    
    .unit-number {
        font-size: 2rem;
        text-align: right;
    }
    
    .section { padding: 60px 0; }
    .section-header h2 { font-size: 1.6rem; }
    
    .results-breakdown {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-title { font-size: 1.6rem; }
    .hero-stats { gap: 16px; }
    .stat-number { font-size: 1.8rem; }
    .hero-cta { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
    
    .quiz-container { padding: 20px; }
    .quiz-results { padding: 24px; }
}

/* ========================================
   Light Theme Overrides
   ======================================== */
body.light-theme {
    --dark: #f8fafc;
    --dark-2: #f1f5f9;
    --dark-3: #e2e8f0;
    --white: #0f172a;
    --light: #1e293b;
    --light-2: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    background: #f8fafc;
    color: #1e293b;
}

body.light-theme .main-nav {
    background: rgba(248, 250, 252, 0.92);
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
    backdrop-filter: blur(12px);
}

body.light-theme .main-nav.scrolled {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

body.light-theme .nav-brand span,
body.light-theme .nav-links a {
    color: #334155;
}

body.light-theme .nav-links a:hover,
body.light-theme .nav-links a.active {
    color: #6366f1;
}

body.light-theme .hero-section {
    background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.06) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.04) 0%, transparent 50%),
                #f8fafc;
}

body.light-theme .hero-title,
body.light-theme .section-header h2 {
    color: #0f172a;
}

body.light-theme .hero-subtitle,
body.light-theme .section-header p {
    color: #64748b;
}

body.light-theme .hero-stats .stat-label {
    color: #64748b;
}

body.light-theme .philosophy-card,
body.light-theme .audience-card,
body.light-theme .unit-card,
body.light-theme .tool-card,
body.light-theme .cert-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

body.light-theme .philosophy-card:hover,
body.light-theme .audience-card:hover,
body.light-theme .unit-card:hover,
body.light-theme .tool-card:hover,
body.light-theme .cert-card:hover {
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

body.light-theme .philosophy-card h3,
body.light-theme .audience-card h4,
body.light-theme .unit-card h3,
body.light-theme .tool-card h4,
body.light-theme .cert-card h3 {
    color: #0f172a;
}

body.light-theme .philosophy-card p,
body.light-theme .audience-card p,
body.light-theme .unit-card p,
body.light-theme .tool-card p {
    color: #475569;
}

body.light-theme .unit-detail {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .unit-phase {
    color: #6366f1;
}

body.light-theme .topic-tag {
    background: rgba(99, 102, 241, 0.08);
    color: #4f46e5;
    border-color: rgba(99, 102, 241, 0.15);
}

body.light-theme .section-tag {
    color: #6366f1;
}

body.light-theme .quiz-container,
body.light-theme .quiz-results {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .quiz-option {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(99, 102, 241, 0.1);
    color: #1e293b;
}

body.light-theme .quiz-option:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

body.light-theme .overview-section,
body.light-theme .units-section,
body.light-theme .tools-section,
body.light-theme .quiz-section {
    background: #f8fafc;
}

body.light-theme .section {
    background: #f8fafc;
}

body.light-theme .section[style*="background:linear-gradient"] {
    background: linear-gradient(180deg, #f1f5f9 0%, #f8fafc 100%) !important;
}

body.light-theme .info-box {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .main-footer {
    background: #1e293b;
    color: #e2e8f0;
}

body.light-theme .main-footer a {
    color: #94a3b8;
}

body.light-theme .main-footer a:hover {
    color: #818cf8;
}

body.light-theme .back-to-top {
    background: #6366f1;
    color: white;
}

body.light-theme .btn-outline {
    border-color: rgba(99, 102, 241, 0.3);
    color: #6366f1;
}

body.light-theme .btn-outline:hover {
    background: rgba(99, 102, 241, 0.08);
}

body.light-theme .splash-screen {
    background: #f8fafc;
    color: #0f172a;
}

@media (max-width: 768px) {
    body.light-theme .nav-links {
        background: rgba(248, 250, 252, 0.98);
        border-left-color: rgba(99, 102, 241, 0.1);
    }
}

/* === tools-pages.css === */
/* ========================================
   Tools Pages - Shared Styles
   ======================================== */

.tool-page {
    padding-top: 100px;
    padding-bottom: 60px;
    min-height: 100vh;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 32px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: var(--gray);
    text-decoration: none;
    transition: var(--transition);
}

.breadcrumb a:hover { color: var(--primary-light); }
.breadcrumb i { font-size: 0.7rem; color: var(--dark-3); }
.breadcrumb span { color: var(--primary-light); }

/* Page Header */
.tool-page-header {
    text-align: center;
    margin-bottom: 48px;
}

.tool-page-icon {
    width: 80px;
    height: 80px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin: 0 auto 20px;
}

.nps-gradient { background: linear-gradient(135deg, #6366f1, #06b6d4); }
.roi-gradient { background: linear-gradient(135deg, #10b981, #06b6d4); }
.maturity-gradient { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.cert-gradient { background: linear-gradient(135deg, #8b5cf6, #6366f1); }

.tool-page-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 8px;
}

.tool-page-header p {
    color: var(--gray);
    font-size: 1.1rem;
    margin-bottom: 12px;
}

.tool-badge {
    display: inline-block;
    padding: 4px 16px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    color: var(--primary-light);
    font-size: 0.85rem;
}

/* Info Box */
.info-box {
    background: rgba(30, 41, 59, 0.6);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
}

.info-box h3 {
    color: var(--white);
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.info-box h3 i { color: var(--primary-light); margin-left: 8px; }

.info-box p {
    color: var(--gray-light);
    line-height: 1.8;
    margin-bottom: 12px;
}

.info-box blockquote {
    background: rgba(99, 102, 241, 0.08);
    border-right: 3px solid var(--primary);
    padding: 16px 20px;
    border-radius: var(--radius-sm);
    color: var(--primary-light);
    font-style: italic;
    margin: 16px 0;
    font-size: 1.05rem;
}

/* NPS Categories */
.nps-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.nps-cat {
    padding: 16px;
    border-radius: var(--radius-md);
    text-align: center;
}

.nps-cat.promoters { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); }
.nps-cat.passives { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.3); }
.nps-cat.detractors { background: rgba(239, 68, 68, 0.1); border: 1px solid rgba(239, 68, 68, 0.3); }

.cat-score {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
}

.promoters .cat-score { color: var(--success); }
.passives .cat-score { color: var(--accent); }
.detractors .cat-score { color: var(--danger); }

.cat-name {
    display: block;
    font-weight: 700;
    color: var(--white);
    margin: 4px 0;
}

.cat-desc {
    display: block;
    font-size: 0.8rem;
    color: var(--gray);
}

/* Calculator Section */
.calculator-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
}

.calculator-section h2 {
    color: var(--white);
    margin-bottom: 24px;
    font-size: 1.4rem;
}

.calculator-section h2 i { color: var(--primary-light); margin-left: 8px; }

/* Input Method Toggle */
.input-method-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: rgba(15, 23, 42, 0.5);
    border-radius: var(--radius-md);
    padding: 4px;
    width: fit-content;
}

.method-btn {
    padding: 10px 24px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: none;
    color: var(--gray);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.method-btn.active {
    background: var(--primary);
    color: var(--white);
}

/* Input Panels */
.input-panel {
    margin-bottom: 24px;
}

.input-instruction {
    color: var(--gray);
    margin-bottom: 16px;
    font-size: 0.9rem;
}

/* Score Grid - Individual */
.score-input-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 400px;
    overflow-y: auto;
    padding-left: 8px;
    margin-bottom: 16px;
}

.score-input-grid::-webkit-scrollbar { width: 4px; }
.score-input-grid::-webkit-scrollbar-track { background: var(--dark-3); border-radius: 4px; }
.score-input-grid::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }

.score-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.response-num {
    min-width: 70px;
    font-size: 0.85rem;
    color: var(--gray);
    font-weight: 600;
}

.score-buttons {
    display: flex;
    gap: 4px;
    flex: 1;
    flex-wrap: wrap;
}

.score-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.03);
    color: var(--gray);
    font-family: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.score-btn:hover {
    transform: scale(1.1);
}

.score-btn.detractor-btn:hover, .score-btn.detractor-btn.selected {
    background: rgba(239, 68, 68, 0.2);
    border-color: var(--danger);
    color: #fca5a5;
}

.score-btn.passive-btn:hover, .score-btn.passive-btn.selected {
    background: rgba(245, 158, 11, 0.2);
    border-color: var(--accent);
    color: #fcd34d;
}

.score-btn.promoter-btn:hover, .score-btn.promoter-btn.selected {
    background: rgba(16, 185, 129, 0.2);
    border-color: var(--success);
    color: #6ee7b7;
}

.remove-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #fca5a5;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: rgba(239, 68, 68, 0.3);
}

.add-response-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Bulk Input */
.bulk-grid {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.bulk-row {
    display: grid;
    grid-template-columns: 60px 1fr 80px;
    align-items: center;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.bulk-row.header {
    background: rgba(99, 102, 241, 0.1);
    font-weight: 700;
    color: var(--gray-light);
    font-size: 0.85rem;
}

.bulk-row:last-child { border-bottom: none; }

.detractor-row { background: rgba(239, 68, 68, 0.03); }
.passive-row { background: rgba(245, 158, 11, 0.03); }
.promoter-row { background: rgba(16, 185, 129, 0.03); }

.bulk-score {
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--white);
}

.bulk-input {
    width: 100%;
    max-width: 120px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    text-align: center;
}

.bulk-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.bulk-type { font-size: 0.8rem; font-weight: 600; text-align: center; }
.detractor-label { color: #fca5a5; }
.passive-label { color: #fcd34d; }
.promoter-label { color: #6ee7b7; }

.btn-calculate {
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    margin-top: 16px;
}

/* Results Section */
.results-section {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: var(--radius-lg);
    padding: 40px;
    margin-bottom: 40px;
}

.results-section h2 {
    color: var(--white);
    margin-bottom: 32px;
    text-align: center;
    font-size: 1.5rem;
}

.results-section h2 i { color: var(--primary-light); margin-left: 8px; }

/* NPS Gauge */
.nps-score-display {
    text-align: center;
    margin-bottom: 40px;
}

.nps-gauge {
    position: relative;
    width: 240px;
    margin: 0 auto 16px;
}

.nps-gauge svg { width: 100%; }

.nps-value {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--white);
    margin-top: -30px;
}

.nps-label {
    color: var(--gray);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.nps-interpretation {
    margin-top: 16px;
}

.interp-excellent { color: #6ee7b7; font-size: 1.1rem; font-weight: 600; }
.interp-good { color: #67e8f9; font-size: 1.1rem; font-weight: 600; }
.interp-warning { color: #fcd34d; font-size: 1.1rem; font-weight: 600; }
.interp-danger { color: #fca5a5; font-size: 1.1rem; font-weight: 600; }

/* Breakdown Grid */
.breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.breakdown-card {
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
}

.promoter-card { background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.2); }
.passive-card { background: rgba(245, 158, 11, 0.08); border: 1px solid rgba(245, 158, 11, 0.2); }
.detractor-card { background: rgba(239, 68, 68, 0.08); border: 1px solid rgba(239, 68, 68, 0.2); }

.breakdown-icon { font-size: 2rem; margin-bottom: 12px; }
.promoter-card .breakdown-icon { color: var(--success); }
.passive-card .breakdown-icon { color: var(--accent); }
.detractor-card .breakdown-icon { color: var(--danger); }

.breakdown-info {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.breakdown-num {
    font-size: 2rem;
    font-weight: 900;
    color: var(--white);
}

.breakdown-pct {
    font-size: 1rem;
    color: var(--gray);
}

.breakdown-label {
    font-size: 0.85rem;
    color: var(--gray);
    margin-bottom: 12px;
}

.breakdown-bar {
    height: 6px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 6px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 6px;
    width: 0%;
    transition: width 1s ease;
}

.promoter-fill { background: var(--success); }
.passive-fill { background: var(--accent); }
.detractor-fill { background: var(--danger); }

/* Distribution Chart */
.distribution-chart {
    margin-bottom: 40px;
    padding: 24px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
}

.distribution-chart h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1rem;
    text-align: center;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    height: 120px;
}

.dist-bar {
    flex: 1;
    max-width: 50px;
    border-radius: 4px 4px 0 0;
    position: relative;
    transition: height 0.8s ease;
    min-height: 4px;
}

.det-bar { background: rgba(239, 68, 68, 0.6); }
.pas-bar { background: rgba(245, 158, 11, 0.6); }
.pro-bar { background: rgba(16, 185, 129, 0.6); }

.dist-count {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--gray);
    font-weight: 700;
}

.chart-labels {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
}

.chart-labels span {
    flex: 1;
    max-width: 50px;
    text-align: center;
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 600;
}

/* Recommendations */
.recommendations {
    margin-bottom: 40px;
}

.recommendations h3 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 1.2rem;
}

.recommendations h3 i { color: var(--accent); margin-left: 8px; }

.rec-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rec-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    line-height: 1.7;
}

.rec-item i {
    margin-top: 4px;
    font-size: 1rem;
    flex-shrink: 0;
}

.rec-item.urgent {
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #fca5a5;
}

.rec-item.urgent i { color: var(--danger); }

.rec-item.warning {
    background: rgba(245, 158, 11, 0.08);
    border: 1px solid rgba(245, 158, 11, 0.2);
    color: #fcd34d;
}

.rec-item.warning i { color: var(--accent); }

.rec-item.success {
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #6ee7b7;
}

.rec-item.success i { color: var(--success); }

.rec-item.info {
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--gray-light);
}

.rec-item.info i { color: var(--primary-light); }

/* NPS Scale Reference */
.nps-scale-ref {
    margin-bottom: 20px;
    position: relative;
}

.nps-scale-ref h3 {
    color: var(--white);
    margin-bottom: 16px;
    font-size: 1rem;
    text-align: center;
}

.scale-bar {
    display: flex;
    border-radius: var(--radius-sm);
    overflow: hidden;
    height: 48px;
}

.scale-segment {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4px 8px;
}

.scale-segment span { font-size: 0.75rem; font-weight: 700; color: var(--white); }
.scale-segment small { font-size: 0.65rem; color: rgba(255,255,255,0.7); }

.scale-segment.danger { background: rgba(239, 68, 68, 0.4); }
.scale-segment.warning { background: rgba(245, 158, 11, 0.4); }
.scale-segment.good { background: rgba(6, 182, 212, 0.4); }
.scale-segment.excellent { background: rgba(16, 185, 129, 0.4); }

.scale-marker {
    position: absolute;
    bottom: -28px;
    display: none;
    transform: translateX(50%);
}

.marker-label {
    background: var(--primary);
    color: var(--white);
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
}

/* Context Box */
.context-box {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin-bottom: 40px;
}

.context-box h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.context-box h3 i { color: var(--secondary); margin-left: 8px; }

.context-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.context-item {
    padding: 20px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-md);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.context-item h4 {
    color: var(--white);
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.context-item p {
    color: var(--gray);
    font-size: 0.85rem;
    line-height: 1.7;
}

/* ========================================
   ROI Calculator Specific
   ======================================== */
.roi-input-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.roi-input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.roi-input-group label {
    font-size: 0.9rem;
    color: var(--gray-light);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
}

.roi-input-group label i { color: var(--primary-light); }

.roi-input-group .helper-text {
    font-size: 0.75rem;
    color: var(--dark-3);
}

.roi-input {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--white);
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
}

.roi-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.roi-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 32px;
}

.roi-result-card {
    padding: 24px;
    border-radius: var(--radius-md);
    text-align: center;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.roi-result-card .result-value {
    font-size: 2rem;
    font-weight: 900;
    color: var(--white);
    display: block;
    margin-bottom: 4px;
}

.roi-result-card .result-label {
    font-size: 0.85rem;
    color: var(--gray);
}

.roi-result-card.highlight {
    border-color: rgba(16, 185, 129, 0.3);
    background: rgba(16, 185, 129, 0.05);
}

.roi-result-card.highlight .result-value { color: var(--success); }

/* ========================================
   Maturity Assessment Specific
   ======================================== */
.assessment-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.dimension-card {
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--radius-md);
    padding: 24px;
    transition: var(--transition);
}

.dimension-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
}

.dimension-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.dimension-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--white);
}

.dimension-header h4 {
    color: var(--white);
    font-size: 1rem;
    flex: 1;
}

.dimension-header .dim-num {
    font-size: 0.8rem;
    color: var(--gray);
    font-weight: 600;
}

.rating-scale {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.rating-option {
    flex: 1;
    min-width: 120px;
    padding: 12px;
    border-radius: var(--radius-sm);
    border: 2px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: var(--gray-light);
    font-family: inherit;
    font-size: 0.8rem;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.rating-option:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.05);
}

.rating-option.selected {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
}

.rating-option .rating-num {
    display: block;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 4px;
}

/* Maturity Results */
.maturity-radar {
    text-align: center;
    margin-bottom: 32px;
}

.maturity-radar canvas {
    max-width: 400px;
    margin: 0 auto;
}

.maturity-level-display {
    text-align: center;
    padding: 32px;
    margin-bottom: 32px;
    border-radius: var(--radius-lg);
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.maturity-level-display .level-badge {
    font-size: 3rem;
    margin-bottom: 12px;
}

.maturity-level-display h3 {
    font-size: 1.8rem;
    color: var(--white);
    margin-bottom: 8px;
}

.maturity-level-display .level-score {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 8px;
}

.maturity-level-display .level-desc {
    color: var(--gray);
    max-width: 500px;
    margin: 0 auto;
    line-height: 1.7;
}

.dimension-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.dim-result-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(15, 23, 42, 0.4);
    border-radius: var(--radius-sm);
}

.dim-result-row .dim-name {
    min-width: 180px;
    font-weight: 600;
    color: var(--gray-light);
    font-size: 0.9rem;
}

.dim-result-row .dim-bar {
    flex: 1;
    height: 10px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
}

.dim-result-row .dim-bar-fill {
    height: 100%;
    border-radius: 10px;
    transition: width 1s ease;
    background: var(--gradient-1);
}

.dim-result-row .dim-score {
    min-width: 50px;
    text-align: center;
    font-weight: 800;
    color: var(--white);
    font-size: 1.1rem;
}

/* ========================================
   Certificate Page
   ======================================== */
.certificate-preview {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.9), rgba(15, 23, 42, 0.95));
    border: 2px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 60px 48px;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 32px;
}

.certificate-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
}

.certificate-preview::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gradient-1);
}

.cert-ornament {
    position: absolute;
    font-size: 8rem;
    opacity: 0.03;
    color: var(--primary);
}

.cert-ornament.top-right { top: -20px; left: -20px; }
.cert-ornament.bottom-left { bottom: -20px; right: -20px; }

.cert-logo {
    font-size: 2.5rem;
    margin-bottom: 16px;
}

.cert-title {
    font-size: 1rem;
    color: var(--gray);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.cert-main-title {
    font-size: 1.8rem;
    color: var(--white);
    font-weight: 800;
    margin-bottom: 24px;
}

.cert-recipient-label {
    color: var(--gray);
    font-size: 0.9rem;
    margin-bottom: 8px;
}

.cert-recipient-name {
    font-size: 2.2rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 24px;
    padding: 8px 0;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
}

.cert-description {
    color: var(--gray-light);
    font-size: 0.95rem;
    max-width: 500px;
    margin: 0 auto 24px;
    line-height: 1.8;
}

.cert-details-row {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.cert-detail {
    text-align: center;
}

.cert-detail .detail-label {
    font-size: 0.75rem;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
}

.cert-detail .detail-value {
    font-size: 1rem;
    color: var(--white);
    font-weight: 700;
    display: block;
}

.cert-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.cert-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cert-form-group label {
    font-size: 0.85rem;
    color: var(--gray-light);
    font-weight: 600;
}

.cert-form-group input,
.cert-form-group select {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(15, 23, 42, 0.5);
    color: var(--white);
    font-family: inherit;
    font-size: 0.95rem;
}

.cert-form-group input:focus,
.cert-form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.cert-form-group select option {
    background: var(--dark-2);
}

/* ========================================
   Theme Toggle
   ======================================== */
.theme-toggle {
    position: fixed;
    bottom: 90px;
    left: 30px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.3);
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(10px);
    color: var(--accent);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary);
}

/* Light Theme */
body.light-theme {
    --dark: #f8fafc;
    --dark-2: #f1f5f9;
    --dark-3: #cbd5e1;
    --white: #0f172a;
    --light: #1e293b;
    --light-2: #334155;
    --gray: #64748b;
    --gray-light: #475569;
    background: #f8fafc;
    color: #1e293b;
}

body.light-theme .main-nav {
    background: rgba(248, 250, 252, 0.9);
    border-bottom-color: rgba(99, 102, 241, 0.15);
}

body.light-theme .hero-section {
    background: radial-gradient(ellipse at 50% 0%, rgba(99,102,241,0.08) 0%, transparent 60%),
                radial-gradient(ellipse at 80% 80%, rgba(6,182,212,0.06) 0%, transparent 50%),
                #f8fafc;
}

body.light-theme .philosophy-card,
body.light-theme .audience-card,
body.light-theme .unit-card,
body.light-theme .cert-card,
body.light-theme .tool-card,
body.light-theme .calculator-section,
body.light-theme .results-section,
body.light-theme .info-box,
body.light-theme .context-box,
body.light-theme .quiz-container,
body.light-theme .assessment-methods {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

body.light-theme .gradient-text {
    -webkit-text-fill-color: transparent;
}

/* Responsive */
@media (max-width: 768px) {
    .tool-page { padding-top: 80px; }
    .tool-page-header h1 { font-size: 1.6rem; }
    .score-buttons { gap: 3px; }
    .score-btn { width: 28px; height: 28px; font-size: 0.7rem; }
    .rating-scale { flex-direction: column; }
    .cert-preview { padding: 32px 20px; }
    .cert-main-title { font-size: 1.3rem; }
    .cert-recipient-name { font-size: 1.5rem; }
}

/* ========================================
   Progress Dashboard
   ======================================== */
.progress-dash-header {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
}

.progress-circle-large {
    position: relative;
    width: 140px;
    height: 140px;
}

.progress-circle-large svg {
    width: 100%;
    height: 100%;
    transform: rotate(0deg);
}

.progress-circle-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.prog-pct {
    display: block;
    font-size: 2rem;
    font-weight: 900;
    background: var(--gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.prog-label {
    font-size: 0.8rem;
    color: var(--gray);
}

.progress-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.prog-stat {
    text-align: center;
    padding: 16px;
    border-radius: var(--radius-md);
    background: rgba(15, 23, 42, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.prog-stat-num {
    display: block;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-light);
    margin-bottom: 4px;
}

.prog-stat-label {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Progress Action Buttons */
.prog-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(99, 102, 241, 0.2);
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-light, #818cf8);
    font-size: 0.82rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prog-action-btn:hover {
    background: rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.4);
    transform: translateY(-1px);
}

.prog-action-import {
    cursor: pointer;
}

.prog-action-reset {
    border-color: rgba(239, 68, 68, 0.2);
    background: rgba(239, 68, 68, 0.06);
    color: #f87171;
}

.prog-action-reset:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
}

body.light-theme .prog-stat {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(99, 102, 241, 0.08);
}

body.light-theme .prog-action-btn {
    background: rgba(99, 102, 241, 0.06);
    color: #6366f1;
}


/* === nav.css === */
/* ========================================
   Unified Sub-page Navigation — site-nav
   ======================================== */
.site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(99, 102, 241, 0.15);
    font-family: 'Tajawal', sans-serif;
}

.site-nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 60px;
    gap: 16px;
}

/* Brand */
.site-nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    transition: color 0.3s;
}

.site-nav-brand i {
    color: #6366f1;
    font-size: 1.1rem;
}

.site-nav-brand:hover {
    color: #6366f1;
}

/* Hamburger Toggle */
.site-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 6px;
    margin-right: auto;
    border-radius: 8px;
    transition: background 0.3s;
}

.site-nav-toggle:hover {
    background: rgba(99, 102, 241, 0.1);
}

.site-nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.site-nav-toggle.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.site-nav-toggle.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Menu Container — Desktop: horizontal */
.site-nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.site-nav-menu::-webkit-scrollbar {
    display: none;
}

/* Nav Groups */
.site-nav-group {
    display: flex;
    align-items: center;
    gap: 2px;
    position: relative;
    padding-left: 12px;
    margin-left: 8px;
}

.site-nav-group:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1px;
    height: 24px;
    background: rgba(99, 102, 241, 0.2);
}

.site-nav-group:first-child {
    padding-left: 0;
    margin-left: 0;
}

.site-nav-group:first-child::before {
    display: none;
}

.site-nav-group-label {
    display: none; /* Hidden on desktop, shown in mobile drawer */
}

/* Navigation Links */
.site-nav-link {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 8px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 500;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.site-nav-link:hover {
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.1);
}

.site-nav-link.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
    font-weight: 700;
}

.site-nav-link i {
    font-size: 0.78rem;
    width: 16px;
    text-align: center;
    flex-shrink: 0;
}

/* ===== Responsive — Tablet ===== */
@media (max-width: 1100px) {
    .site-nav-link span {
        display: none;
    }

    .site-nav-link {
        padding: 8px 10px;
        font-size: 0;
    }

    .site-nav-link i {
        font-size: 1rem;
    }

    .site-nav-link:hover::after,
    .site-nav-link.active::after {
        content: attr(data-tooltip);
    }
}

/* ===== Responsive — Mobile ===== */
@media (max-width: 768px) {
    .site-nav-inner {
        height: 56px;
    }

    .site-nav-toggle {
        display: flex;
    }

    .site-nav-menu {
        position: fixed;
        top: 56px;
        right: -300px;
        width: 280px;
        height: calc(100vh - 56px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 12px;
        gap: 8px;
        overflow-y: auto;
        transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 1px solid rgba(99, 102, 241, 0.15);
    }

    .site-nav-menu.open {
        right: 0;
    }

    /* Show group labels in mobile */
    .site-nav-group-label {
        display: flex;
        align-items: center;
        gap: 8px;
        color: #6366f1;
        font-size: 0.75rem;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.5px;
        padding: 8px 12px 4px;
    }

    .site-nav-group {
        flex-direction: column;
        align-items: stretch;
        padding-left: 0;
        margin-left: 0;
        gap: 2px;
    }

    .site-nav-group:not(:last-child)::before {
        display: none;
    }

    .site-nav-group:not(:last-child) {
        padding-bottom: 8px;
        border-bottom: 1px solid rgba(99, 102, 241, 0.08);
    }

    .site-nav-link {
        padding: 10px 16px;
        font-size: 0.9rem;
        border-radius: 10px;
    }

    .site-nav-link span {
        display: inline;
    }

    .site-nav-link i {
        font-size: 0.9rem;
        width: 20px;
    }
}

/* ===== Light Theme ===== */
body.light-theme .site-nav {
    background: rgba(248, 250, 252, 0.92);
    border-bottom-color: rgba(99, 102, 241, 0.12);
}

body.light-theme .site-nav-brand {
    color: #1e293b;
}

body.light-theme .site-nav-toggle span {
    background: #1e293b;
}

body.light-theme .site-nav-link {
    color: #64748b;
}

body.light-theme .site-nav-link:hover {
    color: #1e293b;
    background: rgba(99, 102, 241, 0.08);
}

body.light-theme .site-nav-link.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.1);
}

@media (max-width: 768px) {
    body.light-theme .site-nav-menu {
        background: rgba(248, 250, 252, 0.98);
        border-left-color: rgba(99, 102, 241, 0.12);
    }
}

/* ===== Ensure body padding for fixed nav ===== */
body:has(.site-nav) .tool-page,
body:has(.site-nav) .unit-page {
    padding-top: 80px;
}

/* Fallback for browsers that don't support :has() */
.has-site-nav .tool-page,
.has-site-nav .unit-page {
    padding-top: 80px;
}

/* === a11y-print.css === */
/* ========================================
   Print Styles — All Pages
   ======================================== */
@media print {
    /* Hide non-essential elements */
    .main-nav,
    .nav-container,
    .back-to-top,
    .theme-toggle,
    .splash-screen,
    .hero-particles,
    .hero-scroll,
    .hero-cta,
    .nav-progress,
    .nav-toggle,
    .sidebar-units,
    .unit-actions .unit-detail-link,
    .fc-progress-dots,
    .flashcard-controls,
    .fc-stats,
    .quiz-footer,
    .quiz-progress-strip,
    .quiz-timer,
    .case-tabs,
    .mm-controls,
    .glossary-alpha,
    .glossary-search,
    .btn,
    button,
    .tool-filter,
    .bg-circle,
    footer,
    .main-footer {
        display: none !important;
    }

    /* Reset backgrounds */
    body,
    .tool-page,
    .unit-page,
    .section,
    .content-block,
    .unit-hero,
    .hero-section {
        background: white !important;
        color: #1a1a1a !important;
    }

    /* Ensure text is readable */
    * {
        color: #1a1a1a !important;
        text-shadow: none !important;
        box-shadow: none !important;
    }

    h1, h2, h3, h4, h5 {
        color: #0f172a !important;
        page-break-after: avoid;
    }

    /* Gradient text fix */
    .gradient-text {
        -webkit-text-fill-color: #6366f1 !important;
        background: none !important;
    }

    /* Print-friendly cards */
    .philosophy-card,
    .audience-card,
    .unit-card,
    .tool-card,
    .cert-card,
    .quiz-container,
    .info-box,
    .content-block,
    .rich-lesson,
    .glossary-item,
    .case-card,
    .flashcard-face,
    .rich-stat-card,
    .rich-keypoint,
    .rich-role-card,
    .rich-metric-card,
    .concept-card {
        background: #f8f8f8 !important;
        border: 1px solid #ddd !important;
        break-inside: avoid;
        page-break-inside: avoid;
    }

    /* Unit cards: show details */
    .unit-detail {
        display: block !important;
        max-height: none !important;
        opacity: 1 !important;
    }

    /* Rich lessons: expand all */
    .rich-lesson-body {
        display: block !important;
        max-height: none !important;
        overflow: visible !important;
        padding: 16px !important;
    }

    .rich-lesson-arrow {
        display: none !important;
    }

    /* Layout fixes */
    .container {
        max-width: 100% !important;
        padding: 0 !important;
    }

    .unit-layout {
        display: block !important;
    }

    .unit-sidebar {
        display: none !important;
    }

    .unit-main-content {
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Page breaks */
    .content-block {
        page-break-inside: avoid;
    }

    /* Links: show URL */
    a[href^="http"]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: #666 !important;
    }

    /* Certificate: special print */
    .cert-preview {
        border: 2px solid #6366f1 !important;
        break-inside: avoid;
    }

    /* Charts: ensure they print */
    canvas {
        max-width: 100% !important;
    }

    /* Page margins */
    @page {
        margin: 1.5cm;
    }
}

/* ========================================
   Accessibility Enhancements
   ======================================== */

/* Skip Navigation */
.skip-nav {
    position: absolute;
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: #6366f1;
    color: white;
    padding: 12px 24px;
    border-radius: 0 0 8px 8px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    z-index: 10001;
    transition: top 0.3s ease;
}

.skip-nav:focus {
    top: 0;
    outline: 3px solid #06b6d4;
    outline-offset: 2px;
}

/* Focus Visible — Global */
*:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.6);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Focus styles for specific elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid rgba(99, 102, 241, 0.6);
    outline-offset: 3px;
}

/* Remove default outline only when not keyboard navigating */
*:focus:not(:focus-visible) {
    outline: none;
}

/* High contrast mode support */
@media (forced-colors: active) {
    .btn-primary,
    .btn-outline {
        border: 2px solid currentColor;
    }
    
    .progress-fill,
    .quiz-progress-fill {
        forced-color-adjust: none;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .splash-screen {
        display: none !important;
    }

    .hero-particles {
        display: none !important;
    }
}

/* Screen reader only */
.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;
}

/* Improve interactive element sizes for touch */
@media (pointer: coarse) {
    .nav-links a,
    .tool-filter,
    .case-tab,
    .fc-filter-btn,
    .glossary-alpha button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}

/* === notes.css === */
/* ========================================
   Notes & Bookmarks Panel
   ======================================== */

/* FAB Button */
.notes-fab {
    position: fixed;
    bottom: 30px;
    left: 90px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid rgba(99, 102, 241, 0.3);
    background: rgba(30, 41, 59, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #f59e0b;
    font-size: 1.1rem;
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-family: 'Tajawal', sans-serif;
}

.notes-fab:hover {
    transform: scale(1.1);
    border-color: #f59e0b;
}

.notes-fab.active {
    background: #6366f1;
    border-color: #6366f1;
    color: white;
}

/* Panel */
.notes-panel {
    position: fixed;
    bottom: 90px;
    left: 30px;
    width: 380px;
    max-height: 70vh;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    z-index: 998;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Tajawal', sans-serif;
}

.notes-panel.open {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
}

/* Header */
.notes-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(99, 102, 241, 0.12);
}

.notes-tabs {
    display: flex;
    gap: 4px;
}

.notes-tab {
    padding: 6px 14px;
    border: none;
    background: transparent;
    color: #94a3b8;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.notes-tab:hover {
    color: #e2e8f0;
    background: rgba(99, 102, 241, 0.08);
}

.notes-tab.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.12);
    font-weight: 700;
}

.notes-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.notes-close:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Body */
.notes-panel-body {
    flex: 1;
    overflow-y: auto;
    padding: 12px;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
}

.notes-panel-body::-webkit-scrollbar {
    width: 4px;
}

.notes-panel-body::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 4px;
}

/* Empty State */
.notes-empty {
    text-align: center;
    padding: 40px 20px;
    color: #64748b;
}

.notes-empty i {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.4;
}

.notes-empty h4 {
    color: #94a3b8;
    font-size: 1rem;
    margin-bottom: 6px;
}

.notes-empty p {
    font-size: 0.85rem;
}

/* Note Card */
.note-card {
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    margin-bottom: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.note-card:hover {
    border-color: rgba(99, 102, 241, 0.25);
}

.note-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: rgba(99, 102, 241, 0.05);
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.note-unit-link {
    color: #6366f1;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
}

.note-unit-link:hover {
    color: #818cf8;
}

.note-delete {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: all 0.2s;
}

.note-delete:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

.note-card-body {
    padding: 10px 12px;
    cursor: pointer;
    min-height: 36px;
}

.note-card-body p {
    color: #cbd5e1;
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 0;
}

.note-card-meta {
    padding: 4px 12px 8px;
}

.note-card-meta small {
    color: #475569;
    font-size: 0.72rem;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Note Editor */
.note-editor {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.note-editor-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.note-back {
    padding: 6px 10px;
    border: none;
    background: rgba(99, 102, 241, 0.1);
    color: #6366f1;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.8rem;
    font-family: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: background 0.2s;
}

.note-back:hover {
    background: rgba(99, 102, 241, 0.2);
}

.note-editor-title {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 500;
}

.note-editor textarea {
    width: 100%;
    height: 200px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 10px;
    background: rgba(30, 41, 59, 0.4);
    color: #e2e8f0;
    padding: 12px;
    font-size: 0.9rem;
    font-family: 'Tajawal', sans-serif;
    line-height: 1.7;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s;
}

.note-editor textarea:focus {
    border-color: #6366f1;
}

.note-editor textarea::placeholder {
    color: #475569;
}

/* Editor Footer */
.note-editor-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.note-save-btn {
    padding: 8px 20px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 8px;
    font-family: inherit;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.note-save-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.note-save-status {
    color: #10b981;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Bookmark Card */
.bookmark-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(30, 41, 59, 0.5);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 12px;
    margin-bottom: 8px;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

.bookmark-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(30, 41, 59, 0.7);
}

.bookmark-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.15));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f59e0b;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.bookmark-info {
    flex: 1;
    min-width: 0;
}

.bookmark-info strong {
    display: block;
    color: #e2e8f0;
    font-size: 0.82rem;
    font-weight: 700;
}

.bookmark-info span {
    display: block;
    color: #64748b;
    font-size: 0.75rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.bookmark-remove {
    width: 28px;
    height: 28px;
    border: none;
    background: transparent;
    color: #475569;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    flex-shrink: 0;
    transition: all 0.2s;
}

.bookmark-remove:hover {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
}

/* Footer — Add bar */
.notes-panel-footer {
    padding: 10px 12px;
    border-top: 1px solid rgba(99, 102, 241, 0.12);
}

.notes-add-bar {
    display: flex;
    gap: 8px;
    align-items: center;
}

.notes-add-bar select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 8px;
    background: rgba(30, 41, 59, 0.6);
    color: #e2e8f0;
    font-size: 0.8rem;
    font-family: 'Tajawal', sans-serif;
    outline: none;
    cursor: pointer;
}

.notes-add-bar select:focus {
    border-color: #6366f1;
}

.notes-add-btn {
    width: 36px;
    height: 36px;
    border: none;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: white;
    cursor: pointer;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: transform 0.2s;
}

.notes-add-btn:hover {
    transform: scale(1.08);
}

/* ===== Responsive ===== */
@media (max-width: 480px) {
    .notes-panel {
        left: 10px;
        right: 10px;
        width: auto;
        bottom: 80px;
        max-height: 65vh;
    }

    .notes-fab {
        left: 80px;
        bottom: 24px;
    }
}

/* ===== Light Theme ===== */
body.light-theme .notes-fab {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.2);
    color: #f59e0b;
}

body.light-theme .notes-panel {
    background: rgba(255, 255, 255, 0.97);
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

body.light-theme .notes-panel-header {
    border-bottom-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .notes-tab {
    color: #64748b;
}

body.light-theme .notes-tab.active {
    color: #6366f1;
    background: rgba(99, 102, 241, 0.08);
}

body.light-theme .note-card {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(99, 102, 241, 0.08);
}

body.light-theme .note-card-header {
    background: rgba(99, 102, 241, 0.03);
}

body.light-theme .note-card-body p {
    color: #334155;
}

body.light-theme .note-editor textarea {
    background: rgba(241, 245, 249, 0.8);
    color: #1e293b;
    border-color: rgba(99, 102, 241, 0.12);
}

body.light-theme .bookmark-card {
    background: rgba(241, 245, 249, 0.8);
    border-color: rgba(99, 102, 241, 0.08);
}

body.light-theme .bookmark-info strong {
    color: #1e293b;
}

body.light-theme .notes-add-bar select {
    background: rgba(241, 245, 249, 0.8);
    color: #1e293b;
    border-color: rgba(99, 102, 241, 0.12);
}

body.light-theme .notes-panel-footer {
    border-top-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .notes-empty {
    color: #94a3b8;
}

body.light-theme .notes-empty h4 {
    color: #64748b;
}

/* Print: hide panel */
@media print {
    .notes-fab,
    .notes-panel {
        display: none !important;
    }
}

/* === celebrations.css === */
/* ========================================
   Moments of Truth — Celebration System
   Toast notifications + milestone celebrations
   ======================================== */

/* --- Toast Container --- */
.cx-toast-container {
    position: fixed;
    top: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    pointer-events: none;
    width: 90%;
    max-width: 480px;
}

/* --- Single Toast --- */
.cx-toast {
    pointer-events: auto;
    width: 100%;
    padding: 18px 22px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 14px;
    font-family: 'Tajawal', sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #fff;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.08);
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
    animation: cxToastIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    cursor: pointer;
    transition: transform 0.2s ease;
    direction: rtl;
}
.cx-toast:hover {
    transform: translateY(-2px) scale(1.01);
}
.cx-toast.toast-exit {
    animation: cxToastOut 0.4s cubic-bezier(0.55, 0, 1, 0.45) forwards;
}

/* Toast icon */
.cx-toast-icon {
    font-size: 1.8rem;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
}

/* Toast content */
.cx-toast-body {
    flex: 1;
    min-width: 0;
}
.cx-toast-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 2px;
}
.cx-toast-msg {
    font-size: 0.85rem;
    opacity: 0.85;
    line-height: 1.4;
}

/* Toast close */
.cx-toast-close {
    position: absolute;
    top: 8px;
    left: 8px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    border-radius: 50%;
    font-size: 0.7rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}
.cx-toast-close:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* --- Toast Variants --- */

/* Achievement / milestone */
.cx-toast-achievement {
    background: linear-gradient(135deg, rgba(99,102,241,0.92), rgba(6,182,212,0.92));
    border: 1px solid rgba(255,255,255,0.15);
}

/* Streak */
.cx-toast-streak {
    background: linear-gradient(135deg, rgba(245,158,11,0.92), rgba(239,68,68,0.92));
    border: 1px solid rgba(255,255,255,0.15);
}

/* Quiz success */
.cx-toast-quiz {
    background: linear-gradient(135deg, rgba(16,185,129,0.92), rgba(6,182,212,0.92));
    border: 1px solid rgba(255,255,255,0.15);
}

/* Level up / phase */
.cx-toast-levelup {
    background: linear-gradient(135deg, rgba(168,85,247,0.92), rgba(236,72,153,0.92));
    border: 1px solid rgba(255,255,255,0.15);
}

/* Welcome back */
.cx-toast-welcome {
    background: linear-gradient(135deg, rgba(30,41,59,0.95), rgba(51,65,85,0.95));
    border: 1px solid rgba(99,102,241,0.3);
}

/* Tool completion */
.cx-toast-tool {
    background: linear-gradient(135deg, rgba(6,182,212,0.92), rgba(99,102,241,0.92));
    border: 1px solid rgba(255,255,255,0.15);
}

/* --- Confetti Canvas (for big milestones) --- */
.cx-confetti-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 99999;
    pointer-events: none;
}

/* --- Progress bar on toast (for streak) --- */
.cx-toast-progress {
    height: 3px;
    border-radius: 3px;
    background: rgba(255,255,255,0.15);
    margin-top: 8px;
    overflow: hidden;
}
.cx-toast-progress-fill {
    height: 100%;
    border-radius: 3px;
    background: rgba(255,255,255,0.6);
    transition: width 0.3s;
}

/* --- Animations --- */
@keyframes cxToastIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes cxToastOut {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(-20px) scale(0.9);
    }
}

@keyframes cxPulseGlow {
    0%, 100% { box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(255,255,255,0.08); }
    50% { box-shadow: 0 12px 40px rgba(0,0,0,0.3), 0 0 20px rgba(99,102,241,0.3), 0 0 0 1px rgba(255,255,255,0.15); }
}

.cx-toast-levelup {
    animation: cxToastIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards,
              cxPulseGlow 2s ease-in-out infinite 0.5s;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .cx-toast-container {
        top: 12px;
        width: 95%;
    }
    .cx-toast {
        padding: 14px 16px;
        gap: 10px;
        border-radius: 12px;
    }
    .cx-toast-icon {
        font-size: 1.4rem;
        width: 40px;
        height: 40px;
    }
    .cx-toast-title {
        font-size: 0.9rem;
    }
    .cx-toast-msg {
        font-size: 0.8rem;
    }
}

/* --- Light Theme --- */
body.light-theme .cx-toast-welcome {
    background: linear-gradient(135deg, rgba(241,245,249,0.97), rgba(226,232,240,0.97));
    color: #1e293b;
    border: 1px solid rgba(99,102,241,0.2);
    box-shadow: 0 12px 40px rgba(0,0,0,0.1), 0 0 0 1px rgba(0,0,0,0.05);
}
body.light-theme .cx-toast-welcome .cx-toast-msg {
    color: #475569;
}
body.light-theme .cx-toast-close {
    background: rgba(0,0,0,0.06);
    color: rgba(0,0,0,0.4);
}
body.light-theme .cx-toast-close:hover {
    background: rgba(0,0,0,0.1);
    color: rgba(0,0,0,0.7);
}

/* --- Print: hide everything --- */
@media print {
    .cx-toast-container,
    .cx-confetti-canvas {
        display: none !important;
    }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .cx-toast {
        animation-duration: 0.01ms !important;
    }
    .cx-toast-levelup {
        animation: cxToastIn 0.01ms forwards !important;
    }
}

/* === next-action.css === */
/* ========================================
   Next Action Widget + Visual Learning Path
   ======================================== */

/* --- Next Action Floating Widget --- */
.cx-next-action {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9990;
    direction: rtl;
    font-family: 'Tajawal', sans-serif;
}

/* Toggle button */
.cx-na-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(99,102,241,0.4);
    background: linear-gradient(135deg, rgba(99,102,241,0.9), rgba(6,182,212,0.9));
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}
.cx-na-toggle:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(99,102,241,0.5);
}
.cx-na-toggle.active {
    background: rgba(30,41,59,0.95);
    border-color: rgba(99,102,241,0.5);
}

/* Pulse dot on toggle */
.cx-na-toggle .cx-na-dot {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #ef4444;
    border: 2px solid rgba(30,41,59,0.9);
    animation: cxNaDotPulse 2s infinite;
}
@keyframes cxNaDotPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

/* Panel */
.cx-na-panel {
    position: absolute;
    bottom: 68px;
    right: 0;
    width: 360px;
    max-height: 520px;
    overflow-y: auto;
    border-radius: 20px;
    background: rgba(15,23,42,0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99,102,241,0.2);
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.cx-na-panel.open {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Panel header */
.cx-na-header {
    padding: 18px 20px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.cx-na-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.cx-na-header h3 i {
    color: var(--primary-light, #818cf8);
}
.cx-na-streak {
    font-size: 0.8rem;
    padding: 4px 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(245,158,11,0.2), rgba(239,68,68,0.2));
    color: #f59e0b;
    font-weight: 600;
}

/* Next action card */
.cx-na-card {
    margin: 14px 16px;
    padding: 16px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(99,102,241,0.12), rgba(6,182,212,0.08));
    border: 1px solid rgba(99,102,241,0.2);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: block;
    color: inherit;
}
.cx-na-card:hover {
    border-color: rgba(99,102,241,0.4);
    background: linear-gradient(135deg, rgba(99,102,241,0.18), rgba(6,182,212,0.12));
    transform: translateX(-3px);
}
.cx-na-card-label {
    font-size: 0.75rem;
    color: var(--primary-light, #818cf8);
    font-weight: 600;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.cx-na-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 4px;
}
.cx-na-card-desc {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
    line-height: 1.4;
}
.cx-na-card-arrow {
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--primary-light, #818cf8);
    font-weight: 600;
}
.cx-na-card-arrow i {
    margin-right: 4px;
    transition: margin-right 0.2s;
}
.cx-na-card:hover .cx-na-card-arrow i {
    margin-right: 8px;
}

/* Quick stats */
.cx-na-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    padding: 0 16px 14px;
}
.cx-na-stat {
    text-align: center;
    padding: 10px 4px;
    border-radius: 10px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.05);
}
.cx-na-stat-num {
    font-size: 1.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.cx-na-stat-label {
    font-size: 0.65rem;
    color: rgba(255,255,255,0.45);
    margin-top: 2px;
}

/* --- Visual Learning Path (inside panel) --- */
.cx-na-path {
    padding: 0 16px 16px;
}
.cx-na-path-title {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    margin-bottom: 10px;
    font-weight: 600;
}
.cx-na-path-track {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: center;
}
.cx-na-path-node {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    text-decoration: none;
    color: inherit;
}
.cx-na-path-node:hover {
    transform: scale(1.25);
    z-index: 2;
}

/* Node states */
.cx-na-path-node.completed {
    background: linear-gradient(135deg, #10b981, #06b6d4);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16,185,129,0.3);
}
.cx-na-path-node.current {
    background: linear-gradient(135deg, #6366f1, #818cf8);
    color: #fff;
    box-shadow: 0 2px 12px rgba(99,102,241,0.4);
    animation: cxPathNodePulse 2s infinite;
}
.cx-na-path-node.locked {
    background: rgba(255,255,255,0.06);
    color: rgba(255,255,255,0.25);
    border: 1px solid rgba(255,255,255,0.08);
}
.cx-na-path-node.has-quiz {
    border: 2px solid rgba(245,158,11,0.5);
}
@keyframes cxPathNodePulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(99,102,241,0.4); }
    50% { box-shadow: 0 2px 20px rgba(99,102,241,0.6); }
}

/* Connector line */
.cx-na-path-line {
    width: 8px;
    height: 2px;
    border-radius: 1px;
    flex-shrink: 0;
}
.cx-na-path-line.done {
    background: linear-gradient(90deg, #10b981, #06b6d4);
}
.cx-na-path-line.pending {
    background: rgba(255,255,255,0.08);
}

/* Trophy at end */
.cx-na-path-trophy {
    font-size: 1.1rem;
    margin-right: 4px;
}

/* Tooltip for path nodes */
.cx-na-path-node[data-tooltip]:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 110%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(0,0,0,0.9);
    color: #fff;
    font-size: 0.65rem;
    white-space: nowrap;
    pointer-events: none;
    z-index: 10;
}

/* Suggested tools section */
.cx-na-tools {
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 4px;
    padding-top: 12px;
}
.cx-na-tools-title {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.45);
    margin-bottom: 8px;
    font-weight: 600;
}
.cx-na-tool-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: 0.82rem;
    transition: all 0.2s;
    margin-bottom: 4px;
}
.cx-na-tool-link:hover {
    background: rgba(255,255,255,0.05);
    color: #fff;
}
.cx-na-tool-link i {
    color: var(--primary-light, #818cf8);
    width: 16px;
    text-align: center;
}
.cx-na-tool-link .done-check {
    color: #10b981;
    margin-right: auto;
    font-size: 0.7rem;
}

/* --- Responsive --- */
@media (max-width: 600px) {
    .cx-na-panel {
        width: calc(100vw - 32px);
        right: -8px;
        max-height: 70vh;
    }
    .cx-na-toggle {
        width: 50px;
        height: 50px;
        font-size: 1.1rem;
    }
    .cx-next-action {
        bottom: 16px;
        right: 16px;
    }
}

/* --- Light Theme --- */
body.light-theme .cx-na-panel {
    background: rgba(248,250,252,0.97);
    border-color: rgba(99,102,241,0.15);
    box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}
body.light-theme .cx-na-header h3 {
    color: #1e293b;
}
body.light-theme .cx-na-card {
    background: linear-gradient(135deg, rgba(99,102,241,0.06), rgba(6,182,212,0.04));
    border-color: rgba(99,102,241,0.12);
}
body.light-theme .cx-na-card:hover {
    background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(6,182,212,0.06));
}
body.light-theme .cx-na-card-title {
    color: #1e293b;
}
body.light-theme .cx-na-card-desc {
    color: #64748b;
}
body.light-theme .cx-na-stat {
    background: rgba(0,0,0,0.02);
    border-color: rgba(0,0,0,0.05);
}
body.light-theme .cx-na-stat-label {
    color: #94a3b8;
}
body.light-theme .cx-na-path-node.locked {
    background: rgba(0,0,0,0.04);
    color: rgba(0,0,0,0.25);
    border-color: rgba(0,0,0,0.08);
}
body.light-theme .cx-na-tool-link {
    color: #475569;
}
body.light-theme .cx-na-tool-link:hover {
    background: rgba(0,0,0,0.03);
    color: #1e293b;
}
body.light-theme .cx-na-toggle.active {
    background: rgba(248,250,252,0.95);
    border-color: rgba(99,102,241,0.4);
    color: #6366f1;
}

/* --- Print: hide --- */
@media print {
    .cx-next-action { display: none !important; }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .cx-na-toggle, .cx-na-panel, .cx-na-card, .cx-na-path-node {
        transition-duration: 0.01ms !important;
    }
    @keyframes cxNaDotPulse { 0%, 100% { transform: scale(1); } }
    @keyframes cxPathNodePulse { 0%, 100% { box-shadow: 0 2px 12px rgba(99,102,241,0.4); } }
}

/* === search.css === */
/* ========================================
   Global Search — Ctrl+K Spotlight
   ======================================== */

/* Overlay */
.cx-search-overlay {
    position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    display: flex; align-items: flex-start; justify-content: center;
    padding-top: 12vh;
    opacity: 0; pointer-events: none;
    transition: opacity 0.2s ease;
    font-family: 'Tajawal', sans-serif; direction: rtl;
}
.cx-search-overlay.open {
    opacity: 1; pointer-events: auto;
}

/* Modal */
.cx-search-modal {
    width: 92%; max-width: 620px;
    background: rgba(15,23,42,0.98);
    border: 1px solid rgba(99,102,241,0.25);
    border-radius: 20px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
    overflow: hidden;
    transform: translateY(-20px) scale(0.96);
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
.cx-search-overlay.open .cx-search-modal {
    transform: translateY(0) scale(1);
}

/* Header / Input */
.cx-search-header {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cx-search-icon {
    color: var(--primary-light, #818cf8); font-size: 1.1rem; flex-shrink: 0;
}
.cx-search-input {
    flex: 1; background: none; border: none; outline: none;
    font-size: 1.05rem; font-family: 'Tajawal', sans-serif;
    color: #fff; caret-color: #6366f1;
}
.cx-search-input::placeholder { color: rgba(255,255,255,0.3); }
.cx-search-kbd {
    padding: 3px 8px; border-radius: 6px;
    background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.4); font-size: 0.68rem;
    font-family: 'Tajawal', monospace; flex-shrink: 0;
}

/* Results */
.cx-search-results {
    max-height: 400px; overflow-y: auto;
    padding: 8px;
}
.cx-search-results::-webkit-scrollbar { width: 4px; }
.cx-search-results::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

/* Empty state */
.cx-search-empty {
    text-align: center; padding: 32px 16px;
}
.cx-search-empty-icon {
    font-size: 2rem; margin-bottom: 12px; color: rgba(255,255,255,0.15);
}
.cx-search-empty-text {
    font-size: 0.9rem; color: rgba(255,255,255,0.4); margin-bottom: 12px;
}
.cx-search-empty-hint {
    font-size: 0.78rem; color: rgba(255,255,255,0.25);
}
.cx-search-shortcuts {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    margin-top: 4px;
}
.cx-search-shortcuts span {
    font-size: 0.72rem; color: rgba(255,255,255,0.3);
    display: flex; align-items: center; gap: 4px;
}
.cx-search-shortcuts kbd {
    padding: 2px 6px; border-radius: 4px;
    background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.08);
    font-size: 0.65rem; font-family: monospace;
}

/* Result item */
.cx-search-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px; border-radius: 12px;
    text-decoration: none; color: inherit;
    transition: all 0.15s; cursor: pointer;
    margin-bottom: 2px;
}
.cx-search-item:hover, .cx-search-item.active {
    background: rgba(99,102,241,0.1);
}
.cx-search-item-icon {
    width: 38px; height: 38px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem; background: rgba(255,255,255,0.04); flex-shrink: 0;
}
.cx-search-item-text { flex: 1; min-width: 0; }
.cx-search-item-title {
    font-size: 0.88rem; font-weight: 600; color: var(--white, #fff);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cx-search-item-title mark {
    background: rgba(99,102,241,0.3); color: #fff; border-radius: 2px; padding: 0 2px;
}
.cx-search-item-desc {
    font-size: 0.72rem; color: var(--gray, #94a3b8);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    margin-top: 1px;
}
.cx-search-item-type {
    font-size: 0.62rem; font-weight: 700;
    padding: 3px 8px; border-radius: 6px;
    white-space: nowrap; flex-shrink: 0;
}

/* Footer */
.cx-search-footer {
    display: flex; align-items: center; justify-content: space-between;
    padding: 10px 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 0.68rem; color: rgba(255,255,255,0.25);
}
.cx-search-footer i { margin-left: 4px; }

/* Floating trigger button */
.cx-search-trigger {
    position: fixed; bottom: 90px; left: 20px; z-index: 9998;
    width: 44px; height: 44px; border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff; border: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    box-shadow: 0 4px 20px rgba(99,102,241,0.35);
    transition: all 0.25s;
}
.cx-search-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 28px rgba(99,102,241,0.5);
}

/* --- Light Theme --- */
body.light-theme .cx-search-modal {
    background: rgba(248,250,252,0.98); border-color: rgba(99,102,241,0.15);
}
body.light-theme .cx-search-header { border-bottom-color: rgba(0,0,0,0.06); }
body.light-theme .cx-search-input { color: #1e293b; }
body.light-theme .cx-search-input::placeholder { color: rgba(0,0,0,0.3); }
body.light-theme .cx-search-kbd { background: rgba(0,0,0,0.04); border-color: rgba(0,0,0,0.08); color: #94a3b8; }
body.light-theme .cx-search-item:hover, body.light-theme .cx-search-item.active { background: rgba(99,102,241,0.06); }
body.light-theme .cx-search-item-icon { background: rgba(0,0,0,0.03); }
body.light-theme .cx-search-item-title { color: #1e293b; }
body.light-theme .cx-search-item-title mark { background: rgba(99,102,241,0.15); color: #1e293b; }
body.light-theme .cx-search-empty-icon { color: rgba(0,0,0,0.1); }
body.light-theme .cx-search-empty-text { color: rgba(0,0,0,0.35); }
body.light-theme .cx-search-footer { border-top-color: rgba(0,0,0,0.06); color: rgba(0,0,0,0.25); }
body.light-theme .cx-search-results::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.08); }

/* --- Responsive --- */
@media (max-width: 600px) {
    .cx-search-overlay { padding-top: 5vh; }
    .cx-search-modal { width: 96%; border-radius: 16px; }
    .cx-search-header { padding: 14px 16px; }
    .cx-search-input { font-size: 0.95rem; }
    .cx-search-results { max-height: 55vh; padding: 6px; }
    .cx-search-item { padding: 10px 10px; gap: 10px; }
    .cx-search-trigger { bottom: 80px; left: 14px; width: 40px; height: 40px; font-size: 0.9rem; }
}

/* --- Print: hide --- */
@media print {
    .cx-search-overlay, .cx-search-trigger { display: none !important; }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
    .cx-search-modal { transition-duration: 0.01ms !important; }
    .cx-search-overlay { transition-duration: 0.01ms !important; }
}

/* === mobile.css === */
/* ========================================
   Mobile Experience Enhancements
   Bottom Nav, Focus Mode, Swipe, Tables
   ======================================== */

/* =========================================
   1. BOTTOM NAVIGATION BAR (Mobile Only)
   ========================================= */
.mobile-bottom-nav {
    display: none; /* Hidden on desktop */
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(99, 102, 241, 0.15);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0);
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-bottom-nav.hidden {
    transform: translateY(100%);
}

.mobile-bottom-nav-inner {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    max-width: 480px;
    margin: 0 auto;
    height: 60px;
}

.mobile-bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    text-decoration: none;
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 500;
    gap: 3px;
    position: relative;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 6px 2px;
}

.mobile-bottom-nav-item i {
    font-size: 1.15rem;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mobile-bottom-nav-item span {
    transition: all 0.2s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 64px;
    text-align: center;
}

.mobile-bottom-nav-item.active {
    color: #6366f1;
}

.mobile-bottom-nav-item.active i {
    transform: scale(1.15) translateY(-2px);
    color: #818cf8;
}

.mobile-bottom-nav-item.active span {
    font-weight: 700;
    color: #6366f1;
}

/* Active indicator dot */
.mobile-bottom-nav-item.active::before {
    content: '';
    position: absolute;
    top: 2px;
    width: 20px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
}

/* Ripple effect on tap */
.mobile-bottom-nav-item::after {
    content: '';
    position: absolute;
    inset: 4px 8px;
    border-radius: 12px;
    background: rgba(99, 102, 241, 0);
    transition: background 0.3s;
}

.mobile-bottom-nav-item:active::after {
    background: rgba(99, 102, 241, 0.1);
}

/* More menu button */
.mobile-bottom-nav-more {
    position: relative;
}

/* More menu popup */
.mobile-more-menu {
    position: absolute;
    bottom: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%) scale(0.9);
    width: 200px;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 16px;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.3);
    opacity: 0;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 10001;
    padding: 8px;
    overflow: hidden;
}

.mobile-more-menu.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) scale(1);
}

.mobile-more-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.15s;
}

.mobile-more-menu-item:hover,
.mobile-more-menu-item:active {
    background: rgba(99, 102, 241, 0.1);
    color: #e2e8f0;
}

.mobile-more-menu-item i {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: #818cf8;
}

.mobile-more-menu-item.active {
    color: #6366f1;
    font-weight: 700;
}

/* =========================================
   2. RESPONSIVE TABLES
   ========================================= */
.mobile-table-wrapper {
    position: relative;
    margin: 16px 0;
}

.mobile-table-wrapper table {
    min-width: 100%;
}

.mobile-table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) transparent;
    border-radius: 12px;
}

.mobile-table-scroll::-webkit-scrollbar {
    height: 4px;
}

.mobile-table-scroll::-webkit-scrollbar-thumb {
    background: rgba(99, 102, 241, 0.3);
    border-radius: 2px;
}

/* Scroll indicator */
.mobile-table-hint {
    display: none;
    text-align: center;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.35);
    padding: 4px 0;
    gap: 6px;
    align-items: center;
    justify-content: center;
}

.mobile-table-hint i {
    animation: mobileTableSwipe 1.5s ease-in-out infinite;
}

@keyframes mobileTableSwipe {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-8px); }
}


/* =========================================
   3. FOCUS MODE
   ========================================= */
.focus-mode-btn {
    display: none; /* Only shown on mobile */
    position: fixed;
    top: 70px;
    left: 12px;
    z-index: 9997;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1.5px solid rgba(99, 102, 241, 0.3);
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #818cf8;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    align-items: center;
    justify-content: center;
}

.focus-mode-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: #6366f1;
}

.focus-mode-btn.active {
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    border-color: transparent;
    color: #fff;
}

/* Focus mode active - hide floating elements */
body.focus-mode .cx-next-action,
body.focus-mode .notes-fab,
body.focus-mode .notes-panel,
body.focus-mode .cx-search-trigger,
body.focus-mode .cx-toast-container,
body.focus-mode .mobile-bottom-nav {
    display: none !important;
}

body.focus-mode .focus-mode-btn {
    bottom: 16px;
    top: auto;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.4);
}

/* Focus mode banner */
.focus-mode-banner {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10002;
    background: linear-gradient(135deg, #6366f1, #06b6d4);
    color: #fff;
    text-align: center;
    padding: 6px 16px;
    font-size: 0.75rem;
    font-weight: 600;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
}

body.focus-mode .focus-mode-banner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

body.focus-mode .site-nav {
    top: 28px;
}


/* =========================================
   4. SWIPE NAVIGATION (unit.html)
   ========================================= */
.swipe-nav-indicator {
    display: none; /* Only on mobile */
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9990;
    width: 32px;
    height: 64px;
    border-radius: 0 12px 12px 0;
    background: rgba(99, 102, 241, 0.15);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #818cf8;
    font-size: 0.85rem;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.swipe-nav-indicator.left {
    left: 0;
    border-radius: 0 12px 12px 0;
}

.swipe-nav-indicator.right {
    right: 0;
    border-radius: 12px 0 0 12px;
}

.swipe-nav-indicator.visible {
    opacity: 1;
}

/* Swipe progress bar */
.swipe-progress {
    display: none;
    position: fixed;
    bottom: 68px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 2px;
    z-index: 9995;
    overflow: hidden;
}

.swipe-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #6366f1, #06b6d4);
    border-radius: 2px;
    transition: width 0.3s ease;
}

/* Unit swipe hint toast */
.swipe-hint {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    z-index: 10001;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 12px;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #94a3b8;
    font-size: 0.78rem;
    font-family: 'Tajawal', sans-serif;
    direction: rtl;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.swipe-hint.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.swipe-hint i {
    color: #818cf8;
    font-size: 1rem;
}


/* =========================================
   5. FLOATING BUTTONS REPOSITIONING
   ========================================= */

/* =========================================
   MOBILE ONLY RULES
   ========================================= */
@media (max-width: 768px) {
    /* Show bottom nav */
    .mobile-bottom-nav {
        display: block;
    }

    /* Show focus mode button */
    .focus-mode-btn {
        display: flex;
    }

    /* Show swipe elements on unit page */
    .swipe-nav-indicator {
        display: flex;
    }
    .swipe-progress {
        display: block;
    }

    /* Show table hint */
    .mobile-table-hint {
        display: flex;
    }

    /* ---- Reposition floating buttons above bottom nav ---- */
    /* Next Action widget */
    .cx-next-action {
        bottom: 74px !important;
        right: 12px !important;
    }
    .cx-na-toggle {
        width: 48px !important;
        height: 48px !important;
        font-size: 1rem !important;
    }
    .cx-na-panel {
        bottom: 60px !important;
        max-height: 60vh !important;
    }

    /* Search trigger */
    .cx-search-trigger {
        bottom: 140px !important;
        left: 12px !important;
        width: 38px !important;
        height: 38px !important;
        font-size: 0.85rem !important;
    }

    /* Notes FAB */
    .notes-fab {
        bottom: 74px !important;
        left: 62px !important;
        width: 42px !important;
        height: 42px !important;
        font-size: 0.95rem !important;
    }
    .notes-panel {
        bottom: 130px !important;
        max-height: 55vh !important;
    }

    /* Add bottom padding to body for bottom nav */
    body {
        padding-bottom: 68px !important;
    }

    /* Also offset the top nav body padding */
    body:has(.site-nav) .tool-page,
    body:has(.site-nav) .unit-page {
        padding-top: 80px;
    }

    /* Hide top nav on scroll down, show on scroll up (controlled by JS) */
    .site-nav.nav-hidden {
        transform: translateY(-100%);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .site-nav {
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Focus mode adjustments */
    body.focus-mode {
        padding-bottom: 0 !important;
    }
}

/* Smaller phones */
@media (max-width: 480px) {
    .mobile-bottom-nav-inner {
        height: 56px;
    }

    .mobile-bottom-nav-item {
        font-size: 0.58rem;
    }

    .mobile-bottom-nav-item i {
        font-size: 1.05rem;
    }

    .mobile-more-menu {
        width: 180px;
    }

    /* Tables */
    .mobile-table-wrapper {
        margin: 8px -8px;
    }

    /* Floating buttons */
    .cx-next-action {
        bottom: 68px !important;
        right: 8px !important;
    }
    .cx-na-toggle {
        width: 44px !important;
        height: 44px !important;
    }

    .cx-search-trigger {
        bottom: 124px !important;
        left: 8px !important;
        width: 36px !important;
        height: 36px !important;
    }

    .notes-fab {
        bottom: 68px !important;
        left: 54px !important;
        width: 38px !important;
        height: 38px !important;
    }

    body {
        padding-bottom: 60px !important;
    }
}


/* =========================================
   6. JOURNEY MAP TOUCH IMPROVEMENTS
   ========================================= */
@media (max-width: 768px) {
    .dnd-pool, .dnd-target {
        min-height: 80px;
        padding: 12px;
    }

    .dnd-item {
        padding: 14px 18px;
        font-size: 0.88rem;
        touch-action: none;
        user-select: none;
        -webkit-user-select: none;
    }

    .dnd-item:active {
        transform: scale(1.05);
        box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
        z-index: 10;
    }

    .jm-stages {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .jm-stage::after {
        display: none !important;
    }

    .jm-input {
        min-height: 48px;
        font-size: 0.85rem;
    }
}


/* =========================================
   LIGHT THEME OVERRIDES
   ========================================= */
body.light-theme .mobile-bottom-nav {
    background: rgba(255, 255, 255, 0.97);
    border-top-color: rgba(99, 102, 241, 0.1);
}

body.light-theme .mobile-bottom-nav-item {
    color: #94a3b8;
}

body.light-theme .mobile-bottom-nav-item.active {
    color: #6366f1;
}

body.light-theme .mobile-bottom-nav-item.active i {
    color: #6366f1;
}

body.light-theme .mobile-bottom-nav-item:active::after {
    background: rgba(99, 102, 241, 0.06);
}

body.light-theme .mobile-more-menu {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(99, 102, 241, 0.12);
    box-shadow: 0 -12px 40px rgba(0, 0, 0, 0.1);
}

body.light-theme .mobile-more-menu-item {
    color: #64748b;
}

body.light-theme .mobile-more-menu-item:hover,
body.light-theme .mobile-more-menu-item:active {
    background: rgba(99, 102, 241, 0.06);
    color: #1e293b;
}

body.light-theme .focus-mode-btn {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(99, 102, 241, 0.2);
    color: #6366f1;
}

body.light-theme .mobile-table-hint {
    color: rgba(0, 0, 0, 0.3);
}

body.light-theme .swipe-hint {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(99, 102, 241, 0.12);
    color: #64748b;
}


/* =========================================
   PRINT: HIDE ALL MOBILE UI
   ========================================= */
@media print {
    .mobile-bottom-nav,
    .focus-mode-btn,
    .focus-mode-banner,
    .swipe-nav-indicator,
    .swipe-progress,
    .swipe-hint,
    .mobile-table-hint {
        display: none !important;
    }
}


/* =========================================
   REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce) {
    .mobile-bottom-nav,
    .mobile-bottom-nav-item i,
    .mobile-more-menu,
    .focus-mode-btn,
    .swipe-nav-indicator,
    .swipe-hint {
        transition-duration: 0.01ms !important;
    }

    @keyframes mobileTableSwipe {
        0%, 100% { transform: translateX(0); }
    }
}

/* === ux-enhancements.css === */
/* ========================================
   UX Enhancements v1.0
   Visual & Interaction Improvements
   ======================================== */

/* ===== 1. SCROLL REVEAL ANIMATIONS ===== */
.ux-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.ux-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.ux-reveal-left {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.ux-reveal-left.revealed {
    opacity: 1;
    transform: translateX(0);
}

.ux-reveal-right {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.ux-reveal-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

.ux-reveal-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ux-reveal-scale.revealed {
    opacity: 1;
    transform: scale(1);
}

/* Stagger delays for children */
.ux-stagger > * { transition-delay: calc(var(--i, 0) * 0.08s); }

/* ===== 2. BACK TO TOP BUTTON ===== */
.ux-back-top {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.9);
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.8);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.35);
    backdrop-filter: blur(4px);
}

.ux-back-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.ux-back-top:hover {
    background: rgba(99, 102, 241, 1);
    transform: translateY(-3px) scale(1.08);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.45);
}

.ux-back-top:active {
    transform: translateY(0) scale(0.95);
}

/* Progress ring inside back-to-top */
.ux-btt-ring {
    position: absolute;
    inset: -2px;
    border-radius: 50%;
}

.ux-btt-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.ux-btt-ring circle {
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    transition: stroke-dashoffset 0.15s ease;
}

.ux-btt-ring .track { stroke: rgba(255, 255, 255, 0.15); }
.ux-btt-ring .progress { stroke: rgba(255, 255, 255, 0.7); }

/* ===== 3. ENHANCED CARD HOVER EFFECTS ===== */
.ux-glass-card {
    background: rgba(30, 41, 59, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(99, 102, 241, 0.08);
    border-radius: var(--radius-md, 12px);
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.ux-glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), transparent 50%, rgba(6, 182, 212, 0.03));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.ux-glass-card:hover {
    border-color: rgba(99, 102, 241, 0.2);
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
}

.ux-glass-card:hover::before { opacity: 1; }

/* Gradient border shimmer */
.ux-shimmer-border {
    position: relative;
}

.ux-shimmer-border::after {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: linear-gradient(120deg, transparent 30%, rgba(99, 102, 241, 0.2) 50%, transparent 70%);
    background-size: 200% 200%;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
    pointer-events: none;
}

.ux-shimmer-border:hover::after {
    opacity: 1;
    animation: ux-shimmer-move 2s linear infinite;
}

@keyframes ux-shimmer-move {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ===== 4. ENHANCED BUTTONS ===== */
.ux-btn-glow {
    position: relative;
    overflow: hidden;
}

.ux-btn-glow::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.ux-btn-glow:hover::after {
    width: 300px;
    height: 300px;
}

/* ===== 5. SKELETON LOADING ===== */
.ux-skeleton {
    background: linear-gradient(90deg,
        rgba(30, 41, 59, 0.5) 0%,
        rgba(51, 65, 85, 0.5) 40%,
        rgba(30, 41, 59, 0.5) 80%
    );
    background-size: 200% 100%;
    animation: ux-skeleton-pulse 1.5s ease-in-out infinite;
    border-radius: 8px;
}

@keyframes ux-skeleton-pulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.ux-skeleton-text { height: 16px; margin-bottom: 10px; width: 100%; }
.ux-skeleton-text.short { width: 60%; }
.ux-skeleton-title { height: 28px; margin-bottom: 16px; width: 80%; }
.ux-skeleton-circle { width: 48px; height: 48px; border-radius: 50%; }
.ux-skeleton-card { height: 160px; }
.ux-skeleton-avatar { width: 64px; height: 64px; border-radius: 16px; }

/* ===== 6. SMOOTH PAGE TRANSITIONS ===== */
.ux-page-enter {
    animation: ux-page-in 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ux-page-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ===== 7. TOOLTIP SYSTEM ===== */
[data-ux-tip] {
    position: relative;
    cursor: help;
}

[data-ux-tip]::after {
    content: attr(data-ux-tip);
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: rgba(15, 23, 42, 0.95);
    color: #e2e8f0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 0.78rem;
    line-height: 1.5;
    white-space: nowrap;
    max-width: 280px;
    border: 1px solid rgba(99, 102, 241, 0.15);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    z-index: 10001;
    pointer-events: none;
    font-family: 'Tajawal', sans-serif;
    font-weight: 400;
}

[data-ux-tip]:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* ===== 8. ANIMATED NUMBER COUNTER ===== */
.ux-counter {
    font-variant-numeric: tabular-nums;
    direction: ltr;
    display: inline-block;
}

/* ===== 9. BREADCRUMB ENHANCEMENT ===== */
.breadcrumb a {
    position: relative;
}

.breadcrumb a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: 0;
    width: 0;
    height: 1.5px;
    background: var(--primary-light, #818cf8);
    transition: width 0.3s ease;
}

.breadcrumb a:hover::after {
    width: 100%;
}

/* ===== 10. SECTION DIVIDERS ===== */
.ux-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.2), transparent);
    margin: 48px 0;
    position: relative;
}

.ux-divider::after {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 7px;
    height: 7px;
    background: var(--primary, #6366f1);
    border-radius: 50%;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* ===== 11. FOCUS INDICATOR ENHANCEMENT ===== */
:focus-visible {
    outline: 2px solid rgba(99, 102, 241, 0.6);
    outline-offset: 3px;
    border-radius: 4px;
    transition: outline-offset 0.15s ease;
}

/* ===== 12. ENHANCED SCROLLBAR ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(15, 23, 42, 0.3); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.2));
    border-radius: 4px;
    border: 1px solid rgba(99, 102, 241, 0.1);
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.5), rgba(6, 182, 212, 0.3));
}

/* Firefox scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: rgba(99, 102, 241, 0.3) rgba(15, 23, 42, 0.3);
}

/* ===== 13. CONTENT BLOCK ELEVATION ===== */
.content-block {
    transition: box-shadow 0.3s ease;
}

.content-block:hover {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ===== 14. LINK HOVER UNDERLINE ===== */
.ux-link-fancy {
    position: relative;
    text-decoration: none;
    color: var(--primary-light, #818cf8);
}

.ux-link-fancy::after {
    content: '';
    position: absolute;
    bottom: -1px;
    right: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary, #6366f1), var(--secondary, #06b6d4));
    transition: width 0.3s ease;
    border-radius: 1px;
}

.ux-link-fancy:hover::after { width: 100%; }

/* ===== 15. NOTIFICATION DOT ===== */
.ux-dot-pulse {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ef4444;
    position: relative;
}

.ux-dot-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #ef4444;
    animation: ux-dot-ring 1.5s ease-out infinite;
}

@keyframes ux-dot-ring {
    0% { transform: scale(0.8); opacity: 1; }
    100% { transform: scale(2); opacity: 0; }
}

/* ===== 16. TEXT SELECTION ===== */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: #f1f5f9;
}

::-moz-selection {
    background: rgba(99, 102, 241, 0.3);
    color: #f1f5f9;
}

/* ===== 17. SMOOTH IMAGE LOADING ===== */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded,
img:not([loading="lazy"]) {
    opacity: 1;
}

/* ===== 18. TABLE ENHANCEMENTS ===== */
.comparison-table th {
    position: relative;
    overflow: hidden;
}

.comparison-table th::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-1, linear-gradient(90deg, #6366f1, #06b6d4));
}

.comparison-table tbody tr {
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.04);
}

/* ===== 19. INPUT ENHANCEMENTS ===== */
input:not([type="radio"]):not([type="checkbox"]),
textarea,
select {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:not([type="radio"]):not([type="checkbox"]):focus,
textarea:focus,
select:focus {
    border-color: rgba(99, 102, 241, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.08);
}

/* ===== 20. SECTION FLOATING LABEL ===== */
.content-block > h2,
.tool-page-header h1 {
    position: relative;
}

.content-block > h2 > i {
    transition: transform 0.3s ease, color 0.3s ease;
}

.content-block:hover > h2 > i {
    transform: scale(1.15);
}

/* ========================================
   LIGHT THEME OVERRIDES
   ======================================== */
body.light-theme .ux-back-top {
    background: rgba(99, 102, 241, 0.95);
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.25);
}

body.light-theme .ux-glass-card {
    background: rgba(255, 255, 255, 0.6);
    border-color: rgba(226, 232, 240, 0.8);
}

body.light-theme .ux-glass-card:hover {
    border-color: rgba(99, 102, 241, 0.15);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06), 0 0 0 1px rgba(99, 102, 241, 0.08);
}

body.light-theme .ux-skeleton {
    background: linear-gradient(90deg,
        rgba(226, 232, 240, 0.7) 0%,
        rgba(241, 245, 249, 0.9) 40%,
        rgba(226, 232, 240, 0.7) 80%
    );
    background-size: 200% 100%;
}

body.light-theme [data-ux-tip]::after {
    background: rgba(255, 255, 255, 0.97);
    color: #334155;
    border-color: #e2e8f0;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
}

body.light-theme ::-webkit-scrollbar-track { background: rgba(241, 245, 249, 0.5); }
body.light-theme ::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, rgba(99, 102, 241, 0.2), rgba(6, 182, 212, 0.15));
    border-color: rgba(226, 232, 240, 0.5);
}

body.light-theme .ux-divider {
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.12), transparent);
}

body.light-theme .comparison-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.03);
}

body.light-theme ::selection {
    background: rgba(99, 102, 241, 0.2);
    color: #1e293b;
}

body.light-theme * {
    scrollbar-color: rgba(99, 102, 241, 0.2) rgba(241, 245, 249, 0.5);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .ux-back-top {
        bottom: 80px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 0.85rem;
    }

    [data-ux-tip]::after {
        max-width: 200px;
        white-space: normal;
        font-size: 0.72rem;
    }

    .ux-reveal, .ux-reveal-left, .ux-reveal-right {
        transform: translateY(20px);
    }

    .ux-reveal-left, .ux-reveal-right {
        transform: translateY(20px);
    }
}

/* ========================================
   PRINT
   ======================================== */
@media print {
    .ux-back-top,
    .ux-dot-pulse,
    [data-ux-tip]::after {
        display: none !important;
    }

    .ux-reveal, .ux-reveal-left, .ux-reveal-right, .ux-reveal-scale {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .ux-reveal, .ux-reveal-left, .ux-reveal-right, .ux-reveal-scale {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .ux-back-top {
        transition: opacity 0.1s ease !important;
        transform: none !important;
    }

    .ux-glass-card,
    .ux-glass-card::before,
    .ux-shimmer-border::after,
    .ux-btn-glow::after,
    .ux-skeleton,
    .ux-dot-pulse::after {
        animation: none !important;
        transition: none !important;
    }

    .ux-page-enter { animation: none !important; opacity: 1; }
    ::-webkit-scrollbar-thumb { transition: none; }
}
