/* PSC Portal - UTAS Ibri, Preparatory Studies Center */
:root {
  --brand: #29338e; --brand-2: #3a46ad; --brand-ink: #dfe3ff; --accent: #f68921; --accent-2: #e66925;
  --paper: #eef0f6; --sheet: #ffffff; --sheet-2: #f6f7fb; --ink: #1d2340; --ink-2: #444b68; --muted: #646a85;
  --line: #d9dceb; --line-2: #e8eaf3; --focus: #3a46ad;
  --s1: #2f6f9f; --s2: #2c8c74; --s3: #b5762a; --s4: #7a4e9c; --s5: #a2475e; --s6: #4a6b2e;
  --ok: #217a4b; --ok-bg: #e2f3ea; --wait: #946200; --wait-bg: #fbf0d4; --bad: #b93a29; --bad-bg: #fbe5e0;
  --info: #2a5ea8; --info-bg: #e3ecfa; --none: #737a93; --none-bg: #eceef4;
  --r-sm: 5px; --r: 8px; --r-lg: 12px;
  --shadow-card: 0 1px 0 rgba(29,35,64,.08); --shadow-pop: 0 20px 50px -14px rgba(29,35,64,.38);
  --font: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', Tahoma, Roboto, sans-serif;
  --font-cond: 'IBM Plex Sans Condensed', 'Arial Narrow', var(--font);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font: 15px/1.5 var(--font); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--brand-2); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 1.45rem; font-weight: 600; } h2 { font-size: 1.15rem; font-weight: 600; } h3 { font-size: 1rem; font-weight: 600; }
p { margin: .4em 0; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .tiny { font-size: .78rem; }
.hidden { display: none !important; } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.spine { background: var(--brand); color: var(--brand-ink); display: flex; flex-direction: column; padding: 14px 10px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; color: #fff; text-decoration: none; }
.brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; padding: 3px; }
.brand b { font-family: var(--font-cond); font-size: 1.12rem; display: block; line-height: 1.1; }
.brand small { font-size: .72rem; opacity: .8; }
.nav-group { margin-top: 10px; }
.nav-group > span { display: block; font-size: .72rem; font-weight: 600; opacity: .62; padding: 4px 10px; }
.nav a { display: flex; align-items: center; gap: 9px; color: var(--brand-ink); text-decoration: none; padding: 7px 10px; border-radius: var(--r); font-weight: 500; font-size: .93rem; }
.nav a:hover { background: var(--brand-2); }
.nav a.on { background: #fff; color: var(--brand); }
.nav a .ico { width: 18px; text-align: center; opacity: .9; }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; border-radius: 99px; font-size: .72rem; padding: 0 7px; line-height: 1.7; font-weight: 600; }
.spine-foot { margin-top: auto; padding: 12px 10px 4px; font-size: .84rem; border-top: 1px solid var(--brand-2); }
.spine-foot .who { color: #fff; font-weight: 600; }
.spine-foot button { background: none; border: 0; color: var(--brand-ink); padding: 0; cursor: pointer; text-decoration: underline; margin-right: 12px; font-size: .84rem; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 24px; background: var(--paper); position: sticky; top: 0; z-index: 20; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.topbar h1 { margin-right: auto; }
.content { padding: 20px 24px 48px; min-width: 0; }
.menu-btn.btn { display: none; }
.foot { padding: 14px 24px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); margin-top: auto; }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); padding: 7px 13px; border-radius: var(--r); cursor: pointer; font-weight: 500; font-size: .92rem; text-decoration: none; white-space: nowrap; line-height: 1.35; }
.btn:hover { border-color: #aab0c8; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; } .btn.primary:hover { background: var(--brand-2); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #fff; } .btn.accent:hover { background: var(--accent-2); }
.btn.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn.bad { border-color: var(--bad); color: var(--bad); } .btn.bad.solid { background: var(--bad); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; } .btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 4px 9px; font-size: .83rem; } .btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; justify-content: center; }
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; min-width: 0; }
.field > label, .field > .lab { font-size: .84rem; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: .78rem; color: var(--muted); }
.req::after { content: ' *'; color: var(--bad); }
.input, select.input, textarea.input { border: 1px solid var(--line); background: var(--sheet); border-radius: var(--r); padding: 8px 10px; width: 100%; min-width: 0; }
textarea.input { min-height: 84px; resize: vertical; }
.input:focus { outline: 2px solid var(--focus); outline-offset: -1px; border-color: transparent; }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: .9rem; cursor: pointer; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0 14px; }
.tgrid { display: grid; gap: 0 12px; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr)); }
.span2 { grid-column: span 2; } .span-all { grid-column: 1 / -1; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .row.top { align-items: flex-start; }
.spacer { flex: 1; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--sheet); }
.seg button { border: 0; background: none; padding: 6px 12px; cursor: pointer; font-size: .87rem; font-weight: 500; color: var(--ink-2); }
.seg button.on { background: var(--brand); color: #fff; }
.panel { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; min-width: 0; }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs button, .tabs a { border: 0; background: none; padding: 9px 12px; cursor: pointer; font-weight: 500; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; font-size: .93rem; }
.tabs .on { color: var(--ink); border-bottom-color: var(--accent); }
.tabs .n { font-size: .76rem; color: var(--muted); margin-left: 3px; }
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { width: auto; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 1.02rem; margin-bottom: 4px; }

/* ---------- chips: icon + label, never colour alone ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 600; padding: 2px 8px 2px 7px; border-radius: 99px; white-space: nowrap; background: var(--none-bg); color: var(--none); }
.chip i { font-style: normal; font-size: .85em; }
.chip.ok { color: var(--ok); background: var(--ok-bg); } .chip.wait { color: var(--wait); background: var(--wait-bg); }
.chip.bad { color: var(--bad); background: var(--bad-bg); } .chip.info { color: var(--info); background: var(--info-bg); }
.chip.solid-bad { color: #fff; background: var(--bad); } .chip.plain { color: var(--ink-2); background: var(--line-2); }
.chip.unit { color: var(--ink); }

/* ---------- boards (Trello-style) ---------- */
.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding: 14px 2px 16px; }
.list { flex: 0 0 292px; background: #e1e4ef; border-radius: var(--r-lg); display: flex; flex-direction: column; max-height: calc(100vh - 200px); }
.list-tab { position: relative; padding: 12px 14px 10px; border-radius: var(--r-lg) var(--r-lg) 0 0; color: #fff; background: var(--tab, var(--brand)); }
.list-tab .tab-n { position: absolute; top: -12px; left: 14px; background: var(--tab, var(--brand)); font-family: var(--font-cond); font-weight: 700; font-size: .76rem; padding: 2px 10px 6px; border-radius: 6px 6px 0 0; letter-spacing: .03em; }
.list-tab h3 { font-family: var(--font-cond); font-weight: 600; font-size: 1rem; }
.list-tab .meta { font-size: .79rem; opacity: .88; }
.list-body { padding: 10px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; min-height: 60px; }
.list.drop-ok { outline: 2px dashed var(--focus); outline-offset: 2px; } .list.drop-no { opacity: .55; }
.card { background: var(--sheet); border-radius: var(--r); box-shadow: var(--shadow-card); border: 1px solid var(--line-2); padding: 10px 11px 10px 13px; cursor: pointer; text-align: left; width: 100%; position: relative; display: block; color: var(--ink); text-decoration: none; }
.card:hover { border-color: #aab0c8; }
.card.dragover { outline: 2px dashed var(--focus); background: #f1f3fb; }
.card .stripe { position: absolute; left: 0; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--tab, var(--line)); }
.card .labels { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 6px; }
.card .ct { font-family: var(--font-cond); font-weight: 600; font-size: .96rem; line-height: 1.25; }
.card .ct .fn { color: var(--muted); margin-right: 4px; }
.card .sub { font-size: .82rem; color: var(--muted); margin-top: 2px; overflow-wrap: anywhere; }
.card .badges { display: flex; gap: 10px; margin-top: 7px; font-size: .79rem; color: var(--muted); flex-wrap: wrap; align-items: center; }
.card .pick { position: absolute; top: 8px; right: 8px; }
.card[draggable="true"] { cursor: grab; }
.empty-list { font-size: .85rem; color: var(--muted); padding: 10px 4px; text-align: center; }
.progress { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.progress .track { flex: 1; height: 8px; border-radius: 99px; background: var(--line); overflow: hidden; min-width: 90px; }
.progress .fill { height: 100%; background: var(--ok); border-radius: 99px; }
.progress b { font-variant-numeric: tabular-nums; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(29,35,64,.46); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 50; }
.modal { background: var(--sheet-2); border-radius: var(--r-lg); width: 100%; max-width: 880px; box-shadow: var(--shadow-pop); position: relative; }
.modal.narrow { max-width: 540px; } .modal.wide { max-width: 1100px; }
.modal-head { padding: 18px 56px 12px 22px; background: var(--sheet); border-radius: var(--r-lg) var(--r-lg) 0 0; border-bottom: 1px solid var(--line-2); border-top: 6px solid var(--tab, var(--brand)); }
.modal-head .crumb { font-size: .82rem; color: var(--muted); }
.modal-head h2 { font-family: var(--font-cond); font-size: 1.32rem; margin-top: 2px; }
.modal-body { padding: 18px 22px 22px; }
.modal-x { position: absolute; top: 14px; right: 14px; border: 0; background: var(--line-2); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 1.1rem; line-height: 1; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; margin-top: 14px; }
.card-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 22px; }
.side { overflow-wrap: anywhere; min-width: 0; }
.side h4 { font-size: .78rem; color: var(--muted); font-weight: 600; margin: 0 0 6px; }
.side .btn { width: 100%; justify-content: flex-start; margin-bottom: 6px; }
.block { margin-bottom: 20px; } .block > h3 { margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }

.drop { border: 2px dashed #b8bdd3; border-radius: var(--r); padding: 16px; text-align: center; background: var(--sheet); cursor: pointer; font-size: .92rem; }
.drop.over { border-color: var(--focus); background: #eef0fb; } .drop b { color: var(--brand-2); }
.queue { margin: 8px 0 0; padding: 0; list-style: none; font-size: .86rem; } .queue li { display: flex; gap: 8px; align-items: center; padding: 2px 0; }

.files { display: flex; flex-direction: column; gap: 8px; }
.file { background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px 12px; }
.file.superseded { opacity: .6; }
.file-top { display: flex; align-items: center; gap: 10px; }
.ext { flex: none; width: 36px; height: 42px; border-radius: 4px; background: var(--line-2); display: grid; place-items: center; font-family: var(--font-cond); font-weight: 700; font-size: .68rem; color: var(--ink-2); }
.file-name { font-weight: 500; overflow-wrap: anywhere; } .file-name a { color: var(--ink); text-decoration: none; } .file-name a:hover { text-decoration: underline; }
.file-meta { font-size: .79rem; color: var(--muted); }
.file-actions { margin-left: auto; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.note { font-size: .86rem; background: var(--sheet-2); border-radius: var(--r-sm); padding: 6px 9px; margin-top: 8px; }
.verdict { margin-top: 8px; border-left: 3px solid var(--bad); background: var(--bad-bg); padding: 8px 10px; border-radius: 0 var(--r-sm) var(--r-sm) 0; font-size: .88rem; }
.verdict.approved { border-color: var(--ok); background: var(--ok-bg); }
.verdict .who { font-size: .77rem; color: var(--muted); }
.attach { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; align-items: center; }
.attach a { display: inline-flex; gap: 5px; align-items: center; font-size: .82rem; background: var(--sheet); border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; text-decoration: none; color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
details.history summary { cursor: pointer; font-size: .82rem; color: var(--muted); margin-top: 6px; }

.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: .9rem; }
.feed li:last-child { border-bottom: 0; }
.avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: .74rem; font-weight: 600; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.lg { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar.alt { background: var(--accent); }
.when { font-size: .77rem; color: var(--muted); }
.comment-body { background: var(--sheet); border: 1px solid var(--line-2); border-radius: var(--r); padding: 7px 10px; margin-top: 3px; white-space: pre-wrap; overflow-wrap: anywhere; }
.timeline .item { border-left: 2px solid var(--line); padding: 0 0 12px 14px; position: relative; }
.timeline .item::before { content: ''; position: absolute; left: -6px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand-2); }
.timeline .item.internal::before { background: var(--accent); }

/* ---------- tables, stats, charts ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.t th { text-align: left; font-weight: 600; color: var(--ink-2); font-size: .79rem; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--sheet); position: sticky; top: 0; }
table.t td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--sheet-2); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; text-decoration: none; color: var(--ink); display: block; }
.stat .v { font-size: 1.65rem; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.1; }
.stat .l { font-size: .83rem; color: var(--muted); margin-top: 3px; }
.stat.warn .v { color: var(--bad); }
.dash { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.dash .wide { grid-column: 1 / -1; } .dash .panel + .panel { margin-top: 0; }
.hbar { display: grid; grid-template-columns: minmax(110px, 200px) 1fr 52px; align-items: center; gap: 10px; padding: 4px 0; font-size: .87rem; }
.hbar .lab { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .bar { height: 14px; background: var(--line-2); border-radius: 0 4px 4px 0; }
.hbar .bar > div { height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; min-width: 2px; }
.stack { display: flex; height: 14px; gap: 2px; } .stack > div { height: 100%; } .stack > div:last-child { border-radius: 0 4px 4px 0; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .81rem; color: var(--ink-2); margin-bottom: 8px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; } .legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.cols { display: flex; align-items: flex-end; gap: 6px; height: 150px; padding-top: 10px; border-bottom: 1px solid var(--line); }
.cols .c { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; min-width: 0; }
.cols .c > div { width: 100%; max-width: 34px; background: var(--s1); border-radius: 4px 4px 0 0; min-height: 2px; }
.cols .c span { font-size: .72rem; color: var(--muted); }
.cols-x { display: flex; gap: 6px; font-size: .7rem; color: var(--muted); } .cols-x span { flex: 1; text-align: center; min-width: 0; overflow: hidden; white-space: nowrap; }
.matrix td.cell { padding: 3px; text-align: center; }
.sq { width: 26px; height: 26px; margin: auto; border-radius: 5px; display: grid; place-items: center; font-size: .75rem; font-weight: 700; color: #fff; cursor: pointer; }
.sq.approved { background: var(--ok); } .sq.pending { background: #d9a21b; color: var(--ink); } .sq.rejected { background: var(--bad); } .sq.empty { background: var(--none-bg); color: var(--none); }
.sq.overdue { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--bad); }
.matrix th.v { writing-mode: vertical-rl; transform: rotate(180deg); height: 120px; font-family: var(--font-cond); font-weight: 500; white-space: nowrap; }
.tip { position: fixed; z-index: 300; background: var(--ink); color: #fff; font-size: .8rem; padding: 6px 9px; border-radius: 6px; pointer-events: none; max-width: 300px; white-space: pre-line; }
.kv { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: .92rem; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; overflow-wrap: anywhere; white-space: pre-wrap; }

/* ---------- dashboard ---------- */
.hello { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.tasks { list-style: none; margin: 0; padding: 0; }
.tasks li a { display: flex; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.tasks li:last-child a { border-bottom: 0; }
.tasks .mod { flex: none; width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; font-size: 1rem; background: var(--line-2); }
.tasks .t { flex: 1; min-width: 0; } .tasks .t b { font-weight: 500; display: block; overflow-wrap: anywhere; }
.modgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.modcard { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 6px; }
.modcard:hover { border-color: #aab0c8; }
.modcard .top { display: flex; align-items: center; gap: 10px; } .modcard .top b { font-weight: 600; }
.modcard .big { font-size: 1.4rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- calendar ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: var(--sheet); border-radius: var(--r); overflow: hidden; }
.cal .dow { font-size: .77rem; font-weight: 600; color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--sheet-2); }
.cal .day { min-height: 108px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 4px 5px; font-size: .78rem; min-width: 0; }
.cal .day.out { background: var(--sheet-2); color: var(--muted); }
.cal .day.today .dn { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 6px; }
.cal .day.holiday { background: #fdf5ea; }
.cal .dn { font-weight: 600; font-size: .8rem; display: inline-block; margin-bottom: 2px; }
.cal .ev { display: block; border-radius: 4px; padding: 1px 5px; margin-bottom: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; border-left: 3px solid var(--evc, var(--brand)); background: var(--evb, var(--line-2)); color: var(--ink); text-decoration: none; }
.cal .hol { font-size: .72rem; color: var(--accent-2); font-weight: 600; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--brand); color: var(--brand-ink); padding: 44px; display: flex; flex-direction: column; gap: 26px; justify-content: space-between; position: relative; overflow: hidden; }
.login-art::after { content: ''; position: absolute; right: -90px; bottom: -90px; width: 300px; height: 300px; border-radius: 50%; background: var(--accent); opacity: .9; }
.login-art .logo { background: #fff; border-radius: 12px; padding: 10px 14px; width: max-content; }
.login-art .logo img { height: 58px; display: block; }
.login-art h1 { font-family: var(--font-cond); font-size: 2.5rem; color: #fff; font-weight: 700; max-width: 14ch; line-height: 1.05; }
.login-art ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 18px; max-width: 520px; position: relative; z-index: 1; font-size: .93rem; }
.login-art li::before { content: '—'; color: var(--accent); margin-right: 8px; }
.login-form { display: grid; place-items: center; padding: 32px 20px; background: var(--paper); }
.login-form form, .login-form .box { width: 100%; max-width: 370px; }
.login-form h2 { font-size: 1.45rem; margin-bottom: 4px; }
.err { color: var(--bad); font-size: .88rem; margin: 6px 0; min-height: 1.2em; }
.okmsg { color: var(--ok); font-size: .9rem; margin: 6px 0; }
.linkbtn { background: none; border: 0; color: var(--brand-2); cursor: pointer; padding: 0; text-decoration: underline; font-size: .88rem; }

#toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r); font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 400; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; } #toast.error { background: var(--bad); }
.notif-pop { position: absolute; right: 24px; top: 56px; width: 380px; max-width: calc(100vw - 32px); background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-pop); z-index: 40; max-height: 70vh; overflow-y: auto; }
.notif-pop a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: .9rem; }
.notif-pop a.unread { background: #f0f2fc; }
.bell { position: relative; } .bell .dot { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .66rem; display: grid; place-items: center; padding: 0 4px; }

/* ---------- people ---------- */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.person { background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.person-top { display: flex; gap: 12px; align-items: center; } .person-top > .avatar { flex-shrink: 0; }
.person .person-more { border-top: 1px solid var(--line); padding-top: 10px; display: flex; flex-direction: column; gap: 3px; }
.person .info { flex: 1; min-width: 0; font-size: .86rem; overflow-wrap: anywhere; }
.person .info a { overflow-wrap: anywhere; } .person .info b { font-size: .96rem; display: block; }
.unit-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; border: 1px solid rgba(0,0,0,.12); }

/* ---------- scheduler process flow (from the PSC Scheduler) ---------- */
ol.flow { list-style: none; display: flex; padding: 0; margin: 8px 0; }
ol.flow li { flex: 1; text-align: center; position: relative; font-size: .8rem; }
ol.flow li::before { content: ''; position: absolute; top: 8px; left: -50%; width: 100%; height: 2px; background: var(--line); }
ol.flow li:first-child::before { display: none; }
ol.flow .dot { display: block; width: 18px; height: 18px; border-radius: 50%; margin: 0 auto 4px; border: 2px solid var(--line); background: #fff; position: relative; }
ol.flow li.done .dot { background: var(--brand); border-color: var(--brand); } ol.flow li.sidestep .dot { background: var(--accent); border-color: var(--accent); } ol.flow li.bad .dot { background: var(--bad); border-color: var(--bad); }
ol.flow small { display: block; color: var(--muted); }

/* ---------- lesson planner: pastel paper blocks from the original botanical template ---------- */
.lp-block { border: 1px solid #d9d1c2; border-radius: 10px; padding: 22px 16px 10px; margin: 22px 0 0; position: relative; }
.lp-block > h3 { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 3px 16px; background: #ddd2c8; clip-path: polygon(5% 12%, 95% 0, 100% 85%, 4% 100%, 0 25%); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; margin: 0; }
.lp-0 { background: #f4edf6; } .lp-1 { background: #fff0e7; } .lp-2 { background: #f9f5e7; } .lp-3 { background: #eef1fb; } .lp-4 { background: #fff0e7; } .lp-5 { background: #eef1fb; } .lp-seq { background: #f5edf7; }
.lp-block .input { background: rgba(255,255,255,.6); }

/* ---------- print ---------- */
.print-only { display: none; }
@media print {
  body { background: #fff; }
  .spine, .topbar, .no-print, .toolbar, .tabs, #toast, .foot, .modal-x, .modal-actions { display: none !important; }
  .shell { display: block; } .content { padding: 0; } .panel { border: 0; padding: 0; }
  .print-only { display: block; }
  .overlay { position: static; background: none; padding: 0; display: block; } .modal { box-shadow: none; max-width: none; }
  #app.has-print-modal { display: none; }
  a { color: #000; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .spine { position: fixed; z-index: 60; left: 0; top: 0; width: 262px; transform: translateX(-100%); transition: transform .2s; }
  .spine.open { transform: none; box-shadow: var(--shadow-pop); }
  .menu-btn.btn { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .card-grid, .dash { grid-template-columns: 1fr; }
  .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } .tgrid { grid-template-columns: 1fr 1fr; } .span2 { grid-column: auto; }
  .login { grid-template-columns: 1fr; } .login-art { padding: 26px 20px; } .login-art ul, .login-art::after { display: none; } .login-art h1 { font-size: 1.8rem; }
  .list { flex-basis: 268px; }
  .overlay { padding: 10px 6px; }
  .kv { grid-template-columns: 1fr; } .kv dt { margin-top: 6px; }
  .cal .day { min-height: 70px; } .cal .ev { font-size: .68rem; }
}