/* NEUVOX Adaptive - pele visual opt-in (Fase 1).
   Tudo aqui vale SOMENTE quando <html data-ui="adaptive">, atributo que so existe
   quando a pessoa escolhe um tema Adaptive em Configuracoes > Aparencia.
   Sem o atributo este arquivo e inerte: o tema padrao continua identico.
   Cores vem dos tokens do tema (TEMAS no index.html); aqui ficam estrutura,
   tipografia e as correcoes do modo escuro. Nenhum comportamento muda. */

@font-face{font-family:'Geist';font-style:normal;font-display:swap;font-weight:100 900;
  src:url('/fonts/geist-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Geist';font-style:normal;font-display:swap;font-weight:100 900;
  src:url('/fonts/geist-latin-wght-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Geist Mono';font-style:normal;font-display:swap;font-weight:100 900;
  src:url('/fonts/geist-mono-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Geist Mono';font-style:normal;font-display:swap;font-weight:100 900;
  src:url('/fonts/geist-mono-latin-wght-normal.woff2') format('woff2');
  unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

/* ---------- tipografia ---------- */
:where(html[data-ui="adaptive"]) body{letter-spacing:-.003em}
:where(html[data-ui="adaptive"]) h1,:where(html[data-ui="adaptive"]) h2{font-weight:600;letter-spacing:-.015em}
:where(html[data-ui="adaptive"]) h3{letter-spacing:-.005em}
:where(html[data-ui="adaptive"]) input,:where(html[data-ui="adaptive"]) select,:where(html[data-ui="adaptive"]) textarea,:where(html[data-ui="adaptive"]) button{font-family:inherit}
:where(html[data-ui="adaptive"]) .greet{font-size:16px;font-weight:600;letter-spacing:-.012em}
:where(html[data-ui="adaptive"]) .nav .logo{font-weight:600;letter-spacing:-.01em}
:where(html[data-ui="adaptive"]) .eyebrow,:where(html[data-ui="adaptive"]) .nav .brand-sub{letter-spacing:.12em}
:where(html[data-ui="adaptive"]) .head-indicators .hi b,:where(html[data-ui="adaptive"]) .time,:where(html[data-ui="adaptive"]) .meta,
:where(html[data-ui="adaptive"]) .file-time,:where(html[data-ui="adaptive"]) .wait,:where(html[data-ui="adaptive"]) .topbar-search-kbd{font-family:var(--font-mono);font-variant-numeric:tabular-nums}
:where(html[data-ui="adaptive"]) .head-indicators .hi b{font-size:15px;font-weight:500}
:where(html[data-ui="adaptive"]) .head-indicators .hi.op b{font-family:var(--font-body);font-size:12px;font-weight:600;letter-spacing:.04em}
:where(html[data-ui="adaptive"]) .metric-hero-num,:where(html[data-ui="adaptive"]) .stat-num{font-weight:600;letter-spacing:-.02em}

/* ---------- superficies continuas: menos molduras, conversa em destaque ---------- */
/* A marca d'agua NAO e tocada pela pele: regra do produto (tests/tema-aparencia.test.js). */
:where(html[data-ui="adaptive"]) .nav{background:var(--bg);backdrop-filter:none}
:where(html[data-ui="adaptive"]) .nav a{border-radius:10px;font-weight:500}
:where(html[data-ui="adaptive"]) .nav a.active{font-weight:600}
:where(html[data-ui="adaptive"]) .nav a.active::before{display:none}
:where(html[data-ui="adaptive"]) .usercard{border-color:transparent;background:transparent}
:where(html[data-ui="adaptive"]) .topbar{background:var(--bg);backdrop-filter:none;border-bottom:1px solid var(--line)}
:where(html[data-ui="adaptive"]) .topbar-search{background:var(--bg-soft);border-color:var(--line)}
:where(html[data-ui="adaptive"]) .views{padding:0}
:where(html[data-ui="adaptive"]) .view{background:var(--bg)}
:where(html[data-ui="adaptive"]) .nav a:not(.active):hover{transform:none}
:where(html[data-ui="adaptive"]) .right .card:hover{transform:none;box-shadow:none}
:where(html[data-ui="adaptive"]) .view{border:0;border-radius:0}
:where(html[data-ui="adaptive"]) .col{background:var(--bg);border-right-color:var(--line)}
:where(html[data-ui="adaptive"]) .filters{border-bottom:0;padding:12px 12px 8px}
:where(html[data-ui="adaptive"]) .filters input{border-radius:10px;border-color:var(--line);background:var(--bg-soft)}
:where(html[data-ui="adaptive"]) .list-sec{background:var(--bg);border-bottom:0;padding:12px 18px 6px;letter-spacing:.07em}
:where(html[data-ui="adaptive"]) .center{background:var(--surface)}
:where(html[data-ui="adaptive"]) .chat-head{border-bottom-color:var(--line)}

/* ---------- lista: linhas silenciosas, urgencia continua no marcador ---------- */
:where(html[data-ui="adaptive"]) .conv{background:transparent;border-bottom:0;border-radius:0 12px 12px 0;margin:1px 8px 1px 0;padding:11px 10px 10px 13px}
:where(html[data-ui="adaptive"]) .conv:hover{background:var(--bg-soft)}
:where(html[data-ui="adaptive"]) .conv.sel{background:var(--sel)}
:where(html[data-ui="adaptive"]) .conv.sel:not(.needs){border-left-color:transparent}
:where(html[data-ui="adaptive"]) .conv.needs{background:transparent}
:where(html[data-ui="adaptive"]) .conv.needs.sel{background:var(--sel)}
:where(html[data-ui="adaptive"]) .name{font-weight:600;font-size:14px;letter-spacing:-.005em}
:where(html[data-ui="adaptive"]) .conv:not(.needs) .name{font-weight:500}
:where(html[data-ui="adaptive"]) .prev{font-size:13px}
:where(html[data-ui="adaptive"]) .badge{border-radius:6px;font-weight:500}
:where(html[data-ui="adaptive"]) .wait{border-radius:6px;font-weight:500;text-transform:none}
:where(html[data-ui="adaptive"]) .av{background:var(--bg-soft);color:var(--text)}
:where(html[data-ui="adaptive"]) .atender{border-radius:9px;background:var(--accent);border-color:var(--accent);font-size:12px}
:where(html[data-ui="adaptive"]) .atender:hover{background:var(--accent-2);border-color:var(--accent-2)}

/* ---------- controles ---------- */
:where(html[data-ui="adaptive"]) .btn{border-color:var(--line-3);box-shadow:none;font-weight:500}
:where(html[data-ui="adaptive"]) .btn.primary{box-shadow:none;font-weight:600}
:where(html[data-ui="adaptive"]) .btn.ok,:where(html[data-ui="adaptive"]) .btn.finalizar{font-weight:600}
:where(html[data-ui="adaptive"]) .chip{border-color:var(--line);font-weight:500}
:where(html[data-ui="adaptive"]) .chip.active{background:var(--ink);border-color:var(--ink);color:var(--bg);box-shadow:none}
:where(html[data-ui="adaptive"]) .chip:hover{border-color:var(--line-3);color:var(--ink)}
:where(html[data-ui="adaptive"]) .chip.active:hover{color:var(--bg)}
:where(html[data-ui="adaptive"]) .ia-actions{border-color:var(--line-3)}
:where(html[data-ui="adaptive"]) .card{box-shadow:none}
:where(html[data-ui="adaptive"]) .stat{box-shadow:none}
:where(html[data-ui="adaptive"]) .stat:before{display:none}

/* ---------- conversa ---------- */
:where(html[data-ui="adaptive"]) .msgs{padding:20px 22px;gap:8px}
:where(html[data-ui="adaptive"]) .msg{padding:9px 13px;font-size:14.5px;line-height:1.4}
:where(html[data-ui="adaptive"]) .m-in{background:var(--bg-soft);border-color:transparent;border-radius:18px 18px 18px 6px}
:where(html[data-ui="adaptive"]) .m-out{background:var(--wash);border-color:transparent;border-radius:18px 18px 6px 18px}
:where(html[data-ui="adaptive"]) .m-sys{background:var(--bg-soft);border-color:transparent}
:where(html[data-ui="adaptive"]) .m-ai{background:var(--info-soft);border:1px solid var(--info-line);border-radius:18px 18px 18px 6px}
:where(html[data-ui="adaptive"]) .m-ai .sender,:where(html[data-ui="adaptive"]) .m-ai:before{color:var(--info)}
:where(html[data-ui="adaptive"]) .m-ai:before{letter-spacing:.08em}
:where(html[data-ui="adaptive"]) .b-ia{background:var(--info-soft);color:var(--info)}

/* ---------- camadas flutuantes: unico lugar com vidro ---------- */
:where(html[data-ui="adaptive"]) .more-menu,:where(html[data-ui="adaptive"]) .filtro-menu,:where(html[data-ui="adaptive"]) .emoji-pop,
:where(html[data-ui="adaptive"]) .gm-pop{background:var(--float);backdrop-filter:blur(22px) saturate(1.4);-webkit-backdrop-filter:blur(22px) saturate(1.4);
  border-color:var(--line-3);border-radius:14px;box-shadow:var(--shadow-float)}
:where(html[data-ui="adaptive"]) .ops-drawer{background:var(--float);backdrop-filter:blur(26px) saturate(1.4);-webkit-backdrop-filter:blur(26px) saturate(1.4);box-shadow:var(--shadow-float)}
:where(html[data-ui="adaptive"]) .ops-drawer header h2{font-weight:600}
:where(html[data-ui="adaptive"]) .ops-cap .est{border-radius:6px;font-family:var(--font-mono);font-weight:500}
:where(html[data-ui="adaptive"]) .ops-cap .est.ativo{color:var(--green);border-color:transparent;padding-right:0}
:where(html[data-ui="adaptive"]) .ops-cap .est.pausado{color:var(--amber);background:var(--amber-soft);border-color:transparent}
:where(html[data-ui="adaptive"]) .ops-cap .est.bloqueado{color:var(--red);background:var(--red-soft);border-color:transparent}
:where(html[data-ui="adaptive"]) .ops-preset{border-color:var(--line)}
:where(html[data-ui="adaptive"]) .ops-preset.atual{border-color:var(--accent);box-shadow:none;background:var(--wash)}
:where(html[data-ui="adaptive"]) .ops-danger{border-color:var(--red);color:var(--red)}

/* ---------- movimento: curto e so onde explica mudanca ---------- */
@media (prefers-reduced-motion:no-preference){
  :where(html[data-ui="adaptive"]) .conv{transition:background-color .12s ease}
  :where(html[data-ui="adaptive"]) .btn,:where(html[data-ui="adaptive"]) .chip{transition:background-color .12s ease,border-color .12s ease,color .12s ease,transform .12s ease}
  :where(html[data-ui="adaptive"]) .btn.primary:active,:where(html[data-ui="adaptive"]) .atender:active{transform:scale(.97)}
  :where(html[data-ui="adaptive"]) .more-menu.open,:where(html[data-ui="adaptive"]) .filtro-menu.open{animation:nvxa-pop .16s cubic-bezier(.2,.8,.2,1)}
  @keyframes nvxa-pop{from{opacity:0;transform:translateY(-4px) scale(.98)}to{opacity:1;transform:none}}
}

/* ---------- modo escuro (grafite): ajustes manuais; os derivados vem abaixo ---------- */
html[data-ui="adaptive"][data-escuro="1"]{color-scheme:dark}
:where(html[data-ui="adaptive"][data-escuro="1"]) .quoted,:where(html[data-ui="adaptive"][data-escuro="1"]) .msg-body code{background:rgba(255,255,255,.07)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .pinned-bar-x:hover{background:rgba(255,255,255,.08)}
:where(html[data-ui="adaptive"][data-escuro="1"]) input,:where(html[data-ui="adaptive"][data-escuro="1"]) select,:where(html[data-ui="adaptive"][data-escuro="1"]) textarea{background-color:var(--bg-soft);color:var(--ink);border-color:var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) input::placeholder,:where(html[data-ui="adaptive"][data-escuro="1"]) textarea::placeholder{color:var(--muted)}
:where(html[data-ui="adaptive"][data-escuro="1"]) [style*="background:#fff"],:where(html[data-ui="adaptive"][data-escuro="1"]) [style*="background: #fff"]{background:var(--surface)!important}
:where(html[data-ui="adaptive"][data-escuro="1"]) .ck-read{color:#7DB5F0}
/* Remetente em mensagem enviada/sistema: o CSS base fixa #0F6A3D (verde escuro), ilegivel sobre o balao grafite. */
:where(html[data-ui="adaptive"][data-escuro="1"]) .m-out .sender,:where(html[data-ui="adaptive"][data-escuro="1"]) .m-sys .sender{color:var(--green)}
/* Blocos "escuros" do tema padrao usam --ink como fundo; no grafite --ink e claro, entao viram superficie elevada. */
:where(html[data-ui="adaptive"][data-escuro="1"]) .card.cfg-dark{background:var(--bg-soft);border-color:var(--border)}

/* ---------- modo escuro: derivado automaticamente do CSS de producao (46b2b9b) ---------- */
:where(html[data-ui="adaptive"][data-escuro="1"]) .wa-alarm{border:1px solid var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .files-bar select{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .file-row{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .file-row:hover{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .file-ic.k-document{background:var(--bg-soft)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .file-ic.k-audio{background:var(--bg-soft)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .files-note{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .chip{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .chip.active{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .filtro-menu{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .btn{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .btn:hover{border-color:var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .btn.primary{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .btn.danger{border-color:var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .btn.ok{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .ia-actions button{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .ia-actions button.ia-on{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .more-menu{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .scroll-bottom-btn{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .scroll-bottom-btn .sbb-badge{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) #btn-plus.rec{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) #btn-mic.rec{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .m-out{border:1px solid var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .m-fail{border:1px solid var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .m-unknown{border:1px solid var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .m-sys{background:var(--bg-soft)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .btn.finalizar:hover{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .atender{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .ficha-conflito-acts .btn.usar-novo{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .ficha-conflito-acts .btn.nova-ficha{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .handoff-banner{border:1px solid var(--border)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .doc-link{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .transcript{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .qr-suggest{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .dot-off{background:var(--bg-soft)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .qrbox{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .toast{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .nvx-dialog-btn-confirm{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .lightbox-body iframe{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .sw i{background:var(--bg-soft)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .sw i:before{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .mode-card-check{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .stepper-btn:hover{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .modal-box{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .login-main{background:var(--surface)}
@media(max-width:560px){:where(html[data-ui="adaptive"][data-escuro="1"]) .botbar{background:var(--surface)}}
:where(html[data-ui="adaptive"][data-escuro="1"]) .ia-quality .stat{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .ia-quality table.grid th{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .nav a.nav-alert .navbadge{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .nav a.nav-alert-soon .navbadge{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .lembrete-pop{background:var(--surface)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .badge.b-tarefa-vencida{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .badge.b-tarefa-proxima{color:var(--on-accent)}
:where(html[data-ui="adaptive"][data-escuro="1"]) .b-mine{color:var(--on-accent)}

/* =====================================================================
   FASE 2 - material, geometria, movimento e preferencias de acessibilidade.
   Inspirado nos principios de interface da Apple (conteudo primeiro, camada
   funcional em material translucido, geometria concentrica, movimento com
   proposito), sem copiar telas, icones, fontes ou marcas. Identidade NEUVOX.
   Preferencias (Configuracoes > Aparencia > Experiencia Adaptive) chegam como
   atributos no <html>: data-movimento, data-transparencia, data-contraste,
   data-densidade. "Como o sistema" = segue prefers-* do sistema operacional.
   ===================================================================== */

/* ---------- tokens ---------- */
html[data-ui="adaptive"]{
  --radius-xs:6px;--radius-sm:8px;--radius-md:12px;--radius-lg:16px;--radius-xl:22px;--radius-pill:999px;
  --nvx-glass-bg:var(--float);
  --nvx-glass-filter:blur(20px) saturate(1.6);
  --nvx-glass-border:rgba(12,31,34,.10);
  --nvx-glass-highlight:rgba(255,255,255,.75);
  --nvx-glass-shadow:0 1px 2px rgba(12,31,34,.06),0 10px 30px -12px rgba(12,31,34,.22);
  --nvx-dur-micro:150ms;--nvx-dur-control:200ms;--nvx-dur-layout:280ms;--nvx-dur-sheet:380ms;
  --nvx-ease-standard:cubic-bezier(.2,.8,.2,1);
  --nvx-ease-emphasized:cubic-bezier(.16,1,.3,1);
  --nvx-ease-exit:cubic-bezier(.4,0,1,1);
  /* mola curta: overshoot minimo, so em retorno de press e no thumb do toggle */
  --nvx-ease-spring:cubic-bezier(.34,1.36,.64,1);
}
html[data-ui="adaptive"][data-escuro="1"]{
  --nvx-glass-border:rgba(255,255,255,.09);
  --nvx-glass-highlight:rgba(255,255,255,.07);
  --nvx-glass-shadow:0 1px 2px rgba(0,0,0,.4),0 14px 36px -12px rgba(0,0,0,.7);
}
/* Sem backdrop-filter no navegador: o material vira superficie solida. */
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))){
  html[data-ui="adaptive"]{--nvx-glass-bg:var(--surface);--nvx-glass-filter:none}
}
/* Reduzir transparencia (preferencia ou sistema): solido, hierarquia por borda e sombra. */
html[data-ui="adaptive"][data-transparencia="reduzida"]{--nvx-glass-bg:var(--surface);--nvx-glass-filter:none;--float:var(--surface)!important}
/* Sem aceleracao grafica (data-render="software", detectado no painel): blur vira CPU e trava; material solido. */
html[data-ui="adaptive"][data-render="software"]{--nvx-glass-bg:var(--surface);--nvx-glass-filter:none;--float:var(--surface)!important}
@media (prefers-reduced-transparency:reduce){
  html[data-ui="adaptive"]{--nvx-glass-bg:var(--surface);--nvx-glass-filter:none;--float:var(--surface)!important}
}

/* ---------- material NEUVOX: so na camada funcional ---------- */
/* Menu lateral flutuante: cantos concentricos (raio externo 22 = interno 14 + recuo 8). */
:where(html[data-ui="adaptive"]) .nav{margin:10px 0 10px 10px;border:.5px solid var(--nvx-glass-border);border-radius:var(--radius-xl);
  background:var(--nvx-glass-bg);backdrop-filter:var(--nvx-glass-filter);-webkit-backdrop-filter:var(--nvx-glass-filter);
  box-shadow:inset 0 1px 0 var(--nvx-glass-highlight),var(--nvx-glass-shadow)}
:where(html[data-ui="adaptive"]) .app.nav-right .nav{margin:10px 10px 10px 0;border-left:.5px solid var(--nvx-glass-border)}
:where(html[data-ui="adaptive"]) .nav a{border-radius:14px}
:where(html[data-ui="adaptive"]) .nav a.active{background:var(--sel);color:var(--ink)}

/* Compositor flutuante: capsula acima do fim da conversa. */
:where(html[data-ui="adaptive"]) .composer{margin:0 14px 14px;padding:8px 10px;border:.5px solid var(--nvx-glass-border);border-radius:20px;
  background:var(--nvx-glass-bg);backdrop-filter:var(--nvx-glass-filter);-webkit-backdrop-filter:var(--nvx-glass-filter);
  box-shadow:inset 0 1px 0 var(--nvx-glass-highlight),var(--nvx-glass-shadow)}
:where(html[data-ui="adaptive"]) .composer textarea,:where(html[data-ui="adaptive"]) .composer input[type=text]{border-radius:14px;border-color:var(--line)}
:where(html[data-ui="adaptive"]) .composer textarea:focus,:where(html[data-ui="adaptive"]) .composer input[type=text]:focus{border-color:var(--accent)}
:where(html[data-ui="adaptive"]) .composer .btn{border-radius:12px}
@media(max-width:560px){:where(html[data-ui="adaptive"]) .composer{margin:0 8px 8px;border-radius:18px}}

/* Menus, popovers e gaveta: mesmo material, tokens unicos (substituem os fixos da Fase 1). */
:where(html[data-ui="adaptive"]) .more-menu,:where(html[data-ui="adaptive"]) .filtro-menu,:where(html[data-ui="adaptive"]) .emoji-pop,
:where(html[data-ui="adaptive"]) .gm-pop,:where(html[data-ui="adaptive"]) .ops-drawer{background:var(--nvx-glass-bg);
  backdrop-filter:var(--nvx-glass-filter);-webkit-backdrop-filter:var(--nvx-glass-filter);border:.5px solid var(--nvx-glass-border)}
:where(html[data-ui="adaptive"]) .more-menu,:where(html[data-ui="adaptive"]) .filtro-menu,:where(html[data-ui="adaptive"]) .emoji-pop,
:where(html[data-ui="adaptive"]) .gm-pop{border-radius:var(--radius-lg);padding:6px;box-shadow:inset 0 1px 0 var(--nvx-glass-highlight),var(--shadow-float)}
:where(html[data-ui="adaptive"]) .more-menu{transform-origin:top right}
:where(html[data-ui="adaptive"]) .filtro-menu{transform-origin:top left}
:where(html[data-ui="adaptive"]) .more-item{border-radius:10px}
:where(html[data-ui="adaptive"]) .ops-drawer{border-width:0 0 0 .5px;border-radius:var(--radius-xl) 0 0 var(--radius-xl)}
:where(html[data-ui="adaptive"]) .ops-backdrop{background:rgba(0,0,0,.18)}
:where(html[data-ui="adaptive"]) .modal-box{border-radius:var(--radius-xl);box-shadow:var(--shadow-float)}
:where(html[data-ui="adaptive"]) .toast{border-radius:var(--radius-pill);padding:10px 20px;box-shadow:var(--shadow-float)}

/* ---------- geometria: raios da escala, sem mistura aleatoria ---------- */
:where(html[data-ui="adaptive"]) .card{border-radius:var(--radius-lg)}
:where(html[data-ui="adaptive"]) .btn{border-radius:10px}
:where(html[data-ui="adaptive"]) .chip{border-radius:var(--radius-pill)}
:where(html[data-ui="adaptive"]) .topbar-search{border-radius:var(--radius-pill)}
:where(html[data-ui="adaptive"]) .tema-card{border-radius:var(--radius-md)}

/* ---------- movimento: feedback e continuidade, interrompivel, nunca bloqueia ---------- */
@media (prefers-reduced-motion:no-preference){
  /* press fisico curto; retorno com mola discreta */
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .btn,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .atender,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .chip,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .ap-seg button{
    transition:background-color var(--nvx-dur-micro) var(--nvx-ease-standard),border-color var(--nvx-dur-micro) var(--nvx-ease-standard),
      color var(--nvx-dur-micro) var(--nvx-ease-standard),box-shadow var(--nvx-dur-control) var(--nvx-ease-standard),
      transform var(--nvx-dur-control) var(--nvx-ease-spring)}
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .btn:active,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .atender:active,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .chip:active{transform:scale(.97);transition-duration:60ms}
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .composer .btn:active{transform:scale(.94)}
  /* elevacao optica no hover (so sombra: nada se desloca no layout) */
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .btn.primary:hover,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .atender:hover{box-shadow:0 6px 16px -8px var(--accent)}
  /* item de menu: selecao muda pelo fundo, sem salto */
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .nav a{transition:background-color var(--nvx-dur-control) var(--nvx-ease-standard),color var(--nvx-dur-control) var(--nvx-ease-standard)}
  /* toggle: thumb acompanha o estado com mola */
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .sw i,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .sw i:before{transition:background-color var(--nvx-dur-control) var(--nvx-ease-standard),transform var(--nvx-dur-layout) var(--nvx-ease-spring),left var(--nvx-dur-layout) var(--nvx-ease-spring)}
  /* popover nasce da origem (transform-origin ligado ao gatilho) */
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .more-menu.open,
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .filtro-menu.open{animation:nvxa-origem var(--nvx-dur-control) var(--nvx-ease-emphasized)}
  /* gaveta (Central de Operacao): entra pela borda de origem; fundo escurece discreto */
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .ops-drawer{animation:nvxa-gaveta var(--nvx-dur-sheet) var(--nvx-ease-emphasized)}
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .ops-backdrop{animation:nvxa-fade var(--nvx-dur-layout) var(--nvx-ease-standard)}
  :where(html[data-ui="adaptive"]:not([data-movimento="reduzido"])) .modal-box{animation:nvxa-sheet var(--nvx-dur-layout) var(--nvx-ease-emphasized)}
  /* troca de modo claro/escuro (View Transition, com fallback imediato no JS) */
  :where(html[data-ui="adaptive"])::view-transition-old(root),
  :where(html[data-ui="adaptive"])::view-transition-new(root){animation-duration:var(--nvx-dur-layout);animation-timing-function:var(--nvx-ease-standard)}
  @keyframes nvxa-origem{from{opacity:0;transform:scale(.94)}to{opacity:1;transform:none}}
  @keyframes nvxa-gaveta{from{transform:translateX(24px);opacity:0}to{transform:none;opacity:1}}
  @keyframes nvxa-sheet{from{opacity:0;transform:translateY(10px) scale(.985)}to{opacity:1;transform:none}}
  @keyframes nvxa-fade{from{opacity:0}to{opacity:1}}
}
/* Reduzir movimento pela preferencia: sem escala nem deslocamento; estado muda por opacidade/cor. */
:where(html[data-ui="adaptive"][data-movimento="reduzido"]) .btn:active,
:where(html[data-ui="adaptive"][data-movimento="reduzido"]) .btn.primary:active,
:where(html[data-ui="adaptive"][data-movimento="reduzido"]) .atender:active{transform:none}
:where(html[data-ui="adaptive"][data-movimento="reduzido"]) .more-menu.open,
:where(html[data-ui="adaptive"][data-movimento="reduzido"]) .filtro-menu.open,
:where(html[data-ui="adaptive"][data-movimento="reduzido"]) .toast.show{animation:none}
:where(html[data-ui="adaptive"][data-movimento="reduzido"])::view-transition-old(root),
:where(html[data-ui="adaptive"][data-movimento="reduzido"])::view-transition-new(root){animation:none}

/* ---------- aumentar contraste (preferencia ou sistema) ---------- */
/* Os tokens do tema ficam inline no <html>; por isso as trocas aqui usam !important. */
html[data-ui="adaptive"][data-contraste="alto"]:not([data-escuro]){
  --text:#1B2E31!important;--text-body:#1B2E31!important;--muted:#33474B!important;--muted-soft:#33474B!important;--text-muted:#33474B!important;--text-2:#1B2E31!important;
  --border:#8D9C9F!important;--line:#8D9C9F!important;--border-soft:#B7C2C3!important;--line-2:#B7C2C3!important;--line-3:#6F8084!important;
  --nvx-glass-bg:var(--surface);--nvx-glass-filter:none;--nvx-glass-border:#6F8084;--sel:rgba(12,31,34,.12)!important}
html[data-ui="adaptive"][data-contraste="alto"][data-escuro="1"]{
  --text:#E6EAEC!important;--text-body:#E6EAEC!important;--muted:#C6CED2!important;--muted-soft:#C6CED2!important;--text-muted:#C6CED2!important;--text-2:#E6EAEC!important;
  --border:#5E6B73!important;--line:#5E6B73!important;--border-soft:#434D54!important;--line-2:#434D54!important;--line-3:#76848C!important;
  --nvx-glass-bg:var(--surface);--nvx-glass-filter:none;--nvx-glass-border:#76848C;--sel:rgba(255,255,255,.14)!important}
@media (prefers-contrast:more){
  html[data-ui="adaptive"]:not([data-escuro]){
    --text:#1B2E31!important;--text-body:#1B2E31!important;--muted:#33474B!important;--muted-soft:#33474B!important;--text-muted:#33474B!important;--text-2:#1B2E31!important;
    --border:#8D9C9F!important;--line:#8D9C9F!important;--border-soft:#B7C2C3!important;--line-2:#B7C2C3!important;--line-3:#6F8084!important;
    --nvx-glass-bg:var(--surface);--nvx-glass-filter:none;--nvx-glass-border:#6F8084}
  html[data-ui="adaptive"][data-escuro="1"]{
    --text:#E6EAEC!important;--text-body:#E6EAEC!important;--muted:#C6CED2!important;--muted-soft:#C6CED2!important;--text-muted:#C6CED2!important;--text-2:#E6EAEC!important;
    --border:#5E6B73!important;--line:#5E6B73!important;--border-soft:#434D54!important;--line-2:#434D54!important;--line-3:#76848C!important;
    --nvx-glass-bg:var(--surface);--nvx-glass-filter:none;--nvx-glass-border:#76848C}
}
:where(html[data-ui="adaptive"][data-contraste="alto"]) .conv.sel{box-shadow:inset 0 0 0 1.5px var(--ink)}
:where(html[data-ui="adaptive"][data-contraste="alto"]) .m-in,:where(html[data-ui="adaptive"][data-contraste="alto"]) .m-out{border:1px solid var(--line-3)}

/* ---------- densidade compacta: mais conversas por tela, mesma hierarquia ---------- */
:where(html[data-ui="adaptive"][data-densidade="compacta"]) .conv{padding:7px 10px 6px 13px}
:where(html[data-ui="adaptive"][data-densidade="compacta"]) .name{font-size:13.5px}
:where(html[data-ui="adaptive"][data-densidade="compacta"]) .prev{font-size:12.5px}
:where(html[data-ui="adaptive"][data-densidade="compacta"]) .list-sec{padding:8px 18px 4px}
:where(html[data-ui="adaptive"][data-densidade="compacta"]) .msgs{padding:14px 18px;gap:5px}
:where(html[data-ui="adaptive"][data-densidade="compacta"]) .msg{padding:7px 11px;font-size:14px}
:where(html[data-ui="adaptive"][data-densidade="compacta"]) .composer{margin:0 10px 10px;padding:6px 8px}
