/* California Systems admin panel — dark theme. */
:root {
  /* surfaces — warm-neutral black, matching the badge's field */
  --bg: #0a0a0b;
  --bg-raised: #121214;
  --bg-card: #17171a;
  --bg-hover: #202024;
  --border: #2b2b31;

  /* type */
  --text: #ececed;
  --text-muted: #94949e;

  /* brand gold, sampled from the badge: #845424 deep, #f0a854 highlight */
  --accent: #c98a3c;
  --accent-dim: #8a5e2c;
  --accent-bright: #e0a855;
  --on-accent: #1a1206;

  /* supporting brand colours, straight off the flat shield */
  --chrome: #e4e4e4;
  --chrome-dim: #a8a8a8;
  --brand-cream: #f0e4e4;
  --brand-bear: #906c3c;
  --brand-red: #841818;

  /* status colours, brightened to read on near-black */
  --green: #3fb950;
  --red: #e5484d;
  --orange: #d98324;
  --blue: #5b8def;
  --radius: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  line-height: 1.55;
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 0.88em;
  font-family: Consolas, "Cascadia Mono", monospace;
}

/* Layout */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 230px;
  flex-shrink: 0;
  background: var(--bg-raised);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 17px;
  font-weight: 800;
  padding: 22px 20px 18px;
  letter-spacing: 0.3px;
}
.logo span { color: var(--accent); }

.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 10px; }
.sidebar nav a {
  color: var(--text-muted);
  padding: 10px 14px;
  border-radius: 8px;
  font-weight: 600;
  transition: background 0.15s, color 0.15s;
}
.sidebar nav a:hover { background: var(--bg-hover); color: var(--text); text-decoration: none; }
.sidebar nav a.active { background: color-mix(in srgb, var(--accent) 13%, transparent); color: var(--accent); }

.sidebar-footer {
  margin-top: auto;
  padding: 18px 20px;
  color: var(--text-muted);
  font-size: 12px;
  border-top: 1px solid var(--border);
}

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topbar h1 { font-size: 22px; font-weight: 700; letter-spacing: 0.2px; }
.topbar-right { display: flex; align-items: center; gap: 14px; }

.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip img, .avatar-fallback {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--bg-hover);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
}
.user-chip-text { display: flex; flex-direction: column; line-height: 1.2; }
.user-chip-text small { color: var(--text-muted); text-transform: capitalize; }

.content { padding: 30px 32px 70px; max-width: 1180px; width: 100%; }

/* Cards & grids */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 24px;
  margin-bottom: 20px;
}
/* section headings: small uppercase labels */
.card h2 {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  margin-bottom: 16px;
}
.card h2 .muted { font-weight: 400; text-transform: none; letter-spacing: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-bottom: 4px; }
.card-head h2 { margin-bottom: 10px; }
.mt { margin-top: 24px; }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 950px) { .grid-2 { grid-template-columns: 1fr; } }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.stat-label {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.3px;
}
.stat-value { font-size: 28px; font-weight: 800; color: var(--accent); line-height: 1.1; }
.stat-value-sm { font-size: 17px; color: var(--text); font-weight: 700; }
.stat-sub { color: var(--text-muted); font-size: 0.84rem; }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px 14px; }
thead th {
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
}
tbody tr { border-bottom: 1px solid var(--border); }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
.row-voided { opacity: 0.45; }
.cell-reason { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cell-actions { display: flex; gap: 6px; justify-content: flex-end; }

table.kv td { padding: 10px 10px 10px 0; border: none; }
table.kv td:first-child { color: var(--text-muted); width: 40%; }
table.kv tr { border-bottom: 1px solid var(--border); }
table.kv tr:last-child { border-bottom: none; }
table.kv tr:hover { background: none; }

/* Badges, dots, chips */
/* tints mixed from tokens, so a token change cannot strand a stale rgba */
.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.9px;
  /* uppercase + tracking widens these; without nowrap they wrap mid-label */
  white-space: nowrap;
}
.badge-warn  { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-bright); }
.badge-kick  { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.badge-ban   { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.badge-unban { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.badge-note  { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); }
.badge-ok    { background: color-mix(in srgb, var(--green) 16%, transparent); color: var(--green); }
.badge-off   { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.badge-demo  { background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent-bright); }

.badge-team-police   { background: color-mix(in srgb, var(--blue) 16%, transparent); color: var(--blue); }
.badge-team-sheriff  { background: color-mix(in srgb, var(--orange) 16%, transparent); color: var(--orange); }
.badge-team-fire     { background: color-mix(in srgb, var(--red) 16%, transparent); color: var(--red); }
.badge-team-dot      { background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent-bright); }
.badge-team-civilian { background: color-mix(in srgb, var(--text-muted) 16%, transparent); color: var(--text-muted); }
.badge-team-jail     { background: color-mix(in srgb, var(--text-muted) 22%, transparent); color: var(--text); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.dot-green { background: var(--green); }
.dot-red { background: var(--red); }

.color-chip {
  display: inline-block;
  width: 14px; height: 14px;
  border-radius: 4px;
  vertical-align: -2px;
  border: 1px solid var(--border);
}

.chip {
  background: var(--bg-hover);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12.5px;
  cursor: pointer;
  font-family: Consolas, monospace;
}
.chip:hover { border-color: var(--accent-dim); color: var(--accent); }
.quick-cmds { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Forms & buttons */
.form-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.form-row-tight { margin: 0; }
.input {
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 14px;
  min-width: 140px;
}
.input:focus { outline: none; border-color: var(--accent-dim); }
.input-grow { flex: 1; min-width: 220px; }
select.input { cursor: pointer; }

.btn {
  display: inline-block;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.15s, background 0.15s;
}
.btn:hover { filter: brightness(1.1); text-decoration: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-danger { background: color-mix(in srgb, var(--red) 15%, transparent); color: var(--red); border-color: color-mix(in srgb, var(--red) 32%, transparent); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-ghost:hover { color: var(--text); }
.btn-sm { padding: 5px 12px; font-size: 12.5px; }
.btn-block { width: 100%; }
.btn-discord { background: #5865f2; color: #fff; display: block; text-align: center; margin-bottom: 12px; padding: 11px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Alerts, lists, misc */
.alert {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--text-muted);
  border-radius: 8px;
  padding: 12px 16px;
  margin-bottom: 18px;
}
.alert-ok { border-left-color: var(--green); }
.alert-error { border-left-color: var(--red); }
.alert-info { border-left-color: var(--accent); }

.plain-list { list-style: none; }
.plain-list li { padding: 6px 0; border-bottom: 1px solid var(--border); }
.plain-list li:last-child { border-bottom: none; }

.muted { color: var(--text-muted); }
.small { font-size: 12.5px; }

.status-row { display: flex; gap: 10px; margin-top: 14px; flex-wrap: wrap; }

.pagination { display: flex; gap: 6px; margin-top: 16px; flex-wrap: wrap; }
.page-link {
  padding: 5px 11px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-muted);
}
.page-link.active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.page-link:hover { text-decoration: none; color: var(--text); }

.setup-list { padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }

/* Auth (login) */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
  background: var(--bg);
}
/* The CSRP scene sits behind the card, dimmed hard so the form stays readable. */
.auth-shell::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('/static/img/hero.jpg') center/cover no-repeat;
  opacity: 0.38;
}
.auth-shell::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 55% at 50% 45%, transparent, rgba(10, 10, 11, 0.82) 72%),
    linear-gradient(to bottom, rgba(10, 10, 11, 0.55), rgba(10, 10, 11, 0.92));
}
.auth-card {
  position: relative;   /* above both pseudo-element layers */
  z-index: 1;
  background: rgba(23, 23, 26, 0.92);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 34px 36px 38px;
  width: 100%;
  max-width: 400px;
  text-align: center;
  backdrop-filter: blur(6px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(201, 138, 60, 0.14);
}
.auth-logo { width: 132px; height: 132px; margin: 0 auto 10px; display: block; }
.auth-title { font-size: 26px; margin-bottom: 6px; letter-spacing: 0.2px; }
.auth-card .muted { margin-bottom: 22px; }
.auth-card .alert { text-align: left; }

.error-card { max-width: 480px; margin: 60px auto; text-align: center; }
.error-card .btn { margin-top: 14px; }

#console-result { margin-top: 14px; }
#live-updated { margin-bottom: 18px; }

/* Mod panel */
.modgrid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr) 340px;
  gap: 18px;
  align-items: start;
}
.modcol { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.me { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.me-avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
.me-avatar-fallback {
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--bg-hover); display: grid; place-items: center; font-size: 24px;
}
.me-name { font-size: 1.15rem; margin: 0 0 3px; }
.duty {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.72rem; font-weight: 700; letter-spacing: .06em;
  padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border);
}
.duty .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.duty-on { color: var(--green); }
.duty-off { color: var(--red); }

.quota { margin-top: 16px; }
.quota-head { font-weight: 600; margin-bottom: 8px; }
.quota-bar {
  height: 9px; border-radius: 999px; background: var(--bg-hover);
  overflow: hidden; margin-bottom: 6px;
}
.quota-fill {
  height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--green), #7ee08f);
  transition: width .4s ease;
}

.toolbox { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
/* dark tiles with a colour stripe, so the toolbox reads as one component */
.tool {
  position: relative;
  display: block;
  padding: 12px 10px 12px 17px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text);
  text-decoration: none;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color .13s ease, background .13s ease, transform .13s ease;
}
.tool::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--tool-accent, var(--accent));
}
.tool:hover {
  background: #26262b;
  border-color: var(--accent-dim);
  text-decoration: none;
  transform: translateY(-1px);
}
.tool-green  { --tool-accent: var(--green); }
.tool-pink   { --tool-accent: var(--brand-red); }
.tool-blue   { --tool-accent: var(--blue); }
.tool-orange { --tool-accent: var(--orange); }
.tool-purple { --tool-accent: var(--brand-bear); }
.tool-grey   { --tool-accent: var(--chrome-dim); }

.modsearch {
  width: 100%; padding: 9px 12px; margin-bottom: 12px;
  background: var(--bg); color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; font-size: 0.92rem;
}
.modsearch:focus { outline: none; border-color: var(--accent-dim); }

.live-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.live-on { background: var(--green); box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: livepulse 2s infinite; }
.live-off { background: var(--text-muted); }
@keyframes livepulse {
  70% { box-shadow: 0 0 0 7px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.modfeed { max-height: 74vh; display: flex; flex-direction: column; }
.feed { list-style: none; overflow-y: auto; margin: 0; padding: 0; }
.feed-item {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; margin-bottom: 8px;
  background: var(--bg-raised); border: 1px solid var(--border); border-radius: 10px;
}
.feed-emoji { font-size: 1.05rem; line-height: 1.4; }
.feed-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.feed-text { word-break: break-word; }
.feed-time { color: var(--text-muted); font-size: 0.8rem; }

.pun {
  padding: 12px; margin-bottom: 10px;
  background: var(--bg-raised); border: 1px solid var(--border);
  border-left: 3px solid var(--red); border-radius: 10px;
}
.pun-void { opacity: .55; border-left-color: var(--text-muted); }
.pun-head { display: flex; gap: 6px; margin-bottom: 6px; }
.pun-user { margin-bottom: 2px; }
.pun-reason { color: var(--text-muted); font-size: 0.9rem; word-break: break-word; }

@media (max-width: 1250px) {
  .modgrid { grid-template-columns: 1fr; }
  .modfeed { max-height: none; }
}
.duty-break { color: var(--orange); }
.break-form { margin-top: 8px; }

/* Brand mark */
.logo-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  flex-shrink: 0;
  /* hairline stops the mark dissolving into the sidebar on dark displays */
  box-shadow: 0 0 0 1px var(--border);
}
.logo span { line-height: 1.15; }

/* Player hub */
.hub { max-width: 860px; margin: 0 auto; display: flex; flex-direction: column; gap: 18px; }
.hub-head { margin-bottom: 2px; }
.hub-title {
  font-size: 34px; font-weight: 800; letter-spacing: 1.5px; line-height: 1.1;
}
.hub-sub { color: var(--text-muted); margin-top: 2px; }
.hub-h2 {
  font-size: 13px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 1.4px; color: var(--text); margin-bottom: 14px;
}
.hub-empty { color: var(--text-muted); text-align: center; padding: 26px 0; }

.identity { display: flex; align-items: center; gap: 18px; }
.identity-avatar {
  width: 74px; height: 74px; border-radius: 50%; flex-shrink: 0;
  border: 1px solid var(--border); object-fit: cover;
}
.identity-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  font-size: 34px; background: var(--bg-hover);
}
.identity-name { font-size: 24px; font-weight: 700; margin-bottom: 2px; }

/* the three status answers */
.status-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.status-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
}
.status-label {
  display: block; font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 1.3px; color: var(--text-muted); margin-bottom: 10px;
}
.status-value { display: flex; align-items: center; gap: 9px; font-size: 19px; font-weight: 700; }
.status-value .dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.status-value.is-good .dot { background: var(--green); }
.status-value.is-bad { color: var(--red); }
.status-value.is-bad .dot { background: var(--red); }
.status-value.is-unknown { color: var(--text-muted); }
.status-value.is-unknown .dot { background: var(--text-muted); }
.status-note { margin-top: 8px; font-size: 0.85rem; color: var(--text-muted); }

/* infraction / promotion records */
.record-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.record { border-left: 2px solid var(--border); padding-left: 14px; }
.record-rank {
  display: inline-block; font-size: 0.9rem; font-weight: 700;
  text-transform: capitalize; margin-bottom: 3px;
}
.record-promo { color: var(--green); }
.record-warning, .record-note { color: var(--orange); }
.record-strike, .record-suspension, .record-demotion { color: var(--red); }
.record-reason { color: var(--text); }
.record-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: 3px; }

/* hiring call-out */
.hiring { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hiring-open { border-color: var(--accent-dim); }

/* openings list */
.opening-name { font-size: 19px; font-weight: 700; margin-bottom: 5px; }
.opening-closed { opacity: 0.62; }
.opening-foot { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.pill {
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.1px;
  padding: 5px 12px; border-radius: 999px;
}
.pill-open { color: var(--green); background: rgba(63, 185, 80, 0.13); }
.pill-closed { color: var(--text-muted); background: var(--bg-hover); }

@media (max-width: 720px) {
  .status-row { grid-template-columns: 1fr; }
  .hiring { flex-direction: column; align-items: flex-start; }
  .hub-title { font-size: 27px; }
}

.nav-divider {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.3px;
  color: var(--text-muted); padding: 16px 20px 6px;
}

/* Public site: liquid glass */
:root {
  --glass:        rgba(255, 255, 255, .045);
  --glass-strong: rgba(255, 255, 255, .075);
  --glass-line:   rgba(255, 255, 255, .10);
  --glass-lit:    rgba(255, 255, 255, .20);
  --ease: cubic-bezier(.22, 1, .36, 1);
}
.landing-body { background: #08080a; position: relative; overflow-x: hidden; }

@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.hero-inner > *, .page-head, .strip-inner > * { animation: rise .5s var(--ease) both; }
.hero-inner > *:nth-child(2) { animation-delay: .06s; }
.hero-inner > *:nth-child(3) { animation-delay: .12s; }
.hero-inner > *:nth-child(4) { animation-delay: .18s; }

/* drifting light behind the glass gives it depth */
.aurora { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.aurora span {
  position: absolute; display: block;
  width: 55vw; height: 55vw; border-radius: 50%;
  filter: blur(90px); opacity: .5;
  animation: drift 26s var(--ease) infinite alternate;
}
.aurora span:nth-child(1) { background: color-mix(in srgb, var(--accent) 42%, transparent); top: -14vw; left: -10vw; }
.aurora span:nth-child(2) { background: color-mix(in srgb, var(--brand-red) 34%, transparent); top: 34vh; right: -16vw; animation-delay: -9s; }
.aurora span:nth-child(3) { background: color-mix(in srgb, var(--blue) 26%, transparent); bottom: -22vw; left: 26vw; animation-delay: -17s; }
@keyframes drift {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(4vw, -5vh, 0) scale(1.16); }
}

/* the glass itself */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(26px) saturate(165%);
  -webkit-backdrop-filter: blur(26px) saturate(165%);
  box-shadow: 0 0 0 1px rgba(255,255,255,.05), 0 6px 18px rgba(0,0,0,.55),
              inset 0 1px 0 rgba(255,255,255,.07);
}
/* a specular edge along the top, like light catching a rim */
.glass::after {
  content: ''; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255,255,255,.10), transparent 42%);
  opacity: .85;
}

/* nav */
.lnav {
  position: sticky;
  top: 12px;
  z-index: 40;
  margin: 12px 16px 0;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 9px 12px 9px 16px;
  border-radius: 14px;
}

.lnav-brand {
  display: flex; align-items: center; gap: 11px; z-index: 1;
  color: var(--text); text-decoration: none; white-space: nowrap;
  font-size: 12.5px; font-weight: 800; letter-spacing: 2.1px;
}
.lnav-brand em { font-style: normal; color: var(--accent); }
.lnav-brand img { border-radius: 7px; transition: transform .4s var(--ease); }
.lnav-brand:hover img { transform: rotate(-7deg) scale(1.09); }
.lnav-links { display: flex; gap: 6px; margin-left: auto; z-index: 1; }
.lnav-links a {
  position: relative; padding: 7px 13px; border-radius: 8px;
  color: var(--text-muted); text-decoration: none;
  font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.lnav-links a:hover, .lnav-links a.on { color: var(--text); background: var(--glass-strong); text-decoration: none; }
.lnav-links a.on { color: var(--accent); }

.btn-glass {
  z-index: 1;
  background: var(--glass-strong); color: var(--text);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(12px);
  transition: transform .18s var(--ease), border-color .18s var(--ease), background .18s var(--ease);
}
.btn-glass:hover { transform: translateY(-1px); border-color: var(--glass-lit); background: rgba(255,255,255,.12); text-decoration: none; }

/* hero */
.hero { position: relative; z-index: 1; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url('/static/img/hero.jpg') center 35%/cover no-repeat; opacity: .5; }
.hero-scrim {
  position: absolute; inset: 0;
  background: linear-gradient(94deg, rgba(8,8,10,.94) 10%, rgba(8,8,10,.62) 55%, rgba(8,8,10,.3) 100%),
              linear-gradient(to bottom, rgba(8,8,10,.28), rgba(8,8,10,.97));
}
.hero-inner { position: relative; z-index: 1; max-width: 1180px; margin: 0 auto; padding: 104px 30px 120px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 15px; border-radius: 999px;
  background: var(--glass-strong); border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px);
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.9px; color: var(--accent-bright);
}
.hero-title { margin: 26px 0 20px; font-size: clamp(42px, 7vw, 84px); font-weight: 800; line-height: .99; letter-spacing: -2.4px; }
.hero-accent {
  background: linear-gradient(96deg, var(--accent), var(--accent-bright) 55%, #f6d9a4);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { max-width: 34rem; font-size: 1.04rem; line-height: 1.7; color: #b9b9c4; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.btn-lg { padding: 13px 26px; font-size: .96rem; }
.btn-outline { background: var(--glass); color: var(--text); border: 1px solid var(--glass-line); backdrop-filter: blur(12px); transition: transform .18s var(--ease), border-color .18s var(--ease); }
.btn-outline:hover { transform: translateY(-1px); border-color: var(--accent); color: var(--accent); text-decoration: none; }

/* live readout */
.readout { position: relative; z-index: 2; margin: 0 16px; border-radius: 14px; }
.readout-inner { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: repeat(5, 1fr); }
.ro {
  padding: 19px 24px; border-left: 1px solid var(--glass-line);
  display: flex; flex-direction: column; gap: 7px;
  transition: background .2s var(--ease);
}
.ro:first-child { border-left: none; }
.ro:hover { background: var(--glass); }
.ro-k { font-family: Consolas, "Cascadia Mono", monospace; font-size: 10px; font-weight: 700; letter-spacing: 1.7px; color: #74747f; }
.ro-v { font-family: Consolas, "Cascadia Mono", monospace; font-size: 27px; font-weight: 700; line-height: 1; }
.ro-v small { font-size: 15px; color: #74747f; font-weight: 400; }
.ro-v.is-live { color: var(--green); }
.ro-v.is-off { color: #74747f; }
.ro-code { color: var(--accent-bright); font-size: 22px; }
.dot-live { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.dot-idle { background: #74747f; }

/* generic page shell */
.page { position: relative; z-index: 1; max-width: 780px; margin: 0 auto; padding: 66px 26px 80px; }
.page-wide { max-width: 1120px; }
.page-head { margin-bottom: 34px; }
.eyebrow {
  font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 10.5px; font-weight: 700; letter-spacing: 2.2px;
  color: var(--accent-bright); text-transform: uppercase;
}
.page-head h1 { font-size: clamp(32px, 5vw, 50px); font-weight: 800; letter-spacing: -1.4px; margin: 10px 0 12px; }
.page-head p { color: var(--text-muted); max-width: 40rem; line-height: 1.65; }
.meta { font-family: Consolas, "Cascadia Mono", monospace; font-size: 11px; color: #74747f; }

/* anything that lifts under the cursor */
.tilt { transition: transform .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease); }
.tilt:hover {
  transform: translateY(-3px);
  border-color: var(--glass-lit);
  box-shadow: 0 0 0 1px rgba(255,255,255,.09), 0 16px 40px rgba(0,0,0,.65),
              inset 0 1px 0 rgba(255,255,255,.11);
}

.stack { display: flex; flex-direction: column; gap: 14px; }
.card-glass { border-radius: 16px; padding: 24px 26px; }
.card-glass-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.card-glass h2 { font-size: 1.16rem; font-weight: 700; }
.card-glass p { color: var(--text-muted); line-height: 1.62; }
.card-glass .meta { display: block; margin-top: 12px; }
.card-glass.is-closed { opacity: .55; }
.card-glass.empty, .card-glass.note { text-align: center; color: var(--text-muted); }
.card-glass.note { margin-top: 22px; font-size: .9rem; }

/* departments — click to expand */
.dept-grid { display: flex; flex-direction: column; gap: 12px; }
.dept-card { border-radius: 16px; overflow: hidden; }
.dept-card summary {
  display: flex; align-items: center; gap: 16px;
  padding: 20px 24px; cursor: pointer; list-style: none;
  transition: background .18s var(--ease);
}
.dept-card summary::-webkit-details-marker { display: none; }
.dept-card summary:hover { background: var(--glass); }
.dept-cs { font-family: Consolas, "Cascadia Mono", monospace; font-size: 11px; color: #74747f; min-width: 34px; }
.dept-badge { font-weight: 800; font-size: 1.1rem; letter-spacing: .4px; min-width: 108px; }
.dept-full { color: var(--text-muted); font-size: .92rem; }
.dept-live {
  margin-left: auto; font-family: Consolas, "Cascadia Mono", monospace;
  font-size: 11px; color: var(--accent-bright);
  padding: 5px 11px; border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}
.chev { color: #74747f; font-size: 20px; transition: transform .25s var(--ease); }
.dept-card[open] .chev { transform: rotate(90deg); }
.dept-body { padding: 4px 24px 24px; border-top: 1px solid var(--glass-line); }
.dept-body p { color: var(--text-muted); line-height: 1.65; margin: 16px 0; }
.rank-track { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; counter-reset: r; }
.rank-track li {
  counter-increment: r;
  padding: 7px 13px 7px 30px; border-radius: 999px; position: relative;
  background: var(--glass); border: 1px solid var(--glass-line); font-size: .86rem;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.rank-track li::before {
  content: counter(r); position: absolute; left: 11px;
  font-family: Consolas, monospace; font-size: 10px; color: var(--accent);
}
.rank-track li:hover { border-color: var(--accent-dim); transform: translateY(-2px); }

/* staff directory */
.rgroup { margin-bottom: 32px; }
.rgroup-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.rgroup-head h2 { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2.2px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 11px; }
.person {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 16px; border-radius: 13px;
}
.person-dot { width: 8px; height: 8px; border-radius: 50%; background: #4a4a53; flex-shrink: 0; }
.person.is-on .person-dot { background: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 22%, transparent); }
.person-name { font-weight: 700; font-size: .93rem; }
.person-role { margin-left: auto; font-size: .74rem; color: #74747f; }
.person.is-on .person-role { color: var(--green); }

/* strips on the landing page */
.strip { position: relative; z-index: 1; padding: 66px 0; }
.strip-inner { max-width: 1180px; margin: 0 auto; padding: 0 30px; }
.strip-head { display: flex; align-items: baseline; gap: 16px; margin-bottom: 24px; padding-bottom: 13px; border-bottom: 1px solid var(--glass-line); }
.section-title { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 2.3px; }
.section-note { font-family: Consolas, "Cascadia Mono", monospace; font-size: 11px; color: #74747f; margin-left: auto; }
.section-note.more { display: block; margin: 16px 0 0; text-align: center; }
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(212px, 1fr)); gap: 10px; }
.rp {
  padding: 13px 15px; border-radius: 12px;
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(18px);
  border-left: 2px solid #4a4a53;
  display: flex; flex-direction: column; gap: 3px;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.rp:hover { transform: translateY(-2px); border-color: var(--glass-lit); }
.rp-cs { font-family: Consolas, monospace; font-size: 10.5px; font-weight: 700; letter-spacing: 1px; color: var(--accent); }
.rp-name { font-weight: 700; font-size: .95rem; }
.rp-team { font-size: .78rem; color: #74747f; }
.rp-team b { color: var(--accent-bright); }
.rp-police { border-left-color: var(--blue); }
.rp-sheriff { border-left-color: var(--orange); }
.rp-fire { border-left-color: var(--red); }
.rp-dot { border-left-color: var(--accent); }
.rp-civilian { border-left-color: var(--chrome-dim); }
.rp-jail { border-left-color: #74747f; }
.empty-board { border: 1px dashed var(--glass-line); border-radius: 14px; padding: 42px 20px; text-align: center; color: #74747f; }
.depts { display: grid; grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); gap: 12px; }
.dept { border-radius: 13px; padding: 18px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px); border-top: 2px solid #4a4a53; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.dept:hover { transform: translateY(-3px); border-color: var(--glass-lit); }
.dept-name { display: block; font-weight: 800; font-size: 1.16rem; margin-top: 4px; }
.dept small { color: var(--text-muted); font-size: .82rem; }
.dept-count { display: block; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--glass-line); font-family: Consolas, monospace; font-size: 11px; color: #74747f; }
.dept-police { border-top-color: var(--blue); }
.dept-sheriff { border-top-color: var(--orange); }
.dept-chp { border-top-color: var(--accent); }
.dept-fire { border-top-color: var(--red); }
.dept-dot { border-top-color: var(--brand-bear); }
.dept-civ { border-top-color: var(--chrome-dim); }
.dept-jail { border-top-color: #74747f; }
.openings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); gap: 13px; }
.lcard { border-radius: 14px; padding: 22px; background: var(--glass); border: 1px solid var(--glass-line); backdrop-filter: blur(18px); }
.lcard h3 { font-size: 1.04rem; font-weight: 700; margin-bottom: 8px; }
.lcard p { color: var(--text-muted); line-height: 1.6; font-size: .92rem; }
.lcard-link { display: block; color: inherit; text-decoration: none; transition: transform .2s var(--ease), border-color .2s var(--ease); }
.lcard-link:hover { transform: translateY(-3px); border-color: var(--glass-lit); text-decoration: none; }
.lcard-link .pill { margin-top: 14px; display: inline-block; }

/* footer */
.lfoot {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 14px;
  max-width: 1180px; margin: 0 auto 40px; padding: 26px 30px;
  border-radius: 16px; color: #74747f; font-size: .88rem;
}
.lfoot img { border-radius: 7px; }
.lfoot div { display: flex; flex-direction: column; line-height: 1.35; }
.lfoot strong { color: var(--text); }
.lfoot a { margin-left: auto; color: var(--text-muted); }
.lfoot a:hover { color: var(--accent); }

@media (max-width: 860px) {
  .lnav-links { display: none; }
  .hero-inner { padding: 64px 22px 80px; }
  .readout-inner { grid-template-columns: repeat(2, 1fr); }
  .ro:nth-child(odd) { border-left: none; }
  .ro { border-top: 1px solid var(--glass-line); }
  .strip { padding: 44px 0; }
  .strip-inner, .lfoot, .page { padding-inline: 20px; }
  .dept-card summary { flex-wrap: wrap; gap: 8px; }
  .dept-badge { min-width: 0; }
}
/* the aurora is decoration, so honour prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  .aurora span { animation: none; }
  .hero-inner > *, .page-head, .strip-inner > * { animation: none; }
  .tilt, .rp, .dept, .lcard-link, .btn-glass, .btn-outline { transition: none; }
  .tilt:hover, .rp:hover, .dept:hover, .lcard-link:hover { transform: none; }
}

/* Signed-in panel, on the same glass */
body:not(.landing-body) { background: #08080a; }
.shell { position: relative; z-index: 1; }

.sidebar.glass {
  background: rgba(255,255,255,.035);
  border-right: 1px solid var(--glass-line);
  border-top: none; border-left: none; border-bottom: none;
  border-radius: 0;
}
.topbar.glass {
  background: rgba(255,255,255,.03);
  border-bottom: 1px solid var(--glass-line);
  border-top: none; border-left: none; border-right: none;
  border-radius: 0;
}

.sidebar nav a {
  border-radius: 9px;
  margin: 1px 8px;
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.sidebar nav a:hover { background: var(--glass-strong); transform: translateX(2px); }
.sidebar nav a.active {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

/* cards become glass, and answer the cursor */
.card, .stat-card {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(24px) saturate(160%);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  box-shadow: 0 10px 30px rgba(0,0,0,.34), inset 0 1px 0 rgba(255,255,255,.06);
  border-radius: 16px;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.stat-card:hover, .card:hover {
  transform: translateY(-2px);
  border-color: var(--glass-lit);
  box-shadow: 0 16px 40px rgba(0,0,0,.44), inset 0 1px 0 rgba(255,255,255,.1);
}

/* tables sit inside the glass rather than fighting it */
thead th { border-bottom: 1px solid var(--glass-line); }
tbody tr { border-bottom: 1px solid rgba(255,255,255,.05); }
tbody tr:hover { background: var(--glass-strong); }

.input, input[type="text"], input[type="search"], select.input, textarea {
  background: rgba(0,0,0,.28);
  border: 1px solid var(--glass-line);
  border-radius: 10px;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.input:focus, input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-dim);
  background: rgba(0,0,0,.4);
}

.btn { border-radius: 10px; transition: transform .16s var(--ease), filter .16s var(--ease); }
.btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.btn-ghost { background: var(--glass-strong); border: 1px solid var(--glass-line); }

.user-chip { padding: 5px 10px 5px 5px; border-radius: 999px; background: var(--glass); border: 1px solid var(--glass-line); }
.badge { backdrop-filter: blur(8px); }

/* the hub cards on My Info */
.status-card, .identity, .opening {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(24px) saturate(160%);
  border-radius: 16px;
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.status-card:hover, .identity:hover, .opening:hover { transform: translateY(-2px); border-color: var(--glass-lit); }
