:root {
  --bg: oklch(0.11 0.012 240);
  --surface: oklch(0.155 0.013 240);
  --surface-2: oklch(0.19 0.013 240);
  --surface-3: oklch(0.215 0.013 240);
  --border: oklch(0.24 0.014 240);
  --border-dim: oklch(0.18 0.012 240);
  --text: oklch(0.93 0.006 240);
  --text-2: oklch(0.65 0.01 240);
  --text-3: oklch(0.4 0.01 240);
  --accent: oklch(0.62 0.13 225);
  --accent-hi: oklch(0.72 0.12 225);
  --accent-bg: oklch(0.62 0.13 225 / 0.1);
  --accent-line: oklch(0.62 0.13 225 / 0.3);
  --crit: oklch(0.65 0.18 25);
  --crit-bg: oklch(0.65 0.18 25 / 0.1);
  --warn: oklch(0.75 0.16 60);
  --warn-bg: oklch(0.75 0.16 60 / 0.1);
  --ok: oklch(0.68 0.13 155);
  --ok-bg: oklch(0.68 0.13 155 / 0.1);
  --crit-line: oklch(0.65 0.18 25 / 0.28);
  --warn-line: oklch(0.75 0.16 60 / 0.28);
  --ok-line: oklch(0.68 0.13 155 / 0.24);
  --mono: "IBM Plex Mono", monospace;
  --sans: "IBM Plex Sans", sans-serif;
  --space-4: 4px;
  --space-8: 8px;
  --space-12: 12px;
  --space-16: 16px;
  --space-20: 20px;
  --space-24: 24px;
  --space-32: 32px;
  --space-40: 40px;
  --space-48: 48px;
  --space-56: 56px;
  --space-64: 64px;
  --space-72: 72px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --control-h: 44px;
  --panel-head-h: 48px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

body {
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
  background: none;
  border: 0;
}

.material-symbols-outlined {
  font-family: "Material Symbols Outlined";
  font-size: 18px;
  line-height: 1;
  font-style: normal;
  font-weight: 400;
  display: inline-block;
  white-space: nowrap;
}

.page {
  max-width: 1440px;
  margin: 0 auto;
  padding: 0 64px 120px;
}

.topbar,
.page-title,
.section-label,
.live-grid,
.triage-block {
  opacity: 0;
  transform: translateY(8px);
  animation: page-in 0.5s ease forwards;
}

.page-title {
  animation-delay: 0.04s;
}

.section-label {
  animation-delay: 0.08s;
}

.live-grid,
.triage-block {
  animation-delay: 0.12s;
}

@keyframes page-in {
  to {
    opacity: 1;
    transform: none;
  }
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-16);
}

.topbar {
  min-height: var(--space-56);
  margin-bottom: var(--space-72);
  border-bottom: 1px solid var(--border-dim);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: var(--space-24);
}

.topbar-tag,
.topbar-label,
.topbar-page,
.page-eyebrow,
.section-label {
  font-family: var(--mono);
  text-transform: uppercase;
}

.topbar-tag {
  font-size: 11px;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.topbar-label,
.topbar-page {
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.topbar-sep {
  width: 1px;
  height: 16px;
  background: var(--border);
}

.page-title {
  margin-bottom: var(--space-72);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 1fr);
  gap: var(--space-48);
  align-items: end;
}

.page-eyebrow {
  display: flex;
  align-items: center;
  gap: var(--space-12);
  margin-bottom: var(--space-20);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--accent);
}

.page-eyebrow::before {
  content: "";
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.page-title h1 {
  margin: 0 0 20px;
  font-size: 44px;
  line-height: 1.1;
  letter-spacing: -0.022em;
  font-weight: 600;
}

.page-title h1 span {
  color: var(--accent-hi);
}

.page-subtitle,
.page-summary,
.triage-desc,
.triage-note {
  font-weight: 300;
  line-height: 1.7;
}

.page-subtitle {
  max-width: 560px;
  margin: 0;
  font-size: 15px;
  color: var(--text-2);
}

.page-summary {
  margin: 0;
  padding-left: 28px;
  border-left: 1px solid var(--border-dim);
  font-size: 14px;
  color: var(--text-3);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 20px;
  font-size: 10px;
  letter-spacing: 0.14em;
  color: var(--text-3);
}

.section-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-dim);
}

.live-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: var(--space-20);
  align-items: start;
  margin-bottom: var(--space-72);
}

.workspace,
.drawer {
  min-width: 0;
  display: grid;
  gap: var(--space-32);
}

.workspace {
  padding: 18px;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.workspace-controls {
  display: grid;
  gap: var(--space-12);
}

.drawer {
  position: sticky;
  top: 16px;
}

.workspace-title,
.drawer-title {
  display: grid;
  gap: var(--space-4);
  min-width: 0;
}

.workspace-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-8);
  min-height: var(--panel-head-h);
}

.drawer-head {
  display: grid;
  gap: var(--space-8);
  min-height: var(--panel-head-h);
}

.workspace-title strong,
.drawer-title strong {
  font-size: 16px;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.workspace-title span,
.drawer-title span {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

.tiny-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
  line-height: 1.2;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.tiny-btn:hover,
.tiny-btn:focus-visible {
  border-color: var(--accent-line);
  background: var(--accent-bg);
  color: var(--text);
}

.tiny-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.refresh-btn {
  width: var(--control-h);
  min-width: var(--control-h);
  min-height: var(--control-h);
  padding: 0;
  flex: 0 0 auto;
}

.toolbar {
  display: grid;
  gap: var(--space-12);
}

.toolbar-main {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: var(--space-12);
  align-items: end;
}

.field {
  display: grid;
  gap: var(--space-8);
  min-width: 0;
}

.toolbar-search {
  grid-column: 1 / -1;
  gap: 0;
}

.toolbar-main > .field:not(.toolbar-search) {
  gap: 0;
}

.label {
  font-size: 12px;
  letter-spacing: 0.02em;
  color: var(--text-2);
}

.input,
.select-trigger {
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
  line-height: 1.2;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  transition: background 0.18s ease, border-color 0.18s ease;
}

.input::placeholder {
  color: var(--text-3);
}

.input:hover,
.select-trigger:hover,
.chip-toggle span:hover {
  border-color: var(--accent-line);
  background: var(--surface-3);
}

.input:focus-visible,
.select-trigger:focus-visible,
.chip-toggle input:focus-visible + span {
  outline: none;
  border-color: var(--accent-line);
  background: var(--surface-3);
}

.select-field {
  position: relative;
}

.select-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  text-align: left;
  cursor: pointer;
}

.select-trigger .value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  display: none;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.select-field.open .select-menu {
  display: grid;
  gap: 2px;
}

.select-option {
  width: 100%;
  min-height: 38px;
  padding: 9px 12px;
  font-size: 12px;
  line-height: 1.45;
  border-radius: var(--radius-sm);
  text-align: left;
  cursor: pointer;
  color: var(--text);
}

.select-option:hover,
.select-option[aria-selected="true"] {
  background: var(--accent-bg);
}

.toolbar-actions {
  display: grid;
  justify-content: end;
  align-self: center;
}

.toolbar .tiny-btn {
  min-height: 40px;
  padding: 0 12px;
}

.workspace .tiny-btn,
.workspace .chip-toggle span {
  border: 0;
}

.live-grid :is(
  .tiny-btn,
  .input,
  .select-trigger,
  .select-menu,
  .chip-toggle span,
  .metric,
  .cluster-widget,
  .drawer-toolbar,
  .flow-index,
  .pill,
  .status-inline
) {
  border: 0;
}

.live-grid :is(
  .tiny-btn:hover,
  .tiny-btn:focus-visible,
  .input:hover,
  .input:focus-visible,
  .select-trigger:hover,
  .select-trigger:focus-visible,
  .chip-toggle span:hover,
  .chip-toggle input:focus-visible + span,
  .pill,
  .status-inline
) {
  border-color: transparent;
}

.filters-toggle {
  width: 40px;
  min-width: 40px;
  padding: 0;
}

.chip-row {
  display: none;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-12);
  align-items: start;
}

.chip-row.open {
  display: grid;
}

.chip-toggle {
  position: relative;
}

.chip-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.chip-toggle span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 40px;
  padding: 0 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
  text-align: center;
  line-height: 1.3;
}

.chip-toggle input:checked + span {
  border-color: var(--accent-line);
  background: var(--accent-bg);
  color: var(--text);
}

#contentStateNormal {
  display: grid;
  gap: var(--space-24);
}

.ops-grid {
  display: grid;
  gap: var(--space-32);
}

.ops-section,
.drawer-section,
.state-box {
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.ops-section {
  display: grid;
  gap: var(--space-16);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-16);
}

.metric {
  position: relative;
  display: grid;
  gap: var(--space-8);
  align-content: start;
  min-height: 122px;
  padding: 15px 16px 15px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
}

.metric::before {
  content: "";
  position: absolute;
  inset: 14px auto 14px 0;
  width: 2px;
  background: var(--border);
}

.metric.accent::before {
  background: var(--accent);
}

.metric.crit::before {
  background: var(--crit);
}

.metric.warn::before {
  background: var(--warn);
}

.metric .kicker {
  font-size: 12px;
  color: var(--text-3);
}

.metric .value {
  font-size: 26px;
  line-height: 1.05;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.metric.accent .value {
  color: var(--accent-hi);
}

.metric .meta {
  max-width: 24ch;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-2);
}

.subhead,
.table-meta,
.cluster-head {
  display: grid;
  gap: var(--space-8);
}

.subhead strong,
.table-meta strong,
.cluster-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
}

.subhead span,
.table-meta span,
.cluster-subtitle {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.queue-list,
.table-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg);
}

.queue-header,
.queue-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) minmax(120px, 0.7fr) minmax(88px, auto);
  align-items: center;
  gap: var(--space-16);
}

.queue-header {
  padding: var(--space-12) var(--space-16);
  border-bottom: 1px solid var(--border-dim);
  font-size: 12px;
  color: var(--text-3);
}

.queue-item {
  width: 100%;
  padding: var(--space-16);
  border-top: 1px solid var(--border-dim);
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease;
}

.queue-item:first-of-type {
  border-top: 0;
}

.queue-item:hover,
.queue-item.active {
  background: var(--accent-bg);
}

.queue-priority {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-2);
  font-family: var(--mono);
  font-size: 12px;
}

.queue-item.active .queue-priority {
  color: var(--accent-hi);
}

.queue-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.queue-main strong {
  font-size: 14px;
  line-height: 1.4;
}

.queue-meta {
  font-size: 12px;
  color: var(--text-2);
}

.queue-status,
.queue-signals {
  justify-self: start;
}

.cluster-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-16);
}

.cluster-widget {
  display: grid;
  gap: var(--space-12);
  padding: var(--space-16);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg);
}

.cluster-widget .top {
  display: grid;
  gap: var(--space-12);
}

.cluster-line {
  display: flex;
  justify-content: space-between;
  gap: var(--space-12);
  font-size: 14px;
}

.cluster-value {
  color: var(--text-2);
}

.bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--surface-3);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-line), var(--accent));
}

.table-wrap {
  overflow-x: auto;
}

.action-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  border-collapse: collapse;
}

.action-table th,
.action-table td {
  text-align: left;
}

.action-table thead th {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-dim);
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
  background: var(--bg);
}


.th-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
}

.action-table tbody tr {
  cursor: pointer;
  transition: background 0.18s ease;
}

.action-table tbody tr:hover,
.action-table tbody tr.selected {
  background: var(--accent-bg);
}

.action-table tbody td {
  padding: 12px 14px;
  vertical-align: middle;
  border-top: 1px solid var(--border-dim);
}

.action-table tbody tr:first-child td {
  border-top: 0;
}

.primary-cell,
.signal-stack {
  display: grid;
  gap: 6px;
}

.signal-stack {
  justify-items: start;
}

.issue-title,
.site-name {
  color: var(--text);
}

.issue-title {
  font-weight: 500;
  font-size: 14px;
}

.site-name,
.subtext,
.owner-status,
.next-step-compact,
.updated-badge {
  font-size: 12px;
  line-height: 1.45;
}

.site-name,
.subtext,
.owner-status,
.updated-badge {
  color: var(--text-2);
}

.subtext {
  font-size: 11px;
}

.owner-alert,
.kv-danger {
  color: var(--crit);
}

.updated-badge {
  font-family: var(--mono);
  font-size: 12px;
}

.drawer-toolbar {
  display: grid;
  gap: var(--space-8);
}

.drawer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-8);
  justify-content: start;
}

.drawer-actions .tiny-btn {
  min-width: 0;
  min-height: 42px;
  padding-inline: 12px;
  justify-content: center;
  text-align: center;
  white-space: normal;
}

.drawer-grid {
  display: grid;
  gap: var(--space-16);
}

.drawer-section {
  padding: var(--space-16);
}

.drawer-summary-section {
  display: grid;
  gap: var(--space-32);
  align-content: start;
}

.drawer-section h3 {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 500;
}

.status-section-top {
  margin-bottom: var(--space-12);
}

.status-section {
  display: grid;
  gap: var(--space-12);
}

.workflow-rail {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.workflow-step {
  display: grid;
  place-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  text-align: center;
  color: var(--text-3);
}

.workflow-step.is-done {
  color: var(--accent);
}

.workflow-step.is-current {
  background: var(--surface-2);
  color: var(--text);
}

.workflow-step.is-muted {
  opacity: 0.58;
}

.kv {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-8) var(--space-12);
}

.kv > div:nth-child(odd) {
  color: var(--text-2);
  font-size: 13px;
}

.kv > div:nth-child(even) {
  text-align: right;
  font-size: 13px;
}

#incidentNarrative {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.65;
}

.drawer-next {
  display: grid;
  gap: var(--space-12);
}

.drawer-next .primary {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
}

.next-meta-grid {
  display: grid;
  gap: 0;
}

.drawer-next .meta {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: var(--space-8) var(--space-16);
  padding: var(--space-8) 0;
  border-top: 1px solid var(--border-dim);
  font-size: 13px;
  line-height: 1.5;
}

.drawer-next .meta:first-child {
  border-top: 0;
  padding-top: 0;
}

.meta-label {
  color: var(--text-3);
}

.meta-value {
  color: var(--text-2);
}

.drawer-tabs-section {
  display: grid;
  gap: var(--space-12);
}

.drawer-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-md);
  background: var(--bg);
}

.drawer-tab {
  min-height: 30px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.drawer-tab:hover,
.drawer-tab.active {
  background: var(--surface-2);
  color: var(--text);
}

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

.drawer-stages,
.timeline,
.mini-kpi-grid {
  display: grid;
  gap: var(--space-12);
}

.stage-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: var(--space-12);
  align-items: start;
}

.flow-index {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text-2);
  font-size: 12px;
}

.flow-copy {
  min-width: 0;
}

.flow-copy strong {
  display: block;
  margin-bottom: var(--space-4);
  font-size: 13px;
  font-weight: 500;
}

.flow-copy span {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.stage-state {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-3);
}

.stage-state::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

.stage-state.is-ok {
  color: var(--ok);
}

.stage-state.is-accent {
  color: var(--accent-hi);
}

.mini-kpi {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: var(--space-4) var(--space-16);
}

.mini-kpi .kicker,
.mini-kpi .meta {
  font-size: 12px;
  color: var(--text-3);
}

.mini-kpi .kicker {
  grid-row: 1 / span 2;
}

.mini-kpi .value {
  font-size: 13px;
  color: var(--text-2);
}

.timeline-item {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr);
  gap: var(--space-12);
  align-items: start;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--text-3);
}

.timeline-body {
  display: grid;
  gap: 4px;
}

.timeline-body strong {
  font-size: 12px;
  color: var(--text-3);
  font-family: var(--mono);
}

.timeline-body span {
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-2);
}

.status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding: 0;
  justify-self: start;
  white-space: nowrap;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 400;
}

.status-inline::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
  flex: 0 0 auto;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 10px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  font-size: 10px;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pill,
.status-inline.is-accent {
  color: var(--accent-hi);
}

.pill.crit,
.status-inline.is-critical {
  color: var(--crit);
}

.pill.warn,
.status-inline.is-warning {
  color: var(--warn);
}

.pill.ok,
.status-inline.is-ok {
  color: var(--ok);
}

.pill {
  background: var(--accent-bg);
}

.pill.crit {
  background: var(--crit-bg);
}

.pill.warn {
  background: var(--warn-bg);
}

.pill.ok {
  background: var(--ok-bg);
}

.tooltip {
  position: relative;
  display: inline-flex;
}

.th-info {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  cursor: help;
}

.tooltip:hover::after,
.tooltip:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  width: min(240px, 60vw);
  padding: 10px 12px;
  transform: translateX(-50%);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
  white-space: normal;
  z-index: 30;
}

.empty,
.loading,
.error {
  display: none;
  min-height: 240px;
  place-items: center;
}

.state-box {
  min-height: 240px;
  display: grid;
  gap: var(--space-12);
  padding: var(--space-24);
}

.state-box strong {
  font-size: 18px;
}

.state-box p {
  margin: 0;
  max-width: 56ch;
  color: var(--text-2);
  line-height: 1.6;
}

.skeleton {
  display: grid;
  gap: var(--space-12);
  width: min(680px, 100%);
}

.sk-line {
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.06));
  background-size: 200% 100%;
  animation: skeleton 1.2s linear infinite;
}

.sk-line-70 {
  width: 70%;
}

.sk-line-73 {
  width: 73%;
}

.sk-line-88 {
  width: 88%;
}

.sk-line-94 {
  width: 94%;
}

.sk-line-97 {
  width: 97%;
}

.sk-line-100 {
  width: 100%;
}

@keyframes skeleton {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

.note-block {
  color: var(--text-2);
  font-size: 14px;
  line-height: 1.7;
}

.triage-block {
  padding: var(--space-32);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.triage-header {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-48);
}

.triage-title {
  margin-bottom: var(--space-12);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.triage-desc {
  font-size: 14px;
  color: var(--text-2);
}

.triage-note {
  padding-left: 24px;
  border-left: 1px solid var(--border-dim);
  font-size: 13px;
  color: var(--text-3);
}

@media (max-width: 1180px) {
  .page-title,
  .live-grid,
  .triage-header {
    grid-template-columns: 1fr;
  }

  .drawer {
    position: static;
  }

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

  .toolbar-search {
    grid-column: 1 / -1;
  }

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

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

@media (max-width: 760px) {
  .page {
    padding: 0 var(--space-20) var(--space-72);
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: var(--space-12) 0;
  }

  .page-title h1 {
    font-size: 36px;
  }

  .dashboard-grid,
  .cluster-grid,
  .drawer-tabs,
  .queue-header,
  .queue-item {
    grid-template-columns: 1fr;
  }

  .toolbar-main,
  .toolbar-actions {
    grid-template-columns: 1fr;
  }

  .chip-row {
    grid-template-columns: 1fr;
  }

  .queue-header {
    display: none;
  }

  .queue-item {
    align-items: start;
  }

  .action-table {
    min-width: 720px;
  }

  .drawer-next .meta,
  .drawer-actions,
  .mini-kpi {
    grid-template-columns: 1fr;
  }

  .mini-kpi .kicker {
    grid-row: auto;
  }
}

.page-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
  border-top: 1px solid var(--border-dim);
  margin-top: 48px;
}
.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: all 0.15s;
  border: 1px solid var(--border);
  color: var(--text-2);
  background: transparent;
}
.nav-btn:hover {
  border-color: var(--accent-line);
  background: var(--accent-bg);
  color: var(--text);
}
.nav-btn-primary {
  border-color: var(--accent-line);
  color: var(--accent-hi);
  background: var(--accent-bg);
}
.nav-btn-primary:hover {
  background: var(--accent);
  color: var(--bg);
  border-color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
