/* JB Knowledge Park ERP - calm, Apple-like visual language.
   Inter is bundled (static/vendor/inter) so it looks the same on every PC, offline too. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../vendor/inter/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap;
  src: url("../vendor/inter/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap;
  src: url("../vendor/inter/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap;
  src: url("../vendor/inter/inter-latin-700-normal.woff2") format("woff2"); }

/* House style: "JB" is always written in Abril Fatface, colour #0E4573 (white on blue / dark backgrounds).
   The JB tile = #0E4573 square, white "JB". Do not use the flame logo. */
@font-face { font-family: "Abril Fatface"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("../fonts/abril-fatface.woff2") format("woff2"); }
.jb { font-family: "Abril Fatface", Georgia, serif; font-weight: 400; color: #0E4573; letter-spacing: .01em; }
.jb-tile { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: #0E4573; color: #fff;
  font-family: "Abril Fatface", Georgia, serif; font-weight: 400; font-size: .95rem; letter-spacing: .02em; vertical-align: middle; line-height: 1; }

:root {
  --jb: #0E4573;
  --ink: #1d1d1f;           /* primary text */
  --ink-2: #6e6e73;         /* secondary text */
  --ink-3: #86868b;         /* tertiary text */
  --hairline: #e5e5ea;      /* separators */
  --hairline-2: #f0f0f3;
  --canvas: #f5f5f7;        /* page background */
  --surface: #ffffff;       /* cards */
  --fill: #f5f5f7;          /* quiet fills */
  --blue: #0E4573;
  --blue-press: #0a3559;
  --green: #248a3d;
  --green-fill: #e8f5ec;
  --red: #d70015;
  --red-fill: #fdecee;
  --orange: #b25000;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 16px rgba(0, 0, 0, 0.04);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* names used across older pages */
  --erp-navy: #1d1d1f;
  --erp-accent: #0E4573;
  --erp-bg: var(--canvas);
  --erp-border: var(--hairline);
  --erp-muted: var(--ink-2);

  --bs-body-font-family: var(--font);
  --bs-link-color: var(--blue);
  --bs-link-hover-color: var(--blue-press);
  --bs-link-color-rgb: 14, 69, 115;
}

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font);
  font-size: 0.94rem;
  letter-spacing: -0.006em;
  font-feature-settings: "cv11", "ss01";
}
a { text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ---- Menu bar: light, frosted ---- */
.erp-nav {
  position: sticky; top: 0; z-index: 1030;
  background: rgba(255, 255, 255, 0.78);
  -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 0.35rem; padding-bottom: 0.35rem;
}
.erp-nav .navbar-brand { color: var(--ink); font-weight: 600; letter-spacing: -0.01em; font-size: 1.02rem; }
.erp-nav .brand-mark { margin-right: 8px; }
.erp-nav .navbar-brand .jb { font-size: 1.22rem; margin-right: 1px; }
.erp-nav .brand-sub { color: var(--ink-3); font-weight: 500; }
.erp-nav .nav-link { color: var(--ink-2); font-size: 0.88rem; font-weight: 500; padding: 0.4rem 0.75rem !important; border-radius: 8px; }
.erp-nav .nav-link:hover { color: var(--ink); background: rgba(0, 0, 0, 0.04); text-decoration: none; }
.erp-nav .nav-link.active { color: var(--ink); background: rgba(0, 0, 0, 0.06); }
.erp-nav .nav-link.disabled { color: #c7c7cc; }
.erp-nav .nav-user { color: var(--ink-2); font-size: 0.85rem; }
.erp-nav .btn-outline-light { color: var(--ink); border-color: var(--hairline); background: #fff; }
.erp-nav .btn-outline-light:hover { background: var(--fill); color: var(--ink); }
.erp-nav .btn-light { background: var(--fill); border-color: transparent; color: var(--ink); }
.erp-nav .btn-sm { border-radius: 980px; padding: 0.25rem 0.8rem; font-size: 0.82rem; }
.erp-nav .dropdown-menu { border: 1px solid var(--hairline); border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); padding: 0.35rem; }
.erp-nav .dropdown-item { border-radius: 8px; font-size: 0.88rem; padding: 0.4rem 0.75rem; }
.erp-nav .dropdown-item:active { background: var(--blue); }
.year-select { width: auto; background-color: #fff; font-weight: 600; border-radius: 980px; border-color: var(--hairline); font-size: 0.82rem; }

/* ---- General building blocks used on every page ---- */
.page-title { font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 0.2rem; }
.page-sub { color: var(--ink-2); margin-bottom: 1.25rem; }

.erp-card { background: var(--surface); border: 0; border-radius: var(--radius); box-shadow: var(--shadow); }
.erp-card .card-head { padding: 0.95rem 1.2rem; border-bottom: 1px solid var(--hairline-2); font-weight: 600; letter-spacing: -0.01em; }
.stat { padding: 1.1rem 1.25rem; }
.stat .label { color: var(--ink-2); font-size: 0.78rem; font-weight: 500; }
.stat .value { font-size: 1.75rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.02em; }
.stat .value.warn { color: var(--orange); }

.table-erp { margin: 0; --bs-table-bg: transparent; }
.table-erp thead th {
  background: transparent; color: var(--ink-3); font-size: 0.74rem; font-weight: 500;
  text-transform: none; letter-spacing: 0; border-bottom: 1px solid var(--hairline); white-space: nowrap;
}
.table-erp td { vertical-align: middle; border-color: var(--hairline-2); }
.table-erp a.roll { font-weight: 600; font-variant-numeric: tabular-nums; }

.btn { border-radius: 980px; font-weight: 500; letter-spacing: -0.005em; }
.btn-primary { background: var(--blue); border-color: var(--blue); }
.btn-primary:hover, .btn-primary:focus { background: var(--blue-press); border-color: var(--blue-press); }
.btn-success { background: var(--blue); border-color: var(--blue); }
.btn-success:hover, .btn-success:focus { background: var(--blue-press); border-color: var(--blue-press); }
.form-control, .form-select { border-radius: 10px; border-color: #d2d2d7; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(14, 69, 115, 0.15); }
.alert { border-radius: var(--radius-sm); border: 0; }

.badge-status { font-weight: 500; }
.dl-erp dt { color: var(--ink-2); font-weight: 500; font-size: 0.85rem; }
.dl-erp dd { margin-bottom: 0.6rem; }

.photo-box {
  width: 120px; height: 150px; border-radius: 14px; object-fit: cover; background: var(--fill);
  display: flex; align-items: center; justify-content: center; color: var(--ink-3); font-size: 0.8rem;
}

.login-wrap { max-width: 380px; margin: 10vh auto; }
.login-brand { text-align: center; margin-bottom: 1.5rem; }
.login-brand .brand-mark { width: 60px; height: 60px; border-radius: 15px; font-size: 1.75rem; }
.login-brand h1 .jb { font-size: 1.45em; }

.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-due { color: var(--red); font-weight: 600; }
.text-paid { color: var(--green); }
.inst-head { background: var(--fill); font-weight: 600; }
.receipt-cancelled { text-decoration: line-through; color: var(--ink-3); }
.kv th { color: var(--ink-2); font-weight: 500; width: 38%; font-size: 0.85rem; }
.kv td { word-break: break-word; }
.print-only { display: none; }

/* ================================================================
   Fee card (Fees -> student)
   ================================================================ */
.fc { max-width: 1240px; margin: 0 auto; }
.fc-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.fc-back { color: var(--blue); font-size: 0.9rem; }
.fc-actions { display: flex; gap: 0.5rem; }
.fc-btn { display: inline-flex; align-items: center; gap: 0.4rem; border-radius: 980px; padding: 0.5rem 1.1rem;
  font-size: 0.88rem; font-weight: 500; border: 0; cursor: pointer; transition: background 0.15s ease; }
.fc-btn-quiet { background: #e8e8ed; color: var(--ink); }
.fc-btn-quiet:hover { background: #dedee3; text-decoration: none; color: var(--ink); }
.fc-btn-primary { background: var(--blue); color: #fff; }
.fc-btn-primary:hover { background: var(--blue-press); color: #fff; text-decoration: none; }

.fc-panel { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }

/* Hero */
.fc-hero { padding: 1.75rem 2rem 1.6rem; display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.fc-eyebrow { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); }
.fc-name { font-size: 2.1rem; font-weight: 600; letter-spacing: -0.025em; line-height: 1.1; margin: 0.35rem 0 0.15rem; }
.fc-roll { font-size: 1.05rem; color: var(--ink-2); font-variant-numeric: tabular-nums; letter-spacing: 0.01em; }
.fc-roll strong { color: var(--ink); font-weight: 600; }
.fc-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.fc-tag { background: var(--fill); color: var(--ink-2); border-radius: 980px; padding: 0.22rem 0.7rem; font-size: 0.8rem; font-weight: 500; }
.fc-tag strong { color: var(--ink); font-weight: 600; }
.fc-pill { display: inline-flex; align-items: center; gap: 0.35rem; border-radius: 980px; padding: 0.2rem 0.65rem; font-size: 0.76rem; font-weight: 600; }
.fc-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.fc-pill-green { background: var(--green-fill); color: var(--green); }
.fc-pill-grey { background: var(--fill); color: var(--ink-2); }
.fc-pill-red { background: var(--red-fill); color: var(--red); }

.fc-progress-wrap { min-width: 260px; align-self: center; }
.fc-progress-label { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--ink-2); margin-bottom: 0.45rem; }
.fc-progress-label strong { color: var(--ink); font-weight: 600; }
.fc-progress { height: 8px; background: #e8e8ed; border-radius: 980px; overflow: hidden; }
.fc-progress-meta { display: flex; justify-content: space-between; gap: 1.25rem; font-size: 0.76rem; color: var(--ink-3); margin-top: 0.55rem; }
.fc-progress > span { display: block; height: 100%; background: linear-gradient(90deg, #34c759, #30b350); border-radius: 980px; }

/* Metric tiles */
.fc-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--hairline-2); }
.fc-metric { padding: 1.1rem 2rem 1.3rem; }
.fc-metric + .fc-metric { border-left: 1px solid var(--hairline-2); }
.fc-metric-label { font-size: 0.78rem; color: var(--ink-2); font-weight: 500; }
.fc-metric-value { font-size: 1.65rem; font-weight: 600; letter-spacing: -0.025em; margin-top: 0.15rem; font-variant-numeric: tabular-nums; }
.fc-metric-value .cur { font-size: 0.6em; font-weight: 500; color: var(--ink-3); margin-right: 0.15em; vertical-align: 0.15em; }
.fc-metric-note { font-size: 0.76rem; color: var(--ink-3); margin-top: 0.1rem; }
.fc-metric.is-paid .fc-metric-value { color: var(--green); }
.fc-metric.is-due .fc-metric-value { color: var(--red); }

/* Section titles */
.fc-section { margin: 1.6rem 0 0; }
.fc-section-head { display: flex; justify-content: space-between; align-items: baseline; padding: 1.15rem 1.5rem 0.6rem; }
.fc-section-title { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.fc-section-sub { font-size: 0.8rem; color: var(--ink-3); }

/* Semester table */
.fc-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.9rem; }
.fc-table th { font-size: 0.72rem; font-weight: 500; color: var(--ink-3); text-align: right; padding: 0.55rem 0.9rem;
  border-bottom: 1px solid var(--hairline); white-space: nowrap; }
.fc-table td { text-align: right; padding: 0.8rem 0.9rem; border-bottom: 1px solid var(--hairline-2);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.fc-table th:first-child, .fc-table td:first-child { text-align: left; padding-left: 1.5rem; }
.fc-table th:last-child, .fc-table td:last-child { padding-right: 1.5rem; }
.fc-table .fc-sem { font-weight: 600; color: var(--ink); }
.fc-table .fc-sem-sub { display: block; font-size: 0.74rem; font-weight: 400; color: var(--ink-3); margin-top: 0.1rem; }
.fc-table .nil { color: #d2d2d7; }
.fc-table .col-sum { border-left: 1px solid var(--hairline-2); }
.fc-table th.col-sum { border-left: 1px solid var(--hairline); }
.fc-table .sum { font-weight: 600; }
.fc-table .paid { color: var(--green); }
.fc-table .bal-due { color: var(--red); font-weight: 600; }
.fc-table .bal-ok { color: var(--ink-3); }
.fc-table tr.is-empty td { color: #c7c7cc; }
.fc-table tr.is-empty .fc-sem { color: var(--ink-3); font-weight: 500; }
.fc-table tbody tr:hover td { background: #fafafc; }
.fc-table tfoot td { border-bottom: 0; border-top: 1px solid var(--hairline); font-weight: 600; padding-top: 0.9rem; padding-bottom: 1.1rem; }
.fc-table tfoot .grand { font-size: 1rem; }
.fc-check { display: inline-grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--green-fill); color: var(--green); font-size: 0.7rem; font-weight: 700; margin-left: 0.35rem; vertical-align: -2px; }
.fc-scroll { overflow-x: auto; }

/* Ledger */
.fc-ledger { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.88rem; }
.fc-ledger th { font-size: 0.72rem; font-weight: 500; color: var(--ink-3); padding: 0.55rem 0.9rem; border-bottom: 1px solid var(--hairline); text-align: left; white-space: nowrap; }
.fc-ledger td { padding: 0.85rem 0.9rem; border-bottom: 1px solid var(--hairline-2); vertical-align: top; }
.fc-ledger tr:last-child td { border-bottom: 0; }
.fc-ledger th:first-child, .fc-ledger td:first-child { padding-left: 1.5rem; }
.fc-ledger th:last-child, .fc-ledger td:last-child { padding-right: 1.5rem; }
.fc-ledger .r { text-align: right; }
.fc-ledger .rno { font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-ledger .amt { font-weight: 600; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.fc-ledger .muted { color: var(--ink-3); font-size: 0.8rem; margin-top: 0.15rem; word-break: break-word; }
.fc-ledger .date { color: var(--ink-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.fc-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.fc-chip { background: var(--fill); border-radius: 8px; padding: 0.18rem 0.5rem; font-size: 0.76rem; color: var(--ink-2); white-space: nowrap; }
.fc-chip strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-ledger tr.is-cancelled td { color: var(--ink-3); }
.fc-ledger tr.is-cancelled .amt { text-decoration: line-through; }
.fc-empty { padding: 2rem 1.5rem; color: var(--ink-3); text-align: center; }

@media (max-width: 900px) {
  .fc-metrics { grid-template-columns: repeat(2, 1fr); }
  .fc-metric:nth-child(3) { border-left: 0; }
  .fc-metric:nth-child(n+3) { border-top: 1px solid var(--hairline-2); }
  .fc-hero, .fc-metric { padding-left: 1.25rem; padding-right: 1.25rem; }
}

/* ================================================================
   Printing
   ================================================================ */
@media print {
  .erp-nav, .no-print, .alert { display: none !important; }
  body { background: #fff; }
  main { padding: 0 !important; }
}

/* Fee card on A4 portrait */
@media print {
  /* page size is set by each printable template */
  html, body { width: 190mm; background: #fff !important; color: #000; font-size: 9pt; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; box-shadow: none !important; }
  .print-only { display: block !important; }
  a { color: #000 !important; text-decoration: none !important; }
  .fc { max-width: none; width: 190mm; margin: 0; }
  .fc-panel { border-radius: 0; box-shadow: none; }
  .fc-scroll { overflow: visible; }

  .fc-print-head { display: flex !important; justify-content: space-between; align-items: baseline;
    border-bottom: 0.8pt solid #000; padding-bottom: 2mm; margin-bottom: 4mm; }
  .fc-print-college { font-size: 12pt; font-weight: 700; letter-spacing: -0.01em; }
  .fc-print-title { font-size: 8pt; color: #444; }

  .fc-hero { padding: 0 0 3mm; gap: 6mm; flex-wrap: nowrap; }
  .fc-eyebrow { display: none; }
  .fc-name { font-size: 17pt; margin: 0 0 0.5mm; }
  .fc-roll { font-size: 10pt; }
  .fc-tags { margin-top: 2mm; gap: 1.5mm; }
  .fc-tag { font-size: 7.5pt; padding: 0.5mm 2mm; background: #f2f2f4 !important; }
  .fc-pill { font-size: 7.5pt; }
  .fc-progress-wrap { min-width: 55mm; }
  .fc-progress-label { font-size: 7.5pt; margin-bottom: 1mm; }
  .fc-progress { height: 2mm; }

  .fc-progress-meta { font-size: 6.8pt; margin-top: 1mm; gap: 3mm; }
  .fc-metrics { grid-template-columns: repeat(4, 1fr) !important; border: 0.6pt solid #d0d0d5; border-radius: 3mm; }
  .fc-metric:nth-child(n) { border-top: 0 !important; }
  .fc-metric:nth-child(3) { border-left: 0.6pt solid #d0d0d5 !important; }
  .fc-metric { padding: 2.2mm 4mm; }
  .fc-metric + .fc-metric { border-left: 0.6pt solid #d0d0d5; }
  .fc-metric-label { font-size: 7.5pt; }
  .fc-metric-value { font-size: 13pt; }
  .fc-metric-note { font-size: 6.8pt; }

  .fc-section { margin-top: 5mm; }
  .fc-section-head { padding: 0 0 1.5mm; }
  .fc-section-title { font-size: 10.5pt; }
  .fc-section-sub { font-size: 7pt; }

  .fc-table { table-layout: fixed; width: 190mm; font-size: 8.3pt; }
  .fc-table th { font-size: 7pt; padding: 1.4mm 1.2mm; color: #555; border-bottom: 0.8pt solid #000;
    white-space: normal; word-break: keep-all; line-height: 1.15; }
  .fc-table td { padding: 1.3mm 1.2mm; border-bottom: 0.4pt solid #d0d0d5; white-space: nowrap; }
  .fc-table tr.is-empty td { padding-top: 1mm; padding-bottom: 1mm; }
  .fc-table th:first-child, .fc-table td:first-child { padding-left: 0; }
  .fc-table th:last-child, .fc-table td:last-child { padding-right: 0; }
  .fc-table .fc-sem-sub { font-size: 6.3pt; white-space: nowrap; }
  .fc-table tfoot td { border-top: 0.8pt solid #000; padding-top: 1.8mm; padding-bottom: 0; }
  .fc-table tr.is-empty td { color: #b0b0b5; }
  .fc-c-sem { width: 27mm; }
  .fc-c-head { width: 18mm; }
  .fc-c-tot { width: 18.33mm; }
  .fc-table .paid, .fc-metric.is-paid .fc-metric-value { color: #1a6b2f !important; }
  .fc-table .bal-due, .fc-metric.is-due .fc-metric-value { color: #b00012 !important; }

  .fc-ledger { table-layout: fixed; width: 190mm; font-size: 8pt; }
  .fc-ledger th { font-size: 7pt; padding: 1.2mm 1.2mm; color: #555; border-bottom: 0.8pt solid #000; }
  .fc-ledger td { padding: 1.5mm 1.2mm; border-bottom: 0.4pt solid #d0d0d5; }
  .fc-ledger th:first-child, .fc-ledger td:first-child { padding-left: 0; }
  .fc-ledger th:last-child, .fc-ledger td:last-child { padding-right: 0; }
  .fc-ledger .muted { font-size: 6.8pt; overflow-wrap: anywhere; }
  .fc-chip { font-size: 6.8pt; padding: 0.3mm 1.2mm; background: #f2f2f4 !important; white-space: normal; }
  .fc-table tr, .fc-ledger tr { break-inside: avoid; page-break-inside: avoid; }
  .fc-ledger thead { display: table-header-group; }
}

/* ================================================================
   Hostel
   ================================================================ */
.hs { max-width: 1240px; margin: 0 auto; }
.hs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.hs-title { font-size: 2rem; font-weight: 600; letter-spacing: -0.025em; margin: 0.2rem 0 0; }
.hs-sub { color: var(--ink-2); font-size: 0.92rem; margin-top: 0.2rem; }
.hs-grid { display: grid; gap: 1rem; }
.hs-grid-3 { grid-template-columns: repeat(3, 1fr); }
.hs-grid-2 { grid-template-columns: 1.4fr 1fr; }
@media (max-width: 900px) { .hs-grid-3, .hs-grid-2 { grid-template-columns: 1fr; } }
.hs-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.35rem 1.5rem; }
.hs-card-label { font-size: 0.8rem; color: var(--ink-2); font-weight: 500; display: flex; justify-content: space-between; }
.hs-big { font-size: 2.4rem; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; line-height: 1.1; margin-top: 0.35rem; }
.hs-big small { font-size: 0.95rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; margin-left: 0.2rem; }
.hs-split { display: flex; gap: 1.5rem; margin-top: 0.9rem; font-size: 0.82rem; color: var(--ink-2); }
.hs-split strong { display: block; color: var(--ink); font-size: 1.05rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.hs-split .v strong { color: var(--green); }
.hs-bar { height: 6px; background: #e8e8ed; border-radius: 980px; overflow: hidden; margin-top: 1rem; }
.hs-bar > span { display: block; height: 100%; background: var(--blue); border-radius: 980px; }
.hs-bar.girls > span { background: #bf5af2; }
.hs-mini { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 0.88rem; margin-top: 0.4rem; }
.hs-mini th { font-size: 0.72rem; font-weight: 500; color: var(--ink-3); padding: 0.45rem 0; border-bottom: 1px solid var(--hairline); text-align: right; }
.hs-mini td { padding: 0.6rem 0; border-bottom: 1px solid var(--hairline-2); text-align: right; font-variant-numeric: tabular-nums; }
.hs-mini th:first-child, .hs-mini td:first-child { text-align: left; }
.hs-mini tfoot td { border-bottom: 0; font-weight: 600; }
.hs-issue { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid var(--hairline-2); font-size: 0.9rem; }
.hs-issue:last-child { border-bottom: 0; }
.hs-issue .n { font-weight: 600; font-variant-numeric: tabular-nums; }
.hs-issue .n.warn { color: var(--orange); }
.hs-issue .n.ok { color: var(--green); }

/* Filters */
.hs-filters { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; margin-bottom: 1.25rem; }
.hs-seg { display: inline-flex; background: #e8e8ed; border-radius: 10px; padding: 2px; }
.hs-seg a { padding: 0.32rem 0.85rem; border-radius: 8px; font-size: 0.82rem; color: var(--ink); font-weight: 500; }
.hs-seg a:hover { text-decoration: none; }
.hs-seg a.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.hs-select, .hs-search { border: 0; background: #e8e8ed; border-radius: 10px; padding: 0.4rem 0.8rem; font-size: 0.85rem; color: var(--ink); }
.hs-search { min-width: 240px; }
.hs-select:focus, .hs-search:focus { outline: 3px solid rgba(14,69,115,0.3); background: #fff; }

/* Room board */
.hs-wing { margin-bottom: 1.6rem; }
.hs-wing-head { display: flex; align-items: baseline; gap: 0.6rem; margin: 0 0 0.6rem 0.2rem; }
.hs-wing-head h3 { font-size: 1rem; font-weight: 600; margin: 0; letter-spacing: -0.01em; }
.hs-wing-head span { font-size: 0.78rem; color: var(--ink-3); }
.hs-rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 0.6rem; }
.hs-room { display: block; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: 0.75rem 0.85rem 0.7rem;
  color: var(--ink); transition: transform 0.12s ease, box-shadow 0.12s ease; border: 1px solid transparent; }
.hs-room:hover { text-decoration: none; color: var(--ink); transform: translateY(-1px); box-shadow: 0 2px 4px rgba(0,0,0,0.05), 0 8px 24px rgba(0,0,0,0.08); }
.hs-room-no { font-size: 1.15rem; font-weight: 600; letter-spacing: -0.015em; font-variant-numeric: tabular-nums; display: flex; justify-content: space-between; align-items: baseline; }
.hs-room-no small { font-size: 0.68rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.hs-room-meta { font-size: 0.72rem; color: var(--ink-3); margin-top: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hs-beds { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 0.55rem; }
.hs-bed { width: 12px; height: 12px; border-radius: 4px; background: #e8e8ed; }
.hs-bed.on { background: var(--blue); }
.hs-room.is-girls .hs-bed.on { background: #bf5af2; }
.hs-bed.over { background: var(--red); }
.hs-room.is-full { background: #fbfbfd; }
.hs-room.is-over { border-color: rgba(215,0,21,0.35); }
.hs-room.is-norate { opacity: 0.6; }
.hs-room-foot { font-size: 0.72rem; color: var(--ink-2); margin-top: 0.45rem; font-weight: 500; }
.hs-room-foot .vac { color: var(--green); }
.hs-room-foot .ovr { color: var(--red); }
.hs-legend { display: flex; gap: 1rem; font-size: 0.78rem; color: var(--ink-2); align-items: center; }
.hs-legend .hs-bed { display: inline-block; vertical-align: -1px; margin-right: 0.3rem; }

/* Room detail */
.hs-occ { display: flex; align-items: center; gap: 1rem; padding: 0.9rem 1.5rem; border-bottom: 1px solid var(--hairline-2); }
.hs-occ:last-child { border-bottom: 0; }
.hs-avatar { width: 40px; height: 40px; border-radius: 50%; background: #e8f0fd; color: var(--blue); display: grid; place-items: center;
  font-weight: 600; font-size: 0.9rem; flex: none; }
.is-girls .hs-avatar { background: #f6ebfd; color: #a442d6; }
.hs-occ-main { flex: 1; min-width: 0; }
.hs-occ-name { font-weight: 600; }
.hs-occ-sub { font-size: 0.8rem; color: var(--ink-3); }
.hs-occ-id { font-variant-numeric: tabular-nums; font-weight: 600; font-size: 0.85rem; background: var(--fill); border-radius: 8px; padding: 0.2rem 0.55rem; white-space: nowrap; }
.hs-occ-actions { display: flex; gap: 0.35rem; flex: none; }
.hs-link-btn { background: none; border: 0; color: var(--blue); font-size: 0.82rem; padding: 0.25rem 0.5rem; border-radius: 8px; cursor: pointer; }
.hs-link-btn:hover { background: #eef5fe; }
.hs-link-btn.danger { color: var(--red); }
.hs-link-btn.danger:hover { background: var(--red-fill); }
.hs-empty-bed { color: var(--ink-3); font-size: 0.88rem; }
.hs-empty-bed .hs-avatar { background: transparent; border: 1.5px dashed #d2d2d7; color: #c7c7cc; }
.hs-form label { font-size: 0.78rem; color: var(--ink-2); font-weight: 500; margin-bottom: 0.25rem; display: block; }
.hs-input { width: 100%; border: 1px solid var(--hairline); border-radius: 10px; padding: 0.55rem 0.75rem; font-size: 0.92rem; background: #fff; }
.hs-input:focus { outline: 3px solid rgba(14,69,115,0.25); border-color: var(--blue); }
.hs-kv { display: grid; grid-template-columns: auto 1fr; gap: 0.45rem 1.25rem; font-size: 0.88rem; }
.hs-kv dt { color: var(--ink-3); font-weight: 400; }
.hs-kv dd { margin: 0; font-weight: 500; }
.hs-pop { display: none; padding: 0.75rem 1.5rem 1rem 4.5rem; background: #fafafc; border-bottom: 1px solid var(--hairline-2); }
.hs-pop.open { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.hs-pop .hs-input { width: auto; }

/* Hostel ID card (print) */
.hs-idcard { width: 86mm; height: 54mm; border-radius: 4mm; background: #fff; box-shadow: var(--shadow); border: 0.3mm solid #e5e5ea;
  padding: 4mm 5mm; display: flex; flex-direction: column; justify-content: space-between; margin: 2rem auto; font-size: 8.5pt; }
.hs-idcard .top { display: flex; justify-content: space-between; align-items: flex-start; }
.hs-idcard .college { font-weight: 600; font-size: 8pt; letter-spacing: 0.02em; text-transform: uppercase; color: var(--ink-2); }
.hs-idcard .kind { font-size: 7pt; color: var(--ink-3); }
.hs-idcard .hid { font-size: 13pt; font-weight: 700; letter-spacing: -0.01em; color: var(--blue); }
.hs-idcard .nm { font-size: 12pt; font-weight: 600; letter-spacing: -0.015em; }
.hs-idcard .grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5mm 3mm; }
.hs-idcard .grid div span { display: block; font-size: 6.5pt; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.04em; }
.hs-idcard .grid div strong { font-weight: 600; }
@media print {
  .hs-idcard { box-shadow: none; margin: 0; }
}

/* ================================================================
   Student diary
   ================================================================ */
.dy-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 1rem; scroll-margin-top: 80px; }
.dy-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1.1rem 1.4rem 0.8rem; }
.dy-title { font-size: 1.1rem; font-weight: 600; letter-spacing: -0.015em; margin: 0; }
.dy-counts { display: flex; gap: 0.4rem; margin-top: 0.3rem; }
.dy-count { font-size: 0.78rem; font-weight: 500; border-radius: 980px; padding: 0.15rem 0.6rem; background: var(--fill); color: var(--ink-2); }
.dy-count strong { color: var(--ink); }
.dy-count.red { background: var(--red-fill); color: var(--red); } .dy-count.red strong { color: var(--red); }
.dy-count.green { background: var(--green-fill); color: var(--green); } .dy-count.green strong { color: var(--green); }
.dy-btn { display: inline-flex; align-items: center; gap: 0.3rem; border-radius: 980px; padding: 0.38rem 0.9rem; font-size: 0.82rem; font-weight: 500; }
.dy-btn:hover { text-decoration: none; }
.dy-btn.red { background: var(--red-fill); color: var(--red); }
.dy-btn.green { background: var(--green-fill); color: var(--green); }
.dy-item { display: grid; grid-template-columns: 74px 4px 1fr auto; gap: 0 0.9rem; padding: 0.85rem 1.4rem; border-top: 1px solid var(--hairline-2); align-items: start; }
.dy-date { font-size: 0.78rem; color: var(--ink-3); font-variant-numeric: tabular-nums; line-height: 1.3; padding-top: 0.1rem; }
.dy-date strong { display: block; color: var(--ink); font-size: 0.95rem; font-weight: 600; }
.dy-rail { border-radius: 4px; align-self: stretch; background: var(--green); }
.dy-item.is-d .dy-rail { background: #ff9f0a; }
.dy-item.is-d.sev-3 .dy-rail, .dy-item.is-d.sev-4 .dy-rail { background: var(--red); }
.dy-item.is-d.sev-1 .dy-rail { background: #d2d2d7; }
.dy-what { font-weight: 600; }
.dy-meta { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.35rem; }
.dy-tag { font-size: 0.73rem; border-radius: 6px; padding: 0.1rem 0.45rem; background: var(--fill); color: var(--ink-2); font-weight: 500; }
.dy-tag.sev-1 { background: #f2f2f7; } .dy-tag.sev-2 { background: #fff4e5; color: var(--orange); }
.dy-tag.sev-3, .dy-tag.sev-4 { background: var(--red-fill); color: var(--red); }
.dy-tag.win { background: var(--green-fill); color: var(--green); }
.dy-note { font-size: 0.84rem; color: var(--ink-2); margin-top: 0.35rem; white-space: pre-line; }
.dy-files { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.45rem; }
.dy-file { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.76rem; border: 1px solid var(--hairline); border-radius: 8px; padding: 0.15rem 0.5rem; color: var(--ink); max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dy-file:hover { background: var(--fill); text-decoration: none; }
.dy-side { font-size: 0.72rem; color: var(--ink-3); text-align: right; white-space: nowrap; }
.dy-side a { font-size: 0.8rem; }
.dy-empty { padding: 1.4rem; color: var(--ink-3); border-top: 1px solid var(--hairline-2); font-size: 0.9rem; }
.dy-seg { display: inline-flex; background: #e8e8ed; border-radius: 10px; padding: 2px; }
.dy-seg a { padding: 0.4rem 1.1rem; border-radius: 8px; font-size: 0.88rem; color: var(--ink); font-weight: 500; }
.dy-seg a:hover { text-decoration: none; }
.dy-seg a.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
.dy-form .hs-input, .dy-form select, .dy-form textarea { width: 100%; border: 1px solid var(--hairline); border-radius: 10px; padding: 0.55rem 0.75rem; font-size: 0.92rem; background: #fff; }
.dy-form label { font-size: 0.78rem; color: var(--ink-2); font-weight: 500; margin-bottom: 0.25rem; display: block; }
.dy-form .help { font-size: 0.74rem; color: var(--ink-3); margin-top: 0.2rem; }
.dy-form .err { font-size: 0.78rem; color: var(--red); margin-top: 0.2rem; }
.dy-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.dy-chips label { margin: 0; }
.dy-chips input { display: none; }
.dy-chips span { display: inline-block; border: 1px solid var(--hairline); border-radius: 980px; padding: 0.3rem 0.8rem; font-size: 0.82rem; color: var(--ink); cursor: pointer; background: #fff; }
.dy-chips input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.dy-chips.red input:checked + span { background: var(--red); border-color: var(--red); }
.dy-chips.green input:checked + span { background: var(--green); border-color: var(--green); }

/* ================================================================
   Dues: smart search
   ================================================================ */
.ds-search { display: flex; align-items: center; gap: 0.6rem; background: var(--surface); border-radius: 16px; box-shadow: var(--shadow);
  padding: 0.45rem 0.5rem 0.45rem 1.1rem; border: 1px solid transparent; transition: border-color .15s, box-shadow .15s; }
.ds-search:focus-within { border-color: rgba(14,69,115,0.45); box-shadow: 0 0 0 4px rgba(14,69,115,0.12); }
.ds-spark { font-size: 1.1rem; background: linear-gradient(135deg, #0E4573, #bf5af2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ds-search input { flex: 1; border: 0; outline: 0; font-size: 1.02rem; padding: 0.45rem 0; background: transparent; color: var(--ink); min-width: 0; }
.ds-understood, .ds-examples { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; margin-top: 0.7rem; font-size: 0.8rem; }
.ds-label { color: var(--ink-3); font-weight: 500; margin-right: 0.15rem; }
.ds-chip { background: #eef5fe; color: var(--blue); border-radius: 980px; padding: 0.2rem 0.65rem; font-weight: 500; }
.ds-ex { background: #e8e8ed; color: var(--ink); border-radius: 980px; padding: 0.2rem 0.7rem; }
.ds-ex:hover { background: #dedee3; text-decoration: none; color: var(--ink); }
.ds-clear { margin-left: 0.3rem; }
.ds-cond { display: inline-flex; gap: 0.35rem; align-items: center; margin-left: auto; }
.ds-table th a { color: inherit; }
.ds-pct { display: flex; align-items: center; gap: 0.5rem; font-variant-numeric: tabular-nums; font-size: 0.8rem; color: var(--ink-2); }
.ds-bar { flex: 1; height: 6px; background: #e8e8ed; border-radius: 980px; overflow: hidden; min-width: 60px; }
.ds-bar > span { display: block; height: 100%; background: var(--green); border-radius: 980px; }
.ds-bar > span.mid { background: #ff9f0a; }
.ds-bar > span.lo { background: var(--red); }

/* ================================================================
   Hostel floor map
   ================================================================ */
.mp-wrap { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; overflow-x: auto; }
.mp { display: grid; gap: 6px; position: relative; }
.mp-area { border: 1.5px solid #d2d2d7; border-radius: 12px; display: grid; place-items: center; font-size: 0.74rem; font-weight: 600;
  letter-spacing: 0.08em; color: var(--ink-3); background: repeating-linear-gradient(45deg, #fafafc, #fafafc 8px, #f5f5f7 8px, #f5f5f7 16px); text-align: center; }
.mp-label { display: flex; align-items: center; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2); z-index: 1; padding-left: 4px; }
.mp-corridor { background: #f2f2f5; border-radius: 8px; }
.mp-room { position: relative; display: flex; flex-direction: column; justify-content: space-between; border-radius: 10px; padding: 6px 7px;
  color: var(--ink); background: #fff; border: 1.5px solid #e5e5ea; transition: transform .12s ease, box-shadow .12s ease; min-width: 0; }
.mp-room:hover { text-decoration: none; color: var(--ink); transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,0.12); z-index: 5; }
.mp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 4px; }
.mp-no { font-weight: 700; font-size: 0.92rem; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.mp-type { font-size: 0.62rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mp-beds { display: flex; flex-wrap: wrap; gap: 3px; }
.mp-beds i { width: 8px; height: 8px; border-radius: 3px; background: #e5e5ea; }
.mp-beds i.on { background: var(--blue); }
.mp-beds i.x { background: var(--red); }
/* occupancy colours */
.mp-room.free { background: #effaf2; border-color: #a7dfb6; }
.mp-room.full { background: #f2f7ff; border-color: #b9d3f7; }
.mp-room.over { background: #fdecee; border-color: #f2a3ab; }
.mp-room.empty { background: #fff; border-color: #d2d2d7; border-style: dashed; }
.mp-room.norate, .mp-room.missing { background: #f5f5f7; border-style: dashed; color: var(--ink-3); }
/* room-type colours */
.mp.by-type .mp-room { border-style: solid; }
.mp.by-type .mp-room.t-AC { background: #e8f1fd; border-color: #8bb8f2; }
.mp.by-type .mp-room.t-COOLER { background: #e9f8f6; border-color: #86d3c7; }
.mp.by-type .mp-room.t-NON_AC { background: #fff6e8; border-color: #f2c27a; }
.mp.by-type .mp-room.t-EXHAUST { background: #f4effc; border-color: #c6a8ee; }
/* search */
.mp.is-searching .mp-room:not(.hit) { opacity: 0.35; }
.mp-room.hit { box-shadow: 0 0 0 3px var(--blue); z-index: 4; }
/* hover card */
.mp-pop { display: none; position: absolute; left: 50%; top: calc(100% + 8px); transform: translateX(-50%); width: 270px; background: #fff;
  border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.18); padding: 10px 12px; z-index: 20; font-size: 0.8rem; text-align: left; }
.mp-room:hover .mp-pop { display: block; }
.mp-pop-h { font-weight: 600; margin-bottom: 6px; display: flex; justify-content: space-between; gap: 6px; }
.mp-pop-h span { color: var(--ink-3); font-weight: 400; font-size: 0.74rem; }
.mp-pop-r { padding: 3px 0; border-top: 1px solid var(--hairline-2); display: flex; gap: 6px; align-items: baseline; }
.mp-pop-r b { font-weight: 600; font-size: 0.72rem; color: var(--blue); }
.mp-pop-r span { margin-left: auto; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.mp-pop-f { margin-top: 6px; color: var(--green); font-weight: 500; }
.mp-key { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 5px; vertical-align: -1px; border: 1.5px solid; }
.mp-key.free { background: #effaf2; border-color: #a7dfb6; } .mp-key.full { background: #f2f7ff; border-color: #b9d3f7; }
.mp-key.over { background: #fdecee; border-color: #f2a3ab; } .mp-key.empty { background: #fff; border-color: #d2d2d7; border-style: dashed; }
.mp-key.t-AC { background: #e8f1fd; border-color: #8bb8f2; } .mp-key.t-COOLER { background: #e9f8f6; border-color: #86d3c7; }
.mp-key.t-NON_AC { background: #fff6e8; border-color: #f2c27a; } .mp-key.t-EXHAUST { background: #f4effc; border-color: #c6a8ee; }
.mp-room.pop-r .mp-pop { left: auto; right: 0; transform: none; }
.mp-room.pop-l .mp-pop { left: 0; transform: none; }
.mp-room.pop-up .mp-pop { top: auto; bottom: calc(100% + 8px); }
.mp-wrap { overflow: visible; }
@media (max-width: 1200px) { .mp-wrap { overflow-x: auto; } }
.hs-seg { flex-wrap: wrap; }
.mp { justify-content: center; }

/* ================================================================
   Transport
   ================================================================ */
.tp-nav { margin-top: .2rem; }
.tp-note { background: #fff6e8; color: var(--orange); border-radius: 12px; padding: .7rem 1rem; margin: 1rem 0; font-size: .88rem; }
.tp-bar { position: sticky; top: 64px; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  background: rgba(245,245,247,0.92); backdrop-filter: saturate(180%) blur(12px); padding: .7rem 0; margin-top: 1rem; }
.tp-rows { border-top: 1px solid var(--hairline); }
.tp-row { display: grid; grid-template-columns: 210px auto 170px 200px 1fr; gap: .9rem; align-items: center; padding: .65rem 1.5rem; border-bottom: 1px solid var(--hairline-2); }
.tp-row:last-child { border-bottom: 0; }
.tp-row.has-error { background: var(--red-fill); }
.tp-veh strong { font-size: 1rem; font-variant-numeric: tabular-nums; }
.tp-veh .muted, .tp-side .muted, .tp-route .muted { font-size: .75rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-status { display: inline-flex; background: #e8e8ed; border-radius: 10px; padding: 2px; }
.tp-pill input { display: none; }
.tp-pill span { display: block; padding: .3rem .7rem; border-radius: 8px; font-size: .8rem; font-weight: 500; color: var(--ink-2); cursor: pointer; white-space: nowrap; }
.tp-pill input:checked + span { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--ink); }
.tp-pill.s-RAN input:checked + span { color: var(--green); }
.tp-pill.s-NOT_RUN input:checked + span { color: var(--red); }
.tp-pill.s-MERGED input:checked + span { color: var(--orange); }
.tp-in { display: flex; gap: .4rem; }
.tp-in .hs-input { padding: .4rem .6rem; font-size: .88rem; }
.tp-row .tp-ran, .tp-row .tp-merged { visibility: hidden; }
.tp-row[data-status="RAN"] .tp-ran, .tp-row[data-status="MERGED"] .tp-merged { visibility: visible; }
.tp-row[data-status="HOLIDAY"], .tp-row[data-status="CLOSED"] { background: #fafafc; }
.tp-row[data-status="NOT_RUN"] .tp-veh strong { color: var(--red); }
.tp-side { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.tp-err { color: var(--red); font-size: .78rem; font-weight: 500; }
.tp-chip { font-size: .72rem; border-radius: 6px; padding: .1rem .45rem; background: var(--fill); }
.tp-chip.s-RAN { background: var(--green-fill); color: var(--green); } .tp-chip.s-NOT_RUN { background: var(--red-fill); color: var(--red); }
.tp-chip.s-MERGED { background: #fff4e5; color: var(--orange); }
@media (max-width: 1000px) { .tp-row { grid-template-columns: 1fr; } }
.tp-routes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .75rem; }
.tp-route { display: block; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: .9rem 1rem; color: var(--ink); border: 1.5px solid transparent; }
.tp-route:hover { text-decoration: none; color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.tp-route.low { border-color: rgba(215,0,21,.3); }
.tp-route.off { opacity: .55; }
.tp-code { font-weight: 700; font-size: 1.05rem; }
.tp-rname { font-weight: 600; margin-top: .1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tp-fill { display: flex; align-items: center; gap: .5rem; margin: .6rem 0 .5rem; font-size: .78rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tp-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: .3rem; font-size: .68rem; color: var(--ink-3); }
.tp-stats strong { display: block; font-size: .9rem; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
/* vendor bill */
.vb-sheet { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.4rem 1.5rem; margin-top: 1rem; }
.vb-top { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1rem; }
.vb-college { font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.vb-title { font-size: 1.25rem; font-weight: 600; letter-spacing: -.015em; }
.vb-period { text-align: right; font-size: .85rem; color: var(--ink-2); }
.vb-period strong { font-size: 1.15rem; color: var(--ink); }
.iv-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #0E4573; padding-bottom: .5rem; margin-bottom: .8rem; }
.iv-title { font-size: 1.7rem; font-weight: 700; letter-spacing: .18em; color: #0E4573; }
.iv-meta { font-size: .9rem; display: grid; gap: .55rem; padding-top: .3rem; }
.iv-blank { display: inline-block; min-width: 150px; border-bottom: 1px solid var(--ink-2); height: 1em; vertical-align: bottom; }
.iv-blank.wide { min-width: 260px; }
.iv-parties { display: grid; grid-template-columns: 1fr 1.4fr; gap: 1rem; margin-bottom: .8rem; }
.iv-box { border: 1px solid var(--hairline); border-radius: 8px; padding: .55rem .8rem; font-size: .85rem; line-height: 1.55; }
.iv-lbl { font-size: .68rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.iv-name { font-weight: 700; font-size: 1rem; }
.iv-bank { margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed var(--hairline); }
.iv-for { font-size: .85rem; margin-bottom: .6rem; }
.iv-words { margin-top: .6rem; font-size: .85rem; }
.vb-table { width: 100%; border-collapse: collapse; font-size: .78rem; font-variant-numeric: tabular-nums; }
.vb-table th, .vb-table td { border: 1px solid var(--hairline); padding: .3rem .35rem; text-align: right; white-space: nowrap; }
.vb-table th { background: #f5f5f7; font-weight: 600; font-size: .7rem; color: var(--ink-2); }
.vb-table th span { font-weight: 400; color: var(--ink-3); }
.vb-table .l { text-align: left; }
.vb-table .d { text-align: center; padding: .3rem .1rem; width: 1.6em; }
.vb-table .m-A { color: var(--red); font-weight: 700; background: var(--red-fill); }
.vb-table .m-M { color: var(--orange); font-weight: 700; }
.vb-table .m-H, .vb-table .m-C { color: var(--ink-3); }
.vb-table td.m-✓ { color: var(--green); }
.vb-table tfoot td { font-weight: 700; background: #f5f5f7; }
.vb-foot { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 1rem; font-size: .75rem; color: var(--ink-3); gap: 2rem; }
.vb-sign { display: flex; gap: 2.5rem; }
.vb-sign span { border-top: 1px solid var(--ink-2); padding-top: .3rem; min-width: 110px; text-align: center; color: var(--ink-2); margin-top: 2.5rem; }
@media print {
  html:has(.vb), html:has(.vb) body { width: auto !important; }
  .vb { max-width: none; width: 277mm; margin: 0; }
  .vb .vb-sheet { box-shadow: none; padding: 0; margin: 0; }
  .vb .vb-table { font-size: 7.4pt; }
  .vb .vb-table th, .vb .vb-table td { padding: .75mm .8mm; }
  .vb .vb-foot { margin-top: 3mm; }
  .vb .vb-sign span { margin-top: 8mm; }
  .vb .vb-top { margin-bottom: 3mm; }
}

/* ================================================================
   Messages
   ================================================================ */
.cm-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 1rem; }
@media (max-width: 1000px) { .cm-grid { grid-template-columns: 1fr; } }
.cm-ph { display: flex; flex-wrap: wrap; gap: .3rem; }
.cm-ph button { border: 1px solid var(--hairline); background: #fff; border-radius: 980px; padding: .2rem .65rem; font-size: .76rem; color: var(--blue); }
.cm-ph button:hover { background: #eef5fe; }
.cm-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; padding: .3rem 1.5rem 1.5rem; }
.cm-to { font-size: .76rem; color: var(--ink-3); margin-bottom: .35rem; }
.cm-bubble { background: #dcf8c6; border-radius: 12px 12px 12px 4px; padding: .7rem .85rem; font-size: .86rem; white-space: pre-line; line-height: 1.45; color: #111; }
.cm-bubble.email { background: #f5f5f7; border-radius: 12px; }
.cm-tpls .cm-bubble { background: #f5f5f7; font-size: .8rem; max-height: 160px; overflow: hidden; }
.cm-tpls { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 1rem; }
.cm-tpls .off { opacity: .55; }
.cm-wa { display: inline-flex; align-items: center; gap: .3rem; background: #25d366; color: #fff; border-radius: 980px; padding: .3rem .8rem; font-size: .8rem; font-weight: 600; white-space: nowrap; }
.cm-wa:hover { background: #1ebe5b; color: #fff; text-decoration: none; }
tr[data-status="SENT"] .cm-wa { background: #e8e8ed; color: var(--ink-2); }
.cm-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.cm-quick a { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: .9rem 1rem; color: var(--ink); }
.cm-quick a:hover { text-decoration: none; color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.cm-quick strong { display: block; font-size: .95rem; }
.cm-quick span { font-size: .78rem; color: var(--ink-3); }
@media (max-width: 900px) { .cm-quick { grid-template-columns: 1fr 1fr; } }

/* ================================================================
   Academics
   ================================================================ */
.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: .75rem; }
.ac-card { background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: .9rem 1rem; border: 1.5px solid transparent; }
.ac-card.done { border-color: #c9ecd3; }
.ac-card .muted { font-size: .75rem; color: var(--ink-3); }
.ac-sec { font-weight: 700; font-size: 1.02rem; }
.ac-pct { margin: .5rem 0 .35rem; font-size: .85rem; color: var(--ink-2); }
.ac-pct strong { font-size: 1.4rem; color: var(--ink); letter-spacing: -.02em; }
.ac-count { font-size: .95rem; }
.ac-rows { display: grid; grid-template-columns: repeat(2, 1fr); }
@media (max-width: 800px) { .ac-rows { grid-template-columns: 1fr; } }
.ac-row { display: flex; align-items: center; gap: .8rem; padding: .55rem 1.1rem; border-bottom: 1px solid var(--hairline-2); }
.ac-row:nth-child(odd) { border-right: 1px solid var(--hairline-2); }
.ac-roll { font-weight: 700; font-variant-numeric: tabular-nums; cursor: pointer; min-width: 62px; border-radius: 6px; padding: .1rem .3rem; }
.ac-roll:hover { background: var(--fill); }
.ac-name { flex: 1; min-width: 0; font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-name .muted { font-size: .72rem; color: var(--ink-3); }
.ac-row.s-A { background: #fff5f6; }
.ac-row.s-A .ac-roll { color: var(--red); }
.ac-row.s-L { background: #fffaf0; }
.ac-row .tp-pill span { padding: .25rem .6rem; }
.ac-reg td, .ac-reg th { font-size: .74rem; }
.ac-reg .d { width: 1.7em; }
@media print { .ac-reg-wrap { box-shadow: none; } .ac-reg td, .ac-reg th { font-size: 6.6pt; padding: .6mm .5mm; } }
.nav-avatar { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #1d1d1f; color: #fff; font-weight: 600; font-size: .85rem; display: grid; place-items: center; }
.nav-avatar:hover { background: #3a3a3c; }
.year-select { width: auto; }

/* ================================================================
   Course content (staff)
   ================================================================ */
.lm-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .75rem; }
.lm-subject { display: block; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow); padding: .9rem 1rem; color: var(--ink); }
.lm-subject:hover { text-decoration: none; color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.1); }
.lm-subject.off { opacity: .55; }
.lm-subject .muted, .lm-lec .muted { font-size: .75rem; color: var(--ink-3); }
.lm-sname { font-weight: 600; font-size: 1rem; margin: .1rem 0; }
.lm-counts { display: flex; gap: .8rem; margin-top: .6rem; font-size: .75rem; color: var(--ink-3); }
.lm-counts strong { color: var(--ink); }
.lm-lec { display: flex; align-items: center; gap: .9rem; padding: .6rem 1.5rem; border-top: 1px solid var(--hairline-2); }
.lm-lec.off { opacity: .6; }
.lm-thumb { width: 96px; height: 54px; border-radius: 8px; overflow: hidden; background: var(--fill); flex: none; display: grid; place-items: center; font-size: .7rem; color: var(--ink-3); }
.lm-thumb img { width: 100%; height: 100%; object-fit: cover; }
.lm-ltitle { font-weight: 600; font-size: .92rem; }
.lm-unit-form .hs-input { padding: .3rem .55rem; font-size: .9rem; }
.lm-preview img { margin-top: .5rem; width: 240px; border-radius: 10px; }
.lm-qa-preview { font-size: .78rem; color: var(--green); margin-top: .3rem; font-weight: 500; }
#id_qa { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .84rem; min-height: 360px; }

/* ================================================================
   Student portal
   ================================================================ */
body.pt { background: var(--canvas); }
.pt .muted { color: var(--ink-3); font-size: .8rem; }
.pt .small { font-size: .78rem; }
.pt-bar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 1rem; padding: .6rem 1rem;
  background: rgba(245,245,247,.88); backdrop-filter: saturate(180%) blur(14px); border-bottom: 1px solid var(--hairline); }
.pt-brand { font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.pt-brand:hover { text-decoration: none; color: var(--ink); }
.pt-brand .jb-tile { width: 26px; height: 26px; border-radius: 7px; font-size: .85rem; margin-right: .3rem; }
.pt-nav { display: flex; gap: .2rem; flex: 1; }
.pt-nav a { padding: .3rem .7rem; border-radius: 8px; color: var(--ink-2); font-size: .88rem; font-weight: 500; }
.pt-nav a.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.pt-nav a:hover { text-decoration: none; }
.pt-me { position: relative; }
.pt-me summary { list-style: none; width: 32px; height: 32px; border-radius: 50%; background: #1d1d1f; color: #fff; display: grid; place-items: center; font-weight: 600; cursor: pointer; }
.pt-me summary::-webkit-details-marker { display: none; }
.pt-menu { position: absolute; right: 0; top: 40px; background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.15); padding: .7rem; min-width: 190px; display: grid; gap: .4rem; }
.pt-menu a, .pt-menu button { text-align: left; border: 0; background: none; padding: .35rem .4rem; border-radius: 8px; color: var(--ink); font-size: .9rem; }
.pt-menu a:hover, .pt-menu button:hover { background: var(--fill); text-decoration: none; }
.pt-main { max-width: 760px; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
.pt-msg { background: var(--green-fill); color: var(--green); border-radius: 12px; padding: .6rem .9rem; margin-bottom: 1rem; font-size: .9rem; }
.pt-login { max-width: 380px; margin: 8vh auto 0; text-align: center; }
.pt-login h1 { font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; margin: .6rem 0 .3rem; }
.pt-logo { width: 64px; height: 64px; border-radius: 16px; font-size: 1.85rem; }
.pt-login h1 .jb { font-size: 1.4em; }
.pt-card { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 1.1rem; text-align: left; margin-top: 1rem; }
.pt-card label { display: block; font-size: .8rem; color: var(--ink-2); font-weight: 500; margin: .6rem 0 .25rem; }
.pt-card input { width: 100%; border: 1px solid var(--hairline); border-radius: 12px; padding: .7rem .85rem; font-size: 1rem; }
.pt-card input:focus { outline: 3px solid rgba(14,69,115,.25); border-color: var(--blue); }
.pt-card button, .pt-done button { width: 100%; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; padding: .75rem; font-size: 1rem; margin-top: 1rem; }
.pt-done button.ghost { background: var(--green-fill); color: var(--green); }
.pt-error { background: var(--red-fill); color: var(--red); border-radius: 10px; padding: .55rem .75rem; font-size: .85rem; }
.pt-hello { margin: .4rem 0 1rem; }
.pt-hello h1 { font-size: 1.7rem; font-weight: 600; letter-spacing: -.025em; margin: .1rem 0 .4rem; }
.pt-back { font-size: .9rem; }
.pt-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.pt-tile { background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: .9rem 1rem; }
.pt-tile strong { display: block; font-size: 1.6rem; font-weight: 600; letter-spacing: -.02em; margin: .1rem 0; }
.pt .bad { color: var(--red) !important; }
.pt-h { font-size: 1.05rem; font-weight: 600; margin: 1.5rem 0 .6rem; letter-spacing: -.01em; }
.pt-subjects { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .75rem; }
.pt-subject { display: block; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: .9rem 1rem; color: var(--ink); }
.pt-subject:hover { text-decoration: none; color: var(--ink); }
.pt-sname { font-weight: 600; font-size: 1rem; margin: .1rem 0; }
.pt-prog { display: flex; align-items: center; gap: .5rem; font-size: .75rem; color: var(--ink-3); margin-top: .6rem; }
.pt-list { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.pt-item { display: flex; align-items: center; gap: .8rem; padding: .8rem 1rem; border-bottom: 1px solid var(--hairline-2); color: var(--ink); }
.pt-item:last-child { border-bottom: 0; }
.pt-item:hover { text-decoration: none; color: var(--ink); background: #fafafc; }
.pt-thumb { position: relative; width: 104px; height: 58px; border-radius: 10px; overflow: hidden; background: var(--fill); flex: none; display: grid; place-items: center; }
.pt-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-thumb i { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-style: normal; font-size: 1.1rem; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.pt-lec.done strong { color: var(--ink-2); }
.pt-tick { width: 24px; height: 24px; border-radius: 50%; background: var(--green-fill); color: var(--green); display: grid; place-items: center; font-weight: 700; font-size: .8rem; flex: none; }
.pt-due { font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.pt-due.past { color: var(--ink-3); text-decoration: line-through; }
.pt-text { font-size: .92rem; line-height: 1.55; margin-top: .4rem; color: var(--ink); }
.pt-file { display: inline-block; margin-top: .5rem; font-size: .88rem; }
.pt-video { position: relative; padding-top: 56.25%; border-radius: 16px; overflow: hidden; background: #000; box-shadow: var(--shadow); }
.pt-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.pt-qa { padding: .8rem 1rem; border-bottom: 1px solid var(--hairline-2); }
.pt-qa:last-child { border-bottom: 0; }
.pt-qa summary { cursor: pointer; font-size: .93rem; line-height: 1.45; }
.pt-qa[open] summary { color: var(--blue); }
.pt-pager { display: flex; justify-content: space-between; margin-top: 1rem; font-weight: 500; }
a.pt-tile.pt-link { color: var(--ink); } a.pt-tile.pt-link:hover { text-decoration: none; }
.pt-feehero { background: #fff; border-radius: 18px; box-shadow: var(--shadow); padding: 1.1rem 1.2rem; }
.pt-feehero strong { display: block; font-size: 2.2rem; font-weight: 600; letter-spacing: -.03em; margin: .1rem 0 .3rem; }
.pt-feehero.due strong { color: var(--red); } .pt-feehero.ok strong { color: var(--green); }
.pt-feeline { font-size: .86rem; color: var(--ink-2); margin-top: .2rem; }
.pt-pay { display: block; width: 100%; text-align: center; border: 0; border-radius: 12px; background: var(--blue); color: #fff; font-weight: 600; padding: .75rem; margin-top: .9rem; font-size: 1rem; }
.pt-pay:hover { color: #fff; text-decoration: none; } .pt-pay:disabled { background: var(--fill); color: var(--ink-3); }
.pt-sem { border-bottom: 1px solid var(--hairline-2); } .pt-sem:last-child { border-bottom: 0; }
.pt-sem summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: .8rem; padding: .8rem 1rem; cursor: pointer; }
.pt-sem summary::-webkit-details-marker { display: none; }
.pt-semamt { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-tag { display: block; font-size: .72rem; font-weight: 600; color: var(--ink-3); margin-top: .1rem; }
.pt-tag.ok { color: var(--green); } .pt-tag.bad { color: var(--red); }
.pt-feetab { width: calc(100% - 2rem); margin: 0 1rem .8rem; font-size: .88rem; }
.pt-feetab td { padding: .25rem 0; color: var(--ink-2); } .pt-feetab td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.pt-feetab tr.tot td { color: var(--ink); font-weight: 600; border-top: 1px solid var(--hairline-2); }
@media (max-width: 520px) { .pt-nav a { padding: .3rem .5rem; } .pt-thumb { width: 84px; height: 48px; } }

/* study books */
.pt-book { display: flex; gap: 1rem; align-items: center; background: #fff; border-radius: 16px; box-shadow: var(--shadow);
  padding: .9rem 1rem; margin: .4rem 0 1rem; color: var(--ink); text-decoration: none; }
.pt-book:hover { text-decoration: none; box-shadow: 0 6px 22px rgba(0,0,0,.09); }
.pt-book-cover { flex: 0 0 64px; height: 88px; border-radius: 6px 9px 9px 6px; background: linear-gradient(160deg,#145a94,#0E4573);
  color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 7px; box-shadow: inset 4px 0 0 rgba(255,255,255,.12); }
.pt-book-cover b { font-family: "Abril Fatface", Georgia, serif; font-weight: 400; font-size: .7rem; background: #fff; color: #0E4573; border-radius: 3px; width: 20px; text-align: center; }
.pt-book-cover i { font-style: normal; font-size: .58rem; font-weight: 700; line-height: 1.15; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; }
.pt-book-text { display: flex; flex-direction: column; gap: .2rem; font-size: .88rem; }
.pt-book-text strong { font-size: 1rem; }
.pt-book-text em { font-style: normal; color: var(--blue); font-weight: 600; margin-top: .2rem; }
.pt-badge { font-size: .7rem; background: #eef4ff; color: var(--blue); border-radius: 6px; padding: 1px 6px; margin-left: .3rem; }
.pt-topics, .lm-topics { font-size: .84rem; line-height: 1.45; margin: -.2rem 0 .7rem; }
.lm-topics { padding: 0 1.1rem; }

/* ---------- customizable dashboard ---------- */
.db-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.db-actions { display: flex; gap: .5rem; margin-top: .4rem; }
.db-batch { display: flex; align-items: center; gap: .45rem; margin-right: .3rem; }
.db-batch label { font-size: .82rem; color: var(--ink-2); font-weight: 500; }
.db-batch select { min-width: 150px; border-radius: 10px; }
.db-editbar { display: none; gap: .5rem; }
.db-editing #db-edit { display: none; }
.db-editing .db-editbar { display: inline-flex; }
.db-picker { display: none; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.db-editing .db-picker { display: block; }
.db-help { font-size: .85rem; color: var(--ink-2); margin: 0 0 .7rem; }
.db-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem 1.4rem; }
.db-group-name { font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: .3rem; }
.db-option { display: flex; gap: .45rem; align-items: center; font-size: .86rem; padding: .15rem 0; cursor: pointer; }
.db-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; align-items: stretch; }
.db-item { position: relative; display: flex; flex-direction: column; min-width: 0; }
.db-item > .db-card { flex: 1; }
.db-S { grid-column: span 3; } .db-M { grid-column: span 6; } .db-L { grid-column: span 12; }
@media (max-width: 991px) { .db-S { grid-column: span 6; } .db-M, .db-L { grid-column: span 12; } }
@media (max-width: 520px) { .db-S { grid-column: span 12; } }
.db-card { display: block; background: #fff; border-radius: 16px; box-shadow: var(--shadow); padding: 1rem 1.1rem; color: var(--ink); text-decoration: none; }
a.db-card:hover { text-decoration: none; color: var(--ink); box-shadow: 0 6px 22px rgba(0,0,0,.08); }
.db-label { font-size: .8rem; color: var(--ink-2); font-weight: 500; }
.db-value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; margin-top: .2rem; font-variant-numeric: tabular-nums; }
.db-value small { font-size: .85rem; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.db-value.warn { color: var(--red); } .db-value.good { color: var(--green); }
.db-sub { font-size: .76rem; color: var(--ink-3); margin-top: .2rem; }
.db-bar { height: 6px; background: var(--fill, #f2f2f7); border-radius: 3px; overflow: hidden; margin-top: .5rem; }
.db-bar span { display: block; height: 100%; background: var(--green); }
.db-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 600; font-size: .92rem; margin-bottom: .6rem; }
.db-head a { font-size: .8rem; font-weight: 500; }
.db-table { width: 100%; font-size: .85rem; border-collapse: collapse; }
.db-table td { padding: .38rem .2rem; border-top: 1px solid var(--hairline-2, #f0f0f2); }
.db-table tr:first-child td { border-top: 0; }
.db-table .r { text-align: right; font-variant-numeric: tabular-nums; }
.db-table .th td { font-size: .72rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; }
.db-table .warn { color: var(--red); font-weight: 600; }
.db-table .nowrap { white-space: nowrap; }
.db-bars { display: flex; flex-direction: column; gap: .35rem; }
.db-barrow { display: grid; grid-template-columns: 4.2rem 1fr 6.5rem; gap: .6rem; align-items: center; font-size: .82rem; }
.db-barrow .d { color: var(--ink-2); } .db-barrow .a { text-align: right; font-variant-numeric: tabular-nums; }
.db-barrow .b { height: 10px; background: var(--fill, #f2f2f7); border-radius: 5px; overflow: hidden; }
.db-barrow .b i { display: block; height: 100%; background: var(--blue); border-radius: 5px; }
.db-empty { grid-column: 1 / -1; text-align: center; color: var(--ink-2); padding: 3rem 1rem; background: #fff; border-radius: 16px; }
.db-tools { display: none; position: absolute; top: -12px; right: 10px; z-index: 2; gap: 2px; background: #1d1d1f; border-radius: 9px; padding: 3px; }
.db-tools button, .db-grip { border: 0; background: transparent; color: #fff; font-size: .78rem; font-weight: 600; min-width: 24px; height: 22px; border-radius: 6px; cursor: pointer; line-height: 22px; text-align: center; }
.db-tools button:hover { background: rgba(255,255,255,.15); }
.db-tools .db-size.on { background: #fff; color: #1d1d1f; }
.db-tools .db-remove { color: #ff6961; font-size: .95rem; }
.db-grip { cursor: grab; }
.db-sizes { display: inline-flex; gap: 2px; margin: 0 2px; }
.db-editing .db-tools { display: flex; }
.db-editing .db-item > .db-card { outline: 2px dashed rgba(14,69,115,.35); outline-offset: 3px; cursor: grab; }
.db-dragging { opacity: .4; }

/* registrar letters */
.lt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem 1rem; }
.lt-grid .lt-wide { grid-column: 1 / -1; }
.lt-grid .hs-input { width: 100%; }
.lt-prev { margin-top: 1.2rem; }
.lt-list { display: flex; flex-wrap: wrap; gap: .4rem; }

/* ---------- command box (dashboard) ---------- */
.cmd-wrap { margin: .2rem 0 1.4rem; }
.cmd-box { display: flex; align-items: center; gap: .6rem; background: #fff; border-radius: 18px; padding: .45rem .5rem .45rem 1rem;
  border: 1px solid #dfe3ea; box-shadow: 0 6px 24px rgba(14, 69, 115, .08); transition: box-shadow .2s, border-color .2s; }
.cmd-box:focus-within { border-color: #0E4573; box-shadow: 0 8px 30px rgba(14, 69, 115, .18); }
.cmd-ico { color: #0E4573; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 11px; background: #eef3f8; flex: none; }
.cmd-input { flex: 1; min-width: 0; border: 0; outline: 0; font-size: 1.05rem; padding: .55rem .2rem; background: transparent; color: var(--ink); }
.cmd-input::placeholder { color: #9aa1ad; }
.cmd-kbd { font: 600 .75rem Inter, sans-serif; color: #8a919c; background: #fff; box-shadow: none; border: 1px solid #dfe3ea; border-radius: 6px; padding: .1rem .45rem; }
.cmd-go { border: 0; border-radius: 13px; background: #0E4573; color: #fff; font-weight: 600; padding: .62rem 1.3rem; }
.cmd-go:hover { background: #0b3a61; }
.cmd-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.cmd-chips button { border: 1px solid #e3e7ee; background: #fff; color: #4a5260; border-radius: 999px; font-size: .78rem; padding: .22rem .7rem; }
.cmd-chips button:hover { border-color: #0E4573; color: #0E4573; }
.cmd-item { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 1.4rem; border-bottom: 1px solid var(--hairline-2); }
.cmd-item:last-child { border-bottom: 0; }
.cmd-code { font-size: .9rem; color: #0E4573; background: #eef3f8; padding: .1rem .45rem; border-radius: 6px; }
@media (max-width: 640px) { .cmd-kbd { display: none; } .cmd-input { font-size: .95rem; } }

/* mid-term exit star on the fee card */
.fc-star { color: #b25e00; font-weight: 600; cursor: help; }
.fc-star sup { color: #e08a00; font-size: .8em; margin-left: 1px; }
.fc-star-big { color: #e08a00; }

/* placements (portal) */
.pt-h2 { font-size: 1.05rem; font-weight: 600; margin: 1.2rem 0 .4rem; }
.pt-card input[type=checkbox] { width: auto; margin-right: .4rem; }
.pt-card select, .pt-card textarea { width: 100%; border: 1px solid var(--hairline); border-radius: 12px; padding: .6rem .85rem; }

/* ---------------- notifications bell ---------------- */
.nav-bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 50%; color: #5a6070; }
.nav-bell:hover { background: rgba(14,69,115,.08); color: #0E4573; }
.nav-bell-n { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #B8860B; color: #fff; font-size: 10.5px; font-weight: 700; line-height: 17px; text-align: center; }

/* ---------------- events & initiatives (design canvas) ---------------- */
.ev-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.ev-stat { background: #fff; border: 1px solid #e2e6ec; border-radius: 10px; padding: 16px 18px; }
.ev-stat-n { font-size: 26px; font-weight: 700; color: #0E4573; line-height: 1.1; }
.ev-stat-n.blue { color: #1a6aaa; } .ev-stat-n.green { color: #1a8a5c; } .ev-stat-n.orange { color: #c86b1e; }
.ev-stat-l { font-size: 12px; color: #5a6070; margin-top: 4px; font-weight: 500; }
.ev-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.ev-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 20px; border: 1px solid #e2e6ec; background: #fff; font-size: 13px; font-weight: 500; color: #5a6070; text-decoration: none; }
.ev-chip:hover { border-color: #0E4573; color: #0E4573; }
.ev-chip.on { background: #0E4573; border-color: #0E4573; color: #fff; }
.ev-chip-n { background: rgba(0,0,0,.06); padding: 0 7px; border-radius: 10px; font-size: 11px; }
.ev-chip.on .ev-chip-n { background: rgba(255,255,255,.2); }
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.ev-card { background: #fff; border: 1px solid #e2e6ec; border-radius: 10px; padding: 18px; display: flex; flex-direction: column; gap: 10px; color: inherit; text-decoration: none; transition: box-shadow .15s; }
.ev-card:hover { box-shadow: 0 4px 16px rgba(14,69,115,.1); color: inherit; }
.ev-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ev-badge { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px; text-transform: uppercase; letter-spacing: .5px; background: #e0ecf5; color: #0E4573; }
.ev-badge.t-sports { background: #dbeafe; color: #1d4ed8; } .ev-badge.t-cultural { background: #f3e8ff; color: #7e22ce; }
.ev-badge.t-tech { background: #cffafe; color: #0e7490; } .ev-badge.t-social { background: #fce7f3; color: #be185d; }
.ev-badge.t-festival { background: #fef3c7; color: #92400e; } .ev-badge.t-fest { background: #ede9fe; color: #5b21b6; }
.ev-badge.t-celebration { background: #dcfce7; color: #166534; } .ev-badge.t-placement { background: #fde68a; color: #7c2d12; }
.ev-status { font-size: 11px; font-weight: 600; padding: 3px 10px; border-radius: 12px; background: #eef1f5; color: #5a6070; }
.ev-status.s-planning, .ev-status.s-draft { background: #fef3c7; color: #92400e; }
.ev-status.s-active { background: #dcfce7; color: #166534; }
.ev-status.s-completed, .ev-status.s-closed { background: #e0ecf5; color: #0E4573; }
.ev-status.s-verified { background: #0E4573; color: #fff; }
.ev-status.s-cancelled { background: #fee2e2; color: #991b1b; }
.ev-title { font-size: 16px; font-weight: 600; margin: 0; color: #1a1a2e; }
.ev-meta { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #5a6070; }
.ev-meta svg { vertical-align: -2px; margin-right: 5px; }
.ev-people { border-top: 1px solid #e2e6ec; padding-top: 8px; font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.ev-people b { color: #5a6070; font-weight: 500; }
.ev-foot { border-top: 1px solid #e2e6ec; padding-top: 8px; display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: #5a6070; font-weight: 500; }
.ev-link { color: #0E4573; font-weight: 600; }
.ev-hero { background: #0E4573; color: #fff; border-radius: 12px; padding: 22px 24px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin: .8rem 0 1rem; }
.ev-hero h1 { font-size: 24px; font-weight: 700; margin: 8px 0 6px; color: #fff; }
.ev-hero .ev-badge { background: rgba(255,255,255,.18); color: #fff; }
.ev-hero-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; opacity: .9; }
.ev-hero-stats { display: flex; gap: 12px; flex-wrap: wrap; align-items: stretch; }
.ev-hero-stat { background: rgba(255,255,255,.1); border-radius: 10px; padding: 10px 16px; min-width: 110px; text-align: center; }
.ev-hero-stat .n { font-size: 22px; font-weight: 700; }
.ev-hero-stat .l { font-size: 11px; opacity: .8; }
.ev-hero .fc-btn { background: #fff; color: #0E4573; border: 1px solid #fff; }
.ev-hero .fc-btn.ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.5); }
.ev-hero .fc-btn.ghost:hover { background: rgba(255,255,255,.12); color: #fff; }
.ev-hero form { margin: 0; }
.ev-card, .ev-card:hover, .ev-card * { text-decoration: none; }
.ev-cols { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .ev-cols { grid-template-columns: 1fr; } .ev-stats { grid-template-columns: 1fr 1fr; } }
.ev-person { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #e2e6ec; border-radius: 8px; }
.ev-avatar { width: 34px; height: 34px; border-radius: 50%; background: #0E4573; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex: none; }
.ev-avatar.sm { width: 28px; height: 28px; font-size: 11px; background: #1a6aaa; }
.ev-team { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; }
.ev-role { font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 10px; background: #eef1f5; color: #5a6070; text-transform: capitalize; }
.ev-role.r-winner { background: #fef3c7; color: #92400e; } .ev-role.r-runner_up { background: #f3f4f6; color: #374151; }
.ev-role.r-coordinator { background: #e0ecf5; color: #0E4573; } .ev-role.r-volunteer { background: #dcfce7; color: #166534; }
.ev-bar { height: 6px; background: #eef1f5; border-radius: 4px; overflow: hidden; }
.ev-bar span { display: block; height: 100%; background: #1a8a5c; border-radius: 4px; }
.ev-bar.gold span { background: #B8860B; }
.ev-score { font-size: 34px; font-weight: 700; color: #0E4573; line-height: 1; }
.ev-score small { font-size: 14px; color: #5a6070; font-weight: 500; }
.ev-tl { list-style: none; padding: 0; margin: 0; }
.ev-tl li { position: relative; padding: 0 0 12px 18px; font-size: 13px; border-left: 2px solid #e2e6ec; margin-left: 5px; }
.ev-tl li::before { content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px; border-radius: 50%; background: #0E4573; }
.ev-tl li:last-child { border-left-color: transparent; }
.ev-sec { font-size: 15px; font-weight: 600; color: #0E4573; margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid #e2e6ec; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ev-steps { display: flex; gap: 0; margin: 0 0 1rem; }
.ev-step { flex: 1; text-align: center; font-size: 12px; font-weight: 600; color: #8a93a3; padding: 8px 4px; border-bottom: 3px solid #e2e6ec; }
.ev-step.on { color: #0E4573; border-bottom-color: #0E4573; }
.ev-form-sec { background: #fff; border: 1px solid #e2e6ec; border-radius: 10px; padding: 20px 22px; margin-bottom: 16px; }
.ev-form-sec .lt-grid { gap: .8rem 1.2rem; }
.ev-form-sec .form-label { display: block; }
.ev-form-sec .hs-select, .ev-form-sec .hs-input { width: 100%; display: block; }
.ev-form-sec select[multiple] { min-height: 110px; }
.ev-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13px; }
.ev-checks label { display: inline-flex; gap: 6px; align-items: center; margin: 0; }
.ev-checks ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.ev-warn { background: #fef3c7; color: #92400e; border-radius: 8px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.in-progress { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #5a6070; }
.in-progress .ev-bar { flex: 1; }

/* Active student matrix (dashboard) */
.mx-toggle { display: inline-flex; flex-wrap: wrap; gap: 2px; background: #f1f2f5; border-radius: 9px; padding: 2px; }
.mx-toggle button { border: 0; background: transparent; font-size: .76rem; font-weight: 500; color: var(--ink-3, #6b6f7a); padding: .22rem .6rem; border-radius: 7px; }
.mx-toggle button.on { background: #fff; color: var(--ink, #1d1d1f); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.mx-grids { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem 1.4rem; }
.mx-grid { min-width: 0; overflow-x: auto; }
.mx-title { font-size: .74rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #0E4573; margin-bottom: .3rem; }
.mx-table { width: 100%; border-collapse: collapse; font-size: .82rem; font-variant-numeric: tabular-nums; }
.mx-table th, .mx-table td { padding: .26rem .35rem; border-top: 1px solid var(--hairline-2, #f0f0f2); white-space: nowrap; }
.mx-table thead th { border-top: 0; font-size: .74rem; font-weight: 600; color: var(--ink-3, #6b6f7a); line-height: 1.1; }
.mx-table thead th small { display: block; font-weight: 400; font-size: .68rem; }
.mx-table tbody th { font-weight: 500; text-align: left; }
.mx-table .r { text-align: right; }
.mx-table .mx-tot { background: #fffbe6; font-weight: 600; }
.mx-table tr.mx-sub th, .mx-table tr.mx-sub td { font-weight: 700; background: #fffbe6; border-top: 1px solid #e6dca8; }
.mx-table tr.mx-gap td { border: 0; padding: .15rem; }
.mx-note { margin-top: .5rem; font-size: .72rem; color: var(--ink-3, #6b6f7a); }
.mx-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .3rem; }
.mx-heads { display: inline-flex; flex-wrap: wrap; gap: 2px; text-transform: none; letter-spacing: 0; }
.mx-heads[hidden] { display: none; }
.mx-heads button { border: 1px solid #d8dbe3; background: #fff; color: var(--ink-3, #6b6f7a); font-size: .7rem; font-weight: 500; padding: .1rem .5rem; border-radius: 999px; }
.mx-heads button.on { background: #0E4573; border-color: #0E4573; color: #fff; }

/* Student portal: my record */
.pt-chip { font-size: .72rem; font-weight: 600; padding: .12rem .55rem; border-radius: 999px; white-space: nowrap; }
.pt-chip-good { background: #e7f6ec; color: #18794e; }
.pt-chip-bad { background: #fdecec; color: #b42318; }
