/* Google Sans — self-hosted (SIL Open Font License) */
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/google-sans-devanagari-400-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF4,U+1CF7-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B0A; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/google-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 400; src: url(fonts/google-sans-latin-400-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/google-sans-devanagari-500-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF4,U+1CF7-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B0A; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/google-sans-latin-ext-500-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 500; src: url(fonts/google-sans-latin-500-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/google-sans-devanagari-600-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF4,U+1CF7-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B0A; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/google-sans-latin-ext-600-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 600; src: url(fonts/google-sans-latin-600-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/google-sans-devanagari-700-normal.woff2) format('woff2'); unicode-range: U+0900-097F,U+1CD0-1CF4,U+1CF7-1CF9,U+200C-200D,U+20A8,U+20B9,U+20F0,U+25CC,U+A830-A839,U+A8E0-A8FF,U+11B00-11B0A; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/google-sans-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C4,U+2113,U+2C60-2C7F,U+A720-A7FF; }
@font-face { font-family: 'Google Sans'; font-style: normal; font-display: swap; font-weight: 700; src: url(fonts/google-sans-latin-700-normal.woff2) format('woff2'); unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD; }
/* ============ AstroAnsh brand tokens ============ */
:root {
  color-scheme: light;
  --plum: #230A4D;          /* logo wordmark */
  --plum-2: #34146B;
  --plum-3: #4B2A8A;
  --crimson: #D72E47;       /* logo mark */
  --crimson-2: #BF2139;
  --crimson-soft: #FCE8EB;
  --crimson-ink: #B0203A;
  --lilac: #F0EBF9;
  --lilac-2: #E4DBF4;
  --plum-ink: #3A1A6E;
  --green: #1C8A5A;
  --green-soft: #E2F4EA;
  --amber-soft: #FFF4E0;
  --amber-ink: #8A5A06;

  --bg: #F6F4FA;
  --surface: #FFFFFF;
  --surface-2: #FAF8FD;
  --ink: #1B1230;
  --ink-2: #554B6B;
  --ink-3: #8D85A2;
  --line: #E8E3F1;
  --line-2: #DCD5EA;

  --font: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --r-xl: 22px;
  --r-lg: 16px;
  --r-md: 12px;
  --r-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(35, 10, 77, .05);
  --shadow: 0 1px 2px rgba(35, 10, 77, .04), 0 10px 30px -18px rgba(35, 10, 77, .28);
  --ring: 0 0 0 4px color-mix(in srgb, var(--crimson) 18%, transparent);
  --side-w: 264px;
}

/* dark theme — set by theme.js on <html data-theme> */
:root[data-theme="dark"] {
  color-scheme: dark;
  
    --bg: #120A22;
    --surface: #1B1230;
    --surface-2: #22183A;
    --ink: #F1ECFA;
    --ink-2: #BDB3D3;
    --ink-3: #8A80A3;
    --line: #2E2347;
    --line-2: #3B2E59;
    --lilac: #2A1D47;
    --lilac-2: #35265A;
    --plum-ink: #CDB9F5;
    --crimson-soft: #3E1625;
    --crimson-ink: #FF8A9B;
    --green: #5FD39C;
    --green-soft: #133426;
    --amber-soft: #3A2B12;
    --amber-ink: #F5C46B;
    --shadow: 0 1px 0 rgba(0,0,0,.25), 0 14px 34px -20px rgba(0,0,0,.7);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4 { font-family: var(--font); }
a { color: var(--plum-3); text-decoration-thickness: 1px; text-underline-offset: 3px; }
[data-theme="dark"] a { color: #B9A2F0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--crimson); outline-offset: 2px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }
.deva { font-family: var(--font); }

/* logo swaps for dark mode */
.logo { display: block; height: 30px; width: auto; }
.logo-white { display: none; }
[data-theme="dark"] .logo-color { display: none; }
[data-theme="dark"] .logo-white { display: block; }

/* ============ Buttons & inputs ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line-2); background: var(--surface);
  padding: 9px 16px; border-radius: 999px; cursor: pointer;
  font-weight: 500; font-size: 14px; line-height: 1.2;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .1s;
}
.btn:hover { border-color: var(--ink-3); background: var(--surface-2); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--crimson); border-color: var(--crimson); color: #fff; box-shadow: 0 6px 16px -8px rgba(215, 46, 71, .7); }
.btn-primary:hover { background: var(--crimson-2); border-color: var(--crimson-2); }
.btn-danger { color: var(--crimson-ink); }
.btn-danger.armed { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--plum-ink); }
.btn-ghost:hover { background: var(--lilac); border-color: transparent; }
.btn-wide { width: 100%; justify-content: center; padding: 13px 16px; font-size: 15px; font-weight: 600; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-sm svg { width: 14px; height: 14px; }

.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px; flex: none;
  border-radius: 999px; border: 1px solid transparent; background: transparent; cursor: pointer;
  color: var(--ink-3); transition: background .15s, color .15s;
}
.icon-btn:hover { background: var(--lilac); color: var(--plum-ink); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn svg { width: 16px; height: 16px; }

.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field > span { font-weight: 500; font-size: 13.5px; color: var(--ink-2); }
.field small { color: var(--ink-3); font-size: 12.5px; }
.input, .field input[type=text], .field input[type=password], .field input[type=url], .field select, .field textarea {
  width: 100%; border: 1px solid var(--line-2); background: var(--surface);
  border-radius: var(--r-sm); padding: 11px 13px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 100px; resize: vertical; line-height: 1.55; }
.input:focus, .field input:focus, .field select:focus, .field textarea:focus { border-color: var(--crimson); box-shadow: var(--ring); }
.check { display: flex; gap: 10px; align-items: center; font-weight: 500; margin-bottom: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--crimson); }

/* ============ Sign-in ============ */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, 1fr); background: var(--surface); }
.auth-sky {
  position: relative; overflow: hidden; display: grid; place-items: center; padding: 48px;
  background:
    radial-gradient(700px 500px at 75% 15%, rgba(215, 46, 71, .30), transparent 60%),
    radial-gradient(600px 600px at 10% 100%, rgba(75, 42, 138, .55), transparent 60%),
    linear-gradient(160deg, #2C0E5E 0%, #230A4D 45%, #160631 100%);
  color: #EEE8FA;
}
.auth-sky::before {
  content: ""; position: absolute; inset: 0; opacity: .9;
  background:
    radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 78% 14%, #fffc 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 64% 82%, #fff 50%, transparent 51%),
    radial-gradient(1px 1px at 30% 70%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 88% 56%, #fffb 50%, transparent 51%),
    radial-gradient(1.5px 1.5px at 20% 90%, #fffa 50%, transparent 51%),
    radial-gradient(1px 1px at 48% 8%, #fffb 50%, transparent 51%),
    radial-gradient(1px 1px at 92% 88%, #fff9 50%, transparent 51%);
}
.wheel { width: min(70vh, 86%); aspect-ratio: 1; position: relative; }
.wheel svg { width: 100%; height: 100%; display: block; }
.wheel .spin { transform-origin: 50% 50%; animation: turn 240s linear infinite; }
@keyframes turn { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wheel .spin, .loading img { animation: none; } }
.wheel-caption { position: absolute; left: 48px; right: 48px; bottom: 44px; max-width: 34ch; }
.wheel-caption b { display: block; font-size: 24px; font-weight: 600; letter-spacing: -.01em; color: #fff; margin-bottom: 6px; }
.wheel-caption span { color: #C9BDE6; font-size: 15px; }

.auth-panel { display: grid; place-items: center; padding: 40px 28px; background: var(--surface); }
.auth-card { width: 100%; max-width: 384px; }
.auth-logo { margin-bottom: 40px; }
.auth-logo .logo { height: 36px; }
.auth-logo small { display: block; margin-top: 10px; color: var(--ink-3); font-size: 13px; font-weight: 500; }
.auth-card h1 { font-weight: 600; font-size: 32px; line-height: 1.15; margin: 0 0 8px; letter-spacing: -.02em; }
.auth-card p.lead { color: var(--ink-2); margin: 0 0 28px; }
.code-input { font-size: 22px !important; letter-spacing: .35em; text-align: center; font-variant-numeric: tabular-nums; font-weight: 500; }
.form-error { color: var(--crimson-ink); background: var(--crimson-soft); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; margin-bottom: 14px; }
.auth-foot { color: var(--ink-3); font-size: 13px; margin-top: 22px; }
.qr-box { display: grid; grid-template-columns: 148px 1fr; gap: 18px; align-items: center; margin: 4px 0 20px; }
.qr-box img { width: 148px; height: 148px; border-radius: var(--r-md); background: #fff; padding: 6px; border: 1px solid var(--line); }
.secret-text { font-size: 13px; letter-spacing: .04em; word-break: break-all; color: var(--ink-2); background: var(--surface-2); padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.steps { margin: 0 0 18px; padding-left: 20px; color: var(--ink-2); }
.steps li { margin-bottom: 4px; }
.backup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0 0 16px; }
.backup-grid code { font: 600 15px/1 var(--font); background: var(--surface-2); border: 1px dashed var(--line-2); padding: 11px; border-radius: var(--r-sm); text-align: center; letter-spacing: .08em; }

/* ============ App shell ============ */
.shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100vh; }
.side {
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 22px 14px 18px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 6px; overflow-y: auto;
}
.side-brand { padding: 4px 10px 22px; }
.side-brand .logo { height: 27px; }
.side-brand small { display: inline-block; margin-top: 10px; font-size: 12px; font-weight: 600; color: var(--crimson-ink); background: var(--crimson-soft); padding: 3px 10px; border-radius: 999px; }
.nav-label { font-size: 12px; color: var(--ink-3); font-weight: 500; padding: 8px 12px 6px; }
.nav { display: grid; gap: 2px; }
.nav button {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; color: var(--ink-2); padding: 10px 12px; border-radius: 12px; cursor: pointer;
  font-weight: 500; font-size: 14.5px; transition: background .15s, color .15s;
}
.nav button svg { width: 19px; height: 19px; flex: none; color: var(--ink-3); }
.nav button:hover { background: var(--surface-2); color: var(--ink); }
.nav button[aria-current="page"] { background: var(--lilac); color: var(--plum-ink); font-weight: 600; }
.nav button[aria-current="page"] svg { color: var(--crimson); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: grid; gap: 10px; }
.side-foot .nav button { font-size: 13.5px; padding: 8px 12px; }

.main { min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 12px;
  padding: 14px 36px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); border-bottom: 1px solid var(--line);
}
.search { flex: 1; max-width: 580px; position: relative; }
.search svg { position: absolute; left: 15px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 11px 46px 11px 44px; outline: none; box-shadow: var(--shadow-sm); transition: border-color .15s, box-shadow .15s; }
.search input:focus { border-color: var(--crimson); box-shadow: var(--ring); }
.search kbd { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font: 600 11px var(--font); color: var(--ink-3); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 7px; background: var(--surface-2); }
.topbar .spacer { flex: 1; }
.edit-toggle[aria-pressed="true"] { background: var(--plum); border-color: var(--plum); color: #fff; }
.save-state { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }

.content { padding: 34px 36px 80px; max-width: 1200px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-head h1 { font-weight: 600; font-size: 32px; line-height: 1.15; margin: 0; letter-spacing: -.02em; }
.page-head h1.h1-sm { font-size: 26px; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 64ch; }
h2.sec { font-weight: 600; font-size: 18px; margin: 34px 0 12px; display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
h2.sec:first-child { margin-top: 0; }
h2.sec .add { margin-left: auto; font-size: 14px; font-weight: 500; }

/* ============ Surfaces ============ */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.panel-pad { padding: 20px 22px; }
.rows { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: minmax(150px, 240px) minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 13px 18px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row:hover { background: var(--surface-2); }
.row:first-child:hover { border-radius: var(--r-lg) var(--r-lg) 0 0; }
.row:last-child:hover { border-radius: 0 0 var(--r-lg) var(--r-lg); }
.row .k { font-weight: 500; color: var(--ink); }
.row .k small { display: block; font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.row .v { min-width: 0; overflow-wrap: anywhere; color: var(--ink-2); }
.row .acts { display: flex; gap: 2px; align-items: center; }
.muted { color: var(--ink-3); font-style: italic; }
.secret { letter-spacing: .06em; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 500; }
a.url { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; font-weight: 500; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tag-pmp { background: var(--crimson-soft); color: var(--crimson-ink); }
.tag-non { background: var(--lilac); color: var(--plum-ink); }
.tag-open { background: var(--green-soft); color: var(--green); }
.tag-open::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 22%, transparent); }
.tag-closed { background: var(--surface-2); color: var(--ink-3); border: 1px solid var(--line); }

/* Batch ID table */
.idtable { width: 100%; border-collapse: collapse; }
.idtable th { text-align: left; font-size: 12.5px; font-weight: 500; color: var(--ink-3); padding: 13px 18px; border-bottom: 1px solid var(--line); }
.idtable td { padding: 12px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.idtable tr:last-child td { border-bottom: 0; }
.idtable tbody tr:hover td { background: var(--surface-2); }
.idtable tr.is-open td { background: color-mix(in srgb, var(--green-soft) 55%, transparent); }
.idcode { display: inline-flex; align-items: center; font-weight: 700; font-size: 15px; letter-spacing: .06em; font-variant-numeric: tabular-nums; color: var(--plum-ink); }
.idcode { color: var(--plum); }
[data-theme="dark"] .idcode { color: var(--plum-ink); }
.batchname { font-weight: 600; white-space: nowrap; }
.td-acts { text-align: right; white-space: nowrap; width: 1%; }

/* Alerts */
.alert { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 15px 18px; border-radius: var(--r-md); margin-bottom: 16px; border: 1px solid; }
.alert svg { width: 20px; height: 20px; margin-top: 1px; }
.alert b { display: block; margin-bottom: 2px; font-weight: 600; }
.alert p { margin: 0; color: var(--ink-2); }
.alert-info { background: var(--lilac); border-color: var(--lilac-2); }
.alert-info svg, .alert-info b { color: var(--plum-ink); }
.alert-danger { background: var(--crimson-soft); border-color: color-mix(in srgb, var(--crimson) 25%, transparent); }
.alert-danger svg, .alert-danger b { color: var(--crimson-ink); }

/* Today */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 22px; }
.offer-hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 30px 30px 26px; color: #F2EDFB;
  background:
    radial-gradient(420px 260px at 100% 0%, rgba(215, 46, 71, .55), transparent 70%),
    linear-gradient(150deg, #3A1478 0%, #230A4D 55%, #1A0739 100%);
  box-shadow: 0 24px 50px -28px rgba(35, 10, 77, .8);
}
.offer-hero .orbit { position: absolute; right: -70px; top: -70px; width: 290px; height: 290px; opacity: .8; pointer-events: none; }
.offer-hero .status { display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.12); color: #fff; font-weight: 600; font-size: 12.5px; padding: 5px 12px; border-radius: 999px; }
.offer-hero .status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #FF6B81; box-shadow: 0 0 0 3px rgba(255, 107, 129, .3); }
.offer-hero h3 { font-weight: 600; font-size: 30px; line-height: 1.15; margin: 14px 0 6px; max-width: 18ch; position: relative; letter-spacing: -.02em; }
.offer-hero .sub { color: #CBBFE8; margin: 0 0 24px; position: relative; }
.offer-facts { display: flex; gap: 12px; flex-wrap: wrap; position: relative; }
.offer-facts div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); padding: 10px 16px; border-radius: 14px; }
.offer-facts div span { display: block; color: #B7AAD9; font-size: 12px; }
.offer-facts div b { font-size: 17px; font-weight: 600; }
.offer-facts .price b { color: #fff; }
.offer-hero .acts { position: absolute; top: 16px; right: 16px; z-index: 1; }
.offer-hero .icon-btn { color: #CBBFE8; }
.offer-hero .icon-btn:hover { background: rgba(255,255,255,.12); color: #fff; }

.offer-card { padding: 20px 22px; }
.offer-card .status { font-size: 12.5px; font-weight: 600; color: var(--plum-ink); background: var(--lilac); padding: 4px 11px; border-radius: 999px; display: inline-block; }
.offer-card h3 { font-weight: 600; font-size: 19px; margin: 10px 0 2px; letter-spacing: -.01em; }
.offer-card p { margin: 0 0 14px; color: var(--ink-2); }
.offer-card .facts { display: flex; gap: 24px; flex-wrap: wrap; font-size: 14px; font-weight: 500; }
.offer-card .facts span { color: var(--ink-3); display: block; font-size: 12px; font-weight: 400; }
.card-head { display: flex; justify-content: space-between; align-items: start; gap: 8px; }

.windows { display: grid; gap: 10px; }
.window { display: flex; align-items: center; gap: 14px; padding: 14px 16px; }
.window .when { margin-left: auto; }
.window .idcode { font-size: 13.5px; }

/* Scripts */
.script { margin-bottom: 20px; }
.script-head { display: flex; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.script-head h3 { font-weight: 600; font-size: 18px; margin: 0; letter-spacing: -.01em; }
.script-head p { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }
.langs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 16px 22px 22px; }
.lang { border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface-2); display: flex; flex-direction: column; }
.lang-top { display: flex; align-items: center; justify-content: space-between; padding: 10px 10px 0 16px; font-size: 13px; color: var(--ink-3); font-weight: 600; }
.lang-body { padding: 8px 16px 18px; white-space: pre-wrap; font-size: 14.5px; line-height: 1.7; }
.lang-body.deva { font-size: 15.5px; line-height: 1.85; }
.rule { padding: 18px 22px; margin-bottom: 14px; border-left: 4px solid var(--crimson); }
.rule h3 { margin: 0 0 6px; font-size: 16px; font-weight: 600; }
.rule p { margin: 0; color: var(--ink-2); }
.rule ul { margin: 10px 0 0; padding-left: 20px; color: var(--ink-2); }

/* Batches */
.batch-picker { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; align-items: center; }
.chip { border: 1px solid var(--line-2); background: var(--surface); border-radius: 999px; padding: 8px 18px; cursor: pointer; font-weight: 600; font-size: 14px; white-space: nowrap; color: var(--ink-2); transition: all .15s; }
.chip:hover { border-color: var(--plum-3); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--plum); color: #fff; border-color: var(--plum); box-shadow: 0 8px 18px -10px rgba(35, 10, 77, .8); }
[data-theme="dark"] .chip[aria-pressed="true"] { background: var(--crimson); border-color: var(--crimson); }
.batch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.batch-grid .span2 { grid-column: 1 / -1; }
.block-title { display: flex; align-items: center; gap: 8px; padding: 16px 18px 6px; font-weight: 600; font-size: 14px; color: var(--ink); }
.incl { padding: 18px 22px; }
.incl h4 { margin: 0 0 10px; font-size: 14px; font-weight: 500; display: flex; gap: 8px; align-items: center; color: var(--ink-2); }
.incl ul { margin: 0; padding-left: 0; list-style: none; display: grid; gap: 7px; }
.incl li { display: grid; grid-template-columns: 14px 1fr; gap: 8px; color: var(--ink-2); font-size: 14.5px; }
.incl li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: 8px; background: var(--plum-3); }
.incl.pmp li::before { background: var(--crimson); }
.note-line { display: flex; gap: 10px; align-items: start; padding: 13px 18px; color: var(--amber-ink); font-size: 14px; background: var(--amber-soft); border-radius: var(--r-md); }
.note-line svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

.price { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Search */
.results .row { grid-template-columns: minmax(150px, 260px) minmax(0, 1fr) auto; }
.where { font-size: 12px; color: var(--ink-3); font-weight: 400; }
mark { background: var(--crimson-soft); color: inherit; border-radius: 4px; padding: 0 2px; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-weight: 600; font-size: 18px; margin-bottom: 4px; }

/* Settings */
.settings { display: grid; gap: 20px; max-width: 740px; }
.settings .panel-pad h3 { margin: 0 0 4px; font-weight: 600; font-size: 17px; }
.settings .panel-pad p { margin: 0 0 14px; color: var(--ink-2); }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline-form .input { max-width: 190px; }

/* ============ Modal ============ */
dialog#modal { border: 0; padding: 0; border-radius: var(--r-xl); width: min(660px, calc(100vw - 32px)); max-height: calc(100vh - 48px); background: var(--surface); color: var(--ink); box-shadow: 0 40px 90px -30px rgba(20, 5, 45, .6); }
dialog#modal::backdrop { background: rgba(26, 8, 56, .5); backdrop-filter: blur(4px); }
dialog[open] { animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(8px) scale(.98); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { dialog[open] { animation: none; } }
.modal-form { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 24px 8px; }
.modal-head h2 { margin: 0; font-weight: 600; font-size: 20px; letter-spacing: -.01em; }
.modal-body { padding: 10px 24px; overflow-y: auto; }
.modal-foot { display: flex; gap: 8px; padding: 14px 24px 20px; border-top: 1px solid var(--line); flex-wrap: wrap; align-items: center; }
.modal-foot .spacer { flex: 1; }
.pairs { display: grid; gap: 8px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr) auto; gap: 8px; }
.pair input { border: 1px solid var(--line-2); background: var(--surface); border-radius: var(--r-sm); padding: 10px 12px; outline: none; width: 100%; }
.pair input:focus { border-color: var(--crimson); box-shadow: var(--ring); }
.add-pair { justify-self: start; margin-top: 2px; }

/* ============ Toast & loading ============ */
#toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; background: var(--plum); color: #fff; padding: 11px 20px; border-radius: 999px; font-weight: 500; font-size: 14px; box-shadow: 0 14px 30px -12px rgba(35, 10, 77, .7); transition: opacity .2s, transform .2s; z-index: 100; }
#toast.show { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: var(--crimson); }
.loading { min-height: 100vh; display: grid; place-items: center; background: var(--bg); }
.loading img { width: 64px; height: 64px; animation: breathe 1.4s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(.9); opacity: .6; } }

/* utilities */
.mt16 { margin-top: 16px; }
.mb10 { margin-bottom: 10px; }
.head-acts { display: flex; gap: 8px; flex-wrap: wrap; }
.pad-note { padding: 0 18px 14px; margin: 0; }
.mobile-only-support { display: none; margin-top: 4px; }

/* ============ Responsive ============ */
@media (max-width: 1080px) {
  .today-grid, .batch-grid { grid-template-columns: minmax(0, 1fr); }
  .langs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-sky { min-height: 230px; padding: 24px; }
  .wheel { width: 200px; }
  .wheel-caption { display: none; }
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; height: auto; padding: 14px 12px 8px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-brand { padding: 2px 6px 12px; display: flex; align-items: center; gap: 10px; justify-content: space-between; }
  .side-brand small { margin-top: 0; }
  .nav-label { display: none; }
  .nav { grid-auto-flow: column; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .nav button { white-space: nowrap; padding: 8px 12px; }
  .side-foot { display: none; }
  .topbar { padding: 10px 16px; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; max-width: none; }
  .search kbd { display: none; }
  .content { padding: 22px 16px 64px; }
  .page-head h1 { font-size: 26px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 14px; }
  .row .k { grid-column: 1 / -1; }
  .results .row { grid-template-columns: minmax(0, 1fr) auto; }
  .idtable th:nth-child(4), .idtable td:nth-child(4) { display: none; }
  .idtable td, .idtable th { padding: 10px 12px; }
  .mobile-only-support { display: block; }
  .qr-box { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .pair { grid-template-columns: minmax(0, 1fr) auto; }
  .pair input:first-child { grid-column: 1 / -1; }
  .offer-hero h3 { font-size: 25px; }
}

/* refinements */
.window .when { color: var(--green); font-weight: 600; font-size: 13.5px; text-align: right; white-space: nowrap; }
.offer-hero h3 { max-width: 26ch; }
.shell { background: linear-gradient(to right, var(--surface) calc(var(--side-w) - 1px), var(--line) calc(var(--side-w) - 1px), var(--line) var(--side-w), transparent var(--side-w)); }
@media (max-width: 860px) { .shell { background: none; } }
.nw { white-space: nowrap; }

/* theme toggle */
.theme-toggle { width: 40px; height: 40px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); }
.theme-toggle:hover { background: var(--lilac); color: var(--plum-ink); border-color: var(--line-2); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .i-sun { display: none; }
[data-theme="dark"] .theme-toggle .i-sun { display: block; }
[data-theme="dark"] .theme-toggle .i-moon { display: none; }
.auth-panel { position: relative; }
.auth-panel > .theme-toggle { position: absolute; top: 20px; right: 20px; }
body, .panel, .side, .topbar, .row, .btn, .chip, .lang { transition: background-color .25s ease, border-color .25s ease, color .25s ease; }
@media (prefers-reduced-motion: reduce) { body, .panel, .side, .topbar, .row, .btn, .chip, .lang { transition: none; } }

/* ===== devices & approval ===== */
.badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--crimson); color: #fff; font-size: 11.5px; font-weight: 700; display: inline-grid; place-items: center; }
.wait-badge { display: inline-flex; align-items: center; gap: 10px; background: var(--amber-soft); color: var(--amber-ink); font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.pulse { width: 9px; height: 9px; border-radius: 50%; background: currentColor; animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 50% { box-shadow: 0 0 0 7px transparent; } }
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } }
.wait-form { margin-top: 4px; }
.link-btn { background: none; border: 0; padding: 0; color: var(--plum-3); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font: inherit; }
[data-theme="dark"] .link-btn { color: #B9A2F0; }
.dev-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 20px 22px 8px; }
.dev-head h3 { margin: 0 0 4px; font-weight: 600; font-size: 17px; }
.dev-head p { margin: 0; color: var(--ink-2); }
.dev-group { font-size: 12.5px; font-weight: 600; color: var(--ink-3); padding: 14px 22px 6px; }
.devs { list-style: none; margin: 0; padding: 0 0 8px; }
.dev { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 22px; border-top: 1px solid var(--line); }
.dev.is-pending { background: color-mix(in srgb, var(--amber-soft) 70%, transparent); }
.dev-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--lilac); color: var(--plum-ink); }
.dev.is-pending .dev-ico { background: var(--amber-soft); color: var(--amber-ink); }
.dev-ico svg { width: 20px; height: 20px; }
.dev-name { font-weight: 600; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dev-name .tag { font-size: 11.5px; padding: 2px 9px; }
.dev-meta { font-size: 13px; color: var(--ink-3); }
.dev-acts { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) {
  .dev { grid-template-columns: auto minmax(0, 1fr); padding: 12px 16px; }
  .dev-acts { grid-column: 1 / -1; justify-content: flex-start; }
  .dev-head { padding: 16px; }
}

/* password field with show/hide */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 48px !important; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); }

/* ===== flash notices ===== */
.flash { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px 18px; border-radius: var(--r-lg); margin-bottom: 14px; border: 1px solid; }
.flash-ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.flash-ico svg { width: 19px; height: 19px; }
.flash-body b { display: block; font-weight: 600; font-size: 15.5px; }
.flash-body p { margin: 3px 0 0; color: var(--ink-2); white-space: pre-wrap; }
.flash-body small { display: block; margin-top: 6px; color: var(--ink-3); font-size: 12.5px; }
.flash-acts { display: flex; gap: 2px; }
.flash-urgent { background: var(--crimson-soft); border-color: color-mix(in srgb, var(--crimson) 28%, transparent); }
.flash-urgent .flash-ico { background: var(--crimson); color: #fff; box-shadow: 0 6px 14px -6px rgba(215, 46, 71, .8); }
.flash-info { background: var(--lilac); border-color: var(--lilac-2); }
.flash-info .flash-ico { background: var(--plum); color: #fff; }
[data-theme="dark"] .flash-info .flash-ico { background: var(--plum-3); }
.flash-good { background: var(--green-soft); border-color: color-mix(in srgb, var(--green) 28%, transparent); }
.flash-good .flash-ico { background: var(--green); color: #fff; }
[data-theme="dark"] .flash-good .flash-ico { color: #0E2A1E; }
details.old { margin: 4px 0 8px; }
details.old summary { cursor: pointer; color: var(--ink-3); font-size: 13.5px; font-weight: 500; padding: 4px 0 10px; }
details.old .flash { opacity: .6; }

/* ===== coupons ===== */
.coupons { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.coupon { display: grid; grid-template-columns: 128px minmax(0, 1fr); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); overflow: hidden; position: relative; }
.coupon-left {
  background: linear-gradient(160deg, #3A1478 0%, #230A4D 70%); color: #fff; padding: 18px 14px;
  display: flex; flex-direction: column; justify-content: center; gap: 6px; position: relative;
}
.coupon-left::after { /* perforated edge */
  content: ""; position: absolute; right: -6px; top: 0; bottom: 0; width: 12px;
  background: radial-gradient(circle at 6px 8px, var(--surface) 4px, transparent 4.5px) 0 0 / 12px 16px repeat-y;
}
.coupon.is-active .coupon-left { background: radial-gradient(160px 120px at 0% 0%, rgba(215, 46, 71, .65), transparent 70%), linear-gradient(160deg, #3A1478 0%, #230A4D 70%); }
.coupon-off { font-size: 21px; font-weight: 700; line-height: 1.1; letter-spacing: -.01em; overflow-wrap: anywhere; }
.coupon-for { font-size: 12.5px; color: #CBBFE8; line-height: 1.35; }
.coupon-right { padding: 14px 16px 16px 22px; min-width: 0; }
.coupon-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; }
.coupon-code {
  display: inline-flex; align-items: center; gap: 10px; margin: 8px 0 6px; max-width: 100%;
  font: 700 19px/1 var(--font); letter-spacing: .08em; color: var(--plum); background: var(--lilac);
  border: 1.5px dashed var(--plum-3); border-radius: 10px; padding: 10px 14px; cursor: pointer; overflow-wrap: anywhere; text-align: left;
}
[data-theme="dark"] .coupon-code { color: var(--plum-ink); border-color: var(--plum-ink); }
.coupon-code svg { width: 16px; height: 16px; flex: none; opacity: .7; }
.coupon-code:hover { background: var(--lilac-2); }
.coupon-meta { font-size: 13px; color: var(--ink-3); }
.coupon-note { margin: 8px 0 0; font-size: 13.5px; color: var(--ink-2); }
.coupon.is-expired, .coupon.is-paused { box-shadow: none; }
.coupon.is-expired .coupon-left, .coupon.is-paused .coupon-left { background: var(--ink-3); }
.coupon.is-expired .coupon-code { text-decoration: line-through; opacity: .6; }
.coupon-mini { display: grid; gap: 10px; }
.cm { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 12px 12px 16px; }
.cm-code { font-weight: 700; letter-spacing: .07em; color: var(--plum-ink); margin-right: 10px; }
.cm-off { font-size: 13.5px; color: var(--ink-2); }
@media (max-width: 860px) {
  .coupons { grid-template-columns: minmax(0, 1fr); }
  .coupon { grid-template-columns: 104px minmax(0, 1fr); }
  .coupon-off { font-size: 18px; }
}
.side-brand small.role-staff { color: var(--plum-ink); background: var(--lilac); }

/* student chatbot page in desk */
.settings h3 .tag { margin-left: 8px; vertical-align: middle; font-size: 12px; }
.share-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share-row code { font: 600 15px var(--font); color: var(--plum-ink); background: var(--lilac); padding: 9px 14px; border-radius: 10px; overflow-wrap: anywhere; }
.share-row .btn { text-decoration: none; }
.howlist { margin: 0; padding-left: 20px; color: var(--ink-2); display: grid; gap: 6px; }
.settings .alert { margin: 14px 0 0; }

/* ===== team contacts ===== */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.person { padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; }
.person-top { display: flex; align-items: center; gap: 12px; }
.avatar-ini { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 15px; color: #fff; background: linear-gradient(140deg, var(--plum-3), var(--plum)); }
.person-main { flex: 1; min-width: 0; }
.person-name { font-weight: 600; font-size: 15.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.avatar-ini svg { width: 19px; height: 19px; }
.person.is-pmp .avatar-ini { background: linear-gradient(140deg, #E2526A, var(--crimson-2)); }
.person.is-non .avatar-ini { background: linear-gradient(140deg, var(--plum-3), var(--plum)); }
.person:not(.is-pmp):not(.is-non) .avatar-ini { background: linear-gradient(140deg, #7B6A9C, #4A3D63); }
.person-name .tag { font-size: 11px; padding: 2px 8px; }
.person-meta { font-size: 13px; color: var(--ink-3); }
.person-phone { font-size: 19px; font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; margin-top: 6px; color: var(--ink); }
.person-email { font-size: 16px; overflow-wrap: anywhere; letter-spacing: 0; }
.person-hours { font-size: 13px; color: var(--ink-2); }
.person-note { margin: 2px 0 0; font-size: 13.5px; color: var(--ink-2); }
.person-acts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.person-acts .btn { text-decoration: none; color: var(--ink); }
.btn-wa { background: #E3F6EA; border-color: #BFE8CD; color: #11713D !important; }
[data-theme="dark"] .btn-wa { background: #12301F; border-color: #1E4A31; color: #6FE0A0 !important; }
.tag-both { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2); }
.in-bot { color: var(--green); font-weight: 500; }
.seg { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 6px; }
.seg-label { font-size: 13.5px; color: var(--ink-3); margin-right: 4px; }
.seg .chip { font-size: 13.5px; padding: 7px 14px; }
h2.sec .count { font-size: 12.5px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }

/* ===== lookup & message builder ===== */
.lookup { padding: 16px 18px; margin-bottom: 22px; }
.lookup-top { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.lookup-field { flex: 1; min-width: 240px; position: relative; display: block; }
.lookup-field svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--crimson); }
.lookup-field input { width: 100%; border: 1px solid var(--line-2); background: var(--surface-2); border-radius: 12px; padding: 12px 14px 12px 42px; font-size: 15.5px; outline: none; font-weight: 500; letter-spacing: .02em; }
.lookup-field input:focus { border-color: var(--crimson); box-shadow: var(--ring); background: var(--surface); }
#lookupres:not(:empty) { margin-top: 14px; }
.lk-empty, .lk-pick { color: var(--ink-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.lk-card { border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.lk-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 16px; background: var(--surface-2); border-bottom: 1px solid var(--line); }
.lk-title { font-weight: 600; font-size: 17px; display: flex; gap: 8px; align-items: center; }
.lk-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 3px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.lk-warn { margin: 0; padding: 12px 16px; color: var(--amber-ink); background: var(--amber-soft); font-size: 14px; }
.lk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.lk-sec { border-top: 1px solid var(--line); }
.lk-sec-title { font-weight: 600; font-size: 13.5px; padding: 10px 16px 0; }
.lk-sec .row { padding: 8px 16px; grid-template-columns: minmax(110px, 170px) minmax(0, 1fr) auto; }
.mb-row { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 12px; }
.mb-checks { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.mb-checks .check { margin-bottom: 4px; }
.mb-text { font-size: 14px; line-height: 1.5; }

/* ===== FAQs ===== */
.faqs { display: grid; gap: 10px; }
.faq { padding: 0 18px; }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 15px 0; }
.faq summary::-webkit-details-marker { display: none; }
.faq-q { font-weight: 600; }
.faq-q::before { content: "+"; display: inline-block; width: 18px; color: var(--crimson); font-weight: 700; }
.faq[open] .faq-q::before { content: "–"; }
.faq-tags { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.faq-a { color: var(--ink-2); white-space: pre-wrap; padding: 0 0 6px 18px; }
.faq-acts { display: flex; justify-content: flex-end; gap: 4px; padding-bottom: 10px; }
.flash-bot { margin-left: 8px; font-size: 11px; padding: 2px 8px; vertical-align: middle; }

/* ===== history ===== */
.log { list-style: none; margin: 0; padding: 0 0 8px; }
.log li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 22px; border-top: 1px solid var(--line); }
.log-what { font-weight: 500; overflow-wrap: anywhere; }
.log-meta { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.log li:not(:has(button)) { grid-template-columns: minmax(0, 1fr) auto; }

/* ===== chatbot stats ===== */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 10px 0 16px; }
.kpis div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.kpis b { display: block; font-size: 24px; font-weight: 700; color: var(--plum-ink); font-variant-numeric: tabular-nums; }
.kpis span { font-size: 12.5px; color: var(--ink-3); }
.spark { display: grid; grid-template-columns: repeat(14, 1fr); gap: 4px; height: 70px; align-items: end; }
.sp-col { height: 100%; display: flex; align-items: flex-end; }
.sp-bar { width: 100%; background: var(--crimson); border-radius: 4px 4px 0 0; opacity: .85; }
.spark-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); margin: 4px 0 14px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.two-col h4 { margin: 0 0 8px; font-size: 13.5px; font-weight: 600; color: var(--ink-2); }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.hbars li { display: grid; grid-template-columns: minmax(80px, 140px) 1fr auto; gap: 10px; align-items: center; font-size: 13.5px; }
.hb-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.hb-fill { display: block; height: 100%; background: var(--plum-3); border-radius: 999px; }
.hb-val { font-variant-numeric: tabular-nums; color: var(--ink-2); font-weight: 600; }
@media (max-width: 860px) {
  .kpis, .two-col, .mb-row { grid-template-columns: minmax(0, 1fr); }
  .lk-grid { grid-template-columns: minmax(0, 1fr); }
  .log li { padding: 10px 16px; grid-template-columns: minmax(0, 1fr) auto; }
}
.lk-sec .row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 9px 16px; }
.lk-sec .row .k { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); font-weight: 500; }
.sp-bar.zero { background: var(--line-2); opacity: 1; }

/* ===== class timetable ===== */
.tt-acts { margin-bottom: 16px; }
.tt-next { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; margin-bottom: 8px; border-left: 4px solid var(--crimson); }
.tt-next-label { font-size: 12.5px; font-weight: 600; color: var(--crimson-ink); background: var(--crimson-soft); padding: 3px 10px; border-radius: 999px; }
.tt-next b { font-size: 16px; }
.tt-next span:not(.tag):not(.tt-next-label) { color: var(--ink-2); }
.tt td b { font-variant-numeric: tabular-nums; }
.tt tr.is-done td { color: var(--ink-3); }
.tt-note { display: block; color: var(--ink-3); font-size: 12.5px; }
.mb-row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.bulk-sum { margin: 0; font-size: 14px; color: var(--green); font-weight: 500; }
.bulk-sum .bad { color: var(--crimson-ink); }
@media (max-width: 860px) {
  .tt th:nth-child(4), .tt td:nth-child(4), .tt th:nth-child(5), .tt td:nth-child(5) { display: none; }
  .mb-row3 { grid-template-columns: minmax(0, 1fr); }
}
.tt { table-layout: fixed; }
.tt th:nth-child(1) { width: 64px; } .tt th:nth-child(2) { width: 150px; } .tt th:nth-child(3) { width: 110px; }
.tt th:nth-child(5) { width: 100px; } .tt th:nth-child(6) { width: 120px; } .tt th:nth-child(7) { width: 56px; }
@media (max-width: 860px) { .tt { table-layout: auto; } .tt th { width: auto !important; } }

/* CSV import & row editing */
.tt-row { cursor: pointer; }
.tt-row:hover td { background: var(--lilac) !important; }
.tt-edit { padding: 5px 10px; }
.tt th:nth-child(7) { width: 92px !important; }
.csv-help { margin: 0 0 14px; color: var(--ink-2); font-size: 14px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; border: 2px dashed var(--line-2); border-radius: var(--r-md); cursor: pointer; color: var(--ink-2); text-align: center; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.over { border-color: var(--crimson); background: var(--crimson-soft); }
.dropzone svg { width: 22px; height: 22px; color: var(--crimson); }
.dropzone span { font-size: 13px; color: var(--ink-3); }
#csvprev { margin-top: 14px; }
.csv-bad { margin: 6px 0 10px; padding-left: 18px; color: var(--crimson-ink); font-size: 13.5px; }
.csv-table { border: 1px solid var(--line); border-radius: var(--r-sm); overflow: auto; max-height: 300px; margin-top: 8px; }
.csv-table .idtable td, .csv-table .idtable th { padding: 7px 10px; font-size: 13px; }
.form-sub { margin: 18px 0 4px; font-size: 15px; font-weight: 600; }
.form-hint { margin: 0 0 12px !important; font-size: 13.5px; }
.tt th:nth-child(3) { width: 180px; }
.tt td:nth-child(3) { white-space: normal; line-height: 1.4; }
