/* ============================================================
   Testbook247.com — Base Stylesheet
   Bootstrap 5.3 compatible | Dark mode ready | CSS Variables
   ============================================================ */

/* ── CSS Custom Properties (Theme Variables) ──────────────── */
:root {
    /* Primary Palette */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --primary-bg: #DBEAFE;
    --primary-ring: rgba(37, 99, 235, 0.15);

    /* Secondary Palette */
    --secondary: #4F46E5;
    --secondary-light: #6366F1;

    /* Status Colors */
    --success: #16A34A;
    --success-bg: #DCFCE7;
    --success-border: #BBF7D0;
    --success-dark: #166534;

    --warning: #F59E0B;
    --warning-bg: #FEF3C7;
    --warning-border: #FDE68A;
    --warning-dark: #92400E;

    --danger: #DC2626;
    --danger-bg: #FEE2E2;
    --danger-border: #FECACA;
    --danger-dark: #991B1B;

    --info: #0EA5E9;
    --info-bg: #DBEAFE;
    --info-border: #BFDBFE;
    --info-dark: #1E40AF;

    /* Neutral Palette */
    --bg: #F8FAFC;
    --bg-card: #FFFFFF;
    --bg-muted: #F1F5F9;
    --bg-input: #F8FAFC;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --text: #1E293B;
    --text-secondary: #475569;
    --text-muted: #94A3B8;
    --text-inverse: #FFFFFF;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-primary: 0 4px 12px rgba(37, 99, 235, 0.25);
    --shadow-success: 0 4px 12px rgba(22, 163, 74, 0.25);
    --shadow-warning: 0 4px 12px rgba(245, 158, 11, 0.25);

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-size-xs: 0.7rem;
    --font-size-sm: 0.78rem;
    --font-size-base: 0.86rem;
    --font-size-md: 0.92rem;
    --font-size-lg: 1rem;
    --font-size-xl: 1.5rem;
    --font-size-2xl: clamp(1.8rem, 5vw, 3.4rem);

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;

    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-base: 0.2s ease;
    --transition-slow: 0.3s ease;

    /* Z-Index Layers */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
    --z-toast: 9999;
}

/* ── Dark Mode (automatic + manual toggle) ────────────────── */
@media (prefers-color-scheme: dark) {
    html:not([data-theme="light"]) {}
}

html[data-theme="dark"] {
    --bg: #0F172A;
    --bg-card: #1E293B;
    --bg-muted: #334155;
    --bg-input: #1E293B;
    --border: #334155;
    --border-light: #1E293B;
    --text: #F1F5F9;
    --text-secondary: #CBD5E1;
    --text-muted: #64748B;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.5);
}

/* ── Reset & Base ─────────────────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    min-height: 100vh;
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
}

/* ── Scrollbar ────────────────────────────────────────────── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg-muted);
}

::-webkit-scrollbar-thumb {
    background: var(--info);
    border-radius: var(--radius-full);
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ── Modern Glassmorphic Header & Navigation ────────────────── */
.site-header,
.site-header-modern {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    z-index: 1030;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
    transition: transform 0.3s ease, background 0.25s ease, box-shadow 0.25s ease;
}

html[data-theme="dark"] .site-header,
html[data-theme="dark"] .site-header-modern {
    background: rgba(15, 23, 42, 0.88);
    border-bottom: 1px solid rgba(30, 41, 59, 0.8);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
    gap: 1rem;
    flex-wrap: nowrap;
}

/* Brand Logo */
.logo-modern {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    flex-shrink: 0;
}

.brand-logo-img {
    height: 100px;
    width: auto;
    object-fit: contain;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-modern:hover .brand-logo-img {
    transform: scale(1.05) translateY(-1px);
}

html[data-theme="dark"] .brand-logo-img {
    /* Make dark blue text of logo clear in dark theme using a premium soft drop-shadow and brightness bump */
    filter: drop-shadow(0 0 1px rgba(255, 255, 255, 0.75)) brightness(1.05);
}


.brand-badge-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.brand-badge-icon.sm {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    font-size: 1rem;
}

.logo-modern:hover .brand-badge-icon {
    transform: scale(1.08) rotate(-4deg);
}

.brand-text {
    font-size: 1.45rem;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.02em;
    white-space: nowrap;
}

html[data-theme="dark"] .brand-text {
    color: #f8fafc;
}

.brand-accent {
    background: linear-gradient(135deg, #2563eb 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900;
}

/* Desktop Nav Pills */
.nav-desktop {
    display: flex;
    align-items: center;
    flex: 1;
    overflow: visible !important;
    margin: 0 0.5rem;
}

.nav-desktop::-webkit-scrollbar {
    display: none;
}

.nav-pills-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
}

.nav-pill-item {
    display: inline-flex;
    align-items: center;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

html[data-theme="dark"] .nav-pill-item {
    color: #94a3b8;
}

.nav-pill-item:hover {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

html[data-theme="dark"] .nav-pill-item:hover {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.12);
}

.nav-pill-item.active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.12);
    font-weight: 700;
}

html[data-theme="dark"] .nav-pill-item.active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.18);
}

/* Header Actions Group */
.header-actions-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    white-space: nowrap;
}

/* Language Switcher Pill */
.lang-switcher-pill {
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

html[data-theme="dark"] .lang-switcher-pill {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(51, 65, 85, 0.8);
    color: #e2e8f0;
}

.lang-switcher-pill:hover {
    border-color: #2563eb;
    color: #2563eb;
}

/* User Avatar Modern */
.user-avatar-modern {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.95rem;
    position: relative;
    box-shadow: 0 3px 10px rgba(37, 99, 235, 0.25);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.user-avatar-modern.lg {
    width: 44px;
    height: 44px;
    font-size: 1.1rem;
}

.user-avatar-modern:hover {
    transform: scale(1.06);
}

.user-online-dot {
    position: absolute;
    bottom: 1px;
    right: 1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    border: 2px solid #ffffff;
}

html[data-theme="dark"] .user-online-dot {
    border-color: #0f172a;
}

.btn-auth-pill {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff !important;
    padding: 7px 18px;
    border-radius: 22px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
    transition: all 0.2s ease;
}

.btn-auth-pill:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.35);
}

/* Modern Animated Hamburger Button */
.hamburger-modern {
    display: none;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(203, 213, 225, 0.6);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    padding: 10px;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    transition: all 0.2s ease;
}

html[data-theme="dark"] .hamburger-modern {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(51, 65, 85, 0.8);
}

.hamburger-bar {
    width: 100%;
    height: 2px;
    background: #334155;
    border-radius: 2px;
    transition: all 0.25s ease;
}

html[data-theme="dark"] .hamburger-bar {
    background: #cbd5e1;
}

.hamburger-modern.open .hamburger-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger-modern.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.hamburger-modern.open .hamburger-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Offcanvas Mobile Drawer */
.mobile-drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(4px);
    z-index: 10400;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-drawer-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-modern {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    height: 100vh;
    background: #ffffff;
    z-index: 10500;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}

html[data-theme="dark"] .mobile-menu-modern {
    background: #0f172a;
    color: #f8fafc;
}

.mobile-menu-modern.open {
    right: 0;
}

.mobile-drawer-header {
    padding: 1.25rem;
    border-bottom: 1px solid #e2e8f0;
}

html[data-theme="dark"] .mobile-drawer-header {
    border-bottom-color: #1e293b;
}

.btn-close-modern {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #64748b;
    cursor: pointer;
    padding: 4px;
}

.mobile-drawer-body {
    padding: 1.25rem;
    flex: 1;
}

.mobile-user-card {
    display: flex;
    align-items: center;
    padding: 0.85rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 16px;
}

html[data-theme="dark"] .mobile-user-card {
    background: #1e293b;
    border-color: #334155;
}

.mobile-quick-bar {
    background: #f1f5f9;
    padding: 0.75rem;
    border-radius: 16px;
}

html[data-theme="dark"] .mobile-quick-bar {
    background: #1e293b;
}

.quick-bar-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: #64748b;
}

.mobile-nav-title {
    font-size: 0.75rem;
    font-weight: 800;
    text-uppercase: uppercase;
    letter-spacing: 0.05em;
    color: #94a3b8;
    margin-bottom: 0.5rem;
}

.mobile-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #334155;
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

html[data-theme="dark"] .mobile-nav-item {
    color: #cbd5e1;
}

.mobile-nav-item:hover,
.mobile-nav-item.active {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
    font-weight: 700;
}

html[data-theme="dark"] .mobile-nav-item:hover,
html[data-theme="dark"] .mobile-nav-item.active {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

/* ── Responsive Display Media Queries ──────────────────────── */
@media (min-width: 993px) {
    .nav-desktop {
        display: flex !important;
    }
    .logo {
        margin-top:12px;       
        height: auto;
    }

    .hamburger-modern {
        display: none !important;
    }

    .mobile-menu-modern {
        display: none !important;
    }

    .mobile-drawer-overlay {
        display: none !important;
    }

    .mobile-bottom-nav {
        display: none !important;
    }
}

@media (max-width: 992px) {
    .header-inner {
        height: 64px;
        padding: 0 0.75rem;
        gap: 0.5rem;
    }
    .logo {
        margin-top:12px;
        width: 65px;
        height: auto;
    }
    .input-group-text{
         display: none !important;
    }
    .admin-icon {
        display: none !important;
    }

    .nav-desktop {
        display: none !important;
    }

    .brand-badge-icon {
        width: 34px;
        height: 34px;
        font-size: 1rem;
        border-radius: 10px;
    }

    .brand-text {
        font-size: 1.2rem;
    }

    .header-actions-group {
        gap: 6px;
    }

    .header-action-btn {
        width: 34px;
        height: 34px;
        font-size: 0.88rem;
    }

    .lang-switcher-pill {
        padding: 4px 8px;
        font-size: 0.75rem;
    }

    .user-avatar-modern {
        width: 34px;
        height: 34px;
        font-size: 0.88rem;
    }

    .hamburger-modern {
        display: flex !important;
        width: 36px;
        height: 36px;
        padding: 8px;
        flex-shrink: 0;
    }

    .mobile-menu-modern {
        display: flex !important;
    }

    .mobile-bottom-nav {
        display: flex !important;
    }

    .back-to-top {
        bottom: calc(4.75rem + env(safe-area-inset-bottom)) !important;
        right: 1rem !important;
        width: 40px !important;
        height: 40px !important;
        font-size: 1rem !important;
        z-index: 10301 !important;
    }
}

/* ── Modern Navigation System Styles ────────────────────────── */

/* Auto-hide Sticky Header */
.site-header-modern.hide-on-scroll {
    transform: translateY(-100%);
}

.site-header-modern.header-transparent {
    background: rgba(255, 255, 255, 0.4) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom-color: rgba(255, 255, 255, 0.2) !important;
    box-shadow: none !important;
}

html[data-theme="dark"] .site-header-modern.header-transparent {
    background: rgba(15, 23, 42, 0.4) !important;
    border-bottom-color: rgba(30, 41, 59, 0.4) !important;
}

.site-header-modern.header-solid {
    background: rgba(255, 255, 255, 0.95) !important;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="dark"] .site-header-modern.header-solid {
    background: rgba(15, 23, 42, 0.95) !important;
}

/* Header Action Buttons */
.header-action-btn {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(241, 245, 249, 0.8);
    border: 1px solid rgba(203, 213, 225, 0.6);
    color: #475569;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

html[data-theme="dark"] .header-action-btn {
    background: rgba(30, 41, 59, 0.8);
    border-color: rgba(51, 65, 85, 0.8);
    color: #cbd5e1;
}

.header-action-btn:hover {
    color: #2563eb;
    border-color: #2563eb;
    transform: scale(1.05);
}

.search-trigger-btn {
    width: auto;
    padding: 0 14px;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* ── Premium Dark Mode Toggle Button ─────────────────────── */
.dark-toggle-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.09) !important;
    border: 1px solid rgba(99, 102, 241, 0.22) !important;
    color: #6366f1 !important;
    font-size: 1.05rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.12);
}

.dark-toggle-btn:hover {
    background: rgba(99, 102, 241, 0.18) !important;
    border-color: #6366f1 !important;
    color: #4f46e5 !important;
    transform: scale(1.1) rotate(15deg) !important;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.3) !important;
}

.dark-toggle-btn:active {
    transform: scale(0.92) rotate(-15deg) !important;
}

.dark-toggle-btn i {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Dark Mode Theme Adjustments for Toggle Button */
html[data-theme="dark"] .dark-toggle-btn {
    background: rgba(245, 158, 11, 0.14) !important;
    border-color: rgba(245, 158, 11, 0.35) !important;
    color: #fbbf24 !important;
    box-shadow: 0 2px 10px rgba(245, 158, 11, 0.2);
}

html[data-theme="dark"] .dark-toggle-btn:hover {
    background: rgba(245, 158, 11, 0.24) !important;
    border-color: #f59e0b !important;
    color: #fef08a !important;
    transform: scale(1.1) rotate(45deg) !important;
    box-shadow: 0 0 18px rgba(245, 158, 11, 0.5) !important;
}

/* ── Desktop Nav Dropdown (pure CSS hover, scoped to .nav-dropdown-wrap) ─── */
.nav-dropdown-wrap {
    position: relative;
    display: inline-block;
}

.nav-has-dropdown {
    position: relative;
}

.nav-caret {
    font-size: 0.65rem;
    transition: transform 0.2s ease;
    opacity: 0.6;
}

.nav-dropdown-wrap:hover .nav-caret {
    transform: rotate(180deg);
    opacity: 1;
}

/* The dropdown panel — hidden by default, shown on hover */
.nav-dropdown-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    z-index: 1080;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 16px;
    box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.18);
    padding: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
    transform: translateX(-50%) translateY(8px);
    white-space: nowrap;
}

/* Invisible hover bridge to eliminate gap flickering */
.nav-dropdown-panel::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}

html[data-theme="dark"] .nav-dropdown-panel {
    background: #0f172a;
    border-color: rgba(30, 41, 59, 0.8);
    box-shadow: 0 16px 40px -8px rgba(0, 0, 0, 0.45);
}

/* Show dropdown panel on hover */
@media (min-width: 768px) {

    .nav-dropdown-wrap:hover>.nav-dropdown-panel,
    .nav-dropdown-panel:hover {
        display: block !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        transform: translateX(-50%) translateY(0) !important;
    }
}

/* Dropdown item links */
.nav-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 14px;
    border-radius: 10px;
    color: #334155;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

html[data-theme="dark"] .nav-dropdown-item {
    color: #cbd5e1;
}

.nav-dropdown-item:hover {
    background: rgba(37, 99, 235, 0.08);
    color: #2563eb;
}

html[data-theme="dark"] .nav-dropdown-item:hover {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

.nav-dropdown-icon {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    background: rgba(241, 245, 249, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: background 0.15s ease;
}

html[data-theme="dark"] .nav-dropdown-icon {
    background: rgba(30, 41, 59, 0.9);
}

.nav-dropdown-item:hover .nav-dropdown-icon {
    background: rgba(37, 99, 235, 0.12);
}

.nav-dropdown-label {
    flex: 1;
    white-space: nowrap;
}

.mega-dropdown-menu {
    border-radius: 20px !important;
    box-shadow: 0 20px 40px -10px rgba(15, 23, 42, 0.15) !important;
}

.mega-item {
    transition: all 0.2s ease !important;
}

.mega-item:hover {
    background: rgba(37, 99, 235, 0.08) !important;
    color: #2563eb !important;
    transform: translateX(3px);
}

/* ── Modern Floating Glass Dock Mobile Bottom Nav ────────── */
.mobile-bottom-nav {
    position: fixed;
    bottom: calc(0.5rem + env(safe-area-inset-bottom));
    left: 0;
    right: 0;
    margin: 0 auto;
    width: min(calc(100% - 1.25rem), 30rem);
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(226, 232, 240, 0.88);
    border-radius: 999px;
    z-index: 10300;
    padding: 3px 6px;
    box-shadow: 0 10px 30px -4px rgba(15, 23, 42, 0.15), 0 4px 12px -2px rgba(15, 23, 42, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] .mobile-bottom-nav {
    background: rgba(15, 23, 42, 0.88);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 12px 35px -4px rgba(0, 0, 0, 0.55), 0 4px 12px -2px rgba(0, 0, 0, 0.35);
}

.bottom-nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 52px;
    padding: 0 2px;
    gap: 2px;
}

.bottom-nav-item {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    text-decoration: none;
    flex: 1 1 0px;
    width: 0;
    min-width: 0;
    height: 100%;
    border-radius: 999px;
    padding: 4px 0;
    text-align: center;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="dark"] .bottom-nav-item {
    color: #94a3b8;
}

.bottom-nav-item .nav-icon {
    font-size: 1.2rem;
    margin-bottom: 2px;
    display: inline-block;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.2s ease;
}

.bottom-nav-item .nav-label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    line-height: 1;
}

.bottom-nav-badge-dot {
    position: absolute;
    top: -2px;
    right: -4px;
    width: 7px;
    height: 7px;
    background: #ef4444;
    border-radius: 50%;
    border: 1.5px solid #ffffff;
}

html[data-theme="dark"] .bottom-nav-badge-dot {
    border-color: #0f172a;
}

/* Hover & Active States */
.bottom-nav-item:hover {
    color: #2563eb;
}

html[data-theme="dark"] .bottom-nav-item:hover {
    color: #60a5fa;
}

.bottom-nav-item.active {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.09);
}

html[data-theme="dark"] .bottom-nav-item.active {
    color: #60a5fa;
    background: rgba(96, 165, 250, 0.14);
}

.bottom-nav-item.active .nav-icon {
    transform: translateY(-2px) scale(1.12);
}

.bottom-nav-item .active-indicator {
    position: absolute;
    bottom: 3px;
    width: 12px;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #4f46e5);
    border-radius: 99px;
}

html[data-theme="dark"] .bottom-nav-item .active-indicator {
    background: linear-gradient(90deg, #60a5fa, #818cf8);
}

/* Accessibility Focus Visible */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #2563eb !important;
    outline-offset: 2px !important;
}

/* ── Ticker Bar ────────────────────────────────────────────── */
.ticker-bar {
    background: #0C4A6E;
    color: #BAE6FD;
    padding: 7px 0;
    font-size: 0.78rem;
    overflow: hidden;
    margin-top: 70px;
}

.ticker-link {
    color: #BAE6FD !important;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.ticker-link:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

.ticker-bullet {
    color: #38bdf8;
    font-weight: bold;
    user-select: none;
}

.ticker-inner {
    display: flex;
    align-items: center;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    gap: 14px;
}

.ticker-label {
    background: var(--danger);
    color: white;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.7rem;
    white-space: nowrap;
    flex-shrink: 0;
    animation: pulse-badge 2s infinite;
}

.ticker-scroll {
    overflow: hidden;
    flex: 1;
}

.ticker-track {
    display: flex;
    gap: 48px;
    white-space: nowrap;
    animation: tickerMove 35s linear infinite;
}

@keyframes tickerMove {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

@keyframes pulse-badge {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.75;
    }
}

/* ── Layout ────────────────────────────────────────────────── */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    transition: all var(--transition-base);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-primary);
}

.btn-outline {
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.btn-outline:hover {
    background: var(--bg-muted);
    border-color: var(--primary);
    color: var(--primary);
}

.btn-success {
    background: var(--success);
    color: var(--text-inverse);
}

.btn-success:hover {
    background: var(--success-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-success);
}

.btn-warning {
    background: var(--warning);
    color: var(--text-inverse);
}

.btn-warning:hover {
    background: #D97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow-warning);
}

.btn-danger {
    background: var(--danger);
    color: var(--text-inverse);
}

.btn-danger:hover {
    background: #B91C1C;
}

/* Small buttons */
.btn-sm {
    padding: 6px 14px;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.btn-blue-sm {
    background: var(--primary);
    color: var(--text-inverse);
}

.btn-blue-sm:hover {
    background: var(--primary-dark);
}

.btn-gray-sm {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.btn-gray-sm:hover {
    background: var(--border);
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    white-space: nowrap;
}

.badge-blue {
    background: var(--primary-bg);
    color: var(--primary-dark);
}

.badge-green {
    background: var(--success-bg);
    color: var(--success-dark);
}

.badge-red {
    background: var(--danger-bg);
    color: var(--danger-dark);
}

.badge-orange {
    background: #FFEDD5;
    color: #9A3412;
}

.badge-gray {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.badge-yellow {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    padding: 14px 20px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
}

.card-header h3 {
    font-weight: 700;
    font-size: 0.97rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header a {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--primary);
}

.card-header a:hover {
    text-decoration: underline;
}

.card-body {
    padding: 20px;
}

/* ── Tables ────────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 10px 20px;
    text-align: left;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.4px;
    background: var(--bg-muted);
    border-bottom: 1px solid var(--border);
}

.data-table tbody tr {
    border-top: 1px solid var(--border-light);
    transition: background var(--transition-fast);
}

.data-table tbody tr:hover {
    background: var(--primary-bg);
}

.data-table tbody td {
    padding: 12px 20px;
    font-size: 0.86rem;
    color: var(--text-secondary);
}

/* Table Responsive Wrapper */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
    display: flex;
    gap: 4px;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
    flex-wrap: wrap;
}

.page-btn {
    min-width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    padding: 0 8px;
}

.page-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-bg);
}

.page-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}

.page-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Filters ───────────────────────────────────────────────── */
.filter-bar {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 12px 16px;
    margin-bottom: 16px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.filter-select,
.filter-input {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.84rem;
    outline: none;
    background: var(--bg-card);
    cursor: pointer;
    color: var(--text);
    transition: border-color var(--transition-fast);
}

.filter-select:focus,
.filter-input:focus {
    border-color: var(--info);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.1);
}

.filter-input {
    flex: 1;
    min-width: 180px;
}

/* ── Page Header ───────────────────────────────────────────── */
.page-header {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 24px 0;
    margin-bottom: 24px;
}

.page-header h1 {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-top: 4px;
}

/* Breadcrumbs */
.breadcrumb {
    display: flex;
    gap: 6px;
    align-items: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.breadcrumb .sep {
    color: var(--text-muted);
}

/* ── Messages / Toasts ─────────────────────────────────────── */
.messages-container {
    position: fixed;
    top: 80px;
    right: 16px;
    z-index: var(--z-toast);
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 400px;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.86rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
    animation: slideIn 0.3s ease forwards;
    min-width: 240px;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-dark);
    border: 1px solid var(--success-border);
}

.alert-error {
    background: var(--danger-bg);
    color: var(--danger-dark);
    border: 1px solid var(--danger-border);
}

.alert-info {
    background: var(--info-bg);
    color: var(--info-dark);
    border: 1px solid var(--info-border);
}

.alert-warning {
    background: var(--warning-bg);
    color: var(--warning-dark);
    border: 1px solid var(--warning-border);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }

    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.alert.removing {
    animation: fadeOut 0.3s ease forwards;
}

/* Toast close button */
.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    color: inherit;
    opacity: 0.6;
    margin-left: auto;
    padding: 2px;
    transition: opacity var(--transition-fast);
}

.toast-close:hover {
    opacity: 1;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-weight: 600;
    font-size: 0.86rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: var(--font-family);
    font-size: 0.9rem;
    outline: none;
    transition: all var(--transition-fast);
    background: var(--bg-card);
    color: var(--text);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-error {
    color: var(--danger);
    font-size: 0.76rem;
    margin-top: 4px;
}

.form-help {
    font-size: 0.72rem;
    color: var(--text-muted);
    margin-top: 4px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

/* Input groups */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-radius: 8px !important;
   
}

.input-group .input-group-btn {
    padding: 10px 16px;
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background var(--transition-fast);
}

.input-group .input-group-btn:hover {
    background: var(--primary-dark);
}

/* ── Footer ────────────────────────────────────────────────── */
footer {
    background: #031d2c;
    color: #9CA3AF;
    padding: 48px 0 20px;
    margin-top: 48px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.footer-logo {
    color: white;
    font-size: 1.3rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.footer-logo span {
    color: var(--success);
}

.footer-desc {
    font-size: 0.84rem;
    line-height: 1.7;
}

.footer-heading {
    color: white;
    font-weight: 700;
    font-size: 0.93rem;
    margin-bottom: 12px;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-links a {
    font-size: 0.84rem;
    color: #9CA3AF;
    transition: color var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer-links a::before {
    content: '›';
    font-size: 1.3rem;
    color: #4B5563;
    transition: color var(--transition-fast), transform var(--transition-fast);
    display: inline-block;
    line-height: 1;
}

.footer-links a:hover {
    color: white;
}

.footer-links a:hover::before {
    color: #60A5FA;
    transform: translateX(2px);
}

.footer-bottom {
    border-top: 1px solid #1F2937;
    padding-top: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: #6B7280;
    flex-wrap: wrap;
    gap: 8px;
}

.social-icons {
    display: flex;
    gap: 14px;
    margin-top: 14px;
    font-size: 1.1rem;
}

.social-icons a {
    color: #9CA3AF;
    transition: all var(--transition-fast);
}

.social-icons a:hover {
    color: white;
    transform: translateY(-2px);
}

/* ── Hero Section ──────────────────────────────────────────── */
.hero {
    padding: 48px 16px 40px;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-badge {
    display: inline-block;
    background: var(--info-bg);
    color: #0369A1;
    padding: 6px 18px;
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    margin: 20px 0;
    font-size: var(--font-size-2xl);
    font-weight: 900;
    line-height: 1.15;
    color: var(--text);
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title span {
    color: var(--info);
}

.hero-subtitle {
    color: var(--text-secondary);
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    margin-bottom: 28px;
    max-width: 620px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-btns {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-xl);
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-btn-primary {
    background: var(--primary);
    color: var(--text-inverse);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow-primary);
}

.hero-btn-secondary {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: 14px 32px;
    border-radius: var(--radius-full);
    font-weight: 700;
    font-size: 1rem;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-base);
}

.hero-btn-secondary:hover {
    background: var(--bg-muted);
    border-color: var(--primary);
    color: var(--primary);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: var(--space-xl);
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-stat-num {
    font-size: 1.7rem;
    font-weight: 800;
    color: var(--text);
}

.hero-stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 2px;
}

/* ── Feature Slider ────────────────────────────────────────── */
.slider-section {
    padding: 0 16px var(--space-xl);
    position: relative;
    max-width: 1280px;
    margin: 0 auto;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.slider-btn:hover {
    background: var(--bg-muted);
    box-shadow: var(--shadow-md);
}

.slider-btn.prev {
    left: -4px;
}

.slider-btn.next {
    right: -4px;
}

.feature-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 8px 4px 12px;
}

.feature-card {
    flex-shrink: 0;
    width: 280px;
    background: var(--bg-card);
    padding: 28px 24px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-slow), box-shadow var(--transition-slow);
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text);
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* ── Quick Links ───────────────────────────────────────────── */
.quick-links {
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 16px 0;
    margin-bottom: 24px;
}

.quick-links-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.quick-link-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: var(--radius-full);
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid var(--border);
    background: var(--bg-muted);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.quick-link-pill:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--text-inverse);
}

.quick-link-pill i {
    font-size: 0.75rem;
}

/* ── Main Layout (Homepage) ────────────────────────────────── */
.main-layout {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 var(--space-md) var(--space-xl);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.main-left {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.main-right {
    width: 280px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* ── Trending Mock Test Cards ──────────────────────────────── */
.test-mini-card {
    background: var(--bg-card);
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all var(--transition-fast);
    display: block;
}

.test-mini-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.test-mini-top {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.test-mini-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.72rem;
    text-align: center;
    flex-shrink: 0;
}

.test-mini-title {
    font-weight: 700;
    font-size: 0.86rem;
    color: var(--text);
}

.test-mini-sub {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.test-mini-btn {
    width: 100%;
    padding: 8px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    background: var(--bg-muted);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.test-mini-card:hover .test-mini-btn {
    background: var(--success);
    color: var(--text-inverse);
}

/* ── Offer Box ─────────────────────────────────────────────── */
.offer-box {
    background: var(--info-bg);
    border: 1px solid var(--info-border);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: center;
}

.offer-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.offer-title {
    font-weight: 700;
    color: var(--text);
    margin-bottom: 14px;
    font-size: 0.9rem;
}

.offer-btn {
    background: var(--warning);
    color: var(--text-inverse);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.3);
    transition: all var(--transition-fast);
}

.offer-btn:hover {
    background: #EA580C;
    transform: translateY(-1px);
}

/* ── Notice Board ──────────────────────────────────────────── */
.notice-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
    align-items: flex-start;
    transition: background var(--transition-fast);
}

.notice-item:hover {
    background: var(--bg-muted);
}

.notice-item:last-child {
    border-bottom: none;
}

.notice-dot {
    width: 7px;
    height: 7px;
    background: var(--danger);
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.5;
        transform: scale(1.3);
    }
}

/* ── Result Row ────────────────────────────────────────────── */
.result-row {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    transition: background var(--transition-fast);
}

.result-row:hover {
    background: var(--bg-muted);
}

.result-row:last-child {
    border-bottom: none;
}

/* ── Test Detail / Detail Page ─────────────────────────────── */
.detail-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.info-row {
    display: flex;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.88rem;
}

.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--bg-muted);
    border-radius: var(--radius-full);
    padding: 6px 14px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

/* ── Empty States ──────────────────────────────────────────── */
.empty-state {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state p {
    font-size: 0.86rem;
    max-width: 300px;
    margin: 0 auto 20px;
}

/* ── Loading Skeletons ─────────────────────────────────────── */
.skeleton {
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}

.skeleton-text {
    height: 14px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short {
    width: 60%;
}

.skeleton-title {
    height: 20px;
    width: 80%;
    margin-bottom: 12px;
}

.skeleton-card {
    height: 120px;
    border-radius: var(--radius-lg);
    margin-bottom: 12px;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

.spinner-lg {
    width: 40px;
    height: 40px;
    border-width: 3px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Back to Top ───────────────────────────────────────────── */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--text-inverse);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    z-index: var(--z-fixed);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: var(--shadow-primary);
}

/* ── Animations ────────────────────────────────────────────── */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.animate-fade-in {
    animation: fadeIn 0.4s ease forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.4s ease forwards;
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .nav-desktop {
        display: none;
    }

    .hamburger {
        display: block;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 960px) {
    .main-layout {
        flex-direction: column;
    }

    .main-right {
        width: 100%;
    }

    .detail-layout {
        grid-template-columns: 1fr;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .header-inner {
        padding: 0 12px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-card {
        background: #1F2937;
        border: 1px solid #374151;
        border-radius: 12px;
        padding: 18px 20px;
    }

    .footer-card .footer-heading {
        font-size: 1rem;
        padding-bottom: 10px;
        margin-bottom: 12px;
        border-bottom: 1px solid #374151;
    }

    .footer-card .footer-links {
        gap: 10px;
    }

    .filter-bar {
        flex-direction: column;
    }

    .filter-input {
        min-width: 100%;
    }

    .data-table thead th,
    .data-table tbody td {
        padding: 8px 12px;
    }
}

@media (max-width: 640px) {
    .hero-stats {
        gap: 20px;
    }

    .feature-card {
        width: 260px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .messages-container {
        right: 8px;
        left: 8px;
    }

    .alert {
        min-width: auto;
    }
}

/* ── Page Transition ────────────────────────────────────────── */
.page-enter {
    animation: fadeInUp 0.4s ease forwards;
}

/* ── Search Autocomplete Dropdown ──────────────────────────── */
.search-dropdown a:first-child {
    border-radius: 8px 8px 0 0;
}

.search-dropdown a:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

/* ── Universal High-Contrast Keyboard Shortcut (kbd) Badges ── */
kbd,
.kbd-badge,
.search-shortcut-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.15rem 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1;
    color: #0f172a !important;
    background: #e2e8f0 !important;
    border: 1px solid #cbd5e1 !important;
    border-bottom: 2px solid #94a3b8 !important;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

html[data-theme="dark"] kbd,
html[data-theme="dark"] .kbd-badge,
html[data-theme="dark"] .search-shortcut-badge {
    color: #f8fafc !important;
    background: #334155 !important;
    border-color: #475569 !important;
    border-bottom: 2px solid #64748b !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ── Keyboard Shortcut Hint ─────────────────────────────────── */
.kbd-hint {
    position: fixed;
    bottom: 80px;
    right: 24px;
    z-index: var(--z-fixed);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 10px 14px;
    font-size: 0.76rem;
    color: var(--text);
    box-shadow: var(--shadow-md);
    max-width: 220px;
    line-height: 1.6;
    opacity: 0.95;
    transition: opacity var(--transition-fast);
}

.kbd-hint:hover {
    opacity: 1;
}

.kbd-hint kbd {
    margin: 0 2px;
}

/* ── Accessibility ─────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ── Glassmorphism ─────────────────────────────────────────── */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.glass-dark {
    background: rgba(30, 41, 59, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ── Loading Skeletons ─────────────────────────────────────── */
.skeleton-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.skeleton-card .skeleton-img {
    height: 160px;
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-card .skeleton-body {
    padding: 16px;
}

.skeleton-body .s-line {
    height: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-muted) 25%, var(--border) 50%, var(--bg-muted) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

.skeleton-body .s-line.short {
    width: 60%;
}

.skeleton-body .s-line:last-child {
    width: 40%;
}

/* ── Password Strength Meter ────────────────────────────────── */
.pw-strength {
    height: 4px;
    border-radius: 4px;
    margin-top: 8px;
    overflow: hidden;
    background: var(--bg-muted);
}

.pw-strength-bar {
    height: 100%;
    width: 0%;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pw-strength-bar.weak {
    width: 25%;
    background: #ef4444;
}

.pw-strength-bar.medium {
    width: 50%;
    background: #f59e0b;
}

.pw-strength-bar.strong {
    width: 75%;
    background: #16a34a;
}

.pw-strength-bar.very-strong {
    width: 100%;
    background: #2563eb;
}

/* ── Countdown Timer ───────────────────────────────────────── */
.countdown {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.countdown-item {
    text-align: center;
}

.countdown-item .num {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--text);
    line-height: 1;
}

.countdown-item .label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ── Infinite Scroll Loader ─────────────────────────────────── */
.infinite-scroll-loader {
    text-align: center;
    padding: 20px;
    color: var(--text-muted);
    display: none;
}

.infinite-scroll-loader.active {
    display: block;
}

.infinite-scroll-loader .spinner {
    margin: 0 auto 8px;
}

/* ── Step 9 Jobs UI Components ─────────────────────────────── */
.job-results-card {
    overflow: hidden;
}

.job-mobile-card {
    padding: 1rem;
    border-radius: 1rem;
    background: var(--bg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.job-mobile-title {
    display: block;
    color: var(--text);
    font-weight: 900;
    line-height: 1.35;
}

.job-mobile-title:hover {
    color: var(--primary);
}

.job-mobile-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem .9rem;
    margin-top: .85rem;
    color: var(--text-muted);
    font-size: .8rem;
    font-weight: 700;
}

.modern-pagination {
    margin-top: 1rem;
}

/* ── Step 7 UI Foundation: Bootstrap-compatible shell ───────── */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--info));
    z-index: 99999;
    width: 0%;
    transition: width 0.1s linear;
}

.skip-link {
    position: fixed;
    top: 10px;
    left: 10px;
    transform: translateY(-160%);
    z-index: 100000;
    background: var(--primary);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-weight: 800;
    box-shadow: var(--shadow-md);
}

.skip-link:focus {
    transform: translateY(0);
    color: #fff;
}

.logout-form {
    display: inline-flex;
    margin: 0;
}

.btn-header-muted {
    background: var(--text-secondary) !important;
}

.nav-link-accent {
    color: var(--success) !important;
    font-weight: 700 !important;
}

.search-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.search-icon {
    position: absolute;
    left: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.search-wrap .search-box {
    padding-left: 34px;
}

.mobile-logout-form {
    margin: 0;
    border-bottom: 1px solid var(--border-light);
}

.mobile-logout-btn {
    width: 100%;
    background: transparent;
    border: 0;
    text-align: left;
    color: var(--danger);
    padding: 12px 0;
    font: inherit;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
}

.mobile-logout-btn:hover {
    color: var(--danger-dark);
}

.mobile-login-link:hover .btn-header {
    color: #fff;
}

.visitor-counter {
    border-top: 1px solid #1f2937;
    padding: 18px 0 14px;
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.visitor-stat {
    text-align: center;
}

.visitor-stat-value {
    font-size: 1.1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.visitor-stat-today {
    color: #e2e8f0;
}

.visitor-stat-week {
    color: #93c5fd;
}

.visitor-stat-total {
    color: #fbbf24;
}

.visitor-stat-label {
    color: #6b7280;
    font-size: 0.72rem;
    margin-top: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.visitor-divider {
    width: 1px;
    background: #1f2937;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #22c55e;
    border-radius: 50%;
    animation: pulse-dot 2s infinite;
}

@media (max-width: 576px) {
    .visitor-counter {
        gap: 18px;
    }

    .visitor-divider {
        display: none;
    }

    .kbd-hint {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.001ms !important;
    }
}

/* ── Step 10 List Pages: shared modern components ──────────────
   Promoted from notifications/home.html inline styles so that all
   list pages (jobs, admit cards, results, notices, answer keys)
   share one reusable component system. Safe global scope. */

/* List page hero (reuses jobs-hero look) */
.list-hero {
    padding: clamp(1.75rem, 5vw, 3rem) 0 1.1rem;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 28rem),
        radial-gradient(circle at top right, rgba(79, 70, 229, .10), transparent 28rem),
        var(--bg);
    border-bottom: 1px solid var(--border);
}

.list-breadcrumb {
    display: flex;
    gap: .45rem;
    align-items: center;
    flex-wrap: wrap;
    color: var(--text-muted);
    font-size: .84rem;
    font-weight: 700;
    margin-bottom: .85rem;
}

.list-breadcrumb a {
    color: var(--primary);
}

.list-title {
    color: var(--text);
    font-weight: 900;
    letter-spacing: -.035em;
    font-size: clamp(1.7rem, 4.5vw, 2.7rem);
    margin-bottom: .45rem;
}

.list-subtitle {
    color: var(--text-secondary);
    max-width: 48rem;
    line-height: 1.7;
    margin-bottom: 0;
}

.list-count-pill {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .55rem .85rem;
    border-radius: 999px;
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 900;
    font-size: .84rem;
}

.list-filter-card {
    margin-top: 1.15rem;
    padding: 1rem;
    border-radius: 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.list-filter-card .form-control,
.list-filter-card .form-select {
    min-height: 2.8rem;
    border-radius: .85rem;
    border-color: var(--border);
    background-color: var(--bg-input);
    color: var(--text);
    font-weight: 600;
}

.list-filter-card .form-control:focus,
.list-filter-card .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}

.list-filter-label {
    color: var(--text-muted);
    font-size: .76rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: .35rem;
}

.list-body {
    padding: 1.5rem 0 3rem;
}

/* Shared content card / table / empty state (global) */
.content-card-modern,
.sidebar-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    box-shadow: var(--shadow-sm);
}

.content-card-modern {
    overflow: hidden;
}

.content-card-header-modern {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(180deg, var(--bg-muted), transparent);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.content-card-title-modern {
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    font-size: 1rem;
    font-weight: 900;
    color: var(--text);
}

.home-table {
    margin-bottom: 0;
}

.home-table th {
    font-size: .72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
    border-color: var(--border);
    background: var(--bg-muted);
    white-space: nowrap;
}

.home-table td {
    vertical-align: middle;
    border-color: var(--border-light);
    color: var(--text-secondary);
    font-size: .88rem;
}

.home-table tbody tr:hover td {
    background: var(--primary-bg);
}

.item-title-link {
    color: var(--text);
    font-weight: 900;
}

.item-title-link:hover {
    color: var(--primary);
}

.meta-muted {
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 600;
}

.empty-state-modern {
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--text-muted);
}

.empty-state-modern i {
    display: block;
    font-size: 2.25rem;
    margin-bottom: .6rem;
    opacity: .55;
}

.empty-state-modern strong {
    display: block;
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: .25rem;
}

.quick-pill-modern {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    padding: .65rem .9rem;
    border-radius: 999px;
    background: var(--bg-muted);
    color: var(--text-secondary);
    font-size: .84rem;
    font-weight: 800;
    border: 1px solid var(--border);
}

.quick-pill-modern:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: translateY(-1px);
}

/* Loading bar shared by HTMX list pages */
.list-loading {
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    height: 3px;
    z-index: 9999;
    background: var(--bg-muted);
    display: none;
    overflow: hidden;
}

.list-loading-bar {
    height: 100%;
    width: 30%;
    background: linear-gradient(90deg, var(--primary), var(--info));
    border-radius: 3px;
    animation: progress-indeterminate 1.5s ease infinite;
}

.list-loading.htmx-request {
    display: block !important;
}

@keyframes progress-indeterminate {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

/* Utility: allow flex children to shrink/truncate (used in mobile cards) */
.min-w-0 {
    min-width: 0;
}

/* ── Step 11 Dashboard & Profile: SaaS components ──────────────
   Reusable stat cards, progress rings, profile tabs, avatar.
   Bootstrap-compatible; replaces previous Tailwind-only profile. */
.dash-hero {
    padding: clamp(1.5rem, 4vw, 2.5rem) 0 1rem;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 28rem),
        radial-gradient(circle at top right, rgba(79, 70, 229, .10), transparent 28rem),
        var(--bg);
    border-bottom: 1px solid var(--border);
}

.dash-welcome {
    color: var(--text);
    font-weight: 900;
    letter-spacing: -.03em;
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    margin-bottom: .3rem;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.25rem;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .85rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: .75rem;
}

.stat-icon.primary {
    background: var(--primary-bg);
    color: var(--primary);
}

.stat-icon.success {
    background: var(--success-bg);
    color: var(--success-dark);
}

.stat-icon.warning {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.stat-icon.danger {
    background: var(--danger-bg);
    color: var(--danger-dark);
}

.stat-label {
    font-size: .72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--text-muted);
}

.stat-value {
    font-size: 2rem;
    font-weight: 900;
    line-height: 1.1;
    margin: .25rem 0;
    color: var(--text);
}

.stat-sub {
    font-size: .78rem;
    color: var(--text-secondary);
}

/* Profile completion ring (CSS conic-gradient) */
.completion-ring {
    --val: 0;
    width: 4.5rem;
    height: 4.5rem;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background:
        radial-gradient(closest-side, var(--bg-card) 72%, transparent 73%),
        conic-gradient(var(--primary) calc(var(--val) * 1%), var(--bg-muted) 0);
    flex-shrink: 0;
}

.completion-ring span {
    font-size: .9rem;
    font-weight: 900;
    color: var(--primary);
}

/* Profile avatar */
.profile-avatar {
    width: 5.5rem;
    height: 5.5rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 1.6rem;
    font-weight: 900;
    border: 4px solid var(--bg-card);
    box-shadow: var(--shadow-md);
    flex-shrink: 0;
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Profile tabs (Bootstrap nav-pills compatible) */
.profile-tab-btn {
    display: flex;
    align-items: center;
    gap: .65rem;
    width: 100%;
    padding: .7rem 1rem;
    border-radius: .85rem;
    font-weight: 800;
    font-size: .9rem;
    border: 1px solid transparent;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .15s ease;
    text-align: left;
}

.profile-tab-btn:hover {
    background: var(--bg-muted);
    color: var(--text);
}

.profile-tab-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: var(--shadow-sm);
}

.profile-tab-pane {
    display: none;
}

.profile-tab-pane.active {
    display: block;
}

/* Attempt rows */
.attempt-row-modern {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .85rem 0;
    border-bottom: 1px solid var(--border-light);
}

.attempt-row-modern:last-child {
    border-bottom: none;
}

/* ── Step 12 Mock Test: cards, detail, result components ───────── */
.test-card-modern {
    display: block;
    text-decoration: none;
    height: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.1rem;
    box-shadow: var(--shadow-sm);
    padding: 1.1rem;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.test-card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
}

.test-icon-modern {
    width: 2.75rem;
    height: 2.75rem;
    border-radius: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .72rem;
    font-weight: 800;
    flex-shrink: 0;
}

.test-icon-ssc {
    background: var(--primary-bg);
    color: var(--primary);
}

.test-icon-banking {
    background: var(--success-bg);
    color: var(--success-dark);
}

.test-icon-railway {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.test-icon-psc {
    background: #EDE9FE;
    color: #6D28D9;
}

.test-title-modern {
    font-weight: 800;
    font-size: .95rem;
    color: var(--text);
    line-height: 1.35;
    margin: .15rem 0;
}

.test-meta-modern {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem .85rem;
    margin: .65rem 0;
    color: var(--text-muted);
    font-size: .78rem;
    font-weight: 700;
}

.test-meta-modern i {
    color: var(--primary);
}

.test-attempt-btn-modern {
    width: 100%;
    padding: .6rem;
    border-radius: .75rem;
    font-size: .85rem;
    font-weight: 800;
    border: none;
    background: var(--bg-muted);
    color: var(--text-secondary);
    transition: all .2s ease;
}

.test-card-modern:hover .test-attempt-btn-modern {
    background: var(--success);
    color: #fff;
}

.diff-badge {
    font-size: .68rem;
    font-weight: 800;
    padding: .15rem .55rem;
    border-radius: 999px;
}

.diff-easy {
    background: var(--success-bg);
    color: var(--success-dark);
}

.diff-medium {
    background: var(--warning-bg);
    color: var(--warning-dark);
}

.diff-hard {
    background: var(--danger-bg);
    color: var(--danger-dark);
}

.test-grid-modern {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.type-header-modern {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text);
    margin: 1rem 0 .9rem;
    padding-left: .75rem;
    border-left: 3px solid var(--primary);
    letter-spacing: -.01em;
}

/* Test detail */
.stat-pill-modern {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: .4rem .8rem;
    font-size: .8rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.stat-pill-modern i {
    color: var(--primary);
}

.score-box-modern {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: .85rem;
    padding: 1rem .5rem;
    text-align: center;
}

.score-box-num-modern {
    font-size: 1.6rem;
    font-weight: 900;
    color: var(--primary);
}

.score-box-label-modern {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .25rem;
}

.detail-sidebar-sticky {
    position: sticky;
    top: 80px;
}

/* Result page */
.result-banner-modern {
    color: #fff;
    padding: 2.25rem 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.score-circle-modern {
    width: 8rem;
    height: 8rem;
    border-radius: 50%;
    border: 6px solid rgba(255, 255, 255, .3);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.r-stat-modern {
    background: rgba(255, 255, 255, .12);
    border-radius: .85rem;
    padding: .9rem;
    text-align: center;
}

.r-stat-num-modern {
    font-size: 1.5rem;
    font-weight: 900;
}

.r-stat-label-modern {
    font-size: .72rem;
    opacity: .8;
    margin-top: .15rem;
}

.q-review-item {
    border: 1px solid var(--border);
    border-radius: .85rem;
    overflow: hidden;
    margin-bottom: .75rem;
    background: var(--bg-card);
}

.q-review-top {
    padding: .6rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .84rem;
    font-weight: 700;
}

.q-review-top.correct {
    background: var(--success-bg);
    color: var(--success-dark);
}

.q-review-top.wrong {
    background: var(--danger-bg);
    color: var(--danger-dark);
}

.q-review-top.skipped {
    background: var(--bg-muted);
    color: var(--text-secondary);
}

.opt-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .45rem .65rem;
    border-radius: .5rem;
    font-size: .88rem;
    margin-bottom: .3rem;
    color: var(--text-secondary);
}

.opt-row.correct-opt {
    background: var(--success-bg);
    color: var(--success-dark);
    font-weight: 700;
}

.opt-row.wrong-opt {
    background: var(--danger-bg);
    color: var(--danger-dark);
    font-weight: 700;
}

.explanation-box {
    background: var(--warning-bg);
    border: 1px solid var(--warning-light, #FDE68A);
    border-radius: .6rem;
    padding: .65rem .9rem;
    margin-top: .65rem;
    font-size: .83rem;
    color: var(--warning-dark);
}

/* ── Step 13 Mock Test: upload, take-test components ───────────── */
/* CSV upload */
.drop-zone {
    border: 2px dashed var(--border);
    border-radius: .85rem;
    padding: 2.25rem 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    background: var(--bg-muted);
    position: relative;
}

.drop-zone:hover,
.drop-zone.dragover {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.drop-zone input[type=file] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

.drop-icon {
    font-size: 2.25rem;
    margin-bottom: .5rem;
    color: var(--primary);
}

.drop-text {
    font-weight: 800;
    font-size: .92rem;
    color: var(--text);
    margin-bottom: .25rem;
}

.drop-hint {
    font-size: .8rem;
    color: var(--text-muted);
}

.file-chosen {
    margin-top: .65rem;
    font-size: .82rem;
    font-weight: 700;
    color: var(--success-dark);
    display: none;
}

.step-num {
    background: var(--primary);
    color: #fff;
    width: 1.4rem;
    height: 1.4rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 800;
    margin-right: .5rem;
}

.upload-form-label {
    display: block;
    font-weight: 700;
    font-size: .84rem;
    color: var(--text-secondary);
    margin-bottom: .35rem;
}

.upload-form-control {
    width: 100%;
    padding: .6rem .8rem;
    border: 1px solid var(--border);
    border-radius: .65rem;
    font-size: .9rem;
    color: var(--text);
    background: var(--bg-card);
    transition: border .15s, box-shadow .15s;
}

.upload-form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 .2rem rgba(37, 99, 235, .12);
}

.upload-progress {
    display: none;
    margin-top: 1rem;
}

.progress-bar-wrap {
    background: var(--bg-muted);
    border-radius: 999px;
    height: .5rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
    width: 0;
    transition: width .3s;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 2.75rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    inset: 0;
    background: var(--border);
    border-radius: 1.5rem;
    cursor: pointer;
    transition: .2s;
}

.slider:before {
    content: '';
    position: absolute;
    width: 1.1rem;
    height: 1.1rem;
    border-radius: 50%;
    background: #fff;
    left: .2rem;
    top: .2rem;
    transition: .2s;
}

.switch input:checked+.slider {
    background: var(--primary);
}

.switch input:checked+.slider:before {
    transform: translateX(1.25rem);
}

.format-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .78rem;
}

.format-table th {
    background: var(--bg-muted);
    padding: .45rem .6rem;
    text-align: left;
    font-weight: 800;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border);
}

.format-table td {
    padding: .45rem .6rem;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-secondary);
    vertical-align: top;
}

.format-table tr:last-child td {
    border-bottom: none;
}

.req-badge {
    background: var(--danger-bg);
    color: var(--danger-dark);
    padding: .05rem .4rem;
    border-radius: .25rem;
    font-size: .68rem;
    font-weight: 800;
}

.opt-badge {
    background: var(--bg-muted);
    color: var(--text-secondary);
    padding: .05rem .4rem;
    border-radius: .25rem;
    font-size: .68rem;
    font-weight: 800;
}

.upload-test-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .7rem 0;
    border-bottom: 1px solid var(--border-light);
    gap: .65rem;
}

.upload-test-row:last-child {
    border-bottom: none;
}

/* Take-test interactive engine */
.test-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: .75rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.test-title-bar {
    font-weight: 800;
    font-size: .9rem;
    color: var(--text);
}

.timer {
    background: var(--primary);
    color: #fff;
    padding: .45rem 1.1rem;
    border-radius: 999px;
    font-weight: 900;
    font-size: 1rem;
    letter-spacing: 2px;
    min-width: 6rem;
    text-align: center;
    transition: background .3s;
}

.timer.warning {
    background: var(--warning);
}

.timer.danger {
    background: var(--danger);
    animation: blink .5s infinite;
}

@keyframes blink {
    50% {
        opacity: .6;
    }
}

.test-body {
    display: grid;
    grid-template-columns: 1fr 16rem;
    gap: 1rem;
    padding: 1rem;
    max-width: 80rem;
    margin: 0 auto;
}

.q-panel {
    background: var(--bg-card);
    border-radius: .85rem;
    border: 1px solid var(--border);
    overflow: hidden;
}

.q-top {
    background: var(--bg-muted);
    padding: .75rem 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.q-num {
    font-weight: 800;
    font-size: .86rem;
    color: var(--primary);
}

.q-text {
    padding: 1.25rem;
    font-size: .97rem;
    line-height: 1.7;
    color: var(--text);
    font-weight: 500;
}

.options {
    padding: 0 1.25rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.option-row {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border: 2px solid var(--border);
    border-radius: .6rem;
    cursor: pointer;
    transition: all .15s;
    font-size: .92rem;
    color: var(--text);
}

.option-row:hover,
.option-row.selected {
    border-color: var(--primary);
    background: var(--primary-bg);
}

.option-key {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .8rem;
    flex-shrink: 0;
    transition: all .15s;
}

.option-row.selected .option-key {
    background: var(--primary);
    color: #fff;
}

.q-footer {
    padding: .9rem 1.25rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .65rem;
}

.nav-btns {
    display: flex;
    gap: .5rem;
}

.nav-btn {
    padding: .5rem 1.1rem;
    border-radius: .5rem;
    font-size: .84rem;
    font-weight: 700;
    border: 1px solid var(--border);
    cursor: pointer;
    background: var(--bg-card);
    color: var(--text);
    transition: all .15s;
}

.nav-btn:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.nav-btn.primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.nav-btn.primary:hover {
    background: var(--primary-dark);
    color: #fff;
}

.palette-panel {
    background: var(--bg-card);
    border-radius: .85rem;
    border: 1px solid var(--border);
    height: fit-content;
    position: sticky;
    top: 4.5rem;
    overflow: hidden;
}

.palette-top {
    background: var(--text);
    color: var(--bg-card);
    padding: .75rem .9rem;
    font-weight: 800;
    font-size: .86rem;
}

.palette-body {
    padding: .75rem;
}

.palette-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: .3rem;
    margin-bottom: .75rem;
}

.p-btn {
    aspect-ratio: 1;
    border-radius: .35rem;
    border: 1px solid var(--border);
    background: var(--bg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 800;
    cursor: pointer;
    transition: all .1s;
    color: var(--text);
}

.p-btn.answered {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}

.p-btn.marked {
    background: var(--warning);
    border-color: var(--warning);
    color: #fff;
}

.p-btn.current {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 0 2px rgba(37, 99, 235, .2);
}

.legend {
    font-size: .76rem;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin-bottom: .75rem;
}

.legend-row {
    display: flex;
    align-items: center;
    gap: .4rem;
    color: var(--text-secondary);
}

.l-dot {
    width: .75rem;
    height: .75rem;
    border-radius: .2rem;
}

.overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .5);
    z-index: 999;
    align-items: center;
    justify-content: center;
}

.overlay.show {
    display: flex;
}

.test-modal {
    background: var(--bg-card);
    border-radius: .9rem;
    padding: 1.75rem;
    max-width: 24rem;
    width: 90%;
    text-align: center;
    color: var(--text);
}

.test-modal h3 {
    font-size: 1.2rem;
    font-weight: 900;
    margin-bottom: .6rem;
}

.modal-stats {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: .65rem;
    margin: 1rem 0;
}

.modal-stat {
    background: var(--bg-muted);
    border-radius: .5rem;
    padding: .75rem;
}

.modal-stat-num {
    font-size: 1.4rem;
    font-weight: 900;
}

.modal-stat-label {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .15rem;
}

@media (max-width: 800px) {
    .test-body {
        grid-template-columns: 1fr;
    }

    .palette-panel {
        position: static;
    }
}

/* ── Step 14 Current Affairs: timeline components ──────────────── */
.timeline-month {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: .85rem;
}

.timeline-month-pill {
    background: var(--primary);
    color: #fff;
    padding: .25rem .9rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 800;
    white-space: nowrap;
}

.timeline-month-pill.success {
    background: var(--success);
}

.timeline-month-line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.ca-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.15rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    transition: transform .2s ease, box-shadow .2s ease;
}

.ca-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.ca-date {
    flex-shrink: 0;
    width: 3rem;
    text-align: center;
    background: var(--primary-bg);
    border-radius: .6rem;
    padding: .4rem 0;
}

.ca-date-day {
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--primary);
    line-height: 1;
}

.ca-date-mon {
    font-size: .62rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 800;
}

.ca-title-link {
    font-weight: 800;
    font-size: .95rem;
    color: var(--text);
    display: block;
    line-height: 1.4;
}

.ca-title-link:hover {
    color: var(--primary);
}

.ca-summary {
    font-size: .85rem;
    color: var(--text-secondary);
    margin-top: .35rem;
    line-height: 1.6;
    margin-bottom: 0;
}

/* Article detail */
.article-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1.25rem;
    box-shadow: var(--shadow-sm);
    padding: clamp(1.25rem, 4vw, 2rem);
}

.article-body {
    font-size: .98rem;
    line-height: 1.85;
    color: var(--text-secondary);
}

.share-btn {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: .65rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    transition: transform .15s ease, opacity .15s ease;
}

.share-btn:hover {
    transform: translateY(-2px);
    opacity: .9;
    color: #fff;
}

.share-fb {
    background: #1877F2;
}

.share-tw {
    background: #1DA1F2;
}

.share-wa {
    background: #25D366;
}

.share-tg {
    background: #0088CC;
}

/* Exam calendar card */
.exam-cal-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: var(--shadow-sm);
    padding: 1rem;
    height: 100%;
    transition: transform .2s ease, box-shadow .2s ease;
}

.exam-cal-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.exam-cal-date {
    background: var(--primary-bg);
    color: var(--primary);
    padding: .5rem .7rem;
    border-radius: .65rem;
    text-align: center;
    flex-shrink: 0;
    min-width: 3.2rem;
}

.exam-cal-day {
    font-weight: 900;
    font-size: 1.1rem;
    line-height: 1;
}

.exam-cal-mon {
    font-size: .62rem;
    text-transform: uppercase;
    font-weight: 800;
}

/* ============================================================
   Step 15 — Bookmarks, Support, Auth & Error pages
   ============================================================ */

/* ---- Error / standalone empty states (404/403/500) ---- */
.error-state-modern {
    max-width: 40rem;
    margin: clamp(2rem, 8vw, 5rem) auto;
    text-align: center;
    padding: 2.5rem 1.25rem;
}

.error-code-modern {
    font-size: clamp(4rem, 16vw, 7rem);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.05em;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: .5rem;
}

.error-code-modern.danger {
    background: linear-gradient(135deg, var(--danger), var(--warning));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.error-title-modern {
    font-weight: 900;
    font-size: clamp(1.3rem, 4vw, 1.9rem);
    color: var(--text);
    margin-bottom: .6rem;
    letter-spacing: -.02em;
}

.error-text-modern {
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 30rem;
    margin: 0 auto 1.6rem;
}

.error-actions-modern {
    display: flex;
    gap: .75rem;
    justify-content: center;
    flex-wrap: wrap;
}

.error-ref-modern {
    margin-top: 1.6rem;
    font-size: .76rem;
    color: var(--text-muted);
}

/* ---- Bookmarks ---- */
.bm-group-icon {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 1.05rem;
    flex-shrink: 0;
}

.bm-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .95rem 1.15rem;
    border-bottom: 1px solid var(--border-light);
    transition: background .15s;
}

.bm-row:last-child {
    border-bottom: none;
}

.bm-row:hover {
    background: var(--bg-muted);
}

.bm-row-title {
    font-weight: 800;
    color: var(--text);
    text-decoration: none;
    transition: color .15s;
}

.bm-row-title:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* ---- Support: help center / FAQ ---- */
.support-quick-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .85rem;
    margin-bottom: 1.75rem;
}

@media (max-width: 768px) {
    .support-quick-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.support-ql-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.15rem .9rem;
    text-align: center;
    cursor: pointer;
    transition: all .2s;
    box-shadow: var(--shadow-sm);
}

.support-ql-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.support-ql-icon {
    width: 2.8rem;
    height: 2.8rem;
    margin: 0 auto .6rem;
    border-radius: .8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 1.25rem;
}

.support-ql-title {
    font-weight: 800;
    font-size: .9rem;
    color: var(--text);
    margin-bottom: .15rem;
}

.support-ql-count {
    font-size: .76rem;
    color: var(--text-muted);
}

.faq-cat-title {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--text);
    margin: 1.5rem 0 .75rem;
    padding-left: .75rem;
    border-left: 3px solid var(--primary);
}

.faq-item-modern {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: .85rem;
    margin-bottom: .6rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.faq-q-modern {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 1rem 1.15rem;
    font-weight: 700;
    font-size: .92rem;
    color: var(--text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    transition: background .15s;
}

.faq-q-modern:hover {
    background: var(--bg-muted);
}

.faq-q-modern.open {
    background: var(--primary-bg);
    color: var(--primary);
}

.faq-q-modern .faq-chevron {
    transition: transform .25s;
    flex-shrink: 0;
}

.faq-q-modern.open .faq-chevron {
    transform: rotate(180deg);
}

.faq-a-modern {
    display: none;
    padding: 0 1.15rem 1.05rem;
    color: var(--text-secondary);
    font-size: .9rem;
    line-height: 1.75;
}

.faq-a-modern.open {
    display: block;
}

/* ---- Support: policy (privacy / terms) ---- */
.policy-layout-modern {
    display: grid;
    grid-template-columns: 230px 1fr;
    gap: 1.75rem;
    align-items: flex-start;
}

@media (max-width: 860px) {
    .policy-layout-modern {
        grid-template-columns: 1fr;
    }
}

.policy-nav-modern {
    position: sticky;
    top: 5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

@media (max-width: 860px) {
    .policy-nav-modern {
        position: static;
    }
}

.policy-nav-head-modern {
    background: var(--bg-muted);
    padding: .8rem 1rem;
    font-weight: 800;
    font-size: .86rem;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.policy-nav-modern a {
    display: block;
    padding: .65rem 1rem;
    font-size: .85rem;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    transition: all .15s;
}

.policy-nav-modern a:last-child {
    border-bottom: none;
}

.policy-nav-modern a:hover {
    background: var(--primary-bg);
    color: var(--primary);
    padding-left: 1.35rem;
}

.policy-nav-modern a.active {
    background: var(--primary-bg);
    color: var(--primary);
    font-weight: 700;
    border-left: 3px solid var(--primary);
}

.policy-content-modern {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: clamp(1.25rem, 4vw, 2.25rem);
    box-shadow: var(--shadow-sm);
}

.policy-content-modern h2 {
    font-size: 1.35rem;
    font-weight: 900;
    color: var(--text);
    margin: 2rem 0 .4rem;
    letter-spacing: -.02em;
}

.policy-content-modern h2:first-of-type {
    margin-top: 0;
}

.policy-content-modern h3 {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text);
    margin: 1.25rem 0 .5rem;
}

.policy-content-modern p {
    color: var(--text-secondary);
    line-height: 1.85;
    margin-bottom: .9rem;
}

.policy-content-modern ul {
    color: var(--text-secondary);
    line-height: 1.85;
    padding-left: 1.25rem;
    margin-bottom: .9rem;
}

.policy-content-modern ul li {
    margin-bottom: .35rem;
}

.policy-content-modern a {
    color: var(--primary);
    font-weight: 600;
}

.policy-divider {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 1.75rem 0;
}

.policy-highlight {
    background: var(--primary-bg);
    border: 1px solid var(--border);
    border-left: 3px solid var(--primary);
    border-radius: .7rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1.25rem;
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: .9rem;
}

.policy-highlight.warn {
    background: var(--warning-bg);
    border-left-color: var(--warning);
    color: var(--warning-dark);
}

/* ---- Support: contact ---- */
.contact-layout-modern {
    display: grid;
    grid-template-columns: 1fr 360px;
    gap: 1.5rem;
    align-items: flex-start;
}

@media (max-width: 900px) {
    .contact-layout-modern {
        grid-template-columns: 1fr;
    }
}

.subject-tab-modern {
    padding: .5rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    font-size: .82rem;
    font-weight: 700;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all .15s;
}

.subject-tab-modern:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.subject-tab-modern.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.contact-info-head-modern {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    padding: 1.4rem 1.25rem;
}

.contact-info-head-modern h3 {
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: .2rem;
}

.contact-info-head-modern p {
    font-size: .84rem;
    opacity: .85;
    margin: 0;
}

.info-item-modern {
    display: flex;
    gap: .9rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-light);
}

.info-item-modern:last-child {
    border-bottom: none;
}

.info-icon-modern {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
    background: var(--primary-bg);
    color: var(--primary);
}

.info-label-modern {
    font-size: .72rem;
    color: var(--text-muted);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .15rem;
}

.info-val-modern {
    font-size: .9rem;
    font-weight: 700;
    color: var(--text);
}

.info-sub-modern {
    font-size: .78rem;
    color: var(--text-muted);
    margin-top: .1rem;
}

/* ---- Standalone auth pages (login/register/forgot/reset) ---- */
.auth-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 26rem),
        radial-gradient(circle at bottom right, rgba(79, 70, 229, .10), transparent 26rem),
        #F8FAFC;
    background-image:
        radial-gradient(circle at top left, rgba(37, 99, 235, .10), transparent 26rem),
        radial-gradient(circle at bottom right, rgba(79, 70, 229, .10), transparent 26rem),
        radial-gradient(rgba(37, 99, 235, .10) 1.5px, transparent 1.5px);
    background-size: auto, auto, 24px 24px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #0F172A;
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1.75rem;
    font-weight: 900;
    font-size: 1.4rem;
    color: #0F172A;
    letter-spacing: -.02em;
    text-decoration: none;
}

.auth-brand-badge {
    width: 2.4rem;
    height: 2.4rem;
    border-radius: .7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    color: #fff;
    font-size: 1.15rem;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}

.auth-brand-accent {
    color: #2563EB;
}

.auth-card {
    background: #fff;
    width: 100%;
    max-width: 28rem;
    padding: clamp(1.75rem, 5vw, 2.5rem);
    border-radius: 1.75rem;
    box-shadow: 0 20px 60px rgba(37, 99, 235, .12);
    border: 1px solid #EEF2F7;
}

.auth-head {
    text-align: center;
    margin-bottom: 1.75rem;
}

.auth-head h1 {
    font-size: 1.7rem;
    font-weight: 900;
    color: #0F172A;
    margin-bottom: .4rem;
    letter-spacing: -.02em;
}

.auth-head p {
    color: #94A3B8;
    font-weight: 500;
    margin: 0;
}

.auth-iconwrap {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1.4rem;
    background: #DBEAFE;
    color: #2563EB;
}

.auth-iconwrap.success {
    background: #DCFCE7;
    color: #16A34A;
}

.auth-field {
    margin-bottom: 1.1rem;
}

.auth-label {
    display: block;
    font-size: .85rem;
    font-weight: 700;
    color: #334155;
    margin-bottom: .45rem;
    margin-left: .15rem;
}

.auth-label .opt {
    color: #CBD5E1;
    font-weight: 500;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-wrap>.bi {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #CBD5E1;
    font-size: 1rem;
    pointer-events: none;
    transition: color .15s;
}

.auth-input-wrap:focus-within>.bi {
    color: #2563EB;
}

.auth-input {
    width: 100%;
    padding: .85rem 1rem .85rem 2.65rem;
    background: #fff;
    border: 1px solid #E2E8F0;
    border-radius: 1rem;
    font-size: .95rem;
    font-family: inherit;
    color: #0F172A;
    transition: all .15s;
    outline: none;
}

.auth-input::placeholder {
    color: #CBD5E1;
}

.auth-input:focus {
    border-color: #2563EB;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}

.auth-btn {
    width: 100%;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #2563EB, #4F46E5);
    color: #fff;
    padding: .95rem;
    border-radius: 1rem;
    font-weight: 800;
    font-size: 1rem;
    font-family: inherit;
    box-shadow: 0 10px 24px rgba(37, 99, 235, .25);
    transition: transform .15s, box-shadow .15s;
}

.auth-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, .3);
}

.auth-btn:active {
    transform: translateY(0);
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 1.75rem 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    border-top: 1px solid #F1F5F9;
}

.auth-divider span {
    position: relative;
    background: #fff;
    padding: 0 1rem;
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .15em;
    color: #94A3B8;
}

.auth-socials {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .85rem;
}

.auth-social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .6rem;
    padding: .75rem;
    border: 1px solid #EEF2F7;
    border-radius: 1rem;
    font-weight: 700;
    font-size: .9rem;
    color: #475569;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}

.auth-social-btn:hover {
    background: #F8FAFC;
    border-color: #E2E8F0;
}

.auth-social-btn .bi {
    font-size: 1.05rem;
}

.auth-social-btn .bi-google {
    color: #EA4335;
}

.auth-social-btn .bi-facebook {
    color: #1877F2;
}

.auth-foot {
    text-align: center;
    margin-top: 1.75rem;
    color: #64748B;
    font-weight: 500;
    font-size: .92rem;
}

.auth-foot a {
    color: #2563EB;
    font-weight: 800;
    text-decoration: none;
}

.auth-foot a:hover {
    text-decoration: underline;
}

.auth-msg {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1rem;
    border-radius: .9rem;
    font-size: .88rem;
    font-weight: 600;
    margin-bottom: .6rem;
}

.auth-msg.error {
    background: #FEE2E2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

.auth-msg.success {
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.auth-msg.info {
    background: #DBEAFE;
    color: #1E40AF;
    border: 1px solid #BFDBFE;
}

.auth-hint {
    font-size: .78rem;
    font-weight: 600;
    margin: .4rem 0 0 .15rem;
    min-height: 1rem;
}

.auth-hint.ok {
    color: #16A34A;
}

.auth-hint.bad {
    color: #DC2626;
}

.auth-forgot {
    text-align: right;
    margin-top: .5rem;
}

.auth-forgot a {
    font-size: .8rem;
    font-weight: 700;
    color: #2563EB;
    text-decoration: none;
}

.auth-forgot a:hover {
    text-decoration: underline;
}

.auth-dev-box {
    margin-top: 1.25rem;
    background: #FEF3C7;
    border: 1px solid #FDE68A;
    border-radius: 1rem;
    padding: 1rem;
    font-size: .85rem;
}

.auth-dev-box p {
    font-weight: 800;
    color: #92400E;
    margin: 0 0 .35rem;
}

.auth-dev-box a {
    color: #2563EB;
    font-weight: 700;
    word-break: break-all;
}

.auth-back {
    margin-top: 1.5rem;
    color: #94A3B8;
    font-weight: 700;
    font-size: .9rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

.auth-back:hover {
    color: #475569;
}

.auth-copy {
    margin-top: 2rem;
    color: #94A3B8;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    text-align: center;
}

/* ============================================================
   Step 17 — Crawler dashboard (staff-only internal page)
   ============================================================ */
.crawler-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .9rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 768px) {
    .crawler-stat-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.crawler-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.15rem 1rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform .15s, box-shadow .15s;
}

.crawler-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.crawler-stat-num {
    font-size: 1.9rem;
    font-weight: 900;
    line-height: 1.1;
    color: var(--primary);
}

.crawler-stat-num.success {
    color: var(--success);
}

.crawler-stat-num.secondary {
    color: var(--secondary);
}

.crawler-stat-label {
    font-size: .72rem;
    color: var(--text-muted);
    margin-top: .3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.crawler-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .crawler-2col {
        grid-template-columns: 1fr;
    }
}

.crawler-section-title {
    font-weight: 900;
    font-size: 1rem;
    color: var(--text);
    margin-bottom: .85rem;
    letter-spacing: -.01em;
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.source-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: .85rem;
    padding: 1rem 1.15rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .85rem;
    flex-wrap: wrap;
    margin-bottom: .6rem;
    box-shadow: var(--shadow-sm);
}

.source-dot-modern {
    width: .65rem;
    height: .65rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.source-dot-modern.on {
    background: var(--success);
    box-shadow: 0 0 0 .25rem var(--success-bg);
}

.source-dot-modern.off {
    background: var(--text-muted);
}

.source-name-modern {
    font-weight: 800;
    font-size: .9rem;
    color: var(--text);
}

.crawler-cmd {
    background: var(--bg-muted);
    border: 1px solid var(--border-light);
    color: var(--text);
    padding: .55rem .85rem;
    border-radius: .5rem;
    display: block;
    font-size: .82rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    word-break: break-all;
}

.crawler-cmd-label {
    font-weight: 800;
    margin-bottom: .35rem;
    color: var(--primary);
    font-size: .82rem;
}

.crawler-log-error {
    background: var(--danger-bg);
    color: var(--danger-dark);
    font-size: .78rem;
}

/* ── Global Bootstrap Modal & Backdrop Z-Index Fix ───────────────── */
.modal-backdrop {
    z-index: 10500 !important;
}

.modal {
    z-index: 10600 !important;
}

.modal-dialog {
    z-index: 10610 !important;
}

.modal-content {
    position: relative;
    z-index: 10620 !important;
}



  /* JSON Generator Styles  */

    /* ── Trigger Button Badge ── */
    .json-gen-trigger-btn {
        position: relative;
        color: #8b5cf6 !important;
    }
    .json-gen-trigger-btn:hover {
        background: rgba(139,92,246,.12) !important;
        color: #7c3aed !important;
    }
    .json-gen-badge {
        position: absolute;
        top: 2px;
        right: 2px;
        font-size: 7px;
        font-weight: 800;
        letter-spacing: .3px;
        background: linear-gradient(135deg,#8b5cf6,#6d28d9);
        color: #fff;
        border-radius: 4px;
        padding: 1px 3px;
        line-height: 1.2;
        pointer-events: none;
    }

    /* ── Modal Shell ── */
    .json-gen-modal-content {
        background: var(--bs-body-bg, #fff);
        border: 1px solid rgba(139,92,246,.2);
        border-radius: 20px !important;
        overflow: hidden;
        box-shadow: 0 25px 60px rgba(139,92,246,.18), 0 8px 24px rgba(0,0,0,.12);
    }

    /* ── Modal Header ── */
    .json-gen-modal-header {
        background: linear-gradient(135deg,rgba(139,92,246,.08),rgba(109,40,217,.05));
        padding: 1.25rem 1.5rem;
        border-bottom: 1px solid rgba(139,92,246,.12) !important;
    }
    .json-gen-modal-title-wrap {
        display: flex;
        align-items: center;
        gap: .85rem;
    }
    .json-gen-icon-badge {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        background: linear-gradient(135deg,#8b5cf6,#6d28d9);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: #fff;
        flex-shrink: 0;
        box-shadow: 0 4px 12px rgba(139,92,246,.35);
    }

    /* ── Modal Body ── */
    .json-gen-modal-body {
        padding: 1.5rem;
        display: flex;
        flex-direction: column;
        gap: 1.1rem;
    }
    .json-gen-section {
        display: flex;
        flex-direction: column;
        gap: .5rem;
    }
    .json-gen-label {
        font-weight: 600;
        font-size: .85rem;
        color: var(--bs-body-color, #374151);
        display: flex;
        align-items: center;
        gap: .25rem;
    }
    .json-gen-hint {
        font-weight: 400;
        font-size: .78rem;
        color: #6b7280;
        margin-left: .25rem;
    }
    .json-gen-textarea {
        width: 100%;
        border: 1.5px solid rgba(139,92,246,.25);
        border-radius: 12px;
        padding: .85rem 1rem;
        font-family: "Inter", "Segoe UI", sans-serif;
        font-size: .88rem;
        line-height: 1.6;
        resize: vertical;
        background: rgba(139,92,246,.03);
        color: var(--bs-body-color, #111827);
        transition: border-color .2s, box-shadow .2s;
        outline: none;
    }
    .json-gen-textarea:focus {
        border-color: #8b5cf6;
        box-shadow: 0 0 0 3px rgba(139,92,246,.15);
        background: rgba(139,92,246,.05);
    }

    /* ── Controls ── */
    .json-gen-controls {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: wrap;
        gap: .75rem;
    }
    .json-gen-options {
        display: flex;
        align-items: center;
        gap: .6rem;
    }
    .json-gen-option-label {
        font-size: .82rem;
        font-weight: 500;
        color: #6b7280;
        display: flex;
        align-items: center;
    }
    .json-gen-num-input {
        width: 72px;
        border: 1.5px solid rgba(139,92,246,.3);
        border-radius: 8px;
        padding: .3rem .6rem;
        font-size: .85rem;
        font-weight: 600;
        color: #6d28d9;
        background: rgba(139,92,246,.05);
        outline: none;
        text-align: center;
        transition: border-color .2s;
    }
    .json-gen-num-input:focus { border-color: #8b5cf6; }
    .json-gen-btn-group { display: flex; gap: .6rem; }
    .json-gen-btn {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        border: none;
        border-radius: 10px;
        font-size: .83rem;
        font-weight: 600;
        padding: .48rem 1rem;
        cursor: pointer;
        transition: all .18s;
    }
    .json-gen-btn-clear {
        background: rgba(239,68,68,.08);
        color: #ef4444;
        border: 1px solid rgba(239,68,68,.2);
    }
    .json-gen-btn-clear:hover {
        background: rgba(239,68,68,.15);
        transform: translateY(-1px);
    }
    .json-gen-btn-generate {
        background: linear-gradient(135deg,#8b5cf6,#6d28d9);
        color: #fff;
        box-shadow: 0 4px 14px rgba(139,92,246,.35);
    }
    .json-gen-btn-generate:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 20px rgba(139,92,246,.45);
    }
    .json-gen-btn-generate:active { transform: translateY(0); }

    /* ── Output ── */
    .json-gen-output-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .json-gen-count-badge {
        background: linear-gradient(135deg,#8b5cf6,#6d28d9);
        color: #fff;
        border-radius: 20px;
        font-size: .7rem;
        font-weight: 700;
        padding: 1px 8px;
        margin-left: .4rem;
    }
    .json-gen-copy-btn {
        display: inline-flex;
        align-items: center;
        gap: .35rem;
        border: 1.5px solid rgba(139,92,246,.3);
        background: rgba(139,92,246,.06);
        color: #6d28d9;
        border-radius: 8px;
        font-size: .78rem;
        font-weight: 600;
        padding: .3rem .75rem;
        cursor: pointer;
        transition: all .18s;
    }
    .json-gen-copy-btn:hover {
        background: rgba(139,92,246,.15);
        transform: translateY(-1px);
    }
    .json-gen-copy-btn.copied {
        background: rgba(16,185,129,.1);
        border-color: rgba(16,185,129,.4);
        color: #059669;
    }
    .json-gen-output {
        background: #1e1b4b;
        color: #c4b5fd;
        border-radius: 12px;
        padding: 1rem 1.1rem;
        font-family: "Fira Code", "Cascadia Code", "Consolas", monospace;
        font-size: .82rem;
        line-height: 1.7;
        max-height: 280px;
        overflow-y: auto;
        white-space: pre;
        border: 1px solid rgba(139,92,246,.2);
        margin: 0;
        scrollbar-width: thin;
        scrollbar-color: #6d28d9 #1e1b4b;
    }
    .json-gen-output::-webkit-scrollbar { width: 6px; }
    .json-gen-output::-webkit-scrollbar-track { background: #1e1b4b; }
    .json-gen-output::-webkit-scrollbar-thumb { background: #6d28d9; border-radius: 3px; }

    /* ── Empty State ── */
    .json-gen-empty {
        display: flex;
        align-items: center;
        gap: .6rem;
        padding: .85rem 1rem;
        background: rgba(239,68,68,.06);
        border: 1px solid rgba(239,68,68,.18);
        border-radius: 10px;
        color: #dc2626;
        font-size: .84rem;
        font-weight: 500;
    }

    /* ── Modal Footer ── */
    .json-gen-modal-footer {
        background: rgba(139,92,246,.04);
        border-top: 1px solid rgba(139,92,246,.1) !important;
        padding: .9rem 1.5rem;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .json-gen-footer-note {
        font-size: .76rem;
        color: #9ca3af;
        display: flex;
        align-items: center;
    }

    /* ── Dark-mode tweaks ── */
    [data-theme="dark"] .json-gen-modal-content,
    [data-bs-theme="dark"] .json-gen-modal-content {
        background: #0f0d1a;
        border-color: rgba(139,92,246,.3);
    }
    [data-theme="dark"] .json-gen-textarea,
    [data-bs-theme="dark"] .json-gen-textarea {
        background: rgba(139,92,246,.06);
        color: #e9d5ff;
        border-color: rgba(139,92,246,.3);
    }
    [data-theme="dark"] .json-gen-modal-header,
    [data-bs-theme="dark"] .json-gen-modal-header {
        background: linear-gradient(135deg,rgba(139,92,246,.12),rgba(109,40,217,.08));
    }
  
