/* Academy Admin — deep green with an eight-pointed star lattice and gold accents.
   Rounded pill shapes throughout; arches echo Islamic architecture.
   Coral is kept for things that need attention or can't be undone.
   (Variable names are from the earlier "Lagoon" theme: --reef is the deep green base,
   --lagoon the emerald accent, --sand the soft gold.) */

:root {
  --reef: #0f3d2e;
  --reef-2: #17503c;
  --reef-text: #dcebe2;
  --reef-muted: #a9cdb9;
  --lagoon: #2f9e6b;
  --lagoon-ink: #1b7a50;       /* lagoon dark enough for text and buttons */
  --lagoon-deep: #145e3d;
  --lagoon-tint: #e2f2e9;
  --foam: #f1f5f1;             /* page background */
  --sand: #ead9a8;
  --sand-ink: #6b4f12;
  --coral: #e2553a;
  --coral-ink: #b23a22;
  --coral-tint: #fde5df;
  --sun-ink: #8a5a0b;
  --sun-tint: #fbefd6;
  --sky-ink: #24578c;
  --sky-tint: #e3edf8;
  --leaf-ink: #1c6b3d;
  --leaf-tint: #e1f3e7;
  --text: #12291f;
  --muted: #57705f;
  --line: #d8e5dc;
  --line-soft: #e7efe9;
  --surface: #ffffff;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 1px 0 #d8e7dd, 0 12px 30px rgba(15, 61, 46, .07);
  --display: "Unbounded", "Figtree", system-ui, sans-serif;
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --pattern: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96' fill='none' stroke='%23D9C27E' stroke-width='1.3' stroke-linejoin='round'%3E%3Cpath d='M31 31h34v34H31z'/%3E%3Cpath d='M48 24l24 24-24 24-24-24z'/%3E%3Ccircle cx='48' cy='48' r='8'/%3E%3Cpath d='M48 24V0M72 48h24M48 72v24M24 48H0M31 31 15 15M65 31l16-16M65 65l16 16M31 65 15 81'/%3E%3Cpath d='M0 9l9-9M87 0l9 9M96 87l-9 9M9 96 0 87'/%3E%3Cpath d='M15 15H0M15 15V0M81 15h15M81 15V0M81 81h15M81 81v15M15 81H0M15 81v15' stroke-opacity='.5'/%3E%3C/svg%3E");
  --focus: 0 0 0 3px rgba(47, 158, 107, .45);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--text); background: var(--foam); }
img { max-width: 100%; display: block; }
a { color: var(--lagoon-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--lagoon-deep); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
h2 { font-family: var(--display); font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 700; }
p { margin: 0 0 .75em; }
code { font-size: 13px; background: var(--line-soft); padding: 1px 5px; border-radius: 4px; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 8px; }
.skip:focus { left: 8px; }
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Header band ---------- */
.band { position: relative; background: var(--reef); color: #fff; overflow: clip visible; padding-bottom: 34px; }
.band-hero { padding-bottom: 96px; }
.pattern { position: absolute; inset: 0; pointer-events: none; background-image: var(--pattern); background-size: 96px 96px; background-position: right -8px top -8px; opacity: .3;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 35%, #000 75%); mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,.35) 35%, #000 75%); }
.bar { position: relative; z-index: 20; display: flex; align-items: center; gap: 18px; padding: 20px 40px; }
.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.brand:hover { color: #fff; }
.brand-mark { width: auto; height: 36px; flex: none; }
.nav { display: flex; gap: 2px; background: rgba(255, 255, 255, .08); border-radius: 99px; padding: 4px; margin: 0 auto; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.nav::-webkit-scrollbar { display: none; }
.nav-link { display: flex; align-items: center; gap: 7px; color: var(--reef-text); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 14px; border-radius: 99px; white-space: nowrap; }
.nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.nav-link.is-active { background: #fff; color: var(--reef); font-weight: 700; }
.nav-badge { background: var(--sand); color: var(--reef); font-size: 12px; font-weight: 700; border-radius: 99px; padding: 0 7px; line-height: 19px; }
.nav-link.is-active .nav-badge { background: var(--reef); color: #fff; }
.tools { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.nav + .tools { margin-left: 0; }
.tool-btn { width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25); display: grid; place-items: center; color: var(--reef-text); }
.tool-btn:hover, .tool-btn.is-active { background: rgba(255, 255, 255, .12); color: #fff; }
.nav-ico { display: none; }
.tools-name { display: none; }
.menu-btn { display: none; align-items: center; gap: 8px; margin-left: auto; background: rgba(255, 255, 255, .1); color: #fff; border: 0; border-radius: 99px; padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; }

.usermenu { position: relative; }
.usermenu summary { list-style: none; cursor: pointer; border-radius: 50%; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu .menu { position: absolute; right: 0; top: calc(100% + 10px); background: #fff; color: var(--text); border-radius: 14px; box-shadow: 0 18px 40px rgba(15, 61, 46, .25); padding: 8px; min-width: 240px; z-index: 30; }
.menu-who { margin: 0; padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); display: grid; gap: 2px; }
.menu-who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.usermenu .menu a, .usermenu .menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 9px; color: var(--text); text-decoration: none; font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; }
.usermenu .menu a:hover, .usermenu .menu button:hover { background: var(--foam); }
.usermenu form { margin: 0; }

.page-head { position: relative; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap; padding: 22px 40px 0; }
.titles { min-width: 0; flex: 1 1 420px; }
.page-head h1 { font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -.02em; line-height: 1.15; }
.subtitle { margin: 8px 0 0; color: var(--reef-text); max-width: 70ch; }
.crumb { margin: 0 0 6px; color: var(--reef-muted); font-weight: 600; font-size: 14px; }
.subtitle a, .crumb a { color: #d9c27e; }
.subtitle a:hover, .crumb a:hover { color: #fff; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }

.content { padding: 26px 40px 56px; position: relative; z-index: 3; }
.content-overlap { margin-top: -78px; }

@media (max-width: 1180px) {
  .bar { flex-wrap: wrap; }
  .menu-btn { display: inline-flex; }
  .nav { display: none; order: 5; flex: 1 0 100%; flex-direction: column; gap: 2px; border-radius: 16px; padding: 6px; margin: 4px 0 0; background: rgba(255, 255, 255, .08); }
  .band.nav-open .nav { display: flex; }
  .nav-link { padding: 11px 14px; border-radius: 12px; gap: 11px; }
  .nav-ico { display: block; }
  .nav + .tools { margin-left: 0; }
  .tools { margin-left: 0; }
}
@media (max-width: 720px) {
  .bar { padding: 14px 16px; gap: 10px; }
  .brand span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; }
  .menu-btn span { display: none; }
  .page-head { padding: 12px 16px 0; }
  .page-head h1 { font-size: 23px; }
  .content { padding: 20px 16px 44px; }
  .pattern { opacity: .16; }
}


/* ---------- Side menu layout (Settings → Menu position) ---------- */
@media (min-width: 1181px) {
  body.layout-side { padding-left: 256px; }
  body.layout-side .bar { position: fixed; z-index: 40; left: 0; top: 0; bottom: 0; width: 256px; flex-direction: column; align-items: stretch; gap: 22px; padding: 24px 16px 18px; background-color: var(--reef); overflow-y: auto; }
  body.layout-side .bar::before { content: ""; position: absolute; inset: 0; background-image: var(--pattern); background-size: 96px 96px; opacity: .1; pointer-events: none; }
  body.layout-side .bar > * { position: relative; }
  body.layout-side .brand { padding: 0 8px; }
  body.layout-side .nav { flex-direction: column; background: transparent; padding: 0; margin: 0; border-radius: 0; overflow: visible; gap: 3px; }
  body.layout-side .nav-link { padding: 10px 14px; gap: 12px; }
  body.layout-side .nav-ico { display: block; }
  body.layout-side .nav-badge { margin-left: auto; }
  body.layout-side .tools { margin: auto 0 0; padding: 16px 6px 0; border-top: 1px solid rgba(255, 255, 255, .1); }
  body.layout-side .usermenu { order: 0; }
  body.layout-side .tools-name { order: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
  body.layout-side .tools-name strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.layout-side .tools-name span { font-size: 12.5px; color: var(--reef-muted); }
  body.layout-side .tool-btn { order: 2; }
  body.layout-side .usermenu .menu { top: auto; bottom: calc(100% + 10px); left: 0; right: auto; min-width: 0; width: 216px; }
  body.layout-side .band { padding-top: 12px; }
  body.layout-side .hero { padding-top: 22px; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: inherit; font-weight: 700; font-size: 14px;
  padding: 9px 18px; border-radius: 99px; border: 1.5px solid var(--lagoon-ink);
  background: var(--lagoon-ink); color: #fff; text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { background: var(--lagoon-deep); border-color: var(--lagoon-deep); color: #fff; }
.btn .ico { width: 16px; height: 16px; }
.btn-quiet { background: var(--surface); color: var(--text); border-color: var(--line); }
.btn-quiet:hover { background: var(--foam); color: var(--text); border-color: #bdd6c5; }
.btn-danger { background: var(--coral-ink); border-color: var(--coral-ink); }
.btn-danger:hover { background: #8f2c18; border-color: #8f2c18; }
.btn-danger-quiet { background: var(--surface); color: var(--coral-ink); border-color: #f3c2b6; }
.btn-danger-quiet:hover { background: var(--coral-tint); color: #8f2c18; border-color: #f3c2b6; }
.btn-sm { padding: 6px 13px; font-size: 13px; }
.btn-block { width: 100%; padding: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.btn-row.end { justify-content: flex-end; }
/* Buttons that sit on the reef header */
.band .btn { background: var(--sand); color: var(--reef); border-color: var(--sand); }
.band .btn:hover { background: #fff; border-color: #fff; color: var(--reef); }
.band .btn-quiet { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
.band .btn-quiet:hover { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .5); }

/* ---------- Panels & layout ---------- */
.panel { background: var(--surface); border-radius: var(--radius); padding: 22px 24px; box-shadow: var(--shadow); }
.panel + .panel, .panel + .grid, .grid + .panel, .grid + .grid, .figures + .grid, .figures + .panel, .tabs + .panel, .toolbar + .panel { margin-top: 20px; }
.grid > .panel, .grid > .grid, .grid > .figures, .dash-cards > .panel { margin-top: 0; }
.panel.narrow { max-width: 540px; }
.panel.flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel.flush .panel-head { padding: 20px 24px 0; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cols-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
@media (max-width: 1000px) { .cols-3, .cols-2-1 { grid-template-columns: 1fr; } }
@media (max-width: 760px) { .cols-2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }
.section-gap { margin-top: 20px; }

/* Number tiles */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
.figure { background: var(--surface); border-radius: var(--radius); padding: 16px 20px; box-shadow: var(--shadow); text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 4px; }
a.figure:hover { color: inherit; box-shadow: 0 0 0 2px var(--lagoon), var(--shadow); }
.figure-num { font-family: var(--display); font-size: 26px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; color: var(--reef); }
.figure-label { color: var(--muted); font-size: 14px; font-weight: 600; }
.figure.attention { background: var(--sand); }
.figure.attention .figure-num { color: var(--reef); }
.figure.attention .figure-label { color: var(--sand-ink); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-weight: 700; font-size: 13px; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #f5f9f6; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table tfoot td { font-weight: 700; border-top: 2px solid var(--line); padding: 13px 16px; background: #f5f9f6; }
.table a.rowlink { color: var(--text); font-weight: 700; text-decoration: none; }
.table a.rowlink:hover { color: var(--lagoon-ink); text-decoration: underline; }
.cell-sub { display: block; color: var(--muted); font-size: 13px; }
.who { display: flex; align-items: center; gap: 12px; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; background: var(--surface); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.toolbar .field { min-width: 150px; }
.toolbar .field.grow { flex: 1; min-width: 220px; }
.count-line { color: var(--muted); font-size: 14px; margin: 18px 4px 10px; font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.req { color: var(--coral-ink); }
.field-legend { font-size: 13.5px; font-weight: 700; padding: 0; margin-bottom: 4px; }
.hint { color: var(--muted); font-size: 13px; }
input, select, textarea {
  font: inherit; font-size: 15px; color: var(--text);
  background: #fff; border: 1.5px solid #cfe0d4; border-radius: var(--radius-sm);
  padding: 8px 12px; width: 100%; min-height: 42px;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--lagoon); box-shadow: var(--focus); }
input[type="checkbox"], input[type="radio"] { width: auto; min-height: 0; accent-color: var(--lagoon-ink); }
input[type="file"] { padding: 7px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px 20px; }
.form-grid .field-wide { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.form-section + .form-section { margin-top: 28px; padding-top: 24px; border-top: 1px dashed var(--line); }
.form-section > h2 { margin-bottom: 16px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; }
.inline-form { display: inline; margin: 0; }

/* ---------- Pills, alerts, avatars ---------- */
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; padding: 3px 11px; border-radius: 99px; white-space: nowrap; }
.pill-good { background: var(--leaf-tint); color: var(--leaf-ink); }
.pill-wait { background: var(--sun-tint); color: var(--sun-ink); }
.pill-bad { background: var(--coral-tint); color: var(--coral-ink); }
.pill-new { background: var(--reef); color: #fff; }
.pill-info { background: var(--sky-tint); color: var(--sky-ink); }
.pill-plain { background: var(--line-soft); color: var(--muted); }

.alert { position: relative; padding: 13px 18px 13px 38px; border-radius: 14px; margin-bottom: 16px; font-size: 15px; box-shadow: var(--shadow); background: #fff; }
.alert::before { content: ""; position: absolute; left: 18px; top: 20px; width: 10px; height: 10px; border-radius: 50%; }
.alert-success::before { background: var(--lagoon); }
.alert-error { color: #7c2513; }
.alert-error::before { background: var(--coral); }
.alert-info::before { background: var(--sky-ink); }
.alert-warn::before { background: #e0a32e; }

.avatar { width: 44px; height: 44px; border-radius: 50%; flex: none; display: grid; place-items: center; overflow: hidden; background: var(--lagoon-tint); color: var(--lagoon-deep); font-weight: 700; font-size: 15px; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 38px; height: 38px; font-size: 13px; }
.avatar-sand { background: var(--sand); color: var(--reef); }
.avatar-lg { width: 84px; height: 84px; font-size: 26px; font-family: var(--display); font-weight: 600; }

/* ---------- Profile header & facts ---------- */
.profile-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.profile-head h2 { font-size: 22px; }
.profile-meta { display: flex; gap: 8px 16px; flex-wrap: wrap; color: var(--muted); font-size: 14.5px; margin-top: 8px; align-items: center; }
.facts { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 9px 14px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

/* ---------- Tabs (pill switcher) ---------- */
.tabs { display: inline-flex; gap: 2px; background: var(--surface); border-radius: 99px; padding: 4px; box-shadow: var(--shadow); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 8px 16px; text-decoration: none; color: var(--muted); font-weight: 700; font-size: 14px; border-radius: 99px; white-space: nowrap; }
.tab:hover { color: var(--text); background: var(--foam); }
.tab.is-active { background: var(--reef); color: #fff; }
.tab .tab-count { font-weight: 600; opacity: .7; margin-left: 6px; }
.tabs + .toolbar, .tabs + .grid, .tabs + .section-gap { margin-top: 18px; }

/* ---------- Attendance marker ---------- */
.mark { display: inline-flex; gap: 4px; background: var(--foam); border-radius: 99px; padding: 3px; }
.mark input { position: absolute; opacity: 0; pointer-events: none; }
.mark label { padding: 6px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; color: var(--muted); border-radius: 99px; user-select: none; }
.mark label:hover { color: var(--text); }
.mark input:focus-visible + label { box-shadow: var(--focus); }
.mark input[value="present"]:checked + label { background: var(--lagoon-ink); color: #fff; }
.mark input[value="late"]:checked + label { background: var(--sand); color: var(--sand-ink); }
.mark input[value="absent"]:checked + label { background: var(--coral-ink); color: #fff; }
.rate-bar { height: 8px; background: var(--line-soft); border-radius: 99px; overflow: hidden; min-width: 80px; }
.rate-bar span { display: block; height: 100%; background: var(--lagoon); border-radius: 99px; }

/* ---------- Class cards ---------- */
.class-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.class-card { background: var(--surface); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; box-shadow: var(--shadow); }
.class-card:hover { color: inherit; box-shadow: 0 0 0 2px var(--lagoon), var(--shadow); }
.class-card h3 { font-family: var(--display); font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.class-code { font-size: 12.5px; font-weight: 700; color: var(--reef); background: var(--sand); padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.class-card .meta { color: var(--muted); font-size: 14px; display: grid; gap: 2px; }
.class-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: auto; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 14px; }
.class-card.inactive { opacity: .6; }

/* ---------- Lists ---------- */
.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line-soft); }
.list li:first-child { border-top: 0; padding-top: 0; }
.list .grow { flex: 1; min-width: 0; }

/* ---------- Empty, pager ---------- */
.empty { text-align: center; padding: 48px 20px; }
.empty h2 { margin-bottom: 8px; }
.panel .empty { padding: 28px 10px; }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center; padding: 16px; }

/* ---------- Confirm dialog ---------- */
dialog.confirm { border: 0; border-radius: 20px; padding: 26px; width: min(430px, calc(100vw - 32px)); box-shadow: 0 24px 60px rgba(15, 61, 46, .35); color: var(--text); }
dialog.confirm::backdrop { background: rgba(15, 61, 46, .55); }
.confirm-title { font-size: 18px; margin-bottom: 10px; }
.confirm-type { margin: 12px 0; display: grid; gap: 6px; font-size: 14px; }
dialog.confirm .btn-row { justify-content: flex-end; margin-top: 18px; }

/* ---------- Dashboard ---------- */
.hero { position: relative; z-index: 1; padding: 26px 40px 0; display: grid; grid-template-columns: minmax(0, 460px) minmax(0, 1fr); gap: 32px; min-height: 190px; }
@media (min-width: 1001px) and (max-width: 1320px) { .hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero-date { margin: 0 0 10px; color: #d9c27e; font-weight: 600; }
.hero h1 { font-family: var(--display); font-weight: 600; font-size: 38px; letter-spacing: -.02em; line-height: 1.12; }
.hero-lede { margin: 14px 0 0; font-size: 18px; color: var(--reef-text); line-height: 1.45; }
.hero-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; align-self: start; }
.hero-tile { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px 15px; border-radius: 22px; background: rgba(11, 46, 34, .55); border: 1px solid rgba(217, 194, 126, .35); color: #fff; text-decoration: none; min-width: 0; }
.hero-tile:hover { background: rgba(11, 46, 34, .8); border-color: rgba(217, 194, 126, .7); color: #fff; }
.hero-tile-label { color: #d9c27e; font-weight: 600; font-size: 14px; }
.hero-tile strong { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1.15; letter-spacing: -.02em; }
.hero-tile-sub { color: var(--reef-text); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dash-main { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; margin-bottom: 20px; }
.dash-main > .panel { margin-top: 0; }
.dash-chips { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
.dash-chip { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 16px; background: var(--foam); color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; line-height: 1.3; }
.dash-chip strong { font-family: var(--display); font-weight: 600; font-size: 24px; color: var(--reef); line-height: 1.2; }
a.dash-chip:hover { background: var(--lagoon-tint); color: var(--text); }
.dash-chip.is-hot { background: var(--sand); color: var(--sand-ink); }
.dash-chip.is-plain { background: none; box-shadow: inset 0 0 0 1px var(--line); }
.pay-waiting { display: flex; align-items: center; gap: 16px; padding: 14px 18px; border-radius: 18px; background: var(--foam); color: var(--text); text-decoration: none; margin-bottom: 14px; }
.pay-waiting:hover { background: var(--lagoon-tint); color: var(--text); }
.pay-waiting-n { font-family: var(--display); font-weight: 600; font-size: 34px; line-height: 1; color: var(--lagoon-ink); min-width: 52px; text-align: center; }
.pay-waiting.is-hot { background: var(--sand); }
.pay-waiting.is-hot .pay-waiting-n { color: var(--reef); }
.pay-waiting.is-hot .cell-sub { color: var(--sand-ink); }
.pay-month { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); }
.pay-month p { margin: 0; }
.pay-month .muted { font-size: 14px; margin-top: 8px; }
.meter { display: block; height: 10px; border-radius: 99px; background: var(--lagoon-tint); margin-top: 10px; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 99px; background: var(--lagoon-ink); min-width: 4px; }
.dash-section { font-family: var(--display); font-weight: 600; font-size: 19px; margin: 30px 0 14px; color: var(--reef); }
.dash-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.dash-charts > .panel { margin-top: 0; }
.dash-charts .panel-head .muted { font-size: 13px; }

/* Charts: one emerald series, thin bars with rounded tops, hairline grid */
.chart { position: relative; }
.chart-plot { position: relative; height: 190px; margin: 30px 0 0 44px; }
.chart-tick { position: absolute; left: 0; right: 0; height: 0; border-top: 1px solid var(--line-soft); }
.chart-tick:first-child { border-top-color: #b9cdbf; }
.chart-tick em { position: absolute; right: calc(100% + 8px); top: -9px; font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.chart-bars { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); align-items: end; }
.chart-col { position: relative; height: 100%; display: flex; align-items: flex-end; justify-content: center; outline: none; cursor: default; }
.chart-col:hover, .chart-col:focus-visible { background: rgba(47, 158, 107, .07); border-radius: 8px 8px 0 0; }
.chart-bar { position: relative; display: block; width: min(24px, 62%); background: var(--lagoon-ink); border-radius: 4px 4px 0 0; }
.chart-col:hover .chart-bar, .chart-col:focus-visible .chart-bar { background: var(--lagoon-deep); }
.chart-val { position: absolute; bottom: calc(100% + 4px); left: 50%; transform: translateX(-50%); font-size: 12px; font-weight: 700; color: var(--text); white-space: nowrap; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; color: var(--muted); font-size: 14px; }
.chart-x { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); margin: 6px 0 0 44px; font-size: 12px; color: var(--muted); text-align: center; }
.chart-x span { white-space: nowrap; overflow: hidden; }
.chart-data { margin-top: 12px; font-size: 14px; }
.chart-data summary { cursor: pointer; color: var(--lagoon-ink); font-weight: 600; width: max-content; }
.chart-data .table { margin-top: 8px; }
.chart-data .table td, .chart-data .table th { padding: 6px 10px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.hbars li { display: grid; grid-template-columns: minmax(70px, 34%) minmax(0, 1fr) auto; align-items: center; gap: 10px; font-size: 14px; }
.hbar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.hbar-label a { color: var(--text); text-decoration: none; }
.hbar-label a:hover { color: var(--lagoon-ink); text-decoration: underline; }
.hbar-track { display: block; height: 14px; }
.hbar { display: block; height: 100%; background: var(--lagoon-ink); border-radius: 0 4px 4px 0; }
.hbar-val { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }
.chart-tip { position: fixed; z-index: 60; pointer-events: none; background: var(--reef); color: #fff; font-size: 13px; font-weight: 600; padding: 6px 11px; border-radius: 10px; box-shadow: 0 8px 20px rgba(15, 61, 46, .25); transform: translate(-50%, calc(-100% - 10px)); white-space: nowrap; }
.chart-tip[hidden] { display: none; }
.dash-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.todo-n { min-width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 15px; background: var(--lagoon-tint); color: var(--lagoon-ink); flex: none; }
.todo-n.hot { background: var(--coral-tint); color: var(--coral-ink); }
.todo li { justify-content: flex-start; gap: 14px; }
.todo a { color: var(--text); text-decoration: none; font-weight: 600; line-height: 1.3; }
.todo a:hover { color: var(--lagoon-ink); }
.tide { display: flex; align-items: flex-end; gap: 18px; }
.tide-glass { position: relative; width: 104px; height: 140px; clip-path: url(#archClip); background: var(--lagoon-tint); overflow: hidden; flex: none; }
.tide-water { position: absolute; left: 0; right: 0; bottom: 0; }
.tide-water .fill { position: absolute; inset: 0; background: var(--lagoon); }
.big-num { font-family: var(--display); font-weight: 600; font-size: 42px; line-height: 1; color: var(--reef); margin: 0; letter-spacing: -.02em; }
.big-num small { font-size: 21px; color: #6c8576; }
.strips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.strip { border-radius: var(--radius); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-decoration: none; background: #fff; color: var(--muted); box-shadow: var(--shadow); }
.strip strong { font-family: var(--display); font-weight: 600; font-size: 18px; color: var(--lagoon-ink); white-space: nowrap; }
.strip-reef { background: var(--reef); color: #bcd6c5; }
.strip-reef strong { color: #fff; }
.strip-sand { background: var(--sand); color: var(--sand-ink); }
.strip-sand strong { color: var(--reef); }
a.strip:hover { filter: brightness(1.04); }
@media (max-width: 1000px) {
  .hero { grid-template-columns: 1fr; }
  .dash-cards, .strips, .dash-main, .dash-charts { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hero { padding: 12px 16px 0; min-height: 0; }
  .hero h1 { font-size: 27px; }
  .hero-lede { font-size: 16px; }
  .band-hero { padding-bottom: 90px; }
  .hero-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .hero-tile { padding: 12px 14px; border-radius: 18px; }
  .hero-tile strong { font-size: 26px; }
  .dash-chips { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-x .chart-x-thin { visibility: hidden; }
}


/* ---------- Fees ---------- */
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.month-chip { border-radius: 14px; padding: 10px 14px; display: flex; flex-direction: column; gap: 1px; background: var(--line-soft); }
.month-chip strong { font-size: 14.5px; }
.month-chip span { font-size: 12.5px; font-weight: 600; }
.month-good { background: var(--leaf-tint); color: var(--leaf-ink); }
.month-wait { background: var(--sun-tint); color: var(--sun-ink); }
.month-bad { background: var(--coral-tint); color: var(--coral-ink); }
.month-plain { background: var(--line-soft); color: var(--muted); }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.picks input { position: absolute; opacity: 0; pointer-events: none; }
.picks label { padding: 7px 14px; border-radius: 99px; background: var(--foam); border: 1.5px solid var(--line); font-weight: 600; font-size: 14px; cursor: pointer; user-select: none; }
.picks label:hover { border-color: var(--lagoon); }
.picks input:checked + label { background: var(--reef); border-color: var(--reef); color: #fff; }
.picks input:focus-visible + label { box-shadow: var(--focus); }
.slip-view { background: var(--foam); border-radius: var(--radius-sm); padding: 10px; display: grid; place-items: center; min-height: 240px; }
.slip-view img { max-height: 640px; width: auto; border-radius: 8px; }
.slip-view iframe { width: 100%; height: 640px; border: 0; border-radius: 8px; background: #fff; }
.review-actions textarea { min-height: 70px; }

@media (max-width: 1000px) {
  .mobile-first { order: -1; }
}
/* Tables that turn into stacked cards on phones */
@media (max-width: 720px) {
  .table-cards thead { display: none; }
  .table-cards, .table-cards tbody, .table-cards tr, .table-cards td { display: block; width: 100%; }
  .table-cards tr { padding: 12px 18px; border-bottom: 1px solid var(--line-soft); }
  .table-cards tr:last-child { border-bottom: 0; }
  .table-cards td { border: 0; padding: 4px 0 4px 96px; position: relative; text-align: right; white-space: normal; }
  .table-cards td::before { content: attr(data-label); position: absolute; left: 0; top: 5px; color: var(--muted); font-weight: 600; font-size: 13px; text-align: left; }
  .table-cards td:not([data-label]) { padding-left: 0; }
  .table-cards td:not([data-label])::before { content: none; }
  .table-cards td .cell-sub { display: block; }
  .table-cards tbody tr:hover td { background: none; }
}

/* ---------- View as banner ---------- */
.viewas-bar { position: sticky; top: 0; z-index: 60; display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; padding: 10px 24px; background: var(--sand); color: var(--reef); font-size: 14.5px; box-shadow: 0 2px 10px rgba(15, 61, 46, .2); }
.viewas-bar span { display: flex; align-items: center; gap: 8px; }
.viewas-bar form { margin: 0; }
.viewas-bar .btn { background: var(--reef); border-color: var(--reef); color: #fff; }
.viewas-bar .btn:hover { background: #0b2e22; border-color: #0b2e22; color: #fff; }
.viewas-bar .btn-ghost { background: transparent; color: var(--reef); border-color: rgba(15, 61, 46, .35); }
.viewas-bar .btn-ghost:hover { background: rgba(15, 61, 46, .08); color: var(--reef); border-color: var(--reef); }
.viewas-bar.is-editing { background: var(--coral-ink); color: #fff; }
.viewas-bar.is-editing .btn { background: #fff; border-color: #fff; color: var(--coral-ink); }
.viewas-bar.is-editing .btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .6); }
.viewas-bar.is-editing .btn-ghost:hover { background: rgba(255, 255, 255, .12); }
@media (min-width: 1181px) {
  body.layout-side.viewing-as .viewas-bar { margin-left: 0; }
  body.layout-side.viewing-as .bar { top: 0; }
}

/* ---------- Sign-in animation ---------- */
.login-loader { position: fixed; inset: 0; z-index: 1000; background: var(--reef); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; cursor: pointer; animation: ll-out .5s ease 1.4s forwards; }
.ll-pattern { position: absolute; inset: 0; background-image: var(--pattern); background-size: 96px 96px; opacity: .1; pointer-events: none; }
.ll-stage { position: relative; width: min(240px, 58vw); aspect-ratio: 157 / 140; }
.ll-art, .ll-logo { position: absolute; inset: 0; width: 100%; height: 100%; }
.ll-art { overflow: visible; }
.ll-line { stroke: #ecdcab; stroke-width: .75; stroke-linecap: round; stroke-linejoin: round; opacity: 0; }
.ll-name { position: relative; margin: 22px 0 0; font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -.01em; }
.ll-hello { position: relative; margin: 6px 0 0; color: var(--reef-muted); font-size: 15px; }
.ll-skip { position: absolute; bottom: 22px; left: 0; right: 0; font-size: 13px; color: rgba(255, 255, 255, .35); }

/* The full sequence runs once the script has measured the lines (adds .go) */
.login-loader.go { animation: ll-out .6s ease 3.05s forwards; }
.login-loader.go .ll-pattern { opacity: 0; animation: ll-to-faint 1.6s ease .1s forwards; }
.login-loader.go .ll-line { opacity: 1; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); filter: drop-shadow(0 0 1.2px rgba(236, 220, 171, .8)); animation: ll-draw 1.35s cubic-bezier(.65, .05, .3, 1) var(--ld) forwards; }
.login-loader.go .ll-lines { animation: ll-fade 0.7s ease 2.15s forwards; }
.login-loader.go .ll-logo { opacity: 0; transform: scale(.95); animation: ll-logo 0.8s cubic-bezier(.2, .7, .2, 1) 1.95s forwards; }
.login-loader.go .ll-name { opacity: 0; transform: translateY(8px); animation: ll-up .6s ease 2.2s forwards; }
.login-loader.go .ll-hello { opacity: 0; transform: translateY(8px); animation: ll-up .6s ease 2.35s forwards; }
.login-loader.ll-done { animation: ll-out .3s ease forwards !important; }
@keyframes ll-draw { to { stroke-dashoffset: 0; } }
@keyframes ll-fade { to { opacity: 0; } }
@keyframes ll-to-faint { to { opacity: .1; } }
@keyframes ll-logo { to { opacity: 1; transform: none; } }
@keyframes ll-up { to { opacity: 1; transform: none; } }
@keyframes ll-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) {
  .login-loader, .login-loader.go { animation: ll-out .4s ease .9s forwards; }
    .login-loader.go .ll-logo, .login-loader.go .ll-name, .login-loader.go .ll-hello, .login-loader.go .ll-pattern { animation: none; opacity: 1; transform: none; }
  .login-loader.go .ll-pattern { opacity: .1; }
}

/* ---------- Auth & bare pages ---------- */
body.bare { background: var(--reef); position: relative; min-height: 100vh; overflow-x: hidden; }
.pattern-bare { position: fixed; opacity: .14; -webkit-mask-image: none; mask-image: none; }
.auth-wrap { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { background: var(--surface); border-radius: 24px; padding: 32px; width: 100%; max-width: 420px; box-shadow: 0 24px 60px rgba(0, 0, 0, .25); }
.auth-card-wide { max-width: 580px; }
.auth-brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 600; margin-bottom: 22px; }
.auth-card .auth-brand { color: var(--reef); }
.auth-card .brand-mark, .public-head .brand-mark { height: 48px; }
.slip-logo { height: 52px; width: auto; }
.auth-title { font-family: var(--display); font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin-bottom: 18px; }
.public-wrap { position: relative; z-index: 1; max-width: 880px; margin: 0 auto; padding: 32px 16px 64px; }
.public-head { color: #fff; margin-bottom: 24px; }
.public-head .auth-brand { color: #fff; }
.public-head h1 { font-family: var(--display); font-size: 32px; font-weight: 600; letter-spacing: -.02em; }
.public-head p { color: var(--reef-text); margin-top: 8px; font-size: 17px; }
.hp { position: absolute; left: -5000px; }

/* ---------- Payroll ---------- */
.pay-table input { min-height: 34px; padding: 4px 8px; text-align: right; width: 92px; font-size: 14px; border-radius: 10px; }
.pay-table input.pay-sm { width: 64px; }
.pay-table input.pay-lg { width: 116px; }
.pay-table th { white-space: nowrap; font-size: 12.5px; }
.pay-table .pay-groups th { text-align: center; border-bottom: 0; padding-bottom: 2px; }
.pay-table .grp-allow { background: rgba(47, 158, 107, .05); }
.pay-table .grp-ded { background: rgba(226, 85, 58, .045); }
.pay-table .pay-name { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 190px; box-shadow: 1px 0 0 var(--line-soft); }
.pay-table tfoot .pay-name { background: #f5f9f6; }
.pay-table td { padding: 9px 10px; }
.pay-table th { padding: 12px 10px; }
.pay-table .net { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--reef); }
.month-nav { display: flex; align-items: center; gap: 8px; }
.month-nav input { width: auto; }

/* ---------- Payslip / print ---------- */
.slip { max-width: 760px; }
.slip-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid var(--reef); padding-bottom: 16px; margin-bottom: 18px; }
.slip-head h2 { font-size: 21px; }
.slip .table td, .slip .table th { padding: 9px 4px; }
@media print {
  body { background: #fff; }
  .band, .no-print, .skip { display: none !important; }
  .content { padding: 0; margin: 0; }
  .panel { box-shadow: none; padding: 0; }
}

/* ---------- Classes, timetable, student extras ---------- */
.facts-inline { display: flex; flex-wrap: wrap; gap: 8px 32px; }
.facts-inline p { margin: 0; font-weight: 600; }
.facts-inline span { display: block; color: var(--muted); font-size: 13px; }
.pick-list { max-height: 420px; overflow-y: auto; }
.pick-list li { padding: 8px 0; }
.pick-list .check { align-items: flex-start; gap: 10px; width: 100%; cursor: pointer; }
.pick-list .check input { margin-top: 3px; }
.admission-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 14px; }
.class-card .class-level { color: var(--lagoon-ink); font-weight: 600; }
.tt { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 300px); gap: 16px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.tt-col { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px; display: grid; gap: 8px; }
.tt-teacher { font-family: var(--display); font-weight: 600; font-size: 15px; margin: 2px 4px 6px; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; color: var(--reef); }
.tt-teacher span { font-family: var(--font); font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.tt-class { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 14px; background: var(--foam); color: var(--text); text-decoration: none; }
.tt-class:hover { background: var(--lagoon-tint); color: var(--text); }
.tt-time { font-family: var(--display); font-weight: 600; font-size: 14px; color: var(--lagoon-ink); }
.tt-body { min-width: 0; display: grid; font-size: 13.5px; line-height: 1.3; }
.tt-body strong { overflow-wrap: anywhere; }
.tt-body span { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.tt-n { min-width: 30px; height: 26px; padding: 0 8px; border-radius: 99px; background: var(--surface); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
@media (max-width: 720px) { .tt { grid-auto-flow: row; grid-auto-columns: auto; } }
@media print { .tt { grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); overflow: visible; } .tt-col { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; } }

.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--lagoon-ink); text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.linklike:hover { color: var(--lagoon-deep); }
.linklike.small { font-size: 13px; }

/* Status pills: quick status change on profiles and edit forms */
.status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; padding: 14px 18px; margin: 0 0 22px; border-radius: 18px; background: var(--foam); border: 0; }
.status-bar > .status-label { font-weight: 700; font-size: 14px; }
.status-bar .field { margin: 0; min-width: 170px; }
.status-pills { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.status-pills input { position: absolute; opacity: 0; pointer-events: none; }
.status-pills label, .status-pills button, .status-pills .sp-on { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); }
.status-pills label::before, .status-pills button::before, .status-pills .sp-on::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; opacity: .55; }
.status-pills label:hover, .status-pills button:hover { border-color: #b9cdbf; color: var(--text); }
.status-pills input:focus-visible + label { outline: 2px solid var(--lagoon); outline-offset: 2px; }
.status-pills input:checked + label.sp-good, .status-pills .sp-on.sp-good { background: var(--lagoon-tint); border-color: var(--lagoon); color: var(--lagoon-ink); }
.status-pills input:checked + label.sp-wait, .status-pills .sp-on.sp-wait { background: #fbf1d6; border-color: #e0a32e; color: var(--sand-ink); }
.status-pills input:checked + label.sp-bad, .status-pills .sp-on.sp-bad { background: var(--coral-tint); border-color: var(--coral); color: var(--coral-ink); }
.status-pills input:checked + label.sp-plain, .status-pills .sp-on.sp-plain { background: var(--line-soft); border-color: #9fb5a7; color: var(--text); }
.status-pills input:checked + label::before, .status-pills .sp-on::before { opacity: 1; }
.status-pills .sp-on { cursor: default; }
.profile-status { margin-top: 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.profile-status .muted { font-size: 13px; }
.bulk-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 20px; border-bottom: 1px solid var(--line-soft); }
.table .check-col { width: 36px; padding-right: 0; }

/* Student portal */
.my-class { gap: 14px; }
.my-class-time { font-family: var(--display); font-weight: 600; font-size: 15px; color: var(--lagoon-ink); background: var(--lagoon-tint); padding: 4px 12px; border-radius: 99px; }
.my-teacher { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--foam); }
.my-facts { font-size: 14px; grid-template-columns: 80px 1fr; }


/* Books */
.field .label { font-size: 13.5px; font-weight: 700; color: var(--text); }
.row-muted td { color: var(--muted); }
.row-muted td a { color: inherit; }
.stock-table td.num { font-variant-numeric: tabular-nums; }
.stock-table td.stock-low { color: var(--sand-ink); background: #fbf2dc; font-weight: 700; }
.stock-table td.stock-out { color: var(--coral-ink); background: var(--coral-tint); font-weight: 700; }
.sale-form .fees-only { display: none; }
.sale-form:has(#pv_fees:checked) .fees-only { display: block; }
.sale-form:has(#pv_fees:checked) .counter-only { display: none; }
.sale-form:has(#f_student_index:not(:placeholder-shown)) .buyer-only { display: none; }
.plain-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.stock-table td.stock-none { color: var(--muted); opacity: .6; }
.stock-table td.stock-out strong { color: var(--coral-ink); font-size: 13px; }
