/* AriaConnectAI — customer app (app-staging / app.ariaconnectai.com).
   Gate 1 Experience V2 design tokens: owner brand board (#2563EB blue,
   #06B6D4 cyan, #D4AF37 gold, #0B0F19 ink, #1C2333 surface, #E5E7EB mist,
   #FFFFFF), Poppins type. The legacy token NAMES (--navy-*, --blue-*, ...)
   are kept so every pre-V2 screen keeps rendering; only their values moved
   to the brand board. Interpreter live surfaces: interpreter.css. Phone and
   small-tablet rules: mobile.css (loaded after this file). */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');

:root {
  /* Brand board */
  --brand-blue: #2563eb;
  --brand-cyan: #06b6d4;
  --brand-gold: #d4af37;
  --brand-ink: #0b0f19;
  --brand-surface: #1c2333;
  --brand-mist: #e5e7eb;
  --brand-white: #ffffff;

  /* Legacy names, brand values */
  --navy-950: #0b0f19;
  --navy-900: #0f1421;
  --navy-850: #151b2b;
  --navy-800: #1c2333;
  --navy-700: #242d42;
  --navy-600: #2e3851;
  --blue-700: #1d4ed8;
  --blue-600: #2563eb;
  --blue-500: #3b82f6;
  --blue-400: #60a5fa;
  --blue-300: #93c5fd;
  --cyan-500: #06b6d4;
  --cyan-400: #22d3ee;
  --gold-500: #d4af37;
  --gold-400: #e0c15a;
  --gold-300: #ebd382;
  --green-500: #10b981;
  --green-400: #34d399;
  --red-500: #ef4444;
  --red-400: #f87171;
  --amber-400: #fbbf24;

  --text: #e5e7eb;
  --text-2: #a3abbb;
  --text-3: #7c8698;
  --surface: #1c2333;
  --surface-2: #222a3d;
  --surface-3: #2a3349;
  --border: rgba(229, 231, 235, 0.08);
  --border-2: rgba(229, 231, 235, 0.14);
  --glass: rgba(28, 35, 51, 0.78);
  --glass-strong: rgba(19, 24, 38, 0.97);
  --shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, 0.28);
  --ring: 0 0 0 3px rgba(37, 99, 235, 0.45);
  --grad-brand: linear-gradient(135deg, var(--brand-blue), var(--brand-cyan));
  --grad-gold: linear-gradient(135deg, #c99a2e, var(--brand-gold) 45%, #ebd382);

  --radius: 18px;
  --radius-md: 14px;
  --radius-sm: 10px;
  --radius-pill: 999px;
  --font-display: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-transcript: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --sidebar-w: 268px;
  --header-h: 64px;
  --tab-h: 72px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body {
  min-height: 100%;
  background: var(--navy-950);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body {
  background:
    radial-gradient(ellipse 70% 45% at 55% -12%, rgba(37, 99, 235, 0.16), transparent 60%),
    radial-gradient(ellipse 35% 35% at 100% 10%, rgba(212, 175, 55, 0.05), transparent 55%),
    radial-gradient(ellipse 45% 35% at 0% 90%, rgba(6, 182, 212, 0.06), transparent 55%),
    var(--navy-950);
  background-attachment: fixed;
}

img { display: block; max-width: 100%; }
button, a, input, select, textarea { font-family: inherit; font-size: inherit; }
button { cursor: pointer; border: none; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }
:focus-visible { outline: 2px solid var(--cyan-400); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg.ic { width: 18px; height: 18px; flex: 0 0 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Local dev banner ── */
.demo-banner {
  position: sticky; top: 0; z-index: 900;
  display: flex; align-items: center; justify-content: center; gap: .6rem;
  padding: .35rem 1rem; text-align: center; flex-wrap: wrap;
  background: linear-gradient(90deg, rgba(212,175,55,.16), rgba(37,99,235,.16));
  border-bottom: 1px solid rgba(212,175,55,.3);
  font-size: .68rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
  color: var(--gold-300);
}
.demo-banner .sep { opacity: .5; }

/* ── Auth gate ── */
.dev-gate { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; }
.dev-gate-card {
  width: min(420px, 100%); background: var(--glass-strong); border: 1px solid var(--border-2);
  border-radius: var(--radius); padding: 2.2rem 2rem; box-shadow: var(--shadow); text-align: center;
}
.dev-gate-card .logo { width: 56px; margin: 0 auto 1.2rem; }
.dev-gate-card h1 { font-size: 1.3rem; margin-bottom: .4rem; }
.dev-gate-card p { color: var(--text-2); font-size: .88rem; margin-bottom: 1.5rem; line-height: 1.55; }
.dev-gate-tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--amber-400); border: 1px solid rgba(251,191,36,.4); border-radius: var(--radius-pill);
  padding: .25rem .7rem; margin-bottom: 1rem;
}

/* ── Buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .68rem 1.15rem; border-radius: var(--radius-sm); font-weight: 600; font-size: .86rem;
  transition: transform .15s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap; line-height: 1.2;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn-primary { background: var(--grad-brand); color: #fff; box-shadow: 0 8px 22px rgba(37,99,235,.28); }
.btn-gold { background: var(--grad-gold); color: #1a1400; box-shadow: 0 8px 22px rgba(212,175,55,.22); }
.btn-ghost { background: rgba(229,231,235,.04); border: 1px solid var(--border-2); color: var(--text); }
.btn-ghost:hover:not(:disabled) { background: rgba(229,231,235,.08); }
.btn-quiet { color: var(--text-2); padding: .5rem .6rem; }
.btn-quiet:hover { color: var(--text); }
.btn-sm { padding: .45rem .8rem; font-size: .78rem; }
.btn-lg { padding: .9rem 1.4rem; font-size: .95rem; border-radius: var(--radius-md); }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn svg.ic { width: 16px; height: 16px; flex-basis: 16px; }

/* ── App shell ── */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex: 0 0 var(--sidebar-w);
  background: linear-gradient(180deg, rgba(15,20,33,.98), rgba(11,15,25,.98));
  border-right: 1px solid var(--border); padding: 1.1rem .9rem 1rem; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
}
.brand { display: flex; align-items: center; gap: .6rem; padding: .3rem .5rem 1.1rem; }
.brand img { width: 30px; }
.brand .wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.04rem; letter-spacing: -.01em; }
.brand .wordmark b { font-weight: 700; background: var(--grad-brand); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sidebar-cta { margin: .2rem 0 1.1rem; }
.sidebar-cta .btn { width: 100%; justify-content: flex-start; padding: .78rem .9rem; }
.sidebar-cta .btn .mini-orb { width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff8, transparent 40%), radial-gradient(circle, #1a1400 0 30%, transparent 32%), conic-gradient(from 0deg, #1a1400, #6b5410, #1a1400); flex: 0 0 18px; }
.nav-group { margin-bottom: 1rem; }
.nav-group-label {
  font-size: .64rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-3); padding: 0 .65rem; margin: .2rem 0 .35rem;
}
.nav-item {
  display: flex; align-items: center; gap: .7rem; padding: .55rem .65rem; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: .86rem; font-weight: 500; margin-bottom: .1rem; position: relative;
  transition: background .15s var(--ease), color .15s var(--ease);
}
.nav-item .ic { opacity: .9; }
.nav-item:hover { background: rgba(229,231,235,.05); color: var(--text); }
.nav-item.active { background: rgba(37,99,235,.15); color: #fff; box-shadow: inset 2px 0 0 var(--blue-500); }
.nav-item.primary { font-size: .9rem; font-weight: 600; color: var(--text); }
.nav-item.sub { font-size: .82rem; }
.nav-pillar-receptionist.active { box-shadow: inset 2px 0 0 var(--gold-500); background: rgba(212,175,55,.1); }
.nav-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--radius-pill); background: var(--gold-500); color: #1a1400; font-size: .68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-foot { margin-top: auto; padding-top: .9rem; border-top: 1px solid var(--border); }
.workspace-chip { display: flex; align-items: center; gap: .6rem; padding: .5rem .55rem; border-radius: var(--radius-sm); }
.workspace-chip .avatar { width: 32px; height: 32px; font-size: .74rem; }
.workspace-chip .meta { min-width: 0; }
.workspace-chip .meta .n { font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.workspace-chip .meta .r { font-size: .7rem; color: var(--text-3); }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: var(--header-h); display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.8rem; border-bottom: 1px solid var(--border); background: rgba(11,15,25,.72);
  position: sticky; top: 0; z-index: 50; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.topbar-left { display: flex; align-items: center; gap: .8rem; min-width: 0; }
.breadcrumbs { font-size: .8rem; color: var(--text-2); display: flex; align-items: center; gap: .4rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.breadcrumbs .cur { color: var(--text); font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: .6rem; }
.icon-btn {
  width: 38px; height: 38px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center;
  background: rgba(229,231,235,.04); border: 1px solid var(--border-2); position: relative; color: var(--text-2);
}
.icon-btn:hover { color: var(--text); background: rgba(229,231,235,.08); }
.icon-btn .dot { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--gold-500); color: #1a1400; font-size: .64rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--navy-950); }
.lang-select { display: flex; gap: .15rem; background: rgba(229,231,235,.04); border: 1px solid var(--border-2); border-radius: var(--radius-pill); padding: .18rem; }
.lang-select button { padding: .28rem .55rem; border-radius: var(--radius-pill); font-size: .72rem; font-weight: 600; color: var(--text-2); }
.lang-select button.on { background: var(--blue-600); color: #fff; }
.account-menu { display: flex; align-items: center; gap: .5rem; padding: .28rem .6rem .28rem .28rem; border-radius: var(--radius-pill); border: 1px solid var(--border-2); background: rgba(229,231,235,.03); cursor: pointer; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--grad-brand); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .76rem; color: #fff; flex: 0 0 auto; }
.avatar.gold { background: var(--grad-gold); color: #1a1400; }
.account-menu .name { font-size: .8rem; font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.mobile-topbar { display: none; }
.tabbar { display: none; }

.route-outlet { padding: 1.8rem 2rem 3.5rem; max-width: 1320px; width: 100%; margin: 0 auto; }
.page-head { margin-bottom: 1.5rem; }
.page-kicker { font-size: .7rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-300); margin-bottom: .35rem; }
.page-kicker.interpreter { color: var(--cyan-400); }
.page-kicker.is-workspace { text-transform: none; letter-spacing: .02em; font-size: .8rem; }
.page-title-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.6rem; font-weight: 600; line-height: 1.2; }
.page-sub { color: var(--text-2); font-size: .9rem; margin-top: .35rem; max-width: 66ch; }
.page-actions { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* ── Cards / grids ── */
.metric-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.metric-card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 1.05rem 1.2rem; }
.metric-card .v { font-family: var(--font-display); font-size: 1.6rem; font-weight: 600; line-height: 1.25; }
.metric-card .l { font-size: .76rem; color: var(--text-2); margin-top: .2rem; }
.panel { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.35rem; margin-bottom: 1.2rem; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; gap: 1rem; flex-wrap: wrap; }
.panel-head h3 { font-size: 1rem; font-weight: 600; }
.panel-head .hint { font-size: .74rem; color: var(--text-3); }
.card { background: var(--glass); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; }
.card-link { transition: border-color .2s var(--ease), transform .2s var(--ease), background .2s var(--ease); }
.card-link:hover { border-color: rgba(37,99,235,.45); transform: translateY(-2px); background: rgba(34,42,61,.85); }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.stack > * + * { margin-top: 1.2rem; }

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.data-table th { text-align: left; color: var(--text-3); font-weight: 600; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; padding: .55rem .7rem; border-bottom: 1px solid var(--border); }
.data-table td { padding: .72rem .7rem; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table a[data-route] { color: var(--blue-300); }
.table-scroll { overflow-x: auto; }

/* ── Badges / chips ── */
.badge { display: inline-flex; align-items: center; gap: .35rem; padding: .2rem .58rem; border-radius: var(--radius-pill); font-size: .7rem; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: rgba(52,211,153,.12); color: var(--green-400); }
.badge-live { background: rgba(239,68,68,.12); color: var(--red-400); }
.badge-warn { background: rgba(251,191,36,.12); color: var(--amber-400); }
.badge-neutral { background: rgba(163,171,187,.12); color: var(--text-2); }
.badge-info { background: rgba(96,165,250,.12); color: var(--blue-300); }
.badge-gold { background: rgba(212,175,55,.14); color: var(--gold-300); }
.chip { display: inline-flex; align-items: center; gap: .35rem; padding: .22rem .6rem; border-radius: var(--radius-pill); font-size: .7rem; font-weight: 600; background: rgba(229,231,235,.06); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.chip.kind-call { color: var(--gold-300); background: rgba(212,175,55,.1); border-color: rgba(212,175,55,.25); }
.chip.kind-interpreter { color: var(--cyan-400); background: rgba(6,182,212,.1); border-color: rgba(6,182,212,.25); }
.chip.source { font-weight: 500; }
.muted { color: var(--text-2); }
.muted-sm { font-size: .75rem; color: var(--text-3); margin-top: .15rem; line-height: 1.4; }

/* ── States: empty / loading / error / setup-required ── */
.state-block { padding: 2.4rem 1.5rem; text-align: center; border-radius: var(--radius); border: 1px dashed var(--border-2); }
.state-icon { width: 46px; height: 46px; border-radius: 14px; margin: 0 auto .9rem; display: flex; align-items: center; justify-content: center; background: rgba(229,231,235,.05); font-size: 1.25rem; }
.state-title { font-weight: 600; margin-bottom: .3rem; }
.state-sub { color: var(--text-2); font-size: .86rem; max-width: 46ch; margin: 0 auto 1rem; }
.state-setup .state-icon { color: var(--gold-400); }
.state-error .state-icon { color: var(--red-500); }
.state-loading .spinner, .spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid rgba(229,231,235,.12); border-top-color: var(--blue-400); animation: spin .8s linear infinite; margin: 0 auto .8rem; }
.inline-state { padding: 1.1rem; text-align: center; color: var(--text-2); font-size: .84rem; }
.inline-state .spinner { width: 20px; height: 20px; border-width: 2px; margin-bottom: .4rem; }
.skeleton { background: linear-gradient(90deg, rgba(229,231,235,.04), rgba(229,231,235,.09), rgba(229,231,235,.04)); background-size: 200% 100%; animation: shimmer 1.4s ease-in-out infinite; border-radius: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ── Form fields ── */
.field-label { display: block; font-size: .78rem; font-weight: 600; color: var(--text-2); margin-bottom: .4rem; }
.select-field { width: 100%; background: rgba(229,231,235,.04); border: 1px solid var(--border-2); color: var(--text); border-radius: var(--radius-sm); padding: .85rem 1rem; font-size: 1rem; font-weight: 600; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-2) 50%), linear-gradient(135deg, var(--text-2) 50%, transparent 50%); background-position: calc(100% - 1.2rem) 1.15rem, calc(100% - 0.9rem) 1.15rem; background-size: 6px 6px; background-repeat: no-repeat; }
.select-field option { background: var(--navy-800); }
.select-field:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 2px; }
.lang-picker-row { display: flex; align-items: flex-end; gap: .8rem; margin: 1rem 0; }
.lang-picker-row > div { flex: 1; }
.lang-swap-btn { flex: 0 0 auto; width: 2.8rem; height: 2.8rem; border-radius: 50%; border: 1px solid var(--border-2); background: rgba(229,231,235,.05); color: var(--text); font-size: 1.1rem; cursor: pointer; transition: transform .25s var(--ease); }
.lang-swap-btn:hover { background: rgba(229,231,235,.1); transform: rotate(180deg); }
.check-row { display: flex; align-items: flex-start; gap: .65rem; font-size: .86rem; color: var(--text-2); }
.check-row input { margin-top: .25rem; accent-color: var(--blue-600); width: 16px; height: 16px; }

/* Segmented control (filters, language preference) */
.segmented { display: inline-flex; gap: .2rem; padding: .22rem; border-radius: var(--radius-pill); background: rgba(229,231,235,.04); border: 1px solid var(--border-2); }
.segmented button { padding: .4rem .9rem; border-radius: var(--radius-pill); font-size: .78rem; font-weight: 600; color: var(--text-2); }
.segmented button.on, .segmented button[aria-pressed="true"] { background: var(--blue-600); color: #fff; }

/* ── Step indicator (setup wizards) ── */
.step-indicator { display: flex; align-items: center; gap: .5rem; margin-bottom: 1.4rem; font-size: .78rem; color: var(--text-3); flex-wrap: wrap; }
.step-indicator .step { display: flex; align-items: center; gap: .45rem; }
.step-indicator .num { width: 1.65rem; height: 1.65rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(229,231,235,.06); font-weight: 600; }
.step-indicator .step.current { color: var(--text); }
.step-indicator .step.current .num { background: var(--blue-600); color: #fff; box-shadow: 0 0 0 4px rgba(37,99,235,.18); }
.step-indicator .step.done .num { background: var(--green-400); color: #06281c; }
.step-indicator .sep { width: 1.4rem; height: 1px; background: var(--border-2); }

/* ── Product flow (Template → Agent created → Test → Configure → Pay → Publish) ── */
.flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5rem; counter-reset: flow; }
.flow-step { position: relative; padding: .8rem .85rem .85rem; border-radius: var(--radius-md); background: rgba(229,231,235,.03); border: 1px solid var(--border); min-width: 0; }
.flow-step .n { font-size: .64rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); display: flex; align-items: center; gap: .35rem; }
.flow-step .n::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--text-3); }
.flow-step .t { font-size: .86rem; font-weight: 600; margin-top: .3rem; }
.flow-step .s { font-size: .72rem; color: var(--text-2); margin-top: .2rem; line-height: 1.35; }
.flow-step.done { border-color: rgba(52,211,153,.28); }
.flow-step.done .n { color: var(--green-400); }
.flow-step.done .n::before { background: var(--green-400); }
.flow-step.current { border-color: rgba(37,99,235,.55); background: rgba(37,99,235,.09); }
.flow-step.current .n { color: var(--blue-300); }
.flow-step.current .n::before { background: var(--blue-400); box-shadow: 0 0 0 4px rgba(96,165,250,.2); }
.flow-step.blocked .n { color: var(--amber-400); }
.flow-step.blocked .n::before { background: var(--amber-400); }

/* ── Live transcript columns (shared with interpreter.css) ── */
.transcript-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.transcript-cols .col-head { font-size: .68rem; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: .6rem; }
.transcript-cols .col-body { min-height: 120px; max-height: 320px; overflow-y: auto; }
.transcript-line { padding: .55rem 0; border-bottom: 1px solid var(--border); font-family: var(--font-transcript); font-size: .92rem; }
.transcript-line.interim { color: var(--text-3); font-style: italic; }

/* ── Dialogs ── */
.dialog-backdrop { position: fixed; inset: 0; background: rgba(5,8,14,.72); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1.2rem; }
.dialog { width: min(440px, 100%); background: var(--glass-strong); border: 1px solid var(--border-2); border-radius: var(--radius); padding: 1.6rem; box-shadow: var(--shadow); }
.dialog-lg { width: min(680px, 100%); max-height: 88vh; overflow-y: auto; }
.dialog-xl { width: min(880px, 100%); max-height: 90vh; overflow-y: auto; }
.dialog h3 { margin-bottom: .5rem; }
.dialog p { color: var(--text-2); font-size: .88rem; margin-bottom: 1.2rem; }
.dialog-actions { display: flex; gap: .6rem; justify-content: flex-end; }
.dialog-close { position: sticky; top: 0; float: right; }

/* ── Notification flyout ── */
.notif-panel { position: fixed; right: 1.5rem; top: calc(var(--header-h) + 8px); width: 360px; max-width: calc(100vw - 2rem); background: var(--glass-strong); border: 1px solid var(--border-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: .6rem; z-index: 200; max-height: 70vh; overflow-y: auto; }
.notif-panel .notif-head { display: flex; justify-content: space-between; align-items: center; padding: .4rem .6rem .6rem; font-size: .8rem; font-weight: 600; }
.notif-item { padding: .7rem .7rem; border-radius: var(--radius-sm); display: flex; gap: .65rem; align-items: flex-start; }
.notif-item:hover { background: rgba(229,231,235,.04); }
.notif-item .t { font-weight: 600; font-size: .84rem; }
.notif-item .d { font-size: .78rem; color: var(--text-2); margin-top: .1rem; }
.notif-item .ts { font-size: .7rem; color: var(--text-3); margin-top: .3rem; }

/* ── Alerts (derived from live workspace state) ── */
.alert-list { display: flex; flex-direction: column; gap: .55rem; }
.alert { display: flex; gap: .75rem; align-items: flex-start; padding: .8rem .9rem; border-radius: var(--radius-md); border: 1px solid var(--border); background: rgba(229,231,235,.03); }
.alert .sev { width: 30px; height: 30px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex: 0 0 30px; background: rgba(229,231,235,.06); }
.alert.warn .sev { color: var(--amber-400); background: rgba(251,191,36,.1); }
.alert.error .sev { color: var(--red-400); background: rgba(239,68,68,.1); }
.alert.info .sev { color: var(--blue-300); background: rgba(96,165,250,.1); }
.alert .body { flex: 1; min-width: 0; }
.alert .t { font-size: .85rem; font-weight: 600; }
.alert .d { font-size: .78rem; color: var(--text-2); margin-top: .1rem; }
.alert .act { flex: 0 0 auto; align-self: center; }

/* ── lang visibility (same pattern as the public site: [data-lang] on <html>) ── */
[data-lang] .en, [data-lang] .es, [data-lang] .pt { display: none; }
html[data-lang="en"] .en, html[data-lang="es"] .es, html[data-lang="pt"] .pt { display: inline; }
h1[data-lang] .en, .block-i18n.en { display: none; }
html[data-lang="en"] .block-i18n.en, html[data-lang="es"] .block-i18n.es, html[data-lang="pt"] .block-i18n.pt { display: block; }

/* ── Legacy interpreter surfaces still used by the wizard and session detail ── */
.live-stage { text-align: center; padding: 2rem 1rem; }
.live-pill { display: inline-flex; align-items: center; gap: .45rem; padding: .32rem .85rem; border-radius: var(--radius-pill); background: rgba(229,231,235,.07); color: var(--text-2); font-weight: 600; font-size: .76rem; }
.live-pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--blue-400); }
.live-pill.is-live { background: rgba(52,211,153,.12); color: #86efac; }
.live-pill.is-live::before { background: #22c55e; box-shadow: 0 0 0 4px rgba(34,197,94,.18); }
.live-pill.is-warn { background: rgba(251,191,36,.12); color: var(--amber-400); }
.live-pill.is-warn::before { background: var(--amber-400); }
.live-timer { font-family: var(--font-display); font-size: 2.2rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.lang-pair-row { display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.2rem auto; max-width: 420px; }
.lang-pill { flex: 1; background: rgba(229,231,235,.03); border: 1px solid var(--border-2); border-radius: var(--radius-md); padding: .75rem; text-align: center; }
.lang-pill .code { font-family: var(--font-display); font-weight: 600; font-size: 1rem; }
.lang-pill .role { font-size: .7rem; color: var(--text-2); margin-top: .1rem; }
.audio-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; max-width: 460px; margin: 1.4rem auto; }
.audio-btn { padding: .9rem .5rem; border-radius: var(--radius-md); border: 1px solid var(--border-2); background: rgba(229,231,235,.04); font-size: .76rem; font-weight: 600; cursor: pointer; }
.audio-btn.active { background: rgba(239,68,68,.16); border-color: rgba(239,68,68,.4); color: #fca5a5; }
.transcript-turn { max-width: 78%; margin-bottom: .9rem; background: rgba(229,231,235,.03); border: 1px solid var(--border); border-radius: var(--radius-md); padding: .8rem 1rem; }
.transcript-turn.b { margin-left: auto; background: rgba(37,99,235,.08); border-color: rgba(37,99,235,.25); }
.transcript-turn .meta { display: flex; justify-content: space-between; font-size: .68rem; color: var(--text-3); margin-bottom: .3rem; text-transform: uppercase; letter-spacing: .06em; gap: .6rem; }
.transcript-turn .src { font-family: var(--font-transcript); }
.transcript-turn .tr { color: var(--blue-300); margin-top: .35rem; padding-top: .35rem; border-top: 1px dashed var(--border-2); }
.transcript-turn.interim .src { color: var(--text-2); font-style: italic; }

/* ═══════════════════ V2 SCREENS ═══════════════════ */

/* ── Home ── */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 1.2rem; margin-bottom: 1.2rem; }
.hero-card { position: relative; overflow: hidden; border-radius: var(--radius); padding: 1.6rem; border: 1px solid var(--border-2); background:
  radial-gradient(ellipse 60% 80% at 85% 50%, rgba(6,182,212,.16), transparent 60%),
  radial-gradient(ellipse 50% 70% at 70% 20%, rgba(37,99,235,.22), transparent 60%),
  linear-gradient(135deg, rgba(28,35,51,.95), rgba(17,22,35,.95)); min-height: 196px; display: flex; flex-direction: column; justify-content: space-between; gap: 1rem; }
.hero-card h2 { font-size: 1.3rem; font-weight: 600; max-width: 24ch; }
.hero-card p { color: var(--text-2); font-size: .86rem; max-width: 40ch; margin-top: .35rem; }
.hero-card .hero-orb { position: absolute; right: 1.6rem; top: 50%; transform: translateY(-50%); width: 132px; height: 132px; pointer-events: none; }
.hero-card.create { background: radial-gradient(ellipse 70% 80% at 90% 10%, rgba(212,175,55,.14), transparent 60%), linear-gradient(135deg, rgba(28,35,51,.95), rgba(17,22,35,.95)); }
.hero-card .kicker { font-size: .68rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan-400); }
.hero-card.create .kicker { color: var(--gold-300); }
.quick-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .7rem; margin-bottom: 1.4rem; }
.qa { display: flex; align-items: center; gap: .7rem; padding: .85rem .95rem; border-radius: var(--radius-md); background: rgba(229,231,235,.035); border: 1px solid var(--border); font-size: .84rem; font-weight: 600; text-align: left; transition: border-color .2s var(--ease), background .2s var(--ease); }
.qa:hover { border-color: rgba(37,99,235,.45); background: rgba(37,99,235,.08); }
.qa .qa-ic { width: 34px; height: 34px; border-radius: 11px; display: flex; align-items: center; justify-content: center; background: rgba(37,99,235,.14); color: var(--blue-300); flex: 0 0 34px; }
.qa.gold .qa-ic { background: rgba(212,175,55,.14); color: var(--gold-300); }
.qa.cyan .qa-ic { background: rgba(6,182,212,.14); color: var(--cyan-400); }
.qa .qa-sub { display: block; font-size: .7rem; font-weight: 500; color: var(--text-3); margin-top: .05rem; }
.today-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; margin-bottom: 1.2rem; }
.today-strip .metric-card { padding: .9rem 1rem; }
.today-strip .metric-card .v { font-size: 1.35rem; }

/* list rows used by Home recents, Conversations, Agents */
.row-list { display: flex; flex-direction: column; }
.row-item { display: flex; align-items: center; gap: .85rem; padding: .8rem .4rem; border-bottom: 1px solid var(--border); border-radius: 0; transition: background .15s var(--ease); }
.row-item:last-child { border-bottom: none; }
a.row-item:hover { background: rgba(229,231,235,.035); border-radius: var(--radius-sm); }
.row-item .lead-ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex: 0 0 38px; }
.row-item .lead-ic.call { background: rgba(212,175,55,.12); color: var(--gold-300); }
.row-item .lead-ic.interpreter { background: rgba(6,182,212,.12); color: var(--cyan-400); }
.row-item .main-col { flex: 1; min-width: 0; }
.row-item .title { font-size: .88rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-item .sub { font-size: .76rem; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: .05rem; }
.row-item .side { display: flex; flex-direction: column; align-items: flex-end; gap: .25rem; flex: 0 0 auto; }
.row-item .time { font-size: .72rem; color: var(--text-3); white-space: nowrap; }

/* Agent cards */
.agent-card { display: flex; flex-direction: column; gap: .9rem; }
.agent-card .top { display: flex; gap: .8rem; align-items: center; }
.agent-avatar { width: 46px; height: 46px; border-radius: 15px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; flex: 0 0 46px; color: #fff; background: var(--grad-brand); box-shadow: 0 8px 20px rgba(37,99,235,.25); }
.agent-avatar.receptionist { background: var(--grad-gold); color: #1a1400; box-shadow: 0 8px 20px rgba(212,175,55,.2); }
.agent-avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 1.25rem; flex-basis: 64px; }
.agent-card .name { font-size: .98rem; font-weight: 600; }
.agent-card .facts { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; font-size: .78rem; }
.agent-card .facts dt { color: var(--text-3); }
.agent-card .facts dd { color: var(--text); min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.agent-card .foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; margin-top: auto; padding-top: .8rem; border-top: 1px solid var(--border); }

/* Templates (Create agent) */
.template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1rem; }
.template { border-radius: var(--radius); border: 1px solid var(--border-2); padding: 1.2rem; background: rgba(229,231,235,.03); display: flex; flex-direction: column; gap: .7rem; }
.template h4 { font-size: 1rem; font-weight: 600; }
.template p { margin: 0; font-size: .82rem; }
.template .avail { font-size: .78rem; color: var(--text-2); border-top: 1px solid var(--border); padding-top: .7rem; margin-top: auto; }
.template .avail .actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }

/* Agent Studio */
.studio-head { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.2rem; }
.studio-head .who { flex: 1; min-width: 220px; }
.studio-head h1 { font-size: 1.5rem; font-weight: 600; }
.studio-head .chips { display: flex; gap: .4rem; flex-wrap: wrap; margin-top: .35rem; }
.studio-flow { margin-bottom: 1.4rem; }
.studio-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.studio-rail { position: sticky; top: calc(var(--header-h) + 1rem); display: flex; flex-direction: column; gap: .1rem; }
.studio-rail a { padding: .48rem .7rem; border-radius: var(--radius-sm); font-size: .82rem; color: var(--text-2); display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.studio-rail a:hover { color: var(--text); background: rgba(229,231,235,.04); }
.studio-rail a .st { width: 7px; height: 7px; border-radius: 50%; background: var(--text-3); flex: 0 0 7px; }
.studio-rail a .st.ok { background: var(--green-400); }
.studio-rail a .st.warn { background: var(--amber-400); }
.studio-rail a .st.na { background: transparent; border: 1px solid var(--text-3); }
.studio-sections { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.studio-section { scroll-margin-top: calc(var(--header-h) + 1rem); }
.studio-section .sec-head { display: flex; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.studio-section .sec-head h3 { font-size: .98rem; font-weight: 600; display: flex; align-items: center; gap: .55rem; }
.studio-section .sec-head h3 .ic { color: var(--blue-300); }
.kv { display: grid; grid-template-columns: minmax(120px, 200px) minmax(0, 1fr); gap: .55rem 1rem; font-size: .84rem; }
.kv dt { color: var(--text-2); }
.kv dd { min-width: 0; overflow-wrap: anywhere; }
.studio-note { font-size: .78rem; color: var(--text-3); margin-top: .8rem; line-height: 1.45; }
.term-list { display: flex; flex-wrap: wrap; gap: .4rem; }

/* Conversations */
.conv-toolbar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; margin-bottom: 1rem; }
.source-note { font-size: .78rem; color: var(--text-2); padding: .6rem .8rem; border-radius: var(--radius-sm); background: rgba(229,231,235,.04); border: 1px solid var(--border); margin-bottom: .9rem; }
.conv-detail-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.conv-meta { display: flex; gap: .5rem 1.2rem; flex-wrap: wrap; font-size: .8rem; color: var(--text-2); margin-top: .5rem; }
.conv-meta b { color: var(--text); font-weight: 600; }
.turns { display: flex; flex-direction: column; gap: .7rem; }
.turn { max-width: 86%; padding: .75rem .95rem; border-radius: 16px; background: rgba(229,231,235,.04); border: 1px solid var(--border); }
.turn .who { font-size: .66rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: .2rem; }
.turn .txt { font-size: .9rem; line-height: 1.55; }
.turn.agent, .turn.interpretation { margin-left: auto; background: rgba(37,99,235,.1); border-color: rgba(37,99,235,.28); }
.turn.interpretation .who { color: var(--cyan-400); }
.turn.caller .who, .turn.original .who { color: var(--gold-300); }
.turn.provisional .txt { color: var(--text-2); font-style: italic; }
.section-list { display: flex; flex-direction: column; gap: .4rem; font-size: .85rem; }
.section-list li { display: flex; gap: .5rem; }
.section-list li::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--blue-400); margin-top: .5rem; flex: 0 0 6px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1.2rem; align-items: start; }
.ent-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.ent-row:last-child { border-bottom: none; }

/* ── Tablet ── */
@media (min-width: 961px) and (max-width: 1180px) {
  :root { --sidebar-w: 232px; }
  .route-outlet { padding: 1.5rem 1.5rem 3rem; }
  .home-hero { grid-template-columns: 1fr 1fr; }
  .hero-card .hero-orb { width: 96px; height: 96px; right: 1rem; }
  .grid-2, .conv-detail-grid { grid-template-columns: minmax(0, 1fr); }
  .studio-layout { grid-template-columns: 190px minmax(0, 1fr); }
  .flow { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .today-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

/* ── Review-only chrome (local dev / capture, never ships) ── */
.dev-route-bar { position: sticky; top: 0; z-index: 950; background: var(--navy-900); border-bottom: 1px solid var(--border-2); padding: .5rem .8rem; display: flex; gap: .35rem; flex-wrap: wrap; }
.dev-route-bar a { font-size: .68rem; padding: .25rem .55rem; border-radius: var(--radius-sm); background: rgba(229,231,235,.04); color: var(--text-2); border: 1px solid var(--border); }
.dev-route-bar a.active { background: rgba(37,99,235,.18); color: var(--text); border-color: var(--blue-500); }

/* P1-CANONICAL-APP (2026-08-27) — an agent can have several provider links,
   so the provider cell stacks one badge per link. */
.provider-line { margin: 0 0 .25rem; }
.provider-line:last-child { margin-bottom: 0; }

/* Business Vocabulary panel (Agent Studio, K2) */
.text-field { width: 100%; background: rgba(229,231,235,.04); border: 1px solid var(--border-2); color: var(--text); border-radius: var(--radius-sm); padding: .6rem .8rem; font-size: .86rem; }
.text-field::placeholder { color: var(--text-3); }
.text-field:focus-visible { outline: 2px solid var(--blue-400); outline-offset: 1px; }
.select-field.sm { padding: .6rem 2rem .6rem .8rem; font-size: .84rem; font-weight: 500; background-position: calc(100% - 1.05rem) .95rem, calc(100% - .75rem) .95rem; }
.vocab-live { font-size: .84rem; color: var(--text-2); padding: .65rem .8rem; border-radius: var(--radius-sm); background: rgba(6,182,212,.07); border: 1px solid rgba(6,182,212,.2); margin-bottom: .9rem; }
.vocab-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.vocab-col { border: 1px solid var(--border); border-radius: var(--radius-md); padding: .9rem; background: rgba(229,231,235,.02); display: flex; flex-direction: column; gap: .7rem; min-width: 0; }
.vocab-col-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.vocab-col-head h4 { font-size: .88rem; font-weight: 600; }
.vocab-form { display: grid; gap: .5rem; padding-top: .7rem; border-top: 1px dashed var(--border-2); }
.vocab-form .check-row { font-size: .78rem; }
.vocab-actions:empty { display: none; }
.vocab-msg { font-size: .8rem; margin-bottom: .7rem; }
.vocab-msg.ok { color: var(--green-400); }
.vocab-msg.err { color: var(--amber-400); }
.chip svg.ic { margin-right: .1rem; color: var(--gold-300); }
@media (max-width: 960px) { .vocab-grid { grid-template-columns: 1fr; } }
