/* The admin portal wears the same plain look as the Hypercube app: white panels on a light grey page,
   black text, hairline borders, a side bar that stays put. */
:root{
  --bg:#f4f4f6; --side:#fafafb; --panel:#ffffff; --line:#ebebeb; --line-strong:#d9d9d9; --text:#0a0a0a; --muted:#6b6b6b; --soft:#eeeef1;
  --good:#0a7c4a; --good-soft:#e6f4ec; --error:#c02626;
  --shadow:0 1px 1px rgba(0,0,0,.04),0 3px 8px rgba(0,0,0,.04),0 16px 28px -12px rgba(0,0,0,.12);
  --r:16px; --r-s:10px;
  --ui:"Inter","Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,sans-serif;
}
*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;background:var(--bg);color:var(--text);font:14px/1.5 var(--ui);-webkit-font-smoothing:antialiased}
h1,h2,p{margin:0}
h1{font-size:24px;line-height:1.25;font-weight:600;letter-spacing:-.02em}
h2{font-size:15px;font-weight:600;letter-spacing:-.01em}
h2 .muted{font-weight:400;margin-left:6px}
a{color:inherit}
.muted{color:var(--muted)}
.nowrap{white-space:nowrap}

/* ---------- the side bar and the page beside it ---------- */
.shell{display:grid;grid-template-columns:232px minmax(0,1fr);height:100vh}
.side{display:flex;flex-direction:column;gap:20px;padding:20px 12px;background:var(--side);border-right:1px solid var(--line)}
.logo{display:flex;align-items:center;gap:10px;padding:0 8px;font-size:16px;font-weight:650;letter-spacing:-.02em}
.logo small{font-size:12px;font-weight:500;color:var(--muted);letter-spacing:0;margin-left:2px}
.logo .mark{width:26px;height:26px;flex:none}
.logo .mark rect{fill:var(--text)}
.logo .mark path{fill:none;stroke:#fff;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.side nav{display:flex;flex-direction:column;gap:2px}
.nav{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:var(--r-s);color:var(--muted);text-decoration:none;font-weight:500;font-size:13px}
.nav:hover,.nav.on{background:var(--soft);color:var(--text)}
.nav svg{width:17px;height:17px;flex:none;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.page{overflow-y:auto;display:flex;flex-direction:column;gap:20px;padding:32px clamp(24px,4vw,72px) 64px}
.head{display:flex;flex-direction:column;gap:2px}
.problem{padding:16px 20px;border-radius:var(--r-s);background:#fdecec;color:var(--error)}

/* ---------- panels, tiles, tables ---------- */
.panel{background:var(--panel);border:1px solid rgba(0,0,0,.05);border-radius:var(--r);box-shadow:var(--shadow);padding:20px 24px;
       display:flex;flex-direction:column;gap:14px}
.panel.empty{align-items:center;text-align:center;padding:48px 24px;gap:6px}
.panel.empty b{font-size:15px}
.panel.empty p{max-width:60ch}
.tiles{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}
.tile{background:var(--panel);border:1px solid rgba(0,0,0,.05);border-radius:var(--r);box-shadow:var(--shadow);padding:16px 20px;
      display:flex;flex-direction:column}
.tile span{font-size:12px;font-weight:500;color:var(--muted)}
.tile b{font-size:30px;line-height:1.25;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.tile small{font-size:12px;color:var(--muted)}
table{width:100%;border-collapse:collapse}
th{font-size:12px;font-weight:500;color:var(--muted);text-align:left;padding:0 12px 8px 0;border-bottom:1px solid var(--line);white-space:nowrap}
td{padding:10px 12px 10px 0;border-bottom:1px solid var(--line);vertical-align:top}
tr:last-child td{border-bottom:0}
th:last-child,td:last-child{padding-right:0}
.num{text-align:right;font-variant-numeric:tabular-nums}
td small{display:block;font-size:12px}
/* what a student wrote, kept as they wrote it */
.text{white-space:pre-wrap;overflow-wrap:anywhere}
td.text{min-width:220px;max-width:520px}
.tag{display:inline-block;font-size:11px;font-weight:600;padding:2px 9px;border-radius:99px;background:var(--soft);color:var(--muted);white-space:nowrap}
.tag.good{background:var(--good-soft);color:var(--good)}
.tag.off{color:var(--error);background:#fdecec}
/* stars inked as far as the rating goes; --fill is that share of the five */
.stars{font-size:15px;letter-spacing:1px;color:transparent;
       background:linear-gradient(90deg,var(--text) var(--fill,0%),var(--line-strong) var(--fill,0%));-webkit-background-clip:text;background-clip:text}

/* a few figures in a row inside a panel: a name, the figure, a line about it */
.facts{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px 28px}
.facts div{display:flex;flex-direction:column}
.facts span{font-size:12px;font-weight:500;color:var(--muted)}
.facts b{font-size:22px;line-height:1.3;font-weight:600;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.facts small{font-size:12px;color:var(--muted)}
/* two tables side by side, one under the other when there is no room */
.split{display:grid;grid-template-columns:repeat(auto-fit,minmax(380px,1fr));gap:20px 40px;align-items:start}
.small{font-size:12px}
td a{text-decoration-color:var(--line-strong);text-underline-offset:3px;font-weight:500}
td a:hover{text-decoration-color:currentColor}
tr.sum td{font-weight:600;border-top:1px solid var(--line-strong)}
.more,.back{align-self:flex-start;font-size:13px;font-weight:500;color:var(--muted);text-decoration:none}
.more:hover,.back:hover{color:var(--text)}
.head .back{margin-bottom:6px}
/* one thing a student said about a class: the stars, then the words */
.said{display:flex;flex-direction:column;gap:4px;padding-top:12px;border-top:1px solid var(--line)}
.said:first-of-type{border-top:0;padding-top:0}

/* ---------- the dashboard's chart: one bar for each day ---------- */
.chart{display:flex;align-items:flex-end;gap:8px;height:180px;padding-top:8px}
.bar{flex:1;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;min-width:0}
.bar i{display:block;width:100%;max-width:44px;min-height:2px;border-radius:6px 6px 2px 2px;background:var(--text)}
.bar .count{font-size:12px;font-weight:600;font-variant-numeric:tabular-nums;min-height:18px}
.bar .day{font-size:11px;color:var(--muted)}

/* ---------- support messages ---------- */
.messages{display:flex;flex-direction:column;gap:14px}
.message{gap:8px}
.message header{display:flex;flex-wrap:wrap;align-items:baseline;justify-content:space-between;gap:4px 16px}
.message header a,.message header>span:first-child{font-weight:600;text-underline-offset:3px;text-decoration-color:var(--line-strong)}

/* ---------- pricing: one price to a row, and the button that saves them ---------- */
.prices{display:flex;flex-direction:column}
.price{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:12px 0;border-bottom:1px solid var(--line)}
.price:last-of-type{border-bottom:0}
.price span{display:flex;flex-direction:column;font-weight:500}
.price small{font-size:12px;font-weight:400;color:var(--muted)}
.price input.long{width:300px;text-align:left}
.price input{width:130px;flex:none;padding:8px 12px;border:1px solid var(--line-strong);border-radius:var(--r-s);background:var(--panel);
             color:var(--text);font:inherit;text-align:right;font-variant-numeric:tabular-nums}
.price input:focus{outline:2px solid var(--text);outline-offset:1px}
.actions{display:flex;align-items:center;justify-content:flex-end;gap:16px}
.actions .good{color:var(--good)}
.actions .bad{color:var(--error)}
button.button{font-family:inherit;cursor:pointer}
.button.primary{background:var(--text);color:#fff;border-color:var(--text)}
.narrow{max-width:680px}

.pager{display:flex;align-items:center;justify-content:center;gap:16px}
.button{padding:7px 14px;border-radius:99px;border:1px solid rgba(0,0,0,.1);background:var(--panel);text-decoration:none;font-size:13px;
        font-weight:500;box-shadow:0 1px 2px rgba(0,0,0,.08)}
.button:hover{box-shadow:0 2px 4px rgba(0,0,0,.06),0 8px 16px -4px rgba(0,0,0,.14)}
@media (max-width:760px){.shell{grid-template-columns:minmax(0,1fr);height:auto}.side{flex-direction:row;align-items:center;border-right:0;border-bottom:1px solid var(--line)}
  .side nav{flex-direction:row}.panel{overflow-x:auto}}
