@font-face {
  font-family: Plex;
  src: url("../fonts/plex-sans.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
@font-face {
  font-family: Plex Mono;
  src: url("../fonts/plex-mono.woff2") format("woff2");
  font-weight: 100 700;
  font-display: swap;
}
:root {
  --bg: #0a0a0a;
  --surface: #121212;
  --surface-raised: #121212;
  --text: #f4f4f4;
  --secondary: #b8b8b8;
  --muted: #a3a3a3;
  --border: #383838;
  --border-soft: #2b2b2b;
  --accent: #6b9fff;
  --accent-dim: #121212;
  --amber: #f4f4f4;
  --red: #f4f4f4;
  --blue: #b8b8b8;
  --radius: 4px;
  --sans: Plex, "IBM Plex Sans", sans-serif;
  --mono: "Plex Mono", "Consolas", monospace;
  --sidebar: 232px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  color-scheme: dark;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--sans);
  -webkit-font-smoothing: antialiased;
}
button,
input,
select {
  font: inherit;
  min-height: 40px;
  font-size: 13px;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
  min-height: 40px;
  font-size: 13px;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
  text-decoration: none;
}
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
button svg use {
  pointer-events: none;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -0.7px;
  line-height: 1.2;
}
h2 {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.3px;
}
h3 {
  font-size: 16px;
  font-weight: 500;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}
::selection {
  background: var(--surface);
  color: var(--text);
}
[hidden] {
  display: none !important;
}
.mono,
code,
time {
  font-family: var(--mono);
}
.muted {
  color: var(--secondary);
}
.small-text {
  font-size: 12px;
}
.eyebrow {
  font: 12px/1.5 var(--sans);
  letter-spacing: 0;
  color: var(--secondary);
}

.space-top {
  margin-top: 32px;
}
.svg-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}
.skip-link {
  position: fixed;
  top: -60px;
  left: 20px;
  padding: 12px;
  background: var(--accent);
  color: var(--bg);
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.app-shell {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: var(--sidebar);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 24px 16px 0;
  z-index: 30;
  overflow-y: auto;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.4px;
  padding: 0 7px;
}

.brand-logo {
  display: block;
  width: 100%;
  max-width: 192px;
  height: auto;
  border-radius: var(--radius);
}

.brand-mark {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 4px;
  color: var(--accent);
  font-size: 25px;
  line-height: 28px;
  text-align: center;
  position: relative;
  font-weight: 500;
  background: var(--bg);
}

.workspace {
  margin: 24px 0 20px;
  border: 0;
  border-radius: 0;
  padding: 0 8px 20px;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  letter-spacing: -0.1px;
  border-bottom: 1px solid var(--border);
  color: var(--secondary);
}




.nav-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  border: 0;
  background: transparent;
  border-radius: 5px;
  padding: 10px;
  color: var(--secondary);
  font-size: 14px;
  margin-bottom: 5px;
  transition:
    background 0.18s,
    color 0.18s,
    border-color 0.18s;
  text-align: left;
  min-height: 44px;
}
.nav-link svg {
  width: 18px;
  height: 18px;
  color: currentColor;
}
.nav-link:hover {
  background: var(--surface);
  color: var(--text);
}
.nav-link.active {
  background: var(--bg);
  border-color: var(--border);
  color: var(--accent);
  box-shadow: inset 2px 0 var(--accent);
}
.nav-link.active svg {
  color: var(--accent);
}

.nav-count {
  margin-left: auto;
  font: 12px var(--mono);
  background: var(--bg);
  padding: 1px 5px;
  color: var(--text);
  border-radius: 3px;
  font-size: 12px;
}
.sidebar-bottom {
  margin-top: auto;
}


.tiny-dot,
.stream-state i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  margin-right: 6px;
}
.settings-button {
  font-size: 12px;
}
.operator {
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border);
  padding: 21px 3px;
  margin-top: 18px;
  font-size: 12px;
}
.operator small {
  display: block;
  font-size: 12px;
  color: var(--muted);
}
.operator form {
  margin-left: auto;
}
.avatar {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font: 12px var(--mono);
  color: var(--secondary);
  background: var(--surface);
}
.avatar.small {
  width: 26px;
  height: 26px;
  font-size: 12px;
}
.main-shell {
  width: calc(100% - var(--sidebar));
  margin-left: var(--sidebar);
  min-width: 0;
}
.topbar {
  height: 58px;
  border-bottom: 1px solid var(--border-soft);
  padding: 0 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--secondary);
  background: var(--bg);
}
.breadcrumb {
  display: flex;
  gap: 15px;
  align-items: center;
}
.breadcrumb > :last-child {
  color: var(--text);
}
.slash {
  color: var(--secondary);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 19px;
}
.topbar-separator {
  height: 15px;
  width: 1px;
  background: var(--border);
}
.topbar time {
  font-size: 12px;
  letter-spacing: 0;
}
.stream-state {
  font-size: 12px;
}
.stream-state i {
  width: 5px;
  height: 5px;
}
.stream-state.offline {
  color: var(--amber);
}
.stream-state.offline i {
  background: var(--amber);
}
.mobile-menu {
  display: none !important;
}
main {
  max-width: 1900px;
  margin: 0 auto;
  padding: 34px 36px 0;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 31px;
}
.page-heading .eyebrow {
  margin-bottom: 11px;
  font-size: 12px;
  font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
.page-description {
  font-size: 14px;
  color: var(--secondary);
  margin-top: 8px;
}
.heading-actions {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  line-height: 1.4;
  transition:
    background 0.16s,
    border-color 0.16s,
    transform 0.16s;
}
.button:hover {
  background: var(--surface);
  border-color: var(--border);
}
.button:active {
  transform: translateY(1px);
}
.button svg {
  width: 14px;
  height: 14px;
}
.button.primary {
  background: #305cde;
  border-color: #305cde;
  color: var(--text);
  font-weight: 500;
}
.button.primary:hover {
  background: #305cde;
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}
.icon-button {
  display: inline-grid;
  place-items: center;
  background: transparent;
  border: 0;
  color: var(--secondary);
  width: 40px;
  height: 40px;
  border-radius: 4px;
  font-size: 17px;
}
.icon-button:hover {
  background: var(--surface-raised);
  color: var(--text);
}
.text-button {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 13px;
  display: inline-flex;
  gap: 14px;
  align-items: center;
  padding: 3px 0;
  white-space: nowrap;
  min-height: 32px;
}
.text-button:hover {
  color: var(--secondary);
}
.metric-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  margin-bottom: 28px;
}
.metric {
  padding: 0 23px;
  border-right: 1px solid var(--border);
}
.metric:first-child {
  padding-left: 0;
}
.metric:last-child {
  border: 0;
}
.metric > span {
  display: block;
  font-size: 13px;
  color: var(--secondary);
  margin-bottom: 9px;
}
.metric-line {
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.metric strong {
  font-size: 30px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1;
}
.metric small {
  color: var(--muted);
  font-size: 12px;
}
.metric .metric-sub {
  font: 12px var(--mono);
  color: var(--accent);
}
.metric .alert-number {
  color: var(--amber);
}
.metric .muted-number {
  color: var(--secondary);
}
.skeleton {
  display: block;
  width: 55px;
  background: var(--surface);
  color: transparent;
  border-radius: 3px;
  animation: shimmer 1.8s infinite;
}
.field-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 253px;
  gap: 28px;
  align-items: stretch;
}
.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 20px 22px 0;
  flex-wrap: wrap;
}
.panel-header .eyebrow {
  margin-bottom: 4px;
  font-size: 12px;
  font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
.subtle-tag {
  font: 12px var(--mono);
  color: var(--secondary);
  letter-spacing: 0;
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 5px 7px;
  white-space: nowrap;
}
.field-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  align-items: center;
  padding: 18px 22px 0;
}
.field-toolbar > .mono {
  color: var(--secondary);
  font-size: 12px;
}
.legend {
  display: flex;
  gap: 17px;
  color: var(--secondary);
  font-size: 12px;
  flex-wrap: wrap;
}
.legend-dot {
  display: inline-block;
  width: 14px;
  height: 0;
  border-radius: 0;
  margin-right: 6px;
  vertical-align: middle;
  border-top: 2px solid currentColor;
  background: none;
}
.olive {
  background: none;
  color: var(--accent);
}
.amber {
  background: none;
  color: var(--text);
  border-top-style: dotted;
}
.blue {
  background: none;
  color: var(--secondary);
  border-top-style: dashed;
}
.muted-dot {
  background: none;
  color: var(--muted);
  border-top-style: dashed;
}
.field-map {
  padding: 8px 16px 2px;
  min-height: 235px;
  display: flex;
  align-items: center;
}
.partition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}
.partition {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  padding: 16px;
  text-align: left;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 2px;
}
.partition:hover { border-color: var(--secondary); }
.partition.unmeasured { border-style: dashed; }
.partition.has-alert { border-style: dotted; border-color: var(--text); }
.partition.selected { outline: 2px solid var(--accent); outline-offset: -2px; }
.partition:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.partition strong { font-size: 17px; font-weight: 500; margin-top: 8px; overflow-wrap: anywhere; }
.partition-top, .partition-bottom { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; flex-wrap: wrap; color: var(--secondary); font-size: 12px; }
.partition-condition { font-size: 12px; }
.partition.has-alert .partition-condition { color: var(--text); font-weight: 600; }
.partition-crop { color: var(--secondary); font-size: 12px; margin-top: 3px; }
.partition-reading { display: flex; align-items: baseline; gap: 6px; font: 22px var(--mono); margin: 24px 0 10px; }
.partition-reading > span { color: var(--secondary); font: 12px var(--sans); }
.partition-bottom { margin-top: auto; }
@media (max-width: 1200px) { .partition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .partition-grid { grid-template-columns: 1fr; } }
.map-footer {
  margin: 0 22px;
  padding: 12px 0 15px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font: 12px var(--sans);
  letter-spacing: 0;
  color: var(--muted);
  flex-wrap: wrap;
}
.map-footer > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.map-footer svg {
  width: 11px;
  height: 11px;
}
.map-footer .text-button {
  font: 12px var(--sans);
  letter-spacing: 0;
  font-size: 13px;
  min-height: 32px;
}
.zone-inspector {
  padding: 6px 0;
}
.zone-inspector > .eyebrow {
  font-size: 12px;
  margin-bottom: 11px;
  font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
.inspector-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.inspector-title h2 {
  font-size: 23px;
}
.inspector-meta {
  font-size: 12px;
  color: var(--secondary);
  margin-bottom: 14px;
}
.source-tag {
  font: 12px var(--sans);
  color: var(--secondary);
  letter-spacing: 0;
  padding: 2px 4px;
  border: 1px solid var(--border);
  border-radius: 2px;
  white-space: nowrap;
}
.source-tag.simulator {
  color: var(--secondary);
  border-color: var(--border);
}
.sensor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  gap: 10px;
}
.sensor-row > div > span {
  display: block;
  color: var(--secondary);
  font-size: 13px;
}
.sensor-row > div > small {
  font: 12px var(--mono);
  color: var(--muted);
  margin-top: 2px;
  display: block;
}
.sensor-reading {
  font: 23px var(--mono);
  letter-spacing: -1px;
}
.sensor-reading small {
  font: 12px var(--mono);
  letter-spacing: 0;
  color: var(--secondary);
  margin-left: 3px;
}
.sensor-row.stale .sensor-reading {
  color: var(--secondary);
}
.stale-indicator {
  font: 12px var(--mono);
  color: var(--amber);
  letter-spacing: 0;
}
.inspector-footer {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.inspector-footer .text-button {
  font-size: 13px;
  min-height: 32px;
}
.status-badge {
  font-size: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--accent);
  white-space: nowrap;
}
.status-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.status-badge.offline {
  color: var(--secondary);
}
.status-badge.warning {
  color: var(--amber);
}
.status-badge.critical {
  color: var(--red);
}
.overview-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 253px;
  gap: 28px;
  margin-top: 28px;
}
.chart-panel .panel-header {
  padding-top: 17px;
  flex-wrap: wrap;
}
.chart-panel h2 {
  font-size: 15px;
}
.chart-legend {
  display: flex;
  gap: 17px;
  font-size: 12px;
  color: var(--secondary);
  padding: 12px 22px 0;
}
.chart-wrap {
  position: relative;
  height: 206px;
  margin: 15px 17px 3px;
}
.chart-wrap.large {
  height: 340px;
  margin: 25px 22px 10px;
}
.panel-footnote {
  font-size: 12px;
  color: var(--muted);
  padding: 9px 22px 13px;
  line-height: 1.7;
}
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.section-title .eyebrow {
  font-size: 12px;
  margin-bottom: 4px;
  font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
.section-title h2 {
  font-size: 16px;
}
.activity-panel > .section-title {
  padding-top: 3px;
}
.activity-panel > .section-title h2 {
  font-size: 14px;
}
.activity-panel > .section-title .text-button {
  font-size: 13px;
  min-height: 32px;
}
.alert-feed-item {
  padding: 15px 0;
  border-top: 1px solid var(--border);
  position: relative;
}
.alert-feed-item h3 {
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.severity-line {
  width: 4px;
  height: 4px;
  border-radius: 1px;
  background: var(--amber);
  flex-shrink: 0;
}
.severity-line.critical {
  background: var(--red);
}
.alert-feed-item p {
  font-size: 12px;
  color: var(--secondary);
  margin: 6px 0 7px;
  line-height: 1.7;
}
.alert-feed-item footer {
  display: flex;
  justify-content: space-between;
  font: 12px var(--mono);
  color: var(--muted);
}
.fleet-section {
  margin-top: 30px;
}
.table-wrap {
  overflow-x: auto;
  border-top: 1px solid var(--border);
  width: 100%;
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  white-space: nowrap;
}
th {
  font: 12px var(--mono);
  color: var(--muted);
  letter-spacing: 0;
  padding: 12px 12px;
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}
td {
  font-size: 12px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--border-soft);
  vertical-align: middle;
}
th:first-child,
td:first-child {
  padding-left: 0;
}
th:last-child,
td:last-child {
  padding-right: 0;
}
.table-wrap tr {
  transition: background 0.15s;
}
.table-wrap tbody tr:hover {
  background: var(--surface);
}
.rover-name {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rover-glyph {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  background: none;
  border-radius: 5px;
  color: var(--secondary);
}
.rover-glyph svg {
  width: 17px;
  height: 17px;
}
.rover-name strong {
  display: block;
  font-size: 14px;
  font-weight: 500;
}
.rover-name small {
  display: block;
  font: 12px var(--mono);
  color: var(--muted);
  margin-top: 2px;
}
.state-label {
  font: 12px var(--sans);
  color: var(--secondary);
  text-transform: capitalize;
}
.state-label.patrolling {
  color: var(--accent);
}
.state-label.error {
  color: var(--red);
}
.row-action {
  border: none;
  background: transparent;
  color: var(--secondary);
  font-size: 15px;
  padding: 5px;
  min-width: 40px;
  min-height: 40px;
}
.row-action:hover {
  color: var(--accent);
}
.table-link {
  background: none;
  border: 0;
  color: var(--text);
  padding: 0;
  text-align: left;
  cursor: pointer;
}
.table-link:hover strong {
  color: var(--accent);
}
.activity-section {
  margin-top: 29px;
}
.activity-log-row {
  display: grid;
  grid-template-columns: 85px 1fr 1.5fr auto;
  gap: 20px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 12px;
  color: var(--secondary);
}
.activity-log-row .mono {
  font-size: 12px;
}
.activity-log-row strong {
  font-weight: 400;
  color: var(--text);
}
.main-footer {
  margin-top: 37px;
  padding: 21px 0 24px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  color: var(--muted);
  font: 12px var(--sans);
  letter-spacing: 0;
}
.footer-slash {
  color: var(--secondary);
  margin: 0 10px;
}
.empty-state {
  padding: 38px 22px;
  text-align: center;
  color: var(--secondary);
  font-size: 12px;
  line-height: 1.7;
}
.empty-state small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
}
.empty-state svg {
  width: 27px;
  height: 27px;
  color: var(--muted);
  display: block;
  margin: 0 auto 10px;
}
.empty-inline {
  width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
}
.chart-empty {
  position: absolute;
  inset: 0;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  color: var(--secondary);
  font-size: 12px;
  gap: 7px;
}
.chart-empty small {
  color: var(--muted);
  font-size: 12px;
}
.error-banner {
  padding: 12px 16px;
  margin-bottom: 24px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 5px;
  color: var(--amber);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}
.error-banner .text-button {
  color: var(--amber);
  font-size: 13px;
  min-height: 32px;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: calc(50% + var(--sidebar) / 2);
  transform: translateX(-50%);
  max-width: calc(100% - 32px);
  padding: 12px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--secondary);
  border-radius: 5px;
  box-shadow: 0 8px 30px #0005;
  font-size: 12px;
  z-index: 100;
}
.toast.error {
  background: var(--surface);
  border-color: var(--border);
  color: var(--secondary);
}
input,
select {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text);
  min-height: 40px;
  padding: 8px 10px;
  font-size: 13px;
  max-width: 100%;
}
input::placeholder {
  color: var(--secondary);
}
select {
  padding-right: 25px;
  cursor: pointer;
}
.compact-select {
  font-size: 12px;
  min-height: 28px;
  padding: 5px 24px 5px 9px;
  background: var(--surface);
}
label {
  font-size: 12px;
  color: var(--secondary);
  display: block;
  margin-bottom: 6px;
}
form > label {
  margin-top: 17px;
}
fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  padding: 0 0 22px;
  border-bottom: 1px solid var(--border);
}
.search-field {
  position: relative;
  width: 350px;
  max-width: 100%;
}
.search-field svg {
  position: absolute;
  left: 11px;
  top: 11px;
  width: 15px;
  height: 15px;
  color: var(--muted);
}
.search-field input {
  width: 100%;
  padding-left: 35px;
}
.fleet-summary {
  display: flex;
  gap: 24px;
  padding: 22px 0;
  font-size: 12px;
  color: var(--secondary);
}
.fleet-summary b {
  font-family: var(--mono);
  color: var(--text);
  font-weight: 400;
  margin-right: 7px;
}
.fleet-full td {
  padding-top: 20px;
  padding-bottom: 20px;
}
.info-note {
  display: flex;
  gap: 12px;
  color: var(--muted);
  max-width: 750px;
  margin-top: 26px;
  font-size: 12px;
  line-height: 1.8;
}
.info-note svg {
  width: 16px;
  margin-top: 3px;
}
.expanded {
  margin-bottom: 28px;
}
.expanded .field-map {
  min-height: 290px;
}
.inspection-bar {
  height: 3px;
  background: var(--surface);
  overflow: hidden;
  border-radius: 2px;
  margin-top: 9px;
}
.inspection-bar > span {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 0.35s;
}
.inspection-progress {
  font-size: 12px;
  margin-top: 18px;
  color: var(--secondary);
}
.inspection-progress b {
  font: 12px var(--mono);
  color: var(--text);
}
.inline-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.analytics-toolbar {
  display: flex;
  align-items: flex-start;
  gap: 35px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 24px;
}
.analytics-toolbar label,
.zone-filter legend {
  margin-bottom: 9px;
  font-size: 12px;
}
.zone-filter > div {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}
.zone-filter label {
  position: relative;
  display: flex;
  gap: 5px;
  align-items: center;
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 8px 10px;
  min-height: 40px;
  font: 12px var(--sans);
  color: var(--secondary);
  margin: 0;
}
.zone-filter label:has(input:checked) {
  border-color: var(--border);
  color: var(--accent);
  background: var(--surface);
}
.zone-filter input {
  width: 16px;
  height: 16px;
  min-height: 0;
  accent-color: var(--accent);
  margin: 0 3px 0 0;
}
.metric-tabs {
  display: flex;
  gap: 0;
  overflow-x: visible;
  white-space: normal;
  margin: 23px 0 0;
  border-bottom: 1px solid var(--border);
  scrollbar-width: thin;
  flex-wrap: wrap;
}
.metric-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--secondary);
  font-size: 13px;
  padding: 11px 14px;
  background: transparent;
  min-height: 44px;
}
.metric-tab:first-child {
  padding-left: 0;
}
.metric-tab:hover {
  color: var(--text);
}
.metric-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.analytics-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 27px 0;
  gap: 20px;
}
.analytics-stat > span {
  font-size: 12px;
  display: block;
  color: var(--secondary);
  margin-bottom: 7px;
}
.analytics-stat strong {
  font: 26px var(--mono);
  font-weight: 400;
  letter-spacing: -1px;
}
.analytics-stat small {
  font: 12px var(--mono);
  color: var(--muted);
  margin-left: 6px;
}
.analytics-chart-panel .panel-header {
  padding-top: 22px;
  flex-wrap: wrap;
}
.load-more {
  display: flex;
  margin: 20px auto;
}
.segmented {
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  padding: 3px;
  border-radius: 5px;
  background: var(--surface);
}
.segmented button {
  border: 0;
  background: transparent;
  font-size: 13px;
  color: var(--secondary);
  padding: 7px 16px;
  border-radius: 3px;
  min-height: 38px;
}
.segmented button.active {
  background: var(--surface);
  color: var(--accent);
}
.alert-row {
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
}
.alert-row-head {
  display: flex;
  gap: 17px;
  align-items: flex-start;
}
.alert-symbol {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--amber);
  background: var(--surface);
}
.alert-symbol.critical {
  color: var(--red);
  border-color: var(--border);
  background: var(--surface);
}
.alert-main {
  flex: 1;
}
.alert-main h3 {
  font-size: 14px;
  margin-bottom: 5px;
}
.alert-main > p {
  font-size: 12px;
  color: var(--secondary);
  line-height: 1.7;
}
.alert-row-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font: 12px var(--mono);
  margin-top: 10px;
}
.alert-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
}
.alert-status {
  text-transform: uppercase;
  font: 12px var(--mono);
  letter-spacing: 0;
  color: var(--amber);
}
.alert-status.resolved {
  color: var(--accent);
}
.alert-status.acknowledged {
  color: var(--blue);
}
.alert-history {
  margin: 15px 0 0 47px;
}
.alert-history summary {
  font-size: 12px;
  color: var(--secondary);
  cursor: pointer;
}
.history-entry {
  display: flex;
  gap: 12px;
  padding: 10px 0 0 12px;
  border-left: 1px solid var(--border);
  font-size: 12px;
  color: var(--secondary);
}
.history-entry time {
  font-size: 12px;
  flex: 0 0 130px;
  color: var(--muted);
}
.report-controls {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.report-controls label {
  font-size: 12px;
}
.report-controls select {
  min-width: 160px;
}
.report-controls .button {
  margin-left: auto;
  min-height: 40px;
  font-size: 13px;
  padding: 9px 14px;
}
.report-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
}
.report-actions > p {
  font-size: 12px;
  line-height: 1.8;
}
.report-actions > div {
  display: flex;
  gap: 10px;
}
.report-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  margin-bottom: 25px;
  gap: 20px;
}
.report-banner h2 {
  font-size: 23px;
}
.report-banner .eyebrow {
  margin-bottom: 7px;
  font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
.report-banner p.muted {
  font-size: 12px;
  margin-top: 8px;
}
.report-count {
  font: 32px var(--mono);
  color: var(--accent);
  text-align: right;
}
.report-count small {
  font: 12px var(--sans);
  display: block;
  color: var(--secondary);
  margin-top: 3px;
}
.report-block {
  margin-bottom: 32px;
}
.report-block > h3 {
  margin-bottom: 15px;
}
.report-block th {
  font-size: 12px;
}
.report-sources {
  font: 12px var(--mono);
  color: var(--secondary);
  margin-top: 12px;
}
.report-note {
  border-left: 2px solid var(--border);
  padding: 3px 0 3px 15px;
  margin-top: 25px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--secondary);
}
dialog {
  position: fixed;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 28px;
  max-height: calc(100dvh - 40px);
  overflow: auto;
  box-shadow: 0 25px 100px #0008;
}
dialog::backdrop {
  background: rgb(10 10 10 / 80%);
}
.detail-dialog {
  margin: 20px 20px 20px auto;
  width: 600px;
  height: calc(100dvh - 40px);
  max-width: calc(100vw - 24px);
}
.rover-camera {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.camera-toolbar, .camera-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
}
.camera-toolbar h3 { font-size: 14px; font-weight: 500; }
.camera-toolbar .text-button { min-height: 32px; }
.camera-viewport {
  aspect-ratio: 4 / 3;
  background: #080808;
  display: grid;
  place-items: center;
  position: relative;
}
.camera-viewport img { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.camera-viewport p { color: var(--secondary); text-align: center; padding: 24px; font-size: 13px; }
.camera-footer { flex-wrap: wrap; font-size: 11px; color: var(--secondary); }
.camera-expanded {
  position: fixed;
  inset: 12px;
  z-index: 5;
  margin: 0;
  background: var(--surface, #161616);
  display: flex;
  flex-direction: column;
}
.camera-expanded .camera-viewport { flex: 1; min-height: 0; aspect-ratio: auto; }
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 19px;
}
.dialog-top .eyebrow {
  font-size: 12px;
  font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
.dialog-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
}
.dialog-heading .rover-glyph {
  width: 45px;
  height: 45px;
  border: 0;
  background: none;
  color: var(--secondary);
}
.dialog-heading .rover-glyph svg {
  width: 28px;
  height: 28px;
}
.dialog-heading h2 {
  font-size: 27px;
  letter-spacing: -0.7px;
}
.dialog-heading p {
  font: 12px var(--mono);
  color: var(--secondary);
  margin-top: 4px;
}
.detail-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.detail-meta dt {
  font-size: 12px;
  color: var(--muted);
}
.detail-meta dd {
  font-size: 12px;
  margin: 6px 0 0;
}
.detail-sensors {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0 23px;
}
.detail-sensors .sensor-row {
  display: block;
  padding: 14px 0;
}
.detail-sensors .sensor-reading {
  font-size: 20px;
  margin-top: 7px;
}
.detail-sensors .sensor-reading small {
  font-size: 12px;
}
.detail-section {
  margin-top: 24px;
}
.detail-section h3 {
  margin-bottom: 13px;
  font-size: 13px;
}
.command-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.assignment-form {
  display: flex;
  gap: 10px;
}
.assignment-form select {
  flex: 1;
}
.detail-caption {
  font-size: 12px;
  color: var(--muted);
  margin-top: 12px;
}
.detail-history {
  font-size: 12px;
}
.detail-history > div {
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  gap: 12px;
  color: var(--secondary);
}
.form-dialog {
  width: 430px;
  max-width: calc(100vw - 24px);
}
.form-dialog h2,
.rules-dialog h2 {
  font-size: 26px;
  letter-spacing: -0.7px;
}
.form-dialog > p,
.rules-dialog > p {
  font-size: 12px;
  margin-top: 10px;
  line-height: 1.8;
}
.form-dialog input,
.form-dialog select {
  width: 100%;
}
.form-dialog form > .button {
  width: 100%;
  margin-top: 20px;
  min-height: 40px;
  font-size: 13px;
  padding: 9px 14px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 17px;
}
.form-error {
  color: var(--red);
  font-size: 12px;
  margin-top: 12px;
}
.key-display {
  font: 12px/1.8 var(--mono);
  word-break: break-all;
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 14px;
  margin-top: 18px;
  color: var(--accent);
}
.rules-dialog {
  width: 720px;
  max-width: calc(100vw - 24px);
}
.rule-form {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) 90px 90px 75px;
  gap: 14px;
  align-items: end;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}
.rule-form label {
  font-size: 12px;
}
.rule-form input[type="number"] {
  width: 100%;
  font-family: var(--mono);
}
.rule-name {
  font-size: 12px;
}
.rule-name small {
  display: block;
  color: var(--muted);
  font: 12px var(--mono);
  margin-top: 5px;
}
.rule-enabled {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
}
.rule-enabled input {
  min-height: 0;
  accent-color: var(--accent);
  margin: 0;
}
.rule-enabled label {
  margin: 0;
}
.rules-dialog > .panel-footnote {
  padding: 20px 0 0;
}
.login-body {
  background: var(--surface);
}
.login-shell {
  max-width: 460px;
  min-height: 100dvh;
  padding: 40px 28px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.login-brand {
  grid-column: 1/-1;
  align-self: start;
  padding: 0;
}
.login-form {
  align-self: center;
  padding: 40px 0;
}
.login-form h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
  margin: 16px 0;
}
.login-form > .muted {
  font-size: 12px;
  max-width: 300px;
}
.login-form form {
  margin-top: 28px;
}
.login-form input {
  width: 100%;
  min-height: 42px;
}
.login-form .button {
  margin-top: 26px;
  width: 100%;
  justify-content: space-between;
  min-height: 40px;
  font-size: 13px;
  padding: 9px 14px;
}
.login-help {
  font-size: 12px;
  color: var(--muted);
  margin-top: 24px;
  line-height: 1.8;
}
.login-help code {
  font-size: 12px;
  color: var(--secondary);
}
.login-shell > footer {
  grid-column: 1/-1;
  display: flex;
  align-items: end;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: 20px;
  font: 12px var(--mono);
  letter-spacing: 0;
  color: var(--muted);
}
@keyframes shimmer {
  0%,
  100% {
    opacity: 0.35;
  }
  50% {
    opacity: 0.8;
  }
}
@keyframes appear {
  from {
    opacity: 0.3;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.page-section:not([hidden]) {
  animation: appear 0.22s ease-out;
}
@media (min-width: 1600px) {
  :root {
    --sidebar: 250px;
  }
  main {
    padding: 40px 48px 0;
  }
  .topbar {
    padding: 0 48px;
    height: 58px;
  font-size: 13px;
}
  .field-layout,
  .overview-lower {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 34px;
  }
  .field-map {
    padding: 16px 24px 10px;
  }
  .sensor-row {
    padding: 15px 0;
  }
  .sensor-reading {
    font-size: 27px;
  }
  .chart-wrap {
    height: 245px;
  }
  .nav-link {
    font-size: 13px;
    font-size: 14px;
  min-height: 44px;
  padding: 10px;
  border: 0;
}
  .workspace {
    font-size: 12px;
    margin: 24px 0 20px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 8px 20px;
  font-size: 13px;
  color: var(--secondary);
}
  .field-toolbar {
    padding-top: 22px;
  }
  .legend {
    font-size: 12px;
  }
  .field-map {
    min-height: 290px;
  }
}
@media (max-width: 1200px) {
  :root {
    --sidebar: 208px;
  }
  .sidebar {
    padding-left: 12px;
    padding-right: 12px;
    background: var(--surface);
  padding: 24px 16px 0;
  overflow-y: auto;
}
  .brand {
    font-size: 18px;
    font-size: 20px;
  letter-spacing: -0.4px;
}
  
  .workspace {
    font-size: 12px;
    margin: 24px 0 20px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 8px 20px;
  font-size: 13px;
  color: var(--secondary);
}
  .nav-link {
    font-size: 12px;
    gap: 9px;
    font-size: 14px;
  min-height: 44px;
  padding: 10px;
  border: 0;
}
  
  main {
    padding: 28px 25px 0;
  }
  .topbar {
    padding: 0 25px;
    height: 58px;
  font-size: 13px;
}
  .field-layout,
  .overview-lower {
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 20px;
  }
  .panel-header {
    padding-left: 17px;
    padding-right: 17px;
    flex-wrap: wrap;
}
  .field-toolbar {
    padding-left: 17px;
    padding-right: 17px;
  }
  .legend {
    gap: 9px;
    font-size: 12px;
  }
  .metric {
    padding: 0 15px;
  }
  .metric strong {
    font-size: 29px;
    font-size: 30px;
}
  .metric small {
    font-size: 12px;
    font-size: 12px;
}
  .field-map {
    padding: 10px;
    min-height: 230px;
  }
  .map-footer {
    margin: 0 15px;
    font-size: 12px;
    font: 12px var(--sans);
  letter-spacing: 0;
  flex-wrap: wrap;
}
  .map-footer svg {
    display: none;
  }
  .map-footer .text-button {
    font-size: 12px;
    font-size: 13px;
  min-height: 32px;
}
  .zone-inspector .sensor-row {
    padding: 10px 0;
  }
  .sensor-reading {
    font-size: 21px;
  }
  .sensor-row > div > span {
    font-size: 12px;
    font-size: 13px;
}
  .inspector-title h2 {
    font-size: 21px;
  }
  .alert-feed-item p {
    font-size: 12px;
  }
  .report-controls {
    gap: 12px;
  }
  .report-controls .button {
    margin-left: 0;
    min-height: 40px;
  font-size: 13px;
  padding: 9px 14px;
}
  .chart-legend {
    font-size: 12px;
    gap: 10px;
  }
  .topbar-right {
    gap: 13px;
  }
  h1 {
    font-size: 34px;
    font-size: 30px;
  letter-spacing: -0.7px;
}
}
@media (max-width: 1000px) {
  .field-layout,
  .overview-lower {
    grid-template-columns: 1fr;
  }
  .zone-inspector {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0 20px;
    padding: 10px 0 0;
  }
  .zone-inspector > .eyebrow,
  .zone-inspector > .inspector-title,
  .zone-inspector > .inspector-meta,
  .zone-inspector > .inspector-footer,
  .zone-inspector > .inspection-progress {
    grid-column: 1/-1;
  }
  .zone-inspector > .inspector-meta {
    margin-bottom: 5px;
  }
  .zone-inspector > .inspector-title {
    justify-content: flex-start;
    gap: 15px;
  }
  .sensor-row {
    padding: 14px 0 !important;
  }
  .zone-inspector > .inspector-footer {
    margin-top: 10px;
  }
  .activity-panel .alert-feed {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }
  .page-description {
    max-width: 350px;
    font-size: 14px;
  margin-top: 8px;
}
  
  .metric-strip {
    padding: 18px 0;
  }
  .metric small {
    display: none;
    font-size: 12px;
}
  .metric > span {
    font-size: 12px;
    font-size: 13px;
}
  .chart-wrap {
    height: 220px;
  }
  .field-map {
    min-height: 270px;
  }
  .analytics-toolbar {
    flex-direction: column;
    gap: 20px;
  }
  .toolbar > p {
    max-width: 230px;
    font-size: 12px;
  }
  .report-actions {
    align-items: flex-start;
  }
  .report-actions > div {
    flex-shrink: 0;
  }
  .login-shell {
    column-gap: 70px;
    padding: 35px 40px;
  }
  .login-form h1 {
    font-size: 32px;
    font-size: 30px;
  letter-spacing: -0.7px;
}
  .login-art > p {
    font-size: 21px;
  }
}
@media (max-width: 760px) {
  :root {
    --sidebar: 0px;
  }
  .sidebar {
    width: 230px;
    transform: translateX(-100%);
    transition: transform 0.2s;
    box-shadow: 20px 0 100px #0009;
    background: var(--surface);
  padding: 24px 16px 0;
  overflow-y: auto;
}
  .sidebar.open {
    transform: translateX(0);
  }
  .brand {
    font-size: 20px;
    font-size: 20px;
  letter-spacing: -0.4px;
}
  
  .nav-link {
    font-size: 12px;
    font-size: 14px;
  min-height: 44px;
  padding: 10px;
  border: 0;
}
  .workspace {
    font-size: 12px;
    margin: 24px 0 20px;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 0 8px 20px;
  font-size: 13px;
  color: var(--secondary);
}
  .main-shell {
    width: 100%;
    margin: 0;
    min-width: 0;
}
  .mobile-menu {
    display: inline-grid !important;
    font-size: 18px;
  }
  .topbar {
    height: 58px;
    padding: 0 20px;
    height: 58px;
  font-size: 13px;
}
  .breadcrumb {
    gap: 10px;
    font-size: 12px;
  }
  .breadcrumb > span:first-of-type,
  .breadcrumb > .slash {
    display: none;
  }
  .topbar-right {
    gap: 10px;
  }
  .topbar time {
    font-size: 12px;
  }
  .topbar-right .avatar,
  .topbar-separator {
    display: none;
  }
  .stream-state {
    font-size: 12px;
    font-size: 12px;
}
  main {
    padding: 25px 20px 0;
  }
  .page-heading {
    align-items: flex-start;
    margin-bottom: 24px;
    gap: 15px;
  }
  .page-heading .eyebrow {
    font-size: 12px;
    letter-spacing: 0;
    font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
  h1 {
    font-size: 29px;
    letter-spacing: -1px;
    font-size: 30px;
  letter-spacing: -0.7px;
}
  .page-description {
    font-size: 12px;
    max-width: 270px;
    line-height: 1.6;
    font-size: 14px;
  margin-top: 8px;
}
  .heading-actions {
    padding-top: 5px;
    align-items: center;
  flex-direction: row;
}
  
  .heading-actions .button {
    font-size: 12px;
    padding: 8px 10px;
    min-height: 32px;
    min-height: 40px;
  font-size: 13px;
  padding: 9px 14px;
}
  .heading-actions .button svg {
    display: none;
  }
  .metric-strip {
    grid-template-columns: repeat(5, 1fr);
    margin-bottom: 23px;
    gap: 0;
  }
  .metric {
    padding: 0 10px;
  }
  .metric > span {
    font-size: 12px;
    line-height: 1.5;
    min-height: 24px;
    margin-bottom: 7px;
    font-size: 13px;
}
  .metric strong {
    font-size: 26px;
    font-size: 30px;
}
  .metric .metric-sub {
    font-size: 12px;
    display: block;
    margin-top: 7px;
  }
  .metric-line {
    flex-direction: column;
    gap: 0;
  }
  .field-layout,
  .overview-lower {
    gap: 20px;
  }
  .field-map {
    min-height: 0;
    padding: 12px 9px 4px;
  }
  .panel-header {
    padding: 17px 15px 0;
    flex-wrap: wrap;
}
  .panel-header h2 {
    font-size: 15px;
  }
  .field-toolbar {
    padding: 16px 15px 0;
  }
  .legend {
    font-size: 12px;
    gap: 10px;
  }
  .subtle-tag {
    font-size: 12px;
    padding: 4px;
  }
  .field-toolbar > .mono {
    font-size: 12px;
  }
  .map-footer {
    font-size: 12px;
    font: 12px var(--sans);
  letter-spacing: 0;
  flex-wrap: wrap;
}
  .map-footer > span {
    gap: 0;
  }
  .zone-inspector {
    gap: 0 17px;
    padding-top: 1px;
  }
  .sensor-row {
    display: block;
  }
  .sensor-reading {
    font-size: 22px;
    margin-top: 5px;
  }
  .sensor-reading small {
    font-size: 12px;
  }
  .zone-inspector > .eyebrow {
    margin-bottom: 7px;
    font: 12px/1.5 var(--sans);
  letter-spacing: 0;
  font-size: 12px;
}
  .inspector-meta {
    font-size: 12px;
  }
  .inspector-footer {
    font-size: 12px;
  }
  .overview-lower {
    margin-top: 24px;
  }
  .chart-wrap {
    height: 200px;
    margin: 14px 10px 0;
  }
  .chart-legend {
    font-size: 12px;
    padding-left: 15px;
    gap: 12px;
  }
  .panel-footnote {
    font-size: 12px;
    padding-left: 15px;
  }
  .activity-panel .alert-feed {
    gap: 18px;
  }
  .fleet-section {
    margin-top: 25px;
  }
  th {
    font-size: 12px;
  }
  td {
    font-size: 12px;
  }
  .section-title .small-text {
    font-size: 12px;
    max-width: 200px;
    text-align: right;
  }
  .section-title h2 {
    font-size: 14px;
  }
  .table-wrap {
    scrollbar-width: thin;
  }
  table {
    min-width: 590px;
  }
  .main-footer {
    font-size: 12px;
    align-items: flex-start;
    line-height: 1.8;
    font: 12px var(--sans);
}
  .footer-slash {
    margin: 0 4px;
  }
  .activity-log-row {
    grid-template-columns: 68px 1fr auto;
    gap: 12px;
    font-size: 12px;
  }
  .activity-log-row .activity-measurement {
    display: none;
  }
  .toolbar {
    gap: 12px;
    flex-wrap: wrap;
  }
  .toolbar .search-field {
    width: 100%;
  }
  .toolbar > p {
    max-width: none;
  }
  .toolbar select {
    min-width: 130px;
  }
  .fleet-summary {
    gap: 18px;
    font-size: 12px;
  }
  .expanded .field-map {
    min-height: 0;
  }
  .expanded .inline-controls {
    gap: 6px;
    flex-wrap: wrap;
}
  .inline-controls select {
    font-size: 12px;
    max-width: 150px;
  }
  .analytics-toolbar {
    padding-bottom: 20px;
  }
  .zone-filter > div {
    gap: 5px;
  }
  .zone-filter label {
    padding: 6px 9px;
    font-size: 12px;
    min-height: 31px;
    min-height: 40px;
  font: 12px var(--sans);
}
  .analytics-stats {
    gap: 10px;
    padding: 23px 0;
  }
  .analytics-stat > span {
    font-size: 12px;
  }
  .analytics-stat strong {
    font-size: 23px;
  }
  .analytics-stat small {
    font-size: 12px;
    margin-left: 3px;
  }
  .metric-tab {
    font-size: 12px;
    padding: 10px;
    min-height: 44px;
  font-size: 13px;
}
  .chart-wrap.large {
    height: 270px;
    margin: 20px 12px 7px;
  }
  .alert-row-head {
    gap: 12px;
  }
  .alert-symbol {
    width: 25px;
    height: 27px;
  }
  .alert-symbol svg {
    width: 16px;
  }
  .alert-main h3 {
    font-size: 12px;
  }
  .alert-main > p {
    font-size: 12px;
  }
  .alert-actions .button {
    font-size: 12px;
    padding: 6px 8px;
    min-height: 30px;
    min-height: 40px;
  font-size: 13px;
  padding: 9px 14px;
}
  .alert-row-meta {
    font-size: 12px;
    gap: 10px;
  }
  .alert-history {
    margin-left: 37px;
  }
  .history-entry {
    flex-direction: column;
    gap: 4px;
  }
  .history-entry time {
    flex-basis: auto;
  }
  .report-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
  }
  .report-controls select,
  .report-controls input {
    width: 100%;
    min-width: 0;
    font-size: 12px;
  }
  .report-actions {
    flex-direction: column;
    gap: 13px;
  }
  .report-banner h2 {
    font-size: 20px;
  }
  .report-count {
    font-size: 27px;
  }
  .report-block table {
    min-width: 550px;
  }
  .rule-form {
    grid-template-columns: 1fr 75px 75px;
    gap: 10px;
  }
  .rule-form > .rule-name {
    grid-column: 1/-1;
  }
  .rule-form label {
    font-size: 12px;
  }
  .rules-dialog {
    padding: 23px;
  }
  .detail-dialog {
    margin: 10px 10px 10px auto;
    max-height: calc(100dvh - 20px);
    height: calc(100dvh - 20px);
    padding: 23px;
  }
  .detail-sensors {
    gap: 0 15px;
  }
  .detail-sensors .sensor-reading {
    font-size: 18px;
  }
  .detail-meta {
    gap: 12px;
  }
  .detail-meta dt {
    font-size: 12px;
  }
  .detail-meta dd {
    font-size: 12px;
  }
  .detail-heading h2 {
    font-size: 24px;
  }
  .detail-history > div {
    font-size: 12px;
  }
  .toast {
    left: 50%;
    font-size: 12px;
    width: max-content;
  }
  .login-shell {
    display: block;
    padding: 35px 28px;
    min-height: 100dvh;
    max-width: 460px;
  }
  .login-art {
    display: none;
  }
  .login-form {
    padding: 70px 0;
  }
  .login-form h1 {
    font-size: 36px;
    font-size: 30px;
  letter-spacing: -0.7px;
}
  .login-shell > footer {
    font-size: 12px;
    gap: 20px;
    padding-top: 20px;
  }
}
@media (max-width: 390px) {
  main {
    padding-left: 15px;
    padding-right: 15px;
  }
  .topbar {
    padding: 0 15px;
    height: 58px;
  font-size: 13px;
}
  .metric {
    padding: 0 6px;
  }
  .metric strong {
    font-size: 23px;
    font-size: 30px;
}
  .metric > span {
    font-size: 12px;
    font-size: 13px;
}
  .heading-actions .button {
    font-size: 12px;
    min-height: 40px;
  font-size: 13px;
  padding: 9px 14px;
}
  .page-heading .eyebrow {
    font-size: 12px;
    font: 12px/1.5 var(--sans);
  letter-spacing: 0;
}
  .legend {
    font-size: 12px;
    gap: 7px;
  }
  .sensor-reading {
    font-size: 20px;
  }
  .activity-panel .alert-feed {
    grid-template-columns: 1fr;
  }
  .report-controls {
    grid-template-columns: 1fr;
  }
  .detail-sensors {
    grid-template-columns: 1fr 1fr;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.navigation-backdrop { display: none; }
.navigation-close { display: none; }
.status-badge.critical, .alert-status { font-weight: 600; }
.alert-severity { display: block; margin-top: 4px; font-size: 12px; color: var(--text); }
.alert-symbol.critical { border-width: 2px; }
.legend .olive { border-top-style: solid; color: var(--text); }
.legend .amber { border-top-style: dotted; }
.legend .muted-dot { border-top-style: dashed; }
@media (max-width: 760px) {
  .sidebar { width: 260px; visibility: hidden; box-shadow: none; }
  .sidebar.open { visibility: visible; }
  .navigation-close { display: grid; position: absolute; top: 17px; right: 8px; }
  .navigation-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 25; border: 0; background: #0a0a0a; opacity: .8; }
  .sidebar .brand { font-size: 18px; gap: 6px; padding-right: 24px; }
  .page-heading { flex-wrap: wrap; }
  .page-description { max-width: none; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
  .metric, .metric:first-child { padding: 0; border: 0; }
  .metric > span { font-size: 13px; min-height: 0; }
  .metric small { display: block; }
  .metric-line { flex-direction: row; }
  .field-toolbar { align-items: flex-start; flex-wrap: wrap; }
  .field-map { overflow-x: auto; }
  .zone-inspector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-legend { flex-wrap: wrap; }
  .activity-log-row { grid-template-columns: 75px minmax(0, 1fr) auto; }
  .activity-log-row .mono { overflow-wrap: anywhere; }
  .report-actions > div { display: flex; flex-wrap: wrap; gap: 8px; }
  .alert-row-head { flex-wrap: wrap; }
  .alert-main { min-width: 0; }
  .alert-actions { flex-direction: row; align-items: center; margin-left: 37px; }
  .analytics-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-footer { flex-wrap: wrap; }
}

@media print {
  body {
    background: #ecebe3;
    color: #222;
  }
  .sidebar,
  .topbar,
  .page-heading,
  .main-footer,
  .report-controls,
  .report-actions > div,
  .toast,
  .error-banner {
    display: none !important;
  }
  .main-shell {
    width: 100%;
    margin: 0;
  }
  main {
    padding: 0;
    max-width: none;
  }
  #page-reports {
    display: block !important;
  }
  .page-section:not(#page-reports) {
    display: none !important;
  }
  .report-banner,
  .report-block,
  .report-note {
    break-inside: avoid;
  }
  table {
    min-width: 0 !important;
  }
  th,
  td,
  .muted,
  .report-count,
  .report-sources,
  .report-count small {
    color: #333 !important;
    border-color: #bbb !important;
  }
  .report-banner {
    border-color: #aaa;
  }
  .table-wrap {
    overflow: visible;
  }
  .report-count {
    font-size: 27px;
  }
  a {
    color: inherit;
  }
  .report-actions {
    padding: 0 0 15px;
  }
  .report-actions p {
    color: #444;
  }
  .report-banner h2::before {
    content: "AgriSentinel / ";
    font-size: 18px;
  }
  h2,
  h3 {
    color: #222;
  }
  .report-note {
    color: #444;
    border-color: #555;
  }
}

/* Farm assistant */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.chat-page .page-heading, .chat-page .main-footer { display: none; }
.chat-page main { padding-top: 24px; padding-bottom: 16px; }
#page-chatbot { max-width: 1120px; margin: 0 auto; }
.chat-topline { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--border-soft); }
.chat-topline h1 { font-size: 21px; font-weight: 500; letter-spacing: -.4px; margin-top: 4px; }
.chat-topline .eyebrow { font-size: 10px; color: var(--muted); }
.chat-top-actions { display: flex; align-items: center; gap: 8px; }
.chat-top-actions .button { min-height: 38px; }
.chat-language-current { color: var(--muted); font-size: 11px; }
.chat-text-view { height: calc(100dvh - 198px); min-height: 430px; display: flex; flex-direction: column; }
.chat-messages { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 28px 0; scrollbar-gutter: stable; }
.chat-welcome { display: flex; flex-direction: column; justify-content: center; min-height: 100%; width: min(100%, 740px); margin: 0 auto; padding: 40px 16px 64px; }
.chat-welcome h2 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.8px; font-weight: 400; line-height: 1.25; }
.chat-welcome > p { color: var(--muted); margin-top: 12px; }
.chat-suggestions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.chat-suggestions .button { background: transparent; color: var(--secondary); font-size: 12px; justify-content: space-between; gap: 22px; }
.chat-message { max-width: 740px; margin: 0 auto 28px; padding: 0 16px; }
.chat-message-label { font-size: 11px; font-weight: 500; color: var(--muted); margin-bottom: 8px; }
.chat-message-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.8; font-size: 15px; }
.chat-message-user { display: flex; flex-direction: column; align-items: flex-end; }
.chat-message-user .chat-message-text { max-width: 88%; background: #1b1d1c; border: 1px solid var(--border-soft); padding: 12px 18px; border-radius: 16px 16px 3px 16px; line-height: 1.6; }
.chat-message-assistant { padding-top: 2px; }
.chat-message-assistant .chat-message-label { color: var(--accent); }
.chat-thinking { display: flex; align-items: center; gap: 5px; height: 30px; }
.chat-thinking i { height: 5px; width: 5px; border-radius: 50%; background: var(--secondary); animation: chat-thinking 1.1s ease-in-out infinite; }
.chat-thinking i:nth-child(2) { animation-delay: .15s; }
.chat-thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-thinking { 0%, 70%, 100% { opacity: .25; transform: translateY(0); } 35% { opacity: 1; transform: translateY(-3px); } }
.chat-compose-wrap { width: min(100%, 760px); margin: 0 auto; flex-shrink: 0; padding-top: 10px; }
.chat-compose-wrap > .form-error { margin: 0 0 12px; }
.chat-composer { display: flex; align-items: flex-end; gap: 12px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; }
.chat-composer:focus-within { border-color: var(--secondary); }
.chat-composer textarea { flex: 1; width: 100%; min-width: 0; resize: none; min-height: 40px; max-height: 150px; background: transparent; border: 0; border-radius: 0; color: var(--text); padding: 9px 4px; font: 14px/1.5 var(--sans); outline: 0; }
.chat-composer textarea:disabled { opacity: .7; }
.chat-composer .chat-send { color: var(--bg); background: var(--text); border-radius: 8px; width: 40px; height: 40px; }
.chat-composer .chat-stop { border: 1px solid var(--border); width: 40px; height: 40px; border-radius: 8px; }
.chat-bottomline { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 10px; color: var(--muted); margin: 10px 4px 0; }
.chat-language-dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100dvh - 48px); padding: 32px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); }
.chat-language-dialog::backdrop { background: #000b; backdrop-filter: blur(6px); }
.language-dialog-heading .eyebrow { color: var(--muted); font-size: 10px; }
.language-dialog-heading h2 { font-size: 26px; margin: 10px 0; letter-spacing: -.6px; }
.language-dialog-heading > p:last-child { font-size: 13px; }
.chat-language-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 24px 0 20px; }
.language-option { display: grid; grid-template-columns: 1fr auto; padding: 12px 14px; text-align: left; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: var(--text); min-height: 72px; }
.language-option span { font-size: 16px; }
.language-option small { grid-column: 1; color: var(--muted); font-size: 11px; margin-top: 2px; }
.language-option svg { grid-column: 2; grid-row: 1 / 3; align-self: center; visibility: hidden; color: var(--accent); }
.language-option:hover, .language-option[aria-pressed="true"] { border-color: var(--accent); background: var(--bg); }
.language-option[aria-pressed="true"] svg { visibility: visible; }
.chat-voice-active .chat-topline, .chat-voice-active .error-banner { display: none; }
.chat-voice-view { display: flex; flex-direction: column; min-height: calc(100dvh - 112px); }
.voice-topline { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.voice-topline > .eyebrow { margin-right: auto; color: var(--muted); }
.voice-center { display: flex; flex: 1; flex-direction: column; justify-content: center; align-items: center; text-align: center; padding: 10px 0 32px; }
.voice-visualizer { width: clamp(230px, 38vh, 360px); max-width: 90vw; aspect-ratio: 1; position: relative; }
.voice-visualizer canvas { display: block; width: 100%; height: 100%; }
.voice-center-icon { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 30px; height: 30px; color: var(--secondary); }
.voice-center h2 { font-size: 23px; font-weight: 400; letter-spacing: -.3px; }
.voice-caption { max-width: 600px; min-height: 48px; max-height: 160px; overflow-y: auto; font-size: 14px; line-height: 1.8; color: var(--secondary); margin-top: 16px; white-space: pre-wrap; }
.voice-center > .form-error { margin-top: 14px; max-width: 520px; }
.voice-controls { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.voice-controls .button { min-height: 44px; border-radius: 24px; padding: 10px 20px; }
.voice-footnote { margin: 18px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
@media (max-width: 760px) {
  .chat-page main { padding: 16px; }
  .chat-topline { gap: 10px; padding-bottom: 16px; }
  .chat-topline h1 { font-size: 18px; }
  .chat-top-actions { gap: 6px; }
  .chat-top-actions .button { padding: 8px; font-size: 11px; gap: 6px; }
  .chat-language-current { display: none; }
  .chat-topline .eyebrow { display: none; }
  .chat-text-view { height: calc(100dvh - 158px); min-height: 380px; }
  .chat-message { padding: 0 4px; }
  .chat-message-text { font-size: 14px; }
  .chat-welcome { padding: 24px 4px 48px; }
  .chat-suggestions { flex-direction: column; align-items: stretch; max-width: 300px; }
  .chat-voice-view { min-height: calc(100dvh - 96px); }
  .voice-topline .button { font-size: 11px; padding: 8px; }
  .voice-visualizer { width: min(300px, 70vw); }
  .chat-language-dialog { padding: 24px; }
}
@media (max-width: 420px) {
  .chat-topline { align-items: flex-start; flex-direction: column; }
  .chat-top-actions { width: 100%; }
  .chat-top-actions #chat-new { margin-left: auto; }
  .chat-text-view { height: calc(100dvh - 200px); }
  .chat-language-options { gap: 6px; }
  .language-option { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { .chat-thinking i { animation: none; opacity: .65; } }
