/* =====================================================================
   JSNDPG College — Fees Portal (v8)
   Design: a quiet accounts-office ledger. Two sections, two colours:
   College (teal-green) and Online (indigo). Dues are always amber.
   ===================================================================== */

:root {
  --bg: #eef2f0;
  --surface: #ffffff;
  --surface-2: #f6f8f7;
  --ink: #17242a;
  --ink-2: #33444a;
  --muted: #5d6d72;
  --line: #d8e0dd;
  --line-2: #e7ecea;

  --college: #0e6b5a;
  --college-ink: #0a4d41;
  --college-soft: #e2f1ec;
  --online: #3646a3;
  --online-ink: #27347c;
  --online-soft: #e7eaf8;

  --due: #9a5806;
  --due-soft: #fbefd9;
  --good: #13703f;
  --good-soft: #e1f3e7;
  --bad: #b42318;
  --bad-soft: #fce8e6;

  --side: #17242a;
  --side-ink: #c9d5d2;

  --r-sm: 6px;
  --r: 10px;
  --r-lg: 16px;

  --font: "Hanken Grotesk", "Noto Sans Devanagari", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --shadow-pop: 0 18px 50px rgba(23, 36, 42, .22);
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
.num, td.num, .money { font-variant-numeric: tabular-nums; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--college); }
:focus-visible { outline: 3px solid #6fb7a6; outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }

/* ---------------- Login ---------------- */
.login {
  min-height: 100%;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
}
.login-art {
  background: var(--side);
  color: #fff;
  padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-art h1 { font-size: 44px; line-height: 1.05; letter-spacing: -.02em; margin: 0 0 14px; font-weight: 800; max-width: 12ch; }
.login-art p { color: var(--side-ink); max-width: 44ch; margin: 0; }
.login-rail { display: flex; gap: 6px; margin-top: 40px; }
.login-rail span { flex: 1; height: 42px; border-radius: 6px; background: #24363d; display: grid; place-items: center; font-weight: 700; color: #8aa39d; }
.login-rail span.on { background: var(--college); color: #fff; }
.login-rail span.part { background: repeating-linear-gradient(135deg, #b9781a 0 6px, #9a5806 6px 12px); color: #fff; }
.login-foot { font-size: 13px; color: #8aa39d; }
.login-panel { display: grid; place-items: center; padding: 40px 24px; }
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { margin: 0 0 4px; font-size: 26px; letter-spacing: -.01em; }
.login-box .sub { color: var(--muted); margin: 0 0 24px; }
.role-pick { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-bottom: 18px; }
.role-pick button {
  text-align: left; border: 1.5px solid var(--line); background: var(--surface);
  border-radius: var(--r); padding: 14px; cursor: pointer;
}
.role-pick button strong { display: block; font-size: 15px; }
.role-pick button span { font-size: 13px; color: var(--muted); }
.role-pick button[aria-pressed="true"] { border-color: var(--college); background: var(--college-soft); }
.login-err { color: var(--bad); font-size: 14px; min-height: 20px; margin-top: 8px; }

/* ---------------- Shell ---------------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100%; }
.side {
  background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 20px 12px;
  position: sticky; top: 0; height: 100vh;
}
.brand { padding: 4px 10px 22px; }
.brand strong { display: block; color: #fff; font-size: 17px; letter-spacing: -.01em; }
.brand span { font-size: 12.5px; color: #8aa39d; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 12px; width: 100%;
  background: none; border: 0; color: var(--side-ink); cursor: pointer;
  padding: 10px 12px; border-radius: 8px; font-size: 14.5px; text-align: left;
}
.nav button svg { width: 19px; height: 19px; flex: none; opacity: .85; }
.nav button:hover { background: #22343a; color: #fff; }
.nav button[aria-current="page"] { background: #fff; color: var(--ink); font-weight: 700; }
.nav button .count {
  margin-left: auto; background: var(--due); color: #fff; font-size: 11.5px; font-weight: 700;
  border-radius: 999px; padding: 1px 7px;
}
.nav-sep { height: 1px; background: #2b3e44; margin: 12px 8px; }
.side-foot { margin-top: auto; padding: 12px 10px 0; border-top: 1px solid #2b3e44; font-size: 13px; }
.side-foot .who { color: #fff; font-weight: 700; }
.side-foot button { margin-top: 10px; background: none; border: 1px solid #3a5058; color: var(--side-ink); border-radius: 8px; padding: 7px 12px; cursor: pointer; width: 100%; }
.side-foot button:hover { border-color: #fff; color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 28px; background: var(--bg);
  position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line);
}
.top h2 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.top .spacer { flex: 1; }
.top .clock { color: var(--muted); font-size: 13.5px; }
.global-search { position: relative; width: min(340px, 40vw); }
.global-search input { width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.global-search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search-pop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); max-height: 360px; overflow: auto; z-index: 30;
}
.search-pop button { display: flex; width: 100%; gap: 10px; align-items: center; border: 0; background: none; padding: 10px 14px; text-align: left; cursor: pointer; border-bottom: 1px solid var(--line-2); }
.search-pop button:hover, .search-pop button.hl { background: var(--surface-2); }
.search-pop .empty { padding: 14px; color: var(--muted); font-size: 14px; }
.menu-btn { display: none; }

.view { padding: 24px 28px 60px; max-width: 1320px; width: 100%; }

/* ---------------- Building blocks ---------------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); }
.panel-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-head h3 { margin: 0; font-size: 16.5px; }
.panel-head p { margin: 0; color: var(--muted); font-size: 13.5px; }
.panel-body { padding: 18px 20px; }
.panel + .panel, .grid + .panel, .panel + .grid { margin-top: 18px; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: 1.6fr 1fr; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; justify-content: center;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .12s ease, border-color .12s ease, box-shadow .12s ease, transform .04s ease;
}
.btn:hover { border-color: #b4c2be; background: var(--surface-2); }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--college); border-color: var(--college); color: #fff; }
.btn.primary:hover { background: var(--college-ink); }
.btn.online { background: var(--online); border-color: var(--online); color: #fff; }
.btn.online:hover { background: var(--online-ink); }
.btn.danger { color: var(--bad); border-color: #efc4bf; }
.btn.danger:hover { background: var(--bad-soft); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn.lg { padding: 12px 20px; font-size: 15.5px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.pill.good { background: var(--good-soft); color: var(--good); }
.pill.due { background: var(--due-soft); color: var(--due); }
.pill.bad { background: var(--bad-soft); color: var(--bad); }
.pill.muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill.college { background: var(--college-soft); color: var(--college-ink); }
.pill.online { background: var(--online-soft); color: var(--online-ink); }

.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 13px; border-radius: 7px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 14px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.seg.college button[aria-pressed="true"] { color: var(--college-ink); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filters input[type=search], .filters select, .filters input[type=date] {
  padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.filters input[type=search] { min-width: 230px; flex: 1; max-width: 360px; }

/* Figures on home */
.figs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.fig { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 18px; }
.fig .lab { color: var(--muted); font-size: 13.5px; }
.fig .val { font-size: 28px; font-weight: 800; letter-spacing: -.02em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.fig .note { font-size: 13px; color: var(--muted); margin-top: 2px; }
.fig.due .val { color: var(--due); }
.fig.good .val { color: var(--good); }
.fig.clickable { cursor: pointer; }
.fig.clickable:hover { border-color: #b4c2be; }

.quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 18px 0; }
.quick button {
  display: flex; gap: 14px; align-items: center; text-align: left; cursor: pointer;
  border: 1px solid var(--line); background: var(--surface); border-radius: var(--r-lg); padding: 16px 18px;
}
.quick button:hover { border-color: #b4c2be; }
.quick .ic { width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.quick .ic svg { width: 22px; height: 22px; }
.quick strong { display: block; font-size: 15.5px; }
.quick span { font-size: 13px; color: var(--muted); }
.quick .c1 .ic { background: var(--college); color: #fff; }
.quick .c2 .ic { background: var(--college-soft); color: var(--college-ink); }
.quick .c3 .ic { background: var(--online-soft); color: var(--online-ink); }

/* bars */
.bars { display: flex; align-items: flex-end; gap: 10px; height: 150px; padding-top: 10px; }
.bars .b { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bars .stack { width: 100%; max-width: 46px; display: flex; flex-direction: column; justify-content: flex-end; border-radius: 6px 6px 2px 2px; overflow: hidden; min-height: 2px; background: var(--line-2); }
.bars .stack i { display: block; }
.bars .stack .c { background: var(--college); }
.bars .stack .o { background: var(--online); }
.bars small { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: 13px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr.click { cursor: pointer; }
table.t tbody tr.click:hover td { background: #f8fbfa; }
table.t .r, table.t th.r { text-align: right; }
table.t tfoot td { font-weight: 800; background: var(--surface-2); border-top: 1px solid var(--line); }
.who-cell strong { display: block; }
.who-cell span { font-size: 12.5px; color: var(--muted); }
.due-amt { color: var(--due); font-weight: 700; }
.zero { color: var(--muted); }
.empty-state { padding: 42px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); font-size: 16px; margin-bottom: 4px; }
.empty-state .btn { margin-top: 14px; }

/* Semester rail — the signature element */
.rail { display: flex; gap: 4px; }
.rail .s {
  width: 26px; height: 24px; border-radius: 5px; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: var(--line-2); color: #98a7a3; position: relative;
}
.rail .s.paid { background: var(--college); color: #fff; }
.rail .s.part { background: repeating-linear-gradient(135deg, #c98a2a 0 5px, var(--due) 5px 10px); color: #fff; }
.rail .s.due { background: var(--due-soft); color: var(--due); box-shadow: inset 0 0 0 1.5px var(--due); }
.rail .s.cur { outline: 2px solid var(--ink); outline-offset: 1px; }
.rail .s.rep::after { content: ""; position: absolute; top: -3px; right: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--bad); border: 1.5px solid #fff; }
.rail.big { gap: 8px; }
.rail.big .s { width: auto; flex: 1; height: 54px; border-radius: 9px; font-size: 13px; display: flex; flex-direction: column; gap: 0; line-height: 1.15; }
.rail.big .s b { font-size: 16px; }
.rail.big .s small { font-weight: 600; font-size: 11.5px; opacity: .95; }
.rail-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.rail-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; }

/* Forms */
.form { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 16px; }
.form .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 5px; color: var(--ink-2); }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--college); outline: none; box-shadow: 0 0 0 3px var(--college-soft); }
.field textarea { min-height: 70px; resize: vertical; }
.field .req { color: var(--bad); }
.section-title { grid-column: 1 / -1; font-weight: 700; font-size: 14px; margin-top: 6px; padding-top: 12px; border-top: 1px dashed var(--line); color: var(--ink-2); }
.section-title:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14.5px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--college); }

.sum-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.sum-row { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.sum-row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-weight: 800; font-size: 18px; }

/* Collect fee: dues list */
.dues-list { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.due-line { display: grid; grid-template-columns: 1fr auto 130px; gap: 12px; align-items: center; padding: 10px 14px; border-bottom: 1px solid var(--line-2); }
.due-line:last-child { border-bottom: 0; }
.due-line .l strong { display: block; font-size: 14.5px; }
.due-line .l span { font-size: 12.5px; color: var(--muted); }
.due-line input { width: 100%; padding: 7px 10px; border: 1px solid var(--line); border-radius: 7px; text-align: right; font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 6px 13px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  transition: background .12s ease, border-color .12s ease, color .12s ease;
}
.chip svg { width: 15px; height: 15px; }
.chip:hover { border-color: #b4c2be; background: var(--surface-2); }
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip[aria-pressed="true"]:hover { background: var(--ink); }

/* Promotion choices */
.choices { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice {
  border: 1.5px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface); cursor: pointer; text-align: left;
}
.choice strong { display: block; font-size: 16px; }
.choice span { font-size: 13px; color: var(--muted); display: block; }
.choice em { font-style: normal; font-size: 13px; color: var(--ink-2); display: block; margin-top: 6px; }
.choice[aria-pressed="true"].pass { border-color: var(--good); background: var(--good-soft); }
.choice[aria-pressed="true"].back { border-color: var(--due); background: var(--due-soft); }
.choice[aria-pressed="true"].fail { border-color: var(--bad); background: var(--bad-soft); }
.notice { border-radius: var(--r); padding: 11px 14px; font-size: 14px; }
.notice.warn { background: var(--due-soft); color: #6e3f04; border: 1px solid #f0d29e; }
.notice.info { background: var(--college-soft); color: var(--college-ink); border: 1px solid #bfe0d6; }
.notice.bad { background: var(--bad-soft); color: #7a1a11; border: 1px solid #f1c3bd; }

/* Modal */
.overlay { position: fixed; inset: 0; background: rgba(15, 26, 30, .45); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: var(--r-lg); width: 100%; max-width: 640px; box-shadow: var(--shadow-pop); animation: pop .16s ease-out; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { margin: 0; font-size: 18px; flex: 1; }
.modal-head .tag { margin-right: 4px; }
.modal-body { padding: 20px 22px; display: grid; gap: 16px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2); border-radius: 0 0 var(--r-lg) var(--r-lg); }
.x-btn { border: 0; background: none; cursor: pointer; padding: 6px; border-radius: 6px; color: var(--muted); }
.x-btn:hover { background: var(--surface-2); color: var(--ink); }
.x-btn svg { width: 20px; height: 20px; display: block; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* Drawer (student profile) */
.drawer-bg { position: fixed; inset: 0; background: rgba(15, 26, 30, .35); z-index: 40; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 100vw); background: var(--bg); z-index: 41;
  display: flex; flex-direction: column; box-shadow: var(--shadow-pop); animation: slide .2s ease-out;
}
@keyframes slide { from { transform: translateX(30px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-head { background: var(--surface); padding: 18px 22px; border-bottom: 1px solid var(--line); }
.drawer-head .row1 { display: flex; gap: 12px; align-items: flex-start; }
.drawer-head h3 { margin: 0; font-size: 21px; letter-spacing: -.01em; }
.drawer-head .meta { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.drawer-body { overflow-y: auto; padding: 18px 22px 40px; display: grid; gap: 16px; align-content: start; }
.kv { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; }
.kv div span { display: block; font-size: 12.5px; color: var(--muted); }
.kv div b { font-weight: 600; word-break: break-word; }
.avatar { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 17px; flex: none; }
.avatar.college { background: var(--college-soft); color: var(--college-ink); }
.avatar.online { background: var(--online-soft); color: var(--online-ink); }

.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 14px 1fr; gap: 12px; padding-bottom: 14px; position: relative; }
.tl::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .dot { width: 14px; height: 14px; border-radius: 50%; margin-top: 4px; background: var(--line); }
.tl .dot.pass { background: var(--good); }
.tl .dot.back { background: var(--due); }
.tl .dot.fail { background: var(--bad); }
.tl .dot.admit { background: var(--college); }
.tl strong { display: block; font-size: 14.5px; }
.tl span { font-size: 13px; color: var(--muted); }

/* Toasts */
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 80; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 14px; box-shadow: var(--shadow-pop); max-width: 380px; animation: pop .16s ease-out; }
.toast.good { background: var(--good); }
.toast.bad { background: var(--bad); }

/* Receipt */
.receipt { border: 1px solid var(--line); border-radius: var(--r); padding: 26px 28px; background: #fff; font-size: 14px; }
.rc-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.rc-head h4 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.rc-head .sub { color: var(--muted); font-size: 13px; }
.rc-head .no { text-align: right; }
.rc-head .no b { font-size: 16px; display: block; }
.rc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rc-meta span { color: var(--muted); }
.rc-items { width: 100%; border-collapse: collapse; margin: 12px 0; }
.rc-items th { text-align: left; font-size: 12.5px; color: var(--muted); border-bottom: 1px solid var(--line); padding: 6px 0; font-weight: 600; }
.rc-items td { padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.rc-items .r { text-align: right; font-variant-numeric: tabular-nums; }
.rc-total { display: flex; justify-content: space-between; font-size: 19px; font-weight: 800; padding: 8px 0; border-top: 2px solid var(--ink); }
.rc-foot { display: flex; justify-content: space-between; gap: 20px; margin-top: 26px; font-size: 13px; color: var(--muted); align-items: flex-end; }
.rc-sign { border-top: 1px solid var(--ink); padding-top: 4px; min-width: 160px; text-align: center; color: var(--ink); }
.rc-void { color: var(--bad); font-weight: 800; font-size: 22px; text-align: center; border: 2px solid var(--bad); padding: 4px; margin-bottom: 12px; border-radius: 6px; }

#printArea { display: none; }

/* ---------------- Responsive ---------------- */
@media (max-width: 1100px) {
  .figs { grid-template-columns: repeat(2, 1fr); }
  .g-main, .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .login { grid-template-columns: 1fr; }
  .login-art { padding: 32px 24px; }
  .login-art h1 { font-size: 32px; }
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .menu-btn { display: inline-flex; }
  .top { padding: 12px 16px; flex-wrap: wrap; }
  .top .clock { display: none; }
  .global-search { order: 5; width: 100%; }
  .view { padding: 16px 14px 60px; }
  .g2, .quick, .choices { grid-template-columns: 1fr; }
  .form { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr 1fr; }
  .due-line { grid-template-columns: 1fr 110px; }
  .due-line .bal { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------- Print: only the receipt / statement ---------------- */
@media print {
  body > *:not(#printArea) { display: none !important; }
  #printArea { display: block !important; }
  #printArea .receipt { border: 0; padding: 0; }
  body { background: #fff; }
  @page { margin: 14mm; }
}

/* fixes */
.top .menu-btn { display: none; }
.grid > .panel { margin-top: 0; }
@media (max-width: 860px) { .top .menu-btn { display: inline-flex; } }
a.btn { text-decoration: none; }
table.t .who-cell { min-width: 150px; }

/* =====================================================================
   v8.1 — founder dashboard, lock, polish
   ===================================================================== */
:root { --lock: #5b3fa0; --lock-soft: #efe9fb; }
.top { background: rgba(238, 242, 240, .92); backdrop-filter: blur(6px); }
.panel { box-shadow: 0 1px 0 rgba(23, 36, 42, .04); }
.side[data-role="founder"] .nav button[aria-current="page"] { box-shadow: inset 4px 0 0 var(--online); }
.side[data-role="admin"] .nav button[aria-current="page"] { box-shadow: inset 4px 0 0 var(--due); }
.side[data-role="counter"] .nav button[aria-current="page"] { box-shadow: inset 4px 0 0 var(--college); }

.pill.lock { background: var(--lock-soft); color: var(--lock); }
.pill.lock svg { width: 12px; height: 12px; }
.btn.lockbtn { color: var(--lock); border-color: #d6c9f2; }
.btn.lockbtn:hover { background: var(--lock-soft); }
.notice.lockbar { display: flex; gap: 10px; align-items: flex-start; background: var(--lock-soft); color: #3d2a6e; border: 1px solid #d6c9f2; }
.notice.lockbar svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.date-in { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

.pbar { height: 8px; background: var(--line-2); border-radius: 99px; overflow: hidden; margin: 12px 0 8px; }
.pbar i { display: block; height: 100%; border-radius: 99px; }

/* Founder: header */
.ov-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ov-hello { margin: 0; font-size: 30px; letter-spacing: -.02em; font-weight: 800; }
.ov-sub { color: var(--muted); font-size: 14px; }

/* Founder: money strip — one joined band, not separate cards */
.money-strip {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1.1fr;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
}
.money-strip .ms { padding: 18px 20px; border-left: 1px solid var(--line-2); }
.money-strip .ms:first-child { border-left: 0; }
.money-strip .ms.big { background: var(--side); color: #fff; }
.money-strip .ms.big .lab, .money-strip .ms.big .note { color: #a9bcb7; }
.money-strip .lab { font-size: 13.5px; color: var(--muted); }
.money-strip .val { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.money-strip .ms.big .val { font-size: 34px; }
.money-strip .val.good { color: var(--good); }
.money-strip .val.bad { color: var(--bad); }
.money-strip .note { font-size: 12.5px; color: var(--muted); margin-top: 4px; }

.status-row { display: grid; grid-template-columns: repeat(3, auto) 1fr; gap: 10px; margin: 14px 0 26px; }
.st-chip {
  display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 0;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; cursor: pointer; font: inherit;
}
.st-chip:hover { border-color: #b4c2be; }
.st-chip b { font-size: 18px; font-variant-numeric: tabular-nums; }
.st-chip span { font-size: 12.5px; color: var(--muted); }
.st-chip.due b { color: var(--due); }
.st-chip.plain { cursor: default; flex-direction: row; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.st-chip .acc { display: flex; flex-direction: column; }
.st-chip .acc small { font-size: 11.5px; color: var(--muted); max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-chip .acc b { font-size: 15px; }

/* Founder: course tabs */
.course-tabs { display: flex; gap: 6px; border-bottom: 2px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.course-tabs button {
  border: 0; background: none; padding: 10px 16px 12px; font-size: 16px; font-weight: 700; color: var(--muted);
  cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; display: flex; gap: 8px; align-items: center; white-space: nowrap;
}
.course-tabs button span { font-size: 12.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 0 8px; color: var(--muted); }
.course-tabs button[aria-selected="true"] { color: var(--college-ink); border-bottom-color: var(--college); }
.course-tabs button.on[aria-selected="true"] { color: var(--online-ink); border-bottom-color: var(--online); }

/* Founder: course overview cards */
.course-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.ccard {
  text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface);
  border: 1px solid var(--line); border-top: 4px solid var(--college); border-radius: var(--r-lg); padding: 16px 18px;
}
.ccard.online { border-top-color: var(--online); }
.ccard:hover { border-color: #b4c2be; border-top-color: var(--college); box-shadow: 0 6px 20px rgba(23,36,42,.07); }
.ccard.online:hover { border-top-color: var(--online); }
.ccard-top { display: flex; justify-content: space-between; align-items: center; }
.ccard-n { font-size: 14px; color: var(--muted); }
.ccard-n b { font-size: 26px; color: var(--ink); letter-spacing: -.02em; }
.ccard-name { font-size: 13.5px; color: var(--muted); margin: 2px 0 12px; }
.ccard-money { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); }
.ccard-money b { color: var(--ink); font-variant-numeric: tabular-nums; }
.ccard-money b.due-amt { color: var(--due); }
.ccard-list { display: flex; flex-direction: column; gap: 3px; font-size: 13px; color: var(--ink-2); min-height: 62px; }
.semspark { display: flex; gap: 5px; height: 62px; align-items: flex-end; }
.semspark span { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 3px; }
.semspark i { display: block; width: 100%; background: var(--college-soft); border-radius: 4px 4px 1px 1px; min-height: 3px; box-shadow: inset 0 -3px 0 var(--college); }
.semspark small { font-size: 11px; color: var(--muted); }

/* Founder: semester cards */
.sem-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.semcard {
  text-align: left; font: inherit; color: inherit; cursor: pointer; background: var(--surface);
  border: 1.5px solid var(--line); border-radius: 14px; padding: 14px 16px; position: relative;
}
.semcard:hover { border-color: var(--college); }
.semcard.online:hover { border-color: var(--online); }
.semcard.sel { border-color: var(--college); box-shadow: 0 0 0 3px var(--college-soft); }
.semcard.online.sel { border-color: var(--online); box-shadow: 0 0 0 3px var(--online-soft); }
.semcard.muted { background: var(--surface-2); }
.semcard-h { font-weight: 800; font-size: 15px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.semcard-h small { font-weight: 600; color: var(--muted); font-size: 12px; }
.semcard-n { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.semcard-n b { font-size: 30px; color: var(--ink); letter-spacing: -.02em; margin-right: 2px; }
.semcard-sub { font-size: 12.5px; color: var(--muted); }
.semcard-m { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.semcard-due { font-size: 13.5px; font-weight: 700; color: var(--due); margin-top: 6px; }
.semcard-lock { font-size: 12px; color: var(--lock); margin-top: 4px; display: flex; gap: 4px; align-items: center; min-height: 16px; }
.semcard-lock svg { width: 12px; height: 12px; }
.panel.drill { margin-top: 20px; border: 1.5px solid var(--ink); scroll-margin-top: 80px; }

@media (max-width: 1100px) {
  .money-strip { grid-template-columns: 1fr 1fr; }
  .money-strip .ms:nth-child(odd) { border-left: 0; }
  .money-strip .ms { border-top: 1px solid var(--line-2); }
  .status-row { grid-template-columns: 1fr 1fr 1fr; }
  .status-row .st-chip.plain { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .role-pick { grid-template-columns: 1fr; }
  .money-strip { grid-template-columns: 1fr; }
  .money-strip .ms { border-left: 0; }
  .status-row { grid-template-columns: 1fr; }
  .quick[style] { grid-template-columns: 1fr 1fr !important; }
}
