/* Cobra Dojo – shared theme */
@import url('https://fonts.googleapis.com/css2?family=Barlow:wght@400;500;600;700&family=Barlow+Condensed:wght@500;600;700;800&display=swap');

:root {
  --bg: #06090d;
  --panel: rgba(13, 16, 20, .78);
  --panel-solid: #121519;
  --panel-2: rgba(26, 29, 33, .85);
  --line: rgba(226, 238, 219, .09);
  --line-2: rgba(226, 238, 219, .16);
  --text: #eef4f1;
  --muted: #9fb2ab;
  --faint: #687a74;
  --red: #d7261e;
  --orange: #17a34a;
  --yellow: #f5c518;
  --green: #36b04a;
  --blue: #3b82f6;
  --fire: linear-gradient(135deg, #1e3a8a 0%, #17a34a 55%, #f5c518 100%);
  --fire-h: linear-gradient(90deg, #1e3a8a, #17a34a 55%, #f5c518);
  --r: 16px;
  --r-sm: 10px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45), 0 2px 6px rgba(0, 0, 0, .35);
  --font: 'Barlow', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Barlow Condensed', 'Barlow', system-ui, sans-serif;
}

* { box-sizing: border-box; }
svg { width: 18px; height: 18px; flex: none; }
.star { color: var(--orange); font-style: normal; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 15px/1.5 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: -3%; z-index: -3;
  background: linear-gradient(180deg, rgba(6, 9, 13, .35), rgba(6, 9, 13, .7)), var(--bg-img, url('../assets/bg.jpg')) center / cover no-repeat;
  animation: bg-drift 28s ease-in-out infinite alternate; will-change: transform;
}
/* Living background: the photo drifts very slowly and a warm ember glow breathes over it. */
html::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(65vmax 50vmax at 18% 110%, rgba(23, 163, 74, .45), transparent 60%),
    radial-gradient(55vmax 42vmax at 95% -10%, rgba(30, 58, 138, .30), transparent 62%);
  mix-blend-mode: screen; animation: bg-pulse 7s ease-in-out infinite; transform-origin: 20% 100%;
}
@keyframes bg-drift {
  0% { transform: scale(1.04) translate3d(1.5%, 1%, 0); }
  50% { transform: scale(1.16) translate3d(-2.5%, -1.5%, 0); }
  100% { transform: scale(1.1) translate3d(2%, -2.5%, 0); }
}
@keyframes bg-pulse { 0%, 100% { opacity: .35; transform: scale(1); } 50% { opacity: 1; transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { body::before, html::before { animation: none; } }
body::after {
  content: ""; position: fixed; z-index: -1; right: -8vw; bottom: -10vh; width: 46vw; max-width: 720px; aspect-ratio: 1;
  background: url('../assets/logo.webp') center / contain no-repeat; opacity: .045; pointer-events: none; filter: grayscale(.2);
}
a { color: #7fd99a; }
h1, h2, h3, .display { font-family: var(--display); letter-spacing: .02em; font-weight: 600; margin: 0; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.fire-text { background: var(--fire-h); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hidden { display: none !important; }

/* Layout */
.wrap { max-width: 1280px; margin: 0 auto; padding: 22px 22px 80px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.nowrap { flex-wrap: nowrap; }
.col { display: flex; flex-direction: column; gap: 12px; }
.spacer { flex: 1; }
.grid { display: grid; gap: 18px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.page-head { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin: 6px 0 20px; }
.page-head p { margin: 4px 0 0; color: var(--muted); }

/* Top bar */
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 18px; padding: 10px 22px;
  background: rgba(6, 9, 13, .82); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--fire-h); opacity: .85; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand img { height: 42px; width: 42px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0,0,0,.6)); }
.brand b { font-family: var(--display); font-size: 17px; letter-spacing: .04em; line-height: 1.1; display: block; }
.brand span { font-size: 11px; color: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 14px; border-radius: 10px; border: 0;
  color: var(--muted); background: none; font: 500 14px var(--font); cursor: pointer; transition: .15s;
}
.tab svg { width: 17px; height: 17px; opacity: .85; }
.tab:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.tab.on { color: #fff; background: linear-gradient(180deg, rgba(23, 163, 74,.28), rgba(30, 58, 138,.18)); box-shadow: inset 0 0 0 1px rgba(23, 163, 74,.45), inset 0 1px 0 rgba(255,255,255,.08); }
.tab .soon { font-size: 10px; padding: 1px 6px; border-radius: 6px; background: rgba(255,255,255,.08); color: var(--muted); }

/* Panels */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px;
  box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h2 { font-size: 18px; }
.card-head .count { font: 600 12px var(--font); color: var(--muted); background: rgba(255,255,255,.06); padding: 2px 9px; border-radius: 99px; }
.card.glow { border-color: rgba(23, 163, 74, .35); box-shadow: var(--shadow), 0 0 0 1px rgba(23, 163, 74,.08), 0 0 40px rgba(23, 163, 74,.08) inset; }

/* KPI tiles */
.kpi { position: relative; overflow: hidden; }
.kpi .n { font: 700 38px/1 var(--display); letter-spacing: .01em; }
.kpi .l { color: var(--muted); font-size: 13px; margin-top: 6px; }
.kpi .ico { position: absolute; right: 14px; top: 14px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: rgba(23, 163, 74,.14); color: #7fd99a; }
.kpi .ico svg { width: 22px; height: 22px; }
.kpi.green .ico { background: rgba(54,176,74,.15); color: #6fd57f; }
.kpi.yellow .ico { background: rgba(245, 197, 24,.15); color: #ffd060; }
.kpi.red .ico { background: rgba(215,38,30,.18); color: #ff7a70; }

/* Buttons */
.btn {
  --b: rgba(255,255,255,.07);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 11px;
  border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.03));
  color: var(--text); font: 600 14px var(--font); cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 2px 6px rgba(0,0,0,.3); transition: transform .08s, filter .15s, box-shadow .15s;
}
.btn:hover { filter: brightness(1.15); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary {
  border: 1px solid rgba(23, 163, 74, .55); background: var(--fire); color: #fff; text-shadow: 0 1px 1px rgba(7, 14, 34, .45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.4), inset 0 -2px 0 rgba(7, 14, 34,.25), 0 6px 18px rgba(30, 58, 138, .38);
}
.btn.green { border-color: rgba(120,220,130,.5); background: linear-gradient(135deg, #2c9a3e, #45c35a); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 6px 16px rgba(54,176,74,.3); }
.btn.danger { color: #ff8f86; border-color: rgba(215,38,30,.45); }
.btn.ghost { background: none; box-shadow: none; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.05); }
.btn.sm { padding: 6px 11px; font-size: 13px; border-radius: 9px; }
.btn.lg { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; filter: none; }
.icon-btn { padding: 8px; }

/* Forms */
label.f { display: flex; flex-direction: column; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
input, select, textarea {
  font: 15px var(--font); color: var(--text); background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2);
  border-radius: 10px; padding: 10px 12px; outline: none; width: 100%; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { border-color: rgba(23, 163, 74,.7); box-shadow: 0 0 0 3px rgba(23, 163, 74,.18); }
select option { background: #121519; }
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; accent-color: var(--orange); padding: 0; }
input[type=color] { padding: 2px; height: 38px; width: 48px; }
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.form .full { grid-column: 1 / -1; }
.check { display: inline-flex; align-items: center; gap: 9px; cursor: pointer; font-size: 14px; color: var(--text); font-weight: 500; }
.search { position: relative; }
.search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--faint); }
.search input { padding-left: 38px; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font: 600 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr { transition: background .12s; }
tbody tr.click { cursor: pointer; }
tbody tr.click:hover { background: rgba(23, 163, 74,.06); }
tbody tr:last-child td { border-bottom: 0; }

/* Chips & badges */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font: 600 12px var(--font); background: rgba(255,255,255,.07); color: var(--muted); white-space: nowrap; border: 1px solid transparent; }
.chip.active { background: rgba(54,176,74,.14); color: #7fdc8e; border-color: rgba(54,176,74,.3); }
.chip.trial { background: rgba(59,130,246,.15); color: #8db8ff; border-color: rgba(59,130,246,.3); }
.chip.hold { background: rgba(245, 197, 24,.13); color: #ffd060; border-color: rgba(245, 197, 24,.3); }
.chip.inactive { background: rgba(255,255,255,.05); color: var(--faint); }
.chip.warn { background: rgba(215,38,30,.16); color: #ff8a80; border-color: rgba(215,38,30,.35); }
.chip.dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.group-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.group-tag i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }

/* Belt graphic */
.belt {
  --c: #eee; --s: transparent;
  display: inline-block; width: 46px; height: 12px; border-radius: 3px; vertical-align: middle; position: relative;
  background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(0,0,0,.18)), var(--c);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,.35), 0 1px 2px rgba(0,0,0,.4);
}
.belt.striped::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 30%; transform: translateY(-50%); background: var(--s); box-shadow: 0 0 0 .5px rgba(0,0,0,.18); }
/* Dan grades: gold embroidered bars across one end, one per degree */
.belt .dan { position: absolute; top: 12%; bottom: 12%; right: 9%; width: calc(var(--n) * 3.2px + (var(--n) - 1) * 1.6px);
  background: repeating-linear-gradient(90deg, #e2b13c 0 3.2px, transparent 3.2px 4.8px); filter: drop-shadow(0 0 .5px rgba(0,0,0,.6)); }
.belt.lg .dan { width: calc(var(--n) * 6px + (var(--n) - 1) * 3px); background: repeating-linear-gradient(90deg, #e9b83f 0 6px, transparent 6px 9px); }
.belt.xl .dan { width: calc(var(--n) * 10px + (var(--n) - 1) * 5px); background: repeating-linear-gradient(90deg, #e9b83f 0 10px, transparent 10px 15px); }
.belt.lg { width: 120px; height: 26px; border-radius: 5px; }
.belt.xl { width: 220px; height: 40px; border-radius: 6px; }
.belt-name { display: inline-flex; align-items: center; gap: 9px; white-space: nowrap; }

/* Avatars */
.av { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font: 700 14px var(--font); color: #fff; overflow: hidden; background: linear-gradient(135deg, #2c2f33, #1a1d21); border: 2px solid var(--ring, rgba(255,255,255,.12)); }
.av img { width: 100%; height: 100%; object-fit: cover; }
.av.lg { width: 96px; height: 96px; font-size: 30px; border-width: 3px; }
.who { display: flex; align-items: center; gap: 11px; min-width: 0; }
.who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who small { color: var(--muted); font-size: 12px; }

/* Lists */
.list { display: flex; flex-direction: column; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li.click { cursor: pointer; border-radius: 8px; padding-left: 8px; padding-right: 8px; }
.li.click:hover { background: rgba(23, 163, 74,.07); }
.empty { text-align: center; color: var(--faint); padding: 26px 10px; }

/* Progress */
.bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; min-width: 80px; }
.bar > i { display: block; height: 100%; border-radius: 99px; background: var(--fire-h); }
.bar.done > i { background: linear-gradient(90deg, #2c9a3e, #5fd06f); }
.ring { --p: 0; --size: 120px; width: var(--size); height: var(--size); border-radius: 50%; display: grid; place-items: center; position: relative;
  background: conic-gradient(from -90deg, #1e3a8a 0, #17a34a calc(var(--p) * .5%), #f5c518 calc(var(--p) * 1%), rgba(255,255,255,.08) 0); }
.ring::before { content: ""; position: absolute; inset: 10px; border-radius: 50%; background: #0f1216; box-shadow: inset 0 2px 8px rgba(0,0,0,.6); }
.ring > div { position: relative; text-align: center; line-height: 1.1; }
.ring b { font: 700 30px var(--display); }
.ring span { display: block; font-size: 12px; color: var(--muted); }
.ring.done { background: conic-gradient(#36b04a 0 100%); }

/* Segmented control */
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line); flex-wrap: wrap; }
.seg button { border: 0; background: none; color: var(--muted); padding: 7px 13px; border-radius: 9px; font: 600 13px var(--font); cursor: pointer; display: inline-flex; gap: 7px; align-items: center; }
.seg button.on { background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.05)); color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 2px 6px rgba(0,0,0,.35); }

/* Modal */
.modal-bg { position: fixed; inset: 0; z-index: 100; background: rgba(3, 4, 6, .72); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px 40px; overflow-y: auto; animation: fade .15s; }
.modal { width: 100%; max-width: 640px; background: linear-gradient(180deg, #16191d, #101317); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.7); animation: pop .18s ease-out; }
.modal.wide { max-width: 960px; }
.modal-h { display: flex; align-items: center; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-b { padding: 22px; }
.modal-f { display: flex; gap: 10px; justify-content: flex-end; padding: 16px 22px; border-top: 1px solid var(--line); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98); } }

/* Toast */
#toasts { position: fixed; z-index: 200; left: 50%; bottom: 26px; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #171a1e; border: 1px solid var(--line-2); color: var(--text); padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: pop .2s; }
.toast.ok { border-color: rgba(54,176,74,.5); }
.toast.err { border-color: rgba(215,38,30,.6); }

.banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; border: 1px solid rgba(245, 197, 24,.35); background: rgba(245, 197, 24,.08); color: #e2eedb; }
.banner svg { width: 20px; height: 20px; flex: none; }
.banner > span { flex: 1 1 200px; min-width: 0; }
.banner.info { border-color: rgba(59,130,246,.35); background: rgba(59,130,246,.08); color: #bcd5ff; }

.divider { height: 1px; background: var(--line); margin: 16px 0; }
.kbd { font: 600 12px ui-monospace, monospace; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.08); border: 1px solid var(--line-2); }

/* Login screens */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: 100%; max-width: 400px; text-align: center; }
.login img.logo { width: 150px; height: 150px; object-fit: contain; filter: drop-shadow(0 10px 30px rgba(23, 163, 74,.25)); margin-bottom: 12px; }
.login .card { text-align: left; }

/* Charts */
.chart text { fill: var(--faint); font: 11px var(--font); }
.chart .lbl { fill: var(--muted); }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

@media (max-width: 1500px) { .brand div { display: none; } .tab { padding: 9px 11px; } }
@media (max-width: 1180px) { .tab { font-size: 0; gap: 0; padding: 9px; } .tab svg { width: 20px; height: 20px; } .tab .soon { display: none; } }
@media (max-width: 760px) {
  .wrap { padding: 14px 12px 60px; }
  .topbar { padding: 8px 12px; gap: 10px; flex-wrap: wrap; }
  .brand div { display: none; }
  .tabs { order: 3; flex-basis: 100%; }
  h1 { font-size: 24px; }
}
@media print {
  #embers, html::before, body::before, body::after, .topbar, .noprint { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ccc; background: #fff; }
}

.smsprev { margin-top: 12px; padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: rgba(54,176,74,.16); border: 1px solid rgba(54,176,74,.35); font-size: 14px; line-height: 1.45; max-width: 360px; }
.page-head .seg { align-self: center; }


/* ═══════════════ Dojo finish (v2): stitched panels, belt-band tabs, embers ═══════════════ */
#embers { position: fixed; inset: 0; z-index: -1; pointer-events: none; }
h1 { font-size: 38px; font-weight: 700; letter-spacing: .01em; line-height: 1.05; }
h2 { font-size: 21px; font-weight: 700; letter-spacing: .015em; }
h3 { font-weight: 700; }
.page-head { margin: 10px 0 24px; }
.page-head p { font-size: 15.5px; max-width: 70ch; }

/* Panels: lacquered, with a stitched inner edge like a belt */
.card {
  position: relative;
  background: linear-gradient(180deg, rgba(32, 35, 39, .92), rgba(13, 16, 20, .94));
  border: 1px solid rgba(226, 238, 219, .16);
  box-shadow: inset 0 1px 0 rgba(226, 238, 219, .14), 0 22px 44px -12px rgba(0, 0, 0, .75), 0 2px 0 rgba(0, 0, 0, .5);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
/* Panels (option C, "ember edge"): a thin fire-coloured border that slowly flows around each panel */
@property --ember { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
.card::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; pointer-events: none;
  background: conic-gradient(from var(--ember), rgba(23, 163, 74,.85), rgba(30, 58, 138,.18) 22%, rgba(245, 197, 24,.75) 45%, rgba(23, 163, 74,.15) 65%, rgba(30, 58, 138,.7) 85%, rgba(23, 163, 74,.85));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: ember-edge 14s linear infinite; opacity: .8;
}
.card::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; box-shadow: 0 0 28px -6px rgba(23, 163, 74, .28); }
.card { border-color: transparent; }
.card.glow::before { opacity: 1; animation-duration: 9s; }
.card.glow { box-shadow: inset 0 1px 0 rgba(226, 238, 219, .16), 0 22px 44px -12px rgba(0,0,0,.75), 0 0 48px -8px rgba(23, 163, 74, .38); }
@keyframes ember-edge { to { --ember: 360deg; } }
@media (prefers-reduced-motion: reduce) { .card::before { animation: none; } }
.card-head h2 { font-size: 20px; }
.kpi .n { font: 800 46px/0.95 var(--display); letter-spacing: 0; }
.kpi .l { font-size: 14px; }

/* Tabs: the active one gets a short belt band underneath */
.tab { font: 600 15px var(--font); border-radius: 8px; position: relative; }
.tab.on { background: rgba(255, 255, 255, .06); box-shadow: none; color: #fff; }
.tab.on::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 1px; height: 4px; border-radius: 2px;
  background: linear-gradient(180deg, transparent 38%, rgba(255,255,255,.85) 38% 62%, transparent 62%), var(--fire-h);
  box-shadow: 0 0 12px rgba(23, 163, 74, .6);
}
.brand b { font: 700 19px/1.05 var(--display); letter-spacing: .02em; }
.brand span { text-transform: none; letter-spacing: .02em; font-size: 12.5px; }

/* Labels: sentence case, no tracked-out capitals */
th { text-transform: none; letter-spacing: .01em; font: 600 13px var(--font); color: var(--muted); }
label.f { font-size: 13px; letter-spacing: 0; }

/* Buttons: a touch more weight */
.btn { font-weight: 700; letter-spacing: .01em; }
.btn.primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(7, 14, 34,.3), 0 8px 22px -4px rgba(30, 58, 138, .55); }
input, select, textarea { background: rgba(6, 9, 13, .55); }

/* Attendance: monthly calendars */
.mg { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 210px)); gap: 16px 22px; }
.mg-t { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.mg-t b { font: 700 16px var(--display); letter-spacing: .02em; }
.mg-t span { font-size: 12.5px; color: var(--muted); }
.mg-cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.mg-h { text-align: center; font-size: 10px; font-weight: 600; color: var(--faint); padding-bottom: 2px; }
.mg-d { aspect-ratio: 1; border-radius: 5px; display: grid; place-items: center; font-size: 11px; color: rgba(226, 238, 219, .22); }
.mg-d.o { border: 1.5px solid rgba(226, 238, 219, .2); color: var(--text); }
.mg-d.u { border: 1.5px dashed rgba(226, 238, 219, .13); color: var(--muted); }
.mg-d.y { background: linear-gradient(180deg, #41c45f, #23933f); color: #fff; font-weight: 700; box-shadow: 0 0 10px -2px rgba(63,191,92,.55), inset 0 1px 0 rgba(255,255,255,.3); }
.mg-d.t { outline: 2px solid rgba(245, 197, 24, .7); outline-offset: 1px; }
.mg-key { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.mg-key span { display: inline-flex; align-items: center; gap: 6px; }
.mg-key .mg-d { width: 15px; height: 15px; aspect-ratio: auto; border-radius: 4px; background: rgba(255,255,255,.04); }
.mg-key .mg-d.y { background: linear-gradient(180deg, #41c45f, #23933f); }

/* Messages: sub-navigation and inbox */
.msgnav button { display: inline-flex; align-items: center; gap: 6px; }
.nbadge { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #1e3a8a; color: #fff; font: 700 11px var(--font); }
.inbox { display: grid; grid-template-columns: minmax(280px, 360px) 1fr; height: calc(100vh - 250px); min-height: 480px; }
.ib-list { border-right: 1px solid var(--line); overflow-y: auto; position: relative; z-index: 1; }
.ib-search { margin: 12px; }
.ib-item { display: flex; gap: 11px; align-items: flex-start; width: 100%; text-align: left; padding: 12px 14px; border: 0; border-top: 1px solid var(--line); background: none; color: var(--text); font: inherit; cursor: pointer; }
.ib-item:hover { background: rgba(255,255,255,.04); }
.ib-item.on { background: rgba(23, 163, 74,.12); box-shadow: inset 3px 0 0 var(--orange); }
.ib-av { width: 38px; height: 38px; flex: none; border-radius: 50%; display: grid; place-items: center; background: #212428; font-weight: 700; font-size: 13px; box-shadow: inset 0 0 0 2px var(--g); }
.ib-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ib-mid b { font-size: 14.5px; }
.ib-last { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ib-meta { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ib-dot { width: 9px; height: 9px; border-radius: 50%; background: #17a34a; box-shadow: 0 0 8px rgba(23, 163, 74,.8); }
.ib-thread { display: flex; flex-direction: column; min-width: 0; position: relative; z-index: 1; }
.ib-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.ib-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.bub { max-width: 68%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.45; background: #222529; border-bottom-left-radius: 4px; }
.bub.out { align-self: flex-end; background: rgba(54,176,74,.2); border: 1px solid rgba(54,176,74,.38); border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.bub.mail { background: rgba(70,120,220,.15); border: 1px solid rgba(70,120,220,.35); }
.bub small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.ib-reply { display: flex; gap: 8px; align-items: flex-end; padding: 12px 16px; border-top: 1px solid var(--line); }
.ib-reply textarea { min-height: 42px; flex: 1; resize: none; }
.seg.sm button { padding: 7px 11px; font-size: 13px; }
@media (max-width: 860px) { .inbox { grid-template-columns: 1fr; height: auto; } .ib-list { max-height: 320px; border-right: 0; border-bottom: 1px solid var(--line); } .ib-thread { min-height: 460px; } }
.card.flush::before { inset: 0; }

/* Pro Check headings inside a belt's syllabus */
.pc-h { margin: 14px 0 6px; padding: 4px 10px; border-left: 3px solid var(--orange, #17a34a); font-weight: 700; font-size: 14px; color: #e2eedb; background: rgba(23, 163, 74,.08); border-radius: 0 6px 6px 0; }
.items .pc-h:first-child, .list .pc-h:first-child { margin-top: 0; }

body::before{filter:hue-rotate(185deg) saturate(0.7) brightness(.9);}

/* ═════ App changes 3 (Nov 2026): navy + cobra green, blue buttons, solid gold accents ═════ */
:root { --gold: #f5c518; --btn: linear-gradient(135deg, #1e40af 0%, #2f7cf0 55%, #34d399 100%); --amber: #e8a53a; }
.btn.primary { background: var(--btn); border-color: rgba(127,178,255,.55); text-shadow: 0 1px 1px rgba(10,20,60,.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -2px 0 rgba(10,20,60,.3), 0 8px 22px -4px rgba(47,124,240,.55); }
.fire-text { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--gold); -webkit-text-fill-color: var(--gold); }
.topbar::after { background: var(--gold); opacity: .9; }
.tab.on::after { background: var(--gold) !important; }
.chip.hold { background: rgba(232,165,58,.12); color: #f2c27a; border-color: rgba(232,165,58,.3); }
.kpi.yellow .ico { background: rgba(232,165,58,.14); color: #f2c27a; }
.tab.on::after { box-shadow: 0 0 10px rgba(245,197,24,.45) !important; }

/* Dashboard (layout 5A) */
.dash-cols { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.dash-col { display: grid; gap: 18px; align-content: start; min-width: 0; }
.ic2 { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; background: rgba(255,255,255,.06); color: var(--muted); }
.ic2.b { background: rgba(47,124,240,.15); color: #8db8ff; } .ic2.g { background: rgba(23,163,74,.16); color: #7fdc8e; }
.ic2.r { background: rgba(215,38,30,.16); color: #ff8a80; } .ic2.y { background: rgba(232,165,58,.14); color: #f2c27a; }
.tl2 .ev { display: grid; grid-template-columns: 70px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl2 .ev:first-child { border-top: 0; padding-top: 4px; }
.tl2 .tm { font: 700 22px/1 var(--display); } .tl2 .tm small { display: block; font: 500 12px var(--font); color: var(--faint); margin-top: 4px; }
.tl2 .ev.done { opacity: .6; } .tl2 .ev.now .bd { border-left: 3px solid #2f7cf0; padding-left: 12px; margin-left: -15px; }
.tl2 .bd .row b { font-size: 16px; }
.avs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; } .avs .av { width: 34px; height: 34px; font-size: 12px; }
.need .li { cursor: pointer; } .need .li > svg:last-child { transform: rotate(180deg); opacity: .5; }
.seg2 { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.04); border: 1px solid var(--line); }
.seg2 button { flex: 1; display: flex; gap: 6px; align-items: center; justify-content: center; padding: 9px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 14px var(--font); cursor: pointer; }
.seg2 button.on { background: rgba(47,124,240,.18); color: #fff; }
.plan-theme { font-size: 14px; margin-bottom: 12px; }
.pcols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.pcol { border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.025); overflow: hidden; }
.ph { padding: 8px 10px; font-weight: 700; font-size: 13.5px; border-top: 3px solid var(--pc); background: rgba(255,255,255,.04); }
.pr { padding: 7px 10px; border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.35; } .pr span { display: block; color: var(--faint); font-size: 11px; } .pr b { font-weight: 500; }
.bday { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.bday:first-child { border-top: 0; } .bday.today b { color: var(--gold); }
.greet-sub { margin: 6px 0 0; color: var(--muted); }

/* Phones: bottom tab bar, tighter dashboard, students as cards */
.bnav { display: none; }
@media (max-width: 760px) {
  .topbar .tabs { display: none; }
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; justify-content: space-around; padding: 8px 6px calc(10px + env(safe-area-inset-bottom));
    background: rgba(6,10,16,.94); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); }
  .bnav button { display: flex; flex-direction: column; align-items: center; gap: 2px; font: 600 11px var(--font); color: var(--muted); background: none; border: 0; padding: 6px 10px; border-radius: 12px; position: relative; cursor: pointer; }
  .bnav button.on { color: #fff; background: rgba(47,124,240,.18); } .bnav svg { width: 22px; height: 22px; }
  .bnav .nbadge { position: absolute; top: 2px; right: 6px; }
  .wrap { padding-bottom: 96px !important; }
  .dash-cols, .pcols { grid-template-columns: 1fr; }
  .page-head .hide-m { display: none; }
  table.cards thead { display: none; }
  table.cards, table.cards tbody { display: block; }
  table.cards tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
  table.cards td { display: block; padding: 0 !important; border: 0 !important; }
  table.cards td:first-child { grid-column: 1 / -1; }
  table.cards td.m-hide { display: none; }
}
.more-sheet .li { cursor: pointer; }
#toasts { top: 18px; bottom: auto; }
@media (max-width: 760px) { #toasts { top: 12px; left: 12px; right: 12px; transform: none; } #toasts .toast { width: 100%; text-align: center; } }

/* Grading: Pro Check tick buttons */
.pcb { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font: 700 13px var(--font); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.pcb:hover { border-color: rgba(47,124,240,.6); color: #fff; }
.pcb.ok { background: rgba(46,184,92,.2); border-color: rgba(46,184,92,.65); color: #6be08f; }
.pcb:focus-visible { outline: 2px solid var(--gold, #f5c518); outline-offset: 2px; }

/* Phones: the things to act on come first, then the lesson plan; trim the grading table */
@media (max-width: 760px) {
  .dash-cols { display: flex; flex-direction: column; align-items: stretch; }
  .seg2 button { padding: 8px 4px; font-size: 12.5px; line-height: 1.2; }
  .dash-col { display: contents; }
  #dToday { order: 1; } .card.need { order: 2; } #zlTrials { order: 3; } #dPlan { order: 4; } #dSoon { order: 5; } #dBday { order: 6; }
  .g-mh { display: none; }
}
