/* ============================================================
   ZYORA — Theme layer (deep teal + one marigold highlight)
   Loads LAST (after pro.css, smooth.css, perf.css) from includes/header.php.
   Pure look. No behaviour. Old variable names keep working: they are
   re-pointed to the teal palette here, so every page picks it up.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,wght@12..96,600;12..96,700&family=Figtree:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- 1. Tokens (re-declared because pro.css re-declares them) ---------- */
:root {
  --bg: #F4F7F7;
  --surface: #FFFFFF;
  --surface-2: #E9F0F0;
  --surface-3: #DDE8E8;
  --border: #D6E2E2;
  --border-strong: #BFD0D0;

  --text: #0B2A2F;
  --text-soft: #3E5A5E;
  --text-muted: #5F797C;
  --text-faint: #9DB3B4;

  --accent: #0B756D;
  --accent-hover: #095F59;
  --accent-soft: rgba(11, 117, 109, 0.08);
  --focus-ring: 0 0 0 3px rgba(11, 117, 109, 0.22);
  --on-accent: #FFFFFF;

  --ink: #0B2A2F; --ink-2: #3E5A5E; --ink-3: #5F797C;
  --btn-bg: #0B756D; --btn-bg-h: #095F59; --btn-fg: #FFFFFF; --link: #0A6B64;
  --deep: #0A2F34; --deep-2: #0F4046; --deep-ink: #E7F5F3; --deep-ink-2: #A9CBC9; --deep-line: #1D5258;
  --sun: #F2A33A; --sun-soft: #FDF0DA; --sun-ink: #3B2400;

  --success: #12805C; --success-bg: #E3F5EE;
  --warning: #A76505; --warning-bg: #FDF0DA;
  --danger:  #C62828; --danger-bg:  #FDECEC;
  --info:    #0A6B64; --info-bg:    #E0F2F0;

  --peach-bg: #FDECDD; --peach-fg: #A85A13;
  --lav-bg:   #ECE8FA; --lav-fg:   #5538A8;
  --cyan-bg:  #DDF1F1; --cyan-fg:  #0A6B78;
  --pink-bg:  #FBE8F0; --pink-fg:  #9C1A5C;
  --mint-bg:  #E3F5EE; --mint-fg:  #12805C;
  --sand-bg:  #FDF0DA; --sand-fg:  #8A5A06;

  --r-md: 12px; --r-lg: 16px; --r-xl: 20px; --r-2xl: 24px;

  --font: 'Figtree', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --sh-xs: 0 1px 2px rgba(10, 47, 52, 0.05);
  --sh-sm: 0 1px 3px rgba(10, 47, 52, 0.07), 0 1px 2px rgba(10, 47, 52, 0.04);
  --sh-md: 0 6px 16px -4px rgba(10, 47, 52, 0.12), 0 2px 4px rgba(10, 47, 52, 0.05);
  --sh-lg: 0 16px 36px -14px rgba(10, 47, 52, 0.22), 0 4px 8px rgba(10, 47, 52, 0.05);
  --sh-xl: 0 30px 60px -32px rgba(10, 47, 52, 0.38);
}

html[data-theme="dark"] {
  --bg: #07191C;
  --surface: #0C2428;
  --surface-2: #10302F;
  --surface-3: #163B3C;
  --border: #1B3D40;
  --border-strong: #285055;

  --text: #E9F4F3;
  --text-soft: #A9C4C4;
  --text-muted: #86A3A4;
  --text-faint: #4F6B6D;

  --accent: #2DD4BF;
  --accent-hover: #5EEAD4;
  --accent-soft: rgba(45, 212, 191, 0.12);
  --focus-ring: 0 0 0 3px rgba(45, 212, 191, 0.28);
  --on-accent: #04252A;

  --ink: #E9F4F3; --ink-2: #A9C4C4; --ink-3: #86A3A4;
  --btn-bg: #2DD4BF; --btn-bg-h: #5EEAD4; --btn-fg: #04252A; --link: #5EEAD4;
  --deep: #0E3A40; --deep-2: #14505A; --deep-line: #256A72;
  --sun-soft: #3A2B10; --sun-ink: #FBD99A;

  --success: #4ADE9E; --success-bg: rgba(74, 222, 158, 0.12);
  --warning: #FBBF24; --warning-bg: rgba(251, 191, 36, 0.12);
  --danger:  #F87171; --danger-bg:  rgba(248, 113, 113, 0.12);
  --info:    #5EEAD4; --info-bg:    rgba(94, 234, 212, 0.10);

  --peach-bg: rgba(253, 232, 216, 0.12); --peach-fg: #F8C39B;
  --lav-bg:   rgba(233, 227, 255, 0.12); --lav-fg:   #C4B6FF;
  --cyan-bg:  rgba(94, 234, 212, 0.12);  --cyan-fg:  #7FE3D6;
  --pink-bg:  rgba(252, 231, 243, 0.12); --pink-fg:  #F3A8C8;
  --mint-bg:  rgba(74, 222, 158, 0.12);  --mint-fg:  #8FD5AB;
  --sand-bg:  rgba(251, 191, 36, 0.12);  --sand-fg:  #E5C77B;

  --sh-xs: 0 1px 2px rgba(0, 0, 0, 0.45);
  --sh-sm: 0 1px 3px rgba(0, 0, 0, 0.5), 0 1px 2px rgba(0, 0, 0, 0.3);
  --sh-md: 0 6px 16px -4px rgba(0, 0, 0, 0.55), 0 2px 4px rgba(0, 0, 0, 0.3);
  --sh-lg: 0 16px 36px -14px rgba(0, 0, 0, 0.6), 0 4px 8px rgba(0, 0, 0, 0.3);
  --sh-xl: 0 30px 60px -32px rgba(0, 0, 0, 0.7);
}

/* ---------- 2. Type ---------- */
[hidden] { display: none !important; }
body { font-family: var(--font); font-feature-settings: normal; letter-spacing: 0; }
h1, h2, h3,
.page-hd h1, .dash-hero .g2, .card__title, .plan-name, .plan-price,
.adm-hd h1, .bots-hd h1, .be-hd h1 {
  font-family: var(--font-display);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
h1 { font-weight: 700; }
h2, h3 { font-weight: 600; }
a:not([class]) { color: var(--link); }
::selection { background: rgba(11, 117, 109, 0.22); }
html[data-theme="dark"] ::selection { background: rgba(45, 212, 191, 0.3); }

/* ---------- 3. Top bar and brand mark ---------- */
.topbar {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  border-bottom: 1px solid var(--border);
}
.topbar .brand {
  gap: 9px;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text);
}
/* The old round dot becomes the ZYORA chat-bubble mark (no markup change). */
.topbar .brand__dot, .brand__dot {
  width: 26px; height: 26px;
  border-radius: 0;
  box-shadow: none;
  flex: 0 0 26px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%2318BFAE'/%3E%3Cstop offset='1' stop-color='%230A5560'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M20 4h24a16 16 0 0 1 16 16v16a16 16 0 0 1-16 16H31L16 62V51.4A16 16 0 0 1 4 36V20A16 16 0 0 1 20 4z' fill='url(%23g)'/%3E%3Cpath d='M21 21h22L21 37h22' fill='none' stroke='%23fff' stroke-width='5.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3Ccircle cx='49' cy='15' r='4.6' fill='%23F2A33A'/%3E%3C/svg%3E") center / contain no-repeat;
}
.topbar__balance { border-color: var(--border); background: var(--surface); color: var(--text-soft); }
.topbar__balance:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.topbar__balance.is-empty { background: var(--danger-bg); }
.topbar .icon-btn:hover { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

.topnav__link { color: var(--text-soft); border-radius: 10px; }
.topnav__link:hover { background: var(--accent-soft); color: var(--accent); }
.topnav__link.is-active { background: var(--accent-soft); color: var(--accent); }

@media (max-width: 899.98px) {
  .bottom-nav { background: color-mix(in srgb, var(--surface) 94%, transparent); border-top: 1px solid var(--border); }
  .bottom-nav__link { color: var(--text-muted); }
  .bottom-nav__link.is-active { color: var(--accent) !important; }
  .bottom-nav__link.is-active::before { background: var(--accent); width: 24px; margin-left: -12px; }
}

/* ---------- 4. Buttons, fields, focus ---------- */
.btn { border-radius: 12px; font-weight: 600; letter-spacing: 0; }
.btn--primary { background: var(--btn-bg); color: var(--btn-fg); border-color: transparent; }
.btn--primary:hover { background: var(--btn-bg-h); box-shadow: 0 6px 14px -6px rgba(11, 117, 109, 0.55); }
.btn--secondary { background: var(--surface); border-color: var(--border-strong); color: var(--text); }
.btn--secondary:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.btn--ghost:hover { background: var(--accent-soft); color: var(--accent); }
.dash-hero .abtn.primary { background: var(--btn-bg) !important; color: var(--btn-fg) !important; }
.dash-hero .abtn { border-radius: 12px; }
.dash-hero .abtn:hover { background: var(--accent-soft) !important; border-color: var(--accent) !important; }
.dash-hero .abtn.primary:hover { background: var(--btn-bg-h) !important; opacity: 1 !important; }

.input, .select, .textarea { border-radius: 12px; border-color: var(--border-strong); background: var(--surface); }
.input:hover, .select:hover, .textarea:hover { border-color: var(--accent); }
.input:focus, .select:focus, .textarea:focus,
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(11, 117, 109, 0.18);
  outline: 0;
}
html[data-theme="dark"] .input:focus, html[data-theme="dark"] .select:focus, html[data-theme="dark"] .textarea:focus,
html[data-theme="dark"] input:focus, html[data-theme="dark"] select:focus, html[data-theme="dark"] textarea:focus {
  box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.22);
}
/* thin keyboard ring on links and buttons only (no ring when tapping with a finger) */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
a:focus:not(:focus-visible), button:focus:not(:focus-visible) { outline: 0; }

/* ---------- 5. Cards, badges, tabs, tables ---------- */
.card, .adm-card, .dash-card, .acct-group, .pf-savebar, .kb-card, .be-card, .plan-card, .cw-card, .current-card, .usage-card {
  border-radius: 18px;
  border-color: var(--border);
  background: var(--surface);
}
.card--interactive:hover, .dash-card:hover, .plan-card:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--border));
  box-shadow: var(--sh-md);
}
.dash-hero {
  border-radius: 22px;
  background:
    radial-gradient(120% 160% at 0% 0%, color-mix(in srgb, var(--accent) 11%, transparent), transparent 62%),
    var(--surface);
  box-shadow: var(--sh-sm);
}
.badge--accent { background: var(--accent-soft); color: var(--accent); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--warning { background: var(--warning-bg); color: var(--warning); }
.badge--error { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }

.tab.is-active, .tab[aria-selected="true"], .be-tab.is-active, .kb-tab.is-active, .set-tabs .is-active, .prof-tabs .is-active, .bil-tabs .is-active {
  color: var(--accent);
  border-color: var(--accent);
}
.table th, .adm-table th { background: var(--surface-2); color: var(--text-soft); }
.table tr:hover td, .adm-table tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }

.plan-ribbon, .current-badge { background: var(--sun); color: var(--sun-ink); }
.sidebar__link.is-active, .adm-nav__link.is-active { background: var(--accent-soft); color: var(--accent); }
.avatar { background: var(--accent-soft); color: var(--accent); }

/* Chat */
.chat__bubble--user, .msg--user .bubble, .cw-bubble--user, .cvp-msg--user { background: var(--btn-bg); color: var(--btn-fg); }
.chat__bubble, .cw-bubble--bot, .cvp-msg--bot { background: var(--surface-2); color: var(--text); }
.send-btn { background: var(--btn-bg); color: var(--btn-fg); }
.send-btn:hover { background: var(--btn-bg-h); }

/* Dark code blocks use the deep band so they match in both themes */
.sh-embed, .ch-ic--term { background: var(--deep) !important; border-color: var(--deep-line) !important; }

/* ---------- 6. Footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: transparent; }
.site-footer__link:hover { color: var(--accent); }

/* ---------- 7. Phones and motion ---------- */
@media (max-width: 480px) {
  .btn--lg { min-height: 46px; }
  .input, .select, .textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ---------- 8. Primary fills ----------
   The old design painted every "main" button, progress bar and switch with
   var(--text) (near-black). These lines point exactly those rules at the
   teal button colour. Generated from the project's own CSS; the extra
   "html" in front lifts them over page <style> blocks. */
html .ab-tab .count{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .ab-tab.is-on .count{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .adm-nav__link.is-active{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .aic-chip.on{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .be-switch input:checked + .be-switch-track{background:var(--btn-bg)!important;}
html .bottom-nav__link.is-active::before{background:var(--btn-bg)!important;}
html .bp__av{background:var(--btn-bg)!important;}
html .btn--primary{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .btn-new{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .chat-hd .av{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .chat-hd .avatar{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .cvp-msg--user{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .cw-bar__fill{background:var(--btn-bg)!important;}
html .cw-bubble--user{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .dash-hero .abtn.primary{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .db-copy{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .db-hero .abtn.primary{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .db-progress i{background:var(--btn-bg)!important;}
html .db-step.is-done .ck{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .db-warn .cta{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .err-btn--pri{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .err-mark .dot{background:var(--btn-bg)!important;}
html .gp-chip{background:var(--btn-bg)!important;}
html .gp-ctl .gp-play{background:var(--btn-bg)!important;border-color:var(--btn-bg)!important;}
html .gp-dots button.is-on{background:var(--btn-bg)!important;}
html .gp-n{background:var(--btn-bg)!important;}
html .ins-meter > span{background:var(--btn-bg)!important;}
html .kb-submit{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .legal-contact a.btn{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .mdl-badge{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .mdl-radio::after{background:var(--btn-bg)!important;}
html .model-option .badge-default{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .model-option input:checked + .check::after{background:var(--btn-bg)!important;}
html .msg.user .bubble{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .ob-bar i{background:var(--btn-bg)!important;}
html .ob-btn.pri{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .ob-copy{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .ob-feat input:checked + .tick{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .ob-mark{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .ob-progress i{background:var(--btn-bg)!important;}
html .ob-step.is-done .ck{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .ob-warn a{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .pay-submit{background:var(--btn-bg)!important;}
html .pf-avatar__edit{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .pf-chip.admin{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .plan-action.primary{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .plan-current{background:var(--btn-bg)!important;}
html .plan-cycle button.active{background:var(--btn-bg)!important;}
html .plan-ribbon{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .pv__av .badge{background:var(--btn-bg)!important;}
html .send-btn{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .st-opt .tag{background:var(--btn-bg)!important;color:var(--btn-fg)!important;}
html .st-opt.active .ck{background:var(--btn-bg)!important;color:var(--btn-fg)!important;border-color:var(--btn-bg)!important;}
html .st-switch[aria-checked="true"]{background:var(--btn-bg)!important;border-color:var(--btn-bg)!important;}
html .tgc-n{background:var(--btn-bg)!important;}
html .usage-item em{background:var(--btn-bg)!important;}
html [style*="background:var(--text)"], html [style*="background: var(--text)"] { background: var(--btn-bg) !important; color: var(--btn-fg) !important; border-color: var(--btn-bg) !important; }

/* ---------- 9. No all-caps eyebrow labels ----------
   Section labels and stat captions read in normal case. Small badges and
   table headers keep their own style. */
html .acct-sec, html .adm-nav__sec, html .ag-sec, html .av-sec, html .bt-sec, html .pf-sec, html .st-sec,
html .legal-toc h4, html .stat__label, html .dash-stat .l, html .dash-model .k, html .adm-stat .l,
html .ord-stat .l, html .rm-stat .k, html .ab-meta .k, html .current-card .eyebrow, html .zy-greet,
html .be-prev-hd, html .ac-side-hd b, html .ac-ul, html .ac-mail-h, html .ae-gt, html .ae-tg, html .ap-sub,
html .pv-site-lbl, html .cm-voice-label, html .voice-mode-label {
  text-transform: none !important;
  letter-spacing: 0 !important;
}

/* ---------- 10. No gradient text ---------- */
html .zy-hero .w:last-child, html .chat-empty h2 {
  background: none !important; background-image: none !important;
  -webkit-background-clip: border-box !important; background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
}
html .zy-hero .w:last-child { color: var(--accent) !important; }
html .chat-empty h2 { color: var(--text) !important; }

/* ---------- Chat inputs: one ring only (fix for the double border) ----------
   The global "textarea:focus" ring above also hit the textarea INSIDE the pill-shaped
   chat box, so a second teal ring appeared inside the outer ring. The pill carries the
   ring now; the field inside stays flat. Covers chat, agent chat and public bot chat. */
.composer textarea, .composer textarea:hover, .composer textarea:focus, .composer textarea:focus-visible,
.composer-row textarea:focus, .composer-row input:focus,
.ac-box textarea, .ac-box textarea:hover, .ac-box textarea:focus, .ac-box textarea:focus-visible,
.ac-box input[type="text"]:focus {
  border: 0 !important;
  box-shadow: none !important;
  outline: 0 !important;
  background: transparent !important;
}
.composer .composer-row, .ac-box { border-width: 1.5px; box-shadow: none !important; }
.composer .composer-row:focus-within, .ac-box:focus-within {
  border-color: var(--accent) !important;
  box-shadow: none !important;
}
/* Phones: keep the 16px font so the browser does not zoom in, and keep the box inside the screen */
@media (max-width: 640px) {
  .composer textarea, .ac-box textarea { font-size: 16px !important; }
  .composer .composer-row, .ac-box { max-width: 100%; }
}


/* ---------- Icons: thin rounded line icons, calm active state ---------- */
.icon { stroke-width: 1.7; }
.bottom-nav .bottom-nav__link.is-active {
  background: var(--surface-2) !important;
  color: var(--text) !important;
}
.bottom-nav .bottom-nav__link.is-active .icon { color: var(--accent); stroke-width: 1.9; }
@media (min-width: 900px) {
  .bottom-nav .bottom-nav__link.is-active { background: transparent !important; }
  .bottom-nav__link.is-active::before { background: var(--accent); }
}
/* Dashboard icon chips: rounded square, soft ground, teal line icon */
.db-stat .ico, .db-card-hd .t .ico, .db-guide-hd .t .ico, .db-conv .ci, .db-model .ico {
  color: var(--accent);
  background: var(--surface-2);
  border: 0;
  border-radius: 12px;
}
.db-empty .big { color: var(--accent); background: var(--surface-2); border: 0; }
.db-stat .ico svg, .db-model .ico svg { width: 18px; height: 18px; }
.abtn.icon-only .icon { width: 18px; height: 18px; }
.abtn.icon-only:hover .icon { color: var(--accent); }


/* ---------- UI patch: calm nav, smaller icon-only action buttons ---------- */
html .bottom-nav .bottom-nav__link::before,
html .bottom-nav .bottom-nav__link.is-active::before,
html .bottom-nav .bottom-nav__link:hover::before { content: none !important; display: none !important; }
html .bottom-nav .bottom-nav__link { height: 46px; gap: 2px; border-radius: 16px; }
html .bottom-nav .bottom-nav__link svg { width: 18px; height: 18px; }
.bottom-nav .bottom-nav__link:hover { background: var(--surface-2) !important; color: var(--text) !important; }

/* Bots page */
.bt-card .bt-more { gap: 6px; }
.bt-card .bt-more .bt-btn {
  height: 34px; min-height: 34px; padding: 0; border: 0 !important; border-radius: 10px;
  background: var(--surface-2); color: var(--text-soft);
}
.bt-card .bt-more .bt-btn span { display: none !important; }
.bt-card .bt-more .bt-btn svg { width: 16px; height: 16px; stroke-width: 1.7; opacity: 1; }
.bt-card .bt-more .bt-btn:hover { background: var(--surface-3); color: var(--accent); }
.bt-card .bt-more .bt-btn.danger { color: var(--danger); }
.bt-card .bt-more .bt-btn.danger:hover { background: var(--danger-bg); color: var(--danger); }
.bt-card .bt-more .bt-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.bt-card .bt-acts .bt-btn { min-height: 38px; border-radius: 12px; }
.bt-card .bt-acts .bt-btn svg { width: 16px; height: 16px; }

/* Same calm sizing on the agents page and across the app */
.ag-btn { min-height: 38px; border-radius: 12px; }
.ag-btn svg { width: 16px; height: 16px; }
.icon-btn .icon, .icon-btn svg { stroke-width: 1.7; }


/* ---------- Dashboard upgrade (UI only) ---------- */
body.dashboard-page .db-wrap { max-width: 920px; }

/* Hero */
body.dashboard-page .db-hero {
  padding: 24px; border-radius: 22px; gap: 18px;
  box-shadow: 0 6px 24px rgba(10, 47, 52, .06);
}
body.dashboard-page .db-hero .hi {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 30px; font-weight: 700; letter-spacing: -.025em; line-height: 1.1;
}
body.dashboard-page .db-hero .sub { font-size: 14px; margin-top: 6px; }
body.dashboard-page .db-hero .actions { gap: 8px; flex-wrap: nowrap; }
body.dashboard-page .db-hero .abtn {
  min-height: 42px; border-radius: 13px; border: 0; background: var(--surface-2); color: var(--text-soft);
}
body.dashboard-page .db-hero .abtn:hover { background: var(--surface-3); color: var(--accent); }
body.dashboard-page .db-hero .abtn.primary { padding: 0 20px; font-weight: 600; }
body.dashboard-page .db-hero .abtn.icon-only { width: 42px; padding: 0; }
body.dashboard-page .db-hero .abtn.icon-only svg { width: 20px; height: 20px; }
body.dashboard-page .db-hero .abtn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 560px) {
  body.dashboard-page .db-hero { padding: 20px; }
  body.dashboard-page .db-hero .actions { width: 100%; }
  body.dashboard-page .db-hero .abtn.primary { flex: 1 1 auto; }
}

/* Stats */
body.dashboard-page .db-stats { gap: 12px; }
body.dashboard-page .db-stat {
  padding: 16px; border-radius: 22px; gap: 10px;
  box-shadow: 0 4px 18px rgba(10, 47, 52, .05);
}
body.dashboard-page .db-stat .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
body.dashboard-page .db-stat .ico svg { width: 20px; height: 20px; }
body.dashboard-page .db-stat .n {
  font-family: "Bricolage Grotesque", system-ui, sans-serif;
  font-size: 28px; font-weight: 700; letter-spacing: -.02em; line-height: 1; color: var(--text);
}
body.dashboard-page .db-stat .l { font-size: 13px; color: var(--text-muted); }

/* Model strip, warning, cards */
body.dashboard-page .db-model { border-radius: 22px; box-shadow: 0 4px 18px rgba(10, 47, 52, .05); }
body.dashboard-page .db-model .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; }
body.dashboard-page .db-model .change { border-radius: 12px; min-height: 38px; }
body.dashboard-page .db-warn { border-radius: 18px; }
body.dashboard-page .db-warn .cta { border-radius: 12px; min-height: 38px; }
body.dashboard-page .db-card, body.dashboard-page .db-guide { border-radius: 22px; box-shadow: 0 4px 18px rgba(10, 47, 52, .05); }
body.dashboard-page .db-card-hd .t .ico { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; }
body.dashboard-page .db-card-hd .t .ico svg { width: 18px; height: 18px; }
body.dashboard-page .db-card-hd .open { border-radius: 12px; min-height: 36px; }

/* Conversation rows */
body.dashboard-page .db-conv { padding: 12px 16px; gap: 12px; }
body.dashboard-page .db-conv .ci { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
body.dashboard-page .db-conv .ci svg { width: 18px; height: 18px; }
body.dashboard-page .db-conv .arr { color: var(--text-faint); transition: transform .15s, color .15s; }
body.dashboard-page .db-conv:hover .arr { color: var(--accent); transform: translateX(2px); }
body.dashboard-page .db-conv:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }


/* ---------- Chat page upgrade (talk.php, UI only) ---------- */
body.chat-page .chat-hd {
  min-height: 60px; padding: 10px 14px; gap: 8px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}
body.chat-page .chat-hd .icon-btn { width: 40px; height: 40px; border-radius: 14px; border: 0; background: transparent; color: var(--text-soft); }
body.chat-page .chat-hd .icon-btn:hover { background: var(--surface-2); color: var(--accent); }
body.chat-page .chat-hd .icon-btn .icon { width: 20px; height: 20px; }
body.chat-page .conv-title-editable {
  font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 16px; font-weight: 700; letter-spacing: -.01em;
}
body.chat-page .model-picker-btn { min-height: 40px; border-radius: 999px; border: 0; background: var(--surface-2); padding: 0 14px; }
body.chat-page .model-picker-btn:hover { background: var(--surface-3); }

/* Sidebar */
body.chat-page .chat-sidebar { border-right: 1px solid var(--border); }
body.chat-page .new-chat { height: 46px; border-radius: 14px; font-weight: 600; box-shadow: none; }
body.chat-page .new-chat:hover { transform: none; background: var(--accent-hover); box-shadow: none; }
body.chat-page .sidebar-search input { height: 42px; border-radius: 14px; border: 0; background: var(--surface-2); padding: 0 14px; }
body.chat-page .sidebar-search input:focus { box-shadow: inset 0 0 0 1.5px var(--accent); }
body.chat-page .conv-item { border-radius: 14px; padding: 10px 12px; border-color: transparent; }
body.chat-page .conv-item:hover { background: var(--surface-2); border-color: transparent; }
body.chat-page .conv-item.active { background: var(--accent-soft); border-color: transparent; }
body.chat-page .conv-item.active .conv-title { color: var(--accent); font-weight: 600; }
body.chat-page .user-chip { border-radius: 14px; }
body.chat-page .user-chip .meta .role { text-transform: none; letter-spacing: 0; font-size: 11px; }

/* Messages */
body.chat-page .messages-inner { gap: 18px; }
body.chat-page .msg .avatar {
  width: 36px; height: 36px; border-radius: 12px; border: 0;
  background: var(--surface-2); color: var(--accent);
}
body.chat-page .msg.user .avatar { background: var(--accent); color: var(--on-accent); }
body.chat-page .msg.assistant .avatar { background: var(--surface-2); color: var(--accent); }
body.chat-page .msg .bubble { border-radius: 20px; padding: 12px 16px; }
body.chat-page .msg.user .bubble { border-bottom-right-radius: 8px; }
body.chat-page .msg.assistant .bubble { border-bottom-left-radius: 8px; box-shadow: 0 2px 12px rgba(10, 47, 52, .05); }
body.chat-page .msg .bubble pre { border-radius: 14px; background: var(--surface-2); border-color: transparent; }
body.chat-page .msg .bubble code { border-radius: 8px; }
body.chat-page .msg-actions button { border: 0; border-radius: 10px; min-height: 30px; padding: 0 12px; }
@media (hover: none) { body.chat-page .msg-actions { opacity: 1; } }

/* Empty state */
body.chat-page .zy-hero { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 700; }

/* Composer */
body.chat-page .composer { border-top: 0; background: linear-gradient(to top, var(--bg) 62%, transparent); padding: 8px 14px max(12px, env(safe-area-inset-bottom)); }
body.chat-page .composer .composer-row {
  border-radius: 26px; padding: 6px 6px 6px 18px; background: var(--surface);
  box-shadow: 0 8px 28px rgba(10, 47, 52, .08) !important;
}
html body.chat-page .send-btn { width: 44px; height: 44px; background: var(--accent) !important; color: var(--on-accent) !important; box-shadow: none; }
html body.chat-page .send-btn:disabled { opacity: .4; }
body.chat-page .stop-btn { width: 44px; height: 44px; }
body.chat-page .composer-hint { font-size: 11.5px; color: var(--text-faint); text-align: center; }


/* ---------- Chat sidebar menu (Grok-style rows) ---------- */
body.chat-page .side-menu { display: flex; flex-direction: column; gap: 2px; padding: 0 10px 8px; }
body.chat-page .side-menu a {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px;
  border-radius: 14px; color: var(--text-soft); font-size: 14.5px; font-weight: 500; text-decoration: none;
}
body.chat-page .side-menu a svg { width: 20px; height: 20px; flex: none; stroke-width: 1.6; }
body.chat-page .side-menu a:hover { background: var(--surface-2); color: var(--text); }
body.chat-page .side-menu a:hover svg { color: var(--accent); }
body.chat-page .side-menu a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---- Solid bars: stop page text showing through the top bar, Preview/Deploy bar and bottom nav ---- */
html .topbar { background: var(--surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html .bottom-nav { background: var(--surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
html .be-actionbar { background: var(--surface) !important; -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
