* { box-sizing: border-box; }

html { min-height: 100%; background: var(--page-bg); }

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--text);
  font: 14px/1.5 var(--font-sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Protected entry */
.monitor-auth-pending .workspace,
.monitor-auth-loading .workspace,
.monitor-auth-error .workspace {
  visibility: hidden;
}

.auth-gate {
  position: fixed;
  z-index: 1000;
  inset: 0;
  display: grid;
  min-height: 100dvh;
  place-items: center;
  overflow: auto;
  padding: 34px;
  background:
    radial-gradient(circle at 13% 10%, rgba(79, 70, 229, 0.2), transparent 31%),
    radial-gradient(circle at 88% 91%, rgba(20, 184, 166, 0.13), transparent 32%),
    #0b1120;
}

.auth-gate::before {
  position: fixed;
  inset: 0;
  opacity: 0.22;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  content: "";
  pointer-events: none;
}

.monitor-authorized .auth-gate,
.monitor-preview .auth-gate { display: none; }

.auth-gate-card {
  position: relative;
  display: grid;
  width: min(1050px, 100%);
  min-height: 660px;
  grid-template-columns: minmax(0, 1.08fr) minmax(410px, .92fr);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 30px;
  background: #101827;
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.42), 0 1px 0 rgba(255,255,255,.08) inset;
  animation: gate-in 360ms var(--ease-emphasized) both;
}

@keyframes gate-in { from { opacity: 0; transform: translateY(12px) scale(0.99); } to { opacity: 1; transform: translateY(0) scale(1); } }

.auth-gate-card::before {
  position: absolute;
  z-index: 4;
  top: 0;
  right: 0;
  left: 0;
  height: 4px;
  background: linear-gradient(90deg, #6366f1, #60a5fa 52%, #2dd4bf);
  content: "";
}

.auth-showcase {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  padding: 48px 52px 42px;
  background:
    radial-gradient(circle at 76% 17%, rgba(96, 165, 250, .26), transparent 24%),
    radial-gradient(circle at 18% 82%, rgba(45, 212, 191, .15), transparent 29%),
    linear-gradient(145deg, #101a31 0%, #172854 54%, #1c3f94 100%);
  color: #fff;
}
.auth-showcase::after { position: absolute; right: -110px; bottom: -125px; width: 340px; height: 340px; border: 1px solid rgba(255,255,255,.13); border-radius: 50%; box-shadow: 0 0 0 42px rgba(255,255,255,.025), 0 0 0 92px rgba(255,255,255,.018); content: ""; }
.auth-showcase-glow { position: absolute; top: 27%; left: 52%; width: 220px; height: 220px; border-radius: 50%; background: rgba(99, 102, 241, .22); filter: blur(64px); pointer-events: none; }
.auth-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; }
.auth-brand > div { display: flex; flex-direction: column; }
.auth-brand strong { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: -0.035em; }
.auth-brand > div span { margin-top: 1px; color: rgba(226, 232, 240, .68); font-size: 11px; font-weight: 650; }
.auth-brand .brand-symbol,
.auth-mobile-brand .brand-symbol { width: 48px; height: 48px; border-color: rgba(255,255,255,.18); border-radius: 15px; background: rgba(255,255,255,.09); box-shadow: 0 10px 25px rgba(0,0,0,.18); }
.auth-brand .brand-symbol img,
.auth-mobile-brand .brand-symbol img { width: 35px; height: 35px; }
.auth-showcase-copy { position: relative; z-index: 1; max-width: 465px; margin-top: auto; }
.auth-showcase-kicker { display: inline-flex; align-items: center; gap: 8px; color: #bfdbfe; font-size: 10px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.auth-showcase-kicker i { width: 7px; height: 7px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 5px rgba(52, 211, 153, .12); }
.auth-showcase-copy h2 { margin: 18px 0 0; font-size: clamp(37px, 4vw, 52px); font-weight: 760; letter-spacing: -.055em; line-height: 1.04; }
.auth-showcase-copy h2 em { color: #93c5fd; font-style: normal; }
.auth-showcase-copy p { max-width: 440px; margin: 20px 0 0; color: rgba(226,232,240,.72); font-size: 14px; line-height: 1.75; }
.auth-capabilities { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.auth-capabilities span { display: inline-flex; min-height: 35px; align-items: center; gap: 8px; padding: 0 11px; border: 1px solid rgba(255,255,255,.12); border-radius: 999px; background: rgba(15,23,42,.24); color: rgba(241,245,249,.82); font-size: 9px; font-weight: 700; backdrop-filter: blur(8px); }
.auth-capabilities i { color: #93c5fd; }
.auth-showcase-footer { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: auto; padding-top: 36px; color: rgba(226,232,240,.55); font-size: 9px; }
.auth-showcase-footer span { display: inline-flex; align-items: center; gap: 7px; }
.auth-showcase-footer span i { width: 6px; height: 6px; border-radius: 50%; background: #34d399; }
.auth-showcase-footer strong { color: rgba(241,245,249,.76); font-weight: 700; }

.auth-panel {
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef2f6;
  --text-strong: #111827;
  --text-soft: #667085;
  --muted: #7b8798;
  --muted-light: #a0aabc;
  --border: #e6eaf0;
  --border-strong: #d9dee8;
  --primary: #4f46e5;
  --primary-strong: #4338ca;
  --primary-soft: #eef2ff;
  --focus: rgba(79, 70, 229, 0.28);
  --success: #12b76a;
  --success-strong: #067647;
  --danger: #ef4444;
  --danger-soft: #fff1f1;
  display: flex;
  min-width: 0;
  flex-direction: column;
  background: var(--surface);
}
.auth-panel-top { display: flex; min-height: 78px; align-items: center; justify-content: flex-end; padding: 23px 34px 0; }
.auth-secure-chip { display: inline-flex; min-height: 30px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: 9px; font-weight: 750; }
.auth-secure-chip i { color: var(--success); }
.auth-panel-body { display: flex; width: min(380px, calc(100% - 68px)); flex: 1; align-self: center; flex-direction: column; justify-content: center; padding: 18px 0 42px; }
.auth-mobile-brand { display: none; align-items: center; gap: 11px; }
.auth-mobile-brand > div { display: flex; flex-direction: column; }
.auth-mobile-brand strong { color: var(--text-strong); font-size: 17px; font-weight: 800; }
.auth-mobile-brand span { color: var(--muted); font-size: 10px; }
.auth-mobile-brand .brand-symbol { border-color: var(--border); background: var(--surface-soft); box-shadow: none; }
.auth-status-icon { display: grid; width: 46px; height: 46px; place-items: center; border: 1px solid color-mix(in srgb, var(--primary) 18%, var(--border)); border-radius: 14px; background: var(--primary-soft); color: var(--primary-strong); font-size: 17px; }
.monitor-auth-error .auth-status-icon { background: var(--danger-soft); color: var(--danger); }
.auth-copy { margin-top: 20px; }
.auth-copy .section-overline { color: var(--primary-strong); }
.auth-copy h1 { margin: 7px 0 0; color: var(--text-strong); font-size: clamp(29px, 3vw, 36px); font-weight: 770; letter-spacing: -0.055em; line-height: 1.12; }
.auth-copy p { margin: 11px 0 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.auth-form { display: grid; gap: 17px; margin-top: 29px; }
.auth-field { display: grid; gap: 8px; }
.auth-field > label { color: var(--text-soft); font-size: 10px; font-weight: 750; }
.auth-input { display: grid; height: 50px; grid-template-columns: 19px minmax(0, 1fr); align-items: center; gap: 9px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 12px; background: var(--surface-soft); color: var(--muted); transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease; }
.auth-input-password { grid-template-columns: 19px minmax(0, 1fr) 36px; padding-right: 7px; }
.auth-input:focus-within { border-color: var(--primary); background: var(--surface); box-shadow: 0 0 0 3px var(--focus); }
.auth-input > i { color: var(--muted-light); transition: color 150ms ease; }
.auth-input:focus-within > i { color: var(--primary); }
.auth-input input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-strong); font-size: 13px; }
.auth-input input::placeholder { color: var(--muted-light); }
.auth-password-toggle { display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); transition: background 150ms ease, color 150ms ease; }
.auth-password-toggle:hover { background: var(--surface-muted); color: var(--text-strong); }
.auth-password-toggle[aria-pressed="true"] { color: var(--primary-strong); }
.auth-form-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: -3px; color: var(--muted); font-size: 8px; }
.auth-form-meta span { display: inline-flex; align-items: center; gap: 6px; color: var(--success-strong); font-weight: 700; }
.auth-submit { width: 100%; min-height: 50px; justify-content: space-between; margin-top: 1px; padding-inline: 18px; box-shadow: 0 12px 28px color-mix(in srgb, var(--primary) 28%, transparent); }
.auth-submit i { transition: transform 160ms ease; }
.auth-submit:hover i { transform: translateX(3px); }
.auth-submit:disabled { cursor: wait; opacity: 0.7; }
.auth-recovery-actions { display: grid; gap: 8px; }
.auth-retry { width: 100%; justify-content: center; margin-top: 24px; }
.auth-signout { margin: 4px auto 0; }
.auth-panel-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 34px 24px; color: var(--muted-light); font-size: 8px; }
.monitor-auth-loading .auth-panel-body,
.monitor-auth-error .auth-panel-body { justify-content: center; }
.monitor-auth-loading .auth-copy,
.monitor-auth-error .auth-copy { max-width: 360px; }
.auth-gate [hidden] { display: none !important; }

button,
input,
select { font: inherit; }

button,
select { cursor: pointer; }

button { color: inherit; }

.primary-button,
.secondary-button,
.text-button { border: 0; }

.primary-button {
  display: inline-flex;
  min-height: 45px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: 11px;
  background: var(--primary);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--primary) 22%, transparent);
  transition: filter 150ms ease, transform 150ms ease;
}

.primary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.text-button { padding: 5px 8px; background: transparent; color: var(--muted); font-size: 11px; font-weight: 700; }
.text-button:hover { color: var(--text-strong); }

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 12px;
  left: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  transform: translateY(-160%);
}

.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Application shell */
.workspace {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 272px minmax(0, 1fr);
}
.monitor-authorized .workspace { animation: workspace-in 220ms var(--ease-standard) both; }
@keyframes workspace-in { from { opacity: 0; } to { opacity: 1; } }

.workspace-main { min-width: 0; }

.sidebar {
  position: sticky;
  z-index: 90;
  top: 0;
  display: flex;
  width: 272px;
  height: 100vh;
  flex-direction: column;
  padding: 18px 16px;
  border-right: 1px solid var(--border);
  background: var(--sidebar-bg);
}

.sidebar-header {
  display: flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 7px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
}

.brand-symbol {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 2px 8px rgba(16, 24, 40, 0.05);
}

.brand-symbol img { width: 29px; height: 29px; object-fit: contain; }
.brand-name { display: flex; flex-direction: column; }
.brand-name strong { color: var(--text-strong); font-size: 15px; font-weight: 800; letter-spacing: -0.025em; }
.brand-name small { color: var(--muted); font-size: 9px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

.demo-tag {
  padding: 4px 7px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-nav {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 5px;
  padding-top: 28px;
}

.nav-label {
  padding: 0 12px 7px;
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.nav-label-secondary { margin-top: 17px; }

.nav-item {
  position: relative;
  display: grid;
  min-height: 54px;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.nav-item:hover {
  border-color: var(--border);
  background: var(--surface-hover);
  color: var(--text-strong);
  transform: translateX(2px);
}

.nav-item.is-active {
  border-color: color-mix(in srgb, var(--primary) 18%, var(--border));
  background: var(--primary-soft);
  color: var(--primary-strong);
}

.nav-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 10px;
  color: var(--muted);
  font-size: 14px;
}

.nav-item.is-active .nav-icon { background: var(--surface); color: var(--primary); box-shadow: 0 2px 8px color-mix(in srgb, var(--primary) 10%, transparent); }
.nav-copy { display: flex; min-width: 0; flex-direction: column; }
.nav-copy strong { overflow: hidden; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.nav-copy small { overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.nav-count {
  display: grid;
  min-width: 22px;
  height: 22px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
}

.sidebar-footer { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; }

.observer-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px;
  border: 1px solid color-mix(in srgb, var(--success) 20%, var(--border));
  border-radius: 12px;
  background: var(--success-soft);
}

.observer-note > span { display: grid; width: 30px; height: 30px; flex: 0 0 30px; place-items: center; border-radius: 9px; background: var(--surface); color: var(--success-strong); }
.observer-note > div { display: flex; min-width: 0; flex-direction: column; }
.observer-note strong { color: var(--success-strong); font-size: 10px; }
.observer-note small { margin-top: 1px; color: var(--muted); font-size: 8px; }

.wallboard-button {
  display: grid;
  min-height: 42px;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  text-align: left;
}

.wallboard-button:hover { border-color: var(--border-strong); color: var(--text-strong); }
.wallboard-button > i:last-child { color: var(--muted-light); font-size: 9px; }

.operator-card {
  display: grid;
  min-height: 55px;
  grid-template-columns: 36px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  text-align: left;
}

.operator-avatar { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 50%; background: linear-gradient(145deg, #667085, #101828); color: #fff; font-size: 9px; font-weight: 800; }
.operator-copy { display: flex; min-width: 0; flex-direction: column; }
.operator-copy strong { color: var(--text-strong); font-size: 10px; }
.operator-copy small { color: var(--muted); font-size: 8px; }
.operator-lock { color: var(--muted-light); font-size: 10px; }

.sidebar-backdrop,
.drawer-backdrop { position: fixed; z-index: 80; inset: 0; display: none; border: 0; background: rgba(15, 23, 42, 0.45); backdrop-filter: blur(3px); }

/* Top command bar */
.commandbar {
  position: sticky;
  z-index: 70;
  top: 0;
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 12px 30px;
  border-bottom: 1px solid var(--border);
  background: var(--topbar-bg);
  backdrop-filter: blur(18px);
}

.commandbar-context { display: flex; min-width: 250px; align-items: center; gap: 11px; }
.command-breadcrumb { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 600; }
.command-breadcrumb i { color: var(--muted-light); font-size: 7px; }
.command-breadcrumb strong { color: var(--text-strong); font-weight: 700; }
.commandbar-context p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }

.commandbar-tools { display: flex; min-width: 0; align-items: center; justify-content: flex-end; gap: 8px; }
.command-search,
.command-date,
.command-select {
  display: flex;
  height: 40px;
  align-items: center;
  gap: 8px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.command-search-wrap,
.date-filter-wrap { position: relative; }
.command-search-wrap { width: min(400px, 30vw); }
.command-search { width: 100%; }
.command-search:focus-within,
.command-date:focus-visible,
.command-select:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.command-search input,
.command-select select { min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text-strong); font-size: 11px; }
.command-search input { width: 100%; }
.command-search input::placeholder { color: var(--muted-light); }
.command-search kbd { padding: 2px 5px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-soft); color: var(--muted); font-size: 8px; white-space: nowrap; }
.search-clear { display: grid; width: 24px; height: 24px; flex: 0 0 24px; place-items: center; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.search-clear:hover { background: var(--surface-hover); color: var(--text-strong); }
.mobile-search-toggle { display: none; }
.global-search-results { position: absolute; z-index: 140; top: calc(100% + 8px); right: 0; width: min(520px, calc(100vw - 32px)); max-height: min(560px, calc(100vh - 100px)); overflow: auto; padding: 7px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); box-shadow: var(--shadow-float); }
.global-search-results[hidden] { display: none; }
.search-result-summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 9px 10px; color: var(--muted); font-size: 10px; }
.search-result-summary strong { color: var(--text-strong); font-size: 11px; }
.search-result-group + .search-result-group { margin-top: 5px; padding-top: 5px; border-top: 1px solid var(--border); }
.search-result-group > span { display: block; padding: 7px 9px 4px; color: var(--muted-light); font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.search-result { display: grid; width: 100%; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 9px; border: 0; border-radius: 9px; background: transparent; color: inherit; text-align: left; }
.search-result:hover,
.search-result:focus-visible { background: var(--surface-hover); }
.search-result > i { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 8px; background: var(--primary-soft); color: var(--primary-strong); font-size: 11px; }
.search-result-copy { min-width: 0; }
.search-result-copy strong,
.search-result-copy small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-result-copy strong { color: var(--text-strong); font-size: 11px; }
.search-result-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.search-result-place { max-width: 105px; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.search-result-empty { padding: 24px 14px; color: var(--muted); font-size: 11px; line-height: 1.6; text-align: center; }
.command-date { min-width: 132px; justify-content: space-between; border: 1px solid var(--border); font-size: 10px; font-weight: 700; }
.command-date > i:first-child { color: var(--primary); }
.command-date > i:last-child { color: var(--muted-light); font-size: 8px; }
.date-filter-popover { position: absolute; z-index: 145; top: calc(100% + 8px); right: 0; width: min(390px, calc(100vw - 24px)); padding: 17px; border: 1px solid var(--border); border-radius: 15px; background: var(--surface); box-shadow: var(--shadow-float); }
.date-filter-popover[hidden] { display: none; }
.date-filter-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.date-filter-head strong { display: block; margin-top: 3px; color: var(--text-strong); font-size: 14px; }
.date-presets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-top: 15px; }
.date-presets button { min-height: 33px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 10px; font-weight: 750; }
.date-presets button:hover,
.date-presets button.is-active { border-color: color-mix(in srgb, var(--primary) 35%, var(--border)); background: var(--primary-soft); color: var(--primary-strong); }
.date-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; margin-top: 13px; }
.date-fields label > span { display: block; margin-bottom: 5px; color: var(--muted); font-size: 9px; font-weight: 700; }
.date-fields input { width: 100%; height: 38px; padding: 0 9px; border: 1px solid var(--border); border-radius: 9px; outline: 0; background: var(--surface); color: var(--text-strong); font: inherit; font-size: 10px; color-scheme: light; }
body.theme-dark .date-fields input { color-scheme: dark; }
.date-fields input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--focus); }
.date-filter-popover > p { display: flex; gap: 7px; margin: 13px 0 0; padding: 10px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 9px; line-height: 1.5; }
.date-filter-popover > p i { margin-top: 2px; color: var(--info); }
.date-filter-actions { display: flex; align-items: center; justify-content: space-between; gap: 9px; margin-top: 14px; }
.date-filter-actions .primary-button { min-height: 38px; padding-inline: 14px; }
.command-select select { max-width: 145px; font-weight: 650; }
.tool-divider { width: 1px; height: 25px; margin: 0 2px; background: var(--border); }

.control-button {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease, transform 150ms ease;
}

.control-button:hover { border-color: var(--border-strong); background: var(--surface-hover); color: var(--text-strong); transform: translateY(-1px); }
.control-button[aria-pressed="true"] { border-color: color-mix(in srgb, var(--primary) 25%, var(--border)); background: var(--primary-soft); color: var(--primary-strong); }
.alert-control > span { position: absolute; top: -5px; right: -5px; display: grid; min-width: 18px; height: 18px; place-items: center; padding: 0 4px; border: 2px solid var(--surface); border-radius: 999px; background: var(--danger); color: #fff; font-size: 7px; font-weight: 800; }
.mobile-menu { display: none; }

/* Main content */
.main-content { width: 100%; max-width: 1760px; margin: 0 auto; padding: 30px 30px 48px; }
.page-section { display: none; animation: section-in 220ms var(--ease-standard) both; }
.page-section.is-active { display: block; }
@keyframes section-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

.page-intro,
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 22px; }
.page-intro h1,
.section-heading h1 { margin: 5px 0 0; color: var(--text-strong); font-size: clamp(27px, 2.2vw, 34px); font-weight: 750; letter-spacing: -0.045em; line-height: 1.15; }
.page-intro p,
.section-heading p { margin: 7px 0 0; color: var(--text-soft); font-size: 12px; }
.intro-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 9px; font-weight: 650; }
.live-chip,
.updated-chip,
.readonly-chip,
.subtle-pill,
.warning-pill,
.number-pill { display: inline-flex; align-items: center; gap: 7px; border-radius: 999px; font-size: 9px; font-weight: 700; white-space: nowrap; }
.live-chip { padding: 4px 8px; background: var(--success-soft); color: var(--success-strong); }
.live-chip[data-status="syncing"] { background: var(--primary-soft); color: var(--primary-strong); }
.live-chip[data-status="partial"] { background: var(--warning-soft); color: var(--warning-strong); }
.live-chip[data-status="error"] { background: var(--danger-soft); color: var(--danger-strong); }
.live-chip[data-status="syncing"] i { animation: status-pulse 1.15s ease-in-out infinite; }
@keyframes status-pulse { 0%, 100% { opacity: 0.45; transform: scale(0.75); } 50% { opacity: 1; transform: scale(1); } }
.live-chip i,
.stream-live i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.intro-actions,
.section-actions { display: flex; align-items: center; gap: 8px; }
.updated-chip,
.readonly-chip { min-height: 36px; padding: 0 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text-soft); }
.readonly-chip { color: var(--success-strong); }
.section-overline { display: block; margin-bottom: 4px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: 0.095em; text-transform: uppercase; }

/* Situation and priority */
.command-overview-grid { display: grid; grid-template-columns: minmax(0, 1.48fr) minmax(380px, 0.92fr); gap: 18px; margin-bottom: 18px; }
.situation-card {
  position: relative;
  min-height: 302px;
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: radial-gradient(circle at 86% 18%, rgba(129, 140, 248, 0.36), transparent 30%), linear-gradient(135deg, #161a2a 0%, #202846 58%, #242d55 100%);
  box-shadow: 0 18px 40px rgba(31, 37, 66, 0.2);
  color: #fff;
}

.situation-card::after { position: absolute; right: -70px; bottom: -110px; width: 260px; height: 260px; border: 1px solid rgba(255, 255, 255, 0.08); border-radius: 50%; content: ""; }
.situation-card-head { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.situation-label { display: inline-flex; align-items: center; gap: 8px; color: rgba(255, 255, 255, 0.88); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; }
.situation-scope { padding: 5px 9px; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 999px; background: rgba(255, 255, 255, 0.07); color: rgba(255, 255, 255, 0.7); font-size: 9px; font-weight: 650; }
.situation-main { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 25px; }
.situation-score { display: flex; align-items: center; gap: 20px; }
.score-orbit { position: relative; display: grid; width: 86px; height: 86px; flex: 0 0 86px; place-items: center; border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 50%; background: rgba(255, 255, 255, 0.07); }
.score-orbit::before { position: absolute; inset: 9px; border: 1px dashed rgba(255, 255, 255, 0.17); border-radius: 50%; content: ""; }
.score-orbit strong { position: relative; font-size: 38px; font-weight: 750; letter-spacing: -0.06em; }
.situation-score > div > span { color: #fca5a5; font-size: 9px; font-weight: 750; letter-spacing: 0.06em; text-transform: uppercase; }
.situation-score h2 { margin: 5px 0 0; font-size: clamp(22px, 2vw, 29px); font-weight: 720; letter-spacing: -0.04em; line-height: 1.15; }
.situation-score p { max-width: 440px; margin: 8px 0 0; color: rgba(255, 255, 255, 0.6); font-size: 10px; }
.situation-link { display: inline-flex; min-height: 38px; flex: 0 0 auto; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid rgba(255, 255, 255, 0.16); border-radius: 10px; background: rgba(255, 255, 255, 0.08); color: #fff; font-size: 9px; font-weight: 700; }
.situation-link:hover { background: rgba(255, 255, 255, 0.13); }
.situation-facts { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin-top: 24px; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 13px; background: rgba(255, 255, 255, 0.1); }
.situation-facts > div { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 3px 10px; padding: 11px 13px; background: rgba(13, 17, 32, 0.5); }
.situation-facts span { color: rgba(255, 255, 255, 0.5); font-size: 8px; }
.situation-facts strong { grid-row: 1 / 3; grid-column: 2; font-size: 19px; letter-spacing: -0.04em; }
.situation-facts small { color: rgba(255, 255, 255, 0.75); font-size: 8px; }

.priority-card,
.surface,
.metric-strip,
.neighborhood-page-card,
.stat-tile { border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-card); }
.priority-card { display: flex; min-width: 0; min-height: 302px; flex-direction: column; overflow: hidden; border-radius: var(--radius-xl); }
.priority-head,
.surface-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.priority-head { padding: 19px 20px 15px; border-bottom: 1px solid var(--border); }
.priority-head h2,
.surface-header h2,
.alert-summary-card h2,
.document-card h2 { margin: 0; color: var(--text-strong); font-size: 16px; font-weight: 720; letter-spacing: -0.025em; }
.ghost-action { display: inline-flex; align-items: center; gap: 7px; padding: 5px 2px; border: 0; background: transparent; color: var(--primary-strong); font-size: 9px; font-weight: 750; white-space: nowrap; }
.ghost-action:hover { color: var(--primary); }
.priority-list { flex: 1; }
.priority-item { display: grid; width: 100%; min-height: 83px; grid-template-columns: 29px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 12px 20px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; transition: background 150ms ease; }
.priority-item:hover { background: var(--surface-hover); }
.priority-rank { color: var(--muted-light); font-size: 9px; font-weight: 800; }
.priority-copy { display: flex; min-width: 0; flex-direction: column; align-items: flex-start; }
.critical-badge { padding: 2px 6px; border-radius: 5px; background: var(--danger-soft); color: var(--danger-strong); font-size: 7px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.priority-copy strong { width: 100%; overflow: hidden; margin-top: 5px; color: var(--text-strong); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.priority-copy small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.priority-time { display: flex; align-items: flex-end; flex-direction: column; }
.priority-time strong { color: var(--danger-strong); font-size: 12px; }
.priority-time small { color: var(--muted); font-size: 7px; }
.priority-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 20px; background: var(--surface-soft); color: var(--muted); font-size: 7px; font-weight: 650; }
.priority-foot span { display: inline-flex; align-items: center; gap: 5px; }

/* Connected metrics */
.metric-strip { overflow: hidden; margin-bottom: 18px; border-radius: var(--radius-lg); }
.metric-strip-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-item { display: grid; min-width: 0; min-height: 104px; grid-template-columns: 38px minmax(0, 1fr) auto 12px; align-items: center; gap: 10px; padding: 16px 18px; border: 0; border-right: 1px solid var(--border); background: transparent; text-align: left; transition: background 150ms ease; }
.metric-item:last-child { border-right: 0; }
.metric-item:hover { background: var(--surface-hover); }
.metric-skeleton { cursor: default; pointer-events: none; }
.skeleton-block,
.skeleton-copy i,
.skeleton-context i { display: block; border-radius: 7px; background: linear-gradient(100deg, var(--surface-muted) 20%, var(--surface-hover) 42%, var(--surface-muted) 64%); background-size: 220% 100%; animation: skeleton-shimmer 1.35s ease-in-out infinite; }
.skeleton-icon { width: 38px; height: 38px; border-radius: 11px; }
.skeleton-copy,
.skeleton-context { display: grid; gap: 7px; }
.skeleton-copy i:first-child { width: 92px; height: 9px; }
.skeleton-copy i:last-child { width: 54px; height: 23px; }
.skeleton-context { justify-items: end; }
.skeleton-context i:first-child { width: 44px; height: 8px; }
.skeleton-context i:last-child { width: 68px; height: 7px; }
@keyframes skeleton-shimmer { from { background-position: 110% 0; } to { background-position: -110% 0; } }
.metric-icon { display: grid; width: 38px; height: 38px; place-items: center; border-radius: 11px; background: var(--metric-soft); color: var(--metric-color); font-size: 14px; }
.metric-copy { display: flex; min-width: 0; flex-direction: column; }
.metric-copy > span { overflow: hidden; color: var(--muted); font-size: 9px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.metric-copy > strong { margin-top: 2px; color: var(--text-strong); font-size: 23px; font-weight: 740; letter-spacing: -0.05em; }
.metric-context { display: flex; align-items: flex-end; flex-direction: column; }
.metric-context strong { color: var(--success-strong); font-size: 8px; }
.metric-context strong.is-alert { color: var(--danger-strong); }
.metric-context small { margin-top: 3px; color: var(--muted-light); font-size: 7px; white-space: nowrap; }
.metric-arrow { color: var(--muted-light); font-size: 8px; }

/* Core surfaces */
.operations-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(370px, 0.7fr); gap: 18px; margin-bottom: 18px; }
.surface { min-width: 0; overflow: hidden; border-radius: var(--radius-lg); }
.surface-header { padding: 19px 20px 15px; border-bottom: 1px solid var(--border); }
.surface-header.compact { align-items: center; }
.surface-header p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.network-table-head { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(145px, 0.8fr) 125px 14px; gap: 14px; padding: 9px 18px; border-bottom: 1px solid var(--border); background: var(--surface-soft); color: var(--muted-light); font-size: 7px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.network-list { display: flex; flex-direction: column; }
.network-row { display: grid; min-height: 63px; grid-template-columns: minmax(180px, 1fr) minmax(145px, 0.8fr) 125px 14px; align-items: center; gap: 14px; padding: 9px 18px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; transition: background 150ms ease; }
.network-row:last-child { border-bottom: 0; }
.network-row:hover { background: var(--surface-hover); }
.network-identity { display: flex; min-width: 0; align-items: center; gap: 10px; }
.network-identity > i { width: 8px; height: 8px; flex: 0 0 8px; border-radius: 50%; background: var(--status-color); box-shadow: 0 0 0 4px color-mix(in srgb, var(--status-color) 10%, transparent); }
.network-identity > span { display: flex; min-width: 0; flex-direction: column; }
.network-identity strong { overflow: hidden; color: var(--text-strong); font-size: 10px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.network-identity small { margin-top: 2px; color: var(--muted); font-size: 8px; }
.network-occupancy { display: flex; align-items: center; gap: 10px; }
.network-occupancy > span:first-child { display: flex; min-width: 55px; flex-direction: column; }
.network-occupancy strong { color: var(--text-strong); font-size: 13px; }
.network-occupancy small { color: var(--muted); font-size: 7px; }
.occupancy-track { display: block; width: 100%; height: 5px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.occupancy-track i { display: block; width: var(--occupancy); height: 100%; border-radius: inherit; background: var(--primary); }
.network-state { display: flex; align-items: flex-end; flex-direction: column; }
.network-status { display: inline-flex; align-items: center; padding: 3px 7px; border-radius: 999px; background: color-mix(in srgb, var(--status-color) 11%, transparent); color: var(--status-color); font-size: 7px; font-weight: 800; white-space: nowrap; }
.network-state small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.network-arrow { color: var(--muted-light); font-size: 8px; }

.stream-live { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 0; border-radius: 999px; background: var(--success-soft); color: var(--success-strong); font-size: 8px; font-weight: 750; }
.activity-stream { position: relative; display: flex; flex-direction: column; padding: 4px 18px 3px; }
.timeline-event { position: relative; display: grid; min-height: 58px; grid-template-columns: 34px 20px minmax(0, 1fr) minmax(96px, auto); align-items: center; gap: 8px; padding: 7px 0; border: 0; background: transparent; text-align: left; }
.timeline-event time { color: var(--muted); font-size: 8px; font-variant-numeric: tabular-nums; }
.timeline-rail { position: relative; display: grid; height: 100%; place-items: center; }
.timeline-rail::after { position: absolute; z-index: 0; top: 50%; bottom: -50%; left: 50%; width: 1px; background: var(--border); content: ""; }
.timeline-event:last-child .timeline-rail::after { display: none; }
.timeline-rail > i { position: relative; z-index: 1; width: 8px; height: 8px; border: 2px solid var(--surface); border-radius: 50%; background: var(--info); box-shadow: 0 0 0 2px var(--info-soft); }
.timeline-rail > i.exit { background: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 12%, transparent); }
.timeline-rail > i.worker { background: var(--warning); box-shadow: 0 0 0 2px var(--warning-soft); }
.timeline-rail > i.event { background: var(--purple); box-shadow: 0 0 0 2px color-mix(in srgb, var(--purple) 12%, transparent); }
.timeline-rail > i.contact { background: var(--teal); box-shadow: 0 0 0 2px color-mix(in srgb, var(--teal) 12%, transparent); }
.timeline-copy,
.timeline-place { display: flex; min-width: 0; flex-direction: column; }
.timeline-copy strong,
.timeline-place strong { overflow: hidden; color: var(--text-strong); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.timeline-copy small,
.timeline-place small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-place { align-items: flex-end; }
.surface-footer-action { width: 100%; min-height: 39px; border: 0; border-top: 1px solid var(--border); background: var(--surface-soft); color: var(--primary-strong); font-size: 8px; font-weight: 750; }
.surface-footer-action i { margin-left: 6px; }

/* Traffic and charts */
.traffic-surface { margin-bottom: 18px; }
.traffic-header { align-items: center; }
.segmented-control { display: inline-flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--surface-muted); }
.segmented-control button { min-height: 31px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 700; }
.segmented-control button.is-active { background: var(--surface); color: var(--text-strong); box-shadow: 0 1px 4px rgba(16, 24, 40, 0.09); }
.traffic-summary { display: flex; align-items: center; gap: 26px; padding: 14px 20px 0; }
.traffic-summary > div { display: grid; grid-template-columns: auto auto; align-items: center; gap: 0 7px; }
.traffic-summary span { color: var(--muted); font-size: 8px; }
.traffic-summary strong { grid-row: 2; grid-column: 2; color: var(--text-strong); font-size: 16px; letter-spacing: -0.03em; }
.traffic-summary small { grid-row: 2; grid-column: 3; color: var(--success-strong); font-size: 7px; }
.traffic-summary .traffic-net { margin-left: auto; grid-template-columns: auto; align-items: end; text-align: right; }
.traffic-net strong { grid-row: auto; grid-column: auto; }
.traffic-net small { grid-row: auto; grid-column: auto; color: var(--muted); }
.legend-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.legend-blue { background: var(--info); }
.legend-teal { background: var(--teal); }
.legend-amber { background: var(--warning); }
.legend-red { background: var(--danger); }
.legend-gray { background: var(--gray-status); }
.chart { width: 100%; }
.chart-traffic { height: 315px; }
.chart-presence { height: 300px; }
.chart-severity { height: 180px; }
.chart-docs { height: 270px; }
.chart-analytics { height: 340px; }
.chart-unavailable { display: grid; place-items: center; padding: 24px; color: var(--muted); font-size: 10px; text-align: center; }
.chart-insight { display: flex; min-height: 42px; align-items: center; gap: 8px; margin: 0; padding: 10px 18px 11px; border-top: 1px solid var(--border); background: var(--surface-soft); color: var(--muted); font-size: 10px; line-height: 1.45; }
.chart-insight i { flex: 0 0 auto; color: var(--primary); }
.analytics-card .surface-header { min-height: 102px; }
.analytics-card .surface-header p { max-width: 560px; font-size: 11px; line-height: 1.5; }

.insight-grid { display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(380px, 1fr) minmax(250px, 0.62fr); gap: 18px; }
.number-pill,
.subtle-pill,
.warning-pill { padding: 5px 8px; background: var(--surface-muted); color: var(--muted); }
.number-pill strong { color: var(--text-strong); font-size: 12px; }
.warning-pill { background: var(--warning-soft); color: var(--warning-strong); }
.severity-number { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.severity-number strong { color: var(--text-strong); font-size: 34px; font-weight: 750; letter-spacing: -0.06em; }
.severity-number span { color: var(--muted); font-size: 8px; line-height: 1.35; }

/* Incident component */
.incident-list { display: flex; flex-direction: column; }
.incident-item { position: relative; display: grid; width: 100%; min-height: 67px; grid-template-columns: 34px minmax(0, 1fr) auto 10px; align-items: center; gap: 10px; padding: 10px 14px; border: 0; border-bottom: 1px solid var(--border); background: transparent; text-align: left; transition: background 150ms ease; }
.incident-item:last-child { border-bottom: 0; }
.incident-item::before { position: absolute; inset: 10px auto 10px 0; width: 3px; border-radius: 0 3px 3px 0; background: var(--warning); content: ""; }
.incident-item.is-critical::before { background: var(--danger); }
.incident-item.is-warning::before { background: #eab308; }
.incident-item:hover { background: var(--surface-hover); }
.incident-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--warning-soft); color: var(--warning-strong); font-size: 11px; }
.is-critical .incident-icon { background: var(--danger-soft); color: var(--danger-strong); }
.is-warning .incident-icon { background: var(--warning-soft); color: #a16207; }
.incident-copy { display: flex; min-width: 0; flex-direction: column; }
.incident-label { color: var(--warning-strong); font-size: 7px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; }
.is-critical .incident-label { color: var(--danger-strong); }
.incident-copy strong { overflow: hidden; margin-top: 2px; color: var(--text-strong); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.incident-copy small { overflow: hidden; margin-top: 2px; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.incident-time { display: flex; align-items: flex-end; flex-direction: column; }
.incident-time strong { color: var(--text-strong); font-size: 10px; }
.incident-time small { color: var(--muted); font-size: 7px; }
.incident-arrow { color: var(--muted-light); font-size: 8px; }

/* Secondary screens */
.section-heading { margin-top: 3px; margin-bottom: 24px; }
.section-heading h1 { font-size: 28px; }
.tab-button,
.secondary-button { display: inline-flex; min-height: 38px; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text-soft); font-size: 9px; font-weight: 700; }
.tab-button.is-active { border-color: var(--primary); background: var(--primary); color: #fff; }
.tab-button span { display: grid; min-width: 18px; height: 18px; place-items: center; border-radius: 999px; background: color-mix(in srgb, currentColor 15%, transparent); font-size: 7px; }
.filter-bar { display: flex; align-items: center; gap: 9px; margin-bottom: 16px; padding: 10px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.filter-bar label { display: inline-flex; height: 36px; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); }
.filter-bar select { border: 0; outline: 0; background: transparent; color: var(--text-strong); font-size: 9px; font-weight: 650; }
.filter-note { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--muted); font-size: 8px; }
.alert-workspace { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 18px; }
.incident-list.detailed { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow-card); }
.incident-list.detailed .incident-item { min-height: 84px; padding-inline: 18px; }
.alert-summary-card { align-self: start; padding: 20px; }
.rank-row { display: grid; grid-template-columns: 90px 1fr 20px; align-items: center; gap: 9px; margin-top: 18px; color: var(--text-soft); font-size: 9px; }
.rank-row > div { height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-muted); }
.rank-row i { display: block; height: 100%; border-radius: inherit; background: var(--primary); }
.rank-row strong { color: var(--text-strong); text-align: right; }
.info-note,
.detail-disclaimer { margin: 20px 0 0; padding: 12px; border-radius: 10px; background: var(--info-soft); color: var(--text-soft); font-size: 8px; line-height: 1.6; }
.loading-state,
.empty-state { display: flex; min-height: 78px; align-items: center; justify-content: center; gap: 11px; padding: 18px; color: var(--muted); text-align: left; }
.loading-state > span:last-child { display: grid; gap: 2px; }
.loading-state strong { color: var(--text-strong); font-size: 11px; }
.loading-state small { font-size: 9px; }
.loading-orbit { width: 22px; height: 22px; flex: 0 0 22px; border: 2px solid var(--surface-muted); border-top-color: var(--primary); border-radius: 50%; animation: loading-spin 700ms linear infinite; }
.empty-state i { color: var(--primary); }
.empty-state span { font-size: 10px; }
@keyframes loading-spin { to { transform: rotate(360deg); } }

/* Data tables */
.data-surface { overflow: hidden; }
.table-toolbar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 15px; border-bottom: 1px solid var(--border); }
.type-tabs { display: flex; gap: 4px; overflow-x: auto; }
.type-tabs button { min-height: 31px; padding: 0 11px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 9px; font-weight: 700; white-space: nowrap; }
.type-tabs button.is-active { background: var(--primary-soft); color: var(--primary-strong); }
.feed-status { display: inline-flex; align-items: center; gap: 6px; color: var(--success-strong); font-size: 8px; font-weight: 750; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.responsive-table { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 11px 14px; border-bottom: 1px solid var(--border); background: var(--surface-soft); color: var(--muted); font-size: 7px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text); font-size: 9px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background 150ms ease; }
tbody tr:hover { background: var(--surface-hover); }
.table-person { display: flex; align-items: center; gap: 9px; }
.table-avatar { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 50%; background: var(--primary-soft); color: var(--primary-strong); font-size: 8px; font-weight: 800; }
.table-person > span:last-child { display: flex; flex-direction: column; }
.table-person strong { color: var(--text-strong); font-size: 9px; font-weight: 700; }
.table-person span span { margin-top: 2px; color: var(--muted); font-size: 7px; }
.activity-icon { display: grid; width: 31px; height: 31px; flex: 0 0 31px; place-items: center; border-radius: 9px; background: var(--info-soft); color: var(--info-strong); }
.activity-icon.exit { background: color-mix(in srgb, var(--purple) 12%, transparent); color: var(--purple); }
.activity-icon.worker { background: var(--warning-soft); color: var(--warning-strong); }
.activity-icon.event { background: color-mix(in srgb, var(--purple) 12%, transparent); color: var(--purple); }
.activity-icon.contact { background: color-mix(in srgb, var(--teal) 12%, transparent); color: var(--teal); }
.table-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 999px; font-size: 7px; font-weight: 750; white-space: nowrap; }
.table-status.entry,
.table-status.ok { background: var(--success-soft); color: var(--success-strong); }
.table-status.exit { background: var(--info-soft); color: var(--info-strong); }
.table-status.warn { background: var(--warning-soft); color: var(--warning-strong); }
.table-status.danger { background: var(--danger-soft); color: var(--danger-strong); }
.table-status i { font-size: 5px; }
.row-action { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--muted); }
tr.is-new td { animation: new-row 1.5s var(--ease-standard) both; }
@keyframes new-row { 0%, 24% { background: var(--info-soft); } 100% { background: transparent; } }

/* Neighborhood cards */
.neighborhood-page-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.neighborhood-page-card { position: relative; overflow: hidden; padding: 20px; border-radius: var(--radius-lg); }
.neighborhood-page-card::before { position: absolute; inset: 0 0 auto; height: 3px; background: var(--status-color); content: ""; }
.neighborhood-card-head { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; align-items: center; gap: 11px; }
.neighborhood-monogram { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 12px; background: color-mix(in srgb, var(--status-color) 11%, transparent); color: var(--status-color); font-size: 10px; font-weight: 800; }
.neighborhood-card-head h3 { margin: 0; color: var(--text-strong); font-size: 13px; font-weight: 720; }
.neighborhood-card-head p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.neighborhood-total { display: flex; align-items: baseline; gap: 8px; margin-top: 22px; }
.neighborhood-total strong { color: var(--text-strong); font-size: 32px; font-weight: 750; letter-spacing: -0.06em; }
.neighborhood-total span { color: var(--muted); font-size: 9px; }
.neighborhood-breakdown { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 17px; }
.neighborhood-breakdown > div { padding: 10px; border-radius: 10px; background: var(--surface-soft); }
.neighborhood-breakdown span { display: block; color: var(--muted); font-size: 7px; }
.neighborhood-breakdown strong { display: block; margin-top: 3px; color: var(--text-strong); font-size: 14px; }
.neighborhood-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 17px; padding-top: 13px; border-top: 1px solid var(--border); color: var(--muted); font-size: 8px; }

/* Workers and events */
.stat-tile-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-tile { display: flex; min-height: 98px; align-items: center; gap: 13px; padding: 17px; border-radius: var(--radius-md); }
.stat-tile-icon { display: grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 12px; background: var(--metric-soft); color: var(--metric-color); }
.stat-tile div { display: flex; flex-direction: column; }
.stat-tile span { color: var(--muted); font-size: 8px; }
.stat-tile strong { margin-top: 3px; color: var(--text-strong); font-size: 22px; font-weight: 740; letter-spacing: -0.045em; }
.stat-skeleton { pointer-events: none; }
.stat-skeleton-icon,
.stat-skeleton-copy i { display: block; border-radius: 8px; background: linear-gradient(100deg, var(--surface-muted) 20%, var(--surface-hover) 42%, var(--surface-muted) 64%); background-size: 220% 100%; animation: skeleton-shimmer 1.35s ease-in-out infinite; }
.stat-skeleton-icon { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; }
.stat-skeleton-copy { display: grid; flex: 1; gap: 8px; }
.stat-skeleton-copy i:first-child { width: min(104px, 82%); height: 9px; }
.stat-skeleton-copy i:last-child { width: 48px; height: 22px; }
.worker-layout,
.event-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.65fr); gap: 18px; }
.document-card { padding: 20px; }
.document-legend { display: flex; flex-wrap: wrap; gap: 10px 14px; color: var(--muted); font-size: 8px; }
.event-list,
.contact-list { display: flex; flex-direction: column; padding: 3px 18px 10px; }
.event-row,
.contact-row { display: grid; align-items: center; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.event-row { grid-template-columns: 43px minmax(0, 1fr) auto; }
.contact-row { grid-template-columns: 35px minmax(0, 1fr) auto; }
.event-row:last-child,
.contact-row:last-child { border-bottom: 0; }
.event-date { display: grid; width: 43px; height: 43px; place-items: center; border-radius: 11px; background: var(--primary-soft); color: var(--primary-strong); font-size: 7px; font-weight: 800; text-align: center; text-transform: uppercase; }
.event-date strong { display: block; font-size: 15px; line-height: 1; }
.event-main,
.contact-main { display: flex; min-width: 0; flex-direction: column; }
.event-main strong,
.contact-main strong { overflow: hidden; color: var(--text-strong); font-size: 9px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.event-main span,
.contact-main span { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.event-count { display: flex; align-items: flex-end; flex-direction: column; }
.event-count strong { color: var(--text-strong); font-size: 11px; }
.event-count span { color: var(--muted); font-size: 7px; }
.contact-symbol { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--success-soft); color: var(--success-strong); }
.contact-row time { color: var(--muted); font-size: 8px; }

/* Analytics */
.analytics-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }

/* Readable type scale for sustained monitoring */
.brand-name small,
.nav-label,
.demo-tag,
.situation-label,
.section-overline { font-size: 11px; }
.nav-copy strong { font-size: 13px; }
.nav-copy small,
.observer-note strong,
.wallboard-button,
.operator-copy strong,
.command-breadcrumb,
.commandbar-context p,
.command-search input,
.command-select select,
.intro-meta,
.live-chip,
.updated-chip,
.readonly-chip,
.situation-scope,
.situation-score p,
.situation-link,
.priority-copy strong,
.priority-time strong,
.metric-copy > span,
.metric-context strong,
.surface-header p,
.ghost-action,
.network-identity strong,
.network-occupancy small,
.network-status,
.network-state small,
.stream-live,
.timeline-copy strong,
.timeline-place strong,
.segmented-control button,
.traffic-summary span,
.incident-copy strong,
.incident-time strong,
.tab-button,
.secondary-button,
.filter-bar select,
.stat-tile span,
.event-main strong,
.contact-main strong,
.event-count strong,
.drawer-alert-head span,
.detail-field strong,
.detail-timeline strong,
.toast { font-size: 12px; }
.observer-note small,
.operator-copy small,
.situation-score > div > span,
.situation-facts span,
.situation-facts small,
.critical-badge,
.priority-copy small,
.priority-time small,
.priority-foot,
.metric-context small,
.network-identity small,
.timeline-event time,
.timeline-copy small,
.timeline-place small,
.traffic-summary small,
.severity-number span,
.incident-label,
.incident-copy small,
.incident-time small,
.filter-note,
.rank-row,
.info-note,
.detail-disclaimer,
.feed-status,
th,
.table-person span span,
.table-status,
.neighborhood-card-head p,
.neighborhood-breakdown span,
.neighborhood-card-foot,
.event-main span,
.contact-main span,
.event-count span,
.contact-row time,
.detail-field span,
.detail-timeline time { font-size: 11px; }
.network-occupancy strong { font-size: 15px; }
.metric-copy > strong { font-size: 25px; }
td,
.table-person strong { font-size: 12px; }

/* Drawer */
.detail-drawer { position: fixed; z-index: 210; inset: 10px 10px 10px auto; width: min(440px, calc(100vw - 20px)); overflow: hidden auto; border: 1px solid var(--border); border-radius: 20px; background: var(--surface); box-shadow: var(--shadow-float); transform: translateX(calc(100% + 30px)); transition: transform 230ms var(--ease-emphasized); }
.detail-drawer.is-open { transform: translateX(0); }
.drawer-backdrop { display: block; opacity: 0; visibility: hidden; pointer-events: none; transition: opacity 180ms ease, visibility 180ms ease; }
.drawer-backdrop.is-visible { z-index: 200; opacity: 1; visibility: visible; pointer-events: auto; }
.drawer-header { position: sticky; z-index: 1; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px; border-bottom: 1px solid var(--border); background: var(--topbar-bg); backdrop-filter: blur(16px); }
.drawer-header h2 { margin: 0; color: var(--text-strong); font-size: 19px; font-weight: 740; letter-spacing: -0.035em; }
.drawer-content { padding: 19px; }
.drawer-alert-head { padding: 15px; border: 1px solid color-mix(in srgb, var(--drawer-color, var(--danger)) 24%, var(--border)); border-radius: 12px; background: color-mix(in srgb, var(--drawer-color, var(--danger)) 8%, var(--surface)); }
.drawer-alert-head strong { display: block; color: var(--text-strong); font-size: 14px; }
.drawer-alert-head span { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 15px 0; }
.detail-field { padding: 12px; border-radius: 10px; background: var(--surface-soft); }
.detail-field span { display: block; color: var(--muted); font-size: 7px; letter-spacing: 0.06em; text-transform: uppercase; }
.detail-field strong { display: block; margin-top: 4px; color: var(--text-strong); font-size: 10px; }
.detail-timeline { margin: 20px 0 0; padding: 0; list-style: none; }
.detail-timeline li { position: relative; margin-left: 8px; padding: 0 0 18px 22px; border-left: 1px solid var(--border-strong); }
.detail-timeline li::before { position: absolute; top: 2px; left: -5px; width: 9px; height: 9px; border: 2px solid var(--surface); border-radius: 50%; background: var(--primary); content: ""; }
.detail-timeline li:last-child { border-left-color: transparent; }
.detail-timeline time { color: var(--muted); font-size: 7px; }
.detail-timeline strong { display: block; margin-top: 3px; color: var(--text-strong); font-size: 9px; }

.toast { position: fixed; z-index: 400; right: 22px; bottom: 22px; display: flex; max-width: min(390px, calc(100vw - 32px)); align-items: center; gap: 9px; padding: 12px 15px; border-radius: 11px; background: var(--surface-inverse); color: var(--surface); box-shadow: var(--shadow-float); font-size: 9px; font-weight: 700; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity 160ms ease, transform 200ms var(--ease-emphasized); }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast i { color: var(--success); }
body.theme-dark .toast { color: #111827; }

/* Wallboard */
body.wallboard .workspace { grid-template-columns: 1fr; }
body.wallboard .sidebar,
body.wallboard .commandbar-tools,
body.wallboard .intro-actions { display: none; }
body.wallboard .commandbar { min-height: 62px; padding-block: 10px; }
body.wallboard .main-content { max-width: none; padding: 20px 24px 32px; }
body.wallboard .page-section:not(#section-overview) { display: none !important; }
body.wallboard #section-overview { display: block !important; }

.drawer-alert-head span,
.detail-field span,
.detail-timeline time { font-size: 11px; }
.drawer-alert-head strong { font-size: 15px; }
.detail-field strong,
.detail-timeline strong { font-size: 12px; }
.detail-disclaimer { font-size: 11px; }
.toast { font-size: 12px; }

/* Operational signals */
.source-coverage { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; padding: 15px 17px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.source-coverage[data-state="complete"] { border-color: color-mix(in srgb, var(--success) 28%, var(--border)); background: color-mix(in srgb, var(--success) 5%, var(--surface)); }
.source-coverage[data-state="partial"] { border-color: color-mix(in srgb, var(--warning) 36%, var(--border)); background: color-mix(in srgb, var(--warning) 7%, var(--surface)); }
.source-coverage-icon { display: grid; width: 38px; height: 38px; flex: 0 0 38px; place-items: center; border-radius: 11px; background: var(--surface-soft); color: var(--primary); }
.source-coverage[data-state="complete"] .source-coverage-icon { color: var(--success); }
.source-coverage[data-state="partial"] .source-coverage-icon { color: var(--warning); }
.source-coverage strong { display: block; color: var(--text-strong); font-size: 13px; }
.source-coverage p { margin: 3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.signal-stat-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.signal-stat-grid .stat-tile { min-width: 0; }
.signals-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(310px, .75fr); gap: 16px; margin-top: 16px; }
.signal-panel,
.marked-panel { overflow: hidden; }
.signal-list,
.marked-list { display: grid; }
.signal-row { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 13px 18px; border-top: 1px solid var(--border); }
.signal-row:first-child { border-top: 0; }
.signal-symbol { display: grid; width: 36px; height: 36px; place-items: center; border-radius: 10px; background: var(--signal-soft, var(--surface-soft)); color: var(--signal-color, var(--primary)); }
.signal-main { min-width: 0; }
.signal-main strong,
.marked-main strong { display: block; overflow: hidden; color: var(--text-strong); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.signal-main span,
.marked-main span { display: block; overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; text-overflow: ellipsis; white-space: nowrap; }
.signal-meta { display: grid; justify-items: end; gap: 4px; color: var(--muted); font-size: 10px; }
.signal-meta strong { color: var(--text); font-size: 11px; }
.marked-row { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 11px; padding: 14px 17px; border-top: 1px solid var(--border); }
.marked-row:first-child { border-top: 0; }
.marked-avatar { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 11px; font-weight: 800; }
.marked-main em { display: inline-flex; margin-top: 7px; padding: 4px 7px; border-radius: 7px; background: var(--danger-soft); color: var(--danger); font-size: 9px; font-style: normal; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.coverage-empty { padding: 20px; color: var(--muted); font-size: 11px; line-height: 1.5; text-align: center; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}
