/* ===========================================================================
   iLearn Onboarding — design system  (violet accent, amber brand highlight)
   Themes: bare :root = light · prefers-color-scheme:dark · [data-theme] wins
   =========================================================================== */
:root {
  --ground: #f5f4fb;
  --surface: #ffffff;
  --surface-2: #faf9fe;
  --surface-3: #f1eefa;
  --border: #e7e3f1;
  --border-2: #d9d3e8;
  --text: #1b1725;
  --muted: #6b6580;
  --faint: #9a94ac;
  --accent: #7c3aed;
  --accent-2: #6d28d9;
  --accent-weak: #f1ecff;
  --on-accent: #ffffff;
  --ring: 0 0 0 3px rgba(124, 58, 237, 0.26);
  --amber: #c77d00;
  --amber-weak: #fbeecd;
  --success: #0e9f6e;
  --success-weak: #d7f6ea;
  --warning: #c9820c;
  --warning-weak: #fbeed0;
  --critical: #dc3b40;
  --critical-weak: #fce4e5;
  --info: #2f6feb;
  --info-weak: #e3edff;
  --shadow-sm: 0 1px 2px rgba(27, 23, 37, 0.06), 0 1px 3px rgba(27, 23, 37, 0.05);
  --shadow: 0 6px 24px rgba(27, 23, 37, 0.08);
  --shadow-lg: 0 24px 60px rgba(27, 23, 37, 0.16);
  --r-sm: 9px; --r: 13px; --r-lg: 18px; --r-xl: 24px;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --display: 'Bricolage Grotesque', var(--sans);
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ground: #120f19;
    --surface: #1a1626;
    --surface-2: #201b2e;
    --surface-3: #2a2440;
    --border: #2c2640;
    --border-2: #3a3352;
    --text: #ece9f5;
    --muted: #a59ebc;
    --faint: #726b88;
    --accent: #9d6bff;
    --accent-2: #b189ff;
    --accent-weak: #241a3b;
    --on-accent: #ffffff;
    --ring: 0 0 0 3px rgba(157, 107, 255, 0.34);
    --amber: #f6b23e;
    --amber-weak: #3a2b11;
    --success: #2ee6a0;
    --success-weak: #123027;
    --warning: #f7b955;
    --warning-weak: #362811;
    --critical: #ff6b6f;
    --critical-weak: #3a1c20;
    --info: #6a9bff;
    --info-weak: #182747;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
    --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}
:root[data-theme='dark'] {
  --ground: #120f19;
  --surface: #1a1626;
  --surface-2: #201b2e;
  --surface-3: #2a2440;
  --border: #2c2640;
  --border-2: #3a3352;
  --text: #ece9f5;
  --muted: #a59ebc;
  --faint: #726b88;
  --accent: #9d6bff;
  --accent-2: #b189ff;
  --accent-weak: #241a3b;
  --on-accent: #ffffff;
  --ring: 0 0 0 3px rgba(157, 107, 255, 0.34);
  --amber: #f6b23e;
  --amber-weak: #3a2b11;
  --success: #2ee6a0;
  --success-weak: #123027;
  --warning: #f7b955;
  --warning-weak: #362811;
  --critical: #ff6b6f;
  --critical-weak: #3a1c20;
  --info: #6a9bff;
  --info-weak: #182747;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 30px 70px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--sans);
  background: var(--ground);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  font-size: 14px;
}
a { color: var(--accent); text-decoration: none; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
/* Text inside fields, tables and dialogs is always selectable & copyable. */
input, textarea, select, .input, .modal, .modal .body, .field, td, .mono { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
/* Password fields: masked but still selectable/copyable (not type=password). */
.pw-mask { -webkit-text-security: disc; text-security: disc; font-family: var(--mono); }
.pw-mask.pw-shown { -webkit-text-security: none; text-security: none; }
button { cursor: pointer; }
::selection { background: var(--accent-weak); }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 6px; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; text-wrap: balance; }

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 256px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: 4px;
  background: var(--surface); border-right: 1px solid var(--border);
  padding: 18px 14px; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 6px 8px 14px; }
.brand .plate { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 6px 9px; display: grid; place-items: center; box-shadow: var(--shadow-sm); }
.brand .plate img { height: 22px; display: block; }
.brand .txt b { font-family: var(--display); font-size: 15px; display: block; line-height: 1.1; }
.brand .txt small { color: var(--muted); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; }
.nav-group { margin-top: 12px; }
.nav-group .label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--faint); padding: 6px 10px; font-weight: 600; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 11px; border-radius: 10px; border: none; background: none;
  color: var(--muted); font-weight: 500; font-size: 13.5px; text-align: left;
  transition: background .12s, color .12s;
}
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--surface-3); color: var(--text); }
.nav-item.active { background: var(--accent-weak); color: var(--accent-2); font-weight: 600; }
:root[data-theme='dark'] .nav-item.active, :root:not([data-theme='light']) .nav-item.active { color: var(--accent-2); }
.nav-item .badge-count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px; }
.sidebar .spacer { flex: 1; }
.menu-btn, .sb-close { display: none; }
.brand .sb-close { margin-left: auto; }
.sb-scrim { position: fixed; inset: 0; background: rgba(15, 12, 22, .5); backdrop-filter: blur(2px); z-index: 45; }
.sb-scrim[hidden] { display: none; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 16px;
  padding: 0 26px; height: 62px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar h1 { font-size: 19px; }
.topbar .spacer { flex: 1; }
.content { padding: 26px; max-width: 1240px; width: 100%; }
.page-intro { margin-bottom: 22px; }
.page-intro p { color: var(--muted); margin-top: 3px; }

/* ---------- Search ---------- */
.search { position: relative; width: 300px; max-width: 42vw; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); width: 16px; height: 16px; }
.search input { width: 100%; padding: 9px 12px 9px 36px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border); }
.search input:focus { outline: none; box-shadow: var(--ring); border-color: var(--accent); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 15px; border-radius: 10px; font-weight: 600; font-size: 13.5px; border: 1px solid var(--border-2); background: var(--surface); color: var(--text); transition: filter .12s, background .12s, border-color .12s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--accent); border-color: transparent; color: var(--on-accent); box-shadow: 0 2px 10px rgba(124,58,237,.28); }
.btn.primary:hover { filter: brightness(1.06); background: var(--accent); }
.btn.subtle { background: var(--accent-weak); border-color: transparent; color: var(--accent-2); }
.btn.subtle:hover { filter: brightness(.98); }
.btn.danger { background: var(--critical-weak); border-color: transparent; color: var(--critical); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }
.btn.sm { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.btn.icon { padding: 8px; }
.btn.icon.sm { padding: 6px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.icon-btn { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

/* ---------- Cards / panels ---------- */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.panel > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.panel > header h2, .panel > header h3 { font-size: 15px; }
.panel .body { padding: 18px; }
.panel .body.p0 { padding: 0; }

/* ---------- KPI tiles ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 15px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 17px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden; }
.kpi .k-label { color: var(--muted); font-size: 12.5px; font-weight: 500; display: flex; align-items: center; gap: 7px; }
.kpi .k-label .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent-2); }
.kpi .k-label .dot svg { width: 15px; height: 15px; }
.kpi .k-value { font-family: var(--display); font-size: 27px; font-weight: 600; margin-top: 10px; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kpi .k-sub { font-size: 12px; color: var(--faint); margin-top: 3px; }
.kpi .k-sub .up { color: var(--success); font-weight: 600; }
.kpi .k-sub .down { color: var(--critical); font-weight: 600; }
.kpi.accent .dot { background: var(--amber-weak); color: var(--amber); }

/* ---------- Chips / status ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; letter-spacing: .01em; background: var(--surface-3); color: var(--muted); }
.chip .sdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.chip.active { background: var(--success-weak); color: var(--success); }
.chip.frozen { background: var(--info-weak); color: var(--info); }
.chip.invited { background: var(--accent-weak); color: var(--accent-2); }
.chip.submitted { background: var(--warning-weak); color: var(--warning); }
.chip.trashed { background: var(--surface-3); color: var(--faint); }
.chip.midad { background: var(--amber-weak); color: var(--amber); }

/* ---------- Forms ---------- */
.field { margin-bottom: 15px; }
.field > label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.field .hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; }
.input, textarea.input, select.input { width: 100%; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--border-2); transition: border-color .12s, box-shadow .12s; }
.input:focus, textarea.input:focus, select.input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
.input::placeholder { color: var(--faint); }
textarea.input { resize: vertical; min-height: 76px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { display: none; }
.switch .track { width: 40px; height: 23px; border-radius: 999px; background: var(--border-2); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(17px); }

/* ---------- Tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
table.tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--faint); font-weight: 600; padding: 11px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
table.tbl tbody tr:hover td { background: var(--surface-2); }
td.right, th.right { text-align: right; }

/* ---------- Student cards grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.scard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); overflow: hidden; transition: transform .13s, box-shadow .13s, border-color .13s; display: flex; flex-direction: column; }
.scard:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-2); }
.scard .top { padding: 16px 16px 12px; display: flex; align-items: flex-start; gap: 12px; }
.scard .avatar { width: 44px; height: 44px; border-radius: 12px; flex: none; display: grid; place-items: center; font-family: var(--display); font-weight: 600; font-size: 17px; color: var(--accent-2); background: var(--accent-weak); }
.scard .who { min-width: 0; flex: 1; }
.scard .who b { font-family: var(--display); font-size: 16px; display: block; line-height: 1.2; }
.scard .who .code { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 2px; }
.scard .meta { padding: 0 16px 12px; display: flex; flex-direction: column; gap: 7px; }
.scard .meta .row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--muted); }
.scard .meta .row svg { width: 14px; height: 14px; color: var(--faint); flex: none; }
.scard .foot { margin-top: auto; padding: 11px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; gap: 8px; background: var(--surface-2); }
.scard .foot .btn { padding: 6px 10px; font-size: 12px; }

/* ---------- Paper documents (access card / invoice) — always light ---------- */
.paper { background: #ffffff; color: #1b1725; border-radius: var(--r-lg); box-shadow: var(--shadow); border: 1px solid #e7e3f1; overflow: hidden; }
.paper .p-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid #eee; background: linear-gradient(100deg, #faf7ff, #fff); }
.paper .p-head img { height: 30px; }
.paper .p-body { padding: 22px 24px; }
.access-card { max-width: 420px; }
.access-card .band { background: linear-gradient(120deg, #7c3aed, #9d6bff); color: #fff; padding: 18px 22px; }
.access-card .band .t { font-family: var(--display); font-size: 18px; font-weight: 600; }
.access-card .band .s { opacity: .85; font-size: 12px; margin-top: 2px; }
.cred { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed #e7e3f1; }
.cred:last-child { border-bottom: none; }
.cred .l { font-size: 12px; color: #6b6580; font-weight: 600; }
.cred .v { font-family: var(--mono); font-size: 13px; color: #1b1725; }

/* ---------- Auth (login) ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background:
  radial-gradient(900px 500px at 85% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
  radial-gradient(700px 500px at -10% 20%, color-mix(in srgb, var(--amber) 10%, transparent), transparent 55%), var(--ground); }
.auth-card { width: 100%; max-width: 400px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--shadow-lg); padding: 34px 30px; }
.auth-card .logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 24px; }
.auth-card .logo .plate { background: #fff; border: 1px solid var(--border); border-radius: 13px; padding: 10px 14px; box-shadow: var(--shadow-sm); margin-bottom: 15px; }
.auth-card .logo .plate img { height: 30px; display: block; }
.auth-card .logo h1 { font-size: 21px; }
.auth-card .logo p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.auth-card .btn.primary { width: 100%; padding: 12px; margin-top: 4px; }
.auth-err { background: var(--critical-weak); color: var(--critical); border-radius: var(--r-sm); padding: 10px 13px; font-size: 13px; margin-bottom: 16px; font-weight: 500; }

/* ---------- Misc ---------- */
.theme-toggle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--muted); }
.theme-toggle:hover { background: var(--surface-3); color: var(--text); }
.theme-toggle svg { width: 18px; height: 18px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 5px 5px 5px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); }
.user-chip .u-av { width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.user-chip .u-name { font-size: 13px; font-weight: 600; }
.user-chip .u-role { font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.empty { text-align: center; padding: 46px 20px; color: var(--muted); }
.empty .e-ic { width: 54px; height: 54px; border-radius: 15px; background: var(--surface-3); display: grid; place-items: center; margin: 0 auto 14px; color: var(--faint); }
.empty .e-ic svg { width: 26px; height: 26px; }
.spinner { width: 30px; height: 30px; border: 3px solid var(--border-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; margin: 50px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .001ms !important; transition-duration: .001ms !important; } }

/* modal */
.backdrop { position: fixed; inset: 0; background: rgba(15,12,22,.55); backdrop-filter: blur(3px); z-index: 60; display: grid; place-items: center; padding: 24px; animation: fade .15s; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); max-height: 92vh; display: flex; flex-direction: column; animation: pop .16s ease; }
.modal.wide { max-width: 860px; }
.modal > header { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--border); }
.modal > header h3 { font-size: 16px; }
.modal .body { padding: 20px; overflow-y: auto; }
.modal > footer { display: flex; justify-content: flex-end; gap: 10px; padding: 15px 20px; border-top: 1px solid var(--border); }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.99); } }

/* toast */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 90; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); padding: 12px 15px; border-radius: 11px; box-shadow: var(--shadow-lg); font-size: 13.5px; font-weight: 500; min-width: 230px; max-width: 360px; animation: slide .2s; }
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--critical); }
@keyframes slide { from { opacity: 0; transform: translateX(16px); } }

/* ---------- Apps launcher (header dropdown) ---------- */
.apps-launch { position: relative; display: inline-flex; }
.apps-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 45; width: 244px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .14s ease; }
.apps-menu .am-h { font-size: 10px; text-transform: uppercase; letter-spacing: .09em; color: var(--faint); font-weight: 700; padding: 8px 10px 7px; }
.apps-item { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 11px; color: var(--text); }
.apps-item:hover { background: var(--surface-3); }
.apps-item .ai-ic { width: 33px; height: 33px; border-radius: 9px; display: grid; place-items: center; background: var(--accent-weak); color: var(--accent-2); flex: none; }
.apps-item .ai-ic svg { width: 17px; height: 17px; }
.apps-item .ai-tx { flex: 1; min-width: 0; }
.apps-item .ai-tx b { font-size: 13.5px; font-weight: 600; display: block; line-height: 1.2; }
.apps-item .ai-tx small { font-size: 11px; color: var(--faint); }
.apps-item .ai-ext { color: var(--faint); flex: none; display: inline-flex; }
.apps-item .ai-ext svg { width: 14px; height: 14px; }

/* responsive shell */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 256px; max-width: 82vw; transform: translateX(-100%); transition: transform .2s; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .content { padding: 18px; }
  .menu-btn, .sb-close { display: grid; }
  .search { width: 200px; max-width: 40vw; }
}

/* phones — full-screen dialogs, stacked forms, no iOS input zoom */
@media (max-width: 640px) {
  .topbar { padding: 0 14px; gap: 10px; height: 58px; }
  .topbar h1 { font-size: 17px; }
  .content { padding: 15px; }
  .user-chip { padding: 4px; }
  .user-chip > div:not(.u-av) { display: none; }

  .backdrop { padding: 0; }
  .modal, .modal.wide { max-width: 100%; width: 100%; max-height: 100dvh; border-radius: 0; }
  .modal > .body { padding: 16px; }

  /* 16px inputs stop mobile Safari from auto-zooming on focus */
  .input, textarea.input, select.input { font-size: 16px; }

  /* subject repeater: two-up, selects full width, header labels dropped */
  .subj-head { display: none !important; }
  .subj-row { grid-template-columns: 1fr 1fr !important; }
  .subj-row .js-subj, .subj-row .js-teacher { grid-column: 1 / -1; }
  .subj-row .js-remove { grid-column: 1 / -1; width: 100%; }
}
