/* Secretar.IA · app del dueño. Un solo CSS, sin librerías ni fuentes externas. Colores de marca de Centralit.IA (teal + naranja). */
:root {
  --fondo: #f6f5f1; --superficie: #fff; --borde: #e3e0d8; --texto: #1d1c1a; --suave: #5b6770;
  --acento: #0e7c86; --acento-texto: #fff; --naranja: #f28c1e; --peligro: #b42318; --peligro-suave: #fde8e6;
  --barra: #1f2a30; --barra-texto: #f3f6f8;
}
@media (prefers-color-scheme: dark) {
  :root { --fondo: #14181b; --superficie: #1d2327; --borde: #2c353b; --texto: #eef1f3; --suave: #a3afb6;
          --acento: #3ec1cd; --acento-texto: #06282c; --peligro: #ff8a7d; --peligro-suave: #3a1e1b; --barra: #0f1315; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--fondo); color: var(--texto); font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', sans-serif; }
.barra { display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; padding-top: max(.5rem, env(safe-area-inset-top));
  background: var(--barra); color: var(--barra-texto); position: sticky; top: 0; z-index: 5; min-height: 52px; }
.barra h1 { font-size: 1.1rem; margin: 0; font-weight: 650; }
.volver { color: inherit; text-decoration: none; font-size: 2rem; line-height: 1; min-width: 44px; min-height: 44px;
  display: inline-flex; align-items: center; justify-content: center; margin-left: -.6rem; }
main { max-width: 640px; margin: 0 auto; padding: 1rem; padding-bottom: max(1rem, env(safe-area-inset-bottom)); }
.lista { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.fila { display: grid; gap: .25rem; min-height: 44px; padding: .8rem 1rem; background: var(--superficie); color: inherit;
  border: 1px solid var(--borde); border-left: 4px solid var(--acento); border-radius: 12px; text-decoration: none; }
.fila.urgente { border-left-color: var(--peligro); }
.fila:active { background: var(--borde); }
.fila-cab { display: flex; justify-content: space-between; gap: .75rem; align-items: baseline; }
.fila-cab time, .tenue, .cuando { color: var(--suave); font-size: .9rem; }
.fila-cab time { white-space: nowrap; }
.motivo { font-weight: 600; font-size: .95rem; }
.resumen { color: var(--suave); font-size: .95rem; }
.marcas { display: flex; flex-wrap: wrap; gap: .4rem; }
.marca, .marca-urg { display: inline-block; padding: .1rem .6rem; border-radius: 99px; font-size: .8rem; border: 1px solid var(--borde); color: var(--suave); }
.marca-urg { background: var(--peligro-suave); color: var(--peligro); border-color: transparent; font-weight: 650; }
.ficha h2 { font-size: 1rem; margin: 1.4rem 0 .3rem; color: var(--suave); text-transform: uppercase; letter-spacing: .04em; }
.ficha p { margin: .3rem 0; overflow-wrap: anywhere; }
audio { width: 100%; min-height: 44px; margin-top: .3rem; }
.transcripcion { background: var(--superficie); border: 1px solid var(--borde); border-radius: 12px; padding: .5rem 1rem; }
.transcripcion .llamante { color: var(--acento); }
.boton { display: flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 1.5rem; padding: .6rem 1rem;
  background: var(--acento); color: var(--acento-texto); border-radius: 12px; font-weight: 650; text-decoration: none; }
.vacio { text-align: center; padding: 3rem 1rem; color: var(--suave); }
.vacio-t { font-size: 1.2rem; font-weight: 650; color: var(--texto); margin-bottom: .3rem; }
a:focus-visible, .boton:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.entrada { text-align: center; padding: 2rem 0; }
.entrada form { display: grid; gap: .6rem; text-align: left; margin-top: 1.2rem; }
.entrada label { font-weight: 600; font-size: .95rem; }
.entrada input[type=email] { min-height: 48px; padding: .6rem .8rem; font: inherit; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); color: var(--texto); }
.entrada .boton { border: 0; font: inherit; font-weight: 650; cursor: pointer; width: 100%; margin-top: .4rem; }
.aviso, .error { padding: .7rem 1rem; border-radius: 12px; text-align: left; }
.aviso { background: var(--superficie); border: 1px solid var(--borde); }
.error { background: var(--peligro-suave); color: var(--peligro); }
.barra .salir { margin: 0 0 0 auto; }
.barra .salir button { background: none; border: 0; color: inherit; opacity: .7; font: inherit; font-size: .9rem; min-height: 44px; padding: 0 .5rem; cursor: pointer; }
.barra .salir button:hover, .barra .salir button:focus-visible { opacity: 1; text-decoration: underline; }
[hidden] { display: none !important; }
.instalar-aviso { background: var(--superficie); border: 1px solid var(--borde); border-left: 4px solid var(--naranja); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }
.instalar-aviso.discreto { font-size: .9rem; padding: .6rem .8rem; }
.instalar-t { font-weight: 650; margin: 0 0 .2rem; }
.instalar-botones { display: flex; gap: .6rem; margin-top: .6rem; }
.instalar-botones .boton { margin-top: 0; border: 0; font: inherit; font-weight: 650; cursor: pointer; flex: 1; }
.boton-sec { min-height: 48px; padding: .6rem 1rem; background: none; color: var(--acento); border: 1px solid var(--borde); border-radius: 12px; font: inherit; font-weight: 600; cursor: pointer; }
.instalar { padding: 1rem 0; }
.instalar .vacio-t, .instalar > div > .tenue { text-align: center; }
.sistema, .otros { background: var(--superficie); border: 1px solid var(--borde); border-radius: 12px; margin: .6rem 0; }
.otros { background: none; border: 0; }
.sistema summary, .otros > summary { min-height: 44px; padding: .6rem 1rem; font-weight: 650; cursor: pointer; display: flex; align-items: center; }
.otros > summary { color: var(--suave); padding-left: 0; }
.sistema-cuerpo { padding: 0 1rem 1rem; }
.sistema-cuerpo li { margin: .5rem 0; }
.sistema-cuerpo .boton, .sistema-cuerpo .boton-sec { width: 100%; margin: .6rem 0; font: inherit; font-weight: 650; cursor: pointer; }
.sistema-cuerpo .boton { border: 0; }
.ico-compartir { vertical-align: -5px; color: var(--acento); }
.direccion { width: 100%; min-height: 44px; padding: .5rem .7rem; font: inherit; border: 1px solid var(--borde); border-radius: 12px; background: var(--fondo); color: var(--texto); }
.pie { text-align: center; margin-top: 1.5rem; }
.pie a { color: var(--acento); }
.otros > summary::after { content: "▾"; margin-left: .4rem; }
.otros[open] > summary::after { content: "▴"; }
.avisos { background: var(--superficie); border: 1px solid var(--borde); border-left: 4px solid var(--acento); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }
.avisos .boton, .avisos .boton-sec { width: 100%; margin-top: .6rem; font: inherit; font-weight: 650; cursor: pointer; }
.avisos .boton { border: 0; }
.avisos .error { margin: .6rem 0 0; }
.registro { margin-bottom: 1rem; }
.enlace-chat { display: flex; align-items: center; justify-content: center; min-height: 44px; margin-bottom: 1rem; padding: .5rem 1rem; color: var(--acento);
  border: 1px solid var(--acento); border-radius: 12px; font-weight: 650; text-decoration: none; }
.enlace-chat:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
/* Chat: altura = zona visible (--alto-visible la pone app.js con visualViewport); los mensajes hacen scroll dentro y la caja queda al final, sin position:fixed (iOS lo desplaza con el teclado) */
.pagina-chat { height: var(--alto-visible, 100dvh); display: flex; flex-direction: column; overflow: hidden; }
.pagina-chat main { flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; padding: 0; }
.chat { list-style: none; margin: 0; padding: 1rem; flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: .5rem; }
.burbuja { max-width: 85%; padding: .55rem .85rem; border-radius: 16px; overflow-wrap: anywhere; }
.burbuja p { margin: 0; }
.burbuja time { display: block; margin-top: .15rem; font-size: .75rem; opacity: .7; }
.burbuja.dueno { align-self: flex-end; background: #0e7c86; color: #fff; border-bottom-right-radius: 4px; }
.burbuja.secretaria { align-self: flex-start; background: var(--superficie); border: 1px solid var(--borde); border-bottom-left-radius: 4px; }
.burbuja.error { align-self: center; background: var(--peligro-suave); color: var(--peligro); font-size: .9rem; }
.burbuja.escribiendo { color: var(--suave); font-style: italic; }
.chat-vacio { text-align: center; color: var(--suave); padding: 3rem 1rem; }
.chat-form { flex: none; display: flex; flex-direction: column; gap: .5rem; background: var(--fondo);
  border-top: 1px solid var(--borde); padding: .6rem 1rem; padding-bottom: max(.6rem, env(safe-area-inset-bottom)); }
.chat-form textarea { flex: 1; min-height: 48px; max-height: 8rem; resize: none; padding: .7rem .8rem; font: inherit; border: 1px solid var(--borde);
  border-radius: 12px; background: var(--superficie); color: var(--texto); }
.chat-form .boton { margin-top: 0; border: 0; font: inherit; font-weight: 650; cursor: pointer; min-width: 5.5rem; }
.chat-form .boton:disabled { opacity: .6; cursor: default; }
.chat-campos, .chat-grabando { display: flex; align-items: flex-end; gap: .5rem; }
.chat-grabando { align-items: center; }
.chat-grabando span { flex: 1; font-weight: 650; }
.chat-grabando button { min-height: 48px; padding: 0 1rem; font: inherit; cursor: pointer; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); color: var(--texto); }
.chat-grabando .boton { border: 0; margin-top: 0; background: var(--acento); color: var(--acento-texto); }
.chat-form.grabando .chat-campos, .chat-form:not(.grabando) .chat-grabando, .chat-form [hidden] { display: none; }
.chat-icono { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 48px; height: 48px; padding: 0; cursor: pointer;
  border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); color: var(--texto); }
.chat-icono:focus-within, .chat-icono:focus-visible, .chat-grabando button:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.chat-previa { display: flex; align-items: center; gap: .75rem; }
.chat-previa img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }
.chat-previa button { min-height: 44px; padding: 0 1rem; font: inherit; cursor: pointer; border: 1px solid var(--borde); border-radius: 12px; background: var(--superficie); color: var(--texto); }
.burbuja img { display: block; max-width: 100%; max-height: 18rem; border-radius: 10px; }
.burbuja img + p { margin-top: .35rem; }
/* Issue #125 · «Lo que recuerda» y «Mi WhatsApp» */
.menu-extras { display: flex; gap: .6rem; margin: -.4rem 0 1rem; }
.menu-extras a { flex: 1; display: flex; align-items: center; justify-content: center; min-height: 44px; padding: .4rem .8rem; color: var(--acento);
  background: var(--superficie); border: 1px solid var(--borde); border-radius: 12px; text-decoration: none; font-weight: 600; }
.menu-extras a:focus-visible { outline: 3px solid var(--naranja); outline-offset: 2px; }
.recuerdo form, .nuevo { display: grid; gap: .5rem; }
.recuerdo textarea, .nuevo textarea, .nuevo input { width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; border: 1px solid var(--borde);
  border-radius: 12px; background: var(--superficie); color: var(--texto); resize: vertical; }
.nuevo { margin-top: 1.2rem; }
.nuevo .boton { margin-top: 0; border: 0; font: inherit; font-weight: 650; cursor: pointer; }
.botones { display: flex; gap: .5rem; }
.botones .boton-sec { flex: 1; }
.boton-sec.peligro { color: var(--peligro); }
.boton-sec.activo { background: var(--acento); color: var(--acento-texto); border-color: transparent; }
.aviso-ok, .aviso-error { padding: .6rem 1rem; border-radius: 12px; margin: 0 0 1rem; }
.aviso-ok { background: var(--superficie); border: 1px solid var(--borde); }
.aviso-error { background: var(--peligro-suave); color: var(--peligro); }
.qr { text-align: center; }
.qr img { background: #fff; padding: 12px; border-radius: 12px; max-width: 100%; height: auto; }
.codigo-wa { text-align: center; font-size: 1.8rem; font-weight: 700; letter-spacing: .2em; font-variant-numeric: tabular-nums; }
.estado-wa { font-weight: 650; color: var(--acento); }
.chat-wa form { margin-top: .4rem; }
.chat-wa .boton-sec { width: 100%; }
.desconectar { margin-top: 2rem; }
.desconectar .boton-sec { width: 100%; }
/* 31/10/2026 · Novedades */
.novedades { display: grid; gap: .8rem; }
.novedad { display: block; padding: 1rem 1.1rem; border: 1px solid var(--borde); border-radius: 16px; background: var(--superficie);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .5) inset, 0 8px 22px -16px rgba(0, 0, 0, .35); }
.novedad h2 { margin: .35rem 0 .3rem; font-size: 1.05rem; line-height: 1.3; }
.novedad p { margin: 0 0 .4rem; }
.novedad-cab { display: flex; align-items: center; justify-content: space-between; gap: .6rem; font-size: .8rem; opacity: .75; }
.novedad-tipo { padding: .15rem .55rem; border-radius: 999px; font-weight: 700; letter-spacing: .02em; color: var(--acento);
  background: color-mix(in srgb, var(--acento) 12%, transparent); }
.novedad-tipo.mejora { color: var(--naranja); background: color-mix(in srgb, var(--naranja) 12%, transparent); }
.novedad-detalle { margin: 0 0 .5rem; padding-left: 1.1rem; }
.novedad-detalle li { margin: .15rem 0; }
.bajar-app { width: min(22rem, calc(100vw - 2rem)); border: 0; border-radius: 16px; padding: 1.5rem 1.2rem 1rem; text-align: center; background: var(--superficie); color: var(--texto); }
.bajar-app::backdrop { background: rgba(0, 0, 0, .55); }
.bajar-app img { display: block; margin: 0 auto .8rem; border-radius: 16px; }
.bajar-app p { margin: 0 0 .3rem; }
.bajar-app .boton { margin-top: 1rem; }
.bajar-no { width: 100%; min-height: 48px; margin-top: .3rem; background: none; border: 0; color: var(--suave); font: inherit; font-weight: 600; cursor: pointer; }
