/* The Agency dashboard — Apple-inspired product UI, CINEMATIC register (dark-first).
   Calm OKLCH base + ambient aurora, signature indigo→blue→cyan brand gradient,
   glass surfaces, display type, restrained motion. The cinematic layer lives in a
   single block at the END of this file. This file is the design system of record. */

/* ─────────────────────────  Tokens  ───────────────────────── */
:root {
  /* neutrals (tinted, never pure) — LIGHT */
  --bg: oklch(98.5% 0.003 255);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(96.8% 0.004 255);
  --surface-inset: oklch(94% 0.005 258);
  --ink: oklch(22% 0.012 260);
  --ink-2: oklch(45% 0.012 260);
  --ink-3: oklch(58% 0.01 260);
  --border: oklch(0% 0 0 / 0.10);
  --border-strong: oklch(0% 0 0 / 0.16);

  /* accent — Apple system blue */
  --accent: oklch(56% 0.17 256);
  --accent-press: oklch(50% 0.17 256);
  --on-accent: oklch(100% 0 0);
  --ring: oklch(56% 0.17 256 / 0.45);

  /* iOS system status palette */
  --green: oklch(60% 0.15 150);
  --blue: oklch(56% 0.17 256);
  --indigo: oklch(54% 0.15 280);
  --orange: oklch(66% 0.16 55);
  --yellow: oklch(72% 0.15 85);
  --red: oklch(58% 0.21 27);
  --gray: oklch(60% 0.01 260);

  /* depth */
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.06), 0 1px 1px oklch(0% 0 0 / 0.04);
  --shadow-md: 0 4px 14px oklch(0% 0 0 / 0.08), 0 1px 3px oklch(0% 0 0 / 0.06);
  --shadow-lg: 0 24px 60px oklch(0% 0 0 / 0.18), 0 6px 18px oklch(0% 0 0 / 0.10);
  --topbar-bg: oklch(98.5% 0.003 255 / 0.72);

  /* shape */
  --r-sm: 7px; --r: 11px; --r-lg: 15px; --r-xl: 20px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 20px;
  --sp-6: 24px; --sp-8: 32px; --sp-10: 40px;
  --maxw: 1180px;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Segoe UI", system-ui, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: light dark;
}

/* dark tokens — applied for system-dark (unless forced light) and forced dark */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(17.5% 0.005 260);
    --surface: oklch(21% 0.006 260);
    --surface-2: oklch(24.5% 0.007 260);
    --surface-inset: oklch(14% 0.006 262);
    --ink: oklch(96% 0.005 260);
    --ink-2: oklch(72% 0.008 260);
    --ink-3: oklch(57% 0.01 260);
    --border: oklch(100% 0 0 / 0.10);
    --border-strong: oklch(100% 0 0 / 0.18);
    --accent: oklch(68% 0.16 256);
    --accent-press: oklch(74% 0.15 256);
    --ring: oklch(68% 0.16 256 / 0.55);
    --green: oklch(74% 0.16 152);
    --blue: oklch(68% 0.16 256);
    --indigo: oklch(70% 0.13 282);
    --orange: oklch(76% 0.15 62);
    --yellow: oklch(82% 0.14 90);
    --red: oklch(70% 0.18 27);
    --gray: oklch(64% 0.012 260);
    --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.30);
    --shadow-md: 0 6px 20px oklch(0% 0 0 / 0.40);
    --shadow-lg: 0 28px 70px oklch(0% 0 0 / 0.62), 0 8px 22px oklch(0% 0 0 / 0.5);
    --topbar-bg: oklch(17.5% 0.005 260 / 0.7);
  }
}
:root[data-theme="dark"] {
  --bg: oklch(17.5% 0.005 260);
  --surface: oklch(21% 0.006 260);
  --surface-2: oklch(24.5% 0.007 260);
  --surface-inset: oklch(14% 0.006 262);
  --ink: oklch(96% 0.005 260);
  --ink-2: oklch(72% 0.008 260);
  --ink-3: oklch(57% 0.01 260);
  --border: oklch(100% 0 0 / 0.10);
  --border-strong: oklch(100% 0 0 / 0.18);
  --accent: oklch(68% 0.16 256);
  --accent-press: oklch(74% 0.15 256);
  --ring: oklch(68% 0.16 256 / 0.55);
  --green: oklch(74% 0.16 152);
  --blue: oklch(68% 0.16 256);
  --indigo: oklch(70% 0.13 282);
  --orange: oklch(76% 0.15 62);
  --yellow: oklch(82% 0.14 90);
  --red: oklch(70% 0.18 27);
  --gray: oklch(64% 0.012 260);
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.30);
  --shadow-md: 0 6px 20px oklch(0% 0 0 / 0.40);
  --shadow-lg: 0 28px 70px oklch(0% 0 0 / 0.62), 0 8px 22px oklch(0% 0 0 / 0.5);
  --topbar-bg: oklch(17.5% 0.005 260 / 0.7);
}

/* ─────────────────────────  Base  ───────────────────────── */
* { box-sizing: border-box; }
/* the [hidden] attribute must win over class-level display (modal/drawer/toast) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-variant-numeric: tabular-nums;
}
h1, h2, h3 { letter-spacing: -0.018em; margin: 0; font-weight: 680; }

/* Technical "eyebrow" taxonomy labels — monospace uppercase, the dev-tool
   signature borrowed from Vercel/Linear. Applied to small section headers and
   metadata tags so the chrome reads as software-craft documentation. */
.detail-section h3, .form-section-title, .assign-card .ac-label,
.team-lead-row .lead-tag, .member-row .member-label, .browse-rank {
  font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.045em;
  font-feature-settings: "tnum"; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: color-mix(in oklch, var(--accent) 28%, transparent); }
svg.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; display: block; }

:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--ring); border-radius: var(--r-sm); }

/* ─────────────────────────  Topbar  ───────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: var(--sp-4);
  padding: 0 var(--sp-6); height: 56px;
  background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; }
.logo {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(160deg, var(--accent), oklch(62% 0.18 285));
  box-shadow: inset 0 0 0 1px oklch(100% 0 0 / 0.2);
  position: relative;
}
.logo::after { content: ""; position: absolute; inset: 0; margin: auto;
  width: 8px; height: 8px; border-radius: 50%; background: var(--on-accent); }
.brand-name { font-weight: 680; letter-spacing: -0.02em; font-size: 16px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-3); }

.token-field { display: flex; align-items: center; gap: 4px;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r); padding: 3px 3px 3px 10px; }
.token-field input { border: 0; background: transparent; width: 150px; font-size: 13px; outline: none; }
.token-field input::placeholder { color: var(--ink-3); }

.health { display: flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2);
  padding: 5px 11px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--border);
  white-space: nowrap; }
.health-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); flex: none; }
.health-dot.ok { background: var(--green); box-shadow: 0 0 0 3px color-mix(in oklch, var(--green) 22%, transparent); }
.health-dot.err { background: var(--red); box-shadow: 0 0 0 3px color-mix(in oklch, var(--red) 22%, transparent); }

/* ─────────────────────────  Buttons  ───────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 32px; padding: 0 14px; border-radius: var(--r-sm); border: 1px solid transparent;
  font-size: 14px; font-weight: 590; cursor: pointer; white-space: nowrap;
  transition: background .15s var(--ease), transform .08s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease); }
.btn:active { transform: scale(0.97); }
.btn .ic { width: 15px; height: 15px; stroke-width: 2; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: color-mix(in oklch, var(--accent) 90%, black); }
.btn-primary:active { background: var(--accent-press); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--border); }
.btn-ghost:hover { background: var(--surface-2); }
.btn-danger { background: transparent; color: var(--red); border-color: color-mix(in oklch, var(--red) 32%, var(--border)); }
.btn-danger:hover { background: color-mix(in oklch, var(--red) 12%, transparent); }
.btn-sm { height: 26px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.icon-btn { display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--border);
  background: var(--surface-2); color: var(--ink-2); cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), transform .08s var(--ease); }
.icon-btn:hover { background: var(--surface); color: var(--ink); }
.icon-btn:active { transform: scale(0.94); }

/* ─────────────────────────  App shell  ───────────────────────── */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { position: sticky; top: 0; align-self: start; height: 100vh;
  display: flex; flex-direction: column; gap: 4px; padding: 16px 12px;
  background: var(--surface-2); box-shadow: 1px 0 0 var(--border); }
.sidebar-brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 14px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 8px 11px; border-radius: var(--r-sm);
  color: var(--ink-2); font-size: 14px; font-weight: 530; cursor: pointer; text-decoration: none;
  transition: background .14s var(--ease), color .14s var(--ease); }
.nav-link .ic { width: 18px; height: 18px; stroke-width: 1.7; color: var(--ink-3); transition: color .14s var(--ease); }
.nav-link:hover { background: var(--surface); color: var(--ink); }
.nav-link.active { background: color-mix(in oklch, var(--accent) 14%, transparent); color: var(--accent); font-weight: 600; }
.nav-link.active .ic { color: var(--accent); }
.nav-count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--ink-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.nav-count:empty { display: none; }
.nav-link.active .nav-count { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 30%, var(--border)); }
.sidebar-foot { display: flex; align-items: center; gap: 8px; padding: 10px 6px 4px; border-top: 1px solid var(--border); }
.sidebar-foot .health { flex: 1; background: transparent; border: 0; padding: 4px 6px; }
.sidebar .health-text { overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; padding: 28px 32px 48px; max-width: 1240px; }
.page { animation: fade .2s var(--ease); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 26px; font-weight: 690; letter-spacing: -0.028em; }
.page-sub { margin: 4px 0 0; color: var(--ink-3); font-size: 13.5px; }
.head-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.link { color: var(--accent); font-size: 13px; font-weight: 560; cursor: pointer; text-decoration: none; }
.link:hover { text-decoration: underline; }
select.sm { padding: 5px 28px 5px 11px; font-size: 13px; }
.segmented.sm { margin-bottom: 0; }
.segmented.sm .tab { min-width: 0; padding: 5px 12px; font-size: 13px; }

/* ── Avatars (deterministic tint per name) ───────────────────────────── */
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  font-size: 11.5px; font-weight: 700; letter-spacing: -0.02em; flex: none; line-height: 1;
  color: oklch(40% 0.13 var(--ah, 256));
  background: color-mix(in oklch, oklch(64% 0.16 var(--ah, 256)) 18%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(64% 0.16 var(--ah, 256)) 38%, transparent); }
.avatar-sm { width: 22px; height: 22px; border-radius: 7px; font-size: 9.5px; }
.avatar-lg { width: 44px; height: 44px; border-radius: 13px; font-size: 16px; }
.icon-avatar svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.icon-avatar.avatar-lg svg { width: 22px; height: 22px; }
/* dark avatars: forced-dark, plus auto-dark via media query (NOT auto-light) */
:root[data-theme="dark"] .avatar {
  color: oklch(90% 0.07 var(--ah, 256));
  background: color-mix(in oklch, oklch(60% 0.16 var(--ah, 256)) 26%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(70% 0.16 var(--ah, 256)) 40%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .avatar {
    color: oklch(90% 0.07 var(--ah, 256));
    background: color-mix(in oklch, oklch(60% 0.16 var(--ah, 256)) 26%, var(--surface));
    box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(70% 0.16 var(--ah, 256)) 40%, transparent); }
}
/* overlapping avatar stack (team members) */
.avatar-stack { display: inline-flex; flex-direction: row-reverse; }
.avatar-stack .avatar { margin-left: -8px; box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(64% 0.16 var(--ah,256)) 38%, transparent), 0 0 0 2px var(--surface); }
.avatar-stack .avatar:last-child { margin-left: 0; }
.avatar-more { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-left: -8px;
  border-radius: 7px; font-size: 10px; font-weight: 600; color: var(--ink-3);
  background: var(--surface-2); box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px var(--border); }

/* KPI cards */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.kpi { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 16px 18px; display: flex; align-items: center; gap: 14px;
  overflow: hidden; transition: box-shadow .16s var(--ease), border-color .16s var(--ease), transform .1s var(--ease); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--kc, transparent); opacity: .9; }
.kpi-ic { width: 40px; height: 40px; border-radius: 11px; flex: none; display: grid; place-items: center;
  color: var(--kc, var(--ink-3)); background: color-mix(in oklch, var(--kc, var(--gray)) 14%, transparent); }
.kpi-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.kpi-body { min-width: 0; }
.kpi-val { font-size: 28px; font-weight: 700; letter-spacing: -0.032em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi-label { font-size: 12.5px; color: var(--ink-3); margin-top: 6px; }
.kpi.accent { --kc: var(--accent); }
.kpi.warn { --kc: var(--orange); }
.kpi.good { --kc: var(--green); }
.kpi.accent .kpi-val { color: var(--accent); }
.kpi.warn .kpi-val { color: var(--orange); }
.kpi.good .kpi-val { color: var(--green); }

/* resource pills (agents / teams / plugins) */
.ov-resources { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.res-card { display: inline-flex; align-items: center; gap: 10px; padding: 9px 14px 9px 11px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow-sm);
  cursor: pointer; transition: border-color .15s var(--ease), background .15s var(--ease); }
.res-card:hover { border-color: var(--border-strong); background: var(--surface-2); }
.res-ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--surface-2); color: var(--ink-2); }
.res-ic svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.res-val { font-size: 15px; font-weight: 680; letter-spacing: -0.01em; }
.res-label { font-size: 13px; color: var(--ink-3); }

.ov-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.ov-card-head { display: flex; align-items: center; justify-content: space-between; padding: 11px 15px; border-bottom: 1px solid var(--border); }
.ov-card-head h2 { font-size: 13px; font-weight: 600; }
.ov-list { padding: 5px; display: flex; flex-direction: column; }
.ov-row { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: var(--r-sm); cursor: pointer;
  transition: background .12s var(--ease); }
.ov-row:hover { background: var(--surface-2); }
.ov-row .ov-main { flex: 1; min-width: 0; }
.ov-row .ov-title { font-weight: 540; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-row .ov-sub { font-size: 11px; color: var(--ink-3); margin-top: 1px; display: flex; align-items: center; gap: 5px; }
.ov-row .ov-when { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.ov-empty { padding: 20px 24px; text-align: center; color: var(--ink-3); font-size: 12.5px; }

/* Kanban board — vertical status columns; scroll horizontally, roomy cards */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 1fr);
  gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 10px; }
.board-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg);
  display: flex; flex-direction: column; min-width: 0; min-height: 120px; max-height: calc(100vh - 210px); }
.board-col-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; position: sticky; top: 0; z-index: 1;
  background: color-mix(in oklch, var(--surface-2) 86%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border); border-radius: var(--r-lg) var(--r-lg) 0 0; }
.board-col-head .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--gray));
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--c, var(--gray)) 20%, transparent); flex: none; }
.board-col-head h3 { font-size: 12px; font-weight: 650; letter-spacing: 0.005em; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.board-col-head .count { margin-left: auto; font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; min-width: 22px; text-align: center; flex: none; }
.board-col-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; }
.task-card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 11px 12px 11px 14px; cursor: pointer;
  transition: transform .1s var(--ease), box-shadow .15s var(--ease), border-color .15s var(--ease); }
.task-card::before { content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--c, var(--gray)); opacity: .85; }
.task-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); border-color: var(--border-strong); }
.task-card-title { font-weight: 590; font-size: 13px; line-height: 1.32; overflow: hidden;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.task-card-meta { display: flex; align-items: center; gap: 6px; margin-top: 9px; flex-wrap: wrap; }
.task-card-meta .tc-assignee { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ink-2);
  min-width: 0; }
.task-card-meta .tc-assignee span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card-meta .tc-round { margin-left: auto; font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  font-variant-numeric: tabular-nums; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 7px; flex: none; }
.task-card-actions { display: flex; gap: 6px; margin-top: 10px; }
.task-card-actions .btn { flex: 1; }
.board-col-empty { color: var(--ink-3); font-size: 12px; padding: 14px 6px; text-align: center; }

/* rich card internals */
.tc-head { display: flex; align-items: flex-start; gap: 8px; }
.tc-head .task-card-title { flex: 1; min-width: 0; }
.tc-head .tc-live { margin-top: 2px; flex: none; }
.tc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.tc-report { display: flex; align-items: flex-start; gap: 6px; margin-top: 9px; font-size: 12px;
  color: var(--ink-2); line-height: 1.4; }
.tc-report .ic { width: 13px; height: 13px; color: var(--ink-3); flex: none; margin-top: 1px; }
.tc-report span { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tc-context { margin-top: 9px; font-size: 12px; color: var(--ink-3); line-height: 1.4;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

/* live indicator */
.tc-live { display: inline-flex; align-items: center; gap: 5px; margin-left: auto; font-size: 10.5px; font-weight: 650;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--blue); }
.tc-live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--blue) 22%, transparent); animation: pulse 1.4s var(--ease) infinite; }

/* repo / branch chip */
.tc-repo { display: flex; align-items: center; gap: 6px; margin-top: 9px; font-size: 11px; color: var(--ink-2); min-width: 0; }
.tc-repo .ic { width: 13px; height: 13px; stroke-width: 1.8; color: var(--ink-3); flex: none; }
.tc-repo-name { color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-branch { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; max-width: 60%; }

/* progress + age footer */
.task-card-foot { display: flex; align-items: center; gap: 10px; margin-top: 11px; }
.tc-progress { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 0; }
.tc-progress-track { flex: 1; height: 5px; border-radius: 999px; background: var(--surface-inset);
  overflow: hidden; min-width: 28px; }
.tc-progress-track span { display: block; height: 100%; border-radius: 999px;
  background: var(--c, var(--accent)); transition: width .3s var(--ease-out); }
.tc-progress.is-done .tc-progress-track span { background: var(--green); }
.tc-progress.is-failed .tc-progress-track span { background: var(--red); }
.tc-progress-label { font-family: var(--mono); font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  flex: none; font-variant-numeric: tabular-nums; }
.tc-age { font-size: 11px; color: var(--ink-3); white-space: nowrap; flex: none; }

/* list-view cells reusing the same vocabulary */
.cell-assignee { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--ink-2); }
.cell-repo { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 11.5px; color: var(--ink-2); }
.cell-repo .ic { width: 13px; height: 13px; stroke-width: 1.8; color: var(--ink-3); }
.tasks-table .tc-progress { max-width: 130px; }

/* ── Board: horizontal swimlanes of rich rows ────────────────────────── */
.board-lanes { display: flex; flex-direction: column; gap: 18px; }
.lane-head { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; padding: 0 2px; }
.lane-head .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--c, var(--gray)); flex: none;
  box-shadow: 0 0 0 3px color-mix(in oklch, var(--c, var(--gray)) 20%, transparent); }
.lane-head h3 { font-size: 13px; font-weight: 660; letter-spacing: -0.01em; }
.lane-head .count { font-size: 11px; font-weight: 600; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 8px; min-width: 22px; text-align: center; }
.lane-body { display: flex; flex-direction: column; gap: 8px; }
.lane-empty { font-size: 12.5px; color: var(--ink-3); padding: 11px 14px; text-align: center;
  border: 1px dashed var(--border); border-radius: var(--r); }

.task-row { position: relative; display: flex; align-items: center; gap: 18px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 13px 16px 13px 18px; cursor: pointer;
  transition: box-shadow .15s var(--ease), border-color .15s var(--ease), transform .08s var(--ease); }
.task-row::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--c, var(--gray)); }
.task-row:hover { box-shadow: var(--shadow-md); border-color: var(--border-strong); transform: translateY(-1px); }
.tr-main { flex: 1; min-width: 0; }
.tr-top { display: flex; align-items: center; gap: 9px; }
.tr-title { font-weight: 600; font-size: 14px; letter-spacing: -0.01em;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.tr-report { display: flex; align-items: center; gap: 6px; margin-top: 4px; font-size: 12.5px; color: var(--ink-2); min-width: 0; }
.tr-report .ic { width: 13px; height: 13px; color: var(--ink-3); flex: none; }
.tr-report span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-context { margin-top: 4px; font-size: 12.5px; color: var(--ink-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-meta { display: flex; align-items: center; gap: 10px; margin-top: 9px; flex-wrap: wrap; }
.tr-meta .tc-repo { margin-top: 0; }
.tr-blocked { font-size: 10px; font-weight: 680; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--orange); background: color-mix(in oklch, var(--orange) 13%, transparent);
  border-radius: 999px; padding: 1px 7px; flex: none; }
.tr-side { display: flex; align-items: center; gap: 18px; flex: none; }
.tr-progress { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; min-width: 96px; }
.tr-progress .tc-progress { width: 100%; }
.tr-age { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.tr-actions { display: flex; gap: 6px; }
@media (max-width: 720px) {
  .task-row { flex-wrap: wrap; gap: 10px; }
  .tr-side { width: 100%; justify-content: space-between; gap: 12px; }
  .tr-progress { align-items: flex-start; }
}

/* entity grids (agents/teams/library) */
.entity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.entity-grid .cfg-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); padding: 16px; transition: box-shadow .16s var(--ease), border-color .16s var(--ease), transform .1s var(--ease); }
.entity-grid .cfg-item[role="button"]:hover { background: var(--surface); box-shadow: var(--shadow-md);
  border-color: var(--border-strong); transform: translateY(-1px); }

/* rich agent / team cards */
.cfg-card-head { display: flex; align-items: center; gap: 12px; }
.cfg-card-titles { min-width: 0; flex: 1; }
.cfg-title { font-size: 15px; font-weight: 640; letter-spacing: -0.01em; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cfg-card-sub { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.engine-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11px; font-weight: 580;
  padding: 2px 9px 2px 7px; border-radius: 999px; --ec: var(--gray);
  color: var(--ec); background: color-mix(in oklch, var(--ec) 13%, transparent);
  border: 1px solid color-mix(in oklch, var(--ec) 26%, transparent); }
.engine-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--ec); }
.engine-badge.eng-claude-code { --ec: var(--orange); }
.engine-badge.eng-codex { --ec: var(--indigo); }
.cfg-desc { font-size: 13px; color: var(--ink-2); margin-top: 12px; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cfg-desc.cfg-mono { font-family: var(--mono); font-size: 12px; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm);
  padding: 7px 10px; word-break: break-all; }
/* library item badges (mcp type / skill source / plugin state) */
.lib-badge { display: inline-flex; align-items: center; gap: 5px; margin-top: 5px; font-size: 11px; font-weight: 580;
  padding: 2px 9px 2px 7px; border-radius: 999px; --bc: var(--gray);
  color: var(--bc); background: color-mix(in oklch, var(--bc) 13%, transparent);
  border: 1px solid color-mix(in oklch, var(--bc) 26%, transparent); }
.lib-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--bc); }
.lib-badge.b-stdio { --bc: var(--indigo); }
.lib-badge.b-http { --bc: var(--blue); }
.lib-badge.b-sse { --bc: var(--accent); }
.lib-badge.b-self { --bc: var(--green); }
.lib-badge.b-host { --bc: var(--gray); }
.lib-badge.b-enabled { --bc: var(--green); }
.cfg-caps { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; padding-top: 13px; border-top: 1px solid var(--border); }
.cfg-caps:empty { display: none; }
.cap { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 540; color: var(--ink-2);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 3px 9px; }
.cap svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; color: var(--ink-3); }
.cap b { font-weight: 680; color: var(--ink); }
.cap.cap-secret { color: var(--orange); border-color: color-mix(in oklch, var(--orange) 30%, var(--border));
  background: color-mix(in oklch, var(--orange) 10%, transparent); }
.cap.cap-secret svg, .cap.cap-secret b { color: var(--orange); }

/* team card extras */
.team-lead-row { display: flex; align-items: center; gap: 8px; margin-top: 13px; }
.team-lead-row .lead-tag { font-size: 10px; font-weight: 680; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3); }
.team-lead-row .lead-name { font-size: 13px; font-weight: 560; }
.member-row { display: flex; align-items: center; gap: 10px; margin-top: 12px; }
.member-row .member-label { font-size: 10px; font-weight: 600; color: var(--ink-3); }

/* ── Team cards: wider grid ─────────────────────────────────────────────────── */
#cfg-teams.entity-grid { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }

/* ── Team status badge ──────────────────────────────────────────────────────── */
.team-status {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 660; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
  background: color-mix(in oklch, var(--ink-3) 14%, transparent);
  color: var(--ink-3);
  margin-left: auto; flex-shrink: 0; white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}
.team-status.is-active {
  background: color-mix(in oklch, var(--accent) 18%, transparent);
  color: var(--accent);
  animation: teamStatusPulse 2s var(--ease) infinite;
}
@keyframes teamStatusPulse { 0%,100% { opacity: 1; } 50% { opacity: 0.65; } }

/* ── Current-task block ─────────────────────────────────────────────────────── */
.team-cur {
  display: flex; align-items: center; gap: 8px; margin-top: 10px;
  min-height: 22px;
}
.team-cur-title {
  font-size: 12.5px; color: var(--ink-2); flex: 1; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.team-cur:has(.badge) .team-cur-title { color: var(--ink); font-weight: 540; }

/* ── Member rings (tmember wrapper) ─────────────────────────────────────────── */
.tmember-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.tmember {
  display: inline-flex; border-radius: 50%; flex-shrink: 0;
  outline: 2px solid transparent; outline-offset: 2px;
  transition: outline-color 0.18s var(--ease);
}
.tmember.is-idle   { outline-color: var(--border-strong); }
.tmember.is-working {
  outline-color: var(--accent);
  animation: tmemberPulse 1.2s var(--ease) infinite;
}
.tmember.is-done   { outline-color: var(--green); }
.tmember.is-failed { outline-color: var(--red); }
.tmember.is-rate_limited,
.tmember.is-waiting { outline-color: var(--orange); }
@keyframes tmemberPulse { 0%,100% { outline-color: var(--accent); } 50% { outline-color: color-mix(in oklch, var(--accent) 40%, transparent); } }

.lib-head { display: flex; align-items: center; justify-content: space-between; margin: 4px 0 14px; }
.lib-head h2 { font-size: 15px; font-weight: 620; }
.lib-head-actions { display: flex; gap: 8px; align-items: center; }

.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: start; }
.setting-card { padding: 18px; }
.setting-card h2 { font-size: 15px; font-weight: 620; margin-bottom: 6px; }
.muted-p { color: var(--ink-3); font-size: 13px; margin: 0 0 12px; }
.muted-p code { font-family: var(--mono); font-size: 12px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.token-field.wide input { width: 100%; }
.seg-inline { display: flex; gap: 6px; }
.seg-inline .btn.active { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.health-detail { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.health-detail .hd-row { display: flex; justify-content: space-between; gap: 12px; }
.health-detail .hd-row .k { color: var(--ink-3); }

/* segmented control */
.segmented { position: relative; display: inline-flex; gap: 2px; padding: 3px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  margin-bottom: var(--sp-6); }
.segmented .tab { position: relative; z-index: 1; flex: 1 1 0; min-width: 96px; text-align: center;
  border: 0; background: transparent;
  color: var(--ink-2); font-size: 13.5px; font-weight: 590; padding: 6px 18px;
  border-radius: 8px; cursor: pointer; transition: color .2s var(--ease); }
.segmented .tab.active { color: var(--ink); }
/* equal-width segments -> the thumb only translates (transform), never resizes */
.segmented-thumb { position: absolute; top: 3px; left: 3px; height: calc(100% - 6px);
  background: var(--surface); border-radius: 8px; box-shadow: var(--shadow-sm);
  transition: transform .26s var(--ease-out); z-index: 0; }

/* toolbar */
.toolbar { display: flex; align-items: center; gap: var(--sp-3); margin-bottom: var(--sp-4); flex-wrap: wrap; }
.toolbar-left { display: flex; align-items: center; gap: var(--sp-2); }
.toolbar-right { margin-left: auto; display: flex; align-items: center; gap: var(--sp-4); }
.status-line { font-size: 12.5px; color: var(--ink-3); }

.select-field { position: relative; display: inline-flex; align-items: center; }
.select-label { position: absolute; left: 12px; font-size: 11px; color: var(--ink-3);
  pointer-events: none; transform: translateY(-15px); display: none; }
select {
  appearance: none; -webkit-appearance: none; font-size: 14px;
  background: var(--surface-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238a8a8e' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 10px center;
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 30px 7px 12px;
  color: var(--ink); cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
select:hover { border-color: var(--border-strong); }
select:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }

/* iOS switch */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 38px; height: 23px; border-radius: 999px; background: var(--surface-inset);
  border: 1px solid var(--border); position: relative; transition: background .2s var(--ease); }
.switch-thumb { position: absolute; top: 1.5px; left: 1.5px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: var(--shadow-sm); transition: transform .22s var(--ease-out); }
.switch input:checked + .switch-track { background: var(--green); border-color: transparent; }
.switch input:checked + .switch-track .switch-thumb { transform: translateX(15px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--ring); }

/* ─────────────────────────  Cards / table  ───────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm); }
.table-card { overflow: hidden; }
.table-wrap { overflow-x: auto; }
.tasks-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tasks-table thead th { text-align: left; font-weight: 530; font-size: 11.5px; letter-spacing: 0.02em;
  text-transform: uppercase; color: var(--ink-3); padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: var(--surface); position: sticky; top: 0; }
.tasks-table tbody td { padding: 13px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tasks-table tbody tr { cursor: pointer; transition: background .12s var(--ease); }
.tasks-table tbody tr:hover { background: var(--surface-2); }
.tasks-table tbody tr:last-child td { border-bottom: 0; }
.col-round, .col-updated { white-space: nowrap; }
.cell-title { font-weight: 590; color: var(--ink); }
.cell-title .task-id { display: block; font-family: var(--mono); font-size: 11px; color: var(--ink-3);
  font-weight: 400; margin-top: 2px; }
.cell-muted { color: var(--ink-2); }
.kind-tag { font-family: var(--mono); font-size: 11px; color: var(--ink-2); background: var(--surface-2);
  border: 1px solid var(--border); padding: 2px 8px; border-radius: 6px; letter-spacing: -0.01em; }

/* ─────────────────────────  Badges (status)  ───────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 560;
  padding: 3px 10px 3px 8px; border-radius: 999px; line-height: 1.4; white-space: nowrap;
  --c: var(--gray); color: var(--c); background: color-mix(in oklch, var(--c) 14%, transparent); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); flex: none; }
.badge.s-done { --c: var(--green); }
.badge.s-running { --c: var(--blue); }
.badge.s-planning, .badge.s-review { --c: var(--indigo); }
.badge.s-waiting_input { --c: var(--orange); }
.badge.s-rate_limited { --c: var(--yellow); }
.badge.s-failed { --c: var(--red); }
.badge.s-queued, .badge.s-cancelled { --c: var(--gray); }
.badge.s-running::before, .badge.s-planning::before { animation: pulse 1.4s var(--ease) infinite; }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ─────────────────────────  Empty / skeleton  ───────────────────────── */
.empty-row td { padding: 0 !important; border: 0 !important; }
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 56px 24px; color: var(--ink-2); }
.empty-state .empty-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-3); margin-bottom: 6px; }
.empty-state .empty-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.empty-state h3 { font-size: 15px; color: var(--ink); }
.empty-state p { margin: 0; font-size: 13.5px; color: var(--ink-3); max-width: 320px; }
.empty-state .btn { margin-top: 10px; }

.skel { display: block; height: 12px; border-radius: 6px;
  background: linear-gradient(100deg, var(--surface-2) 30%, var(--surface-inset) 50%, var(--surface-2) 70%);
  background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ─────────────────────────  Config panels  ───────────────────────── */
.config-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--sp-4); }
.panel-head { padding: 11px 14px 11px 18px; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.panel-head h2 { font-size: 14px; font-weight: 620; }
.panel-sub { font-weight: 400; color: var(--ink-3); font-size: 12px; }
.cfg-item[role="button"] { cursor: pointer; }
.cfg-item[role="button"]:focus-visible { box-shadow: 0 0 0 3px var(--ring); }
.panel-body { padding: 8px; display: flex; flex-direction: column; gap: 4px; }
.cfg-item { padding: 12px 12px; border-radius: var(--r); }
.cfg-item:hover { background: var(--surface-2); }
.cfg-name { font-weight: 590; font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.cfg-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 5px; display: flex; flex-wrap: wrap;
  gap: 5px; align-items: center; }
.chip { font-size: 11.5px; font-family: var(--mono); background: var(--surface-2);
  border: 1px solid var(--border); color: var(--ink-2); padding: 2px 8px; border-radius: 6px; }
.chip.secret { color: var(--orange); border-color: color-mix(in oklch, var(--orange) 30%, var(--border));
  background: color-mix(in oklch, var(--orange) 10%, transparent); }
.problems-banner { background: color-mix(in oklch, var(--orange) 12%, var(--surface));
  border: 1px solid color-mix(in oklch, var(--orange) 30%, var(--border)); border-radius: var(--r-lg);
  padding: 14px 18px; margin-bottom: var(--sp-4); }
.problems-banner h3 { font-size: 13.5px; color: var(--orange); margin-bottom: 6px; }
.problems-banner ul { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); }

/* multi-select chips (assignment of mcps/skills/plugins/members) */
.ms { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1px solid var(--border);
  border-radius: var(--r-sm); background: var(--surface-2); max-height: 132px; overflow: auto; }
.ms-empty { color: var(--ink-3); font-size: 12.5px; padding: 10px; }
.ms-chip { display: inline-flex; align-items: center; gap: 0; cursor: pointer; }
.ms-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.ms-chip span { display: inline-flex; align-items: baseline; gap: 5px; font-size: 12.5px;
  padding: 4px 10px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface); color: var(--ink-2); transition: all .14s var(--ease); }
.ms-chip span em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.ms-chip:hover span { border-color: var(--border-strong); }
.ms-chip.on span { background: color-mix(in oklch, var(--accent) 16%, transparent);
  border-color: color-mix(in oklch, var(--accent) 40%, var(--border)); color: var(--accent); }
.ms-chip.on span em { color: color-mix(in oklch, var(--accent) 70%, var(--ink-3)); }
.ms-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--ring); }
.ms-chip.on span::before { content: "✓ "; font-weight: 700; }

/* picker tools row: "tick to assign" + New / Browse */
.ms-group .ms { border-radius: var(--r-sm) var(--r-sm) 0 0; border-bottom: 0; }
.ms-tools { display: flex; align-items: center; gap: 10px; padding: 7px 9px;
  border: 1px solid var(--border); border-top: 1px dashed var(--border);
  border-radius: 0 0 var(--r-sm) var(--r-sm); background: var(--surface-2); }
.ms-hint { font-size: 11.5px; color: var(--ink-3); }
.ms-add { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px;
  font-weight: 560; color: var(--accent); background: transparent;
  border: 1px solid color-mix(in oklch, var(--accent) 30%, var(--border)); border-radius: var(--r-sm);
  padding: 4px 10px; cursor: pointer; transition: background .14s var(--ease); }
.ms-add:hover { background: color-mix(in oklch, var(--accent) 12%, transparent); }
.ms-add .ic { width: 13px; height: 13px; stroke-width: 2; }
.ms-empty { color: var(--ink-3); font-size: 12.5px; padding: 8px; width: 100%; }

/* modal stacking: team-drawer 60 < entity 70 < marketplace 85 < quick-create 90 */
#plugins-modal { z-index: 85; }
#quick-modal { z-index: 90; }

/* plugin marketplace browser */
.modal-lg { max-width: 720px; }
.browse-bar { display: flex; gap: 8px; margin-bottom: 12px; }
.browse-bar input[type="search"] { flex: 1; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 12px; outline: none; }
.browse-bar input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
.browse-list { display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow: auto;
  margin: 0 -4px; padding: 0 4px; }
.browse-row { display: flex; align-items: center; gap: 12px; padding: 11px 12px;
  border: 1px solid var(--border); border-radius: var(--r); background: var(--surface); }
.browse-row:hover { background: var(--surface-2); }
.browse-rank { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums;
  min-width: 22px; text-align: right; }
.browse-main { flex: 1; min-width: 0; }
.browse-name { font-weight: 590; font-size: 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.browse-installs { font-size: 11.5px; color: var(--green); font-weight: 560; }
.browse-desc { font-size: 12.5px; color: var(--ink-2); margin-top: 3px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.browse-action { flex: none; }

/* team detail popup (centered, large, FIXED size so it doesn't resize per tab) */
.modal.modal-xl { max-width: 1120px; width: 100%; height: min(84vh, 800px); max-height: 84vh;
  display: flex; flex-direction: column; overflow: hidden; }
/* the agent/team edit form must stack ABOVE the team popup (both are modals) */
#entity-modal { z-index: 70; }
.modal-xl > #team-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
/* header + sub-tab row stay fixed; only the active tab panel scrolls */
.modal-xl .detail-head { flex: none; position: static; background: var(--surface);
  backdrop-filter: none; -webkit-backdrop-filter: none; border-radius: var(--r-xl) var(--r-xl) 0 0; }
.modal-xl .team-subtabs-row { flex: none; }
.modal-xl .team-sub { flex: 1; min-height: 0; overflow-y: auto; }
.modal-xl .team-sub .detail-section:last-child { border-bottom: 0; }
/* project detail popup */
.modal-xl > #project-content { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.modal-xl .detail-head { flex: none; }
.project-sub { flex: 1; min-height: 0; overflow-y: auto; }
.project-sub .detail-section:last-child { border-bottom: 0; }
.project-goal { font-size: 14px; line-height: 1.55; color: var(--ink); white-space: pre-wrap; }

/* team detail graph */
.check-row { margin-top: 4px; }
.icon-btn.xs { width: 22px; height: 22px; border-radius: 6px; font-size: 12px; }
/* manage tab — error banner */
.manage-error { background: color-mix(in oklch, var(--red) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--red) 32%, var(--border)); color: var(--red);
  padding: 10px 14px; border-radius: var(--r-sm); margin: 14px 22px 0; font-size: 13px; line-height: 1.45; }

/* manage tab — top two-column layout (members | settings+danger) */
.manage-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr);
  align-items: start; gap: 0; }
.manage-grid > .manage-members-card { border-right: 1px solid var(--border); }
.manage-side { display: flex; flex-direction: column; min-width: 0; }
.manage-side-card + .manage-side-card { border-top: 0; }
@media (max-width: 760px) {
  .manage-grid { grid-template-columns: 1fr; }
  .manage-grid > .manage-members-card { border-right: 0; }
}

/* manage tab — member roster list */
.team-roster { display: flex; flex-direction: column; }
.roster-row { display: flex; align-items: center; gap: 10px; min-height: 52px;
  padding: 6px 8px; border-radius: var(--r-sm);
  border-top: 1px solid var(--border); transition: background-color .14s var(--ease); }
.roster-row:first-child { border-top: 0; }
.roster-row:hover { background: var(--surface-2); }
.roster-id { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0;
  cursor: pointer; border-radius: var(--r-sm); padding: 2px; }
.roster-id:focus-visible { box-shadow: 0 0 0 3px var(--ring); }
.roster-text { min-width: 0; }
.roster-name { font-weight: 600; font-size: 14px; display: flex; gap: 7px; align-items: center;
  flex-wrap: wrap; line-height: 1.25; }
.roster-only { font-size: 9px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 1px 6px; }
.roster-engine { font-size: 11.5px; color: var(--ink-3); margin-top: 2px;
  display: inline-flex; align-items: center; gap: 6px; }
.roster-engine::before { content: ""; width: 5px; height: 5px; border-radius: 50%;
  background: var(--re-ec, var(--gray)); }
.roster-row[data-engine="claude-code"] { --re-ec: var(--orange); }
.roster-row[data-engine="codex"] { --re-ec: var(--indigo); }
.roster-actions { display: flex; align-items: center; gap: 5px; flex-shrink: 0; }
.roster-lead-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 10.5px;
  font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: var(--on-accent);
  background: var(--grad-brand); border-radius: 999px; padding: 4px 11px; box-shadow: var(--shadow-sm); }

/* roster add affordance */
.roster-add { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap;
  margin-top: 8px; padding-top: 14px; border-top: 1px solid var(--border); }
.roster-add-field { display: flex; flex-direction: column; gap: 5px; flex: 1; min-width: 200px; }
.roster-add-label { font-size: 12px; font-weight: 600; color: var(--ink-2); }
.roster-add-field select { width: 100%; }
.roster-add-none { font-size: 13px; color: var(--ink-3); padding: 7px 0; }
.roster-empty { padding: 14px 8px; }
.roster-empty-line { font-size: 13px; color: var(--ink-3); line-height: 1.5; }

/* manage tab — settings section */
.manage-settings-grid { display: flex; flex-direction: column; gap: 10px; }
.manage-settings-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.manage-settings-label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); min-width: 84px; }
.manage-settings-value { font-size: 13px; color: var(--ink); }
.manage-settings-hint { margin-top: -2px; }

/* manage tab — danger zone */
.manage-danger-zone h3 { color: var(--red); }

/* manage tab — team-wide capabilities responsive grid */
.manage-capabilities-grid { display: grid; gap: 14px 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.manage-capabilities-grid .field { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .roster-row { transition: none; }
}

/* team-wide assignment summary cards */
.team-assign-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
@media (max-width: 720px) { .team-assign-grid { grid-template-columns: 1fr; } }
.assign-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); padding: 12px 14px; }
.assign-card .ac-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--ink-3); margin-bottom: 8px; }
.assign-card .ac-chips { display: flex; flex-wrap: wrap; gap: 5px; }

/* team composition (Overview side card) */
.td-lead { display: flex; align-items: center; gap: 12px; }
.td-lead-name { font-weight: 600; font-size: 14px; }
.cap-row { display: flex; flex-wrap: wrap; gap: 6px; }

/* team sub-tabs + mini board + activity */
.team-subtabs { width: 100%; }
.team-mini { } /* spacing handled by sections */
.team-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 720px) { .team-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.tb-col { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); }
.tb-col-head { display: flex; align-items: center; gap: 7px; padding: 9px 11px; font-size: 12px; font-weight: 600; }
.tb-col-head .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--c, var(--gray)); }
.tb-col-head .count { margin-left: auto; font-size: 10.5px; color: var(--ink-3); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 6px; }
.tb-col-body { padding: 0 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.tb-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px; cursor: pointer; transition: box-shadow .12s var(--ease); }
.tb-card:hover { box-shadow: var(--shadow-sm); }
.tb-card-title { font-size: 12.5px; font-weight: 560; line-height: 1.3; }
.tb-card-meta { display: flex; align-items: center; gap: 7px; margin-top: 6px; }
.board-col-empty { color: var(--ink-3); font-size: 11.5px; padding: 4px 2px; }

.act-item { border-bottom: 1px solid var(--border); }
.act-item:last-child { border-bottom: 0; }
.ttl-row [data-expand] svg { transition: transform .15s var(--ease); }
.ttl-row [data-expand].open svg { transform: rotate(90deg); }
@media (prefers-reduced-motion: reduce) { .ttl-row [data-expand] svg { transition: none; } }
.act-runs { padding: 4px 6px 12px 14px; display: flex; flex-direction: column; gap: 6px; }
.run-line { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.run-agent { font-weight: 590; font-family: var(--mono); font-size: 11.5px; }
.run-sum { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─────────────────────────  Modal  ───────────────────────── */
.modal-backdrop, .drawer-backdrop { position: fixed; inset: 0; z-index: 60;
  background: oklch(0% 0 0 / 0.32); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; animation: fade .18s var(--ease); }
.modal-backdrop { align-items: center; justify-content: center; padding: 24px; }
.modal { width: 100%; max-width: 560px; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg); max-height: 90vh; overflow: auto;
  animation: rise .26s var(--ease-out); }
.modal-head { display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 12px; }
.modal-head h2 { font-size: 18px; }
.modal-body { padding: 4px 20px 20px; display: flex; flex-direction: column; gap: var(--sp-4); }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.field { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.field-label { font-size: 12px; font-weight: 560; color: var(--ink-2); }
.field-row { display: flex; gap: var(--sp-3); }
.field-narrow { max-width: 120px; }
.field select { width: 100%; }
input:not([type]), input[type="text"], input[type="password"], input[type="number"], textarea, .field select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border);
  border-radius: var(--r-sm); padding: 8px 11px; color: var(--ink); outline: none;
  -webkit-text-fill-color: var(--ink);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
input:disabled, textarea:disabled, .field select:disabled { background: var(--surface-inset);
  color: var(--ink-3); -webkit-text-fill-color: var(--ink-3); cursor: not-allowed; opacity: 1; }
input:focus-visible, textarea:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ring); }
input::placeholder, textarea::placeholder { color: var(--ink-3); }
textarea { resize: vertical; line-height: 1.45; }
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px 14px; padding-top: 4px; }
.check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { accent-color: var(--accent); width: 15px; height: 15px; }
.form-error { background: color-mix(in oklch, var(--red) 12%, transparent);
  border: 1px solid color-mix(in oklch, var(--red) 32%, var(--border)); color: var(--red);
  padding: 9px 12px; border-radius: var(--r-sm); font-size: 13px; }

/* grouped form sections (agent / team modals) */
.form-section { display: flex; flex-direction: column; gap: var(--sp-4); }
.form-section + .form-section { margin-top: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.form-section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase;
  color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.form-section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.modal.modal-form { max-width: 620px; }
.ms { max-height: 150px; }

/* ─────────────────────────  Drawer (task detail)  ───────────────────────── */
.drawer-backdrop { justify-content: flex-end; }
.drawer { width: min(560px, 94vw); height: 100%; background: var(--bg);
  border-left: 1px solid var(--border); box-shadow: var(--shadow-lg); overflow-y: auto;
  animation: slidein .3s var(--ease-out); }
#detail-content { padding: 0 0 32px; }
.detail-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: flex-start;
  justify-content: space-between; gap: 12px; padding: 18px 22px; background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border); }
.detail-head h2 { font-size: 18px; line-height: 1.25; }
.detail-sub { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.detail-section { padding: 16px 22px; border-bottom: 1px solid var(--border); }
.detail-section h3 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em;
  color: var(--ink-3); font-weight: 600; margin-bottom: 12px; }
.meta-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; }
.meta-grid .k { font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
.meta-grid .v { font-size: 14px; font-weight: 530; }

.waitpoint-box { background: color-mix(in oklch, var(--orange) 12%, var(--surface));
  border: 1px solid color-mix(in oklch, var(--orange) 32%, var(--border)); border-radius: var(--r);
  padding: 14px 16px; }
.wp-title { font-weight: 620; color: var(--orange); margin-bottom: 4px; }

.control-row { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; }
.control-row textarea { flex: 1; min-width: 200px; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 8px; }

.console { font-family: var(--mono); font-size: 12px; line-height: 1.55; background: var(--surface-inset);
  color: oklch(30% 0.01 260); border: 1px solid var(--border); border-radius: var(--r);
  padding: 12px 14px; height: 280px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
:root[data-theme="dark"] .console, :root:not([data-theme="light"]) .console { color: oklch(82% 0.012 260); }
.console-status { font-size: 12px; color: var(--ink-3); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.run-log { font-family: var(--mono); font-size: 11.5px; line-height: 1.5; background: var(--surface-inset);
  color: oklch(30% 0.01 260); border: 1px solid var(--border); border-radius: var(--r);
  padding: 10px 12px; margin-top: 10px; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }
:root[data-theme="dark"] .run-log, :root:not([data-theme="light"]) .run-log { color: oklch(82% 0.012 260); }
.report-log-btn { padding: 2px 8px; font-size: 11px; }
.usage-totals { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 14px; font-size: 13px; color: var(--ink-2); }
.usage-totals b { color: var(--ink-1); font-size: 16px; font-variant-numeric: tabular-nums; }
.usage-totals .u-warn b, .usage-totals .u-warn { color: var(--orange); }
.usage-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.usage-table th { text-align: left; color: var(--ink-3); font-weight: 600; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.usage-table td { padding: 7px 10px; border-bottom: 1px solid var(--border-subtle, var(--border)); }
.usage-table td.num, .usage-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.usage-table td.u-warn { color: var(--orange); font-weight: 600; }
.mcp-test-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.mcp-test-result { font-size: 12.5px; }
.mcp-test-result.test-ok { color: var(--green); }
.mcp-test-result.test-fail { color: var(--red); }
.task-search { min-width: 180px; }
.tasks-more { display: flex; justify-content: center; margin-top: 16px; }
/* Setup / onboarding */
.setup-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); }
.setup-card { padding: 18px 20px; }
.setup-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.setup-head h2 { margin: 0; }
.setup-pill { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.pill-absent { background: color-mix(in oklch, var(--orange) 16%, transparent); color: var(--orange); }
.pill-present { background: var(--surface-inset); color: var(--ink-3); }
.pill-ok { background: color-mix(in oklch, var(--green) 18%, transparent); color: var(--green); }
.pill-fail { background: color-mix(in oklch, var(--red) 16%, transparent); color: var(--red); }
.setup-actions { display: flex; align-items: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }
.setup-result { font-size: 12.5px; }
.setup-result.ok { color: var(--green); }
.setup-result.fail { color: var(--red); }
.setup-how { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.setup-how summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 600; }
.setup-how-body { margin-top: 12px; }
.setup-cmd-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.setup-cmd { background: var(--surface-inset); padding: 4px 8px; border-radius: 6px; font-size: 12px; }
.nav-warn { background: var(--orange); color: #fff; }
.console .ev { color: var(--accent); font-weight: 600; }
.console .ev-wp { color: var(--orange); font-weight: 600; }
.console .ev-rl { color: var(--yellow); font-weight: 600; }

.timeline-item { border: 1px solid var(--border); border-radius: var(--r); margin-bottom: 8px; overflow: hidden; }
.timeline-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer;
  transition: background .12s var(--ease); }
.timeline-head:hover { background: var(--surface-2); }
.ti-agent { font-weight: 590; font-size: 13.5px; }
.ti-round { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.ti-summary { color: var(--ink-2); font-size: 13px; margin-left: auto; text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 55%; }
.timeline-detail { display: none; padding: 0 12px 12px; }
.timeline-detail.open { display: block; }
.timeline-detail pre { background: var(--surface-inset); border-radius: var(--r-sm); padding: 10px;
  font-size: 11.5px; overflow: auto; margin: 0; white-space: pre-wrap; word-break: break-word; }

/* ── Handover reports (task detail) ──────────────────────────────────── */
.handover-callout { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r);
  border-left: 3px solid var(--accent); padding: 13px 15px; }
.ho-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ho-head .report-agent { font-weight: 620; font-size: 13px; }
.ho-summary { font-size: 14px; font-weight: 560; line-height: 1.4; margin-bottom: 4px; }

.report-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r);
  box-shadow: var(--shadow-sm); padding: 13px 15px; margin-bottom: 10px; }
.report-card:last-child { margin-bottom: 0; }
.report-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.report-agent { font-weight: 600; font-size: 13px; }
.report-round { font-family: var(--mono); font-size: 11px; color: var(--ink-3); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; }
.report-dur { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.report-summary { font-size: 13.5px; font-weight: 560; line-height: 1.4; margin-bottom: 10px; }
.report-field { margin-top: 9px; }
.report-field .rf-label { display: block; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.05em;
  font-size: 10px; font-weight: 600; color: var(--ink-3); margin-bottom: 4px; }
.report-field .rf-body { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap;
  word-break: break-word; max-height: 220px; overflow: auto; }
.report-field.rf-blockers { background: color-mix(in oklch, var(--orange) 9%, transparent);
  border: 1px solid color-mix(in oklch, var(--orange) 26%, var(--border)); border-radius: var(--r-sm);
  padding: 8px 11px; margin-left: -2px; }
.report-field.rf-blockers .rf-label { color: var(--orange); }
.report-field.rf-blockers .rf-body { color: var(--ink); }
.report-artifacts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 11px; }

/* disposition / liveness chips on report cards */
.disp-chip { font-size: 11px; font-weight: 560; line-height: 1; padding: 3px 8px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--ink-2); background: var(--surface-2); white-space: nowrap; }
.disp-chip.disp-done { color: var(--green); border-color: color-mix(in oklch, var(--green) 30%, var(--border));
  background: color-mix(in oklch, var(--green) 10%, transparent); }
.disp-chip.disp-continue { color: var(--blue); border-color: color-mix(in oklch, var(--blue) 30%, var(--border));
  background: color-mix(in oklch, var(--blue) 10%, transparent); }
.disp-chip.disp-review { color: var(--orange); border-color: color-mix(in oklch, var(--orange) 30%, var(--border));
  background: color-mix(in oklch, var(--orange) 10%, transparent); }
.disp-chip.disp-blocked { color: var(--red); border-color: color-mix(in oklch, var(--red) 30%, var(--border));
  background: color-mix(in oklch, var(--red) 10%, transparent); }
.disp-chip.disp-liveness { font-family: var(--mono); font-size: 10px; font-weight: 600; text-transform: lowercase;
  color: var(--ink-3); }

/* parent-task back-link in the detail head */
.parent-link { display: inline-block; font-size: 11.5px; font-weight: 540; color: var(--ink-3);
  margin-bottom: 4px; text-decoration: none; }
.parent-link:hover { color: var(--accent); }

/* continuation summary (collapsible notepad) */
.cont-summary > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.cont-summary > summary::-webkit-details-marker { display: none; }
.cont-summary > summary h3 { display: inline; margin: 0; }
.cont-summary > summary::before { content: "▸"; color: var(--ink-3); font-size: 11px; }
.cont-summary[open] > summary::before { content: "▾"; }
.cont-summary-body { font-size: 12.5px; line-height: 1.5; color: var(--ink-2); white-space: pre-wrap;
  word-break: break-word; margin-top: 9px; max-height: 320px; overflow: auto; }

/* team-activity expanded run reports */
.run-report { padding: 8px 4px; border-top: 1px solid var(--border); }
.run-report:first-child { border-top: 0; }
.run-field { font-size: 12px; color: var(--ink-2); margin-top: 5px; line-height: 1.45; }
.run-field .rf-label { font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 9.5px; font-weight: 600; color: var(--ink-3); margin-right: 4px; }
.run-field.run-blockers { color: var(--ink); }
.run-field.run-blockers .rf-label { color: var(--orange); }
.run-report .run-sum { display: block; font-size: 12.5px; color: var(--ink-2); margin-top: 5px; white-space: normal; }

/* ── Manage task + priority + secrets ────────────────────────────────── */
.manage-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
@media (max-width: 560px) { .manage-grid { grid-template-columns: 1fr; } }

.prio-tag { font-size: 10px; font-weight: 680; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 1px 7px; border-radius: 999px; line-height: 1.5; }
.prio-tag.prio-high { color: var(--orange); background: color-mix(in oklch, var(--orange) 14%, transparent); }
.prio-tag.prio-urgent { color: var(--red); background: color-mix(in oklch, var(--red) 15%, transparent); }

.secrets-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.secret-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.secret-status { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.secret-status.is-set { background: var(--green); box-shadow: 0 0 0 3px color-mix(in oklch, var(--green) 20%, transparent); }
.secret-status.is-missing { background: var(--gray); }
.secret-name { font-family: var(--mono); font-size: 12.5px; min-width: 150px; }
.secret-ref { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-3);
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; }
.secret-ref.unused { opacity: 0.6; }
.secret-row .secret-value { flex: 1; min-width: 120px; }
.secret-row .icon-btn.xs { width: 28px; height: 28px; }
.secret-add { display: flex; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
.secret-add input { flex: 1; min-width: 120px; }
.secret-add #secret-new-name { max-width: 220px; font-family: var(--mono); }

/* ──────────────────  Scoped-variable editor  ────────────────── */
.var-editor { display: flex; flex-direction: column; gap: 8px; }
.var-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.var-row .var-key { flex: 0 0 32%; min-width: 110px; font-family: var(--mono); font-size: 12.5px; }
.var-row .var-value { flex: 1; min-width: 120px; }
.var-row .var-secret-check { flex: none; }
.var-row .icon-btn.xs { width: 28px; height: 28px; flex: none; }
.var-add { padding-top: 10px; }
.var-inherited { display: flex; flex-wrap: wrap; gap: 6px; }
.var-chip { font-family: var(--mono); font-size: 11.5px; }
.var-chip-secret { border-color: color-mix(in oklch, var(--orange, #fb923c) 45%, var(--border));
  color: color-mix(in oklch, var(--orange, #fb923c) 80%, var(--ink)); }
.var-chip .ic { vertical-align: -1px; }

/* ─────────────────────────  Toast  ───────────────────────── */
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%);
  z-index: 80; background: var(--surface); color: var(--ink); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); border-radius: 999px; padding: 10px 20px; font-size: 13.5px; font-weight: 530;
  backdrop-filter: blur(20px); animation: rise .22s var(--ease-out); }
.toast.ok { border-color: color-mix(in oklch, var(--green) 40%, var(--border)); }
.toast.ok::before { content: "✓ "; color: var(--green); font-weight: 700; }
.toast.err { border-color: color-mix(in oklch, var(--red) 40%, var(--border)); }
.toast.err::before { content: "✕ "; color: var(--red); font-weight: 700; }

/* ─────────────────────────  Motion / animations  ───────────────────────── */
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(8px) translateX(-50%); } }
@keyframes slidein { from { transform: translateX(100%); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .modal, .drawer, .toast { animation: none !important; }
}

/* ─────────────────────────  Responsive  ───────────────────────── */
@media (max-width: 720px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 460px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  /* stack as [top bar | content]; auto/1fr keeps the bar from stretching on short pages */
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-content: start; }
  /* sidebar becomes a horizontal top bar */
  .sidebar { position: sticky; top: 0; height: auto; flex-direction: row; align-items: center;
    gap: 4px; padding: 8px 10px; box-shadow: 0 1px 0 var(--border);
    overflow-x: auto; z-index: 40; backdrop-filter: saturate(180%) blur(20px); }
  .sidebar-brand { padding: 0 8px 0 4px; }
  .nav { flex-direction: row; flex: 1; gap: 2px; }
  .nav-link span:not(.nav-count) { display: none; }
  .nav-link { padding: 8px; }
  .nav-count { display: none; }
  .sidebar-foot { border-top: 0; padding: 0; }
  .sidebar-foot .health { display: none; }
  .main { padding: 20px 16px 40px; }
  .ov-cols { grid-template-columns: 1fr; }
  .field-row { flex-direction: column; }
  .field-narrow { max-width: none; }
  .btn, .icon-btn { min-height: 36px; }
  .page-head { flex-direction: column; align-items: stretch; }
}

/* ── Subscription quota card (overview) ───────────────────────────────────── */
.quota-card { margin-bottom: 16px; }
.quota-body { padding: 4px 0 2px; }
.quota-engines { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px 28px; }
.quota-engine { min-width: 0; }
.quota-eng-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.quota-na { color: var(--ink-3); font-size: 12px; }
.quota-win { margin-bottom: 12px; }
.quota-win-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 5px; }
.quota-win-label { font-size: 13px; color: var(--ink-2); }
.quota-win-pct { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.quota-bar { height: 7px; border-radius: 99px; background: var(--border); overflow: hidden; }
.quota-fill { display: block; height: 100%; border-radius: 99px; transition: width .4s ease; }
.quota-fill.q-ok { background: var(--green); }
.quota-fill.q-warn { background: var(--orange); }
.quota-fill.q-crit { background: var(--red); }
.quota-win-pct.q-ok { color: var(--green); }
.quota-win-pct.q-warn { color: var(--orange); }
.quota-win-pct.q-crit { color: var(--red); }
.quota-win-sub { font-size: 11px; color: var(--ink-3); margin-top: 3px; }
.quota-msg { color: var(--ink-3); font-size: 13px; padding: 6px 0; }
.quota-stamp { color: var(--ink-3); font-size: 11px; margin-top: 6px; text-align: right; }

/* ── Error callout + overview attention affordances (#4 UX) ────────────────── */
.error-callout { display: flex; gap: 10px; padding: 12px 14px; border-radius: 10px;
  background: color-mix(in srgb, var(--red) 9%, var(--bg)); border: 1px solid color-mix(in srgb, var(--red) 28%, transparent); }
.error-callout .ec-ic { color: var(--red); font-size: 15px; line-height: 1.4; }
.error-callout .ec-title { font-weight: 600; font-size: 13px; color: var(--red); margin-bottom: 3px; }
.error-callout .ec-body { font-size: 13px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.ov-reason { margin-top: 3px; font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-row-attn { border-left: 2px solid color-mix(in srgb, var(--orange) 60%, transparent); }
.ov-tag { display: inline-block; margin-left: 8px; padding: 1px 7px; border-radius: 99px; font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .03em; vertical-align: middle;
  color: var(--orange); background: color-mix(in srgb, var(--orange) 14%, transparent); }

/* ═══════════════════════════════════════════════════════════════════════════
   THE AGENCY — CINEMATIC LAYER
   Dark-first apple.com-product-page energy: ambient aurora, brand gradient,
   glass surfaces, display type, choreographed motion. Layered last so it
   restyles the calm base without touching its layout.
   NB: superseded by the LIGHT-FIRST REDESIGN layer at the end of this file.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Brand / glass / display tokens (light defaults) ── */
:root {
  --brand-1: oklch(58% 0.18 285);   /* indigo */
  --brand-2: oklch(56% 0.17 256);   /* blue   */
  --brand-3: oklch(72% 0.13 218);   /* cyan   */
  --grad-brand: linear-gradient(120deg, var(--brand-1), var(--brand-2) 50%, var(--brand-3));
  --grad-brand-soft: linear-gradient(135deg,
    color-mix(in oklch, var(--brand-1) 24%, var(--surface)),
    color-mix(in oklch, var(--brand-3) 24%, var(--surface)));
  --glass: color-mix(in oklch, var(--surface) 82%, transparent);
  --glass-blur: blur(22px) saturate(180%);
  --hairline-top: inset 0 1px 0 oklch(100% 0 0 / 0.55);
  --aurora-1: oklch(60% 0.18 285 / 0.14);
  --aurora-2: oklch(64% 0.15 230 / 0.12);
  --aurora-3: oklch(66% 0.16 320 / 0.10);
  --disp-track: -0.032em;
}
/* Dark cinematic tokens — deeper canvas + brighter brand + stronger aurora. */
:root[data-theme="dark"] {
  --bg: oklch(13.5% 0.014 274);
  --surface: oklch(19.5% 0.015 272);
  --surface-2: oklch(23.5% 0.016 272);
  --surface-inset: oklch(11% 0.012 275);
  --border: oklch(100% 0 0 / 0.09);
  --topbar-bg: oklch(13.5% 0.014 274 / 0.6);
  --brand-1: oklch(66% 0.19 285);
  --brand-2: oklch(70% 0.16 256);
  --brand-3: oklch(80% 0.13 212);
  --glass: color-mix(in oklch, var(--surface) 58%, transparent);
  --glass-blur: blur(24px) saturate(170%);
  --hairline-top: inset 0 1px 0 oklch(100% 0 0 / 0.08);
  --aurora-1: oklch(60% 0.16 276 / 0.15);
  --aurora-2: oklch(64% 0.13 236 / 0.08);
  --aurora-3: oklch(60% 0.14 300 / 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(13.5% 0.014 274);
    --surface: oklch(19.5% 0.015 272);
    --surface-2: oklch(23.5% 0.016 272);
    --surface-inset: oklch(11% 0.012 275);
    --border: oklch(100% 0 0 / 0.09);
    --topbar-bg: oklch(13.5% 0.014 274 / 0.6);
    --brand-1: oklch(66% 0.19 285);
    --brand-2: oklch(70% 0.16 256);
    --brand-3: oklch(80% 0.13 212);
    --glass: color-mix(in oklch, var(--surface) 58%, transparent);
    --glass-blur: blur(24px) saturate(170%);
    --hairline-top: inset 0 1px 0 oklch(100% 0 0 / 0.08);
    --aurora-1: oklch(60% 0.16 276 / 0.15);
    --aurora-2: oklch(64% 0.13 236 / 0.08);
    --aurora-3: oklch(60% 0.14 300 / 0.06);
  }
}

/* ── Ambient canvas — restrained depth (one soft cool wash + a faint counter-glow),
      not a light-show. Apple app UIs earn depth from material, not color blobs. ── */
body { background:
  radial-gradient(120% 90% at 50% -20%, color-mix(in oklch, var(--brand-2) 5%, var(--bg)), var(--bg) 60%); }
.bg-aurora { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-aurora::before, .bg-aurora::after, .bg-aurora > i {
  content: ""; position: absolute; border-radius: 50%; filter: blur(96px); will-change: transform; }
.bg-aurora::before { width: 70vw; height: 70vw; left: -8vw; top: -34vh;
  background: radial-gradient(circle at center, var(--aurora-1), transparent 68%);
  animation: aurora-a 46s var(--ease) infinite alternate; }
.bg-aurora::after { width: 54vw; height: 54vw; right: -16vw; top: 18vh;
  background: radial-gradient(circle at center, var(--aurora-2), transparent 68%);
  animation: aurora-b 58s var(--ease) infinite alternate; }
.bg-aurora > i { width: 46vw; height: 46vw; left: 34vw; bottom: -30vh;
  background: radial-gradient(circle at center, var(--aurora-3), transparent 68%);
  animation: aurora-c 64s var(--ease) infinite alternate; }
@keyframes aurora-a { from { transform: translate3d(0,0,0); } to { transform: translate3d(3vw,2vh,0) scale(1.06); } }
@keyframes aurora-b { from { transform: translate3d(0,0,0); } to { transform: translate3d(-3vw,3vh,0) scale(1.08); } }
@keyframes aurora-c { from { transform: translate3d(0,0,0); } to { transform: translate3d(2vw,-3vh,0) scale(1.05); } }
/* Fine material grain — barely-there tooth so flat surfaces read as material, not void. */
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
:root[data-theme="light"] body::before { opacity: 0.014; }

/* ── Brand glyph ── */
.logo { width: 26px; height: 26px; border-radius: 8px; background: var(--grad-brand);
  box-shadow: var(--hairline-top), 0 5px 16px color-mix(in oklch, var(--brand-2) 38%, transparent); }
.logo::after { width: 9px; height: 9px; background: oklch(100% 0 0 / 0.92); }
.brand-name { font-size: 17px; letter-spacing: -0.022em; }

/* ── Glass surfaces ── */
.sidebar { background: var(--glass); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); box-shadow: 1px 0 0 var(--border), var(--hairline-top); }
.card { background: var(--glass); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--shadow-md), var(--hairline-top);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out), border-color .28s var(--ease-out); }
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg), var(--hairline-top);
  border-color: color-mix(in oklch, var(--brand-2) 28%, var(--border)); }
.table-card:hover, .modal:hover { transform: none; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .sidebar, .card { background: var(--surface); }
}

/* ── Nav active = gradient rail ── */
.nav-link { position: relative; }
.nav-link.active { background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px var(--border); }
.nav-link.active .ic { color: var(--brand-2); }
.nav-link.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; border-radius: 2px; background: var(--grad-brand);
  box-shadow: 0 0 10px color-mix(in oklch, var(--brand-2) 70%, transparent); }

/* ── KPI tiles: display numbers + gradient accent + lift ── */
.kpi { border-radius: var(--r-xl); box-shadow: var(--shadow-md), var(--hairline-top);
  transition: transform .28s var(--ease-out), box-shadow .28s var(--ease-out); }
.kpi:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg), var(--hairline-top); }
.kpi-val { font-size: 40px; letter-spacing: -0.04em; }
.kpi-ic { background: var(--grad-brand-soft); box-shadow: var(--hairline-top); }
.kpi.accent::before { background: var(--grad-brand); width: 3px; opacity: 1; }
.kpi.accent .kpi-val { background: var(--grad-brand); -webkit-background-clip: text;
  background-clip: text; color: transparent; }

/* ── Display titles ── */
.page-head h1 { font-size: 32px; font-weight: 700; letter-spacing: var(--disp-track); }

/* ── Primary action: brand gradient, restrained glow ── */
.btn-primary { background: var(--grad-brand); border: 0; color: oklch(100% 0 0);
  box-shadow: var(--shadow-sm), 0 3px 12px color-mix(in oklch, var(--brand-2) 16%, transparent);
  transition: filter .18s var(--ease), box-shadow .22s var(--ease), transform .12s var(--ease); }
.btn-primary:hover { background: var(--grad-brand); filter: brightness(1.05);
  box-shadow: var(--shadow-sm), 0 6px 18px color-mix(in oklch, var(--brand-2) 26%, transparent); }
.btn-primary:active { filter: brightness(0.97); transform: scale(0.975); }

/* ── Progress: tone gradients + sheen sweep ── */
.quota-fill { position: relative; overflow: hidden; }
.quota-fill.q-ok { background: linear-gradient(110deg, var(--green), var(--brand-3)); }
.quota-fill.q-warn { background: linear-gradient(110deg, var(--orange), var(--yellow)); }
.quota-fill.q-crit { background: linear-gradient(110deg, var(--red), var(--orange)); }
.quota-fill::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, transparent 18%, oklch(100% 0 0 / 0.55) 50%, transparent 82%);
  transform: translateX(-110%); animation: sheen 2.8s ease-in-out infinite; }
.tc-progress-track span { background: var(--grad-brand); }
.tc-progress.is-done .tc-progress-track span { background: linear-gradient(110deg, var(--green), var(--brand-3)); }
@keyframes sheen { 0% { transform: translateX(-110%); } 60%, 100% { transform: translateX(110%); } }

/* ── Empty states: crafted glyph with an ambient halo ── */
.empty-state { padding-block: 30px; }
.empty-state .empty-ic { position: relative; width: 60px; height: 60px; border-radius: 18px;
  background: var(--grad-brand-soft); color: var(--brand-2);
  box-shadow: var(--hairline-top), 0 14px 38px color-mix(in oklch, var(--brand-2) 20%, transparent);
  isolation: isolate; }
.empty-state .empty-ic::before { content: ""; position: absolute; z-index: -1; inset: -40%;
  background: radial-gradient(circle at center, color-mix(in oklch, var(--brand-2) 26%, transparent), transparent 70%);
  filter: blur(14px); }
.empty-state .empty-ic svg { width: 28px; height: 28px; stroke-width: 1.7; }
.empty-state h3 { font-size: 17px; font-weight: 640; letter-spacing: -0.02em; margin-top: 14px; }
.empty-state p { font-size: 14px; color: var(--ink-3); max-width: 340px; margin-top: 4px; }

/* ── Overlays as glass ── */
.modal, .drawer { background: var(--glass); backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur); box-shadow: var(--shadow-lg), var(--hairline-top); }
.scrim, .modal-scrim { backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }

/* ── Focus ring: brand glow ── */
:focus-visible { box-shadow: 0 0 0 3px color-mix(in oklch, var(--brand-2) 50%, transparent); }

/* ── Cinematic scrollbars ── */
* { scrollbar-width: thin; scrollbar-color: color-mix(in oklch, var(--ink-3) 45%, transparent) transparent; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-thumb { background: color-mix(in oklch, var(--ink-3) 42%, transparent);
  border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in oklch, var(--ink-3) 62%, transparent); background-clip: padding-box; }

/* ── Tasteful micro-motion (interaction-driven, never gets stuck) ── */
.nav-link { transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease-out); }
.nav-link:hover { transform: translateX(1px); }
.nav-link:active { transform: translateX(1px) scale(0.99); }
.res-card, .icon-btn, .btn, .chip { transition: transform .14s var(--ease-out), background .16s var(--ease), border-color .16s var(--ease), box-shadow .2s var(--ease); }
.res-card:hover { transform: translateY(-2px); }
.icon-btn:active, .chip:active { transform: scale(0.94); }
.link, .quota-win-pct { transition: color .16s var(--ease); }
/* Page cross-fade — opacity only (never a stuck transform); go() toggles `hidden`
   on navigation only, so this fires per route switch, not on data polls. */
.page:not([hidden]) { animation: page-fade .34s var(--ease-out) both; }
@keyframes page-fade { from { opacity: 0; } to { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .bg-aurora::before, .bg-aurora::after, .bg-aurora > i { animation: none; }
  .quota-fill::after { display: none; }
  .page:not([hidden]) { animation: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   VIBRANT PASS — colorful & beautiful, not mono-blue "AI slop".
   Vivid gradient avatars, per-section colored nav (Things-3 style), and a
   composed multi-hue aurora. Glass + techy-modern base kept.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Vivid gradient avatars (each agent = a distinct colored gem) ── */
.avatar, :root[data-theme="dark"] .avatar {
  color: oklch(100% 0 0); font-weight: 750;
  background: linear-gradient(142deg, oklch(70% 0.19 var(--ah, 256)), oklch(57% 0.215 var(--ah2, 290)));
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.38), inset 0 0 0 1px oklch(100% 0 0 / 0.10),
    0 3px 10px color-mix(in oklch, oklch(62% 0.2 var(--ah, 256)) 42%, transparent);
  text-shadow: 0 1px 1.5px oklch(22% 0.06 var(--ah, 256) / 0.45); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .avatar {
    color: oklch(100% 0 0); font-weight: 750;
    background: linear-gradient(142deg, oklch(70% 0.19 var(--ah, 256)), oklch(57% 0.215 var(--ah2, 290)));
    box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.38), inset 0 0 0 1px oklch(100% 0 0 / 0.10),
      0 3px 12px color-mix(in oklch, oklch(62% 0.2 var(--ah, 256)) 50%, transparent);
    text-shadow: 0 1px 1.5px oklch(15% 0.06 var(--ah, 256) / 0.5); }
}
.icon-avatar svg { stroke: oklch(100% 0 0); }
.avatar-stack .avatar { box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.3), 0 0 0 2px var(--surface),
  0 2px 8px color-mix(in oklch, oklch(62% 0.2 var(--ah, 256)) 40%, transparent); }

/* ── Per-section colored navigation (the biggest de-generic move) ── */
.nav-link[data-route="overview"]  { --nc: oklch(64% 0.19 256); }
.nav-link[data-route="projects"]  { --nc: oklch(60% 0.21 292); }
.nav-link[data-route="tasks"]     { --nc: oklch(70% 0.16 208); }
.nav-link[data-route="schedules"] { --nc: oklch(73% 0.16 78);  }
.nav-link[data-route="agents"]    { --nc: oklch(67% 0.18 150); }
.nav-link[data-route="teams"]     { --nc: oklch(66% 0.20 345); }
.nav-link[data-route="library"]   { --nc: oklch(62% 0.18 278); }
.nav-link[data-route="settings"]  { --nc: oklch(67% 0.13 195); }
.nav-link[data-route="setup"]     { --nc: oklch(68% 0.19 45);  }
.nav-link .ic { color: var(--nc, var(--ink-3)); opacity: 0.92; }
.nav-link:hover { background: color-mix(in oklch, var(--nc) 9%, transparent); color: var(--ink); }
.nav-link:hover .ic { opacity: 1; }
.nav-link.active { background: color-mix(in oklch, var(--nc) 15%, transparent); color: var(--ink);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--nc) 24%, transparent); }
.nav-link.active .ic { color: var(--nc); opacity: 1; }
.nav-link.active::before { background: var(--nc);
  box-shadow: 0 0 10px color-mix(in oklch, var(--nc) 80%, transparent); }
.nav-count { transition: color .16s var(--ease), border-color .16s var(--ease); }
.nav-link.active .nav-count { color: var(--nc);
  border-color: color-mix(in oklch, var(--nc) 35%, var(--border)); }

/* ── Composed, beautiful multi-hue aurora (violet · cyan · pink) ── */
:root { --aurora-1: oklch(64% 0.17 282 / 0.14); --aurora-2: oklch(70% 0.14 210 / 0.12); --aurora-3: oklch(66% 0.16 332 / 0.10); }
:root[data-theme="dark"] { --aurora-1: oklch(62% 0.21 282 / 0.26); --aurora-2: oklch(68% 0.16 208 / 0.20); --aurora-3: oklch(64% 0.21 332 / 0.18); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --aurora-1: oklch(62% 0.21 282 / 0.26); --aurora-2: oklch(68% 0.16 208 / 0.20); --aurora-3: oklch(64% 0.21 332 / 0.18); } }
.bg-aurora::before { filter: blur(80px); }
.bg-aurora::after  { filter: blur(80px); }
.bg-aurora > i     { filter: blur(80px); }

/* ── A little more life on glass cards: a faint colored top sheen ── */
.kpi.accent { --kc: oklch(64% 0.19 256); }
.kpi.warn   { --kc: oklch(72% 0.17 60); }
.kpi.good   { --kc: oklch(67% 0.18 150); }
.kpi-ic { background: linear-gradient(140deg,
  color-mix(in oklch, var(--kc, var(--brand-2)) 26%, var(--surface)),
  color-mix(in oklch, var(--kc, var(--brand-2)) 10%, var(--surface)));
  color: var(--kc, var(--brand-2)); }

/* ═══════════════════════════════════════════════════════════════════════════
   SUBSCRIPTION LIMITS — premium card (engine panels, glowing bars)
   ═══════════════════════════════════════════════════════════════════════════ */
.quota-body { padding: 2px 0 0; }
.quota-engines {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px;
}
.quota-engine {
  --ec: var(--brand-2);
  position: relative; min-width: 0;
  background: color-mix(in oklch, var(--surface-2) 35%, transparent);
  border: 1px solid var(--border); border-radius: var(--r);
  padding: 10px 12px 11px;
  overflow: hidden;
}
.quota-engine.eng-claude-code { --ec: oklch(72% 0.16 62); }   /* amber */
.quota-engine.eng-codex       { --ec: oklch(66% 0.17 286); }  /* violet */
.quota-engine.is-na { background: color-mix(in oklch, var(--surface-2) 38%, transparent); }

.quota-eng-head { display: flex; align-items: center; gap: 6px; margin-bottom: 9px; }
.quota-eng-dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--ec); flex: none;
}
.quota-eng-name {
  font-weight: 600; font-size: 11px; color: var(--ink-3);
  text-transform: uppercase; letter-spacing: 0.04em;
}

.quota-win { margin-bottom: 10px; }
.quota-win:last-child { margin-bottom: 0; }
.quota-win-top { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.quota-win-label { font-size: 12px; font-weight: 500; color: var(--ink-2); }
.quota-win-pct { display: inline-flex; align-items: baseline; gap: 3px; }
.quota-win-pct b {
  font-size: 13px; font-weight: 650; letter-spacing: -0.01em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.quota-win-pct i { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.quota-win.q-ok   .quota-win-pct b { color: var(--green); }
.quota-win.q-warn .quota-win-pct b { color: var(--orange); }
.quota-win.q-crit .quota-win-pct b { color: var(--red); }

.quota-bar {
  height: 6px; border-radius: 99px; overflow: hidden; position: relative;
  background: var(--surface-inset);
  box-shadow: inset 0 1px 2px oklch(0% 0 0 / 0.2), inset 0 0 0 1px oklch(0% 0 0 / 0.05);
}
.quota-fill {
  display: block; height: 100%; border-radius: 99px; position: relative; overflow: hidden;
  transition: width .6s var(--ease-out);
}
.quota-win.q-ok   .quota-fill { background: linear-gradient(110deg, var(--green), var(--brand-3)); }
.quota-win.q-warn .quota-fill { background: linear-gradient(110deg, var(--orange), var(--yellow)); }
.quota-win.q-crit .quota-fill { background: linear-gradient(110deg, var(--red), var(--orange)); }
.quota-fill { box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.22); }
.quota-fill::after { display: none; }

.quota-win-sub {
  display: flex; align-items: center; gap: 4px;
  font-size: 10.5px; color: var(--ink-3); margin-top: 4px;
}
.quota-win-sub .ic { width: 11px; height: 11px; stroke-width: 1.8; opacity: 0.75; flex: none; }
.quota-na { font-size: 12px; color: var(--ink-3); padding: 1px 0; }
.quota-stamp { color: var(--ink-3); font-size: 10.5px; margin-top: 8px; text-align: right; }

@media (prefers-reduced-motion: reduce) { .quota-fill::after { display: none; } }

/* ============================================================
   TEAM LIVE — near-fullscreen "watch the team work" stage
   ============================================================ */
/* Make the team drawer fill the viewport with an equal gap on all sides. */
#team-drawer.modal-backdrop {
  padding: 0;
  /* Dim the page firmly so the teams grid behind never reads through the glass. */
  background: oklch(0% 0 0 / 0.52);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
#team-drawer .modal-xl {
  position: fixed;
  inset: clamp(14px, 2.4vmin, 34px);   /* uniform gap to the screen edge */
  width: auto; height: auto;
  max-width: none; max-height: none;
  margin: 0;
  border-radius: 24px;
  display: flex; flex-direction: column;
  /* Opaque base UNDER the glass so the page behind is never legible while the
     cinematic translucency/blur stays on the surface color itself. */
  background:
    linear-gradient(var(--glass), var(--glass)),
    var(--surface);
}

.team-live { display: flex; flex-direction: column; gap: 16px; }
.tl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.tl-live-pill {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 650; letter-spacing: .02em;
  padding: 5px 11px; border-radius: 999px;
}
.tl-live-pill.on {
  color: #fff;
  background: linear-gradient(120deg, var(--blue, #4f7dff), var(--cyan, #22d3ee));
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 0 8px 22px -10px var(--blue, #4f7dff);
}
.tl-live-pill.idle { color: var(--muted, #9aa3b2); background: rgba(255,255,255,.05); }
.tl-live-pill .pulse { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: tlPulse 1.1s ease-in-out infinite; }
.tl-live-pill.idle .pulse { background: var(--muted, #9aa3b2); animation: none; }
.tl-task-title { font-weight: 640; font-size: 14.5px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-round { font-size: 12px; color: var(--muted, #9aa3b2); font-variant-numeric: tabular-nums; }

.tl-stage {
  position: relative; display: flex; flex-direction: column; align-items: center;
  padding: 34px 18px 28px; border-radius: 20px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 50% -10%, rgba(80,120,255,.12), transparent 60%),
    var(--glass, rgba(255,255,255,.03));
  border: 1px solid var(--border, rgba(255,255,255,.08));
}
.tl-bus { width: 2px; height: 30px; background: linear-gradient(var(--border, rgba(255,255,255,.18)), transparent); margin: 8px 0 4px; }
.tl-members { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }

.tl-card {
  position: relative; width: 184px; padding: 18px 16px 15px; border-radius: 18px;
  background: var(--card, rgba(255,255,255,.045));
  border: 1px solid var(--border, rgba(255,255,255,.09));
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), box-shadow .4s, border-color .4s, background .4s, opacity .4s;
}
.tl-card.lead { width: 212px; }
.tl-card .tl-av { position: relative; }
.tl-card .tl-name { font-weight: 645; font-size: 14px; }
.tl-card .tl-role { font-size: 10.5px; color: var(--muted, #9aa3b2); text-transform: uppercase; letter-spacing: .055em; }
.tl-card .tl-state { font-size: 12px; font-weight: 600; min-height: 16px; }

.tl-card.is-idle { opacity: .6; }
.tl-card.is-idle .tl-state { color: var(--muted, #9aa3b2); }

.tl-card.is-working {
  transform: translateY(-5px) scale(1.045);
  border-color: transparent;
  background: linear-gradient(180deg, rgba(70,110,255,.17), rgba(70,110,255,.04));
  box-shadow: 0 16px 44px -16px var(--blue, #4f7dff), 0 0 0 1px rgba(120,150,255,.32) inset;
}
.tl-card.is-working::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: inherit; padding: 1.5px; z-index: 0; pointer-events: none;
  background: conic-gradient(from 0deg, var(--blue, #4f7dff), var(--cyan, #22d3ee), var(--blue, #4f7dff));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: tlSpin 2.6s linear infinite;
}
.tl-card.is-working > * { position: relative; z-index: 1; }
.tl-card.is-working .tl-av::after {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(90,130,255,.45); animation: tlHalo 1.6s ease-out infinite;
}
.tl-card.is-working .tl-state { color: var(--blue, #4f7dff); display: inline-flex; align-items: center; gap: 6px; justify-content: center; }
.tl-dots { display: inline-flex; gap: 3px; }
.tl-dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: tlBlink 1.2s infinite both; }
.tl-dots i:nth-child(2) { animation-delay: .18s; }
.tl-dots i:nth-child(3) { animation-delay: .36s; }

.tl-card.is-done { border-color: color-mix(in srgb, var(--green, #34d399) 45%, transparent); }
.tl-card.is-done .tl-state { color: var(--green, #34d399); }
.tl-card.is-failed { border-color: color-mix(in srgb, var(--red, #f87171) 45%, transparent); }
.tl-card.is-failed .tl-state { color: var(--red, #f87171); }

.tl-feed {
  border: 1px solid var(--border, rgba(255,255,255,.08)); border-radius: 16px;
  padding: 11px 14px; max-height: 26vh; overflow: auto;
  display: flex; flex-direction: column-reverse; gap: 7px;
}
.tl-feed-row { display: flex; gap: 9px; align-items: baseline; font-size: 12.5px; }
.tl-feed-row .tlf-when { color: var(--muted, #9aa3b2); font-variant-numeric: tabular-nums; font-size: 11px; white-space: nowrap; }
.tl-feed-row .tlf-dot { width: 6px; height: 6px; border-radius: 50%; margin-top: 5px; flex: none; }
.tl-feed-empty { color: var(--muted, #9aa3b2); font-size: 12.5px; }

@keyframes tlSpin { to { transform: rotate(360deg); } }
@keyframes tlPulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: .35; transform: scale(.65); } }
@keyframes tlHalo { 0% { box-shadow: 0 0 0 0 rgba(90,130,255,.5); } 100% { box-shadow: 0 0 0 16px rgba(90,130,255,0); } }
@keyframes tlBlink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .tl-card.is-working::before, .tl-card.is-working .tl-av::after, .tl-dots i, .tl-live-pill .pulse { animation: none !important; }
  .tl-card { transition: none; }
}

/* ============================================================
   TEAM DETAIL — 3-tab redesign (Overview · Tasks · Manage)
   ============================================================ */

/* ── Richer header ── */
.team-head { gap: 16px; }
.team-head-id { display: flex; align-items: center; gap: 14px; min-width: 0; }
.team-head-text { min-width: 0; }
.team-head-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; margin-top: 3px; }
.team-head-meta b { color: var(--ink); font-weight: 640; font-variant-numeric: tabular-nums; }
.team-head-meta .dotsep { color: var(--ink-3); }

/* ── Inline stat chips (replaces the banned big .team-stats cards) ── */
.stat-chips { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.stat-chip { display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 530;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 12px; white-space: nowrap; }
.stat-chip b { color: var(--ink); font-weight: 660; font-variant-numeric: tabular-nums; }
.stat-chip .sc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: none; }
.stat-chip.sc-active .sc-dot { background: var(--blue); }
.stat-chip.sc-waiting .sc-dot { background: var(--orange); }
.stat-chip.sc-done .sc-dot { background: var(--green); }
.stat-chip.sc-failed .sc-dot { background: var(--red); }

/* ── Overview: status strip + 2-col grid ── */
.ov-strip { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.ov-status { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.ov-status-pill { display: inline-flex; align-items: center; gap: 7px;
  font-size: 12px; font-weight: 660; letter-spacing: .01em;
  border-radius: 999px; padding: 5px 12px; flex: none; }
.ov-status-pill .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.ov-status-pill.on { color: #fff;
  background: linear-gradient(120deg, var(--blue), var(--cyan));
  box-shadow: 0 0 0 1px rgba(255,255,255,.14) inset, 0 8px 22px -12px var(--blue); }
.ov-status-pill.on .pulse { background: #fff; animation: ovPulse 1.4s ease-in-out infinite; }
.ov-status-pill.idle { color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--border); }
.ov-status-task { font-size: 13.5px; font-weight: 560; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ov-status-round { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; flex: none; }
@keyframes ovPulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

.ov-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 24px; align-items: start; }
.ov-main { min-width: 0; }
.ov-side { display: flex; flex-direction: column; gap: 16px; }
#team-content .ov-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; }
#team-content .ov-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; border-bottom: 0; padding: 0; }
#team-content .ov-card-head h3 { margin: 0; font-size: 13px; }
.ov-manage-link { border: 0; background: transparent; cursor: pointer;
  color: var(--accent); font-size: 12px; font-weight: 580; padding: 3px 6px; border-radius: var(--r-sm);
  transition: background .15s var(--ease); }
.ov-manage-link:hover { background: color-mix(in oklch, var(--accent) 12%, transparent); }
.ov-manage-link:focus-visible { box-shadow: 0 0 0 3px var(--ring); outline: none; }
/* the live stage inside Overview has no extra section padding wrapper */
.ov-main .team-live { gap: 16px; }
@media (max-width: 760px) {
  .ov-grid { grid-template-columns: 1fr; gap: 18px; }
}

/* ── Tasks tab: toggle bar + list table ── */
.ttab-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.task-view-seg { flex: none; min-width: 150px; margin-bottom: 0; }
.ttab-body { padding-top: 14px; }
.ttab-pane[hidden] { display: none; }

.team-task-list { display: flex; flex-direction: column; }
.ttl-row { display: flex; align-items: center; gap: 12px; padding: 11px 6px; cursor: pointer;
  border-radius: var(--r-sm); transition: background .12s var(--ease); }
.ttl-row:hover { background: var(--surface-2); }
.ttl-row:focus-visible { box-shadow: 0 0 0 3px var(--ring); outline: none; }
.ttl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.ttl-title { font-size: 13.5px; font-weight: 560; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttl-id { font-family: var(--mono); font-size: 11px; color: var(--ink-3); }
.ttl-round { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ttl-when { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; min-width: 64px; text-align: right; }
.team-task-list .act-item:last-child { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) {
  .ov-status-pill.on .pulse { animation: none !important; }
  .ttl-row, .ov-manage-link, .stat-chip { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   THE AGENCY — BUSINESS REFRESH (2026-06)  ·  FINAL LAYER
   Re-skins the app from the old dark-first "cinematic glass" register to a calm,
   professional, light-first B2B SaaS look matching the supplied mockups: white
   cards on a light blue-gray canvas, royal-blue primary, soft 1px borders, gentle
   shadows, Inter type, KPI stat cards, status pills, a global top bar, and a
   sidebar with the real logo + a bottom brand block. Dark mode is kept & reworked.
   This layer is appended last so it overrides the base + cinematic layers by
   source order. This is the current, authoritative dashboard look.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Inter (self-hosted, offline) ── */
@font-face {
  font-family: "Inter"; font-style: normal; font-display: swap;
  font-weight: 100 900; src: url("/Inter.var.woff2") format("woff2");
}

/* ── Tokens: LIGHT (default) ── */
:root {
  --bg: oklch(97.2% 0.006 250);
  --surface: oklch(100% 0 0);
  --surface-2: oklch(97.6% 0.005 250);
  --surface-inset: oklch(95.4% 0.006 250);
  --ink: oklch(26% 0.028 262);
  --ink-2: oklch(47% 0.022 260);
  --ink-3: oklch(62% 0.018 258);
  --border: oklch(91.5% 0.01 252);
  --border-strong: oklch(85% 0.013 252);

  --navy: oklch(30% 0.075 260);
  --accent: oklch(58% 0.205 257);
  --accent-press: oklch(50% 0.2 257);
  --on-accent: oklch(100% 0 0);
  --ring: oklch(58% 0.205 257 / 0.36);

  --green: oklch(60% 0.15 150);
  --blue: oklch(58% 0.205 257);
  --indigo: oklch(55% 0.16 280);
  --violet: oklch(56% 0.18 290);
  --cyan: oklch(64% 0.13 232);
  --orange: oklch(66% 0.16 55);
  --amber: oklch(70% 0.14 75);
  --yellow: oklch(78% 0.14 88);
  --red: oklch(58% 0.21 27);
  --gray: oklch(62% 0.015 258);

  --shadow-sm: 0 1px 2px oklch(45% 0.05 260 / 0.06), 0 1px 3px oklch(45% 0.05 260 / 0.05);
  --shadow-md: 0 4px 16px oklch(45% 0.05 260 / 0.08), 0 2px 6px oklch(45% 0.05 260 / 0.05);
  --shadow-lg: 0 22px 50px oklch(30% 0.05 260 / 0.18), 0 8px 20px oklch(30% 0.05 260 / 0.08);
  --topbar-bg: oklch(100% 0 0 / 0.86);

  --r-sm: 8px; --r: 11px; --r-lg: 14px; --r-xl: 18px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;

  /* tame the cinematic catch-all variables → flat & professional */
  --glass: var(--surface);
  --glass-blur: blur(0);
  --grad-brand: var(--accent);
  --grad-brand-soft: color-mix(in oklch, var(--accent) 12%, var(--surface));
  --hairline-top: none;
  --brand-2: var(--accent);
  --brand-3: var(--cyan);
}

/* ── Tokens: DARK (forced) ── */
:root[data-theme="dark"] {
  --bg: oklch(16% 0.018 262);
  --surface: oklch(21% 0.022 264);
  --surface-2: oklch(25% 0.022 264);
  --surface-inset: oklch(13.5% 0.018 264);
  --ink: oklch(95% 0.01 260);
  --ink-2: oklch(72% 0.016 260);
  --ink-3: oklch(58% 0.016 260);
  --border: oklch(100% 0 0 / 0.10);
  --border-strong: oklch(100% 0 0 / 0.18);
  --navy: oklch(92% 0.02 256);
  --accent: oklch(67% 0.17 256);
  --accent-press: oklch(73% 0.15 256);
  --on-accent: oklch(100% 0 0);
  --ring: oklch(67% 0.17 256 / 0.5);
  --green: oklch(72% 0.15 152);
  --blue: oklch(67% 0.17 256);
  --indigo: oklch(70% 0.13 282);
  --violet: oklch(70% 0.15 292);
  --cyan: oklch(74% 0.12 220);
  --orange: oklch(74% 0.14 62);
  --amber: oklch(78% 0.13 82);
  --yellow: oklch(82% 0.13 90);
  --red: oklch(68% 0.18 27);
  --gray: oklch(64% 0.015 260);
  --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.3);
  --shadow-md: 0 6px 20px oklch(0% 0 0 / 0.4);
  --shadow-lg: 0 24px 60px oklch(0% 0 0 / 0.6);
  --topbar-bg: oklch(16% 0.018 262 / 0.82);
  --glass: var(--surface);
  --grad-brand: var(--accent);
  --grad-brand-soft: color-mix(in oklch, var(--accent) 20%, var(--surface));
  --brand-2: var(--accent);
  --brand-3: var(--cyan);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: oklch(16% 0.018 262);
    --surface: oklch(21% 0.022 264);
    --surface-2: oklch(25% 0.022 264);
    --surface-inset: oklch(13.5% 0.018 264);
    --ink: oklch(95% 0.01 260);
    --ink-2: oklch(72% 0.016 260);
    --ink-3: oklch(58% 0.016 260);
    --border: oklch(100% 0 0 / 0.10);
    --border-strong: oklch(100% 0 0 / 0.18);
    --navy: oklch(92% 0.02 256);
    --accent: oklch(67% 0.17 256);
    --accent-press: oklch(73% 0.15 256);
    --ring: oklch(67% 0.17 256 / 0.5);
    --green: oklch(72% 0.15 152);
    --blue: oklch(67% 0.17 256);
    --indigo: oklch(70% 0.13 282);
    --violet: oklch(70% 0.15 292);
    --cyan: oklch(74% 0.12 220);
    --orange: oklch(74% 0.14 62);
    --amber: oklch(78% 0.13 82);
    --yellow: oklch(82% 0.13 90);
    --red: oklch(68% 0.18 27);
    --gray: oklch(64% 0.015 260);
    --shadow-sm: 0 1px 2px oklch(0% 0 0 / 0.3);
    --shadow-md: 0 6px 20px oklch(0% 0 0 / 0.4);
    --shadow-lg: 0 24px 60px oklch(0% 0 0 / 0.6);
    --topbar-bg: oklch(16% 0.018 262 / 0.82);
    --glass: var(--surface);
    --grad-brand: var(--accent);
    --grad-brand-soft: color-mix(in oklch, var(--accent) 20%, var(--surface));
    --brand-2: var(--accent);
    --brand-3: var(--cyan);
  }
}

/* ── Kill the ambient cinematic canvas (flat, calm) ── */
.bg-aurora { display: none !important; }
body { background: var(--bg); font-size: 14px; }
body::before { display: none !important; }
h1, h2, h3 { letter-spacing: -0.014em; }

/* ── App shell: sidebar + topbar + padded pages ── */
.app { grid-template-columns: 248px 1fr; }
.sidebar {
  width: 248px; background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none;
  box-shadow: none; border-right: 1px solid var(--border); padding: 16px 14px; gap: 2px;
}
.sidebar-brand { padding: 8px 8px 18px; gap: 10px; }
.brand-mark { width: 30px; height: 30px; display: block; flex: none; }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--navy); }
:root[data-theme="dark"] .brand-mark, :root[data-theme="dark"] .org-mark { filter: brightness(0) invert(1); opacity: 0.92; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .brand-mark,
  :root:not([data-theme="light"]) .org-mark { filter: brightness(0) invert(1); opacity: 0.92; }
}

/* nav — calm, single-accent active pill (no rainbow, no gradient rail) */
.nav { gap: 2px; }
.nav-link { gap: 11px; padding: 9px 11px; border-radius: 9px; color: var(--ink-2); font-weight: 540; transition: background .14s var(--ease), color .14s var(--ease); }
.nav-link .ic { width: 18px; height: 18px; color: var(--ink-3); opacity: 1; }
.nav-link:hover { background: var(--surface-2); color: var(--ink); transform: none; }
.nav-link:hover .ic { color: var(--ink-2); }
.nav-link.active { background: color-mix(in oklch, var(--accent) 11%, transparent); color: var(--accent); box-shadow: none; font-weight: 600; }
.nav-link.active .ic { color: var(--accent); }
.nav-link.active::before { display: none; }
.nav-link.active .nav-count { color: var(--accent); border-color: color-mix(in oklch, var(--accent) 30%, var(--border)); }
.nav-count { background: var(--surface-2); }

/* sidebar foot — real "account" block (no fake org/user) */
.sidebar-foot { display: block; padding: 12px 4px 2px; border-top: 1px solid var(--border); }
.org-block { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; }
.org-block:hover { background: var(--surface-2); }
.org-mark { width: 26px; height: 26px; flex: none; display: block; }
.org-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.org-name { font-size: 13px; font-weight: 650; color: var(--ink); }
.org-plan { font-size: 11.5px; color: var(--ink-3); }
.sidebar-foot .health { margin-top: 4px; background: transparent; border: 0; padding: 4px 8px; font-size: 12px; width: 100%; }

/* ── Topbar (global) ── */
.main { padding: 0; max-width: none; }
.topbar {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 16px;
  height: 64px; padding: 0 28px; background: var(--topbar-bg);
  backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar-title { flex: none; margin: 0; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; color: var(--ink); }
.topbar-search {
  flex: 1 1 auto; max-width: 440px; margin: 0 auto; display: flex; align-items: center; gap: 9px;
  height: 38px; padding: 0 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border);
  transition: border-color .15s var(--ease), background .15s var(--ease), box-shadow .15s var(--ease);
}
.topbar-search:focus-within { border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px var(--ring); }
.topbar-search .ic { width: 17px; height: 17px; color: var(--ink-3); flex: none; }
.topbar-search input { border: 0; background: transparent; outline: none; width: 100%; font-size: 14px; color: var(--ink); }
.topbar-search input::placeholder { color: var(--ink-3); }
.topbar-tools { flex: none; display: flex; align-items: center; gap: 8px; }

/* page content padding (title lives in the topbar now) */
.page { padding: 26px 28px 56px; }
.page-head { margin-bottom: 18px; align-items: center; }
.page-head h1 { display: none; }
.page-sub { font-size: 13.5px; color: var(--ink-3); margin: 0; }

/* ── Buttons ── */
.btn { height: 36px; border-radius: 9px; font-weight: 600; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--accent); border: 0; color: var(--on-accent); box-shadow: 0 1px 2px oklch(40% 0.12 260 / 0.18); }
.btn-primary:hover { background: var(--accent-press); filter: none; box-shadow: 0 3px 10px color-mix(in oklch, var(--accent) 32%, transparent); }
.btn-primary:active { background: var(--accent-press); transform: scale(0.98); filter: none; }
.btn-ghost { background: var(--surface); border: 1px solid var(--border); color: var(--ink); }
.btn-ghost:hover { background: var(--surface-2); border-color: var(--border-strong); }
.btn-sm { height: 30px; border-radius: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 9px; background: transparent; border: 1px solid var(--border); color: var(--ink-2); }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }

/* ── Cards (flat white, hairline border, soft shadow) ── */
.card { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--shadow-sm); }
.card:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--border); }
.ov-card-head h2 { font-size: 14px; font-weight: 650; }

/* ── KPI stat cards (mockup anatomy) ── */
.kpi-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.kpi { display: block; padding: 18px 20px; border-radius: var(--r-lg); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow-sm); overflow: visible; }
.kpi:hover { transform: none; box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.kpi::before { display: none; }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.kpi-label { margin: 0; font-size: 13px; font-weight: 560; color: var(--ink-2); }
.kpi-ic { width: 38px; height: 38px; border-radius: 10px; flex: none; display: grid; place-items: center;
  background: color-mix(in oklch, var(--kc, var(--accent)) 13%, var(--surface)); color: var(--kc, var(--accent)); box-shadow: none; }
.kpi-ic svg { width: 19px; height: 19px; }
.kpi-val { font-size: 30px; font-weight: 700; letter-spacing: -0.03em; line-height: 1; color: var(--ink);
  background: none; -webkit-background-clip: border-box; background-clip: border-box; -webkit-text-fill-color: currentColor; }
.kpi.accent .kpi-val, .kpi.warn .kpi-val, .kpi.good .kpi-val { color: var(--ink); -webkit-text-fill-color: currentColor; }
.kpi-sub { margin-top: 7px; font-size: 12.5px; color: var(--ink-3); }
.kpi.accent { --kc: var(--accent); }
.kpi.warn { --kc: var(--amber); }
.kpi.good { --kc: var(--green); }

/* overview resource pills */
.res-card:hover { transform: none; border-color: var(--border-strong); }

/* ── Avatars: calm, soft single-hue rounded-square tiles ── */
.avatar, :root[data-theme="dark"] .avatar {
  border-radius: 9px; font-weight: 650; color: oklch(46% 0.13 var(--ah, 256));
  background: color-mix(in oklch, oklch(62% 0.14 var(--ah, 256)) 15%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(62% 0.14 var(--ah, 256)) 22%, transparent);
  text-shadow: none;
}
:root[data-theme="dark"] .avatar {
  color: oklch(86% 0.08 var(--ah, 256));
  background: color-mix(in oklch, oklch(60% 0.14 var(--ah, 256)) 28%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(66% 0.14 var(--ah, 256)) 34%, transparent);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .avatar {
    color: oklch(86% 0.08 var(--ah, 256));
    background: color-mix(in oklch, oklch(60% 0.14 var(--ah, 256)) 28%, var(--surface));
    box-shadow: inset 0 0 0 1px color-mix(in oklch, oklch(66% 0.14 var(--ah, 256)) 34%, transparent);
    text-shadow: none;
  }
}
.icon-avatar svg { stroke: currentColor; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px color-mix(in oklch, oklch(62% 0.14 var(--ah,256)) 26%, transparent); }

/* ── Status badges: soft tinted pills ── */
.badge {
  border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 600; gap: 5px;
  background: color-mix(in oklch, var(--c, var(--gray)) 14%, var(--surface));
  color: color-mix(in oklch, var(--c, var(--gray)) 58%, var(--ink));
}
.badge::before { width: 6px; height: 6px; }

/* ── Capability / tag chips ── */
.cap { border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); color: var(--ink-2); font-weight: 540; }
.chip { border-radius: 8px; background: var(--surface-2); border: 1px solid var(--border); }
.engine-badge { background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 2px 9px; }

/* ── Entity cards ── */
.entity-grid { gap: 16px; }
.entity-grid .cfg-item { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: box-shadow .16s var(--ease), border-color .16s var(--ease); }
.entity-grid .cfg-item[role="button"]:hover { transform: none; background: var(--surface); box-shadow: var(--shadow-md); border-color: var(--border-strong); }
.cfg-title { font-weight: 650; }
.cfg-card-sub { font-size: 12px; color: var(--ink-3); margin-top: 2px; }

/* ── Segmented control (Board/List, library tabs) ── */
.segmented { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; }
.segmented-thumb { background: var(--surface); box-shadow: var(--shadow-sm); border-radius: 8px; border: 1px solid var(--border); }

/* ── Inputs ── */
input:not([type]), input[type="text"], input[type="password"], input[type="number"], input[type="search"], textarea, .field select, select {
  border-radius: 9px; border: 1px solid var(--border); background: var(--surface);
}
input:not([type]):focus, input[type="text"]:focus, input[type="password"]:focus, input[type="number"]:focus, input[type="search"]:focus, textarea:focus, .field select:focus, select:focus {
  border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--ring);
}

/* ── Overlays: flat, clean scrim ── */
.modal, .drawer { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: var(--shadow-lg); border: 1px solid var(--border); }
.modal-backdrop, .drawer-backdrop { background: oklch(22% 0.03 262 / 0.42); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.modal-head h2 { font-weight: 680; }

/* ── Focus ring ── */
:focus-visible { box-shadow: 0 0 0 3px var(--ring); }

/* ── Slim, neutral scrollbars ── */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: color-mix(in oklch, var(--ink-3) 32%, transparent); border-radius: 99px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: color-mix(in oklch, var(--ink-3) 50%, transparent); background-clip: padding-box; }

/* ── Responsive (re-asserts the mobile shell; appended rules above are non-media
      and would otherwise leak the desktop sidebar into small viewports) ── */
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; align-content: start; }
  /* sidebar → horizontal icon strip at the top */
  .sidebar { position: sticky; top: 0; z-index: 41; width: auto; height: auto;
    flex-direction: row; align-items: center; gap: 4px; padding: 8px 12px;
    border-right: 0; box-shadow: 0 1px 0 var(--border); overflow-x: auto;
    background: var(--topbar-bg); backdrop-filter: saturate(180%) blur(14px); -webkit-backdrop-filter: saturate(180%) blur(14px); }
  .sidebar-brand { padding: 0 8px 0 4px; }
  .brand-name { white-space: nowrap; }
  .nav { flex-direction: row; flex: 1; gap: 2px; }
  .nav-link { padding: 8px; }
  .nav-link span:not(.nav-count) { display: none; }
  .nav-count { display: none; }
  .sidebar-foot { display: none; }
  .topbar { padding: 0 16px; gap: 12px; height: 58px; }
  .topbar-search { max-width: none; margin: 0; }
  .topbar-title { font-size: 19px; }
  .page { padding: 18px 16px 44px; }
  .page-head { flex-direction: column; align-items: stretch; }
  .ov-cols { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOCKUP COMPONENTS — KPI deltas · Agent Activity chart · Team Map · Recent
   Agent Runs table · rich Agent cards · filter bar. (2026-06, iteration 2)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── KPI delta / sub line ── */
.kpi-delta { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 12.5px; color: var(--ink-3); }
.kpi-delta b { font-weight: 680; font-variant-numeric: tabular-nums; }
.kpi-delta .kpi-arrow { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.kpi-delta.up { color: var(--green); }
.kpi-delta.down { color: var(--red); }
.kpi-delta.up span, .kpi-delta.down span { color: var(--ink-3); }
.kpi-delta.flat { color: var(--ink-3); }

/* ── Overview dashboard grid (Activity | Team Map) ── */
.ov-dash { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-card { display: flex; flex-direction: column; }
.dash-card .ov-card-head { padding: 14px 18px; }
.dash-eyebrow { font-size: 12px; color: var(--ink-3); font-weight: 540; }
.dash-body { padding: 8px 16px 16px; }
@media (max-width: 980px) { .ov-dash { grid-template-columns: 1fr; } }

/* ── Agent Activity area chart (SVG, classes drive the paint) ── */
.activity-chart { width: 100%; height: auto; display: block; overflow: visible; }
.ac-grid { stroke: var(--border); stroke-width: 1; }
.ac-ytick { fill: var(--ink-3); font-size: 10px; text-anchor: end; font-family: var(--font); }
.ac-xtick { fill: var(--ink-3); font-size: 10px; text-anchor: middle; font-family: var(--font); }
.ac-area { stroke: none; }
.ac-fill-top { stop-color: var(--accent); stop-opacity: 0.20; }
.ac-fill-bot { stop-color: var(--accent); stop-opacity: 0.01; }
.ac-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.ac-dot { fill: var(--surface); stroke: var(--accent); stroke-width: 2; }

/* ── Team Map org-chart (compact mockup nodes · connected row · zoom) ── */
.tm-scroll { overflow: auto; text-align: center; }
.tm-canvas { display: inline-flex; flex-direction: column; align-items: center; transform-origin: top center; }
.tm-node { display: flex; align-items: center; gap: 11px; width: 188px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 11px 13px; box-shadow: var(--shadow-sm); position: relative; text-align: left; }
.tm-node--team { cursor: pointer; transition: border-color .15s var(--ease), box-shadow .15s var(--ease); }
.tm-node--team:hover { border-color: color-mix(in oklch, var(--accent) 45%, var(--border)); box-shadow: var(--shadow-md); }
.tm-node--root { border-color: color-mix(in oklch, var(--accent) 30%, var(--border)); background: color-mix(in oklch, var(--accent) 6%, var(--surface)); }
.tm-node-ic { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: color-mix(in oklch, var(--accent) 13%, var(--surface)); color: var(--accent); }
.tm-node-ic svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tm-node-text { min-width: 0; }
.tm-node-name { display: block; font-weight: 650; font-size: 13.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tm-node-sub { display: block; font-size: 11.5px; color: var(--ink-3); margin-top: 1px; white-space: nowrap; }
/* connectors: root → vertical → horizontal bus → vertical to each child */
.tm-branch { position: relative; padding-top: 30px; display: flex; justify-content: center; }
.tm-branch::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 16px; background: var(--border-strong); }
.tm-row { position: relative; display: flex; gap: 22px; flex-wrap: nowrap; justify-content: center; }
.tm-row::before { content: ""; position: absolute; top: -14px; left: 94px; right: 94px; height: 2px; background: var(--border-strong); }
.tm-row:has(.tm-node:only-child)::before { display: none; }
.tm-node--team::before { content: ""; position: absolute; top: -16px; left: 50%; transform: translateX(-50%); width: 2px; height: 16px; background: var(--border-strong); }
/* zoom control cluster (card header) */
.tm-zoom { display: inline-flex; align-items: center; gap: 1px; border: 1px solid var(--border); border-radius: 9px; padding: 2px; background: var(--surface); }
.tm-zoom-btn { display: grid; place-items: center; width: 27px; height: 26px; border: 0; background: transparent; color: var(--ink-2); cursor: pointer; border-radius: 7px; font-size: 16px; line-height: 1; }
.tm-zoom-btn:hover { background: var(--surface-2); color: var(--ink); }
.tm-zoom-label { min-width: 40px; text-align: center; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.tm-zoom-fit .ic { width: 15px; height: 15px; }

/* ── Recent Agent Runs + Agents table ── */
.runs-wrap, .ov-card > .table-wrap { width: 100%; }
.runs-table, .agents-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.runs-table th, .agents-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--ink-3); font-weight: 650; padding: 10px 16px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.runs-table td, .agents-table td { padding: 11px 16px; border-bottom: 1px solid var(--border); color: var(--ink-2); vertical-align: middle; }
.runs-table tbody tr, .agents-table tbody tr { cursor: pointer; transition: background .12s var(--ease); }
.runs-table tbody tr:hover, .agents-table tbody tr:hover { background: var(--surface-2); }
.runs-table tbody tr:last-child td, .agents-table tbody tr:last-child td { border-bottom: 0; }
.rr-agent, .agents-table td:first-child { display: flex; align-items: center; gap: 9px; color: var(--ink); font-weight: 560; }
.rr-when, .rr-dur { color: var(--ink-3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Rich Agent card ── */
.agent-card { display: flex; flex-direction: column; padding: 16px 18px; }
.agent-card .ac-head { display: flex; align-items: flex-start; gap: 12px; }
.agent-card .ac-titles { flex: 1; min-width: 0; }
.agent-card .ac-menu { flex: none; color: var(--ink-3); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; }
.agent-card .ac-menu .ic { width: 18px; height: 18px; }
.agent-card .cfg-desc { margin-top: 11px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-meta { display: flex; gap: 12px; margin-top: 14px; padding-top: 13px; border-top: 1px solid var(--border); }
.ac-meta-row { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ac-meta-k { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.045em; color: var(--ink-3); font-weight: 650; }
.ac-meta-v { font-size: 13px; color: var(--ink); font-weight: 540; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-stats { display: flex; gap: 10px; margin-top: 12px; }
.ac-stat { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; display: flex; flex-direction: column; gap: 2px; }
.ac-stat-v { font-weight: 680; font-size: 14px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-stat-k { font-size: 11px; color: var(--ink-3); }
.agent-card .cfg-caps { margin-top: 12px; }

/* agent status badges */
.badge.s-active { --c: var(--green); }
.badge.s-idle { --c: var(--gray); }

/* ── Filter bar ── */
.filter-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.fb-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fb-select { height: 36px; border-radius: 9px; border: 1px solid var(--border); background: var(--surface); padding: 0 32px 0 12px; font-size: 13px; color: var(--ink); cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A94A6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 15px; -webkit-appearance: none; appearance: none; }
.fb-select:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px var(--ring); }
.fb-view { margin-bottom: 0; flex: none; }

/* table view: the agents table must span full width, not sit in a grid cell */
.entity-grid:has(> .table-card) { display: block; }

/* ── Grid footer ── */
.grid-foot { margin-top: 18px; color: var(--ink-3); font-size: 12.5px; }
.grid-foot:empty { display: none; }

@media (max-width: 620px) {
  .filter-bar { flex-direction: column; align-items: stretch; }
  .fb-filters { width: 100%; }
  .fb-select { flex: 1; }
  .ac-stats { flex-direction: column; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DEEP REDESIGN — DENSITY & PROPORTION OVERHAUL + DETAIL VIEWS (2026-06, iter 3)
   Tightens the whole app into a dense, informative B2B dashboard and brings the
   detail drawers (team / task / project) + the agent card into the clean system.
   Appended last → wins by source order.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Global density ── */
body { font-size: 13px; }
.app { grid-template-columns: 228px 1fr; }
.sidebar { width: 228px; padding: 14px 11px; }
.sidebar-brand { padding: 6px 8px 14px; gap: 9px; }
.brand-name { font-size: 16px; }
.nav-link { padding: 7px 10px; font-size: 13px; border-radius: 8px; }
.nav-link .ic { width: 17px; height: 17px; }
.org-block { padding: 7px; }
.org-name { font-size: 12.5px; }
.org-plan { font-size: 11px; }

.topbar { height: 54px; padding: 0 22px; gap: 14px; }
.topbar-title { font-size: 18px; }
.topbar-search { height: 34px; max-width: 400px; }
.topbar-search input { font-size: 13px; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; }

.page { padding: 20px 22px 40px; }
.page-head { margin-bottom: 14px; }
.page-sub { font-size: 13px; }

.btn { height: 32px; font-size: 13px; border-radius: 8px; padding: 0 13px; }
.btn .ic { width: 15px; height: 15px; }
.btn-sm { height: 28px; padding: 0 10px; }

/* KPI cards — compact */
.kpi-grid { gap: 12px; margin-bottom: 14px; }
.kpi { padding: 14px 15px; border-radius: 12px; }
.kpi-top { margin-bottom: 9px; }
.kpi-label { font-size: 12.5px; }
.kpi-ic { width: 32px; height: 32px; border-radius: 8px; }
.kpi-ic svg { width: 17px; height: 17px; }
.kpi-val { font-size: 24px; letter-spacing: -0.025em; }
.kpi-delta { margin-top: 6px; font-size: 12px; }

/* cards / panels */
.card { border-radius: 12px; }
.ov-card-head { padding: 11px 15px; }
.ov-card-head h2 { font-size: 13.5px; }
.dash-card .ov-card-head { padding: 12px 15px; }
.dash-body { padding: 6px 14px 14px; }
.ov-dash { gap: 12px; margin-bottom: 12px; }
.ov-cols { gap: 12px; }
.ov-card { margin-bottom: 12px; }

/* lists / rows */
.ov-list { padding: 4px; }
.ov-row { padding: 6px 9px; }
.ov-row .ov-title { font-size: 12.5px; }

/* tables — dense */
.runs-table, .agents-table { font-size: 12.5px; }
.runs-table th, .agents-table th { padding: 8px 14px; font-size: 10.5px; }
.runs-table td, .agents-table td { padding: 8px 14px; }

/* entity grids */
.entity-grid { gap: 12px; grid-template-columns: repeat(auto-fill, minmax(278px, 1fr)); }
#cfg-teams.entity-grid { grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); }
.cfg-item { padding: 14px 15px; }
.cfg-title { font-size: 14px; }
.cfg-desc { font-size: 12.5px; }

/* filter bar */
.filter-bar { margin-bottom: 14px; }
.fb-select { height: 32px; }

/* ── Agent card (dense, mockup layout: icon · name · desc · 2×2 meta · tags) ── */
.agent-card { padding: 14px 15px; gap: 0; }
.agent-card .ac-head { gap: 11px; align-items: flex-start; }
.agent-card .avatar.avatar-lg { width: 40px; height: 40px; border-radius: 10px; font-size: 14px; }
.agent-card .cfg-title { font-size: 14px; line-height: 1.25; }
.ac-desc { font-size: 12px; color: var(--ink-3); margin-top: 2px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.agent-card .ac-menu { margin: -2px -4px 0 0; }
.agent-card .ac-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--border); }
.ac-meta-row { gap: 3px; }
.ac-meta-k { font-size: 10px; }
.ac-meta-v { font-size: 12.5px; }
.agent-card .cfg-caps { margin-top: 12px; gap: 6px; display: flex; flex-wrap: wrap; align-items: center; }
.agent-card .engine-badge { margin-top: 0; }

/* ── Detail drawers (task / project / team) — clean & dense ── */
.detail-head { display: flex; align-items: flex-start; gap: 12px; padding: 15px 18px; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 3; background: var(--surface); }
.detail-head h2 { font-size: 17px; font-weight: 680; }
.detail-sub, .detail-head .detail-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.detail-section { padding: 14px 18px; border-bottom: 1px solid var(--border); }
.detail-section h3, .form-section-title, .td-section-head h3 {
  font-family: var(--font); text-transform: uppercase; letter-spacing: 0.04em; font-size: 11px; font-weight: 650; color: var(--ink-3); }
.detail-section h3 { margin: 0 0 9px; }
/* stat chips */
.stat-chips { gap: 6px; }
.stat-chip { font-size: 12px; padding: 4px 10px; }
/* team detail overview grid */
.ov-grid { gap: 16px; }
#team-content .ov-card { padding: 13px 15px; }
#team-content .ov-card-head { margin-bottom: 10px; }
.ov-status-pill { font-size: 11.5px; padding: 4px 11px; }

/* ── Team detail: dense member list + activity feed (replaces .tl-* stage) ── */
.td-section { margin-bottom: 16px; }
.td-section:last-child { margin-bottom: 0; }
.td-section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.td-section-head h3 { margin: 0; }
.td-count { font-size: 11px; font-weight: 600; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px; min-width: 18px; text-align: center; }
.td-section-head .btn { margin-left: auto; }
.td-members { display: flex; flex-direction: column; gap: 6px; }
.td-member { display: flex; align-items: center; gap: 10px; padding: 8px 11px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
  transition: border-color .15s var(--ease), background .15s var(--ease); }
.td-member-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.td-member-name { font-weight: 600; font-size: 13px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-member-role { font-size: 11px; color: var(--ink-3); }
.td-member-status { display: inline-flex; align-items: center; gap: 6px; flex: none; font-size: 11px; font-weight: 600; color: var(--ink-3);
  padding: 3px 9px; border-radius: 999px; background: var(--surface-2); }
.td-member-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--gray); flex: none; }
.td-member-status.is-working { color: var(--blue); background: color-mix(in oklch, var(--blue) 13%, var(--surface)); }
.td-member-status.is-working i { background: var(--blue); animation: pulse 1.3s var(--ease) infinite; }
.td-member-status.is-done { color: var(--green); background: color-mix(in oklch, var(--green) 13%, var(--surface)); }
.td-member-status.is-done i { background: var(--green); }
.td-member-status.is-failed { color: var(--red); background: color-mix(in oklch, var(--red) 13%, var(--surface)); }
.td-member-status.is-failed i { background: var(--red); }
.td-member.is-working { border-color: color-mix(in oklch, var(--blue) 35%, var(--border)); background: color-mix(in oklch, var(--blue) 4%, var(--surface)); }
.td-member.is-done { border-color: color-mix(in oklch, var(--green) 30%, var(--border)); }
.td-member.is-failed { border-color: color-mix(in oklch, var(--red) 30%, var(--border)); }
/* activity feed */
.td-feed { display: flex; flex-direction: column; gap: 3px; max-height: 240px; overflow-y: auto; }
.td-feed-empty { font-size: 12px; color: var(--ink-3); padding: 8px 2px; }
.td-feed-row { display: flex; align-items: center; gap: 9px; font-size: 12px; padding: 5px 4px; border-radius: 7px; }
.td-feed-row:hover { background: var(--surface-2); }
.tdf-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--gray); }
.tdf-dot.is-done { background: var(--green); }
.tdf-dot.is-failed { background: var(--red); }
.tdf-dot.is-working { background: var(--blue); }
.tdf-text { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tdf-when { color: var(--ink-3); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ── Modals / forms — dense ── */
.modal-head { padding: 15px 20px; }
.modal-head h2 { font-size: 16px; }
.modal-body { gap: 12px; padding: 4px 20px 20px; }
.field { gap: 5px; }
.field-label { font-size: 11.5px; }
input:not([type]), input[type="text"], input[type="password"], input[type="number"], input[type="search"], textarea, .field select, select {
  padding: 7px 10px; font-size: 13px; }
.detail-drawer .drawer, .drawer { width: min(600px, 96vw); }

/* tighten the team/project centered popups' inner padding */
.modal-xl .detail-section { padding: 13px 18px; }

/* ── Agent profile tile: semantic glyph in a soft accent square (mockup style) ── */
.agent-ic { background: color-mix(in oklch, var(--accent) 12%, var(--surface)); color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--accent) 16%, transparent); }
.agent-ic svg { stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.agent-ic.avatar-sm svg { width: 13px; height: 13px; }
.agent-ic.avatar-lg svg { width: 21px; height: 21px; }
:root[data-theme="dark"] .agent-ic { background: color-mix(in oklch, var(--accent) 24%, var(--surface)); color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--accent) 26%, transparent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .agent-ic { background: color-mix(in oklch, var(--accent) 24%, var(--surface)); color: var(--accent);
    box-shadow: inset 0 0 0 1px color-mix(in oklch, var(--accent) 26%, transparent); }
}

/* ── Team detail org-graph (Team Structure) — dashboard Team-Map style + live state ── */
.td-graph { padding: 6px 0 2px; min-height: 96px; }
.td-graph .tm-node-text { flex: 1 1 auto; }
.tm-node-text { flex: 1 1 auto; }
.tm-node-status { display: inline-flex; align-items: center; flex: none; }
.tm-node-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.tm-node-status.is-working i { background: var(--blue); animation: pulse 1.3s var(--ease) infinite; }
.tm-node-status.is-done i { background: var(--green); }
.tm-node-status.is-failed i { background: var(--red); }
/* node live-state borders */
.tm-node.is-working { border-color: color-mix(in oklch, var(--blue) 42%, var(--border)); background: color-mix(in oklch, var(--blue) 5%, var(--surface)); }
.tm-node.is-done { border-color: color-mix(in oklch, var(--green) 32%, var(--border)); }
.tm-node.is-failed { border-color: color-mix(in oklch, var(--red) 32%, var(--border)); }
/* the team-structure section's zoom controls sit at the right of its head */
#team-live .td-section-head .tm-zoom { margin-left: auto; }
.td-graph .tm-node { width: 208px; }

/* ── Per-customer secrets status badge (Settings) ── */
.secret-status { margin: 4px 0 12px; }
.secret-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.secret-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; }
.secret-badge .dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.secret-badge.on { color: var(--green); background: color-mix(in oklch, var(--green) 13%, var(--surface)); }
.secret-badge.on .dot { background: var(--green); }
.secret-badge.off { color: var(--ink-3); background: var(--surface-2); }
.secret-badge.off .dot { background: var(--gray); }
.secret-hint { font-weight: 500; color: var(--ink-3); }
.secret-actions { display: flex; justify-content: flex-end; margin-top: 8px; }

/* ── External-agent MCP connection card (Settings) ── */
.mcp-field { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.mcp-label { flex: none; width: 92px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: 0.03em; }
.mcp-code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 12px; color: var(--ink); background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 8px; padding: 7px 10px; overflow-x: auto; white-space: nowrap; }
.mcp-code-block { white-space: pre; line-height: 1.45; }
.mcp-field .btn { flex: none; }

/* ── First-run onboarding wizard ─────────────────────────────────────────── */
/* Aligned to the cinematic layer: glass surface, signature brand gradient,
   gradient-soft icon tiles, motion that conveys step state. */
body.ob-open { overflow: hidden; }

.ob-overlay {
  position: fixed; inset: 0; z-index: 120;
  display: grid; place-items: center; padding: 24px;
  background: oklch(20% 0.03 274 / 0.5);
  backdrop-filter: blur(10px) saturate(1.1);
  -webkit-backdrop-filter: blur(10px) saturate(1.1);
  animation: ob-fade 0.25s var(--ease-out);
}
.ob-overlay[hidden] { display: none; }
@keyframes ob-fade { from { opacity: 0; } to { opacity: 1; } }

.ob-modal {
  width: min(940px, calc(100vw - 48px));
  max-height: min(680px, 92vh);
  display: grid; grid-template-columns: 340px minmax(0, 1fr);
  background: var(--glass);
  backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg), var(--hairline-top);
  overflow: hidden;
  animation: ob-rise 0.36s var(--ease-out);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .ob-modal { background: var(--surface); }
}
@keyframes ob-rise {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

/* Brand aside — signature indigo→cyan wash, content centered, brand-lit glyph */
.ob-aside {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 28px 26px;
  color: var(--ink);
  border-right: 1px solid var(--border);
  background:
    radial-gradient(125% 75% at 0% 0%, color-mix(in oklch, var(--brand-1) 24%, transparent), transparent 60%),
    radial-gradient(120% 120% at 100% 100%, color-mix(in oklch, var(--brand-3) 20%, transparent), transparent 58%),
    var(--surface-2);
}
.ob-brand { display: flex; align-items: center; gap: 10px; }
.ob-logo { border-radius: 10px;
  box-shadow: var(--hairline-top), 0 6px 18px color-mix(in oklch, var(--brand-2) 30%, transparent); }
.ob-brand-name { font-weight: 680; font-size: 16px; letter-spacing: -0.02em; }
.ob-aside-main { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.ob-aside-title { font-size: 21px; font-weight: 680; letter-spacing: var(--disp-track); line-height: 1.18; text-wrap: balance; }
.ob-aside-sub { margin: 10px 0 0; color: var(--ink-2); font-size: 13px; line-height: 1.5; }
.ob-points { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.ob-points li { display: flex; gap: 11px; align-items: flex-start; }
/* Soft brand tile — indigo→cyan mixed with transparent (hue-preserving; mixing
   with an opaque surface drifts OKLCH hue toward magenta). */
.ob-point-ic, .ob-feature-ic {
  background: linear-gradient(135deg,
    color-mix(in oklch, var(--brand-1) 20%, transparent),
    color-mix(in oklch, var(--brand-3) 24%, transparent));
}
.ob-point-ic {
  flex: none; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--brand-2);
  box-shadow: var(--hairline-top);
}
.ob-point-ic .ic { width: 16px; height: 16px; }
.ob-points b { display: block; font-size: 13px; font-weight: 590; }
.ob-points span { display: block; color: var(--ink-2); font-size: 12px; margin-top: 1px; line-height: 1.4; }
.ob-steps { display: flex; gap: 7px; }
.ob-step-dot { width: 22px; height: 5px; border-radius: 999px; background: var(--border-strong);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), width 0.3s var(--ease-out); }
.ob-step-dot.is-active { width: 28px; background: var(--grad-brand);
  box-shadow: 0 0 10px color-mix(in oklch, var(--brand-2) 55%, transparent); }

/* Step content */
.ob-content { position: relative; min-width: 0; padding: 34px 34px 28px; overflow-y: auto; }
.ob-skip-x { position: absolute; top: 14px; right: 14px; z-index: 1; }
.ob-step { animation: ob-step-in 0.42s var(--ease-out) both; }
@keyframes ob-step-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.ob-eyebrow { font-size: 11.5px; font-weight: 650; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand-2); }
.ob-title { font-size: 26px; font-weight: 700; letter-spacing: var(--disp-track); margin: 8px 0 0; text-wrap: balance; }
.ob-lead { margin: 9px 0 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 52ch; }

/* Capability list — icon-led, no card chrome (avoids the identical-card-grid look) */
.ob-feature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 22px; margin: 26px 0 28px; }
.ob-feature { display: grid; grid-template-columns: 36px 1fr; column-gap: 12px; align-items: start; }
.ob-feature-ic {
  grid-row: span 2; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  color: var(--brand-2); box-shadow: var(--hairline-top);
}
.ob-feature-ic .ic { width: 17px; height: 17px; }
.ob-feature b { align-self: center; font-size: 13.5px; font-weight: 590; }
.ob-feature p { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); line-height: 1.45; }

.ob-engines { display: flex; flex-direction: column; gap: 14px; margin: 20px 0; }
.ob-engines .setup-card { padding: 16px 18px; }

.ob-success {
  display: flex; align-items: center; gap: 9px; margin: 4px 0 16px;
  padding: 11px 14px; border-radius: var(--r); font-size: 13px; font-weight: 560;
  color: var(--green);
  background: color-mix(in oklch, var(--green) 14%, transparent);
  border: 1px solid color-mix(in oklch, var(--green) 26%, transparent);
  animation: ob-step-in 0.3s var(--ease-out) both;
}
.ob-success .ic { width: 17px; height: 17px; }

.ob-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.btn.is-ready { box-shadow: var(--shadow-sm), 0 0 0 3px var(--ring); }

@media (max-width: 760px) {
  .ob-modal { grid-template-columns: minmax(0, 1fr); max-height: 94vh; }
  .ob-aside { display: none; }
  .ob-content { padding: 26px 22px 22px; }
  .ob-feature-grid { grid-template-columns: 1fr; gap: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .ob-overlay, .ob-modal, .ob-step, .ob-success { animation: none; }
  .ob-step-dot { transition: none; }
}

/* ── INFISICAL PANEL ─────────────────────────────────────────────────────── */
.infisical-form { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin: 10px 0; }
.infisical-form .field { margin: 0; }
#setting-infisical .secret-actions { gap: var(--sp-2); }
#setting-infisical .secret-hint { display: block; margin-top: 6px; word-break: break-all; }
@media (max-width: 720px) { .infisical-form { grid-template-columns: 1fr; } }

/* Customer → Infisical project registry */
.infisical-customers { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.setting-subhead { font-size: 13.5px; font-weight: 650; margin: 0 0 4px; }
.infisical-cust-row { display: grid; grid-template-columns: 1fr 1.6fr auto auto; align-items: center; gap: var(--sp-3);
  padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.infisical-cust-slug { font-weight: 600; }
.infisical-cust-ws { font-family: var(--mono); font-size: 12px; color: var(--ink-2); word-break: break-all; }
.infisical-cust-env { color: var(--ink-3); font-size: 12px; }
.infisical-cust-add { display: grid; grid-template-columns: 1fr 1.6fr 0.7fr auto; gap: var(--sp-2); margin-top: 10px; }
@media (max-width: 720px) { .infisical-cust-row, .infisical-cust-add { grid-template-columns: 1fr; } }
