
:root {
  color-scheme: dark;
  --bg: #0a0d11;
  --panel: #10151b;
  --panel-2: #141b22;
  --panel-3: #19222b;
  --border: #26313c;
  --border-soft: #1e2832;
  --text: #edf3f8;
  --muted: #8e9baa;
  --subtle: #5e6d7d;
  --cyan: #42c8f5;
  --cyan-soft: rgba(66, 200, 245, .13);
  --green: #48d6a2;
  --amber: #f6b84d;
  --red: #ff7188;
  --purple: #9277ff;
  --shadow: 0 18px 60px rgba(0,0,0,.28);
  font-family: Manrope, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--text); }
body { font-size: 13px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.topbar { height: 72px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 32px; padding: 0 26px; background: rgba(15,20,26,.96); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(16px); }
.brand { display: flex; align-items: center; gap: 11px; min-width: 245px; }
.brand-mark { width: 30px; height: 30px; display: grid; grid-template-columns: repeat(2,1fr); grid-template-rows: repeat(2,1fr); gap: 3px; padding: 3px; transform: rotate(-3deg); }
.brand-mark span { display: block; border: 2px solid var(--cyan); border-radius: 3px; }
.brand-mark span:nth-child(2) { background: var(--cyan); }
.brand-mark span:nth-child(3) { background: var(--cyan); }
.brand-mark span:nth-child(4) { border-color: #8fe6ff; }
.brand-copy strong { font-size: 16px; letter-spacing: -.65px; font-weight: 800; }
.brand-accent { color: var(--cyan); }
.brand-copy small { display: block; color: var(--subtle); font-size: 8px; letter-spacing: 1.65px; margin-top: 3px; font-weight: 800; }
.topnav { display: flex; align-items: center; gap: 7px; align-self: stretch; }
.nav-link { border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 700; padding: 0 15px; display: flex; align-items: center; gap: 9px; height: 42px; margin: auto 0; }
.nav-link:hover { background: #182029; color: var(--text); }
.nav-link.active { color: var(--text); background: #202a34; box-shadow: inset 0 0 0 1px #2b3946; }
.nav-icon { font-size: 15px; color: var(--cyan); }
.nav-count { font: 10px "DM Mono", monospace; background: #273440; color: #b9c7d5; border-radius: 5px; padding: 3px 5px; min-width: 20px; text-align: center; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.semester-label { color: #9eafbd; font-size: 10px; letter-spacing: .6px; font-weight: 800; display: flex; gap: 8px; align-items: center; white-space: nowrap; }
.live-dot, .footer-pulse { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: var(--green); box-shadow: 0 0 12px rgba(72,214,162,.55); }
.btn { border: 1px solid transparent; border-radius: 8px; padding: 10px 14px; font-weight: 800; transition: transform .14s, background .14s, border-color .14s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--cyan); color: #071018; box-shadow: 0 8px 24px rgba(66,200,245,.12); }
.btn-primary:hover { background: #74dcff; }
.btn-subtle { background: #172029; color: #c5d3df; border-color: #2b3742; }
.btn-subtle:hover { border-color: #475866; background: #202b36; }
.btn-danger { background: rgba(255,113,136,.1); color: #ff9bad; border-color: rgba(255,113,136,.24); }
.btn-small { padding: 8px 11px; font-size: 11px; }
.btn-large { padding: 13px 17px; }
.btn-ghost { border: 0; background: transparent; color: var(--muted); padding: 6px 8px; border-radius: 6px; }
.btn-ghost:hover { background: #1d2731; color: var(--text); }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: #151c23; color: #afbdca; font-size: 16px; }
.icon-button:hover { background: #202b35; color: var(--cyan); }
.main-view { flex: 1; padding: 24px 26px 34px; width: 100%; max-width: 1800px; margin: 0 auto; }
.footerbar { min-height: 38px; border-top: 1px solid var(--border-soft); padding: 0 26px; display: flex; align-items: center; justify-content: space-between; color: #728292; font-size: 10px; gap: 10px; background: #0d1116; }
.footerbar > div:first-child { display:flex; align-items:center; gap:8px; }
.footer-right { font: 9px "DM Mono", monospace; letter-spacing: .7px; display:flex; gap: 9px; }
.footer-sep { color: #3b4a57; }
.page-heading { display:flex; justify-content:space-between; align-items:flex-end; gap:24px; margin: 1px 0 20px; }
.eyebrow { color: var(--cyan); text-transform: uppercase; letter-spacing: 1.7px; font: 10px "DM Mono", monospace; font-weight: 500; margin-bottom: 9px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(25px, 2.4vw, 34px); line-height: 1.1; letter-spacing: -1.3px; margin-bottom: 8px; }
h2 { font-size: 16px; letter-spacing: -.3px; margin-bottom: 7px; }
h3 { font-size: 13px; margin-bottom: 6px; }
.subtitle { color: var(--muted); line-height: 1.65; margin: 0; max-width: 760px; font-size: 12px; }
.heading-actions { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.metrics-row { display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.metric-card { border:1px solid var(--border); border-radius:12px; background: linear-gradient(145deg,#141b22,#10151b); padding:15px 17px; min-height:94px; position:relative; overflow:hidden; }
.metric-card:after { content:""; position:absolute; right:-15px; top:-35px; width:80px; height:80px; border:1px solid rgba(66,200,245,.12); border-radius:50%; box-shadow:0 0 0 12px rgba(66,200,245,.025),0 0 0 25px rgba(66,200,245,.018); }
.metric-label { text-transform:uppercase; letter-spacing:1px; font-size:9px; color:var(--muted); font-weight:800; }
.metric-value { font: 700 28px "DM Mono",monospace; letter-spacing:-1.3px; margin-top:10px; }
.metric-note { color:var(--subtle); font-size:10px; margin-top:3px; }
.workspace { display:grid; grid-template-columns: minmax(300px, .84fr) minmax(0, 1.7fr); gap:16px; align-items:start; }
.panel { border:1px solid var(--border); background:var(--panel); border-radius:12px; overflow:hidden; min-width:0; }
.panel-head { padding:15px 17px; border-bottom:1px solid var(--border-soft); display:flex; align-items:center; justify-content:space-between; gap:10px; }
.panel-head-title { display:flex; align-items:center; gap:10px; min-width:0; }
.panel-head-title h2 { margin:0; }
.panel-head p { margin:4px 0 0; color:var(--muted); font-size:10px; }
.panel-body { padding:15px; }
.section-kicker { font: 10px "DM Mono",monospace; color:var(--subtle); letter-spacing:1px; text-transform:uppercase; }
.pill { display:inline-flex; align-items:center; gap:5px; padding:4px 7px; border:1px solid #293743; border-radius:6px; background:#18222b; color:#b4c7d5; font-size:10px; font-weight:800; white-space:nowrap; }
.pill.cyan { color:#86e5ff; border-color:rgba(66,200,245,.25); background:rgba(66,200,245,.09); }
.pill.green { color:#76e9bd; border-color:rgba(72,214,162,.2); background:rgba(72,214,162,.08); }
.pill.amber { color:#ffd68a; border-color:rgba(246,184,77,.2); background:rgba(246,184,77,.08); }
.pill.red { color:#ff9bad; border-color:rgba(255,113,136,.2); background:rgba(255,113,136,.08); }
.input, .select, .textarea { width:100%; background:#0c1116; color:var(--text); border:1px solid #2a3540; border-radius:7px; padding:10px 11px; min-height:38px; outline:none; }
.input::placeholder, .textarea::placeholder { color:#5e6d7b; }
.input:focus, .select:focus, .textarea:focus { border-color:var(--cyan); box-shadow:0 0 0 3px rgba(66,200,245,.08); }
.label { display:block; font-size:10px; font-weight:800; color:#aebdca; margin:0 0 6px; letter-spacing:.25px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.form-field { min-width:0; }
.form-field.full { grid-column:1 / -1; }
.helper { color:var(--subtle); font-size:10px; line-height:1.5; margin-top:5px; }
.course-list { display:flex; flex-direction:column; gap:10px; }
.course-card { border:1px solid #263440; border-radius:10px; background:#121a21; overflow:hidden; }
.course-card.expanded { border-color:#345366; }
.course-card-header { display:flex; align-items:center; gap:10px; padding:12px; cursor:pointer; }
.course-code { flex:none; min-width:56px; padding:7px 6px; border-radius:7px; background:#1b2b35; color:var(--cyan); text-align:center; font:700 10px "DM Mono",monospace; border:1px solid #2e4654; }
.course-title-wrap { min-width:0; flex:1; }
.course-title { font-size:11px; font-weight:800; color:#e4edf5; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.course-meta { font-size:10px; color:var(--muted); margin-top:4px; }
.course-twist { color:var(--subtle); font-size:16px; padding:0 4px; }
.course-options { padding:0 10px 10px; }
.course-options-top { padding:2px 3px 9px; display:flex; justify-content:space-between; align-items:center; gap:8px; }
.faculty-row { border:1px solid #293640; background:#0f151b; border-radius:8px; padding:9px; margin-top:6px; display:grid; grid-template-columns:19px 24px minmax(0,1fr) auto; align-items:center; gap:7px; }
.faculty-row.dragging { opacity:.45; border-color:var(--cyan); }
.drag-handle { color:#617585; cursor:grab; font-size:14px; user-select:none; }
.rank-badge { width:22px; height:22px; border-radius:6px; display:grid; place-items:center; color:#061018; background:#61d6fa; font:800 10px "DM Mono",monospace; }
.faculty-row:nth-of-type(3) .rank-badge { background:#9b8bff; }
.faculty-main { min-width:0; }
.faculty-name { color:#dce7ee; font-size:11px; font-weight:800; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.faculty-meta { color:var(--muted); font-size:9px; margin-top:4px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.row-actions { display:flex; align-items:center; gap:2px; }
.tiny-action { width:25px; height:25px; display:grid; place-items:center; border:0; background:transparent; color:#768897; border-radius:5px; font-size:12px; }
.tiny-action:hover { background:#25313b; color:var(--text); }
.tiny-action.remove:hover { color:var(--red); }
.empty-state { border:1px dashed #344452; border-radius:10px; padding:26px 18px; text-align:center; color:var(--muted); background:rgba(21,30,38,.45); }
.empty-icon { width:42px; height:42px; margin:0 auto 12px; display:grid; place-items:center; border:1px solid #2e414f; background:#16222b; border-radius:12px; color:var(--cyan); font-size:20px; }
.empty-state p { font-size:11px; line-height:1.6; max-width:310px; margin:7px auto 13px; }
.stack { display:flex; flex-direction:column; gap:12px; }
.callout { border:1px solid rgba(66,200,245,.22); background:rgba(66,200,245,.055); border-radius:9px; padding:12px; color:#9fb8c7; font-size:10px; line-height:1.6; }
.callout strong { color:#d9f6ff; }
.callout.warning { border-color:rgba(246,184,77,.25); background:rgba(246,184,77,.055); color:#c8b28c; }
.toolbar { display:flex; gap:7px; flex-wrap:wrap; align-items:center; }
.workspace-right { display:flex; flex-direction:column; gap:15px; min-width:0; }
.timtable-shell { overflow:auto; padding:10px; }
.timetable { min-width:1250px; }
.tt-head, .tt-row { display:grid; grid-template-columns:67px repeat(6,minmax(53px,1fr)) 23px repeat(6,minmax(53px,1fr)) minmax(53px,1fr); gap:3px; }
.tt-head { margin-bottom:5px; }
.tt-time { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; text-align:center; color:#7f91a1; font:8px "DM Mono",monospace; line-height:1.3; padding:7px 1px; border-bottom:1px solid #26343e; white-space:nowrap; }
.tt-time span:first-child { color:#98a8b6; }
.tt-time span:last-child { color:#52cbe9; }
.tt-time.tt-lunch { writing-mode:vertical-rl; transform:rotate(180deg); color:#d0b777; background:rgba(246,184,77,.07); border-radius:5px; letter-spacing:1px; }
.tt-day { color:#9eafbd; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:4px; font:800 10px "DM Mono",monospace; border:1px solid #293640; background:#141d25; border-radius:5px; padding:5px; min-height:55px; }
.tt-day small { color:#6f8798; font:8px "DM Mono",monospace; }
.tt-day.lane-theory { border-left:2px solid var(--cyan); }
.tt-day.lane-lab { border-left:2px solid var(--green); }
.tt-corner { color:#748899; font-size:8px; }
.tt-cell { border:1px solid #202c35; background:#0d1318; border-radius:5px; min-width:0; min-height:55px; overflow:hidden; }
.tt-lunch-cell { background:rgba(246,184,77,.035); border-color:#302b20; }
.slot-picker { margin-top:16px; padding:14px; border:1px solid #293a45; background:#0c1217; border-radius:10px; }
.slot-picker-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:14px; }
.slot-picker-head strong { font-size:12px; }
.slot-picker-head p, .slot-picker-section .helper { margin:5px 0 0; }
.slot-picker-section { padding-top:12px; margin-top:12px; border-top:1px solid #202e38; }
.slot-picker-section h4 { margin:0 0 9px; color:#8ea5b5; font:700 9px "DM Mono",monospace; letter-spacing:1px; }
.slot-chip-grid { display:flex; flex-wrap:wrap; gap:6px; }
.slot-chip { border:1px solid #2c3b47; background:#131c23; color:#9cb2c2; border-radius:6px; padding:7px 9px; min-height:31px; font:10px "DM Mono",monospace; transition:background .12s,border-color .12s,color .12s; }
.slot-chip:hover { border-color:var(--cyan); color:#e5faff; }
.slot-chip.selected { color:#05151d; border-color:var(--cyan); background:var(--cyan); box-shadow:0 0 0 1px rgba(66,200,245,.12); }
.lab-token-details { margin-top:12px; border-top:1px dashed #293842; padding-top:10px; }
.lab-token-details summary { cursor:pointer; color:#91a7b7; font-size:10px; margin-bottom:10px; }
.form-submit-proxy { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
.tt-event { border:1px solid rgba(66,200,245,.3); border-radius:5px; background:linear-gradient(145deg,rgba(66,200,245,.22),rgba(66,200,245,.09)); color:#c8f5ff; padding:6px; min-height:55px; overflow:hidden; font-size:9px; display:flex; flex-direction:column; justify-content:center; gap:4px; }
.tt-event.purple { background:linear-gradient(145deg,rgba(146,119,255,.25),rgba(146,119,255,.08)); border-color:rgba(146,119,255,.35); color:#e2dbff; }
.tt-event.amber { background:linear-gradient(145deg,rgba(246,184,77,.2),rgba(246,184,77,.07)); border-color:rgba(246,184,77,.32); color:#ffe1aa; }
.tt-event.green { background:linear-gradient(145deg,rgba(72,214,162,.2),rgba(72,214,162,.07)); border-color:rgba(72,214,162,.3); color:#b8ffe3; }
.tt-event strong { font-size:9px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tt-event span { font:8px "DM Mono",monospace; opacity:.85; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.tt-empty { color:#536473; font-size:10px; text-align:center; padding:24px 8px; }
.results-layout { display:grid; grid-template-columns:270px minmax(0,1fr); gap:16px; align-items:start; }
.result-sidebar { border:1px solid var(--border); background:#10161c; border-radius:12px; overflow:hidden; position:sticky; top:90px; }
.result-sidebar-head { padding:16px; border-bottom:1px solid var(--border-soft); }
.result-sidebar-head h2 { margin-bottom:4px; }
.result-sidebar-head p { margin:0; font-size:10px; color:var(--muted); }
.result-list { max-height:calc(100vh - 290px); overflow:auto; padding:8px; }
.result-item { width:100%; display:flex; align-items:center; gap:10px; padding:11px 9px; margin:2px 0; border:1px solid transparent; background:transparent; border-radius:8px; color:var(--text); text-align:left; }
.result-item:hover { background:#1a252e; }
.result-item.active { background:#192833; border-color:#2e5869; }
.result-number { width:27px; height:29px; display:grid; place-items:center; background:#1c2730; border-radius:6px; font:700 10px "DM Mono",monospace; color:#99adbd; }
.result-item.active .result-number { background:var(--cyan); color:#061018; }
.result-info { flex:1; min-width:0; }
.result-info strong { display:block; font-size:11px; }
.result-info small { display:block; font-size:9px; color:var(--muted); margin-top:4px; }
.result-score { font:700 12px "DM Mono",monospace; color:var(--green); }
.result-detail { min-width:0; }
.score-card { display:flex; align-items:center; justify-content:space-between; gap:20px; border:1px solid #2a3a45; background:linear-gradient(110deg,#15232b,#11171d); border-radius:12px; padding:18px 20px; margin-bottom:14px; }
.score-left { display:flex; align-items:center; gap:15px; }
.score-ring { --score:0; width:68px; height:68px; flex:none; border-radius:50%; display:grid; place-items:center; background:conic-gradient(var(--green) calc(var(--score)*1%), #25333c 0); position:relative; }
.score-ring:before { content:""; width:54px; height:54px; border-radius:50%; background:#131c22; position:absolute; }
.score-ring span { position:relative; z-index:1; font:700 16px "DM Mono",monospace; color:#b4ffdf; }
.score-explainer { color:var(--muted); font-size:10px; line-height:1.6; margin:0; max-width:450px; }
.result-actions { display:flex; gap:7px; flex-wrap:wrap; }
.admin-tabs { display:flex; gap:6px; flex-wrap:wrap; border-bottom:1px solid var(--border); margin-bottom:16px; padding-bottom:12px; }
.admin-tab { color:var(--muted); background:transparent; border:1px solid transparent; border-radius:7px; padding:9px 12px; font-weight:800; font-size:11px; }
.admin-tab.active { color:var(--cyan); border-color:#2b5263; background:rgba(66,200,245,.08); }
.table-wrap { overflow:auto; width:100%; }
.data-table { width:100%; border-collapse:collapse; font-size:11px; min-width:700px; }
.data-table th { text-align:left; color:#8293a2; font:9px "DM Mono",monospace; text-transform:uppercase; letter-spacing:.7px; padding:11px 12px; background:#121a21; border-bottom:1px solid var(--border); white-space:nowrap; }
.data-table td { padding:11px 12px; border-bottom:1px solid #202b34; color:#cbd7e1; vertical-align:middle; }
.data-table tr:hover td { background:rgba(255,255,255,.015); }
.data-table .muted-cell { color:var(--muted); }
.log-time { font:9px "DM Mono",monospace; color:#8ea0ae; white-space:nowrap; }
.log-type { font:9px "DM Mono",monospace; color:#84ddff; }
.admin-grid { display:grid; grid-template-columns:minmax(0,1.3fr) minmax(280px,.7fr); gap:15px; align-items:start; }
.bar-list { display:flex; flex-direction:column; gap:13px; }
.bar-row { display:grid; grid-template-columns:130px 1fr 35px; align-items:center; gap:9px; font-size:10px; color:#bac8d3; }
.bar-track { height:7px; background:#202b34; border-radius:4px; overflow:hidden; }
.bar-fill { height:100%; border-radius:4px; background:linear-gradient(90deg,#26a9d9,#66ddff); }
.login-wrap { max-width:490px; margin:70px auto; }
.login-card { border:1px solid var(--border); background:linear-gradient(145deg,#141d25,#0f151a); border-radius:15px; padding:28px; box-shadow:var(--shadow); }
.login-mark { width:48px; height:48px; display:grid; place-items:center; border-radius:14px; border:1px solid rgba(66,200,245,.3); color:var(--cyan); background:rgba(66,200,245,.09); font-size:23px; margin-bottom:22px; }
.login-card .subtitle { margin-bottom:22px; }
.admin-headline { display:flex; gap:18px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.admin-controls { display:flex; gap:8px; align-items:center; }
.info-list { display:flex; flex-direction:column; gap:13px; }
.info-list-row { display:flex; align-items:flex-start; gap:10px; color:#a9bac7; font-size:10px; line-height:1.6; }
.info-dot { width:7px; height:7px; background:var(--cyan); border-radius:2px; margin-top:5px; flex:none; }
.modal-backdrop { position:fixed; inset:0; background:rgba(1,4,7,.75); backdrop-filter:blur(6px); z-index:60; display:grid; place-items:center; padding:18px; }
.modal { width:min(700px,100%); max-height:min(92vh,900px); overflow:auto; border:1px solid #33424e; background:#121920; border-radius:13px; box-shadow:0 28px 100px rgba(0,0,0,.6); }
.modal.wide { width:min(900px,100%); }
.modal-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; padding:18px 20px; border-bottom:1px solid var(--border); }
.modal-head h2 { margin-bottom:5px; }
.modal-head p { color:var(--muted); margin:0; font-size:10px; line-height:1.6; }
.modal-body { padding:20px; }
.modal-foot { border-top:1px solid var(--border); padding:14px 20px; display:flex; justify-content:space-between; gap:10px; flex-wrap:wrap; align-items:center; }
.modal-foot-right { margin-left:auto; display:flex; gap:8px; }
.close-modal { width:30px; height:30px; background:#1d2730; color:#b5c4d0; border:1px solid #2d3b46; border-radius:7px; }
.close-modal:hover { color:white; }
.check-row { display:flex; gap:10px; align-items:flex-start; padding:11px; border:1px solid #2a3944; border-radius:8px; background:#0f151a; margin-bottom:7px; }
.check-row input { accent-color:var(--cyan); margin-top:3px; }
.check-row strong { display:block; font-size:11px; }
.check-row small { display:block; margin-top:5px; color:var(--muted); font-size:10px; line-height:1.5; }
.file-drop { border:1px dashed #3a5060; border-radius:10px; padding:23px; background:#0e151a; text-align:center; }
.file-drop input { max-width:100%; color:var(--muted); }
.toast-root { position:fixed; bottom:50px; right:22px; display:flex; flex-direction:column; gap:8px; z-index:90; width:min(370px,calc(100vw - 30px)); }
.toast { padding:12px 14px; border:1px solid #33444f; border-radius:9px; background:#17222a; box-shadow:var(--shadow); color:#d8e4ed; font-size:11px; line-height:1.5; animation:toast-in .18s ease-out; }
.toast.success { border-color:rgba(72,214,162,.35); }
.toast.error { border-color:rgba(255,113,136,.35); }
.toast.info { border-color:rgba(66,200,245,.35); }
@keyframes toast-in { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }
.loading { color:var(--muted); padding:25px; text-align:center; font-size:11px; }
.footnote { color:#738392; font-size:10px; line-height:1.6; }
.code { font:10px "DM Mono",monospace; color:#a4dff1; }
.hidden { display:none !important; }
@media (max-width:1200px) {
  .topbar { gap:18px; padding:0 18px; }
  .brand { min-width:195px; }
  .semester-label { display:none; }
  .main-view { padding:20px 18px 28px; }
  .workspace { grid-template-columns:minmax(280px,.85fr) minmax(0,1.35fr); }
}
@media (max-width:900px) {
  .topbar { height:auto; min-height:68px; flex-wrap:wrap; gap:10px; padding:10px 14px; }
  .brand { min-width:0; }
  .topnav { order:3; width:100%; height:40px; }
  .nav-link { margin:0; }
  .topbar-actions { margin-left:auto; }
  .footerbar { padding:10px 14px; flex-wrap:wrap; }
  .workspace, .admin-grid { grid-template-columns:1fr; }
  .results-layout { grid-template-columns:1fr; }
  .result-sidebar { position:static; }
  .result-list { max-height:230px; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metrics-row { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .page-heading { align-items:flex-start; flex-direction:column; }
}
@media (max-width:540px) {
  .main-view { padding:16px 10px 23px; }
  .brand-copy strong { font-size:14px; }
  .brand-copy small { font-size:7px; }
  .topbar-actions { gap:6px; }
  #save-local-btn { display:none; }
  .nav-link { padding:0 10px; }
  .metrics-row { gap:8px; }
  .metric-card { padding:12px; min-height:82px; }
  .metric-value { font-size:23px; }
  .form-grid { grid-template-columns:1fr; }
  .form-field.full { grid-column:auto; }
  .score-card { align-items:flex-start; flex-direction:column; }
  .result-list { grid-template-columns:1fr; }
  .footer-right { display:none; }
  .panel-body { padding:11px; }
  .faculty-row { grid-template-columns:16px 22px minmax(0,1fr) auto; gap:5px; padding:7px; }
}



/* Admin catalogue sorting and pagination */
.admin-sort-button { appearance:none; border:0; background:transparent; color:inherit; font:inherit; font-size:inherit; letter-spacing:inherit; text-transform:inherit; cursor:pointer; padding:4px 2px; white-space:nowrap; }
.admin-sort-button:hover { color:var(--cyan, #45d4f2); }
.admin-pagination { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin:10px 0 14px; }
.admin-goto-label { color:var(--muted); font-size:12px; }
.admin-page-input { width:78px; min-width:78px; padding:7px 9px; }
