/* Author: Dr. Eamon Conway | Timestamp: 2026-12-02 */
@font-face {
  font-family: "Material Symbols";
  src: url("./assets/material-symbols.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

:root {
  color-scheme: light;
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: #242528;
  background: #f4f4f5;
  font-synthesis: none;
  --surface: #fff;
  --ink: #242528;
  --muted: #5c5d63;
  --line: #e3e3e7;
  --brand-gold: #c2ae3d;
  --accent: #756012;
  --accent-soft: #faf6df;
  --nav: #17181a;
  --plot-line: #806913;
  --plot-fill-start: #c2ae3d42;
  --plot-fill-end: #c2ae3d06;
  --plot-grid: #e6e5e3;
  --map-fill: #e7e7e9;
  --map-boundary: #a8aab0;
  --radius: 14px;
  --mono: ui-monospace, "SF Mono", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, select { font: inherit; }
button, a, input, select { -webkit-tap-highlight-color: transparent; }
button { color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, canvas:focus-visible {
  outline: 2px solid #967917;
  outline-offset: 3px;
}
button:disabled { cursor: default; opacity: .48; }
h1, h2, h3, p { margin: 0; }
h1 {
  font-family: "Valonik Thin", Arial, "Helvetica Neue", sans-serif;
  font-size: clamp(1.85rem, 3vw, 2.45rem); line-height: 1.13; letter-spacing: -.045em; font-weight: 670;
}
h2 { font-size: 1.13rem; line-height: 1.3; letter-spacing: -.02em; font-weight: 660; }
h3 { font-size: 1rem; line-height: 1.35; }
.icon {
  font-family: "Material Symbols";
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  font-size: 20px;
  white-space: nowrap;
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  width: 1em;
  display: inline-block;
  overflow: hidden;
  flex: 0 0 1em;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0;
  margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link { position: fixed; left: 1rem; top: -6rem; z-index: 9; background: white; padding: .8rem; }
.skip-link:focus { top: 1rem; }
.app-shell { display: grid; grid-template-columns: 206px minmax(0, 1fr); min-height: 100dvh; }
.sidebar {
  position: sticky; top: 0; height: 100dvh;
  background: var(--nav); color: #e8f3ef;
  display: flex; flex-direction: column; padding: 26px 14px 20px;
}
.brand { display: grid; gap: 12px; padding: 0 8px; }
.brand img { display: block; width: 100%; max-width: 162px; height: auto; }
.brand div { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.brand strong { font-size: .94rem; letter-spacing: -.015em; color: #f5f4ef; }
.brand span { font-size: .76rem; color: #bfc0c3; }
.navigation { display: grid; gap: 5px; margin-top: 27px; }
.navigation a {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid transparent; padding: 11px 12px; border-radius: 8px;
  font-size: .9rem; font-weight: 540; color: #c6c6cb;
}
.navigation a:hover { background: #26272a; color: #fff; }
.navigation a[aria-current="page"] { background: #302b19; border-color: #4f4423; color: #fff8de; }
.navigation a[aria-current="page"] .icon { color: var(--brand-gold); }
.workspace { min-width: 0; }
.topbar {
  min-height: 64px; padding: 9px clamp(20px, 3vw, 42px); background: var(--surface);
  display: flex; justify-content: space-between; align-items: center; gap: 12px; border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: .9rem; font-weight: 650; letter-spacing: -.01em; }
.topbar-controls, .customer-control { display: flex; align-items: center; gap: 12px; }
.demo-label {
  padding: 5px 9px; border: 1px solid #e5e5e8; border-radius: 6px;
  background: #f6f6f7; color: #55565d; white-space: nowrap; font-size: .77rem;
}
.customer-control { position: relative; }
.customer-control select {
  appearance: none; min-width: 152px; max-width: min(44vw, 230px);
  background: #fff; border: 1px solid #dddddf; border-radius: 8px;
  color: var(--ink); padding: 8px 33px 8px 11px; font-size: .875rem; font-weight: 550;
}
.select-icon { position: absolute; right: 8px; color: var(--muted); pointer-events: none; font-size: 18px; }
.main { margin: 0 auto; max-width: 1570px; padding: 29px clamp(20px, 3vw, 42px) 24px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-heading p { color: var(--muted); margin-top: 7px; font-size: .95rem; line-height: 1.5; }
.periods {
  display: inline-flex; align-items: center; flex-wrap: wrap; padding: 3px; gap: 2px;
  background: #ebebed; border: 1px solid #e3e3e7; border-radius: 9px;
}
.periods button {
  background: none; border: 1px solid transparent; border-radius: 6px; padding: 6px 10px;
  color: #55565d; font-size: .83rem; font-weight: 550; white-space: nowrap;
}
.periods button[aria-pressed="true"] { background: white; border-color: #dedee1; color: #242528; box-shadow: 0 1px 2px #15151310; }
.periods button:hover:not([aria-pressed="true"]) { background: #e1e1e5; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat {
  min-width: 0; padding: 15px 16px 16px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
.stat.lead { background: #242427; border-color: #242427; color: white; }
.stat-head { display: flex; align-items: center; justify-content: space-between; gap: 4px; }
.stat-head span:first-child { font-size: .88rem; font-weight: 600; }
.stat-icon {
  display: grid; place-items: center; width: 29px; height: 29px; border-radius: 8px;
  background: var(--accent-soft); color: var(--accent); flex: none;
}
.stat-icon .icon { font-size: 17px; }
.lead .stat-icon { background: #3d3620; color: var(--brand-gold); }
.stat-value { margin-top: 9px; font-size: clamp(1.4rem, 3vw, 2.15rem); font-weight: 670; letter-spacing: -.05em; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat p { margin-top: 6px; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.lead .stat-value { color: #ebd577; }
.lead p { color: #dedad0; }
.panel {
  min-width: 0; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 17px; }
.panel-head p { color: var(--muted); font-size: .87rem; margin-top: 4px; line-height: 1.45; }
.panel-rule { border-bottom: 1px solid var(--line); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.9fr) minmax(290px, 1fr); gap: 16px; margin-bottom: 16px; }
.chart-shell { position: relative; padding: 0 15px 11px 7px; }
.chart-canvas { display: block; width: 100%; height: 221px; }
.chart-tooltip {
  position: absolute; top: 2px; left: 12px; pointer-events: none; z-index: 2;
  background: #2a2722; color: #fff; font-size: .81rem; border-radius: 6px; padding: 6px 9px;
  white-space: nowrap;
}
.chart-tooltip[hidden] { display: none; }
.chart-unit { font-size: .81rem; color: var(--muted); white-space: nowrap; }
.machine-list { display: grid; }
.machine-line {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  border: 0; border-top: 1px solid var(--line); background: #fff;
  text-align: left; padding: 11px 16px; min-width: 0;
}
.machine-line:hover { background: #f7f7f8; }
.machine-line[aria-pressed="true"] { background: var(--accent-soft); }
.machine-line strong, .row-link { display: block; font-size: .88rem; font-weight: 650; }
.machine-line small, .under { display: block; color: var(--muted); font-size: .8rem; margin-top: 4px; }
.tag {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 5px;
  white-space: nowrap; font-size: .77rem; font-weight: 640; line-height: 1.35;
}
.tag::before, .legend-dot { content: ""; width: 6px; height: 6px; border-radius: 50%; flex: 0 0 6px; background: currentColor; }
.tag.healthy { color: #16634f; background: #e8f5ec; }
.tag.attention { color: #884b12; background: #fcf0de; }
.tag.stale { color: #586271; background: #edf0f5; }
.button-link {
  background: #fff; color: var(--accent); border: 1px solid #e4dfc9; border-radius: 7px;
  padding: 7px 10px; font-size: .82rem; line-height: 1.35; font-weight: 640; white-space: nowrap;
}
.button-link:hover { background: var(--accent-soft); }
.table-wrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; text-align: left; }
th, td { padding: 9px 16px; white-space: nowrap; border-bottom: 1px solid #eaeaec; }
thead { background: #f7f7f8; }
th { color: var(--muted); font-size: .8rem; font-weight: 630; }
td { color: #45464c; font-size: .875rem; }
tbody tr:last-child td { border-bottom: 0; }
.interactive-table tbody tr:hover, tr.selected { background: #faf7ea; }
.row-link { border: 0; padding: 0; background: none; color: var(--accent); text-align: left; }
.row-link:hover { text-decoration: underline; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: .8rem; }
.empty {
  padding: 28px 17px; color: var(--muted); font-size: .92rem; line-height: 1.5;
}
.fleet-summary { margin-top: 16px; }
.detail-grid { padding: 0 16px 17px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.datum { min-width: 0; padding: 10px 11px; background: #f7f7f8; border: 1px solid var(--line); border-radius: 8px; }
.datum dt { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.datum dd { margin: 4px 0 0; font-size: .9rem; font-weight: 630; line-height: 1.4; overflow-wrap: anywhere; }
.resource { min-width: 74px; }
.bar { display: block; height: 4px; background: #eaeaec; border-radius: 4px; margin-top: 5px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: #a99539; border-radius: 4px; }
.bar.warn > span { background: #b97731; }
.search-control { position: relative; display: block; margin-bottom: 13px; max-width: 530px; }
.search-control .icon { position: absolute; left: 11px; top: 11px; color: var(--muted); }
.search-control input {
  width: 100%; border: 1px solid #dddddf; background: #fff; padding: 10px 12px 10px 37px;
  border-radius: 8px; color: var(--ink); font-size: .9rem;
}
.scan-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.14fr); gap: 16px; align-items: start; }
.scan-controls { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding: 10px 12px; gap: 5px; }
.scan-controls span { color: var(--muted); font-size: .81rem; text-align: center; }
.spectrum-canvas { height: 258px; }
.scan-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0 16px 16px; gap: 9px; }
.map-layout { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(270px, .9fr); gap: 16px; align-items: start; }
.map-field {
  position: relative; min-height: 260px; aspect-ratio: 1.7;
  margin: 0 13px; border: 1px solid #e0e0e4;
  border-radius: 9px; overflow: hidden;
  background-color: #f4f4f6;
  background-image: linear-gradient(90deg, #d7d8dd36 1px, transparent 1px), linear-gradient(#d7d8dd36 1px, transparent 1px);
  background-size: 36px 36px;
}
.map-field canvas, .map-pins { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin {
  display: grid; place-items: center; position: absolute; width: 31px; height: 31px;
  transform: translate(-50%, -50%); background: transparent;
  border: 0; border-radius: 100%; color: #19846a; z-index: 1;
}
.pin::before {
  content: ""; width: 12px; height: 12px; border-radius: 100%; border: 2px solid #fff;
  box-sizing: content-box; background: currentColor; box-shadow: 0 1px 4px #203e3c55;
}
.pin.attention { color: #b96c2a; }
.pin.stale { color: #667384; }
.pin:hover, .pin:focus-visible, .pin[aria-pressed="true"] { background: #27252826; z-index: 2; }
.pin[aria-pressed="true"]::before { width: 15px; height: 15px; box-shadow: 0 0 0 2px currentColor; }
.map-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 7px 15px; padding: 10px 14px 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 12px; }
.legend-label { display: flex; align-items: center; gap: 5px; font-size: .78rem; color: var(--muted); }
.legend-dot.healthy { color: #19846a; }.legend-dot.attention { color: #b96c2a; }.legend-dot.stale { color: #667384; }
.map-source { color: var(--muted); font-size: .75rem; }
.map-state { position: absolute; top: 12px; left: 12px; color: var(--muted); font-size: .85rem; }
.location-details { display: grid; gap: 10px; padding: 12px 16px 15px; }
.location-header { display: flex; justify-content: space-between; align-items: start; gap: 5px; }
.location-list { margin-top: 13px; }
.location-list p { font-size: .85rem; color: var(--muted); margin-top: 4px; }
.footer { max-width: 1570px; text-align: right; padding: 0 clamp(20px, 3vw, 42px) 19px; margin: 0 auto; color: var(--muted); font-size: .77rem; }

@media (max-width: 1130px) {
  .app-shell { grid-template-columns: 177px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .overview-grid { grid-template-columns: minmax(0, 1.55fr) minmax(255px, 1fr); }
  .map-layout { grid-template-columns: minmax(0, 1.7fr) minmax(230px, 1fr); }
}
@media (max-width: 900px) {
  .overview-grid, .scan-grid, .map-layout { grid-template-columns: minmax(0, 1fr); }
  .stat-grid, .detail-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .machine-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .machine-line:nth-child(even) { border-left: 1px solid var(--line); }
}
@media (max-width: 650px) {
  .app-shell { display: block; }
  .sidebar { position: static; min-height: 0; height: auto; padding: 12px 14px 9px; }
  .brand { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding-inline: 1px; }
  .brand img { max-width: min(42vw, 147px); }
  .brand div { justify-content: flex-end; }
  .navigation { display: flex; margin-top: 11px; gap: 1px; }
  .navigation a { flex: 1; justify-content: center; gap: 5px; font-size: .83rem; padding: 8px 4px; }
  .navigation a .icon { font-size: 17px; }
  .topbar { min-height: 52px; padding-inline: 14px; }
  .topbar-controls { gap: 6px; }
  .topbar-title { font-size: .8rem; }
  .customer-control select { min-width: 0; padding-left: 8px; }
  .demo-label { padding-inline: 5px; }
  .main { padding: 19px 13px 15px; }
  .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 14px; gap: 9px; }
  .stat-grid, .overview-grid, .scan-grid, .map-layout { gap: 10px; }
  .stat { padding: 10px 10px 11px; }
  .stat-head span:first-child { font-size: .81rem; }
  .stat-value { margin-top: 5px; }
  .stat p { font-size: .77rem; }
  .stat-icon { width: 25px; height: 25px; }
  .panel-head { padding: 12px 13px; }
  .machine-line { padding: 10px 12px; }
  .machine-list { grid-template-columns: minmax(0, 1fr); }
  .machine-line:nth-child(even) { border-left: 0; }
  .chart-canvas { height: 190px; }
  .spectrum-canvas { height: 227px; }
  .map-field { min-height: 235px; margin: 0 9px; }
  th, td { padding-inline: 11px; }
}
.signin {
  max-width: 520px;
  padding: 28px;
}
.signin h1 { margin-top: 0; }
.signin p { color: var(--muted); }
.primary-action {
  padding: 8px 18px;
  border: 1px solid var(--brand-gold);
  border-radius: 6px;
}
.spectrum-controls { padding-top: 0; padding-bottom: 4px; flex-wrap: wrap; }
.tx-control { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; }
.tx-control select { color: inherit; background: transparent; border: 1px solid var(--line); padding: 4px; border-radius: 4px; }
