:root {
    --brand: #0b3d91;
    --brand-dark: #072a66;
    --accent: #ff7a00;
    --ok: #198754;
    --bs-primary: #0b3d91;
    --bs-primary-rgb: 11, 61, 145;
    --bs-link-color: #0b3d91;
    --bs-link-color-rgb: 11, 61, 145;
}
body { font-family: 'Noto Sans', 'Noto Sans Devanagari', system-ui, sans-serif; background: #f5f7fb; color: #1f2937; }
.btn-primary { --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand-dark); --bs-btn-hover-border-color: var(--brand-dark); --bs-btn-active-bg: var(--brand-dark); }
.btn-outline-primary { --bs-btn-color: var(--brand); --bs-btn-border-color: var(--brand); --bs-btn-hover-bg: var(--brand); --bs-btn-hover-border-color: var(--brand); }
.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: #e56d00; color: #fff; }
.text-accent { color: var(--accent) !important; }
.bg-brand { background: var(--brand) !important; color: #fff; }
.topbar { background: var(--brand-dark); color: #dbe6ff; }
.site-nav .navbar-toggler[aria-expanded="true"] .navbar-toggler-icon { background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23374151'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e"); background-size: 70%; }
.site-nav .nav-link { font-weight: 500; color: #374151; }
.site-nav .nav-link.active, .site-nav .nav-link:hover { color: var(--brand); }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; background: var(--brand); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.brand-text { font-weight: 700; color: var(--brand); font-size: 1.25rem; }
.hero { background: linear-gradient(120deg, var(--brand) 0%, #1456c4 60%, #2a6be0 100%); color: #fff; }
.hero .carousel-item { min-height: 340px; }
.hero h1 { font-weight: 700; }
.hero-img { background-size: cover; background-position: center; }
.section-title { font-weight: 700; color: var(--brand-dark); }
.section-title small { display: block; font-size: .9rem; color: #6b7280; font-weight: 400; }
.card { border: 0; border-radius: 14px; box-shadow: 0 2px 10px rgba(15, 23, 42, .06); }
.card-hover { transition: transform .15s, box-shadow .15s; }
.card-hover:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(15, 23, 42, .12); }
.cat-icon { width: 56px; height: 56px; border-radius: 14px; background: #e8efff; color: var(--brand); display: inline-flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.price { font-weight: 700; color: var(--ok); font-size: 1.25rem; }
.price del { color: #9ca3af; font-size: .9rem; font-weight: 400; }
.stat-box { background: #fff; border-radius: 14px; padding: 1.1rem; text-align: center; }
.stat-box .num { font-size: 1.7rem; font-weight: 700; color: var(--brand); }
.notice-list li { border-bottom: 1px dashed #e5e7eb; padding: .6rem 0; }
.site-footer { background: #0f1b33; color: #aab4c8; }
.site-footer a { color: #cbd5e1; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.whatsapp-float { position: fixed; right: 18px; bottom: 18px; width: 52px; height: 52px; border-radius: 50%; background: #25d366; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); z-index: 1000; }
.auth-card { max-width: 560px; margin: 2rem auto; }

/* ---------- Homepage chat box ---------- */
.chat-toggle { position: fixed; right: 18px; bottom: 82px; width: 52px; height: 52px; border: 0; border-radius: 50%; background: var(--brand); color: #fff; font-size: 1.4rem; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); z-index: 1000; }
.chat-toggle:hover { background: var(--brand-dark); }
.chat-panel { position: fixed; right: 16px; bottom: 146px; width: min(340px, calc(100vw - 32px)); height: min(440px, calc(100vh - 170px)); display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 12px 32px rgba(15, 23, 42, .25); z-index: 1040; }
.chat-panel[hidden] { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: center; padding: .7rem .9rem; background: var(--brand); color: #fff; font-weight: 600; }
.chat-log { flex: 1; overflow-y: auto; padding: .75rem; display: flex; flex-direction: column; gap: .5rem; background: #f5f7fb; }
.chat-msg { max-width: 85%; padding: .45rem .7rem; border-radius: 12px; font-size: .9rem; overflow-wrap: anywhere; white-space: pre-line; }
.chat-msg.bot { align-self: flex-start; background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .1); }
.chat-msg.me { align-self: flex-end; background: var(--brand); color: #fff; }
.chat-links { display: flex; gap: .4rem; padding: .5rem .75rem 0; }
.chat-links a { font-size: .78rem; padding: .15rem .55rem; border: 1px solid var(--brand); border-radius: 999px; color: var(--brand); text-decoration: none; }
.chat-form { display: flex; gap: .4rem; padding: .6rem .75rem; }

/* ---------- Panels ---------- */
.panel-wrap { display: flex; min-height: 100vh; }
.sidebar { width: 260px; background: #0f1b33; color: #cbd5e1; flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 1; background: #0f1b33; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-brand { display: block; padding: 1rem 1.2rem; font-weight: 700; font-size: 1.2rem; color: #fff; text-decoration: none; }
.sidebar-close { width: 40px; height: 40px; margin-right: .5rem; border: 0; border-radius: 8px; background: rgba(255,255,255,.1); color: #fff; font-size: 1rem; }
.sidebar-backdrop { display: none; }
.sidebar-role { padding: .5rem 1.2rem; font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--accent); }
.sidebar-heading { padding: .9rem 1.2rem .3rem; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #64748b; }
.sidebar .nav-link { color: #cbd5e1; padding: .5rem 1.2rem; font-size: .92rem; border-left: 3px solid transparent; }
.sidebar .nav-link i { width: 22px; display: inline-block; }
.sidebar .nav-link:hover { background: rgba(255,255,255,.05); color: #fff; }
.sidebar .nav-link.active { background: rgba(255,255,255,.08); color: #fff; border-left-color: var(--accent); }
.panel-main { flex: 1; min-width: 0; }
.panel-top { background: #fff; padding: .75rem 1.25rem; display: flex; align-items: center; gap: 1rem; border-bottom: 1px solid #e5e7eb; position: sticky; top: 0; z-index: 100; }
.panel-content { padding: 1.25rem; }
.notif-bell { position: relative; width: 40px; height: 40px; border: 0; border-radius: 50%; background: #f1f4f9; color: var(--brand); font-size: 1.2rem; }
.notif-bell:hover { background: #e4eaf4; }
.notif-count { position: absolute; top: -3px; right: -3px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: #dc3545; color: #fff; font-size: .68rem; font-weight: 700; line-height: 19px; }
.notif-menu { width: min(320px, calc(100vw - 24px)); max-height: 75vh; overflow-y: auto; }
.notif-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .6rem .9rem; border-bottom: 1px solid #e5e7eb; }
.notif-item { display: block; padding: .6rem .9rem; border-bottom: 1px solid #eef1f6; color: #1f2937; text-decoration: none; font-size: .85rem; }
.notif-item:hover { background: #f5f7fb; color: #1f2937; }
.notif-item.unread { background: #e8efff; }
.notif-item strong, .notif-item span, .notif-item small { display: block; }
.notif-item small { color: #6b7280; font-size: .72rem; }
.notif-all { display: block; padding: .55rem; text-align: center; font-size: .85rem; font-weight: 600; text-decoration: none; }
@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: -270px; z-index: 1050; transition: left .2s; }
    .sidebar.show { left: 0; }
    .sidebar.show + .sidebar-backdrop { display: block; position: fixed; inset: 0; z-index: 1040; background: rgba(15, 23, 42, .5); }
    .panel-content { padding: .9rem; }
}
.kpi { border-radius: 14px; padding: 1rem 1.1rem; background: #fff; display: flex; align-items: center; gap: .9rem; }
.kpi .icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.3rem; }
.kpi .val { font-size: 1.4rem; font-weight: 700; line-height: 1.1; }
.kpi .lbl { font-size: .8rem; color: #6b7280; }
.table > :not(caption) > * > * { vertical-align: middle; }
.table-card { background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 2px 10px rgba(15,23,42,.06); }
.table-card .table { margin-bottom: 0; }
/* Table rows become cards on phones; give each cell a data-label */
@media (max-width: 767.98px) {
    .table-stack thead { display: none; }
    .table-stack tr { display: flex; flex-direction: column; padding: .8rem 1rem; border-bottom: 1px solid #e5e7eb; }
    .table-stack tr:last-child { border-bottom: 0; }
    .table-stack td { display: block; padding: .2rem 0; border: 0; }
    .table-stack td[data-label] { display: flex; justify-content: space-between; align-items: center; gap: 1rem; text-align: right; overflow-wrap: anywhere; }
    .table-stack td[data-label]::before { content: attr(data-label); flex-shrink: 0; color: #6b7280; }
    .table-stack .stack-title { order: -1; font-weight: 600; padding-bottom: .4rem; }
    .table-stack .stack-actions { display: flex; gap: .5rem; padding-top: .6rem; }
    .table-stack .stack-actions .btn { flex: 1; }
}
.question-text { white-space: pre-line; }

/* ---------- Exam screen ---------- */
.exam-body { background: #eef2f7; }
.exam-header { background: var(--brand); color: #fff; padding: .6rem 1rem; position: sticky; top: 0; z-index: 50; }
.exam-timer { font-family: monospace; font-size: 1.35rem; font-weight: 700; background: rgba(255,255,255,.15); border-radius: 8px; padding: .2rem .7rem; }
.exam-timer.warn { background: #dc3545; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .65; } }
.q-card { min-height: 420px; }
.option-item { border: 2px solid #e5e7eb; border-radius: 10px; padding: .75rem 1rem; cursor: pointer; display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .6rem; background: #fff; transition: border-color .1s, background .1s; }
.option-item:hover { border-color: #93c5fd; }
.option-item.selected { border-color: var(--brand); background: #eef4ff; }
.option-item .lbl { width: 30px; height: 30px; border-radius: 50%; background: #e5e7eb; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
.option-item.selected .lbl { background: var(--brand); color: #fff; }
.palette { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 6px; }
.palette button { height: 40px; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; font-weight: 600; }
.palette .p-answered { background: #198754; color: #fff; border-color: #198754; }
.palette .p-notanswered { background: #dc3545; color: #fff; border-color: #dc3545; }
.palette .p-marked { background: #6f42c1; color: #fff; border-color: #6f42c1; }
.palette .p-marked-answered { background: #6f42c1; color: #fff; border-color: #198754; box-shadow: inset 0 -5px 0 #20c997; }
.palette .current { outline: 3px solid var(--accent); outline-offset: 1px; }
.legend span { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: middle; margin-right: 4px; }
.sol-correct { border-color: #198754 !important; background: #e9f7ef !important; }
.sol-wrong { border-color: #dc3545 !important; background: #fdecee !important; }
.save-status { font-size: .8rem; }
@media print { .sidebar, .panel-top, .no-print { display: none !important; } }

/* Learning workspace */
.student-space { background: #f3f6fc; }
.student-space .sidebar { background: linear-gradient(175deg,#10264b,#101c33); }
.student-space .sidebar-top { background: #10264b; }
.student-space .sidebar .nav { padding: .5rem .65rem; gap: .22rem; }
.student-space .sidebar .nav-link { border-radius: 10px; border-left: 0; padding: .75rem .8rem; }
.student-space .sidebar .nav-link.active { background: #244c83; box-shadow: inset 3px 0 #ffac57; }
.student-space .panel-content { max-width: 1520px; margin: auto; padding: 1.7rem; }
.learning-hero { display: flex; justify-content: space-between; align-items: center; gap: 2rem; padding: 2rem; border-radius: 22px; color: #fff; background: linear-gradient(115deg,#123875,#2562b5); box-shadow: 0 12px 28px #12387518; }
.eyebrow { display: block; font-size: .7rem; font-weight: 700; letter-spacing: .14em; margin-bottom: .6rem; }
.learning-hero h2 { font-weight: 700; font-size: clamp(1.5rem,2.5vw,2rem); }
.learning-hero p { max-width: 540px; color: #dae7ff; line-height: 1.7; }
.learning-hero-stat { flex: 0 0 190px; padding: 1.25rem; border: 1px solid #ffffff35; border-radius: 16px; background: #ffffff10; }
.learning-hero-stat i { display: block; font-size: 1.4rem; color: #b9d9ff; }
.learning-hero-stat strong { display: block; font-size: 2.2rem; margin: .4rem 0; }
.learning-hero-stat span { font-size: .8rem; color: #dae7ff; }
.section-intro h2 { font-size: 1.1rem; font-weight: 700; margin-bottom: .25rem; }
.section-intro p { font-size: .85rem; color: #64748b; }
.student-space .kpi { border: 1px solid #e6edf7; min-height: 100px; }
.student-space .card-header { padding: 1rem 1.15rem; border-bottom: 1px solid #edf1f7; border-radius: 14px 14px 0 0; }
.student-space .list-group-item { padding: 1rem 1.15rem; border-color: #edf1f7; gap: 1rem; }
.student-space .table td,.student-space .table th { padding: .9rem 1rem; }
.page-intro h2 { font-size: 1.75rem; font-weight: 700; }
.exam-tile { border: 1px solid #e2e9f4; transition: box-shadow .2s; }
.exam-tile:hover { box-shadow: 0 10px 24px #12387515; }
.exam-tile .card-body { padding: 1.4rem; }
.exam-tile h6 { font-size: 1.05rem; line-height: 1.6; }
.exam-header { padding: 1rem 1.4rem; background: #123875; box-shadow: 0 3px 12px #10264b20; }
.exam-body .q-card { border: 1px solid #e1e8f2; }
.exam-body .card-header,.exam-body .card-footer { padding: 1rem 1.25rem; }
.exam-body .q-card>.card-body { padding: 1.6rem; }
.exam-body .option-item { min-height: 64px; line-height: 1.6; }
.option-item:focus-visible,.palette button:focus-visible { outline: 3px solid #ff9c37; outline-offset: 3px; }
.exam-body .save-status { padding: .4rem .7rem; border-radius: 30px; background: #ffffff16; }
@media(max-width:767.98px) { .student-space .panel-content { padding: 1rem; } .learning-hero { padding: 1.4rem; flex-direction: column; align-items: stretch; gap: 1.25rem; } .learning-hero-stat { flex-basis: auto; display: flex; align-items: center; gap: 1rem; padding: .9rem; } .learning-hero-stat strong { font-size: 1.6rem; } .exam-body .card-footer .btn { flex: 1 1 44%; margin-left: 0!important; font-size: .8rem; } .exam-body .q-card>.card-body { padding: 1rem; } }
@media(prefers-reduced-motion:reduce) { .exam-timer.warn { animation: none; } .card-hover,.exam-tile { transition: none; } }

/* Mobile student navigation and learning cards */
.student-bottom-nav { position: fixed; z-index: 1020; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4,1fr); padding: .5rem .4rem calc(.5rem + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #e3eaf5; box-shadow: 0 -4px 24px #10264b08; }
.student-bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: .15rem; padding: .35rem; border-radius: 12px; color: #64748b; text-decoration: none; font-size: .7rem; font-weight: 600; }
.student-bottom-nav i { font-size: 1.2rem; }
.student-bottom-nav a[aria-current=page] { color: #123875; background: #eaf1ff; }
.course-symbol { display: inline-flex; width: 50px; height: 50px; align-items: center; justify-content: center; color: #2859a1; background: #edf3ff; border-radius: 14px; font-size: 1.4rem; }
.learning-course { border: 1px solid #e2e9f4; }
.learning-course .card-body { padding: 1.4rem; }
.student-space .btn { border-radius: 9px; }
.student-space .card a:not(.btn) { text-underline-offset: 3px; }
.student-space .panel-top { min-height: 76px; }
.student-space .page-intro p { max-width: 620px; line-height: 1.7; }
.student-space .kpi .val { font-variant-numeric: tabular-nums; }
@media(max-width:767.98px) { .student-space .panel-main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); } .student-space .panel-top { gap: .6rem; padding: .7rem .8rem; min-height: 66px; } .student-space .panel-top h1 { font-size: 1rem; } .student-space .kpi { padding: .9rem .75rem; gap: .6rem; min-height: 94px; } .student-space .kpi .icon { width: 36px; height: 36px; flex-shrink: 0; font-size: 1.1rem; } .student-space .kpi .val { font-size: 1.25rem; } .student-space .kpi .lbl { font-size: .72rem; line-height: 1.5; } .student-space .list-group-item { flex-wrap: wrap; gap: .4rem; } .student-space .page-intro h2 { font-size: 1.45rem; } .student-space .nav-pills { gap: .4rem; } .student-space .nav-pills .nav-link { min-height: 44px; } .student-space .learning-hero .btn { flex: 1; } .learning-course .btn,.exam-tile .btn { min-height: 44px; display: flex; align-items: center; justify-content: center; } }
@media(min-width:768px) { .student-bottom-nav { display:none; } }

/* TestMcq identity */
.testmcq-logo { display:block; width:180px; max-width:100%; height:auto; object-fit:contain; }
.navbar-brand .testmcq-logo { width:170px; }
.sidebar-brand:has(.testmcq-logo) { display:block; background:#fff; margin:.5rem; padding:.45rem .7rem; border-radius:10px; }
.student-space .sidebar-brand:has(.testmcq-logo) { padding:.4rem .65rem; }
@media(max-width:575.98px) { .navbar-brand .testmcq-logo { width:145px; } }

/* Courses page filter (phones): category on its own row, then search box + Search button.
   More specific than the one-line homepage search rule in site-responsive.css. */
@media(max-width:767.98px) {
 .public-site .site-search.site-catalog-search .site-search-controls { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:.6rem; align-items:end; }
 .public-site .site-search.site-catalog-search .site-search-category,
 .public-site .site-search.site-catalog-search .site-search-controls > a.btn { grid-column:1 / -1; }
 .public-site .site-search.site-catalog-search .site-search-category .form-select { width:100%; min-height:46px; }
 .public-site .site-search.site-catalog-search .site-search-query { grid-column:1; min-width:0; }
 .public-site .site-search.site-catalog-search .site-search-controls > button.btn { grid-column:2; align-self:end; min-height:46px; }
 .public-site .site-search.site-catalog-search .site-search-field .form-control { min-height:46px; }
}

/* Public tables (results & leaderboard) on tablet/desktop: keep whole words and scores like "15.00/20.00" together. */
@media(min-width:768px) {
 .public-site .table :is(td,th) { overflow-wrap:break-word; }
 .public-site .table td[data-label='Score'] { white-space:nowrap; }
}
/* Home banner headings are h2 (the page has one hidden H1 for Google); keep their old look. */
.hero .hero-title { font-weight:700; }
.public-site .hero .hero-title { font-size:clamp(1.8rem,3.4vw,3rem); }
@media(max-width:767.98px) { .public-site .home-hero .hero-title { font-size:1.55rem; } }
