/* Bandeja del equipo · Cheese Studio IA
   Identidad del flyer: negro, grano de película, retícula técnica, fugas de luz
   naranja/ámbar/roja, títulos condensados (Anton) y etiquetas anchas (Archivo Expanded). */

:root {
  --negro: #09090a;
  --vidrio: rgba(12, 12, 14, 0.66);
  --vidrio-2: rgba(255, 255, 255, 0.04);
  --vidrio-3: rgba(255, 255, 255, 0.075);
  --borde: rgba(255, 255, 255, 0.1);
  --borde-2: rgba(255, 255, 255, 0.17);
  --texto: #f5f1ea;
  --texto-2: #ada7a0;
  --texto-3: #726c66;
  --ambar: #ffb547;
  --naranja: #ff6b1a;
  --naranja-2: #ff8a3d;
  --rojo: #ff2e2e;
  --rojo-2: #d3121f;
  --fuego: linear-gradient(120deg, #ffb547 0%, #ff6b1a 42%, #e8141f 100%);
  --fuego-v: linear-gradient(180deg, #ffd08a 0%, #ff6b1a 45%, #c4101b 100%);
  --wa: #25d366;
  --ig: #e1306c;
  --radio: 20px;
  --radio-m: 15px;
  --sombra: 0 30px 80px rgba(0, 0, 0, 0.6);
  --brillo: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --cuerpo: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --display: "Anton", "Archivo", Impact, "Arial Narrow", sans-serif;
  --suave: cubic-bezier(0.22, 1, 0.36, 1);
  --rebote: cubic-bezier(0.34, 1.56, 0.64, 1);
  --lateral: 260px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--cuerpo);
  font-size: 14px;
  line-height: 1.45;
  color: var(--texto);
  background: var(--negro);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, p { margin: 0; }
:focus-visible { outline: 2px solid var(--ambar); outline-offset: 2px; border-radius: 8px; }
::selection { background: rgba(255, 107, 26, 0.4); color: #fff; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255, 107, 26, 0.45); }
::-webkit-scrollbar-track { background: transparent; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.sutil { color: var(--texto-2); font-size: 12.5px; }

/* Tipografía de marca */
/* Etiqueta ancha: "ATENCIÓN INTELIGENTE 24/7" con la parte fuerte subrayada en fuego */
.kicker {
  font-family: var(--cuerpo); font-stretch: 125%; font-weight: 400;
  font-size: 10.5px; letter-spacing: 0.34em; text-transform: uppercase; color: var(--texto-2);
}
.kicker b {
  position: relative; display: inline-block; font-weight: 800; color: var(--texto); padding-bottom: 5px;
}
.kicker b::after {
  content: ""; position: absolute; left: 0; right: 0.34em; bottom: 0; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, #e8141f, #ff6b1a 70%, #ffb547);
  box-shadow: 0 0 10px rgba(255, 80, 30, 0.7);
  transform-origin: left; transform: scaleX(0); animation: trazar 0.9s var(--suave) 0.35s forwards;
}
/* Título condensado con bloque de fuego detrás, como "WHATSAPP" del flyer */
.titulo {
  position: relative; isolation: isolate; justify-self: start;
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  font-size: 42px; line-height: 0.95; letter-spacing: 0.01em; padding: 2px 10px 0 0;
  text-shadow: -1px 0 rgba(255, 46, 46, 0.45), 1px 0 rgba(80, 200, 255, 0.25), 0 2px 18px rgba(0, 0, 0, 0.5);
  animation: revelar 0.9s var(--suave) both;
}
.titulo::before {
  content: ""; position: absolute; z-index: -1; left: 40%; right: -34px; top: -4%; bottom: -6%; border-radius: 10px;
  background: linear-gradient(90deg, rgba(200, 16, 28, 0) 0%, rgba(214, 18, 31, 0.9) 30%, #ff5a1f 80%, #ff8a3d 100%);
  box-shadow: 0 0 30px rgba(255, 70, 30, 0.35);
  transform-origin: left; transform: scaleX(0); animation: trazar 0.8s var(--suave) 0.25s forwards;
}
.titulo.chico { font-size: 30px; justify-self: center; }
.pre-titulo {
  font-stretch: 125%; font-weight: 700; font-size: clamp(14px, 2.4vw, 22px); letter-spacing: 0.3em; text-transform: uppercase;
  color: var(--texto); margin-top: 18px; animation: subir 0.7s var(--suave) 0.1s both;
}

/* ---------- Fondo y texturas ---------- */

.fondo { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--negro); }
.reticula {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(33deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.045) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(-33deg, transparent calc(50% - 0.5px), rgba(255, 255, 255, 0.045) 50%, transparent calc(50% + 0.5px)),
    linear-gradient(rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px;
  mask-image: radial-gradient(ellipse at 55% 45%, #000 20%, rgba(0, 0, 0, 0.35) 75%, transparent 100%);
}
.concreto { /* textura de concreto/grunge del fondo */
  position: absolute; inset: 0; opacity: 0.22; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='c'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .02' numOctaves='5' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .9 0 0 0 0 .85 0 0 0 0 .8 0 0 0 1.4 -.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23c)'/%3E%3C/svg%3E");
}
.f5 { /* resplandor rojo detrás del contenido, como en el centro del flyer */
  width: 55vw; height: 60vh; left: 30vw; top: 18vh; filter: blur(90px); opacity: 0.4;
  background: radial-gradient(closest-side, rgba(200, 20, 30, 0.75), rgba(120, 10, 20, 0.3) 60%, transparent);
  animation: respirar 17s ease-in-out infinite alternate;
}
.marco { /* marco fino redondeado de los flyers */
  position: fixed; inset: 14px; border-radius: 26px; pointer-events: none;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.4);
}
.fuga { position: absolute; border-radius: 50%; filter: blur(70px); mix-blend-mode: screen; will-change: transform, opacity; }
.f1 {
  width: 34vw; height: 58vh; left: -19vw; top: -22vh; opacity: 0.8;
  background: radial-gradient(closest-side, rgba(255, 214, 140, 0.95), rgba(255, 140, 40, 0.7) 40%, rgba(255, 90, 20, 0.25) 70%, transparent);
  animation: respirar 9s ease-in-out infinite alternate;
}
.f2 {
  width: 50vw; height: 62vh; right: -22vw; bottom: -30vh;
  background: radial-gradient(closest-side, rgba(255, 50, 30, 0.95), rgba(232, 20, 31, 0.6) 45%, rgba(255, 107, 26, 0.2) 75%, transparent);
  animation: respirar 11s ease-in-out infinite alternate-reverse;
}
.f3 {
  width: 22vw; height: 55vh; right: -9vw; top: 8vh;
  background: radial-gradient(closest-side, rgba(255, 120, 40, 0.55), rgba(220, 30, 30, 0.25) 60%, transparent);
  animation: respirar 13s ease-in-out infinite alternate;
}
.f4 {
  width: 30vw; height: 30vh; left: 8vw; bottom: -18vh;
  background: radial-gradient(closest-side, rgba(255, 70, 30, 0.45), transparent);
  animation: respirar 15s ease-in-out infinite alternate-reverse;
}
.bordes-luz {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(255, 150, 60, 0.2), transparent 5%, transparent 95%, rgba(255, 60, 40, 0.18)),
    linear-gradient(180deg, rgba(255, 170, 80, 0.12), transparent 12%, transparent 88%, rgba(255, 40, 40, 0.14));
  animation: titilar 7s steps(1) infinite;
}
.grano {
  position: fixed; inset: -50%; z-index: 100; pointer-events: none; opacity: 0.09; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grano 0.9s steps(5) infinite;
}

/* ---------- Superficies ---------- */

.vidrio {
  background: var(--vidrio);
  -webkit-backdrop-filter: blur(18px) saturate(130%);
  backdrop-filter: blur(18px) saturate(130%);
  border: 1px solid var(--borde);
  border-radius: var(--radio);
  box-shadow: var(--sombra), var(--brillo);
}
.tarjeta {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.015));
  border: 1px solid var(--borde);
  border-radius: var(--radio-m);
  box-shadow: var(--brillo);
}
.tarjeta::before { /* reflejo cálido que entra por la esquina */
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  background: radial-gradient(120% 80% at 100% 0%, rgba(255, 107, 26, 0.09), transparent 45%);
}

/* ---------- Botones ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  border: 1px solid var(--borde-2); background: var(--vidrio-2);
  font-weight: 700; font-size: 12px; font-stretch: 112%; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap;
  transition: transform 0.25s var(--suave), background 0.2s, box-shadow 0.3s, border-color 0.2s, opacity 0.2s;
}
.btn:hover:not(:disabled) { transform: translateY(-2px); background: var(--vidrio-3); }
.btn:active:not(:disabled) { transform: translateY(0) scale(0.97); }
.btn:disabled { opacity: 0.38; cursor: default; }
.btn .ic { width: 16px; height: 16px; }
.btn-fuego {
  position: relative; overflow: hidden; border-color: rgba(255, 181, 71, 0.45); color: #fff;
  background: var(--fuego);
  box-shadow: 0 12px 34px rgba(255, 80, 30, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  text-shadow: 0 1px 2px rgba(120, 10, 0, 0.35);
}
.btn-fuego::after { /* destello que barre el botón */
  content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.45), transparent);
  transform: skewX(-20deg); animation: destello 4.5s ease-in-out infinite;
}
.btn-fuego:hover:not(:disabled) { box-shadow: 0 16px 44px rgba(255, 80, 30, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.5); }
.btn-contorno { border-color: rgba(255, 140, 60, 0.5); color: var(--ambar); background: rgba(255, 107, 26, 0.08); }
.btn-contorno:hover:not(:disabled) { background: rgba(255, 107, 26, 0.18); }
.btn-vidrio { color: var(--texto); }
.btn-bloque { width: 100%; height: 50px; font-size: 13px; }
.icono-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; flex: none;
  border-radius: 12px; border: 1px solid var(--borde); background: var(--vidrio-2); color: var(--texto-2);
  transition: background 0.2s, color 0.2s, transform 0.2s var(--suave), border-color 0.2s;
}
.icono-btn:hover { background: var(--vidrio-3); color: var(--texto); border-color: rgba(255, 140, 60, 0.4); }
.icono-btn:active { transform: scale(0.94); }
.enlace {
  display: inline-flex; align-items: center; gap: 6px; border: 0; background: none; padding: 4px 0; white-space: nowrap; flex: none;
  font-size: 11px; font-weight: 700; font-stretch: 115%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ambar);
}
.enlace .ic { width: 14px; height: 14px; transition: transform 0.3s var(--suave); }
.enlace:hover .ic { transform: translateX(4px); }

/* ---------- Marca ---------- */

.marca { display: flex; align-items: center; gap: 11px; min-width: 0; }
.marca-mono {
  display: grid; place-items: center; width: 38px; height: 38px; flex: none; border-radius: 12px;
  font-family: var(--display); font-size: 22px; color: #fff; line-height: 1;
  background: var(--fuego);
  box-shadow: 0 8px 24px rgba(255, 80, 30, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  text-shadow: 0 1px 2px rgba(100, 10, 0, 0.4);
}
.marca-mono img {
  width: 72%; height: auto; display: block;
  filter: drop-shadow(0 1px 2px rgba(100, 10, 0, 0.45));
}
.logo-pie { height: 30px; width: auto; display: block; opacity: 0.92; }
/* Menú abierto: logo completo; menú plegado: solo el ratón en el cuadro de fuego */
.lateral .marca-mono { display: none; }
.marca-logo {
  display: block; width: 100%; max-width: 186px; height: auto; margin: 4px 0 2px 2px;
  filter: drop-shadow(0 4px 14px rgba(255, 90, 30, 0.25));
  animation: subir 0.7s var(--suave) both;
}
.plegado .lateral .marca-mono { display: grid; }
.plegado .marca-logo { display: none; }
.marca-texto {
  display: inline-flex; flex-direction: column; line-height: 1; white-space: nowrap;
  font-weight: 900; font-size: 21px; letter-spacing: -0.02em;
}
.marca-texto small {
  font-size: 8.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.36em; text-transform: uppercase;
  color: var(--texto-2); margin-top: 4px;
}

/* ---------- Login ---------- */

.login {
  position: relative; min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 26px; padding: 40px 16px; overflow-y: auto;
}
.login-hero { text-align: center; display: grid; justify-items: center; gap: 4px; }
.titulo-gigante {
  position: relative; isolation: isolate; font-family: var(--display); font-weight: 400; line-height: 0.86;
  font-size: clamp(88px, 18vw, 200px); letter-spacing: 0.005em; padding: 0 0.06em;
  /* relleno blanco gastado, como la letra del flyer */
  background: linear-gradient(180deg, #ffffff 0%, #ece8e2 45%, #b9b4ad 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(-2px 0 rgba(255, 46, 46, 0.6)) drop-shadow(2px 0 rgba(80, 200, 255, 0.3)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6));
  animation: revelar 1.1s var(--suave) both, aberracion 6s ease-in-out 1.4s infinite;
}
.titulo-envoltura { position: relative; isolation: isolate; }
.bloque-fuego {
  position: absolute; z-index: -1; left: 38%; right: -12%; top: -3%; bottom: -5%; border-radius: 18px;
  background: linear-gradient(90deg, rgba(190, 14, 26, 0) 0%, rgba(214, 18, 31, 0.92) 28%, #ff4d1f 70%, #ff8a3d 100%);
  box-shadow: 0 0 60px rgba(255, 60, 30, 0.45);
  transform-origin: left; transform: scaleX(0); animation: trazar 1s var(--suave) 0.55s forwards;
}
.login-hero { position: relative; isolation: isolate; }
.login-lema { color: var(--texto-2); font-size: 14px; max-width: 340px; animation: subir 0.8s var(--suave) 0.35s both; }
.login .kicker { animation: subir 0.7s var(--suave) both; }
.login-card {
  width: min(400px, 100%); padding: 24px 22px 22px; display: grid; gap: 14px;
  animation: subir 0.9s var(--suave) 0.45s both;
}
.campo { display: grid; gap: 7px; font-size: 10.5px; font-weight: 700; font-stretch: 120%; letter-spacing: 0.22em; text-transform: uppercase; color: var(--texto-2); }
.campo input {
  height: 48px; padding: 0 15px; border-radius: 13px; border: 1px solid var(--borde-2);
  background: rgba(0, 0, 0, 0.45); color: var(--texto); font-size: 15px; letter-spacing: normal; text-transform: none; font-stretch: 100%; font-weight: 500;
  transition: border-color 0.2s, box-shadow 0.25s, background 0.2s;
}
.campo input:focus { outline: none; border-color: rgba(255, 140, 60, 0.75); box-shadow: 0 0 0 4px rgba(255, 107, 26, 0.16); background: rgba(0, 0, 0, 0.55); }
.error { color: #ff8a80; font-size: 13px; }
.error:empty { display: none; }
.login-pie {
  display: flex; align-items: center; gap: 16px; color: var(--texto-2);
  animation: subir 0.8s var(--suave) 0.6s both;
}
.login-pie .x { font-size: 22px; font-weight: 300; color: var(--texto-3); }
.pie-txt { font-family: var(--display); font-size: 22px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--texto); }
.lado { /* texto vertical del costado, como en el flyer */
  position: fixed; left: 26px; bottom: 34px; writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: 10.5px; font-weight: 600; font-stretch: 120%; letter-spacing: 0.3em; text-transform: uppercase; color: var(--texto-3);
}

/* ---------- App ---------- */

.app {
  height: 100dvh; padding: 16px; gap: 14px;
  display: grid; grid-template-columns: var(--lateral) minmax(0, 1fr);
  transition: grid-template-columns 0.55s var(--suave);
  animation: aparecer 0.6s var(--suave) both;
}
.app.plegado { grid-template-columns: 80px minmax(0, 1fr); }

/* ---------- Lateral ---------- */

.lateral { position: relative; display: flex; flex-direction: column; gap: 16px; padding: 18px 14px 14px; min-width: 0; }
.plegar {
  position: absolute; top: 26px; right: -13px; z-index: 3;
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 181, 71, 0.6); background: var(--fuego); color: #fff;
  box-shadow: 0 6px 18px rgba(255, 80, 30, 0.45);
  transition: transform 0.5s var(--suave), box-shadow 0.2s;
}
.plegar .ic { width: 14px; height: 14px; stroke-width: 2.6; }
.plegar:hover { box-shadow: 0 8px 24px rgba(255, 80, 30, 0.7); }
.plegado .plegar { transform: rotate(180deg); }
.lateral .marca { padding: 2px 4px; }

.busqueda {
  display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 10px 0 12px;
  border-radius: 13px; border: 1px solid var(--borde); background: rgba(0, 0, 0, 0.4);
  color: var(--texto-3); cursor: text; transition: border-color 0.2s, box-shadow 0.25s;
}
.busqueda:focus-within { border-color: rgba(255, 140, 60, 0.6); box-shadow: 0 0 0 4px rgba(255, 107, 26, 0.13); color: var(--ambar); }
.busqueda input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 13px; color: var(--texto); }
.busqueda input::placeholder { color: var(--texto-3); }
.busqueda input::-webkit-search-cancel-button { filter: invert(0.6); }
kbd {
  font: 700 11px/1 var(--cuerpo); color: var(--texto-2); padding: 4px 7px; border-radius: 7px;
  background: var(--vidrio-3); border: 1px solid var(--borde);
}

.nav { display: flex; flex-direction: column; gap: 3px; flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: none; }
.seccion {
  font-size: 9.5px; font-weight: 700; font-stretch: 125%; letter-spacing: 0.3em; text-transform: uppercase; color: var(--texto-3);
  padding: 14px 10px 7px; white-space: nowrap; max-height: 40px;
  transition: opacity 0.25s, max-height 0.4s var(--suave), padding 0.4s var(--suave);
}
.nav-item, .canal-estado {
  position: relative; display: flex; align-items: center; gap: 11px; width: 100%; height: 43px;
  padding: 0 12px; border-radius: 13px; border: 1px solid transparent; background: transparent;
  color: var(--texto-2); font-weight: 600; font-size: 13.5px; text-align: left; white-space: nowrap;
  transition: background 0.25s, color 0.2s, box-shadow 0.35s, border-color 0.25s;
}
.nav-item:hover { background: var(--vidrio-2); color: var(--texto); }
.nav-item:hover .ic:first-child { color: var(--ambar); }
.nav-item.activo {
  color: #fff; border-color: rgba(255, 181, 71, 0.45);
  background: var(--fuego);
  box-shadow: 0 10px 30px rgba(255, 80, 30, 0.38), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  text-shadow: 0 1px 2px rgba(100, 10, 0, 0.35);
}
.nav-item.activo:hover .ic:first-child { color: #fff; }
.nav-txt { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.flecha { width: 15px; height: 15px; transition: transform 0.45s var(--suave); }
.grupo.abierto .flecha { transform: rotate(180deg); }
.punto-alerta {
  position: absolute; top: 9px; left: 26px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--rojo); box-shadow: 0 0 0 2px #0e0e10, 0 0 12px var(--rojo); animation: latido 1.8s ease-in-out infinite;
}
.sub { display: grid; grid-template-rows: 0fr; transition: grid-template-rows 0.5s var(--suave); }
.grupo.abierto .sub { grid-template-rows: 1fr; }
.sub-in { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 2px; padding-left: 22px; margin-left: 20px; border-left: 1px solid var(--borde); }
.grupo.abierto .sub-in { padding-top: 5px; padding-bottom: 5px; }
.sub-item {
  position: relative; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 34px; padding: 0 10px; border: 0; border-radius: 10px; background: transparent;
  color: var(--texto-3); font-weight: 600; font-size: 13px; text-align: left; white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.25s var(--suave);
}
.sub-item:hover { color: var(--texto); background: var(--vidrio-2); transform: translateX(2px); }
.sub-item.activo { color: var(--ambar); background: rgba(255, 107, 26, 0.1); }
.sub-item.activo::before {
  content: ""; position: absolute; left: -23px; top: 8px; bottom: 8px; width: 2px; border-radius: 2px;
  background: var(--naranja); box-shadow: 0 0 12px var(--naranja);
}
.insignia {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff; background: var(--rojo-2);
  box-shadow: 0 4px 14px rgba(255, 40, 40, 0.5);
}
.canal-estado { cursor: default; color: var(--texto-3); }
.led { width: 8px; height: 8px; border-radius: 50%; background: var(--rojo); box-shadow: 0 0 0 3px rgba(255, 46, 46, 0.15); flex: none; }
.led.on { background: #3ee07f; box-shadow: 0 0 0 3px rgba(62, 224, 127, 0.14), 0 0 10px rgba(62, 224, 127, 0.6); }

.lateral-pie { display: grid; gap: 10px; }
.tarjeta-bot {
  position: relative; overflow: hidden; padding: 13px 13px 14px; border-radius: 15px; display: grid; gap: 6px;
  background: linear-gradient(150deg, rgba(255, 140, 50, 0.2), rgba(200, 20, 30, 0.12));
  border: 1px solid rgba(255, 140, 60, 0.3);
}
.tb-titulo { display: flex; align-items: center; gap: 7px; font-weight: 800; font-size: 12.5px; }
.tb-titulo .ic { width: 16px; height: 16px; color: var(--ambar); }
.tb-sub { font-size: 11.5px; color: var(--texto-2); }
.tb-sub strong { color: #fff; }
.progreso { height: 5px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); overflow: hidden; margin-top: 3px; }
.progreso span {
  display: block; height: 100%; width: 100%; border-radius: inherit; transform-origin: left; transform: scaleX(0);
  background: var(--fuego); transition: transform 1.3s var(--suave);
}
.usuario {
  display: flex; align-items: center; gap: 10px; padding: 9px; border-radius: 15px;
  background: var(--vidrio-2); border: 1px solid var(--borde);
}
.avatar-yo {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  font-family: var(--display); font-size: 15px; color: #fff; background: var(--fuego);
  box-shadow: 0 0 0 2px rgba(255, 107, 26, 0.3);
}
.u-txt { display: grid; min-width: 0; flex: 1; }
.u-txt strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: capitalize; }
.u-txt span { font-size: 11px; color: var(--texto-3); }

/* Lateral plegado: solo íconos */
.plegado .lateral { padding-left: 11px; padding-right: 11px; }
.plegado .marca-texto, .plegado .nav-txt, .plegado .flecha, .plegado .busqueda input,
.plegado kbd, .plegado .u-txt, .plegado .usuario .icono-btn { display: none; }
.plegado .marca { justify-content: center; }
.plegado .busqueda { justify-content: center; padding: 0; cursor: pointer; }
.plegado .seccion { opacity: 0; max-height: 8px; padding-top: 4px; padding-bottom: 4px; }
.plegado .nav-item, .plegado .canal-estado { justify-content: center; padding: 0; }
.plegado .punto-alerta { left: auto; right: 12px; }
.plegado .canal-estado .led { position: absolute; top: 9px; right: 12px; width: 7px; height: 7px; }
.plegado .sub { grid-template-rows: 0fr; visibility: hidden; }
.plegado .sub-in { padding: 0 !important; border: 0; }
.plegado .tarjeta-bot { display: none; }
.plegado .usuario { justify-content: center; padding: 6px; background: transparent; border-color: transparent; }

/* ---------- Principal ---------- */

.principal { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.vista { height: 100%; min-height: 0; animation: subir 0.55s var(--suave) both; }
#vista-resumen { overflow-y: auto; padding: 26px 28px 30px; display: flex; flex-direction: column; gap: 16px; }
#vista-resumen > * { flex: none; }

.cabeza { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.cabeza-txt { flex: 1; min-width: 0; display: grid; gap: 6px; }
.cabeza-txt .sutil::first-letter { text-transform: uppercase; }
.cabeza-acciones { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pastilla {
  display: inline-flex; align-items: center; gap: 7px; height: 40px; padding: 0 15px; border-radius: 999px;
  /* vidrio esmerilado, como la pastilla "Wa.me" del flyer */
  border: 1px solid rgba(255, 255, 255, 0.2); background: rgba(255, 255, 255, 0.1);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
  font-weight: 700; font-size: 11px; font-stretch: 112%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto);
}
.pastilla .ic { width: 15px; height: 15px; color: var(--ambar); }
.cta-n {
  min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; display: inline-grid; place-items: center;
  background: rgba(20, 4, 0, 0.75); color: var(--ambar); font-size: 11.5px; font-weight: 800; letter-spacing: 0; text-shadow: none;
}

/* KPIs */
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.kpi { padding: 16px 18px 18px; display: grid; gap: 14px; transition: transform 0.4s var(--suave), border-color 0.3s, box-shadow 0.4s; }
.kpi:hover { transform: translateY(-4px); border-color: rgba(255, 140, 60, 0.35); box-shadow: 0 18px 40px rgba(255, 80, 30, 0.12), var(--brillo); }
.kpi-top {
  display: flex; align-items: center; gap: 10px;
  font-size: 10.5px; font-weight: 700; font-stretch: 118%; letter-spacing: 0.14em; text-transform: uppercase; color: var(--texto-2);
}
.kpi-icono { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; }
.kpi-icono .ic { width: 16px; height: 16px; }
.kpi-icono.ambar { background: rgba(255, 181, 71, 0.16); color: var(--ambar); box-shadow: inset 0 0 0 1px rgba(255, 181, 71, 0.32); }
.kpi-icono.naranja { background: rgba(255, 107, 26, 0.16); color: var(--naranja-2); box-shadow: inset 0 0 0 1px rgba(255, 138, 61, 0.32); }
.kpi-icono.rojo { background: rgba(255, 46, 46, 0.16); color: #ff6b6b; box-shadow: inset 0 0 0 1px rgba(255, 90, 90, 0.32); }
.kpi-valor { display: flex; align-items: baseline; gap: 10px; }
.num {
  font-family: var(--display); font-weight: 400; font-size: 46px; line-height: 0.9; letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}
.delta { font-size: 11.5px; font-weight: 800; color: var(--ambar); }
.delta.baja { color: #ff7a7a; }
.delta.neutro { color: var(--texto-3); font-weight: 600; }
.kpi-linea { /* línea de fuego que se dibuja al entrar */
  position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--fuego);
  transform-origin: left; transform: scaleX(0); opacity: 0.85;
  animation: trazar 1.2s var(--suave) 0.5s forwards;
}
.kpi-alerta.hay .num { color: #fff; text-shadow: 0 0 24px rgba(255, 46, 46, 0.55); }
.kpi-alerta.hay { border-color: rgba(255, 70, 70, 0.32); }

/* Gráficas */
.graficas { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(250px, 1fr); gap: 14px; min-height: 330px; }
.grafica { padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 14px; min-height: 330px; }
.tarjeta-cabeza { display: flex; align-items: center; justify-content: space-between; gap: 10px; position: relative; }
.tarjeta-cabeza h2 {
  font-size: 11px; font-weight: 800; font-stretch: 122%; letter-spacing: 0.2em; text-transform: uppercase; color: var(--texto);
}
.etiqueta {
  display: inline-flex; align-items: center; gap: 5px; height: 25px; padding: 0 11px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; color: var(--ambar);
  background: rgba(255, 107, 26, 0.12); border: 1px solid rgba(255, 140, 60, 0.3);
}
.etiqueta .ic { width: 13px; height: 13px; }

.barras {
  flex: 1; min-height: 210px; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: clamp(8px, 2vw, 18px);
  align-items: end; padding-top: 30px;
}
.col { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; justify-items: center; gap: 8px; }
.area { position: relative; width: 100%; height: 100%; display: flex; align-items: flex-end; justify-content: center; }
.barra {
  position: relative; width: 100%; max-width: 48px; height: var(--h, 3%); min-height: 6px; border-radius: 9px 9px 4px 4px;
  background: linear-gradient(180deg, rgba(255, 150, 60, 0.95), rgba(232, 40, 30, 0.55) 70%, rgba(150, 10, 20, 0.35));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transform-origin: bottom; transform: scaleY(0);
  transition: height 0.8s var(--suave), filter 0.2s;
}
.barras.listo .barra { transform: scaleY(1); transition: transform 1s var(--suave) calc(var(--i) * 80ms), height 0.8s var(--suave), filter 0.2s; }
.barra.top {
  background: linear-gradient(180deg, #fffaf0, #ffd08a 25%, #ff6b1a 65%, #d3121f);
  box-shadow: 0 0 34px rgba(255, 120, 40, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.col:hover .barra { filter: brightness(1.2) saturate(1.1); }
.valor {
  position: absolute; bottom: calc(var(--h, 3%) + 8px); font-family: var(--display); font-size: 15px; color: #fff;
  padding: 2px 8px; border-radius: 7px; background: rgba(0, 0, 0, 0.6); border: 1px solid var(--borde);
  opacity: 0; transform: translateY(5px); transition: opacity 0.2s, transform 0.3s var(--suave); pointer-events: none;
}
.col:hover .valor, .col.top-col .valor { opacity: 1; transform: none; }
.dia-txt { font-size: 10px; font-weight: 700; font-stretch: 112%; letter-spacing: 0.08em; text-transform: uppercase; color: var(--texto-3); white-space: nowrap; }
.col.hoy .dia-txt { color: var(--ambar); }

.dona { position: relative; width: min(190px, 70%); aspect-ratio: 1; margin: auto; }
.dona svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.dona circle { fill: none; stroke-width: 10; }
.dona-pista { stroke: rgba(255, 255, 255, 0.07); stroke-dasharray: 2 4; }
.dona-valor {
  stroke: url(#g-dona); stroke-linecap: round;
  stroke-dasharray: 301.6; stroke-dashoffset: 301.6;
  transition: stroke-dashoffset 1.5s var(--suave);
  filter: drop-shadow(0 0 8px rgba(255, 100, 30, 0.55));
}
.dona-centro { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 2px; }
.dona-centro strong { font-family: var(--display); font-weight: 400; font-size: 44px; line-height: 0.95; font-variant-numeric: tabular-nums; }
.dona-centro span { font-size: 11px; color: var(--texto-2); }
.leyenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.leyenda li { display: flex; align-items: center; gap: 9px; font-size: 12.5px; color: var(--texto-2); }
.leyenda strong { margin-left: auto; color: var(--texto); font-family: var(--display); font-weight: 400; font-size: 16px; }
.punto { width: 9px; height: 9px; border-radius: 3px; }
.punto.wa { background: var(--wa); }
.punto.ig { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }

/* Pendientes */
.pendientes { padding: 18px 18px 10px; display: grid; gap: 8px; }
.lista-pendientes { list-style: none; margin: 0; padding: 0; display: grid; }
.pend {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  padding: 11px 8px; border-top: 1px solid var(--borde); cursor: pointer; border-radius: 10px;
  transition: background 0.2s, padding 0.3s var(--suave);
  animation: subir 0.5s var(--suave) both; animation-delay: calc(0.3s + var(--i, 0) * 60ms);
}
.pend:first-child { border-top-color: transparent; }
.pend:hover { background: var(--vidrio-2); padding-left: 14px; }
.pend-nombre { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pend-txt { font-size: 12px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pend-hora { font-size: 11px; color: #ff8a80; font-weight: 700; white-space: nowrap; }
.pend .ic { width: 16px; height: 16px; color: var(--texto-3); transition: transform 0.3s var(--suave), color 0.2s; }
.pend:hover .ic { transform: translateX(4px); color: var(--ambar); }
.sin-pendientes { display: flex; align-items: center; gap: 9px; padding: 8px 2px 12px; color: var(--texto-2); font-size: 13px; }
.sin-pendientes .ic { color: #3ee07f; }

/* Entradas escalonadas */
.entra { animation: subir 0.75s var(--suave) both; }
.kpis .entra:nth-child(2) { animation-delay: 80ms; }
.kpis .entra:nth-child(3) { animation-delay: 160ms; }
.graficas .entra:nth-child(1) { animation-delay: 220ms; }
.graficas .entra:nth-child(2) { animation-delay: 300ms; }
.pendientes.entra { animation-delay: 380ms; }

/* ---------- Bandeja ---------- */

.bandeja { display: grid; grid-template-columns: minmax(300px, 370px) minmax(0, 1fr); }
.lista { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--borde); }
.cabeza-lista { padding: 24px 20px 14px; }
.cabeza-lista .titulo { font-size: 34px; }
.aviso {
  margin: 0 14px 10px; padding: 9px 12px; border-radius: 12px; font-size: 12.5px;
  color: #ffd08a; background: rgba(255, 140, 40, 0.1); border: 1px solid rgba(255, 140, 40, 0.28);
}
.conversaciones { list-style: none; margin: 0; padding: 4px 10px 14px; overflow-y: auto; flex: 1; display: grid; align-content: start; gap: 4px; }
.conv {
  position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 11px; align-items: start;
  padding: 12px 11px; border-radius: 15px; border: 1px solid transparent; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.3s var(--suave);
  animation: subir 0.45s var(--suave) both; animation-delay: calc(var(--i, 0) * 30ms);
}
.conv:hover { background: var(--vidrio-2); transform: translateX(3px); }
.conv.sel {
  background: linear-gradient(90deg, rgba(255, 107, 26, 0.16), rgba(255, 255, 255, 0.03));
  border-color: rgba(255, 140, 60, 0.28); transform: none;
}
.conv.sel::before {
  content: ""; position: absolute; left: -1px; top: 14px; bottom: 14px; width: 3px; border-radius: 3px;
  background: var(--fuego-v); box-shadow: 0 0 14px var(--naranja);
}
.avatar {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; flex: none;
  font-family: var(--display); font-size: 17px; color: #fff; background: #26262a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.avatar::after {
  content: ""; position: absolute; right: -2px; bottom: -2px; width: 14px; height: 14px; border-radius: 50%;
  border: 2.5px solid #111113; background: var(--texto-3);
}
.avatar.whatsapp { background: linear-gradient(145deg, #3a2a20, #1a1412); }
.avatar.whatsapp::after { background: var(--wa); }
.avatar.instagram { background: linear-gradient(145deg, #40202a, #1a1014); }
.avatar.instagram::after { background: linear-gradient(135deg, #f58529, #dd2a7b, #8134af); }
.conv-nombre { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-ultimo { font-size: 12.5px; color: var(--texto-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.conv-hora { font-size: 11px; color: var(--texto-3); white-space: nowrap; padding-top: 2px; }
.conv.atender .conv-hora { color: #ff8a80; font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chip, .canal {
  display: inline-flex; align-items: center; height: 21px; padding: 0 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.02em; white-space: nowrap;
  background: var(--vidrio-3); color: var(--texto-2); border: 1px solid var(--borde);
}
.canal.whatsapp { color: #8be9ad; background: rgba(37, 211, 102, 0.08); border-color: rgba(37, 211, 102, 0.22); }
.canal.instagram { color: #f9a8d4; background: rgba(225, 48, 108, 0.1); border-color: rgba(225, 48, 108, 0.26); }
.chip.atender { color: #ffb4ac; background: rgba(255, 46, 46, 0.14); border-color: rgba(255, 70, 70, 0.38); }
.chip.humano { color: var(--ambar); background: rgba(255, 181, 71, 0.1); border-color: rgba(255, 181, 71, 0.28); }
.chip.pausa { color: #ffd08a; background: rgba(255, 140, 40, 0.12); border-color: rgba(255, 140, 40, 0.3); }
.chip.silencio { color: var(--texto-3); }
.vacio { display: grid; justify-items: center; gap: 10px; padding: 44px 20px; color: var(--texto-3); text-align: center; animation: subir 0.5s var(--suave) both; }
.vacio .ic { width: 36px; height: 36px; stroke-width: 1.3; color: var(--ambar); opacity: 0.7; }

.filtros-movil { display: flex; gap: 6px; padding: 0 14px 10px; overflow-x: auto; scrollbar-width: none; }
.chip-filtro {
  height: 32px; padding: 0 13px; border-radius: 999px; border: 1px solid var(--borde); background: var(--vidrio-2);
  color: var(--texto-2); font-weight: 700; font-size: 12px; white-space: nowrap; transition: background 0.2s, color 0.2s;
}
.chip-filtro.activo { color: #fff; background: var(--fuego); border-color: transparent; }

/* ---------- Chat ---------- */

.chat { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-vacio { margin: auto; display: grid; justify-items: center; gap: 10px; padding: 30px; text-align: center; max-width: 360px; animation: subir 0.6s var(--suave) both; }
.chat-vacio-icono {
  display: grid; place-items: center; width: 70px; height: 70px; border-radius: 22px; margin-bottom: 6px;
  background: linear-gradient(150deg, rgba(255, 140, 50, 0.22), rgba(200, 20, 30, 0.1));
  border: 1px solid rgba(255, 140, 60, 0.32); color: var(--ambar);
  box-shadow: 0 0 40px rgba(255, 90, 30, 0.18);
  animation: flotar 4s ease-in-out infinite;
}
.chat-vacio-icono .ic { width: 30px; height: 30px; }
.chat-activo { display: flex; flex-direction: column; min-height: 0; height: 100%; animation: aparecer 0.35s var(--suave) both; }
.chat-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--borde);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
}
.volver { display: none; }
.chat-quien { flex: 1; min-width: 0; }
.chat-nombre { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; letter-spacing: -0.01em; }
.chat-nombre > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-acciones { display: flex; gap: 8px; }
.chat-estado { display: grid; gap: 6px; padding: 0 20px; }
.chat-estado:not(:empty) { padding-top: 12px; }
.estado-linea {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 13px; font-size: 12.5px;
  color: var(--texto-2); background: var(--vidrio-2); border: 1px solid var(--borde);
  animation: subir 0.4s var(--suave) both;
}
.estado-linea::before { content: ""; width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--texto-3); }
.estado-linea.atender { color: #ffc2bb; background: rgba(255, 46, 46, 0.08); border-color: rgba(255, 70, 70, 0.3); }
.estado-linea.atender::before { background: var(--rojo); box-shadow: 0 0 10px var(--rojo); animation: latido 1.8s ease-in-out infinite; }
.estado-linea.humano::before { background: var(--ambar); }
.estado-linea.pausa::before { background: var(--naranja); }

.mensajes { list-style: none; margin: 0; padding: 18px 20px 10px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 4px; scroll-behavior: smooth; }
.dia {
  align-self: center; margin: 12px 0 8px; padding: 4px 12px; border-radius: 999px;
  font-size: 9.5px; font-weight: 700; font-stretch: 120%; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--texto-2); background: rgba(0, 0, 0, 0.45); border: 1px solid var(--borde);
}
.msg { display: flex; flex-direction: column; max-width: min(78%, 560px); }
.msg.nuevo { animation: burbuja 0.5s var(--rebote) both; }
.msg.cliente { align-self: flex-start; align-items: flex-start; }
.msg.bot, .msg.human { align-self: flex-end; align-items: flex-end; }
.burbuja {
  padding: 9px 13px; border-radius: 17px; font-size: 13.5px; white-space: pre-wrap; overflow-wrap: anywhere;
  border: 1px solid var(--borde);
}
.cliente .burbuja { background: rgba(255, 255, 255, 0.07); border-bottom-left-radius: 5px; }
.bot .burbuja { background: rgba(255, 107, 26, 0.09); border-color: rgba(255, 140, 60, 0.22); border-bottom-right-radius: 5px; }
.human .burbuja {
  background: var(--fuego); color: #fff; font-weight: 500; text-shadow: 0 1px 1px rgba(100, 10, 0, 0.3);
  border-color: transparent; border-bottom-right-radius: 5px; box-shadow: 0 10px 26px rgba(255, 80, 30, 0.28);
}
.meta { font-size: 10.5px; color: var(--texto-3); margin: 3px 6px 6px; }
.adjunto { margin-top: 7px; }
.adjunto img { display: block; max-width: 240px; max-height: 260px; border-radius: 12px; object-fit: cover; }
.adjunto audio { max-width: 250px; height: 36px; }
.adjunto a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

.composer { padding: 10px 20px 16px; display: grid; gap: 8px; }
.composer-fila {
  display: flex; align-items: flex-end; gap: 8px; padding: 6px 6px 6px 16px; border-radius: 20px;
  background: rgba(0, 0, 0, 0.45); border: 1px solid var(--borde-2); transition: border-color 0.2s, box-shadow 0.25s;
}
.composer-fila:focus-within { border-color: rgba(255, 140, 60, 0.65); box-shadow: 0 0 0 4px rgba(255, 107, 26, 0.13), 0 0 40px rgba(255, 80, 30, 0.12); }
.composer textarea {
  flex: 1; min-width: 0; border: 0; outline: none; resize: none; background: transparent; color: var(--texto);
  font-size: 14px; line-height: 1.45; padding: 8px 0; max-height: 160px;
}
.composer textarea:disabled { opacity: 0.5; }
.enviar {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 14px; border: 0;
  background: var(--fuego); color: #fff;
  box-shadow: 0 8px 22px rgba(255, 80, 30, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.3s var(--rebote), opacity 0.2s, box-shadow 0.2s;
}
.enviar .ic { width: 17px; height: 17px; stroke-width: 2; }
.enviar:hover:not(:disabled) { transform: translateY(-2px) rotate(-10deg); }
.enviar:active:not(:disabled) { transform: scale(0.9); }
.enviar:disabled { opacity: 0.32; cursor: default; box-shadow: none; }
.nota { font-size: 11px; color: var(--texto-3); padding: 0 6px; }
.composer .aviso { margin: 0; }

/* Aviso de chat nuevo por atender */
.aviso-nuevo {
  position: fixed; right: 26px; bottom: 26px; z-index: 60; width: min(380px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px; padding: 14px 12px 14px 14px; cursor: pointer;
  border-radius: 18px; border: 1px solid rgba(255, 120, 60, 0.5);
  background: linear-gradient(140deg, rgba(40, 12, 8, 0.94), rgba(16, 10, 10, 0.94));
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6), 0 0 40px rgba(255, 70, 30, 0.25);
}
.aviso-nuevo.entra-aviso { animation: aviso-entra 0.6s var(--rebote) both; }
.aviso-icono {
  display: grid; place-items: center; width: 42px; height: 42px; flex: none; border-radius: 13px;
  background: var(--fuego); color: #fff; box-shadow: 0 8px 20px rgba(255, 80, 30, 0.45);
  animation: timbre 1.2s ease-in-out 0.3s 2;
}
.aviso-cuerpo { flex: 1; min-width: 0; display: grid; gap: 3px; }
.aviso-cuerpo p:last-child { font-weight: 700; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@keyframes aviso-entra { from { opacity: 0; transform: translateY(30px) scale(0.92); } to { opacity: 1; transform: none; } }
@keyframes timbre { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-5deg); } }

.velo { display: none; }
.solo-movil { display: none; }

/* ---------- Animaciones ---------- */

@keyframes subir { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes aparecer { from { opacity: 0; } to { opacity: 1; } }
@keyframes revelar {
  from { opacity: 0; clip-path: inset(0 100% 0 0); letter-spacing: 0.08em; filter: blur(6px); }
  to { opacity: 1; clip-path: inset(0 0 0 0); filter: blur(0); }
}
@keyframes aberracion {
  0%, 86%, 100% { filter: drop-shadow(-2px 0 rgba(255, 46, 46, 0.6)) drop-shadow(2px 0 rgba(80, 200, 255, 0.3)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); transform: none; }
  88% { filter: drop-shadow(-7px 0 rgba(255, 46, 46, 0.85)) drop-shadow(6px 0 rgba(80, 200, 255, 0.55)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); transform: translateX(3px) skewX(-2deg); }
  90% { filter: drop-shadow(5px 0 rgba(255, 46, 46, 0.75)) drop-shadow(-5px 0 rgba(80, 200, 255, 0.45)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); transform: translateX(-2px); }
  92% { filter: drop-shadow(-2px 0 rgba(255, 46, 46, 0.6)) drop-shadow(2px 0 rgba(80, 200, 255, 0.3)) drop-shadow(0 10px 30px rgba(0, 0, 0, 0.6)); transform: none; }
}
@keyframes burbuja { from { opacity: 0; transform: translateY(10px) scale(0.95); } to { opacity: 1; transform: none; } }
@keyframes latido { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(0.82); } }
@keyframes flotar { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes respirar {
  0% { transform: translate3d(0, 0, 0) scale(1); opacity: 0.75; }
  50% { opacity: 1; }
  100% { transform: translate3d(3vw, -2vh, 0) scale(1.12); opacity: 0.8; }
}
@keyframes titilar { 0%, 100% { opacity: 1; } 47% { opacity: 1; } 48% { opacity: 0.82; } 49% { opacity: 1; } 73% { opacity: 0.9; } 74% { opacity: 1; } }
@keyframes grano {
  0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); }
  60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); }
}
@keyframes destello { 0%, 70% { left: -60%; } 100% { left: 130%; } }
@keyframes trazar { to { transform: scaleX(1); } }

/* ---------- Pantallas medianas ---------- */

@media (max-width: 1180px) {
  .graficas { grid-template-columns: minmax(0, 1fr); }
  .bandeja { grid-template-columns: minmax(270px, 320px) minmax(0, 1fr); }
  .chat-acciones .btn span { display: none; }
  .chat-acciones .btn { width: 40px; padding: 0; }
}

/* ---------- Celular ---------- */

@media (max-width: 860px) {
  body { overflow: auto; }
  .lado { display: none; }
  .app, .app.plegado { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 0; }
  .solo-movil { display: inline-grid; }
  .filtros-movil.solo-movil { display: flex; }
  .plegar { display: none; }
  .lateral {
    position: fixed; z-index: 30; top: 10px; bottom: 10px; left: 10px; width: min(290px, 84vw);
    transform: translateX(calc(-100% - 20px)); transition: transform 0.5s var(--suave);
    background: rgba(12, 12, 14, 0.94);
  }
  .app.menu-abierto .lateral { transform: none; }
  .velo { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, 0.55); opacity: 0; pointer-events: none; transition: opacity 0.3s; }
  .app.menu-abierto .velo { opacity: 1; pointer-events: auto; }
  .principal { height: calc(100dvh - 20px); }
  #vista-resumen { padding: 18px 14px 22px; }
  .cabeza { align-items: flex-start; }
  .titulo { font-size: 34px; }
  .cabeza-acciones { width: 100%; }
  .cabeza-acciones .pastilla { display: none; }
  .cabeza-acciones .btn { flex: 1; }
  .kpis { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .kpi { grid-template-columns: 1fr auto; align-items: center; padding: 14px 16px; }
  .num { font-size: 38px; }
  .graficas { min-height: 0; }
  .grafica { min-height: 290px; }
  .barras { min-height: 200px; }
  .dia-txt { font-size: 9px; letter-spacing: 0.02em; }
  .pend { grid-template-columns: auto minmax(0, 1fr) auto; }
  .pend .ic { display: none; }
  .bandeja { grid-template-columns: minmax(0, 1fr); }
  .lista { border-right: 0; }
  .cabeza-lista { padding: 18px 14px 10px; }
  .chat { display: none; }
  .bandeja.viendo-chat .lista { display: none; }
  .bandeja.viendo-chat .chat { display: flex; }
  .volver { display: inline-grid; }
  .chat-head { padding: 12px; gap: 9px; }
  .chat-head .avatar { display: none; }
  .mensajes { padding: 14px 12px 8px; }
  .msg { max-width: 88%; }
  .composer { padding: 8px 12px 12px; }
  .chat-estado { padding: 0 12px; }
  .nota { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; transition-delay: 0s !important; }
  .grano { animation: none; }
}
