:root {
  color-scheme: light;
  --bg: #f4f7f9;
  --surface: #ffffff;
  --surface-strong: #e8eef2;
  --ink: #1f2528;
  --muted: #68757c;
  --line: #cfd9df;
  --green: #27704b;
  --green-soft: #e5f2eb;
  --blue: #245c8f;
  --blue-soft: #e7f0f8;
  --amber: #8a5a12;
  --amber-soft: #f9ecd2;
  --red: #a33a2f;
  --red-soft: #f7e2df;
  --violet: #6a4c93;
  --violet-soft: #eee8f7;
  --shadow: 0 10px 30px rgba(31, 37, 40, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
}

button,
input,
select {
  font: inherit;
}

button {
  min-height: 38px;
  border: 1px solid #1f5d43;
  border-radius: 6px;
  padding: 0 14px;
  background: var(--green);
  color: #ffffff;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  filter: brightness(0.96);
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

button.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

button.danger {
  border-color: #883127;
  background: var(--red);
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--ink);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-strong);
  color: #3d403a;
  font-size: 0.84rem;
}

td {
  font-size: 0.92rem;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 1.35rem;
  line-height: 1.15;
}

h2 {
  font-size: 1rem;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 76px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.eyebrow,
.subtle,
.muted,
.field span,
.limits span {
  color: var(--muted);
  font-size: 0.84rem;
}

.status-cluster {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.approval-status,
.deployment-status,
.server-status {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.88rem;
}

.approval-status[data-state="saved"] {
  border-color: #9bc4ab;
  background: var(--green-soft);
  color: #174a31;
}

.deployment-status[data-tone="success"],
.server-status[data-state="running"] {
  border-color: #9bc4ab;
  background: var(--green-soft);
  color: #174a31;
}

.deployment-status[data-tone="warning"],
.server-status[data-state="checking"] {
  border-color: #e7c48e;
  background: var(--amber-soft);
  color: var(--amber);
}

.deployment-status[data-tone="error"],
.server-status[data-state="down"] {
  border-color: #dfa49c;
  background: var(--red-soft);
  color: var(--red);
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  min-height: calc(100vh - 76px);
}

.control-pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: #f9fbfc;
}

.workspace {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  padding: 18px;
}

.tool-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.tool-panel > h2,
.tool-panel > .panel-heading,
.tool-panel > .field,
.tool-panel > .day-grid,
.tool-panel > .limits,
.tool-panel > .button-stack,
.tool-panel > .status-line,
.tool-panel > .deploy-output,
.tool-panel > .label-buttons,
.tool-panel > .spot-zone-list,
.tool-panel > .live-summary,
.tool-panel > .live-columns,
.tool-panel > .projection-summary {
  margin: 14px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.field {
  display: grid;
  gap: 6px;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.day-toggle {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.day-toggle.selected {
  border-color: #1e6a96;
  background: var(--blue);
  color: #ffffff;
}

.limits {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--line);
  padding-top: 12px;
  gap: 10px;
}

.limits div {
  display: grid;
  gap: 2px;
}

.button-stack {
  display: grid;
  gap: 8px;
}

.status-line {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.9rem;
}

.status-line[data-tone="success"] {
  color: var(--green);
}

.status-line[data-tone="warning"] {
  color: var(--amber);
}

.status-line[data-tone="error"] {
  color: var(--red);
}

.multiline,
.deploy-output {
  white-space: pre-wrap;
}

.deploy-output {
  min-height: 74px;
  max-height: 220px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #f8fafb;
  color: #3a4449;
  font-size: 0.82rem;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 10px;
}

.metric {
  display: grid;
  gap: 5px;
  min-height: 76px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: var(--surface);
}

.metric.compact-metric {
  min-height: 64px;
}

.metric span {
  color: var(--muted);
  font-size: 0.8rem;
}

.metric strong {
  align-self: end;
  font-size: 1rem;
  line-height: 1.2;
}

.alert-band {
  display: grid;
  gap: 8px;
}

.alert,
.ok {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.92rem;
}

.alert {
  border: 1px solid #e7c48e;
  background: var(--amber-soft);
  color: var(--amber);
}

.ok {
  border: 1px solid #9bc4ab;
  background: var(--green-soft);
  color: #174a31;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(320px, 0.9fr) minmax(420px, 1.1fr);
  gap: 16px;
  align-items: start;
}

.inline-controls {
  display: grid;
  grid-template-columns: 110px 140px;
  gap: 8px;
}

.inline-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.table-wrap {
  width: 100%;
  max-width: 100%;
  max-height: 520px;
  overflow: auto;
}

.table-wrap.compact {
  max-height: 420px;
}

.metadata-wrap {
  max-height: 560px;
}

.tag {
  display: inline-block;
  margin: 0 5px 5px 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 8px;
  background: #f7f5ee;
  color: #30332e;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.tag.feed {
  border-color: #9bc4ab;
  background: var(--green-soft);
  color: #174a31;
}

.tag.sprinkler {
  border-color: #9dbdd5;
  background: var(--blue-soft);
  color: #1d486f;
}

.tag.disabled {
  border-color: #c9c9c9;
  background: #eef0f1;
  color: #5d666b;
}

.tag.newly-seeded {
  border-color: #9bc4ab;
  background: var(--green-soft);
  color: #174a31;
}

.tag.steep-hill {
  border-color: #b59ed6;
  background: var(--violet-soft);
  color: var(--violet);
}

.tag.super-dry {
  border-color: #e7c48e;
  background: var(--amber-soft);
  color: var(--amber);
}

.tag.online,
.tag.idle {
  border-color: #9bc4ab;
  background: var(--green-soft);
  color: #174a31;
}

.tag.offline,
.tag.unknown {
  border-color: #dfa49c;
  background: var(--red-soft);
  color: var(--red);
}

.tag.watering {
  border-color: #9dbdd5;
  background: var(--blue-soft);
  color: #1d486f;
}

.tag.stale {
  border-color: #e7c48e;
  background: var(--amber-soft);
  color: var(--amber);
}

.live-state-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

button.table-action-button {
  min-height: 26px;
  padding: 0 8px;
  font-size: 0.78rem;
}

tr.is-disabled {
  opacity: 0.68;
}

.block {
  display: block;
  margin-top: 3px;
}

.flag-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, 1fr));
  gap: 6px;
}

.mini-check,
.switch-line,
.spot-zone {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.mini-check input,
.switch-line input,
.spot-zone input {
  width: auto;
  min-height: 0;
}

.mini-check span,
.switch-line span {
  font-size: 0.82rem;
  white-space: nowrap;
}

.tight-input {
  min-width: 76px;
}

.label-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spot-zone-list {
  display: grid;
  gap: 7px;
  max-height: 320px;
  overflow: auto;
}

.spot-zone {
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #f8fafb;
}

.spot-zone span {
  display: grid;
  gap: 2px;
}

.spot-zone small {
  color: var(--muted);
}

.projection-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.live-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}

.live-columns {
  grid-template-columns: minmax(320px, 0.8fr) minmax(460px, 1.2fr);
}

.schedule-timeline {
  display: grid;
  gap: 6px;
  padding: 0 14px 16px;
  overflow-x: auto;
}

.timeline-ticks {
  position: relative;
  height: 24px;
  margin-left: 224px;
  border-bottom: 1px solid var(--line);
  min-width: 720px;
}

.timeline-ticks span {
  position: absolute;
  bottom: 4px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.74rem;
}

.timeline-row {
  display: grid;
  grid-template-columns: 210px minmax(720px, 1fr);
  gap: 14px;
  align-items: center;
}

.timeline-label {
  display: grid;
  gap: 2px;
  min-width: 0;
  font-size: 0.82rem;
}

.timeline-label strong,
.timeline-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-label span {
  color: var(--muted);
}

.timeline-track {
  position: relative;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafb;
  overflow: hidden;
}

.timeline-bar {
  position: absolute;
  top: 4px;
  bottom: 4px;
  min-width: 4px;
  border-radius: 4px;
  color: #ffffff;
  overflow: hidden;
}

.timeline-bar.feed {
  background: var(--green);
}

.timeline-bar.sprinkler {
  background: var(--blue);
}

.timeline-bar.disabled {
  background: #8b969d;
}

.timeline-bar span {
  display: block;
  padding: 3px 5px;
  font-size: 0.7rem;
  line-height: 1;
  white-space: nowrap;
}

.system-map {
  padding: 6px 14px 16px;
  overflow-x: auto;
}

.system-map ul {
  position: relative;
  margin: 0;
  padding: 0 0 0 18px;
  list-style: none;
}

.system-map ul ul {
  margin-top: 8px;
  border-left: 2px solid var(--line);
}

.system-map li {
  position: relative;
  padding: 0 0 8px 12px;
}

.system-map li::before {
  content: "";
  position: absolute;
  top: 20px;
  left: 0;
  width: 12px;
  border-top: 2px solid var(--line);
}

.map-item {
  display: grid;
  gap: 3px;
  min-width: 230px;
  max-width: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
}

.map-item span {
  color: var(--muted);
  font-size: 0.78rem;
}

.map-item.source {
  border-color: #bca66e;
  background: #fbf2dc;
}

.map-item.feed {
  border-color: #9bc4ab;
  background: var(--green-soft);
}

.map-item.sprinkler {
  border-color: #9dbdd5;
  background: var(--blue-soft);
}

@media (max-width: 1100px) {
  .layout,
  .two-column {
    grid-template-columns: 1fr;
  }

  .status-cluster {
    justify-content: flex-start;
  }

  .control-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-band {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .flag-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .summary-band {
    grid-template-columns: 1fr 1fr;
  }

  .day-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  th,
  td {
    padding: 9px 8px;
  }
}

:root {
  --bg: #061a1f;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(229, 241, 235, 0.92);
  --ink: #132025;
  --muted: #66767b;
  --line: rgba(80, 113, 116, 0.24);
  --green: #1f7a52;
  --green-soft: #e1f4e8;
  --blue: #2677a8;
  --blue-soft: #e1eff7;
  --amber: #9a6514;
  --amber-soft: #fff0cf;
  --red: #a33a2f;
  --red-soft: #f8e2df;
  --violet: #6c4aa8;
  --violet-soft: #eee8fb;
  --shadow: 0 18px 54px rgba(2, 16, 20, 0.18);
}

body {
  position: relative;
  background:
    linear-gradient(180deg, rgba(4, 20, 25, 0.62), rgba(8, 41, 43, 0.82)),
    url("../../design/concepts/shenandoah-property-reference.png") center 18% / cover fixed;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 16% 8%, rgba(255, 236, 183, 0.28), transparent 25%),
    linear-gradient(90deg, rgba(3, 33, 41, 0.42), rgba(6, 45, 51, 0.08) 48%, rgba(3, 33, 41, 0.5));
  pointer-events: none;
}

button {
  border-color: rgba(25, 109, 76, 0.68);
  border-radius: 7px;
  background: linear-gradient(180deg, #27915f, #1d714c);
  box-shadow: 0 7px 18px rgba(24, 94, 71, 0.18);
}

button.secondary {
  border-color: rgba(87, 121, 124, 0.28);
  background: rgba(255, 255, 255, 0.82);
  color: #16272c;
  box-shadow: none;
}

input,
select {
  border-color: rgba(87, 121, 124, 0.28);
  background: rgba(255, 255, 255, 0.86);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid rgba(231, 244, 239, 0.18);
  background: rgba(7, 29, 34, 0.76);
  color: #f6fbf8;
  backdrop-filter: blur(18px) saturate(1.2);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-logo {
  display: block;
  width: 108px;
  height: 50px;
  flex: 0 0 auto;
  object-fit: contain;
}

.brand-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(209, 238, 227, 0.34);
  border-radius: 50%;
  background: linear-gradient(145deg, rgba(76, 166, 178, 0.86), rgba(31, 122, 82, 0.88));
  color: #ffffff;
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 12px 30px rgba(6, 31, 37, 0.24);
}

.topbar .eyebrow {
  color: rgba(233, 248, 241, 0.76);
  letter-spacing: 0;
  text-transform: uppercase;
}

.topbar h1 {
  color: #ffffff;
  font-size: 1.5rem;
}

.topbar .approval-status,
.topbar .deployment-status,
.topbar .server-status {
  border-color: rgba(233, 248, 241, 0.22);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(246, 251, 248, 0.88);
}

.layout {
  grid-template-columns: minmax(300px, 340px) minmax(0, 1fr);
}

.control-pane {
  position: sticky;
  top: 77px;
  height: calc(100vh - 77px);
  overflow: auto;
  border-right-color: rgba(232, 244, 239, 0.18);
  background: rgba(5, 28, 34, 0.62);
  backdrop-filter: blur(20px) saturate(1.15);
}

.workspace {
  padding: 20px;
}

.tool-panel,
.metric {
  border-color: rgba(221, 239, 233, 0.36);
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px) saturate(1.12);
}

.control-pane .tool-panel {
  background: rgba(248, 253, 250, 0.88);
}

.tool-panel {
  overflow: hidden;
}

.panel-heading h2,
.tool-panel > h2 {
  color: #12272d;
}

.summary-band {
  grid-template-columns: repeat(6, minmax(112px, 1fr));
}

.metric {
  min-height: 80px;
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(236, 248, 242, 0.84)),
    rgba(255, 255, 255, 0.85);
}

.metric strong {
  color: #12272d;
  font-size: 1.08rem;
}

.ok {
  border-color: rgba(103, 179, 128, 0.42);
  background: rgba(224, 246, 232, 0.88);
}

.alert {
  border-color: rgba(219, 169, 87, 0.48);
  background: rgba(255, 240, 207, 0.9);
}

.topology-panel {
  border: 1px solid rgba(232, 244, 239, 0.36);
  background: rgba(8, 34, 40, 0.48);
  color: #f6fbf8;
}

.topology-panel .panel-heading {
  margin: 16px 18px 12px;
}

.topology-panel h2 {
  color: #ffffff;
  font-size: 1.12rem;
}

.topology-panel .subtle {
  color: rgba(239, 249, 245, 0.72);
}

.map-heading-tools {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.topology-mode-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border: 1px solid rgba(238, 249, 244, 0.2);
  border-radius: 999px;
  padding: 3px;
  background: rgba(3, 22, 28, 0.48);
  box-shadow: inset 0 0 18px rgba(179, 229, 221, 0.05);
}

.topology-mode-switch button {
  min-height: 26px;
  border: 0;
  border-radius: 999px;
  padding: 0 10px;
  background: transparent;
  color: rgba(235, 248, 244, 0.72);
  font-size: 0.68rem;
  font-weight: 900;
  box-shadow: none;
}

.topology-mode-switch button:hover,
.topology-mode-switch button.active {
  background: rgba(205, 242, 232, 0.16);
  color: #f7fffb;
}

.topology-mode-switch button.active {
  box-shadow: 0 0 18px rgba(119, 232, 196, 0.16);
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  max-width: 520px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(238, 249, 244, 0.22);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(246, 251, 248, 0.88);
  font-size: 0.76rem;
  font-weight: 800;
}

.map-legend span::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #d8ba63;
}

.map-legend span:nth-child(2)::before {
  background: #3fb274;
}

.map-legend span:nth-child(3)::before {
  background: #58a9d4;
}

.map-legend span:nth-child(4)::before {
  background: #f2a83e;
}

.map-legend span:nth-child(5)::before {
  background: #9df5cf;
  box-shadow: 0 0 12px rgba(157, 245, 207, 0.8);
}

.system-map {
  padding: 0 18px 18px;
  overflow: auto;
}

.topology-canvas {
  position: relative;
  min-width: 980px;
  min-height: 640px;
  border: 1px solid rgba(229, 247, 240, 0.24);
  border-radius: 8px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(3, 22, 27, 0.42), rgba(3, 22, 27, 0.04) 42%, rgba(3, 22, 27, 0.42)),
    url("../../design/concepts/shenandoah-property-reference.png") center 47% / cover;
  box-shadow: inset 0 0 90px rgba(0, 0, 0, 0.22);
  isolation: isolate;
}

.topology-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    linear-gradient(180deg, rgba(3, 22, 27, 0.1), rgba(3, 22, 27, 0.54)),
    radial-gradient(circle at 52% 28%, rgba(255, 244, 205, 0.2), transparent 24%);
  pointer-events: none;
}

.topology-wash {
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.topology-wash.river {
  right: -8%;
  bottom: -15%;
  width: 58%;
  height: 52%;
  border-radius: 50% 0 0 0;
  background: linear-gradient(135deg, transparent 35%, rgba(84, 166, 190, 0.38), rgba(31, 103, 141, 0.28));
  transform: rotate(-8deg);
  filter: blur(2px);
}

.topology-wash.ridge {
  left: -6%;
  top: -12%;
  width: 70%;
  height: 56%;
  background: radial-gradient(ellipse, rgba(93, 150, 83, 0.32), transparent 64%);
  filter: blur(1px);
}

.topology-svg {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
}

.topology-pipe {
  fill: none;
  stroke: rgba(226, 243, 236, 0.52);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 10 12;
  opacity: 0.74;
}

.topology-pipe.source {
  stroke: rgba(226, 190, 98, 0.64);
}

.topology-pipe.feed {
  stroke: rgba(93, 203, 139, 0.66);
  stroke-width: 6;
}

.topology-pipe.sprinkler {
  stroke: rgba(91, 177, 215, 0.66);
  stroke-width: 4;
}

.topology-pipe.unknown {
  stroke: rgba(226, 93, 79, 0.7);
}

.topology-pipe.active {
  stroke: #98f5c7;
  stroke-width: 8;
  stroke-dasharray: 24 16;
  filter: url("#pipeGlow");
  opacity: 1;
  animation: flowPulse 1.7s linear infinite;
}

.topology-node {
  position: absolute;
  z-index: 4;
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  grid-template-areas:
    "dot name"
    "dot detail"
    "state tags";
  gap: 2px 8px;
  width: 150px;
  min-height: 74px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(238, 249, 244, 0.32);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.86);
  color: #102128;
  box-shadow: 0 15px 38px rgba(3, 18, 22, 0.26);
  backdrop-filter: blur(14px) saturate(1.2);
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.topology-node:hover {
  transform: translate(-50%, -52%);
  box-shadow: 0 18px 48px rgba(3, 18, 22, 0.34);
}

.topology-node strong {
  grid-area: name;
  min-width: 0;
  color: #102128;
  font-size: 0.82rem;
  line-height: 1.08;
}

.topology-node small {
  grid-area: detail;
  min-width: 0;
  color: #52666c;
  font-size: 0.68rem;
  line-height: 1.15;
}

.node-status-dot {
  grid-area: dot;
  width: 11px;
  height: 11px;
  margin-top: 2px;
  border-radius: 50%;
  background: #93a4a9;
  box-shadow: 0 0 0 4px rgba(147, 164, 169, 0.16);
}

.node-state {
  grid-area: state;
  align-self: end;
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(231, 238, 240, 0.86);
  color: #3a4d53;
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.map-node-tags {
  grid-area: tags;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

.map-flag {
  border-radius: 999px;
  padding: 2px 5px;
  background: rgba(235, 241, 243, 0.92);
  color: #3b4b50;
  font-size: 0.62rem;
  font-weight: 900;
}

.map-flag.newly-seeded {
  background: #dff5e7;
  color: #19633f;
}

.map-flag.steep-hill {
  background: #eee5fb;
  color: #6841a1;
}

.map-flag.super-dry {
  background: #ffe8b5;
  color: #83500b;
}

.topology-node.source {
  background: rgba(255, 247, 221, 0.9);
}

.topology-node.feed {
  background: rgba(224, 246, 232, 0.9);
}

.topology-node.sprinkler {
  background: rgba(226, 242, 249, 0.9);
}

.topology-node.super-dry {
  border-color: rgba(242, 168, 62, 0.72);
}

.topology-node.steep-hill {
  border-color: rgba(130, 99, 190, 0.54);
}

.topology-node.newly-seeded {
  border-color: rgba(72, 173, 108, 0.56);
}

.topology-node.paused {
  opacity: 0.72;
}

.topology-node.unknown .node-status-dot {
  background: #d45749;
  box-shadow: 0 0 0 4px rgba(212, 87, 73, 0.18);
}

.topology-node.active {
  border-color: rgba(157, 245, 207, 0.9);
  background: rgba(242, 255, 249, 0.94);
  box-shadow: 0 0 0 1px rgba(157, 245, 207, 0.44), 0 0 38px rgba(72, 218, 153, 0.54);
  animation: nodeGlow 1.8s ease-in-out infinite;
}

.topology-node.active .node-status-dot {
  background: #42cf8d;
  box-shadow: 0 0 0 5px rgba(66, 207, 141, 0.22), 0 0 18px rgba(66, 207, 141, 0.9);
}

.topology-node.active .node-state {
  background: #d7fae6;
  color: #11613f;
}

.map-status-card {
  position: absolute;
  right: auto;
  bottom: 18px;
  left: 18px;
  z-index: 5;
  display: grid;
  gap: 3px;
  width: min(300px, calc(100% - 36px));
  border: 1px solid rgba(238, 249, 244, 0.3);
  border-radius: 8px;
  padding: 13px 15px;
  background: rgba(6, 28, 34, 0.72);
  color: #f7fffb;
  box-shadow: 0 16px 42px rgba(2, 14, 18, 0.32);
  backdrop-filter: blur(16px) saturate(1.25);
}

.map-status-card span {
  color: rgba(239, 249, 245, 0.72);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.map-status-card strong {
  font-size: 1.4rem;
  line-height: 1.1;
}

.map-status-card small {
  color: rgba(239, 249, 245, 0.78);
  line-height: 1.3;
}

.table-wrap {
  background: rgba(255, 255, 255, 0.46);
}

th {
  background: rgba(226, 240, 236, 0.96);
}

.timeline-track {
  background: rgba(248, 252, 251, 0.78);
}

.spot-zone {
  background: rgba(248, 252, 251, 0.82);
}

@keyframes flowPulse {
  from {
    stroke-dashoffset: 40;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes nodeGlow {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(157, 245, 207, 0.4), 0 0 28px rgba(72, 218, 153, 0.42);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(157, 245, 207, 0.66), 0 0 46px rgba(72, 218, 153, 0.66);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topology-pipe.active,
  .topology-node.active {
    animation: none;
  }
}

@media (max-width: 1100px) {
  .control-pane {
    position: static;
    height: auto;
    background: rgba(5, 28, 34, 0.44);
  }

  .summary-band {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }
}

@media (max-width: 700px) {
  body {
    background-attachment: scroll;
  }

  .workspace {
    padding: 14px;
  }

  .topology-panel .panel-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-legend {
    justify-content: flex-start;
  }

  .topology-canvas {
    min-width: 840px;
    min-height: 600px;
  }

  .topology-node {
    width: 136px;
  }
}

/* Polish pass: make the interface read like a live network, not a pile of cards. */
.topbar {
  min-height: 66px;
  padding: 10px 18px;
  gap: 12px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  font-size: 1.28rem;
}

.brand-logo {
  width: 96px;
  height: 44px;
}

.topbar h1 {
  font-size: 1.28rem;
}

.topbar .eyebrow {
  font-size: 0.72rem;
}

.status-cluster {
  flex: 0 0 auto;
  flex-wrap: nowrap;
  min-width: 0;
  overflow: visible;
}

.topbar .approval-status,
.topbar .deployment-status,
.topbar .server-status {
  max-width: none;
}

.layout {
  grid-template-columns: minmax(280px, 304px) minmax(0, 1fr);
  min-height: calc(100vh - 66px);
}

.control-pane {
  top: 66px;
  height: calc(100vh - 66px);
  gap: 12px;
  padding: 14px;
}

.workspace {
  gap: 12px;
  padding: 14px 16px 18px;
}

.tool-panel > h2,
.tool-panel > .panel-heading,
.tool-panel > .field,
.tool-panel > .day-grid,
.tool-panel > .limits,
.tool-panel > .button-stack,
.tool-panel > .status-line,
.tool-panel > .deploy-output,
.tool-panel > .label-buttons,
.tool-panel > .spot-zone-list,
.tool-panel > .live-summary,
.tool-panel > .live-columns,
.tool-panel > .projection-summary {
  margin: 12px;
}

button {
  min-height: 34px;
  padding: 0 12px;
}

.day-grid {
  gap: 7px;
}

.day-toggle {
  min-height: 33px;
}

.summary-band {
  grid-template-columns: repeat(auto-fit, minmax(146px, 1fr));
  gap: 9px;
}

.metric {
  align-content: space-between;
  min-height: 82px;
  padding: 10px 12px;
  overflow: hidden;
}

.metric span {
  font-size: 0.72rem;
  line-height: 1.1;
}

.metric strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #102128;
  font-size: 0.98rem;
  line-height: 1.08;
}

.metric small {
  min-width: 0;
  overflow: hidden;
  color: #65767b;
  font-size: 0.68rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topology-panel .panel-heading {
  align-items: flex-start;
  gap: 10px;
  margin: 14px 16px 10px;
}

.map-heading-tools {
  flex: 1 1 auto;
}

.topology-panel h2 {
  font-size: 1rem;
}

.map-legend {
  flex: 0 1 560px;
  gap: 6px;
  justify-content: flex-end;
  max-width: none;
}

.map-legend span {
  padding: 4px 7px;
  font-size: 0.66rem;
}

.map-legend span::before {
  width: 7px;
  height: 7px;
}

.system-map {
  padding: 0 16px 16px;
}

.topology-canvas {
  min-width: 1020px;
  min-height: 620px;
  background:
    linear-gradient(180deg, rgba(3, 22, 27, 0.08), rgba(3, 22, 27, 0.5)),
    linear-gradient(90deg, rgba(3, 22, 27, 0.42), rgba(3, 22, 27, 0.02) 46%, rgba(3, 22, 27, 0.36)),
    url("../../design/concepts/shenandoah-property-reference.png") center 47% / cover;
}

.topology-contours {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

.topology-contours span {
  position: absolute;
  left: -4%;
  width: 108%;
  height: 34px;
  border-top: 1px solid rgba(226, 246, 237, 0.16);
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(226, 246, 237, 0.05), transparent);
  transform: rotate(-1.6deg);
}

.topology-contours span:nth-child(1) {
  top: 24%;
}

.topology-contours span:nth-child(2) {
  top: 42%;
  transform: rotate(-0.6deg);
}

.topology-contours span:nth-child(3) {
  top: 61%;
  transform: rotate(0.7deg);
}

.topology-contours span:nth-child(4) {
  top: 79%;
  transform: rotate(1.8deg);
}

.topology-svg {
  z-index: 4;
}

.topology-pipe {
  stroke: rgba(220, 248, 239, 0.48);
  stroke-width: 4;
  stroke-dasharray: 7 10;
  opacity: 0.88;
}

.topology-pipe.source {
  stroke: rgba(230, 194, 98, 0.58);
  stroke-width: 5;
}

.topology-pipe.feed {
  stroke: rgba(90, 221, 142, 0.72);
  stroke-width: 7;
}

.topology-pipe.sprinkler {
  stroke: rgba(93, 191, 237, 0.72);
  stroke-width: 5;
}

.topology-pipe.active {
  stroke: #8effc5;
  stroke-width: 11;
  stroke-dasharray: 18 13;
  opacity: 1;
}

.topology-pipe.stale {
  stroke: rgba(242, 168, 62, 0.86);
  stroke-dasharray: 4 12;
}

.topology-trail-bed,
.topology-pulse-dots,
.topology-corridor-shadow,
.topology-corridor,
.topology-corridor-current,
.topology-radial-flow,
.topology-hub {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.topology-visual-pulse .topology-pipe {
  stroke-dasharray: none;
}

.topology-visual-pulse .topology-node,
.topology-visual-corridor .topology-node {
  width: 96px;
  min-height: 46px;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 1px 6px;
  padding: 6px 7px;
}

.topology-visual-pulse .topology-node strong,
.topology-visual-corridor .topology-node strong {
  font-size: 0.64rem;
  line-height: 1.02;
}

.topology-visual-pulse .topology-node small,
.topology-visual-corridor .topology-node small {
  font-size: 0.58rem;
  line-height: 1.08;
}

.topology-visual-pulse .node-state,
.topology-visual-corridor .node-state {
  font-size: 0.56rem;
}

.topology-visual-pulse .topology-node.active,
.topology-visual-corridor .topology-node.active {
  width: 104px;
  min-height: 50px;
}

.topology-trail-bed {
  stroke: rgba(147, 229, 235, 0.2);
  stroke-width: 2.5;
  opacity: 0.9;
}

.topology-trail-bed.source {
  stroke: rgba(241, 194, 88, 0.28);
}

.topology-trail-bed.feed {
  stroke: rgba(104, 235, 160, 0.32);
  stroke-width: 3.5;
}

.topology-pulse-dots {
  stroke: rgba(113, 219, 255, 0.88);
  stroke-width: 4;
  stroke-dasharray: 1 13;
  stroke-dashoffset: 0;
  opacity: 0.94;
  animation: topologyPulseTrail 3.8s linear infinite;
  animation-delay: var(--pulse-delay, 0s);
  filter: drop-shadow(0 0 5px rgba(102, 221, 255, 0.85));
}

.topology-pulse-dots.source {
  stroke: rgba(255, 195, 81, 0.9);
  filter: drop-shadow(0 0 6px rgba(255, 187, 75, 0.72));
}

.topology-pulse-dots.feed {
  stroke: rgba(105, 255, 176, 0.9);
  stroke-width: 5;
  filter: drop-shadow(0 0 7px rgba(94, 255, 171, 0.74));
}

.topology-pulse-dots.active {
  stroke: #a9ffd4;
  stroke-width: 7;
  stroke-dasharray: 2 12;
  filter: drop-shadow(0 0 12px rgba(143, 255, 197, 0.9));
}

.topology-corridor-shadow {
  stroke: rgba(0, 14, 16, 0.34);
  stroke-width: 34;
  opacity: 0.7;
  filter: blur(7px);
}

.topology-corridor-shadow.source {
  stroke-width: 24;
  opacity: 0.52;
}

.topology-corridor {
  stroke: rgba(100, 215, 244, 0.22);
  stroke-width: 24;
  opacity: 0.8;
}

.topology-corridor.source {
  stroke: rgba(245, 178, 68, 0.26);
  stroke-width: 17;
  opacity: 0.62;
}

.topology-corridor.feed {
  stroke: rgba(97, 238, 156, 0.28);
  stroke-width: 28;
}

.topology-corridor.active {
  stroke: rgba(139, 255, 196, 0.46);
  stroke-width: 32;
}

.topology-corridor-current {
  stroke: rgba(225, 255, 246, 0.4);
  stroke-width: 2;
  stroke-dasharray: 3 30;
  opacity: 0.72;
  animation: topologyPulseTrail 6s linear infinite;
  animation-delay: var(--pulse-delay, 0s);
}

.topology-corridor-current.source {
  stroke: rgba(255, 218, 138, 0.46);
}

.topology-corridor-current.feed {
  stroke: rgba(178, 255, 208, 0.58);
}

.topology-radial-link {
  stroke-dasharray: none;
  opacity: 0.82;
}

.topology-radial-flow {
  stroke: rgba(229, 255, 245, 0.28);
  stroke-width: 1.7;
  stroke-dasharray: 1 30;
  stroke-dashoffset: 0;
  opacity: 0.36;
  pointer-events: none;
  animation: radialFlowDirection 2.4s linear infinite;
  animation-delay: var(--radial-flow-delay, 0s);
  filter: drop-shadow(0 0 3px rgba(149, 255, 202, 0.22));
}

.topology-radial-flow.source {
  stroke: rgba(255, 222, 146, 0.26);
}

.topology-radial-flow.feed {
  stroke: rgba(189, 255, 217, 0.34);
  stroke-width: 2;
}

.topology-radial-flow.sprinkler {
  stroke: rgba(212, 247, 255, 0.27);
}

.topology-visual-radial .topology-pipe {
  stroke: rgba(132, 212, 235, 0.5);
  stroke-width: 3.2;
  stroke-dasharray: none;
  animation: none;
  filter: drop-shadow(0 0 5px rgba(91, 192, 223, 0.26));
}

.topology-visual-radial .topology-pipe.source {
  stroke: rgba(240, 190, 92, 0.62);
  stroke-width: 4.4;
}

.topology-visual-radial .topology-pipe.feed {
  stroke: rgba(107, 234, 160, 0.6);
  stroke-width: 4.8;
}

.topology-visual-radial .topology-pipe.sprinkler {
  stroke: rgba(115, 199, 237, 0.52);
  stroke-width: 3;
}

.topology-visual-radial .topology-pipe.active {
  stroke: rgba(166, 255, 208, 0.82);
  stroke-width: 6;
  stroke-dasharray: none;
  filter: drop-shadow(0 0 7px rgba(116, 255, 183, 0.3));
  opacity: 0.82;
  animation: none;
}

.topology-visual-radial .topology-pipe.stale {
  stroke-dasharray: none;
}

.topology-visual-radial .topology-node {
  width: 86px;
  min-height: 36px;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 1px 5px;
  padding: 4px 6px;
  background: rgba(7, 27, 33, 0.72);
  border-color: rgba(226, 248, 242, 0.28);
  box-shadow: 0 8px 18px rgba(1, 14, 18, 0.22);
}

.topology-visual-radial .topology-node strong {
  font-size: 0.64rem;
  line-height: 1;
}

.topology-visual-radial .topology-node small {
  font-size: 0.5rem;
  line-height: 1;
}

.topology-visual-radial .node-state {
  font-size: 0.48rem;
  padding: 1px 4px;
}

.topology-visual-radial .node-status-dot {
  width: 7px;
  height: 7px;
}

.topology-visual-radial .topology-node.active {
  width: 92px;
  animation: radialNodePulse 1.16s ease-in-out infinite;
}

.topology-visual-radial .map-status-card {
  display: none;
}

.topology-hub {
  fill: rgba(91, 214, 209, 0.3);
  stroke: rgba(197, 255, 239, 0.86);
  stroke-width: 2;
  filter: drop-shadow(0 0 9px rgba(123, 242, 212, 0.55));
  opacity: 0.9;
}

.topology-hub.active {
  fill: rgba(155, 255, 203, 0.54);
  stroke: #baffd9;
}

@keyframes topologyPulseTrail {
  to {
    stroke-dashoffset: -160;
  }
}

@keyframes radialFlowDirection {
  to {
    stroke-dashoffset: -36;
  }
}

@keyframes radialNodePulse {
  0%,
  100% {
    box-shadow: 0 8px 18px rgba(1, 14, 18, 0.22), 0 0 18px rgba(92, 236, 166, 0.28);
  }
  50% {
    box-shadow: 0 8px 18px rgba(1, 14, 18, 0.22), 0 0 34px rgba(117, 255, 190, 0.6);
  }
}

@media (prefers-reduced-motion: reduce) {
  .topology-visual-radial .topology-pipe.active,
  .topology-radial-flow,
  .topology-visual-radial .topology-node.active {
    animation: none;
  }
}

.topology-node {
  z-index: 6;
  grid-template-columns: 10px minmax(0, 1fr);
  grid-template-areas:
    "dot name"
    "dot detail"
    "state state";
  gap: 1px 6px;
  width: 104px;
  min-height: 48px;
  border-color: rgba(225, 249, 241, 0.24);
  border-radius: 7px;
  padding: 6px 7px;
  background: rgba(8, 30, 36, 0.68);
  color: #f0fff8;
  box-shadow: 0 10px 24px rgba(2, 16, 20, 0.24);
  backdrop-filter: blur(10px) saturate(1.12);
}

.topology-node:hover {
  z-index: 20;
  transform: translate(-50%, -54%);
}

.topology-node strong {
  color: #f5fff9;
  font-size: 0.7rem;
  line-height: 1.03;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topology-node small {
  color: rgba(227, 243, 238, 0.76);
  font-size: 0.57rem;
  line-height: 1.05;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.node-status-dot {
  width: 8px;
  height: 8px;
  margin-top: 2px;
  background: #8fa4a9;
  box-shadow: 0 0 0 3px rgba(143, 164, 169, 0.16);
}

.node-state {
  justify-self: start;
  margin-top: 2px;
  padding: 1px 5px;
  background: rgba(225, 238, 240, 0.16);
  color: rgba(239, 255, 248, 0.86);
  font-size: 0.52rem;
  line-height: 1.4;
}

.map-node-tags {
  position: absolute;
  top: -8px;
  right: -7px;
  display: flex;
  gap: 2px;
}

.map-flag {
  border: 1px solid rgba(255, 255, 255, 0.34);
  padding: 1px 4px;
  font-size: 0.5rem;
  line-height: 1.25;
  box-shadow: 0 4px 10px rgba(2, 16, 20, 0.22);
}

.topology-node.source {
  background: rgba(58, 45, 17, 0.72);
}

.topology-node.feed {
  border-color: rgba(102, 236, 155, 0.42);
  background: rgba(8, 66, 46, 0.72);
}

.topology-node.sprinkler {
  border-color: rgba(116, 210, 246, 0.34);
  background: rgba(9, 42, 54, 0.7);
}

.topology-node.super-dry {
  border-color: rgba(248, 177, 63, 0.78);
}

.topology-node.active {
  z-index: 8;
  width: 116px;
  min-height: 54px;
  border-color: rgba(147, 255, 196, 0.98);
  background: rgba(213, 255, 231, 0.93);
  color: #0d2d20;
}

.topology-node.active strong {
  color: #0d2d20;
}

.topology-node.active small {
  color: rgba(14, 57, 39, 0.74);
}

.topology-node.active .node-state {
  background: rgba(20, 124, 78, 0.14);
  color: #0b6a43;
}

.topology-node.stale {
  border-color: rgba(242, 168, 62, 0.86);
  background: rgba(82, 54, 16, 0.78);
}

.topology-node.stale .node-status-dot {
  background: #f2a83e;
  box-shadow: 0 0 0 4px rgba(242, 168, 62, 0.22);
}

.topology-node.stale .node-state {
  background: rgba(255, 229, 178, 0.16);
  color: #ffd27a;
}

.node-popover {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  z-index: 30;
  display: none;
  min-width: 190px;
  max-width: 260px;
  transform: translateX(-50%);
  border: 1px solid rgba(233, 249, 243, 0.28);
  border-radius: 7px;
  padding: 8px 9px;
  background: rgba(5, 24, 29, 0.9);
  color: #f6fff9;
  box-shadow: 0 14px 30px rgba(2, 16, 20, 0.36);
  pointer-events: none;
}

.node-popover b,
.node-popover em {
  display: block;
  font-style: normal;
  line-height: 1.2;
}

.node-popover b {
  font-size: 0.72rem;
}

.node-popover em {
  margin-top: 3px;
  color: rgba(239, 255, 248, 0.72);
  font-size: 0.62rem;
}

.topology-node:hover .node-popover {
  display: block;
}

.map-status-card {
  bottom: 14px;
  left: 14px;
  width: 230px;
  padding: 10px 11px;
  background: rgba(5, 24, 29, 0.8);
}

.map-status-card span {
  font-size: 0.62rem;
}

.map-status-card strong {
  font-size: 1.05rem;
}

.map-status-card small {
  font-size: 0.68rem;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .control-pane {
    position: static;
    height: auto;
  }

  .topbar .approval-status,
  .topbar .deployment-status,
  .topbar .server-status {
    max-width: 100%;
  }
}

@media (max-width: 700px) {
  .summary-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .topology-canvas {
    min-width: 900px;
    min-height: 600px;
  }

  .topology-node {
    width: 100px;
  }

  .topology-node.active {
    width: 112px;
  }
}

/* Density lock: this intentionally wins over the older broad rules above. */
.topbar {
  min-height: 60px;
  padding: 8px 16px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  font-size: 1.12rem;
}

.brand-logo {
  width: 86px;
  height: 40px;
}

.topbar h1 {
  font-size: 1.08rem;
  line-height: 1.05;
}

.topbar .eyebrow {
  font-size: 0.62rem;
  line-height: 1.05;
}

.topbar .approval-status,
.topbar .deployment-status,
.topbar .server-status {
  max-width: min(31vw, 300px);
  min-height: 28px;
  padding: 5px 8px;
  font-size: 0.72rem;
  line-height: 1.1;
}

.layout {
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: calc(100vh - 60px);
}

.control-pane {
  top: 60px;
  height: calc(100vh - 60px);
  gap: 10px;
  overflow-y: auto;
  padding: 10px;
}

.control-pane .tool-panel {
  flex: 0 0 auto;
  border-radius: 7px;
  overflow: visible;
}

.control-pane .tool-panel > h2,
.control-pane .tool-panel > .panel-heading,
.control-pane .tool-panel > .field,
.control-pane .tool-panel > .day-grid,
.control-pane .tool-panel > .limits,
.control-pane .tool-panel > .button-stack,
.control-pane .tool-panel > .status-line,
.control-pane .tool-panel > .deploy-output,
.control-pane .tool-panel > .label-buttons,
.control-pane .tool-panel > .spot-zone-list {
  margin: 9px;
}

.control-pane h2,
.control-pane .panel-heading h2 {
  font-size: 0.86rem;
  line-height: 1.15;
}

.control-pane .field {
  gap: 4px;
}

.control-pane .field span,
.control-pane .limits span,
.control-pane .spot-zone small {
  font-size: 0.68rem;
  line-height: 1.15;
}

.control-pane input,
.control-pane select {
  min-height: 30px;
  border-radius: 5px;
  padding: 5px 8px;
  font-size: 0.8rem;
  line-height: 1.1;
}

.control-pane button {
  min-height: 28px;
  border-radius: 5px;
  padding: 0 9px;
  font-size: 0.76rem;
  line-height: 1;
}

.control-pane .panel-heading button {
  min-width: 82px;
}

.control-pane .button-stack {
  gap: 6px;
}

.control-pane .day-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.control-pane .day-toggle {
  min-height: 28px;
  padding: 0 4px;
}

.control-pane .label-buttons {
  gap: 6px;
}

.control-pane .spot-zone-list {
  gap: 6px;
  max-height: 260px;
}

.control-pane .spot-zone {
  align-items: flex-start;
  border-radius: 5px;
  padding: 6px;
}

.control-pane .spot-zone strong {
  display: block;
  font-size: 0.73rem;
  line-height: 1.1;
}

.control-pane .spot-zone small {
  display: block;
  margin-top: 2px;
}

.control-pane .spot-zone input {
  margin-top: 2px;
}

.control-pane .deploy-output,
.control-pane .status-line {
  font-size: 0.72rem;
  line-height: 1.25;
}

.workspace {
  padding: 12px;
}

.summary-band {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
}

.metric {
  min-height: 64px;
  padding: 8px 10px;
}

.metric span {
  font-size: 0.64rem;
}

.metric strong {
  font-size: 0.82rem;
  line-height: 1.05;
}

.metric small {
  font-size: 0.6rem;
}

.topology-panel .panel-heading {
  margin: 10px 12px 8px;
}

.map-heading-tools {
  gap: 6px;
}

.topology-mode-switch button {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.6rem;
}

.topology-panel h2 {
  font-size: 0.86rem;
}

.topology-panel .subtle {
  font-size: 0.7rem;
}

.system-map {
  padding: 0 12px 12px;
}

.topology-canvas {
  min-height: 600px;
}

.topology-node {
  width: 88px;
  min-height: 38px;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: 1px 5px;
  border-radius: 6px;
  padding: 5px 6px;
}

.topology-node strong {
  font-size: 0.6rem;
}

.topology-node small {
  font-size: 0.5rem;
}

.node-status-dot {
  width: 6px;
  height: 6px;
  box-shadow: 0 0 0 2px rgba(143, 164, 169, 0.16);
}

.node-state {
  margin-top: 1px;
  padding: 1px 4px;
  font-size: 0.46rem;
}

.topology-node.active {
  width: 98px;
  min-height: 42px;
}

.topology-node.active .node-status-dot {
  box-shadow: 0 0 0 3px rgba(66, 207, 141, 0.2), 0 0 12px rgba(66, 207, 141, 0.75);
}

.map-flag {
  font-size: 0.44rem;
}

.map-status-card {
  width: 200px;
  padding: 8px 9px;
}

.map-status-card strong {
  font-size: 0.9rem;
}

.map-status-card small {
  font-size: 0.6rem;
}

.live-summary .metric {
  min-height: 58px;
}

@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .control-pane {
    position: static;
    height: auto;
  }
}

@media (max-width: 700px) {
  .topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .status-cluster {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar .approval-status,
  .topbar .deployment-status,
  .topbar .server-status {
    max-width: 100%;
    flex: 1 1 112px;
  }

  .control-pane .day-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .brand-block {
    align-items: flex-start;
  }

  .brand-logo {
    width: 76px;
    height: 34px;
  }

  .brand-text {
    padding-top: 1px;
  }
}

/* Operations-first redesign. This final layer makes the live dashboard the default surface. */
.topbar {
  display: grid;
  grid-template-columns: auto auto minmax(320px, 1fr) auto;
  min-height: 58px;
  gap: 14px;
  padding: 8px 18px;
}

.brand-block {
  gap: 14px;
}

.brand-logo {
  width: 172px;
  height: 28px;
}

.brand-text {
  display: flex;
  align-items: center;
  padding-top: 0;
}

.topbar h1 {
  font-size: 1.42rem;
  line-height: 1;
  white-space: nowrap;
}

.app-tabs {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-self: center;
  justify-self: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.tab-button {
  position: relative;
  min-height: 34px;
  border: 0;
  border-radius: 0;
  padding: 0 12px;
  background: transparent;
  color: rgba(246, 251, 248, 0.76);
  box-shadow: none;
  font-size: 0.82rem;
  white-space: nowrap;
}

.tab-button:hover,
.tab-button:focus-visible {
  background: transparent;
  color: #ffffff;
  filter: none;
  outline: none;
}

.tab-button::after {
  position: absolute;
  right: 12px;
  bottom: 2px;
  left: 12px;
  height: 2px;
  border-radius: 999px;
  background: transparent;
  content: "";
}

.tab-button.active {
  background: transparent;
  color: #ffffff;
}

.tab-button.active::after,
.tab-button:focus-visible::after {
  background: rgba(142, 216, 255, 0.9);
}

.mobile-label {
  display: none;
}

.layout {
  display: block;
  min-height: calc(100vh - 58px);
}

.tab-view[hidden] {
  display: none;
}

.operations-view,
.schedule-view {
  min-width: 0;
  padding: 14px;
}

.operation-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 380px);
  gap: 14px;
  align-items: stretch;
}

.hero-map-panel {
  min-width: 0;
}

.hero-map-panel .topology-heading {
  margin: 12px 14px 8px;
}

.hero-map-panel .system-map {
  padding: 0 14px 14px;
}

.hero-map-panel .topology-canvas {
  min-width: 920px;
  min-height: min(62vh, 620px);
}

.hero-status-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(232, 244, 239, 0.28);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(160deg, rgba(5, 25, 30, 0.92), rgba(7, 55, 55, 0.78)),
    rgba(5, 25, 30, 0.84);
  color: #f7fffb;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(1.2);
}

.status-card-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(239, 249, 245, 0.14);
}

.status-card-brand img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.status-card-brand .eyebrow {
  color: rgba(232, 248, 240, 0.68);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-card-brand h2 {
  color: #ffffff;
  font-size: 1.1rem;
}

.operation-status {
  display: grid;
  gap: 14px;
  padding: 16px 0;
}

.status-hero-line {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.status-pulse {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: #8ea2a8;
  box-shadow: 0 0 0 5px rgba(142, 162, 168, 0.14);
}

.status-hero-line.active .status-pulse {
  background: #56e79a;
  box-shadow: 0 0 0 6px rgba(86, 231, 154, 0.2), 0 0 28px rgba(86, 231, 154, 0.7);
}

.status-hero-line.idle .status-pulse {
  background: #8ed8ff;
  box-shadow: 0 0 0 5px rgba(142, 216, 255, 0.16);
}

.status-hero-line.warning .status-pulse {
  background: #f2b24d;
  box-shadow: 0 0 0 6px rgba(242, 178, 77, 0.18), 0 0 24px rgba(242, 178, 77, 0.42);
}

.status-hero-line span,
.status-facts span {
  display: block;
  color: rgba(232, 248, 240, 0.66);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.status-hero-line strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 2rem;
  line-height: 1;
  overflow-wrap: anywhere;
}

.status-hero-line small,
.status-facts small {
  display: block;
  margin-top: 6px;
  color: rgba(232, 248, 240, 0.74);
  line-height: 1.35;
}

.status-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(239, 249, 245, 0.14);
  border-bottom: 1px solid rgba(239, 249, 245, 0.14);
}

.status-facts div {
  min-width: 0;
  padding: 12px 0;
}

.status-facts div + div {
  border-top: 1px solid rgba(239, 249, 245, 0.12);
}

.status-facts strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 1rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.status-facts div[data-tone="warning"] strong {
  color: #ffd98d;
}

.status-facts div[data-tone="success"] strong {
  color: #adffd0;
}

.status-card-actions {
  justify-content: stretch;
  margin-top: auto;
}

.status-card-actions button {
  flex: 1 1 0;
}

.hero-status-card .status-line {
  min-height: auto;
  margin-top: 12px;
  color: rgba(232, 248, 240, 0.74);
  font-size: 0.78rem;
}

.operations-lower {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.upcoming-panel,
.spot-panel {
  min-width: 0;
}

.next24-timeline {
  display: grid;
  gap: 7px;
  padding: 0 14px 16px;
  overflow-x: auto;
}

.next24-sync-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 680px;
  border: 1px solid rgba(55, 92, 95, 0.16);
  border-radius: 7px;
  padding: 8px 10px;
  background: rgba(247, 251, 249, 0.86);
  color: #22343a;
  font-size: 0.78rem;
}

.next24-sync-note strong,
.next24-sync-note span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next24-sync-note span {
  color: var(--muted);
  font-weight: 800;
}

.next24-sync-note.success {
  border-color: rgba(72, 173, 108, 0.28);
  background: rgba(224, 246, 232, 0.86);
}

.next24-sync-note.warning {
  border-color: rgba(231, 196, 142, 0.54);
  background: rgba(255, 240, 207, 0.9);
}

.next24-ticks {
  position: relative;
  height: 24px;
  margin-left: 190px;
  min-width: 680px;
  border-bottom: 1px solid rgba(55, 92, 95, 0.22);
}

.next24-ticks span {
  position: absolute;
  bottom: 4px;
  transform: translateX(-50%);
  color: var(--muted);
  font-size: 0.72rem;
}

.next24-row {
  display: grid;
  position: relative;
  z-index: 1;
  grid-template-columns: 176px minmax(680px, 1fr);
  gap: 14px;
  align-items: center;
}

.next24-row:hover,
.next24-row:focus-within,
.next24-row.selected,
.next24-row:has(.next24-bar:hover),
.next24-row:has(.next24-bar:focus-visible) {
  z-index: 80;
}

.next24-label {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.next24-label strong,
.next24-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next24-label strong {
  font-size: 0.82rem;
}

.next24-label span {
  color: var(--muted);
  font-size: 0.72rem;
}

.next24-track {
  position: relative;
  height: 34px;
  border: 1px solid rgba(55, 92, 95, 0.22);
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(38, 119, 168, 0.08) 1px, transparent 1px) 0 0 / 12.5% 100%,
    rgba(248, 252, 251, 0.78);
  overflow: hidden;
}

.next24-bar {
  position: absolute;
  top: 5px;
  bottom: 5px;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 46px;
  border-radius: 6px;
  padding: 0 7px;
  background: linear-gradient(135deg, #2b7fb1, #1f6a95);
  color: #ffffff;
  overflow: hidden;
  box-shadow: 0 8px 18px rgba(30, 94, 132, 0.22);
}

.next24-bar.nighttime {
  background: linear-gradient(135deg, #295d8e, #173d66);
}

.next24-bar.disabled {
  background: #87949a;
  box-shadow: none;
}

.next24-bar span,
.next24-bar small {
  min-width: 0;
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next24-bar span {
  font-size: 0.72rem;
  font-weight: 900;
}

.next24-bar small {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.62rem;
}

.next24-empty {
  display: grid;
  gap: 4px;
  min-height: 120px;
  align-content: center;
  border: 1px dashed rgba(55, 92, 95, 0.28);
  border-radius: 8px;
  padding: 18px;
  background: rgba(248, 252, 251, 0.58);
}

.next24-empty span {
  color: var(--muted);
}

.spot-panel .spot-zone-list {
  max-height: 380px;
}

.split-actions {
  grid-template-columns: 1fr 1fr;
}

.schedule-view {
  display: grid;
  grid-template-columns: minmax(280px, 320px) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.management-sidebar {
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.management-workspace {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.management-sidebar .tool-panel > h2,
.management-sidebar .tool-panel > .panel-heading,
.management-sidebar .tool-panel > .field,
.management-sidebar .tool-panel > .day-grid,
.management-sidebar .tool-panel > .limits,
.management-sidebar .tool-panel > .button-stack,
.management-sidebar .tool-panel > .status-line,
.management-sidebar .tool-panel > .deploy-output {
  margin: 12px;
}

.management-grid {
  grid-template-columns: minmax(320px, 0.82fr) minmax(460px, 1.18fr);
}

.management-grid .live-columns {
  grid-template-columns: 1fr;
  gap: 0;
}

@media (max-width: 1180px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .app-tabs {
    grid-column: 1 / -1;
    justify-self: start;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .app-tabs::-webkit-scrollbar {
    display: none;
  }

  .status-cluster {
    justify-content: flex-end;
  }

  .operation-hero,
  .operations-lower,
  .schedule-view,
  .management-grid {
    grid-template-columns: 1fr;
  }

  .management-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 12px;
  }

  .brand-logo {
    width: 132px;
    height: 21px;
  }

  .topbar h1 {
    font-size: 1.28rem;
  }

  .app-tabs {
    justify-content: flex-start;
    width: 100%;
  }

  .tab-button {
    min-width: 0;
    padding: 0 7px;
    font-size: 0.72rem;
  }

  .desktop-label {
    display: none;
  }

  .mobile-label {
    display: inline;
  }

  .status-cluster {
    width: 100%;
    justify-content: stretch;
  }

  .topbar .approval-status,
  .topbar .deployment-status,
  .topbar .server-status {
    flex: 1 1 100%;
    max-width: none;
  }

  .operations-view,
  .schedule-view {
    padding: 10px;
  }

  .operation-hero {
    display: flex;
    flex-direction: column;
  }

  .hero-status-card {
    order: -1;
    padding: 14px;
  }

  .status-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .status-card-actions button {
    width: 100%;
  }

  .status-hero-line strong {
    font-size: 1.6rem;
  }

  .hero-map-panel .topology-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-map-panel .map-legend {
    display: none;
  }

  .hero-map-panel .topology-canvas {
    min-width: 860px;
    min-height: 560px;
  }

  .operations-lower {
    margin-top: 10px;
  }

  .next24-ticks {
    margin-left: 132px;
    min-width: 560px;
  }

  .next24-row {
    grid-template-columns: 118px minmax(560px, 1fr);
    gap: 10px;
  }

  .next24-label strong {
    font-size: 0.72rem;
  }

  .next24-label span {
    font-size: 0.64rem;
  }

  .next24-bar {
    min-width: 38px;
    padding: 0 5px;
  }

  .next24-bar small {
    display: none;
  }

  .split-actions {
    grid-template-columns: 1fr;
  }
}

/* Mobile header polish: icon status chips plus a bottom app tab bar. */
.status-chip {
  box-shadow: none;
}

.status-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: start center;
  padding: 92px 16px 16px;
  background: rgba(2, 15, 18, 0.48);
  backdrop-filter: blur(4px);
}

.status-modal-backdrop[hidden] {
  display: none;
}

.status-detail-modal {
  position: relative;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-areas:
    "icon title"
    "icon body";
  gap: 4px 12px;
  width: min(360px, 100%);
  border: 1px solid rgba(233, 248, 241, 0.28);
  border-radius: 8px;
  padding: 16px 44px 16px 16px;
  background: rgba(5, 25, 30, 0.94);
  color: #f7fffb;
  box-shadow: 0 18px 52px rgba(2, 16, 20, 0.42);
}

.status-detail-icon {
  grid-area: icon;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: rgba(232, 248, 240, 0.12);
  color: #dff5ee;
}

.status-detail-icon::before {
  content: "";
  width: 19px;
  height: 19px;
  background: currentColor;
}

.status-detail-icon[data-kind="server"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='6' rx='2'/%3E%3Crect x='4' y='14' width='16' height='6' rx='2'/%3E%3Cpath d='M8 7h.01M8 17h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='6' rx='2'/%3E%3Crect x='4' y='14' width='16' height='6' rx='2'/%3E%3Cpath d='M8 7h.01M8 17h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.status-detail-icon[data-kind="schedule"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='m8 15 2.5 2.5L16 12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='m8 15 2.5 2.5L16 12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.status-detail-icon[data-kind="homegar"]::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5C8.5 6.7 6 10.2 6 14a6 6 0 0 0 12 0c0-3.8-2.5-7.3-6-11.5Z'/%3E%3Cpath d='M9.8 15.3A2.7 2.7 0 0 0 12.5 18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5C8.5 6.7 6 10.2 6 14a6 6 0 0 0 12 0c0-3.8-2.5-7.3-6-11.5Z'/%3E%3Cpath d='M9.8 15.3A2.7 2.7 0 0 0 12.5 18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.status-detail-icon[data-tone="running"],
.status-detail-icon[data-tone="saved"],
.status-detail-icon[data-tone="success"] {
  color: #70ecaa;
}

.status-detail-icon[data-tone="checking"],
.status-detail-icon[data-tone="warning"],
.status-detail-icon[data-tone="neutral"] {
  color: #f0d190;
}

.status-detail-icon[data-tone="down"],
.status-detail-icon[data-tone="empty"],
.status-detail-icon[data-tone="error"] {
  color: #f39a8f;
}

.status-detail-modal h2 {
  grid-area: title;
  color: #ffffff;
  font-size: 1rem;
}

.status-detail-modal p {
  grid-area: body;
  color: rgba(232, 248, 240, 0.78);
  line-height: 1.35;
}

.modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  min-height: 28px;
  border: 1px solid rgba(233, 248, 241, 0.18);
  border-radius: 50%;
  padding: 0;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(247, 255, 251, 0.84);
  box-shadow: none;
  font-size: 0.8rem;
}

.topbar .approval-status,
.topbar .deployment-status,
.topbar .server-status {
  position: relative;
  display: grid;
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  padding: 0;
  overflow: hidden;
  color: rgba(239, 255, 248, 0.88);
  font-size: 0;
  line-height: 0;
}

.topbar .status-chip::before {
  content: "";
  width: 16px;
  height: 16px;
  background: currentColor;
}

.topbar .server-status::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='6' rx='2'/%3E%3Crect x='4' y='14' width='16' height='6' rx='2'/%3E%3Cpath d='M8 7h.01M8 17h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='6' rx='2'/%3E%3Crect x='4' y='14' width='16' height='6' rx='2'/%3E%3Cpath d='M8 7h.01M8 17h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.topbar .approval-status::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='m8 15 2.5 2.5L16 12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='m8 15 2.5 2.5L16 12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.topbar .deployment-status::before {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5C8.5 6.7 6 10.2 6 14a6 6 0 0 0 12 0c0-3.8-2.5-7.3-6-11.5Z'/%3E%3Cpath d='M9.8 15.3A2.7 2.7 0 0 0 12.5 18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5C8.5 6.7 6 10.2 6 14a6 6 0 0 0 12 0c0-3.8-2.5-7.3-6-11.5Z'/%3E%3Cpath d='M9.8 15.3A2.7 2.7 0 0 0 12.5 18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

.topbar .server-status[data-state="running"],
.topbar .approval-status[data-state="saved"],
.topbar .deployment-status[data-tone="success"] {
  border-color: rgba(126, 232, 171, 0.42);
  background: rgba(49, 171, 108, 0.18);
  color: #a8f4c8;
}

.topbar .server-status[data-state="checking"],
.topbar .deployment-status[data-tone="neutral"],
.topbar .deployment-status[data-tone="warning"] {
  border-color: rgba(239, 209, 144, 0.42);
  background: rgba(196, 140, 45, 0.16);
  color: #f6d894;
}

.topbar .server-status[data-state="down"],
.topbar .approval-status[data-state="empty"],
.topbar .deployment-status[data-tone="error"] {
  border-color: rgba(239, 134, 121, 0.44);
  background: rgba(184, 66, 53, 0.18);
  color: #f5a095;
}

@media (max-width: 760px) {
  .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    backdrop-filter: none;
  }

  .brand-block {
    gap: 7px;
    min-width: 0;
    overflow: hidden;
  }

  .brand-logo {
    width: 94px;
    height: 15px;
  }

  .topbar h1 {
    overflow: hidden;
    font-size: 0.98rem;
    text-overflow: ellipsis;
  }

  .status-cluster {
    display: flex;
    grid-column: 2;
    grid-row: 1;
    width: auto;
    gap: 5px;
    justify-content: flex-end;
    overflow: visible;
  }

  .topbar .approval-status,
  .topbar .deployment-status,
  .topbar .server-status {
    position: relative;
    display: grid;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    place-items: center;
    flex: 0 0 auto;
    max-width: none;
    border-radius: 50%;
    padding: 0;
    overflow: hidden;
    color: rgba(239, 255, 248, 0.88);
    font-size: 0;
    line-height: 0;
  }

  .topbar .status-chip::before {
    content: "";
    width: 15px;
    height: 15px;
    background: currentColor;
  }

  .topbar .server-status::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='6' rx='2'/%3E%3Crect x='4' y='14' width='16' height='6' rx='2'/%3E%3Cpath d='M8 7h.01M8 17h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='4' width='16' height='6' rx='2'/%3E%3Crect x='4' y='14' width='16' height='6' rx='2'/%3E%3Cpath d='M8 7h.01M8 17h.01'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  }

  .topbar .approval-status::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='m8 15 2.5 2.5L16 12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 2v4M16 2v4M3 10h18'/%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='m8 15 2.5 2.5L16 12'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  }

  .topbar .deployment-status::before {
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5C8.5 6.7 6 10.2 6 14a6 6 0 0 0 12 0c0-3.8-2.5-7.3-6-11.5Z'/%3E%3Cpath d='M9.8 15.3A2.7 2.7 0 0 0 12.5 18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cg fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.5C8.5 6.7 6 10.2 6 14a6 6 0 0 0 12 0c0-3.8-2.5-7.3-6-11.5Z'/%3E%3Cpath d='M9.8 15.3A2.7 2.7 0 0 0 12.5 18'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
  }

  .topbar .server-status[data-state="running"],
  .topbar .approval-status[data-state="saved"],
  .topbar .deployment-status[data-tone="success"] {
    border-color: rgba(126, 232, 171, 0.42);
    background: rgba(49, 171, 108, 0.18);
    color: #a8f4c8;
  }

  .topbar .server-status[data-state="checking"],
  .topbar .deployment-status[data-tone="neutral"],
  .topbar .deployment-status[data-tone="warning"] {
    border-color: rgba(239, 209, 144, 0.42);
    background: rgba(196, 140, 45, 0.16);
    color: #f6d894;
  }

  .topbar .server-status[data-state="down"],
  .topbar .approval-status[data-state="empty"],
  .topbar .deployment-status[data-tone="error"] {
    border-color: rgba(239, 134, 121, 0.44);
    background: rgba(184, 66, 53, 0.18);
    color: #f5a095;
  }

  .app-tabs {
    position: fixed;
    right: 14px;
    bottom: 14px;
    left: 14px;
    z-index: 50;
    order: initial;
    grid-column: auto;
    width: auto;
    max-width: 420px;
    margin: 0 auto;
    justify-content: space-around;
    border: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
  }

  @supports (bottom: env(safe-area-inset-bottom)) {
    .app-tabs {
      bottom: calc(14px + env(safe-area-inset-bottom));
    }
  }

  .tab-button {
    min-height: 42px;
    color: rgba(239, 255, 248, 0.76);
  }

  .tab-button.active {
    background: transparent;
    color: #ffffff;
  }

  .layout {
    padding-bottom: 74px;
  }
}

/* Topography flow map polish: real photo canvas with a native portrait layout. */
.topology-panel {
  background:
    linear-gradient(180deg, rgba(8, 34, 40, 0.72), rgba(4, 21, 26, 0.88)),
    rgba(8, 34, 40, 0.66);
}

.topology-canvas {
  border-color: rgba(225, 247, 240, 0.32);
  background:
    linear-gradient(180deg, rgba(2, 17, 22, 0.02), rgba(2, 17, 22, 0.56)),
    linear-gradient(90deg, rgba(2, 17, 22, 0.48), rgba(2, 17, 22, 0.06) 48%, rgba(2, 17, 22, 0.42)),
    url("../../design/concepts/shenandoah-property-reference.png") center 47% / cover;
}

.topology-canvas::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(238, 255, 247, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238, 255, 247, 0.045) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: linear-gradient(to bottom, transparent, #000 16%, #000 86%, transparent);
  opacity: 0.8;
  pointer-events: none;
}

.topology-canvas.landscape .topology-contours span {
  border-top-color: rgba(226, 246, 237, 0.2);
}

.topology-canvas.landscape .map-status-card {
  border-color: rgba(238, 249, 244, 0.38);
  background: rgba(4, 22, 28, 0.78);
}

@media (min-width: 1181px) {
  .operations-view {
    padding: 10px 12px 12px;
  }

  .operation-hero {
    --hero-panel-height: clamp(560px, calc(100vh - 220px), 690px);
    grid-template-columns: minmax(0, 1fr) minmax(300px, 27vw);
    gap: 12px;
  }

  .hero-map-panel,
  .hero-status-card {
    height: var(--hero-panel-height);
  }

  .hero-map-panel {
    display: flex;
    flex-direction: column;
  }

  .hero-map-panel .topology-heading {
    margin: 10px 12px 7px;
  }

  .hero-map-panel .system-map {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    padding: 0 12px 12px;
    overflow: hidden;
  }

  .hero-map-panel .topology-canvas {
    width: 100%;
    min-width: 0;
    height: 100%;
    min-height: 0;
  }

  .hero-status-card {
    padding: 12px 14px;
    overflow: hidden;
  }

  .status-card-brand {
    gap: 8px;
    padding-bottom: 9px;
  }

  .status-card-brand img {
    width: 36px;
    height: 36px;
  }

  .status-card-brand .eyebrow {
    font-size: 0.58rem;
  }

  .status-card-brand h2 {
    font-size: 0.98rem;
    line-height: 1.04;
  }

  .operation-status {
    gap: 9px;
    padding: 10px 0 8px;
  }

  .status-hero-line {
    grid-template-columns: 14px minmax(0, 1fr);
    gap: 8px;
  }

  .status-pulse {
    width: 11px;
    height: 11px;
    margin-top: 4px;
    box-shadow: 0 0 0 4px rgba(142, 162, 168, 0.14);
  }

  .status-hero-line.active .status-pulse {
    box-shadow: 0 0 0 4px rgba(86, 231, 154, 0.18), 0 0 20px rgba(86, 231, 154, 0.58);
  }

  .status-hero-line span,
  .status-facts span {
    font-size: 0.6rem;
    line-height: 1.1;
  }

  .status-hero-line strong {
    margin-top: 3px;
    font-size: 1.42rem;
    line-height: 1.02;
  }

  .status-hero-line small,
  .status-facts small {
    margin-top: 4px;
    font-size: 0.76rem;
    line-height: 1.18;
  }

  .status-facts div {
    padding: 7px 0;
  }

  .status-facts strong {
    margin-top: 3px;
    font-size: 0.86rem;
    line-height: 1.1;
  }

  .status-card-actions {
    gap: 6px;
  }

  .status-card-actions button {
    min-height: 32px;
    padding: 0 10px;
    font-size: 0.78rem;
  }

  .hero-status-card .status-line {
    margin-top: 8px;
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .operations-lower {
    gap: 12px;
    margin-top: 10px;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .layout,
  .tab-view,
  .operations-view,
  .operation-hero,
  .operations-lower,
  .tool-panel,
  .hero-map-panel,
  .hero-status-card,
  .operation-status,
  .status-hero-line,
  .status-hero-line > div,
  .status-facts div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .status-hero-line strong,
  .status-hero-line small,
  .status-facts strong,
  .status-facts small,
  .hero-status-card .status-line {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .status-hero-line strong,
  .status-hero-line small {
    max-width: calc(100vw - 76px);
  }

  .status-hero-line small,
  .status-facts small,
  .hero-status-card .status-line {
    max-width: calc(100vw - 128px);
  }

  .status-facts strong {
    max-width: calc(100vw - 48px);
  }

  .hero-map-panel .system-map,
  .system-map {
    overflow: visible;
    padding: 0 10px 10px;
  }

  .hero-map-panel .topology-heading {
    margin: 12px 12px 9px;
  }

  .topology-panel h2 {
    font-size: 1rem;
  }

  .topology-panel .subtle {
    max-width: 34ch;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .map-heading-tools {
    align-items: start;
    justify-items: start;
    width: 100%;
  }

  .topology-mode-switch {
    max-width: 100%;
    overflow-x: auto;
  }

  .hero-map-panel .topology-canvas,
  .topology-canvas.portrait {
    width: 100%;
    min-width: 0;
    height: clamp(760px, 190vw, 980px);
    min-height: 760px;
    border-radius: 8px;
    background:
      linear-gradient(180deg, rgba(2, 17, 22, 0.08), rgba(2, 17, 22, 0.28) 44%, rgba(2, 17, 22, 0.68)),
      radial-gradient(circle at 46% 14%, rgba(154, 221, 255, 0.18), transparent 28%),
      radial-gradient(circle at 18% 82%, rgba(199, 83, 183, 0.18), transparent 25%),
      url("../../design/concepts/shenandoah-property-reference.png") 51% center / auto 100%;
    box-shadow: inset 0 0 78px rgba(0, 0, 0, 0.24), 0 18px 44px rgba(2, 16, 20, 0.28);
  }

  .topology-canvas.portrait::before {
    background:
      linear-gradient(180deg, rgba(3, 22, 27, 0.02), rgba(3, 22, 27, 0.5)),
      linear-gradient(90deg, rgba(3, 22, 27, 0.54), transparent 42%, rgba(3, 22, 27, 0.5)),
      radial-gradient(ellipse at 52% 54%, rgba(134, 255, 196, 0.14), transparent 34%);
  }

  .topology-canvas.portrait::after {
    background-size: 42px 42px;
    mask-image: linear-gradient(to bottom, transparent, #000 10%, #000 90%, transparent);
    opacity: 0.68;
  }

  .topology-canvas.portrait .topology-wash.river {
    right: -28%;
    bottom: -10%;
    width: 88%;
    height: 54%;
    background: linear-gradient(135deg, transparent 28%, rgba(78, 184, 212, 0.36), rgba(27, 110, 140, 0.3));
    transform: rotate(-18deg);
  }

  .topology-canvas.portrait .topology-wash.ridge {
    left: -30%;
    top: 8%;
    width: 92%;
    height: 58%;
    background: radial-gradient(ellipse, rgba(125, 183, 86, 0.26), transparent 64%);
    transform: rotate(16deg);
  }

  .topology-canvas.portrait .topology-contours span {
    left: -45%;
    width: 190%;
    height: 52px;
    border-top-color: rgba(229, 255, 245, 0.2);
    background: linear-gradient(180deg, rgba(229, 255, 245, 0.055), transparent);
    transform: rotate(73deg);
  }

  .topology-canvas.portrait .topology-contours span:nth-child(1) {
    top: 18%;
  }

  .topology-canvas.portrait .topology-contours span:nth-child(2) {
    top: 39%;
    transform: rotate(76deg);
  }

  .topology-canvas.portrait .topology-contours span:nth-child(3) {
    top: 60%;
    transform: rotate(72deg);
  }

  .topology-canvas.portrait .topology-contours span:nth-child(4) {
    top: 80%;
    transform: rotate(75deg);
  }

  .topology-canvas.portrait .topology-pipe {
    stroke: rgba(222, 250, 241, 0.5);
    stroke-width: 5;
    stroke-dasharray: 6 10;
  }

  .topology-canvas.portrait .topology-pipe.source {
    stroke: rgba(244, 204, 103, 0.68);
    stroke-width: 6;
  }

  .topology-canvas.portrait .topology-pipe.feed {
    stroke: rgba(90, 229, 148, 0.78);
    stroke-width: 7;
  }

  .topology-canvas.portrait .topology-pipe.sprinkler {
    stroke: rgba(101, 196, 238, 0.76);
    stroke-width: 5;
  }

  .topology-canvas.portrait .topology-pipe.active {
    stroke: #97ffc8;
    stroke-width: 9;
    stroke-dasharray: 15 11;
  }

  .topology-canvas.portrait .topology-node {
    width: min(88px, 24vw);
    min-height: 40px;
    grid-template-columns: 7px minmax(0, 1fr);
    gap: 1px 5px;
    border-color: rgba(232, 255, 246, 0.34);
    background: rgba(5, 24, 30, 0.76);
    box-shadow: 0 10px 24px rgba(2, 16, 20, 0.28);
  }

  .topology-canvas.portrait .topology-node strong {
    font-size: 0.58rem;
  }

  .topology-canvas.portrait .topology-node small {
    font-size: 0.48rem;
  }

  .topology-canvas.portrait .node-state {
    max-width: 100%;
    overflow: hidden;
    font-size: 0.44rem;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topology-canvas.portrait .map-node-tags {
    top: -7px;
    right: -5px;
  }

  .topology-canvas.portrait .map-flag {
    padding: 1px 3px;
    font-size: 0.42rem;
  }

  .topology-canvas.portrait .topology-node.active {
    width: min(98px, 27vw);
    min-height: 45px;
  }

  .topology-canvas.portrait .node-popover {
    display: none;
  }

  .topology-canvas.portrait .map-status-card {
    top: 10px;
    bottom: auto;
    left: 10px;
    width: min(168px, calc(100% - 20px));
    padding: 8px 9px;
    border-color: rgba(238, 249, 244, 0.38);
    background: rgba(4, 22, 28, 0.78);
  }

  .topology-canvas.portrait .map-status-card span {
    font-size: 0.56rem;
  }

  .topology-canvas.portrait .map-status-card strong {
    font-size: 0.92rem;
  }

  .topology-canvas.portrait .map-status-card small {
    font-size: 0.56rem;
    line-height: 1.2;
  }

  .topology-canvas.portrait.topology-visual-radial .topology-pipe {
    stroke-dasharray: none;
  }

  .topology-canvas.portrait.topology-visual-radial .topology-pipe.source {
    stroke-width: 4.4;
  }

  .topology-canvas.portrait.topology-visual-radial .topology-pipe.feed {
    stroke-width: 4.8;
  }

  .topology-canvas.portrait.topology-visual-radial .topology-pipe.sprinkler {
    stroke-width: 3;
  }
}

@media (max-width: 380px) {
  .topology-canvas.portrait .topology-node {
    width: min(80px, 25vw);
    padding: 5px;
  }

  .topology-canvas.portrait .topology-node.active {
    width: min(88px, 28vw);
  }

  .topology-canvas.portrait .topology-node strong {
    font-size: 0.52rem;
  }

  .topology-canvas.portrait .topology-node small {
    font-size: 0.44rem;
  }
}

/* Interaction pass: readable schedule objects, dark operations panels, tighter spot watering controls. */
.hero-status-card .status-card-actions button.secondary,
.operations-lower button.secondary {
  border-color: rgba(224, 247, 238, 0.26);
  background: rgba(8, 34, 40, 0.72);
  color: rgba(244, 255, 250, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.hero-status-card .status-card-actions button.secondary:hover,
.operations-lower button.secondary:hover {
  background: rgba(20, 78, 79, 0.82);
  filter: none;
}

.upcoming-panel,
.spot-panel {
  border-color: rgba(232, 244, 239, 0.22);
  background:
    linear-gradient(155deg, rgba(8, 34, 40, 0.9), rgba(6, 58, 58, 0.74)),
    rgba(7, 29, 34, 0.84);
  color: #f6fffb;
  box-shadow: 0 18px 54px rgba(2, 16, 20, 0.22);
  backdrop-filter: blur(16px) saturate(1.12);
}

.upcoming-panel .subtle,
.spot-panel .subtle,
.spot-panel .field span {
  color: rgba(232, 248, 240, 0.7);
}

.upcoming-panel h2,
.spot-panel h2 {
  color: #f7fffb;
}

.spot-panel input {
  border-color: rgba(224, 247, 238, 0.18);
  background: rgba(4, 22, 28, 0.68);
  color: #f6fffb;
}

.spot-panel .label-buttons {
  gap: 6px;
}

.spot-panel .label-buttons button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 0.76rem;
}

.spot-panel .spot-zone-list {
  gap: 6px;
}

.spot-panel .spot-zone {
  align-items: center;
  border-color: rgba(224, 247, 238, 0.16);
  border-radius: 7px;
  padding: 7px 8px;
  background: rgba(4, 22, 28, 0.54);
}

.spot-panel .spot-zone:hover,
.spot-panel .spot-zone:focus-within {
  border-color: rgba(112, 236, 170, 0.42);
  background: rgba(12, 48, 53, 0.74);
}

.spot-panel .spot-zone input {
  width: 15px;
  height: 15px;
  margin: 1px 0 0;
}

.spot-panel .spot-zone strong {
  color: rgba(247, 255, 251, 0.94);
  font-size: 0.78rem;
  line-height: 1.12;
}

.spot-panel .spot-zone small {
  color: rgba(232, 248, 240, 0.62);
  font-size: 0.66rem;
  line-height: 1.15;
}

.spot-panel .status-line {
  color: rgba(232, 248, 240, 0.76);
  font-size: 0.76rem;
}

.next24-sync-note {
  border-color: rgba(224, 247, 238, 0.18);
  background: rgba(5, 24, 30, 0.66);
  color: rgba(247, 255, 251, 0.94);
}

.next24-sync-note span {
  color: rgba(232, 248, 240, 0.68);
}

.next24-sync-note.success {
  border-color: rgba(112, 236, 170, 0.34);
  background: rgba(33, 126, 82, 0.22);
}

.next24-sync-note.warning {
  border-color: rgba(240, 209, 144, 0.38);
  background: rgba(154, 101, 20, 0.24);
}

.next24-ticks {
  border-bottom-color: rgba(224, 247, 238, 0.18);
}

.next24-ticks span,
.next24-label span {
  color: rgba(232, 248, 240, 0.58);
}

.next24-label strong {
  color: rgba(247, 255, 251, 0.94);
}

.next24-track {
  border-color: rgba(224, 247, 238, 0.18);
  background:
    linear-gradient(90deg, rgba(142, 216, 255, 0.1) 1px, transparent 1px) 0 0 / 12.5% 100%,
    rgba(3, 20, 25, 0.56);
  overflow: visible;
}

.next24-row.selected .next24-track {
  border-color: rgba(112, 236, 170, 0.38);
  box-shadow: inset 3px 0 0 rgba(112, 236, 170, 0.56);
}

.next24-label {
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 4px 7px;
  background: transparent;
  color: rgba(247, 255, 251, 0.94);
  box-shadow: none;
  text-align: left;
}

.next24-label:hover,
.next24-label:focus-visible {
  border-color: rgba(112, 236, 170, 0.32);
  background: rgba(112, 236, 170, 0.08);
  filter: none;
  outline: none;
}

.next24-bar {
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 3px 7px;
  text-align: left;
}

.next24-bar.selected,
.next24-bar:hover,
.next24-bar:focus-visible {
  z-index: 8;
  border-color: rgba(255, 231, 159, 0.74);
  box-shadow: 0 0 0 2px rgba(255, 220, 129, 0.22), 0 12px 26px rgba(2, 16, 20, 0.28);
  filter: none;
  outline: none;
}

.next24-bar > span,
.next24-bar > small {
  display: block;
  min-width: 0;
  overflow: hidden;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.next24-bar > span {
  font-size: 0.7rem;
  font-weight: 900;
}

.next24-bar > small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.58rem;
  font-weight: 800;
}

.next24-bar > .next24-popover {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  bottom: auto;
  z-index: 30;
  display: none;
  width: max-content;
  max-width: min(340px, 72vw);
  transform: translateX(-50%);
  border: 1px solid rgba(232, 244, 239, 0.24);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(4, 22, 28, 0.97);
  color: #f7fffb;
  box-shadow: 0 18px 44px rgba(2, 16, 20, 0.36);
  pointer-events: auto;
}

.next24-popover strong,
.next24-popover span {
  display: block;
  overflow: visible;
  color: inherit;
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.next24-popover strong {
  font-size: 0.84rem;
}

.next24-popover span {
  margin-top: 4px;
  color: rgba(232, 248, 240, 0.72);
}

.next24-bar:hover > .next24-popover,
.next24-bar:focus-visible > .next24-popover {
  display: block;
}

.next24-detail-panel {
  display: grid;
  gap: 10px;
  min-height: 166px;
  margin: 0 14px 14px;
  border: 1px solid rgba(224, 247, 238, 0.18);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(145deg, rgba(4, 22, 28, 0.82), rgba(8, 54, 55, 0.68)),
    rgba(4, 22, 28, 0.8);
  color: #f7fffb;
}

.next24-detail-heading {
  display: grid;
  gap: 3px;
}

.next24-detail-heading span,
.next24-detail-list > span {
  color: rgba(232, 248, 240, 0.62);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.next24-detail-heading strong {
  font-size: 0.96rem;
  line-height: 1.18;
}

.next24-detail-heading small {
  color: rgba(232, 248, 240, 0.68);
}

.next24-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.next24-detail-metrics div {
  min-width: 0;
  border: 1px solid rgba(224, 247, 238, 0.14);
  border-radius: 7px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.next24-detail-metrics span {
  display: block;
  color: rgba(232, 248, 240, 0.58);
  font-size: 0.66rem;
  font-weight: 800;
}

.next24-detail-metrics strong {
  display: block;
  margin-top: 4px;
  color: #f7fffb;
  overflow-wrap: anywhere;
  font-size: 0.78rem;
  line-height: 1.22;
}

.next24-detail-list ul {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.next24-detail-list li {
  display: grid;
  gap: 2px;
  border-left: 3px solid rgba(112, 236, 170, 0.44);
  padding-left: 8px;
}

.next24-detail-list li span {
  color: rgba(232, 248, 240, 0.68);
  font-size: 0.76rem;
  line-height: 1.3;
}

.next24-empty {
  border-color: rgba(224, 247, 238, 0.2);
  background: rgba(4, 22, 28, 0.42);
}

.schedule-timeline {
  gap: 8px;
  padding: 0 14px 14px;
}

.timeline-ticks {
  margin-left: 236px;
  border-bottom-color: rgba(57, 102, 103, 0.28);
}

.timeline-row {
  grid-template-columns: 222px minmax(820px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.timeline-row.selected .timeline-track {
  border-color: rgba(39, 145, 95, 0.38);
  box-shadow: inset 3px 0 0 rgba(39, 145, 95, 0.72);
}

.timeline-label {
  min-height: 38px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 5px 8px;
  background: transparent;
  color: #132025;
  box-shadow: none;
  text-align: left;
}

.timeline-label:hover,
.timeline-label:focus-visible {
  border-color: rgba(39, 145, 95, 0.34);
  background: rgba(31, 122, 82, 0.08);
  filter: none;
  outline: none;
}

.timeline-track {
  height: 38px;
  border-color: rgba(57, 102, 103, 0.22);
  background:
    linear-gradient(90deg, rgba(38, 119, 168, 0.08) 1px, transparent 1px) 0 0 / 12.5% 100%,
    rgba(245, 250, 249, 0.78);
  overflow: visible;
}

.timeline-bar {
  top: 5px;
  bottom: 5px;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-width: 34px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: 6px;
  padding: 3px 6px;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(22, 83, 109, 0.18);
  text-align: left;
  overflow: visible;
}

.timeline-bar.feed {
  background: linear-gradient(135deg, #1f8b5d, #156a49);
}

.timeline-bar.sprinkler {
  background: linear-gradient(135deg, #2b83b2, #1b5f90);
}

.timeline-bar.disabled {
  background: linear-gradient(135deg, #8a969c, #67767d);
}

.timeline-bar.selected,
.timeline-bar:focus-visible,
.timeline-bar:hover {
  z-index: 6;
  border-color: rgba(255, 231, 159, 0.76);
  box-shadow: 0 0 0 2px rgba(255, 220, 129, 0.22), 0 12px 26px rgba(2, 16, 20, 0.24);
  filter: none;
  outline: none;
}

.timeline-bar > span,
.timeline-bar > small {
  display: block;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  color: inherit;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-bar > span {
  font-size: 0.68rem;
  font-weight: 900;
}

.timeline-bar > small {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.56rem;
  font-weight: 800;
}

.timeline-bar .schedule-popover {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  z-index: 20;
  display: none;
  width: max-content;
  max-width: min(320px, 70vw);
  transform: translateX(-50%);
  border: 1px solid rgba(232, 244, 239, 0.24);
  border-radius: 8px;
  padding: 10px 11px;
  background: rgba(4, 22, 28, 0.96);
  color: #f7fffb;
  box-shadow: 0 18px 44px rgba(2, 16, 20, 0.34);
  pointer-events: auto;
}

.schedule-popover strong,
.schedule-popover span {
  display: block;
  overflow: visible;
  color: inherit;
  font-size: 0.72rem;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.schedule-popover strong {
  font-size: 0.82rem;
}

.schedule-popover span {
  margin-top: 4px;
  color: rgba(232, 248, 240, 0.72);
}

.timeline-bar:hover .schedule-popover,
.timeline-bar:focus-visible .schedule-popover {
  display: block;
}

.schedule-detail-panel {
  margin: 0 14px 14px;
  border: 1px solid rgba(57, 102, 103, 0.22);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(248, 252, 251, 0.96), rgba(229, 241, 235, 0.9));
  color: #132025;
}

.schedule-detail-heading {
  display: grid;
  gap: 3px;
}

.schedule-detail-heading span,
.schedule-detail-list > span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.schedule-detail-heading strong {
  font-size: 1rem;
  line-height: 1.2;
}

.schedule-detail-heading small {
  color: var(--muted);
}

.schedule-detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 12px;
}

.schedule-detail-metrics div {
  min-width: 0;
  border: 1px solid rgba(57, 102, 103, 0.16);
  border-radius: 7px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.55);
}

.schedule-detail-metrics span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.schedule-detail-metrics strong {
  display: block;
  margin-top: 4px;
  overflow-wrap: anywhere;
  font-size: 0.8rem;
  line-height: 1.2;
}

.schedule-detail-list {
  margin-top: 12px;
}

.schedule-detail-list ul {
  display: grid;
  gap: 6px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.schedule-detail-list li {
  display: grid;
  gap: 2px;
  border-left: 3px solid rgba(39, 145, 95, 0.46);
  padding-left: 8px;
}

.schedule-detail-list li span,
.schedule-detail-note {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.schedule-detail-note {
  margin-top: 12px;
  border-top: 1px solid rgba(57, 102, 103, 0.16);
  padding-top: 10px;
}

@media (max-width: 1180px) {
  .schedule-detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .timeline-ticks {
    margin-left: 148px;
    min-width: 680px;
  }

  .timeline-row {
    grid-template-columns: 136px minmax(680px, 1fr);
    gap: 8px;
  }

  .timeline-label {
    min-height: 34px;
    padding: 4px 6px;
  }

  .timeline-label strong {
    font-size: 0.66rem;
  }

  .timeline-label span {
    font-size: 0.58rem;
  }

  .timeline-track {
    height: 34px;
  }

  .timeline-bar {
    min-width: 30px;
    padding: 3px 5px;
  }

  .timeline-bar > span {
    font-size: 0.58rem;
  }

  .timeline-bar > small {
    font-size: 0.5rem;
  }

  .next24-detail-metrics {
    grid-template-columns: 1fr;
  }

  .next24-detail-panel {
    min-height: 330px;
  }

  .schedule-detail-metrics {
    grid-template-columns: 1fr;
  }
}

.collapsible-panel > .collapsible-heading {
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.collapsible-panel > .collapsible-heading::-webkit-details-marker {
  display: none;
}

.collapsible-panel[open] > .collapsible-heading {
  border-bottom: 1px solid rgba(57, 102, 103, 0.14);
  padding-bottom: 12px;
}

.panel-title {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.panel-title-heading {
  color: #12272d;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.panel-summary {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.collapse-icon {
  position: relative;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid rgba(57, 102, 103, 0.18);
  border-radius: 6px;
  background: rgba(248, 252, 251, 0.74);
  color: #245c8f;
}

.collapse-icon::before {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  content: "";
  transform: rotate(-45deg);
  transition: transform 160ms ease;
}

.collapsible-panel[open] .collapse-icon::before {
  transform: rotate(45deg);
}

.collapsible-heading:hover .collapse-icon,
.collapsible-heading:focus-visible .collapse-icon {
  border-color: rgba(39, 145, 95, 0.36);
  background: rgba(229, 242, 235, 0.9);
}

.collapsible-heading:focus-visible {
  outline: 2px solid rgba(36, 92, 143, 0.34);
  outline-offset: 3px;
}

.collapsible-content {
  display: grid;
  gap: 12px;
  padding: 0 14px 14px;
}

.collapsible-content > .inline-controls {
  justify-self: end;
}

.collapsible-content > .table-wrap,
.collapsible-content > .projection-summary,
.collapsible-content > .live-summary,
.collapsible-content > .live-columns,
.collapsible-content > .schedule-timeline,
.collapsible-content > .schedule-detail-panel {
  margin: 0;
}

.collapsible-content > .schedule-timeline {
  padding: 0;
}

@media (max-width: 760px) {
  .collapsible-content {
    padding: 0 10px 10px;
  }

  .collapsible-content > .inline-controls {
    justify-self: stretch;
  }
}

.weather-view {
  min-width: 0;
  padding: 12px;
}

.weather-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  grid-template-areas:
    "hero decision"
    "adjustment adjustment"
    "charts charts"
    "providers rules"
    "history history";
  gap: 12px;
  align-items: start;
}

.weather-hero-panel {
  grid-area: hero;
}

.weather-decision-panel {
  grid-area: decision;
}

.weather-chart-panel {
  grid-area: charts;
}

.weather-adjustment-panel {
  grid-area: adjustment;
}

.weather-provider-panel {
  grid-area: providers;
}

.weather-rules-panel {
  grid-area: rules;
}

.weather-history-panel {
  grid-area: history;
}

.weather-hero-panel,
.weather-decision-panel {
  border-color: rgba(224, 247, 238, 0.18);
  background:
    radial-gradient(circle at 14% 0%, rgba(142, 216, 255, 0.14), transparent 34%),
    linear-gradient(150deg, rgba(4, 22, 28, 0.94), rgba(8, 54, 55, 0.78)),
    rgba(4, 22, 28, 0.86);
  color: #f7fffb;
  overflow: hidden;
}

.weather-hero-panel .panel-heading,
.weather-decision-panel .panel-heading,
.weather-adjustment-panel .panel-heading,
.weather-chart-panel .panel-heading,
.weather-provider-panel .panel-heading,
.weather-rules-panel .panel-heading,
.weather-history-panel .panel-heading {
  margin: 12px;
}

.weather-hero-panel h2,
.weather-decision-panel h2 {
  color: #ffffff;
}

.weather-hero-panel .subtle,
.weather-decision-panel .subtle {
  color: rgba(232, 248, 240, 0.66);
}

.weather-hero-panel .status-line {
  margin: 0 12px 12px;
  color: rgba(232, 248, 240, 0.7);
}

.weather-hero-panel .status-line[data-tone="success"] {
  color: #a8f4c8;
}

.weather-hero-panel .status-line[data-tone="warning"] {
  color: #f6d894;
}

.weather-hero-panel .status-line[data-tone="error"] {
  color: #f5a095;
}

.weather-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 0 12px 12px;
}

.weather-metric {
  display: grid;
  gap: 5px;
  min-height: 92px;
  border: 1px solid rgba(224, 247, 238, 0.13);
  border-radius: 8px;
  padding: 11px;
  background: rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.weather-metric span,
.weather-decision-heading span,
.weather-history-item span {
  color: rgba(232, 248, 240, 0.58);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.weather-metric strong {
  align-self: end;
  font-size: 1.42rem;
  line-height: 1;
}

.weather-metric small {
  color: rgba(232, 248, 240, 0.68);
  font-size: 0.7rem;
  line-height: 1.25;
}

.weather-warning strong {
  color: #f6d894;
}

.weather-success strong {
  color: #a8f4c8;
}

.weather-probability strong {
  color: #b8ecff;
}

.weather-actual strong {
  color: #c8d7ff;
}

.weather-decision-card,
.weather-empty-card {
  margin: 0 12px 12px;
}

.weather-adjustment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: flex-end;
}

.weather-adjustment-actions button {
  min-height: 34px;
}

.weather-adjustment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 10px;
  margin: 0 12px 12px;
}

.weather-adjustment-panel .status-line {
  margin: 0 12px 12px;
}

.weather-adjustment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 8px;
  margin: 0 12px 12px;
}

.weather-adjustment-summary .weather-metric {
  border-color: rgba(55, 92, 95, 0.16);
  background: rgba(248, 252, 251, 0.82);
  color: var(--ink);
}

.weather-adjustment-summary .weather-metric span,
.weather-adjustment-summary .weather-metric small {
  color: var(--muted);
}

.weather-adjustment-summary .weather-metric strong {
  color: var(--ink);
}

.weather-adjustment-summary .weather-warning strong {
  color: var(--amber);
}

.weather-adjustment-summary .weather-success strong {
  color: var(--green);
}

.weather-adjustment-summary .weather-probability strong {
  color: var(--blue);
}

.weather-adjustment-empty {
  grid-column: 1 / -1;
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(55, 92, 95, 0.24);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
}

.weather-adjustment-empty strong {
  color: var(--ink);
}

.weather-adjustment-impact-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 7px;
  margin: 0 12px 12px;
}

.weather-adjustment-impact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(55, 92, 95, 0.14);
  border-left: 3px solid rgba(39, 112, 75, 0.5);
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(248, 252, 251, 0.78);
}

.weather-adjustment-impact[data-action="suppress"] {
  border-left-color: rgba(242, 178, 77, 0.84);
}

.weather-adjustment-impact div {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.weather-adjustment-impact strong,
.weather-adjustment-impact span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-adjustment-impact span,
.weather-adjustment-impact small {
  color: var(--muted);
  font-size: 0.74rem;
}

.weather-adjustment-impact small {
  font-weight: 900;
}

.weather-decision-card {
  display: grid;
  gap: 12px;
}

.weather-empty-card {
  display: grid;
  gap: 4px;
  border: 1px dashed rgba(224, 247, 238, 0.18);
  border-radius: 8px;
  padding: 14px;
  color: rgba(232, 248, 240, 0.68);
}

.weather-empty-card strong {
  color: #ffffff;
}

.weather-decision-heading {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.weather-decision-dot {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  background: #8ed8ff;
  box-shadow: 0 0 0 5px rgba(142, 216, 255, 0.16);
}

.weather-decision-card[data-action="hold"] .weather-decision-dot {
  background: #f2b24d;
  box-shadow: 0 0 0 6px rgba(242, 178, 77, 0.18), 0 0 24px rgba(242, 178, 77, 0.42);
}

.weather-decision-card[data-action="adjust"] .weather-decision-dot {
  background: #f2b24d;
  box-shadow: 0 0 0 6px rgba(242, 178, 77, 0.18), 0 0 24px rgba(242, 178, 77, 0.42);
}

.weather-decision-heading strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 1.32rem;
  line-height: 1.08;
}

.weather-decision-heading small {
  display: block;
  margin-top: 5px;
  color: rgba(232, 248, 240, 0.7);
}

.weather-decision-reasons {
  display: grid;
  gap: 8px;
}

.weather-decision-reasons p {
  border-left: 3px solid rgba(112, 236, 170, 0.42);
  padding-left: 9px;
  color: rgba(247, 255, 251, 0.82);
  font-size: 0.86rem;
  line-height: 1.35;
}

.weather-decision-card[data-action="hold"] .weather-decision-reasons p {
  border-left-color: rgba(242, 178, 77, 0.68);
}

.weather-decision-card[data-action="adjust"] .weather-decision-reasons p {
  border-left-color: rgba(242, 178, 77, 0.68);
}

.weather-decision-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.weather-decision-footer span {
  border: 1px solid rgba(224, 247, 238, 0.16);
  border-radius: 999px;
  padding: 4px 8px;
  color: rgba(232, 248, 240, 0.76);
  font-size: 0.7rem;
  font-weight: 800;
}

.weather-chart-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 12px 12px;
}

.weather-chart-card {
  min-width: 0;
}

.chart-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.chart-title-row strong {
  font-size: 0.9rem;
}

.chart-title-row span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.weather-chart {
  min-height: 308px;
  border: 1px solid rgba(55, 92, 95, 0.16);
  border-radius: 8px;
  padding: 10px;
  background:
    linear-gradient(180deg, rgba(248, 252, 251, 0.96), rgba(239, 246, 248, 0.92)),
    #ffffff;
}

.weather-svg {
  display: block;
  width: 100%;
  height: 238px;
}

.weather-chart-axis {
  stroke: rgba(55, 92, 95, 0.34);
  stroke-width: 1;
}

.weather-chart-gridline {
  stroke: rgba(55, 92, 95, 0.12);
  stroke-width: 1;
}

.weather-chart-tick,
.weather-chart-axis-label {
  fill: #68757c;
  font-size: 0.62rem;
  font-weight: 800;
}

.forecast-bar.openmeteo {
  fill: rgba(36, 92, 143, 0.58);
}

.forecast-bar.nws {
  fill: rgba(39, 112, 75, 0.2);
  stroke: rgba(39, 112, 75, 0.72);
  stroke-width: 1.2;
}

.probability-line {
  fill: none;
  stroke: rgba(242, 178, 77, 0.9);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.actual-bar {
  fill: rgba(36, 92, 143, 0.5);
}

.actual-cumulative-line {
  fill: none;
  stroke: rgba(106, 76, 147, 0.86);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.weather-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.weather-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.weather-legend i {
  display: inline-block;
  width: 14px;
  height: 8px;
  border-radius: 999px;
}

.legend-openmeteo,
.legend-actual {
  background: rgba(36, 92, 143, 0.58);
}

.legend-nws {
  border: 1px solid rgba(39, 112, 75, 0.72);
  background: rgba(39, 112, 75, 0.2);
}

.legend-probability {
  background: #f2b24d;
}

.legend-cumulative {
  background: #6a4c93;
}

.chart-empty {
  display: grid;
  min-height: 268px;
  place-items: center;
  border: 1px dashed rgba(55, 92, 95, 0.24);
  border-radius: 7px;
  color: var(--muted);
  font-weight: 800;
}

.weather-provider-grid,
.weather-rules-grid,
.weather-history-list {
  display: grid;
  gap: 8px;
  margin: 0 12px 12px;
}

.weather-provider-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.weather-provider-card {
  display: grid;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(55, 92, 95, 0.16);
  border-radius: 8px;
  padding: 11px;
  background: rgba(248, 252, 251, 0.76);
}

.weather-provider-card span {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.weather-provider-card strong {
  font-size: 0.92rem;
  line-height: 1.15;
}

.weather-provider-card small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.3;
}

.weather-provider-card.warning {
  border-color: #e7c48e;
  background: var(--amber-soft);
}

.weather-provider-card.empty,
.weather-history-empty {
  border: 1px dashed rgba(55, 92, 95, 0.24);
  border-radius: 8px;
  padding: 14px;
  color: var(--muted);
}

.weather-rules-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.weather-rules-grid .field span {
  font-size: 0.76rem;
}

.weather-switch-field {
  align-content: space-between;
}

.switch-control {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 40px;
  cursor: pointer;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-track {
  position: relative;
  width: 44px;
  height: 24px;
  border: 1px solid rgba(55, 92, 95, 0.24);
  border-radius: 999px;
  background: rgba(55, 92, 95, 0.14);
  transition: background 160ms ease, border-color 160ms ease;
}

.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(4, 22, 28, 0.18);
  transition: transform 160ms ease;
}

.switch-control input:checked + .switch-track {
  border-color: rgba(39, 112, 75, 0.58);
  background: rgba(39, 112, 75, 0.78);
}

.switch-control input:checked + .switch-track::after {
  transform: translateX(20px);
}

.switch-control strong {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1;
}

.weather-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  border-left: 3px solid rgba(39, 112, 75, 0.42);
  padding: 8px 0 8px 10px;
}

.weather-history-item[data-action="hold"],
.weather-history-item[data-action="adjust"] {
  border-left-color: rgba(242, 178, 77, 0.72);
}

.weather-history-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.weather-history-item strong,
.weather-history-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.weather-history-item small {
  color: var(--muted);
  font-size: 0.78rem;
}

@media (max-width: 1160px) {
  .weather-dashboard {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hero"
      "decision"
      "adjustment"
      "charts"
      "providers"
      "rules"
      "history";
  }

  .weather-chart-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .weather-view {
    padding: 10px;
  }

  .weather-hero-grid,
  .weather-rules-grid,
  .weather-adjustment-grid,
  .weather-adjustment-summary {
    grid-template-columns: 1fr;
  }

  .weather-adjustment-actions {
    justify-content: stretch;
  }

  .weather-adjustment-actions button {
    flex: 1 1 130px;
  }

  .weather-chart {
    padding: 8px;
  }

  .weather-svg {
    height: 220px;
  }

  .weather-history-item {
    grid-template-columns: 1fr;
  }
}

.manual-view {
  min-width: 0;
  padding: 12px;
}

.manual-layout {
  display: grid;
  grid-template-columns: minmax(260px, 0.86fr) minmax(260px, 0.72fr) minmax(360px, 1.22fr);
  gap: 12px;
  align-items: stretch;
}

.manual-picker-panel,
.manual-launch-panel,
.manual-queue-panel {
  display: flex;
  flex-direction: column;
  min-height: min(700px, calc(100vh - 92px));
  border-color: rgba(224, 247, 238, 0.18);
  background:
    linear-gradient(150deg, rgba(4, 22, 28, 0.9), rgba(8, 54, 55, 0.72)),
    rgba(4, 22, 28, 0.82);
  color: #f7fffb;
  overflow: hidden;
}

.manual-picker-panel .panel-heading,
.manual-launch-panel .panel-heading,
.manual-queue-panel .panel-heading {
  margin: 12px;
}

.manual-picker-panel h2,
.manual-launch-panel h2,
.manual-queue-panel h2 {
  color: #ffffff;
  font-size: 0.98rem;
}

.manual-picker-panel .subtle,
.manual-launch-panel .subtle,
.manual-queue-panel .subtle,
.manual-add-row .field span {
  color: rgba(232, 248, 240, 0.64);
  font-size: 0.72rem;
  line-height: 1.2;
}

.manual-zone-list,
.manual-queue-list {
  display: grid;
  gap: 6px;
  margin: 0 12px 12px;
}

.manual-zone-list {
  flex: 1 1 auto;
  max-height: none;
  overflow: auto;
  padding-right: 2px;
}

.manual-zone {
  display: block;
  min-height: 38px;
  border: 1px solid rgba(224, 247, 238, 0.14);
  border-radius: 7px;
  padding: 8px 9px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(247, 255, 251, 0.9);
  text-align: left;
  box-shadow: none;
}

.manual-zone:hover,
.manual-zone:focus-visible,
.manual-zone.selected {
  border-color: rgba(112, 236, 170, 0.46);
  background: rgba(112, 236, 170, 0.13);
  color: #ffffff;
  filter: none;
  outline: none;
}

.manual-zone strong,
.manual-queue-item strong,
.manual-queue-item small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manual-zone strong {
  color: inherit;
  font-size: 0.78rem;
  line-height: 1.12;
}

.manual-queue-item small,
.manual-now-card small,
.manual-history-item small {
  color: rgba(232, 248, 240, 0.62);
  font-size: 0.7rem;
  line-height: 1.25;
}

.manual-selected-card {
  display: grid;
  gap: 6px;
  min-height: 116px;
  margin: 0 12px 12px;
  border: 1px solid rgba(112, 236, 170, 0.26);
  border-radius: 8px;
  padding: 13px;
  background:
    linear-gradient(135deg, rgba(112, 236, 170, 0.16), rgba(142, 216, 255, 0.08)),
    rgba(255, 255, 255, 0.05);
}

.manual-selected-card span {
  color: rgba(232, 248, 240, 0.58);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-selected-card strong {
  align-self: end;
  color: #ffffff;
  font-size: 1.28rem;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.manual-add-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  margin: 0 12px 12px;
}

.manual-add-row input {
  min-height: 42px;
  border-color: rgba(224, 247, 238, 0.22);
  background: rgba(255, 255, 255, 0.92);
}

.manual-add-row button {
  min-height: 40px;
}

.manual-now-playing {
  margin: 0 12px 10px;
}

.manual-now-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  overflow: hidden;
  border: 1px solid rgba(112, 236, 170, 0.25);
  border-radius: 8px;
  padding: 11px;
  background:
    linear-gradient(135deg, rgba(112, 236, 170, 0.14), rgba(142, 216, 255, 0.08)),
    rgba(255, 255, 255, 0.06);
  color: #ffffff;
}

.manual-now-card.empty {
  border-color: rgba(224, 247, 238, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.manual-now-card span,
.manual-history > span {
  color: rgba(232, 248, 240, 0.58);
  font-size: 0.66rem;
  font-weight: 900;
  text-transform: uppercase;
}

.manual-now-card strong {
  display: block;
  margin-top: 3px;
  font-size: 0.96rem;
  line-height: 1.15;
}

.manual-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  background: rgba(224, 247, 238, 0.12);
}

.manual-progress span {
  display: block;
  height: 100%;
  background: #70ecaa;
}

.manual-queue-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 32px 34px;
  gap: 8px;
  align-items: center;
  border: 1px solid rgba(224, 247, 238, 0.14);
  border-radius: 8px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: #ffffff;
}

.manual-queue-item.dragging {
  opacity: 0.48;
}

.drag-handle {
  width: 14px;
  height: 22px;
  border-left: 2px dotted rgba(232, 248, 240, 0.35);
  border-right: 2px dotted rgba(232, 248, 240, 0.35);
}

.manual-queue-position {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(142, 216, 255, 0.12);
  color: #b8ecff;
  font-size: 0.78rem;
  font-weight: 900;
}

.icon-action {
  width: 32px;
  min-height: 32px;
  padding: 0;
}

.manual-empty {
  border: 1px dashed rgba(224, 247, 238, 0.22);
  border-radius: 8px;
  padding: 16px;
  color: rgba(232, 248, 240, 0.58);
  text-align: center;
}

.manual-queue-actions {
  display: flex;
  justify-content: flex-end;
  margin: 0 12px 12px;
}

.manual-queue-actions button {
  min-height: 34px;
}

.manual-history {
  display: grid;
  gap: 7px;
  margin: auto 12px 12px;
}

.manual-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  border-left: 3px solid rgba(112, 236, 170, 0.42);
  padding-left: 8px;
  color: #ffffff;
}

.manual-history-item[data-status="failed"] {
  border-left-color: rgba(163, 58, 47, 0.56);
}

.manual-history-item[data-status="cancelled"] {
  border-left-color: rgba(138, 90, 18, 0.54);
}

@media (max-width: 1120px) {
  .manual-layout {
    grid-template-columns: minmax(240px, 0.9fr) minmax(300px, 1.1fr);
  }

  .manual-queue-panel {
    grid-column: 1 / -1;
  }

  .manual-zone-list {
    max-height: 420px;
  }
}

@media (max-width: 700px) {
  .manual-view {
    padding: 10px;
  }

  .manual-layout {
    grid-template-columns: 1fr;
  }

  .manual-picker-panel,
  .manual-launch-panel,
  .manual-queue-panel {
    min-height: auto;
  }

  .manual-zone-list {
    max-height: 320px;
  }

  .manual-queue-item {
    grid-template-columns: 18px minmax(0, 1fr) 34px;
  }

  .manual-queue-position {
    display: none;
  }
}
