/* ============ iranserver360 — design tokens & base ============ */
:root {
  /* neutrals — warm slate, very low chroma */
  --bg:        oklch(0.975 0.004 60);
  --bg-sunk:   oklch(0.955 0.005 60);
  --surface:   oklch(1 0 0);
  --surface-2: oklch(0.985 0.003 60);
  --line:      oklch(0.91 0.006 60);
  --line-soft: oklch(0.945 0.005 60);

  --ink:       oklch(0.24 0.018 265);
  --ink-2:     oklch(0.44 0.016 265);
  --ink-3:     oklch(0.60 0.012 265);
  --ink-4:     oklch(0.72 0.010 265);

  /* brand — warm red-orange (echoes architecture doc) */
  --brand:     oklch(0.62 0.185 35);
  --brand-ink: oklch(0.50 0.175 35);
  --brand-2:   oklch(0.70 0.145 55);   /* amber-orange secondary */
  --brand-wash:oklch(0.955 0.030 45);
  --brand-line:oklch(0.88 0.060 40);

  /* navy/slate — structural accent from the blueprint */
  --navy:      oklch(0.32 0.055 255);
  --navy-2:    oklch(0.42 0.060 255);
  --navy-wash: oklch(0.955 0.012 255);

  /* status */
  --ok:        oklch(0.62 0.135 155);
  --ok-wash:   oklch(0.955 0.035 155);
  --warn:      oklch(0.74 0.140 75);
  --warn-wash: oklch(0.96 0.045 80);
  --crit:      oklch(0.58 0.190 25);
  --crit-wash: oklch(0.955 0.035 25);
  --info:      oklch(0.58 0.105 245);

  --radius:    14px;
  --radius-sm: 9px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px oklch(0.3 0.02 265 / 0.05), 0 1px 3px oklch(0.3 0.02 265 / 0.04);
  --shadow:    0 2px 6px oklch(0.3 0.02 265 / 0.06), 0 6px 18px oklch(0.3 0.02 265 / 0.06);
  --shadow-lg: 0 8px 24px oklch(0.3 0.02 265 / 0.10), 0 18px 50px oklch(0.3 0.02 265 / 0.10);

  --sidebar-w: 256px;
  --font: "Vazirmatn", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", monospace;
}

[data-theme="dark"] {
  --bg:        oklch(0.20 0.012 265);
  --bg-sunk:   oklch(0.17 0.012 265);
  --surface:   oklch(0.245 0.013 265);
  --surface-2: oklch(0.275 0.014 265);
  --line:      oklch(0.34 0.014 265);
  --line-soft: oklch(0.30 0.013 265);

  --ink:       oklch(0.95 0.006 265);
  --ink-2:     oklch(0.80 0.010 265);
  --ink-3:     oklch(0.66 0.012 265);
  --ink-4:     oklch(0.52 0.012 265);

  --brand:     oklch(0.68 0.175 38);
  --brand-ink: oklch(0.74 0.160 40);
  --brand-wash:oklch(0.32 0.060 38);
  --brand-line:oklch(0.40 0.080 38);

  --navy:      oklch(0.72 0.080 255);
  --navy-2:    oklch(0.64 0.070 255);
  --navy-wash: oklch(0.30 0.030 255);

  --ok-wash:   oklch(0.32 0.045 155);
  --warn-wash: oklch(0.34 0.050 80);
  --crit-wash: oklch(0.33 0.050 25);

  --shadow-sm: 0 1px 2px oklch(0 0 0 / 0.30);
  --shadow:    0 2px 8px oklch(0 0 0 / 0.34), 0 8px 22px oklch(0 0 0 / 0.30);
  --shadow-lg: 0 10px 30px oklch(0 0 0 / 0.45), 0 24px 60px oklch(0 0 0 / 0.40);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  direction: rtl;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "ss01";
}
::selection { background: var(--brand-wash); color: var(--brand-ink); }

button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; }
a { color: inherit; text-decoration: none; }
.mono { font-family: var(--mono); font-feature-settings: "tnum"; }
.num  { font-variant-numeric: tabular-nums; }

/* scrollbars */
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: var(--line); border-radius: 99px; border: 3px solid var(--bg); }
*::-webkit-scrollbar-thumb:hover { background: var(--ink-4); }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------- app shell ---------- */
#root { min-height: 100vh; }
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}
.main { min-width: 0; display: flex; flex-direction: column; }
.canvas { padding: 26px 34px 60px; max-width: 1280px; width: 100%; margin: 0 auto; }
.mobile-nav-toggle, .mobile-nav-backdrop { display: none; }

/* ---------- focus ---------- */
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; border-radius: 6px; }

/* ---------- generic card ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

/* ---------- entrance ---------- */
@keyframes rise { from { transform: translateY(9px); } to { transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop  { from { opacity: 0; transform: scale(.96); } to { opacity: 1; transform: none; } }
.rise { animation: rise .42s cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) { .rise { animation: none; } }

/* ---------- unified agent center ---------- */
.agent-center-canvas { display: flex; flex-direction: column; gap: 18px; }
.agent-page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; }
.agent-page-head h1 { margin: 3px 0 4px; font-size: 27px; line-height: 1.3; }
.agent-page-head p { margin: 0; color: var(--ink-3); font-size: 13.5px; }
.agent-eyebrow { color: var(--brand-ink); font-size: 12px; font-weight: 800; }
.agent-head-meta { display: flex; align-items: center; gap: 8px; color: var(--ink-3); font-size: 12px; margin-top: 8px; }
.agent-back { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-3); font-size: 12px; margin-bottom: 7px; }
.agent-toast { position: fixed; inset-inline-end: 278px; top: 72px; z-index: 60; display: flex; gap: 8px; align-items: center; padding: 10px 14px; background: var(--ok-wash); color: var(--ok); border: 1px solid color-mix(in oklch,var(--ok) 35%,var(--line)); border-radius: 10px; box-shadow: var(--shadow); font-size: 12.5px; font-weight: 700; }
.agent-command-card { padding: 22px; display: grid; grid-template-columns: auto 1fr; column-gap: 16px; row-gap: 14px; border-color: var(--brand-line); position: relative; overflow: hidden; }
.agent-orb { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; color: var(--brand); background: var(--brand-wash); border: 1px solid var(--brand-line); }
.agent-command-copy h2 { margin: 0 0 4px; font-size: 18px; }
.agent-command-copy p { margin: 0; color: var(--ink-3); font-size: 12.8px; }
.agent-prompt-box { grid-column: 1 / -1; border: 1px solid var(--line); border-radius: 13px; background: var(--surface); padding: 13px; box-shadow: inset 0 1px 2px oklch(0.2 0.02 265 / .03); }
.agent-prompt-box textarea { width: 100%; min-height: 72px; resize: vertical; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 14px; line-height: 1.8; }
.agent-prompt-box > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.agent-prompt-box > div > span { display: flex; gap: 6px; align-items: center; color: var(--ink-4); font-size: 11.5px; }
.agent-suggestions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 7px; }
.agent-suggestions button { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; color: var(--ink-2); background: var(--surface-2); font-size: 11.5px; }
.agent-overview-grid { display: grid; grid-template-columns: .8fr 1fr 1fr; gap: 15px; }
.agent-health-card { padding: 18px; }
.agent-health-card > div:first-child { display: flex; justify-content: space-between; font-size: 13px; font-weight: 800; }
.agent-health-body { display: flex; align-items: center; gap: 20px; padding: 15px 0; }
.agent-health-body > div:last-child { flex: 1; display: flex; flex-direction: column; }
.agent-health-body > div:last-child > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 11.5px; color: var(--ink-3); }
.agent-health-body strong { color: var(--ink); font-size: 14px; }
.span-2 { grid-column: span 2; }
.agent-list-card { padding: 0; overflow: hidden; }
.agent-card-head { padding: 14px 17px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agent-card-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.agent-card-head strong { font-size: 13.5px; }
.agent-card-head small { color: var(--ink-4); font-size: 10.8px; }
.agent-session-row, .agent-approval-row, .agent-completed-row { width: 100%; padding: 12px 17px; display: flex; align-items: center; gap: 11px; text-align: start; border-bottom: 1px solid var(--line-soft); }
.agent-session-row:last-child, .agent-approval-row:last-child, .agent-completed-row:last-child { border-bottom: 0; }
.agent-session-row:hover { background: var(--surface-2); }
.agent-session-row > div:nth-child(2), .agent-approval-row > div:nth-child(2), .agent-completed-row > div:nth-child(3) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.agent-session-row strong, .agent-approval-row strong, .agent-completed-row strong { font-size: 12.4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.agent-session-row small, .agent-approval-row small, .agent-completed-row small { font-size: 10.8px; color: var(--ink-4); }
.agent-session-icon { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-wash); color: var(--brand); flex: none; }
.agent-bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.agent-approval-row { cursor: default; }
.agent-completed-row > span:first-child { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 99px; background: var(--ok); color: #fff; }
.agent-timeline { display: grid; grid-template-columns: repeat(6,1fr); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 13px 18px; }
.agent-timeline-step { display: flex; flex-direction: column; align-items: center; gap: 5px; color: var(--ink-4); position: relative; text-align: center; }
.agent-timeline-step:not(:last-child)::after { content: ""; position: absolute; height: 1px; background: var(--line); inset-inline-start: 50%; inset-inline-end: -50%; top: 12px; }
.agent-timeline-step > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 99px; background: var(--bg-sunk); border: 1px solid var(--line); font-size: 10px; z-index: 1; }
.agent-timeline-step small { position: relative; z-index: 1; font-size: 10.5px; font-weight: 700; }
.agent-timeline-step.done > span { background: var(--ok); color: #fff; border-color: var(--ok); }
.agent-timeline-step.done, .agent-timeline-step.active { color: var(--ink); }
.agent-timeline-step.active > span { background: var(--brand); color: #fff; border-color: var(--brand); }
.agent-detail-grid { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 16px; align-items: start; }
.agent-workspace { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.agent-section-title { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.agent-section-title > div { display: flex; flex-direction: column; gap: 2px; }
.agent-section-title span { font-size: 14px; font-weight: 800; }
.agent-section-title small { font-size: 10.8px; color: var(--ink-4); }
.agent-section-title.compact { margin-top: 5px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.agent-diagnosis { display: flex; gap: 12px; padding: 14px; background: var(--warn-wash); color: var(--warn); border-radius: 11px; border: 1px solid color-mix(in oklch,var(--warn) 30%,var(--line)); }
.agent-diagnosis strong { color: var(--ink); font-size: 13.5px; }
.agent-diagnosis p { color: var(--ink-2); font-size: 12px; line-height: 1.8; margin: 4px 0 0; }
.agent-evidence-list { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.agent-evidence-list > div { display: grid; grid-template-columns: auto 130px 1fr auto; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); }
.agent-evidence-list > div:last-child { border-bottom: 0; }
.agent-evidence-list span { font-size: 11.5px; color: var(--ink-3); }
.agent-evidence-list strong { font-size: 11.8px; }
.agent-plan { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.agent-plan li { display: flex; gap: 10px; align-items: center; padding: 10px 12px; background: var(--bg-sunk); border: 1px solid var(--line-soft); border-radius: 10px; }
.agent-plan li > span { width: 25px; height: 25px; border-radius: 99px; display: grid; place-items: center; background: var(--navy-wash); color: var(--navy); font-size: 10px; font-weight: 800; }
.agent-plan li > div { display: flex; flex-direction: column; gap: 2px; }
.agent-plan strong { font-size: 12px; }.agent-plan small { color: var(--ink-3); font-size: 10.7px; }
.agent-approval-box, .agent-running-box, .agent-verified-box { padding: 14px; border-radius: 12px; border: 1px solid var(--brand-line); background: var(--brand-wash); }
.agent-approval-box { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.agent-approval-box > div, .agent-running-box > div:first-child { display: flex; align-items: center; gap: 10px; }
.agent-approval-box > div > div, .agent-running-box > div:first-child > div { display: flex; flex-direction: column; gap: 2px; }
.agent-approval-box strong, .agent-running-box strong, .agent-verified-box strong { font-size: 12.5px; }
.agent-approval-box small, .agent-running-box small, .agent-verified-box small { color: var(--ink-3); font-size: 10.8px; }
.agent-running-box { display: flex; flex-direction: column; gap: 12px; }
.agent-live-dot { width: 10px; height: 10px; border-radius: 99px; background: var(--brand); animation: livepulse 1.2s infinite; }
.agent-verified-box { display: flex; align-items: center; gap: 12px; background: var(--ok-wash); color: var(--ok); border-color: color-mix(in oklch,var(--ok) 35%,var(--line)); }
.agent-verified-box > div { display: flex; flex-direction: column; gap: 3px; }
.agent-context-rail { display: flex; flex-direction: column; gap: 13px; }
.agent-context-rail > .card { padding: 15px; }
.agent-rail-title { font-size: 12.5px; font-weight: 800; margin-bottom: 9px; }
.agent-context-row { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 10.8px; color: var(--ink-3); }
.agent-context-row strong { color: var(--ink-2); font-size: 10.8px; }
.agent-source { display: grid; grid-template-columns: 20px 1fr auto; align-items: center; gap: 7px; padding: 7px 0; border-bottom: 1px solid var(--line-soft); font-size: 10.8px; }
.agent-source > span { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 99px; color: var(--navy); background: var(--navy-wash); font-size: 9px; }
.agent-handoff-card { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.agent-handoff-card p { margin: 0; color: var(--ink-3); font-size: 10.8px; line-height: 1.8; }
.customer-agent-detail .agent-detail-grid { grid-template-columns: minmax(0,1fr) 310px; }
.customer-evidence-table { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.customer-evidence-row { display: grid; grid-template-columns: auto 135px minmax(0,1fr) auto auto; align-items: center; gap: 9px; min-height: 45px; padding: 9px 11px; border-bottom: 1px solid var(--line-soft); }
.customer-evidence-row:last-child { border-bottom: 0; }
.customer-evidence-row > svg { color: var(--ink-3); }
.customer-evidence-row > span { color: var(--ink-3); font-size: 11.2px; }
.customer-evidence-row > strong { min-width: 0; font-size: 11.7px; overflow-wrap: anywhere; }
.customer-citation { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid var(--line-soft); border-radius: 7px; background: var(--surface-2); color: var(--navy); font-size: 9.5px; }
.customer-citation:hover { border-color: var(--navy); background: var(--navy-wash); }
.customer-proposal { border: 1px solid var(--brand-line); border-radius: 10px; overflow: hidden; }
.customer-proposal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 13px 14px; background: var(--brand-wash); border-bottom: 1px solid var(--brand-line); }
.customer-proposal-head > div:first-child { display: flex; gap: 10px; color: var(--brand-ink); }
.customer-proposal-head > div:first-child > div { display: flex; flex-direction: column; gap: 3px; }
.customer-proposal-head strong { color: var(--ink); font-size: 13px; }
.customer-proposal-head small { color: var(--ink-2); font-size: 10.7px; line-height: 1.7; }
.customer-not-executed { display: inline-flex; align-items: center; gap: 5px; flex: none; color: var(--crit); font-size: 10.5px; font-weight: 800; }
.customer-proposal-body { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(230px,.8fr); gap: 14px; padding: 14px; }
.customer-proposal-diff { display: grid; grid-template-columns: minmax(0,1fr) auto minmax(0,1fr); align-items: center; gap: 9px; }
.customer-proposal-diff > div { min-width: 0; display: flex; flex-direction: column; gap: 5px; padding: 10px; background: var(--bg-sunk); border: 1px solid var(--line-soft); border-radius: 8px; }
.customer-proposal-diff small { color: var(--ink-4); font-size: 9.5px; }
.customer-proposal-diff code { direction: ltr; text-align: left; color: var(--ink); font-size: 10.5px; overflow-wrap: anywhere; }
.customer-safe-list { display: flex; flex-direction: column; justify-content: center; gap: 7px; padding-inline-start: 14px; border-inline-start: 1px solid var(--line-soft); }
.customer-safe-list span { display: flex; align-items: center; gap: 6px; color: var(--ink-2); font-size: 10.5px; line-height: 1.5; }
.customer-safe-list svg { color: var(--ok); flex: none; }
.customer-no-execute { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 12px 14px; background: var(--warn-wash); border-top: 1px solid color-mix(in oklch,var(--warn) 35%,var(--line)); }
.customer-no-execute > div:first-child { display: flex; align-items: center; gap: 9px; color: var(--warn); }
.customer-no-execute > div:first-child > div { display: flex; flex-direction: column; gap: 2px; }
.customer-no-execute strong { color: var(--ink); font-size: 11.7px; }
.customer-no-execute small { color: var(--ink-2); font-size: 10.2px; line-height: 1.6; }
.customer-handoff-preview { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.customer-handoff-summary { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-bottom: 1px solid var(--line); background: var(--surface-2); }
.customer-handoff-summary > span { min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-inline-end: 1px solid var(--line-soft); }
.customer-handoff-summary > span:last-child { border-inline-end: 0; }
.customer-handoff-summary small { color: var(--ink-4); font-size: 9px; }
.customer-handoff-summary strong { font-size: 10.7px; overflow-wrap: anywhere; }
.customer-no-write { color: var(--crit); direction: ltr; text-align: left; }
.customer-handoff-code { max-height: 220px; overflow: auto; margin: 0; padding: 13px 15px; background: var(--bg-sunk); color: var(--ink-2); font-family: var(--mono); font-size: 9.8px; line-height: 1.65; white-space: pre-wrap; text-align: left; }
.customer-handoff-actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; padding: 11px 13px; border-top: 1px solid var(--line); }
.customer-ticket-created { display: flex; align-items: center; gap: 10px; padding: 12px 13px; border: 1px solid color-mix(in oklch,var(--ok) 35%,var(--line)); border-radius: 10px; background: var(--ok-wash); color: var(--ok); }
.customer-ticket-created > div { display: flex; flex-direction: column; gap: 2px; }
.customer-ticket-created strong { color: var(--ink); font-size: 11.8px; }
.customer-ticket-created small { color: var(--ink-2); font-size: 10.3px; }
.customer-api-card { display: flex; flex-direction: column; gap: 8px; }
.customer-api-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.customer-api-head > div { display: flex; align-items: center; gap: 7px; }
.customer-api-head > div svg { color: var(--navy); }
.customer-api-head strong { font-size: 12.5px; }
.customer-api-card > p { margin: -2px 0 2px; color: var(--ink-4); font-size: 9.8px; }
.customer-api-raw { max-height: 155px; overflow: auto; margin: 2px 0 0; padding: 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--bg-sunk); color: var(--ink-2); font-family: var(--mono); font-size: 8.8px; line-height: 1.6; text-align: left; white-space: pre-wrap; }
.customer-source-button { width: 100%; display: grid; grid-template-columns: 72px minmax(0,1fr) auto; align-items: center; gap: 7px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); text-align: start; }
.customer-source-button:last-child { border-bottom: 0; }
.customer-source-button > span { color: var(--navy); font-size: 8.8px; text-align: left; }
.customer-source-button > div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.customer-source-button strong { font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-source-button small { color: var(--ink-4); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.customer-source-button:hover strong { color: var(--brand-ink); }
.customer-feedback-card > p { margin: -2px 0 10px; color: var(--ink-3); font-size: 10.2px; line-height: 1.7; }
.customer-feedback-actions { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 6px; }
.customer-feedback-actions button { min-width: 0; min-height: 62px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 5px; padding: 7px 3px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--ink-3); font-size: 9.5px; line-height: 1.4; }
.customer-feedback-actions button.active.ok { color: var(--ok); border-color: var(--ok); background: var(--ok-wash); }
.customer-feedback-actions button.active.crit { color: var(--crit); border-color: var(--crit); background: var(--crit-wash); }
.customer-feedback-actions button.active.brand { color: var(--brand-ink); border-color: var(--brand); background: var(--brand-wash); }

@media (max-width: 1050px) {
  .agent-overview-grid { grid-template-columns: 1fr 1fr; }
  .agent-overview-grid .span-2 { grid-column: span 1; }
  .agent-detail-grid { grid-template-columns: 1fr; }
  .customer-agent-detail .agent-detail-grid { grid-template-columns: 1fr; }
  .agent-context-rail { display: grid; grid-template-columns: repeat(3,1fr); }
}
@media (max-width: 760px) {
  .app { display: block; }
  .main { width: 100%; }
  .app-sidebar { position: fixed !important; inset-block: 0; inset-inline-start: 0; z-index: 70; height: 100vh !important; transform: translateX(105%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .app-sidebar.mobile-open { transform: none; }
  .mobile-nav-toggle { position: fixed; z-index: 80; top: 12px; inset-inline-start: 12px; width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-sm); color: var(--ink-2); }
  .mobile-nav-backdrop { display: block; position: fixed; inset: 0; z-index: 60; background: oklch(0.2 0.02 265 / .42); }
  .app-topbar { padding-inline: 58px 12px !important; }
  .app-topbar-inner { height: 60px !important; gap: 8px !important; }
  .app-topbar-title h1 { font-size: 15px !important; }
  .app-topbar-title > div { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px !important; }
  .app-topbar-actions { gap: 6px !important; }
  .app-topbar-search, .app-topbar-profile, .app-topbar-divider { display: none !important; }
  .app-topbar-actions > button { width: 34px !important; height: 34px !important; }
  .canvas { max-width: 100%; padding: 18px 14px 46px; }
  .agent-page-head, .agent-approval-box { flex-direction: column; align-items: stretch; }
  .agent-page-head h1 { font-size: 22px; }
  .agent-head-meta { flex-wrap: wrap; }
  .agent-toast { inset-inline: 14px; top: 68px; }
  .agent-overview-grid, .agent-bottom-grid { grid-template-columns: 1fr; }
  .agent-overview-grid .span-2 { grid-column: auto; }
  .agent-context-rail { grid-template-columns: 1fr; }
  .agent-timeline { overflow-x: auto; grid-template-columns: repeat(6,112px); padding-inline: 12px; }
  .agent-workspace { padding: 14px; }
  .agent-evidence-list > div { grid-template-columns: auto 1fr auto; }
  .agent-evidence-list strong { grid-column: 2 / -1; }
  .customer-evidence-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .customer-evidence-row > strong { grid-column: 2 / -1; }
  .customer-citation { grid-column: 2; justify-self: start; }
  .customer-evidence-row > .badge { grid-column: 3; grid-row: 1; }
  .customer-proposal-head, .customer-no-execute { flex-direction: column; align-items: stretch; }
  .customer-proposal-body { grid-template-columns: 1fr; }
  .customer-safe-list { padding-inline-start: 0; padding-top: 12px; border-inline-start: 0; border-top: 1px solid var(--line-soft); }
  .customer-handoff-summary { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .customer-handoff-summary > span:nth-child(2) { border-inline-end: 0; }
  .customer-handoff-summary > span:nth-child(-n+2) { border-bottom: 1px solid var(--line-soft); }
  .customer-handoff-actions { justify-content: stretch; }
  .customer-handoff-actions .is-btn { flex: 1; }
}

/* ---------- agent operations & support copilot ---------- */
.ops-canvas { display: flex; flex-direction: column; gap: 16px; }
.ops-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.ops-page-head h1 { margin: 2px 0 4px; font-size: 26px; }.ops-page-head p { margin: 0; color: var(--ink-3); font-size: 12.5px; }
.ops-page-head > div:last-child { display: flex; gap: 8px; align-items: center; }
.ops-eyebrow { color: var(--navy); font-size: 11.5px; font-weight: 800; }
.ops-metrics { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }
.ops-metric { padding: 15px; display: flex; align-items: center; gap: 12px; }
.ops-metric-icon { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 10px; }
.ops-metric-icon.ok { color: var(--ok); background: var(--ok-wash); }.ops-metric-icon.brand { color: var(--brand); background: var(--brand-wash); }.ops-metric-icon.navy { color: var(--navy); background: var(--navy-wash); }.ops-metric-icon.warn { color: var(--warn); background: var(--warn-wash); }.ops-metric-icon.crit { color: var(--crit); background: var(--crit-wash); }
.ops-metric > div:last-child { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }.ops-metric strong { font-size: 20px; }.ops-metric span { color: var(--ink-2); font-size: 11.5px; font-weight: 700; }.ops-metric small { grid-column: 1/-1; color: var(--ink-4); font-size: 10.5px; }
.ops-main-grid { display: grid; grid-template-columns: minmax(0,1.7fr) minmax(260px,.7fr); gap: 14px; }
.ops-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.ops-card-head > div:first-child { display: flex; flex-direction: column; gap: 2px; }.ops-card-head strong { font-size: 13px; }.ops-card-head small { color: var(--ink-4); font-size: 10.5px; }
.ops-intent-grid { display: grid; grid-template-columns: repeat(5,1fr); padding: 16px; gap: 9px; }
.ops-intent-grid > div { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 12px 8px; border: 1px solid var(--line-soft); border-radius: 11px; background: var(--surface-2); }
.ops-intent-grid > div > div:first-child { display: flex; align-items: center; gap: 6px; font-size: 12px; }.ops-intent-grid small { color: var(--ink-4); font-size: 9.5px; }.ops-intent-grid small b { color: var(--crit); }
.ops-health-body { padding: 18px; display: flex; align-items: center; gap: 22px; }.ops-health-body > div:last-child { flex: 1; }.ops-health-body > div:last-child > div { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-soft); }
.ops-alert-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 12px; }.ops-alert-card { padding: 13px; display: flex; align-items: center; gap: 10px; text-align: start; }.ops-alert-card > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }.ops-alert-card strong { font-size: 11.8px; }.ops-alert-card small { color: var(--ink-4); font-size: 9.8px; }
.ops-table { min-width: 760px; }.ops-runs { overflow-x: auto; }.ops-table-head,.ops-table-row { display: grid; grid-template-columns: .8fr 1.4fr 1fr 1fr .8fr .6fr; align-items: center; gap: 10px; padding: 10px 16px; }.ops-table-head { color: var(--ink-4); background: var(--bg-sunk); font-size: 10.5px; font-weight: 700; }.ops-table-row { font-size: 11.5px; border-top: 1px solid var(--line-soft); }.ops-table-row strong { font-size: 11.5px; }
.copilot-layout { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 14px; align-items: start; }.copilot-queue { overflow: hidden; }.copilot-queue > button { width: 100%; display: grid; grid-template-columns: 1fr auto; text-align: start; gap: 5px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }.copilot-queue > button strong { grid-column: 1/-1; font-size: 11.5px; }.copilot-queue > button.active { background: var(--navy-wash); box-shadow: inset -3px 0 var(--navy); }.copilot-work { padding: 18px; display: flex; flex-direction: column; gap: 14px; }.copilot-ticket-head { display: flex; justify-content: space-between; gap: 16px; }.copilot-ticket-head h2 { margin: 8px 0 3px; font-size: 18px; }.copilot-ticket-head span { color: var(--ink-4); font-size: 10.5px; }.copilot-summary { padding: 14px; border: 1px solid var(--brand-line); background: var(--brand-wash); border-radius: 11px; }.copilot-summary p { margin: 4px 0 12px; color: var(--ink-2); font-size: 11.5px; line-height: 1.8; }.copilot-summary > div:last-child { display: grid; grid-template-columns: repeat(4,1fr); gap: 8px; }.copilot-summary > div:last-child > span { display: flex; flex-direction: column; padding: 8px; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 8px; }.copilot-summary small { color: var(--ink-4); font-size: 9px; }.copilot-summary b { font-size: 11px; }.copilot-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }.copilot-two-col > section { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }.copilot-evidence { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-bottom: 1px solid var(--line-soft); font-size: 10.8px; }.copilot-evidence span { flex: 1; }.copilot-two-col .agent-plan { padding: 12px; }.copilot-reply { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }.copilot-reply textarea { width: calc(100% - 28px); margin: 14px; min-height: 92px; padding: 11px; background: var(--bg-sunk); border: 1px solid var(--line); border-radius: 9px; color: var(--ink); line-height: 1.9; }.copilot-reply > div:last-child { display: flex; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }
.copilot-layout-v2 { grid-template-columns: 260px minmax(0,1fr) 270px; }
.copilot-layout-v2 .copilot-queue > button { grid-template-columns: 1fr auto; }
.copilot-layout-v2 .copilot-queue > button small { grid-column: 1/-1; color: var(--ink-4); font-size: 9.8px; }
.copilot-ticket-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.copilot-evidence.rich { display: grid; grid-template-columns: auto minmax(0,1fr) auto; }
.copilot-citations { padding: 10px 12px 12px; display: grid; gap: 8px; }
.copilot-citations > button { display: grid; grid-template-columns: 74px minmax(0,1fr) auto; align-items: center; gap: 8px; text-align: start; padding: 9px 10px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2); }
.copilot-citations > button strong { font-size: 10.8px; }
.copilot-citations > button small { grid-column: 2/3; color: var(--ink-4); font-size: 9.5px; line-height: 1.6; }
.copilot-escalation { margin: 0 12px 12px; padding: 10px 11px; border-radius: 10px; border: 1px solid var(--warn); background: var(--warn-wash); color: var(--warn); display: flex; align-items: center; gap: 9px; }
.copilot-escalation > div { display: flex; flex-direction: column; gap: 2px; }
.copilot-escalation strong { color: var(--ink); font-size: 11.5px; }
.copilot-escalation small { color: var(--ink-2); font-size: 10px; line-height: 1.7; }
.copilot-reply textarea[readonly] { cursor: text; }
.copilot-reply-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 0 14px 14px; }
.copilot-trace-panel { overflow: hidden; position: sticky; top: 82px; }
.copilot-trace-list, .copilot-eval-list { padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.copilot-trace-list > div { display: grid; grid-template-columns: 24px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2); }
.copilot-trace-list > div > span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 99px; background: var(--brand-wash); color: var(--brand-ink); font-size: 10px; font-weight: 800; }
.copilot-trace-list strong { font-size: 11px; direction: ltr; text-align: left; }
.copilot-trace-list small { color: var(--ink-4); font-size: 9.5px; }
.copilot-eval-list > div { display: grid; gap: 7px; padding: 9px; border: 1px solid var(--line-soft); border-radius: 9px; background: var(--surface-2); }
.copilot-eval-list small { color: var(--ink-4); font-size: 10px; }
.ops-filters { display: flex; justify-content: space-between; gap: 12px; align-items: center; }.ops-filters > div:last-child { width: min(380px,100%); padding: 9px 12px; display: flex; gap: 7px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; }.ops-filters input { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); }
.governance-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 14px; align-items: start; }.governance-row { display: flex; align-items: center; gap: 11px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }.governance-row > div:nth-child(2) { flex: 1; display: flex; flex-direction: column; gap: 2px; }.governance-row strong { font-size: 12px; }.governance-row small { color: var(--ink-4); font-size: 10px; }.governance-side > div:not(.ops-card-head) { display: flex; justify-content: space-between; padding: 11px 15px; border-bottom: 1px solid var(--line-soft); font-size: 11px; color: var(--ink-3); }.governance-side strong { color: var(--ink); }
@media(max-width:1100px){.ops-metrics,.ops-alert-grid{grid-template-columns:repeat(2,1fr)}.ops-intent-grid{grid-template-columns:repeat(3,1fr)}.ops-main-grid{grid-template-columns:1fr}.copilot-layout,.copilot-layout-v2{grid-template-columns:1fr}.copilot-queue{display:block}.copilot-trace-panel{position:static}}
@media(max-width:760px){.ops-metrics,.ops-alert-grid,.copilot-two-col,.governance-layout{grid-template-columns:1fr}.ops-page-head,.ops-filters,.copilot-ticket-head{flex-direction:column;align-items:stretch}.ops-intent-grid{grid-template-columns:repeat(2,1fr)}.copilot-summary>div:last-child{grid-template-columns:repeat(2,1fr)}.copilot-citations>button{grid-template-columns:1fr}.copilot-citations>button small{grid-column:auto}.copilot-evidence.rich{grid-template-columns:auto 1fr}.copilot-evidence.rich .badge{grid-column:1/-1;justify-self:start}.copilot-ticket-actions{justify-content:flex-start}}

/* ---------- week 1 execution board ---------- */
.week1-canvas { display: flex; flex-direction: column; gap: 16px; }
.week1-metric { padding: 15px; display: flex; align-items: center; gap: 12px; }
.week1-metric > div:last-child { display: grid; grid-template-columns: auto 1fr; column-gap: 8px; align-items: baseline; }
.week1-metric strong { font-size: 20px; }
.week1-metric span { color: var(--ink-2); font-size: 11.5px; font-weight: 700; }
.week1-metric small { grid-column: 1/-1; color: var(--ink-4); font-size: 10.5px; }
.week1-layout { display: grid; grid-template-columns: minmax(0,1.45fr) 360px; gap: 14px; align-items: start; }
.week1-intents, .week1-detail { overflow: hidden; }
.week1-intent-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; padding: 14px; }
.week1-intent-list > button { min-height: 118px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface-2); display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto 1fr; gap: 9px; text-align: start; transition: border-color .15s, background .15s, transform .15s; }
.week1-intent-list > button:hover, .week1-intent-list > button.active { border-color: var(--brand-line); background: var(--brand-wash); }
.week1-intent-list > button.active { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.week1-intent-list > button > div:first-child { grid-column: 1/-1; display: flex; align-items: center; gap: 8px; color: var(--ink); }
.week1-intent-list strong { font-size: 12.5px; }
.week1-intent-list > button > span { color: var(--ink-3); font-size: 10.8px; }
.week1-volume { grid-column: 1/-1; align-self: end; display: flex; flex-direction: column; gap: 5px; }
.week1-volume small { color: var(--ink-4); font-size: 10px; }
.week1-detail-body { padding: 14px 16px; display: grid; gap: 10px; }
.week1-detail-body > div { padding: 11px; border: 1px solid var(--line-soft); border-radius: 10px; background: var(--surface-2); display: flex; flex-direction: column; gap: 4px; }
.week1-detail-body span { color: var(--ink-4); font-size: 10.5px; font-weight: 700; }
.week1-detail-body strong { font-size: 12px; line-height: 1.8; }
.week1-evals { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 8px; }
.week1-evals > strong { font-size: 12.5px; }
.week1-evals p { margin: 0; padding: 9px 10px; border-radius: 9px; background: var(--bg-sunk); display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 11.2px; line-height: 1.7; }
.week1-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.week1-contract { display: flex; flex-direction: column; }
.week1-contract > div { display: grid; grid-template-columns: 150px auto minmax(0,1.2fr) minmax(170px,.8fr); align-items: center; gap: 10px; padding: 11px 14px; border-top: 1px solid var(--line-soft); }
.week1-contract span { font-size: 11px; font-weight: 700; color: var(--ink-2); }
.week1-contract strong { font-size: 11.5px; line-height: 1.7; }
.week1-contract small { color: var(--ink-4); font-size: 10.2px; line-height: 1.7; }
.week1-permissions { display: flex; flex-direction: column; }
.week1-permissions > div { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.week1-permissions > div > div:nth-child(2) { display: flex; flex-direction: column; gap: 2px; }
.week1-permissions strong { font-size: 12px; }
.week1-permissions span { color: var(--ink-2); font-size: 10.8px; line-height: 1.7; }
.week1-permissions small { color: var(--ink-4); font-size: 10px; }
.week1-kb { display: flex; flex-direction: column; }
.week1-kb > div { display: grid; grid-template-columns: auto minmax(0,1fr) auto minmax(130px,.7fr); align-items: center; gap: 10px; padding: 12px 14px; border-top: 1px solid var(--line-soft); }
.week1-kb > div > div { display: flex; flex-direction: column; gap: 2px; }
.week1-kb strong { font-size: 12px; }
.week1-kb span { color: var(--ink-3); font-size: 10.6px; }
.week1-kb small { color: var(--ink-4); font-size: 10px; line-height: 1.7; }
.week1-flow { display: flex; flex-direction: column; padding: 8px 14px 14px; }
.week1-flow > div { display: grid; grid-template-columns: 26px auto minmax(0,1fr); align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.week1-flow > div:last-child { border-bottom: 0; }
.week1-flow > div > span:first-child { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 99px; background: var(--navy-wash); color: var(--navy); font-size: 10px; font-weight: 800; }
.week1-flow > div > div:last-child { display: flex; flex-direction: column; gap: 2px; }
.week1-flow strong { font-size: 12px; }
.week1-flow small { color: var(--ink-4); font-size: 10.5px; line-height: 1.7; }
@media(max-width:1100px){.week1-layout,.week1-two-col{grid-template-columns:1fr}.week1-contract>div{grid-template-columns:150px auto 1fr}}
@media(max-width:760px){.week1-intent-list{grid-template-columns:1fr}.week1-contract>div,.week1-kb>div,.week1-flow>div{grid-template-columns:1fr}.week1-permissions>div{grid-template-columns:auto 1fr}.week1-permissions>div>.badge{grid-column:1/-1;justify-self:start}}

/* ---------- week 4 release control room ---------- */
.release-canvas,.eval-lab-canvas,.feedback-canvas { gap: 15px; }
.release-page-head > div:last-child { flex-wrap: wrap; justify-content: flex-end; }
.release-meta-line { min-height: 38px; display: flex; align-items: center; gap: 24px; padding: 7px 13px; border-block: 1px solid var(--line-soft); color: var(--ink-3); font-size: 10.5px; }
.release-meta-line strong { color: var(--ink-2); margin-inline-start: 4px; }
.release-decision { overflow: hidden; border-color: color-mix(in oklch,var(--ok) 42%,var(--line)); }
.release-decision.blocked { border-color: color-mix(in oklch,var(--crit) 45%,var(--line)); }
.release-decision-main { min-height: 108px; display: grid; grid-template-columns: auto minmax(190px,1.1fr) auto minmax(220px,.85fr); align-items: center; gap: 15px; padding: 15px 18px; background: color-mix(in oklch,var(--ok-wash) 64%,var(--surface)); }
.release-decision.blocked .release-decision-main { background: color-mix(in oklch,var(--crit-wash) 64%,var(--surface)); }
.release-decision-icon { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 50%; color: var(--ok); background: var(--surface); border: 1px solid color-mix(in oklch,var(--ok) 35%,var(--line)); box-shadow: var(--shadow-sm); }
.release-decision.blocked .release-decision-icon { color: var(--crit); border-color: var(--crit); }
.release-decision-main > div:nth-child(2) { display: flex; flex-direction: column; gap: 3px; }
.release-decision-main > div:nth-child(2) strong { font-size: 21px; }
.release-decision-main > div:nth-child(2) small { color: var(--ink-2); font-size: 11px; }
.release-score { min-width: 112px; padding-inline: 16px; border-inline: 1px solid color-mix(in oklch,var(--ok) 28%,var(--line)); text-align: center; }
.release-score b { color: var(--ok); font-size: 31px; line-height: 1; }
.release-score span { color: var(--ink-3); font-size: 11px; }
.release-score small { display: block; margin-top: 4px; color: var(--ink-4); font-size: 9.5px; }
.release-decision-note { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border: 1px solid color-mix(in oklch,var(--ok) 25%,var(--line)); border-radius: 9px; background: var(--surface); color: var(--ink-2); font-size: 10.5px; line-height: 1.8; }
.release-decision-note svg { color: var(--ok); flex: none; }
.release-run-progress { display: grid; grid-template-columns: auto minmax(120px,1fr) auto; align-items: center; gap: 12px; padding: 9px 18px; border-top: 1px solid var(--line); font-size: 10.5px; }
.release-run-progress b { color: var(--brand-ink); }
.release-gate-rail { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); border-top: 1px solid var(--line); background: var(--surface); }
.release-gate-rail > div { min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 8px; padding: 11px 12px; border-inline-start: 1px solid var(--line-soft); }
.release-gate-rail > div:first-child { border-inline-start: 0; }
.release-gate-rail > div > div { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.release-gate-rail strong { overflow: hidden; color: var(--ink-2); font-size: 9.8px; text-overflow: ellipsis; white-space: nowrap; }
.release-gate-rail small { color: var(--ink-4); font-size: 8.4px; }
.release-gate-rail b { font-size: 10.5px; white-space: nowrap; }
.release-gate-rail .passed > svg { color: var(--ok); }
.release-gate-rail .failed > svg { color: var(--crit); }
.release-gate-index { width: 20px; height: 20px; display: grid; place-items: center; border-radius: 50%; background: var(--ok-wash); color: var(--ok); font-size: 9px; font-weight: 800; }
.release-gate-rail .failed .release-gate-index { color: var(--crit); background: var(--crit-wash); }
.release-gate-rail.compact { grid-template-columns: 1fr; border-top: 0; }
.release-gate-rail.compact > div { border-inline-start: 0; border-top: 1px solid var(--line-soft); }
.release-control-layout { display: grid; grid-template-columns: minmax(0,1.7fr) 310px; gap: 14px; align-items: start; }
.release-regression-panel { min-width: 0; overflow: hidden; }
.release-regression-body { display: grid; }
.release-trend-panel { padding: 14px 16px 6px; border-bottom: 1px solid var(--line); }
.release-trend-panel > strong { display: block; margin-bottom: 8px; font-size: 11px; }
.release-trend-panel > small { display: block; margin: -13px 0 8px; color: var(--ink-4); font-size: 9.5px; }
.release-intent-table { min-width: 710px; }
.release-intent-head,.release-intent-row { display: grid; grid-template-columns: minmax(130px,1.35fr) 92px 72px 78px 75px 55px; align-items: center; gap: 8px; padding: 9px 14px; }
.release-intent-head { background: var(--bg-sunk); color: var(--ink-4); font-size: 9px; font-weight: 700; }
.release-intent-row { min-height: 41px; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: 10.2px; content-visibility: auto; contain-intrinsic-size: auto 41px; }
.release-intent-row > span:first-child { min-width: 0; display: flex; align-items: center; gap: 7px; color: var(--ink); }
.release-intent-row > span:first-child strong { overflow: hidden; font-size: 10.7px; text-overflow: ellipsis; white-space: nowrap; }
.release-zero { color: var(--ok); font-weight: 800; }
.release-danger { color: var(--crit); font-weight: 800; }
.release-control-side { display: flex; flex-direction: column; gap: 12px; }
.rollout-stage-panel,.release-blockers,.release-rollback { overflow: hidden; }
.rollout-stage-rail { padding: 5px 14px; }
.rollout-stage-rail > div { position: relative; min-height: 48px; display: grid; grid-template-columns: 27px 1fr; align-items: center; gap: 9px; color: var(--ink-4); }
.rollout-stage-rail > div:not(:last-child)::after { content: ""; position: absolute; top: 36px; bottom: -12px; inset-inline-start: 13px; width: 1px; background: var(--line); }
.rollout-stage-rail > div > span { width: 27px; height: 27px; z-index: 1; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); font-size: 9px; font-weight: 800; }
.rollout-stage-rail > div > div { display: flex; flex-direction: column; gap: 1px; }
.rollout-stage-rail strong { font-size: 10.8px; }
.rollout-stage-rail small { font-size: 9px; }
.rollout-stage-rail .done,.rollout-stage-rail .active { color: var(--ok); }
.rollout-stage-rail .done > span { border-color: var(--ok); background: var(--ok-wash); }
.rollout-stage-rail .active > span { color: #fff; border-color: var(--brand-ink); background: var(--brand); box-shadow: 0 0 0 4px var(--brand-wash); }
.rollout-current { margin: 2px 14px 12px; padding: 10px 11px; border: 1px solid var(--brand-line); border-radius: 9px; background: var(--brand-wash); display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; }
.rollout-current span,.rollout-current small { color: var(--ink-3); font-size: 9.5px; }
.rollout-current strong { color: var(--brand-ink); font-size: 12px; }
.rollout-current small { grid-column: 1/-1; line-height: 1.7; }
.rollout-stage-panel > .is-btn { width: calc(100% - 28px) !important; margin: 0 14px 14px; }
.release-blockers > div:not(.ops-card-head),.release-checklist > div { display: flex; align-items: center; gap: 8px; padding: 10px 13px; border-top: 1px solid var(--line-soft); font-size: 10px; }
.release-blockers > div:not(.ops-card-head) > span { flex: 1; }
.release-empty-blocker { color: var(--ok); background: var(--ok-wash); }
.release-rollback { padding-bottom: 13px; }
.release-rollback > div:first-child { display: flex; align-items: center; gap: 9px; padding: 13px; }
.release-rollback > div:first-child > svg { color: var(--crit); }
.release-rollback > div:first-child span { display: flex; flex-direction: column; gap: 2px; }
.release-rollback strong { font-size: 11px; }
.release-rollback small { color: var(--ink-4); font-size: 9px; }
.release-rollback > .is-btn { width: calc(100% - 26px) !important; margin-inline: 13px; }
.release-bottom-band { display: grid; grid-template-columns: .8fr 1.1fr 1.1fr; gap: 14px; }
.release-bottom-band > section { overflow: hidden; }
.release-uat-score { padding: 12px 16px 6px; text-align: center; }
.release-uat-score b { color: var(--brand-ink); font-size: 31px; }
.release-uat-score span { color: var(--ink-3); font-size: 11px; }
.release-uat-score small { display: block; color: var(--ink-4); font-size: 9px; }
.release-uat-stats { display: grid; grid-template-columns: repeat(3,1fr); margin-top: 7px; border-top: 1px solid var(--line-soft); }
.release-uat-stats span { padding: 9px 4px; text-align: center; color: var(--ink-3); font-size: 8.8px; border-inline-start: 1px solid var(--line-soft); }
.release-uat-stats span:first-child { border-inline-start: 0; }
.release-uat-stats b { display: block; color: var(--ink); font-size: 12px; }
.release-feedback-row { display: flex; gap: 9px; align-items: center; padding: 10px 13px; border-top: 1px solid var(--line-soft); color: var(--ok); }
.release-feedback-row span { display: flex; flex-direction: column; gap: 1px; }
.release-feedback-row strong { color: var(--ink); font-size: 10.5px; }
.release-feedback-row small { color: var(--ink-4); font-size: 9px; }
.release-checklist > div > svg { color: var(--ok); flex: none; }
.release-checklist > div > span { flex: 1; display: flex; flex-direction: column; gap: 1px; }
.release-checklist strong { font-size: 10.3px; }
.release-checklist small { color: var(--ink-4); font-size: 8.8px; }
.release-modal { padding: 24px; text-align: center; }
.release-modal-icon { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 50%; background: var(--crit-wash); color: var(--crit); }
.release-modal h2 { margin: 0 0 7px; font-size: 18px; }
.release-modal p { margin: 0; color: var(--ink-2); font-size: 11px; line-height: 1.9; }
.release-modal > div { display: flex; justify-content: center; gap: 8px; margin-top: 18px; }

/* ---------- agent ops release signal ---------- */
.ops-release-strip { display: grid; grid-template-columns: auto minmax(380px,1fr) auto; align-items: center; gap: 18px; padding: 13px 16px; overflow: hidden; border-color: color-mix(in oklch,var(--ok) 38%,var(--line)); background: color-mix(in oklch,var(--ok-wash) 38%,var(--surface)); }
.ops-release-score { display: flex; align-items: center; gap: 12px; }
.ops-release-score > span { display: flex; flex-direction: column; gap: 2px; }
.ops-release-score small { color: var(--ink-4); font-size: 9px; }
.ops-release-score strong { display: flex; align-items: center; gap: 6px; color: var(--ok); font-size: 15px; }
.ops-release-score b { color: var(--ink-3); font-size: 9.5px; font-weight: 600; }
.ops-release-gates { display: grid; grid-template-columns: repeat(5,minmax(72px,1fr)); border-inline: 1px solid var(--line); }
.ops-release-gates > span { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 5px; padding: 7px 9px; border-inline-start: 1px solid var(--line-soft); }
.ops-release-gates > span:first-child { border-inline-start: 0; }
.ops-release-gates svg { color: var(--ok); }
.ops-release-gates b { overflow: hidden; color: var(--ink-2); font-size: 8.8px; text-overflow: ellipsis; white-space: nowrap; }
.ops-release-gates small { grid-column: 2; color: var(--ink); font-size: 10px; font-weight: 800; }
.ops-release-actions { display: flex; flex-direction: column; gap: 7px; }

/* ---------- eval lab ---------- */
.eval-dataset-line { display: flex; align-items: center; gap: 9px; color: var(--ink-4); font-size: 9.7px; }
.eval-dataset-line strong { padding-inline-end: 16px; color: var(--ink-2); border-inline-end: 1px solid var(--line); font-size: 10px; }
.eval-dataset-line strong:last-child { border-inline-end: 0; }
.eval-run-summary { position: relative; display: grid; grid-template-columns: 1.1fr repeat(4,1fr); min-height: 76px; overflow: hidden; }
.eval-run-summary > div { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 15px; border-inline-start: 1px solid var(--line-soft); }
.eval-run-summary > div:first-child { border-inline-start: 0; background: color-mix(in oklch,var(--ok-wash) 55%,var(--surface)); }
.eval-run-summary small { color: var(--ink-4); font-size: 9px; }
.eval-run-summary strong { font-size: 12px; }
.eval-run-summary strong.ok,.eval-run-summary strong.crit { display: flex; align-items: center; gap: 6px; font-size: 17px; }
.eval-run-summary strong.ok { color: var(--ok); }
.eval-run-summary strong.crit { color: var(--crit); }
.eval-summary-progress { position: absolute; inset-inline: 0; bottom: 0; }
.eval-lab-layout { display: grid; grid-template-columns: minmax(0,1fr) 272px; gap: 14px; align-items: start; }
.eval-lab-main { min-width: 0; overflow: hidden; }
.eval-filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); }
.eval-filter-bar > div:last-child:not(:first-child) { width: min(280px,100%); display: flex; align-items: center; gap: 7px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.eval-filter-bar input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-family: inherit; font-size: 10.5px; }
.eval-case-scroll { overflow-x: auto; border-bottom: 1px solid var(--line); }
.eval-case-table { min-width: 920px; }
.eval-case-head,.eval-case-row { display: grid; grid-template-columns: 70px 60px 100px minmax(220px,1.5fr) 65px 74px 68px 110px; align-items: center; gap: 8px; padding: 9px 12px; text-align: start; }
.eval-case-head { background: var(--bg-sunk); color: var(--ink-4); font-size: 8.8px; font-weight: 700; }
.eval-case-row { width: 100%; min-height: 42px; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: 9.7px; transition: background .15s; content-visibility: auto; contain-intrinsic-size: auto 42px; }
.eval-case-row:hover,.eval-case-row.active { background: var(--brand-wash); }
.eval-case-row.active { box-shadow: inset -3px 0 var(--brand); }
.eval-case-row strong { font-size: 10.3px; }
.eval-pass,.eval-fail { display: inline-flex; width: fit-content; align-items: center; gap: 4px; padding: 3px 6px; border-radius: 6px; font-size: 8.8px; font-weight: 800; }
.eval-pass { color: var(--ok); background: var(--ok-wash); }
.eval-fail { color: var(--crit); background: var(--crit-wash); }
.eval-lab-side { display: flex; flex-direction: column; gap: 12px; }
.eval-gates-panel,.eval-trend-card,.eval-notes { overflow: hidden; }
.eval-trend-card > div:last-child { padding: 8px 13px 13px; }
.eval-trend-card > div:last-child > strong { display: block; margin-top: -12px; text-align: center; color: var(--ok); font-size: 10.5px; }
.eval-notes ul { margin: 0; padding: 10px 29px 12px 10px; color: var(--ink-2); font-size: 9.5px; line-height: 2; }
.eval-inspector { background: var(--surface); }
.eval-inspector-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.eval-inspector-head > div { display: flex; flex-direction: column; gap: 2px; }
.eval-inspector-head strong { font-size: 11.3px; }
.eval-inspector-head small { color: var(--ink-4); font-size: 9px; }
.eval-inspector-top { display: grid; grid-template-columns: 1.05fr 1.1fr .8fr; border-bottom: 1px solid var(--line); }
.eval-inspector-block { min-width: 0; padding: 13px; border-inline-start: 1px solid var(--line-soft); }
.eval-inspector-block:first-child { border-inline-start: 0; }
.eval-inspector-block > strong { display: block; margin-bottom: 5px; color: var(--ink-3); font-size: 9.2px; }
.eval-inspector-block p { margin: 0 0 10px; color: var(--ink-2); font-size: 10.2px; line-height: 1.8; }
.eval-inspector-block pre { max-height: 155px; overflow: auto; margin: 0; padding: 9px; border: 1px solid var(--line-soft); border-radius: 8px; background: var(--bg-sunk); color: var(--ink-2); font-family: var(--mono); font-size: 8.3px; line-height: 1.7; text-align: left; white-space: pre-wrap; }
.eval-policy-line { display: flex; flex-wrap: wrap; gap: 6px; }
.eval-policy-line span { padding: 4px 7px; border-radius: 6px; background: var(--navy-wash); color: var(--navy); font-size: 8.5px; font-weight: 700; }
.eval-citation-list { display: flex; flex-direction: column; gap: 6px; }
.eval-citation-list > span { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 2px 6px; padding: 7px; border: 1px solid var(--line-soft); border-radius: 7px; }
.eval-citation-list .found { color: var(--ok); background: var(--ok-wash); }
.eval-citation-list .missing { color: var(--crit); background: var(--crit-wash); }
.eval-citation-list b { overflow: hidden; color: var(--ink-2); font-size: 8.6px; text-overflow: ellipsis; }
.eval-citation-list small { grid-column: 2; color: var(--ink-4); font-size: 8px; }
.eval-inspector-bottom { display: grid; grid-template-columns: .85fr 1.15fr; }
.eval-trace,.eval-assertions { padding: 13px; }
.eval-trace { border-inline-end: 1px solid var(--line-soft); }
.eval-trace > strong,.eval-assertions > strong { display: block; margin-bottom: 8px; font-size: 10px; }
.eval-trace > span { display: grid; grid-template-columns: 21px minmax(0,1fr) auto; align-items: center; gap: 7px; min-height: 30px; position: relative; color: var(--ok); }
.eval-trace > span:not(:last-child)::after { content: ""; position: absolute; top: 25px; bottom: -5px; inset-inline-start: 10px; width: 1px; background: var(--line); }
.eval-trace i { width: 21px; height: 21px; z-index: 1; display: grid; place-items: center; border-radius: 50%; background: var(--ok-wash); font-size: 8px; font-style: normal; font-weight: 800; }
.eval-trace b { color: var(--ink-2); font-size: 8.5px; }
.eval-trace .missing { color: var(--crit); }
.eval-assertions > div { display: grid; grid-template-columns: 1.2fr 1fr 1fr 36px; align-items: center; gap: 6px; min-height: 28px; padding: 4px 7px; border-top: 1px solid var(--line-soft); color: var(--ink-2); font-size: 8.5px; }
.eval-assertions > div svg { color: var(--ok); }
.eval-assertion-head { color: var(--ink-4) !important; background: var(--bg-sunk); font-weight: 700; }
.eval-failure-reason { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border-top: 1px solid color-mix(in oklch,var(--crit) 25%,var(--line)); background: var(--crit-wash); color: var(--crit); }
.eval-failure-reason span { display: flex; flex-direction: column; gap: 2px; color: var(--ink-2); font-size: 9.5px; }
.eval-failure-reason strong { color: var(--crit); }

/* ---------- UAT feedback ---------- */
.feedback-score-band { display: grid; grid-template-columns: 1.3fr repeat(4,1fr); overflow: hidden; }
.feedback-score-band > div { min-height: 78px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-inline-start: 1px solid var(--line-soft); }
.feedback-score-band > div:first-child { border-inline-start: 0; background: var(--ok-wash); }
.feedback-score-band b { color: var(--ok); font-size: 27px; }
.feedback-score-band span { color: var(--ink-3); font-size: 10px; }
.feedback-score-band strong { font-size: 17px; }
.feedback-score-band small { color: var(--ink-4); font-size: 9px; }
.feedback-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(330px,.8fr); gap: 14px; align-items: start; }
.feedback-list { overflow: hidden; }
.feedback-list > button { width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 10px; align-items: start; padding: 12px 14px; border-top: 1px solid var(--line-soft); text-align: start; transition: background .15s; }
.feedback-list > button:hover,.feedback-list > button.active { background: var(--brand-wash); }
.feedback-list > button.active { box-shadow: inset -3px 0 var(--brand); }
.feedback-list > button > div:nth-child(2) { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.feedback-list > button strong { font-size: 10.8px; }
.feedback-list > button small { color: var(--ink-4); font-size: 9px; }
.feedback-list > button p { margin: 4px 0 0; color: var(--ink-2); font-size: 9.8px; line-height: 1.8; }
.feedback-list > button > div:last-child { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.feedback-list > button > div:last-child b { color: var(--brand-ink); font-size: 10px; }
.feedback-avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--ok); background: var(--ok-wash); font-size: 11px; font-weight: 800; }
.feedback-avatar.improve { color: var(--warn); background: var(--warn-wash); }
.feedback-detail { position: sticky; top: 80px; overflow: hidden; }
.feedback-detail-body { padding: 15px; }
.feedback-person { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; }
.feedback-person > div { display: flex; flex-direction: column; gap: 2px; }
.feedback-person strong { font-size: 11.5px; }
.feedback-person small { color: var(--ink-4); font-size: 9px; }
.feedback-person > b { color: var(--brand-ink); font-size: 12px; }
.feedback-detail blockquote { margin: 14px 0; padding: 11px 13px; border-inline-start: 3px solid var(--brand); border-radius: 7px; background: var(--brand-wash); color: var(--ink-2); font-size: 10.5px; line-height: 1.9; }
.feedback-link { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.feedback-link > svg { color: var(--navy); }
.feedback-link > span { color: var(--ink-4); font-size: 9px; }
.feedback-link > strong { grid-column: 2; color: var(--navy); font-size: 10px; }
.feedback-link > .is-btn { grid-column: 3; grid-row: 1/3; }
.feedback-actions { display: flex; justify-content: flex-end; gap: 7px; margin-top: 14px; }

@media(max-width:1100px){
  .release-control-layout,.eval-lab-layout,.feedback-layout{grid-template-columns:1fr}
  .release-bottom-band{grid-template-columns:1fr 1fr}.release-privacy{grid-column:1/-1}
  .release-control-side{display:grid;grid-template-columns:repeat(3,1fr)}
  .eval-lab-side{display:grid;grid-template-columns:repeat(3,1fr)}
  .feedback-detail{position:static}
  .ops-release-strip{grid-template-columns:auto 1fr}.ops-release-gates{grid-column:1/-1;grid-row:2}.ops-release-actions{flex-direction:row}
}
@media(max-width:760px){
  .release-page-head>div:last-child{justify-content:flex-start}.release-page-head>div:last-child .is-btn{flex:1}
  .release-meta-line,.eval-dataset-line{flex-wrap:wrap;gap:7px 12px}
  .release-decision-main{grid-template-columns:auto 1fr;padding:14px}.release-decision-icon{width:42px;height:42px}.release-decision-main>div:nth-child(2) strong{font-size:17px}.release-score{min-width:0;padding:10px 0;border-inline:0;border-top:1px solid var(--line);grid-column:1/-1}.release-decision-note{grid-column:1/-1}
  .release-gate-rail{grid-template-columns:1fr}.release-gate-rail>div{border-inline-start:0;border-top:1px solid var(--line-soft)}
  .release-run-progress{grid-template-columns:1fr auto}.release-run-progress>div{grid-column:1/-1;grid-row:2}
  .release-control-side,.release-bottom-band,.eval-lab-side{display:grid;grid-template-columns:1fr}.release-privacy{grid-column:auto}
  .release-regression-body{overflow-x:auto}.release-trend-panel{min-width:710px}
  .eval-run-summary{grid-template-columns:repeat(2,1fr)}.eval-run-summary>div{border-top:1px solid var(--line-soft)}.eval-run-summary>div:first-child{grid-column:1/-1}
  .eval-filter-bar{align-items:stretch;flex-direction:column}.eval-filter-bar>div:first-child{max-width:100%;overflow-x:auto}.eval-filter-bar>div:last-child:not(:first-child){width:100%}
  .eval-inspector-top,.eval-inspector-bottom{grid-template-columns:1fr}.eval-inspector-block,.eval-trace{border-inline:0;border-top:1px solid var(--line-soft)}
  .feedback-score-band{grid-template-columns:repeat(2,1fr)}.feedback-score-band>div:first-child{grid-column:1/-1}.feedback-score-band>div{border-top:1px solid var(--line-soft)}
  .feedback-list>button{grid-template-columns:auto minmax(0,1fr)}.feedback-list>button>div:last-child{grid-column:2;align-items:flex-start;flex-direction:row}
  .feedback-link{grid-template-columns:auto 1fr}.feedback-link>.is-btn{grid-column:1/-1;grid-row:auto}.feedback-actions{flex-direction:column}.feedback-actions .is-btn{width:100%!important}
  .ops-release-strip{grid-template-columns:1fr}.ops-release-score{justify-content:center}.ops-release-actions{flex-direction:column}.ops-release-gates{grid-column:auto;grid-row:auto;grid-template-columns:repeat(2,1fr);border-inline:0;border-block:1px solid var(--line)}
}

/* ---------- pulse dot ---------- */
@keyframes livepulse { 0% { box-shadow: 0 0 0 0 var(--ok); } 70% { box-shadow: 0 0 0 6px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
