/* Complementos de la app (lo demás viene del artefacto en base.css) */
.top-der { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.top-user { font-size:13px; opacity:.9; cursor:pointer; text-decoration:underline dotted; text-underline-offset:3px; }
.top-btn { background:rgba(255,255,255,.12); color:#fff; border:1px solid rgba(255,255,255,.35); border-radius:8px; padding:6px 12px; font:600 12.5px/1 inherit; font-family:inherit; cursor:pointer; }
.top-btn:hover { background:rgba(255,255,255,.22); }
.solo-cliente { display:none; }
body.modo-informe .solo-cliente { display:inline-block; }

.grid-us { display:grid; grid-template-columns:1.3fr 1fr 1fr; gap:12px; }
.grid-emp { display:grid; grid-template-columns:1fr 2fr 1.2fr auto; gap:10px; align-items:end; }
.chk-lista { max-height:210px; overflow:auto; border:1px solid var(--linea); border-radius:10px; padding:8px 12px; background:#fafaf8; margin-top:6px; display:grid; grid-template-columns:repeat(auto-fill, minmax(260px, 1fr)); gap:6px 14px; }
.filtro { padding:7px 11px; border:1px solid #cfcdc6; border-radius:8px; font:inherit; min-width:200px; }
.acc-fila { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.acc-fila .btn { padding:6px 10px; font-size:12.5px; }
tr.inactivo td { opacity:.55; }
.vacio-cli { color:#aeb4bb; text-align:center; padding:80px 20px; font-size:15px; }
body:not(.modo-informe) .vacio-cli { color:var(--t2); }
body:not(.modo-informe) #sec-lector .barra-cli { border-radius:12px; margin-bottom:12px; }
@media (max-width:820px) { .grid-us, .grid-emp { grid-template-columns:1fr; } }

/* ---------------- Asistente ---------------- */
.asis { position:fixed; top:0; right:0; bottom:0; width:min(420px, 100vw); z-index:50; background:#fff; border-left:1px solid var(--linea);
  box-shadow:-10px 0 30px rgba(0,0,0,.18); display:flex; flex-direction:column; font:14px/1.5 "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color:var(--t1); }
.asis-cab { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; padding:14px 16px; background:linear-gradient(120deg,var(--marca),var(--marca2)); color:#fff; }
.asis-sub { font-size:12px; opacity:.85; }
.asis-acc { display:flex; gap:6px; }
.asis-ico { background:rgba(255,255,255,.14); border:1px solid rgba(255,255,255,.3); color:#fff; border-radius:8px; width:34px; height:34px; cursor:pointer; font-size:15px; }
.asis-ico[aria-pressed="true"] { background:#fff; color:var(--marca); }
.asis-msgs { flex:1; overflow-y:auto; padding:14px; display:flex; flex-direction:column; gap:10px; background:#f7f7f5; }
.asis-m { max-width:88%; padding:9px 12px; border-radius:14px; white-space:pre-wrap; font-size:13.5px; }
.asis-m.usuario { align-self:flex-end; background:var(--marca); color:#fff; border-bottom-right-radius:4px; }
.asis-m.ia { align-self:flex-start; background:#fff; border:1px solid var(--linea); border-bottom-left-radius:4px; }
.asis-m.error { border-color:#fecdca; background:#fef3f2; color:#b42318; }
.asis-esc { color:var(--t3); animation:parp 1s infinite; }
@keyframes parp { 50% { opacity:.3; } }
.asis-vacio { color:var(--t2); font-size:13px; text-align:center; margin:auto 10px; }
.asis-sug { display:flex; flex-wrap:wrap; gap:6px; padding:0 14px 10px; background:#f7f7f5; }
.asis-sug .chip { font-size:12px; padding:6px 10px; text-align:left; line-height:1.3; }
.asis-in { display:flex; gap:8px; align-items:flex-end; padding:10px 12px; border-top:1px solid var(--linea); }
.asis-in textarea { flex:1; resize:none; max-height:120px; padding:9px 11px; border:1px solid #cfcdc6; border-radius:10px; font:inherit; font-size:13.5px; }
.asis-mic { width:42px; height:40px; border-radius:50%; border:1px solid #cfcdc6; background:#fff; cursor:pointer; font-size:18px; flex:none; }
.asis-mic.escuchando { background:#b42318; border-color:#b42318; color:#fff; animation:pulso 1.2s infinite; }
@keyframes pulso { 0% { box-shadow:0 0 0 0 rgba(180,35,24,.5); } 70% { box-shadow:0 0 0 10px rgba(180,35,24,0); } 100% { box-shadow:0 0 0 0 rgba(180,35,24,0); } }
.asis-nota { font-size:11px; color:var(--t3); padding:0 14px 10px; }
@media (prefers-reduced-motion: reduce) { .asis-mic.escuchando, .asis-esc { animation:none; } }

/* ---------------- Comparar modelos ---------------- */
.comparar { margin-top:16px; border-top:2px dashed var(--linea); padding-top:14px; }
.comparar .int { font-size:11px; font-weight:600; color:var(--t3); text-transform:uppercase; letter-spacing:.04em; }
.cmp-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:12px; margin-top:10px; }
.cmp-col { border:1px solid var(--linea); border-radius:10px; padding:10px 12px; background:#fafaf8; min-width:0; }
.cmp-cab { display:flex; flex-direction:column; gap:2px; margin-bottom:6px; }
.cmp-col .hallazgos li { grid-template-columns:1fr; gap:4px; }
.cmp-texto { white-space:pre-wrap; font-size:13px; margin:0; }
@media (max-width:980px) { .cmp-grid { grid-template-columns:1fr; } }

/* ---------------- Conversación por voz ---------------- */
.voz-fab { position:fixed; right:22px; bottom:22px; z-index:45; width:64px; height:64px; border-radius:50%; border:0; cursor:pointer;
  background:radial-gradient(circle at 30% 30%, #6e7277, #2b2e32 70%); color:#fff; box-shadow:0 10px 26px rgba(0,0,0,.35); display:grid; place-items:center; }
.voz-fab:hover { transform:scale(1.06); }
.voz-fab:focus-visible { outline:3px solid #2a78d6; outline-offset:3px; }
.voz-fab-marca { position:relative; z-index:1; display:grid; place-items:center; }
.voz-fab-onda { position:absolute; inset:0; border-radius:50%; border:2px solid rgba(255,255,255,.55); animation:vozOnda 2.4s ease-out infinite; }
@keyframes vozOnda { from { transform:scale(1); opacity:.8; } to { transform:scale(1.55); opacity:0; } }
body.con-asistente .voz-fab { right:440px; }

.voz { position:fixed; inset:0; z-index:60; background:radial-gradient(120% 80% at 50% 10%, #3a3d42 0%, #121315 60%); color:#f2f3f5;
  display:flex; flex-direction:column; font-family:"Segoe UI", Roboto, Helvetica, Arial, sans-serif; }
.voz-cab { display:flex; justify-content:space-between; align-items:flex-start; padding:18px 22px; }
.voz-t { font-size:16px; font-weight:600; } .voz-e { font-size:12.5px; color:#a3a9b0; }
.voz-x { background:rgba(255,255,255,.1); border:1px solid rgba(255,255,255,.2); color:#fff; width:40px; height:40px; border-radius:50%; cursor:pointer; font-size:16px; }
.voz-centro { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:18px; padding:0 22px; text-align:center; }
.voz-orbe { position:relative; width:190px; height:190px; border-radius:50%; border:0; background:none; cursor:pointer; display:grid; place-items:center; }
.voz-nucleo { position:relative; z-index:2; width:150px; height:150px; border-radius:50%; display:grid; place-items:center; color:#fff;
  background:radial-gradient(circle at 35% 30%, #8a9096, #3d4045 65%); box-shadow:0 0 50px rgba(255,255,255,.12); transition:transform .25s; }
.voz-anillo { position:absolute; inset:0; border-radius:50%; border:2px solid rgba(255,255,255,.18); }
.voz.escuchando .voz-nucleo { background:radial-gradient(circle at 35% 30%, #5da0ff, #1f5fbf 70%); animation:vozLatido 1.4s ease-in-out infinite; }
.voz.escuchando .voz-anillo { border-color:rgba(93,160,255,.6); animation:vozOnda 1.8s ease-out infinite; }
.voz.escuchando .voz-anillo.a2 { animation-delay:.9s; }
.voz.pensando .voz-nucleo { animation:vozGiro 1.2s linear infinite; background:conic-gradient(from 0deg, #3d4045, #8a9096, #3d4045); }
.voz.hablando .voz-nucleo { background:radial-gradient(circle at 35% 30%, #e8ebee, #8a9096 70%); color:#121315; animation:vozHabla .5s ease-in-out infinite alternate; }
.voz.hablando .voz-anillo { border-color:rgba(232,235,238,.5); animation:vozOnda 1.2s ease-out infinite; }
.voz.hablando .voz-anillo.a2 { animation-delay:.6s; }
@keyframes vozLatido { 50% { transform:scale(1.07); } }
@keyframes vozGiro { to { transform:rotate(360deg); } }
@keyframes vozHabla { from { transform:scale(1); } to { transform:scale(1.09); } }
.voz-estado { font-size:20px; font-weight:500; letter-spacing:.01em; min-height:28px; }
.voz-tu { font-size:15px; color:#cfd3d8; max-width:640px; min-height:22px; font-style:italic; }
.voz-ia { font-size:16px; color:#f2f3f5; max-width:680px; line-height:1.5; max-height:30vh; overflow:auto; }
.voz-pie { display:flex; justify-content:center; gap:12px; padding:14px 22px 6px; flex-wrap:wrap; }
.voz-btn { background:rgba(255,255,255,.1); color:#fff; border:1px solid rgba(255,255,255,.22); border-radius:999px; padding:11px 22px; font:600 14px/1 inherit; font-family:inherit; cursor:pointer; }
.voz-btn.fin { background:#b42318; border-color:#b42318; }
.voz-btn[aria-pressed="true"] { background:#fff; color:#121315; }
.voz-nota { text-align:center; font-size:11.5px; color:#8b929a; padding:0 22px 18px; }
@media (prefers-reduced-motion: reduce) { .voz *, .voz-fab-onda { animation:none !important; } }
@media (max-width:600px) { .voz-orbe { width:160px; height:160px; } .voz-nucleo { width:126px; height:126px; } body.con-asistente .voz-fab { right:22px; bottom:90px; } }

/* Apoyo visual de la conversación por voz */
.voz.con-visual .voz-orbe { width:110px; height:110px; }
.voz.con-visual .voz-nucleo { width:86px; height:86px; }
.voz.con-visual .voz-nucleo svg { width:28px; height:28px; }
.voz.con-visual .voz-centro { justify-content:flex-start; padding-top:8px; gap:12px; }
.voz.con-visual .voz-ia { max-height:18vh; font-size:14.5px; color:#cfd3d8; }
.voz-visual { width:100%; max-width:680px; background:#f7f7f5; color:#1d2024; border-radius:16px; padding:16px 18px; text-align:left;
  box-shadow:0 18px 40px rgba(0,0,0,.35); animation:vvEntra .35s ease-out; max-height:46vh; overflow:auto; }
@keyframes vvEntra { from { opacity:0; transform:translateY(10px) scale(.98); } to { opacity:1; transform:none; } }
.vv-tit { font-size:15px; font-weight:700; margin-bottom:12px; color:#3d4045; }
.vv-kpis { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:10px; }
.vv-kpi { background:#fff; border:1px solid #e4e3df; border-radius:12px; padding:12px; }
.vv-k { font-size:11.5px; text-transform:uppercase; letter-spacing:.04em; color:#6b6f75; }
.vv-v { font-size:22px; font-weight:700; margin:4px 0 2px; white-space:nowrap; }
.vv-a { font-size:12px; color:#6b6f75; }
.vv-var { font-weight:700; font-size:12px; white-space:nowrap; } .vv-var.sube { color:#0b7a0b; } .vv-var.baja { color:#b42318; }
.vv-barras { display:flex; flex-direction:column; gap:9px; }
.vv-fila { display:grid; grid-template-columns:minmax(90px, 38%) 1fr; gap:10px; align-items:center; }
.vv-et { font-size:13px; font-weight:600; line-height:1.25; }
.vv-pistas { display:flex; flex-direction:column; gap:3px; }
.vv-pista { display:flex; align-items:center; gap:8px; }
.vv-pista b { font-size:12.5px; white-space:nowrap; font-variant-numeric:tabular-nums; }
.vv-barra { display:block; height:14px; min-width:3px; border-radius:7px; background:linear-gradient(90deg, #2a78d6, #5da0ff); animation:vvCrece .6s ease-out; transform-origin:left; }
.vv-pista.ant .vv-barra { background:#b9b7b0; height:9px; }
@keyframes vvCrece { from { transform:scaleX(0); } to { transform:scaleX(1); } }
.vv-ley { display:flex; align-items:center; gap:6px; font-size:12px; color:#6b6f75; margin-top:10px; }
.vv-ley span { width:14px; height:8px; border-radius:4px; display:inline-block; background:#2a78d6; } .vv-ley span.ant { background:#b9b7b0; margin-left:10px; }
.vv-tabla { width:100%; border-collapse:collapse; font-size:13.5px; font-variant-numeric:tabular-nums; }
.vv-tabla th { text-align:right; font-size:11.5px; color:#6b6f75; border-bottom:2px solid #e4e3df; padding:6px 8px; }
.vv-tabla th:first-child, .vv-tabla td:first-child { text-align:left; }
.vv-tabla td { text-align:right; padding:7px 8px; border-bottom:1px solid #e4e3df; }
@media (prefers-reduced-motion: reduce) { .voz-visual, .vv-barra { animation:none; } }
@media (max-width:600px) { .voz.con-visual .voz-orbe { width:84px; height:84px; } .voz.con-visual .voz-nucleo { width:66px; height:66px; } .voz-visual { padding:12px; } .vv-v { font-size:19px; } }

/* Pantalla de voz: siempre cabe (ventanas bajas de PC y celulares) */
.voz { overflow-y:auto; overflow-x:hidden; overscroll-behavior:contain; }
.voz-cab { flex-shrink:0; }
.voz-centro { flex:1 1 auto; min-height:0; width:100%; box-sizing:border-box; }
.voz-visual, .voz-ia, .voz-tu { box-sizing:border-box; }
.voz-pie { flex-shrink:0; position:sticky; bottom:0; background:linear-gradient(to top, #121315 70%, rgba(18,19,21,0)); padding-top:18px; }
.voz-nota { flex-shrink:0; background:#121315; }
@media (max-height:760px) {
  .voz-cab { padding:10px 18px; }
  .voz-centro { gap:10px; }
  .voz-orbe { width:130px; height:130px; } .voz-nucleo { width:104px; height:104px; } .voz-nucleo svg { width:32px; height:32px; }
  .voz.con-visual .voz-orbe { width:78px; height:78px; } .voz.con-visual .voz-nucleo { width:62px; height:62px; } .voz.con-visual .voz-nucleo svg { width:22px; height:22px; }
  .voz-estado { font-size:17px; min-height:22px; }
  .voz-visual { max-height:38vh; padding:12px 14px; } .vv-v { font-size:19px; } .vv-kpi { padding:9px 10px; }
  .voz-ia, .voz.con-visual .voz-ia { max-height:16vh; font-size:14px; }
  .voz-pie { padding:10px 18px 4px; } .voz-btn { padding:9px 18px; }
  .voz-nota { padding:0 18px 10px; }
}
@media (max-height:560px) { .voz-nota { display:none; } .voz-tu { display:none; } }

.voz-btn.sonido { background:#2a78d6; border-color:#2a78d6; font-size:15px; animation:vozLatido 1.4s ease-in-out infinite; }
