/* NIGHTFALL OPS — Control Door
   Design language ported from the Dark Market design system
   (Barlow Condensed display · DM Sans body · Space Mono mono). */

@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700&family=DM+Sans:ital,opsz,wght@0,9..40,400..700&family=Space+Mono:wght@400;700&display=swap');

:root {
  --background: 210 30.8% 94.9%;
  --foreground: 207 33.3% 17.1%;
  --border: 214 24.7% 83.3%;
  --card: 0 0% 100%;
  --primary: 209 53.2% 21.8%;
  --primary-foreground: 0 0% 100%;
  --secondary: 204 55.6% 91.2%;
  --secondary-foreground: 209 53.2% 21.8%;
  --muted: 207 26.8% 92%;
  --muted-foreground: 209 10% 45.3%;
  --accent: 22 94.4% 51.4%;
  --accent-foreground: 0 0% 100%;
  --input: 208 20.6% 87.6%;
  --ring: 22 94.4% 51.4%;
  --font-display: 'Barlow Condensed', sans-serif;
  --font-sans: 'DM Sans', sans-serif;
  --font-mono: 'Space Mono', monospace;
  --radius: 0.25rem;
}

* { box-sizing: border-box; }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font-sans); font-size: 13px; background: hsl(var(--background)); color: hsl(var(--foreground)); }
button, input { font: inherit; }
button, a, input { outline-color: hsl(var(--accent)); outline-offset: 2px; }
button { cursor: pointer; }

/* ---- Layout primitives ---- */
.app-shell { min-height: 100dvh; padding-bottom: 44px; }
.container-wide { width: 100%; margin: 0; padding-inline: 32px; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.grid { display: grid; }
.w-full { width: 100%; }
.min-h-8 { min-height: 2rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; }
.mt-4 { margin-top: 1rem; } .mt-5 { margin-top: 1.25rem; } .mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; }
.mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.p-3 { padding: .75rem; } .p-4 { padding: 1rem; } .p-5 { padding: 1.25rem; } .p-8 { padding: 2rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.py-12 { padding-top: 3rem; padding-bottom: 3rem; }
.gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.text-3xl { font-size: 1.875rem; } .text-xl { font-size: 1.25rem; }
.font-bold { font-weight: 700; }
.font-mono { font-family: var(--font-mono); }
.tracking-wide { letter-spacing: .06em; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---- Brand / chrome ---- */
.topline { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); }
.topline .dot { display: inline-block; margin-right: .5rem; width: .4rem; height: .4rem; background: hsl(var(--accent)); }
.site-header { background: hsl(var(--card)); border-bottom: 1px solid hsl(var(--border)); }
.brand-title { font-family: var(--font-display); letter-spacing: .06em; }
.section-kicker { font-family: var(--font-mono); letter-spacing: .1em; font-size: 10px; color: hsl(var(--muted-foreground)); text-transform: uppercase; }
.nav-link { color: hsl(var(--primary)); text-decoration: none; font-family: var(--font-display); letter-spacing: .08em; font-weight: 700; }
.nav-link:hover, .nav-link:focus-visible { color: hsl(var(--accent)); }
.mono-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .08em; color: hsl(var(--muted-foreground)); }
.footline { position: fixed; bottom: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 10px 32px; background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); font-size: 10px; }
.mono-sm { font-family: var(--font-mono); font-size: 10px; }

/* ---- Panels / fields / buttons ---- */
.panel { background: hsl(var(--card)); border: 1px solid hsl(var(--border)); }
.field-control { width: 100%; background: hsl(var(--card)); border: 1px solid hsl(var(--border)); color: hsl(var(--foreground)); border-radius: 2px; padding: .6rem .75rem; font-size: 13px; }
.field-control:focus { border-color: hsl(var(--accent)); box-shadow: 0 0 0 2px hsl(var(--accent) / .16); }
.blue-button { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); border: 1px solid hsl(var(--primary)); }
.blue-button:hover { background: hsl(var(--primary) / .88); }
.orange-button { background: hsl(var(--accent)); color: white; border: 1px solid hsl(var(--accent)); }
.orange-button:hover { background: hsl(var(--accent) / .9); }
.text-button { color: hsl(var(--primary)); background: transparent; border: 0; }
.text-button:hover { color: hsl(var(--accent)); }
.focus-ring:focus-visible { outline: 2px solid hsl(var(--accent)); outline-offset: 2px; }

/* ---- Login page ---- */
.login-main { min-height: calc(100dvh - 120px); }
.login-hero { background: hsl(var(--primary)); color: hsl(var(--primary-foreground)); padding: 2rem; display: flex; flex-direction: column; }
.kicker-inverse { color: hsl(var(--secondary)); }
.login-title { margin-top: 1rem; font-size: 3rem; line-height: .95; }
.login-sub { margin-top: 1.25rem; font-size: .8rem; line-height: 1.6; color: hsl(var(--secondary)); max-width: 24rem; }
.login-hero-meta { margin-top: auto; padding-top: 2rem; border-top: 1px solid hsl(var(--secondary) / .25); font-family: var(--font-mono); font-size: 10px; line-height: 1.8; color: hsl(var(--secondary)); }
.login-form-wrap { padding: 2rem; }
.form-title { margin-top: .5rem; font-size: 1.5rem; color: hsl(var(--primary)); }
.form-sub { margin-top: .5rem; font-size: .8rem; color: hsl(var(--muted-foreground)); }
.login-form { margin-top: 1.5rem; display: flex; flex-direction: column; gap: 1.25rem; }
.login-form label { display: block; margin-bottom: .35rem; font-size: .72rem; font-weight: 700; letter-spacing: .04em; color: hsl(var(--foreground)); }
.form-submit { width: 100%; padding: .7rem 1rem; font-size: .75rem; font-weight: 700; letter-spacing: .08em; }
.error-box { border: 1px solid hsl(var(--destructive, 0 66.8% 44.9%)); background: #fdeeee; color: #a11; padding: .6rem .75rem; font-size: .75rem; }
.invite-badge { margin-top: 1.5rem; text-align: center; }
.invite-badge span { border: 1px solid hsl(var(--accent)); color: hsl(var(--accent)); padding: .25rem .75rem; font-size: 10px; font-weight: 700; letter-spacing: .12em; }
.form-footer { margin-top: 1.5rem; display: flex; justify-content: space-between; border-top: 1px solid hsl(var(--border)); padding-top: 1rem; font-size: .72rem; color: hsl(var(--muted-foreground)); }

/* ---- Ops console (post-login) ---- */
.console-layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.25rem; align-items: start; }
.console-side { background: hsl(var(--sidebar, 204 55.6% 91.2%)); border: 1px solid hsl(var(--border)); padding: 1rem 0; }
.console-side .side-head { padding: 0 1rem .75rem; border-bottom: 1px solid hsl(var(--border)); }
.console-nav a { display: flex; align-items: center; justify-content: space-between; padding: .6rem 1rem; color: hsl(var(--primary)); text-decoration: none; font-size: .78rem; border-left: 2px solid transparent; }
.console-nav a:hover { background: hsl(var(--card) / .7); }
.console-nav a.active { border-left-color: hsl(var(--accent)); background: hsl(var(--card)); font-weight: 700; }
.stat-card { border-top: 2px solid hsl(var(--accent)); }
.ops-feed { font-family: var(--font-mono); font-size: 10px; line-height: 1.9; color: hsl(var(--muted-foreground)); }
.ops-feed .ok { color: hsl(var(--accent)); }
.signin-card { display: flex; align-items: center; gap: .6rem; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); padding: .6rem .75rem; font-family: var(--font-mono); font-size: 10px; color: hsl(var(--primary)); }

@media (max-width: 767px) {
  .container-wide { padding-inline: 12px; }
  .login-hero, .login-form-wrap { padding: 1.25rem; }
  .login-hero { grid-row: 1; }
  .console-layout { grid-template-columns: 1fr; }
  .footline { padding-inline: 12px; }
}

/* ---- Verifier's Desk: approvals table ---- */
.table-scroll { overflow-x: auto; margin-top: 0.5rem; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.data-table th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: hsl(var(--muted-foreground));
  padding: 0.65rem 0.5rem;
  border-bottom: 1px solid hsl(var(--border));
  white-space: nowrap;
}
.data-table td { padding: 0.55rem 0.5rem; border-bottom: 1px solid hsl(var(--border)); vertical-align: top; }
.data-table tbody tr:hover { background: hsl(var(--muted)); }
.sev { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; }
.sev-critical, .sev-high { color: hsl(var(--accent)); }
.sev-medium { color: hsl(var(--primary)); }
.sev-low { color: hsl(var(--muted-foreground)); }