/* ==========================================================
   Bitlite School Portal — self-contained Admin-Lite style CSS
   No external framework dependency.
   ========================================================== */

:root {
    --navy: #1b2a4a;
    --navy-dark: #121e35;
    --gold: #b8860b;
    --gold-light: #f4e9d8;
    --grey-bg: #f4f6f9;
    --border: #dee2e6;
    --text: #222;
    --muted: #6c757d;
    --success: #1e7e34;
    --danger: #b02a37;
    --sidebar-width: 250px;
}

/* ---------------- Theme palettes (Settings → General Settings) ---------------- */
body.theme-emerald { --navy: #14532d; --navy-dark: #0d3b20; --gold: #d4af37; --gold-light: #eaf5ec; }
body.theme-royal   { --navy: #1e3a8a; --navy-dark: #16265e; --gold: #94a3b8; --gold-light: #eef2f7; }
body.theme-maroon  { --navy: #7f1d1d; --navy-dark: #5c1414; --gold: #d4a017; --gold-light: #fdf3e2; }
body.theme-slate   { --navy: #1e293b; --navy-dark: #0f172a; --gold: #14b8a6; --gold-light: #e6fdfa; }
body.theme-sunset   { --navy: #9a3412; --navy-dark: #7c2d12; --gold: #eab308; --gold-light: #fef3e2; }
body.theme-ocean    { --navy: #0e7490; --navy-dark: #155e75; --gold: #22d3ee; --gold-light: #ecfeff; }
body.theme-lavender { --navy: #581c87; --navy-dark: #3b0764; --gold: #f5c451; --gold-light: #f4ecff; }
body.theme-burgundy { --navy: #6b1029; --navy-dark: #4a0a1c; --gold: #c9a227; --gold-light: #fbeef0; }
body.theme-onyx     { --navy: #18181b; --navy-dark: #09090b; --gold: #eab308; --gold-light: #fdf6e3; }

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background: var(--grey-bg);
    color: var(--text);
    font-size: 14.5px;
}

a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--gold); }

/* ---------------- Modern toggle switches (opt-in via .toggle-switch,
   not applied to every checkbox globally). Genuine on/off settings
   (e.g. "Shuffle questions", "Allow retakes") read well as a switch;
   a checkbox used to pick items from a list (e.g. Bulk Publish's
   class picker) does not - a row of wide switches there is confusing,
   since a switch implies a persistent state toggle, not "select this
   item from many". Checkboxes stay native by default; add
   class="toggle-switch" only to genuine on/off settings. ---------------- */
input[type="checkbox"].toggle-switch {
    appearance: none;
    -webkit-appearance: none;
    width: 38px;
    height: 21px;
    min-width: 38px;
    background: #ccc;
    border-radius: 12px;
    position: relative;
    cursor: pointer;
    transition: background .2s ease;
    vertical-align: middle;
    flex-shrink: 0;
    margin: 0;
}
input[type="checkbox"].toggle-switch::before {
    content: "";
    position: absolute;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: #fff;
    top: 2px;
    left: 2px;
    transition: left .2s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
input[type="checkbox"].toggle-switch:checked { background: var(--navy); }
input[type="checkbox"].toggle-switch:checked::before { left: 19px; }
input[type="checkbox"].toggle-switch:disabled { opacity: .5; cursor: not-allowed; }
input[type="checkbox"].toggle-switch:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
/* Smaller variant for tight inline contexts (e.g. a compact reply row) where the full 38x21 size would look oversized next to small text. */
input[type="checkbox"].toggle-switch-sm { width: 28px; height: 16px; min-width: 28px; }
input[type="checkbox"].toggle-switch-sm::before { width: 12px; height: 12px; top: 2px; left: 2px; }
input[type="checkbox"].toggle-switch-sm:checked::before { left: 14px; }
input[type="checkbox"] { cursor: pointer; }

/* ---------------- Bulk Publish: scope selector (All Classes switch + class picker) ---------------- */
.bulk-publish-scope { margin: 14px 0; }
.bulk-scope-toggle {
    display: flex; align-items: center; gap: 12px;
    background: var(--ice-soft, var(--grey-bg)); border: 1px solid var(--border);
    border-radius: 10px; padding: 12px 14px; cursor: pointer; margin-bottom: 12px;
    transition: border-color .15s ease;
}
.bulk-scope-toggle:hover { border-color: var(--gold); }
.bulk-scope-toggle span { display: flex; flex-direction: column; gap: 1px; }
.bulk-scope-sub { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.bulk-class-picker { transition: opacity .15s ease; }
.bulk-class-picker.bulk-picker-disabled { opacity: .45; pointer-events: none; }
.bulk-picker-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.bulk-picker-header a { font-size: 12px; }
.bulk-class-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px 14px;
    border: 1px solid var(--border); border-radius: 8px; padding: 12px; max-height: 200px; overflow-y: auto;
}
.bulk-class-item { display: flex; align-items: center; gap: 7px; font-weight: 400; font-size: 13px; }

/* ---------------- CBT exam creation: Exam Options toggles ---------------- */
.exam-option-row { margin-bottom: 10px; }
.exam-option-toggle {
    display: flex; align-items: center; gap: 12px;
    background: var(--grey-bg); border: 1px solid var(--border);
    border-radius: 10px; padding: 11px 14px; cursor: pointer;
    transition: border-color .15s ease;
}
.exam-option-toggle:hover { border-color: var(--gold); }
.exam-option-toggle span { display: flex; flex-direction: column; gap: 1px; }
.exam-option-sub { font-size: 11.5px; color: var(--muted); font-weight: 400; }

/* ---------------- Settings tabbed layout ---------------- */
.settings-tabs { display: flex; gap: 4px; margin-bottom: 16px; border-bottom: 2px solid var(--border); flex-wrap: wrap; }
.settings-tab-btn {
    background: none; border: none; padding: 10px 18px;
    font-size: 13px; font-weight: 600; color: var(--muted);
    cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px;
    transition: color .15s ease, border-color .15s ease;
}
.settings-tab-btn:hover { color: var(--navy); }
.settings-tab-btn.active { color: var(--navy); border-bottom-color: var(--gold); }

/* ---------------- Layout shell ---------------- */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: var(--sidebar-width);
    background: var(--navy);
    color: #fff;
    flex-shrink: 0;
    transition: width .2s ease;
    overflow-x: hidden;
    overflow-y: auto;
    position: sticky;
    top: 0;
    height: 100vh;
    align-self: flex-start;
}

/* Icon-only collapsed mode (desktop): sidebar narrows, labels hide,
   icons stay visible — it is never fully hidden. */
.app-shell.sidebar-collapsed .sidebar { width: 64px; }
.app-shell.sidebar-collapsed .label,
.app-shell.sidebar-collapsed .chevron,
.app-shell.sidebar-collapsed .brand-full { display: none; }
.app-shell.sidebar-collapsed .brand-mini { display: block !important; }
.app-shell.sidebar-collapsed .sidebar nav a { justify-content: center; padding: 12px 0; }
.app-shell.sidebar-collapsed .sidebar-section-label { justify-content: center; padding: 12px 0; cursor: default; }
.app-shell.sidebar-collapsed .sidebar-group-body { display: block !important; }

.sidebar-brand {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.12);
    text-align: left;
    position: relative;
}
.sidebar-brand strong.brand-full { color: var(--gold); font-size: 16px; letter-spacing: .5px; }
.sidebar-brand span.brand-full { display: block; font-size: 11.5px; color: rgba(255,255,255,.6); margin-top: 2px; }
.sidebar-brand strong.brand-mini { display: none; color: var(--gold); font-size: 18px; text-align: center; }
.sidebar-close-btn {
    display: none;
    position: absolute;
    top: 12px; right: 12px;
    width: 30px; height: 30px;
    background: rgba(255,255,255,.08);
    border: none;
    border-radius: 6px;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}
.sidebar-close-btn:hover { background: rgba(255,255,255,.16); }

.sidebar-section-label {
    padding: 14px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: rgba(255,255,255,.45);
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    user-select: none;
}
.sidebar-section-label:hover { color: rgba(255,255,255,.75); }
.sidebar-section-label .chevron { transition: transform .15s ease; font-size: 10px; }
.sidebar-section-label.collapsed .chevron { transform: rotate(-90deg); }

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    border-left: 3px solid transparent;
}
.sidebar nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar nav a.active {
    background: rgba(184,134,11,.15);
    border-left-color: var(--gold);
    color: #fff;
    font-weight: 600;
}
.sidebar nav a .icon { width: 18px; text-align: center; flex-shrink: 0; }

.sidebar-bottom {
    border-top: 1px solid rgba(255,255,255,.12);
    padding: 6px 0;
}
.sidebar-bottom a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: rgba(255,255,255,.85);
    font-size: 14px;
    border-left: 3px solid transparent;
}
.sidebar-bottom a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-bottom a.active { background: rgba(184,134,11,.15); border-left-color: var(--gold); color: #fff; font-weight: 600; }
.sidebar-bottom a .icon { width: 18px; text-align: center; flex-shrink: 0; }

/* Mobile bottom quick-action nav - hidden on desktop, shown fixed at
   the bottom of the viewport on mobile (see the max-width:860px media
   query below for the visible layout). */
.mobile-quick-nav { display: none; }
.app-shell.sidebar-collapsed .sidebar-bottom a { justify-content: center; padding: 12px 0; }

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.topbar {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 12px 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 5;
}
.topbar h1 { font-size: 18px; margin: 0; flex: 1; color: var(--navy); }
.topbar-search { margin-right: 10px; }
.topbar-search input {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 7px 14px;
    font-size: 12.8px;
    width: 220px;
    background: var(--grey-bg);
}
.topbar-search input:focus { outline: none; border-color: var(--gold); background: #fff; }
.sidebar-toggle {
    background: none; border: none; font-size: 20px; cursor: pointer; color: var(--navy);
}
.topbar-user { display: flex; align-items: center; gap: 12px; font-size: 13.5px; color: var(--muted); }
.btn-logout {
    background: var(--navy); color: #fff; padding: 6px 14px; border-radius: 4px; font-size: 13px;
}
.btn-logout:hover { background: var(--gold); color: #fff; }

.topbar-profile-link { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.topbar-profile-link:hover { color: var(--navy); }
.topbar-avatar { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.topbar-avatar-fallback {
    display: flex; align-items: center; justify-content: center;
    background: var(--navy); color: #fff; font-weight: 700; font-size: 13px;
}

/* ---------------- Sidebar toggle: burger <-> close icon ---------------- */
.sidebar-toggle .icon-close { display: none; }

.back-btn {
    background: var(--grey-bg);
    border: 1px solid var(--border);
    color: var(--navy);
    padding: 7px 12px;
    border-radius: 5px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}
.back-btn:hover { background: var(--gold-light); border-color: var(--gold); }
@media screen and (min-width: 861px) {
    .app-shell:not(.sidebar-collapsed) .sidebar-toggle .icon-burger { display: none; }
    .app-shell:not(.sidebar-collapsed) .sidebar-toggle .icon-close { display: inline; }
}
@media screen and (max-width: 860px) {
    .app-shell.sidebar-open .sidebar-toggle .icon-burger { display: none; }
    .app-shell.sidebar-open .sidebar-toggle .icon-close { display: inline; }
}

/* ---------------- Profile dropdown ---------------- */
.profile-wrapper { position: relative; }
.profile-toggle {
    background: none; border: none; cursor: pointer;
    display: flex; align-items: center; gap: 8px; color: var(--muted); padding: 2px;
}
.profile-toggle:hover { color: var(--navy); }
.profile-caret { font-size: 9px; }
.profile-dropdown {
    display: none;
    position: absolute; right: 0; top: 130%;
    width: 220px;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 30; overflow: hidden;
}
.profile-dropdown.open { display: block; }
.profile-dropdown-header { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.profile-dropdown-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.profile-dropdown-header div { display: flex; flex-direction: column; min-width: 0; }
.profile-dropdown-header strong { font-size: 13px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-dropdown-header span { color: var(--muted); font-size: 11px; }
.profile-dropdown-item { display: block; padding: 10px 14px; font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border); }
.profile-dropdown-item:last-child { border-bottom: none; }
.profile-dropdown-item:hover { background: var(--grey-bg); }
.profile-dropdown-logout { color: var(--danger); }

/* ---------------- Logos ---------------- */
.login-logo { max-height: 60px; max-width: 220px; display: block; margin: 0 auto 14px; object-fit: contain; }
.sidebar-logo { max-height: 34px; max-width: 170px; object-fit: contain; margin-bottom: 6px; display: block; }

/* ---------------- Theme picker (Settings → General Settings) ---------------- */
.theme-picker { display: flex; gap: 12px; flex-wrap: wrap; }
.theme-option {
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    cursor: pointer; padding: 10px; border: 2px solid var(--border); border-radius: 8px;
    font-size: 11.5px; text-align: center; width: 112px;
}
.theme-option.selected, .theme-option:hover { border-color: var(--gold); }
.theme-option input { display: none; }
.theme-swatch { width: 64px; height: 32px; border-radius: 6px; display: block; }
.theme-swatch-default .theme-swatch { background: linear-gradient(90deg, #1b2a4a 50%, #b8860b 50%); }
.theme-swatch-emerald .theme-swatch { background: linear-gradient(90deg, #14532d 50%, #d4af37 50%); }
.theme-swatch-royal .theme-swatch   { background: linear-gradient(90deg, #1e3a8a 50%, #94a3b8 50%); }
.theme-swatch-maroon .theme-swatch  { background: linear-gradient(90deg, #7f1d1d 50%, #d4a017 50%); }
.theme-swatch-slate .theme-swatch   { background: linear-gradient(90deg, #1e293b 50%, #14b8a6 50%); }
.theme-swatch-sunset .theme-swatch   { background: linear-gradient(90deg, #9a3412 50%, #eab308 50%); }
.theme-swatch-ocean .theme-swatch    { background: linear-gradient(90deg, #0e7490 50%, #22d3ee 50%); }
.theme-swatch-lavender .theme-swatch { background: linear-gradient(90deg, #581c87 50%, #f5c451 50%); }
.theme-swatch-burgundy .theme-swatch { background: linear-gradient(90deg, #6b1029 50%, #c9a227 50%); }
.theme-swatch-onyx .theme-swatch     { background: linear-gradient(90deg, #18181b 50%, #eab308 50%); }

/* ---------------- App footer ---------------- */
.app-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    background: #fff;
    display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; justify-content: space-between;
    font-size: 12px; color: var(--muted);
}
.app-footer-version { font-weight: 700; color: var(--navy); }
.app-footer-social a { margin-left: 10px; color: var(--navy); }
.app-footer-social a:first-child { margin-left: 0; }

.notif-wrapper { position: relative; }
.notif-bell {
    background: none; border: none; cursor: pointer; font-size: 18px; position: relative; padding: 4px;
}
.notif-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--danger); color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 10px; padding: 1px 5px; line-height: 1.3;
}
.notif-dropdown {
    display: none;
    position: absolute; right: 0; top: 130%;
    width: 300px; max-height: 380px; overflow-y: auto;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15);
    z-index: 30;
}
.notif-dropdown.open { display: block; }
.notif-dropdown-header { padding: 10px 14px; font-weight: 700; color: var(--navy); border-bottom: 1px solid var(--border); font-size: 13px; }
.notif-item {
    display: block; padding: 10px 14px; border-bottom: 1px solid var(--border);
    font-size: 12.8px; color: var(--text);
}
.notif-item:hover { background: var(--grey-bg); }
.notif-item.unread { background: var(--gold-light); font-weight: 600; }
.notif-item .notif-time { display: block; font-size: 11px; color: var(--muted); font-weight: 400; margin-top: 3px; }
.notif-empty { padding: 16px 14px; color: var(--muted); font-size: 12.8px; text-align: center; }
.notif-viewall { display: block; text-align: center; padding: 9px; font-size: 12.5px; font-weight: 600; color: var(--navy); border-top: 1px solid var(--border); }

.page-content { padding: 22px; flex: 1; min-width: 0; }

/* ---------------- Cards ---------------- */
.card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 20px;
}
.card-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    font-weight: 600;
    color: var(--navy);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-body { padding: 18px; }

/* ---------------- Stat widgets ---------------- */
.stat-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    margin-bottom: 22px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    padding-bottom: 4px;
}
.stat-card {
    flex: 1 0 190px;
    min-width: 190px;
    background: #fff;
    border-radius: 12px;
    padding: 13px 14px;
    border-left: 4px solid var(--gold);
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    animation: statCardIn .5s ease both;
    transition: transform .2s ease, box-shadow .2s ease;
    position: relative;
}
/* Fallback for any stat-card with no .stat-icon-chip inside it (older
   markup that predates icons being added) - keeps the original plain
   colored-box look so nothing regresses visually. */
.stat-card::before {
    content: "";
    display: block;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--gold);
    opacity: .14;
    margin-bottom: 9px;
}
.stat-card:has(.stat-icon-chip)::before,
.stat-card.stat-card-has-icon::before { content: none; }
.stat-icon-chip {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 9px;
    position: relative;
    color: #fff;
    background: linear-gradient(135deg, var(--gold), var(--gold));
    box-shadow: 0 3px 8px -2px rgba(0,0,0,.28);
}
.stat-icon-chip i { font-size: 16px; position: relative; z-index: 1; color: #fff; }
.stat-card .stat-value { font-size: 23px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; line-height: 1.15; }
.stat-card .stat-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-top: 1px; }
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.stat-card:hover .stat-icon-chip { transform: scale(1.06); }
.stat-icon-chip { transition: transform .2s ease; }
.stat-grid .stat-card:nth-child(1) { animation-delay: .03s; }
.stat-grid .stat-card:nth-child(2) { animation-delay: .09s; }
.stat-grid .stat-card:nth-child(3) { animation-delay: .15s; }
.stat-grid .stat-card:nth-child(4) { animation-delay: .21s; }
.stat-grid .stat-card:nth-child(5) { animation-delay: .27s; }
.stat-grid .stat-card:nth-child(6) { animation-delay: .33s; }
@keyframes statCardIn {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
    .stat-card { animation: none; }
    .stat-card:hover { transform: none; }
}
/* ---------------- Dashboard greeting header ---------------- */
.dash-greeting { margin-bottom: 20px; }
.dash-greeting .eyebrow {
    font-size: 10.5px;
    letter-spacing: .12em;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--gold);
}
.dash-greeting h1 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.01em;
    color: var(--navy);
    margin: 3px 0 2px;
}
.dash-greeting p { font-size: 12.8px; color: var(--muted); margin: 0; }

/* ---------------- Dashboard: weekly attendance trend bars ---------------- */
.dash-trend-bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 14px; }
.dash-trend-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; }
.dash-trend-bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.dash-trend-bar-fill {
    width: 100%;
    background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: height 1s cubic-bezier(.2,.8,.3,1);
}
.dash-trend-bar-fill:last-child, .dash-trend-bar-col:last-child .dash-trend-bar-fill {
    background: linear-gradient(180deg, #ffbd85 0%, var(--gold) 100%);
}
.dash-trend-bar-value {
    position: absolute; top: -18px; left: 0; right: 0; text-align: center;
    font-size: 10.5px; color: var(--muted); font-weight: 700;
}
.dash-trend-bar-label { margin-top: 6px; font-size: 10.5px; color: var(--muted); font-weight: 600; }

/* ---------------- Dashboard: recent activity feed ---------------- */
.dash-feed { display: flex; flex-direction: column; gap: 12px; }
.dash-feed-item {
    display: flex; gap: 10px; align-items: flex-start;
    opacity: 0; transform: translateX(8px);
    animation: dashFeedIn .5s ease forwards;
}
@keyframes dashFeedIn { to { opacity: 1; transform: translateX(0); } }
@media (prefers-reduced-motion: reduce) {
    .dash-feed-item { animation: none; opacity: 1; transform: none; }
    .dash-trend-bar-fill { transition: none; }
}
.dash-feed-dot {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--grey-bg); color: var(--navy);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; flex-shrink: 0;
}
.dash-feed-text { font-size: 12.8px; color: var(--text); font-weight: 500; }
.dash-feed-time { font-size: 10.8px; color: var(--muted); margin-top: 1px; }

.stat-card .stat-value { font-size: 27px; font-weight: 800; color: var(--navy); letter-spacing: -.01em; }
.stat-card .stat-label { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }

/* Colorful stat card accents (dashboard) — each stat gets its own accent
   color so the dashboard reads as lively rather than monochrome navy/gold */
.stat-card.stat-color-1 { border-left-color: #2563eb; }
.stat-card.stat-color-1 .stat-value { color: #2563eb; }
.stat-card.stat-color-1::before { background: #2563eb; }
.stat-card.stat-color-1 .stat-icon-chip { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-card.stat-color-2 { border-left-color: #7c3aed; }
.stat-card.stat-color-2 .stat-value { color: #7c3aed; }
.stat-card.stat-color-2::before { background: #7c3aed; }
.stat-card.stat-color-2 .stat-icon-chip { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.stat-card.stat-color-3 { border-left-color: #db2777; }
.stat-card.stat-color-3 .stat-value { color: #db2777; }
.stat-card.stat-color-3::before { background: #db2777; }
.stat-card.stat-color-3 .stat-icon-chip { background: linear-gradient(135deg, #db2777, #be185d); }
.stat-card.stat-color-4 { border-left-color: #d97706; }
.stat-card.stat-color-4 .stat-value { color: #d97706; }
.stat-card.stat-color-4::before { background: #d97706; }
.stat-card.stat-color-4 .stat-icon-chip { background: linear-gradient(135deg, #d97706, #b45309); }
.stat-card.stat-color-5 { border-left-color: #16a34a; }
.stat-card.stat-color-5 .stat-value { color: #16a34a; }
.stat-card.stat-color-5::before { background: #16a34a; }
.stat-card.stat-color-5 .stat-icon-chip { background: linear-gradient(135deg, #16a34a, #15803d); }
.stat-card.stat-color-6 { border-left-color: #dc2626; }
.stat-card.stat-color-6 .stat-value { color: #dc2626; }
.stat-card.stat-color-6::before { background: #dc2626; }
.stat-card.stat-color-6 .stat-icon-chip { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.stat-card.stat-color-7 { border-left-color: #7c3aed; }
.stat-card.stat-color-7 .stat-value { color: #7c3aed; }
.stat-card.stat-color-7::before { background: #7c3aed; }
.stat-card.stat-color-7 .stat-icon-chip { background: linear-gradient(135deg, #7c3aed, #6d28d9); }

/* ---------------- Dashboard charts (pure CSS/SVG, no libraries) ---------------- */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}
.chart-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 16px;
    animation: chartCardIn .6s ease both;
    animation-delay: .2s;
    transition: box-shadow .2s ease;
}
.chart-card:hover { box-shadow: 0 6px 16px rgba(0,0,0,.08); }
@keyframes chartCardIn {
    from { opacity: 0; transform: scale(.97); }
    to { opacity: 1; transform: scale(1); }
}
@media (prefers-reduced-motion: reduce) {
    .chart-card { animation: none; }
}
.chart-card-title { font-size: 13px; font-weight: 700; color: var(--navy); margin-bottom: 14px; text-transform: uppercase; letter-spacing: .03em; }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: center; }
.donut {
    width: 130px; height: 130px; border-radius: 50%;
    background: conic-gradient(var(--navy) calc(var(--p, 50) * 1%), var(--gold) 0);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.donut-hole {
    width: 90px; height: 90px; border-radius: 50%; background: #fff;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    font-weight: 700; color: var(--navy); font-size: 19px; text-align: center;
}
.donut-hole span { font-size: 10.5px; font-weight: 400; color: var(--muted); }
.donut-legend { font-size: 12.8px; }
.donut-legend div { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; }
.donut-legend .swatch { width: 11px; height: 11px; border-radius: 3px; flex-shrink: 0; }

.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.bar-row .bar-label { width: 100px; font-size: 12.5px; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-row .bar-track { flex: 1; background: var(--grey-bg); border-radius: 4px; height: 16px; overflow: hidden; }
.bar-row .bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--navy), var(--gold));
    border-radius: 4px;
    animation: barFillIn 1s cubic-bezier(.22,1,.36,1) both;
    animation-delay: .3s;
}
@keyframes barFillIn {
    from { width: 0; }
}
@media (prefers-reduced-motion: reduce) {
    .bar-row .bar-fill { animation: none; }
}
.bar-row .bar-value { width: 32px; text-align: right; font-size: 12.5px; font-weight: 700; color: var(--navy); flex-shrink: 0; }

.progress-linear { background: var(--grey-bg); border-radius: 20px; height: 24px; overflow: hidden; position: relative; margin-bottom: 6px; }
.progress-linear-fill { height: 100%; background: linear-gradient(90deg, var(--navy), var(--gold)); border-radius: 20px 0 0 20px; }
.progress-linear-label {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.35);
}
.chart-empty { color: var(--muted); font-size: 12.8px; text-align: center; padding: 20px 0; }

.permission-matrix th, .permission-matrix td { white-space: nowrap; padding: 7px 10px; }
.permission-matrix td:first-child { white-space: normal; font-weight: 600; }

/* ---------------- CBT exam-taking ---------------- */
.cbt-timer-bar {
    position: sticky; top: 0; z-index: 10;
    background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 10px 16px; font-weight: 700; font-size: 15px;
    border-radius: 6px; margin-bottom: 12px;
}
.cbt-timer-bar.cbt-timer-warning { background: var(--danger); animation: cbtPulse 1s infinite; }
@keyframes cbtPulse { 0%, 100% { opacity: 1; } 50% { opacity: .7; } }
.cbt-progress-badge {
    font-size: 12.5px; font-weight: 600; background: rgba(255,255,255,.15);
    padding: 5px 12px; border-radius: 20px; white-space: nowrap;
}
.cbt-progress-badge.cbt-progress-complete { background: var(--gold); color: var(--navy); }
.cbt-question-nav {
    display: flex; flex-wrap: wrap; gap: 6px;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    padding: 10px; margin-bottom: 16px;
}
.cbt-question-nav-item {
    width: 30px; height: 30px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; border: 1px solid var(--border); font-size: 12px; font-weight: 700;
    color: var(--text); text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.cbt-question-nav-item:hover { border-color: var(--gold); }
.cbt-question-nav-item.cbt-question-nav-answered { background: var(--success); border-color: var(--success); color: #fff; }
.cbt-question-nav-item.cbt-question-nav-current { outline: 2px solid var(--navy); outline-offset: 1px; font-weight: 800; }
.cbt-question {
    border: 1px solid var(--border); border-radius: 6px; padding: 14px 16px; margin-bottom: 14px;
    scroll-margin-top: 90px;
}
.cbt-question-text { margin-bottom: 8px; line-height: 1.5; }
.cbt-option {
    display: block; padding: 8px 10px; margin-bottom: 6px; border-radius: 4px;
    font-weight: 400; cursor: pointer; border: 1px solid transparent;
}
.cbt-option:hover { background: var(--grey-bg); }
.cbt-option input { margin-right: 8px; }

/* ---------------- Tables ---------------- */
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.8px; }
table.data-table th, table.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}
table.data-table th {
    background: var(--navy);
    color: #fff;
    font-weight: 600;
    font-size: 12.5px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
table.data-table tbody tr:nth-child(even) { background: #fafbfd; }
table.data-table tbody tr:hover { background: var(--gold-light); }

/* ---------------- Forms ---------------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
/* For compact rows (e.g. one field + a submit button) where form-grid's
   stretching columns leave an awkward gap - items sit at their natural
   width instead of stretching to fill the row. */
.form-inline { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }

/* Reusable searchable multi-select dropdown (checkboxes + live search),
   used anywhere a long list of people/items needs multi-selection
   without taking up a full checkbox grid's worth of vertical space. */
.checkbox-dropdown { position: relative; width: 100%; max-width: 360px; }
.checkbox-dropdown-trigger {
    width: 100%; text-align: left; padding: 9px 11px;
    border: 1px solid var(--border); border-radius: 4px; background: #fff;
    display: flex; justify-content: space-between; align-items: center; gap: 8px;
    cursor: pointer; font-size: 14px; font-family: inherit; color: var(--text, #1a1a1a);
}
.checkbox-dropdown-trigger:focus { outline: none; border-color: var(--navy); }
.checkbox-dropdown-arrow { font-size: 11px; color: var(--muted); flex-shrink: 0; transition: transform .15s ease; }
.checkbox-dropdown.open .checkbox-dropdown-arrow { transform: rotate(180deg); }
.checkbox-dropdown-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.checkbox-dropdown-panel {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 25;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15); margin-top: 4px;
}
.checkbox-dropdown.open .checkbox-dropdown-panel { display: block; }
.checkbox-dropdown-search {
    width: 100%; padding: 9px 10px; border: none; border-bottom: 1px solid var(--border);
    font-size: 13px; font-family: inherit; box-sizing: border-box; border-radius: 6px 6px 0 0;
}
.checkbox-dropdown-search:focus { outline: none; background: #f8f9fb; }
.checkbox-dropdown-list { max-height: 220px; overflow-y: auto; padding: 6px; }
.checkbox-dropdown-list .checkbox-dropdown-item {
    display: flex; align-items: center; gap: 8px; padding: 7px 8px;
    font-weight: 400; font-size: 13.5px; border-radius: 4px; cursor: pointer; margin: 0;
    color: var(--text, #1a1a1a);
}
.checkbox-dropdown-list .checkbox-dropdown-item:hover { background: #f5f7fa; }
.checkbox-dropdown-item input[type="checkbox"] { width: auto; padding: 0; margin: 0; flex-shrink: 0; }
.checkbox-dropdown-empty { padding: 14px 10px; font-size: 13px; color: var(--muted); text-align: center; }

/* Searchable single-select ("combobox"): progressively enhances a
   native <select class="searchable-select"> - the original select is
   hidden but stays in the DOM as the real form field, with a text
   input + filtered dropdown list layered on top for quick searching. */
.searchable-select-wrap { position: relative; display: inline-block; width: 100%; }
.searchable-select-input {
    width: 100%; padding: 3px 6px; font-size: 12.5px; font-family: inherit;
    border: 1px solid var(--border); border-radius: 4px; background: #fff; cursor: pointer;
}
.searchable-select-input:focus { outline: none; border-color: var(--navy); background: #fff; cursor: text; }
.searchable-select-panel {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 25;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 8px 24px rgba(0,0,0,.15); margin-top: 2px; max-height: 200px; overflow-y: auto;
    min-width: 180px;
}
.searchable-select-wrap.open .searchable-select-panel { display: block; }
.searchable-select-option {
    padding: 6px 10px; font-size: 12.5px; cursor: pointer; color: var(--text, #1a1a1a);
}
.searchable-select-option:hover, .searchable-select-option.highlighted { background: #f5f7fa; }
.searchable-select-option.muted { color: var(--muted); font-style: italic; }
.searchable-select-empty { padding: 10px; font-size: 12px; color: var(--muted); text-align: center; }


.form-group { margin-bottom: 14px; }
.form-group label { display: block; margin-bottom: 5px; font-size: 13px; font-weight: 600; color: var(--navy); }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}
.rich-text-editor { background: #fff; border-radius: 0 0 6px 6px; }
.rich-text-editor .ql-editor { min-height: 100px; font-size: 14px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--navy);
}

/* ---------------- Buttons ---------------- */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-size: 13.5px;
    cursor: pointer;
    font-weight: 600;
}
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover { background: var(--navy-dark); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-gold:hover { background: #966d09; color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12.5px; }

/* ---------------- Alerts / badges ---------------- */
.alert { padding: 11px 15px; border-radius: 4px; margin-bottom: 16px; font-size: 13.8px; }
.alert-success { background: #e6f4ea; color: var(--success); border: 1px solid #b7e0c3; }
.alert-danger { background: #fbe7e9; color: var(--danger); border: 1px solid #f0bcc2; }
.alert-info { background: #e8f0fa; color: #1c4a7a; border: 1px solid #bcd6f0; }
.alert-warning { background: #fdf4e3; color: #7a5410; border: 1px solid #efd9a8; }
.alert-warning a { color: inherit; font-weight: 700; }

/* ---------------- Error alerts as modal popups ---------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, .55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 16px;
    animation: modalFadeIn .18s ease both;
}
@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-box {
    background: #fff;
    border-radius: 10px;
    padding: 28px 26px 22px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    animation: modalPopIn .22s cubic-bezier(.34,1.56,.64,1) both;
}
@keyframes modalPopIn {
    from { opacity: 0; transform: scale(.9) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-box.modal-danger { border-top: 4px solid var(--danger); }
.modal-icon { font-size: 34px; margin-bottom: 10px; }
.modal-message { font-size: 14.5px; color: var(--text); line-height: 1.6; margin-bottom: 18px; }
.modal-message-list { text-align: left; font-size: 13.5px; color: var(--text); line-height: 1.7; margin: 0 0 18px 20px; padding: 0; }
.modal-close-btn { min-width: 120px; }

/* ---------------- Birthday celebration modal ---------------- */
.birthday-modal-overlay { background: rgba(15, 23, 42, .7); z-index: 300; }
.birthday-modal-box {
    max-width: 440px;
    background: linear-gradient(160deg, #fff 0%, #fff8e8 100%);
    border: none;
    position: relative;
    overflow: hidden;
    animation: modalPopIn .3s cubic-bezier(.34,1.56,.64,1) both, birthdayGlow 2.2s ease-in-out infinite;
}
@keyframes birthdayGlow {
    0%, 100% { box-shadow: 0 0 30px 4px rgba(212,175,55,.35), 0 20px 60px rgba(0,0,0,.3); }
    50% { box-shadow: 0 0 50px 12px rgba(212,175,55,.65), 0 20px 60px rgba(0,0,0,.3); }
}
.birthday-emoji { font-size: 40px; margin-bottom: 8px; animation: birthdayBounce 1.4s ease-in-out infinite; }
@keyframes birthdayBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-6px) rotate(-4deg); }
    75% { transform: translateY(-6px) rotate(4deg); }
}
.birthday-modal-title {
    font-size: 22px;
    font-weight: 800;
    background: linear-gradient(90deg, var(--navy), var(--gold), var(--navy));
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: birthdayShimmer 3s linear infinite;
    margin: 4px 0 10px;
}
@keyframes birthdayShimmer { to { background-position: 200% center; } }
.birthday-modal-message { font-size: 14.5px; color: var(--text); line-height: 1.6; }
@media (prefers-reduced-motion: reduce) {
    .birthday-modal-box, .birthday-emoji, .birthday-modal-title { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
    .modal-overlay, .modal-box { animation: none; }
}

/* ---------------- PWA install banner (mobile) ---------------- */
.pwa-install-banner {
    position: fixed;
    left: 12px; right: 12px; bottom: 12px;
    z-index: 150;
    background: var(--navy);
    color: #fff;
    border-radius: 10px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.3);
    font-size: 13px;
    animation: pwaBannerIn .3s ease both;
}
@keyframes pwaBannerIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
.pwa-install-banner span { flex: 1; line-height: 1.4; }
.pwa-install-btn {
    background: var(--gold);
    color: var(--navy);
    border: none;
    border-radius: 6px;
    padding: 7px 14px;
    font-weight: 700;
    font-size: 12.5px;
    cursor: pointer;
    flex-shrink: 0;
}
.pwa-dismiss-btn {
    background: none;
    border: none;
    color: #fff;
    opacity: .7;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0 2px;
    flex-shrink: 0;
}
.pwa-dismiss-btn:hover { opacity: 1; }

/* ---------------- Messaging (inbox + conversation thread) ---------------- */
.inbox-list { display: flex; flex-direction: column; }
.inbox-row {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-bottom: 1px solid var(--border);
    text-decoration: none; color: var(--text);
    transition: background .15s ease;
}
.inbox-row:hover { background: var(--grey-bg); }
.inbox-row-unread { background: var(--gold-light); }
.inbox-row-unread .inbox-row-top strong { color: var(--navy); }
.inbox-avatar {
    width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
    background: var(--navy); color: #fff; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.inbox-row-body { flex: 1; min-width: 0; }
.inbox-row-top { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.inbox-time { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.inbox-row-snippet { font-size: 12.8px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-unread-badge {
    background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
    border-radius: 10px; padding: 2px 8px; flex-shrink: 0;
}

.inbox-filter-row { display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.inbox-filter-btn {
    background: var(--grey-bg); border: 1px solid var(--border); border-radius: 20px;
    padding: 5px 14px; font-size: 12px; font-weight: 600; color: var(--muted);
    cursor: pointer; transition: all .15s ease;
}
.inbox-filter-btn:hover { background: #fff; }
.inbox-filter-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.inbox-avatar-announcement { background: var(--gold); color: var(--navy); font-size: 17px; }

.inbox-type-badge {
    display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
    letter-spacing: .03em; padding: 1px 7px; border-radius: 4px; margin-right: 6px; vertical-align: middle;
}
.inbox-type-announcement { background: rgba(184,134,11,.15); color: var(--gold-dark, #92670a); }
.inbox-type-private { background: var(--grey-bg); color: var(--muted); }

.message-thread {
    max-height: 480px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
    padding: 10px 4px; margin-bottom: 14px;
}
.message-bubble { max-width: 75%; padding: 9px 13px; border-radius: 12px; font-size: 13.5px; line-height: 1.5; }
.message-bubble-other { align-self: flex-start; background: var(--grey-bg); border-bottom-left-radius: 3px; }
.message-bubble-own { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 3px; }
.message-sender { font-size: 10.5px; font-weight: 700; color: var(--navy); margin-bottom: 3px; }
.message-time { font-size: 10px; opacity: .65; margin-top: 4px; text-align: right; }
.message-reply-form { display: flex; gap: 8px; align-items: flex-end; }
.message-reply-form textarea { width: 100%; resize: none; }

.recipient-results {
    border: 1px solid var(--border); border-radius: 6px; margin-top: 4px;
    max-height: 220px; overflow-y: auto;
}
.recipient-result { padding: 9px 12px; font-size: 13px; cursor: pointer; border-bottom: 1px solid var(--border); }
.recipient-result:last-child { border-bottom: none; }
.recipient-result:hover { background: var(--grey-bg); }

/* ---------------- Messaging: delivery channel selection ---------------- */
.notify-channel-row { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.notify-channel-option {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 400; color: var(--text); cursor: pointer;
}
.notify-channel-option input { margin: 0; }
.notify-channel-fixed { color: var(--muted); cursor: default; }
.notify-channel-compact { font-size: 11.5px; color: var(--muted); }
.message-reply-form .notify-channel-row { gap: 12px; }

.badge { display: inline-block; padding: 3px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 700; }
.badge-present { background: #e6f4ea; color: var(--success); }
.badge-absent { background: #fbe7e9; color: var(--danger); }
.badge-active { background: #e6f4ea; color: var(--success); }
.badge-inactive { background: #ececec; color: var(--muted); }
.badge-partpaid { background: #fff3cd; color: #8a6100; }

/* ---------------- Finance stat card color variants ---------------- */
.stat-card-finance-blue { border-left-color: #2563eb; }
.stat-card-finance-blue .stat-value { color: #2563eb; }
.stat-card-finance-blue::before { background: #2563eb; }
.stat-card-finance-blue .stat-icon-chip { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-card-finance-green { border-left-color: #16a34a; }
.stat-card-finance-green .stat-value { color: #16a34a; }
.stat-card-finance-green::before { background: #16a34a; }
.stat-card-finance-green .stat-icon-chip { background: linear-gradient(135deg, #16a34a, #15803d); }
.stat-card-finance-red { border-left-color: #dc2626; }
.stat-card-finance-red .stat-value { color: #dc2626; }
.stat-card-finance-red::before { background: #dc2626; }
.stat-card-finance-red .stat-icon-chip { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.stat-card-finance-purple { border-left-color: #9333ea; }
.stat-card-finance-purple .stat-value { color: #9333ea; }
.stat-card-finance-purple::before { background: #9333ea; }
.stat-card-finance-purple .stat-icon-chip { background: linear-gradient(135deg, #9333ea, #7e22ce); }

/* ---------------- Login page ---------------- */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
}
.login-box {
    background: #fff;
    width: 360px;
    border-radius: 8px;
    padding: 34px 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.login-box h2 { text-align: center; color: var(--navy); margin: 0 0 4px; }
.login-box p.subtitle { text-align: center; color: var(--muted); font-size: 13px; margin-bottom: 22px; }
.login-box .btn { width: 100%; margin-top: 6px; }

/* ---------------- Password visibility toggle (all password fields) ---------------- */
.password-toggle-btn {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 15px;
    opacity: .45;
    padding: 4px;
    line-height: 1;
}
.password-toggle-btn:hover { opacity: .8; }
.password-toggle-btn.is-showing { opacity: .9; }

/* ---------------- Login page: split slider layout ---------------- */
.login-wrapper-split {
    align-items: center;
    justify-content: center;
    padding: 32px;
}
.login-shell {
    display: flex;
    width: 100%;
    max-width: 1180px;
    max-height: 720px;
    min-height: 560px;
    margin: 0 auto;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.login-slider-panel {
    flex: 1 1 56%;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}
.login-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.login-slide.active { opacity: 1; }
.login-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, rgba(15,23,42,.72) 0%, rgba(15,23,42,.35) 50%, rgba(15,23,42,.75) 100%);
}
.login-slide-caption {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    z-index: 1;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    padding: 28px 36px;
    text-shadow: 0 2px 8px rgba(0,0,0,.5);
}
.login-motivation {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 22px;
    font-weight: 800;
    line-height: 1.45;
    padding: 0 44px;
    max-width: 480px;
    text-shadow: 0 3px 14px rgba(0,0,0,.55);
}
.login-motivation::before {
    content: "\201C";
    display: block;
    font-size: 64px;
    font-weight: 900;
    line-height: 1;
    color: var(--gold);
    margin-bottom: 4px;
    text-shadow: none;
}
.login-motivation-mobile { display: none; }
.login-motivation-desc {
    display: block;
    font-size: 14px;
    font-weight: 400;
    margin-top: 8px;
    opacity: .85;
}
.login-form-panel {
    flex: 1 1 44%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #fff;
    padding: 30px 16px;
}
.login-wrapper-split .login-shell .login-box {
    box-shadow: none;
    width: 100%;
    max-width: 360px;
    padding: 0;
    position: relative;
}
.login-wrapper-split .login-shell .login-box::before {
    content: "";
    display: block;
    height: 4px;
    width: 64px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--gold), var(--navy));
    margin: 0 auto 20px;
}
.login-box .form-group input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,175,55,.18);
}
.login-apply-btn {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 6px;
    border: 1.5px solid var(--gold);
    color: var(--navy);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.login-apply-btn:hover { background: var(--gold); color: #fff; }
.login-website-btn {
    display: block;
    text-align: center;
    width: 100%;
    margin-top: 8px;
    padding: 10px;
    border-radius: 6px;
    border: 1.5px solid var(--navy);
    color: var(--navy);
    font-weight: 700;
    font-size: 13.5px;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}
.login-website-btn:hover { background: var(--navy); color: #fff; }
.login-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 6px;
    color: var(--muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .06em;
}
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

/* ---------------- Public pages (admission form/status/letter) ---------------- */
.public-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
    padding: 40px 16px;
}
.public-card {
    background: #fff;
    width: 100%;
    max-width: 720px;
    border-radius: 8px;
    padding: 34px 36px;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}
.public-header { text-align: center; margin-bottom: 24px; }
.public-header h2 { color: var(--navy); margin: 8px 0 4px; }
.public-header .subtitle { color: var(--muted); font-size: 13.5px; }
.public-logo { max-height: 56px; max-width: 200px; object-fit: contain; }
.public-nav {
    display: flex;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
}
.public-nav a {
    color: rgba(255,255,255,.85);
    text-decoration: none;
    font-size: 12.8px;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.3);
    transition: background .15s ease, color .15s ease;
}
.public-nav a:hover { background: rgba(255,255,255,.15); }
.public-nav a.public-nav-active { background: var(--gold); color: var(--navy); border-color: var(--gold); }
.public-card .btn { width: 100%; margin-top: 6px; }
.public-card .btn-outline { width: auto; }
.tracking-code-box {
    background: var(--grey-bg); border: 2px dashed var(--gold); border-radius: 6px;
    padding: 16px; text-align: center; margin: 16px 0;
}
.tracking-code-box .code { font-size: 24px; font-weight: 800; color: var(--navy); letter-spacing: 2px; }

/* ---------------- Report card ---------------- */
.report-card {
    background: #fff;
    border: 2px solid var(--navy);
    padding: 26px 30px;
    max-width: 850px;
    margin: 0 auto;
}
.report-card .rc-header { text-align: center; border-bottom: 3px solid var(--gold); padding-bottom: 14px; margin-bottom: 18px; }
.report-card .rc-header h2 { color: var(--navy); margin: 0 0 3px; font-size: 25px; font-weight: 800; letter-spacing: .02em; }
.report-card .rc-header p { margin: 2px 0; color: var(--muted); font-size: 13px; }
.rc-report-type {
    display: inline-block;
    font-size: 15px !important;
    font-weight: 800;
    color: var(--navy) !important;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin: 8px 0 4px !important;
    padding: 4px 22px;
    border-top: 1.5px solid var(--gold);
    border-bottom: 1.5px solid var(--gold);
}
.rc-term-line { font-size: 12px !important; color: var(--muted) !important; margin-top: 3px !important; }
.rc-photo {
    position: absolute;
    top: 0;
    right: 0;
    width: 78px;
    height: 78px;
    object-fit: cover;
    border-radius: 6px;
    border: 2px solid var(--gold);
}
.rc-logo {
    position: absolute;
    top: 0;
    left: 0;
    max-width: 78px;
    max-height: 78px;
    object-fit: contain;
}
.rc-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px 20px; margin-bottom: 18px; font-size: 13.8px; }
.report-card .rc-section-title { color: var(--navy); font-size: 15px; margin: 16px 0 8px; }
.report-card .rc-comments { margin-top: 20px; }

/* ---------------- Student profile hero header ---------------- */
.profile-hero { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 20px; flex-wrap: wrap; }
.profile-hero-photo {
    width: 96px; height: 96px; border-radius: 50%;
    object-fit: cover; border: 3px solid var(--gold-light); flex-shrink: 0;
}
.profile-hero-photo-initials {
    background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 32px; font-weight: 800;
}
.profile-hero-info { flex: 1; min-width: 200px; }
.profile-hero-name-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-hero-name { font-size: 22px; font-weight: 800; color: var(--navy); margin: 0; letter-spacing: -.01em; }
.profile-hero-subtitle { font-size: 13px; color: var(--muted); margin: 4px 0 12px; }
.profile-hero-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.profile-info-grid {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 24px;
    padding-top: 16px; border-top: 1px solid var(--border);
}
.profile-info-item { display: flex; flex-direction: column; gap: 2px; }
.profile-info-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.profile-info-value { font-size: 13.8px; color: var(--text); font-weight: 500; }
@media screen and (max-width: 640px) {
    .profile-info-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------------- Printable ID card (CR80 standard: 85.6mm x 54mm) ---------------- */
.id-card-wrap { display: flex; gap: 20px; flex-wrap: wrap; }
.id-card {
    width: 85.6mm; height: 54mm;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    display: flex; flex-direction: column;
    overflow: hidden;
    font-size: 10px;
}
.id-card-header {
    background: var(--navy); color: #fff;
    padding: 6px 8px; text-align: center; flex-shrink: 0;
}
.id-card-logo { height: 18px; margin-bottom: 2px; }
.id-card-school-name { font-size: 11px; font-weight: 800; line-height: 1.1; }
.id-card-type { font-size: 7.5px; letter-spacing: .06em; opacity: .85; margin-top: 1px; }
.id-card-body { display: flex; gap: 8px; padding: 8px; flex: 1; }
.id-card-photo {
    width: 22mm; height: 26mm; object-fit: cover;
    border-radius: 4px; border: 1px solid var(--border); flex-shrink: 0;
}
.id-card-photo-initials {
    background: var(--navy); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 800;
}
.id-card-details { flex: 1; min-width: 0; }
.id-card-name { font-size: 12px; font-weight: 800; color: var(--navy); margin-bottom: 4px; line-height: 1.15; }
.id-card-row { display: flex; justify-content: space-between; font-size: 9px; margin-bottom: 2px; gap: 6px; }
.id-card-row span { color: var(--muted); }
.id-card-row strong { text-align: right; }
.id-card-footer {
    display: flex; justify-content: space-between; align-items: flex-end;
    padding: 4px 8px 6px; font-size: 7.5px; color: var(--muted); border-top: 1px dashed var(--border);
}
.id-card-signature-block { text-align: right; }
.id-card-signature-img { display: block; max-height: 16px; max-width: 60px; margin-left: auto; object-fit: contain; }
.id-card-signature { border-top: 1px solid var(--muted); padding-top: 2px; }
.id-card-back { align-items: center; justify-content: center; text-align: center; padding: 10px; }
.id-card-back-content p { margin: 2px 0; font-size: 8.5px; }
.id-card-note { color: var(--muted); font-size: 7px !important; margin-top: 6px !important; }
@media print {
    .id-card { box-shadow: none; break-inside: avoid; }
    .id-card-wrap { gap: 8mm; }
}

/* ---------------- Assignment details hero header ---------------- */
.assignment-hero { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.assignment-hero-title { font-size: 20px; font-weight: 800; color: var(--navy); margin: 0; letter-spacing: -.01em; }
.assignment-hero-subtitle { font-size: 12.8px; color: var(--muted); margin: 4px 0 0; }
.assignment-hero-badges { display: flex; gap: 6px; flex-wrap: wrap; }
.assignment-instructions { font-size: 13.5px; line-height: 1.6; margin: 12px 0; }
.rc-meta div strong { color: var(--navy); }

/* ---------------- Report card "beautiful rows" (compact info table) ---------------- */
.info-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}
.info-table tr:nth-child(even) { background: var(--grey-bg); }
.info-table td { padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--border); }
.info-table tr:last-child td { border-bottom: none; }
.info-table td.info-label { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .03em; width: 22%; white-space: nowrap; }
.info-table td.info-value { font-weight: 600; color: var(--navy); width: 28%; }

/* ---------------- Report card: mobile responsiveness (screen, not print) ---------------- */
@media screen and (max-width: 600px) {
    .report-card { padding: 16px 14px; max-width: 100%; }
    .rc-logo, .rc-photo { width: 46px; height: 46px; max-width: 46px; max-height: 46px; }
    .report-card .rc-header { padding: 0 56px 10px; }
    .report-card .rc-header h2 { font-size: 15px; line-height: 1.3; }
    .report-card .rc-header p { font-size: 10.5px; }
    .rc-report-type { font-size: 11.5px !important; padding: 3px 10px; margin: 6px 0 3px !important; }
    .rc-term-line { font-size: 10px !important; }
    .rc-contact { font-size: 9.5px; }

    .rc-meta { grid-template-columns: 1fr; gap: 4px; font-size: 12px; margin-bottom: 14px; }

    /* Each info-table cell becomes its own line, in DOM order (label
       immediately followed by its own value), instead of a cramped
       4-column label/value/label/value row. */
    .info-table, .info-table tr, .info-table td { display: block; width: 100% !important; }
    .info-table tr { padding: 2px 0; }
    .info-table td.info-label { padding: 6px 12px 0; }
    .info-table td.info-value { padding: 0 12px 6px; }
    .info-table tr:nth-child(even) { background: transparent; }

    .report-card table.data-table { font-size: 11.5px; }
    .report-card table.data-table th, .report-card table.data-table td { padding: 6px 8px; white-space: nowrap; }
    .report-card .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .performance-summary { flex-wrap: wrap; gap: 8px; }
}

/* Performance summary strip — Grand Total / Grand Average / GPA, shown
   bold right after the Academic Performance table */
.performance-summary {
    display: flex; flex-wrap: wrap; gap: 0;
    border: 2px solid var(--navy);
    border-radius: 6px;
    overflow: hidden;
    margin: 14px 0 18px;
}
.performance-summary .ps-item {
    flex: 1 1 auto; min-width: 130px;
    text-align: center;
    padding: 10px 8px;
    border-right: 1px solid rgba(255,255,255,.25);
    background: var(--navy);
}
.performance-summary .ps-item:last-child { border-right: none; }
.performance-summary .ps-value { font-size: 19px; font-weight: 800; color: #fff; }
.performance-summary .ps-label { font-size: 10.5px; color: var(--gold-light); text-transform: uppercase; letter-spacing: .04em; }

/* ---------------- Principal signature block ---------------- */
.signature-block {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}
.signature-block .signature-inner { text-align: center; }
.signature-block img.signature-img { max-height: 46px; max-width: 160px; object-fit: contain; display: block; margin: 0 auto 4px; }
.signature-block .signature-line { border-top: 1px solid var(--text); width: 170px; margin: 4px auto 4px; }
.signature-block .signature-label { font-size: 11.5px; color: var(--muted); }

/* ---------------- School contact line in report card header ---------------- */
.rc-contact { font-size: 11px; color: var(--muted); margin-top: 2px; }

/* ---------------- Shared print heading for all reports ---------------- */
.report-print-header {
    text-align: center;
    border-bottom: 3px solid var(--gold);
    padding-bottom: 14px;
    margin-bottom: 20px;
}
.report-print-logo { max-height: 56px; max-width: 180px; object-fit: contain; margin-bottom: 6px; }
.report-print-header h2 { color: var(--navy); margin: 0 0 4px; }
.report-print-title { font-weight: 700; font-size: 15px; color: var(--navy); margin: 6px 0 2px; }
.report-print-meta { font-size: 11px; color: var(--muted); }
.bulk-page-break { border-top: 3px dashed var(--border); margin: 30px 0; padding-top: 30px; }

/* ---------------- Student Master Report profile cards ---------------- */
.master-profile-card { break-inside: avoid; page-break-inside: avoid; }
.master-profile-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 10px 20px;
}
.master-profile-grid .mp-full { grid-column: 1 / -1; }
.master-profile-grid .mp-label {
    display: block;
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    color: var(--muted);
    margin-bottom: 2px;
}
.master-profile-grid .mp-value { display: block; font-size: 13.5px; color: var(--navy); }
@media print {
    .master-profile-card { border: 1px solid var(--border); }
}

.attendance-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}
.attendance-box .a-item {
    text-align: center;
    background: var(--gold-light);
    border-radius: 6px;
    padding: 12px 6px;
    border: 1px solid #e6d3ac;
}
.attendance-box .a-item .a-value { font-size: 22px; font-weight: 700; color: var(--navy); }
.attendance-box .a-item .a-label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; }

/* ---------------- Report card grade badges ---------------- */
.grade-pill {
    display: inline-block;
    min-width: 22px;
    text-align: center;
    padding: 1px 7px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 12px;
}
.grade-pill-1 { background: #e0f5e9; color: #1a7a42; }
.grade-pill-2 { background: #e2f0fb; color: #1a5f9c; }
.grade-pill-3 { background: #fdf3d8; color: #93701a; }
.grade-pill-4 { background: #fde8d8; color: #a35a1a; }
.grade-pill-5 { background: #fbdede; color: #a52222; }
@media print {
    .grade-pill { padding: 1px 6px; font-size: 10px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------------- Report card overall remark banner ---------------- */
.rc-overall-remark {
    background: var(--gold-light);
    border: 1px solid #e6d3ac;
    border-radius: 6px;
    padding: 8px 14px;
    margin: 10px 0 14px;
    font-size: 12.8px;
    color: var(--navy);
}
.rc-overall-remark strong { color: var(--navy); }

/* ---------------- Report card: strengths / areas to improve ---------------- */
.rc-si { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 12px; font-size: 12.5px; color: var(--text); }
.rc-si-col { border-radius: 6px; padding: 7px 12px; line-height: 1.45; }
.rc-si-strengths { background: #eaf6ef; border-left: 3px solid #1a7a42; }
.rc-si-improve { background: #fdf1e6; border-left: 3px solid #b8641a; }
.rc-si-label { display: block; font-weight: 800; font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.rc-si-strengths .rc-si-label { color: #1a7a42; }
.rc-si-improve .rc-si-label { color: #a35a1a; }
.rc-si-score { color: var(--muted); }
.rc-si-empty { color: var(--muted); font-style: italic; }

/* ---------------- Report card: attendance-rate bar ---------------- */
.rc-att-bar { display: inline-block; vertical-align: middle; width: 90px; height: 8px; margin-left: 8px; border-radius: 6px; background: #e8ebf0; overflow: hidden; }
.rc-att-bar > span { display: block; height: 100%; border-radius: 6px; }
.rc-att-good > span { background: #1f9d55; }
.rc-att-fair > span { background: #d9a21b; }
.rc-att-low > span { background: #d64545; }
.rc-att-note { font-size: 11px; color: var(--muted); margin-top: -10px; margin-bottom: 18px; }
.rc-next-term { color: var(--navy); }

/* ---------------- Report card: QR code beside the signature ---------------- */
/* Sits in the header's top-right corner (left of the passport photo when
   there is one), so it costs no vertical space. The header gets matching
   side padding so a long school name wraps instead of running under it. */
.rc-qr { position: absolute; top: 0; right: 0; text-align: center; width: 78px; }
.rc-qr.rc-qr-beside-photo { right: 88px; }
.rc-qr-svg { width: 70px; height: 70px; display: block; margin: 0 auto; }
.rc-qr-caption { font-size: 9px; color: var(--muted); line-height: 1.2; margin-top: 1px; white-space: nowrap; }
.report-card .rc-header:has(.rc-qr) { padding-left: 90px; padding-right: 90px; }
.report-card .rc-header:has(.rc-qr-beside-photo) { padding-left: 170px; padding-right: 170px; }

@media screen and (max-width: 600px) {
    .rc-si { grid-template-columns: 1fr; }
    /* Phones: QR drops below the header text instead of crowding it. */
    .report-card .rc-header:has(.rc-qr), .report-card .rc-header:has(.rc-qr-beside-photo) { padding-left: 56px; padding-right: 56px; }
    .rc-qr, .rc-qr.rc-qr-beside-photo { position: static; margin: 8px auto 0; }
}

/* ---------------- Psychomotor / Affective domain blocks ---------------- */
.domain-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin: 16px 0 6px;
}
.domain-block h3 { color: var(--navy); font-size: 13.5px; margin: 0 0 6px; }
table.domain-table td { padding: 5px 10px; font-size: 12.8px; }
table.domain-table .domain-rating { text-align: right; font-weight: 600; color: var(--navy); white-space: nowrap; }
.rc-scale-note { font-size: 10.5px; color: var(--muted); margin-top: 6px; }

/* ---------------- Scrollable / grid tables (attendance, ratings) ---------------- */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.attendance-grid th, .attendance-grid td { text-align: center; white-space: nowrap; }
.attendance-grid .att-select { min-width: 92px; }
.sticky-col {
    position: sticky;
    left: 0;
    background: #fff;
    z-index: 2;
    text-align: left !important;
    white-space: normal !important;
}
table.data-table th.sticky-col { background: var(--navy); z-index: 3; }
.btn-mini {
    display: inline-block;
    width: 22px; height: 22px;
    line-height: 22px;
    padding: 0;
    border: 1px solid rgba(255,255,255,.4);
    background: rgba(255,255,255,.08);
    color: #fff;
    border-radius: 3px;
    font-size: 11px;
    cursor: pointer;
}
table.data-table th .btn-mini { color: #fff; }

/* ============================================================
   Responsive / Mobile
   ============================================================ */
@media screen and (max-width: 860px) {
    .sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        height: 100vh;
        width: 78%;
        max-width: 280px;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform .2s ease;
        box-shadow: 4px 0 18px rgba(0,0,0,.25);
    }
    .app-shell.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-close-btn { display: block; }
    .app-shell.sidebar-collapsed .sidebar { width: 78%; max-width: 280px; }
    .app-shell.sidebar-collapsed .label,
    .app-shell.sidebar-collapsed .chevron,
    .app-shell.sidebar-collapsed .brand-full { display: block; }
    .app-shell.sidebar-collapsed .brand-mini { display: none !important; }
    .app-shell.sidebar-collapsed .sidebar nav a { justify-content: flex-start; padding: 10px 20px; }
    .app-shell.sidebar-collapsed .sidebar-section-label { justify-content: space-between; padding: 14px 20px 6px; }

    .main-content { width: 100%; }

    .topbar h1 { font-size: 15.5px; }
    .topbar-search { display: none; }
    .back-btn { padding: 6px 8px; font-size: 0; }
    .back-btn::before { content: "\2190"; font-size: 14px; }
    .profile-name-label { display: none; }
    .profile-caret { display: none; }
    .page-content { padding: 14px; }

    .stat-grid { gap: 10px; }
    .stat-card { padding: 12px; flex-basis: 150px; min-width: 150px; }
    .stat-card .stat-value { font-size: 20px; }

    .form-grid { grid-template-columns: 1fr; }
    .rc-meta { grid-template-columns: 1fr; }
    .domain-columns { grid-template-columns: 1fr; }
    .attendance-box { grid-template-columns: 1fr 1fr; }

    table.data-table { min-width: 560px; }
    .card-body { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    .login-box { width: 90%; max-width: 340px; }

    /* Mobile bottom quick-action nav */
    .mobile-quick-nav {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 40;
        background: #fff;
        border-top: 1px solid var(--border);
        box-shadow: 0 -2px 10px rgba(0,0,0,.08);
        padding: 4px 2px calc(4px + env(safe-area-inset-bottom, 0px));
    }
    .mobile-quick-nav-item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        padding: 6px 2px;
        color: var(--muted);
        text-decoration: none;
        font-size: 10.5px;
        background: none;
        border: none;
        font-family: inherit;
        cursor: pointer;
    }
    .mobile-quick-nav-item .icon { font-size: 19px; line-height: 1; position: relative; display: inline-block; }
    .mobile-quick-nav-badge {
        position: absolute; top: -5px; right: -9px;
        background: var(--danger); color: #fff; font-size: 9px; font-weight: 700;
        border-radius: 10px; padding: 1px 4px; line-height: 1.3;
    }
    .page-content { padding-bottom: 78px; }
}

@media screen and (max-width: 480px) {
    .stat-card { flex-basis: 130px; min-width: 130px; }
    .attendance-box { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Print — Report Card must fit on exactly one page
   ============================================================ */
@page {
    size: A4;
    margin: 8mm 10mm;
}

@media print {
    .sidebar, .topbar, .no-print { display: none !important; }
    .alert[data-autohide] { display: none !important; } /* transient "saved" notices never belong on paper */
    /* The divider only forces the page break; on paper it must take no space, or a full-height card no longer fits the new page. */
    .bulk-page-break { page-break-before: always; break-before: page; border: 0; margin: 0; padding: 0; height: 0; }
    .bulk-report-wrapper .report-card { page-break-inside: avoid; break-inside: avoid; }
    .page-content { padding: 0; }
    body { background: #fff; font-size: 11.5px; }

    .report-card {
        border-width: 1px;
        padding: 10px 16px;
        max-width: 100%;
        box-shadow: none;
    }
    .report-card .rc-header { padding-bottom: 8px; margin-bottom: 10px; border-bottom-width: 2px; }
    .report-card .rc-header h2 { font-size: 21px; font-weight: 800; margin-bottom: 2px; }
    .report-card .rc-header p { font-size: 10.5px; margin: 1px 0; }
    .rc-report-type { font-size: 12px !important; padding: 3px 14px; margin: 5px 0 3px !important; }
    .rc-term-line { font-size: 9.5px !important; }
    .rc-photo { width: 52px; height: 52px; }
    .rc-logo { max-width: 52px; max-height: 52px; }

    .rc-meta { font-size: 11px; gap: 3px 16px; margin-bottom: 10px; }
    .rc-contact { font-size: 9px; }

    .info-table { margin-bottom: 6px; }
    .info-table td { padding: 3px 8px; font-size: 10.5px; line-height: 1.25; }
    .info-table td.info-label { font-size: 8.5px; }

    .rc-overall-remark { padding: 5px 10px; margin: 5px 0 7px; font-size: 10.5px; }
    .rc-si { gap: 8px; margin: 0 0 6px; font-size: 9.5px; }
    .rc-si-col { padding: 3px 8px; line-height: 1.3; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .rc-si-label { font-size: 8px; margin-bottom: 0; }
    .rc-att-bar { width: 70px; height: 6px; margin-left: 6px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .rc-att-bar > span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .rc-att-note { font-size: 8.5px; margin-top: -4px; margin-bottom: 6px; }
    /* Subject names stay on one line in the wide cumulative grid (plenty of room: its other columns are short numbers). */
    .report-card table.rc-cum-scores td:first-child { white-space: nowrap; }
    .rc-qr { width: 66px; }
    .rc-qr.rc-qr-beside-photo { right: 60px; }
    .rc-qr-svg { width: 62px; height: 62px; }
    .rc-qr-caption { font-size: 7px; }
    .report-card .rc-header:has(.rc-qr) { padding-left: 72px; padding-right: 72px; }
    .report-card .rc-header:has(.rc-qr-beside-photo) { padding-left: 130px; padding-right: 130px; }
    .report-card .rc-comments { margin-top: 6px; }
    .performance-summary { margin: 6px 0 8px; }
    .performance-summary .ps-item { padding: 5px 4px; }
    .performance-summary .ps-value { font-size: 14px; }
    .performance-summary .ps-label { font-size: 8px; }

    .signature-block { margin-top: 4px; }
    .signature-block img.signature-img { max-height: 34px; max-width: 120px; }
    .signature-block .signature-line { width: 130px; }
    .signature-block .signature-label { font-size: 9px; }

    .report-card h3 { font-size: 12px; margin-bottom: 6px; }
    .report-card .rc-section-title { font-size: 12px; margin: 8px 0 5px; }

    .attendance-box { gap: 6px; margin-bottom: 6px; }
    .attendance-box .a-item { padding: 4px 4px; }
    .attendance-box .a-item .a-value { font-size: 15px; }
    .attendance-box .a-item .a-label { font-size: 8.5px; }

    .report-card table.data-table { font-size: 10px; }
    .report-card table.data-table th, .report-card table.data-table td { padding: 2.5px 5px; line-height: 1.2; }

    .domain-columns { gap: 10px; margin: 8px 0 4px; }
    .domain-block h3 { font-size: 11px; margin-bottom: 3px; }
    table.domain-table td { padding: 2px 6px; font-size: 10px; }
    .rc-scale-note { font-size: 8.5px; margin-top: 3px; }

    .report-card .rc-meta:last-of-type { margin-top: 10px; font-size: 10.5px; }
}

/* ---------------- Login page: mobile — slider hidden, only the
   motivation message shows, pinned near the bottom ---------------- */
@media screen and (max-width: 860px) {
    .login-wrapper-split { padding: 0; }
    .login-shell { flex-direction: column; max-width: 100%; max-height: none; min-height: 100vh; border-radius: 0; box-shadow: none; }
    .login-slider-panel.no-mobile { display: none; }
    .login-form-panel { min-height: 100vh; justify-content: space-between; padding: 30px 16px; background: #fff; }
    .login-motivation-mobile {
        display: block;
        color: var(--navy);
        font-weight: 700;
        text-align: center;
        font-size: 14px;
        line-height: 1.5;
        padding: 0 12px;
        margin-top: 24px;
    }
}

/* ---------------- Back to top button ---------------- */
.back-to-top {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--navy);
    color: #fff;
    border: none;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(0,0,0,.2);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
    z-index: 200;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--gold); }

/* ---------------- Password strength meter ---------------- */
.password-strength-meter { display: none; margin-top: 6px; }
.password-strength-meter .password-strength-bar {
    height: 5px;
    border-radius: 3px;
    background: #dc3545;
    width: 0;
    transition: width .2s ease, background .2s ease;
}
.password-strength-meter .password-strength-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    margin-top: 3px;
}

/* ---------------- Skip-to-content link (accessibility) ---------------- */
.skip-link {
    position: absolute;
    top: -48px;
    left: 8px;
    background: var(--navy);
    color: #fff;
    padding: 10px 16px;
    border-radius: 0 0 6px 6px;
    z-index: 1000;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: top .15s ease;
}
.skip-link:focus { top: 0; }

/* Phones: the small two-column Psychomotor/Affective rating tables don't
   need the 560px minimum width that wide data tables get for horizontal
   scrolling — with it, they pushed the whole page wider than the screen. */
@media screen and (max-width: 860px) {
    table.data-table.domain-table { min-width: 0; }
}

/* Parent-facing public report card (the page the printed QR opens, usually
   on a phone): the card sits in a centered flex column, where it used to
   shrink-wrap to its widest table and push the page sideways. Holding it
   to the column width lets the wide tables scroll inside it instead. */
@media screen {
    .public-wrapper > .report-card { width: 100%; min-width: 0; }
}

/* ============================================================
   Role dashboards (v3.5.0) — dx-* components
   ============================================================ */
.dx-greet { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.dx-greet .eyebrow { font-size: 11px; font-weight: 800; letter-spacing: .12em; color: var(--gold); text-transform: uppercase; }
.dx-greet h1 { margin: 2px 0; font-size: 24px; color: var(--navy); line-height: 1.2; }
.dx-greet p { margin: 0; color: var(--muted); font-size: 13px; }
.dx-term-pill { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--border); border-radius: 40px; padding: 6px 14px 6px 8px; font-size: 12.5px; color: var(--navy); }
.dx-ring { width: 34px; height: 34px; border-radius: 50%; background: conic-gradient(var(--gold) calc(var(--p) * 1%), #eceff4 0); display: grid; place-items: center; flex-shrink: 0; }
.dx-ring span { width: 26px; height: 26px; border-radius: 50%; background: #fff; display: grid; place-items: center; font-size: 9px; font-weight: 800; }
.dx-term-note { color: var(--muted); font-size: 11.5px; }

.dx-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 14px; margin-bottom: 18px; }
.dx-kpi { background: #fff; border: 1px solid #e8ebf0; border-radius: 12px; padding: 14px 16px; position: relative; overflow: hidden; text-decoration: none; color: inherit; display: block; min-width: 0; }
a.dx-kpi:hover { box-shadow: 0 6px 18px rgba(27,42,74,.08); }
.dx-kpi-lbl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.dx-kpi-lbl i { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; color: #fff; background: var(--c, var(--navy)); flex-shrink: 0; }
.dx-kpi-val { font-size: 26px; font-weight: 800; color: var(--navy); margin: 8px 0 2px; letter-spacing: -.02em; line-height: 1.15; }
.dx-kpi-val small { font-size: 13px; color: var(--muted); font-weight: 600; }
.dx-kpi-delta { font-size: 11.5px; font-weight: 700; }
.dx-kpi:has(.dx-spark) .dx-kpi-delta { padding-right: 92px; }
.dx-up { color: #1a7a42; } .dx-down { color: #b02a37; } .dx-flat { color: var(--muted); }
.dx-spark { position: absolute; right: 10px; bottom: 10px; width: 84px; height: 28px; }
.dx-minibar { height: 6px; background: #eef0f4; border-radius: 6px; margin-top: 8px; overflow: hidden; }
.dx-minibar b { display: block; height: 100%; border-radius: 6px; background: var(--c, var(--navy)); }

.dx-row { display: grid; gap: 16px; margin-bottom: 16px; }
.dx-row.c2 { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.dx-row.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dx-row.c2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dx-card { background: #fff; border: 1px solid #e8ebf0; border-radius: 12px; padding: 16px 18px; min-width: 0; }
.dx-card h3 { margin: 0 0 12px; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--navy); display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dx-card h3 a { font-size: 11.5px; text-transform: none; letter-spacing: 0; color: var(--gold); font-weight: 700; text-decoration: none; }
.dx-card h3 + h3, .dx-card .dx-sub-h { margin-top: 16px; }
.dx-empty { color: var(--muted); font-size: 13px; padding: 10px 0; }
.dx-chart { width: 100%; height: auto; display: block; }
.dx-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--muted); margin-top: 6px; flex-wrap: wrap; }
.dx-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

.dx-attn { list-style: none; margin: 0; padding: 0; }
.dx-attn li { display: flex; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid #f0f2f5; font-size: 13px; }
.dx-attn li:last-child { border-bottom: 0; }
.dx-attn-dot { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; flex-shrink: 0; }
.dx-hi { background: #fde6e8; color: #b02a37; } .dx-md { background: #fdf1dc; color: #a86b00; } .dx-lo { background: #e5eefb; color: #1c4a7a; } .dx-ok { background: #e2f4ea; color: #1a7a42; }
.dx-attn-txt { flex: 1; min-width: 0; } .dx-attn-txt small { display: block; color: var(--muted); font-size: 11.5px; }
.dx-attn-go { font-size: 12px; font-weight: 700; color: var(--navy); text-decoration: none; border: 1px solid var(--border); border-radius: 8px; padding: 5px 10px; white-space: nowrap; }
.dx-attn-go:hover { background: var(--gold-light); }
.dx-allclear { display: flex; gap: 10px; align-items: center; color: #1a7a42; font-weight: 600; font-size: 13px; padding: 8px 0; }

.dx-hbar { display: grid; grid-template-columns: minmax(80px, 34%) 1fr 42px; align-items: center; gap: 10px; font-size: 12.5px; margin: 7px 0; }
.dx-hbar-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dx-hbar-t { height: 10px; background: #eef0f4; border-radius: 10px; overflow: hidden; }
.dx-hbar-t b { display: block; height: 100%; border-radius: 10px; }
.dx-hbar-v { text-align: right; font-weight: 700; color: var(--navy); }

.dx-table { width: 100%; border-collapse: collapse; font-size: 12.8px; }
.dx-table th { text-align: left; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 6px; border-bottom: 1px solid #eceff3; }
.dx-table td { padding: 8px 6px; border-bottom: 1px solid #f3f4f7; vertical-align: middle; }
.dx-table a { color: inherit; text-decoration: none; }
.dx-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: inline-grid; place-items: center; font-size: 11px; font-weight: 800; margin-right: 8px; vertical-align: middle; flex-shrink: 0; }
.dx-chip { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 20px; white-space: nowrap; }
.dx-chip.g { background: #e2f4ea; color: #1a7a42; } .dx-chip.a { background: #fdf1dc; color: #a86b00; } .dx-chip.r { background: #fde6e8; color: #b02a37; } .dx-chip.b { background: #e5eefb; color: #1c4a7a; }

.dx-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 10px; }
.dx-action { background: #fff; border: 1px solid #e8ebf0; border-radius: 12px; padding: 12px 8px; text-align: center; font-size: 12px; font-weight: 700; color: var(--navy); text-decoration: none; }
.dx-action:hover { border-color: var(--gold); }
.dx-action i { display: grid; place-items: center; width: 36px; height: 36px; margin: 0 auto 7px; border-radius: 10px; background: var(--gold-light); color: var(--gold); font-size: 15px; }

.dx-tt { display: flex; flex-direction: column; gap: 8px; }
.dx-tt-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 12.8px; padding: 8px 10px; border-radius: 9px; background: #f7f8fb; }
.dx-tt-row.now { background: var(--navy); color: #fff; } .dx-tt-row.now small { color: #cfd6e4; }
.dx-tt-row.past { opacity: .6; }
.dx-tt-row small { color: var(--muted); font-size: 11.5px; }

.dx-prog { display: grid; grid-template-columns: minmax(0, 1fr) 110px 58px; gap: 10px; align-items: center; font-size: 12.8px; padding: 7px 0; border-bottom: 1px solid #f3f4f7; }
.dx-prog-t { height: 8px; background: #eef0f4; border-radius: 8px; overflow: hidden; } .dx-prog-t b { display: block; height: 100%; border-radius: 8px; }
.dx-prog > b { text-align: right; }

.dx-child-tabs { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.dx-child-tab { display: flex; align-items: center; gap: 10px; padding: 7px 14px 7px 7px; border-radius: 40px; background: #fff; border: 1px solid var(--border); font-size: 13px; font-weight: 700; color: var(--navy); text-decoration: none; white-space: nowrap; }
.dx-child-tab.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.dx-child-tab .dx-avatar { margin: 0; background: var(--gold); }
.dx-child-tab.dx-all { color: var(--muted); font-weight: 600; padding-left: 14px; }
.dx-child-tab.dx-all.on { color: #fff; }

.dx-hero { display: flex; gap: 18px; align-items: center; background: linear-gradient(120deg, var(--navy), #2c4170); color: #fff; border-radius: 14px; padding: 18px 22px; margin-bottom: 16px; }
.dx-hero-ph { width: 62px; height: 62px; border-radius: 50%; background: #c9d6e8; border: 3px solid var(--gold); display: grid; place-items: center; color: var(--navy); font-weight: 800; font-size: 20px; overflow: hidden; flex-shrink: 0; }
.dx-hero-ph img { width: 100%; height: 100%; object-fit: cover; }
.dx-hero h2 { margin: 0; font-size: 20px; color: #fff; } .dx-hero p { margin: 3px 0 0; font-size: 12.5px; color: #cfd6e4; }
.dx-hero-eyebrow { font-size: 11px; letter-spacing: .12em; color: #e8c77a; font-weight: 800; text-transform: uppercase; }
.dx-hero-stats { margin-left: auto; display: flex; gap: 26px; }
.dx-hero-stats div { text-align: right; } .dx-hero-stats b { display: block; font-size: 22px; } .dx-hero-stats span { font-size: 11px; color: #cfd6e4; text-transform: uppercase; letter-spacing: .06em; }

.dx-notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid #f0f2f5; font-size: 12.8px; }
.dx-notice:last-child { border-bottom: 0; }
.dx-notice small.m { display: block; color: var(--muted); font-size: 11.5px; }
.dx-date { min-width: 44px; text-align: center; border-radius: 8px; background: var(--gold-light); color: var(--gold); font-weight: 800; font-size: 15px; line-height: 1.1; padding: 4px 0; }
.dx-date b { display: block; } .dx-date small { display: block; font-size: 9.5px; letter-spacing: .06em; }
.dx-btn { display: inline-block; background: var(--navy); color: #fff; border-radius: 8px; padding: 7px 13px; font-size: 12px; font-weight: 700; text-decoration: none; }
.dx-btn.gold { background: var(--gold); }
.dx-donut { border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; }
.dx-donut-hole { border-radius: 50%; background: #fff; display: grid; place-items: center; text-align: center; line-height: 1.1; }
.dx-donut-hole b { font-size: 20px; color: var(--navy); display: block; } .dx-donut-hole span { font-size: 10.5px; color: var(--muted); }
.dx-split { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.dx-facts { font-size: 12.8px; line-height: 1.95; }
.dx-scope-note { font-size: 12px; color: var(--muted); background: #fff; border: 1px dashed var(--border); border-radius: 10px; padding: 8px 12px; margin-bottom: 14px; }

@media screen and (max-width: 1100px) {
    .dx-row.c3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media screen and (max-width: 860px) {
    .dx-row.c2, .dx-row.c3, .dx-row.c2e { grid-template-columns: minmax(0, 1fr); }
    .dx-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .dx-kpi { padding: 12px; } .dx-kpi-val { font-size: 21px; } .dx-kpi-delta, .dx-kpi:has(.dx-spark) .dx-kpi-delta { padding-right: 0; } .dx-spark { display: none; }
    .dx-hero { flex-wrap: wrap; } .dx-hero-stats { margin-left: 0; width: 100%; justify-content: space-between; } .dx-hero-stats div { text-align: left; }
    .dx-greet h1 { font-size: 20px; }
    .dx-child-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
}
@media screen and (max-width: 420px) {
    .dx-kpi-lbl { font-size: 10px; letter-spacing: .03em; } .dx-kpi-lbl i { width: 20px; height: 20px; font-size: 10px; }
    .dx-prog { grid-template-columns: minmax(0, 1fr) 70px 44px; }
}
@media screen and (max-width: 340px) {
    .dx-kpis { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- WhatsApp messaging (v3.6.0) ---------- */
.wa-hero { display: flex; gap: 16px; align-items: center; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; flex-wrap: wrap; }
.wa-hero-ic { width: 52px; height: 52px; border-radius: 14px; background: #25d366; color: #fff; display: grid; place-items: center; font-size: 28px; flex-shrink: 0; }
.wa-hero h2 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.wa-hero p { margin: 0; color: var(--muted); font-size: 13px; max-width: 640px; }
.wa-hero-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.wa-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.wa-quick-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; text-decoration: none; color: var(--navy); display: flex; flex-direction: column; gap: 4px; transition: box-shadow .15s, transform .15s; }
.wa-quick-card:hover { box-shadow: 0 8px 20px rgba(27,42,74,.08); transform: translateY(-1px); }
.wa-quick-card i { color: #128c7e; font-size: 18px; margin-bottom: 4px; }
.wa-quick-card small { color: var(--muted); font-size: 12px; }
.wa-prog { height: 7px; border-radius: 6px; background: #eef0f4; overflow: hidden; margin-bottom: 4px; }
.wa-prog b { display: block; height: 100%; background: #25d366; border-radius: 6px; transition: width .3s; }
.wa-prog.big { height: 10px; margin: 12px 0 14px; }
.wa-kinds { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.wa-kind { display: flex; align-items: center; gap: 10px; border: 1.5px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--navy); background: #fff; }
.wa-kind input { position: absolute; opacity: 0; pointer-events: none; }
.wa-kind i { color: #128c7e; width: 20px; text-align: center; }
.wa-kind.on { border-color: #25d366; background: #effbf3; box-shadow: 0 0 0 3px rgba(37,211,102,.12); }
.wa-seg { display: inline-flex; flex-wrap: wrap; gap: 6px; background: #f1f3f7; border-radius: 10px; padding: 4px; margin-bottom: 14px; }
.wa-seg label { display: flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 8px; font-size: 13px; cursor: pointer; margin: 0; }
.wa-seg label:has(input:checked) { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08); font-weight: 600; }
.wa-seg.small { margin: 0; }
.wa-stu-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; margin-bottom: 6px; }
.wa-stu { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-bottom: 1px solid #f1f3f7; margin: 0; font-size: 13px; cursor: pointer; }
.wa-stu:last-child { border-bottom: 0; }
.wa-stu small { color: var(--muted); }
.wa-stu .wa-num { margin-left: auto; font-size: 11.5px; white-space: nowrap; }
.wa-stu:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.wa-bubbles { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.wa-bubbles small { color: var(--muted); font-size: 11.5px; }
.wa-bubble { background: #dcf8c6; border-radius: 10px 10px 10px 2px; padding: 10px 12px; font-size: 13px; line-height: 1.5; color: #111; margin-top: 4px; white-space: normal; word-break: break-word; box-shadow: 0 1px 1px rgba(0,0,0,.08); }
.wa-run-head { display: flex; gap: 16px; align-items: flex-start; }
.wa-run-head h2 { margin: 2px 0 4px; font-size: 20px; color: var(--navy); }
.wa-run-head p { margin: 0; color: var(--muted); font-size: 12.5px; }
.wa-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #128c7e; }
.wa-run-count { margin-left: auto; text-align: right; font-size: 15px; color: var(--muted); white-space: nowrap; }
.wa-run-count b { font-size: 30px; color: var(--navy); }
.wa-run-count small { display: block; font-size: 11px; }
.wa-run-tools { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.wa-go { background: #25d366 !important; border-color: #25d366 !important; color: #fff !important; font-size: 15px; padding: 10px 20px; }
.wa-go:disabled { background: #9ad9b0 !important; border-color: #9ad9b0 !important; cursor: default; }
.wa-auto { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); margin: 0; }
.wa-tip { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.wa-tip i { color: var(--gold); }
.wa-tip kbd { background: #f1f3f7; border: 1px solid var(--border); border-radius: 4px; padding: 0 5px; font-size: 11px; }
.wa-list { list-style: none; margin: 0; padding: 0; }
.wa-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid #f1f3f7; }
.wa-row.next { background: #effbf3; box-shadow: inset 3px 0 0 #25d366; }
.wa-n { width: 26px; text-align: center; color: var(--muted); font-size: 12px; flex-shrink: 0; }
.wa-who { flex: 1; min-width: 0; }
.wa-who b { display: block; font-size: 13.5px; color: var(--navy); }
.wa-who small { color: var(--muted); font-size: 12px; }
.wa-who details { margin-top: 3px; font-size: 12px; }
.wa-who summary { cursor: pointer; color: #128c7e; }
.wa-who .wa-bubble { max-width: 520px; }
.wa-st { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; background: #fff4df; color: #9a6a00; white-space: nowrap; }
.st-sent .wa-st { background: #e3f6ea; color: #1a7a42; }
.st-skipped .wa-st { background: #eef0f4; color: #6c757d; }
.st-sent .wa-who b, .st-skipped .wa-who b { color: #6c757d; }
.wa-acts { display: flex; gap: 6px; flex-shrink: 0; }
.wa-row.st-pending [data-act=undo], .wa-row:not(.st-pending) [data-act=skip] { display: none; }
@media screen and (max-width: 700px) {
    .wa-row { flex-wrap: wrap; }
    .wa-acts { width: 100%; padding-left: 38px; }
    .wa-run-head { flex-direction: column; }
    .wa-run-count { margin-left: 0; text-align: left; }
    .wa-hero-actions { margin-left: 0; }
}

/* ---------- AI Assistant (v3.6.0) ---------- */
.ai-tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
.ai-tabs a { padding: 9px 14px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.ai-tabs a i { margin-right: 4px; }
.ai-tabs a.on { color: var(--navy); border-bottom-color: var(--gold); }
.ai-hero { display: flex; gap: 20px; align-items: center; background: linear-gradient(135deg, #1b2a4a, #2c4378); color: #fff; border-radius: 16px; padding: 22px 26px; margin-bottom: 16px; }
.ai-hero h2 { margin: 4px 0 6px; font-size: 22px; color: #fff; }
.ai-hero p { margin: 0; color: #cdd6ec; font-size: 13.5px; max-width: 720px; line-height: 1.55; }
.ai-eyebrow { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #f5c451; }
.ai-usage { margin-left: auto; text-align: center; background: rgba(255,255,255,.08); border-radius: 12px; padding: 10px 16px; white-space: nowrap; }
.ai-usage b { display: block; font-size: 26px; }
.ai-usage small { color: #cdd6ec; font-size: 11px; }
.ai-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-bottom: 16px; }
.ai-tool { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; text-decoration: none; color: var(--navy); display: flex; flex-direction: column; gap: 6px; transition: box-shadow .15s, transform .15s; }
.ai-tool:hover { box-shadow: 0 10px 24px rgba(27,42,74,.09); transform: translateY(-2px); }
.ai-tool i { width: 40px; height: 40px; border-radius: 11px; background: #fff4df; color: #b8860b; display: grid; place-items: center; font-size: 18px; margin-bottom: 4px; }
.ai-tool b { font-size: 15px; }
.ai-tool span { font-size: 12.8px; color: var(--muted); line-height: 1.5; }
.ai-note { font-size: 12px; color: var(--muted); }
.ai-note i { color: #1a7a42; }
.ai-doclist { list-style: none; margin: 0; padding: 0; }
.ai-doclist li { padding: 6px 0; border-bottom: 1px solid #f1f3f7; }
.ai-doclist small { color: var(--muted); margin-left: 6px; }
.ai-bar { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.ai-bar label { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.ai-bar select { width: auto; }
.ai-progress { font-size: 12.5px; color: var(--muted); margin-left: 8px; }
.ai-ctable textarea { width: 100%; min-width: 220px; font-size: 13px; resize: vertical; }
.ai-ctable textarea.ai-new { background: #fffbea; border-color: #e6c35c; }
.ai-savebar { position: sticky; bottom: 0; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -6px 20px rgba(0,0,0,.06); margin-bottom: 16px; font-size: 13px; color: var(--muted); }
.ai-out-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.ai-out-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ai-paper { font-family: Georgia, 'Times New Roman', serif; font-size: 14.5px; line-height: 1.6; color: #1f2430; max-width: 820px; }
.ai-paper h2, .ai-paper h3, .ai-paper h4 { font-family: inherit; color: var(--navy); margin: 18px 0 6px; font-size: 16.5px; }
.ai-paper ul, .ai-paper ol { padding-left: 22px; margin: 6px 0; }
.ai-paper li { margin: 3px 0; }
.ai-qlist { padding-left: 22px; }
.ai-qlist > li { margin-bottom: 16px; }
.ai-q { display: flex; gap: 8px; align-items: flex-start; font-weight: 600; margin: 0 0 4px; }
.ai-q input { margin-top: 4px; }
.ai-opts { list-style: none; padding-left: 26px; margin: 0; font-size: 13.5px; }
.ai-opts li { padding: 2px 0; }
.ai-opts li.ok { color: #1a7a42; font-weight: 600; }
.ai-expl { display: block; padding-left: 26px; color: var(--muted); font-style: italic; }
.ai-help p { font-size: 13px; line-height: 1.55; }
@media screen and (max-width: 700px) {
    .ai-hero { flex-direction: column; align-items: flex-start; }
    .ai-usage { margin-left: 0; }
    .ai-savebar { flex-direction: column; align-items: stretch; }
}
.ai-ctable textarea, #aiText, #aiRaw { font-family: inherit; width: 100%; box-sizing: border-box; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; line-height: 1.5; }
#aiText { font-size: 14px; min-height: 220px; }

/* ---------- Certificates & transcripts (v3.6.0) ---------- */
.cx-top { display: flex; gap: 16px; align-items: flex-start; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px; margin-bottom: 14px; flex-wrap: wrap; }
.cx-top h2 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.cx-top p { margin: 0; color: var(--muted); font-size: 13px; max-width: 620px; }
.cx-top-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.cx-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.cx-stats div { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }
.cx-stats b { display: block; font-size: 24px; color: var(--navy); letter-spacing: 0; }
.cx-checks { display: flex; gap: 14px; flex-wrap: wrap; }
.cx-checks label { display: flex; gap: 6px; align-items: center; font-weight: 500; margin: 0; }
.cx-meta { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.cx-meta h2 { margin: 2px 0 4px; font-size: 19px; color: var(--navy); }
.cx-meta p { margin: 0; font-size: 12.5px; color: var(--muted); }
.cx-meta-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cx-revoke { display: flex; gap: 6px; }
.cx-revoke input { width: 200px; }
.cx-preview-wrap { background: #e9ecf2; border-radius: 12px; padding: 20px 10px; overflow: hidden; }
.cx-scale { zoom: .95; }
.cx-scale.land { zoom: .78; }
@media screen and (max-width: 1200px) { .cx-scale { zoom: .8; } .cx-scale.land { zoom: .62; } }
@media screen and (max-width: 860px) { .cx-scale { zoom: .5; } .cx-scale.land { zoom: .36; } .cx-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cx-top-actions, .cx-meta-actions { margin-left: 0; } }
@media screen and (max-width: 700px) { .ai-tabs { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; } }

/* ---------- Resource Library (v3.7.0) ---------- */
.rl-hero { display: grid; grid-template-columns: 1fr auto; gap: 14px 16px; align-items: center; background: linear-gradient(135deg, #1b2a4a, #2c4378); color: #fff; border-radius: 16px; padding: 20px 22px; margin-bottom: 14px; }
.rl-hero h2 { margin: 0 0 4px; font-size: 21px; color: #fff; }
.rl-hero h2 i { color: #f5c451; margin-right: 6px; }
.rl-hero p { margin: 0; color: #cdd6ec; font-size: 13px; }
.rl-search { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; background: #fff; border-radius: 12px; padding: 5px 5px 5px 14px; }
.rl-search i { color: #8a93a3; }
.rl-search input { flex: 1; border: 0 !important; box-shadow: none !important; font-size: 14px; padding: 8px 4px; min-width: 0; background: transparent; }
.rl-search button { border: 0; background: var(--navy); color: #fff; font-weight: 700; padding: 9px 18px; border-radius: 9px; cursor: pointer; }
.rl-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 10px; }
.rl-tabs a { white-space: nowrap; padding: 7px 13px; border-radius: 20px; background: #fff; border: 1px solid var(--border); font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none; }
.rl-tabs a span { color: var(--muted); font-weight: 500; margin-left: 3px; font-size: 12px; }
.rl-tabs a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.rl-tabs a.on span, .rl-tabs a.on i { color: #f5c451 !important; }
.rl-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 14px; }
.rl-filters select { width: auto; max-width: 220px; padding: 7px 10px; font-size: 13px; }
.rl-mine { display: flex; align-items: center; gap: 6px; margin: 0; font-size: 13px; }
.rl-clear { font-size: 12.5px; }
.rl-count { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.rl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.rl-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; text-decoration: none; color: var(--navy); display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.rl-card:hover { box-shadow: 0 10px 24px rgba(27,42,74,.10); transform: translateY(-2px); }
.rl-thumb { position: relative; height: 128px; background: #f3f5f9; background: color-mix(in srgb, var(--c) 12%, #fff); display: grid; place-items: center; overflow: hidden; }
.rl-thumb > i { font-size: 40px; color: var(--c); opacity: .85; }
.rl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.rl-play { position: absolute; width: 44px; height: 44px; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; }
.rl-type { position: absolute; left: 8px; top: 8px; background: #fff; color: var(--c); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.rl-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.rl-body b { font-size: 14px; line-height: 1.35; }
.rl-body small { font-size: 12px; color: var(--muted); }
.rl-body .rl-topic { color: #b8860b; font-weight: 600; }
.rl-body .rl-foot { margin-top: auto; padding-top: 6px; font-size: 11.5px; }
.rl-pages { display: flex; gap: 6px; justify-content: center; margin: 18px 0; flex-wrap: wrap; }
.rl-pages a { min-width: 34px; text-align: center; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: #fff; text-decoration: none; color: var(--navy); font-size: 13px; }
.rl-pages a.on { background: var(--navy); color: #fff; }
.rl-empty { background: #fff; border: 1px dashed var(--border); border-radius: 14px; padding: 40px 20px; text-align: center; color: var(--muted); }
.rl-empty i { font-size: 36px; color: #c8ced9; }
.rl-view { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; align-items: start; }
.rl-eyebrow { font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rl-title { margin: 4px 0 4px; font-size: 22px; color: var(--navy); }
.rl-meta { color: var(--muted); font-size: 13px; margin: 0 0 12px; }
.rl-preview { margin: 14px 0; }
.rl-embed { position: relative; padding-top: 56.25%; border-radius: 12px; overflow: hidden; background: #000; }
.rl-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rl-video { width: 100%; max-height: 520px; border-radius: 12px; background: #000; }
.rl-pdf { width: 100%; height: 640px; border: 1px solid var(--border); border-radius: 10px; }
.rl-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rl-locked { font-size: 12.5px; color: var(--muted); }
.rl-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rl-facts small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.rl-facts b { font-size: 13.5px; color: var(--navy); }
.rl-manage { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #f1f3f7; }
.rl-related a { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f1f3f7; text-decoration: none; color: var(--navy); font-size: 13px; font-weight: 600; }
.rl-related a:last-child { border-bottom: 0; }
.rl-related i { margin-top: 3px; width: 16px; }
.rl-related small { display: block; font-weight: 400; color: var(--muted); font-size: 11.5px; }
.rl-kinds { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.rl-answers { background: #faf7ff; border: 1px solid #ece4fb; border-radius: 10px; padding: 12px; margin-top: 6px; }
@media screen and (max-width: 900px) {
    .rl-view { grid-template-columns: minmax(0, 1fr); }
    .rl-hero { grid-template-columns: 1fr; }
    .rl-pdf { height: 420px; }
}

/* ---------- Schemes of work & lesson notes (v3.7.0) ---------- */
.lp-head { display: flex; gap: 14px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; }
.lp-head h2 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.lp-head p { margin: 0; color: var(--muted); font-size: 13px; max-width: 720px; }
.lp-termpick label { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; font-weight: 600; }
.lp-termpick select { width: auto; }
.lp-alert { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-grid { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.lp-grid th, .lp-grid td { padding: 6px 4px; text-align: center; border-bottom: 1px solid #f1f3f7; }
.lp-grid th { font-size: 11px; color: var(--muted); font-weight: 700; background: #fafbfc; position: sticky; top: 0; }
.lp-grid th:first-child, .lp-grid td:first-child { text-align: left; padding-left: 14px; min-width: 190px; position: sticky; left: 0; background: #fff; z-index: 1; }
.lp-grid th:first-child { background: #fafbfc; }
.lp-grid td:first-child b { display: block; color: var(--navy); }
.lp-grid td:first-child small { color: var(--muted); font-size: 11.5px; }
.lp-grid .now { background: #fff8e6; }
.lp-grid th.now { color: #b8860b; }
.lp-cell { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-size: 12px; font-weight: 800; text-decoration: none; font-style: normal; vertical-align: middle; }
.lp-cell.st-approved { background: #e3f6ea; color: #1a7a42; }
.lp-cell.st-submitted { background: #fff4df; color: #9a6a00; }
.lp-cell.st-draft { background: #eef1f6; color: #475569; }
.lp-cell.st-returned { background: #fde7e9; color: #b02a37; }
.lp-cell.st-missing { background: #fff; color: #b02a37; border: 1.5px dashed #e7a5ad; }
.lp-cell.st-none { background: #fff; color: #9aa3b2; border: 1.5px dashed #d8dde6; }
.lp-cell:hover { outline: 2px solid var(--gold); }
.lp-legend { display: flex; flex-wrap: wrap; gap: 14px; padding: 12px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid #f1f3f7; }
.lp-legend span { display: flex; align-items: center; gap: 6px; }
.lp-legend .lp-cell { width: 22px; height: 22px; font-size: 10px; }
.lp-badge { display: inline-block; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 20px; color: var(--c); background: #fff; border: 1px solid var(--c); white-space: nowrap; }
.lp-badge.big { font-size: 12.5px; padding: 5px 12px; }
.lp-scheme-hint { background: #eef5ff; border: 1px solid #d5e4fb; color: #1c3d6e; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 10px; }
.lp-scheme-hint.muted { background: #f7f8fa; border-color: var(--border); color: var(--muted); }
.lp-ai { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.lp-ai input { flex: 1; min-width: 200px; }
.lp-step { border: 1px solid var(--border); border-radius: 10px; padding: 10px; margin-bottom: 10px; background: #fcfcfd; }
.lp-step-head { display: flex; gap: 8px; margin-bottom: 8px; }
.lp-step-head input { font-weight: 700; }
.lp-step-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lp-res { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px 14px; }
.lp-res label { display: flex; gap: 8px; align-items: center; font-weight: 500; margin: 0; font-size: 13px; }
.lp-res small { color: var(--muted); }
.lp-viewbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.lp-viewbar-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.lp-review textarea { width: 100%; }
.lp-review label { font-weight: 700; display: block; margin-bottom: 6px; }
.lp-review-btns { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.lp-paper { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 24px 28px; margin-bottom: 16px; font-size: 14px; line-height: 1.55; color: #1f2430; }
.lp-paper-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 3px double var(--navy); padding-bottom: 8px; margin-bottom: 12px; }
.lp-paper-head b { font-size: 18px; color: var(--navy); }
.lp-paper-head span { font-size: 12px; letter-spacing: .18em; font-weight: 800; color: #b8860b; }
.lp-paper h4 { margin: 14px 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); }
.lp-paper p { margin: 0 0 6px; }
.lp-info { width: 100%; border-collapse: collapse; font-size: 13px; }
.lp-info th, .lp-info td { border: 1px solid #dfe3ea; padding: 5px 8px; text-align: left; vertical-align: top; }
.lp-info th { background: #f6f7fa; width: 110px; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: #555; }
.lp-steps { width: 100%; border-collapse: collapse; font-size: 13px; }
.lp-steps th, .lp-steps td { border: 1px solid #dfe3ea; padding: 6px 8px; vertical-align: top; text-align: left; }
.lp-steps th { background: #f6f7fa; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.lp-reslist { margin: 0; padding-left: 18px; }
.lp-sign { display: flex; gap: 30px; margin-top: 30px; }
.lp-sign div { flex: 1; border-top: 1px solid #333; padding-top: 4px; font-size: 11.5px; color: #555; }
.lp-scheme-title { margin: 0 0 12px; font-size: 15px; }
.lp-scheme-title small { color: var(--muted); font-size: 12px; }
.lp-scheme-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 10px; }
.lp-copy { display: flex; gap: 6px; }
.lp-copy select { width: auto; max-width: 240px; padding: 5px 8px; font-size: 12.5px; }
.lp-paste { margin-bottom: 10px; }
.lp-paste textarea { width: 100%; margin-bottom: 6px; }
.lp-scheme { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.lp-scheme th, .lp-scheme td { border: 1px solid #dfe3ea; padding: 4px; vertical-align: top; text-align: left; }
.lp-scheme th { background: var(--navy); color: #fff; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; padding: 7px 6px; }
.lp-scheme td:first-child { text-align: center; background: #fafbfc; }
.lp-scheme td:first-child b { display: block; font-size: 15px; color: var(--navy); }
.lp-scheme td:first-child select { font-size: 10.5px; padding: 2px; width: 100%; margin-top: 4px; }
.lp-scheme textarea { width: 100%; min-width: 120px; border: 1px solid transparent; background: transparent; font: inherit; resize: vertical; padding: 4px; border-radius: 6px; }
.lp-scheme textarea:focus { border-color: var(--gold); background: #fffdf5; outline: none; }
.lp-scheme tr.k-revision td { background: #f3f0ff; }
.lp-scheme tr.k-exam td { background: #fff4df; }
.lp-scheme tr.k-holiday td { background: #f1f3f7; color: var(--muted); }
.lp-scheme-notes { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
@media screen and (max-width: 800px) {
    .lp-step-cols { grid-template-columns: 1fr; }
    .lp-paper { padding: 16px; }
    .lp-hide-narrow { display: none; }
    .lp-viewbar-actions { margin-left: 0; }
}
@media print {
    .lp-paper { border: 0; padding: 0; }
    .lp-scheme textarea { border: 0; resize: none; overflow: hidden; }
    .lp-scheme select { -webkit-appearance: none; appearance: none; border: 0; }
    .lp-hide-narrow { display: table-cell !important; }
}
.lp-step textarea, .lp-step input, .lp-paste textarea { font-family: inherit; width: 100%; box-sizing: border-box; }

/* ---------------- Inventory & Stores (v3.8.0) ---------------- */
.iv-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.iv-stat { text-decoration: none; color: inherit; }
.iv-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.iv-cols > .card { min-width: 0; }
.iv-cols-asset { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.iv-cols-setup { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); align-items: start; }
.iv-more { float: right; font-size: 12px; font-weight: 600; }
.iv-period { color: var(--muted); font-weight: 400; margin-left: 6px; }
.iv-empty { color: var(--muted); padding: 16px; margin: 0; font-size: 13.5px; }
.iv-list { list-style: none; margin: 0; padding: 0; }
.iv-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.iv-list li:last-child { border-bottom: 0; }
.iv-list li small { color: var(--muted); white-space: nowrap; }
.iv-search { width: 220px; max-width: 100%; padding: 7px 10px; font-size: 13px; }
.iv-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 400; cursor: pointer; }
.iv-check input { width: auto; margin: 0; }
.iv-sku { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 11.5px; color: var(--muted); }
.iv-kind { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--grey-bg); border: 1px solid var(--border); border-radius: 10px; padding: 1px 7px; margin-left: 6px; vertical-align: middle; }
.iv-low { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: var(--danger); border-radius: 8px; padding: 1px 6px; margin-left: 4px; }
.iv-inactive td { opacity: .6; }
.data-table .num, .data-table th.num { text-align: right; white-space: nowrap; }
.iv-rowact { text-align: right; white-space: nowrap; }
.iv-mv { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 2px 8px; background: #eef2f7; color: #334155; white-space: nowrap; }
.iv-mv-receive, .iv-mv-opening, .iv-mv-return, .iv-mv-transfer_in { background: #e8f5ec; color: #1e7e34; }
.iv-mv-issue, .iv-mv-transfer_out { background: #fdf0e1; color: #9a4b00; }
.iv-mv-adjust { background: #eef2ff; color: #3730a3; }
.iv-itemhead { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.iv-itemhead h2 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.iv-itemhead p { margin: 0; color: var(--muted); font-size: 13px; }
.iv-desc { margin-top: 8px !important; color: var(--text) !important; }
.iv-attrs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px 18px; margin: 12px 0 0; }
.iv-attrs div { min-width: 0; }
.iv-attrs dt { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.iv-attrs dd { margin: 1px 0 0; font-size: 13.5px; font-weight: 600; overflow-wrap: anywhere; }
.iv-bignums { display: flex; gap: 22px; align-items: flex-start; }
.iv-bignums div { text-align: right; }
.iv-bignums b { display: block; font-size: 22px; color: var(--navy); }
.iv-bignums span { font-size: 11.5px; color: var(--muted); }
.iv-txtabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.iv-txtabs a { padding: 7px 12px; border: 1px solid var(--border); border-radius: 18px; font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; background: #fff; white-space: nowrap; }
.iv-txtabs a.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.iv-lead { color: var(--muted); font-size: 13.5px; margin: 0 0 12px; }
.iv-recipient { margin-top: 6px; }
.iv-rlabel { display: block; font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.iv-rtypes { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 8px; }
.iv-rtypes label { display: inline-flex; align-items: center; gap: 5px; font-weight: 400; font-size: 13.5px; cursor: pointer; }
.iv-rtypes input { width: auto; margin: 0; }
.iv-rfield { max-width: 380px; }
.iv-lines select { min-width: 200px; }
.iv-qty { width: 110px; }
.iv-short { color: var(--danger); font-weight: 700; }
.iv-labelbar { padding: 10px 14px; border-top: 1px solid var(--border); }
.iv-qr { flex: 0 0 auto; }
.iv-qr-svg { width: 120px; height: 120px; display: block; }
.iv-actions details { border-bottom: 1px solid var(--border); padding: 8px 0; }
.iv-actions details:last-child { border-bottom: 0; }
.iv-actions summary { cursor: pointer; font-weight: 600; font-size: 13.5px; list-style: none; }
.iv-actions summary::-webkit-details-marker { display: none; }
.iv-actions summary i { width: 18px; color: var(--muted); }
.iv-actions form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 8px; }
.iv-actions form select, .iv-actions form input[type=text], .iv-actions form input[type=number] { flex: 1 1 160px; width: auto; }
.iv-editgrid { display: grid !important; grid-template-columns: 1fr 1fr; }
.iv-editgrid label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.iv-timeline { list-style: none; margin: 0; padding: 0; }
.iv-timeline li { display: flex; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); font-size: 13.5px; }
.iv-timeline li:last-child { border-bottom: 0; }
.iv-timeline i { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; background: var(--gold-light); color: var(--navy); display: flex; align-items: center; justify-content: center; font-size: 12px; }
.iv-timeline small { display: block; color: var(--muted); font-size: 12px; }
.iv-labels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4mm; }
.iv-label { display: flex; gap: 8px; align-items: center; border: 1px dashed #999; border-radius: 6px; padding: 3mm; background: #fff; break-inside: avoid; page-break-inside: avoid; }
.iv-label-qr .iv-qr-svg { width: 26mm; height: 26mm; }
.iv-label-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.iv-label-txt b { font-size: 14px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.iv-label-txt span { font-size: 12px; overflow-wrap: anywhere; }
.iv-label-txt small { font-size: 9.5px; color: #555; }
@media screen and (max-width: 900px) { .iv-cols-asset, .iv-cols-setup { grid-template-columns: 1fr; } }
@media screen and (max-width: 700px) {
    .iv-cols { grid-template-columns: 1fr; }
    .iv-labels { grid-template-columns: 1fr 1fr; }
    .iv-bignums { width: 100%; justify-content: space-between; }
    .iv-bignums div { text-align: left; }
    .iv-editgrid { grid-template-columns: 1fr; }
    .iv-txtabs { flex-wrap: nowrap; overflow-x: auto; }
    .iv-lines select { min-width: 150px; }
}
@media print { .iv-labels { gap: 3mm; } .iv-label { border-color: #bbb; } .iv-cols { grid-template-columns: 1fr 1fr; } }
.iv-lines select, .iv-lines input, .iv-rfield select, .iv-rfield input, .iv-actions select, .iv-actions input[type=text], .iv-actions input[type=number], .iv-actions input[type=date],
.iv-search, .rl-filters input[type=date], .rl-filters input[type=search], .lp-review input[type=text], .iv-editgrid select {
    padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; font-size: 13.5px; font-family: inherit; background: #fff; color: var(--text);
}
.iv-rfield select, .iv-rfield input, .iv-lines select, .lp-review input[type=text] { width: 100%; }
.iv-lines td { vertical-align: middle; }
.stat-icon-chip.iv-c1 { background: linear-gradient(135deg, #2563eb, #1d4ed8); }
.stat-icon-chip.iv-c2 { background: linear-gradient(135deg, #7c3aed, #6d28d9); }
.stat-icon-chip.iv-c3 { background: linear-gradient(135deg, #db2777, #be185d); }
.stat-icon-chip.iv-c4 { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.stat-icon-chip.iv-c5 { background: linear-gradient(135deg, #d97706, #b45309); }
.iv-itemhead > div:first-child { flex: 1 1 280px; min-width: 0; }

/* ---------------- E-Learning (v3.8.0) ---------------- */
.el-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; margin-bottom: 14px; }
.el-card { display: flex; flex-direction: column; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); text-decoration: none; color: inherit; transition: transform .15s ease, box-shadow .15s ease; }
.el-card:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.1); }
.el-card-top { background: var(--cc); color: #fff; padding: 18px 16px 30px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; background-image: radial-gradient(circle at 90% 20%, rgba(255,255,255,.18) 0 38px, transparent 39px), radial-gradient(circle at 75% 110%, rgba(255,255,255,.12) 0 46px, transparent 47px); }
.el-card-top em { font-style: normal; background: rgba(255,255,255,.22); border-radius: 10px; padding: 1px 8px; text-transform: none; letter-spacing: 0; }
.el-card-body { padding: 12px 16px 16px; display: flex; flex-direction: column; gap: 4px; }
.el-card-body b { font-size: 15.5px; color: var(--navy); line-height: 1.3; }
.el-card-body small { color: var(--muted); font-size: 12.5px; }
.el-bar { height: 7px; background: #e9ecef; border-radius: 6px; overflow: hidden; margin: 6px 0 2px; }
.el-bar i { display: block; height: 100%; background: var(--success); border-radius: 6px; }
.el-bar.sm { display: inline-block; width: 70px; height: 6px; margin: 0 6px 0 0; vertical-align: middle; }
.el-empty { text-align: center; padding: 30px 20px !important; }
.el-empty > i { font-size: 38px; color: var(--gold); }
.el-empty p { max-width: 560px; margin: 12px auto; color: var(--muted); }
.el-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; background: var(--cc); color: #fff; border-radius: 14px; padding: 22px 24px; margin-bottom: 14px; background-image: radial-gradient(circle at 92% 15%, rgba(255,255,255,.15) 0 60px, transparent 61px); }
.el-hero small { opacity: .85; font-size: 12.5px; }
.el-hero h2 { margin: 4px 0 6px; font-size: 22px; color: #fff; }
.el-desc { font-size: 14px; opacity: .95; }
.el-desc p { margin: 0 0 6px; }
.el-pill { font-size: 11.5px; font-weight: 600; background: rgba(255,255,255,.22); border-radius: 12px; padding: 2px 9px; vertical-align: middle; }
.el-ring { --p: 0; flex: 0 0 96px; width: 96px; height: 96px; border-radius: 50%; background: conic-gradient(#fff calc(var(--p) * 1%), rgba(255,255,255,.25) 0); display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; }
.el-ring::before { content: ""; position: absolute; inset: 8px; border-radius: 50%; background: var(--cc); }
.el-ring b, .el-ring span { position: relative; }
.el-ring b { font-size: 20px; }
.el-ring span { font-size: 11px; opacity: .9; }
.el-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.el-lessons { list-style: none; margin: 0; padding: 0; }
.el-lessons li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.el-lessons li:last-child { border-bottom: 0; }
.el-lessons li > a { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.el-lessons li > a b { color: var(--navy); }
.el-lessons li > a small { color: var(--muted); font-size: 12px; }
.el-num { flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%; background: var(--grey-bg); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.el-lessons li.done .el-num { background: var(--success); border-color: var(--success); color: #fff; }
.el-lessonact { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.el-lessonwrap { display: grid; grid-template-columns: minmax(0, 1fr) 270px; gap: 16px; align-items: start; }
.el-title { margin: 0 0 2px; font-size: 22px; color: var(--navy); }
.el-meta { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.el-video { position: relative; padding-top: 56.25%; background: #000; border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.el-video iframe, .el-video video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.el-body { font-size: 15px; line-height: 1.65; overflow-wrap: anywhere; }
.el-body h2, .el-body h3, .el-body h4 { color: var(--navy); margin: 16px 0 6px; }
.el-body p { margin: 0 0 10px; }
.el-side { position: sticky; top: 76px; }
.el-toc { list-style: none; margin: 0; padding: 6px 0; max-height: 70vh; overflow: auto; }
.el-toc a { display: flex; gap: 8px; padding: 7px 14px; font-size: 13px; color: var(--text); text-decoration: none; }
.el-toc a span { flex: 0 0 20px; color: var(--muted); font-weight: 700; }
.el-toc li.on a { background: var(--gold-light); font-weight: 700; }
.el-toc li.done a span { color: var(--success); }
.el-quiz fieldset { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin: 0 0 12px; }
.el-quiz legend { font-weight: 700; padding: 0 4px; font-size: 14.5px; }
.el-quiz label { display: flex; gap: 8px; align-items: flex-start; padding: 6px 4px; font-weight: 400; cursor: pointer; border-radius: 6px; }
.el-quiz label:hover { background: var(--grey-bg); }
.el-quiz label input { width: auto; margin-top: 3px; }
.el-opt { padding: 5px 8px; border-radius: 6px; font-size: 14px; }
.el-opt.right { background: #e8f5ec; color: #14532d; font-weight: 700; }
.el-opt.wrong { background: #fdecee; color: var(--danger); text-decoration: line-through; }
.el-expl { display: block; margin-top: 6px; color: var(--muted); }
.el-prevnext { display: flex; justify-content: space-between; gap: 10px; margin: 6px 0 16px; flex-wrap: wrap; }
.el-bodyedit { font-family: inherit; font-size: 14px; line-height: 1.55; width: 100%; }
.el-qrow { border: 1px solid var(--border); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fcfcfd; }
.el-qhead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.el-qrow textarea, .el-qrow input[type=text] { width: 100%; padding: 7px 10px; border: 1px solid var(--border); border-radius: 4px; font: inherit; font-size: 13.5px; }
.el-qopts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 8px 0; }
.el-qopt { display: flex; align-items: center; gap: 6px; font-weight: 400; margin: 0; }
.el-qopt input[type=radio] { width: auto; margin: 0; accent-color: var(--success); }
.el-qopt span { font-weight: 700; color: var(--muted); width: 14px; }
.el-qtools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.el-colors { display: flex; gap: 8px; flex-wrap: wrap; }
.el-colors label { cursor: pointer; margin: 0; }
.el-colors input { position: absolute; opacity: 0; width: 0; }
.el-colors span { display: block; width: 30px; height: 30px; border-radius: 50%; background: var(--cc); border: 3px solid #fff; box-shadow: 0 0 0 1px var(--border); }
.el-colors input:checked + span { box-shadow: 0 0 0 2px var(--navy); }
.el-colors input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.el-livelist { list-style: none; margin: 0; padding: 0; }
.el-live { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.el-live:last-child { border-bottom: 0; }
.el-live-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.el-live-main a { text-decoration: none; color: var(--navy); }
.el-live-main small { color: var(--muted); font-size: 12px; }
.el-live-date { flex: 0 0 46px; text-align: center; border: 1px solid var(--border); border-radius: 8px; padding: 3px 0; line-height: 1.1; background: #fff; }
.el-live-date b { display: block; font-size: 18px; color: var(--navy); }
.el-live-date span { font-size: 11px; text-transform: uppercase; color: var(--danger); font-weight: 700; }
.el-live-date.big { flex-basis: 64px; padding: 8px 0; }
.el-live-date.big b { font-size: 26px; }
.el-live-open { background: #f0f9f3; }
.el-live-ended, .el-live-cancelled { opacity: .75; }
.el-livealert { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.el-livealert > i { color: var(--danger); font-size: 10px; animation: elPulse 1.2s infinite; }
@keyframes elPulse { 50% { opacity: .25; } }
.el-liveview { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.el-liveview h2 { margin: 0 0 4px; font-size: 20px; color: var(--navy); }
.el-liveview p { margin: 0 0 6px; font-size: 13.5px; }
.el-note { background: var(--gold-light); border-radius: 8px; padding: 8px 10px; }
.el-joinbox { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
.el-howto { font-size: 13px; }
.el-threads { list-style: none; margin: 0; padding: 0; }
.el-threads li { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.el-threads li:last-child { border-bottom: 0; }
.el-threads li > a { flex: 1; min-width: 0; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.el-threads li > a b { color: var(--navy); }
.el-threads li > a small { color: var(--muted); font-size: 12px; }
.el-count { font-size: 12px; color: var(--muted); white-space: nowrap; }
.el-count b { font-size: 16px; color: var(--navy); }
.el-staff { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: var(--navy); border-radius: 8px; padding: 1px 6px; vertical-align: middle; }
.el-post .card-body { padding: 14px 18px; }
.el-op h2 { margin: 0 0 4px; font-size: 19px; color: var(--navy); }
.el-by { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.el-by b { color: var(--text); }
.el-postact { margin-left: auto; }
.el-text { margin-top: 8px; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.el-text p { margin: 0 0 8px; }
.el-teacher { border-left: 4px solid var(--navy); }
.el-matrix th, .el-matrix td { text-align: center; }
.el-matrix th:first-child, .el-matrix td:first-child { text-align: left; white-space: nowrap; }
.el-matrix td.ok { background: #e8f5ec; color: #14532d; font-weight: 700; }
.el-matrix td.started { background: #fff7e6; color: #9a4b00; }
.el-legend { font-size: 12.5px; color: var(--muted); margin: 10px 16px 14px; padding-left: 20px; columns: 2; }
@media screen and (max-width: 1000px) { .el-lessonwrap { grid-template-columns: 1fr; } .el-side { position: static; } }
@media screen and (max-width: 800px) { .el-layout { grid-template-columns: 1fr; } }
@media screen and (max-width: 700px) {
    .el-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
    .el-qopts { grid-template-columns: 1fr; }
    .el-lessons li { flex-wrap: wrap; }
    .el-lessonact { width: 100%; justify-content: flex-start; padding-left: 42px; }
    .el-live { flex-wrap: wrap; }
    .el-legend { columns: 1; }
}

/* ---------------- Assignment similarity check (v3.8.0) ---------------- */
.pg-badge { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 10px; padding: 2px 9px; text-decoration: none; white-space: nowrap; }
.pg-lo { background: #e8f5ec; color: #14532d; }
.pg-md { background: #fff4e0; color: #9a4b00; }
.pg-hi { background: #fdecee; color: var(--danger); }
.pg-top { color: var(--muted); font-size: 11px; }
.pg-head { float: right; display: inline-flex; gap: 8px; align-items: center; font-weight: 400; }
.pg-note { font-size: 12.5px; color: var(--muted); margin: 4px 0 10px; }
.pg-summary { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.pg-summary h2 { margin: 0 0 4px; font-size: 19px; color: var(--navy); }
.pg-summary h2 small { font-size: 12px; color: var(--muted); font-weight: 400; }
.pg-summary p { margin: 0 0 4px; font-size: 13px; }
.pg-explain { color: var(--muted); max-width: 760px; }
.pg-dial { width: 92px; height: 92px; flex: 0 0 92px; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--grey-bg); }
.pg-dial b { font-size: 24px; }
.pg-dial span { font-size: 11px; }
.pg-matches { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.pg-matches a { display: inline-flex; gap: 6px; align-items: baseline; padding: 7px 12px; border: 1px solid var(--border); border-radius: 18px; background: #fff; text-decoration: none; color: var(--text); font-size: 13px; }
.pg-matches a b { color: var(--danger); }
.pg-matches a small { color: var(--muted); font-size: 11px; }
.pg-matches a.on { border-color: var(--navy); box-shadow: 0 0 0 1px var(--navy); }
.pg-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.pg-compare.one { grid-template-columns: 1fr; }
.pg-compare > .card { min-width: 0; }
.pg-text { font-size: 14px; line-height: 1.7; max-height: 70vh; overflow: auto; overflow-wrap: anywhere; }
.pg-text mark { background: #ffd8d8; color: inherit; padding: 1px 0; border-radius: 2px; }
@media screen and (max-width: 800px) { .pg-compare { grid-template-columns: 1fr; } .pg-head { float: none; display: flex; margin-top: 6px; } }

/* ---------------- Progress tracker (v3.8.0) ---------------- */
.pr-hero { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; background: var(--navy); color: #fff; border-radius: 14px; padding: 20px 24px; margin-bottom: 16px; }
.pr-hero small { opacity: .85; font-size: 12.5px; }
.pr-hero h2 { margin: 4px 0; font-size: 22px; color: #fff; }
.pr-hero p { margin: 0; opacity: .85; font-size: 13px; }
.pr-hero-stats { display: flex; gap: 22px; flex-wrap: wrap; }
.pr-hero-stats div { display: flex; flex-direction: column; }
.pr-hero-stats b { font-size: 24px; line-height: 1.1; }
.pr-hero-stats span { font-size: 11.5px; opacity: .85; }
.pr-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; }
.pr-cols > .card { min-width: 0; }
.pr-trend { margin: 0; }
.pr-trend svg { width: 100%; height: auto; display: block; }
.pr-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.pr-legend i { display: inline-block; width: 18px; height: 0; vertical-align: middle; margin-right: 4px; }
.pr-key-me { border-top: 2px solid #1e3a8a; }
.pr-key-class { border-top: 2px dashed #94a3b8; }
.pr-key-pass { border-top: 1px dashed #b02a37; }
.pr-grid { stroke: #e9ecef; stroke-width: 1; }
.pr-axis { fill: #6c757d; font-size: 11px; }
.pr-pass { stroke: #b02a37; stroke-width: 1; stroke-dasharray: 4 4; opacity: .7; }
.pr-line-me { fill: none; stroke: #1e3a8a; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pr-line-class { fill: none; stroke: #94a3b8; stroke-width: 2; stroke-dasharray: 5 4; }
.pr-dot-me { fill: #1e3a8a; stroke: #fff; stroke-width: 2; }
.pr-dot-class { fill: #94a3b8; stroke: #fff; stroke-width: 1.5; }
.pr-hit { fill: transparent; cursor: default; }
.pr-direct { fill: #222; font-size: 12px; font-weight: 700; }
.pr-activity { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pr-activity div { display: grid; grid-template-columns: 30px 1fr; column-gap: 8px; align-items: center; }
.pr-activity i { grid-row: span 2; color: var(--gold); font-size: 18px; text-align: center; }
.pr-activity b { font-size: 18px; color: var(--navy); }
.pr-activity span { font-size: 12px; color: var(--muted); }
.pr-good .card-header i { color: #1e7e34; }
.pr-work .card-header i { color: #c2410c; }
.pr-list { list-style: none; margin: 0; padding: 0; }
.pr-list li { padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 14px; }
.pr-list li:last-child { border-bottom: 0; }
.pr-list small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pr-score { float: right; font-weight: 700; color: var(--navy); }
.pr-up { color: #1e7e34; font-weight: 700; white-space: nowrap; }
.pr-down { color: var(--danger); font-weight: 700; white-space: nowrap; }
.pr-flat { color: var(--muted); }
.pr-subjects tr.pr-below td:first-child { border-left: 3px solid var(--danger); }
.pr-spark { display: block; }
.pr-spark-line { fill: none; stroke: #1e3a8a; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pr-spark-dot { fill: #1e3a8a; }
.pr-spark-pass { stroke: #b02a37; stroke-width: 1; stroke-dasharray: 2 3; opacity: .5; }
.pr-goalform { border: 1px solid var(--border); border-radius: 10px; padding: 14px; margin-bottom: 14px; background: #fcfcfd; }
.pr-sugs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 12px; font-size: 12.5px; color: var(--muted); }
.pr-sug { border: 1px dashed var(--gold); background: var(--gold-light); color: var(--navy); border-radius: 14px; padding: 4px 10px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.pr-goals { display: grid; gap: 12px; }
.pr-goal { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; border-left: 4px solid #1e3a8a; }
.pr-g-achieved { border-left-color: #1e7e34; background: #f6fbf7; }
.pr-g-missed { border-left-color: var(--danger); }
.pr-g-cancelled { border-left-color: #adb5bd; opacity: .75; }
.pr-goal-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.pr-goal-top b { font-size: 15px; color: var(--navy); }
.pr-goal-top small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.pr-goal-details { font-size: 13.5px; margin: 8px 0 0; }
.pr-meter { margin-top: 8px; }
.pr-meter small { color: var(--muted); font-size: 12px; }
.pr-self { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 8px; font-size: 13px; }
.pr-self label { display: flex; gap: 8px; align-items: center; font-weight: 400; margin: 0; }
.pr-self input[type=range] { width: 160px; accent-color: #1e7e34; }
.pr-notes { list-style: none; margin: 10px 0 0; padding: 0; border-top: 1px dashed var(--border); }
.pr-notes li { padding: 8px 0 0; font-size: 13.5px; }
.pr-notes small { color: var(--muted); }
.pr-parent { background: #7e22ce; }
.pr-goal-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-top: 10px; }
.pr-noteform { display: flex; gap: 6px; flex: 1 1 260px; }
.pr-noteform input { flex: 1; min-width: 0; padding: 6px 10px; border: 1px solid var(--border); border-radius: 4px; font: inherit; font-size: 13px; }
@media screen and (max-width: 900px) { .pr-cols { grid-template-columns: 1fr; } }
@media screen and (max-width: 600px) { .pr-activity { grid-template-columns: 1fr; } .pr-hero { padding: 16px; } .pr-hero-stats { gap: 16px; } }

/* ---------- Campuses (v3.9.0) ---------- */
.campus-switch { display: inline-flex; align-items: center; gap: 6px; margin-right: 10px; padding: 4px 4px 4px 10px; border: 1px solid var(--border); border-radius: 20px; background: var(--grey-bg); color: var(--navy); font-size: 13px; white-space: nowrap; max-width: 230px; }
.campus-switch select { border: 0; background: transparent; font: inherit; font-weight: 600; color: var(--navy); padding: 4px 6px; max-width: 180px; cursor: pointer; }
.campus-switch select:focus { outline: 2px solid var(--gold); border-radius: 12px; }
.campus-fixed { padding: 6px 12px; font-weight: 600; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cp-card .card-body { display: flex; flex-direction: column; gap: 14px; }
.cp-off { opacity: .65; }
.cp-top { display: flex; gap: 12px; align-items: flex-start; }
.cp-top h3 { margin: 0 0 2px; font-size: 17px; color: var(--navy); }
.cp-top small { color: var(--muted); }
.cp-code { flex: 0 0 auto; min-width: 46px; height: 46px; padding: 0 6px; border-radius: 10px; background: var(--navy); color: var(--gold-light, #f5d27a); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; letter-spacing: .5px; }
.cp-badge { margin-left: auto; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #eee; color: var(--muted); }
.cp-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: 8px; }
.cp-stats div { padding: 10px; text-align: center; }
.cp-stats div + div { border-left: 1px solid var(--border); }
.cp-stats b { display: block; font-size: 20px; color: var(--navy); }
.cp-stats span { font-size: 12px; color: var(--muted); }
.cp-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--muted); }
.cp-meta:empty { display: none; }
.cp-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cp-foot { margin-top: 18px; color: var(--muted); font-size: 13px; }
.cp-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 8px; background: #eef2fb; color: var(--navy); white-space: nowrap; }
@media (max-width: 768px) {
    /* Phones: the campus switcher gets its own row under the title. */
    .topbar:has(.campus-switch) { flex-wrap: wrap; row-gap: 8px; }
    .topbar .campus-switch { order: 10; flex: 1 0 100%; max-width: none; margin: 0; justify-content: center; }
    .campus-switch select { max-width: none; flex: 1; }
}

/* ================= v3.14.0 ================= */
/* CBT / entrance exam: who can see results */
.exam-visibility { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 10px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: #f8fafc; }
.exam-visibility > div { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; min-width: 0; flex: 1 1 260px; }
.exam-visibility i { margin-top: 3px; }
.exam-visibility b { color: var(--navy); }
.exam-visibility small { display: block; width: 100%; color: var(--muted); font-size: 12.5px; padding-left: 26px; margin-top: -6px; }
.exam-visibility.is-on { background: #eefaf2; border-color: #c6e9d2; }
.exam-visibility.is-on i { color: var(--success); }
.exam-visibility.is-off { background: #fff8e8; border-color: #f1dfb0; }
.exam-visibility.is-off i { color: #9a6a00; }
.exam-visibility form { margin: 0; }

/* Type-ahead picker */
.lk { position: relative; }
.lk .lk-text { width: 100%; }
.lk-list { position: absolute; z-index: 50; left: 0; right: 0; top: calc(100% + 2px); background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 24px -10px rgba(0,0,0,.25); max-height: 260px; overflow-y: auto; }
.lk-opt { padding: 8px 12px; cursor: pointer; border-bottom: 1px solid #f1f3f7; }
.lk-opt:last-child { border-bottom: 0; }
.lk-opt b { display: block; font-size: 13.5px; color: var(--navy); font-weight: 600; }
.lk-opt small { display: block; font-size: 11.5px; color: var(--muted); }
.lk-opt:hover, .lk-opt.on { background: var(--gold-light); }
.lk-none { padding: 10px 12px; color: var(--muted); font-size: 13px; }

/* Operations modules (duty, leave, awards, reception, alumni, transport, hostel, forum, sickbay) */
.ox-muted { color: var(--muted); }
.ox-ico { color: var(--gold); width: 16px; text-align: center; }
.ox-filters { gap: 10px 14px; }
.ox-filters .form-group { margin-bottom: 0; }
.ox-filters input[type=text], .ox-filters input[type=date], .ox-filters select { min-width: 140px; }
.ox-seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.ox-seg label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; margin: 0; font-weight: 600; font-size: 13px; color: var(--navy); cursor: pointer; border-right: 1px solid var(--border); }
.ox-seg label:last-child { border-right: 0; }
.ox-seg label:has(input:checked) { background: var(--gold-light); }
.ox-seg input { width: auto; margin: 0; }
.ox-rec { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; max-width: 560px; }
.ox-rec .lk { flex: 1; }
.ox-dl { display: grid; grid-template-columns: minmax(110px, auto) 1fr; gap: 8px 16px; margin: 0; font-size: 13.5px; }
.ox-dl dt { color: var(--muted); font-weight: 600; }
.ox-dl dd { margin: 0; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.ox-h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.ox-emptybig { text-align: center; padding: 36px 16px !important; color: var(--muted); }
.ox-emptybig i { font-size: 34px; color: var(--gold); display: block; margin-bottom: 10px; }
.ox-emptybig p { max-width: 420px; margin: 0 auto; }
.ox-banner { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: space-between; padding: 14px 16px; border-radius: 12px; margin-bottom: 16px; background: #eef4ff; border: 1px solid #cfdcf7; }
.ox-banner > div { display: flex; gap: 12px; align-items: center; min-width: 0; flex: 1 1 280px; }
.ox-banner i { font-size: 22px; color: #1d4ed8; }
.ox-banner b { color: var(--navy); display: block; }
.ox-banner small { color: var(--muted); }
.ox-banner.warn { background: #fff8e8; border-color: #f1dfb0; }
.ox-banner.warn i { color: #9a6a00; }
.ox-banner.ok { background: #eefaf2; border-color: #c6e9d2; }
.ox-banner.ok i { color: var(--success); }
.ox-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ox-kv > div { background: var(--grey-bg); border-radius: 10px; padding: 10px 12px; min-width: 0; }
.ox-kv b { display: block; color: var(--navy); font-size: 15px; overflow-wrap: anywhere; }
.ox-kv span { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ox-section { border-top: 1px solid var(--border); padding-top: 14px; margin-top: 6px; }
.ox-section h3 { font-size: 15px; color: var(--navy); margin: 0 0 10px; display: flex; align-items: center; gap: 8px; }
.ox-section h3 i { color: var(--gold); }
.ox-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ox-actions form { margin: 0; display: inline; }
.ox-pill { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 10px; padding: 2px 8px; background: #eef2f7; color: #334155; white-space: nowrap; }
@media screen and (max-width: 640px) { .ox-dl { grid-template-columns: 1fr; gap: 2px; } .ox-dl dd { margin-bottom: 8px; } .ox-rec { max-width: 100%; } }

/* Awards */
.aw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.aw-card { display: flex; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; text-decoration: none; color: inherit; transition: box-shadow .15s, transform .15s; }
.aw-card:hover { box-shadow: 0 10px 24px -14px rgba(0,0,0,.35); transform: translateY(-1px); }
.aw-card-ic { flex: 0 0 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #fde68a, #f59e0b); color: #7c4a03; font-size: 20px; }
.aw-card-b { min-width: 0; }
.aw-card-b b { display: block; color: var(--navy); font-size: 15px; }
.aw-card-b small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.aw-card-p { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 8px; font-size: 12.5px; color: var(--text); }
.aw-card-p i { color: var(--gold); }
.aw-cert-mini { overflow: hidden; border: 1px solid var(--border); border-radius: 8px; aspect-ratio: 297 / 210; position: relative; }
.aw-cert-scale { transform: scale(.36); transform-origin: top left; width: 277.7%; position: absolute; top: 0; left: 0; }
.aw-cert { width: 100%; aspect-ratio: 297 / 210; background: #fffdf7; padding: 3%; box-sizing: border-box; font-family: Georgia, 'Times New Roman', serif; color: #1f2937; }
.aw-cert-in { height: 100%; border: 6px double #b8860b; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 3% 6%; box-sizing: border-box; }
.aw-cert-logo { height: 70px; margin-bottom: 8px; }
.aw-cert-school { font-size: 26px; font-weight: 700; color: var(--navy); text-transform: uppercase; letter-spacing: .05em; }
.aw-cert-addr { font-size: 13px; color: #6b7280; margin-top: 2px; }
.aw-cert-kicker { margin-top: 22px; font-size: 40px; color: #b8860b; font-style: italic; }
.aw-cert-small { font-size: 16px; color: #4b5563; margin-top: 12px; }
.aw-cert-name { font-size: 36px; font-weight: 700; color: var(--navy); border-bottom: 1px solid #d1b46a; padding: 2px 30px 6px; margin-top: 6px; }
.aw-cert-title { font-size: 26px; font-weight: 700; margin-top: 8px; }
.aw-cert-cit { font-size: 15px; color: #374151; max-width: 80%; margin-top: 10px; font-style: italic; }
.aw-cert-foot { display: flex; justify-content: space-between; width: 80%; margin-top: auto; padding-top: 24px; }
.aw-cert-foot div { display: flex; flex-direction: column; align-items: center; min-width: 200px; }
.aw-cert-foot b { border-bottom: 1px solid #6b7280; padding: 0 20px 4px; min-width: 180px; font-size: 15px; }
.aw-cert-foot span { font-size: 12px; color: #6b7280; margin-top: 4px; }
.print-only { display: none; }
@media print {
    .print-only { display: block; }
    .print-only .aw-cert { page: awcert; width: 277mm; height: 190mm; aspect-ratio: auto; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
@page awcert { size: A4 landscape; margin: 8mm; }

/* Leave */
.lv-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--c, #2563eb); margin-right: 6px; vertical-align: middle; }
.lv-bal { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.lv-bal-c { background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: 12px; padding: 12px 14px; }
.lv-bal-h { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; color: var(--navy); font-size: 13.5px; }
.lv-bal-h small { font-weight: 600; color: var(--muted); font-size: 11px; }
.lv-bal-n { margin-top: 6px; }
.lv-bal-n b { font-size: 24px; color: var(--navy); }
.lv-bal-n span { color: var(--muted); font-size: 12px; }
.lv-bar { height: 6px; border-radius: 4px; background: #eef1f6; margin-top: 8px; overflow: hidden; }
.lv-bar i { display: block; height: 100%; background: var(--c); }
.lv-pend { display: block; color: #9a6a00; font-size: 11.5px; margin-top: 6px; }
.lv-calc { background: #eef4ff; border: 1px solid #cfdcf7; color: #1e3a8a; border-radius: 8px; padding: 8px 12px; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.lv-calc.bad { background: #fdecee; border-color: #f2c2c7; color: var(--danger); }
.lv-cal th, .lv-cal td { padding: 4px 2px; min-width: 24px; }
.lv-cal th small { font-weight: 400; }
.lv-cal .we { background: #f6f7fa; }
.lv-cell { display: block; height: 18px; border-radius: 4px; background: var(--c); }
.lv-cell.pend { background: repeating-linear-gradient(45deg, var(--c), var(--c) 3px, #fff 3px, #fff 6px); opacity: .8; }

/* Duty */
.du-week { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.du-day { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-width: 0; }
.du-day.today { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-light); }
.du-day-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.du-day-h b { color: var(--navy); }
.du-day-h span { color: var(--muted); font-size: 12px; }
.du-none { font-size: 12.5px; margin: 0; }
.du-who { display: flex; justify-content: space-between; gap: 8px; padding: 8px 0; border-top: 1px solid #f1f3f7; }
.du-who b { display: block; font-size: 13.5px; color: var(--text); }
.du-who small { display: block; color: var(--muted); font-size: 11.5px; margin-bottom: 3px; }
.du-who form { margin: 0; }
.du-x { border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 0 4px; }
.du-x:hover { color: var(--danger); }
.du-inc { border: 1px solid var(--border); border-left: 4px solid #f59e0b; border-radius: 10px; padding: 12px 12px 4px; margin-bottom: 10px; background: #fffdf8; }
.du-inc-f { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.du-check td:first-child { min-width: 200px; }
.du-yn { white-space: nowrap; }
.du-yn label { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; font-size: 13px; font-weight: 600; }
.du-yn input { width: auto; margin: 0; }
.du-bar { border-top: 1px solid var(--border); position: sticky; bottom: 0; background: #fff; z-index: 5; display: flex; gap: 8px; flex-wrap: wrap; }
@media print { .du-week { grid-template-columns: repeat(3, 1fr); } .du-day { break-inside: avoid; } }

/* Reception */
.rc-alt { margin-top: 6px; }
.rc-cb { display: flex; align-items: flex-end; }
.rc-collect { display: inline-flex; gap: 4px; align-items: center; }
.rc-collect input { width: 130px; padding: 5px 8px; font-size: 12.5px; }

/* Transport */
.tr-routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.tr-route { display: block; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: inherit; }
.tr-route:hover { box-shadow: 0 10px 24px -14px rgba(0,0,0,.35); }
.tr-route.off { opacity: .65; }
.tr-route-h { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.tr-route-h b { color: var(--navy); font-size: 15.5px; }
.tr-route > small { color: var(--muted); display: block; min-height: 16px; }
.tr-route-m { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; margin: 10px 0; color: var(--text); }
.tr-route-m i { color: var(--gold); }
.tr-cap { font-size: 12px; color: var(--muted); }
.tr-stops input { min-width: 0; }
.tr-stops td:nth-child(2) input { min-width: 150px; }
.tr-sort { width: 60px; }

/* Hostel */
.hs-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.hs-room { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.hs-room.off { opacity: .6; }
.hs-room-h { display: flex; justify-content: space-between; align-items: center; }
.hs-room-h b { color: var(--navy); }
.hs-room ul { list-style: none; margin: 8px 0 0; padding: 0; }
.hs-room li { display: flex; justify-content: space-between; align-items: center; gap: 6px; padding: 6px 0; border-top: 1px solid #f1f3f7; font-size: 13.5px; }
.hs-room li small { display: block; color: var(--muted); font-size: 11.5px; }
.hs-room li form { margin: 0; }
.hs-room li.free span { color: #9aa3b2; font-style: italic; font-size: 12.5px; }
.hs-edit { margin-top: 8px; font-size: 12.5px; }
.hs-edit summary { cursor: pointer; color: var(--muted); }
.hs-edit form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.hs-edit input[type=number] { width: 64px; }
.hs-edit input:not([type]) { width: 110px; }
.hs-add { display: flex; flex-direction: column; gap: 8px; border-style: dashed; background: #fafbfc; }
.hs-add label { font-size: 12.5px; display: flex; align-items: center; gap: 8px; }
.hs-add input[type=number] { width: 70px; }

/* Forum */
.fm-crumb { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.fm-boards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.fm-board { display: flex; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: inherit; }
.fm-board:hover { box-shadow: 0 10px 24px -14px rgba(0,0,0,.35); }
.fm-board-ic { flex: 0 0 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--gold-light); color: var(--navy); font-size: 18px; }
.fm-board-b { min-width: 0; }
.fm-board-b b { display: block; color: var(--navy); font-size: 15px; }
.fm-board-b small { display: block; color: var(--muted); font-size: 12.5px; }
.fm-meta { display: block; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.fm-topics { list-style: none; margin: 0; padding: 0; }
.fm-topics li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.fm-topics li:last-child { border-bottom: 0; }
.fm-topics li > a { text-decoration: none; color: inherit; min-width: 0; }
.fm-topics li > a b { display: block; color: var(--navy); }
.fm-topics li > a b i { color: var(--gold); font-size: 12px; }
.fm-topics small { color: var(--muted); font-size: 12px; }
.fm-stat { text-align: right; font-size: 12px; color: var(--muted); white-space: nowrap; }
.fm-stat b { color: var(--navy); font-size: 14px; }
.hidden-x { opacity: .55; }
.fm-post { display: flex; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-bottom: 10px; }
.fm-post#top { border-left: 4px solid var(--gold); }
.fm-av { flex: 0 0 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #fff; font-weight: 700; }
.fm-post-b { min-width: 0; flex: 1; }
.fm-post-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fm-post-h b { color: var(--navy); }
.fm-post-h small { color: var(--muted); font-size: 12px; }
.fm-text { margin-top: 8px; font-size: 14px; line-height: 1.6; overflow-wrap: anywhere; }
.fm-acts { display: flex; gap: 12px; margin-top: 8px; font-size: 12px; align-items: center; }
.fm-acts a, .fm-acts button { color: var(--muted); background: none; border: 0; padding: 0; cursor: pointer; font-size: 12px; text-decoration: none; }
.fm-acts a:hover, .fm-acts button:hover { color: var(--navy); text-decoration: underline; }
.fm-acts form { display: inline-flex; gap: 12px; margin: 0; }
.fm-reply textarea { width: 100%; margin-top: 6px; }
/* Elements hidden with the hidden attribute stay hidden even when a class sets display. */
.iv-check[hidden], .lv-calc[hidden], .sb-who[hidden], .lk-list[hidden] { display: none !important; }
.hs-add input, .hs-edit input { border: 1px solid var(--border); border-radius: 6px; padding: 7px 9px; font-size: 13px; background: #fff; }

/* ================= v3.15.0 ================= */
/* Score entry: Fill from CBT panel, live totals */
.cf-card .card-header i { color: var(--gold, #c9a227); margin-right: 4px; }
.cf-intro, .cf-none { font-size: 13px; color: var(--muted); margin: 0 0 12px; }
.cf-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.cf-target { border: 1px solid var(--border); border-radius: 10px; padding: 8px 14px 10px; margin: 0; min-width: 0; transition: border-color .15s, background .15s; }
.cf-target.cf-active { border-color: #16a34a; background: #f3fbf5; }
.cf-target legend { padding: 0 6px; }
.cf-master { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; cursor: pointer; }
.cf-master input, .cf-exams input, .cf-opts input, .cf-zero input { width: auto; margin: 0; accent-color: #16a34a; }
.cf-master input { width: 18px; height: 18px; }
.cf-row { display: flex; gap: 10px; align-items: flex-start; padding: 5px 0; font-size: 13px; }
.cf-k { flex: 0 0 64px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .03em; padding-top: 2px; }
.cf-exams { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cf-exams label, .cf-opts label, .cf-zero { display: inline-flex; gap: 6px; align-items: center; font-weight: 400; }
.cf-exams small, .cf-zero small { color: var(--muted); }
.cf-opts { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cf-worth { width: 72px !important; padding: 4px 6px !important; display: inline-block; }
.cf-msg { margin: 6px 0 0; font-size: 12.5px; min-height: 1em; }
.cf-msg.cf-ok { color: #15803d; }
.cf-msg.cf-err { color: var(--danger, #b91c1c); }
.cf-foot { display: flex; flex-wrap: wrap; gap: 8px 22px; align-items: center; margin-top: 12px; font-size: 13px; }
.cf-foot select { width: auto; display: inline-block; padding: 4px 8px; margin-left: 4px; }
.cf-warn { margin: 10px 0 0; font-size: 12.5px; color: #92400e; }
.se-table input.se-in { width: 80px; }
.se-table input.cf-filled { background: #e8f7ec; border-color: #16a34a; }
.se-table input.se-bad { background: #fdecec; border-color: var(--danger, #b91c1c); }
.se-use { padding: 2px 6px !important; font-size: 10.5px !important; }
.se-sum { font-size: 12.5px; color: var(--muted); margin: 0 0 8px; }
.se-dirty { margin-left: 10px; font-size: 12.5px; color: #92400e; }
.se-dirty[hidden] { display: none; }
@media screen and (max-width: 600px) {
    .se-table th:first-child, .se-table td:first-child { display: none; }
    .se-table input.se-in { width: 62px; }
    .cf-k { flex-basis: 54px; }
}
/* Alumni sign-up security check */
.al-captcha { margin-top: 14px; max-width: 320px; padding: 10px 12px; border: 1px dashed var(--border); border-radius: 8px; background: #fafbfd; }
.al-captcha label { font-weight: 500; }
.al-captcha label i { color: var(--gold); margin-right: 4px; }
.al-captcha input { max-width: 140px; }
.du-leave { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 9px; background: #fef3c7; color: #92400e; font-size: 10.5px; font-weight: 700; vertical-align: 1px; }
.cf-exams label, .cf-zero { display: block; }
.cf-exams label input, .cf-zero input { vertical-align: -2px; margin-right: 6px; }

/* ================= v3.16.0 Exam Practice ================= */
.ep-hero { background: linear-gradient(120deg, var(--navy), #2d4373); color: #fff; border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.ep-hero h2 { margin: 0 0 6px; color: #fff; }
.ep-hero p { margin: 0; opacity: .88; max-width: 760px; }
.ep-exams { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin-bottom: 18px; }
.ep-exam { display: flex; flex-direction: column; gap: 4px; background: #fff; border: 1px solid var(--border); border-top: 4px solid var(--c); border-radius: 12px; padding: 16px; color: inherit; text-decoration: none; transition: transform .12s, box-shadow .12s; }
.ep-exam:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.ep-exam-ic { width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); font-size: 17px; margin-bottom: 6px; }
.ep-exam b { font-size: 20px; color: var(--c); }
.ep-exam small { color: var(--muted); font-size: 12.5px; min-height: 2.6em; }
.ep-exam-who { font-size: 12.5px; }
.ep-exam-n { font-size: 12.5px; font-weight: 700; margin-top: 4px; }
.ep-note { font-size: 12.5px; color: var(--muted); margin: 6px 0 0; }
.ep-note i { color: var(--gold); }
.ep-small { font-size: 12.5px; }
.ep-head { margin: 4px 0 14px; }
.ep-head h2 { margin: 6px 0 2px; border-left: 4px solid var(--c, var(--gold)); padding-left: 10px; }
.ep-head h2 small { font-size: 13px; color: var(--muted); font-weight: 500; margin-left: 6px; }
.ep-head p { margin: 0; }
.ep-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.ep-subject { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); color: inherit; text-decoration: none; }
.ep-subject:hover { background: var(--gold-light); }
.ep-subject span { font-size: 12.5px; color: var(--muted); }
.ep-subject em { font-size: 12px; font-style: normal; color: #15803d; font-weight: 600; }
.ep-subject.empty b { color: var(--muted); font-weight: 600; }
.ep-pick { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.ep-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 18px; padding: 5px 12px; font-size: 13px; cursor: pointer; background: #fff; }
.ep-chip input { width: auto; margin: 0; }
.ep-chip.on { border-color: #b45309; background: #fff7ed; }
.ep-chip.off { opacity: .45; cursor: not-allowed; }
.ep-grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.ep-grid2 > .card { margin-bottom: 16px; }
.ep-grid-wide { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .ep-grid-wide { grid-template-columns: 1fr; } }
.ep-years { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.ep-year { border: 1px dashed var(--border); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.ep-year.has { border-style: solid; border-color: #93c5fd; background: #f5f9ff; }
.ep-year > b { font-size: 16px; }
.ep-ypaper { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.ep-ypaper small { color: var(--muted); }
.ep-ybtns, .ep-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.ep-ybtns form, .ep-acts form, .ep-inline { display: inline; margin: 0; }
td.ep-acts { white-space: nowrap; }
.ep-topics { display: flex; flex-wrap: wrap; gap: 6px; }
.ep-topics span { background: #f1f5f9; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; }
.ep-topics small { color: var(--muted); }
.ep-pct { font-weight: 700; color: hsl(calc(var(--p) * 1.2), 70%, 32%); }
/* taking a test */
.ep-take { max-width: 1180px; }
.ep-bar { position: sticky; top: 64px; z-index: 20; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    background: var(--navy); color: #fff; border-radius: 12px; padding: 10px 16px; margin-bottom: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.ep-bar-t { display: flex; flex-direction: column; min-width: 0; }
.ep-bar-t b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ep-bar-t small { opacity: .8; font-size: 12px; }
.ep-bar-r { display: flex; align-items: center; gap: 12px; }
.ep-count { font-size: 13px; opacity: .9; }
.ep-timer { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 17px; background: rgba(255,255,255,.12); padding: 3px 10px; border-radius: 8px; }
.ep-timer.low { background: #dc2626; animation: epPulse 1s infinite alternate; }
@keyframes epPulse { to { background: #991b1b; } }
.ep-bar .btn-primary { background: var(--gold); border-color: var(--gold); }
.ep-subtabs { display: flex; gap: 6px; overflow-x: auto; margin-bottom: 10px; }
.ep-subtabs button { border: 1px solid var(--border); background: #fff; border-radius: 18px; padding: 6px 14px; font-size: 13px; cursor: pointer; white-space: nowrap; }
.ep-subtabs button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ep-main { display: grid; grid-template-columns: 1fr 300px; gap: 14px; align-items: start; }
@media (max-width: 900px) { .ep-main { grid-template-columns: 1fr; } .ep-bar { top: 56px; } }
.ep-qhead { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.ep-qnum { font-size: 12.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.ep-qtopic { font-size: 11.5px; background: #eef2ff; color: #3730a3; border-radius: 10px; padding: 1px 8px; }
.ep-passage { background: #fffbeb; border: 1px solid #fde68a; border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; white-space: pre-line; font-size: 14px; line-height: 1.6; max-height: 320px; overflow: auto; }
.ep-passage > b, .ep-passage summary { display: block; font-size: 12px; text-transform: uppercase; color: #92400e; margin-bottom: 4px; cursor: pointer; }
.ep-qtext { font-size: 16.5px; line-height: 1.55; margin-bottom: 14px; white-space: pre-line; }
.ep-opts { display: flex; flex-direction: column; gap: 8px; }
.ep-opt { display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; border: 1.5px solid var(--border); background: #fff; border-radius: 10px; padding: 11px 14px; font-size: 15px; cursor: pointer; color: inherit; font-family: inherit; }
.ep-opt:hover:not(:disabled) { border-color: var(--navy); background: #f8fafc; }
.ep-opt .ep-L { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #f1f5f9; font-weight: 700; font-size: 13px; }
.ep-opt .ep-T { padding-top: 3px; }
.ep-opt.sel { border-color: var(--navy); background: #eef2f9; }
.ep-opt.sel .ep-L { background: var(--navy); color: #fff; }
.ep-opt.right { border-color: #16a34a; background: #f0fdf4; }
.ep-opt.right .ep-L { background: #16a34a; color: #fff; }
.ep-opt.wrong { border-color: #dc2626; background: #fef2f2; }
.ep-opt.wrong .ep-L { background: #dc2626; color: #fff; }
.ep-opt:disabled { cursor: default; color: inherit; }
.ep-fb { margin-top: 12px; border-radius: 10px; padding: 10px 14px; font-size: 14px; }
.ep-fb.ok { background: #f0fdf4; border: 1px solid #bbf7d0; }
.ep-fb.no { background: #fef2f2; border: 1px solid #fecaca; }
.ep-fb p { margin: 6px 0 0; }
.ep-nav { display: flex; justify-content: space-between; gap: 8px; padding: 12px 20px 16px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.ep-flag.on { background: #fff7ed; border-color: #f59e0b; color: #b45309; }
.ep-qgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(36px, 1fr)); gap: 6px; }
.ep-g { height: 34px; border: 1px solid var(--border); background: #fff; border-radius: 7px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.ep-g.d { background: #e0e7ff; border-color: #a5b4fc; }
.ep-g.ok { background: #dcfce7; border-color: #86efac; }
.ep-g.no { background: #fee2e2; border-color: #fca5a5; }
.ep-g.f { box-shadow: inset 0 -3px 0 #f59e0b; }
.ep-g.c { outline: 2px solid var(--navy); outline-offset: 1px; font-weight: 700; }
.ep-legend { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin: 12px 0 4px; }
.ep-legend span { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--border); }
.ep-legend .d { background: #e0e7ff; } .ep-legend .f { box-shadow: inset 0 -3px 0 #f59e0b; } .ep-legend .c { outline: 2px solid var(--navy); }
.ep-confirm { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: grid; place-items: center; z-index: 2000; padding: 16px; }
.ep-confirm-box { background: #fff; border-radius: 14px; padding: 22px; max-width: 400px; width: 100%; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.ep-confirm-box h3 { margin: 0 0 8px; }
.ep-confirm-btns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
/* result */
.ep-score { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 20px; margin-bottom: 16px; }
.ep-ring { --p: 0; width: 132px; height: 132px; border-radius: 50%; display: grid; place-items: center; align-content: center; text-align: center;
    background: radial-gradient(closest-side, #fff 78%, transparent 79%), conic-gradient(hsl(calc(var(--p) * 1.2), 70%, 40%) calc(var(--p) * 1%), #e5e7eb 0); }
.ep-ring b { font-size: 26px; display: block; }
.ep-ring small { color: var(--muted); font-size: 12.5px; }
.ep-score-t { flex: 1; min-width: 240px; }
.ep-score-t p { margin: 4px 0; }
.ep-big { font-size: 28px; display: block; }
.ep-big small { font-size: 15px; color: var(--muted); }
.ep-barrow { display: grid; grid-template-columns: minmax(110px, 1.3fr) 2fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 13px; }
.ep-meter { height: 9px; background: #e5e7eb; border-radius: 6px; overflow: hidden; }
.ep-meter i { display: block; height: 100%; background: #16a34a; border-radius: 6px; }
.ep-meter.low i { background: #dc2626; }
.ep-filter { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.ep-filter button { border: 1px solid var(--border); background: #fff; border-radius: 14px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.ep-filter button.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.ep-rv { border-bottom: 1px solid var(--border); padding: 14px 0; }
.ep-rv[hidden] { display: none; }
.ep-rv:last-child { border-bottom: 0; }
.ep-rv-h { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.ep-rv-s { margin-left: auto; font-size: 12.5px; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.ep-rv.ok .ep-rv-s { color: #15803d; } .ep-rv.no .ep-rv-s { color: #b91c1c; } .ep-rv.skip .ep-rv-s { color: var(--muted); }
.ep-rv .ep-qtext { font-size: 15px; margin-bottom: 6px; }
.ep-rv-opts { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 3px; font-size: 14px; }
.ep-rv-opts li { padding: 4px 8px; border-radius: 6px; }
.ep-rv-opts li.right { background: #dcfce7; }
.ep-rv-opts li.wrong { background: #fee2e2; }
.ep-rv-opts em { font-size: 12px; color: var(--muted); }
.ep-expl { background: #f8fafc; border-left: 3px solid var(--gold); padding: 6px 10px; margin: 6px 0; font-size: 13.5px; }
.ep-src { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
/* paper editor */
.ep-optgrid { display: grid; gap: 8px; }
.ep-optin { display: flex; align-items: center; gap: 8px; }
.ep-optin input[type=radio] { width: 18px; height: 18px; margin: 0; flex: 0 0 auto; accent-color: #16a34a; }
.ep-optin b { width: 18px; }
.ep-optin input[type=text], .ep-optin input:not([type]) { flex: 1; }
.ep-hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.ep-optin input:not([type=radio]) { flex: 1; min-width: 0; border: 1px solid var(--border); border-radius: 6px; padding: 8px 10px; font-size: 14px; background: #fff; }
#qform details { margin-bottom: 12px; }
#qform details textarea { margin-top: 6px; width: 100%; }
/* v3.16.2 syllabus */
.ep-exam-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.ep-exam-tabs a { border: 1.5px solid var(--border); border-radius: 18px; padding: 5px 14px; font-size: 13px; font-weight: 600; color: var(--c); text-decoration: none; background: #fff; }
.ep-exam-tabs a.on { background: var(--c); color: #fff; border-color: var(--c); }
.ep-exam-tabs .btn { margin-left: auto; }
.ep-official { background: #f8fafc; border: 1px solid var(--border); border-left: 4px solid var(--gold); border-radius: 10px; padding: 12px 16px; margin-bottom: 16px; font-size: 13.5px; }
.ep-official ul { margin: 6px 0; padding-left: 18px; }
.ep-official p { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.ep-syl details.card > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.ep-syl details.card > summary::-webkit-details-marker { display: none; }
.ep-syl details.card > summary::before { content: '\25B8'; margin-right: 8px; color: var(--muted); }
.ep-syl details[open].card > summary::before { content: '\25BE'; }
.ep-syl details.card > summary span { flex: 1; font-weight: 700; }
.ep-syl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 20px; }
.ep-syl-grid h4 { margin: 0 0 4px; font-size: 14px; color: var(--navy); }
.ep-syl-grid ul { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.55; }
.ep-syl-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 6px; font-size: 13px; }
.ep-tp-h { margin: 14px 0 6px; font-size: 14px; }
.ep-tp { border: 1px solid var(--border); background: #f1f5f9; border-radius: 14px; padding: 4px 11px; font-size: 12.5px; cursor: pointer; font-family: inherit; }
.ep-tp:hover { background: var(--gold-light); border-color: var(--gold); }
.ep-tp small { color: var(--muted); }
@media print { .ep-syl details.card { break-inside: avoid; } .ep-official a::after { content: ' (' attr(href) ')'; font-size: 11px; } }
.rl-syllabus { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.rl-syllabus a { border: 1.5px solid var(--border); border-radius: 18px; padding: 5px 14px; font-size: 13px; font-weight: 600; color: var(--c); text-decoration: none; background: #fff; }
.rl-syllabus a:hover { background: var(--c); color: #fff; }

/* ================= v3.17.0 Bitlite question bank ================= */
.qb-cats { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0 0 14px; }
.qb-cats-l { font-size: 12.5px; color: var(--muted); margin-right: 2px; }
.qb-cats a:not(.btn) { border: 1px solid var(--border); background: #fff; border-radius: 18px; padding: 5px 12px; font-size: 13px; color: inherit; text-decoration: none; }
.qb-cats a:not(.btn) span { color: var(--muted); font-size: 12px; margin-left: 2px; }
.qb-cats a.on { background: var(--navy); color: #fff; border-color: var(--navy); }
.qb-cats a.on span { color: #cbd5e1; }
.qb-cats .qb-browse { margin-left: auto; }
.qb-tabs { padding: 12px 20px 0; margin: 0; }
.qb-hero { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; background: linear-gradient(120deg, #3b1d72, #6d28d9); color: #fff; border-radius: 14px; padding: 20px 24px; margin-bottom: 16px; }
.qb-hero h2 { margin: 0 0 6px; color: #fff; }
.qb-hero p { margin: 0; max-width: 760px; opacity: .9; font-size: 14px; }
.qb-hero .btn-outline { background: #fff; }
.qb-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.qb-filters select, .qb-filters input { width: auto; max-width: 260px; padding: 6px 10px; font-size: 13px; }
.qb-count { font-size: 12.5px; color: var(--muted); margin: 10px 0; }
.qb-table td { vertical-align: top; }
.qb-q { max-width: 560px; font-size: 13.5px; }
.qb-opts { margin: 6px 0 0; padding-left: 20px; font-size: 13px; color: #334155; }
.qb-opts li.ok { color: #15803d; font-weight: 700; }
.qb-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.qb-into { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.qb-into select { width: auto; }
.qb-pages { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); }
.ep-syl-src { margin: 0 0 10px; }
.ep-syl-text { width: 100%; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; line-height: 1.55; }
.ep-syl-links .btn { margin-left: auto; }
.qb-show-sm { display: none; }
@media (max-width: 640px) {
  .qb-table .qb-hide-sm { display: none; }
  .qb-show-sm { display: block; margin-top: 4px; }
  .qb-q { max-width: none; }
  .qb-filters select, .qb-filters input { max-width: 100%; flex: 1 1 140px; }
}
/* v3.18.0 question bank pager */
.qb-pager { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; margin: 4px 0 12px; font-size: 13px; }
.qb-pager + .qb-pager, .data-table + .qb-pager, .table-scroll + .qb-pager { margin-top: 12px; }
.qb-pager-search { display: inline-flex; gap: 6px; align-items: center; }
.qb-pager-search input { width: 220px; max-width: 60vw; padding: 6px 10px; font-size: 13px; }
.qb-pager-info { color: var(--muted); }
.qb-pager-per { color: var(--muted); }
.qb-pager-per a, .qb-pager-per b { margin: 0 2px; }
.qb-pager-pages { display: inline-flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-left: auto; }
@media (max-width: 640px) { .qb-pager-pages { margin-left: 0; } .qb-pager-search input { width: 160px; } }
/* v3.19.0 duty items */
.du-chip { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 11px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 12%, #fff); border: 1px solid color-mix(in srgb, var(--c) 30%, #fff); margin: 0 4px 3px 0; vertical-align: 1px; white-space: nowrap; }
.du-who { position: relative; }
.du-edit { position: relative; }
.du-edit summary { list-style: none; cursor: pointer; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.du-edit summary::-webkit-details-marker { display: none; }
.du-edit summary:hover, .du-edit[open] summary { color: var(--navy); background: #f1f3f7; }
.du-edit-f { position: absolute; right: 0; top: 26px; z-index: 20; width: 240px; background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 10px; box-shadow: 0 14px 30px -14px rgba(0,0,0,.35); display: grid; gap: 8px; }
.du-edit-f label { display: grid; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.du-edit-b { display: flex; gap: 6px; justify-content: space-between; }
.du-gap { margin: 0 0 6px; font-size: 11.5px; color: #92400e; background: #fef3c7; border-radius: 6px; padding: 3px 7px; }
.du-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.du-toggle a { padding: 5px 10px; font-size: 12.5px; color: var(--text); }
.du-toggle a.on { background: var(--navy); color: #fff; }
.du-grid th small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.du-grid thead th.today { background: var(--gold-light); color: var(--navy); }
.du-grid tbody th { text-align: left; white-space: nowrap; background: #fafbfc; }
.du-grid td { vertical-align: top; font-size: 13px; min-width: 110px; }
.du-grid td div + div { margin-top: 3px; }
.du-short { background: #fffbeb; }
.du-pick { max-height: 220px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; display: grid; gap: 2px; margin-top: 6px; }
.du-pick label { display: flex; align-items: center; gap: 6px; font-weight: 500; font-size: 13.5px; padding: 3px 0; }
.du-pick label[hidden] { display: none; }
.du-pick input { width: auto; margin: 0; }
.du-pick small { color: var(--muted); margin-left: auto; font-size: 11.5px; }
.du-find { margin-bottom: 0; }
.du-order { margin-top: 6px; font-size: 12.5px; display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.du-order span { background: #eef2ff; color: #3730a3; border-radius: 6px; padding: 1px 7px; }
.du-tick { display: flex; align-items: center; gap: 8px; font-weight: 500; font-size: 13.5px; margin-top: 8px; }
.du-tick input { width: auto; margin: 0; }
.du-desc { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; max-width: 360px; }
.du-off td { opacity: .6; }
.du-acts { white-space: nowrap; }
.du-load { height: 8px; background: #eef0f5; border-radius: 4px; overflow: hidden; }
.du-load span { display: block; height: 100%; background: var(--navy); border-radius: 4px; }
.du-up { align-items: flex-start; flex-wrap: wrap; }
.du-up small { display: block; }
.du-swap summary { cursor: pointer; font-size: 12px; color: var(--muted); }
.du-swap form { display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; }
.du-swap input { width: auto; flex: 1 1 140px; }
@media print { .du-grid td, .du-grid th { font-size: 11px; } .du-edit { display: none; } }
.du-rot[hidden], .du-order[hidden] { display: none !important; }
