/* OPTIMUS · estilos. Claro, amable y muy visual: el color dice la prioridad y el estado. */
:root {
  --fondo: #f4f5fb; --sup: #ffffff; --sup2: #f8f9fd; --borde: #e6e8f2; --borde2: #d5d9e8;
  --txt: #0f172a; --txt2: #475569; --gris: #8a94a8;
  --pri: #5b4bdb; --pri2: #7c6cf0; --pri-suave: #eeebff; --verde: #16a34a; --verde-suave: #dcfce7; --rojo: #dc2626;
  --rad: 14px; --rad2: 10px; --sombra: 0 1px 2px rgba(15,23,42,.05), 0 4px 16px rgba(15,23,42,.05);
  --sombra2: 0 10px 40px rgba(15,23,42,.16);
  --lat: 232px;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--txt); background: var(--fondo); font-size: 15px; line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
[v-cloak] { display: none; }
a { color: var(--pri); text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
h1 { font-size: 1.6rem; font-weight: 750; letter-spacing: -.02em; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 700; margin-bottom: .55rem; }
p { margin: .3rem 0; }
button { font: inherit; color: inherit; }
.gris { color: var(--gris); } .mini { font-size: .8rem; } .centro { text-align: center; margin: 1rem 0; }
.grow { flex: 1; min-width: 0; } .tachado { text-decoration: line-through; color: var(--gris); }
.fila { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.fila-botones { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin-top: .6rem; }
.ancho { width: 100%; }

/* ── Botones y entradas ─────────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--borde2); background: var(--sup); border-radius: 999px;
  padding: .5rem 1rem; font-weight: 600; font-size: .9rem; cursor: pointer; transition: .15s; white-space: nowrap; color: var(--txt); }
.btn:hover { border-color: var(--pri2); color: var(--pri); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primario { background: linear-gradient(135deg, var(--pri), var(--pri2)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px rgba(91,75,219,.3); }
.btn.primario:hover { filter: brightness(1.07); color: #fff; }
.btn.verde { background: #25d366; color: #fff; border-color: transparent; }
.btn.verde:hover { filter: brightness(1.05); color: #fff; }
.btn.rojo-txt { color: var(--rojo); }
.btn.grande { padding: .75rem 1.4rem; font-size: 1rem; }
.btn.mini { padding: .25rem .65rem; font-size: .8rem; }
.btn-icono { border: 1px solid transparent; background: transparent; width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem; flex: none; }
.btn-icono:hover { background: var(--pri-suave); }
.btn-icono.on { background: var(--pri-suave); border-color: var(--pri2); }
.btn-icono.mini { width: 26px; height: 26px; font-size: .8rem; }
.enlace { background: none; border: none; color: var(--pri); cursor: pointer; font-weight: 600; font-size: .85rem; padding: 0; }
.enlace:hover { text-decoration: underline; }
.entrada { border: 1px solid var(--borde2); border-radius: var(--rad2); padding: .55rem .75rem; font: inherit; background: var(--sup); color: var(--txt); min-width: 0; }
.entrada:focus { outline: none; border-color: var(--pri2); box-shadow: 0 0 0 3px var(--pri-suave); }
textarea.entrada { resize: vertical; }
select.entrada { cursor: pointer; }
.casilla { display: inline-flex; align-items: center; gap: .45rem; cursor: pointer; }
.form { display: flex; flex-direction: column; gap: .75rem; }
.form label:not(.casilla) { display: flex; flex-direction: column; gap: .3rem; font-size: .85rem; font-weight: 600; color: var(--txt2); }
.form-mini { display: flex; flex-direction: column; gap: .5rem; margin-bottom: .8rem; }
kbd { font: 600 .7rem ui-monospace, monospace; border: 1px solid var(--borde2); border-bottom-width: 2px; border-radius: 5px; padding: .05rem .35rem; color: var(--gris); background: var(--sup2); }

/* ── Logo y carga ───────────────────────────────────────────────────────────────── */
.logo-o { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 11px; font-weight: 900;
  color: #fff; background: conic-gradient(from 210deg, #5b4bdb, #22d3ee, #a855f7, #5b4bdb); box-shadow: 0 4px 14px rgba(91,75,219,.35); }
.logo-grande .logo-o { width: 64px; height: 64px; border-radius: 20px; font-size: 2rem; }
.pantalla-carga { min-height: 100vh; display: grid; place-items: center; }
.girando { animation: gira 1.2s linear infinite; width: 54px; height: 54px; font-size: 1.6rem; }
.girando-lento { display: inline-block; animation: gira 3s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }

/* ── Ingreso ────────────────────────────────────────────────────────────────────── */
.ingreso { min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: radial-gradient(circle at 20% 10%, #e0dbff 0, transparent 40%), radial-gradient(circle at 90% 90%, #cffafe 0, transparent 40%), var(--fondo); }
.ingreso-caja { background: var(--sup); padding: 2.2rem; border-radius: 24px; box-shadow: var(--sombra2); width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: .9rem; text-align: center; }
.ingreso-caja label { display: flex; flex-direction: column; gap: .3rem; text-align: left; font-size: .85rem; font-weight: 600; color: var(--txt2); }
.ingreso-caja input { border: 1px solid var(--borde2); border-radius: var(--rad2); padding: .7rem .8rem; font: inherit; }
.ingreso-caja input:focus { outline: none; border-color: var(--pri2); box-shadow: 0 0 0 3px var(--pri-suave); }
.ingreso-caja .sub { color: var(--txt2); margin-top: -.5rem; }
.error { color: var(--rojo); font-weight: 600; font-size: .9rem; }

/* ── Marco ──────────────────────────────────────────────────────────────────────── */
.marco { display: flex; min-height: 100vh; }
.lateral { position: fixed; inset: 0 auto 0 0; width: var(--lat); background: var(--sup); border-right: 1px solid var(--borde); display: flex; flex-direction: column; padding: 1rem .7rem; z-index: 40; }
.marca { display: flex; align-items: center; gap: .6rem; font-weight: 800; font-size: 1.25rem; color: var(--txt); padding: .2rem .5rem 1.1rem; letter-spacing: -.02em; }
.lateral nav { display: flex; flex-direction: column; gap: .15rem; }
.nav-item { display: flex; align-items: center; gap: .7rem; padding: .6rem .75rem; border-radius: 12px; color: var(--txt2); font-weight: 600; position: relative; border: none; background: none; cursor: pointer; width: 100%; text-align: left; font-size: .93rem; }
.nav-item:hover { background: var(--sup2); color: var(--txt); }
.nav-item.activo { background: var(--pri-suave); color: var(--pri); }
.nav-icono { width: 22px; text-align: center; font-size: 1.05rem; }
.nav-badge { margin-left: auto; background: #e11d48; color: #fff; border-radius: 999px; font-size: .72rem; padding: .05rem .45rem; min-width: 20px; text-align: center; }
.lateral-abajo { margin-top: auto; display: flex; flex-direction: column; gap: .15rem; border-top: 1px solid var(--borde); padding-top: .7rem; }
.punto-estado { width: 9px; height: 9px; border-radius: 50%; margin-left: auto; }
.punto-estado.verde { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; } .punto-estado.rojo { background: #ef4444; box-shadow: 0 0 0 3px #fee2e2; }
.area { flex: 1; margin-left: var(--lat); min-width: 0; display: flex; flex-direction: column; }
.barra { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: .8rem; padding: .7rem 1.6rem; background: rgba(244,245,251,.85); backdrop-filter: blur(10px); }
.hamburguesa { display: none; border: none; background: none; font-size: 1.4rem; cursor: pointer; }
.caja-busqueda { flex: 1; max-width: 560px; display: flex; align-items: center; gap: .6rem; border: 1px solid var(--borde); background: var(--sup); border-radius: 999px; padding: .55rem 1rem; cursor: text; color: var(--gris); text-align: left; }
.caja-busqueda .ph { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.btn-preguntar { margin-left: auto; }
.contenido { padding: .6rem 1.6rem 3rem; max-width: 1400px; width: 100%; }
.inferior { display: none; }
.cortina { display: none; }

/* ── Páginas ────────────────────────────────────────────────────────────────────── */
.pagina-cab { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin: .6rem 0 1rem; flex-wrap: wrap; }
.sub { color: var(--txt2); font-size: .92rem; }
.panel { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--rad); padding: 1.05rem 1.15rem; box-shadow: var(--sombra); margin-bottom: 1rem; }
.panel-cab { display: flex; justify-content: space-between; align-items: center; margin-bottom: .6rem; }
.panel-cab h3 { margin: 0; }
.panel.destacado { background: linear-gradient(135deg, #f5f3ff, #ecfeff); border-color: #ddd6fe; }
.banner { display: flex; align-items: center; gap: .9rem; padding: .9rem 1.1rem; border-radius: var(--rad); margin-bottom: 1rem; background: var(--sup); border: 1px solid var(--borde); color: var(--txt); }
.banner.rojo { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.banner-icono { font-size: 1.6rem; }
.aviso-conexion { background: linear-gradient(135deg, #5b4bdb, #7c3aed); color: #fff; border: none; box-shadow: 0 8px 24px rgba(91,75,219,.3); }
.aviso-conexion .flecha { margin-left: auto; font-size: 1.4rem; }
.progreso-analisis { background: #faf5ff; border-color: #e9d5ff; }
.barra-progreso { height: 8px; border-radius: 99px; background: #ede9fe; overflow: hidden; margin-top: .45rem; }
.barra-progreso i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #7c6cf0, #22d3ee); transition: width .6s; }
.barra-progreso.alerta i { background: linear-gradient(90deg, #f97316, #dc2626); }

/* Interruptores y píldoras */
.interruptor { display: inline-flex; background: #eceef6; padding: 3px; border-radius: 999px; gap: 2px; }
.interruptor button { border: none; background: none; padding: .38rem .9rem; border-radius: 999px; cursor: pointer; font-weight: 600; font-size: .85rem; color: var(--txt2); white-space: nowrap; }
.interruptor button.on { background: var(--sup); color: var(--txt); box-shadow: 0 1px 4px rgba(0,0,0,.1); }
.interruptor.ancho { display: flex; margin-bottom: .8rem; } .interruptor.ancho button { flex: 1; }
.filtros { display: flex; flex-direction: column; gap: .6rem; margin-bottom: 1rem; }
.filtros > .interruptor { align-self: flex-start; }
.filtros-fila { display: flex; gap: .5rem; flex-wrap: wrap; }
.busqueda-local { flex: 1; min-width: 200px; }
.pildoras { display: flex; gap: .4rem; flex-wrap: wrap; }
.pildoras.desliza { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pildora { border: 1px solid var(--borde2); background: var(--sup); padding: .35rem .8rem; border-radius: 999px; cursor: pointer; font-size: .85rem; font-weight: 600; white-space: nowrap; color: var(--txt2); display: inline-flex; gap: .35rem; align-items: center; }
.pildora:hover { border-color: var(--pri2); }
.pildora.on { background: var(--txt); color: #fff; border-color: var(--txt); }
.pildora-n { background: rgba(127,127,127,.18); border-radius: 99px; padding: 0 .4rem; font-size: .75rem; }

/* ── Avatares, chips y etiquetas ────────────────────────────────────────────────── */
.avatar { display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; font-weight: 700; flex: none; overflow: hidden; user-select: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.grupo { border-radius: 30%; }
.chip { display: inline-flex; align-items: center; gap: .3rem; padding: .14rem .55rem; border-radius: 999px; font-size: .76rem; font-weight: 700; white-space: nowrap; }
.chip-gris { background: #eef0f6; color: var(--txt2); }
.chip-manual { font-size: .7rem; }
.barras { display: inline-flex; gap: 2px; align-items: flex-end; }
.barras i { width: 4px; border-radius: 2px; background: rgba(0,0,0,.12); }
.barras i:nth-child(1) { height: 5px; } .barras i:nth-child(2) { height: 7px; } .barras i:nth-child(3) { height: 9px; } .barras i:nth-child(4) { height: 11px; } .barras i:nth-child(5) { height: 13px; }
.selector-prioridad { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.selector-prioridad .punto { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--borde2); background: var(--sup); cursor: pointer; transition: .12s; }
.selector-prioridad .punto:hover { transform: scale(1.15); }
.selector-txt { font-weight: 700; font-size: .88rem; margin-left: .2rem; }
.etiquetas { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; margin-top: .45rem; }
.etiqueta { --c: #6366f1; display: inline-flex; align-items: center; gap: .3rem; padding: .12rem .55rem .12rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 600;
  background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 75%, black); border: 1px solid color-mix(in srgb, var(--c) 25%, white); }
.etiqueta i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.etiqueta small { font-size: .65rem; }
.etiqueta button { border: none; background: none; cursor: pointer; padding: 0 0 0 .15rem; font-weight: 800; color: inherit; }
.etiqueta.agregar { background: none; border: 1px dashed var(--borde2); color: var(--txt2); cursor: pointer; }
.etiqueta.mas { background: #eef0f6; color: var(--txt2); border-color: transparent; }
.editor-etiquetas { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; width: 100%; border: 1px solid var(--pri2); border-radius: var(--rad2); padding: .5rem; background: var(--sup); }
.editor-etiquetas input { border: none; outline: none; flex: 1; min-width: 150px; font: inherit; padding: .2rem; }
.editor-etiquetas .sugerencias { width: 100%; display: flex; flex-wrap: wrap; gap: .3rem; border-top: 1px solid var(--borde); padding-top: .4rem; }
.editor-etiquetas .sugerencias .etiqueta { cursor: pointer; }
.editor-etiquetas .fila-botones { width: 100%; justify-content: flex-end; margin: 0; }

/* ── Tarjeta de chat ────────────────────────────────────────────────────────────── */
.tarjeta-chat { --prio: #cbd5e1; display: flex; gap: .8rem; padding: .8rem .9rem .8rem 1rem; background: var(--sup); border: 1px solid var(--borde); border-radius: var(--rad);
  cursor: pointer; position: relative; transition: .15s; overflow: hidden; }
.tarjeta-chat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--prio); }
.tarjeta-chat:hover { border-color: var(--borde2); box-shadow: var(--sombra); transform: translateY(-1px); }
.tarjeta-chat:focus-visible { outline: 2px solid var(--pri2); }
.tarjeta-chat.ignorado { opacity: .55; }
.tc-cuerpo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .25rem; }
.tc-fila { display: flex; align-items: center; gap: .45rem; min-width: 0; }
.tc-nombre { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-relacion { font-size: .78rem; color: var(--gris); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-hora { margin-left: auto; font-size: .76rem; color: var(--gris); white-space: nowrap; }
.tc-chips { flex-wrap: wrap; gap: .3rem; }
.tc-espera { font-size: .75rem; font-weight: 700; color: #b45309; }
.tc-espera.larga { color: #dc2626; }
.tc-mini { font-size: .76rem; color: var(--txt2); background: #f1f3f9; border-radius: 99px; padding: .08rem .45rem; white-space: nowrap; }
.tc-mini.analizando { background: #f3e8ff; animation: latido 1.6s infinite; }
@keyframes latido { 50% { opacity: .45; } }
.tc-resumen { font-size: .88rem; color: var(--txt); margin: .1rem 0 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tc-ultimo { font-size: .82rem; color: var(--gris); margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tc-yo { color: var(--txt2); font-weight: 600; }
.tarjeta-chat.compacta { padding: .55rem .7rem .55rem .85rem; gap: .6rem; }
.tarjeta-chat.compacta .tc-cuerpo { gap: .15rem; }
.lista-tarjetas { display: flex; flex-direction: column; gap: .5rem; }
.lista-chats { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: .6rem; }

/* ── Hoy ────────────────────────────────────────────────────────────────────────── */
.hero { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(300px, 1.6fr); gap: 1.2rem; align-items: stretch; margin: .6rem 0 1.2rem; }
.hero h1 { font-size: 2rem; }
.hero-fecha { color: var(--txt2); font-size: 1rem; }
.hero-texto { display: flex; flex-direction: column; justify-content: center; }
.tu-dia { background: linear-gradient(135deg, #1e1b4b, #4338ca 55%, #0e7490); color: #fff; border-radius: 20px; padding: 1.2rem 1.4rem; box-shadow: 0 12px 32px rgba(67,56,202,.28); }
.tu-dia h2 { font-size: 1.25rem; margin: .35rem 0; }
.tu-dia p { color: #e0e7ff; }
.tu-dia .enlace { color: #c7d2fe; }
.tu-dia-cab { display: flex; justify-content: space-between; align-items: center; }
.brillo { font-weight: 800; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: #a5f3fc; }
.foco { margin: .6rem 0 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: .25rem; }
.foco li { color: #fff; font-weight: 500; }
.vacio-dia { display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; justify-content: center; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: .8rem; margin-bottom: 1.2rem; }
.kpi { border: none; border-radius: 18px; padding: 1rem 1.1rem; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: .1rem; transition: .15s; }
.kpi:hover { transform: translateY(-2px); box-shadow: var(--sombra); }
.kpi b { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.kpi b small { font-size: .8rem; font-weight: 700; }
.kpi span { font-size: .85rem; font-weight: 600; }
.kpi.rosa { background: #ffe4e6; color: #9f1239; } .kpi.naranja { background: #ffedd5; color: #9a3412; } .kpi.ambar { background: #fef3c7; color: #92400e; }
.kpi.rojo { background: #fee2e2; color: #991b1b; } .kpi.indigo { background: #e0e7ff; color: #3730a3; }
.hero > *, .rejilla-hoy > *, .dc-cuerpo > *, .rejilla-3 > *, .kpis > * { min-width: 0; }
.rejilla-hoy { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.linea-tiempo { display: flex; flex-direction: column; gap: .8rem; }
.lt-fecha { display: flex; align-items: baseline; gap: .5rem; margin-bottom: .3rem; }
.lt-fecha b { } .lt-fecha small { color: var(--gris); }
.lt-evento { --c: #6366f1; display: flex; gap: .7rem; padding: .5rem .7rem; border-radius: 10px; background: color-mix(in srgb, var(--c) 8%, white); border-left: 4px solid var(--c); color: var(--txt); margin-bottom: .3rem; }
.lt-evento.propuesto { border-left-style: dashed; background: var(--sup2); }
.lt-hora { font-weight: 700; font-size: .82rem; min-width: 64px; color: color-mix(in srgb, var(--c) 80%, black); }
.lt-titulo { font-size: .9rem; } .lt-titulo small { color: var(--gris); }
.por-confirmar { color: #b45309 !important; font-weight: 600; }
.pie-gasto { text-align: right; font-size: .78rem; color: var(--gris); }

/* Listas de chequeo */
.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .15rem; }
.checklist li { display: flex; gap: .65rem; align-items: flex-start; padding: .45rem .3rem; border-radius: 10px; }
.checklist li:hover { background: var(--sup2); }
.checklist li > div { display: flex; flex-direction: column; gap: .12rem; min-width: 0; }
.checklist li small { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; color: var(--gris); font-size: .78rem; }
.check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid var(--borde2); background: var(--sup); cursor: pointer; flex: none; margin-top: 1px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; font-size: .8rem; transition: .12s; }
.check:hover { border-color: var(--verde); background: var(--verde-suave); }
.check.on { background: var(--verde); border-color: var(--verde); }
.checklist.grande li { padding: .6rem .4rem; border-bottom: 1px solid var(--borde); border-radius: 0; }
.checklist.grande li:last-child { border-bottom: none; }
.punto-otro { color: var(--pri); font-weight: 900; width: 22px; text-align: center; }
.fecha-limite { font-weight: 700; color: var(--txt2); }
.vencido { color: #dc2626 !important; } .hoy.fecha-limite, .fecha-editable.hoy { color: #ea580c !important; } .pronto { color: #ca8a04 !important; }
.quien { font-weight: 700; padding: 0 .4rem; border-radius: 99px; font-size: .72rem; }
.quien.yo { background: #ede9fe; color: #5b21b6; } .quien.otro { background: #e0f2fe; color: #075985; } .quien.ambos { background: #f1f5f9; color: #334155; }
.fecha-editable { position: relative; cursor: pointer; font-weight: 700; color: var(--txt2); border-bottom: 1px dashed var(--borde2); }
.fecha-editable input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.acciones-fila { display: flex; gap: .2rem; align-items: center; opacity: .5; } li:hover .acciones-fila { opacity: 1; }
.chip-chat { background: #f1f3f9; color: var(--txt2); padding: .05rem .5rem; border-radius: 99px; font-weight: 600; font-size: .78rem; }
.chip-chat:hover { background: var(--pri-suave); color: var(--pri); }
.grupo-comp.vencidos { border-color: #fecaca; } .grupo-comp.vencidos h3 { color: #b91c1c; }
.grupo-comp h3 small { color: var(--gris); font-weight: 600; }
details.cerrados summary { cursor: pointer; color: var(--gris); font-size: .82rem; margin-top: .5rem; }

/* ── Tablero ────────────────────────────────────────────────────────────────────── */
.tablero { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(270px, 1fr); gap: .8rem; overflow-x: auto; padding-bottom: 1rem; align-items: start; }
.columna { background: #eceef6; border-radius: var(--rad); padding: .5rem; min-height: 200px; transition: .15s; }
.columna.sobre { background: var(--pri-suave); outline: 2px dashed var(--pri2); }
.columna header { display: flex; justify-content: space-between; align-items: center; padding: .5rem .7rem; border-radius: 10px; font-weight: 700; font-size: .88rem; color: var(--c, var(--txt2)); margin-bottom: .5rem; background: var(--sup); }
.columna-cuerpo { display: flex; flex-direction: column; gap: .45rem; max-height: 72vh; overflow-y: auto; }
.arrastrable { cursor: grab; } .arrastrable:active { cursor: grabbing; }
.columna-vacia { text-align: center; color: var(--gris); font-size: .82rem; padding: 1.4rem 0; border: 2px dashed var(--borde2); border-radius: 10px; }

/* ── Detalle de chat ────────────────────────────────────────────────────────────── */
.dc-cab { display: flex; align-items: center; gap: .9rem; margin: .5rem 0 1rem; flex-wrap: wrap; }
.dc-titulo { flex: 1; min-width: 200px; }
.dc-titulo h1 { display: flex; align-items: center; gap: .3rem; }
.dc-acciones { display: flex; gap: .4rem; align-items: center; flex-wrap: wrap; }
.dc-cuerpo { display: grid; grid-template-columns: minmax(340px, 1fr) minmax(360px, 1.15fr); gap: 1rem; align-items: start; }
.dc-conversacion { position: sticky; top: 70px; background: #efeae2; border-radius: var(--rad); border: 1px solid var(--borde); overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 95px); }
.conv-cab { padding: .7rem 1rem; background: var(--sup); border-bottom: 1px solid var(--borde); display: flex; justify-content: space-between; align-items: center; }
.conv-caja { flex: 1; overflow-y: auto; padding: .8rem 1rem 1.2rem; display: flex; flex-direction: column; gap: .2rem;
  background-image: radial-gradient(rgba(0,0,0,.03) 1px, transparent 1px); background-size: 16px 16px; }
.separador-dia { text-align: center; margin: .8rem 0 .4rem; }
.separador-dia span { background: #fff; color: var(--txt2); font-size: .75rem; font-weight: 600; padding: .25rem .8rem; border-radius: 8px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.msj { display: flex; }
.msj.mio { justify-content: flex-end; }
.msj.sistema { justify-content: center; }
.burbuja { max-width: 78%; background: #fff; border-radius: 10px 10px 10px 3px; padding: .4rem .65rem .25rem; box-shadow: 0 1px 1px rgba(0,0,0,.08); position: relative; font-size: .9rem; min-width: 70px; }
.msj.mio .burbuja { background: #d9fdd3; border-radius: 10px 10px 3px 10px; }
.msj.sistema .burbuja { background: #fff8e1; text-align: center; font-size: .82rem; border-radius: 10px; }
.msj.borrado .burbuja { opacity: .7; }
.msj-autor { font-size: .78rem; display: block; margin-bottom: .1rem; }
.msj-cita { border-left: 3px solid #06cf9c; background: rgba(0,0,0,.05); border-radius: 5px; padding: .25rem .5rem; font-size: .8rem; color: var(--txt2); margin-bottom: .25rem; max-height: 3.2em; overflow: hidden; }
.msj-texto { margin: 0; white-space: pre-wrap; word-wrap: break-word; }
.msj-ia { margin: .3rem 0 0; font-size: .82rem; color: #4c1d95; background: #f5f3ff; border-radius: 6px; padding: .3rem .5rem; white-space: pre-wrap; }
.doc-texto { max-height: 260px; overflow: auto; }
.msj-hora { display: block; text-align: right; font-size: .68rem; color: var(--gris); margin-top: .1rem; }
.msj-reac { position: absolute; bottom: -12px; right: 8px; background: #fff; border-radius: 99px; padding: 0 .3rem; font-size: .8rem; box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.msj:has(.msj-reac) { margin-bottom: .7rem; }
.msj-img { display: block; position: relative; border-radius: 7px; overflow: hidden; margin: .1rem 0 .2rem; min-height: 60px; background: #eee; }
.msj-img img { display: block; max-width: 100%; max-height: 320px; object-fit: cover; }
.msj-img .img-falla { display: none; padding: 1rem; color: var(--gris); font-size: .82rem; }
.msj-img.sin-img img { display: none; } .msj-img.sin-img .img-falla { display: block; }
.msj-video { max-width: 100%; max-height: 300px; border-radius: 7px; }
.msj-sticker { width: 110px; height: 110px; object-fit: contain; }
.msj audio { width: 260px; max-width: 100%; height: 38px; }
.msj-doc { display: flex; align-items: center; gap: .6rem; background: rgba(0,0,0,.04); padding: .5rem .7rem; border-radius: 8px; color: var(--txt); margin: .1rem 0; }
.msj-doc small { display: block; color: var(--gris); font-size: .75rem; }
.doc-icono { font-size: 1.7rem; }
.estado-selector { display: flex; flex-wrap: wrap; gap: .35rem; margin-bottom: .6rem; }
.estado-selector .pildora.on { font-weight: 700; }
.fila-prioridad { display: flex; align-items: center; gap: .7rem; margin: .5rem 0 .2rem; flex-wrap: wrap; }
.etq { font-size: .8rem; font-weight: 700; color: var(--gris); text-transform: uppercase; letter-spacing: .04em; }
.motivo { font-size: .86rem; color: var(--txt2); font-style: italic; }
.chips-info { margin: .4rem 0; }
.resumen-grande { font-size: 1.02rem; line-height: 1.5; }
.contexto { color: var(--txt2); font-size: .92rem; white-space: pre-wrap; }
.temas { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .5rem; }
.tema { font-size: .78rem; color: var(--pri); background: var(--pri-suave); border-radius: 99px; padding: .08rem .55rem; font-weight: 600; }
.sugerencia { margin: .3rem 0; background: #fff; border: 1px solid #ddd6fe; border-radius: 12px 12px 12px 3px; padding: .7rem .9rem; font-size: .95rem; white-space: pre-wrap; }
.eventos-chat { display: flex; flex-direction: column; gap: .4rem; }
.evento-fila { --c: #6366f1; display: flex; align-items: center; gap: .6rem; padding: .5rem .6rem; border-radius: 10px; border-left: 4px solid var(--c); background: color-mix(in srgb, var(--c) 7%, white); cursor: pointer; }
.evento-fila small { display: block; color: var(--gris); font-size: .78rem; }
.evento-fila.propuesto { border-left-style: dashed; }
.evento-fila.hecho { opacity: .6; }
.ev-icono { font-size: 1.3rem; }
.datos-clave { display: grid; grid-template-columns: auto 1fr; gap: .35rem .9rem; margin: 0; }
.datos-clave dt { font-weight: 700; color: var(--txt2); font-size: .85rem; }
.datos-clave dd { margin: 0; display: flex; align-items: center; gap: .3rem; word-break: break-word; }
.participantes { display: flex; flex-wrap: wrap; gap: .4rem; }
.participante { display: inline-flex; align-items: center; gap: .4rem; background: var(--sup2); border: 1px solid var(--borde); border-radius: 99px; padding: .2rem .7rem .2rem .25rem; color: var(--txt); font-size: .82rem; }
.participante small { color: var(--gris); margin-left: .3rem; }
.relaciones { display: flex; flex-wrap: wrap; gap: .4rem; }
.relacion { display: inline-flex; align-items: center; gap: .35rem; background: var(--sup2); border: 1px solid var(--borde); border-radius: 99px; padding: .2rem .4rem .2rem .7rem; font-size: .85rem; }
.relacion small { color: var(--gris); } .relacion button { border: none; background: none; cursor: pointer; color: var(--gris); font-weight: 800; }
.notas { min-height: 80px; }
.lista-elegir { display: flex; flex-direction: column; gap: .2rem; margin-top: .6rem; max-height: 320px; overflow-y: auto; }
.lista-elegir button { display: flex; align-items: center; gap: .6rem; border: none; background: none; padding: .45rem; border-radius: 10px; cursor: pointer; text-align: left; }
.lista-elegir button:hover { background: var(--pri-suave); }
.lista-elegir small { display: block; color: var(--gris); font-size: .78rem; }

/* ── Agenda ─────────────────────────────────────────────────────────────────────── */
.agenda-barra { display: flex; justify-content: space-between; align-items: center; gap: .8rem; margin-bottom: .8rem; flex-wrap: wrap; }
.agenda-titulo { text-transform: capitalize; margin-left: .4rem; }
.mes { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--borde); gap: 1px; border: 1px solid var(--borde); border-radius: var(--rad); overflow: hidden; }
.mes-cab { background: var(--sup2); text-align: center; font-size: .78rem; font-weight: 700; color: var(--gris); padding: .45rem 0; text-transform: uppercase; }
.celda { background: var(--sup); min-height: 112px; padding: .3rem; display: flex; flex-direction: column; gap: 2px; transition: background .12s; min-width: 0; }
.celda.finde { background: #fbfbfe; }
.celda.fuera { background: #f6f7fa; } .celda.fuera .celda-dia { color: #c0c6d4; }
.celda.sobre { background: var(--pri-suave); }
.celda-dia { font-size: .82rem; font-weight: 700; color: var(--txt2); width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; align-self: flex-start; }
.celda-dia:hover { background: var(--pri-suave); }
.celda.hoy .celda-dia { background: var(--pri); color: #fff; }
.pastilla { --c: #6366f1; display: block; width: 100%; text-align: left; border: none; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 13%, white); color: color-mix(in srgb, var(--c) 70%, black);
  font-size: .74rem; font-weight: 600; padding: .12rem .35rem; border-radius: 5px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pastilla.propuesto { border-left-style: dashed; background: #fff; outline: 1px dashed color-mix(in srgb, var(--c) 45%, white); }
.pastilla.hecho { opacity: .55; }
.pastilla.comp { --c: #16a34a; background: #f0fdf4; color: #166534; }
.pastilla.comp.cumplido { text-decoration: line-through; opacity: .6; }
.p-hora { font-weight: 800; margin-right: .2rem; }
.mas-items { font-size: .72rem; color: var(--gris); padding-left: .3rem; }
.leyenda { margin-top: .8rem; }
.semana { background: var(--sup); border: 1px solid var(--borde); border-radius: var(--rad); overflow: hidden; }
.sem-cab, .sem-todo { display: grid; grid-template-columns: 56px repeat(7, 1fr); border-bottom: 1px solid var(--borde); }
.sem-dia { text-align: center; padding: .5rem 0; display: flex; flex-direction: column; }
.sem-dia small { color: var(--gris); text-transform: uppercase; font-size: .72rem; font-weight: 700; }
.sem-dia b { font-size: 1.2rem; }
.sem-dia.hoy b { color: var(--pri); }
.sem-etq { font-size: .65rem; color: var(--gris); padding: .4rem .3rem; text-align: right; }
.sem-todo-celda { border-left: 1px solid var(--borde); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-height: 30px; }
.sem-cuerpo { display: grid; grid-template-columns: 56px repeat(7, 1fr); max-height: 68vh; overflow-y: auto; }
.sem-hora { height: 48px; font-size: .7rem; color: var(--gris); text-align: right; padding-right: .4rem; transform: translateY(-7px); }
.sem-col { position: relative; border-left: 1px solid var(--borde); }
.sem-col.hoy { background: #faf9ff; }
.sem-slot { height: 48px; border-top: 1px solid #f0f1f6; }
.sem-slot.sobre { background: var(--pri-suave); }
.sem-evento { --c: #6366f1; position: absolute; left: 3px; right: 3px; border: none; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 16%, white); color: color-mix(in srgb, var(--c) 70%, black);
  border-radius: 6px; font-size: .74rem; text-align: left; padding: .15rem .35rem; overflow: hidden; cursor: pointer; z-index: 2; }
.sem-evento small { display: block; opacity: .8; }
.sem-evento.propuesto { border-left-style: dashed; background: #fff; }
.agenda-lista { display: flex; flex-direction: column; gap: 1rem; }
.al-dia { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; }
.al-fecha b { display: block; font-size: 1rem; } .al-fecha small { color: var(--gris); }
.al-items { display: flex; flex-direction: column; gap: .4rem; }
.al-item { --c: #6366f1; display: flex; align-items: center; gap: .8rem; padding: .65rem .85rem; border-radius: 12px; background: var(--sup); border: 1px solid var(--borde); border-left: 4px solid var(--c); text-align: left; cursor: pointer; width: 100%; }
.al-item small { display: block; color: var(--gris); font-size: .8rem; }
.al-item.propuesto { border-left-style: dashed; }
.al-item.comp { --c: #16a34a; cursor: default; }
.al-hora { font-weight: 700; min-width: 74px; font-size: .85rem; color: color-mix(in srgb, var(--c) 75%, black); }
.tipos-evento { display: flex; flex-wrap: wrap; gap: .3rem; }
.pasos { padding-left: 1.2rem; display: flex; flex-direction: column; gap: .35rem; }

/* ── Personas ───────────────────────────────────────────────────────────────────── */
.rejilla-personas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .8rem; }
.tarjeta-persona { background: var(--sup); border: 1px solid var(--borde); border-radius: 18px; padding: 1.1rem; display: flex; flex-direction: column; align-items: center; text-align: center; gap: .3rem; cursor: pointer; transition: .15s; }
.tarjeta-persona:hover { box-shadow: var(--sombra); transform: translateY(-2px); }
.tarjeta-persona .etiquetas { justify-content: center; }
.tp-rel { font-size: .82rem; color: var(--pri); font-weight: 600; } .tp-tel { font-size: .82rem; color: var(--gris); }
.tp-desc { font-size: .8rem; color: var(--txt2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tp-pie { display: flex; gap: .4rem; align-items: center; justify-content: center; flex-wrap: wrap; margin-top: auto; }
.ficha-cab { display: flex; gap: 1.1rem; align-items: flex-start; margin: .6rem 0 1.2rem; flex-wrap: wrap; }
.ficha-rel { color: var(--pri); font-weight: 600; }
.nota-usuario { background: #fffbeb; border-radius: 10px; padding: .5rem .7rem; font-size: .9rem; }

/* ── Pregúntale ─────────────────────────────────────────────────────────────────── */
.preguntar { max-width: 860px; margin: 0 auto; padding-bottom: 5rem; }
.pregunta-hero { text-align: center; padding: 2.5rem 0 1.5rem; display: flex; flex-direction: column; align-items: center; gap: .6rem; }
.pregunta-hero h1 { font-size: 2rem; }
.conversacion-ia { display: flex; flex-direction: column; gap: .8rem; margin: 1rem 0; }
.burbuja-q { align-self: flex-end; background: var(--txt); color: #fff; border-radius: 18px 18px 4px 18px; padding: .65rem 1rem; max-width: 80%; font-weight: 500; }
.burbuja-a { align-self: flex-start; background: var(--sup); border: 1px solid var(--borde); border-radius: 18px 18px 18px 4px; padding: .8rem 1.1rem; max-width: 92%; box-shadow: var(--sombra); }
.texto-rico p { margin: .35rem 0; } .texto-rico ul { margin: .3rem 0; padding-left: 1.2rem; } .texto-rico li { margin: .2rem 0; }
.ref-chat { background: var(--pri-suave); padding: 0 .35rem; border-radius: 6px; font-weight: 700; font-size: .85em; }
.chats-citados { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .6rem; border-top: 1px solid var(--borde); padding-top: .55rem; }
.pensando { display: flex; align-items: center; gap: .3rem; color: var(--gris); }
.pensando i { width: 7px; height: 7px; border-radius: 50%; background: var(--pri2); animation: salto 1s infinite; }
.pensando i:nth-child(2) { animation-delay: .15s; } .pensando i:nth-child(3) { animation-delay: .3s; }
@keyframes salto { 50% { transform: translateY(-5px); opacity: .5; } }
.sugerencias-q { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: center; margin: 1rem 0; }
.caja-pregunta { position: sticky; bottom: 1rem; display: flex; gap: .5rem; background: var(--sup); border: 1px solid var(--borde2); border-radius: 999px; padding: .4rem .4rem .4rem 1.1rem; box-shadow: var(--sombra2); }
.caja-pregunta input { flex: 1; border: none; outline: none; font: inherit; font-size: 1rem; background: none; min-width: 0; }

/* ── Conexión y ajustes ─────────────────────────────────────────────────────────── */
.estado-conexion { display: flex; align-items: center; gap: 1.1rem; flex-wrap: wrap; }
.ec-circulo { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; font-size: 1.8rem; font-weight: 800; color: #fff; }
.estado-conexion.ok .ec-circulo { background: linear-gradient(135deg, #22c55e, #16a34a); box-shadow: 0 0 0 8px #dcfce7; }
.estado-conexion.no .ec-circulo { background: linear-gradient(135deg, #94a3b8, #64748b); box-shadow: 0 0 0 8px #f1f5f9; }
.qr-panel { display: flex; gap: 1.6rem; align-items: center; flex-wrap: wrap; }
.qr { width: 260px; height: 260px; border-radius: 12px; border: 1px solid var(--borde); padding: 8px; background: #fff; image-rendering: pixelated; }
.privacidad { background: #f0fdf4; border-color: #bbf7d0; }
.lista-check { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .3rem; }
.lista-check li::before { content: "✓ "; color: var(--verde); font-weight: 800; }
.rejilla-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.stat { display: flex; flex-direction: column; gap: .2rem; }
.stat-n { font-size: 2rem; font-weight: 800; letter-spacing: -.03em; }
.mini-barras { display: flex; align-items: flex-end; gap: 3px; height: 44px; margin-top: .5rem; }
.mini-barras span { flex: 1; background: linear-gradient(180deg, #a5b4fc, #6366f1); border-radius: 3px 3px 0 0; min-height: 3px; }
.tabla-etiquetas { display: flex; flex-direction: column; gap: .4rem; }
.fila-etiqueta { display: flex; gap: .6rem; align-items: center; }
.fila-etiqueta input[type=color] { width: 34px; height: 34px; border: none; background: none; cursor: pointer; padding: 0; }

/* ── Modal, buscador, vacíos, avisos ────────────────────────────────────────────── */
.modal-fondo { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 1rem; backdrop-filter: blur(3px); }
.modal-fondo.arriba { align-items: flex-start; padding-top: 10vh; }
.modal { background: var(--sup); border-radius: 20px; width: 100%; box-shadow: var(--sombra2); max-height: 90vh; display: flex; flex-direction: column; }
.modal-cab { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.2rem .5rem; }
.modal-cab h3 { margin: 0; font-size: 1.1rem; }
.cerrar { border: none; background: none; font-size: 1.6rem; cursor: pointer; color: var(--gris); line-height: 1; }
.modal-cuerpo { padding: .4rem 1.2rem 1rem; overflow-y: auto; display: flex; flex-direction: column; gap: .6rem; }
.modal-pie { display: flex; gap: .5rem; padding: .8rem 1.2rem; border-top: 1px solid var(--borde); align-items: center; }
.buscador { background: var(--sup); border-radius: 20px; width: 100%; max-width: 680px; box-shadow: var(--sombra2); overflow: hidden; }
.buscador-entrada { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--borde); }
.buscador-entrada input { flex: 1; border: none; outline: none; font: inherit; font-size: 1.05rem; }
.buscador-res { max-height: 60vh; overflow-y: auto; padding: .5rem; }
.buscador-pregunta { width: 100%; border: none; background: var(--pri-suave); color: var(--pri); font-weight: 700; padding: .7rem 1rem; border-radius: 12px; text-align: left; cursor: pointer; margin-bottom: .4rem; }
.buscador-grupo h4 { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--gris); margin: .6rem .6rem .3rem; }
.buscador-item { display: flex; gap: .7rem; align-items: flex-start; width: 100%; border: none; background: none; padding: .5rem .6rem; border-radius: 10px; cursor: pointer; text-align: left; }
.buscador-item:hover { background: var(--sup2); }
.buscador-item small { display: block; color: var(--txt2); font-size: .82rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 560px; }
.buscador-item mark { background: #fef08a; border-radius: 3px; padding: 0 2px; }
.buscador-icono { width: 30px; text-align: center; color: var(--gris); }
.vacio { text-align: center; padding: 1.6rem 1rem; color: var(--txt2); display: flex; flex-direction: column; align-items: center; gap: .3rem; }
.vacio-icono { font-size: 2.2rem; }
.esqueleto { display: flex; flex-direction: column; gap: .8rem; padding: 1rem 0; }
.esq-fila { display: flex; gap: .8rem; align-items: center; }
.esq-circ { width: 42px; height: 42px; border-radius: 50%; background: #e6e8f2; animation: latido 1.4s infinite; }
.esq-lineas { flex: 1; display: flex; flex-direction: column; gap: .4rem; }
.esq-lineas i { height: 11px; border-radius: 6px; background: #e6e8f2; animation: latido 1.4s infinite; }
.esq-lineas i:last-child { width: 60%; }
.avisos { position: fixed; bottom: 1.2rem; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: .4rem; align-items: center; pointer-events: none; }
.aviso { background: var(--txt); color: #fff; padding: .65rem 1.1rem; border-radius: 12px; box-shadow: var(--sombra2); font-weight: 600; font-size: .9rem; animation: entra .25s; max-width: 90vw; }
.aviso.error { background: #b91c1c; }
@keyframes entra { from { transform: translateY(10px); opacity: 0; } }

/* ── Celular ────────────────────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, 1fr); }
  .hero { grid-template-columns: minmax(0, 1fr); }
  .rejilla-3 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .lateral { transform: translateX(-105%); transition: transform .2s; box-shadow: var(--sombra2); }
  .lateral.abierto { transform: none; }
  .cortina { display: block; position: fixed; inset: 0; background: rgba(15,23,42,.35); z-index: 35; }
  .area { margin-left: 0; }
  .hamburguesa { display: block; }
  .barra { padding: .6rem .9rem; }
  .caja-busqueda kbd, .btn-preguntar span { display: none; }
  .contenido { padding: .4rem .8rem 6rem; }
  .rejilla-hoy, .dc-cuerpo { grid-template-columns: minmax(0, 1fr); }
  .contenido, .area { max-width: 100vw; overflow-x: clip; }
  .dc-conversacion { position: static; height: 70vh; }
  .lista-chats { grid-template-columns: 1fr; }
  .inferior { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--sup); border-top: 1px solid var(--borde); z-index: 30; padding: .3rem 0 calc(.3rem + env(safe-area-inset-bottom)); }
  .inferior a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .05rem; color: var(--gris); font-size: 1.15rem; position: relative; }
  .inferior a small { font-size: .66rem; font-weight: 600; }
  .inferior a.activo { color: var(--pri); }
  .inferior .nav-badge { position: absolute; top: -2px; left: 54%; font-size: .62rem; padding: 0 .3rem; min-width: 16px; }
  .avisos { bottom: 5rem; }
  .celda { min-height: 74px; } .pastilla { font-size: .62rem; padding: 0 .2rem; } .p-hora { display: none; }
  .al-dia { grid-template-columns: 1fr; gap: .3rem; }
  .caja-pregunta { bottom: 5rem; }
  .burbuja { max-width: 88%; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.35rem; } .hero h1 { font-size: 1.5rem; }
  .kpis { grid-template-columns: repeat(2, 1fr); gap: .5rem; } .kpi b { font-size: 1.6rem; }
  .dc-acciones .btn { padding: .4rem .7rem; font-size: .82rem; }
  .qr { width: 220px; height: 220px; }
}

/* ── Bloqueos ───────────────────────────────────────────────────────────────────── */
.btn.rojo { background: #dc2626; color: #fff; border-color: transparent; }
.btn.rojo:hover { filter: brightness(1.08); color: #fff; }
.aviso-bloqueo { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; border-radius: 12px; padding: .8rem 1rem; font-size: .92rem; }
.tabla-bloqueos { display: flex; flex-direction: column; gap: .3rem; margin-top: .8rem; }
.fila-bloqueo { display: flex; align-items: center; gap: .7rem; padding: .5rem .6rem; border-radius: 10px; background: var(--sup2); border: 1px solid var(--borde); }
.fila-bloqueo small { display: block; color: var(--gris); font-size: .78rem; }
.bloq-icono { font-size: 1.2rem; }
.lista-elegir.alta { max-height: 52vh; }
.fila-elegir { display: flex; align-items: center; gap: .6rem; padding: .4rem .5rem; border-radius: 10px; cursor: pointer; }
.fila-elegir:hover { background: var(--sup2); }
.fila-elegir.on { background: #fef2f2; }
.fila-elegir small { display: block; color: var(--gris); font-size: .78rem; }
.lote { color: #6d28d9; font-weight: 600; }
