/* ==========================================================================
   Police Communication SI & PC Portal — Modern, High-Performance Design System
   ========================================================================== */

:root {
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-mono: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    
    /* Neutral Palette */
    --bg-dark: #090d16;
    --bg-surface: #111827;
    --bg-card: #1e293b;
    --bg-card-hover: #26354a;
    --border-color: #334155;
    --border-subtle: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-dim: #64748b;
    
    /* SI Portal Brand (Deep Tech Blue & Cyan) */
    --si-primary: #2563eb;
    --si-primary-hover: #1d4ed8;
    --si-accent: #38bdf8;
    --si-bg-gradient: linear-gradient(135deg, #0b1528 0%, #172554 100%);
    --si-card-border: #1e3a8a;
    --si-badge-bg: rgba(37, 99, 235, 0.18);
    --si-badge-text: #93c5fd;

    /* PC Portal Brand (Deep Forest Green & Mint) */
    --pc-primary: #059669;
    --pc-primary-hover: #047857;
    --pc-accent: #34d399;
    --pc-bg-gradient: linear-gradient(135deg, #052119 0%, #064e3b 100%);
    --pc-card-border: #065f46;
    --pc-badge-bg: rgba(5, 150, 105, 0.18);
    --pc-badge-text: #a7f3d0;

    /* Common Utility Colors */
    --gold: #f59e0b;
    --gold-bg: rgba(245, 158, 11, 0.15);
    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.15);
    --green: #10b981;
    --green-bg: rgba(16, 185, 129, 0.15);
}

/* ==========================================================================
   COLORFUL SCROLLING MOTIVATIONAL QUOTES TICKER
   ========================================================================== */

.quote-ticker-wrap {
    width: 100%;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 25%, #ec4899 50%, #f59e0b 75%, #10b981 100%);
    background-size: 250% 250%;
    animation: gradientShift 12s ease infinite;
    padding: 7px 0;
    overflow: hidden;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 35px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    z-index: 10001 !important;
}

body {
    padding-top: 80px !important;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.quote-ticker-content {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: quoteMarquee 48s linear infinite;
    font-size: 13.5px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
    letter-spacing: 0.3px;
}

.quote-ticker-wrap:hover .quote-ticker-content {
    animation-play-state: paused;
}

@keyframes quoteMarquee {
    0% { transform: translate3d(0, 0, 0); }
    100% { transform: translate3d(-100%, 0, 0); }
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-right: 48px;
}

.ticker-bullet {
    color: #fef08a;
    font-size: 15px;
}

/* Candidate Account Bar - Frozen at Top-Right Corner */
.account-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    transition: all 0.25s ease;
}

@media (min-width: 900px) {
    .portal-header-pc .account-bar {
        position: static;
        background: none;
        padding: 0;
        border: none;
        box-shadow: none;
    }
}

/* ==========================================================================
   LANDING PAGE (index.html) STYLING
   ========================================================================== */

.landing-container {
    max-width: 1720px;
    width: 95%;
    margin: 0 auto;
    padding: 24px 20px 60px;
}

.landing-hero {
    text-align: center;
    padding: 40px 20px 30px;
}

.official-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.35);
    padding: 6px 16px;
    border-radius: 24px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin-bottom: 18px;
    text-transform: uppercase;
}

.landing-hero h1 {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0 0 12px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.5px;
}

.landing-hero .hero-sub {
    font-size: 1.15rem;
    color: var(--text-muted);
    max-width: 780px;
    margin: 0 auto 10px;
    line-height: 1.6;
}

.landing-hero .hero-telugu {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 24px;
}

.portal-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
    gap: 28px;
    margin: 24px 0 40px;
}

.portal-entry-card {
    position: relative;
    border-radius: 20px;
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.portal-entry-card:hover {
    transform: translateY(-5px);
}

/* SI Card Specifics */
.portal-card-si {
    background: var(--si-bg-gradient);
    border: 2px solid #2563eb;
}

.portal-card-si:hover {
    border-color: #60a5fa;
    box-shadow: 0 15px 40px rgba(37, 99, 235, 0.35);
}

.portal-card-si .portal-badge {
    background: var(--si-badge-bg);
    color: var(--si-badge-text);
    border: 1px solid rgba(56, 189, 248, 0.4);
}

.portal-card-si .enter-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.portal-card-si .enter-btn:hover {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
}

/* PC Card Specifics */
.portal-card-pc {
    background: var(--pc-bg-gradient);
    border: 2px solid #059669;
}

.portal-card-pc:hover {
    border-color: #34d399;
    box-shadow: 0 15px 40px rgba(5, 150, 105, 0.35);
}

.portal-card-pc .portal-badge {
    background: var(--pc-badge-bg);
    color: var(--pc-badge-text);
    border: 1px solid rgba(52, 211, 153, 0.4);
}

.portal-card-pc .enter-btn {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.4);
}

.portal-card-pc .enter-btn:hover {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 6px 20px rgba(5, 150, 105, 0.6);
}

/* Card Content Structure */
.portal-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 16px;
}

.portal-entry-card h2 {
    font-size: 1.85rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #ffffff;
}

.portal-telugu-name {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin-bottom: 18px;
    font-weight: 500;
}

.portal-features-list {
    list-style: none;
    padding: 0;
    margin: 20px 0 28px;
}

.portal-features-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 0;
    font-size: 14.5px;
    color: #e2e8f0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-features-list li:last-child {
    border-bottom: none;
}

.feature-icon {
    font-size: 18px;
}

.enter-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    width: 100%;
    box-sizing: border-box;
}

/* Landing Overview Stats Bar */
.platform-stats-bar {
    background: #111827;
    border: 1px solid #1e293b;
    border-radius: 16px;
    padding: 24px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    text-align: center;
}

.stat-item .stat-num {
    font-size: 2rem;
    font-weight: 900;
    color: #fbbf24;
    margin-bottom: 4px;
}

.stat-item .stat-lbl {
    font-size: 12px;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   PORTAL PAGES (si_communication/index.html & pc_communication/index.html)
   ========================================================================== */

/* Breadcrumb Navigation */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 13.5px;
}

.breadcrumb-bar a {
    color: #38bdf8;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.15s ease;
}

.breadcrumb-bar a:hover {
    color: #7dd3fc;
    text-decoration: underline;
}

.breadcrumb-sep {
    color: var(--text-dim);
}

.breadcrumb-active {
    color: #f8fafc;
    font-weight: 700;
}

/* Portal Specific Top Header Branding */
.portal-header-si {
    background: linear-gradient(135deg, #0b172d 0%, #1e3a8a 100%);
    border-bottom: 2px solid #2563eb;
}

.portal-header-pc {
    background: linear-gradient(135deg, #05261d 0%, #065f46 100%);
    border-bottom: 2px solid #059669;
}

.portal-nav-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    margin: 20px 0;
    border-bottom: 1px solid var(--border-color);
}

.portal-tab-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-muted);
    padding: 10px 18px;
    border-radius: 10px 10px 0 0;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.portal-tab-btn.active {
    color: #ffffff;
    background: var(--bg-card);
    border-color: var(--border-color);
    border-bottom-color: var(--bg-card);
}

.portal-header-si .portal-tab-btn.active {
    border-top: 3px solid #38bdf8;
}

.portal-header-pc .portal-tab-btn.active {
    border-top: 3px solid #34d399;
}

/* Unit / Chapter Accordion & Tree */
.chapter-accordion-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 24px 0;
}

.unit-accordion-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.unit-accordion-card:hover {
    border-color: #475569;
}

.unit-accordion-header {
    padding: 18px 22px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.02);
    user-select: none;
}

.unit-accordion-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.unit-accordion-title h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #f8fafc;
}

.unit-badge {
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.unit-counts {
    display: flex;
    gap: 10px;
    font-size: 12.5px;
    color: var(--text-muted);
}

.unit-accordion-body {
    padding: 20px 22px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}

.chapter-subsection {
    margin-bottom: 20px;
}

.chapter-subsection:last-child {
    margin-bottom: 0;
}

.chapter-subsection-title {
    font-size: 14px;
    font-weight: 700;
    color: #cbd5e1;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Study Material Cards */
.study-materials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.material-card {
    background: #111827;
    border: 1px solid #334155;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.material-card:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
}

.material-icon-wrap {
    font-size: 28px;
    flex-shrink: 0;
}

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

.material-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #f1f5f9;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.material-meta {
    font-size: 11.5px;
    color: #94a3b8;
    display: flex;
    gap: 8px;
    align-items: center;
}

.handwritten-badge {
    background: rgba(244, 63, 94, 0.15);
    color: #fb7185;
    border: 1px solid rgba(244, 63, 94, 0.3);
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 700;
}

/* ==========================================================================
   MODAL VIEWERS: PDF & IMAGE
   ========================================================================== */

.viewer-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(4px);
}

.viewer-header {
    background: #0f172a;
    border-bottom: 1px solid #334155;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.viewer-title-box h3 {
    margin: 0;
    font-size: 15px;
    color: #f8fafc;
    font-weight: 700;
}

.viewer-title-box p {
    margin: 2px 0 0;
    font-size: 12px;
    color: #94a3b8;
}

.viewer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.viewer-btn {
    background: #1e293b;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.viewer-btn:hover {
    background: #334155;
}

.viewer-body {
    flex: 1;
    overflow: hidden;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #090d16;
}

.viewer-pdf-frame {
    width: 100%;
    height: 100%;
    border: none;
}

.viewer-image-container {
    max-width: 95%;
    max-height: 95%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: auto;
}

.viewer-image-container img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 10px 35px rgba(0,0,0,0.5);
    transition: transform 0.15s ease;
}

.image-gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid #475569;
    color: #ffffff;
    font-size: 24px;
    padding: 14px 18px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.15s ease;
}

.image-gallery-nav:hover {
    background: rgba(37, 99, 235, 0.85);
}

.gallery-prev { left: 24px; }
.gallery-next { right: 24px; }

/* Responsive adjustments */
@media (max-width: 768px) {
    .portal-selection-grid {
        grid-template-columns: 1fr;
    }
    .landing-hero h1 {
        font-size: 1.9rem;
    }
    .portal-entry-card {
        padding: 24px 20px;
    }
    .platform-stats-bar {
        grid-template-columns: 1fr 1fr;
    }
    .image-gallery-nav {
        padding: 8px 12px;
        font-size: 18px;
    }
    .gallery-prev { left: 8px; }
    .gallery-next { right: 8px; }
}

/* ==========================================================================
   SLEEK COMPACT EXAM ATTEMPT HEADER & DRAWER SYSTEM
   ========================================================================== */
.exam-fixed-compact {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(11, 17, 30, 0.96);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid #1e2d48;
    box-shadow: 0 4px 20px rgba(0,0,0,0.45);
}

.fixed-inner-compact {
    max-width: 1200px;
    margin: 0 auto;
    padding: 8px 16px;
    position: relative;
}

.exam-top-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 46px;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.btn-back-compact {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
}
.btn-back-compact:hover {
    background: #334155;
    color: #ffffff;
}

.top-bar-title-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.compact-exam-title {
    font-size: 15px;
    font-weight: 700;
    color: #f1f5f9;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.compact-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    font-size: 11px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    flex-shrink: 0;
}

.top-bar-center {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #0d1526;
    border: 1px solid #223555;
    border-radius: 30px;
    padding: 6px 16px;
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.3);
    flex-shrink: 0;
}

.timer-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    animation: pulseDot 1.5s infinite;
}
@keyframes pulseDot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.85); }
}

.top-bar-center.low-time {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
}
.top-bar-center.low-time .timer-dot {
    background: #ef4444;
}
.top-bar-center.low-time .timer-val {
    color: #f87171;
}

.timer-val {
    font-family: var(--font-mono);
    font-size: 18px;
    font-weight: 800;
    color: #fbbf24;
    letter-spacing: 0.5px;
}

.timer-sub {
    font-size: 10px;
    color: #94a3b8;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.compact-progress-pill {
    background: #131d31;
    border: 1px solid #233454;
    padding: 5px 12px;
    border-radius: 8px;
    font-size: 12px;
    color: #94a3b8;
    white-space: nowrap;
}

.compact-progress-pill span {
    font-weight: 700;
    color: #e2e8f0;
}

.btn-palette-toggle {
    background: #1e293b;
    border: 1px solid #3b82f6;
    color: #93c5fd;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
}
.btn-palette-toggle:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Question Palette Drawer (Collapsible) */
.palette-drawer {
    position: absolute;
    top: calc(100% + 6px);
    right: 16px;
    width: min(520px, 94vw);
    max-height: 380px;
    background: #0d1527;
    border: 1px solid #2c426b;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.65);
    padding: 14px 16px;
    z-index: 1050;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.palette-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #1f2f4c;
}

.palette-legend {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: #94a3b8;
}

.leg-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.leg-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    display: inline-block;
}
.leg-dot.answered { background: #10b981; }
.leg-dot.unans { background: #1e293b; border: 1px solid #475569; }
.leg-dot.flagged { background: #f59e0b; }

.palette-close-btn {
    background: #1e293b;
    border: 1px solid #334155;
    color: #cbd5e1;
    font-size: 12px;
    padding: 3px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.palette-close-btn:hover {
    background: #ef4444;
    color: #ffffff;
    border-color: #ef4444;
}

.navigator-grid-compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(36px, 1fr));
    gap: 6px;
    overflow-y: auto;
    padding-right: 4px;
    max-height: 280px;
}

.navigator-grid-compact .nav-item {
    background: #141f35;
    border: 1px solid #233454;
    color: #94a3b8;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 0;
    text-align: center;
    cursor: pointer;
    transition: all 0.12s ease;
}
.navigator-grid-compact .nav-item:hover {
    background: #2563eb;
    color: #ffffff;
    border-color: #3b82f6;
}
.navigator-grid-compact .nav-item.answered {
    background: #064e3b;
    border-color: #10b981;
    color: #a7f3d0;
}
.navigator-grid-compact .nav-item.flagged {
    background: #451a03;
    border-color: #f59e0b;
    color: #fde68a;
}
.navigator-grid-compact .nav-item.correct {
    background: #064e3b;
    border-color: #10b981;
    color: #a7f3d0;
}
.navigator-grid-compact .nav-item.wrong {
    background: #450a0a;
    border-color: #ef4444;
    color: #fca5a5;
}

/* Exam Intro Card inside content */
.exam-intro-card {
    background: linear-gradient(145deg, #10192a, #162238);
    border: 1px solid #233658;
    border-radius: 14px;
    padding: 16px 20px;
    margin-bottom: 20px;
}
.intro-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 8px;
}
.badge-pill {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid #334155;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: #cbd5e1;
    font-weight: 600;
}

/* ==========================================================================
   QUESTION NAVIGATOR ENHANCED (5 STATES: CURRENT, ANSWERED, UNANSWERED, FLAGGED, NOT VISITED)
   ========================================================================== */
.btn-palette-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #1e3a8a;
    border: 1px solid #3b82f6;
    color: #ffffff;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.5px;
    padding: 6px 14px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}
.btn-palette-toggle:hover {
    background: #2563eb;
    border-color: #60a5fa;
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
    transform: translateY(-1px);
}

.palette-legend {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 11px;
    color: #94a3b8;
    flex-wrap: wrap;
}

.leg-dot.current { background: #3b82f6; box-shadow: 0 0 6px #60a5fa; }
.leg-dot.answered { background: #10b981; }
.leg-dot.unans { background: #334155; border: 1px solid #64748b; }
.leg-dot.flagged { background: #f59e0b; }
.leg-dot.not-visited { background: #0f172a; border: 1px solid #1e293b; }

.navigator-grid-compact .nav-item.current {
    outline: 2px solid #38bdf8;
    outline-offset: 1px;
    background: #1e3a8a;
    color: #ffffff;
    font-weight: 900;
}
.navigator-grid-compact .nav-item.not-visited {
    background: #0b1324;
    border-color: #17243b;
    color: #64748b;
}
.navigator-grid-compact .nav-item.unanswered {
    background: #1e293b;
    border-color: #475569;
    color: #cbd5e1;
}

/* Locked Test Card Styles */
.test-card.locked {
    border-color: #3f2228;
    background: #110d14;
    opacity: 0.92;
}
.badge-locked {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.btn-locked {
    background: #2a1218;
    color: #fca5a5;
    border: 1px solid #7f1d1d;
    cursor: pointer;
    font-weight: 700;
}
.btn-locked:hover {
    background: #3e1720;
    border-color: #991b1b;
    color: #fecaca;
}

/* User Access Matrix (Admin) */
.access-matrix-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 13px;
}
.access-matrix-table th {
    background: #0c1424;
    color: #94a3b8;
    font-weight: 700;
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid #1f2f4c;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.access-matrix-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #142035;
    color: #e2e8f0;
}
.access-matrix-table tr:hover td {
    background: #101c33;
}
.matrix-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}
.matrix-status-badge.granted {
    background: rgba(16, 185, 129, 0.18);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.4);
}
.matrix-status-badge.granted:hover {
    background: rgba(16, 185, 129, 0.28);
}
.matrix-status-badge.locked {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.matrix-status-badge.locked:hover {
    background: rgba(239, 68, 68, 0.25);
}

.bulk-actions-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
    padding: 12px 16px;
    background: #090f1d;
    border: 1px solid #1e2c47;
    border-radius: 12px;
    margin-bottom: 14px;
}

/* ==========================================================================
   EXAM INTERFACE — TWO-COLUMN DOCKED NAVIGATOR LAYOUT
   ========================================================================== */
.exam-main-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 18px 24px 60px;
    align-items: start;
}

.exam-questions-column {
    min-width: 0;
    width: 100%;
}

.exam-navigator-sidebar {
    position: sticky;
    top: 68px;
    z-index: 100;
}

.navigator-panel-card {
    background: #0c1424;
    border: 1px solid #233454;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.navigator-panel-card .navigator-grid-compact {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 6px;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
    min-height: 180px;
    padding-right: 4px;
    margin-top: 12px;
}

.navigator-panel-card .navigator-grid-compact::-webkit-scrollbar {
    width: 6px;
}
.navigator-panel-card .navigator-grid-compact::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 3px;
}

/* Back Button Universal Style */
.btn-back-portal {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #131d31;
    border: 1px solid #283a5e;
    color: #94a3b8;
    padding: 7px 14px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.15s ease;
    margin-bottom: 16px;
}
.btn-back-portal:hover {
    background: #1e2c47;
    color: #f8fafc;
    border-color: #3b82f6;
    transform: translateX(-2px);
}

/* ==========================================================================
   SYLLABUS TREE ACCORDION
   ========================================================================== */
.syllabus-container {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 12px;
}

.syllabus-unit-card {
    background: #0d1527;
    border: 1px solid #1f2f4c;
    border-radius: 14px;
    overflow: hidden;
    transition: border 0.15s ease;
}
.syllabus-unit-card.expanded {
    border-color: #3b82f6;
}

.syllabus-unit-header {
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
    background: #0e172a;
}
.syllabus-unit-header:hover {
    background: #14203a;
}

.syllabus-unit-title {
    display: flex;
    align-items: center;
    gap: 12px;
}
.syllabus-unit-badge {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}
.syllabus-unit-title h3 {
    margin: 0;
    font-size: 15.5px;
    color: #f8fafc;
}

.syllabus-unit-body {
    display: none;
    padding: 16px 20px 20px;
    border-top: 1px solid #1a2742;
    background: #0a1120;
}
.syllabus-unit-card.expanded .syllabus-unit-body {
    display: block;
}

.syllabus-chapter-item {
    background: #111a2e;
    border: 1px solid #1d2b48;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 10px;
}
.syllabus-chapter-name {
    font-weight: 700;
    font-size: 14px;
    color: #93c5fd;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.syllabus-topic-list {
    margin: 0;
    padding-left: 20px;
    color: #cbd5e1;
    font-size: 13px;
    line-height: 1.7;
}

/* ==========================================================================
   VIDEO LECTURES EMBED & TRAY
   ========================================================================== */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 18px;
    margin-top: 16px;
}

.video-lecture-card {
    background: #0d1527;
    border: 1px solid #1e2e4a;
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.15s ease;
}
.video-lecture-card:hover {
    border-color: #3b82f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.video-thumb-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    cursor: pointer;
    overflow: hidden;
}

/* ==========================================================================
   MOTIVATIONAL QUOTES BANNER & WIDGET
   ========================================================================== */
.quote-banner {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.9) 0%, rgba(30, 41, 59, 0.8) 100%);
    border: 1px solid rgba(245, 158, 11, 0.35);
    border-left: 5px solid #f59e0b;
    border-radius: 14px;
    padding: 14px 20px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
}

.quote-banner-left {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex: 1;
}

.quote-icon-badge {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.quote-content {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.quote-banner-te {
    font-size: 14.5px;
    font-weight: 700;
    color: #fde68a;
    line-height: 1.5;
}

.quote-banner-en {
    font-size: 12.5px;
    color: #cbd5e1;
    font-style: italic;
    line-height: 1.4;
}

.quote-refresh-btn {
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    padding: 7px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.quote-refresh-btn:hover {
    background: #334155;
    border-color: #f59e0b;
    color: #fbbf24;
}

/* ==========================================================================
   PORTAL SIDE MENU & ENTERPRISE DASHBOARD LAYOUT
   ========================================================================== */
.portal-layout-container {
    display: grid !important;
    grid-template-columns: 290px 1fr !important;
    gap: 26px !important;
    align-items: start !important;
    margin-top: 18px !important;
    width: 100% !important;
}

@media (max-width: 980px) {
    .portal-layout-container {
        grid-template-columns: 1fr !important;
    }
}

.portal-sidebar-menu {
    background: #0d1527;
    border: 1px solid #1e2f4d;
    border-radius: 18px;
    padding: 18px;
    position: sticky;
    top: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

.portal-sidebar-header {
    padding-bottom: 12px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.portal-sidebar-title {
    font-size: 14.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-sidebar-sub {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 3px;
}

.portal-side-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    color: #cbd5e1;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.15s ease;
    text-align: left;
    width: 100%;
    box-sizing: border-box;
}

.portal-sidebar-link:hover {
    background: #162238;
    color: #f8fafc;
    border-color: #273b5e;
}

.portal-sidebar-link.active {
    background: #1e3a8a;
    color: #93c5fd;
    border-color: #3b82f6;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(37, 99, 235, 0.35);
}

.portal-sidebar-link-pc.active {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #059669;
    font-weight: 700;
    box-shadow: 0 0 16px rgba(5, 150, 105, 0.35);
}

.portal-sidebar-icon-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.portal-sidebar-badge {
    background: #1e293b;
    color: #f8fafc;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 700;
    border: 1px solid #334155;
}

.portal-sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 8px 0;
}

.portal-sidebar-card {
    background: #111e38;
    border: 1px solid #1e3a8a;
    border-radius: 14px;
    padding: 14px;
    text-align: center;
}

.portal-sidebar-card-pc {
    background: #0a271c;
    border: 1px solid #065f46;
}

/* Export PDF Action Buttons on Test Cards */
.btn-export-pdf {
    background: #1e293b;
    color: #38bdf8;
    border: 1px solid #334155;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.btn-export-pdf:hover {
    background: #0c4a6e;
    border-color: #38bdf8;
    color: #ffffff;
}

.btn-export-singleline {
    background: #1e293b;
    color: #fbbf24;
    border: 1px solid #334155;
    font-size: 12px;
    padding: 7px 12px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.15s;
}

.btn-export-singleline:hover {
    background: #451a03;
    border-color: #f59e0b;
    color: #fef08a;
}

/* Responsive Exam Layout for Tablets and Phones */
@media (max-width: 1024px) {
    .exam-main-layout {
        grid-template-columns: 1fr 290px;
        gap: 16px;
        padding: 14px 16px;
    }
    .navigator-panel-card .navigator-grid-compact {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Extra mobile optimizations for smartphone devices */
@media (max-width: 600px) {
    .exam-top-bar {
        flex-wrap: wrap;
        gap: 8px;
        justify-content: space-between;
    }
    .top-bar-left {
        width: 100%;
        margin-bottom: 4px;
    }
    .compact-exam-title {
        font-size: 13.5px;
    }
    .top-bar-center {
        order: 2;
    }
    .top-bar-right {
        order: 3;
    }
    .question-card {
        padding: 14px 12px;
    }
    .qtext {
        font-size: 14.5px;
        line-height: 1.5;
    }
    .option-label {
        font-size: 13.5px;
        padding: 10px 12px;
        min-height: 44px;
    }
    .portal-nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 6px;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .portal-tab-btn {
        flex-shrink: 0;
    }
    .viewer-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    .viewer-actions {
        width: 100%;
        justify-content: space-between;
    }
}

/* Candidate Login & Account Modal Overlay */
.login-panel {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 100000 !important;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
}
.login-panel.show {
    display: flex !important;
}

/* ==========================================================================
   OFFICIAL HOLOMARK WATERMARK - Visible & Anti-Screenshot Protected
   (Contains Candidate Name, Phone & www.exam.ishitechnoprojects.in)
   ========================================================================== */
.paper-holomark {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-28deg);
    font-size: clamp(1rem, 2.2vw, 1.45rem);
    font-weight: 800;
    letter-spacing: 2px;
    color: rgba(217, 119, 6, 0.15) !important;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    text-transform: uppercase;
    white-space: normal;
    text-align: center;
    max-width: 90vw;
    line-height: 1.4;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.card-holomark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-18deg);
    font-size: clamp(0.72rem, 1.15vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 1.5px;
    color: rgba(217, 119, 6, 0.14) !important;
    pointer-events: none;
    user-select: none;
    z-index: 1;
    text-transform: uppercase;
    white-space: normal;
    text-align: center;
    max-width: 95%;
    line-height: 1.35;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

.question-card {
    position: relative;
    overflow: hidden;
}

.question-card .qhead,
.question-card .qtext,
.question-card .options,
.question-card .feedback {
    position: relative;
    z-index: 2;
}

.bottom-page-watermark {
    text-align: center;
    padding: 14px 10px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    margin-top: 30px;
    user-select: none;
}

[data-theme="dark"] .paper-holomark,
body.dark-mode .paper-holomark {
    color: rgba(255, 255, 255, 0.15) !important;
}

[data-theme="dark"] .card-holomark,
body.dark-mode .card-holomark {
    color: rgba(255, 255, 255, 0.16) !important;
}

@media print {
    .paper-holomark {
        color: rgba(15, 23, 42, 0.20) !important;
        display: block !important;
    }
    .card-holomark {
        color: rgba(15, 23, 42, 0.18) !important;
        display: block !important;
    }
}

/* ==========================================================================
   DRILL-DOWN SELECTOR UI (Module -> Chapter -> Topic -> Test)
   ========================================================================== */
.drilldown-container {
    background: linear-gradient(135deg, #0b1528 0%, #111e38 100%);
    border: 1px solid #1e3a8a;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin-bottom: 24px;
}

.drilldown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.drilldown-steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.drill-step-card {
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid #334155;
    border-radius: 14px;
    padding: 16px;
    transition: all 0.25s ease;
}

.drill-step-card.active {
    border-color: #38bdf8;
    background: rgba(14, 116, 144, 0.12);
    box-shadow: 0 0 15px rgba(56, 189, 248, 0.15);
}

.drill-step-card label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #fbbf24;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.drill-select {
    width: 100%;
    background: #090e1a;
    border: 1px solid #475569;
    color: #f8fafc;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.2s ease;
    cursor: pointer;
}

.drill-select:focus {
    border-color: #38bdf8;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.2);
}

.drill-select option {
    background: #0f172a;
    color: #f8fafc;
    padding: 8px;
}

.drill-preview-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.8) 0%, rgba(15, 23, 42, 0.95) 100%);
    border: 2px solid #22c55e;
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.35);
    margin-top: 16px;
    animation: fadeInSlide 0.3s ease;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.drill-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 14px;
}

.drill-preview-title {
    font-size: 18px;
    font-weight: 800;
    color: #f8fafc;
    margin: 0 0 4px;
}

.drill-preview-meta {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.drill-preview-meta span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

/* ==========================================================================
   MAINTENANCE NOTICE SCREEN (PC / SI System OFF)
   ========================================================================== */
.portal-maintenance-screen {
    background: linear-gradient(135deg, #1c1917 0%, #0c0a09 100%);
    border: 2px solid #ea580c;
    border-radius: 20px;
    padding: 40px 24px;
    text-align: center;
    max-width: 680px;
    margin: 30px auto;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
    animation: fadeInSlide 0.4s ease;
}

.portal-maintenance-icon {
    font-size: 54px;
    margin-bottom: 14px;
    animation: pulse 2s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

.portal-maintenance-title {
    color: #fbbf24;
    font-size: 24px;
    font-weight: 900;
    margin: 0 0 8px;
}

.portal-maintenance-subtitle {
    color: #fdba74;
    font-size: 16px;
    font-weight: 700;
    margin: 0 0 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.portal-maintenance-msg {
    color: #cbd5e1;
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0 0 20px;
    background: rgba(255, 255, 255, 0.05);
    padding: 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-maintenance-dates {
    display: inline-flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #44403c;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 12.5px;
    color: #94a3b8;
}

/* ==========================================================================
   USER QUERY & MESSAGING MODAL
   ========================================================================== */
.user-query-fab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #0284c7, #0369a1);
    color: #ffffff;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12.5px;
    font-weight: 800;
    border: 1px solid #38bdf8;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    transition: all 0.2s ease;
}

.user-query-fab:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.45);
}

.message-item {
    background: #0f172a;
    border: 1px solid #1e293b;
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 12px;
    text-align: left;
}

.message-meta {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #94a3b8;
    margin-bottom: 6px;
}

.message-text {
    font-size: 13px;
    color: #f1f5f9;
    line-height: 1.5;
}

.message-reply {
    background: rgba(16, 185, 129, 0.12);
    border-left: 3px solid #10b981;
    padding: 8px 12px;
    margin-top: 8px;
    border-radius: 0 8px 8px 0;
    font-size: 12.5px;
    color: #a7f3d0;
}

/* ==========================================================================
   Drill-Down 2-Column Side Menu & Main Area Layout (Req 2 & 8, Image 1 & 2)
   ========================================================================== */
.drilldown-layout-wrapper {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    width: 100%;
    margin-top: 18px;
}

.drilldown-sidemenu {
    width: 290px;
    min-width: 290px;
    max-width: 290px;
    background: #0b1426;
    border: 1px solid #1e2f52;
    border-radius: 16px;
    padding: 16px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
    position: sticky;
    top: 50px;
    max-height: calc(100vh - 70px);
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 50;
    flex-shrink: 0;
    scrollbar-width: thin;
    scrollbar-color: #1e2f52 #0b1426;
}
.drilldown-sidemenu::-webkit-scrollbar {
    width: 6px;
}
.drilldown-sidemenu::-webkit-scrollbar-thumb {
    background: #1e2f52;
    border-radius: 4px;
}

.drill-side-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 800;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 6px 10px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 10px;
}

.drill-side-all-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 700;
    background: transparent;
    border: 1px solid transparent;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.18s ease;
    margin-bottom: 8px;
    text-align: left;
}
.drill-side-all-btn:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
}
.drill-side-all-btn.active {
    background: rgba(56, 189, 248, 0.15);
    border-color: #38bdf8;
    color: #38bdf8;
}

.drill-side-module-block {
    margin-bottom: 10px;
}

.drill-side-mod-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 12.5px;
    font-weight: 700;
    background: #0f1a30;
    border: 1px solid #1e2d4d;
    color: #cbd5e1;
    cursor: pointer;
    transition: all 0.18s ease;
    text-align: left;
    gap: 6px;
}
.drill-side-mod-btn:hover {
    background: #152442;
    border-color: #38bdf8;
    color: #fff;
}
.drill-side-mod-btn.active {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.3) 0%, rgba(30, 58, 138, 0.45) 100%);
    border-color: #38bdf8;
    color: #38bdf8;
}

.drill-side-sub-menu {
    display: none;
    flex-direction: column;
    gap: 3px;
    margin-top: 8px;
    margin-left: 6px;
    padding: 6px 6px 6px 12px;
    border-left: 2px solid #38bdf8;
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: #2563eb #0b1426;
}
.drill-side-sub-menu::-webkit-scrollbar {
    width: 5px;
}
.drill-side-sub-menu::-webkit-scrollbar-track {
    background: #0b1426;
    border-radius: 4px;
}
.drill-side-sub-menu::-webkit-scrollbar-thumb {
    background: #2563eb;
    border-radius: 4px;
}
.drill-side-sub-menu::-webkit-scrollbar-thumb:hover {
    background: #38bdf8;
}

.drill-side-module-block.active .drill-side-sub-menu {
    display: flex !important;
}

.drill-side-sub-item {
    font-size: 12px;
    line-height: 1.42;
    font-weight: 600;
    color: #94a3b8;
    padding: 7px 10px;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: normal; /* Multi-line wrapping so nothing truncates or overlaps */
    word-break: break-word;
    display: block;
    margin: 2px 0;
    border: 1px solid transparent;
}
.drill-side-sub-item:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(56, 189, 248, 0.3);
}
.drill-side-sub-item.active {
    color: #fbbf24;
    font-weight: 700;
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(245, 158, 11, 0.4);
}

.drilldown-main-content {
    flex: 1;
    min-width: 0;
}

.test-grid-4col {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1300px) {
    .test-grid-4col { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 990px) {
    .test-grid-4col { grid-template-columns: repeat(2, 1fr); }
    .drilldown-layout-wrapper { flex-direction: column; }
    .drilldown-sidemenu { width: 100%; min-width: 100%; max-width: 100%; position: static; max-height: none; }
}
@media (max-width: 600px) {
    .test-grid-4col { grid-template-columns: 1fr; }
}

/* Floating Admin Live Chat Widget */
.floating-admin-chat-trigger {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.floating-admin-chat-trigger:hover {
    transform: translateY(-4px) scale(1.03);
}
.chat-trigger-content {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    border-radius: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.3);
    font-size: 13.5px;
    font-weight: 800;
    color: #ffffff;
    border: 2px solid;
    position: relative;
    user-select: none;
}
.chat-trigger-content.theme-pc {
    background: linear-gradient(135deg, #064e3b 0%, #0f172a 100%);
    border-color: #10b981;
}
.chat-trigger-content.theme-si {
    background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%);
    border-color: #3b82f6;
}
.chat-trigger-icon {
    font-size: 20px;
    line-height: 1;
}
.chat-live-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseChatDot 2s infinite;
}
@keyframes pulseChatDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1.1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

@media (max-width: 640px) {
    .floating-admin-chat-trigger {
        bottom: 16px;
        right: 16px;
    }
    .chat-trigger-text {
        display: none;
    }
    .chat-trigger-content {
        padding: 12px;
        border-radius: 50%;
        width: 52px;
        height: 52px;
        justify-content: center;
    }
}

/* ==========================================================================
   Exam Status Top Bar (Live Date/Time, Expected Exam Date & Countdown)
   ========================================================================== */
.exam-status-top-bar {
    background: linear-gradient(90deg, #090e1a 0%, #0d1627 50%, #090e1a 100%);
    border-bottom: 1px solid rgba(56, 189, 248, 0.25);
    padding: 6px 16px;
    font-size: 12.5px;
    color: #cbd5e1;
    position: fixed !important;
    top: 35px !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10000 !important;
    height: 42px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}
.exam-status-container {
    max-width: 1720px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px 18px;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}
.live-clock-pill {
    border-color: rgba(56, 189, 248, 0.25);
}
.live-clock-pill .pill-val {
    color: #38bdf8;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.exam-date-pill {
    border-color: rgba(245, 158, 11, 0.3);
}
.exam-date-pill .pill-val {
    color: #fbbf24;
    font-weight: 800;
}
.countdown-pill {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(5, 150, 105, 0.25) 100%);
    border-color: #10b981;
}
.countdown-badge {
    color: #a7f3d0;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.3px;
}

@media (max-width: 768px) {
    .exam-status-container {
        justify-content: center;
    }
    .status-pill {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* ==========================================================================
   Module-Wise Study Material Hub
   ========================================================================== */
.study-hub-module-card {
    background: #0d1526;
    border: 1px solid #1e2e4a;
    border-radius: 16px;
    padding: 22px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}
.study-hub-module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    padding-bottom: 14px;
    margin-bottom: 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.study-hub-section-title {
    font-size: 13.5px;
    font-weight: 800;
    color: #38bdf8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 16px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.study-paper-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}
.study-paper-card {
    background: #111a2e;
    border: 1px solid #203354;
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.study-paper-card:hover {
    transform: translateY(-2px);
    border-color: #38bdf8;
}
.opt-bold-correct {
    background: rgba(16, 185, 129, 0.12) !important;
    border: 1.5px solid #10b981 !important;
    color: #6ee7b7 !important;
    font-weight: 800 !important;
}
