/* Opus1 admin: warm, calm, green-accented design system. */
:root {
  --canvas: #f4f3ef;
  --surface: #fbfaf8;
  --card: #ffffff;
  --side: #f7f6f2;
  --line: #e8e6e0;
  --line-strong: #dcd9d1;
  --ink: #1c2420;
  --ink-2: #3d4541;
  --muted: #737a75;
  --faint: #a3a8a4;
  --green: #1f4d3a;
  --green-2: #2c6a50;
  --green-soft: #e4eee7;
  --green-tint: #f0f5f1;
  --on-green: #ffffff;
  --warn: #b5651d;
  --warn-soft: #fbeedd;
  --danger: #b4372c;
  --danger-soft: #f9e4e1;
  --ok: #2c7a4b;
  /* lesson pastels: bg / edge / ink */
  --c0-bg: #e3efe6; --c0-edge: #a8cbb3; --c0-ink: #1f4d3a;
  --c1-bg: #fcebdb; --c1-edge: #f0c39b; --c1-ink: #8a4a17;
  --c2-bg: #e9e6f7; --c2-edge: #c3bbe9; --c2-ink: #433a85;
  --c3-bg: #e0edf6; --c3-edge: #a9cbe3; --c3-ink: #1f5478;
  --c4-bg: #f8e3e7; --c4-edge: #e7b3bf; --c4-ink: #8a2f47;
  --c5-bg: #f6efd6; --c5-edge: #e1cf8f; --c5-ink: #6b5810;
  --busy-bg: #ecebe7; --busy-ink: #6f746f;
  --off-stripe: #f3e1dc;
  --shadow-sm: 0 1px 2px rgba(28, 36, 32, .04);
  --shadow: 0 1px 2px rgba(28, 36, 32, .04), 0 6px 20px rgba(28, 36, 32, .05);
  --shadow-lg: 0 24px 60px rgba(28, 36, 32, .18);
  --r: 14px;
  --r-sm: 10px;
  --hour: 84px;
  font-family: "Plus Jakarta Sans", ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #121513; --surface: #161a18; --card: #1c211e; --side: #171b19; --line: #2a302c; --line-strong: #353c37;
    --ink: #e9ece9; --ink-2: #c9cec9; --muted: #98a09a; --faint: #6c746e;
    --green: #8fd0ad; --green-2: #a9dcc0; --green-soft: #22352b; --green-tint: #1b2721; --on-green: #10241a;
    --warn: #f0b072; --warn-soft: #3a2a19; --danger: #f19a8f; --danger-soft: #3a1f1c; --ok: #7fcf9c;
    --c0-bg: #1f3329; --c0-edge: #3f6b53; --c0-ink: #bfe3cc;
    --c1-bg: #3a2a1c; --c1-edge: #7a5330; --c1-ink: #f6cfa8;
    --c2-bg: #2a2742; --c2-edge: #5a5195; --c2-ink: #d3cdf7;
    --c3-bg: #1c2d3a; --c3-edge: #3d6688; --c3-ink: #bcdcf3;
    --c4-bg: #3a2229; --c4-edge: #7f4252; --c4-ink: #f4c3cf;
    --c5-bg: #35301b; --c5-edge: #776732; --c5-ink: #ecdfa6;
    --busy-bg: #262b28; --busy-ink: #9aa29c; --off-stripe: #3a2522;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #121513; --surface: #161a18; --card: #1c211e; --side: #171b19; --line: #2a302c; --line-strong: #353c37;
  --ink: #e9ece9; --ink-2: #c9cec9; --muted: #98a09a; --faint: #6c746e;
  --green: #8fd0ad; --green-2: #a9dcc0; --green-soft: #22352b; --green-tint: #1b2721; --on-green: #10241a;
  --warn: #f0b072; --warn-soft: #3a2a19; --danger: #f19a8f; --danger-soft: #3a1f1c; --ok: #7fcf9c;
  --c0-bg: #1f3329; --c0-edge: #3f6b53; --c0-ink: #bfe3cc;
  --c1-bg: #3a2a1c; --c1-edge: #7a5330; --c1-ink: #f6cfa8;
  --c2-bg: #2a2742; --c2-edge: #5a5195; --c2-ink: #d3cdf7;
  --c3-bg: #1c2d3a; --c3-edge: #3d6688; --c3-ink: #bcdcf3;
  --c4-bg: #3a2229; --c4-edge: #7f4252; --c4-ink: #f4c3cf;
  --c5-bg: #35301b; --c5-edge: #776732; --c5-ink: #ecdfa6;
  --busy-bg: #262b28; --busy-ink: #9aa29c; --off-stripe: #3a2522;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 24px 60px rgba(0,0,0,.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--canvas); color: var(--ink); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
svg { display: block; }
[data-icon] { display: inline-flex; align-items: center; justify-content: center; flex: none; }
[data-icon] svg, .icon-btn svg { width: 18px; height: 18px; }
.btn svg, .tag svg, .link svg { width: 16px; height: 16px; flex: none; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
a { color: inherit; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea { background: var(--card); border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  padding: 8px 11px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px var(--green-soft); }
textarea { resize: none; }
select { appearance: none; padding-right: 30px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
  linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 15px) 52%, calc(100% - 10px) 52%;
  background-size: 5px 5px; background-repeat: no-repeat; }

/* ---------- app shell ---------- */
.app { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--side); border-right: 1px solid var(--line); padding: 22px 18px 18px; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; padding: 4px 6px 22px; }
.logo-mark { width: 42px; height: 42px; border-radius: 11px; background: var(--green); color: var(--on-green); }
.logo-mark svg { width: 22px; height: 22px; }
.logo-mark.sm { width: 32px; height: 32px; border-radius: 9px; }
.logo-mark.sm svg { width: 17px; height: 17px; }
.logo-text { display: flex; flex-direction: column; line-height: 1; }
.logo-text b { font-size: 27px; font-weight: 800; letter-spacing: -.03em; }
.logo-text b i { color: var(--green-2); font-style: normal; }
.logo-text small { font-size: 9.5px; letter-spacing: .28em; color: var(--muted); margin-top: 5px; font-weight: 600; }
.workspace { position: relative; display: flex; align-items: center; background: var(--card); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-sm); margin-bottom: 26px; }
.workspace select { flex: 1; border: 0; background: transparent; padding: 13px 34px 13px 50px; font-weight: 500; cursor: pointer;
  background-image: none; box-shadow: none; }
.ws-icon { position: absolute; left: 10px; width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); pointer-events: none; }
.ws-icon svg { width: 15px; height: 15px; }
.ws-caret { position: absolute; right: 12px; pointer-events: none; color: var(--muted); }
.side-label { font-size: 12.5px; color: var(--muted); font-weight: 600; margin: 4px 10px 8px; }
.nav { display: grid; gap: 4px; margin-bottom: 20px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; text-decoration: none;
  color: var(--ink-2); font-weight: 500; transition: background .15s; }
.nav a:hover { background: var(--green-tint); }
.nav a.active { background: var(--green-soft); color: var(--green); font-weight: 700; }
.nav a [data-icon] { color: var(--muted); }
.nav a.active [data-icon] { color: var(--green); }
.count { margin-left: auto; font-style: normal; font-size: 12px; font-weight: 600; color: var(--muted); min-width: 20px; text-align: center; }
.count:empty { display: none; }
.count.warn { color: var(--warn); background: var(--warn-soft); border-radius: 8px; padding: 0 6px; }
.side-bottom { margin-top: auto; display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 14px; }
.gcal-card { display: flex; gap: 12px; align-items: center; padding: 8px 10px; }
.gcal-card .g { font-weight: 800; font-size: 22px; color: var(--green); width: 26px; text-align: center; }
.gcal-card b { display: block; font-weight: 600; font-size: 13.5px; }
.gcal-card span { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: var(--faint); }
.dot.ok { background: #3fae6a; }
.dot.warn { background: var(--warn); }
.dot.bad { background: var(--danger, #d0453a); }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.side-link:hover { background: var(--green-tint); }
.side-link [data-icon] { color: var(--muted); }
.me { display: flex; align-items: center; gap: 12px; padding: 12px 8px 4px; border-top: 1px solid var(--line); margin-top: 6px; }
.me b { display: block; font-weight: 600; }
.me span:not(.avatar) { color: var(--muted); font-size: 12.5px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700;
  background: var(--green-soft); color: var(--green); flex: none; }
.avatar.lg { width: 42px; height: 42px; font-size: 14px; }
.avatar.photo { background: var(--line); overflow: hidden; }
.avatar.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.sm { width: 30px; height: 30px; font-size: 11px; }
.avatar.c0 { background: var(--c0-bg); color: var(--c0-ink); } .avatar.c1 { background: var(--c1-bg); color: var(--c1-ink); }
.avatar.c2 { background: var(--c2-bg); color: var(--c2-ink); } .avatar.c3 { background: var(--c3-bg); color: var(--c3-ink); }
.avatar.c4 { background: var(--c4-bg); color: var(--c4-ink); } .avatar.c5 { background: var(--c5-bg); color: var(--c5-ink); }
.scrim { display: none; }

.main { min-width: 0; background: var(--surface); }
.top { display: flex; align-items: center; gap: 14px; height: 76px; padding: 0 40px; border-bottom: 1px solid var(--line);
  background: var(--surface); position: sticky; top: 0; z-index: 30; }
.crumbs { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.crumbs b { color: var(--ink); font-weight: 500; }
.crumbs [data-icon] svg { width: 15px; height: 15px; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.icon-btn { width: 38px; height: 38px; border-radius: 10px; border: 0; background: transparent; cursor: pointer; display: inline-grid;
  place-items: center; color: var(--ink-2); position: relative; }
.icon-btn:hover { background: var(--green-tint); }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--warn); border: 2px solid var(--surface); }
.menu-btn { display: none; }

.page { padding: 34px 40px 80px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.eyebrow { font-size: 12.5px; color: var(--muted); font-weight: 600; }
h1 { font-size: 38px; line-height: 1.1; letter-spacing: -.025em; margin: 0 0 8px; font-weight: 800; }
.sub { margin: 0; color: var(--ink-2); font-size: 15px; }
h2 { font-size: 19px; letter-spacing: -.01em; margin: 0; font-weight: 700; }
h3 { font-size: 16px; margin: 0; font-weight: 700; }
.section-title { margin: 32px 0 12px; }

/* ---------- buttons, pills, tags ---------- */
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--card); color: var(--ink);
  border-radius: 10px; padding: 9px 15px; font-weight: 600; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .05s; }
.btn:hover { background: var(--green-tint); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--green); border-color: var(--green); color: var(--on-green); padding: 12px 20px; box-shadow: var(--shadow-sm); }
.btn.primary:hover { background: var(--green-2); border-color: var(--green-2); }
.btn.sm, .btn.small { padding: 6px 12px; font-size: 13px; }
.btn.primary.sm { padding: 7px 14px; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: var(--danger-soft); border-color: var(--danger-soft); }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn [data-icon] svg { width: 16px; height: 16px; }
.pill { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 7px; font-size: 12px;
  background: var(--warn-soft); color: var(--warn); font-weight: 700; vertical-align: 2px; margin-left: 6px; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 600; padding: 2px 9px; border-radius: 999px;
  background: var(--busy-bg); color: var(--ink-2); white-space: nowrap; }
.tag.ok { background: var(--green-soft); color: var(--ok); }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.new { background: var(--c2-bg); color: var(--c2-ink); }
.tag.bad { background: var(--danger-soft); color: var(--danger); }
.link { display: inline-flex; align-items: center; gap: 4px; color: var(--green); font-weight: 600; text-decoration: none; font-size: 13.5px; }
.link [data-icon] svg { width: 15px; height: 15px; }
.seg { display: inline-flex; background: var(--canvas); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 7px 16px; border-radius: 8px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button.active { background: var(--card); color: var(--ink); box-shadow: var(--shadow-sm); font-weight: 600; }

/* ---------- stats ---------- */
/* One quiet strip of figures, read left to right. The 1px gap shows the background as the dividers. */
.stats { display: flex; flex-wrap: wrap; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden;
  margin-bottom: 24px; }
.stat { flex: 1 1 160px; display: flex; align-items: center; gap: 14px; background: var(--card); padding: 16px 20px; min-width: 0; }
.stats .stat-icon { display: none; }  /* the figure and its label carry it; colour squares were noise */
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; }
.stat-icon svg { width: 21px; height: 21px; }
.stat b { display: block; font-size: 24px; line-height: 1.1; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: 13px; }
.stat > div > span { display: block; margin-top: 4px; }
.stat.c0 .stat-icon { background: var(--c0-bg); color: var(--c0-ink); }
.stat.c1 .stat-icon { background: var(--c1-bg); color: var(--c1-ink); }
.stat.c2 .stat-icon { background: var(--c2-bg); color: var(--c2-ink); }
.stat.c4 .stat-icon { background: var(--c4-bg); color: var(--c4-ink); }
.stat.c3 .stat-icon { background: var(--c3-bg); color: var(--c3-ink); }
.stat.c5 .stat-icon { background: var(--c5-bg); color: var(--c5-ink); }

/* ---------- teacher chips ---------- */
.chips-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.tchip { display: inline-flex; align-items: center; gap: 8px; padding: 5px 13px 5px 5px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); cursor: pointer; font-weight: 500; color: var(--ink-2); transition: border-color .15s, background .15s; }
.tchip:hover { border-color: var(--line-strong); }
.tchip.active { border-color: var(--green-2); background: var(--green-tint); color: var(--ink); }
.tchip.all { padding-left: 13px; }
.tchip .avatar { width: 26px; height: 26px; font-size: 10.5px; }

/* ---------- schedule layout ---------- */
.sched-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 26px; align-items: start; }
.cal-toolbar { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.nav-arrows { display: flex; gap: 2px; }
/* Arrows and Today come first so they stay put while the date text changes width (Nov 23 – 29 vs Sep 28 – Oct 4). */
.cal-toolbar .nav-arrows { order: 1; }
.cal-toolbar #todayBtn { order: 2; }
.cal-toolbar #rangeLabel { order: 3; }
.cal-toolbar-right { order: 4; margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; }
.cal-wrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: auto; box-shadow: var(--shadow-sm);
  max-height: calc(100vh - 150px); }
.cal { display: grid; grid-template-columns: 62px repeat(var(--cols), minmax(var(--colw, 120px), 1fr)); min-width: fit-content; position: relative; }
.cal-head { position: sticky; top: 0; z-index: 5; background: var(--card); border-bottom: 1px solid var(--line); border-left: 1px solid var(--line);
  padding: 14px 8px 12px; text-align: center; min-height: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cal-head.corner { border-left: 0; justify-content: flex-end; font-size: 11px; color: var(--muted); position: sticky; left: 0; z-index: 6; }
.cal-head .dow { font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: .04em; }
.cal-head .dnum { font-size: 23px; font-weight: 600; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; }
.cal-head.today { background: var(--green-tint); }
.cal-head.today .dow { color: var(--green); font-weight: 700; }
.cal-head.today .dnum { background: var(--green); color: var(--on-green); }
.cal-head.person { flex-direction: row; justify-content: flex-start; text-align: left; gap: 10px; padding: 14px 12px; align-items: center; }
.cal-head.person b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-head.person span.muted { font-size: 12px; }
.cal-times { position: sticky; left: 0; z-index: 4; background: var(--card); }
.cal-time { position: absolute; right: 10px; font-size: 11.5px; color: var(--muted); transform: translateY(-50%); font-variant-numeric: tabular-nums; }
.cal-col { position: relative; border-left: 1px solid var(--line);
  background: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hour) / 2 - 1px), var(--line) calc(var(--hour) / 2 - 1px),
  var(--line) calc(var(--hour) / 2)); background-blend-mode: normal; }
.cal-col.today { background-color: color-mix(in srgb, var(--green-tint) 55%, transparent); }
.cal-avail { position: absolute; left: 0; right: 0; background: color-mix(in srgb, var(--green-tint) 70%, transparent); }
.cal-off { position: absolute; inset: 0; z-index: 1; background: repeating-linear-gradient(135deg, var(--off-stripe) 0 8px, transparent 8px 16px);
  display: flex; flex-direction: column; align-items: center; padding-top: 18px; color: var(--danger); font-weight: 600; font-size: 12.5px; pointer-events: none; }
.cal-off span { background: var(--card); border-radius: 8px; padding: 4px 10px; box-shadow: var(--shadow-sm); text-align: center; }
.cal-off.closed { background: color-mix(in srgb, var(--line) 45%, transparent); color: var(--muted); }
.ev.event { --bg: var(--card); --edge: var(--green); --ink-c: var(--ink); border-left: 4px solid var(--green); }
.ev.event b::before { content: "★ "; color: var(--green); }
.ev-part select { width: auto; }
.ev-part.dragging { opacity: .5; }
.drag-handle { cursor: grab; color: var(--muted); padding: 0 4px; user-select: none; }
.pick-list { max-height: 40vh; overflow-y: auto; display: grid; gap: 6px; padding: 4px 2px; }
.rates-form label { min-width: 0; }
.tc-week td { background: var(--surface); }
.stat-link { color: inherit; text-decoration: none; border-radius: var(--r-sm); }
.stat-link:hover b { text-decoration: underline; }
.stat-bad { font-style: normal; color: var(--danger); font-weight: 600; }
.term-box { display: grid; gap: 6px; margin: 8px 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); }
.term-box .btn { justify-self: start; }
.test-mail { display: grid; gap: 8px; margin-bottom: 16px; }
.test-mail .row-gap { display: flex; flex-wrap: wrap; }  /* the button drops below the email box on phones */
.test-mail input[type=email] { flex: 0 1 320px; min-width: 0; }
.le-student { display: grid; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px 14px; }
#reportFilters input, #reportFilters select { width: auto; }
.ev { position: absolute; border-radius: 9px; padding: 7px 10px; overflow: hidden; cursor: pointer; z-index: 2;
  background: var(--bg); color: var(--ink-c); box-shadow: inset 0 0 0 1px var(--edge); transition: transform .1s, box-shadow .1s; }
.ev:hover { box-shadow: inset 0 0 0 1px var(--edge), var(--shadow); transform: translateY(-1px); z-index: 3; }
.ev b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev .t { display: block; font-size: 11.5px; opacity: .85; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ev .m { display: block; font-size: 10.5px; opacity: .75; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev.c0 { --bg: var(--c0-bg); --edge: var(--c0-edge); --ink-c: var(--c0-ink); }
.ev.c1 { --bg: var(--c1-bg); --edge: var(--c1-edge); --ink-c: var(--c1-ink); }
.ev.c2 { --bg: var(--c2-bg); --edge: var(--c2-edge); --ink-c: var(--c2-ink); }
.ev.c3 { --bg: var(--c3-bg); --edge: var(--c3-edge); --ink-c: var(--c3-ink); }
.ev.c4 { --bg: var(--c4-bg); --edge: var(--c4-edge); --ink-c: var(--c4-ink); }
.ev.c5 { --bg: var(--c5-bg); --edge: var(--c5-edge); --ink-c: var(--c5-ink); }
.ev.busy { --bg: var(--busy-bg); --edge: transparent; --ink-c: var(--busy-ink); cursor: default; }
.ev.busy:hover { transform: none; box-shadow: none; }
.ev.hold { --bg: var(--card); --edge: var(--line-strong); --ink-c: var(--ink-2); background: var(--card);
  box-shadow: none; border: 1.5px dashed var(--line-strong); }
.ev.hold b::before { content: "↻ "; color: var(--warn); }
.ev.cancelled { opacity: .55; text-decoration: line-through; }
.ev.moved .t::after { content: " · moved"; }
.ev.short { padding: 5px 9px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.ev.short b { display: inline; }
.ev.short .t { display: inline; }
.ev.short .m { display: none; }
.now-line { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 4; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -5px; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); }

.ev.checked::after, .ev.noshow::after { position: absolute; top: 5px; right: 6px; width: 16px; height: 16px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10px; font-weight: 800; }
.ev.checked::after { content: "✓"; background: var(--ok); color: var(--card); }
.ev.noshow::after { content: "✕"; background: var(--danger); color: var(--card); }
.ev.noshow { opacity: .6; }
.ev.checked b, .ev.noshow b { padding-right: 16px; }
.checkin-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 12px 14px; border-radius: 12px;
  background: var(--green-tint); border: 1px solid var(--line); }
.checkin-box:empty { display: none; }
.ci-row { display: flex; align-items: center; gap: 10px; padding: 10px 4px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.ci-row:first-child { border-top: 0; }
.ci-row .what { flex: 1; min-width: 150px; }
.ci-row .what b { font-weight: 600; }
.ci-acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.checkin-card { padding: 6px 14px; margin: 0; }
.checkin-card:empty { display: none; }
.att-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.ev.draggable { cursor: grab; touch-action: manipulation; }
.ev.dragging { opacity: .35; }
.ev-ghost { z-index: 6; cursor: grabbing; box-shadow: inset 0 0 0 2px var(--green), var(--shadow-lg) !important; pointer-events: none; }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.toast { display: flex; align-items: center; gap: 14px; }
.toast-btn { border: 0; background: transparent; color: var(--green-soft); font-weight: 700; cursor: pointer; padding: 2px 4px;
  text-decoration: underline; text-underline-offset: 3px; }
.scope { display: grid; gap: 6px; }
.row-gap { display: inline-flex; gap: 10px; }

/* ---------- right rail ---------- */
.rail { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 100px; }
.rail-head h3 { display: flex; align-items: center; }
.rail-head p { margin: 6px 0 0; color: var(--ink-2); font-size: 13px; }
.upnext-head { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.rail-list { display: grid; gap: 14px; }
.rq { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow-sm); }
.rq-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.rq-head b { display: block; font-size: 14px; }
.rq-head span.muted { font-size: 12px; }
.rq-head .unread { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--warn); margin-top: 6px; flex: none; }
.rq dl { display: grid; grid-template-columns: 52px 1fr; gap: 8px 6px; margin: 0 0 12px; font-size: 13px; }
.rq dt { color: var(--muted); }
.rq dd { margin: 0; font-weight: 500; }
.rq dd s { color: var(--muted); font-weight: 400; }
.quote { background: var(--canvas); border-radius: 9px; padding: 10px 12px; font-size: 12.5px; font-style: italic; color: var(--ink-2); margin-bottom: 12px; }
.rq .btn { width: 100%; justify-content: space-between; }
.rq .warnline { color: var(--danger); font-size: 12.5px; margin-bottom: 10px; }
.upnext { display: grid; gap: 4px; }
.un { display: flex; gap: 12px; align-items: center; padding: 9px 4px; border-radius: 10px; cursor: pointer; }
.un:hover { background: var(--green-tint); }
.un .time { font-variant-numeric: tabular-nums; font-weight: 600; width: 64px; font-size: 13px; }
.un .bar { width: 4px; align-self: stretch; border-radius: 4px; }
.un b { display: block; font-size: 13.5px; }
.un span.muted { font-size: 12px; }
.rail-sub { margin: -6px 0 0; color: var(--ink-2); font-size: 13px; }
.day-chips { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.day-chip { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 5px 0; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; font-size: 11px; color: var(--muted); line-height: 1.2; }
.day-chip b { font-size: 14px; color: var(--ink); font-weight: 600; }
.day-chip:hover { border-color: var(--green-2); }
.day-chip.active { background: var(--green); border-color: var(--green); color: var(--on-green); }
.day-chip.active b { color: var(--on-green); }
.day-chip.quiet { opacity: .5; }
.openslots { display: grid; gap: 4px; }
.os-row { padding: 10px 0; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.os-row:first-child { border-top: 0; }
.os-head { display: flex; gap: 10px; align-items: center; }
.os-head b { display: block; font-size: 13.5px; }
.os-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.os-pill { border: 1px dashed var(--green-2); background: var(--green-tint); color: var(--green); border-radius: 999px;
  padding: 4px 10px; font-size: 12px; font-weight: 600; cursor: pointer; font-variant-numeric: tabular-nums; }
.os-pill:hover { background: var(--green-soft); border-style: solid; }
.empty-rail { color: var(--muted); font-size: 13px; padding: 18px; text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r); }

/* ---------- students ---------- */
.list-toolbar { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; flex-wrap: wrap; }
.search { flex: 1; min-width: 220px; position: relative; display: flex; }
.search [data-icon] { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { flex: 1; padding-left: 40px; }
.table-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow-x: auto; box-shadow: var(--shadow-sm); }
.table-card > .tc-head { padding: 18px 18px 6px; }  /* a title above a full-width table */
.tc-head h2 { margin: 0 0 4px; }
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 12px 18px; border-bottom: 1px solid var(--line);
  background: var(--surface); white-space: nowrap; }
.table td { padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table td.nowrap { white-space: nowrap; }  /* e.g. row buttons: side by side, the table scrolls on phones */
.table tbody tr { cursor: pointer; transition: background .12s; }
.table tbody tr:hover { background: var(--green-tint); }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who b { display: block; font-weight: 600; }
.who span.muted { font-size: 12.5px; }
.tname { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.tname i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.slotcell b { font-weight: 600; white-space: nowrap; }
.slotcell .tag { margin-top: 4px; }
.chev { color: var(--faint); text-align: right; width: 30px; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }

/* ---------- drawer ---------- */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--surface); border-left: 1px solid var(--line);
  box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .25s ease; z-index: 60; overflow-y: auto; }
.drawer.open { transform: translateX(0); }
.drawer-body { padding: 26px 28px 60px; }
.drawer-top { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.drawer-top h2 { font-size: 24px; letter-spacing: -.02em; }
.drawer-top .x { margin-left: auto; }
.d-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; margin-bottom: 14px; box-shadow: var(--shadow-sm); }
.d-card h3 { margin-bottom: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.slot-hero { display: flex; gap: 14px; align-items: center; }
.slot-hero .big { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.slot-hero .stat-icon { background: var(--green-soft); color: var(--green); }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 10px; font-size: 13.5px; margin-top: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.lesson-list { display: grid; gap: 2px; }
.ll { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 9px; }
.ll:hover { background: var(--green-tint); }
.ll .when { flex: 1; }
.ll .when b { font-weight: 600; }
.ll .acts { display: flex; gap: 4px; opacity: .0; transition: opacity .12s; }
.ll:hover .acts, .ll:focus-within .acts { opacity: 1; }
.danger-zone { border-color: var(--danger-soft); }

/* ---------- teachers page ---------- */
.tcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 16px; }
.tcard { text-align: left; font: inherit; color: inherit; background: var(--card); border: 1px solid var(--line); border-radius: var(--r);
  padding: 20px; box-shadow: var(--shadow-sm); cursor: pointer; display: grid; gap: 14px; transition: border-color .15s, transform .1s; }
.tcard:hover { border-color: var(--green-2); transform: translateY(-1px); }
.tcard.past { opacity: .65; }
.tcard-head { display: flex; gap: 12px; align-items: center; }
.tcard-head > div { flex: 1; min-width: 0; }
.tcard-head b { display: block; font-size: 16px; }
.tcard-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tcard-stats b { display: block; font-size: 20px; font-weight: 700; }
.tcard-stats span { color: var(--muted); font-size: 12px; }
.tcard-load { display: grid; gap: 4px; }
.tcard-load .meter { margin: 0; }
.tcard-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.tcard-tags:empty { display: none; }
.tcard-contact { border-top: 1px solid var(--line); padding-top: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inst-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 6px 12px; margin-bottom: 10px; }
.drawer-actions { margin: -8px 0 16px; display: flex; gap: 8px; }
a.plain { color: inherit; text-decoration: none; }
a.plain:hover b { color: var(--green); text-decoration: underline; }
.ll .avatar.sm { flex: none; }

/* ---------- requests page ---------- */
.req-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 16px; }
.req-grid .rq .acts { display: flex; gap: 8px; }
.req-grid .rq .acts .btn { width: auto; flex: 1; justify-content: center; }
.hist-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) minmax(0, 1.4fr) auto; gap: 14px; align-items: center;
  padding: 13px 18px; border-bottom: 1px solid var(--line); }
.hist-row:last-child { border-bottom: 0; }

/* ---------- attention ---------- */
.attn-grid { display: grid; gap: 16px; }
.attn { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow-sm); }
.attn.has { border-left: 4px solid var(--warn); }
.attn-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.attn-head .tag { margin-left: auto; }
.attn .hint { color: var(--muted); font-size: 13px; margin: 0 0 6px; }
.attn-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.attn-item:first-of-type { border-top: 0; }
.attn-item .what { flex: 1; min-width: 200px; }
.attn-item .what b { font-weight: 600; }
.attn-item .acts { display: flex; gap: 6px; }
.attn .req-grid { margin-top: 12px; }

/* ---------- activity & messages ---------- */
.act-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.act-row:last-child { border-bottom: 0; }
.act-row b { font-weight: 600; }
.act-row .meta { text-align: right; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.msg-list { display: grid; gap: 12px; }
.mail { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.mail-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.mail-head b { font-weight: 600; }

/* ---------- shared dialogs (used by common.js) ---------- */
dialog { border: 0; border-radius: 18px; padding: 0; background: var(--surface); color: var(--ink); width: min(600px, calc(100vw - 32px));
  max-height: calc(100vh - 32px); box-shadow: var(--shadow-lg); }
dialog::backdrop { background: rgba(20, 28, 24, .35); backdrop-filter: blur(2px); }
.modal-body { padding: 26px; display: grid; gap: 14px; }
.modal-body h2 { font-size: 22px; letter-spacing: -.02em; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-grid label, .modal-body > label:not(.check) { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.form-grid input, .form-grid select, .modal-body > label:not(.check) input, .modal-body > label textarea, .modal-body > label select { width: 100%; color: var(--ink); }
.check input[type="date"] { width: auto; }
.span2 { grid-column: span 2; }
.check { display: flex; align-items: center; gap: 9px; font-size: 13.5px; flex-wrap: wrap; }
.check input { width: auto; margin: 0; accent-color: var(--green); }
.slot-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 8px; max-height: 250px; overflow-y: auto; padding: 2px; }
.slot { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 10px; cursor: pointer; text-align: left;
  font-size: 12.5px; line-height: 1.35; transition: border-color .12s, background .12s; }
.slot:hover { border-color: var(--green-2); }
.slot.selected { border-color: var(--green); background: var(--green-soft); box-shadow: 0 0 0 1px var(--green); }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.modal-actions .btn.primary { padding: 10px 18px; }
.conflict { color: var(--danger); font-size: 13px; }
.note { background: var(--canvas); border-radius: 9px; padding: 10px 12px; font-size: 13px; }
.matches { display: grid; gap: 14px; max-height: 340px; overflow-y: auto; }
.match-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.match-head .tname { font-weight: 600; }
.match .slot-list { max-height: none; }

/* ---------- assistant ---------- */
.fab { position: fixed; right: 26px; bottom: 26px; z-index: 40; display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px;
  padding: 13px 20px; background: var(--green); color: var(--on-green); font-weight: 700; box-shadow: 0 10px 30px rgba(31, 77, 58, .35); cursor: pointer; }
.fab:hover { background: var(--green-2); }
.assistant { position: fixed; right: 18px; bottom: 18px; top: 18px; width: min(420px, calc(100vw - 36px)); background: var(--surface);
  border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 70; display: flex; flex-direction: column;
  transform: translateY(20px) scale(.98); opacity: 0; pointer-events: none; transition: transform .2s ease, opacity .2s ease; }
.assistant.open { transform: none; opacity: 1; pointer-events: auto; }
.assistant-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px; border-bottom: 1px solid var(--line); }
.assistant-head > div { flex: 1; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { padding: 10px 13px; border-radius: 14px; max-width: 90%; white-space: pre-wrap; font-size: 13.5px; }
.msg.user { align-self: flex-end; background: var(--green); color: var(--on-green); border-bottom-right-radius: 5px; }
.msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.msg.error { background: var(--danger-soft); color: var(--danger); border-color: transparent; }
.msg.typing { color: var(--muted); font-style: italic; }
.proposal { border: 1px solid var(--green-2); border-radius: 12px; padding: 12px 14px; background: var(--green-tint); }
.proposal.done { border-color: var(--ok); background: transparent; }
.proposal.dismissed { opacity: .55; border-color: var(--line); background: transparent; }
.p-kind { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--green); font-weight: 700; }
.p-sum { font-weight: 600; margin: 3px 0 10px; }
.p-actions { display: flex; gap: 6px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 16px 10px; }
.chip { font-size: 12.5px; border: 1px solid var(--line); background: var(--card); padding: 5px 11px; border-radius: 999px; cursor: pointer; }
.chip:hover { border-color: var(--green-2); color: var(--green); }
.chat-form { display: flex; gap: 8px; padding: 12px 16px 16px; border-top: 1px solid var(--line); }
.chat-form textarea { flex: 1; }

.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--surface); padding: 11px 18px;
  border-radius: 12px; z-index: 100; box-shadow: var(--shadow-lg); max-width: calc(100vw - 32px); font-weight: 500; }

/* ---------- teacher portal ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 24px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile .avatar.lg { width: 52px; height: 52px; font-size: 16px; }
.teacher-switch { position: relative; display: inline-flex; align-items: center; }
.teacher-switch select { border: 0; background: transparent; font-size: 17px; font-weight: 700; padding: 2px 28px 2px 0; cursor: pointer;
  background-image: none; box-shadow: none; }
.teacher-switch [data-icon] { position: absolute; right: 4px; pointer-events: none; color: var(--muted); }
.profile .muted.small { display: block; margin-top: 2px; }
.stats.inline { margin: 0; flex: 1; }
.avail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.avail-rows { display: grid; gap: 8px; }
.avail-row { display: grid; grid-template-columns: minmax(0, 1fr) 118px auto 118px 38px; gap: 8px; align-items: center; }
.modal-actions.spread { justify-content: space-between; margin-top: 14px; }
.timeoff-item { border-top: 1px solid var(--line); padding: 14px 0 6px; }
.timeoff-item:first-child { border-top: 0; }
.to-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.timeoff-item .attn-item { padding: 10px 0; }
.hist-row.three { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.6fr) auto; }
.kv a { color: var(--green); text-decoration: none; font-weight: 500; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .sched-layout { grid-template-columns: minmax(0, 1fr); }
  .rail { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
  .rail-head, .rail > .link { grid-column: span 2; }
  .rail-list { grid-column: span 2; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
  .upnext-head, .upnext { grid-column: span 2; }
}
@media (max-width: 980px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 80; transform: translateX(-102%); transition: transform .22s ease; }
  .side.open { transform: none; box-shadow: var(--shadow-lg); }
  .scrim.open { display: block; position: fixed; inset: 0; background: rgba(20, 28, 24, .35); z-index: 75; }
  .menu-btn { display: inline-grid; }
  .top { padding: 0 16px; height: 64px; }
  .page { padding: 24px 16px 90px; }
  .hide-md { display: none; }
}
@media (max-width: 640px) {
  h1 { font-size: 30px; }
  .chips-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 18px; padding: 0 16px 4px; scrollbar-width: none; }
  .tchip { flex: none; }
  .page-head { flex-direction: column; }
  .page-head .btn.primary { align-self: stretch; justify-content: center; }
  .stat { flex-basis: 130px; padding: 14px 16px; }
  .rail, .rail-list { grid-template-columns: minmax(0, 1fr); }
  .rail-head, .rail > .link, .rail-list, .upnext-head, .upnext { grid-column: auto; }
  .hide-sm { display: none; }
  .crumbs > span { display: none; }
  .crumbs b { white-space: nowrap; }
  .avail-row { grid-template-columns: 1fr 1fr; }
  .avail-row .muted { display: none; }
  .avail-row select { grid-column: span 2; }
  .avail-row .icon-btn { grid-column: span 2; justify-self: end; }
  .profile-row .stats.inline { width: 100%; }
  .table td, .table th { padding: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .hist-row { grid-template-columns: 1fr; gap: 4px; }
  .drawer-body { padding: 20px 16px 60px; }
  .assistant { right: 0; left: 0; top: 0; bottom: 0; width: 100%; border-radius: 0; }
  .ll .acts { opacity: 1; }
}
.meter { display: block; height: 6px; border-radius: 3px; background: var(--busy-bg); overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green-2); border-radius: 3px; }

/* Teacher profile: the self-introduction families see when they choose a teacher. */
.prof-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.prof-photo { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.prof-photo .avatar { width: 96px; height: 96px; font-size: 28px; }
.prof-photo-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.prof-bio { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); font-weight: 500; }
.prof-bio textarea { width: 100%; color: var(--ink); padding: 10px 12px; line-height: 1.5; }
.prof-count { justify-self: end; }
.teacher-card { display: grid; gap: 12px; }
.teacher-card-head { display: flex; align-items: center; gap: 12px; }
.teacher-card-head .avatar { width: 64px; height: 64px; font-size: 20px; flex: none; }
.teacher-card-head b { display: block; font-size: 16px; }
.teacher-bio { margin: 0; white-space: pre-line; line-height: 1.55; color: var(--ink-2); }

/* Teacher Today page: one card per lesson with what's needed to prepare. */
.prep-list { display: grid; gap: 14px; max-width: 900px; }
.prep { display: grid; gap: 10px; margin: 0; }
.prep.is-cancelled { opacity: .6; }
.prep > .tag { justify-self: start; }
.prep-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.prep-time { display: grid; min-width: 96px; }
.prep-time b { font-size: 17px; }
.prep-head .who { flex: 1; min-width: 180px; }
.prep-acts { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.prep-facts { margin: 0; }
.prep-last { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 12px; display: grid; gap: 4px; }
.prep-last p { margin: 0; line-height: 1.5; }
.prep-last.mine { border-left-color: var(--green-2); }
.d-card .prep-last + .prep-last { margin-top: 10px; }
.digest { white-space: pre-wrap; font: inherit; font-size: 13.5px; line-height: 1.6; background: var(--surface); border-radius: var(--r-sm); padding: 14px; margin: 0; }
.test-mail .check { display: flex; flex-wrap: nowrap; gap: 8px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.test-mail .check input { margin-top: 3px; flex: none; }
.modal-body label .hint { color: var(--muted); font-size: 12px; font-weight: 400; }

/* Emails to send from your own mailbox (until the studio's email is set up). */
.mail-pill { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-lg, 0 8px 24px rgba(0,0,0,.12));
  font-size: 13.5px; max-width: calc(100vw - 32px); }
.compose { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.drafts { display: grid; gap: 10px; max-height: 55vh; overflow-y: auto; }
.drafts .mail.done { opacity: .55; }
.drafts .mail.done .compose::after { content: "Opened in your email"; font-size: 12px; color: var(--muted); align-self: center; }
.draft-body { white-space: pre-line; margin-top: 6px; font-size: 13.5px; }
@media (max-width: 560px) { .mail-pill { bottom: 84px; } }  /* above the Assistant button */

/* ---------- Your list: the first thing each person sees ----------
   One card, one row per thing to do: what to do (verb first), why, and the button that does it. */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.todo { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 20px; }
.todo-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--line); }
.todo-head h2 { font-size: 18px; }
.todo-head .muted { font-size: 13px; }
.todo-list { list-style: none; margin: 0; padding: 0; }
.todo-item { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 16px 22px; }
.todo-item + .todo-item { border-top: 1px solid var(--line); }
.todo-mark { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); justify-self: center; }
.todo-item.urgent .todo-mark { border-color: var(--warn); background: var(--warn-soft); }
.todo-text b { display: block; font-size: 15px; font-weight: 650; }
.todo-text span { display: block; color: var(--muted); font-size: 13px; margin-top: 2px; line-height: 1.45; }
.todo-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.todo-sub { grid-column: 2 / -1; display: grid; gap: 8px; }
.todo-sub .ci-row { padding: 8px 0 0; border-top: 1px dashed var(--line); }
.todo-done { display: flex; align-items: center; gap: 14px; padding: 22px; }
.todo-done .tick { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.todo-done .tick svg { width: 18px; height: 18px; }
.todo-done b { display: block; font-size: 16px; }
.todo-done span { color: var(--muted); font-size: 13.5px; }
.quick { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.quick .btn [data-icon] svg, .quick .btn svg { width: 16px; height: 16px; }
.today-card { padding: 0; overflow: hidden; }
.today-card h3 { padding: 18px 20px 12px; margin: 0; border-bottom: 1px solid var(--line); }
.today-card .upnext { padding: 6px 12px 12px; }
.today-card .empty-rail { margin: 14px 20px 20px; }
@media (max-width: 980px) { .home-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .todo-item { grid-template-columns: 18px minmax(0, 1fr); padding: 14px 16px; gap: 12px; }
  .todo-acts { grid-column: 2; justify-content: flex-start; }
  .todo-head { padding: 16px 16px 12px; }
}

/* Business: four breakdowns side by side, two per row, each its own card so rows line up. */
.biz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(380px, 100%), 1fr)); gap: 16px; align-items: start; }
.biz-grid .table-card { margin: 0; }
/* A section's title and description on the left, its action on the right, like the top of each page.
   The button stays out of the heading, so screen readers read just the title. */
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 20px; flex-wrap: wrap; margin: 32px 0 12px; }
.section-head h3 { margin: 0; }
.section-head p { margin: 4px 0 0; }
.section-head .btn { flex: none; }
/* An empty list says what belongs there and offers the way to add it. */
.empty-act { display: grid; justify-items: center; gap: 10px; padding: 26px 18px; text-align: center; color: var(--muted); font-size: 14px; }
.empty-act p { margin: 0; max-width: 46ch; line-height: 1.5; }
.prep-wide { max-width: 900px; }
.todo-more summary { cursor: pointer; padding: 6px 0 2px; }
.todo-more[open] summary { margin-bottom: 4px; }

/* Staff sign-in: a workspace or teacher picker with only one choice is just a label */
.workspace.single select, .teacher-switch.single select { cursor: default; color: inherit; opacity: 1; }
.workspace.single .ws-caret, .teacher-switch.single [data-icon] { display: none; }
.teacher-switch.single select { padding-right: 0; appearance: none; }
button.side-link { border: 0; background: none; font: inherit; width: 100%; text-align: left; cursor: pointer; }

/* Working days (teacher hours) and studio hours: one row per weekday. The times drop below the day name when
   the card is too narrow for both. */
.wdays { display: grid; gap: 6px; }
.wday { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--card); }
.wday-head { flex: 1 1 130px; display: grid; gap: 1px; }
.wday-name { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.wday-name input { width: 16px; height: 16px; flex: none; accent-color: var(--green); }
.wday-note { padding-left: 24px; font-size: 12px; }
.wday-times { display: flex; align-items: center; gap: 6px; }
.wday-times input { width: 132px; }
.wday:not(.on) .wday-times, .wday.on .wday-off { display: none; }
.wday-off { margin-right: auto; }
.wday:not(.on) { background: var(--surface); }
.wday:not(.on) .wday-name { color: var(--muted); font-weight: 500; }
.wday.closed .wday-off { display: inline; }
.studio-hours { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 16px; }
.studio-hours h3 { margin: 0 0 6px; }
.studio-hours p { margin: 6px 0 0; }
.sh-summary { display: flex; flex-wrap: wrap; gap: 6px 18px; }
@media (max-width: 640px) {
  .studio-hours { flex-direction: column; }
}

/* Google Calendar connection (teacher's availability page, admin teacher drawer) */
.gcal-state { display: flex; flex-direction: column; gap: 10px; }
.gcal-state .line { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.gcal-state .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.gcal-state .warnbox { background: var(--warn-soft); color: var(--ink-2); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; }
.gcal-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin: 0 0 10px; }
.gcal-state p { margin: 0; }
.site-foot { text-align: center; padding: 16px 16px 28px; font-size: 13px; }
.site-foot a { color: var(--muted); }

/* Required fields (forms.js adds the asterisk) and a stacked field outside a .form-grid */
.req { color: var(--danger); font-weight: 700; margin-left: 2px; }
label.field { display: grid; gap: 5px; font-size: 12.5px; color: var(--muted); font-weight: 500; margin-top: 12px; }
label.field input { width: 100%; color: var(--ink); }
.prof-name { display: block; font-size: 17px; font-weight: 700; }

/* "Done" next to the button that was pressed (common.js actionNote) */
.action-note { display: inline-flex; align-items: center; align-self: center; font-size: 13px; font-weight: 600; color: var(--ok, #2e7d4f);
  background: var(--green-tint); border-radius: 8px; padding: 6px 10px; margin-right: 8px; animation: note-in .2s ease; }
.action-note.error { color: var(--danger); background: var(--danger-soft); }
@keyframes note-in { from { opacity: 0; transform: translateY(2px); } to { opacity: 1; transform: none; } }

/* Checkboxes in a .form-grid (e.g. Teaches in a teacher's profile) sit beside their names */
.form-grid label.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.form-grid label.check input { width: auto; }

/* Teacher schedule: click an empty time to book a lesson there. */
.cal-col.bookable { cursor: pointer; }
.cal-hover { display: none; position: absolute; left: 4px; right: 4px; border: 1.5px dashed var(--green-2); border-radius: 8px;
  background: var(--green-soft); color: var(--green); font-size: 12px; font-weight: 600; padding: 3px 8px; pointer-events: none; z-index: 1; }

/* Bring in classes from Google Calendar (teacher portal) */
.imp-list { max-height: 55vh; overflow-y: auto; margin: 12px 0; border-top: 1px solid var(--line); }
.imp-row { display: grid; grid-template-columns: 1fr minmax(150px, 220px) 130px auto; gap: 6px 10px; align-items: center;
  padding: 12px 2px; border-bottom: 1px solid var(--line); }
.imp-row .imp-remove { grid-column: 4; grid-row: 1; padding: 6px; }
.imp-what { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.imp-what b { overflow-wrap: anywhere; }
.imp-pick { width: 100%; }
.imp-new { grid-column: 1 / -1; display: flex; gap: 8px; }
.imp-new.hidden { display: none; }
.imp-new .imp-name { flex: 1; min-width: 0; }
.imp-row .warnline { color: var(--danger); }
@media (max-width: 560px) { .imp-row { grid-template-columns: 1fr 1fr auto; } .imp-what { grid-column: 1 / 3; } .imp-row .imp-remove { grid-column: 3; } }
