:root {
  color-scheme: dark;
  --bg: #050505;
  --bg-dots: linear-gradient(transparent, transparent);
  --surface: #121212;
  --surface-raised: #181818;
  --surface-soft: #242424;
  --ink: #f4f4f5;
  --muted: #9b9b9f;
  --line: #292929;
  --line-strong: #4a4a4a;
  --teal: #27d3bd;
  --green: #67d88b;
  --blue: #7aa2ff;
  --amber: #f2aa55;
  --red: #ff716f;
  --charcoal: #101010;
  --shadow: 0 18px 44px rgb(0 0 0 / 0.28);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background:
    var(--bg-dots) 0 0 / 18px 18px,
    var(--bg);
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

body {
  margin: 0;
  min-width: 320px;
}

button,
input,
select {
  font: inherit;
}

button,
select {
  cursor: pointer;
}

button {
  border: 0;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.app-shell {
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  min-height: 100vh;
  background: #050505;
}

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  height: 100vh;
  padding: 18px;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  border-right: 1px solid #242424;
  background: #050505;
  color: #f5f8ff;
}

.brand,
.sidebar-footer,
.provider-row,
.fabric-lane,
.decision-list div,
.placement-card {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
}

.brand-mark,
.brand-symbol {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2d78ff, #8eb8ff);
  color: white;
  font-weight: 850;
}

.brand-symbol {
  background: transparent;
  color: inherit;
}

.brand strong,
.brand span,
.sidebar-footer strong,
.sidebar-footer span {
  display: block;
}

.brand span,
.sidebar-footer span {
  margin-top: 2px;
  color: #a5a5a8;
  font-size: 13px;
}

.header-org-switcher span,
.nav-groups p,
.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar .nav-groups p,
.header-org-switcher span {
  color: #9b9b9f;
}

.nav-groups {
  display: grid;
  gap: 20px;
}

.nav-groups section {
  display: grid;
  gap: 5px;
}

.nav-item {
  display: block;
  padding: 9px 10px;
  border-radius: 7px;
  color: #e8efff;
  text-decoration: none;
}

.nav-item:hover,
.nav-item.active {
  background: #202020;
  color: white;
}

.sidebar-footer {
  gap: 10px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #151515;
}

.workspace {
  min-width: 0;
  padding: 0 20px 22px;
  background: #050505;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 50px;
  margin-bottom: 13px;
  padding: 18px 0 12px;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, #050505 0%, rgb(5 5 5 / 0.96) 72%, rgb(5 5 5 / 0.88) 100%);
  backdrop-filter: blur(18px);
}

.title-block {
  min-width: 210px;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  margin-top: 5px;
  font-size: clamp(22px, 2.2vw, 29px);
  line-height: 1.05;
}

h2 {
  font-size: 16px;
}

.subtitle {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.header-org-switcher {
  display: inline-grid;
  grid-template-columns: auto minmax(116px, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 8px 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111;
}

.header-org-switcher select {
  width: 154px;
  min-width: 0;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 720;
}

.search {
  display: grid;
  color: var(--muted);
  font-size: 12px;
}

.search input {
  width: min(300px, 26vw);
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #111;
  color: var(--ink);
}

.icon-chip,
.cluster-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #171717;
  color: #d7d7da;
  font-size: 11px;
  font-weight: 800;
}

.icon-chip {
  width: 32px;
}

.cluster-chip {
  min-width: 0;
  padding: 0 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}

[id] {
  scroll-margin-top: 92px;
}

.action-link,
.cluster-chip {
  white-space: nowrap;
}

.primary-button,
.secondary-button,
.action-link,
.card-actions button,
.segmented-control button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 760;
  text-decoration: none;
}

.primary-button,
.action-link.primary-button {
  padding: 0 14px;
  background: var(--blue);
  color: white;
}

.secondary-button,
.action-link.secondary-button,
.card-actions button {
  padding: 0 12px;
  border-color: var(--line);
  background: #171717;
  color: var(--ink);
}

.agent-request,
.metric,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  box-shadow: var(--shadow);
}

.agent-request {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 13px;
  padding: 12px;
  border-radius: 28px;
  background: #202020;
  border-color: #303030;
  box-shadow: 0 16px 36px rgb(0 0 0 / 0.26);
}

.agent-request h2 {
  margin-top: 3px;
  font-size: 19px;
}

.agent-request p:not(.eyebrow) {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.command-prompt {
  display: flex;
  align-items: center;
  gap: 13px;
  min-width: 0;
}

.command-plus {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #2c2c2c;
  color: #f7f7f7;
  font-size: 32px;
  line-height: 1;
}

.command-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.request-meta {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.request-meta span {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px;
  border: 1px solid #2a2a2a;
  border-radius: 7px;
  background: #141414;
  color: #d4d4d8;
  font-size: 12px;
}

.request-meta strong {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.compact-detail {
  margin-top: 5px;
  color: var(--muted);
}

.compact-detail summary {
  width: max-content;
  max-width: 100%;
  color: #b8c2d6;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}

.compact-detail summary::marker {
  color: var(--muted);
}

.compact-detail[open] {
  padding-top: 2px;
}

.compact-detail span,
.compact-detail p,
.compact-detail em {
  display: block;
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.proof-rail {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 13px;
}

.proof-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}

.proof-snapshot article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #303030;
  border-radius: 18px;
  background: #171717;
}

.proof-snapshot span,
.proof-snapshot small {
  color: #a0a0a0;
}

.proof-snapshot span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.proof-snapshot strong {
  min-width: 0;
  overflow-wrap: anywhere;
  color: #f4f4f4;
  font-size: 18px;
  line-height: 1.12;
}

.proof-snapshot .approved,
.proof-snapshot .allow {
  color: var(--green);
}

.proof-snapshot .pending,
.proof-snapshot .warning,
.proof-snapshot .require-approval {
  color: var(--amber);
}

.proof-snapshot .denied,
.proof-snapshot .deny {
  color: var(--red);
}

.proof-step {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.proof-step i {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #2b2b2b;
  color: #d7dfef;
  font-size: 11px;
  font-style: normal;
}

.proof-step.complete {
  border-color: rgb(103 216 139 / 0.28);
  color: var(--green);
}

.proof-step.complete i {
  background: rgb(103 216 139 / 0.16);
  color: var(--green);
}

.proof-step.blocked {
  border-color: rgb(255 113 111 / 0.32);
  color: var(--red);
}

.proof-step.blocked i {
  background: rgb(255 113 111 / 0.14);
  color: var(--red);
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}

.value-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 13px;
}

.value-strip article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  background: #111;
}

.value-strip span,
.value-strip small {
  color: var(--muted);
}

.value-strip span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.value-strip strong {
  color: #a9c8ff;
  font-size: 20px;
  line-height: 1.1;
}

.metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 13px;
}

.metric.attention {
  border-color: rgb(242 170 85 / 0.42);
  background: #15120f;
}

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

.metric strong {
  color: #84b4ff;
  font-size: 23px;
  line-height: 1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(540px, 1.45fr) minmax(330px, 0.82fr);
  grid-template-areas:
    "topology assistant"
    "machine providers"
    "jobs approvals"
    "policy observability"
    "console console"
    "receipt receipt"
    "audit audit";
  gap: 13px;
  align-items: start;
}

.panel {
  min-width: 0;
  padding: 14px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}

.topology-panel {
  grid-area: topology;
}

.machine-panel {
  grid-area: machine;
}

.jobs-panel {
  grid-area: jobs;
}

.policy-panel {
  grid-area: policy;
}

.audit-panel {
  grid-area: audit;
}

.assistant-panel {
  grid-area: assistant;
}

.approvals-panel {
  grid-area: approvals;
}

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

.observability-panel {
  grid-area: observability;
}

.console-panel {
  grid-area: console;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.badge.idle,
.badge.ready,
.badge.running,
.badge.approved,
.badge.allow,
.badge.recommended,
.badge.live,
.badge.healthy,
.badge.online {
  background: rgb(103 216 139 / 0.13);
  color: var(--green);
}

.badge.busy,
.badge.battery,
.badge.queued,
.badge.needs-approval,
.badge.warning,
.badge.approval,
.badge.gated,
.badge.pending,
.badge.standby {
  background: rgb(242 170 85 / 0.13);
  color: var(--amber);
}

.badge.disabled,
.badge.blocked,
.badge.denied,
.badge.rejected {
  background: rgb(255 113 111 / 0.14);
  color: var(--red);
}

.fabric-map {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  gap: 13px;
  min-height: 216px;
}

.control-node {
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 18px;
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgb(80 80 84 / 0.94), rgb(27 27 30 / 0.82)),
    var(--blue);
  color: white;
}

.control-node strong {
  font-size: 18px;
}

.control-node span {
  color: rgb(255 255 255 / 0.78);
  font-size: 13px;
}

.fabric-lanes {
  display: grid;
  gap: 9px;
}

.fabric-lane,
.machine-card,
.job-row,
.policy-row,
.placement-card,
.policy-lane,
.approval-item,
.provider-row,
.activity-item,
.receipt-empty,
.receipt-grid span {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #141414;
}

.fabric-lane {
  gap: 10px;
  padding: 11px 12px;
}

.fabric-lane div,
.provider-row div {
  min-width: 0;
}

.fabric-lane strong,
.fabric-lane span,
.provider-row strong,
.provider-row span {
  display: block;
}

.fabric-lane span,
.provider-row span {
  color: var(--muted);
  font-size: 13px;
}

.assistant-panel {
  display: grid;
  gap: 13px;
}

.placement-list {
  display: grid;
  gap: 9px;
}

.placement-card {
  gap: 10px;
  padding: 12px;
}

.placement-card > div {
  min-width: 0;
}

.placement-card strong,
.placement-card span {
  display: block;
}

.placement-card div > span,
.placement-card .compact-detail span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.placement-card.recommended {
  border-color: rgb(103 216 139 / 0.42);
  background: #121814;
}

.placement-card.gated {
  border-color: rgb(242 170 85 / 0.42);
}

.placement-card.rejected {
  border-color: rgb(255 113 111 / 0.36);
}

.score {
  margin-left: auto;
  color: #9ec3ff;
  font-size: 20px;
}

.recommendation {
  display: flex;
  gap: 12px;
  padding: 13px;
  border: 1px solid rgb(39 211 189 / 0.34);
  border-radius: var(--radius);
  background: rgb(39 211 189 / 0.08);
}

.rec-score {
  display: grid;
  place-items: center;
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--blue);
  color: white;
  font-weight: 850;
}

.recommendation p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

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

.decision-list div {
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
}

.assistant-actions,
.card-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segmented-control {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111;
}

.segmented-control button {
  min-height: 30px;
  padding: 0 10px;
  background: transparent;
  color: var(--muted);
}

.segmented-control .selected {
  border-color: var(--line);
  background: #242424;
  color: var(--ink);
}

.machine-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.machine-card {
  display: grid;
  gap: 12px;
  padding: 13px;
}

.machine-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.machine-topline strong,
.machine-topline span {
  display: block;
}

.machine-topline span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.machine-meta,
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.machine-meta span,
.tag-row span {
  padding: 4px 7px;
  border-radius: 6px;
  background: #202020;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.allocation {
  display: grid;
  gap: 7px;
}

.meter-row {
  display: grid;
  grid-template-columns: 38px 1fr 38px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

meter {
  width: 100%;
  height: 9px;
}

meter::-webkit-meter-bar {
  border: 0;
  border-radius: 999px;
  background: #202020;
}

meter::-webkit-meter-optimum-value {
  border-radius: 999px;
  background: var(--blue);
}

.job-table,
.policy-grid,
.approval-list,
.provider-list,
.activity-feed {
  display: grid;
  gap: 8px;
}

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

.policy-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.table-head,
.job-row {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(170px, 0.8fr) 120px 54px;
  gap: 10px;
  align-items: center;
}

.table-head {
  padding: 0 11px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.job-row {
  padding: 11px;
}

.job-row strong,
.job-row span {
  display: block;
}

.job-row span {
  color: var(--muted);
  font-size: 13px;
}

.policy-row,
.approval-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 11px;
}

.policy-row {
  border-left-width: 5px;
}

.policy-row.allow {
  border-left-color: var(--green);
}

.policy-row.approval {
  border-left-color: var(--amber);
}

.policy-row.blocked {
  border-left-color: var(--red);
}

.policy-row strong,
.policy-row span,
.approval-item strong,
.approval-item span {
  display: block;
}

.policy-row span,
.approval-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.approval-item {
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.approval-item small {
  color: var(--muted);
  white-space: nowrap;
}

.approval-item em {
  display: block;
  margin-top: 6px;
  color: #bfd0f0;
  font-size: 12px;
  font-style: normal;
}

.approved-item {
  border-color: rgb(103 216 139 / 0.4);
}

.denied-item {
  border-color: rgb(255 113 111 / 0.4);
}

.selected-row {
  border-color: rgb(79 140 255 / 0.56);
  background: #15191f;
}

.policy-lane {
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 12px;
  border-top-width: 4px;
}

.policy-lane.allow {
  border-top-color: var(--green);
}

.policy-lane.approval {
  border-top-color: var(--amber);
}

.policy-lane.blocked {
  border-top-color: var(--red);
}

.policy-lane > span {
  color: #c0cbe0;
  font-size: 13px;
  line-height: 1.35;
}

.policy-lane .compact-detail {
  margin-top: 0;
}

.lane-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 2px;
}

.provider-row {
  gap: 10px;
  padding: 10px 11px;
}

.provider-row small {
  margin-left: auto;
  color: var(--muted);
  text-transform: capitalize;
}

.chart-stack {
  display: grid;
  gap: 12px;
}

.chart-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.chart-row strong {
  color: var(--ink);
}

.sparkline {
  position: relative;
  height: 42px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background:
    linear-gradient(180deg, transparent 0 48%, rgb(255 255 255 / 0.06) 49% 51%, transparent 52%),
    linear-gradient(90deg, rgb(255 255 255 / 0.05) 1px, transparent 1px),
    #141414;
  background-size:
    auto,
    26px 100%,
    auto;
}

.sparkline::after {
  content: "";
  position: absolute;
  inset: 9px 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--blue), var(--teal), var(--amber));
  clip-path: polygon(0 65%, 9% 48%, 19% 54%, 31% 28%, 43% 42%, 58% 24%, 70% 46%, 84% 31%, 100% 52%, 100% 100%, 0 100%);
}

.sparkline.ram::after {
  background: linear-gradient(90deg, var(--blue), var(--teal));
  clip-path: polygon(0 58%, 18% 38%, 28% 46%, 42% 44%, 58% 30%, 72% 35%, 86% 52%, 100% 40%, 100% 100%, 0 100%);
}

.sparkline.gpu::after {
  background: linear-gradient(90deg, var(--amber), var(--red));
  clip-path: polygon(0 78%, 10% 72%, 20% 65%, 34% 70%, 46% 24%, 58% 30%, 68% 22%, 82% 60%, 100% 66%, 100% 100%, 0 100%);
}

.sparkline.net::after {
  background: linear-gradient(90deg, var(--green), var(--teal));
  clip-path: polygon(0 62%, 11% 56%, 22% 63%, 37% 49%, 53% 54%, 65% 36%, 77% 42%, 90% 31%, 100% 43%, 100% 100%, 0 100%);
}

.activity-item {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 11px;
}

.activity-item time {
  color: var(--muted);
  font-size: 13px;
}

.terminal-output {
  margin: 0;
  min-height: 148px;
  padding: 13px;
  overflow: auto;
  border: 1px solid #263451;
  border-radius: 4px;
  background: #020305;
  color: #9ee8ff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.55;
}

.receipt-panel {
  grid-area: receipt;
}

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

.receipt-grid span,
.receipt-empty {
  padding: 11px;
  color: #c8d4eb;
  font-size: 13px;
  line-height: 1.45;
}

.receipt-grid strong {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

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

.status-dot {
  flex: 0 0 auto;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--muted);
}

.status-dot.online,
.status-dot.ready,
.status-dot.healthy,
.status-dot.standby,
.status-dot.simulated {
  background: #69c984;
}

.status-dot.busy,
.status-dot.warning,
.status-dot.pending {
  background: #d49a35;
}

.status-dot.blocked,
.status-dot.disabled {
  background: #cb635e;
}

.evidence-body {
  min-height: 100vh;
  background: #050505;
}

.brand-body {
  min-height: 100vh;
  background: #050505;
}

.brand-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.brand-page-header,
.brand-page-header > div {
  display: flex;
  align-items: center;
}

.brand-page-header {
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.brand-page-header > div {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.brand-hero-panel {
  margin-bottom: 14px;
  padding: 36px;
  border: 1px solid #2b2b2b;
  border-radius: 18px;
  background: #090909;
}

.brand-hero-panel h1 {
  margin-top: 8px;
  font-size: clamp(48px, 8vw, 94px);
  letter-spacing: -1.8px;
}

.brand-hero-panel p:not(.eyebrow) {
  max-width: 680px;
  margin: 16px 0 0;
  color: #9a9a9a;
  font-size: 17px;
  line-height: 1.55;
}

.brand-asset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.brand-card {
  display: grid;
  align-content: center;
  gap: 20px;
  min-height: 230px;
  padding: 24px;
  border: 1px solid #2b2b2b;
  border-radius: 18px;
}

.brand-card span {
  color: #8f8f8f;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.brand-card img {
  max-width: min(360px, 100%);
  height: auto;
}

.brand-card.icon-card img {
  width: 112px;
}

.dark-card {
  background: #050505;
}

.light-card {
  background: #f7f7f7;
}

.light-card span {
  color: #6f6f6f;
}

.evidence-page {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 36px;
}

.evidence-hero {
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #111;
  box-shadow: var(--shadow);
}

.evidence-nav,
.brand-link,
.evidence-nav > div {
  display: flex;
  align-items: center;
}

.evidence-nav {
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}

.evidence-nav > div {
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.brand-link {
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
}

.brand-link strong,
.brand-link small {
  display: block;
}

.brand-link small {
  margin-top: 2px;
  color: var(--muted);
}

.evidence-intro {
  padding: 28px;
}

.evidence-intro h1 {
  max-width: 900px;
  margin-top: 8px;
  font-size: clamp(31px, 5vw, 56px);
  line-height: 0.96;
}

.evidence-intro p:not(.eyebrow) {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.55;
}

.evidence-status-grid,
.evidence-grid,
.proof-chain,
.milestone-strip {
  display: grid;
  gap: 10px;
}

.evidence-status-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 24px;
}

.evidence-status-grid article {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 13px;
  border: 1px solid #2a2a2a;
  border-radius: var(--radius);
  background: #141414;
}

.evidence-status-grid span,
.evidence-status-grid small {
  color: var(--muted);
}

.evidence-status-grid span {
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.evidence-status-grid strong {
  color: #a9c8ff;
  font-size: 21px;
}

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

.evidence-card {
  min-height: 100%;
}

.span-two {
  grid-column: 1 / -1;
}

.proof-chain {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.proof-chain span,
.milestone-strip span,
.evidence-rows span {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #141414;
  color: #d4d4d8;
}

.proof-chain span,
.milestone-strip span {
  display: grid;
  place-items: center;
  min-height: 54px;
  padding: 10px;
  text-align: center;
  font-size: 13px;
  font-weight: 760;
}

.evidence-list,
.evidence-rows {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.evidence-list {
  list-style: none;
}

.evidence-list li {
  padding: 10px 11px;
  border: 1px solid rgb(103 216 139 / 0.22);
  border-radius: 7px;
  background: rgb(103 216 139 / 0.07);
  color: #c8d4eb;
  line-height: 1.45;
}

.evidence-list.danger li {
  border-color: rgb(255 113 111 / 0.24);
  background: rgb(255 113 111 / 0.07);
}

.evidence-rows span {
  display: block;
  padding: 10px 11px;
  color: var(--muted);
  line-height: 1.45;
}

.evidence-rows strong {
  color: var(--ink);
}

.milestone-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

[hidden] {
  display: none !important;
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "topology"
      "assistant"
      "machine"
      "jobs"
      "policy"
      "approvals"
      "providers"
      "observability"
      "console"
      "receipt"
      "audit";
  }

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

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

  .proof-rail {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .proof-chain,
  .milestone-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .agent-request {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .workspace {
    padding: 16px;
  }

  .topbar,
  .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar {
    margin: -16px -16px 13px;
    padding: 14px 16px 12px;
  }

  .topbar-actions {
    display: grid;
    grid-template-columns: minmax(190px, 1fr) minmax(180px, 1.2fr) auto auto auto auto;
    align-items: center;
    justify-content: stretch;
    flex-wrap: initial;
    max-width: 100%;
    overflow: visible;
  }

  .header-org-switcher {
    flex: 0 0 auto;
    grid-template-columns: auto minmax(112px, 1fr);
    width: 100%;
  }

  .search input {
    width: 100%;
  }

  .summary-grid,
  .value-strip,
    .proof-rail,
    .proof-snapshot,
    .evidence-status-grid,
  .evidence-grid,
  .agent-request,
  .request-meta,
  .machine-grid,
  .fabric-map,
  .policy-grid,
  .receipt-grid {
    grid-template-columns: 1fr;
  }

  .span-two {
    grid-column: auto;
  }

  .proof-chain,
  .milestone-strip {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none;
  }

  .job-row,
  .approval-item,
  .policy-row,
  .placement-card {
    grid-template-columns: 1fr;
  }

  .segmented-control {
    overflow-x: auto;
  }
}

@media (max-width: 560px) {
  .app-shell {
    border-width: 1px;
  }

  .sidebar {
    gap: 12px;
    max-width: 100vw;
    padding: 12px;
  }

  .sidebar-footer {
    display: none;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-symbol {
    width: 36px;
    height: 36px;
  }

  .nav-groups {
    display: flex;
    gap: 8px;
    max-width: calc(100vw - 24px);
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .nav-groups section {
    display: flex;
    min-width: max-content;
    gap: 6px;
  }

  .nav-groups p {
    display: none;
  }

  .nav-item {
    white-space: nowrap;
  }

  .topbar-actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  }

  .header-org-switcher {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    padding: 0 10px;
  }

  .header-org-switcher span {
    display: none;
  }

  .header-org-switcher select {
    width: 100%;
  }

  #generated-at,
  .topbar-actions a[href="/evidence.html"],
  .topbar-actions a[href="/brand.html"] {
    display: none;
  }

  #provider-mode,
  .topbar-actions .primary-button {
    width: 100%;
  }

  .assistant-actions,
  .card-actions,
  .command-actions,
  .policy-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .agent-request {
    border-radius: 18px;
  }

  .icon-chip {
    display: none;
  }

  .metric strong {
    font-size: 24px;
  }

  .terminal-output {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }

  .evidence-page {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .evidence-nav {
    align-items: stretch;
    flex-direction: column;
  }

  .evidence-nav > div {
    display: grid;
    grid-template-columns: 1fr;
  }

  .evidence-intro {
    padding: 20px;
  }

  .brand-page {
    width: min(100% - 20px, 1180px);
    padding-top: 10px;
  }

  .brand-page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .brand-page-header > div,
  .brand-asset-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .brand-hero-panel {
    padding: 22px;
  }
}

@media (max-height: 760px) and (min-width: 561px) {
  .sidebar {
    gap: 16px;
  }

  .sidebar-footer {
    display: none;
  }
}
