/*
  BAK-597 Phase A mockups only. Additive on /public/styles.css — not loaded by the app.
  Stack views (Overview, Ops, Host, Explorer, Wallboard) in pingarr chrome.
*/

.maintenance-banner {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: color-mix(in srgb, var(--warn) 18%, var(--bg));
  border-bottom: 1px solid color-mix(in srgb, var(--warn) 45%, var(--line));
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
}
.maintenance-banner[hidden] {
  display: none !important;
}
.maintenance-banner button,
.maintenance-banner .ghost {
  min-height: 44px;
  min-width: 44px;
  padding: 10px 14px;
}
.stack-page button.ghost:disabled,
.stack-page button.ghost[disabled],
.stack-page .detail-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
/* Wallboard kiosk: >=768px keeps fullscreen lock; phones scroll the document (BAK-608). */
body.wallboard-kiosk-mode #app .rail,
body.wallboard-kiosk-mode #inboxView {
  display: none !important;
}
body.wallboard-kiosk-mode .stack-view:not(#wallboardView) {
  display: none !important;
}
body.wallboard-kiosk-mode .wallboard-kiosk-extra {
  display: none !important;
}
@media (min-width: 768px) {
  body.wallboard-kiosk-mode #app.shell {
    display: block;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100dvh;
  }
  body.wallboard-kiosk-mode #wallboardView {
    display: block !important;
    position: fixed;
    inset: 0;
    z-index: 35;
    max-width: none;
    overflow: auto;
    background: var(--bg);
  }
}
@media (max-width: 767px) {
  body.wallboard-kiosk-mode {
    overflow-x: hidden;
    overflow-y: auto;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-y: auto;
  }
  body.wallboard-kiosk-mode #app.shell {
    display: block;
    grid-template-columns: minmax(0, 1fr);
    min-height: 100vh;
    min-height: 100dvh;
  }
  body.wallboard-kiosk-mode #wallboardView {
    display: block !important;
    position: static;
    inset: auto;
    z-index: auto;
    max-width: none;
    overflow: visible;
    background: var(--bg);
  }
  body.wallboard-kiosk-mode .wallboard-shell {
    min-height: 100vh;
    min-height: 100dvh;
    padding-bottom: calc(56px + env(safe-area-inset-bottom, 0px));
  }
  body.wallboard-kiosk-mode .wallboard-grid.wb-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  body.wallboard-kiosk-mode #wallboardExitKiosk.wallboard-exit {
    position: fixed;
    left: var(--space-3);
    right: var(--space-3);
    bottom: max(var(--space-3), env(safe-area-inset-bottom, 0px));
    z-index: 45;
    min-height: 44px;
    margin: 0;
    touch-action: manipulation;
    border: 1px solid var(--line-strong);
    background: var(--panel);
    box-shadow: 0 4px 24px color-mix(in srgb, var(--bg-deep) 65%, transparent);
  }
}
.maintenance-banner-copy {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  min-width: 0;
}
.maintenance-banner-error {
  margin: 0;
  font-size: 0.82rem;
}
.stack-write-reason {
  margin: var(--space-2) 0 0;
  font-size: 0.86rem;
  width: 100%;
}
.stack-page button.primary.stack-action--disabled,
.stack-page button.primary:disabled {
  background: color-mix(in srgb, var(--line) 70%, var(--bg));
  color: var(--muted);
  border-color: var(--line);
  opacity: 1;
}
.state-pill.is-stale-pill {
  color: var(--muted);
}
@media (min-width: 361px) {
  #stackSearch,
  #explorerStateFilter,
  .overview-toolbar .field-search input,
  .overview-toolbar .field-compact select {
    min-height: 44px;
  }
}
.explorer-image-cell {
  max-width: 12rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-size: 0.78rem;
}
@media (max-width: 393px) {
  .explorer-image-cell {
    max-width: 8rem;
  }
}
.maintenance-chip {
  border: 1px solid color-mix(in srgb, var(--warn) 50%, var(--line));
  background: color-mix(in srgb, var(--warn) 12%, var(--panel));
  border-radius: var(--radius-md);
}
.maintenance-summary-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--panel);
}
.maintenance-summary-card .feed-list {
  margin: var(--space-2) 0;
}

/* Mockup target: 44px taps on stack chrome (pingarr desktop rail is slightly under — corrected here). */
.shell--stack .rail-actions .ghost,
.shell--stack .lanes button,
.shell--stack .stack-head-actions button,
.shell--stack .stack-head-actions a.btn-ghost,
.shell--stack .live-bar button,
.shell--stack .ops-actions button,
.shell--stack .explorer-table button,
.shell--stack .log-toolbar button,
.shell--stack .modal-mock button,
.shell--stack .btn-mock,
.shell--stack .card-actions-row button,
.shell--stack .detail-actions button,
.wallboard-shell .btn-mock,
.input-mock {
  min-height: 44px;
}

/* Sticky desktop rail (stack mockups use full shell height) */
@media (min-width: 821px) {
  .shell--stack {
    align-items: start;
  }
  .shell--stack .rail {
    position: sticky;
    top: 0;
    height: 100vh;
    max-height: 100vh;
    overflow-y: auto;
  }
  .shell--stack .stack-main {
    min-height: 100vh;
    min-width: 0;
  }
}

.lanes a {
  text-align: left;
  font-family: var(--mono);
  font-size: 0.86rem;
  letter-spacing: 0.01em;
  background: transparent;
  border: 0;
  border-radius: var(--radius-md);
  padding: 11px var(--space-3);
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  color: var(--muted);
  text-decoration: none;
  min-height: 44px;
  align-items: center;
}
.lanes a:hover,
.lanes a:focus-visible {
  background: var(--hover);
  color: var(--text);
}
.lanes a.is-on {
  background: var(--hover-strong);
  color: var(--accent);
}
.lanes .stack-label {
  margin: var(--space-2) var(--space-3) 0;
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--meta);
}
.bucket-label--short {
  display: none;
}
@media (max-width: 820px) {
  .bucket-label--long {
    display: none;
  }
  .bucket-label--short {
    display: inline;
  }
}
.panel-head-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}
.panel-head-row .eyebrow {
  margin: 0;
}

.mock-banner {
  margin: 0 0 var(--space-4);
  padding: 10px var(--space-3);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.02em;
  overflow-wrap: anywhere;
}

.stack-main {
  padding: 28px 28px 40px;
  max-width: 100%;
  overflow-x: hidden;
}
.stack-head {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  min-width: 0;
  max-width: 100%;
}
.stack-head > div {
  min-width: 0;
  max-width: 100%;
}
.stack-head h1 {
  margin: 0;
  font-size: var(--type-display);
  letter-spacing: -0.03em;
}
.stack-head .sub {
  margin: 6px 0 0;
  color: var(--muted);
  max-width: 52ch;
}
.stack-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  max-width: 100%;
  min-width: 0;
}
.stack-head-actions button,
.stack-head-actions a.btn-ghost {
  min-height: 44px;
  padding: 10px 14px;
}
a.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--text);
  text-decoration: none;
  background: transparent;
}
.live-bar.stack-live {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin: 0 0 var(--space-4);
  padding: 10px var(--space-3);
  border-radius: var(--radius-md);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.live-bar.is-loading {
  border: 1px solid var(--line);
  color: var(--muted);
}
.live-bar.is-ok {
  border: 1px solid var(--ok-line);
  background: var(--ok-dim);
  color: var(--ok);
}
.live-bar.is-warn {
  border: 1px solid var(--warn-line);
  background: var(--warn-dim);
  color: var(--warn);
}
.live-bar.is-crit {
  border: 1px solid var(--crit-line);
  background: var(--crit-dim);
  color: var(--crit);
}
.live-bar button {
  min-height: 44px;
  margin-left: auto;
}
.stale-chip {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-pill);
  padding: 3px 8px;
}

.panel-block {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  margin-bottom: var(--space-4);
}
.panel-block h2 {
  margin: 0 0 var(--space-2);
  font-size: 1rem;
  font-weight: 650;
}
.eyebrow {
  margin: 0 0 4px;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-soft);
}

.stack-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-2);
  margin: 0 0 var(--space-4);
}
.stack-tile {
  display: grid;
  gap: 4px;
  padding: var(--space-3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.stack-tile .num {
  font-family: var(--mono);
  font-size: 1.4rem;
  font-weight: 600;
  line-height: 1;
}
.stack-tile.is-ok .num { color: var(--ok); }
.stack-tile.is-warn .num { color: var(--warn); }
.stack-tile.is-crit .num { color: var(--crit); }
.stack-tile.is-action .num { color: var(--action); }
.stack-tile .label {
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.stack-tile.is-stale {
  opacity: 0.72;
  border-style: dashed;
}
.stack-tile.is-stale::after {
  content: "Stale";
  font-family: var(--mono);
  font-size: 0.6rem;
  color: var(--warn);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.host-vitals {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.vital {
  padding: var(--space-3);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: 4px;
}
.vital span {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.vital strong {
  font-family: var(--mono);
  font-size: 1.1rem;
}
.vital small {
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}
.vital.is-missing strong {
  color: var(--warn);
}
.vital.is-stale {
  border-style: dashed;
  opacity: 0.8;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-3);
}
.service-card-m {
  padding: var(--space-3) var(--space-4);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  display: grid;
  gap: var(--space-2);
  min-width: 0;
}
.service-card-m h3 {
  margin: 0;
  font-size: var(--type-title);
  overflow-wrap: anywhere;
  word-break: break-word;
}
.service-card-m .meta-line {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.state-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
}
.state-pill.is-ok { color: var(--ok); border-color: var(--ok-line); }
.state-pill.is-warn { color: var(--warn); border-color: var(--warn-line); }
.state-pill.is-crit { color: var(--crit); border-color: var(--crit-line); }
.state-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
}
.state-dot.is-ok { background: var(--ok); }
.state-dot.is-warn { background: var(--warn); }
.state-dot.is-crit { background: var(--crit); }

.skeleton {
  background: linear-gradient(90deg, var(--panel), var(--hover), var(--panel));
  background-size: 200% 100%;
  animation: skel 1.2s ease-in-out infinite;
  border-radius: var(--radius-md);
  min-height: 72px;
}
@keyframes skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  margin-bottom: var(--space-3);
}
.toolbar-row--fields {
  align-items: flex-end;
}
.toolbar-row--fields label:not(.check-mock) {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
  flex: 1 1 200px;
  min-width: 0;
  max-width: 100%;
}
.toolbar-row--fields .field-search {
  flex: 2 1 280px;
}
.toolbar-row--fields .field-compact {
  flex: 1 1 140px;
}
.toolbar-row .input-mock {
  height: 44px;
  min-height: 44px;
  max-height: 44px;
  flex: 0 0 auto;
  width: 100%;
  padding: 0 12px;
  box-sizing: border-box;
}

.ops-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.ops-grid .span-2 { grid-column: 1 / -1; }
.feed-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}
.feed-row {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-deep);
  display: grid;
  gap: 6px;
}
.feed-row strong { overflow-wrap: anywhere; }
.feed-row .time {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--muted);
}
.ops-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.ops-actions button {
  min-height: 44px;
  padding: 10px 14px;
}
.ops-actions button.is-destructive {
  border-color: var(--crit-line);
  color: var(--crit);
}
button.primary-action {
  background: var(--action);
  color: var(--action-text);
  border: 0;
  border-radius: var(--radius-md);
  font-weight: 600;
}

.host-infra-empty {
  margin: var(--space-2) 0 var(--space-4);
  font-size: 0.92rem;
  line-height: 1.45;
}
.host-stale-note {
  margin: var(--space-3) 0 0;
  font-size: 0.82rem;
}
.host-lane-stack {
  display: grid;
  gap: var(--space-2);
}
.host-snapshot-grid {
  grid-template-columns: 1fr;
}
.host-snapshot-grid.host-snapshot--dim .host-card strong,
.host-snapshot-grid.host-snapshot--dim .host-chip {
  opacity: 0.55;
}
.host-empty-card {
  padding: var(--space-4);
  text-align: center;
}
.host-empty-card strong {
  font-size: 1rem;
}
.host-card h2 {
  margin: 0 0 var(--space-2);
  font-size: var(--type-title);
}
.host-meter {
  position: relative;
  height: 8px;
  border-radius: var(--radius-pill);
  background: var(--line);
  overflow: hidden;
  flex: 1 1 auto;
  min-width: 0;
}
.host-meter-fill {
  height: 100%;
  background: var(--ok);
  border-radius: inherit;
}
.host-meter.is-warn .host-meter-fill {
  background: var(--warn);
}
.host-meter-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
}
.host-volume-list {
  gap: var(--space-3);
}
.host-volume-item {
  display: grid;
  gap: var(--space-2);
  align-items: start;
}
.host-volume-name {
  display: inline;
  font-family: var(--mono);
  font-size: 0.82rem;
  overflow-wrap: normal;
  word-break: normal;
  line-height: 1.35;
  max-width: 100%;
}
.host-volume-metrics {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}
.host-volume-metrics .host-meter {
  flex: 1 1 auto;
  min-width: 4.5rem;
}
.host-volume-pct {
  flex: 0 0 auto;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.host-volume-detail {
  margin: 0;
  font-size: 0.78rem;
  overflow-wrap: normal;
  word-break: normal;
}
.host-collected-row {
  align-items: flex-start;
}
.host-collected-value {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
  text-align: right;
}
.host-collected-text {
  overflow-wrap: normal;
  word-break: normal;
}
.host-row-label {
  flex-shrink: 0;
}
.host-row-value {
  white-space: nowrap;
  text-align: right;
}
@media (min-width: 431px) {
  .host-volume-item {
    grid-template-columns: minmax(min-content, max-content) minmax(0, 1fr);
    grid-template-areas:
      "name metrics"
      "detail detail";
    column-gap: var(--space-3);
    row-gap: 6px;
  }
  .host-volume-name {
    grid-area: name;
    width: min-content;
    max-width: 100%;
  }
  .host-volume-metrics {
    grid-area: metrics;
  }
  .host-volume-detail {
    grid-area: detail;
  }
}
.host-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-2);
}
.host-chip {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.host-chip.is-ok {
  color: var(--ok);
  border-color: var(--ok-line);
}
.host-chip.is-warn {
  color: var(--warn);
  border-color: var(--warn-line);
}
.host-chip.is-crit {
  color: var(--crit);
  border-color: var(--crit-line);
}
.host-stale-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--mono);
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--warn);
  border: 1px solid var(--warn-line);
}
.stack-head--host .stack-head-host-title {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-2);
  flex-wrap: nowrap;
  min-width: 0;
}
.stack-head--host .stack-head-host-title h1 {
  margin: 0;
  flex: 0 0 auto;
  white-space: nowrap;
}
.stack-head--host .host-head-refresh {
  flex: 0 0 auto;
  min-height: 44px;
  min-width: 44px;
}
.infra-grid:not(.host-snapshot-grid) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
}
.host-snapshot-grid.infra-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}
.host-snapshot-grid .infra-list li {
  overflow-wrap: normal;
  word-break: normal;
}
.host-snapshot-grid .infra-list .host-row-value {
  white-space: nowrap;
  flex-shrink: 0;
  text-align: right;
}
.host-snapshot-grid .host-collected-row .host-collected-value {
  white-space: normal;
}
.host-refresh-error {
  margin: 0 0 var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--warn-line);
  color: var(--warn);
  font-size: 0.88rem;
  line-height: 1.4;
}
.infra-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
  font-family: var(--mono);
  font-size: 0.82rem;
}
.infra-list li:not(.host-volume-item) {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  overflow-wrap: anywhere;
}

.explorer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-3);
  min-width: 0;
}
.explorer-table-wrap {
  overflow-x: auto;
  max-width: 100%;
  -webkit-overflow-scrolling: touch;
}
.explorer-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.explorer-table th,
.explorer-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.explorer-table th {
  font-family: var(--mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.explorer-table td.name {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 28ch;
}
.explorer-table button {
  min-height: 44px;
  min-width: 44px;
  padding: 8px 12px;
}
.log-pane {
  margin: 0;
  max-height: min(320px, 40vh);
  overflow: auto;
  overflow-x: auto;
  background: var(--bg-deep);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  font-family: var(--mono);
  font-size: 0.76rem;
  line-height: 1.5;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.log-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-bottom: var(--space-2);
}
.log-toolbar button {
  min-height: 44px;
}

.empty-state {
  text-align: center;
  padding: var(--space-6) var(--space-4);
  color: var(--muted);
}
.empty-state strong {
  display: block;
  color: var(--text);
  margin-bottom: var(--space-2);
}

/* Wallboard — full viewport layouts */
.wallboard-shell {
  min-height: 100vh;
  padding: var(--space-4);
  box-sizing: border-box;
  overflow-x: hidden;
}
.wallboard-shell--tv {
  padding: 28px 36px;
  max-width: 1920px;
  margin: 0 auto;
}
.wallboard-shell--kiosk {
  padding: 0;
  background: var(--bg-deep);
}
.wallboard-shell--kiosk .kiosk-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.78rem;
}
.wallboard-header-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-4);
  justify-content: space-between;
  margin-bottom: var(--space-4);
}
.wallboard-clock {
  font-family: var(--mono);
  font-size: 1.4rem;
  color: var(--accent);
}
.wallboard-lanes {
  display: grid;
  gap: var(--space-3);
}
.lane-card {
  padding: var(--space-4);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.lane-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.lane-node {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  min-height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--bg-deep);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.modal-mock {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: var(--space-4);
  background: var(--scrim);
}
.modal-mock .modal-card {
  width: min(480px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--elev-2);
}
.modal-mock h3 { margin: 0 0 var(--space-3); }
.modal-mock p { margin: 0 0 var(--space-4); color: var(--muted); }
.modal-mock .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
}
.modal-mock .modal-actions button {
  min-height: 44px;
  padding: 10px 16px;
}

@media (min-width: 821px) {
  #hostView .stack-head--host {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-3);
  }
  #hostView .host-head-kicker,
  #hostView .host-head-sub {
    display: block;
  }
  #hostView .host-head-tools {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-end;
    gap: var(--space-2);
    flex-shrink: 0;
  }
  #hostView .host-head-tools > * {
    min-height: 44px;
  }
}

@media (min-width: 1280px) {
  .host-snapshot-grid.infra-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .host-volume-metrics .host-meter {
    min-width: 6rem;
  }
}

@media (max-width: 1100px) {
  .ops-grid,
  .infra-grid:not(.host-snapshot-grid),
  .explorer-layout {
    grid-template-columns: 1fr;
  }
  .host-vitals {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .stack-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .stack-page.stack-view {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    box-sizing: border-box;
  }
  .stack-head {
    flex-direction: column;
    align-items: stretch;
  }
  .stack-head .stack-head-actions {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-2);
  }
  .stack-head .stack-head-actions > * {
    min-width: 0;
    min-height: 44px;
    justify-content: center;
    text-align: center;
  }
  #overviewPosture,
  #overviewTiles,
  #homeStackStrip {
    min-width: 0;
    max-width: 100%;
  }
  .stack-main {
    padding: 12px var(--space-3) var(--space-5);
  }
  .stack-head h1 {
    font-size: 1.25rem;
  }
  #hostView .host-head-kicker,
  #hostView .host-head-sub {
    display: none;
  }
  #hostView .host-head-tools {
    display: none;
  }
  #hostView .stack-head--host {
    flex-direction: row;
    align-items: center;
    gap: var(--space-2);
  }
  #hostView .stack-head-host-primary {
    flex: 1 1 auto;
    min-width: 0;
  }
  .lanes a {
    flex: 1 1 0;
    min-width: 0;
    justify-content: center;
    font-size: 0.72rem;
    padding: 8px 6px;
    border-radius: var(--radius-pill);
  }
  .service-grid {
    grid-template-columns: 1fr;
  }
  .explorer-table .hide-mobile {
    display: none;
  }
  .shell--stack .lanes.buckets button {
    flex: 1 1 0;
    min-width: 0;
    padding: 10px 8px;
    min-height: 44px;
    align-items: center;
  }
  .shell--stack .bucket-count {
    flex-shrink: 0;
  }
  /* Systems-only local nav. Bottom tabs (phone) and the area side nav (desktop) are the primary nav. */
  body:not([data-area="systems"]) #stackNav.lanes.lanes--stack.stack-nav,
  body:not([data-area="systems"]) .stack-label {
    display: none !important;
  }
  #stackNav.lanes.lanes--stack.stack-nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2px;
    position: static;
    flex-wrap: unset;
    width: auto;
    margin: 0 var(--space-3) var(--space-2);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: none;
  }
  #stackNav .stack-nav-link {
    flex: unset;
    width: 100%;
    min-height: 44px;
    justify-content: flex-start;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
    border-radius: var(--radius-md);
    padding: 11px var(--space-3);
    font-size: 0.86rem;
    line-height: 1.25;
  }
  #stackNav .stack-nav-link.is-on {
    background: var(--hover-strong);
    color: var(--accent);
    font-weight: 600;
  }
}

/* pingarr-shaped controls in mockups */
.btn-mock {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  background: transparent;
  color: var(--text);
  font-weight: 500;
}
.btn-mock.primary,
button.primary.btn-mock {
  background: var(--action);
  color: var(--action-text);
  border-color: transparent;
  font-weight: 600;
}
.btn-mock.is-destructive {
  border-color: var(--crit-line);
  color: var(--crit);
}
.btn-mock:disabled,
.btn-mock[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}
.input-mock {
  width: 100%;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--bg-deep);
  box-sizing: border-box;
}
.field-search {
  flex: 2 1 280px;
}

.tile-failed {
  background: var(--bg-deep);
  border-color: var(--line);
  opacity: 0.85;
}
.tile-failed .num {
  color: var(--muted) !important;
}
.num-stale s {
  color: var(--muted);
  text-decoration-thickness: 2px;
}
.last-known {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--warn);
}
.stack-tile.is-partial-amber {
  border-color: var(--warn-line);
  background: var(--warn-dim);
}
.stack-tile.is-partial-amber .num {
  color: var(--warn);
}

.state-dot.is-idle { background: var(--muted); }
.state-dot.is-partial { background: var(--warn); }
.state-pill.is-idle { color: var(--muted); border-color: var(--line); }
.lane-node--partial {
  border-color: var(--warn-line);
  background: var(--warn-dim);
}
.lane-card--partial {
  border-color: var(--warn-line);
}

.service-card-m.is-stale-card {
  opacity: 0.82;
  border-style: dashed;
}
.card-select { font-size: 0.85rem; }
.card-actions-row,
.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.overview-toolbar { margin-bottom: var(--space-3); }
.bulk-bar { margin-bottom: 0; }
.check-mock {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.check-mock--inline {
  flex: 1 1 100%;
  flex-direction: row;
  height: 44px;
  max-height: 44px;
  margin: 0;
}
.check-mock--inline input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.ops-disabled-reason {
  font-size: 0.82rem;
  color: var(--warn);
  margin: var(--space-2) 0 0;
}
.link-mock {
  color: var(--accent);
  font-size: 0.82rem;
  text-decoration: underline;
}
.link-mock--tap,
.demo-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  box-sizing: border-box;
}
.demo-links {
  font-size: 0.82rem;
  margin-top: var(--space-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  align-items: center;
}
.feed-row--stale {
  opacity: 0.72;
  border-style: dashed;
}
.stale-time {
  color: var(--muted) !important;
  text-decoration: line-through;
}

.modal-page {
  display: grid;
  place-items: start center;
  padding: var(--space-4) 0;
}
.modal-page .modal-card {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--elev-2);
}
.modal-card--wide { width: min(720px, 100%); }
.modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  justify-content: flex-end;
  margin-top: var(--space-4);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0;
}
.trigger-note {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--accent-soft);
}

.operation-overlay-mock {
  position: relative;
  z-index: 5;
  margin-bottom: var(--space-4);
}
.operation-panel {
  border: 1px solid var(--action);
  box-shadow: var(--glow-action);
}
.pulse-dots {
  display: flex;
  gap: 8px;
  margin-top: var(--space-3);
}
.pulse-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  animation: skel 1s ease-in-out infinite;
}
.ops-grid--dimmed {
  opacity: 0.35;
  pointer-events: none;
}

.wallboard-stale-banner {
  width: 100%;
  margin: 0 0 var(--space-4);
  padding: 16px 20px;
  background: var(--crit);
  color: var(--action-text);
  font-family: var(--mono);
  font-size: clamp(1rem, 2.2vw, 1.35rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  border-radius: var(--radius-md);
  box-sizing: border-box;
}
.wallboard-partial-banner {
  width: 100%;
  margin: 0 0 var(--space-4);
  padding: 14px 20px;
  background: var(--warn);
  color: var(--bg-deep);
  font-family: var(--mono);
  font-size: clamp(0.95rem, 2vw, 1.2rem);
  font-weight: 700;
  text-align: center;
  border-radius: var(--radius-md);
  box-sizing: border-box;
}
.tile-stale-updates {
  border-color: var(--warn-line);
}
.status-chip-mock.is-warn {
  border-color: var(--warn-line);
  color: var(--warn);
}
.lanes--stack {
  display: grid;
  gap: 2px;
}
.wallboard-clock.is-stale-clock {
  color: var(--muted);
  text-decoration: line-through;
}
.stale-clock-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--warn);
  text-decoration: none;
}
.status-chip-mock {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  font-family: var(--mono);
  font-size: 0.72rem;
}
.status-chip-mock.is-crit {
  border-color: var(--crit-line);
  color: var(--crit);
}
.wb-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: center;
  margin-top: var(--space-2);
}
.wallboard-grid.wb-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: var(--space-4);
  align-items: stretch;
}
.wb-lane-skel { min-height: 360px; }
.wb-side-skel { min-height: 360px; }
.wb-section-title {
  margin: 0 0 var(--space-3);
  font-size: 1.1rem;
}
.feed-list--compact .feed-row {
  padding: var(--space-2) var(--space-3);
}

@media (min-width: 1600px) {
  .wallboard-shell--tv {
    min-height: 100vh;
    max-width: none;
    padding: 32px 48px 40px;
    font-size: 1.08rem;
  }
  .wallboard-shell--tv .wb-title {
    font-size: 2.4rem;
    margin: 0;
  }
  .wallboard-shell--tv .wb-strip .stack-tile .num {
    font-size: 2.6rem;
  }
  .wallboard-shell--tv .wb-section-title {
    font-size: 1.45rem;
  }
  .wallboard-shell--tv .lane-node {
    font-size: 1.05rem;
    padding: 12px 16px;
  }
  .wallboard-shell--tv .wb-grid {
    min-height: calc(100vh - 220px);
  }
  .wallboard-shell--tv .wb-lanes,
  .wallboard-shell--tv .wb-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
  }
  .wallboard-shell--tv .wb-side .panel-block {
    flex: 1;
  }
}

.stack-throughput {
  min-width: 0;
}
.host-router-panel {
  margin-top: var(--space-4);
  min-width: 0;
}
.host-router-card h3.host-router-subhead {
  margin: var(--space-4) 0 var(--space-2);
  font-size: 0.95rem;
}
.host-router-alert {
  margin: 0 0 var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
}
.host-router-alert.is-crit {
  color: var(--crit);
  border-color: var(--crit-line);
  background: color-mix(in srgb, var(--crit) 12%, transparent);
}
.host-router-alert-title {
  margin: 0;
  font-weight: 600;
}
.host-router-alert-hint {
  margin: var(--space-2) 0 0;
  color: var(--crit);
  font-size: 0.9rem;
}
.host-router-table-wrap {
  max-width: 100%;
  overflow-x: visible;
}
.host-router-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.86rem;
}
.host-router-table th,
.host-router-table td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
.host-router-table th {
  color: var(--muted);
  font-weight: 600;
}
.host-router-name {
  overflow-wrap: normal;
  word-break: normal;
}
.host-router-forward-cards {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: var(--space-2);
}
.host-router-forward-card {
  padding: var(--space-3);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  min-width: 0;
}
.host-router-forward-name {
  margin: 0 0 var(--space-2);
  font-weight: 600;
  overflow-wrap: normal;
  word-break: normal;
}
.host-router-forward-meta {
  margin: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px var(--space-2);
  font-size: 0.86rem;
}
.host-router-forward-meta dt {
  margin: 0;
  color: var(--muted);
}
.host-router-forward-meta dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
.host-router-flags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1);
  margin-top: var(--space-2);
}
.host-router-flag.is-warn {
  background: color-mix(in srgb, var(--warn) 18%, transparent);
}
.host-router-flag.is-crit {
  background: color-mix(in srgb, var(--crit) 18%, transparent);
}
.host-router--dim .host-router-card strong,
.host-router--dim .host-router-table td,
.host-router--dim .host-router-forward-card {
  opacity: 0.72;
}
.host-router-panel {
  overflow-x: clip;
  max-width: 100%;
  min-width: 0;
}
.host-router-card,
.host-router-forwards {
  max-width: 100%;
  min-width: 0;
}
.host-router-card .infra-list > li {
  min-width: 0;
  align-items: flex-start;
}
.host-router-card .host-row-label {
  flex-shrink: 0;
  min-width: 0;
}
.host-router-card .host-row-value {
  white-space: normal;
  min-width: 0;
  flex: 1 1 8rem;
  overflow-wrap: anywhere;
  word-break: normal;
  text-align: right;
}
.host-router-card .host-collected-value {
  min-width: 0;
  flex: 1 1 8rem;
  overflow-wrap: anywhere;
}
@media (max-width: 820px) {
  .host-router-table-wrap {
    display: none;
  }
  .host-router-forward-cards {
    display: flex;
    flex-direction: column;
  }
}
#hostRefresh.host-head-refresh {
  min-height: 44px;
  min-width: 44px;
}

.host-snapshot-grid > .stack-throughput {
  grid-column: 1 / -1;
}
.stack-throughput .throughput-key,
.stack-throughput .throughput-rate,
.stack-throughput .muted {
  overflow-wrap: anywhere;
}
.stack-throughput .infra-list > li {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 4px;
  min-width: 0;
}
.throughput-chart-wrap {
  position: relative;
  width: 100%;
  min-width: 0;
}
.throughput-chart-interactive {
  display: grid;
  grid-template-rows: 28px minmax(44px, auto);
  margin: 4px 0;
  outline: none;
  min-height: 72px;
  box-sizing: border-box;
}
.throughput-chart-interactive:focus-visible {
  box-shadow: 0 0 0 2px color-mix(in srgb, CanvasText 35%, transparent);
  border-radius: 4px;
}
.throughput-chart-readout-band {
  position: relative;
  min-height: 28px;
  overflow: visible;
  pointer-events: none;
}
.throughput-chart-plot {
  position: relative;
  height: 36px;
  min-height: 44px;
  align-self: end;
}
.throughput-chart-surface {
  position: absolute;
  inset: 0;
  z-index: 3;
  touch-action: pan-y;
  cursor: crosshair;
  background: transparent;
  min-height: 44px;
}
.throughput-chart-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  margin-left: -0.5px;
  background: color-mix(in srgb, currentColor 55%, transparent);
  pointer-events: none;
  z-index: 2;
}
.throughput-chart-readout {
  position: absolute;
  top: 0;
  left: 0;
  max-width: 100%;
  padding: 2px 6px;
  border-radius: 4px;
  background: color-mix(in srgb, Canvas 92%, currentColor 8%);
  color: CanvasText;
  font-size: 0.7rem;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 4px color-mix(in srgb, CanvasText 25%, transparent);
  pointer-events: none;
  z-index: 4;
  box-sizing: border-box;
}
.throughput-chart-readout.is-compact {
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 0.68rem;
  padding: 2px 4px;
}
.throughput-chart-marker-dot.is-active {
  outline: 2px solid color-mix(in srgb, currentColor 70%, Canvas);
  outline-offset: 1px;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.throughput-chart-wrap--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed color-mix(in srgb, currentColor 25%, transparent);
  border-radius: 4px;
}
.throughput-chart-empty {
  margin: 0;
  font-size: 0.85rem;
}
.throughput-chart {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
}
.throughput-chart-markers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.throughput-chart-marker-pin {
  position: absolute;
  width: 0;
  height: 0;
  pointer-events: none;
}
.throughput-chart-marker-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: currentColor;
  pointer-events: none;
}
.throughput-chart-marker-dot.is-series-2 {
  opacity: 0.85;
}
.throughput-chart .is-peak,
.throughput-chart .is-avg,
.throughput-chart .is-tx-peak,
.throughput-chart .is-tx-avg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.throughput-chart .is-peak,
.throughput-chart .is-tx-peak {
  opacity: 0.45;
}
.throughput-chart .is-tx-avg,
.throughput-chart .is-tx-peak {
  stroke-dasharray: 3 2;
}
.stack-live-ops-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.stack-live-ops-row strong {
  flex: 1 1 8rem;
  min-width: 0;
  overflow-wrap: anywhere;
}
.stack-live-ops-row button {
  min-height: 44px;
  min-width: 44px;
}
.wb-plex-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
}
#stackOpConfirm {
  width: min(28rem, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--text);
  padding: var(--space-5);
}
#stackOpConfirm::backdrop {
  background: var(--scrim);
}
#stackOpConfirm .modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
#stackOpConfirm button {
  min-height: 44px;
  min-width: 44px;
}
