@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&display=swap');
:root {
  --font-sans: 'DM Sans', ui-sans-serif, system-ui, sans-serif;
  --accent: #e7773c;
  --accent-strong: #cf6129;
  --accent-soft: #fff0e8;
  --info: #527ca6;
  --info-soft: #eaf1f8;
  --ink: #101112;
  --ink-2: #1b1c1e;
  --ink-3: #26282b;
  --on-ink: #ffffff;
  --on-ink-muted: #8b8b8b;
  --surface: #f1f0f1;
  --surface-2: #f5f4f6;
  --card: #ffffff;
  --border: #e6e5e7;
  --silver: #c0c0c0;
  --muted: #8b8b8b;
  --body: #333333;
  --foreground: #101112;
  --success: #059669;
  --success-soft: #d1fae5;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: var(--accent);
  --danger-soft: var(--accent-soft);
  --radius-card: 24px;
  --radius-hero: 28px;
  --radius-pill: 9999px;
  --shadow-card: 0 1px 2px rgb(16 17 18 / 3%), 0 8px 24px -12px rgb(16 17 18 / 12%);
  --shadow-float: 0 12px 40px -12px rgb(16 17 18 / 25%);
  --shadow-glow: 0 8px 20px -8px rgb(231 119 60 / 60%);
}
* {
  box-sizing: border-box;
}
html {
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'ss01', 'cv11';
  color: var(--foreground);
  background: var(--surface);
}
body {
  margin: 0;
  font-size: 14px;
}
button, select, input, a {
  font: inherit;
  touch-action: manipulation;
}
button, select {
  cursor: pointer;
}
button {
  color: inherit;
  border: 0;
  transition: background-color .18s, color .18s, transform .12s;
}
button:active {
  transform: scale(.98);
}
button:disabled {
  opacity: .5;
  cursor: default;
}
button:focus-visible, a:focus-visible, select:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  flex-shrink: 0;
  vertical-align: middle;
}
::selection {
  background: var(--accent);
  color: var(--on-ink);
}
[hidden] {
  display: none !important;
}
#app {
  display: flex;
  gap: 16px;
  padding: 16px;
  height: 100dvh;
  overflow: hidden;
}
.sidebar {
  display: flex;
  flex: 0 0 76px;
  flex-direction: column;
  align-items: center;
  padding: 20px 12px;
  border-radius: 28px;
  background: var(--ink);
  color: var(--on-ink);
  box-shadow: var(--shadow-float);
  overflow: hidden;
  z-index: 40;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 48px;
  margin-bottom: 32px;
  white-space: nowrap;
}
.brand-logo {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}
.rail-expanded .brand {
  height: 80px;
  justify-content: center;
}
.rail-expanded .brand-logo {
  width: 184px;
  height: 80px;
}
.workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin-bottom: 28px;
  background: var(--ink-2);
  border-radius: 16px;
  font-size: 12px;
  white-space: nowrap;
}
.workspace-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--ink-3);
  color: var(--on-ink-muted);
  font-size: 10px;
}
.workspace small {
  display: block;
  font-size: 10px;
  margin-top: 4px;
  color: var(--on-ink-muted);
}
.nav-caption {
  font-size: 10px;
  color: var(--on-ink-muted);
  letter-spacing: 1.5px;
  margin: 0 12px 12px;
}
.sidebar nav {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: transparent;
  color: var(--on-ink-muted);
  position: relative;
  text-align: left;
}
.nav-item:hover, .rail-toggle:hover {
  background: var(--ink-3);
  color: var(--on-ink);
}
.nav-item.active {
  color: var(--on-ink);
  background: var(--accent);
  box-shadow: var(--shadow-glow);
}
.nav-count {
  position: absolute;
  top: -3px;
  right: -3px;
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: var(--card);
  color: var(--ink);
  font-size: 10px;
  font-weight: 700;
}
.site-card {
  margin-top: 36px;
  padding: 16px;
  border-radius: 16px;
  background: var(--ink-2);
  font-size: 9px;
  color: var(--on-ink-muted);
  letter-spacing: .8px;
}
.site-card p {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.5;
  color: var(--on-ink);
  letter-spacing: -.5px;
}
.site-card>div {
  font-size: 10px;
}
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 24px;
}
.rail-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 44px;
  height: 44px;
  background: transparent;
  color: var(--on-ink-muted);
  border-radius: 16px;
}
.sidebar .brand>div, .sidebar .workspace, .sidebar .nav-caption, .sidebar .nav-label, .sidebar .site-card {
  display: none;
}
.rail-expanded .sidebar {
  flex-basis: 240px;
  align-items: stretch;
  padding: 20px 16px;
}
.rail-expanded .brand {
  padding-left: 4px;
}
.rail-expanded .sidebar .brand>div, .rail-expanded .sidebar .workspace, .rail-expanded .sidebar .nav-caption, .rail-expanded .sidebar .nav-label, .rail-expanded .sidebar .site-card {
  display: block;
}
.rail-expanded .sidebar .workspace {
  display: flex;
}
.rail-expanded .nav-item, .rail-expanded .rail-toggle {
  width: 100%;
  justify-content: flex-start;
  padding: 0 14px;
}
.rail-expanded .nav-count {
  position: static;
  margin-left: auto;
}
.rail-expanded .sidebar-bottom {
  align-items: stretch;
}
.rail-expanded .rail-avatar {
  display: none;
}
main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  padding: 0 4px 0 0;
  scroll-behavior: smooth;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 56px;
}
.breadcrumb {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}
.breadcrumb strong {
  font-size: 16px;
  letter-spacing: -.4px;
}
.breadcrumb>span {
  font-size: 11px;
  color: var(--muted);
}
.search-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  border-radius: 9999px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  padding: 0 16px;
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
  width: min(340px, 30%);
}
.search-pill:hover {
  background: var(--surface-2);
}
.search-pill svg {
  width: 16px;
}
.search-pill kbd {
  margin-left: auto;
  border-radius: 6px;
  background: var(--surface-2);
  padding: 3px 6px;
  font: inherit;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.round-button, .map-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  width: 44px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-card);
  position: relative;
}
.round-button:hover, .map-icon:hover {
  background: var(--surface-2);
}
.notification-dot {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 2px var(--card);
}
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ink-3);
  color: var(--on-ink);
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}
.profile-pill {
  display: flex;
  gap: 9px;
  align-items: center;
  height: 44px;
  border-radius: 9999px;
  padding: 4px 16px 4px 4px;
  background: var(--card);
  box-shadow: var(--shadow-card);
  font-size: 12px;
  font-weight: 600;
}
.profile-pill small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  margin-top: 2px;
}
.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 32px 4px 24px;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.7px;
  color: var(--muted);
}
.mock-badge, .mock-inline, .metric-tag, .selected-badge, .view-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  padding: 4px 9px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .4px;
  background: var(--surface-2);
  color: var(--muted);
  white-space: nowrap;
}
.eyebrow .mock-badge {
  margin-left: 6px;
  letter-spacing: .6px;
}
h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -1.1px;
  margin: 9px 0;
  line-height: 1.2;
}
h1>span {
  color: var(--accent);
}
.page-heading p {
  color: var(--muted);
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.button svg {
  width: 16px;
  height: 16px;
}
.button.primary {
  background: var(--accent);
  color: var(--on-ink);
  box-shadow: var(--shadow-glow);
  min-width: 138px;
}
.button.primary:hover {
  background: var(--accent-strong);
}
.button.secondary {
  background: var(--card);
  border: 1px solid var(--border);
}
.button.secondary:hover {
  background: var(--surface-2);
}
.metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.18fr);
  gap: 16px;
  margin-bottom: 24px;
}
.metrics article {
  padding: 20px;
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  min-width: 0;
}
.metric-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}
.metric-label>span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: var(--surface-2);
  border-radius: 50%;
}
.metric-label svg {
  height: 16px;
  width: 16px;
  color: var(--body);
}
.metric-value {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -1px;
  margin: 10px 0 8px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  min-height: 32px;
}
.metric-tag {
  color: var(--muted);
  letter-spacing: .3px;
  font-size: 8px;
  margin-top: 3px;
}
.metric-note {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  letter-spacing: 0;
  padding-top: 4px;
}
.metrics p {
  font-size: 11px;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}
.metrics .metric-hero {
  background: var(--ink);
  color: var(--on-ink);
  border-radius: var(--radius-hero);
}
.metric-hero .metric-label {
  color: var(--silver);
}
.metric-hero .metric-label>span {
  background: var(--ink-3);
}
.metric-hero .metric-label svg {
  color: var(--accent);
}
.metric-value.status-value {
  font-size: 24px;
  letter-spacing: -.7px;
}
.metric-hero p {
  color: var(--on-ink-muted);
}
.section-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.view-tabs {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border-radius: 9999px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.view-tabs button {
  height: 34px;
  padding: 0 18px;
  border-radius: 9999px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}
.view-tabs button.active {
  background: var(--ink);
  color: var(--on-ink);
}
#clock {
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 16px;
  align-items: start;
}
.map-card, .detail-card, .activity-card {
  background: var(--card);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 20px;
}
.map-header>div {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.map-header strong {
  font-size: 13px;
  font-weight: 600;
}
.map-location {
  font-size: 10px;
  color: var(--muted);
}
.live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  flex-shrink: 0;
}
.view-badge {
  font-size: 8px;
  letter-spacing: .8px;
}
.map-stage {
  position: relative;
  height: 510px;
  background: var(--surface-2);
  isolation: isolate;
  margin: 0 10px;
  border-radius: 16px;
  overflow: hidden;
}
.map-stage:fullscreen {
  height: 100dvh;
  width: 100vw;
  margin: 0;
  border-radius: 0;
}
#scene {
  position: absolute;
  inset: 0;
}
#scene canvas {
  width: 100%;
  height: 100%;
  display: block;
}
.map-top {
  position: absolute;
  top: 16px;
  left: 16px;
  right: 16px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
}
.map-top>* {
  pointer-events: auto;
}
.map-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 14px;
  height: 36px;
  border-radius: 9999px;
  background: rgb(255 255 255 / 94%);
  color: var(--body);
  box-shadow: var(--shadow-card);
  font-size: 10px;
}
.muted {
  color: var(--silver);
}
.map-icon {
  width: 36px;
  height: 36px;
}
.map-icon svg {
  width: 16px;
}
.scene-tools {
  position: absolute;
  right: 16px;
  top: 140px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.scene-tools button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.scene-tools button:hover {
  background: var(--surface-2);
}
.scene-tools svg {
  width: 16px;
  height: 16px;
}
.scene-tools>div {
  height: 5px;
}
.north {
  position: absolute;
  left: 24px;
  bottom: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--body);
  font-size: 9px;
}
.north>span {
  font-size: 28px;
}
.map-legend {
  position: absolute;
  left: 16px;
  bottom: 16px;
  display: flex;
  gap: 14px;
  padding: 11px 14px;
  border-radius: 9999px;
  background: rgb(255 255 255 / 94%);
  box-shadow: var(--shadow-card);
  font-size: 9px;
}
.map-legend span {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.map-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
/* Reference hues only identify spatial zones inside the digital twin. */
.blue {
  background: #438ee9;
}
.green {
  background: #32ad77;
}
.purple {
  background: #9565cb;
}
.orange {
  background: var(--accent);
}
.map-hint {
  position: absolute;
  bottom: 66px;
  right: 16px;
  font-size: 9px;
  color: var(--body);
  background: rgb(255 255 255 / 80%);
  border-radius: 9999px;
  padding: 6px 10px;
}
.map-hint b {
  font-weight: 400;
  padding: 0 4px;
}
.map-controls {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  flex-wrap: wrap;
}
.control-title {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 1px;
}
.map-controls label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--body);
  font-size: 10px;
  cursor: pointer;
  position: relative;
}
.map-controls input {
  position: absolute;
  opacity: 0;
  width: 36px;
  height: 22px;
  margin: 0;
}
.switch {
  position: relative;
  height: 22px;
  width: 36px;
  border-radius: 9999px;
  background: var(--silver);
}
.switch:after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--card);
  transition: transform .18s;
}
.map-controls input:checked+.switch {
  background: var(--accent);
}
.map-controls input:checked+.switch:after {
  transform: translateX(14px);
}
.map-controls input:focus-visible+.switch {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  outline-offset: 3px;
}
.scale-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 9px;
}
.simulation-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: var(--surface-2);
  margin: 0 10px 10px;
  border-radius: 16px;
}
.simulation-label {
  display: flex;
  gap: 10px;
  align-items: center;
}
.sim-symbol {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--card);
}
.simulation-label strong {
  font-size: 11px;
  font-weight: 600;
}
.simulation-label small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.playback {
  display: flex;
  align-items: center;
  gap: 8px;
}
.playback select {
  border: 0;
  border-radius: 9999px;
  padding: 9px 8px;
  background: var(--card);
  color: var(--body);
  font-size: 11px;
}
.compact {
  padding: 0 12px;
}
.detail-card {
  padding: 20px;
  transition: box-shadow .2s;
}
.detail-card.highlight {
  box-shadow: 0 0 0 3px var(--accent), var(--shadow-float);
}
.detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
  letter-spacing: 1px;
  color: var(--muted);
  margin-bottom: 16px;
}
.selected-badge {
  color: var(--info);
  background: var(--info-soft);
  font-size: 9px;
  letter-spacing: 0;
}
.truck-illustration {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border-radius: 16px;
  height: 118px;
  position: relative;
}
.truck-illustration svg {
  width: 230px;
  max-width: 100%;
  height: 90px;
}
.vehicle-type {
  position: absolute;
  left: 12px;
  bottom: 10px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 1.5px;
}
.vehicle-heading {
  padding: 18px 0 14px;
}
h2 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.7px;
  font-weight: 700;
}
.vehicle-heading h2 {
  font-family: ui-monospace, monospace;
  font-size: 23px;
}
.vehicle-heading p {
  color: var(--muted);
  font-size: 11px;
  margin: 8px 0 0;
}
.truck-status {
  display: inline-block;
  border-radius: 9999px;
  padding: 5px 10px;
  margin-top: 10px;
  background: var(--surface-2);
  color: var(--body);
  font-size: 10px;
}
.vehicle-info {
  margin: 0 0 20px;
}
.vehicle-info>div {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  line-height: 1.5;
}
.vehicle-info dt {
  color: var(--muted);
}
.vehicle-info dd {
  margin: 0;
  text-align: right;
  font-weight: 500;
  overflow-wrap: anywhere;
}
#vwo {
  font-family: ui-monospace, monospace;
  font-size: 10px;
}
.mock-inline {
  font-size: 7px;
  padding: 2px 5px;
  margin-left: 2px;
  letter-spacing: .3px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.section-label>span {
  letter-spacing: 0;
}
.journey {
  border-radius: 16px;
  background: var(--surface-2);
  padding: 16px;
  margin-bottom: 16px;
}
.journey-step {
  display: flex;
  align-items: center;
  gap: 10px;
  position: relative;
  margin-bottom: 21px;
}
.journey-step:last-child {
  margin-bottom: 0;
}
.journey-step:not(:last-child):after {
  content: '';
  position: absolute;
  left: 12px;
  top: 28px;
  height: 20px;
  border-left: 1px dashed var(--silver);
}
.journey-step>i {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex-shrink: 0;
  background: var(--card);
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}
.journey-step strong {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}
.journey-step small {
  display: block;
  font-size: 9px;
  color: var(--muted);
  margin-top: 4px;
}
.journey-step.current>i {
  background: var(--accent);
  color: var(--on-ink);
}
.journey-step.current strong {
  color: var(--foreground);
}
.journey-step.complete>i {
  background: var(--ink);
  color: var(--on-ink);
}
.journey-step.complete strong {
  color: var(--body);
}
.step-check {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
}
.destination {
  width: 100%;
  background: var(--ink);
  color: var(--on-ink);
  font-size: 11px;
}
.destination:hover {
  background: var(--ink-3);
}
.destination[aria-pressed=true] {
  background: var(--surface-2);
  color: var(--body);
}
.focus-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border-radius: 9999px;
  width: 100%;
  background: transparent;
  color: var(--muted);
  height: 40px;
  font-size: 11px;
  margin-top: 5px;
}
.focus-button svg {
  width: 15px;
}
.focus-button:hover {
  background: var(--surface-2);
  color: var(--foreground);
}
.inspection-progress {
  font-size: 11px;
  color: var(--body);
  margin: 16px 0;
}
.inspection-progress>div {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}
progress {
  width: 100%;
  height: 6px;
  border: 0;
  border-radius: 9999px;
  overflow: hidden;
  accent-color: var(--accent);
}
progress::-webkit-progress-bar {
  background: var(--surface);
  border-radius: 9999px;
}
progress::-webkit-progress-value {
  background: var(--accent);
  border-radius: 9999px;
}
.activity-card {
  margin-top: 16px;
  padding: 20px;
}
.activity-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 16px;
}
.activity-heading>div {
  display: flex;
  align-items: center;
  gap: 8px;
}
.activity-heading strong {
  color: var(--foreground);
  font-weight: 600;
  font-size: 14px;
}
#activity-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.event {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--surface-2);
  border-radius: 16px;
  font-size: 12px;
  color: var(--body);
}
.event-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--card);
  flex-shrink: 0;
  color: var(--muted);
}
.event-icon svg {
  width: 15px;
  height: 15px;
}
.event-time {
  margin-left: auto;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.event-tag {
  color: var(--muted);
  font-size: 9px;
  padding: 4px 9px;
  border-radius: 9999px;
  background: var(--card);
  min-width: 64px;
  text-align: center;
}
footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  padding: 20px 4px 6px;
  font-size: 9px;
  line-height: 1.6;
}
footer b {
  font-weight: 400;
  padding: 0 6px;
}
dialog {
  border: 0;
  border-radius: 28px;
  padding: 0;
  background: var(--card);
  color: var(--foreground);
  max-width: min(1000px, 94vw);
  max-height: 90dvh;
  box-shadow: var(--shadow-float);
}
dialog::backdrop {
  background: rgb(16 17 18 / 50%);
  backdrop-filter: blur(3px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 24px;
  position: sticky;
  top: 0;
  background: var(--card);
}
.dialog-heading h2 {
  font-size: 18px;
}
.dialog-heading p {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 0;
  line-height: 1.7;
}
.dialog-heading button {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  background: var(--surface-2);
  border-radius: 50%;
}
dialog img {
  display: block;
  max-width: 100%;
  height: auto;
}
#toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 9999px;
  padding: 14px 22px;
  box-shadow: var(--shadow-float);
  z-index: 60;
  font-size: 12px;
  max-width: 90vw;
  transition: opacity .2s, transform .2s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#scene-error {
  position: absolute;
  top: 40%;
  left: 10%;
  width: 80%;
  padding: 20px;
  background: var(--accent-soft);
  color: var(--body);
  border-radius: 16px;
  font-size: 13px;
  text-align: center;
}
.mobile-menu {
  display: none;
}
.map-legend {
  flex-wrap: wrap;
}
@media (min-width: 1650px) {
  .map-stage {
    height: 620px;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
  }
  .detail-card {
    padding: 24px;
  }
  .truck-illustration {
    height: 144px;
  }
}
@media (max-width: 1250px) {
  .map-location, .scale-note, .control-title {
    display: none;
  }
  .simulation-controls {
    flex-wrap: wrap;
  }
  .playback {
    margin-left: auto;
  }
  .map-stage {
    height: 545px;
  }
  .metric-note {
    display: none;
  }
  .metric-value.status-value {
    font-size: 21px;
  }
  .search-pill {
    width: auto;
  }
  .search-pill kbd {
    display: none;
  }
  .rail-expanded .search-pill {
    display: none;
  }
}
@media (max-width: 1023px) {
  .sidebar .brand {
    height: 80px;
    justify-content: center;
  }
  .sidebar .brand-logo {
    width: 184px;
    height: 80px;
  }
  #app {
    padding: 12px;
  }
  .sidebar {
    position: fixed;
    top: 12px;
    bottom: 12px;
    left: 12px;
    width: 240px;
    align-items: stretch;
    padding: 20px 16px;
    transform: translateX(-280px);
    transition: transform .2s;
  }
  .drawer-open .sidebar {
    transform: translateX(0);
  }
  .sidebar .brand>div, .sidebar .workspace, .sidebar .nav-caption, .sidebar .nav-label, .sidebar .site-card {
    display: block;
  }
  .sidebar .workspace {
    display: flex;
  }
  .sidebar .nav-item {
    width: 100%;
    justify-content: flex-start;
    padding: 0 14px;
  }
  .sidebar .nav-count {
    position: static;
    margin-left: auto;
  }
  .rail-toggle {
    display: none;
  }
  .drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgb(16 17 18 / 50%);
    backdrop-filter: blur(2px);
    z-index: 35;
  }
  .mobile-menu {
    display: inline-flex;
    flex-shrink: 0;
  }
  .breadcrumb {
    min-width: auto;
  }
  .search-pill {
    margin-left: auto;
    width: 44px;
    padding: 0;
    justify-content: center;
  }
  .search-pill span {
    display: none;
  }
  .content-grid {
    grid-template-columns: minmax(0, 1fr) 290px;
  }
  .metrics {
    gap: 12px;
  }
  .metrics article {
    padding: 16px;
  }
  .metric-label {
    font-size: 11px;
  }
  .topbar-right {
    margin-left: 0;
  }
  .metric-tag {
    display: none;
  }
  .page-heading {
    padding-top: 24px;
  }
}
@media (max-width: 780px) {
  .content-grid {
    grid-template-columns: 1fr;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
  }
  .metric-note {
    display: inline;
  }
  .metrics article {
    padding: 20px;
  }
  .metric-value.status-value {
    font-size: 24px;
  }
  .map-stage {
    height: 480px;
  }
  .simulation-controls {
    flex-wrap: nowrap;
  }
  .detail-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 24px;
  }
  .detail-header {
    grid-column: 1/-1;
  }
  .truck-illustration {
    grid-column: 1;
    grid-row: 2/4;
    height: 170px;
  }
  .vehicle-heading {
    grid-column: 2;
    padding-top: 0;
  }
  .vehicle-info {
    grid-column: 2;
    grid-row: 3/6;
  }
  .journey {
    grid-column: 1;
    margin-top: 16px;
  }
  .destination, .focus-button, .inspection-progress {
    grid-column: 2;
  }
  .destination {
    align-self: end;
  }
  .topbar .profile-pill>div {
    display: none;
  }
  .profile-pill {
    padding-right: 4px;
  }
  .map-location, .control-title {
    display: inline;
  }
  .page-heading>.button {
    padding: 0 12px;
  }
  .page-heading>.button>svg:last-child {
    display: none;
  }
  footer {
    flex-direction: column;
    gap: 4px;
  }
}
@media (max-width: 540px) {
  #app {
    padding: 0;
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }
  main {
    padding: 12px 20px 24px;
    overflow: visible;
  }
  .topbar {
    gap: 10px;
  }
  .breadcrumb strong {
    font-size: 13px;
  }
  .breadcrumb>span {
    font-size: 9px;
  }
  .topbar-right {
    gap: 8px;
    margin-left: auto;
  }
  .topbar #activity-shortcut, .search-pill {
    display: none;
  }
  .profile-pill {
    background: transparent;
    box-shadow: none;
    padding: 0;
  }
  .profile-pill .avatar {
    width: 42px;
    height: 42px;
    box-shadow: 0 0 0 4px var(--card), var(--shadow-card);
  }
  .mobile-menu {
    width: 38px;
    height: 38px;
  }
  .mobile-menu svg {
    width: 18px;
  }
  .page-heading {
    padding: 26px 0 22px;
    gap: 8px;
    align-items: flex-end;
  }
  h1 {
    font-size: 28px;
    max-width: 275px;
    line-height: 1.15;
    letter-spacing: -1.2px;
  }
  .eyebrow {
    font-size: 8px;
    letter-spacing: 1px;
    gap: 5px;
  }
  .eyebrow .mock-badge {
    font-size: 7px;
    padding: 3px 6px;
    margin-left: 0;
  }
  .page-heading p {
    font-size: 12px;
  }
  .page-heading>.button {
    width: 40px;
    padding: 0;
    flex-shrink: 0;
  }
  .page-heading>.button span {
    display: none;
  }
  .metrics {
    gap: 12px;
  }
  .metrics article {
    padding: 16px;
  }
  .metric-label {
    font-size: 10px;
    gap: 4px;
  }
  .metric-label>span {
    width: 28px;
    height: 28px;
  }
  .metric-value {
    font-size: 30px;
    margin-top: 12px;
  }
  .metric-value.status-value {
    font-size: 20px;
    line-height: 1.2;
  }
  .metric-note {
    font-size: 9px;
    max-width: 70px;
  }
  .metrics p {
    font-size: 10px;
  }
  .view-tabs button {
    padding: 0 12px;
    font-size: 11px;
  }
  #clock {
    font-size: 9px;
  }
  .map-header {
    padding: 18px 16px;
  }
  .map-header strong {
    font-size: 11px;
  }
  .map-header .map-location {
    display: none;
  }
  .view-badge {
    font-size: 7px;
    padding: 4px 7px;
  }
  .map-stage {
    height: 420px;
    margin: 0 8px;
  }
  .map-top {
    top: 12px;
    left: 10px;
    right: 10px;
  }
  .map-pill {
    font-size: 8px;
    padding: 0 10px;
    gap: 5px;
    height: 34px;
  }
  .map-icon {
    width: 34px;
    height: 34px;
  }
  .scene-tools {
    right: 10px;
    top: 110px;
  }
  .scene-tools button {
    width: 34px;
    height: 34px;
  }
  .map-legend {
    left: 10px;
    right: 10px;
    justify-content: center;
    font-size: 8px;
    gap: 10px;
    padding: 10px;
    bottom: 12px;
  }
  .map-hint {
    display: none;
  }
  .north {
    left: 18px;
    bottom: 60px;
  }
  .map-controls {
    padding: 16px 12px;
    gap: 12px;
    justify-content: space-between;
  }
  .map-controls label {
    font-size: 9px;
    gap: 5px;
  }
  .map-controls .control-title {
    display: none;
  }
  .switch {
    width: 30px;
    height: 20px;
  }
  .switch:after {
    width: 14px;
    height: 14px;
  }
  .map-controls input:checked+.switch:after {
    transform: translateX(10px);
  }
  .simulation-controls {
    margin: 0 8px 8px;
    padding: 14px 12px;
    flex-wrap: wrap;
    gap: 16px;
  }
  .simulation-label {
    width: 100%;
  }
  .simulation-label small {
    font-size: 10px;
  }
  .playback {
    width: 100%;
    justify-content: flex-end;
    gap: 7px;
  }
  .playback select {
    margin-right: auto;
    padding: 9px 6px;
    font-size: 10px;
  }
  .playback .button {
    font-size: 11px;
    height: 40px;
    padding: 0 12px;
  }
  .button.primary {
    min-width: 130px;
  }
  .detail-card {
    display: block;
    padding: 20px;
  }
  .truck-illustration {
    height: 145px;
  }
  .vehicle-heading {
    padding: 20px 0 14px;
  }
  .vehicle-heading h2 {
    font-size: 25px;
  }
  .vehicle-info>div {
    font-size: 12px;
    padding: 14px 0;
  }
  .journey {
    margin-top: 0;
    padding: 18px;
  }
  .journey-step strong {
    font-size: 12px;
  }
  .journey-step small {
    font-size: 10px;
  }
  .destination {
    font-size: 12px;
    height: 44px;
  }
  .focus-button {
    height: 44px;
  }
  .activity-card {
    padding: 20px;
  }
  .activity-heading strong {
    font-size: 13px;
  }
  .event {
    padding: 12px 10px;
    gap: 9px;
    align-items: flex-start;
    font-size: 11px;
  }
  .event>span:nth-child(2) {
    flex: 1;
    line-height: 1.6;
  }
  .event-time {
    font-size: 9px;
    padding-top: 5px;
  }
  .event-tag {
    display: none;
  }
  .activity-heading .mock-inline {
    display: none;
  }
  footer {
    padding-top: 20px;
    font-size: 8px;
  }
  #toast {
    border-radius: 16px;
    width: max-content;
    font-size: 11px;
    bottom: 20px;
  }
  .dialog-heading {
    padding: 20px;
  }
  .dialog-heading h2 {
    font-size: 16px;
  }
  .dialog-heading p {
    font-size: 10px;
  }
}
@media (max-width: 380px) {
  .playback {
    flex-wrap: wrap;
  }
  .playback select {
    width: 100%;
  }
  .playback .button {
    flex: 1;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
.cctv-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
}
.cctv-dialog {
  width: min(960px, 94vw);
}
.cctv-dialog .dialog-heading {
  z-index: 1;
}
.cctv-dialog .eyebrow {
  margin-bottom: 8px;
}
.cctv-content {
  padding: 0 24px 24px;
}
.cctv-selector {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 20px;
}
.cctv-selector>span {
  float: right;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}
.cctv-selector select {
  display: block;
  width: 100%;
  height: 44px;
  padding: 0 16px;
  margin-top: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--surface-2);
  color: var(--foreground);
  font-size: 13px;
}
.cctv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(240px, 1fr);
  gap: 20px;
}
.cctv-preview {
  border-radius: 24px;
  background: var(--ink);
  color: var(--on-ink);
  overflow: hidden;
}
.cctv-alert-context {
  margin: 0 24px 20px;
  padding: 14px 18px;
  background: var(--accent-soft);
  color: var(--body);
  border-radius: 16px;
  font-size: 12px;
  line-height: 1.7;
}
.cctv-photo-frame {
  position: relative;
  aspect-ratio: 1672 / 941;
  background: var(--ink-2);
}
.cctv-photo-frame>img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1672 / 941;
  object-fit: cover;
}
.cctv-detection-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cctv-object-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.cctv-object-box {
  position: absolute;
  border: 2px solid #67e8a0;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgb(16 17 18 / 35%);
}
.cctv-object-box.truck {
  border-color: #7dd3fc;
}
.cctv-object-box b {
  position: absolute;
  bottom: 100%;
  left: -2px;
  background: #67e8a0;
  color: #101112;
  padding: 3px 5px;
  font-size: clamp(7px, .7vw, 10px);
  line-height: 1.2;
  white-space: nowrap;
  border-radius: 3px 3px 0 0;
}
.cctv-object-box.truck b {
  background: #7dd3fc;
}
.cctv-object-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgb(16 17 18 / 88%);
  color: var(--on-ink);
  font-size: clamp(10px, 1vw, 14px);
  font-weight: 700;
}
.cctv-object-counter small {
  display: block;
  font-size: 8px;
  font-weight: 500;
  margin-top: 4px;
  color: #b5c3ba;
  letter-spacing: 1px;
}
.cctv-object-result {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  padding: 0 16px 16px;
}
.cctv-object-result > div {
  flex: 1;
  min-width: 170px;
}
.cctv-object-result small {
  color: var(--on-ink-muted);
  font-size: 9px;
  letter-spacing: .8px;
}
.cctv-object-result strong {
  display: block;
  font-size: 22px;
  margin: 8px 0;
}
.cctv-object-result p {
  color: var(--on-ink-muted);
  font-size: 11px;
  line-height: 1.6;
  margin-bottom: 0;
}
.cctv-object-result .button {
  font-size: 11px;
  white-space: nowrap;
}
.cctv-photo-label {
  position: absolute;
  bottom: 12px;
  left: 12px;
  border-radius: var(--radius-pill);
  background: rgb(16 17 18 / 80%);
  color: var(--on-ink);
  padding: 5px 9px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .5px;
}
.cctv-plate-roi {
  position: absolute;
  border: 2px solid var(--accent);
  border-radius: 4px;
  box-shadow: 0 0 0 1px rgb(16 17 18 / 30%);
  pointer-events: none;
}
.cctv-roi-caption {
  position: absolute;
  top: 12px;
  left: 12px;
  border-radius: var(--radius-pill);
  padding: 5px 9px;
  color: var(--on-ink);
  background: var(--ink);
  font-size: 9px;
  letter-spacing: .4px;
}
.cctv-plate-result {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 0 16px 16px;
}
.cctv-plate-result small {
  color: var(--on-ink-muted);
  font-size: 9px;
  letter-spacing: .8px;
}
.cctv-plate-result strong {
  width: fit-content;
  min-width: 160px;
  border: 1px solid var(--on-ink-muted);
  border-radius: 8px;
  padding: 10px 16px;
  color: var(--on-ink);
  background: var(--ink-2);
  font: 600 22px ui-monospace, monospace;
  text-align: center;
}
.cctv-plate-result>span {
  color: var(--silver);
  font-size: 10px;
}
.cctv-anpr-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}
.cctv-anpr-shortcuts .button {
  flex: 1;
  min-width: 145px;
}
.cctv-preview-header, .cctv-preview-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  font-size: 11px;
}
.cctv-preview-header>span:first-child {
  font-family: ui-monospace, monospace;
}
.cctv-simulation-badge {
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  background: var(--ink-3);
  color: var(--silver);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: .5px;
}
.cctv-preview-footer {
  font-size: 10px;
  color: var(--silver);
  line-height: 1.6;
}
.cctv-preview-footer>span:last-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.cctv-caption {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  margin: 12px 0 0;
}
.cctv-identity {
  padding: 20px;
  border-radius: 24px;
  background: var(--surface-2);
}
.cctv-identity-heading {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: .6px;
}
.cctv-identity-heading svg {
  width: 16px;
}
.cctv-identity-heading .selected-badge {
  margin-left: auto;
  font-size: 8px;
}
.cctv-identity h3 {
  margin: 20px 0 6px;
  font: 700 24px ui-monospace, monospace;
  letter-spacing: -1px;
}
.cctv-identity>p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
}
.cctv-identity dl {
  margin: 16px 0;
}
.cctv-identity dl>div {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-size: 11px;
  border-bottom: 1px solid var(--border);
}
.cctv-identity dt {
  color: var(--muted);
}
.cctv-identity dd {
  margin: 0;
  text-align: right;
}
.cctv-identity .button {
  width: 100%;
  margin-top: 8px;
  font-size: 11px;
}
.cctv-events-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 24px 0 16px;
}
.cctv-events-heading h3 {
  font-size: 16px;
  margin: 0;
  letter-spacing: -.4px;
}
.cctv-events {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cctv-events .event>div {
  min-width: 0;
}
.cctv-events strong {
  font-size: 12px;
  font-weight: 600;
}
.cctv-events small {
  display: block;
  color: var(--muted);
  margin-top: 5px;
  font-size: 10px;
}
.cctv-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  border-radius: 16px;
  padding: 28px 20px;
  background: var(--surface-2);
}
.cctv-empty>svg {
  color: var(--muted);
  width: 28px;
  height: 28px;
}
.cctv-empty strong {
  font-size: 13px;
}
.cctv-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  max-width: 340px;
}
@media (max-width: 650px) {
  .cctv-grid {
    grid-template-columns: 1fr;
  }
  .cctv-content {
    padding: 0 20px 20px;
  }
  .cctv-dialog .dialog-heading {
    padding: 20px;
  }
  .cctv-toolbar {
    gap: 8px;
  }
  .cctv-toolbar #clock {
    display: none;
  }
  .cctv-toolbar .button {
    padding: 0 12px;
    font-size: 10px;
  }
  .cctv-events .event {
    flex-wrap: wrap;
  }
  .cctv-events .event>div {
    flex: 1;
  }
  .cctv-events .event-time {
    margin-left: 42px;
  }
  .cctv-preview-header, .cctv-preview-footer {
    padding: 14px;
  }
  .cctv-preview-footer {
    flex-wrap: wrap;
    gap: 4px;
  }
}
.monitor-intro {
  margin: 24px 0 20px;
  scroll-margin-top: 20px;
}
.monitor-heading, .monitor-title, .monitor-command {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.monitor-heading {
  margin-bottom: 18px;
}
.monitor-heading h2 {
  font-size: 26px;
  margin: 6px 0;
  letter-spacing: -.8px;
}
.monitor-heading h2 span {
  color: var(--accent);
}
.monitor-intro p, .monitor-card p {
  color: var(--muted);
  line-height: 1.6;
}
.monitor-heading p {
  margin: 0;
}
.monitor-badge {
  display: inline-block;
  border-radius: 999px;
  background: var(--surface-2);
  padding: 6px 10px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .4px;
}
#monitor-source {
  background: var(--ink);
  color: var(--on-ink);
}
.monitor-summary {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.monitor-summary > div {
  padding: 18px;
  background: var(--card);
  border-radius: 24px;
  box-shadow: var(--shadow-card);
}
.monitor-summary span {
  color: var(--muted);
  font-size: 11px;
}
.monitor-summary strong {
  display: block;
  font-size: 30px;
  margin-top: 12px;
  font-variant-numeric: tabular-nums;
}
.monitor-command {
  padding: 20px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 24px;
  flex-wrap: wrap;
}
.monitor-command small {
  display: block;
  margin-top: 8px;
  color: var(--on-ink-muted);
  line-height: 1.6;
}
.monitor-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.monitor-body {
  margin: 20px 0;
}
.monitor-body button, .monitor-body select, .monitor-command select {
  font-size: 12px;
}
.monitor-command select, .monitor-body select {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 12px;
  background: var(--card);
  color: var(--foreground);
  max-width: 100%;
}
.monitor-note {
  font-size: 11px;
  line-height: 1.7;
}
.monitor-tabs {
  display: flex;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  padding: 5px;
  border-radius: 999px;
  background: var(--card);
  margin-bottom: 16px;
  gap: 4px;
}
.monitor-tabs button {
  padding: 11px 18px;
  border-radius: 999px;
  background: transparent;
  white-space: nowrap;
}
.monitor-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--on-ink);
}
.monitor-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr);
  gap: 16px;
  align-items: start;
}
.monitor-card {
  min-width: 0;
  padding: 24px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.monitor-title {
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.monitor-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
}
.monitor-title h3 {
  margin-bottom: 0;
}
.monitor-title p {
  font-size: 12px;
  margin-bottom: 0;
}
.monitor-bays {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.bay-tile {
  background: var(--surface-2);
  border-radius: 20px;
  padding: 16px;
  text-align: left;
  line-height: 1.6;
  box-shadow: inset 0 0 0 2px transparent;
}
.bay-tile.selected {
  box-shadow: inset 0 0 0 2px var(--accent);
}
.bay-tile.alarm {
  background: var(--accent-soft);
}
.bay-tile span, .bay-tile small {
  display: block;
}
.bay-tile b {
  display: inline-block;
  font-size: 13px;
  margin: 12px 0;
}
.bay-tile span {
  font-size: 12px;
}
.bay-tile small {
  font-size: 10px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.monitor-scenarios {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.monitor-scenarios p {
  font-size: 12px;
}
#monitor-feedback {
  min-height: 38px;
}
.bay-readout {
  font-size: 42px;
  letter-spacing: -1.5px;
  font-weight: 700;
  margin-top: 16px;
  font-variant-numeric: tabular-nums;
}
.bay-timers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 20px;
}
.bay-timers > div {
  padding: 14px;
  background: var(--surface-2);
  border-radius: 16px;
}
.bay-timers small {
  font-size: 9px;
  color: var(--muted);
  letter-spacing: .6px;
}
.bay-timers .bay-readout {
  font-size: 25px;
  margin-top: 10px;
  letter-spacing: -.8px;
}
#monitor-person-history {
  font-size: 12px;
  max-height: 240px;
  overflow: auto;
}
#monitor-detail h3 {
  margin-top: 12px;
}
.monitor-kv {
  margin: 16px 0;
}
.monitor-kv > div {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  line-height: 1.6;
}
.monitor-kv dt {
  color: var(--muted);
}
.monitor-kv dd {
  margin: 0;
  overflow-wrap: anywhere;
}
.monitor-body details {
  padding: 16px;
  background: var(--surface-2);
  border-radius: 16px;
}
.monitor-body summary {
  cursor: pointer;
  font-size: 12px;
}
#bay-settings {
  display: grid;
  gap: 12px;
}
#bay-settings label {
  display: grid;
  gap: 6px;
  font-size: 12px;
}
#bay-settings input {
  padding: 10px 14px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--border);
}
.scrap-reference {
  margin: 0;
  background: var(--surface-2);
  border-radius: 16px;
  overflow: hidden;
}
.scrap-reference img {
  display: block;
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: 50% 45%;
}
.scrap-reference figcaption {
  padding: 12px;
  font-size: 11px;
  color: var(--muted);
}
.scrap-transaction {
  background: var(--surface-2);
  padding: 18px;
  border-radius: 20px;
  margin-bottom: 12px;
}
.scrap-transaction strong {
  font-family: monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.scrap-transaction p {
  font-size: 11px;
}
.monitor-filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.monitor-filters label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  min-width: 120px;
}
.monitor-event {
  display: flex;
  gap: 16px;
  align-items: center;
  padding: 16px 0;
  border-top: 1px solid var(--border);
}
.monitor-event > div {
  flex: 1;
  min-width: 0;
}
.monitor-event strong {
  font-size: 13px;
}
.monitor-event p {
  font-size: 11px;
  margin: 6px 0;
  overflow-wrap: anywhere;
}
.monitor-event small {
  font-size: 11px;
  margin-right: 12px;
  color: var(--muted);
}
.monitor-event time {
  font-size: 11px;
  color: var(--muted);
}
.monitor-event.critical > .monitor-badge, .monitor-event.warning > .monitor-badge {
  background: var(--accent-soft);
  color: var(--accent);
}
#monitor-history {
  font-size: 12px;
  max-height: 240px;
  overflow: auto;
}
#monitor-events + button, #monitor-history {
  margin: 16px 0;
}
#monitor-evidence {
  max-width: 560px;
  width: calc(100% - 32px);
  border: 0;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow-float);
}
#monitor-evidence::backdrop {
  background: #10111280;
}
#monitor-evidence-content {
  padding: 24px;
  border-radius: 16px;
  background: var(--surface-2);
  line-height: 1.8;
}
#monitor-evidence-content a {
  text-decoration: underline;
}
@media (max-width: 1200px) {
  .monitor-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .monitor-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 600px) {
  .monitor-heading {
    align-items: flex-start;
  }
  .monitor-heading h2 {
    font-size: 22px;
  }
  .monitor-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monitor-summary > div {
    padding: 16px;
  }
  .monitor-summary > div:last-child {
    grid-column: 1 / -1;
  }
  .monitor-card {
    padding: 18px;
  }
  .monitor-bays {
    grid-template-columns: 1fr;
  }
  .monitor-event {
    flex-wrap: wrap;
    gap: 10px;
  }
  .monitor-event > div {
    flex-basis: 65%;
  }
  .monitor-event time {
    margin-left: auto;
  }
  .monitor-tabs button {
    padding: 10px 12px;
  }
  .monitor-kv > div {
    grid-template-columns: 95px minmax(0, 1fr);
  }
}
.sidebar {
  overflow-y: auto;
  scrollbar-width: thin;
}
.sidebar > * {
  flex-shrink: 0;
}
.sidebar nav + nav {
  margin-top: 12px;
}
main.insights-mode > :not(.topbar):not(.insights-page):not(.insights-notice):not(footer) {
  display: none !important;
}
.insights-page {
  margin: 24px 0;
}
.insights-page .monitor-heading h2 {
  font-size: 30px;
}
.insights-tabs {
  display: flex;
  width: fit-content;
  padding: 5px;
  gap: 5px;
  background: var(--card);
  border-radius: 999px;
  margin-bottom: 16px;
}
.insights-tabs button {
  padding: 11px 16px;
  border-radius: 999px;
  background: transparent;
}
.insights-tabs button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--on-ink);
}
.insights-tabs span {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  padding: 1px 5px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border-radius: 999px;
  margin-left: 6px;
  font-size: 11px;
}
.insights-context {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
}
.insights-context p {
  font-size: 12px;
  color: var(--muted);
}
.insights-context .monitor-filters {
  margin: 0;
  align-items: end;
}
.insights-context select {
  background: var(--card);
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.insights-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}
.insights-kpis article {
  padding: 24px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}
.insights-kpis article:first-child {
  background: var(--ink);
  color: var(--on-ink);
}
.insights-kpis article:first-child small, .insights-kpis article:first-child span {
  color: var(--on-ink-muted);
}
.insights-kpis span {
  font-size: 12px;
  color: var(--muted);
}
.insights-kpis strong {
  display: block;
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
  margin: 14px 0 10px;
}
.insights-kpis small {
  display: block;
  color: var(--muted);
  line-height: 1.6;
  font-size: 11px;
}
#data-screen > .monitor-columns, .insights-table-card {
  margin-bottom: 16px;
}
.event-chart {
  height: 210px;
  display: flex;
  gap: 12px;
  align-items: end;
  padding-top: 10px;
}
.chart-column {
  flex: 1;
  height: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.chart-column span {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.chart-track {
  height: 100%;
  width: 100%;
  display: flex;
  align-items: end;
  background: var(--surface-2);
  border-radius: 10px;
  overflow: hidden;
}
.chart-bar {
  width: 100%;
  border-radius: 10px;
  background: var(--ink-3);
}
.chart-column:last-child .chart-bar {
  background: var(--accent);
}
.chart-axis {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-size: 10px;
  color: var(--muted);
  margin: 12px 0 20px;
}
.zone-distribution {
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.zone-distribution > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: space-between;
}
.zone-distribution strong {
  font-size: 12px;
}
.zone-distribution span, .zone-distribution small {
  font-size: 11px;
  color: var(--muted);
}
.zone-distribution progress {
  appearance: none;
  width: 100%;
  height: 7px;
  border: 0;
  border-radius: 999px;
  margin: 12px 0 6px;
  background: var(--surface);
}
.zone-distribution progress::-webkit-progress-bar {
  border-radius: 999px;
  background: var(--surface);
}
.zone-distribution progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--ink);
}
.zone-distribution progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--ink);
}
.insights-table-scroll {
  overflow-x: auto;
}
.insights-table {
  width: 100%;
  border-collapse: collapse;
  white-space: nowrap;
  font-size: 12px;
}
.insights-table th {
  text-align: left;
  padding: 12px 16px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: .6px;
}
.insights-table td {
  padding: 16px;
  border-top: 1px solid var(--border);
}
.insights-table tr:hover td {
  background: var(--surface-2);
}
.insights-table small {
  display: block;
  color: var(--muted);
  margin-top: 6px;
  font-size: 10px;
}
.insights-table .button {
  white-space: nowrap;
}
.insight-session {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.insight-session strong {
  font-size: 12px;
}
.insight-session small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.6;
}
.insight-session b {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.scrap-breakdown > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.scrap-breakdown span {
  color: var(--muted);
}
.alert-row {
  padding: 20px;
  background: var(--surface-2);
  border-radius: 20px;
  margin-bottom: 12px;
}
.alert-row.critical {
  background: var(--accent-soft);
}
.alert-row-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.alert-row-heading strong {
  flex: 1;
  min-width: 120px;
  font-size: 14px;
}
.alert-row-heading > .monitor-badge:first-child {
  background: var(--card);
}
.alert-row p {
  font-size: 12px;
}
.alert-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 10px;
  color: var(--muted);
  margin-bottom: 16px;
}
.alert-meta span {
  overflow-wrap: anywhere;
}
.insights-empty {
  text-align: center;
  padding: 40px 16px;
}
.insights-empty strong {
  font-size: 16px;
}
.insights-notice {
  position: fixed;
  bottom: 24px;
  right: 24px;
  max-width: min(440px, calc(100vw - 48px));
  padding: 20px;
  background: var(--ink);
  color: var(--on-ink);
  border-radius: 20px;
  box-shadow: var(--shadow-float);
  z-index: 80;
  font-size: 12px;
  line-height: 1.6;
}
@media (max-width: 1200px) {
  .insights-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 600px) {
  .insights-page .monitor-heading {
    flex-direction: column;
  }
  .insights-page .monitor-heading h2 {
    font-size: 26px;
  }
  .insights-kpis {
    gap: 12px;
  }
  .insights-kpis article {
    padding: 18px;
  }
  .insights-kpis strong {
    font-size: 28px;
  }
  .event-chart {
    gap: 6px;
    height: 170px;
  }
  .insights-context .monitor-filters {
    width: 100%;
  }
  .insights-context .monitor-filters label {
    flex: 1;
  }
  .alert-row {
    padding: 16px;
  }
}
main.master-mode > :not(.topbar):not(.master-page):not(.insights-notice):not(footer) {
  display: none !important;
}
.master-page {
  margin: 24px 0;
}
.master-storage-note {
  background: var(--info-soft);
  border-radius: 20px;
  padding: 18px 22px;
  margin: 16px 0;
}
.master-storage-note strong {
  font-size: 13px;
}
.master-storage-note p {
  font-size: 12px;
  line-height: 1.7;
  color: var(--body);
  margin-bottom: 0;
}
#vehicle-message {
  font-size: 12px;
  line-height: 1.7;
  min-height: 20px;
}
.master-page .monitor-filters {
  align-items: end;
}
.master-filters label:first-child {
  flex: 1;
  min-width: 220px;
}
.master-filters input, .master-filters select {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--foreground);
}
.master-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 20px;
}
.master-pagination > span {
  color: var(--muted);
  font-size: 12px;
}
.master-catalog {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 24px;
}
.master-catalog > article {
  padding: 20px;
  border-radius: 20px;
  background: var(--surface-2);
}
.master-catalog p {
  font-size: 12px;
}
.master-catalog small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.master-catalog .button {
  margin-top: 16px;
}
.vehicle-dialog {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
  border: 0;
  border-radius: 24px;
  padding: 28px;
  box-shadow: var(--shadow-float);
  color: var(--foreground);
}
.vehicle-dialog::backdrop {
  background: rgb(16 17 18 / 50%);
  backdrop-filter: blur(3px);
}
.vehicle-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.vehicle-form-grid label {
  display: grid;
  gap: 8px;
  font-size: 12px;
  color: var(--body);
}
.vehicle-form-grid input, .vehicle-form-grid select, .vehicle-form-grid textarea {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--foreground);
  font: inherit;
}
.vehicle-form-grid textarea {
  resize: vertical;
}
.vehicle-form-wide {
  grid-column: 1 / -1;
}
.master-error {
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1.7;
}
#vehicle-confirm-description {
  line-height: 1.7;
  color: var(--body);
  font-size: 13px;
}
@media (max-width: 600px) {
  .master-page .monitor-heading {
    flex-direction: column;
    align-items: flex-start;
  }
  .master-catalog, .vehicle-form-grid {
    grid-template-columns: 1fr;
  }
  .vehicle-dialog {
    padding: 22px;
  }
  .master-pagination .monitor-actions {
    width: 100%;
  }
}
