:root {
  --bg: #0b0f12;
  --bg-raised: #11171b;
  --panel: #151c20;
  --panel-2: #192226;
  --line: #29343a;
  --line-soft: #202a2f;
  --text: #e7ecec;
  --muted: #8f9da1;
  --teal: #49b9ac;
  --teal-soft: #173d39;
  --copper: #c58a5c;
  --copper-soft: #412d21;
  --green: #64c58a;
  --yellow: #e0b75b;
  --red: #e36f6f;
  --blue: #79a9d7;
  --sidebar: 254px;
  --radius: 12px;
  --shadow: 0 18px 45px rgb(0 0 0 / 20%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 75% 0%, rgb(35 83 78 / 14%), transparent 32rem), var(--bg); }
a { color: var(--teal); text-decoration: none; }
a:hover { color: #78d5ca; }
button, input, select { font: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; overflow-wrap: anywhere; }
small { color: var(--muted); display: block; line-height: 1.45; }
p { color: var(--muted); line-height: 1.65; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(1.8rem, 3vw, 2.65rem); letter-spacing: -.045em; margin-bottom: .45rem; }
h2 { font-size: 1.05rem; letter-spacing: -.015em; margin-bottom: .35rem; }
ul { padding-left: 1.2rem; }

.skip-link { position: fixed; z-index: 100; left: 1rem; top: -4rem; padding: .7rem 1rem; background: var(--teal); color: #07110f; border-radius: 6px; }
.skip-link:focus { top: 1rem; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); padding: 1.4rem 1rem; background: rgb(12 17 20 / 96%); border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; z-index: 20; backdrop-filter: blur(18px); }
.brand, .mobile-brand { display: flex; align-items: center; gap: .8rem; color: var(--text); }
.brand { padding: .3rem .5rem 1.6rem; border-bottom: 1px solid var(--line-soft); }
.brand strong, .mobile-brand { letter-spacing: -.02em; }
.brand small { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; margin-top: .15rem; }
.brand-mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #3b8e85; border-radius: 10px; background: linear-gradient(145deg, #183c38, #172329); color: #8de0d6; font-weight: 800; font-size: .78rem; box-shadow: inset 0 0 18px rgb(73 185 172 / 12%); }
.sidebar nav { display: grid; gap: .22rem; padding: 1.25rem 0; }
.sidebar nav a { color: #9caaad; padding: .66rem .78rem; border-radius: 7px; font-size: .88rem; font-weight: 600; border: 1px solid transparent; }
.sidebar nav a:hover { color: var(--text); background: #151d21; }
.sidebar nav a[aria-current="page"] { color: #d9f5f1; background: linear-gradient(90deg, #183933, #152126); border-color: #28524d; box-shadow: inset 3px 0 var(--teal); }
.boundary-note { margin-top: auto; border: 1px solid var(--line); border-radius: 10px; padding: .9rem; background: #11181b; }
.boundary-note strong { display: block; margin: .2rem 0; }
.boundary-note p { font-size: .74rem; line-height: 1.5; margin: 0; }
.app-shell { margin-left: var(--sidebar); min-height: 100vh; display: flex; flex-direction: column; }
.topbar { min-height: 42px; display: flex; align-items: center; gap: 1.6rem; padding: 0 clamp(1rem, 3vw, 2.5rem); border-bottom: 1px solid var(--line-soft); color: var(--muted); font-size: .74rem; background: rgb(11 15 18 / 72%); }
.signal { display: inline-block; width: 7px; height: 7px; margin-right: .45rem; border-radius: 50%; }
.signal-ok { background: var(--green); box-shadow: 0 0 0 4px rgb(100 197 138 / 10%); }
main { width: 100%; max-width: 1560px; padding: clamp(1.2rem, 3.4vw, 3rem); flex: 1; }
footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.1rem clamp(1rem, 3vw, 2.5rem); border-top: 1px solid var(--line-soft); color: #718084; font-size: .7rem; }
.mobile-header { display: none; }

.page-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 2rem; margin-bottom: 2rem; }
.page-heading p { margin: 0; max-width: 720px; }
.heading-meta { min-width: 180px; text-align: right; display: grid; justify-items: end; gap: .45rem; }
.heading-meta > strong { font-size: 1.8rem; }
.eyebrow { color: var(--copper); font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .11em; }
.muted { color: var(--muted); font-size: .76rem; }
.label { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .075em; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 2rem 0 .9rem; }
.section-heading h2 { margin: 0; }

.hero-grid, .metric-grid { display: grid; gap: .8rem; }
.hero-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 1.4rem; }
.metric-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.hero-card, .metric-card, .panel { border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(145deg, rgb(23 31 35 / 96%), rgb(17 23 27 / 96%)); box-shadow: var(--shadow); }
.hero-card { min-height: 135px; padding: 1.15rem; display: flex; flex-direction: column; align-items: flex-start; }
.hero-card strong { font-size: 1.35rem; letter-spacing: -.025em; margin: auto 0 .35rem; }
.hero-card .small-value { font-size: .88rem; }
.metric-card { min-height: 104px; padding: 1rem; border-top: 2px solid #275a55; }
.metric-card span { color: var(--muted); font-size: .72rem; }
.metric-card strong { display: block; font-size: 1.65rem; margin-top: .75rem; letter-spacing: -.04em; }
.metric-wide { grid-column: span 2; }
.panel { padding: 1.1rem; }
.panel > .section-heading:first-child { margin-top: 0; }
.two-column { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); gap: 1rem; margin-top: 1.4rem; }

.status { display: inline-flex; align-items: center; width: fit-content; border-radius: 99px; padding: .25rem .5rem; font-size: .65rem; font-weight: 800; text-transform: uppercase; letter-spacing: .055em; border: 1px solid var(--line); background: #1a2226; color: #a9b5b8; }
.status-succeeded, .status-available, .status-complete, .status-healthy { color: #8ee0aa; background: #153124; border-color: #285840; }
.status-partial, .status-partially_succeeded, .status-stale, .status-stale_running { color: #ebc56b; background: #342b18; border-color: #675329; }
.status-failed, .status-invalid, .status-interrupted { color: #f29a9a; background: #3a1d21; border-color: #71343b; }
.status-skipped, .status-missing, .status-unsupported_schema { color: #aeb9bd; background: #242b2e; border-color: #3a454a; }
.status-running { color: #8ac4ef; background: #182d3a; border-color: #2c536b; }
.status-pause_requested, .status-cancel_requested { color: #ebc56b; background: #342b18; border-color: #675329; }
.status-paused { color: #8ac4ef; background: #182d3a; border-color: #2c536b; }
.status-cancelled, .status-abandoned { color: #aeb9bd; background: #242b2e; border-color: #3a454a; }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.state-succeeded, .state-available { background: var(--green); }
.state-failed, .state-interrupted { background: var(--red); }
.state-running { background: var(--blue); }
.state-partial, .state-skipped, .state-missing { background: var(--yellow); }

.banner { display: flex; gap: .8rem; padding: .9rem 1rem; margin: 1rem 0; border-radius: 9px; border: 1px solid; }
.banner strong { font-size: .85rem; }
.banner p, .banner ul { margin: .2rem 0 0; font-size: .78rem; }
.banner-warning { background: rgb(65 45 24 / 70%); border-color: #60492a; }
.banner-info { background: rgb(22 50 54 / 70%); border-color: #285458; }
.banner-danger { background: rgb(67 27 31 / 86%); border-color: #83414a; box-shadow: 0 0 0 1px rgb(227 111 111 / 10%); }
.banner-danger strong { color: #ffb5b5; font-size: 1rem; }
.pipeline-list { display: grid; }
.pipeline-row { display: grid; grid-template-columns: 12px 1fr auto; gap: .75rem; align-items: center; padding: .72rem 0; border-bottom: 1px solid var(--line-soft); }
.pipeline-row:last-child { border-bottom: 0; }
.pipeline-row strong { display: block; font-size: .82rem; }
.pipeline-row small { font-size: .68rem; }
.detail-list { margin: 0; }
.detail-list > div, .mini-summary > div { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding: .68rem 0; border-bottom: 1px solid var(--line-soft); }
.detail-list dt, .mini-summary span { color: var(--muted); font-size: .75rem; }
.detail-list dd, .mini-summary strong { margin: 0; font-size: .74rem; text-align: right; }
.mini-summary { margin-top: .9rem; }

.filter-bar { display: grid; grid-template-columns: repeat(4, minmax(110px, 1fr)) minmax(180px, 1.5fr) auto auto; gap: .65rem; align-items: end; padding: .9rem; margin-bottom: 1rem; border: 1px solid var(--line); border-radius: 10px; background: #101619; }
.filter-bar label { color: var(--muted); font-size: .68rem; font-weight: 700; }
.filter-bar input { width: 100%; margin-top: .35rem; padding: .62rem .68rem; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #0b1012; }
.filter-bar input::placeholder { color: #536065; }
.filter-bar button, .button-secondary { min-height: 39px; display: inline-grid; place-items: center; padding: .55rem .85rem; border-radius: 7px; font-size: .73rem; font-weight: 800; cursor: pointer; }
.filter-bar button { color: #071210; background: var(--teal); border: 1px solid var(--teal); }
.button-secondary { color: var(--text); background: #182025; border: 1px solid var(--line); }

.feed { display: grid; gap: .6rem; }
.feed-item { display: grid; grid-template-columns: 48px 1fr; border: 1px solid var(--line); border-radius: 10px; background: #11171a; overflow: hidden; }
.feed-rail { display: flex; justify-content: center; padding-top: 1rem; border-right: 1px solid var(--line-soft); background: #101518; }
.source-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--teal-soft); color: #88ddd2; font-size: .63rem; font-weight: 900; text-transform: uppercase; }
.source-artifacts { background: var(--copper-soft); color: #e7b38a; }
.source-operations { background: #35252a; color: #efa3ad; }
.feed-body { padding: .9rem 1rem; }
.feed-title { display: flex; justify-content: space-between; gap: 1rem; }
.feed-title h2 { margin: .18rem 0 .5rem; }
.feed-title time { color: var(--muted); font-size: .7rem; white-space: nowrap; }
.tag-row, .reference-row { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem; }
.tag { display: inline-flex; border-radius: 5px; padding: .22rem .42rem; color: #aab6b9; background: #1a2327; border: 1px solid #2b373c; font-size: .65rem; }
.reference-row { margin-top: .6rem; }
.reference-row code { color: #b4c0c3; font-size: .7rem; }
.copy-button { border: 1px solid #36504f; border-radius: 5px; padding: .2rem .42rem; background: #172624; color: #89c9c1; font-size: .62rem; cursor: pointer; }
.evidence-ref { margin: .55rem 0 0; font-size: .68rem; }
.inline-warning { color: #d9b063; margin: .5rem 0 0; font-size: .72rem; }

.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: #101619; }
table { width: 100%; border-collapse: collapse; font-size: .76rem; }
caption { text-align: left; }
th { color: #8e9da1; background: #151d21; text-align: left; font-size: .64rem; text-transform: uppercase; letter-spacing: .07em; }
th, td { padding: .78rem .8rem; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
tbody tr:hover { background: rgb(73 185 172 / 3%); }
td strong { display: block; font-size: .79rem; }
td small { margin-top: .28rem; font-size: .65rem; }
.stack-list { display: grid; gap: .55rem; max-height: 690px; overflow-y: auto; }
.stack-list article { padding: .8rem; border: 1px solid var(--line-soft); border-radius: 8px; background: #11181b; }
.stack-list article > strong, .stack-list article > code, .stack-list article > small { display: block; margin-top: .3rem; }
.projection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; margin-top: .9rem; }
.projection-grid article { border: 1px solid var(--line-soft); border-radius: 8px; padding: .75rem; background: #11181b; }
.projection-grid strong, .projection-grid small { display: block; margin-top: .4rem; }
.projection-grid p { margin: .4rem 0 0; font-size: .7rem; }
.feature-list { color: var(--muted); line-height: 1.8; font-size: .84rem; }
.empty-state { display: grid; place-items: center; text-align: center; min-height: 120px; padding: 1.5rem; color: var(--muted); border: 1px dashed #344047; border-radius: 9px; }
.empty-state strong { color: var(--text); }
.empty-state p { margin: .3rem 0 0; }
.empty-large { min-height: 280px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.network-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.network-card .action-button { margin-top: 1rem; width: 100%; }
.control-form { display: grid; grid-template-columns: repeat(5, minmax(120px, 1fr)) auto; gap: .7rem; align-items: end; }
.control-form label { color: var(--muted); font-size: .68rem; font-weight: 700; }
.control-form input, .control-form select, .action-row select { width: 100%; margin-top: .35rem; padding: .62rem .68rem; border: 1px solid var(--line); border-radius: 7px; color: var(--text); background: #0b1012; }
.control-form button, .action-button, .button-danger { min-height: 39px; padding: .55rem .85rem; border-radius: 7px; font-size: .73rem; font-weight: 800; cursor: pointer; color: #071210; background: var(--teal); border: 1px solid var(--teal); }
.button-danger { color: #ffd7d7; background: #3a1d21; border-color: #71343b; }
button:disabled { cursor: not-allowed; opacity: .42; }
.form-message { min-height: 1.4rem; margin: .7rem 0 0; color: var(--yellow); font-size: .75rem; }
.progress-panel { margin-bottom: 1rem; }
.progress-track { height: 12px; overflow: hidden; border-radius: 99px; background: #0d1316; border: 1px solid var(--line); }
.progress-track span { display: block; height: 100%; background: linear-gradient(90deg, #2d8177, var(--teal)); }
.progress-copy, .action-row { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
.progress-copy { justify-content: space-between; margin: .75rem 0 .45rem; }
.progress-copy strong { font-size: .8rem; }
.action-row select { width: auto; min-width: 240px; margin: 0; }

@media (max-width: 1180px) {
  .metric-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-bar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .network-grid { grid-template-columns: 1fr; }
  .control-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .mobile-header { display: flex; position: sticky; top: 0; z-index: 30; align-items: center; justify-content: space-between; padding: .75rem 1rem; border-bottom: 1px solid var(--line); background: rgb(11 15 18 / 96%); }
  .nav-toggle { border: 1px solid var(--line); border-radius: 6px; background: #172025; color: var(--text); padding: .4rem .65rem; }
  .sidebar { transform: translateX(-105%); transition: transform .18s ease; top: 61px; }
  .sidebar.is-open { transform: translateX(0); }
  .app-shell { margin-left: 0; }
  .topbar { overflow-x: auto; white-space: nowrap; }
  .two-column { grid-template-columns: 1fr; }
  .filter-bar, .control-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .page-heading { flex-direction: column; }
  .heading-meta { justify-items: start; text-align: left; }
}

@media (max-width: 560px) {
  main { padding: 1rem; }
  .hero-grid, .metric-grid, .filter-bar, .projection-grid, .control-form { grid-template-columns: 1fr; }
  .metric-wide { grid-column: auto; }
  .topbar span:nth-child(n+2) { display: none; }
  .feed-item { grid-template-columns: 38px 1fr; }
  .feed-title { display: block; }
  .feed-title time { display: block; margin-bottom: .5rem; }
  footer { display: block; }
  footer span { display: block; margin-bottom: .4rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
/* Private operator authentication */
.login-page { min-height: 100vh; display: grid; place-items: center; padding: 2rem; }
.login-panel { width: min(32rem, 100%); padding: 2rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--panel); }
.login-panel .brand-mark { display: inline-grid; margin-bottom: 1rem; }
.topbar form { margin: 0; }
.topbar form button { padding: .3rem .7rem; }
