/* The serif's dollar sign (full vertical bar) looks odd next to the numerals: take just U+0024 from a system sans. */
@font-face { font-family: 'CurrencySans'; src: local('Segoe UI'), local('Helvetica Neue'), local('Helvetica'), local('Arial'); unicode-range: U+0024; }
/* Shared UI for login / signup / checkout / student app / admin */
:root {
  --navy: #14224a; --navy-2: #1e2f63; --rose: #c93f73; --rose-dark: #a8305d; --teal: #1fa99a; --teal-bg: #e6f6f4;
  --sky: #eaf2fb; --sky-2: #f4f8fd; --ivory: #fbfaf7; --ink: #1b2135; --muted: #5b6478; --line: #e4e8ef; --line-2: #d3d9e4; --white: #fff;
  --ok: #1e9e63; --ok-bg: #e7f7ee; --warn: #b7791f; --warn-bg: #fdf3df; --bad: #c92a2a; --bad-bg: #fdecec;
  --shadow: 0 10px 30px rgba(20, 34, 74, 0.08); --r: 12px; --r-lg: 18px;
  --display: 'CurrencySans', 'Newsreader', 'Iowan Old Style', Georgia, serif; --body: 'DM Sans', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--sky-2); font-size: 15px; line-height: 1.5; min-height: 100vh; }
h1, h2, h3 { font-family: var(--display); color: var(--navy); margin: 0; font-weight: 500; letter-spacing: -0.02em; line-height: 1.12; }
.i { width: 20px; height: 20px; flex: none; }
h1 { font-size: 30px; } h2 { font-size: 22px; } h3 { font-size: 17px; }
p { margin: 0; }
a { color: var(--navy); }
button { font: inherit; }
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mt { margin-top: 12px; } .mt2 { margin-top: 20px; } .mt3 { margin-top: 32px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 500; font-size: 17px; color: var(--navy); white-space: nowrap; }
.brand em { color: var(--rose); font-style: italic; font-weight: 400; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: #fff; display: grid; place-items: center; font-family: var(--display); font-style: italic; font-size: 18px; line-height: 1; flex: none; }

/* Buttons + forms */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 18px; border-radius: 9px; font-weight: 600; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: background 0.15s, border-color 0.15s; white-space: nowrap; font-size: 15px; line-height: 1.2; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--navy); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--navy-2); }
.btn-dark { background: var(--navy); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--navy-2); }
.btn-ghost { background: #fff; color: var(--navy); border-color: var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: var(--navy); }
.btn-danger { background: var(--bad-bg); color: var(--bad); }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font-weight: 500; }
label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
input, select, textarea { width: 100%; font: inherit; padding: 11px 13px; border: 1px solid var(--line-2, #d3d9e4); border-radius: 9px; background: #fff; color: var(--ink); outline: none; transition: border-color 0.15s; }
input:focus, select:focus, textarea:focus { border-color: var(--navy); }
textarea { min-height: 90px; resize: vertical; }
.field { margin-bottom: 16px; }
.field .hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
@media (max-width: 560px) { .grid2 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; font-weight: 500; color: var(--ink); }
.check input { width: auto; margin-top: 3px; }

/* Alerts / badges */
.alert { padding: 12px 14px; border-radius: 10px; font-size: 14px; margin-bottom: 14px; border: 1px solid transparent; }
.alert-bad { background: var(--bad-bg); color: var(--bad); }
.alert-ok { background: var(--ok-bg); color: var(--ok); }
.alert-warn { background: var(--warn-bg); color: var(--warn); }
.alert-info { background: var(--sky); color: var(--navy); }
.badge { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 8px; border-radius: 999px; background: var(--sky); color: var(--navy); }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-rose { background: #fde8ef; color: var(--rose-dark); }
.badge-teal { background: var(--teal-bg); color: #137a6f; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: #fff; border: 1px solid var(--line); font-size: 13px; font-weight: 600; color: var(--navy); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; opacity: 0; pointer-events: none; transition: all 0.25s; z-index: 200; max-width: calc(100% - 32px); box-shadow: var(--shadow); }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.bad { background: var(--bad); }

/* Auth / checkout shells */
.shell { max-width: 460px; margin: 0 auto; padding: 40px 16px 60px; }
.shell-wide { max-width: 920px; }
.shell .brand { margin-bottom: 26px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; }
.panel + .panel { margin-top: 16px; }
.panel h1 { font-size: 26px; margin-bottom: 6px; }
.panel .sub { color: var(--muted); margin-bottom: 20px; font-size: 14px; }
.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 18px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }

/* Checkout */
.co-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 20px; align-items: start; }
@media (max-width: 800px) { .co-grid { grid-template-columns: 1fr; } }
.pkg-list { display: grid; gap: 10px; }
.pkg { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; position: relative; }
.pkg.selected { border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.pkg input { width: auto; margin: 0; }
.pkg .name { font-weight: 600; color: var(--navy); }
.pkg .blurb { font-size: 13px; color: var(--muted); }
.pkg .price { margin-left: auto; text-align: right; font-family: var(--display); font-size: 22px; font-weight: 600; color: var(--navy); }
.pkg .price small { display: block; font-family: var(--body); font-size: 12px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.pkg .badge { position: absolute; top: -9px; left: 14px; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 480px) { .methods { grid-template-columns: 1fr; } }
.method { border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; text-align: center; cursor: pointer; background: #fff; font-weight: 600; color: var(--navy); display: grid; gap: 8px; justify-items: center; }
.method .ic .i { width: 26px; height: 26px; }
.method.selected { border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.method .ic { font-size: 22px; }
.method .mode { font-size: 11px; font-weight: 600; color: var(--warn); }
.summary { position: sticky; top: 16px; }
.summary .line { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.summary .total { display: flex; justify-content: space-between; padding: 14px 0 4px; font-weight: 700; font-size: 18px; color: var(--navy); }
.zelle-box { background: var(--sky-2); border: 1px dashed var(--navy); border-radius: 12px; padding: 16px; margin-top: 14px; }
.zelle-box dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 10px 0 0; font-size: 14px; }
.zelle-box dt { color: var(--muted); } .zelle-box dd { margin: 0; font-weight: 600; }
.copy { font-family: ui-monospace, Menlo, Consolas, monospace; background: #fff; border: 1px solid var(--line); padding: 2px 8px; border-radius: 6px; }
.test-banner { background: #fff4d6; color: #7a5300; border: 1px solid #f3d58a; border-radius: 10px; padding: 10px 14px; font-size: 13px; font-weight: 600; margin-bottom: 14px; }

/* App layout */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.side { background: #fff; border-right: 1px solid var(--line); padding: 22px 16px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.side .brand { margin: 4px 8px 22px; }
.side a.tab { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-weight: 500; font-size: 14px; }
.side a.tab .ic { width: 22px; display: grid; place-items: center; color: var(--muted); }
.side a.tab.active .ic { color: var(--navy); }
.side a.tab.active { background: var(--sky); color: var(--navy); font-weight: 600; }
.side a.tab:hover { color: var(--navy); }
.side .count { margin-left: auto; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 7px; }
.side .foot { margin-top: auto; padding: 12px 8px 0; border-top: 1px solid var(--line); font-size: 13px; }
.side .foot .name { font-weight: 600; color: var(--navy); }
.main { padding: 26px 32px 60px; min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 28px; }
.bell { position: relative; background: #fff; border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; display: grid; place-items: center; cursor: pointer; color: var(--navy); }
.bell .dot { position: absolute; top: 6px; right: 7px; min-width: 16px; height: 16px; background: var(--rose); color: #fff; border-radius: 999px; font-size: 10px; font-weight: 700; display: grid; place-items: center; padding: 0 4px; }
.notif-pop { position: absolute; right: 0; top: 50px; width: 340px; max-width: calc(100vw - 32px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); z-index: 60; max-height: 420px; overflow: auto; }
.notif-pop .n { padding: 12px 14px; border-bottom: 1px solid var(--line); font-size: 13px; }
.notif-pop .n.unread { background: var(--sky-2); }
.notif-pop .n b { display: block; color: var(--navy); }
.notif-pop .n small { color: var(--muted); }
.view { display: none; } .view.active { display: block; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
@media (max-width: 900px) { .stats { grid-template-columns: 1fr 1fr; } }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.stat .v { font-family: var(--display); font-size: 32px; font-weight: 500; color: var(--navy); line-height: 1; }
.stat .k { font-size: 12px; color: var(--muted); margin-top: 6px; font-weight: 500; }
.stat.accent { background: var(--navy); border-color: var(--navy); } .stat.accent .v, .stat.accent .k { color: #fff; }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; }
.card + .card { margin-top: 16px; }
.card h2 { font-size: 20px; margin-bottom: 4px; }
.card .sub { color: var(--muted); font-size: 13px; margin-bottom: 14px; }
.list { display: grid; gap: 10px; }
.item { display: flex; gap: 14px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; flex-wrap: wrap; }
.item .date { min-width: 64px; text-align: center; background: var(--sky); border-radius: 10px; padding: 8px 6px; }
.item .date b { display: block; font-family: var(--display); font-size: 22px; color: var(--navy); line-height: 1; }
.item .date span { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); }
.item .body { flex: 1; min-width: 180px; }
.item .body b { color: var(--navy); }
.item .body .meta { font-size: 13px; color: var(--muted); }
.item .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.empty { padding: 30px; text-align: center; color: var(--muted); border: 1px dashed var(--line); border-radius: 12px; font-size: 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:hover td { background: var(--sky-2); }
.tbl-wrap { overflow-x: auto; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.active { color: var(--navy); border-color: var(--rose); }

/* Booking calendar (student) */
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-head .range { font-family: var(--display); font-size: 20px; color: var(--navy); font-weight: 600; }
.cal-head select { width: auto; padding: 8px 10px; font-size: 13px; }
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
@media (max-width: 900px) { .week { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 600px) { .week { grid-template-columns: 1fr; } }
.day { background: var(--sky-2); border-radius: 12px; padding: 10px 8px; min-height: 90px; }
.day.today { outline: 2px solid var(--teal); }
.day h4 { margin: 0 0 8px; font-family: var(--body); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); text-align: center; }
.day h4 b { display: block; font-family: var(--display); font-size: 20px; color: var(--navy); letter-spacing: 0; text-transform: none; }
.day .none { font-size: 12px; color: var(--muted); text-align: center; padding: 8px 0; }
.slot { display: block; width: 100%; margin: 6px 0; padding: 8px 6px; border-radius: 8px; border: 1.5px solid var(--line); background: #fff; color: var(--navy); font-weight: 600; font-size: 13px; cursor: pointer; }
.slot:hover { border-color: var(--navy); }
.slot.selected { background: var(--navy); color: #fff; border-color: var(--navy); }
@media (max-width: 600px) { .day { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .day h4 { width: 100%; text-align: left; display: flex; gap: 8px; align-items: baseline; } .slot { width: auto; margin: 0; padding: 8px 12px; } }

/* Modal */
.modal-bg { position: fixed; inset: 0; background: rgba(20, 34, 74, 0.45); display: grid; place-items: center; z-index: 100; padding: 16px; }
.modal { background: #fff; border-radius: 18px; padding: 24px; width: 100%; max-width: 480px; box-shadow: var(--shadow); max-height: 90vh; overflow: auto; }
.modal h2 { font-size: 22px; margin-bottom: 6px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }

/* Chat */
.chat { display: grid; grid-template-rows: auto 1fr auto; height: min(72vh, 680px); background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.chat .log { overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; background: var(--sky-2); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.me { align-self: flex-end; background: var(--navy); color: #fff; border-color: var(--navy); }
.msg small { display: block; font-size: 11px; opacity: 0.65; margin-top: 4px; }
.msg a { color: inherit; text-decoration: underline; text-underline-offset: 2px; word-break: break-all; }
.msg.me a { color: #fff; }
.msg-seen { align-self: flex-end; margin-top: -6px; font-size: 11px; color: var(--muted, #6b7280); }
.chat form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); }
.chat textarea { min-height: 44px; max-height: 140px; }
.threads { display: grid; grid-template-columns: 300px 1fr; gap: 16px; }
@media (max-width: 800px) { .threads { grid-template-columns: 1fr; } .threads .tlist { max-height: 220px; overflow: auto; } }
.tlist { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.tlist button { display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 12px 14px; cursor: pointer; }
.tlist button.active { background: var(--sky); }
.tlist b { display: block; color: var(--navy); font-size: 14px; }
.tlist small { color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Admin week grid */
.agrid-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); }
.agrid { display: grid; grid-template-columns: 70px repeat(7, minmax(120px, 1fr)); min-width: 900px; font-size: 12px; }
.agrid .hd { position: sticky; top: 0; background: #fff; z-index: 2; padding: 10px 6px; text-align: center; border-bottom: 1px solid var(--line); font-weight: 600; color: var(--muted); }
.agrid .hd b { display: block; font-family: var(--display); font-size: 18px; color: var(--navy); }
.agrid .hd.today b { color: var(--rose); }
.agrid .tm { padding: 4px 6px; text-align: right; color: var(--muted); border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 11px; white-space: nowrap; }
.agrid .cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 44px; position: relative; cursor: pointer; background: #fff; }
.agrid .cell.open { background: var(--teal-bg); }
.agrid .cell.blocked { background: repeating-linear-gradient(135deg, #f6f7fa 0 6px, #eceff5 6px 12px); }
.agrid .cell.ext { background: repeating-linear-gradient(135deg, #fde8ef 0 6px, #f8d3df 6px 12px); cursor: default; }
.agrid .extlbl { position: absolute; left: 4px; top: 3px; font-size: 10px; font-weight: 700; color: #a8305d; white-space: nowrap; overflow: hidden; max-width: calc(100% - 8px); text-overflow: ellipsis; }
.agrid .cell.past { background: #f3f4f7; opacity: 0.7; cursor: default; }
.agrid .cell.past.open { background: #e9f1ef; }
.agrid .cell:hover:not(.past) { outline: 2px solid var(--navy); outline-offset: -2px; z-index: 1; }
.agrid .bk { position: absolute; left: 3px; right: 3px; top: 2px; background: var(--navy); color: #fff; border-radius: 7px; padding: 5px 8px; z-index: 1; overflow: hidden; box-shadow: 0 2px 6px rgba(20,34,74,.25); display: flex; flex-direction: column; gap: 1px; line-height: 1.25; cursor: pointer; }
.agrid .bk b { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agrid .bk span { font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agrid .bk:hover { background: var(--navy-2); }
.agrid .bk.completed { background: var(--ok); } .agrid .bk.no_show { background: var(--bad); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); flex-wrap: wrap; align-items: center; }
.legend i { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; border: 1px solid var(--line); }
.hours-editor .dayrow { display: grid; grid-template-columns: 90px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.hours-editor .ranges { display: flex; flex-direction: column; gap: 6px; }
.hours-editor .range { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.hours-editor select { width: auto; padding: 6px 8px; font-size: 13px; }

/* Mobile app nav */
@media (max-width: 800px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto; flex-direction: row; justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); border-right: 0; border-top: 1px solid var(--line); z-index: 50; }
  .side .brand, .side .foot { display: none; }
  .side a.tab { flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 8px; }
  .side .count { position: absolute; margin: 0; transform: translate(14px, -6px); }
  .side a.tab { position: relative; }
  .main { padding: 18px 14px 90px; }
  .topbar h1 { font-size: 24px; }
}

/* chat header + tabs */
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.chat-head img, .chat-head .av { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--sky); display: grid; place-items: center; font-family: var(--display); font-size: 18px; color: var(--navy); flex: none; }
.chat-head b { display: block; color: var(--navy); }
.chat-head span { display: block; }
.chat .log:empty { min-height: 200px; }
.msg-del { display: none; }
.msg:hover .msg-del { display: inline; }
.tlist small.muted { margin-top: 2px; }
.co-tabs { display: flex; gap: 6px; background: var(--sky); padding: 4px; border-radius: 10px; margin-bottom: 14px; }
.co-tabs button { flex: 1; border: 0; background: transparent; padding: 9px 12px; border-radius: 8px; font-weight: 600; color: var(--muted); cursor: pointer; }
.co-tabs button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(20,34,74,.12); }
.pkg .sub-tag { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); }

/* mobile checkout: sticky total + pay */
.co-sticky { display: none; }
@media (max-width: 800px) {
  .co-sticky { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: rgba(255,255,255,.97); backdrop-filter: blur(8px); border-top: 1px solid var(--line); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; }
  .co-sticky .tot { display: flex; flex-direction: column; line-height: 1.15; min-width: 90px; }
  .co-sticky .tot b { font-family: var(--display); font-size: 22px; color: var(--navy); font-weight: 500; }
  .co-sticky .tot span { font-size: 11px; color: var(--muted); }
  .co-sticky .btn { flex: 1; }
  body.has-co-sticky { padding-bottom: 84px; }
  .summary { position: static; }
}

/* reserved weekly times: checkout + app + admin */
.step-label { display: flex; align-items: center; gap: 10px; margin: 18px 0 10px; font-weight: 600; color: var(--navy); font-size: 14px; }
.step-label span { width: 22px; height: 22px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg button { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 6px; font-family: var(--display); font-size: 22px; color: var(--navy); cursor: pointer; line-height: 1.1; }
.seg button small { display: block; font-family: var(--body); font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: .04em; }
.seg button.active { border-color: var(--navy); box-shadow: 0 0 0 3px var(--sky); }
.seg button:disabled { opacity: .4; cursor: not-allowed; }
.slot-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 10px; }
.slot-chips .empty { grid-column: 1 / -1; }
.slot-chip { border: 1.5px solid var(--line); background: #fff; border-radius: 12px; padding: 12px 10px; text-align: center; cursor: pointer; display: grid; gap: 2px; font: inherit; color: var(--navy); min-width: 0; }
.slot-chip b { font-weight: 600; font-size: 14px; }
.slot-chip span { font-family: var(--display); font-size: 19px; }
.slot-chip.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.slot-chip.fixed { cursor: default; }
.slot-chip.fixed span { font-family: var(--body); font-size: 12px; opacity: .85; }
.policy { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 8px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.policy li { padding-left: 14px; position: relative; }
.policy li::before { content: ""; position: absolute; left: 0; top: .62em; width: 5px; height: 5px; border-radius: 50%; background: var(--line); }
.plan-box { border: 1px solid var(--line); border-radius: 14px; padding: 16px; background: #fff; display: grid; gap: 10px; }
.plan-box .times { display: flex; flex-wrap: wrap; gap: 8px; }
.plan-box .times span { background: var(--sky); color: var(--navy); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 13px; }
.slot-row { display: grid; grid-template-columns: 150px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.slot-row:last-child { border-bottom: 0; }
.slot-row .when b { display: block; color: var(--navy); }
@media (max-width: 640px) { .slot-row { grid-template-columns: 1fr; gap: 6px; } }

/* resources */
.res-list { display: grid; gap: 10px; }
.res { display: grid; grid-template-columns: 40px 1fr auto; gap: 12px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.res.pinned { border-color: var(--navy); }
.res .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--sky); display: grid; place-items: center; color: var(--navy); font-family: var(--display); font-size: 16px; overflow: hidden; }
.res .ic img { width: 22px; height: 22px; }
.res b { display: block; color: var(--navy); font-weight: 600; line-height: 1.3; }
.res b a { color: inherit; text-decoration: none; }
.res b a:hover { text-decoration: underline; }
.res .host { font-size: 12px; color: var(--muted); }
.res .note { font-size: 13.5px; color: var(--ink); margin-top: 4px; white-space: pre-wrap; }
.res .meta { font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.res .acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.res .acts .btn-link { font-size: 12px; }
.res-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.res-tools input { max-width: 320px; }
@media (max-width: 560px) { .res { grid-template-columns: 1fr; } .res .ic { display: none; } .res .acts { justify-content: flex-start; } }

/* longer brand name in the app sidebar; six tabs on phones */
.side .brand { white-space: normal; font-size: 16px; line-height: 1.2; align-items: flex-start; }
.side .brand .mark { flex: none; }
@media (max-width: 800px) {
  .side a.tab { white-space: nowrap; font-size: 10.5px; padding: 6px 4px; flex: 1 1 0; min-width: 0; text-align: center; align-items: center; }
}

/* reserved weekly times in the admin calendar */
.agrid .cell.resv { background: #fdeef3; }
.agrid .cell.past.resv { background: #f6eef1; }
.agrid .slotlbl { position: absolute; left: 6px; top: 4px; right: 6px; font-size: 11px; font-weight: 600; color: var(--teal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.agrid .cell.resv .slotlbl { color: var(--rose-dark); }

.slot-chip small { font-size: 11px; opacity: .75; margin-top: 2px; font-family: var(--body); }

/* whiteboard tab lives in the desktop sidebar; phones reach it from Home, Lessons and Resources */
@media (max-width: 800px) { .side a.tab[href="/board/"] { display: none; } }
/* Phones hide the sidebar (and its Log out), so the student top bar gets its own */
.btn.top-logout { display: none; }
@media (max-width: 800px) { .btn.top-logout { display: inline-flex; } .topbar > .row:has(.top-logout) { margin-left: auto; } }

/* ---- UX pass: student ---- */
.guide { border-color: var(--navy); background: linear-gradient(180deg, #fff, var(--sky-2)); }
.steps3 { list-style: none; counter-reset: s; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.steps3 li { counter-increment: s; position: relative; padding-left: 40px; font-size: 14px; line-height: 1.45; }
.steps3 li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.steps3 b { display: block; color: var(--navy); margin-bottom: 2px; }
.steps3 span { color: var(--muted); }
@media (max-width: 800px) { .steps3 { grid-template-columns: 1fr; } }
.next-hero { border-color: var(--line-2); }
.sched { border-color: var(--rose); background: #fff8fb; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
a.stat { text-decoration: none; color: inherit; transition: border-color .15s; }
a.stat:hover { border-color: var(--navy); }
.quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.quick a { display: grid; gap: 4px; padding: 16px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s, transform .15s; }
.quick a:hover { border-color: var(--navy); transform: translateY(-1px); }
.quick .i { width: 22px; height: 22px; color: var(--rose); margin-bottom: 4px; }
.quick b { color: var(--navy); font-size: 15px; }
.quick span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
@media (max-width: 900px) { .quick { grid-template-columns: 1fr 1fr; } }
.item.lesson .actions { align-items: flex-start; }
.join-wrap { display: grid; gap: 3px; justify-items: center; }
.join-wrap small { font-size: 11px; color: var(--muted); white-space: nowrap; }
.btn.join { min-width: 118px; }
.when { font-size: 12px; font-weight: 700; color: var(--teal); margin-left: 4px; }
.item.big { padding: 18px; }
.item.big .body > b { font-size: 17px; }
.more-list { display: grid; gap: 8px; margin-top: 14px; }
.more-list a, .more-list button { display: grid; gap: 2px; text-align: left; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; }
.more-list a:hover, .more-list button:hover:not(:disabled) { border-color: var(--navy); }
.more-list b { color: var(--navy); font-size: 14.5px; }
.more-list span { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.more-list .danger b { color: var(--rose-dark); }
.more-list button:disabled { opacity: .5; cursor: default; }

/* ---- UX pass: teacher + mobile ---- */
.month-line { margin: -6px 0 18px; }
.month-line b { color: var(--navy); }
.app { grid-template-columns: 240px minmax(0, 1fr); }
.main { min-width: 0; }
.threads { grid-template-columns: 300px minmax(0, 1fr); }
.threads > div { min-width: 0; }
@media (max-width: 800px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .threads { grid-template-columns: minmax(0, 1fr); }
  .side { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; }
  .side::-webkit-scrollbar { display: none; }
  .side a.tab { flex: 0 0 auto; min-width: 64px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .stats.three { grid-template-columns: repeat(3, 1fr); }
  .item { flex-wrap: wrap; }
  .item .actions { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar .row { flex-wrap: wrap; }
  .chat-head .row { flex-wrap: wrap; }
}
.sched { margin-bottom: 16px; }
@media (max-width: 800px) {
  .item.lesson .actions { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: start; }
  .item.lesson .join-wrap { justify-items: stretch; }
  .item.lesson .join-wrap .btn { width: 100%; }
  .item.lesson .join-wrap small { white-space: normal; text-align: center; }
}
.guide { margin-bottom: 16px; }

/* ---------- student Home: status band, next lesson card, before-your-lesson list, up next timeline ---------- */
.view[data-view="home"] > .card, .view[data-view="home"] > .upnext { max-width: 760px; margin-left: auto; margin-right: auto; }
.view[data-view="home"] > .card { margin-bottom: 18px; }
.hh { max-width: 760px; margin: 0 auto 26px; }
.hh-band { background: linear-gradient(135deg, #fdeef3 0%, #f7eaf6 55%, #eaf2fb 100%); border-radius: 22px; padding: 26px 28px 96px; }
.hh-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.hh-hi { font-size: 15px; color: var(--ink); margin-bottom: 4px; }
.hh-status { font-size: clamp(25px, 3.2vw, 34px); line-height: 1.12; }
.hh-all { background: #fff; }
.hh-all .i { width: 18px; height: 18px; }
.hh-card { position: relative; margin: -72px 18px 0; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: 0 18px 40px rgba(20, 34, 74, .08); }
.hl { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 16px; align-items: start; }
.hl-ph { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; display: block; }
.hl-body { display: grid; gap: 2px; min-width: 0; }
.hl-day { font-size: 14px; color: var(--muted); }
.hl-time { font-family: var(--display); font-weight: 500; font-size: 27px; color: var(--navy); line-height: 1.15; letter-spacing: -.01em; }
.hl-sub { font-size: 14.5px; color: var(--ink); }
.hl-note2 { font-size: 13.5px; color: var(--muted); margin-top: 4px; }
.hl-more { width: 38px; height: 38px; border-radius: 10px; border: 0; background: none; display: inline-flex; align-items: center; justify-content: center; gap: 3px; cursor: pointer; flex: none; }
.hl-more span { width: 4px; height: 4px; border-radius: 50%; background: var(--navy); }
.hl-more:hover { background: var(--sky-2); }
.hl-acts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.hl-acts .btn .i { width: 18px; height: 18px; }
.btn-join { background: var(--rose); color: #fff; border-color: var(--rose); }
.btn-join:hover { background: var(--rose-dark); border-color: var(--rose-dark); color: #fff; }
.hl-note { margin-top: 10px; font-size: 13px; color: var(--muted); }
.hh-empty { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; align-items: center; }
.hh-empty p { font-size: 15px; color: var(--ink); }
.hh-empty .hl-acts { margin-top: 12px; }
.hh-before { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line); }
.hh-before h3 { font-family: var(--body); font-size: 15px; font-weight: 700; letter-spacing: 0; margin-bottom: 12px; }
.hh-prep { display: grid; gap: 10px; }
.td { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 13px 16px; border: 1px solid var(--line-2); border-radius: 12px; text-decoration: none; color: var(--ink); background: #fff; transition: border-color .15s; }
.td:hover { border-color: var(--navy); }
.td.hi { border: 2px solid transparent; padding: 12px 15px; background: linear-gradient(#fff, #fff) padding-box, linear-gradient(90deg, var(--rose), #6a4fc8) border-box; }
.td > .i { width: 20px; height: 20px; color: var(--navy); }
.td > .i:last-child { width: 16px; height: 16px; color: var(--muted); }
.td b { font-weight: 500; font-size: 15px; display: block; }
.td small { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.td .tag { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; background: #fdeef3; color: var(--rose-dark); white-space: nowrap; }
.td .tag.ok { background: var(--ok-bg); color: var(--ok); }
.upnext { margin-bottom: 24px; }
.upnext h2 { font-size: 28px; }
.tl { list-style: none; margin: 16px 0 0 6px; padding: 0 0 0 22px; border-left: 2px solid var(--line-2); }
.tl li { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: start; padding: 0 0 24px; }
.tl li:last-child { padding-bottom: 4px; }
.tl-dot { position: absolute; left: -30px; top: 5px; width: 14px; height: 14px; border-radius: 50%; background: var(--navy); border: 3px solid var(--sky-2); }
.tl-day { display: block; font-size: 13.5px; color: var(--muted); }
.tl b { display: block; font-family: var(--display); font-weight: 500; font-size: 21px; color: var(--navy); line-height: 1.2; }
.tl-who { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; margin-top: 6px; padding: 3px 10px 3px 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; }
.tl-who img { width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
@media (max-width: 640px) {
  .hh-band { padding: 20px 16px 88px; border-radius: 18px; }
  .hh-card { margin: -70px 8px 0; padding: 18px 16px; }
  .hl { grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; }
  .hl-ph { width: 52px; height: 52px; }
  .hl-time { font-size: 21px; }
  .hl-acts .btn { flex: 1 1 140px; }
  .td { grid-template-columns: 20px minmax(0, 1fr) 16px; gap: 12px; }
  .td .tag { grid-column: 2; justify-self: start; }
  .tl b { font-size: 18px; }
}

/* Continue with Google */
.g-btn { gap: 10px; font-weight: 600; }
.g-logo { width: 18px; height: 18px; flex: none; }
.or-line { display: flex; align-items: center; gap: 12px; margin: 16px 0 6px; color: var(--muted); font-size: 13px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Wise bank transfer details at checkout */
.wise-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 10px; margin: 12px 0; }
.wise-acc { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: #fff; }
.wise-acc h4 { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.wise-acc pre { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: 14px; line-height: 1.5; margin: 0 0 8px; color: var(--ink); }
.wise-acc dl { margin: 0; }

/* Daylight-saving notice on a weekly lesson whose local time moved */
.clock-note { color: var(--warn); font-weight: 600; }

/* Grammar homework box in the teacher's student window */
.hw-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 12px 0; }
.hw-box h3 { margin: 0 0 8px; font-size: 15px; }
.hw-row { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.hw-row:first-child { border-top: 0; }
.hw-row a { color: var(--navy); text-decoration: none; }
.hw-bar { height: 6px; border-radius: 99px; background: var(--sky-2); margin: 6px 0 4px; overflow: hidden; }
.hw-bar span { display: block; height: 100%; background: var(--teal, #2a9d8f); border-radius: 99px; }
.hw-add { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.hw-add select { flex: 1 1 220px; min-width: 0; }
.hw-add input { flex: 2 1 220px; min-width: 0; }

/* Phone bottom bar: every tab fits; extra admin tabs live under "More" */
.more-btn, .more-sheet { display: none; }
@media (max-width: 800px) {
  .side { overflow-x: visible; justify-content: space-around; }
  .side a.tab { flex: 1 1 0; min-width: 0; padding: 6px 2px; }
  .side a.tab.m-more { display: none; }
  .side .more-btn { display: flex; flex-direction: column; align-items: center; gap: 2px; flex: 1 1 0; min-width: 0; padding: 6px 2px; border: 0; background: none; border-radius: 10px; font: inherit; font-size: 10.5px; font-weight: 500; color: var(--muted); cursor: pointer; position: relative; }
  .side .more-btn .ic { width: 22px; display: grid; place-items: center; }
  .side .more-btn.active { background: var(--sky); color: var(--navy); font-weight: 600; }
  .more-sheet:not([hidden]) { display: block; position: fixed; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 60; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 14px 40px rgba(20, 34, 74, .18); padding: 6px; }
  .more-sheet a, .more-sheet button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 12px; border: 0; border-radius: 10px; background: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--navy); text-decoration: none; text-align: left; cursor: pointer; }
  .more-sheet a.active { background: var(--sky); font-weight: 600; }
  .more-sheet .ic { width: 22px; display: grid; place-items: center; color: var(--muted); }
  .more-sheet .count { margin-left: auto; position: static; transform: none; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 8px; }
  .more-sheet [data-logout] { border-top: 1px solid var(--line); border-radius: 0 0 10px 10px; color: var(--muted); }
}

/* ===== Teacher panel, Preply-style ===== */
.subtabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 18px; overflow-x: auto; scrollbar-width: none; }
.subtabs::-webkit-scrollbar { display: none; }
.subtabs a { padding: 10px 14px; font-weight: 600; font-size: 14px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: inline-flex; gap: 6px; align-items: center; }
.subtabs a.active { color: var(--navy); border-bottom-color: var(--navy); }
.subtabs .count { background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; }
.av { width: 40px; height: 40px; border-radius: 50%; background: var(--sky); color: var(--navy); display: grid; place-items: center; font-family: var(--display); font-size: 18px; flex: none; text-transform: uppercase; }
.av-lg { width: 52px; height: 52px; font-size: 22px; }
.i.lk { width: 12px; height: 12px; vertical-align: -1px; }
.chip-weekly { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: #555d6e; background: #eef0f4; border-radius: 6px; padding: 2px 8px; white-space: nowrap; vertical-align: middle; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.chip { font-size: 12px; font-weight: 600; color: var(--navy); background: var(--sky-2); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }
.chip.muted { color: var(--muted); background: #f4f5f8; font-weight: 500; }
.chip.warn { color: var(--warn); background: var(--warn-bg); }
/* home */
.t-hero { margin-bottom: 18px; }
.th-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.th-hi { font-family: var(--display); font-size: 26px; color: var(--navy); }
.th-card { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; background: linear-gradient(135deg, #fdeef3, #eef4ff); border: 1px solid var(--line); border-radius: 18px; padding: 18px 20px; }
.th-card.live { border-color: var(--rose); box-shadow: 0 0 0 3px #fbd5e2; }
.th-body { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.th-when { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--rose-dark, #b8315f); }
.th-name { font-size: 20px; color: var(--navy); }
.th-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.att-list { display: flex; flex-direction: column; }
.att { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-top: 1px solid var(--line); text-decoration: none; color: inherit; }
.att:first-child { border-top: 0; }
.att:hover b { color: var(--rose-dark, #b8315f); }
.att-ic { width: 38px; height: 38px; border-radius: 12px; background: var(--sky); color: var(--navy); display: grid; place-items: center; flex: none; }
.att-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.att-t b { color: var(--navy); font-size: 15px; }
.att-t small { color: var(--muted); font-size: 13px; }
.att-ok { display: flex; align-items: center; gap: 8px; color: var(--ok); font-weight: 600; padding: 6px 0; }
/* lesson window */
.lp-head { display: flex; gap: 12px; align-items: center; }
.lp-head h2 { margin: 0; }
.lp-time { margin-top: 14px; padding: 12px 14px; background: var(--sky-2); border-radius: 12px; line-height: 1.6; }
.lp-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 8px; margin-top: 14px; }
.lp-actions .btn { justify-content: center; }
.btn.lp-cancel { color: var(--bad); }
.lp-notes { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.lp-notes summary { cursor: pointer; font-weight: 600; color: var(--navy); }
.lp-more { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 12px; font-size: 13px; }
.lp-more a, .lp-more button { color: var(--muted); background: none; border: 0; padding: 0; font: inherit; text-decoration: underline; cursor: pointer; }
.lp-more a:hover, .lp-more button:hover { color: var(--navy); }
/* students */
.st-tabs { margin: 14px 0 4px; }
.st-list { display: flex; flex-direction: column; }
.st-row { display: flex; align-items: center; gap: 14px; padding: 14px 6px; border-top: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.st-row:hover { background: var(--sky-2); }
.st-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.st-main b { color: var(--navy); }
.st-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.wk-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; }
/* calendar drag and drop */
.agrid .bk[draggable="true"] { cursor: grab; }
.agrid.dragging .bk { pointer-events: none; opacity: .75; }
.agrid .cell.drop-target { outline: 2px dashed var(--navy); outline-offset: -3px; background: #eef4ff; }
@media (max-width: 800px) {
  .st-row { flex-wrap: wrap; }
  .st-acts { width: 100%; justify-content: flex-start; padding-left: 54px; }
  .th-acts .btn { flex: 1 1 auto; justify-content: center; }
  .th-hi { font-size: 22px; }
}

/* Home column: every block on the same 760px axis */
.view[data-view="home"] > .t-hero, .view[data-view="home"] > #setup-warn, .view[data-view="home"] > .month-line { max-width: 760px; margin-left: auto; margin-right: auto; }
#join-next.on-home { display: none !important; }
@media (max-width: 800px) { .th-card .av-lg { display: none; } .th-card { padding: 16px; } }

/* ===== Teacher panel look: same family as the public site (soft sky, navy serif, rose accents) ===== */
body.teacher { background: linear-gradient(180deg, #eef3fb 0, #f7f9fd 340px, #fbfaf7 100%); background-attachment: fixed; }
.teacher { --c-rose: #c93f73; --c-rose-bg: #fdeef3; --c-teal: #168f83; --c-teal-bg: #e3f5f2; --c-blue: #3456c9; --c-blue-bg: #ebf0ff; --c-violet: #6c47d9; --c-violet-bg: #f1edff; --c-green: #23864a; --c-green-bg: #e6f6ec; --c-slate: #56607a; --c-slate-bg: #eef0f5; }
[data-c="rose"] { --c: var(--c-rose); --cb: var(--c-rose-bg); }
[data-c="teal"] { --c: var(--c-teal); --cb: var(--c-teal-bg); }
[data-c="blue"] { --c: var(--c-blue); --cb: var(--c-blue-bg); }
[data-c="violet"] { --c: var(--c-violet); --cb: var(--c-violet-bg); }
[data-c="green"] { --c: var(--c-green); --cb: var(--c-green-bg); }
[data-c="slate"] { --c: var(--c-slate); --cb: var(--c-slate-bg); }
/* sidebar */
.teacher .side { background: rgba(255, 255, 255, .86); backdrop-filter: blur(10px); gap: 4px; }
.teacher .side a.tab { padding: 9px 10px; color: var(--ink); align-items: center; }
.teacher .side a.tab .ic { width: 36px; height: 36px; border-radius: 11px; background: var(--cb); color: var(--c); flex: none; transition: transform .15s; }
.teacher .side a.tab .ic .i { width: 19px; height: 19px; }
.teacher .side a.tab .tab-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.teacher .side a.tab .tab-n { font-weight: 600; font-size: 14.5px; color: var(--navy); }
.teacher .side a.tab small { font-size: 12px; color: var(--muted); font-weight: 400; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teacher .side a.tab:hover { background: var(--cb); }
.teacher .side a.tab:hover .ic { transform: scale(1.05); }
.teacher .side a.tab.active { background: var(--cb); box-shadow: inset 3px 0 0 var(--c); }
.teacher .side a.tab.active .ic { background: var(--c); color: #fff; }
.teacher .side .foot { display: flex; gap: 10px; align-items: center; }
.teacher .side .foot-ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; }
.teacher .side .foot a { color: var(--muted); }
/* page header */
.teacher .topbar { align-items: flex-start; }
.teacher .ph { min-width: 0; }
.ph-eye { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.ph-eye::before { content: ''; width: 24px; height: 1px; background: var(--rose); }
.teacher .topbar h1 { font-size: 34px; margin-top: 4px; }
.teacher .topbar h1 em { font-style: italic; font-weight: 400; color: var(--rose); }
.ph-sub { color: var(--muted); font-size: 14px; margin-top: 4px; max-width: 62ch; }
/* cards */
.teacher .card { border-radius: 18px; border-color: #e6ebf3; box-shadow: 0 8px 26px rgba(20, 34, 74, .05); }
.teacher .card h2 { font-size: 21px; }
/* home tiles */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.tile { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 14px; border-radius: 14px; border: 1px solid #e6ebf3; background: #fff; text-decoration: none; color: inherit; cursor: pointer; font: inherit; text-align: left; transition: border-color .15s, transform .15s, box-shadow .15s; }
.tile .i { width: 34px; height: 34px; padding: 8px; border-radius: 10px; background: var(--cb); color: var(--c); margin-bottom: 6px; box-sizing: border-box; }
.tile b { color: var(--navy); font-size: 14.5px; }
.tile small { color: var(--muted); font-size: 12.5px; line-height: 1.35; }
.tile:hover { border-color: var(--c); transform: translateY(-1px); box-shadow: 0 8px 20px rgba(20, 34, 74, .07); }
.th-test { display: block; width: 100%; font-size: 13px; color: var(--muted); margin-top: 2px; }
/* attention rows pick up the section colors */
.att-ic { background: var(--c-rose-bg, var(--sky)); color: var(--c-rose, var(--navy)); }
/* settings jump links */
.toc { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; flex-wrap: wrap; padding: 10px 0 12px; margin-bottom: 6px; background: linear-gradient(180deg, #f7f9fd 75%, rgba(247, 249, 253, 0)); }
.toc a { font-size: 13px; font-weight: 600; color: var(--navy); text-decoration: none; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.toc a:hover { border-color: var(--navy); }
.teacher .section-anchor, .teacher section[data-view="settings"] h2, .teacher section[data-view="settings"] h3 { scroll-margin-top: 70px; }
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .teacher .side { background: #fff; }
  .teacher .side a.tab { flex-direction: column; gap: 3px; padding: 5px 2px; box-shadow: none !important; background: none !important; }
  .teacher .side a.tab .ic { width: 30px; height: 30px; border-radius: 9px; background: none; color: var(--muted); }
  .teacher .side a.tab.active .ic { background: var(--cb); color: var(--c); }
  .teacher .side a.tab .tab-t { align-items: center; }
  .teacher .side a.tab .tab-n { font-size: 10.5px; font-weight: 500; color: var(--muted); }
  .teacher .side a.tab.active .tab-n { color: var(--navy); font-weight: 600; }
  .teacher .side a.tab small { display: none; }
  .teacher .topbar h1 { font-size: 26px; }
  .ph-sub { font-size: 13px; }
  .tile { padding: 12px; }
}

@media (min-width: 801px) { .teacher .app { grid-template-columns: 272px minmax(0, 1fr); } .teacher .side a.tab small { white-space: normal; } .teacher .side a.tab .tab-t { flex: 1; } }
@media (max-width: 800px) { .teacher .side .foot { display: none; } }
body[data-view="home"] #join-next { display: none !important; }
@media (max-width: 800px) { .teacher section[data-view="settings"] h2, .teacher section[data-view="settings"] h3 { scroll-margin-top: 150px; } }

/* Students: switches, steppers, table, access box */
.sw { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 2px 0; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.sw .knob { position: relative; width: 38px; height: 22px; border-radius: 999px; background: #d5dae4; transition: background .15s; flex: none; }
.sw .knob::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: transform .15s; }
.sw.on { color: var(--ok); }
.sw.on .knob { background: var(--ok); }
.sw.on .knob::after { transform: translateX(16px); }
.sw:disabled { cursor: default; opacity: .7; }
.stepper { display: inline-flex; align-items: center; gap: 8px; }
.stepper button { width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2); background: #fff; font-size: 17px; font-weight: 700; color: var(--navy); cursor: pointer; line-height: 1; }
.stepper button:hover:not(:disabled) { border-color: var(--navy); }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper b { min-width: 22px; text-align: center; font-size: 16px; color: var(--navy); }
.seg { display: inline-flex; background: var(--sky); border-radius: 10px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 14px; border-radius: 8px; font: inherit; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.active { background: #fff; color: var(--navy); box-shadow: 0 1px 3px rgba(20,34,74,.12); }
.st-tbl td { vertical-align: middle; }
.st-tbl tr.paused td, .st-row.paused { opacity: .6; }
.linkish { border: 0; background: none; padding: 0; font: inherit; color: var(--navy); cursor: pointer; text-align: left; }
.linkish:hover b { text-decoration: underline; }
.acc-box { border: 1px solid #e6ebf3; border-radius: 14px; padding: 12px 14px; margin-top: 14px; background: linear-gradient(180deg, #fff, #f8fafd); }
.acc-box h3 { font-size: 15px; margin-bottom: 4px; }
.acc-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid var(--line); }
.acc-row:first-of-type { border-top: 0; }
.acc-k { display: flex; flex-direction: column; min-width: 0; }
.acc-k b { color: var(--navy); font-size: 14px; }
.acc-k small { color: var(--muted); font-size: 12.5px; }


/* Files in Messages */
.chat form .attach { padding: 0 12px; flex: 0 0 auto; }
.chat form .attach .i { width: 20px; height: 20px; }
.chat form .attach.busy { opacity: .5; cursor: progress; }
.chat.drop .log { outline: 2px dashed var(--navy); outline-offset: -8px; }
.msg-file { white-space: normal; display: grid; gap: 8px; margin-bottom: 2px; }
.msg-img img { display: block; max-width: 100%; max-height: 260px; border-radius: 10px; }
.msg-file audio { width: 240px; max-width: 100%; }
.mf-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mf-ic .i { width: 18px; height: 18px; }
.mf-name { flex: 1 1 120px; min-width: 0; font-weight: 600; word-break: break-word; }
.mf-name small { display: block; font-weight: 400; margin-top: 0; }
.msg .mf-btn { text-decoration: none; font-size: 12px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid currentColor; opacity: .85; }
.msg .mf-btn:hover { opacity: 1; }

/* "About you" questionnaire: student form (app) and answers in the teacher panel (admin) */
.iq { padding: 18px 0; border-top: 1px solid var(--line); }
.iq:first-child { border-top: 0; padding-top: 4px; }
.iq > .q { font-weight: 700; color: var(--navy); font-size: 15px; }
.iq > .h { font-size: 13px; color: var(--muted); margin-top: 2px; }
.iq-opts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.iq-opts label { display: inline-flex; align-items: center; cursor: pointer; border: 1px solid var(--line-2); border-radius: 999px; padding: 8px 14px; font-size: 14px; background: #fff; color: var(--ink); user-select: none; }
.iq-opts input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.iq-opts label:has(input:checked) { background: var(--navy); border-color: var(--navy); color: #fff; }
.iq-opts label:has(input:focus-visible) { outline: 2px solid var(--rose); outline-offset: 2px; }
.iq input[type=text], .iq textarea { margin-top: 10px; }
.iq textarea { min-height: 80px; }
.intake-cta { border-color: var(--rose); background: linear-gradient(0deg, #fff, #fff), var(--ivory); }
.intake-box { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--sky-2); }
.intake-box summary { cursor: pointer; }
.intake-q { margin-top: 10px; }
.intake-q .k { font-size: 12px; color: var(--muted); font-weight: 600; }
.intake-q .v { font-size: 14px; margin-top: 2px; display: flex; flex-wrap: wrap; gap: 6px; }
.intake-q .v .chip { white-space: normal; }
