﻿:root { --ux-ink: #183442; --ux-muted: #526775; --ux-border: #d9e3e7; --ux-accent: #12685d; --ux-surface: #f3f6f5; }
html[data-edu-tone="light"] { --edu-border: #d9e3e7; --edu-surface-soft: #f3f6f5; --edu-shadow-sm: 0 4px 18px #18344208; --edu-shadow-md: 0 8px 28px #18344210; }
html[data-edu-tone="light"] body { background: #f3f6f5; }
html[data-edu-tone="light"] .app-sidebar { background: #122b39; }
html[data-edu-tone="light"] .app-sidebar .sidebar-link { color: #e7f0f3; background: transparent; border-color: transparent; box-shadow: none; }
html[data-edu-tone="light"] .app-sidebar .sidebar-link:hover { background: #ffffff12; }
html[data-edu-tone="light"] .app-sidebar .sidebar-link.active { background: #d9f0e9; color: #123d38; }
html[data-edu-tone="light"] .app-sidebar .sidebar-link :is(span,i) { color: inherit; }
html[data-edu-tone="light"] .app-sidebar .sidebar-group-title, html[data-edu-tone="light"] .app-sidebar .text-sidebar-caption { color: #bed0da; }
html[data-edu-tone="light"] .app-sidebar .sidebar-user { background: #ffffff08; border-color: #ffffff20; color: #f1f7fa; box-shadow: none; }
/* Sidebar common styling & Tone switcher */
.sidebar-tone-bar { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .65rem; border-radius: 10px; margin-bottom: .25rem; transition: background-color .2s ease, border-color .2s ease; }
.sidebar-tone-title { font-size: .78rem; font-weight: 600; display: inline-flex; align-items: center; }
.sidebar-tone-options { display: inline-flex; padding: 2px; border-radius: 8px; gap: 2px; }
.sidebar-tone-btn { border: none; background: transparent; padding: .22rem .55rem; border-radius: 6px; font-size: .74rem; cursor: pointer; display: inline-flex; align-items: center; gap: .25rem; line-height: 1.2; transition: all .15s ease; }
.sidebar-brand { display: flex; align-items: center; gap: .7rem; }
.sidebar-brand .sidebar-brand-image { width: 48px !important; height: 48px !important; object-fit: contain; border-radius: 10px; flex: 0 0 auto; margin: 0; }
.app-sidebar .sidebar-brand :is(h1,h2,h3) { font-size: 1.05rem; color: #f1f7fa; margin: 0; }
.app-sidebar .sidebar-header h4 { color: #f1f7fa; font-size: 1.05rem; margin-top: .7rem; }
.ux-theme-settings > summary { min-height: 44px; padding: .7rem 0; cursor: pointer; }
.ux-theme-settings .theme-switcher-panel { margin: .5rem 0; }
.content-body .command-layout > *, .content-body .table-zone, .content-body .table-zone > * { min-width: 0; }
.content-body .table-zone { grid-template-columns: minmax(0, 1fr); }
.content-body .registrar-table-wrap { max-width: 100%; }
.content-body .command-hero .hero-scoreboard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.content-body .portal-page-shell { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.content-body .portal-page-shell > *, .content-body .portal-panel, .content-body .portal-host { min-width: 0; max-width: 100%; }
@media screen {
    .content-body .opened-subjects-report, .content-body .report-page { min-width: 0; max-width: 100%; }
    .content-body .report-page { grid-template-columns: minmax(0, 1fr); }
    .content-body .report-page > * { min-width: 0; max-width: 100%; }
    .content-body .opened-subjects-report .report-hero { flex-wrap: wrap; }
    .content-body .opened-subjects-report .report-sheet { overflow-x: auto; }
}
.ux-theme-settings { margin: .75rem 1rem; color: #e7f0f3; }
.ux-theme-settings > summary { min-height: 44px; padding: .7rem 0; cursor: pointer; }
.ux-theme-settings .theme-switcher-panel { margin: .5rem 0; }
.app-sidebar .ux-nav-search { color: #e7f0f3; }
.app-sidebar .ux-nav-search input::placeholder { color: #bed0da; }
html[data-edu-tone="light"] .sidebar-group-card { background: #ffffff04; border-color: #ffffff14; box-shadow: none; }
html[data-edu-tone="light"] .sidebar-link.active { background: #d9f0e9; color: #104e47; }

/* Dark Menu Tone (Default) */
html:not([data-sidebar-tone="light"]) .app-sidebar { background: #122b39; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-link { color: #e7f0f3; background: transparent; border-color: transparent; box-shadow: none; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-link:hover { background: #ffffff12; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-link.active,
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-link.is-active { background: #d9f0e9; color: #123d38; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-link :is(span,i) { color: inherit; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-group-title,
html:not([data-sidebar-tone="light"]) .app-sidebar .text-sidebar-caption { color: #bed0da; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-user { background: #ffffff08; border-color: #ffffff20; color: #f1f7fa; box-shadow: none; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-brand :is(h1,h2,h3) { font-size: 1.05rem; color: #f1f7fa; margin: 0; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-header h4 { color: #f1f7fa; font-size: 1.05rem; margin-top: .7rem; }
html:not([data-sidebar-tone="light"]) .app-sidebar .sidebar-group-card { background: #ffffff04; border-color: #ffffff14; box-shadow: none; }
html:not([data-sidebar-tone="light"]) .app-sidebar .ux-theme-settings { margin: .75rem 1rem; color: #e7f0f3; }
html:not([data-sidebar-tone="light"]) .app-sidebar .ux-nav-search { color: #e7f0f3; }
html:not([data-sidebar-tone="light"]) .app-sidebar .ux-nav-search input::placeholder { color: #bed0da; }
html:not([data-sidebar-tone="light"]) .sidebar-tone-bar { background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12); }
html:not([data-sidebar-tone="light"]) .sidebar-tone-title { color: #bed0da; }
html:not([data-sidebar-tone="light"]) .sidebar-tone-options { background: rgba(0, 0, 0, 0.25); }
html:not([data-sidebar-tone="light"]) .sidebar-tone-btn { color: #bed0da; }
html:not([data-sidebar-tone="light"]) .sidebar-tone-btn:hover { color: #ffffff; background: rgba(255, 255, 255, 0.1); }
html:not([data-sidebar-tone="light"]) .sidebar-tone-btn.is-active { background: #12685d; color: #ffffff; font-weight: 600; box-shadow: 0 1px 4px rgba(0,0,0,0.25); }

/* Light Menu Tone */
html[data-sidebar-tone="light"] .app-sidebar { background: #ffffff; border-right: 1px solid #d9e3e7; box-shadow: 2px 0 16px rgba(24, 52, 66, 0.05); color: #183442; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-brand :is(h1,h2,h3) { font-size: 1.05rem; color: #183442; margin: 0; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-header h4 { color: #183442; font-size: 1.05rem; margin-top: .7rem; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-header .text-sidebar-caption { color: #526775; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-brand { border-color: #d9e3e7; background: #f8fafc; }
html[data-sidebar-tone="light"] .app-sidebar .theme-release-badge { background: #edf3f5; border: 1px solid #d0dde2; color: #12685d; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-user { background: #f8fafc; border: 1px solid #d9e3e7; color: #183442; box-shadow: 0 1px 4px rgba(24, 52, 66, 0.04); }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-user .text-sidebar-caption { color: #526775; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-group-card { background: #f8fafc; border: 1px solid #e2e8f0; box-shadow: none; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-group-title { color: #526775; font-weight: 600; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-link { color: #1e3a4b; background: transparent; border-color: transparent; box-shadow: none; font-weight: 500; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-link:hover { background: rgba(18, 104, 93, 0.08); color: #12685d; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-link.active,
html[data-sidebar-tone="light"] .app-sidebar .sidebar-link.is-active { background: #d9f0e9; color: #104e47; font-weight: 600; border-left: 3.5px solid #12685d; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-link :is(span,i) { color: inherit; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-link-danger { color: #c53030; background: transparent; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-link-danger:hover { background: rgba(220, 53, 69, 0.08); color: #9b2c2c; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-logout .btn-outline-light { color: #526775; border-color: #d9e3e7; background: #ffffff; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-logout .btn-outline-light:hover,
html[data-sidebar-tone="light"] .app-sidebar .sidebar-logout .btn-outline-light:focus { background: #e2e8f0; color: #183442; border-color: #cbd5e1; }
html[data-sidebar-tone="light"] .app-sidebar .sidebar-mobile-close { color: #183442; background: #f8fafc; border: 1px solid #d9e3e7; }
html[data-sidebar-tone="light"] .app-sidebar .ux-nav-search { color: #183442; }
html[data-sidebar-tone="light"] .app-sidebar .ux-nav-search input { background: #ffffff; border: 1px solid #d9e3e7; color: #183442; }
html[data-sidebar-tone="light"] .app-sidebar .ux-nav-search input::placeholder { color: #8397a4; }
html[data-sidebar-tone="light"] .app-sidebar .ux-theme-settings { margin: .75rem 1rem; color: #183442; }
html[data-sidebar-tone="light"] .app-sidebar .ux-theme-settings > summary { color: #183442; }
html[data-sidebar-tone="light"] .app-sidebar .theme-switcher-panel { background: #f8fafc; border: 1px solid #d9e3e7; }
html[data-sidebar-tone="light"] .app-sidebar .theme-switcher-title { color: #183442; }
html[data-sidebar-tone="light"] .app-sidebar .theme-switcher-caption { color: #526775; }
html[data-sidebar-tone="light"] .app-sidebar .theme-switcher-count { color: #12685d; }
html[data-sidebar-tone="light"] .app-sidebar .theme-switcher-select { background-color: #ffffff; border-color: #d9e3e7; color: #183442; }
html[data-sidebar-tone="light"] .sidebar-tone-bar { background: #f8fafc; border: 1px solid #d9e3e7; }
html[data-sidebar-tone="light"] .sidebar-tone-title { color: #526775; }
html[data-sidebar-tone="light"] .sidebar-tone-options { background: #edf2f4; }
html[data-sidebar-tone="light"] .sidebar-tone-btn { color: #526775; }
html[data-sidebar-tone="light"] .sidebar-tone-btn:hover { color: #183442; background: rgba(0, 0, 0, 0.05); }
html[data-sidebar-tone="light"] .sidebar-tone-btn.is-active { background: #ffffff; color: #12685d; font-weight: 600; box-shadow: 0 1px 4px rgba(24, 52, 66, 0.1); }
html[data-edu-tone="light"] .content-header { background: #ffffff; border-color: #d9e3e7; box-shadow: 0 2px 10px #18344204; }
html[data-edu-tone="light"] .content-body { background: transparent; }
html[data-edu-tone="light"] .content-body > .card, html[data-edu-tone="light"] .content-body .card { border-color: #d9e3e7; box-shadow: 0 4px 18px #18344206; }
html[data-edu-tone="light"] .table thead th { background: #f3f6f5; color: #183442; }
html[data-edu-tone="light"] .ux-card .btn-primary, html[data-edu-tone="light"] .ux-action-bar .btn-primary { --bs-btn-bg: #12685d; --bs-btn-border-color: #12685d; --bs-btn-hover-bg: #0d5148; --bs-btn-hover-border-color: #0d5148; background: #12685d; border-color: #12685d; color: #fff; }
html[data-edu-tone="dark"] { --ux-border: #526775; --ux-muted: #bdcbd4; --ux-surface: #20323e; }
html[data-edu-tone="dark"] .ux-eyebrow { color: #9cdfce; }
.content-body .form-label { font-weight: 600; }
.content-body :is(h1,h2,h3,h4,th,.btn), .page-title { letter-spacing: normal; text-transform: none; }
.content-body .table td { vertical-align: middle; }
.content-body .btn { white-space: normal; }
.content-body { min-width: 0; }
.ux-page-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin: 0 0 1.5rem; }
.ux-page-heading h1 { font-size: clamp(1.6rem, 3vw, 2rem); margin: .25rem 0 .5rem; font-weight: 700; }
.ux-page-heading p { color: var(--ux-muted); margin: 0; }
.ux-eyebrow { font-size: .85rem; color: var(--ux-accent); font-weight: 600; }
.ux-card { background: var(--bs-body-bg, white); border: 1px solid var(--ux-border); border-radius: 16px; padding: clamp(1rem, 2vw, 1.5rem); margin-bottom: 1.25rem; box-shadow: 0 4px 20px #18344205; }
.ux-card h2 { font-size: 1.15rem; font-weight: 600; margin-bottom: 1rem; }
.ux-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.5rem; }
.ux-form-grid > * { min-width: 0; }
.ux-step { display: inline-grid; place-items: center; width: 2rem; height: 2rem; background: #e1f1ed; color: #12685d; border-radius: 50%; margin-right: .5rem; }
.ux-check { display: flex; align-items: center; gap: .65rem; min-height: 44px; cursor: pointer; }
.ux-check input { width: 1.1rem; height: 1.1rem; flex: 0 0 auto; accent-color: var(--ux-accent); }
.ux-choice-list { max-height: 260px; overflow: auto; border: 1px solid var(--ux-border); border-radius: 8px; padding: .5rem .75rem; margin-top: .5rem; }
.ux-target-grade { padding: 1rem; border: 1px solid var(--ux-border); border-radius: 10px; }
.ux-target-grade legend { font-size: 1rem; font-weight: 600; }
.ux-action-bar { display: flex; flex-wrap: wrap; gap: .75rem; position: sticky; bottom: 0; background: var(--bs-body-bg, white); border: 1px solid var(--ux-border); padding: 1rem; border-radius: 12px; z-index: 10; box-shadow: 0 -4px 20px #18344208; }
.ux-empty { padding: 2rem; text-align: center; background: var(--ux-surface); border-radius: 10px; }
.ux-empty h3 { font-size: 1.15rem; }
.ux-card .validation-summary-valid, .validation-summary-valid { display: none; }
.ux-card .form-control, .ux-card .form-select, .ux-card .btn { min-height: 44px; }
.ux-card .table td { padding-top: 1rem; padding-bottom: 1rem; }
.ux-card summary { cursor: pointer; font-weight: 600; min-height: 28px; }
.ux-review { width: min(560px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); border: 0; border-radius: 18px; padding: 1.5rem; color: var(--bs-body-color, var(--ux-ink)); background: var(--bs-body-bg, white); box-shadow: 0 20px 90px #122b3940; }
.ux-review::backdrop { background: #122b3980; }
.ux-review h2 { font-size: 1.35rem; }
.ux-review li { margin: .6rem 0; overflow-wrap: anywhere; }
.ux-review-actions { display: flex; justify-content: flex-end; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }
.ux-skip-link { position: fixed; top: -100px; left: 1rem; z-index: 10000; background: white; color: #122b39; padding: .8rem 1.2rem; border-radius: 8px; }
.ux-skip-link:focus { top: .5rem; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid #218cbd; outline-offset: 3px; }
.ux-nav-search { margin: .75rem 1rem; }
.ux-nav-search input { width: 100%; min-height: 44px; border: 1px solid #ffffff40; border-radius: 10px; background: #ffffff12; color: inherit; padding: .65rem; }
.ux-nav-search input::placeholder { color: inherit; opacity: .8; }
.ux-nav-search small { display: block; margin-top: .5rem; }
.ux-workflow { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.ux-workflow a { text-decoration: none; padding: .55rem .8rem; border: 1px solid var(--ux-border); border-radius: 9px; color: var(--bs-body-color); background: var(--bs-body-bg); }
.ux-workflow a[aria-current="step"] { background: #e1f1ed; color: #104e47; border-color: #84bdb2; font-weight: 600; }
.ux-conflict { border-left: 3px solid #b54d29; padding-left: .75rem; color: #923b20; }
.ux-selection-mobile { display: none; }
.ux-registration-progress { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 1rem; gap: 1rem; list-style: none; background: var(--ux-surface); border: 1px solid var(--ux-border); border-radius: 12px; }
.ux-registration-progress span { display: block; font-size: .875rem; color: var(--ux-muted); margin-top: .4rem; }
[hidden] { display: none !important; }
@media (max-width: 767.98px) {
    .ux-registration-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ux-selection-mobile { display: flex; align-items: center; justify-content: space-between; gap: .5rem; position: sticky; top: .25rem; z-index: 15; padding: .75rem; background: var(--bs-body-bg, white); border: 1px solid var(--ux-border); border-radius: 12px; box-shadow: 0 5px 18px #122b3915; }
    #elective-selection-summary { scroll-margin-top: 5rem; }
    .ux-form-grid { grid-template-columns: 1fr; }
    .ux-page-heading > .btn { width: 100%; }
    .ux-action-bar { padding: .75rem; padding-bottom: max(.75rem, env(safe-area-inset-bottom)); }
    .ux-action-bar .btn { flex: 1 1 150px; }
    .content-body .table-responsive { max-width: 100%; }
    .content-body .form-control, .content-body .form-select { font-size: 16px; }
    .ux-workflow { font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .ux-workflow, .ux-action-bar, .ux-nav-search, .ux-skip-link { display: none !important; } .ux-card { break-inside: avoid; box-shadow: none; } }
