/* ==========================================================================
   PC-Based Smart Assessment Proctoring System — redesign
   Tanauan City College · College of Engineering
   ========================================================================== */

:root {
  --ink: #0f172a;
  --ink-soft: #1b2233;
  --muted: #64748b;
  --line: #e6e8f0;
  --bg: #f4f5f9;
  --card: #ffffff;
  --amber-50: #fffbeb;
  --amber-100: #fef3c7;
  --amber-300: #fcd34d;
  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-600: #d97706;
  --amber-700: #b45309;
  --orange: #f97316;
  --red: #ef4444;
  --green: #22c55e;
  --blue: #3b82f6;
  --violet: #8b5cf6;
  --radius: 16px;
  --shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.45);
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink-soft);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin-top: 0; }

a { color: var(--amber-700); }

img { max-width: 100%; display: block; }

.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; }

[hidden] { display: none !important; }

/* --------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font: 600 14px/1 "Inter", sans-serif;
  padding: 11px 17px;
  border-radius: 11px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }

.btn--primary {
  background: linear-gradient(135deg, var(--amber-500), var(--orange));
  color: #fff;
  box-shadow: 0 8px 18px -10px rgba(249, 115, 22, .8);
}
.btn--primary:hover { box-shadow: 0 12px 22px -10px rgba(249, 115, 22, .9); }

.btn--amber { background: var(--amber-400); color: #1f2937; }
.btn--amber:hover { background: var(--amber-500); color: #fff; }

.btn--outline { background: #fff; border-color: #dfe3ec; color: var(--ink-soft); }
.btn--outline:hover { border-color: var(--amber-500); color: var(--amber-700); }

.btn--ghost { background: transparent; color: inherit; }
.btn--ghost:hover { background: rgba(15, 23, 42, .06); }

.btn--danger { background: var(--red); color: #fff; box-shadow: 0 8px 18px -12px rgba(239, 68, 68, .9); }
.btn--danger:hover { background: #dc2626; }

.btn--danger-ghost { background: #fff; color: #dc2626; border-color: #fecaca; }
.btn--danger-ghost:hover { background: #fef2f2; }

.btn--unlock { background: #fff7ed; color: var(--amber-700); border-color: #fdba74; }
.btn--unlock:hover { background: var(--amber-100); }

.btn--sm { padding: 8px 13px; font-size: 12.5px; border-radius: 9px; }
.btn--lg { padding: 14px 24px; font-size: 15px; }
.btn--block { width: 100%; }

/* ------------------------------------------------------------- form bits */
.field { display: grid; gap: 6px; font-size: 13px; }
.field > span:first-child { font-weight: 600; color: #475569; font-size: 12.5px; }
.field em { font-style: normal; font-weight: 500; color: #94a3b8; font-size: 11.5px; }

.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap > svg { position: absolute; left: 12px; color: #94a3b8; pointer-events: none; }
.input-wrap:has(> svg) .field-input { padding-left: 37px; }

.field-input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e2e5ee;
  border-radius: 10px;
  background: #fff;
  color: var(--ink-soft);
  font: 500 13.5px/1.3 "Inter", sans-serif;
  transition: border-color .15s, box-shadow .15s;
}
.field-input::placeholder { color: #a3abc0; }
.field-input:focus {
  outline: none;
  border-color: var(--amber-500);
  box-shadow: 0 0 0 3px rgba(245, 158, 11, .18);
}
select.field-input {
  appearance: none;
  padding-right: 30px;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
}
.peek {
  position: absolute;
  right: 7px;
  display: grid;
  place-items: center;
  background: none;
  border: 0;
  color: #94a3b8;
  cursor: pointer;
  padding: 7px;
  border-radius: 8px;
}
.peek:hover { color: var(--ink); background: #f1f5f9; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* narrow screens: form controls must be allowed to shrink instead of
   pushing the whole page sideways (grid/flex items default to min-width:auto) */
.field,
.field > *,
.field-row > *,
.field-row > * > *,
.form-grid > *,
.settings-form > *,
.controls > *,
.capture-row > *,
.panel__body > *,
.content > *,
.input-wrap,
.input-wrap > * { min-width: 0; }
select.field-input,
input.field-input,
textarea.field-input { min-width: 0; max-width: 100%; }

.form-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 11px;
  font-size: 13px;
  margin-bottom: 18px;
}
.form-alert--error { background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c; }
.form-alert svg { flex: none; }

/* ----------------------------------------------------------------- chips */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid transparent;
}
.chip--muted { background: #fff; color: var(--muted); border-color: var(--line); }
.chip--live { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.chip--idle { background: #f1f5f9; color: var(--muted); border-color: #e2e8f0; }

.pulse-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  display: inline-block;
  animation: pulse 1.6s ease-in-out infinite;
}
.pulse-dot--red { background: var(--red); }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .55); }
  50% { box-shadow: 0 0 0 6px rgba(34, 197, 94, 0); }
}

/* ============================================ TCC watermark on all pages */

/* ============================================================== public = */
.public {
  background: #fff;
  background-image: linear-gradient(rgba(255, 255, 255, .955), rgba(255, 255, 255, .955)), url("/static/img/tcc-logo.png");
  background-repeat: repeat, repeat;
  background-size: auto, 300px 300px;
  background-attachment: fixed, fixed;
}

.pub-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.pub-nav__inner {
  max-width: 1140px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 24px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; }
.brand__mark {
  width: 37px; height: 37px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange));
  color: #fff;
  box-shadow: 0 8px 16px -10px rgba(249, 115, 22, .9);
}
.brand__text strong { display: block; font-size: 14px; line-height: 1.3; color: var(--ink); letter-spacing: -.01em; max-width: 240px; }
.brand__text small {
  font-size: 10.5px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: #475569; font-size: 14px; font-weight: 500; text-decoration: none; }
.nav-links a:hover { color: var(--amber-700); }
.nav-links a.btn { color: var(--ink-soft); }
.nav-links a.btn--primary { color: #fff; }

/* ------------------------------------------------------------------ hero */
.hero {
  background:
    radial-gradient(800px 380px at 85% -10%, rgba(249, 115, 22, .12), transparent),
    radial-gradient(700px 380px at -5% 40%, rgba(245, 158, 11, .12), transparent),
    linear-gradient(rgba(255, 255, 255, .95), rgba(255, 255, 255, .95)),
    url("/static/img/tcc-logo.png");
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  background-size: auto, auto, auto, 300px 300px;
  background-attachment: fixed;
  border-bottom: 1px solid #eef0f5;
}
.hero__inner {
  max-width: 1140px;
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 56px;
  align-items: center;
  padding: 74px 24px;
}
.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: #475569;
  box-shadow: 0 6px 16px -12px rgba(15, 23, 42, .6);
}
.hero h1 {
  font-size: clamp(34px, 4.4vw, 52px);
  line-height: 1.06;
  letter-spacing: -.025em;
  margin: 20px 0 16px;
  color: var(--ink);
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(120deg, var(--amber-500), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__lead { font-size: 16.5px; line-height: 1.65; color: #475569; max-width: 540px; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 24px; }
.hero__points { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; font-size: 13.5px; color: #334155; }
.hero__points li::before { content: "✓"; color: var(--amber-600); font-weight: 800; margin-right: 9px; }

/* mock dashboard in hero */
.mock-window {
  background: var(--ink);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 40px 70px -40px rgba(15, 23, 42, .75);
  border: 1px solid rgba(255, 255, 255, .08);
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  background: #1e293b;
  padding: 11px 14px;
  font-size: 12px;
  color: #cbd5e1;
}
.mock-bar strong { margin-left: 8px; font-weight: 600; }
.mock-dot { width: 9px; height: 9px; border-radius: 50%; background: #475569; }
.mock-dot:nth-child(1) { background: #f87171; }
.mock-dot:nth-child(2) { background: #fbbf24; }
.mock-dot:nth-child(3) { background: #34d399; }
.mock-live { margin-left: auto; color: #f87171; font-weight: 700; font-size: 11.5px; letter-spacing: .08em; }
.mock-body { display: grid; grid-template-columns: 1fr 138px; gap: 12px; padding: 14px; }
.mock-feed {
  position: relative;
  border-radius: 12px;
  min-height: 218px;
  background:
    radial-gradient(400px 160px at 30% 20%, rgba(245, 158, 11, .16), transparent),
    linear-gradient(150deg, #0f172a, #111c33);
  border: 1px solid rgba(255, 255, 255, .08);
  padding: 12px;
}
.mock-feed__hud { display: flex; justify-content: space-between; font-size: 11.5px; color: #cbd5e1; }
.mock-risk { color: #4ade80; font-weight: 700; }
.mock-feed__play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #fff;
  font-size: 17px;
}
.mock-feed__timer {
  position: absolute;
  right: 12px; bottom: 11px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12.5px;
  color: #34d399;
  background: rgba(2, 6, 23, .6);
  padding: 4px 8px;
  border-radius: 7px;
}
.mock-side { display: grid; gap: 10px; align-content: start; }
.mock-chip {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 11px;
  padding: 11px 12px;
  font-size: 11.5px;
  color: #94a3b8;
}
.mock-chip b { display: block; font-size: 20px; color: #fff; font-weight: 800; }
.mock-chip--lock { color: var(--amber-400); background: rgba(245, 158, 11, .14); border-color: rgba(251, 191, 36, .3); }

/* -------------------------------------------------------------- sections */
.section { max-width: 1140px; margin: auto; padding: 74px 24px; }
.section__head { max-width: 660px; margin: 0 auto 40px; text-align: center; }
.section__head h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.02em; color: var(--ink); margin: 10px 0 12px; }
.section__head p { color: var(--muted); font-size: 15px; line-height: 1.6; margin-bottom: 0; }
.eyebrow {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--amber-700);
}
.eyebrow--light { color: var(--amber-400); }

.feature-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(265px, 100%), 1fr)); gap: 18px; }
.feature-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.feature-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #dcdfea; }
.feature-card h3 { font-size: 16.5px; margin: 15px 0 8px; color: var(--ink); }
.feature-card p { font-size: 13.5px; line-height: 1.6; color: var(--muted); margin: 0; }
.feature-card__icon {
  width: 43px; height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
}
.feature-card__icon--amber { background: var(--amber-100); color: var(--amber-700); }
.feature-card__icon--blue { background: #dbeafe; color: #1d4ed8; }
.feature-card__icon--green { background: #dcfce7; color: #15803d; }
.feature-card__icon--violet { background: #ede9fe; color: #6d28d9; }
.feature-card__icon--red { background: #fee2e2; color: #b91c1c; }

.section--alt {
  background: linear-gradient(150deg, #0f172a 55%, #241706);
  border-radius: 26px;
  max-width: 1140px;
  padding: 62px 40px;
}
.section--alt .section__head h2 { color: #fff; }
.section--alt .section__head p { color: #94a3b8; }
.section--alt .eyebrow { color: var(--amber-400); }

.role-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.role-card {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 18px;
  padding: 28px;
  color: #cbd5e1;
  position: relative;
}
.role-card h3 { color: #fff; font-size: 19px; margin-bottom: 14px; }
.role-card--admin {
  background: linear-gradient(140deg, rgba(245, 158, 11, .2), rgba(249, 115, 22, .1));
  border-color: rgba(251, 191, 36, .38);
}
.role-card__tag {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--amber-400);
  color: #1f2937;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 999px;
}
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 11px; font-size: 14px; }
.check-list li { padding-bottom: 11px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.check-list li:last-child { border-bottom: 0; padding-bottom: 0; }
.check-list li::before { content: "✓"; color: var(--amber-400); font-weight: 800; margin-right: 10px; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.step__num {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber-500), var(--orange));
  color: #fff;
  font-weight: 800;
  margin-bottom: 14px;
}
.step h3 { font-size: 16px; color: var(--ink); margin-bottom: 7px; }
.step p { font-size: 13.5px; color: var(--muted); line-height: 1.6; margin: 0; }
.section__cta { text-align: center; margin-top: 38px; }

.site-footer { background: var(--ink); color: #94a3b8; padding: 34px 24px; }
.site-footer__inner {
  max-width: 1140px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.site-footer strong { color: #fff; display: block; font-size: 15px; margin-bottom: 5px; }
.site-footer p { margin: 0; font-size: 13px; }
.site-footer__links { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.site-footer__links a { color: #cbd5e1; text-decoration: none; font-size: 13.5px; }
.site-footer__links a:hover { color: var(--amber-400); }

/* ============================================================== auth ==== */
.auth-page { background: var(--bg); }
.auth-layout { display: grid; grid-template-columns: .92fr 1.08fr; min-height: calc(100vh - 62px); }
.auth-side {
  background:
    radial-gradient(700px 420px at 90% 110%, rgba(249, 115, 22, .35), transparent),
    linear-gradient(155deg, #0f172a 55%, #1c1408);
  color: #cbd5e1;
  display: grid;
  place-items: center;
  padding: 52px 40px;
}
.auth-side__inner { max-width: 430px; display: grid; gap: 15px; }
.auth-side h2 { font-size: clamp(26px, 2.6vw, 34px); color: #fff; letter-spacing: -.02em; margin: 4px 0 0; line-height: 1.15; }
.auth-side p { font-size: 14.5px; line-height: 1.65; color: #94a3b8; margin: 0; }
.auth-points { list-style: none; padding: 14px 0 0; margin: 6px 0 0; border-top: 1px solid rgba(255, 255, 255, .1); display: grid; gap: 11px; }
.auth-points li { display: flex; gap: 10px; align-items: center; font-size: 13.5px; color: #e2e8f0; }
.auth-points svg { color: var(--amber-400); flex: none; }

.auth-main { display: grid; place-items: center; padding: 42px 24px; }
.auth-card {
  width: 100%;
  max-width: 540px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 30px 60px -40px rgba(15, 23, 42, .5);
}
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: #f1f5f9;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
}
.auth-tab {
  text-align: center;
  padding: 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  transition: .15s;
}
.auth-tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 2px 8px rgba(15, 23, 42, .12); }
.auth-title { font-size: 24px; letter-spacing: -.02em; color: var(--ink); margin-bottom: 6px; }
.auth-sub { font-size: 13.5px; color: var(--muted); margin-bottom: 22px; }
.auth-form { display: grid; gap: 15px; }
.auth-foot { text-align: center; font-size: 13.5px; color: var(--muted); margin: 18px 0 0; }
.auth-foot a { font-weight: 600; text-decoration: none; }
.auth-foot--tight { margin-top: 10px; font-size: 12.5px; }

.field-extra {
  display: flex;
  justify-content: flex-end;
  margin: -6px 0 16px;
}
.field-extra a {
  font-size: 13px;
  font-weight: 600;
  color: var(--orange);
  text-decoration: none;
}
.field-extra a:hover { text-decoration: underline; }

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--orange);
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }

.code-input {
  letter-spacing: .45em;
  font-size: 19px;
  font-weight: 700;
  text-align: center;
  text-indent: .45em;
}

.rules {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 14px;
  padding: 12px 14px;
  margin: 0;
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 11px;
  font-size: 12px;
  color: #94a3b8;
}
.rules li::before { content: "○"; margin-right: 7px; }
.rules li.ok { color: #15803d; }
.rules li.ok::before { content: "✓"; font-weight: 800; }

/* ---------------------------------------------------------- error page -- */
.error-page { display: grid; place-items: center; min-height: 100vh; background: var(--bg); padding: 24px; }
.error-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 42px;
  max-width: 460px;
  text-align: center;
  box-shadow: var(--shadow);
}
.error-code {
  display: block;
  font-size: 62px;
  font-weight: 800;
  letter-spacing: -.04em;
  background: linear-gradient(120deg, var(--amber-500), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.error-card h1 { font-size: 19px; color: var(--ink); margin: 6px 0 12px; }
.error-card p { font-size: 14px; color: var(--muted); line-height: 1.6; }
.error-card .btn { margin-top: 14px; }

/* ============================================================== app shell */
.sidebar {
  position: fixed;
  top: 0; bottom: 0; left: 0;
  width: 254px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 14px;
  background: linear-gradient(180deg, #101522, #0a0e18);
  border-right: 1px solid rgba(255, 255, 255, .07);
  color: #cbd5e1;
}
.sidebar__brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px; text-decoration: none; color: inherit; }
.sidebar .brand__text strong { color: #fff; font-size: 12.5px; max-width: 172px; }
.sidebar .brand__text small { color: #7c88a3; }

.nav-group { display: grid; gap: 3px; }
.nav-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b7690;
  padding: 0 10px;
  margin-bottom: 7px;
}
.nav-label--spaced { margin-top: 16px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: .14s;
}
.nav-item svg { flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, .24), rgba(249, 115, 22, .14));
  border-color: rgba(251, 191, 36, .28);
  color: var(--amber-400);
}
.nav-item.is-active svg { opacity: 1; }
.nav-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.5;
  color: #93a0b8;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 11px;
  padding: 10px 12px;
  margin-top: 5px;
}
.nav-note svg { color: var(--amber-400); flex: none; margin-top: 1px; }
.nav-note strong { color: #e2e8f0; }

.side-user {
  margin-top: auto;
  display: grid;
  gap: 10px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 15px;
  padding: 13px;
}
.side-user__row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar {
  width: 37px; height: 37px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--amber-500), var(--orange));
  color: #fff;
  font-weight: 800;
}
.side-user__meta { min-width: 0; }
.side-user__meta strong {
  display: block;
  color: #fff;
  font-size: 13.5px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.role-badge { font-size: 10px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: #93a0b8; }
.role-badge--admin { color: var(--amber-400); }
.folder-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 12px;
  color: var(--amber-400);
  background: #0a0e18;
  border: 1px dashed rgba(251, 191, 36, .42);
  border-radius: 10px;
  padding: 8px 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-user .btn--ghost { color: #cbd5e1; }
.side-user .btn--ghost:hover { background: rgba(255, 255, 255, .08); color: #fff; }

.app-shell { margin-left: 254px; min-height: 100vh; background: var(--bg); background-image: linear-gradient(rgba(244, 245, 249, .955), rgba(244, 245, 249, .955)), url("/static/img/tcc-logo.png"); background-repeat: repeat, repeat; background-size: auto, 300px 300px; background-attachment: fixed, fixed; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 26px;
  background: rgba(244, 245, 249, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar__title h1 { font-size: 18.5px; letter-spacing: -.01em; color: var(--ink); margin: 0; }
.topbar__title p { font-size: 12.5px; color: var(--muted); margin: 3px 0 0; }
.topbar__title strong { color: var(--amber-700); font-family: ui-monospace, Menlo, monospace; }
.topbar__actions { margin-left: auto; display: flex; gap: 9px; align-items: center; }
.hamburger {
  display: none;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
}
.content { padding: 24px 26px 64px; display: grid; gap: 20px; max-width: 1240px; }

/* ----------------------------------------------------------------- stats */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)); gap: 16px; }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
  display: grid;
  gap: 3px;
}
.stat-card__label {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--muted);
}
.stat-card__value { font-size: 31px; font-weight: 800; letter-spacing: -.03em; color: var(--ink); line-height: 1.2; }
.stat-card__hint { font-size: 12.5px; color: #94a3b8; }

/* ----------------------------------------------------------------- panel */
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.panel__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 20px;
  border-bottom: 1px solid #eef0f5;
}
.panel__title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 15.5px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.panel__title svg { color: var(--amber-600); }
.panel__tools { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.panel__body { padding: 20px; display: grid; gap: 16px; }
.panel__foot { font-size: 12.5px; color: var(--muted); margin: 0; }
.panel__foot strong { color: var(--amber-700); font-family: ui-monospace, Menlo, monospace; }

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: .1em;
  padding: 5px 11px;
  border-radius: 999px;
}
.session-timer {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 13px;
  font-weight: 700;
  color: #34d399;
  background: var(--ink);
  padding: 6px 11px;
  border-radius: 9px;
}

.hint-note {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--amber-50);
  border: 1px solid #fde68a;
  color: #92400e;
  font-size: 12.5px;
  line-height: 1.5;
  padding: 11px 13px;
  border-radius: 11px;
  margin: 0;
}
.hint-note svg { flex: none; }

.controls { display: flex; flex-wrap: wrap; gap: 11px; align-items: flex-end; }
.controls .field--inline { min-width: 235px; }
.capture-row { display: flex; flex-wrap: wrap; gap: 11px; align-items: flex-end; }
.capture-row .field--inline { min-width: 195px; }
.capture-row .field--grow { flex: 1; min-width: 230px; }
.capture-row .btn { margin-bottom: 1px; }

.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(215px, 100%), 1fr)); gap: 14px; align-items: end; }
.field--action { display: grid; gap: 6px; }
.field--action > span:first-child { visibility: hidden; }

/* ------------------------------------------------------------ video stage */
.video-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  background:
    radial-gradient(500px 200px at 50% 0%, rgba(245, 158, 11, .08), transparent),
    #0b1220;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid #1e293b;
}
.video-stage video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.video-stage.is-live video { display: block; }
.stage-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 4px;
  text-align: center;
  padding: 24px;
  color: #64748b;
}
.stage-placeholder p { margin: 0; font-size: 14px; }
.stage-placeholder strong { color: #cbd5e1; font-size: 16px; }
.stage-hint { font-size: 12.5px !important; color: #475569 !important; }
.video-stage.is-live .stage-placeholder { display: none; }
.stage-hud { position: absolute; left: 13px; bottom: 13px; display: flex; gap: 9px; z-index: 3; flex-wrap: wrap; }
.hud-chip {
  background: rgba(2, 6, 23, .78);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 11px;
  border-radius: 9px;
  backdrop-filter: blur(6px);
}
.hud-chip--safe { color: #4ade80; border-color: rgba(74, 222, 128, .4); }
.hud-chip--live { color: #f87171; border-color: rgba(248, 113, 113, .45); }

.lock-overlay {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 9px;
  text-align: center;
  padding: 28px;
  background: rgba(8, 12, 22, .9);
  backdrop-filter: blur(4px);
  color: #e2e8f0;
}
.lock-overlay svg { color: var(--amber-400); }
.lock-overlay h3 { margin: 0; font-size: 19px; color: #fff; }
.lock-overlay p { margin: 0; max-width: 420px; font-size: 13.5px; line-height: 1.6; color: #94a3b8; }

/* ------------------------------------------------------------ camera grid */
.camera-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(255px, 100%), 1fr)); gap: 14px; }
.camera-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px;
  display: grid;
  gap: 10px;
}
.camera-card.is-live { border-color: var(--amber-400); box-shadow: 0 0 0 3px rgba(251, 191, 36, .2); }
.camera-card__top { display: flex; align-items: center; gap: 10px; }
.camera-card__icon {
  width: 36px; height: 36px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--amber-100);
  color: var(--amber-700);
}
.camera-card__name { font-size: 14.5px; font-weight: 700; color: var(--ink); line-height: 1.25; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.camera-card__remove {
  margin-left: auto;
  background: none;
  border: 1px solid transparent;
  color: #94a3b8;
  border-radius: 8px;
  padding: 5px 7px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1;
}
.camera-card__remove:hover { color: #dc2626; background: #fef2f2; border-color: #fecaca; }
.camera-card__room {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid #eef1f6;
  border-radius: 9px;
  padding: 8px 10px;
}
.camera-card__room svg { color: var(--amber-600); flex: none; }
.camera-card__status { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--muted); }
.camera-card__device { font-family: ui-monospace, Menlo, monospace; font-size: 11.5px; color: #94a3b8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.status { display: inline-flex; align-items: center; gap: 7px; font-weight: 700; font-size: 12px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
.status--ready { color: #2563eb; }
.status--ready .status-dot { background: var(--blue); }
.status--live { color: #15803d; }
.status--live .status-dot { background: var(--green); box-shadow: 0 0 0 3px rgba(34, 197, 94, .22); }

/* ------------------------------------------------------------ empty state */
.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  text-align: center;
  padding: 44px 24px;
  color: var(--muted);
}
.empty-state svg { color: #cbd5e1; }
.empty-state h3 { font-size: 16.5px; color: var(--ink); margin: 4px 0 0; }
.empty-state p { font-size: 13.5px; line-height: 1.6; max-width: 460px; margin: 0; }
.empty-state--sm { padding: 24px; background: #f8fafc; border: 1px dashed #e2e8f0; border-radius: 13px; }
.empty-state--sm p { font-size: 13px; }

/* -------------------------------------------------------------- filters -- */
.filters { display: flex; flex-wrap: wrap; gap: 13px; align-items: flex-end; }
.filters .field { min-width: 148px; }
.filters .field--grow { flex: 1 1 260px; }
.filters .field--action { min-width: auto; }
.filter-actions { display: flex; gap: 9px; }

/* --------------------------------------------------------------- records -- */
.records { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 18px; }
.record-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .16s, box-shadow .16s;
}
.record-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.record-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 10;
  padding: 0;
  border: 0;
  background: var(--ink);
  cursor: zoom-in;
  overflow: hidden;
}
.record-thumb img { width: 100%; height: 100%; object-fit: cover; }
.record-thumb__zoom {
  position: absolute;
  left: 10px; bottom: 10px;
  background: rgba(2, 6, 23, .78);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  opacity: 0;
  transform: translateY(5px);
  transition: .18s;
}
.record-thumb:hover .record-thumb__zoom { opacity: 1; transform: none; }
.record-body { padding: 16px; display: grid; gap: 11px; flex: 1; align-content: start; }
.record-when { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.record-date { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.record-time {
  font-family: ui-monospace, Menlo, monospace;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--ink);
}
.tag {
  justify-self: start;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .05em;
  padding: 5px 10px;
  border-radius: 999px;
}
.tag--amber { background: var(--amber-100); color: #92400e; }
.tag--red { background: #fee2e2; color: #b91c1c; }
.record-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 12px; margin: 0; }
.record-meta dt { font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #94a3b8; }
.record-meta dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; color: var(--ink-soft); overflow-wrap: anywhere; }
.record-meta dd.mono { color: var(--amber-700); font-weight: 700; }
.record-note {
  font-size: 12.5px;
  line-height: 1.55;
  color: #475569;
  background: #f8fafc;
  border-left: 3px solid var(--amber-300);
  border-radius: 0 9px 9px 0;
  padding: 9px 11px;
  margin: 0;
}
.record-actions { display: flex; gap: 9px; margin-top: auto; }
.record-actions form { margin: 0; }

/* --------------------------------------------------------------- lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 34px;
  background: rgba(2, 6, 23, .92);
}
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 13px; box-shadow: 0 30px 70px -30px #000; }
.lightbox__close {
  position: absolute;
  top: 20px; right: 22px;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}
.lightbox__close:hover { background: rgba(255, 255, 255, .2); }

/* ----------------------------------------------------------------- toasts */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 9px; max-width: 340px; }
.toast {
  background: var(--ink);
  color: #f1f5f9;
  font-size: 13px;
  line-height: 1.5;
  padding: 12px 15px;
  border-radius: 11px;
  border-left: 3px solid var(--amber-400);
  box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .8);
  animation: slide-in .22s ease;
}
.toast--success { border-left-color: var(--green); }
.toast--error { border-left-color: var(--red); }
.toast.is-out { opacity: 0; transform: translateX(24px); transition: .4s; }
@keyframes slide-in { from { opacity: 0; transform: translateX(30px); } }

/* ------------------------------------------------------ password modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 6, 23, .62);
  backdrop-filter: blur(3px);
}
.modal-card {
  width: 100%;
  max-width: 400px;
  background: #fff;
  border-radius: 17px;
  padding: 24px;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .7);
  display: grid;
  gap: 13px;
}
.modal-card h3 { margin: 0; font-size: 17.5px; color: var(--ink); display: flex; gap: 9px; align-items: center; }
.modal-card h3 svg { color: var(--amber-600); }
.modal-card p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.55; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 3px; }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; padding-top: 56px; padding-bottom: 56px; }
  .auth-layout { grid-template-columns: 1fr; }
  .auth-side { padding: 40px 26px; }
  .steps { grid-template-columns: 1fr; }
  .role-grid { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
  .sidebar { transform: translateX(-106%); transition: transform .24s ease; box-shadow: none; }
  .sidebar.is-open { transform: none; box-shadow: 30px 0 60px -30px rgba(0, 0, 0, .7); }
  .app-shell { margin-left: 0; }
  .hamburger { display: grid; }
  .topbar { padding: 13px 16px; }
  .content { padding: 18px 16px 56px; }
  .field-row { grid-template-columns: 1fr; }
  .rules { grid-template-columns: 1fr; }
  .section { padding: 56px 20px; }
  .section--alt { padding: 46px 22px; border-radius: 20px; }
}

@media (max-width: 640px) {
  .nav-links a:not(.btn) { display: none; }
  .records { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .controls .field--inline, .capture-row .field--inline { min-width: 100%; }
  .capture-row .field--grow { min-width: 100%; }
  .record-meta { grid-template-columns: 1fr; }
  .topbar__title p { display: none; }

  /* phone: let every toolbar wrap instead of pushing the page sideways */
  .topbar { flex-wrap: wrap; row-gap: 10px; }
  .topbar__actions { flex-wrap: wrap; justify-content: flex-end; row-gap: 8px; }
  .topbar__title h1 { font-size: 16.5px; }
  .panel__head { flex-wrap: wrap; row-gap: 10px; padding: 13px 14px; }
  .panel__tools { margin-left: 0; flex: 1 1 100%; flex-wrap: wrap; row-gap: 8px; }
  .panel__body { padding: 15px 14px; }
  .stat-card { padding: 15px 16px; }
  .video-stage { aspect-ratio: 4 / 3; }

  /* public pages on a phone */
  .pub-nav__inner { padding: 10px 14px; gap: 8px; }
  .brand__text strong { font-size: 13px; max-width: 150px; }
  .brand__text small { font-size: 10.5px; }
  .brand__mark { width: 33px; height: 33px; }
  .btn--sm { padding: 8px 11px; font-size: 12.5px; }
  .btn { white-space: normal; text-align: center; }
  .btn--block { width: 100%; }
  .settings-form .btn,
  .auth-form .btn--block { width: 100%; }
  .mock-body { grid-template-columns: 1fr; }
  .section { padding: 44px 16px; }
  .page-hero { padding: 44px 16px 6px; }

  /* auth / reset pages on a phone */
  .auth-main { padding: 22px 14px; }
  .auth-card { padding: 22px 16px; }
  .auth-side { padding: 30px 20px; }
  .auth-side__logo { width: 120px; height: 120px; }
  .timeline__step { flex-direction: column; gap: 13px; padding: 17px; }
  .toast-wrap { left: 12px; right: 12px; max-width: none; }
}

/* --------------------------------------------- TCC seal, detection feed --- */
.brand__mark {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 50%;
  padding: 3px;
  box-shadow: none;
  overflow: hidden;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.sidebar .brand__mark { border: 0; box-shadow: 0 0 0 3px rgba(251, 191, 36, .22); }

.auth-side__logo {
  display: block;
  width: 68px;
  height: 68px;
  background: #fff;
  border-radius: 50%;
  padding: 6px;
  box-shadow: 0 16px 34px -18px rgba(0, 0, 0, .8);
}
.auth-side__logo img { width: 100%; height: 100%; object-fit: contain; }

.error-logo { display: block; width: 62px; margin: 0 auto 12px; }

.chip--detect-on { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }

.detect-feed { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.detect-feed__empty {
  background: #f8fafc;
  border: 1px dashed #e2e8f0;
  border-radius: 11px;
  padding: 14px;
  text-align: center;
  font-size: 13px;
  color: #94a3b8;
}
.detect-event {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  background: var(--amber-50);
  border: 1px solid #fde68a;
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 13px;
}
.detect-event__time { font-family: ui-monospace, Menlo, monospace; font-weight: 700; color: var(--amber-700); }
.detect-event__type { font-weight: 700; color: var(--ink); }
.detect-event__where { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }

/* ------------------------------------------------- extra public pages ---- */
.page-hero { max-width: 1140px; margin: auto; padding: 64px 24px 10px; text-align: center; }
.page-hero h1 { font-size: clamp(30px, 4vw, 44px); letter-spacing: -.02em; color: var(--ink); margin: 12px 0 14px; }
.page-hero p { color: var(--muted); font-size: 16px; line-height: 1.65; max-width: 660px; margin: 0 auto; }
.section__head--left { text-align: left; margin-left: 0; margin-right: 0; }
.nav-links a.is-active { color: var(--amber-700); font-weight: 700; }

.role-card--light { background: #fff; border: 1px solid var(--line); color: #475569; }
.role-card--light h3 { color: var(--ink); }
.check-list--dark li { color: #475569; border-bottom-color: #eef0f5; }
.role-card__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }

.table-wrap { overflow-x: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
.access-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.access-table th {
  text-align: left; padding: 13px 16px; background: var(--ink); color: #fff;
  font-size: 12.5px; letter-spacing: .05em; text-transform: uppercase;
}
.access-table td { padding: 12px 16px; border-top: 1px solid #eef0f5; color: #334155; }
.access-table tr:hover td { background: #f8fafc; }
.yes { color: #15803d; font-weight: 700; }
.no { color: #b91c1c; font-weight: 700; }

.info-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(255px, 100%), 1fr)); gap: 16px; margin-top: 34px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.info-card h4 { margin: 0 0 8px; font-size: 15px; color: var(--ink); }
.info-card p { margin: 0; font-size: 13.5px; line-height: 1.6; color: var(--muted); }

.timeline { list-style: none; margin: 0 auto; padding: 0; display: grid; gap: 18px; max-width: 840px; }
.timeline__step { display: flex; gap: 18px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.timeline__num {
  flex: none; width: 44px; height: 44px; display: grid; place-items: center;
  border-radius: 13px; background: linear-gradient(135deg, var(--amber-500), var(--orange));
  color: #fff; font-weight: 800; font-size: 18px;
}
.timeline__body h3 { margin: 2px 0 8px; font-size: 17px; color: var(--ink); }
.timeline__body p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--muted); }
.timeline__actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }

/* ----------------------------------------------------------- settings ---- */
.settings-form { display: grid; gap: 14px; max-width: 640px; }
.check-field { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: #334155; cursor: pointer; }
.check-field input { width: 17px; height: 17px; accent-color: var(--amber-600); }
.form-alert--success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #047857; }
.swatch-row { display: flex; gap: 12px; flex-wrap: wrap; }
.swatch {
  display: inline-flex; align-items: center; gap: 9px; padding: 11px 15px;
  border: 1px solid var(--line); border-radius: 12px; font-size: 13.5px;
  font-weight: 600; cursor: pointer; background: #fff; position: relative;
}
.swatch input { position: absolute; opacity: 0; pointer-events: none; }
.swatch__dot { width: 16px; height: 16px; border-radius: 50%; }
.swatch--amber .swatch__dot { background: #f59e0b; }
.swatch--blue .swatch__dot { background: #3b82f6; }
.swatch--emerald .swatch__dot { background: #10b981; }
.swatch:has(input:checked) { border-color: var(--amber-500); box-shadow: 0 0 0 3px rgba(245, 158, 11, .18); }
.swatch:has(input:checked).swatch--blue { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59, 130, 246, .18); }
.swatch:has(input:checked).swatch--emerald { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16, 185, 129, .18); }

/* ------------------------------------------------ student status frames -- */
.student-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(185px, 100%), 1fr)); gap: 14px; }
.student-frame { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.student-frame__img {
  aspect-ratio: 4 / 3; background: #0b1220; display: grid; place-items: center;
  color: #64748b; font-size: 12px; overflow: hidden;
}
.student-frame__img img { width: 100%; height: 100%; object-fit: cover; }
.student-frame__body { padding: 11px 12px; display: grid; gap: 7px; }
.student-frame__name { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.student-frame__reason { margin: 0; font-size: 11.5px; line-height: 1.45; color: var(--muted); }
.student-frame__flags { font-size: 11px; font-weight: 700; color: #b91c1c; }
.student-frame--warning { border-color: #fcd34d; }
.student-frame--flagged { border-color: #fca5a5; box-shadow: 0 0 0 3px rgba(239, 68, 68, .10); }

.status-badge { font-size: 10.5px; font-weight: 800; letter-spacing: .06em; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.status-badge--normal { background: #dcfce7; color: #15803d; }
.status-badge--warning { background: #fef3c7; color: #92400e; }
.status-badge--flagged { background: #fee2e2; color: #b91c1c; }

.record-flags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.record-reason {
  margin: 0; font-size: 12.5px; line-height: 1.55; color: #7c2d12;
  background: #fff7ed; border-left: 3px solid #fb923c; border-radius: 0 9px 9px 0; padding: 9px 11px;
}
.record-reason strong { color: #9a3412; }
.student-chip { font-size: 11px; font-weight: 700; background: #e0f2fe; color: #075985; padding: 5px 10px; border-radius: 999px; }

/* ------------------------------------------------------------- accents --- */
:root[data-accent="blue"] {
  --amber-50: #eff6ff; --amber-100: #dbeafe; --amber-300: #93c5fd; --amber-400: #60a5fa;
  --amber-500: #3b82f6; --amber-600: #2563eb; --amber-700: #1d4ed8; --orange: #2563eb;
}
:root[data-accent="emerald"] {
  --amber-50: #ecfdf5; --amber-100: #d1fae5; --amber-300: #6ee7b7; --amber-400: #34d399;
  --amber-500: #10b981; --amber-600: #059669; --amber-700: #047857; --orange: #059669;
}

/* ------------------------------------------- auth: big seal + watermark -- */
.auth-side { position: relative; overflow: hidden; }
.auth-side::before {
  content: ""; position: absolute; inset: -12%;
  background: url("/static/img/tcc-logo.png") no-repeat center / 46% auto;
  opacity: .10; transform: rotate(-8deg); pointer-events: none;
}
.auth-side__inner { position: relative; z-index: 1; }
.auth-side__logo { width: 168px; height: 168px; padding: 9px; }
.auth-main { position: relative; overflow: hidden; }
.auth-main::before {
  content: ""; position: absolute; right: -70px; bottom: -80px;
  width: 400px; height: 400px;
  background: url("/static/img/tcc-logo.png") no-repeat center / contain;
  opacity: .07; pointer-events: none;
}
.auth-card { position: relative; z-index: 1; }
