/* Vynoriq AI — simple, calm interface (R8.17)
   One flat surface colour, thin borders, one solid accent, no glow / glass / gradients.
   Loaded after every other stylesheet, so it only has to override. */

/* ---------- tokens ---------- */
:root,:root[data-theme=dark]{
  --bg:#1f1f1d;--bg2:#262624;--panel:#2a2a27;--panel2:#323230;--glass:#2a2a27;
  --line:rgba(255,255,255,.09);--line2:rgba(255,255,255,.17);
  --text:#ecebe6;--muted:#a9a8a1;--faint:#92918a;
  --accent:#8f84f2;--accent2:#8f84f2;--accent3:#8f84f2;--danger:#ef8a8a;--ok:#5cc9a7;
  --user:#2f2f2c;--grad:none;--shadow:none;--r:12px;color-scheme:dark;
  --simple-btn-text:#14131f;--simple-hover:rgba(255,255,255,.06);
}
:root[data-theme=light]{
  --bg:#faf9f5;--bg2:#f3f1ea;--panel:#ffffff;--panel2:#f3f1ea;--glass:#ffffff;
  --line:rgba(31,30,29,.10);--line2:rgba(31,30,29,.18);
  --text:#1f1e1d;--muted:#5e5c56;--faint:#6f6c64;
  --accent:#5b4fd6;--accent2:#5b4fd6;--accent3:#5b4fd6;--danger:#b93b3b;--ok:#17805f;
  --user:#f0eee6;--grad:none;--shadow:none;--r:12px;color-scheme:light;
  --simple-btn-text:#fff;--simple-hover:rgba(31,30,29,.05);
}
body.app.vq-premium,html[data-theme=light] body.app.vq-premium{
  --cp-text:var(--text);--cp-muted:var(--muted);--cp-faint:var(--faint);--cp-line:var(--line);
  --cp-card:var(--panel);--cp-code:var(--bg2);--cp-code-head:var(--panel2);--cp-user:var(--user);--cp-user-line:var(--line);
  --cp-accent:var(--accent);--cp-link:var(--accent);--cp-quote:var(--accent);--cp-th:var(--panel2);--cp-zebra:transparent;
}

/* ---------- typography: one clean family ---------- */
html:root:not(#_) body,html:root:not(#_) body h1,html:root:not(#_) body h2,html:root:not(#_) body h3,html:root:not(#_) body .display,html:root:not(#_) body .brand,html:root:not(#_) body button,html:root:not(#_) body input,html:root:not(#_) body select,html:root:not(#_) body textarea{
  font-family:Inter,system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif!important}
html:root:not(#_) body h1,html:root:not(#_) body h2,html:root:not(#_) body h3{letter-spacing:-.015em;font-weight:650}

/* ---------- flatten: no glow, glass, gradient ---------- */
html:root:not(#_) body *,html:root:not(#_) body *::before,html:root:not(#_) body *::after{
  box-shadow:none!important;text-shadow:none!important;
  backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
html:root:not(#_) body div,html:root:not(#_) body section,html:root:not(#_) body header,html:root:not(#_) body footer,html:root:not(#_) body aside,html:root:not(#_) body main,html:root:not(#_) body nav,
html:root:not(#_) body article,html:root:not(#_) body ul,html:root:not(#_) body li,html:root:not(#_) body form,html:root:not(#_) body label,html:root:not(#_) body details,html:root:not(#_) body summary,
html:root:not(#_) body button,html:root:not(#_) body a,html:root:not(#_) body span,html:root:not(#_) body b,html:root:not(#_) body i,html:root:not(#_) body em,html:root:not(#_) body small,html:root:not(#_) body p,html:root:not(#_) body table,
html:root:not(#_) body tr,html:root:not(#_) body th,html:root:not(#_) body td,html:root:not(#_) body h1,html:root:not(#_) body h2,html:root:not(#_) body h3,
html:root:not(#_) body div::before,html:root:not(#_) body div::after,html:root:not(#_) body section::before,html:root:not(#_) body section::after,html:root:not(#_) body main::before,html:root:not(#_) body main::after,
html:root:not(#_) body aside::before,html:root:not(#_) body aside::after,html:root:not(#_) body header::before,html:root:not(#_) body header::after,html:root:not(#_) body span::before,html:root:not(#_) body span::after{
  background-image:none!important}
html:root:not(#_) body .grad-text,html:root:not(#_) body .grad-text *,html:root:not(#_) body .site-foot .credit a,html:root:not(#_) body .side-credit a,html:root:not(#_) body .fine-credit a{
  background:none!important;-webkit-text-fill-color:currentColor!important;color:var(--accent)!important}
html:root:not(#_) body .orb,html:root:not(#_) body .hero-console,html:root:not(#_) body .glow,html:root:not(#_) body [class*=halo],html:root:not(#_) body [class*=aurora]{display:none!important}
html:root:not(#_) body .site-top .brand img,html:root:not(#_) body .brand img{border-radius:8px}

/* page backgrounds */
html:root:not(#_) body,html:root:not(#_) body.landing,html:root:not(#_) body:not(.app),html:root:not(#_) body.auth,html:root:not(#_) body.auth-premium,html:root:not(#_) body.admin-auth,
html:root:not(#_) body .landing,html:root:not(#_) body .chat,html:root:not(#_) body .auth-stage,html:root:not(#_) body .auth-form-side,html:root:not(#_) body .admin-login-stage,html:root:not(#_) body .admin-auth-form-side{
  background:var(--bg)!important;color:var(--text)!important}
html:root:not(#_) body .auth-brand-side,html:root:not(#_) body .auth-showcase,html:root:not(#_) body .admin-auth-brand{background:var(--bg2)!important;border-color:var(--line)!important}

/* ---------- buttons ---------- */
html:root:not(#_) body .btn{background:var(--accent)!important;color:var(--simple-btn-text)!important;border:1px solid transparent!important;
  border-radius:10px;font-weight:600;transition:background .12s,border-color .12s,opacity .12s;transform:none!important;filter:none!important}
html:root:not(#_) body .btn:hover{opacity:.9;transform:none!important}
html:root:not(#_) body .btn.ghost,html:root:not(#_) body .btn.secondary{background:transparent!important;color:var(--text)!important;border:1px solid var(--line2)!important}
html:root:not(#_) body .btn.ghost:hover{background:var(--simple-hover)!important;border-color:var(--line2)!important;opacity:1}
html:root:not(#_) body .btn.big{padding:13px 22px;font-size:15px;border-radius:12px}
html:root:not(#_) body :focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* ---------- cards / panels ---------- */
html:root:not(#_) body .card,html:root:not(#_) body .step,html:root:not(#_) body .pack,html:root:not(#_) body .plan,html:root:not(#_) body .auth-card,html:root:not(#_) body .trust-strip,html:root:not(#_) body .faq details,
html:root:not(#_) body .cost-table,html:root:not(#_) body .admin-login-card,html:root:not(#_) body .admin-auth-card,html:root:not(#_) body .pill,html:root:not(#_) body .hero-proof span,html:root:not(#_) body .tiers-demo span{
  background:var(--panel)!important;border:1px solid var(--line)!important;border-radius:14px;color:var(--text)}
html:root:not(#_) body .pill,html:root:not(#_) body .hero-proof span,html:root:not(#_) body .tiers-demo span{border-radius:999px}
html:root:not(#_) body .tiers-demo span.on{background:var(--accent)!important;color:var(--simple-btn-text)!important;border-color:transparent!important}
html:root:not(#_) body .card:hover,html:root:not(#_) body .pack:hover{border-color:var(--line2)!important;transform:none!important}
html:root:not(#_) body .card .ic,html:root:not(#_) body .step b{background:var(--bg2)!important;border:1px solid var(--line)!important;color:var(--accent)!important}
html:root:not(#_) body .trust-strip>span{border-color:var(--line)!important}
html:root:not(#_) body .muted,html:root:not(#_) body .lead,html:root:not(#_) body .section-head p,html:root:not(#_) body .card p,html:root:not(#_) body .step p{color:var(--muted)!important}
html:root:not(#_) body .eyebrow,html:root:not(#_) body .auth-kicker,html:root:not(#_) body .admin-auth-kicker{color:var(--accent)!important;letter-spacing:.08em;font-weight:650;font-size:12px}

/* ---------- landing ---------- */
html:root:not(#_) body .site-top{background:var(--bg)!important;border-bottom:1px solid var(--line)!important;position:sticky}
html:root:not(#_) body .site-top nav a:not(.btn){color:var(--muted)!important}
html:root:not(#_) body .site-top nav a:not(.btn):hover{color:var(--text)!important;text-decoration:none}
html:root:not(#_) body .hero-v4{display:block;text-align:center;padding-top:72px;padding-bottom:48px}
html:root:not(#_) body .hero-v4 .hero-copy-v4{max-width:720px;margin:0 auto}
html:root:not(#_) body .hero-v4 h1{font-size:clamp(34px,6vw,56px);line-height:1.1;font-weight:700;color:var(--text)!important;letter-spacing:-.025em}
html:root:not(#_) body .hero-v4 .lead{font-size:clamp(16px,2.4vw,19px);max-width:560px;margin:18px auto 0}
html:root:not(#_) body .hero-v4 .hero-cta{justify-content:center;margin-top:28px}
html:root:not(#_) body .hero-proof{justify-content:center}
html:root:not(#_) body .hero-proof span{background:transparent!important;border:0!important;color:var(--muted)!important;padding:4px 8px}
html:root:not(#_) body .pill{display:inline-flex;margin-bottom:22px;color:var(--muted)!important;font-size:13px}
html:root:not(#_) body .pill b{color:var(--text)}
html:root:not(#_) body .pill .dot{background:var(--ok)!important}
html:root:not(#_) body .bento{display:grid;grid-template-columns:repeat(auto-fit,minmax(260px,1fr));gap:14px}
html:root:not(#_) body .bento .card{grid-column:auto!important;grid-row:auto!important;padding:22px}
html:root:not(#_) body .cta-band{background:var(--bg2)!important;border:1px solid var(--line)!important;border-radius:16px}
html:root:not(#_) body .faq details{padding:0 18px}
html:root:not(#_) body .faq summary{color:var(--text)}
html:root:not(#_) body .site-foot{border-top:1px solid var(--line)!important;color:var(--faint)}
html:root:not(#_) body .site-foot a{color:var(--muted)!important}

/* ---------- auth ---------- */
html:root:not(#_) body .premium-form input,html:root:not(#_) body .field-shell,html:root:not(#_) body .field-shell input{background:var(--panel)!important;color:var(--text)!important;border-color:var(--line2)!important}
html:root:not(#_) body .field-shell{border:1px solid var(--line2)!important;border-radius:10px}
html:root:not(#_) body .field-shell input{border:0!important}
html:root:not(#_) body .field-shell:focus-within{border-color:var(--accent)!important}
html:root:not(#_) body .field-shell>span{color:var(--faint)!important}
html:root:not(#_) body .auth-brand-side h1,html:root:not(#_) body .admin-auth-copy h1{font-size:clamp(28px,4vw,40px)}
html:root:not(#_) body .auth-brand-side .feature,html:root:not(#_) body .admin-auth-points>div,html:root:not(#_) body .auth-point{background:transparent!important;border:1px solid var(--line)!important}
html:root:not(#_) body .alert{border-radius:10px}

/* ---------- chat ---------- */
html:root:not(#_) body.app .side{background:var(--bg2)!important;border-right:1px solid var(--line)!important}
html:root:not(#_) body.app .chat-top{background:var(--bg)!important;border-bottom:1px solid var(--line)!important}
html:root:not(#_) body.app .conv,html:root:not(#_) body.app .conv:hover{background:transparent!important;border:1px solid transparent!important;color:var(--muted)!important;border-radius:8px}
html:root:not(#_) body.app .conv:hover{background:var(--simple-hover)!important;color:var(--text)!important}
html:root:not(#_) body.app .conv.on{background:var(--simple-hover)!important;color:var(--text)!important;border-color:transparent!important}
html:root:not(#_) body.app .credits{background:var(--panel)!important;border:1px solid var(--line)!important}
html:root:not(#_) body.app .empty{padding-top:6vh}
html:root:not(#_) body.app .empty h1{font-size:clamp(26px,4.2vw,36px)!important;font-weight:600!important;color:var(--text)!important;letter-spacing:-.02em}
html:root:not(#_) body.app .empty h1 *,html:root:not(#_) body.app .empty h1 .grad-text{color:var(--text)!important}
html:root:not(#_) body.app .empty p{color:var(--muted)!important;font-size:15px}
html:root:not(#_) body.app .workspace-badges{display:none}
html:root:not(#_) body.app .starters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:640px}
html:root:not(#_) body.app .starters button{background:var(--panel)!important;border:1px solid var(--line)!important;border-radius:12px;color:var(--text)!important;transform:none!important}
html:root:not(#_) body.app .starters button:hover{border-color:var(--line2)!important;background:var(--simple-hover)!important}
html:root:not(#_) body.app .starters .ic{background:transparent!important;border:0!important;color:var(--accent)!important}
html:root:not(#_) body.app .starters small{color:var(--muted)!important}
html:root:not(#_) body.app .dock{background:var(--panel)!important;border:1px solid var(--line2)!important;border-radius:18px}
html:root:not(#_) body.app .dock:focus-within{border-color:var(--accent)!important}
html:root:not(#_) body.app .composer textarea{background:transparent!important;color:var(--text)!important}
html:root:not(#_) body.app .composer textarea::placeholder{color:var(--faint)!important}
html:root:not(#_) body.app .controls{border-top:0!important}
html:root:not(#_) body.app .seg,html:root:not(#_) body.app select,html:root:not(#_) body.app .toggle,html:root:not(#_) body.app .engine-switch,html:root:not(#_) body.app .chat-top .icon{background:var(--panel2)!important;border:1px solid var(--line)!important;color:var(--muted)!important}
html:root:not(#_) body.app .seg button.on,html:root:not(#_) body.app .engine-switch button.on{background:var(--panel)!important;color:var(--text)!important}
html:root:not(#_) body.app .send,html:root:not(#_) body.app #send{background:var(--accent)!important;color:var(--simple-btn-text)!important;border:0!important}
html:root:not(#_) body.app .msg .av{background:var(--panel)!important;border:1px solid var(--line)!important}
html:root:not(#_) body.app .msg.user .bubble{background:var(--user)!important;border:1px solid var(--line)!important;color:var(--text)!important;border-radius:16px}
html:root:not(#_) body.app .msg.assistant .bubble,html:root:not(#_) body.app .md{color:var(--text)!important;background:transparent!important}
html:root:not(#_) body.app .md pre,html:root:not(#_) body.app .md .code-block{background:var(--bg2)!important;border:1px solid var(--line)!important;border-radius:10px}
html:root:not(#_) body.app .md code{background:var(--bg2)!important}
html:root:not(#_) body.app .md a{color:var(--accent)!important}
html:root:not(#_) body.app .md-table,html:root:not(#_) body.app .md .md-table{border:1px solid var(--line)!important}
html:root:not(#_) body.app .fine{color:var(--faint)!important}
html:root:not(#_) body.app .test-badge,html:root:not(#_) body.app .badge-test{background:transparent!important;border:1px solid var(--line2)!important;color:var(--muted)!important}

/* ---------- admin ---------- */
html:root:not(#_) body.admin-page,html:root:not(#_) body .admin-shell,html:root:not(#_) body .admin-main{background:var(--bg)!important}
html:root:not(#_) body .admin-side,html:root:not(#_) body .admin-top{background:var(--bg2)!important;border-color:var(--line)!important}
html:root:not(#_) body .admin-nav a.active{background:var(--simple-hover)!important;color:var(--text)!important}
html:root:not(#_) body .admin-section .card,html:root:not(#_) body .admin-card,html:root:not(#_) body .stat,html:root:not(#_) body .stat-card,html:root:not(#_) body .admin-panel{background:var(--panel)!important;border:1px solid var(--line)!important;border-radius:12px}

/* ---------- mobile: slightly tighter, never heavy ---------- */
@media(max-width:720px){
  html:root:not(#_) body .hero-v4{padding-top:40px;padding-bottom:28px}
  html:root:not(#_) body .hero-v4 h1{font-size:32px}
  html:root:not(#_) body.app .starters{grid-template-columns:1fr}
  html:root:not(#_) body .card{padding:18px}
}
@media(prefers-reduced-motion:no-preference){html:root:not(#_) body .card,html:root:not(#_) body .btn{transition:background .12s,border-color .12s}}
html:root:not(#_) body .trust-strip b{color:var(--text)!important}html:root:not(#_) body .trust-strip small{color:var(--muted)!important}
@media(max-width:440px){html:root:not(#_) body .site-top .brand span{display:none}}
html:root:not(#_) body .bento{grid-template-columns:repeat(3,minmax(0,1fr))}
@media(max-width:900px){html:root:not(#_) body .bento{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){html:root:not(#_) body .bento{grid-template-columns:minmax(0,1fr)}}
html:root:not(#_) body .step b{background:transparent!important;border:0!important;padding:0}
html:root:not(#_) body .faq summary{padding:15px 0;min-height:48px}
html:root:not(#_) body .faq details{margin-bottom:10px}

/* ---------- text colours that used to sit on gradients ---------- */
html:root:not(#_) body.auth h1,html:root:not(#_) body.auth h2,html:root:not(#_) body.auth h3,html:root:not(#_) body.auth b,html:root:not(#_) body.auth strong,
html:root:not(#_) body.auth .brand span,html:root:not(#_) body.auth [class*=brand] span{color:var(--text)!important}
html:root:not(#_) body.auth p,html:root:not(#_) body.auth label,html:root:not(#_) body.auth small,html:root:not(#_) body.auth .muted{color:var(--muted)!important}
html:root:not(#_) body.auth label,html:root:not(#_) body.auth label>span:not(.field-shell *){font-weight:550}
html:root:not(#_) body.auth a{color:var(--accent)!important}
html:root:not(#_) body.auth i{color:var(--accent)!important;background:transparent!important}
html:root:not(#_) body.auth .auth-kicker{color:var(--accent)!important}
html:root:not(#_) body.auth .auth-chip,html:root:not(#_) body.auth .auth-badges span,html:root:not(#_) body.auth .form-badges span,html:root:not(#_) body.auth .premium-form ~ * span{color:var(--muted)!important}
html:root:not(#_) body.auth .auth-submit,html:root:not(#_) body.auth .btn{color:var(--simple-btn-text)!important}
html:root:not(#_) body.auth .btn.ghost{color:var(--text)!important}
html:root:not(#_) body .tag{background:var(--accent)!important;color:var(--simple-btn-text)!important}
html:root:not(#_) body.app .new-chat-main{color:var(--text)!important}
html:root:not(#_) body.app .new-chat-sub{color:var(--muted)!important}
html:root:not(#_) body.app .new-chat-arrow{color:var(--faint)!important;background:transparent!important}
html:root:not(#_) body.app .credits b,html:root:not(#_) body.app .credits a{color:var(--accent)!important}
html:root:not(#_) body.app .avatar{background:var(--accent)!important;color:var(--simple-btn-text)!important}
html:root:not(#_) body.app .badge{background:transparent!important;color:var(--muted)!important;border:1px solid var(--line2)!important}
html:root:not(#_) body.app .side-section-label,html:root:not(#_) body.app .side-credit{color:var(--faint)!important}
html:root:not(#_) body.auth .auth-card-badges span,html:root:not(#_) body.auth [class*=badges] span{color:var(--muted)!important;background:transparent!important;border:1px solid var(--line)!important}
html:root:not(#_) body.app .chat-heading>span{color:var(--faint)!important}
html:root:not(#_) body .admin-nav-label{color:var(--faint)!important}
html:root:not(#_) body textarea:focus-visible,html:root:not(#_) body .field-shell input:focus-visible,html:root:not(#_) body .composer :focus-visible{outline:none}
html:root:not(#_) body.app .side-section-label,html:root:not(#_) body.app .conv-group,html:root:not(#_) body.app small{font-size:12px}

/* =====================================================================
   SIDEBAR + HISTORY + PROFILE (R8.18)
   ===================================================================== */
html:root:not(#_) body.app .side{display:flex;flex-direction:column;padding:14px 12px 10px;gap:0;height:100vh;height:100dvh;min-height:0}
html:root:not(#_) body.app .side-top{display:flex;align-items:center;justify-content:space-between;padding:2px 6px 12px}
html:root:not(#_) body.app .side-top .brand{font-size:15px}

/* New chat: one clean row */
html:root:not(#_) body.app .new-chat{display:flex;align-items:center;justify-content:flex-start;gap:10px;width:100%;min-height:42px;padding:0 12px;margin:0 0 10px;
  background:var(--accent)!important;color:var(--simple-btn-text)!important;border:0!important;border-radius:10px;font-size:14.5px;font-weight:600;text-align:left}
html:root:not(#_) body.app .new-chat:hover{opacity:.92}
html:root:not(#_) body.app .new-chat-plus{display:grid;place-items:center;width:20px!important;height:20px!important;background:transparent!important;border:0!important;color:inherit!important;border-radius:0!important}
html:root:not(#_) body.app .new-chat-plus svg{width:18px!important;height:18px!important;stroke-width:2.2}
html:root:not(#_) body.app .new-chat-copy{display:block!important;min-width:0}
html:root:not(#_) body.app .new-chat-main{font-size:14.5px!important;font-weight:600!important;color:inherit!important}
html:root:not(#_) body.app .new-chat-sub,html:root:not(#_) body.app .new-chat-arrow,html:root:not(#_) body.app .new-chat-shortcut{display:none!important}

/* Search */
html:root:not(#_) body.app .chat-history-search{display:flex;align-items:center;gap:6px;min-height:38px!important;height:38px;padding:0 8px!important;margin:0 0 6px;
  background:var(--panel)!important;border:1px solid var(--line)!important;border-radius:10px!important}
html:root:not(#_) body.app .chat-history-search:focus-within{border-color:var(--accent)!important}
html:root:not(#_) body.app .chat-history-search input[type=search]{height:34px!important;font-size:14px!important;color:var(--text)!important;background:transparent!important;border:0!important;flex:1;min-width:0;padding:0 2px!important}
html:root:not(#_) body.app .chat-history-search input::placeholder{color:var(--faint)!important}
html:root:not(#_) body.app .chat-search-icon{color:var(--faint);display:grid;place-items:center}
html:root:not(#_) body.app .chat-search-icon svg{width:15px;height:15px}
html:root:not(#_) body.app .chat-history-search button{width:28px!important;height:28px!important;min-height:0;background:transparent!important;border:0!important;color:var(--faint)!important;border-radius:8px}
html:root:not(#_) body.app .chat-history-search button:hover{background:var(--simple-hover)!important}

/* History list */
html:root:not(#_) body.app .side-section-label{display:none}
html:root:not(#_) body.app .conv-list{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;display:block;padding:0 0 6px;margin:0 -4px;scrollbar-width:thin;scrollbar-color:var(--line2) transparent}
html:root:not(#_) body.app .conv-list::-webkit-scrollbar{width:6px}
html:root:not(#_) body.app .conv-list::-webkit-scrollbar-thumb{background:var(--line2);border-radius:6px}
html:root:not(#_) body.app .conv-group{font-size:12px!important;font-weight:600;letter-spacing:0!important;text-transform:none!important;color:var(--faint)!important;padding:14px 12px 5px!important;margin:0}
html:root:not(#_) body.app .conv{display:flex;align-items:center;gap:6px;width:calc(100% - 8px);margin:1px 4px!important;min-height:36px;padding:0 6px 0 10px!important;
  background:transparent!important;border:0!important;border-radius:8px!important;color:var(--muted)!important;text-align:left;cursor:pointer;font-size:14px}
html:root:not(#_) body.app .conv .t{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px!important;line-height:36px}
html:root:not(#_) body.app .conv:hover{background:var(--simple-hover)!important;color:var(--text)!important}
html:root:not(#_) body.app .conv.on{background:var(--simple-hover)!important;color:var(--text)!important;font-weight:600}
html:root:not(#_) body.app .conv.on .t{font-weight:600}
html:root:not(#_) body.app .conv .del{display:grid;place-items:center;width:28px;height:28px;flex:none;border-radius:6px;color:var(--faint);opacity:0;transition:opacity .12s,background .12s}
html:root:not(#_) body.app .conv .del svg{width:15px;height:15px}
html:root:not(#_) body.app .conv:hover .del,html:root:not(#_) body.app .conv:focus-within .del,html:root:not(#_) body.app .conv.on .del{opacity:.75}
html:root:not(#_) body.app .conv .del:hover{opacity:1;background:var(--line);color:var(--danger)}
@media(hover:none){html:root:not(#_) body.app .conv .del{opacity:.55}}
html:root:not(#_) body.app .conv-list>p{padding:14px 12px;color:var(--faint)!important;font-size:13.5px}

/* Bottom block: compact credits + profile + tiny footer */
html:root:not(#_) body.app .side-bottom{display:block;border-top:1px solid var(--line);padding-top:8px;margin-top:4px}
html:root:not(#_) body.app .credits{display:flex;align-items:center;gap:8px;min-height:38px;padding:0 10px;margin:0 0 4px;background:transparent!important;border:0!important;border-radius:8px;color:var(--muted)!important;text-decoration:none!important}
html:root:not(#_) body.app .credits:hover{background:var(--simple-hover)!important}
html:root:not(#_) body.app .credits>svg{width:16px;height:16px;color:var(--accent)}
html:root:not(#_) body.app .credits>div{display:flex;align-items:baseline;gap:5px;flex:1}
html:root:not(#_) body.app .credits .n{font-size:14px!important;font-weight:650;color:var(--text)!important;font-family:inherit!important}
html:root:not(#_) body.app .credits small{font-size:13px!important;color:var(--muted)!important}
html:root:not(#_) body.app .credits b{font-size:12.5px;font-weight:600;color:var(--accent)!important;border:1px solid var(--line2);border-radius:999px;padding:3px 10px;background:transparent!important}

html:root:not(#_) body.app .profile-trigger{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:6px 8px;background:transparent!important;border:0!important;border-radius:10px;text-align:left;cursor:pointer;color:var(--text)!important}
html:root:not(#_) body.app .profile-trigger:hover{background:var(--simple-hover)!important}
html:root:not(#_) body.app .profile-trigger .avatar{width:34px;height:34px;flex:none;display:grid;place-items:center;border-radius:50%;font-size:14px;font-weight:650}
html:root:not(#_) body.app .profile-trigger .who{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}
html:root:not(#_) body.app .profile-trigger .who b{font-size:14px;font-weight:600;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)!important}
html:root:not(#_) body.app .profile-trigger .who small{font-size:12px!important;line-height:1.25;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--faint)!important}
html:root:not(#_) body.app .profile-trigger .more{color:var(--faint);font-size:18px;line-height:1}
html:root:not(#_) body.app .side-legal{display:flex;flex-wrap:wrap;gap:0 2px;padding:2px 4px 0;margin:0}
html:root:not(#_) body.app .side-legal a{font-size:12px!important;color:var(--faint)!important;min-height:30px;padding:0 6px;display:inline-flex;align-items:center}
html:root:not(#_) body.app .side-legal a:hover{color:var(--text)!important;text-decoration:none}
html:root:not(#_) body.app .side-credit{font-size:11.5px!important;color:var(--faint)!important;padding:0 10px 4px;line-height:1.5}
html:root:not(#_) body.app .side-credit a{padding:0;display:inline}

/* ---------- Profile dialog ---------- */
html:root:not(#_) body.app dialog.profile-dialog{width:min(520px,calc(100vw - 24px));max-height:min(86dvh,760px);margin:auto;padding:0;overflow:auto;
  background:var(--bg)!important;color:var(--text)!important;border:1px solid var(--line2)!important;border-radius:16px;box-shadow:0 24px 70px rgba(0,0,0,.28)!important}
html:root:not(#_) body.app dialog.profile-dialog::backdrop{background:rgba(20,19,18,.45);backdrop-filter:none}
html:root:not(#_) body.app .profile-dialog-top{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;padding:16px 20px;background:var(--bg);border-bottom:1px solid var(--line)}
html:root:not(#_) body.app .profile-dialog-top h2{margin:0;font-size:17px;font-weight:650}
html:root:not(#_) body.app .profile-dialog-top .eyebrow{display:none}
html:root:not(#_) body.app .profile-dialog-top .icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:transparent!important;border:0!important;font-size:22px;color:var(--muted)!important;cursor:pointer}
html:root:not(#_) body.app .profile-dialog-top .icon:hover{background:var(--simple-hover)!important}
html:root:not(#_) body.app .profile-identity{display:flex;align-items:center;gap:14px;padding:20px 20px 6px}
html:root:not(#_) body.app .profile-identity .avatar{width:52px;height:52px;flex:none;display:grid;place-items:center;border-radius:50%;font-size:21px;font-weight:650;background:var(--accent)!important;color:var(--simple-btn-text)!important}
html:root:not(#_) body.app .profile-identity>div{min-width:0;flex:1}
html:root:not(#_) body.app .profile-identity b{display:block;font-size:16px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)!important}
html:root:not(#_) body.app .profile-identity p{margin:2px 0 0;font-size:13.5px;color:var(--muted)!important;overflow:hidden;text-overflow:ellipsis}
html:root:not(#_) body.app .role-chip{font-size:12px;font-weight:600;color:var(--accent);border:1px solid var(--line2);border-radius:999px;padding:3px 10px}

html:root:not(#_) body.app .profile-dialog form,html:root:not(#_) body.app .profile-dialog section,html:root:not(#_) body.app .profile-dialog details,html:root:not(#_) body.app .profile-links{margin:0;padding:16px 20px;border:0;border-top:1px solid var(--line);background:transparent!important;border-radius:0}
html:root:not(#_) body.app .profile-identity+form{border-top:0}
html:root:not(#_) body.app .profile-dialog label{display:block;margin:12px 0 6px;font-size:13px;font-weight:600;color:var(--muted)!important}
html:root:not(#_) body.app .profile-dialog label:first-child{margin-top:0}
html:root:not(#_) body.app .profile-dialog input[type=text],html:root:not(#_) body.app .profile-dialog input[type=password],html:root:not(#_) body.app .profile-dialog input:not([type]),html:root:not(#_) body.app .profile-dialog input[type=search],html:root:not(#_) body.app .profile-dialog select{
  width:100%;min-height:42px;padding:0 12px;background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line2)!important;border-radius:10px;font-size:15px}
html:root:not(#_) body.app .profile-dialog input:focus,html:root:not(#_) body.app .profile-dialog select:focus{border-color:var(--accent)!important;outline:none}
html:root:not(#_) body.app #profileForm{display:grid;grid-template-columns:1fr auto;gap:0 10px;align-items:end}
html:root:not(#_) body.app #profileForm label{grid-column:1/-1}
html:root:not(#_) body.app #profileForm .btn{min-height:42px;padding:0 18px}
html:root:not(#_) body.app #profileForm #profileStatus{grid-column:1/-1}
html:root:not(#_) body.app .profile-dialog p[role=status]{min-height:0;margin:8px 0 0;font-size:13px;color:var(--ok)!important}
html:root:not(#_) body.app .profile-dialog p[role=status]:empty{display:none}
html:root:not(#_) body.app .profile-section-heading h3{margin:0 0 2px;font-size:15px;font-weight:650}
html:root:not(#_) body.app .profile-section-heading p{margin:0 0 6px;font-size:13px;color:var(--muted)!important}
html:root:not(#_) body.app .profile-password-field{position:relative;display:block}
html:root:not(#_) body.app .profile-password-field input{padding-right:64px}
html:root:not(#_) body.app .profile-password-field button{position:absolute;right:6px;top:50%;transform:translateY(-50%);min-height:30px;padding:0 10px;background:transparent!important;border:0!important;color:var(--accent)!important;font-size:13px;font-weight:600;cursor:pointer;border-radius:6px}
html:root:not(#_) body.app .profile-security-actions{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:16px}
html:root:not(#_) body.app .profile-security-actions .btn{min-height:42px;padding:0 18px}
html:root:not(#_) body.app .profile-security-actions a{font-size:13.5px}
html:root:not(#_) body.app .profile-links{display:flex;flex-wrap:wrap;gap:8px 18px}
html:root:not(#_) body.app .profile-links a{font-size:14px;font-weight:600;min-height:36px;display:inline-flex;align-items:center}
html:root:not(#_) body.app .profile-dialog details>summary{cursor:pointer;font-size:15px;font-weight:600;list-style:none;display:flex;align-items:center;justify-content:space-between;min-height:30px;color:var(--text)!important}
html:root:not(#_) body.app .profile-dialog details>summary::-webkit-details-marker{display:none}
html:root:not(#_) body.app .profile-dialog details>summary::after{content:"+";font-size:18px;color:var(--faint);font-weight:400}
html:root:not(#_) body.app .profile-dialog details[open]>summary::after{content:"\2212"}
html:root:not(#_) body.app .profile-dialog details>*:not(summary){margin-top:12px}
html:root:not(#_) body.app .profile-dialog details p{font-size:13px;line-height:1.55;color:var(--muted)!important;margin:8px 0 0}
html:root:not(#_) body.app .profile-dialog details label{display:flex;gap:10px;align-items:flex-start;font-weight:500;font-size:14px;color:var(--text)!important}
html:root:not(#_) body.app .profile-dialog input[type=checkbox]{width:18px;height:18px;min-height:0;margin:2px 0 0;flex:none;accent-color:var(--accent)}
html:root:not(#_) body.app .profile-dialog .link{color:var(--danger)!important;font-size:13.5px;min-height:36px;margin-top:6px;text-align:left}
html:root:not(#_) body.app .profile-logout{display:block;padding:16px 20px 20px!important}
html:root:not(#_) body.app .profile-logout .btn{width:100%;min-height:44px}

/* phone: sidebar drawer + bottom-sheet profile */
@media(max-width:760px){
  html:root:not(#_) body.app .side{padding:12px 10px 8px}
  html:root:not(#_) body.app .conv{min-height:44px}
  html:root:not(#_) body.app .conv .t{line-height:44px}
  html:root:not(#_) body.app .side-legal a{min-height:36px}
  html:root:not(#_) body.app dialog.profile-dialog{width:100%;max-width:none;max-height:92dvh;margin:auto 0 0;border-radius:16px 16px 0 0;border-bottom:0!important}
  html:root:not(#_) body.app .profile-dialog-top{padding:14px 16px}
  html:root:not(#_) body.app .profile-identity,html:root:not(#_) body.app .profile-dialog form,html:root:not(#_) body.app .profile-dialog section,html:root:not(#_) body.app .profile-dialog details,html:root:not(#_) body.app .profile-links{padding-left:16px;padding-right:16px}
  html:root:not(#_) body.app #profileForm{grid-template-columns:1fr}
  html:root:not(#_) body.app #profileForm .btn{margin-top:10px;width:100%}
  html:root:not(#_) body.app .profile-security-actions{flex-direction:column-reverse;align-items:stretch;text-align:center}
}

html:root:not(#_) body.app #newChat{background:var(--accent)!important;color:var(--simple-btn-text)!important;border:0!important;padding:0 12px!important}
html:root:not(#_) body.app #newChat .new-chat-plus{margin:0!important}
html:root:not(#_) body.app dialog.profile-dialog{padding:0!important}
html:root:not(#_) body.app .profile-dialog>*{max-width:none}
html:root:not(#_) body.app .profile-dialog section form{padding:0!important;border:0!important}
html:root:not(#_) body.app .profile-dialog input,html:root:not(#_) body.app .profile-dialog select{margin:0!important}
html:root:not(#_) body.app .profile-dialog .avatar,html:root:not(#_) body.app .profile-trigger .avatar{border-radius:50%!important}
html:root:not(#_) body.app .profile-dialog-top .icon{align-self:center}
html:root:not(#_) body.app .profile-dialog-top{padding:14px 20px!important}
html:root:not(#_) body.app .profile-password-field input{padding-right:64px!important}
html:root:not(#_) body.app #newChat{display:flex!important;grid-template-columns:none!important;gap:10px!important}
html:root:not(#_) body.app .profile-dialog .profile-identity{padding:20px 20px 10px!important;height:auto!important;gap:14px!important;margin:0!important;border:0!important;background:none!important}
html:root:not(#_) body.app .profile-dialog .profile-identity .avatar{width:52px!important;height:52px!important;font-size:21px!important}
@media(max-width:760px){html:root:not(#_) body.app .profile-dialog .profile-identity{padding:18px 16px 8px!important}}
html:root:not(#_) body.app .profile-dialog .profile-identity b{font-size:16px!important;font-weight:650!important;line-height:1.3!important;color:var(--text)!important}
html:root:not(#_) body.app .profile-dialog .profile-identity p{font-size:13.5px!important;line-height:1.4!important;margin:2px 0 0!important}
html:root:not(#_) body.app .profile-dialog-top h2{line-height:1.2!important;margin:0!important}
html:root:not(#_) body.app .profile-dialog #profileForm{padding-top:8px!important}
html:root:not(#_) body.app .profile-dialog details,html:root:not(#_) body.app .profile-dialog .profile-links{padding:16px 20px!important;margin:0!important;border:0!important;border-top:1px solid var(--line)!important;background:transparent!important;border-radius:0!important}
html:root:not(#_) body.app .profile-dialog details>summary{font-size:15px!important;font-weight:600!important;color:var(--text)!important}
html:root:not(#_) body.app .profile-dialog .voice-controls label:has(select){display:block!important}
html:root:not(#_) body.app .profile-dialog .voice-controls select{margin-top:6px!important;display:block}
html:root:not(#_) body.app .profile-dialog .learning-controls label.btn{display:inline-flex!important;align-items:center;width:auto;margin-top:10px;color:var(--text)!important}
@media(max-width:760px){html:root:not(#_) body.app .profile-dialog details,html:root:not(#_) body.app .profile-dialog .profile-links{padding:14px 16px!important}}

/* ---------- composer + message buttons ---------- */
html:root:not(#_) body.app .composer{align-items:center;gap:6px}
html:root:not(#_) body.app .composer .icon,html:root:not(#_) body.app .composer .mic-lang{
  width:36px;height:36px;min-height:36px;padding:0;display:inline-grid;place-items:center;flex:none;
  background:transparent!important;border:1px solid transparent!important;border-radius:9px!important;color:var(--muted)!important}
html:root:not(#_) body.app .composer .mic-lang{width:auto;min-width:36px;padding:0 8px;font-size:12px;font-weight:650;border-color:var(--line)!important}
html:root:not(#_) body.app .composer .icon:hover,html:root:not(#_) body.app .composer .mic-lang:hover{background:var(--simple-hover)!important;color:var(--text)!important}
html:root:not(#_) body.app .composer .icon.on,html:root:not(#_) body.app .composer .mic.on{color:var(--danger)!important;background:var(--simple-hover)!important}
html:root:not(#_) body.app .composer .send{width:36px;height:36px;min-height:36px;padding:0;flex:none;display:inline-grid;place-items:center;
  background:var(--accent)!important;color:var(--simple-btn-text)!important;border:0!important;border-radius:10px!important;cursor:pointer}
html:root:not(#_) body.app .composer .send:hover{opacity:.9}
html:root:not(#_) body.app .composer .send:disabled{background:var(--line2)!important;color:var(--faint)!important;opacity:1;cursor:not-allowed}
html:root:not(#_) body.app .composer .send svg{width:17px;height:17px}
html:root:not(#_) body.app .msg-action{min-height:32px;padding:0 12px;background:transparent!important;border:1px solid var(--line)!important;border-radius:8px!important;color:var(--muted)!important;font-size:13px;font-weight:550;cursor:pointer}
html:root:not(#_) body.app .msg-action:hover{background:var(--simple-hover)!important;color:var(--text)!important;border-color:var(--line2)!important}
html:root:not(#_) body.app .chat-top .icon{width:38px;height:38px;border-radius:9px!important}
html:root:not(#_) body.app .seg button{border-radius:7px!important;min-height:30px}
@media(pointer:coarse){html:root:not(#_) body.app .composer .icon,html:root:not(#_) body.app .composer .mic-lang,html:root:not(#_) body.app .composer .send{width:40px;height:40px;min-height:40px}}
html:root:not(#_) body.app .controls select{background:var(--panel)!important;color:var(--text)!important;border:1px solid var(--line2)!important;border-radius:8px!important}

/* =====================================================================
   COMPACT CHAT (R8.19) — smaller, calmer controls
   ===================================================================== */
/* sidebar */
html:root:not(#_) body.app .new-chat,html:root:not(#_) body.app #newChat{min-height:34px!important;height:34px;padding:0 10px!important;border-radius:8px!important;font-size:14px!important;margin-bottom:8px}
html:root:not(#_) body.app #newChat .new-chat-main{font-size:14px!important}
html:root:not(#_) body.app #newChat .new-chat-plus,html:root:not(#_) body.app #newChat .new-chat-plus svg{width:16px!important;height:16px!important}
html:root:not(#_) body.app .chat-history-search{min-height:34px!important;height:34px!important;border-radius:8px!important}
html:root:not(#_) body.app .chat-history-search input[type=search]{height:30px!important;font-size:13.5px!important}
html:root:not(#_) body.app .conv{min-height:32px;border-radius:7px!important}
html:root:not(#_) body.app .conv .t{font-size:13.5px!important;line-height:32px}
html:root:not(#_) body.app .conv .del{width:24px;height:24px}
html:root:not(#_) body.app .conv-group{font-size:11.5px!important;padding:12px 12px 4px!important}
html:root:not(#_) body.app .credits{min-height:32px}
html:root:not(#_) body.app .credits b{font-size:12px;padding:2px 9px}
html:root:not(#_) body.app .profile-trigger{min-height:46px}
html:root:not(#_) body.app .profile-trigger .avatar{width:30px;height:30px;font-size:13px}

/* top bar */
html:root:not(#_) body.app .chat-top{min-height:48px;padding:0 16px!important}
html:root:not(#_) body.app .chat-heading>span{display:none}
html:root:not(#_) body.app .chat-heading #chatTitle{font-size:14.5px!important;font-weight:600!important;color:var(--text)!important}
html:root:not(#_) body.app .chat-top .icon{width:32px!important;height:32px!important;min-height:32px!important;border-radius:8px!important}
html:root:not(#_) body.app .chat-top .icon svg{width:17px;height:17px}
html:root:not(#_) body.app .badge{font-size:10.5px!important;padding:2px 8px!important;letter-spacing:.04em}

/* empty state: calm, small */
html:root:not(#_) body.app .empty{padding-top:0!important;display:flex;flex-direction:column;align-items:center;justify-content:center}
html:root:not(#_) body.app .empty h1{font-size:clamp(22px,3.2vw,28px)!important;line-height:1.25!important;margin:0 0 8px!important;font-weight:600!important}
html:root:not(#_) body.app .empty p{font-size:14px!important;margin:0 0 22px!important;max-width:460px}
html:root:not(#_) body.app .starters{display:flex!important;flex-wrap:wrap;justify-content:center;gap:8px!important;max-width:560px;grid-template-columns:none!important}
html:root:not(#_) body.app .starters button{display:inline-flex!important;align-items:center;gap:7px;width:auto!important;min-height:34px;padding:0 13px!important;border-radius:999px!important;font-size:13.5px!important;font-weight:550!important;text-align:left}
html:root:not(#_) body.app .starters button .ic{width:auto!important;height:auto!important;margin:0!important;padding:0!important;display:inline-grid;place-items:center}
html:root:not(#_) body.app .starters button .ic svg{width:15px;height:15px}
html:root:not(#_) body.app .starters button small,html:root:not(#_) body.app .starters button span:not(.ic)>small{display:none!important}
html:root:not(#_) body.app .starters button b,html:root:not(#_) body.app .starters button strong{font-size:13.5px!important;font-weight:550!important}
html:root:not(#_) body.app .starters button>span{display:inline!important}

/* messages */
html:root:not(#_) body.app .msg{margin:18px 0!important;gap:10px!important}
html:root:not(#_) body.app .msg .av{width:26px!important;height:26px!important;border-radius:8px!important}
html:root:not(#_) body.app .msg.user .bubble{font-size:14.5px;padding:9px 14px!important;border-radius:14px!important;line-height:1.55}
html:root:not(#_) body.app .md,html:root:not(#_) body.app .msg.assistant .bubble{font-size:14.5px!important;line-height:1.7!important}
html:root:not(#_) body.app .msg-action{min-height:28px!important;padding:0 10px!important;font-size:12.5px!important;border-radius:7px!important}

/* composer */
html:root:not(#_) body.app .dock{border-radius:14px!important}
html:root:not(#_) body.app .composer{padding:6px 8px!important;gap:4px!important}
html:root:not(#_) body.app .composer textarea{font-size:14.5px!important;min-height:36px!important;padding:8px 6px!important}
html:root:not(#_) body.app .composer .icon,html:root:not(#_) body.app .composer .mic-lang,html:root:not(#_) body.app .composer .send{width:32px!important;height:32px!important;min-height:32px!important;border-radius:8px!important}
html:root:not(#_) body.app .composer .mic-lang{min-width:32px;width:auto!important;padding:0 7px;font-size:11.5px}
html:root:not(#_) body.app .composer .icon svg,html:root:not(#_) body.app .composer .send svg{width:16px!important;height:16px!important}
html:root:not(#_) body.app .composer .composer-add{background:transparent!important;border-color:var(--line)!important}
html:root:not(#_) body.app .controls{padding:4px 10px 8px!important}
html:root:not(#_) body.app .controls .seg button{min-height:26px;font-size:12.5px;padding:0 10px}
html:root:not(#_) body.app .controls select{min-height:28px;font-size:12.5px;padding:0 8px}
html:root:not(#_) body.app .fine{font-size:11.5px!important;margin-top:6px}
@media(pointer:coarse){
  html:root:not(#_) body.app .composer .icon,html:root:not(#_) body.app .composer .mic-lang,html:root:not(#_) body.app .composer .send{width:38px!important;height:38px!important;min-height:38px!important}
  html:root:not(#_) body.app .chat-top .icon{width:38px!important;height:38px!important;min-height:38px!important}
  html:root:not(#_) body.app .conv{min-height:42px}html:root:not(#_) body.app .conv .t{line-height:42px}
  html:root:not(#_) body.app .new-chat,html:root:not(#_) body.app #newChat{min-height:40px!important;height:40px}
  html:root:not(#_) body.app .msg-action{min-height:34px!important}
}
html:root:not(#_) body.app .starters button{height:34px!important;min-height:0!important;padding:0 14px!important;line-height:1!important;flex:none!important;margin:0!important;display:inline-flex!important;flex-direction:row!important;align-items:center!important}
html:root:not(#_) body.app .starters button>span{margin:0!important;padding:0!important;line-height:1!important;display:inline-flex!important;align-items:center}
html:root:not(#_) body.app .starters button b{line-height:1!important}
html:root:not(#_) body.app .composer .composer-add,html:root:not(#_) body.app .composer #attachBtn{width:32px!important;height:32px!important;min-height:32px!important;padding:0!important;border-color:transparent!important;border-radius:8px!important;background:transparent!important}
html:root:not(#_) body.app .composer #attachBtn:hover{background:var(--simple-hover)!important}
html:root:not(#_) body.app .empty h1{font-weight:600!important}
html:root:not(#_) body.app .chat-heading #chatTitle{font-weight:600!important}
@media(pointer:coarse){html:root:not(#_) body.app .composer .composer-add,html:root:not(#_) body.app .composer #attachBtn{width:38px!important;height:38px!important;min-height:38px!important}}
html:root:not(#_) body.app .msg.user .bubble,html:root:not(#_) body.app .msg.user .bubble *{font-size:14.5px!important;line-height:1.55!important}
html:root:not(#_) body.app .msg{margin:12px 0!important}
html:root:not(#_) body.app .msg-actions,html:root:not(#_) body.app .actions{gap:2px!important;margin-top:4px!important}
html:root:not(#_) body.app .msg-action{border-color:transparent!important;color:var(--faint)!important;font-weight:500!important;min-height:26px!important;padding:0 8px!important}
html:root:not(#_) body.app .msg-action:hover{background:var(--simple-hover)!important;color:var(--text)!important}

/* =====================================================================
   GLASS BUTTONS (R8.20) — frosted secondary, glossy primary
   Specificity is raised on purpose so these win over the flatten rules.
   ===================================================================== */
:root{
  --g-fill:linear-gradient(180deg,rgba(255,255,255,.92),rgba(255,255,255,.58));
  --g-fill-hover:linear-gradient(180deg,#fff,rgba(255,255,255,.78));
  --g-border:rgba(31,30,29,.13);
  --g-shadow:inset 0 1px 0 rgba(255,255,255,.95),0 1px 2px rgba(31,30,29,.07),0 4px 12px rgba(31,30,29,.05);
  --g-shadow-hover:inset 0 1px 0 #fff,0 2px 4px rgba(31,30,29,.08),0 8px 20px rgba(31,30,29,.09);
  --g-pri:linear-gradient(180deg,#6f64e6 0%,#5b4fd6 100%);
  --g-pri-hover:linear-gradient(180deg,#7a70ee 0%,#6458dc 100%);
  --g-pri-border:rgba(255,255,255,.22);
  --g-pri-shadow:inset 0 1px 0 rgba(255,255,255,.38),inset 0 -1px 0 rgba(0,0,0,.08),0 1px 2px rgba(56,46,160,.35),0 6px 16px rgba(91,79,214,.24);
  --g-pri-shadow-hover:inset 0 1px 0 rgba(255,255,255,.45),inset 0 -1px 0 rgba(0,0,0,.08),0 2px 4px rgba(56,46,160,.35),0 10px 24px rgba(91,79,214,.32);
  --g-ring:0 0 0 3px rgba(91,79,214,.22);
}
:root[data-theme=dark]{
  --g-fill:linear-gradient(180deg,rgba(255,255,255,.11),rgba(255,255,255,.04));
  --g-fill-hover:linear-gradient(180deg,rgba(255,255,255,.17),rgba(255,255,255,.07));
  --g-border:rgba(255,255,255,.15);
  --g-shadow:inset 0 1px 0 rgba(255,255,255,.14),0 1px 2px rgba(0,0,0,.45),0 4px 12px rgba(0,0,0,.25);
  --g-shadow-hover:inset 0 1px 0 rgba(255,255,255,.2),0 2px 4px rgba(0,0,0,.5),0 8px 20px rgba(0,0,0,.32);
  --g-pri:linear-gradient(180deg,#a196f6 0%,#8a7ef0 100%);
  --g-pri-hover:linear-gradient(180deg,#aea5f8 0%,#9488f3 100%);
  --g-pri-border:rgba(255,255,255,.3);
  --g-pri-shadow:inset 0 1px 0 rgba(255,255,255,.4),inset 0 -1px 0 rgba(0,0,0,.12),0 1px 2px rgba(0,0,0,.5),0 6px 16px rgba(138,126,240,.22);
  --g-pri-shadow-hover:inset 0 1px 0 rgba(255,255,255,.5),inset 0 -1px 0 rgba(0,0,0,.12),0 2px 4px rgba(0,0,0,.5),0 10px 24px rgba(138,126,240,.3);
  --g-ring:0 0 0 3px rgba(161,150,246,.3);
}

/* ---------- primary: glossy accent ---------- */
html:root:not(#_):not(#__) body .btn:not(.ghost):not(.secondary):not(.link),
html:root:not(#_):not(#__) body #newChat,html:root:not(#_):not(#__) body .new-chat,
html:root:not(#_):not(#__) body .composer .send,
html:root:not(#_):not(#__) body .auth-submit{
  background:var(--g-pri)!important;background-image:var(--g-pri)!important;
  color:var(--simple-btn-text)!important;border:1px solid var(--g-pri-border)!important;
  box-shadow:var(--g-pri-shadow)!important;
  text-shadow:none!important;
  transition:background .15s,box-shadow .15s,transform .12s,opacity .15s!important}
html:root:not(#_):not(#__) body .btn:not(.ghost):not(.secondary):not(.link):hover,
html:root:not(#_):not(#__) body #newChat:hover,html:root:not(#_):not(#__) body .new-chat:hover,html:root:not(#_):not(#__) body .composer .send:hover,html:root:not(#_):not(#__) body .auth-submit:hover{
  background:var(--g-pri-hover)!important;background-image:var(--g-pri-hover)!important;
  box-shadow:var(--g-pri-shadow-hover)!important;transform:translateY(-1px)!important;opacity:1!important}
html:root:not(#_):not(#__) body .btn:not(.ghost):not(.secondary):not(.link):active,
html:root:not(#_):not(#__) body #newChat:active,html:root:not(#_):not(#__) body .composer .send:active,html:root:not(#_):not(#__) body .auth-submit:active{transform:translateY(0)!important;box-shadow:var(--g-pri-shadow)!important}
html:root:not(#_):not(#__) body .composer .send:disabled,html:root:not(#_):not(#__) body .btn:disabled{
  background:var(--g-fill)!important;background-image:var(--g-fill)!important;color:var(--faint)!important;border:1px solid var(--g-border)!important;box-shadow:none!important;transform:none!important}

/* ---------- secondary: frosted glass ---------- */
html:root:not(#_):not(#__) body .btn.ghost,html:root:not(#_):not(#__) body .btn.secondary,
html:root:not(#_):not(#__) body .composer .icon,html:root:not(#_):not(#__) body .composer .mic-lang,
html:root:not(#_):not(#__) body .chat-top .icon,
html:root:not(#_):not(#__) body .starters button,
html:root:not(#_):not(#__) body .credits b,
html:root:not(#_):not(#__) body .profile-dialog-top .icon,
html:root:not(#_):not(#__) body .profile-logout .btn,
html:root:not(#_):not(#__) body .seg,html:root:not(#_):not(#__) body .controls select,
html:root:not(#_):not(#__) body .role-chip,
html:root:not(#_):not(#__) body .tiers-demo span:not(.on),
html:root:not(#_):not(#__) body .field-eye,
html:root:not(#_):not(#__) body .pill{
  background:var(--g-fill)!important;background-image:var(--g-fill)!important;
  -webkit-backdrop-filter:blur(12px) saturate(1.4)!important;backdrop-filter:blur(12px) saturate(1.4)!important;
  border:1px solid var(--g-border)!important;box-shadow:var(--g-shadow)!important;
  color:var(--text)!important;
  transition:background .15s,box-shadow .15s,transform .12s,border-color .15s!important}
html:root:not(#_):not(#__) body .btn.ghost:hover,html:root:not(#_):not(#__) body .btn.secondary:hover,
html:root:not(#_):not(#__) body .composer .icon:hover,html:root:not(#_):not(#__) body .composer .mic-lang:hover,
html:root:not(#_):not(#__) body .chat-top .icon:hover,
html:root:not(#_):not(#__) body .starters button:hover,
html:root:not(#_):not(#__) body .credits:hover b,html:root:not(#_):not(#__) body .credits b:hover,
html:root:not(#_):not(#__) body .profile-dialog-top .icon:hover,html:root:not(#_):not(#__) body .profile-logout .btn:hover,
html:root:not(#_):not(#__) body .field-eye:hover{
  background:var(--g-fill-hover)!important;background-image:var(--g-fill-hover)!important;
  box-shadow:var(--g-shadow-hover)!important;border-color:var(--g-border)!important;transform:translateY(-1px)!important}
html:root:not(#_):not(#__) body .btn.ghost:active,html:root:not(#_):not(#__) body .composer .icon:active,html:root:not(#_):not(#__) body .chat-top .icon:active,html:root:not(#_):not(#__) body .starters button:active{transform:translateY(0)!important;box-shadow:var(--g-shadow)!important}
html:root:not(#_):not(#__) body .seg button.on,html:root:not(#_):not(#__) body .tiers-demo span.on{
  background:var(--g-pri)!important;background-image:var(--g-pri)!important;color:var(--simple-btn-text)!important;border:1px solid var(--g-pri-border)!important;box-shadow:var(--g-pri-shadow)!important}
html:root:not(#_):not(#__) body .seg{padding:2px!important;border-radius:10px!important}
html:root:not(#_):not(#__) body .seg button{background:transparent!important;background-image:none!important;border:0!important;box-shadow:none!important;color:var(--muted)!important;border-radius:8px!important}
html:root:not(#_):not(#__) body .seg button.on{color:var(--simple-btn-text)!important}
html:root:not(#_):not(#__) body .composer .icon,html:root:not(#_):not(#__) body .composer .mic-lang,html:root:not(#_):not(#__) body .composer .send{border-radius:9px!important}
html:root:not(#_):not(#__) body .composer #attachBtn,html:root:not(#_):not(#__) body .composer .composer-add{background:var(--g-fill)!important;background-image:var(--g-fill)!important;border:1px solid var(--g-border)!important;box-shadow:var(--g-shadow)!important}
html:root:not(#_):not(#__) body .composer #attachBtn:hover{background:var(--g-fill-hover)!important;background-image:var(--g-fill-hover)!important;box-shadow:var(--g-shadow-hover)!important}

/* chips keep their compact pill shape */
html:root:not(#_):not(#__) body .starters button{border-radius:999px!important}

/* message actions: quiet until hovered */
html:root:not(#_):not(#__) body .msg-action{background:transparent!important;background-image:none!important;border:1px solid transparent!important;box-shadow:none!important;color:var(--faint)!important}
html:root:not(#_):not(#__) body .msg-action:hover{background:var(--g-fill)!important;background-image:var(--g-fill)!important;border:1px solid var(--g-border)!important;box-shadow:var(--g-shadow)!important;color:var(--text)!important}

/* sidebar conversation rows + profile row stay flat but get a soft glass hover */
html:root:not(#_):not(#__) body .conv:hover,html:root:not(#_):not(#__) body .profile-trigger:hover,html:root:not(#_):not(#__) body .credits:hover{
  background:var(--g-fill)!important;background-image:var(--g-fill)!important;box-shadow:var(--g-shadow)!important}
html:root:not(#_):not(#__) body .conv.on{background:var(--g-fill)!important;background-image:var(--g-fill)!important;box-shadow:var(--g-shadow)!important;border:1px solid var(--g-border)!important}

/* dock itself: frosted panel */
html:root:not(#_):not(#__) body .dock{
  background:var(--g-fill)!important;background-image:var(--g-fill)!important;
  -webkit-backdrop-filter:blur(14px) saturate(1.3)!important;backdrop-filter:blur(14px) saturate(1.3)!important;
  box-shadow:var(--g-shadow)!important}
html:root:not(#_):not(#__) body .dock:focus-within{box-shadow:var(--g-shadow),var(--g-ring)!important}

/* focus ring (keyboard) on every glass/primary control */
html:root:not(#_):not(#__) body .btn:focus-visible,html:root:not(#_):not(#__) body #newChat:focus-visible,html:root:not(#_):not(#__) body .composer .icon:focus-visible,html:root:not(#_):not(#__) body .composer .send:focus-visible,html:root:not(#_):not(#__) body .starters button:focus-visible,html:root:not(#_):not(#__) body .chat-top .icon:focus-visible{
  outline:none!important;box-shadow:var(--g-shadow),var(--g-ring)!important}

/* landing: a whisper of colour behind the hero so the glass has something to refract */
html:root:not(#_):not(#__) body.landing .hero-v4{position:relative}
html:root:not(#_):not(#__) body.landing .hero-v4::before{content:"";position:absolute;inset:-40px 0 auto;height:340px;z-index:-1;pointer-events:none;
  background:radial-gradient(520px 220px at 50% 0%,rgba(91,79,214,.10),transparent 70%)!important;background-image:radial-gradient(520px 220px at 50% 0%,rgba(91,79,214,.10),transparent 70%)!important}
html:root:not(#_):not(#__) body.auth-premium .auth-form-side{background-image:radial-gradient(560px 260px at 50% 0%,rgba(91,79,214,.07),transparent 72%)!important}

@media(prefers-reduced-motion:reduce){html:root:not(#_):not(#__) body .btn,html:root:not(#_):not(#__) body #newChat,html:root:not(#_):not(#__) body .composer .send,html:root:not(#_):not(#__) body .starters button{transition:none!important;transform:none!important}}
html:root:not(#_):not(#__) body .composer>button{min-width:32px!important;margin:0!important}
html:root:not(#_):not(#__) body .composer>.mic-lang{width:auto!important;min-width:32px!important}
@media(pointer:coarse){html:root:not(#_):not(#__) body .composer>button{min-width:38px!important}html:root:not(#_):not(#__) body .composer>.mic-lang{min-width:38px!important}}
html:root:not(#_):not(#__) body .composer>.mic-lang{align-self:center!important;position:static!important;top:auto!important;margin:0!important;transform:none!important;line-height:1!important}

/* R8.23: public pages + admin keep the colourful glass look; chat has its own file (chat-ui.css) */
html:root:not(#_):not(#__):not(#___) body.landing{overflow-x:clip}
html:root:not(#_):not(#__):not(#___) body .composer>button,html:root:not(#_):not(#__):not(#___) body .composer>.mic-lang{align-self:flex-end!important;margin:0 0 3px!important}

/* R8.26: admin navigation icons (SVG line icons) */
html[data-admin-theme] .admin-nav a i{display:inline-grid!important;place-items:center;width:20px!important;height:20px!important;flex:none;font-style:normal;color:var(--muted)}
html[data-admin-theme] svg.nv{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
html[data-admin-theme] .admin-nav a:hover i,html[data-admin-theme] .admin-nav a.active i{color:var(--accent)!important}
html[data-admin-theme] .admin-theme-toggle .ico{display:inline-grid;place-items:center;width:20px;height:20px}
html[data-admin-theme] .admin-theme-toggle .ico svg.nv{width:17px;height:17px}
html[data-admin-theme] .admin-workspace-link,html[data-admin-theme] .admin-side-logout{display:flex;align-items:center;justify-content:flex-start;gap:9px}
html[data-admin-theme] .admin-workspace-link svg.nv,html[data-admin-theme] .admin-side-logout svg.nv{width:16px;height:16px}

/* =====================================================================
   R8.29 — ADMIN: one palette for dark + light (replaces the old navy/slate mix)
   ===================================================================== */
html[data-admin-theme=dark]:root:not(#_) body.admin-page{--bg:#14161b;--bg2:#101217;--panel:#1b1e25;--panel2:#232730;--field:#0f1116;--line:rgba(255,255,255,.085);--line2:rgba(255,255,255,.15);--text:#eceef4;--muted:#a3a8b8;--faint:#7b8091;--accent:#9d93ff;--hover:rgba(255,255,255,.06);--simple-hover:rgba(255,255,255,.06);--ok-bg:rgba(52,211,153,.12);--ok-tx:#6ee7b7;--bad-bg:rgba(248,113,113,.12);--bad-tx:#fca5a5;--warn-bg:rgba(251,191,36,.12);--warn-tx:#fcd34d;color-scheme:dark}
html[data-admin-theme=light]:root:not(#_) body.admin-page{--bg:#f4f5fa;--bg2:#ffffff;--panel:#ffffff;--panel2:#f1f2f8;--field:#f6f7fb;--line:rgba(20,24,50,.10);--line2:rgba(20,24,50,.17);--text:#14172a;--muted:#555b73;--faint:#868ba0;--accent:#5b4fd6;--hover:rgba(20,24,50,.05);--simple-hover:rgba(20,24,50,.05);--ok-bg:rgba(16,185,129,.12);--ok-tx:#047857;--bad-bg:rgba(239,68,68,.10);--bad-tx:#b91c1c;--warn-bg:rgba(245,158,11,.14);--warn-tx:#92400e;color-scheme:light}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page,html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main,html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-shell{background:var(--bg)!important;color:var(--text)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-side,html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-top,html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-mobile-top{background:var(--bg2)!important;border-color:var(--line)!important;box-shadow:none!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-nav a{color:var(--muted)!important;border-radius:11px}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-nav a:hover{background:var(--hover)!important;color:var(--text)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-nav a.active{background:color-mix(in srgb,var(--accent) 14%,transparent)!important;color:var(--text)!important;border-color:color-mix(in srgb,var(--accent) 35%,transparent)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-nav-label{color:var(--faint)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-nav a :is(b,em,.badge,.count){background:var(--panel2)!important;color:var(--muted)!important;border:1px solid var(--line)!important;border-radius:999px}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-nav a.active :is(b,em,.badge,.count){background:color-mix(in srgb,var(--accent) 18%,transparent)!important;color:var(--text)!important}

/* surfaces */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page :is(.admin-section>.card,.admin-card,.stat,.stat-card,.admin-panel,.eng-card,.card,.panel,.tile,.admin-live-card,details,.model-card,.pm-card,.provider-card,.pm-panel,.models-panel,.admin-model-panel,.shared-card,.search-card,.toggle-row,.switch-row,.pm-toggle,.admin-toggle,.eng-empty,.table-wrap,.tbl-wrap){background:var(--panel)!important;border:1px solid var(--line)!important;color:var(--text)!important;box-shadow:none!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(section.admin-section){background:transparent!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page :is(.eng-card,.card,.panel) :is(.eng-card,.card,.panel,details){background:var(--panel2)!important}

/* text */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(h1,h2,h3,h4,label,summary,strong,legend,th,td,dt){color:var(--text)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(p,li,dd){color:var(--text)}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.muted,.small,small,.hint,.field-note,.note,.admin-config-note,p.muted,.cap,.sub,figcaption){color:var(--muted)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.eyebrow,.admin-hero .eyebrow){color:var(--accent)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main a:not(.btn):not(.button):not([class*=btn]){color:var(--accent)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main code{background:var(--panel2)!important;color:var(--text)!important;border:1px solid var(--line)!important;border-radius:7px}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main hr,html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-section-head{border-color:var(--line)!important}

/* fields */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea){background:var(--field)!important;color:var(--text)!important;border:1px solid var(--line2)!important;border-radius:11px!important;box-shadow:none!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(input,select,textarea)::placeholder{color:var(--faint)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(input,select,textarea):focus{border-color:var(--accent)!important;box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 22%,transparent)!important;outline:0}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main select option{background:var(--panel);color:var(--text)}

/* notices */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.alert,.notice,.info,.eng-note,.pm-note,.callout,.hint-box){background:color-mix(in srgb,var(--accent) 9%,var(--panel))!important;border:1px solid color-mix(in srgb,var(--accent) 28%,transparent)!important;border-left:3px solid var(--accent)!important;color:var(--text)!important;border-radius:12px}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.alert.ok,.alert.success,.notice.ok){background:var(--ok-bg)!important;border-color:color-mix(in srgb,var(--ok-tx) 35%,transparent)!important;border-left-color:var(--ok-tx)!important;color:var(--ok-tx)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.alert.error,.alert.bad,.alert.danger,.notice.bad){background:var(--bad-bg)!important;border-color:color-mix(in srgb,var(--bad-tx) 35%,transparent)!important;border-left-color:var(--bad-tx)!important;color:var(--bad-tx)!important}

/* buttons */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(button,.btn,.button,a.btn):not(.primary):not(.admin-menu-btn):not([class*=pri]){background:var(--panel2)!important;color:var(--text)!important;border:1px solid var(--line2)!important;border-radius:11px;box-shadow:none!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(button,.btn,.button,a.btn):not(.primary):not([class*=pri]):hover{background:var(--hover)!important;border-color:var(--accent)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.btn.primary,button.primary,.btn[class*=pri],button[type=submit].primary){background:linear-gradient(135deg,#6c5ce7,#8f84f2)!important;color:#fff!important;border:0!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.gemini-test-btn,.eng-refresh,.btn.good,.btn.green){background:var(--ok-bg)!important;color:var(--ok-tx)!important;border:1px solid color-mix(in srgb,var(--ok-tx) 30%,transparent)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-side :is(.admin-theme-toggle,.admin-workspace-link,.admin-side-logout){background:var(--panel2)!important;color:var(--text)!important;border:1px solid var(--line2)!important;border-radius:11px}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-side :is(.admin-theme-toggle,.admin-workspace-link,.admin-side-logout):hover{border-color:var(--accent)!important;background:var(--hover)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-side .admin-workspace-link{color:var(--accent)!important}

/* toggle switches */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.switch,.toggle,.slider,.tgl){background:var(--panel2)!important;border:1px solid var(--line2)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(input:checked+.slider,input:checked+.switch,input:checked+.toggle,.switch.on,.toggle.on){background:var(--accent)!important;border-color:var(--accent)!important}

/* tables */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main table{border-color:var(--line)!important;background:transparent!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main th{background:var(--panel2)!important;color:var(--muted)!important;font-size:12.5px;letter-spacing:.5px;text-transform:uppercase;border-bottom:1px solid var(--line2)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main td{border-bottom:1px solid var(--line)!important;background:transparent!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main tbody tr:hover td{background:var(--hover)!important}

/* status pills */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.pill,.status-pill,.access-pill,.tag,.badge){border-radius:999px}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.ok,.pill.ok,.status-pill.ok,.badge.ok,.good){--p-bg:var(--ok-bg);--p-tx:var(--ok-tx)}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.bad,.pill.bad,.status-pill.bad,.badge.bad,.danger){--p-bg:var(--bad-bg);--p-tx:var(--bad-tx)}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.warn,.pill.warn,.status-pill.warn,.badge.warn){--p-bg:var(--warn-bg);--p-tx:var(--warn-tx)}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.pill,.status-pill,.access-pill,.tag,.badge):is(.ok,.bad,.warn,.good,.danger){background:var(--p-bg)!important;color:var(--p-tx)!important;border:1px solid color-mix(in srgb,var(--p-tx) 28%,transparent)!important}

/* R8.29b: leftover coloured labels, switches and borders */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(label,.vq-admin-field,.vq-admin-switch-copy,.vq-admin-switch) :is(span,b,strong){color:var(--text)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(label,.vq-admin-field,.vq-admin-switch-copy) :is(small,.muted,.small,.hint),html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main .vq-admin-field :is(small,em){color:var(--muted)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main .vq-admin-switch input{background:var(--panel2)!important;border:1px solid var(--line2)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main .vq-admin-switch input:checked{background:var(--accent)!important;border-color:var(--accent)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page :where(.admin-main) :where(div,section,details,form,hr,li,ul,table,thead,tbody,tr,th,td,header,footer,h1,h2,h3,h4){border-color:var(--line)}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.eng-card,.card,.panel,.providers-future-panel,.own-search-panel) :is(.eng-card,.card,.panel,.providers-future-panel,details){background:var(--field)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.providers-future-panel,.own-search-panel,.pc-shared-advanced,.vq-admin-field){background:transparent}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main .providers-future-panel,html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main .own-search-panel{background:var(--panel)!important;border:1px solid var(--line)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main :is(.providers-future-panel,.own-search-panel,.eng-card,.stat,details,.card,.panel){background-image:none!important}

/* R8.29c: primary buttons + profile avatar, same look in dark and light */
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main :is(.admin-profile-primary,.providers-save-btn,.vq-admin-save,button.btn:not(.ghost),a.btn:not(.ghost)){background:linear-gradient(135deg,#6c5ce7,#8f84f2)!important;background-image:linear-gradient(135deg,#6c5ce7,#8f84f2)!important;color:#fff!important;border:0!important;border-radius:11px!important;font-weight:650;padding:10px 18px;box-shadow:0 6px 18px rgba(108,92,231,.28)!important;cursor:pointer}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main :is(.admin-profile-primary,.providers-save-btn,.vq-admin-save,button.btn:not(.ghost)):hover{filter:brightness(1.08);border:0!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main :is(.btn.ghost,a.btn.ghost){background:transparent!important;background-image:none!important;color:var(--text)!important;border:1px solid var(--line2)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main .admin-profile-avatar{width:58px;height:58px;border-radius:18px;display:grid;place-items:center;font-size:24px;font-weight:700;color:#fff!important;background:linear-gradient(135deg,#6c5ce7,#8f84f2)!important;box-shadow:0 8px 22px rgba(108,92,231,.3)}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main .engine-mode-option.active,html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main .engine-policy-btn.active{background:color-mix(in srgb,var(--accent) 14%,var(--panel))!important;border-color:color-mix(in srgb,var(--accent) 45%,transparent)!important;color:var(--text)!important}
html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main .engine-mode-option:not(.active),html[data-admin-theme]:root:not(#_):not(#__) body.admin-page .admin-main.admin-main.admin-main .engine-policy-btn:not(.active){color:var(--muted)!important}
