:root {
  --ink: #12201b;
  --muted: #6c7772;
  --soft: #eef2ef;
  --canvas: #f5f7f5;
  --surface: #ffffff;
  --surface-2: #fafcfb;
  --line: #e2e8e4;
  --dark: #101a17;
  --dark-2: #17241f;
  --lime: #b8f34a;
  --lime-dark: #6ba50b;
  --teal: #28c7a0;
  --blue: #6d8ff5;
  --amber: #eea640;
  --red: #eb665d;
  --shadow: 0 1px 2px rgba(16, 26, 23, .04), 0 8px 30px rgba(16, 26, 23, .05);
  --radius: 18px;
  --text-2xs: .8125rem;
  --text-xs: .8125rem;
  --text-sm: .8125rem;
  --text-base: .875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); font-size: clamp(16px, calc(15px + .15vw), 18px); }
body { margin: 0; min-height: 100vh; background: var(--canvas); color: var(--ink); font-size: var(--text-base); line-height: 1.45; }
button, input, select { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(109, 143, 245, .32); outline-offset: 2px; }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 30; width: 256px; padding: 26px 18px 18px;
  display: flex; flex-direction: column; color: #dbe4df; background: var(--dark);
  border-right: 1px solid rgba(255,255,255,.06);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 26px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: var(--dark); background: var(--lime); box-shadow: inset 0 -4px 10px rgba(69, 100, 13, .16); transform: rotate(-3deg); }
.brand-mark span { font-size: var(--text-xs); font-weight: 900; letter-spacing: -.04em; transform: rotate(3deg); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-size: var(--text-lg); letter-spacing: -.02em; }
.brand-copy small { color: #91a39a; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .14em; }

.sidebar-context { padding: 0 5px 22px; }
.context-label, .nav-group-label { display: block; color: #7e9188; font-size: var(--text-2xs); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.context-label { margin: 0 8px 8px; }
.workspace-button { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 10px; color: #e7ede9; background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; text-align: left; cursor: default; }
.workspace-icon { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 9px; color: #d8ffa1; background: rgba(184,243,74,.13); font-size: var(--text-2xs); font-weight: 900; letter-spacing: .05em; }
.workspace-button strong, .workspace-button small { display: block; }
.workspace-button strong { font-size: var(--text-sm); }
.workspace-button small { margin-top: 2px; color: #91a39a; font-size: var(--text-2xs); }
.chevron { color: #73857d; }

.navigation { display: flex; flex-direction: column; gap: 4px; min-height: 0; overflow-y: auto; }
.nav-group-label { margin: 14px 12px 6px; }
.nav-item { position: relative; width: 100%; min-height: 45px; display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 9px; padding: 7px 10px; color: #a6b4ad; background: transparent; border: 0; border-radius: 11px; text-align: left; font-size: var(--text-sm); font-weight: 650; cursor: pointer; transition: .18s ease; }
.nav-item:hover { color: #dce5e0; background: rgba(255,255,255,.045); }
.nav-item.is-active { color: #eff6f2; background: rgba(255,255,255,.075); box-shadow: inset 2px 0 0 var(--lime); }
.nav-item.is-active .nav-icon { color: var(--dark); background: var(--lime); }
.nav-icon { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 8px; color: #8ca097; background: rgba(255,255,255,.04); font-size: var(--text-2xs); font-weight: 900; letter-spacing: .06em; transition: .18s ease; }
.nav-count { min-width: 25px; padding: 3px 6px; border-radius: 999px; color: #a0b0a8; background: rgba(255,255,255,.05); font-size: var(--text-2xs); text-align: center; }
.nav-dot { width: 6px; height: 6px; margin-right: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 4px rgba(238,166,64,.09); }

.sidebar-footer { margin-top: auto; padding-top: 18px; }
.mode-card { display: flex; align-items: center; gap: 10px; padding: 11px 12px; margin-bottom: 10px; border: 1px solid rgba(184,243,74,.12); border-radius: 12px; background: rgba(184,243,74,.045); }
.mode-card strong, .mode-card small { display: block; }
.mode-card strong { color: #cbe6b1; font-size: var(--text-xs); }
.mode-card small { margin-top: 2px; color: #8da196; font-size: var(--text-2xs); }
.mode-indicator { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(184,243,74,.08); }
.user-card { width: 100%; display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 9px; padding: 9px; color: #dbe4df; background: transparent; border: 0; border-radius: 12px; text-align: left; cursor: default; }
.avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; color: #d9e4de; background: #283731; font-size: var(--text-2xs); font-weight: 900; }
.user-card strong, .user-card small { display: block; }
.user-card strong { font-size: var(--text-xs); }
.user-card small { color: #8da097; font-size: var(--text-2xs); margin-top: 2px; }
.more { color: #596d63; }

.main-content { min-height: 100vh; margin-left: 256px; }
.topbar { position: sticky; top: 0; z-index: 20; min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 15px 34px; background: rgba(245,247,245,.9); border-bottom: 1px solid rgba(218,225,221,.8); backdrop-filter: blur(14px); }
.topbar-title { display: flex; align-items: center; gap: 12px; }
.eyebrow { display: block; margin-bottom: 3px; color: #7f8a84; font-size: var(--text-2xs); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.topbar h1 { margin: 0; font-size: 24px; line-height: 1.1; letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.last-update { display: flex; align-items: center; gap: 7px; margin-right: 5px; color: #7f8a84; font-size: var(--text-xs); }
.last-update strong { color: #59645f; font-weight: 650; }
.pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 4px rgba(40,199,160,.1); }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); font-size: 17px; cursor: pointer; transition: .18s ease; }
.icon-button:hover { border-color: #cad4ce; transform: translateY(-1px); }
.icon-button.is-loading { animation: spin .8s linear infinite; }
.primary-button, .secondary-button, .text-button, .inline-link { border: 0; cursor: pointer; }
.primary-button { height: 40px; display: flex; align-items: center; gap: 8px; padding: 0 16px; border-radius: 11px; color: var(--dark); background: var(--lime); font-size: var(--text-xs); font-weight: 800; box-shadow: 0 5px 18px rgba(132, 179, 43, .18); }
.primary-button:disabled { color: #8d9892; background: #e4e9e6; box-shadow: none; cursor: not-allowed; }
.mobile-menu { display: none; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 10px; background: white; }

.content-wrap { width: min(1460px, 100%); margin: 0 auto; padding: 24px 34px 50px; }
.data-banner { min-height: 50px; display: flex; align-items: center; gap: 11px; margin-bottom: 18px; padding: 10px 13px; border: 1px solid #dce8c7; border-radius: 13px; background: #f3f8ea; color: #51603d; }
.banner-icon { width: 27px; height: 27px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 8px; color: #52721c; background: #dff0bf; font-size: var(--text-xs); font-weight: 900; }
.data-banner div { display: flex; flex-wrap: wrap; gap: 5px 9px; align-items: baseline; }
.data-banner strong { font-size: var(--text-sm); }
.data-banner div span { color: #6e795f; font-size: var(--text-xs); }
.banner-pill { margin-left: auto; padding: 5px 8px; border-radius: 999px; color: #5e6c49; background: rgba(255,255,255,.7); border: 1px solid #dde8ce; font-size: var(--text-2xs); font-weight: 750; text-transform: uppercase; letter-spacing: .07em; white-space: nowrap; }

.view { display: none; animation: view-in .22s ease both; }
.view.is-visible { display: block; }
.status-hero { position: relative; min-height: 330px; display: grid; grid-template-columns: 1.15fr .85fr; overflow: hidden; padding: 44px 48px; border-radius: 24px; color: #ecf5f0; background: radial-gradient(circle at 83% 42%, rgba(184,243,74,.1), transparent 27%), linear-gradient(128deg, #111c18 0%, #13221c 52%, #0d1713 100%); box-shadow: 0 18px 45px rgba(16,26,23,.12); }
.status-hero::before { content: ""; position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px); background-size: 28px 28px; mask-image: linear-gradient(to right, transparent 5%, #000 80%); }
.hero-copy { position: relative; z-index: 2; align-self: center; }
.hero-kicker { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; color: #a9bbb1; font-size: var(--text-xs); font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.status-orb { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(184,243,74,.08), 0 0 18px rgba(184,243,74,.35); }
.hero-copy h2 { max-width: 600px; margin: 0; font-size: clamp(34px, 4vw, 53px); line-height: .99; letter-spacing: -.055em; }
.hero-copy h2 span { color: var(--lime); }
.hero-copy p { max-width: 570px; margin: 20px 0 24px; color: #a9b9b1; font-size: var(--text-base); line-height: 1.65; }
.hero-actions { display: flex; align-items: center; gap: 17px; }
.secondary-button { display: flex; align-items: center; gap: 16px; min-height: 42px; padding: 0 16px; border-radius: 10px; color: #132018; background: var(--lime); font-size: var(--text-xs); font-weight: 800; }
.text-button { padding: 8px 4px; color: #bdc9c2; background: transparent; font-size: var(--text-xs); font-weight: 700; border-bottom: 1px solid rgba(255,255,255,.14); }

.hero-visual { position: relative; z-index: 2; min-height: 240px; align-self: center; }
.orbit { position: absolute; left: 50%; top: 50%; border: 1px solid rgba(184,243,74,.14); border-radius: 50%; transform: translate(-50%,-50%); }
.orbit-one { width: 220px; height: 220px; }
.orbit-two { width: 340px; height: 340px; border-color: rgba(255,255,255,.06); }
.core-node { position: absolute; left: 50%; top: 50%; width: 96px; height: 96px; display: grid; place-content: center; text-align: center; border: 1px solid rgba(184,243,74,.25); border-radius: 28px; background: linear-gradient(145deg, #24372e, #17261f); box-shadow: 0 0 55px rgba(184,243,74,.07), inset 0 0 25px rgba(255,255,255,.025); transform: translate(-50%,-50%) rotate(-4deg); }
.core-node span, .core-node small { transform: rotate(4deg); }
.core-node span { color: var(--lime); font-size: 19px; font-weight: 900; letter-spacing: -.04em; }
.core-node small { color: #8da197; font-size: var(--text-2xs); letter-spacing: .12em; text-transform: uppercase; }
.satellite { position: absolute; width: 58px; height: 58px; display: grid; place-content: center; text-align: center; border: 1px solid rgba(255,255,255,.08); border-radius: 17px; background: #17261f; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.satellite span { color: #91a59a; font-size: var(--text-2xs); font-weight: 900; letter-spacing: .1em; }
.satellite small { margin-top: 2px; color: #eff6f2; font-size: 15px; font-weight: 800; }
.sat-a { left: 9%; top: 18%; }
.sat-b { right: 5%; top: 23%; }
.sat-c { right: 14%; bottom: 5%; }

.metric-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 16px 0; }
.metric-card { min-height: 108px; padding: 17px 18px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 1px 0 rgba(16,26,23,.02); }
.metric-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.metric-card-label { color: #6f7a74; font-size: var(--text-xs); font-weight: 700; }
.metric-trend { padding: 4px 7px; border-radius: 999px; color: #347a65; background: #eaf8f3; font-size: var(--text-2xs); font-weight: 750; }
.metric-trend.is-negative { color: #b96b24; background: #fff4e8; }
.metric-value { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }
.metric-value strong { font-size: 27px; line-height: 1; letter-spacing: -.05em; }
.metric-value span { color: #7f8984; font-size: var(--text-2xs); }

.dashboard-grid { display: grid; grid-template-columns: 1.45fr .85fr; gap: 16px; margin-bottom: 16px; }
.lower-grid { grid-template-columns: 1.45fr .85fr; }
.panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.panel-header { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 17px 20px 12px; }
.section-kicker { display: block; margin-bottom: 5px; color: #7f8a84; font-size: var(--text-2xs); font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.panel h3 { margin: 0; font-size: var(--text-md); letter-spacing: -.025em; }
.legend { display: flex; align-items: center; gap: 12px; color: #717c76; font-size: var(--text-2xs); }
.legend span { display: flex; align-items: center; gap: 5px; }
.legend i { width: 8px; height: 8px; border-radius: 3px; }
.legend-in { background: var(--lime); }
.legend-out { background: var(--blue); }
.chart-summary { display: flex; align-items: baseline; gap: 7px; padding: 0 20px; }
.chart-summary strong { font-size: 24px; letter-spacing: -.045em; }
.chart-summary span { color: #7c8781; font-size: var(--text-2xs); }
.chart-wrap { height: 190px; padding: 8px 14px 14px; }
.chart-wrap canvas { width: 100%; height: 100%; display: block; }
.inline-link { color: #48574f; background: transparent; font-size: var(--text-xs); font-weight: 750; }

.donut-layout { display: grid; grid-template-columns: 145px 1fr; align-items: center; gap: 12px; padding: 5px 20px 10px; }
.donut { --healthy: 90%; width: 126px; aspect-ratio: 1; display: grid; place-items: center; border-radius: 50%; background: conic-gradient(var(--teal) 0 var(--healthy), var(--amber) var(--healthy) 97%, var(--red) 97% 100%); position: relative; }
.donut::after { content: ""; position: absolute; inset: 12px; border-radius: 50%; background: white; }
.donut div { position: relative; z-index: 1; display: grid; text-align: center; }
.donut strong { font-size: 24px; letter-spacing: -.05em; }
.donut span { color: #77827c; font-size: var(--text-2xs); }
.health-breakdown { display: grid; gap: 11px; }
.health-row { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 8px; color: #65716b; font-size: var(--text-2xs); }
.health-row i { width: 7px; height: 7px; border-radius: 2px; }
.health-row strong { color: #26332d; font-size: var(--text-xs); }
.mini-queue-map { display: grid; grid-template-columns: repeat(20, 1fr); gap: 3px; padding: 8px 20px 19px; }
.mini-cell { height: 5px; border-radius: 2px; background: #dce8e2; }
.mini-cell.healthy { background: #7edbc0; }
.mini-cell.attention { background: #f2be71; }
.mini-cell.critical { background: #ef8179; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 12px 15px; color: #76817b; background: var(--surface-2); border-top: 1px solid #eef1ef; border-bottom: 1px solid #edf0ee; font-size: var(--text-2xs); font-weight: 800; letter-spacing: .07em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 13px 15px; border-bottom: 1px solid #f0f2f1; color: #4d5953; font-size: var(--text-xs); white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: #fbfcfb; }
.mono { color: #35433c; font-family: "SFMono-Regular", Consolas, monospace; font-size: var(--text-2xs); }
.state-pill, .health-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 999px; font-size: var(--text-2xs); font-weight: 800; letter-spacing: .025em; text-transform: uppercase; }
.state-pill::before, .health-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; }
.state-delivered, .state-read, .state-provider_accepted, .health-healthy { color: #34816a; background: #eaf8f3; }
.state-delivered::before, .state-read::before, .state-provider_accepted::before, .health-healthy::before { background: var(--teal); }
.state-dispatching, .state-queued { color: #526fba; background: #edf1ff; }
.state-dispatching::before, .state-queued::before { background: var(--blue); }
.state-retry_scheduled, .health-attention { color: #a56829; background: #fff3e4; }
.state-retry_scheduled::before, .health-attention::before { background: var(--amber); }
.state-uncertain, .state-parked, .health-critical { color: #ae5049; background: #ffedeb; }
.state-uncertain::before, .state-parked::before, .health-critical::before { background: var(--red); }
.health-unknown { color: #777; background: #eee; }
.health-unknown::before { background: #aaa; }

.alert-list { padding: 2px 20px 15px; }
.alert-item { display: grid; grid-template-columns: 30px 1fr auto; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid #eef1ef; }
.alert-item:last-child { border-bottom: 0; }
.alert-symbol { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; font-size: var(--text-2xs); font-weight: 900; }
.severity-critical .alert-symbol { color: #aa5049; background: #ffedeb; }
.severity-warning .alert-symbol { color: #a56829; background: #fff3e4; }
.severity-info .alert-symbol { color: #526fba; background: #edf1ff; }
.alert-item strong, .alert-item small { display: block; }
.alert-item strong { font-size: var(--text-xs); }
.alert-item small { max-width: 260px; margin-top: 3px; overflow: hidden; color: #77827c; font-size: var(--text-2xs); text-overflow: ellipsis; white-space: nowrap; }
.alert-time { color: #808a85; font-size: var(--text-2xs); }
.live-badge { padding: 5px 7px; border-radius: 999px; color: #5e6b50; background: #edf5df; font-size: var(--text-2xs); font-weight: 900; letter-spacing: .07em; }

.view-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin: 8px 0 22px; }
.view-heading h2 { margin: 0; font-size: 28px; letter-spacing: -.045em; }
.view-heading p { margin: 8px 0 0; color: #6d7872; font-size: var(--text-sm); }
.segmented { display: flex; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: #edf1ee; }
.segmented button { padding: 8px 11px; color: #68746e; background: transparent; border: 0; border-radius: 7px; font-size: var(--text-2xs); cursor: pointer; }
.segmented button.is-selected { color: #28352f; background: white; box-shadow: 0 2px 5px rgba(16,26,23,.07); }
.provider-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; }
.provider-card { padding: 19px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.provider-card-top { display: flex; align-items: center; justify-content: space-between; }
.provider-identity { display: flex; align-items: center; gap: 10px; }
.provider-logo { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 11px; color: #315246; background: #e9f4ef; font-size: var(--text-2xs); font-weight: 900; }
.provider-identity strong, .provider-identity small { display: block; }
.provider-identity strong { font-size: var(--text-base); }
.provider-identity small { margin-top: 3px; color: #7e8883; font-size: var(--text-2xs); }
.provider-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin-top: 20px; }
.provider-stat { padding: 10px; border-radius: 10px; background: #f7f9f7; }
.provider-stat span, .provider-stat strong { display: block; }
.provider-stat span { color: #7d8882; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .05em; }
.provider-stat strong { margin-top: 6px; font-size: var(--text-base); }

.filter-row { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-row input, .filter-row select { min-height: 40px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; color: #4d5953; background: white; font-size: var(--text-xs); }
.filter-row input { width: 190px; }
.queue-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 15px; }
.summary-chip { padding: 14px 15px; border: 1px solid var(--line); border-radius: 13px; background: white; }
.summary-chip span, .summary-chip strong { display: block; }
.summary-chip span { color: #77827c; font-size: var(--text-2xs); }
.summary-chip strong { margin-top: 7px; font-size: 20px; letter-spacing: -.04em; }
.queue-map-panel { margin-bottom: 15px; }
.queue-map-header { display: flex; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid #eef1ef; color: #69756f; font-size: var(--text-xs); font-weight: 750; }
.queue-map { display: grid; grid-template-columns: repeat(20, minmax(24px, 1fr)); gap: 6px; padding: 18px; }
.queue-cell { aspect-ratio: 1; display: grid; place-items: center; border: 0; border-radius: 7px; color: #315f50; background: #dff3eb; font-size: var(--text-2xs); font-weight: 800; cursor: pointer; transition: .15s ease; }
.queue-cell:hover { transform: translateY(-2px); box-shadow: 0 5px 10px rgba(16,26,23,.1); }
.queue-cell.attention { color: #9a6129; background: #ffebcd; }
.queue-cell.critical { color: #aa5049; background: #ffdbd7; }

.incident-list { display: grid; gap: 12px; }
.incident-card { display: grid; grid-template-columns: 46px 1fr auto; align-items: center; gap: 14px; padding: 18px; border: 1px solid var(--line); border-radius: 15px; background: white; box-shadow: var(--shadow); }
.incident-level { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; font-size: var(--text-xs); font-weight: 900; }
.incident-card.severity-critical .incident-level { color: #a84740; background: #ffedeb; }
.incident-card.severity-warning .incident-level { color: #a56829; background: #fff3e4; }
.incident-card.severity-info .incident-level { color: #526fba; background: #edf1ff; }
.incident-body h3 { margin: 0; font-size: var(--text-base); }
.incident-body p { margin: 5px 0 0; color: #6f7a74; font-size: var(--text-xs); }
.incident-meta { display: grid; justify-items: end; gap: 5px; color: #76817b; font-size: var(--text-2xs); }
.incident-meta code { padding: 4px 6px; border-radius: 6px; color: #45534c; background: #f2f5f3; font-size: var(--text-2xs); }

.delivery-layout { display: grid; grid-template-columns: 280px 1fr; gap: 16px; }
.delivery-score { display: grid; place-items: center; align-content: center; min-height: 320px; padding: 25px; text-align: center; }
.score-ring { width: 150px; aspect-ratio: 1; display: grid; place-content: center; border-radius: 50%; background: radial-gradient(circle at center, white 57%, transparent 58%), conic-gradient(var(--lime) 0 1%, #edf1ee 1% 100%); }
.score-ring strong, .score-ring span { display: block; }
.score-ring strong { font-size: 29px; letter-spacing: -.05em; }
.score-ring span { color: #747f79; font-size: var(--text-2xs); }
.delivery-score h3 { margin-top: 20px; }
.delivery-score p { color: #717c76; font-size: var(--text-xs); }
.gate-list { padding: 12px 22px; }
.gate-row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; padding: 15px 0; border-bottom: 1px solid #eef1ef; }
.gate-row:last-child { border-bottom: 0; }
.gate-icon { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 8px; font-size: var(--text-2xs); font-weight: 900; }
.gate-row.is-complete .gate-icon { color: #28735e; background: #e6f7f0; }
.gate-row.is-pending .gate-icon { color: #9a682e; background: #fff3e4; }
.gate-row strong, .gate-row small { display: block; }
.gate-row strong { font-size: var(--text-xs); }
.gate-row small { margin-top: 3px; color: #77827c; font-size: var(--text-2xs); }
.gate-status { padding: 5px 7px; border-radius: 999px; color: #955d24; background: #fff4e8; font-size: var(--text-2xs); font-weight: 800; text-transform: uppercase; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 39; opacity: 0; visibility: hidden; background: rgba(10,18,14,.35); backdrop-filter: blur(2px); transition: .2s ease; }
.detail-drawer { position: fixed; z-index: 40; inset: 0 0 0 auto; width: min(430px, 92vw); padding: 23px; background: white; box-shadow: -20px 0 50px rgba(16,26,23,.15); transform: translateX(102%); transition: .24s ease; }
.detail-drawer.is-open { transform: translateX(0); }
.drawer-backdrop.is-open { opacity: 1; visibility: visible; }
.drawer-header { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0; font-size: 18px; letter-spacing: -.04em; }
.drawer-content { display: grid; gap: 12px; padding-top: 18px; }
.detail-block { padding: 14px; border-radius: 12px; background: #f6f8f6; }
.detail-block span, .detail-block strong { display: block; }
.detail-block span { color: #707b75; font-size: var(--text-2xs); text-transform: uppercase; letter-spacing: .07em; }
.detail-block strong { margin-top: 7px; font-size: var(--text-base); }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 50; opacity: 0; padding: 11px 15px; border-radius: 10px; color: white; background: #1a2a23; box-shadow: 0 10px 30px rgba(16,26,23,.25); font-size: var(--text-xs); transform: translate(-50%, 15px); transition: .2s ease; pointer-events: none; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.empty-state { padding: 35px; color: #707b75; text-align: center; font-size: var(--text-sm); }

@keyframes view-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .status-hero { grid-template-columns: 1fr .6fr; padding: 38px; }
  .hero-visual { transform: scale(.82); }
  .provider-grid { grid-template-columns: repeat(2, 1fr); }
  .queue-map { grid-template-columns: repeat(15, minmax(24px, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { transform: translateX(-102%); transition: .22s ease; }
  .sidebar.is-open { transform: translateX(0); box-shadow: 20px 0 45px rgba(16,26,23,.25); }
  .main-content { margin-left: 0; }
  .mobile-menu { display: grid; place-items: center; }
  .dashboard-grid, .lower-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .status-hero { grid-template-columns: 1fr; }
  .hero-visual { position: absolute; right: -40px; top: 30px; width: 350px; opacity: .42; }
  .hero-copy { max-width: 650px; }
  .delivery-layout { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; }
  .topbar-actions .last-update, .primary-button { display: none; }
  .content-wrap { padding: 16px 15px 35px; }
  .data-banner { align-items: flex-start; }
  .banner-pill { display: none; }
  .status-hero { min-height: 385px; padding: 31px 25px; }
  .hero-copy h2 { font-size: 37px; }
  .hero-visual { right: -110px; top: 120px; }
  .metric-grid, .provider-grid, .queue-summary { grid-template-columns: 1fr 1fr; }
  .view-heading { align-items: flex-start; flex-direction: column; }
  .filter-row { width: 100%; }
  .filter-row input, .filter-row select { flex: 1 1 140px; width: auto; }
  .queue-map { grid-template-columns: repeat(8, 1fr); }
  .donut-layout { grid-template-columns: 125px 1fr; }
  .donut { width: 110px; }
  .incident-card { grid-template-columns: 42px 1fr; }
  .incident-meta { grid-column: 2; justify-items: start; }
}

@media (max-width: 420px) {
  .metric-grid, .provider-grid, .queue-summary { grid-template-columns: 1fr; }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .donut-layout { grid-template-columns: 1fr; justify-items: center; }
  .health-breakdown { width: 100%; }
}

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