/* =========================================================================
   app.css — App del cliente (Bienestar consciente). Tema de marca OSCURO,
   mobile-first. Tomado del diseño de app-cliente.html.
   ========================================================================= */

:root {
    --deep: #052623;
    --card: #0b423c;
    --card2: #0e4d45;
    --tq: #1ecdba;
    --teal: #0e857a;
    --sand: #d9ccb7;
    --gold: #ecbb52;
    --white: #ffffff;
    --soft: rgba(255, 255, 255, 0.74);
    --line: rgba(255, 255, 255, 0.10);

    --fuente-titulo: 'Fredoka', system-ui, sans-serif;
    --fuente-texto: 'Quicksand', system-ui, sans-serif;
    --fuente-label: 'Oswald', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }

body {
    font-family: var(--fuente-texto);
    background: #021715;
    color: var(--white);
    -webkit-font-smoothing: antialiased;
}

/* Contenedor de la app: pantalla completa en móvil, columna centrada en escritorio */
.app {
    position: relative;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--deep);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.app::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(80% 45% at 85% -8%, #0c4a43 0%, transparent 55%),
        radial-gradient(70% 40% at 0% 0%, #0a3c37 0%, transparent 50%);
}
.app > * { position: relative; z-index: 1; }
.app-centro { justify-content: center; }

/* Zona desplazable */
.app-scroll { flex: 1; overflow-y: auto; padding: 0 22px; }
.app-scroll::-webkit-scrollbar { width: 0; }

/* Centrado vertical para login/registro/gracias */
.cliente-auth,
.reg-thanks {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 24px;
    padding-bottom: 24px;
}
.reg-thanks { align-items: center; text-align: center; }

/* --- Marca --- */
.logo { display: flex; align-items: center; gap: 10px; justify-content: center; }
.logo svg { width: 34px; height: 34px; filter: drop-shadow(0 0 14px rgba(30, 205, 186, 0.5)); }
/* En el login del cliente, el logo va al mismo tamaño que en el login del panel
   (caja de 64 px: el ancho manda y la altura se ajusta sola). */
.logo .logo-img { width: 64px; height: auto; display: block; }
.eyebrow { font-family: var(--fuente-label); font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 10px; color: var(--tq); text-align: center; }
h1, h2, h3 { font-family: var(--fuente-titulo); font-weight: 600; }
.auth-titulo { text-align: center; font-size: 25px; margin-top: 6px; }

/* --- Controles --- */
.btn {
    display: block; width: 100%; border: none; border-radius: 14px; padding: 15px;
    font-family: var(--fuente-titulo); font-weight: 600; font-size: 15px; cursor: pointer;
    background: var(--tq); color: #042; text-align: center; text-decoration: none;
    transition: filter 0.18s ease;
}
.btn:hover { filter: brightness(1.05); }
.btn.ghost { background: transparent; border: 1.5px solid var(--tq); color: var(--tq); }
.btn.soft { background: var(--card2); color: var(--white); }

.inp {
    width: 100%; background: var(--card); border: 1px solid var(--line); border-radius: 13px;
    padding: 14px; color: var(--white); font-family: var(--fuente-texto); font-size: 14.5px; margin-top: 8px;
    outline: none;
}
.inp:focus { border-color: var(--tq); }
.inp::placeholder { color: rgba(255, 255, 255, 0.4); }
textarea.inp { resize: none; min-height: 74px; }

.lab { font-family: var(--fuente-label); font-weight: 600; letter-spacing: 0.8px; text-transform: uppercase; font-size: 10.5px; color: var(--soft); margin-top: 16px; display: block; }

/* Honeypot anti-spam: invisible para personas */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* --- Tarjetas de login --- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 22px; }
.card-titulo { font-size: 17px; }
.card-sub { color: var(--soft); font-size: 13px; margin-top: 4px; }
.auth-error { background: rgba(236, 187, 82, 0.14); color: var(--gold); border: 1px solid rgba(236, 187, 82, 0.4); border-radius: 12px; padding: 10px 12px; font-size: 13px; margin-top: 14px; }
/* Línea de ayuda bajo el error del login */
.auth-ayuda { color: var(--soft); font-size: 12px; line-height: 1.5; margin: 8px 2px 0; }

/* Campo de contraseña con ojito para mostrar/ocultar */
.pass-wrap { position: relative; margin-top: 8px; }
.pass-wrap .inp { margin-top: 0; padding-right: 46px; }
.pass-eye { position: absolute; right: 6px; top: 0; bottom: 0; width: 40px; background: none; border: none; color: var(--soft); font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; padding: 0; }
.pass-eye:hover { color: var(--tq); }

.or { display: flex; align-items: center; gap: 12px; margin: 24px 0; color: var(--soft); font-size: 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* --- Barra superior de la app --- */
.top { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 12px; }
.top .hi span { font-family: var(--fuente-label); letter-spacing: 1.5px; text-transform: uppercase; font-size: 9px; color: var(--tq); }
.top .hi b { font-family: var(--fuente-titulo); font-weight: 600; font-size: 21px; display: block; line-height: 1.05; }
.top .av { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, var(--tq), var(--teal)); display: flex; align-items: center; justify-content: center; font-family: var(--fuente-titulo); font-weight: 600; color: #042; text-decoration: none; }
.av-back { background: var(--card2); color: #fff; font-size: 22px; }

/* --- Navegación inferior (FIJA, siempre visible) --- */
/* Se ancla abajo del todo y no se va con el scroll. Respeta el safe-area del iPhone. */
.nav {
    display: flex;
    border-top: 1px solid var(--line);
    background: rgba(5, 38, 35, 0.96);
    backdrop-filter: blur(8px);
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    width: 100%;
    max-width: 480px;       /* igual que el ancho de la app */
    z-index: 50;
    padding-bottom: env(safe-area-inset-bottom); /* hueco del indicador del iPhone */
}
.nav button { flex: 1; background: none; border: none; color: var(--soft); padding: 11px 0 16px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-family: var(--fuente-texto); font-weight: 600; font-size: 10px; }
.nav button.on { color: var(--tq); }
.nav svg { width: 21px; height: 21px; }

/* El contenido deja sitio para que la barra fija no tape lo último. */
.app-scroll { padding-bottom: calc(82px + env(safe-area-inset-bottom)); }

/* --- Pestañas --- */
.tab { display: none; padding-bottom: 24px; }
.tab.on { display: block; animation: cfade 0.3s ease; }
@keyframes cfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.sec { font-family: var(--fuente-label); font-weight: 600; letter-spacing: 1.2px; text-transform: uppercase; font-size: 11px; color: var(--tq); margin: 22px 0 10px; }

/* --- Marcador "Próximamente" --- */
.proximamente { text-align: center; padding: 60px 20px; color: var(--soft); }
.prox-ico { font-size: 38px; margin-bottom: 14px; }
.proximamente h3 { font-size: 18px; color: var(--white); }
.proximamente p { font-size: 13.5px; margin-top: 8px; line-height: 1.5; max-width: 280px; margin-left: auto; margin-right: auto; }

/* --- Perfil --- */
.pf { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 16px; margin-bottom: 14px; }
.pf .row { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.pf .row:last-child { border-bottom: none; }
.pf .row span { color: var(--soft); font-size: 12px; flex: none; }
.act { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; margin-bottom: 10px; cursor: pointer; font-family: var(--fuente-texto); font-weight: 600; font-size: 14px; color: var(--white); width: 100%; text-align: left; text-decoration: none; }
.act.danger { color: #f0a094; }

/* --- Gracias (registro) --- */
.ok-circle { width: 84px; height: 84px; border-radius: 50%; background: rgba(30, 205, 186, 0.16); display: flex; align-items: center; justify-content: center; margin-bottom: 22px; }

/* --- Pop-up tipo hoja inferior --- */
.scrim { position: fixed; inset: 0; background: rgba(2, 18, 16, 0.7); backdrop-filter: blur(3px); z-index: 60; display: none; align-items: flex-end; justify-content: center; }
.scrim.on { display: flex; }
.sheet { width: 100%; max-width: 480px; background: var(--card); border-radius: 24px 24px 0 0; padding: 24px 22px calc(24px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); }
.sheet h3 { font-size: 19px; text-align: center; }
.sheet p { color: var(--soft); font-size: 13.5px; text-align: center; margin: 8px 0 4px; line-height: 1.5; }

/* --- Plan (INICIO) --- */
.plan { background: linear-gradient(150deg, var(--teal), #0a5b53); border-radius: 20px; padding: 20px; }
.plan .ph { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan h3 { font-size: 18px; }
.plan .pill { background: rgba(255, 255, 255, 0.18); border-radius: 20px; padding: 4px 11px; font-size: 11px; font-weight: 600; flex: none; }
.plan p { color: rgba(255, 255, 255, 0.88); font-size: 13px; margin-top: 6px; line-height: 1.5; }
.bar { height: 7px; background: rgba(255, 255, 255, 0.2); border-radius: 10px; margin-top: 14px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: var(--white); border-radius: 10px; transition: width 0.5s ease; }
.barlab { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: rgba(255, 255, 255, 0.8); margin-top: 6px; }

/* --- Próxima cita (INICIO) --- */
.next { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 15px; }
.next .day { text-align: center; background: var(--card2); border-radius: 12px; padding: 8px 12px; flex: none; }
.next .day span { font-family: var(--fuente-label); font-size: 9px; text-transform: uppercase; color: var(--tq); display: block; }
.next .day b { font-family: var(--fuente-titulo); font-size: 20px; }
.next .info b { font-family: var(--fuente-titulo); font-weight: 500; font-size: 14px; }
.next .info p { font-size: 12px; color: var(--soft); }

/* --- Recomendaciones (INICIO) --- */
.rec { background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--tq); border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.rec .rh { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.rec .rh b { font-family: var(--fuente-titulo); font-weight: 500; font-size: 14px; }
.rec .rh small { font-size: 10.5px; color: var(--soft); margin-left: auto; }
.rec p { font-size: 13px; color: var(--soft); line-height: 1.5; }

/* --- Menú semanal --- */
.days { display: flex; gap: 7px; overflow-x: auto; padding-bottom: 4px; }
.days::-webkit-scrollbar { height: 0; }
.days button { flex: none; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 9px 13px; color: var(--soft); font-family: var(--fuente-titulo); font-weight: 500; font-size: 13px; cursor: pointer; text-align: center; min-width: 50px; }
.days button span { display: block; font-size: 9px; font-family: var(--fuente-label); text-transform: uppercase; }
.days button.on { background: var(--tq); color: #042; border-color: var(--tq); }
.meal { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-top: 10px; }
.meal .ml { font-family: var(--fuente-label); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 10px; color: var(--tq); }
.meal p { font-size: 13.5px; margin-top: 5px; line-height: 1.45; }
.menu-vacio { color: var(--soft); text-align: center; margin-top: 24px; }

/* --- Sesiones (pestaña) --- */
#btn-agendar-cita { margin: 8px 0 4px; }
.ses { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px; margin-bottom: 10px; }
.ses .sh { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 7px; }
.ses .sh b { font-family: var(--fuente-titulo); font-weight: 500; font-size: 14px; }
.tagm { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 3px 9px; border-radius: 20px; background: rgba(30, 205, 186, 0.16); color: var(--tq); flex: none; }
.tagm.pres { background: rgba(236, 187, 82, 0.16); color: var(--gold); }
.ses .sp { font-size: 12.5px; color: var(--soft); line-height: 1.5; }
.ses-nota { font-size: 11px; color: var(--soft); text-align: center; margin-top: 8px; }

/* --- Opciones de modalidad en los pop-ups --- */
.modopt { display: flex; gap: 10px; margin-top: 8px; }
.modopt button { flex: 1; background: var(--card2); border: 1.5px solid var(--line); border-radius: 13px; padding: 13px; color: var(--white); font-family: var(--fuente-titulo); font-weight: 500; cursor: pointer; }
.modopt button.sel { border-color: var(--tq); color: var(--tq); }

/* Espaciado uniforme de botones dentro de las hojas inferiores */
.sheet .btn { margin-top: 12px; }

/* --- Avatar pulsable (abre Perfil) --- */
button.av { border: none; cursor: pointer; font-size: inherit; }

/* --- Enlace "Ver todas las pautas" (Inicio) --- */
.verlink { display: inline-block; background: none; border: none; cursor: pointer; color: var(--tq); font-family: var(--fuente-titulo); font-weight: 600; font-size: 13px; padding: 4px 2px; }
.verlink:hover { filter: brightness(1.1); }

/* --- Lista de pautas (pestaña Pautas) --- */
.pauta { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-left: 3px solid var(--tq); border-radius: 14px; padding: 14px; margin-bottom: 10px; cursor: pointer; font-family: var(--fuente-texto); color: var(--white); }
.pauta:hover { border-color: var(--tq); }
.pauta .ph2 { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.pauta .ph2 b { font-family: var(--fuente-titulo); font-weight: 500; font-size: 14px; }
.pauta .ph2 small { font-size: 10.5px; color: var(--soft); margin-left: auto; }
/* Vista previa recortada a 2 líneas */
.pauta .pp { font-size: 13px; color: var(--soft); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* --- Detalle de pauta (hoja inferior) --- */
.pauta-dh { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.pauta-dh small { font-size: 11px; color: var(--soft); flex: none; }
.pauta-texto { font-size: 14px; color: var(--soft); line-height: 1.6; margin-top: 14px; max-height: 56vh; overflow-y: auto; white-space: normal; }

/* --- Archivos (galería del cliente) --- */
.fa-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.fa-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.fa-thumb { display: block; width: 100%; height: 120px; object-fit: cover; cursor: pointer; background: var(--card2); }
.fa-item figcaption { padding: 9px 11px; }
.fa-item figcaption b { display: block; font-family: var(--fuente-titulo); font-weight: 500; font-size: 13px; color: var(--white); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fa-item figcaption small { display: block; font-size: 10.5px; color: var(--soft); margin-top: 2px; }

/* --- Sesiones clicables (cliente) --- */
.ses-clic { cursor: pointer; position: relative; transition: border-color 0.15s; }
.ses-clic:hover { border-color: var(--tq); }
.next.ses-clic { padding-right: 30px; }
.ses-flecha { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: var(--soft); font-size: 22px; }
/* Detalle de sesión dentro de la hoja */
.ses-det { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.ses-det-row { display: flex; justify-content: space-between; gap: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; }
.ses-det-row span { color: var(--soft); font-size: 12px; }
.ses-det-row b { font-family: var(--fuente-titulo); font-weight: 500; font-size: 14px; }
.ses-det-tit { font-family: var(--fuente-label); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; font-size: 10.5px; color: var(--tq); margin: 16px 0 6px; }
.ses-det-resumen { font-size: 14px; color: var(--soft); line-height: 1.6; }

/* La hoja inferior se desplaza suavemente al abrirse el teclado y no se corta */
.sheet { transition: transform 0.22s ease; max-height: 92vh; overflow-y: auto; }

/* --- Suplementación (cliente) --- */
.sup-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.sup-card { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; cursor: pointer; color: var(--white); padding: 0; }
.sup-card .sup-foto { display: block; width: 100%; height: 110px; object-fit: cover; background: var(--card2); }
.sup-foto-no { display: flex; align-items: center; justify-content: center; height: 110px; font-size: 40px; }
.sup-info { padding: 9px 11px; }
.sup-info b { display: block; font-family: var(--fuente-titulo); font-weight: 500; font-size: 13.5px; }
.sup-marca { display: block; font-size: 11px; color: var(--tq); font-weight: 600; margin-top: 1px; }
.sup-info p { font-size: 12px; color: var(--soft); margin-top: 4px; line-height: 1.4; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.sup-detalle-foto { display: block; width: 100%; max-height: 220px; object-fit: contain; border-radius: 12px; background: var(--card2); margin-bottom: 10px; }
.sup-detalle-marca { font-size: 13px; color: var(--tq); font-weight: 600; margin-bottom: 6px; }

/* La barra inferior ahora tiene 6 secciones: un pelín más compacta */
.nav button { font-size: 9px; padding-left: 2px; padding-right: 2px; }
.nav svg { width: 20px; height: 20px; }

/* --- Cuestionario de frecuencia (una pregunta por pantalla) --- */
.cuest { position: fixed; inset: 0; z-index: 100; background: var(--deep); display: flex; flex-direction: column; }
.cuest[hidden] { display: none; }
.cuest-top { padding: calc(18px + env(safe-area-inset-top)) 22px 6px; }
.cuest-prog { height: 6px; background: rgba(255, 255, 255, 0.12); border-radius: 10px; overflow: hidden; }
.cuest-prog i { display: block; height: 100%; width: 0; background: var(--tq); border-radius: 10px; transition: width 0.3s ease; }
.cuest-count { font-family: var(--fuente-label); text-transform: uppercase; letter-spacing: 1.5px; font-size: 10px; color: var(--soft); margin-top: 10px; text-align: center; }

.cuest-body { flex: 1; overflow-y: auto; display: flex; flex-direction: column; justify-content: center; padding: 16px 22px; }
.cuest-q { animation: cuestIn 0.3s ease; }
@keyframes cuestIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.cuest-titulo { font-family: var(--fuente-titulo); font-weight: 600; font-size: 23px; line-height: 1.25; text-align: center; }
.cuest-sub { color: var(--soft); font-size: 14px; text-align: center; margin-top: 8px; }

.cuest-ops { display: flex; flex-direction: column; gap: 11px; margin-top: 24px; }
.cuest-op { width: 100%; background: var(--card); border: 1.5px solid var(--line); border-radius: 16px; padding: 17px 18px; color: var(--white); font-family: var(--fuente-texto); font-weight: 600; font-size: 15px; text-align: left; cursor: pointer; transition: border-color 0.15s, background 0.15s, transform 0.1s; }
.cuest-op:hover { border-color: var(--tq); }
.cuest-op.on { border-color: var(--tq); background: var(--card2); }
.cuest-op:active { transform: scale(0.99); }

.cuest-input { width: 100%; background: var(--card); border: 1.5px solid var(--line); border-radius: 14px; padding: 15px; color: var(--white); font-family: var(--fuente-texto); font-size: 15.5px; margin-top: 22px; outline: none; }
.cuest-input:focus { border-color: var(--tq); }
textarea.cuest-input { resize: none; min-height: 110px; }

.cuest-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 22px calc(20px + env(safe-area-inset-bottom)); }
.cuest-atras { background: none; border: none; color: var(--soft); font-family: var(--fuente-texto); font-weight: 600; font-size: 14px; cursor: pointer; padding: 10px 4px; }
.cuest-sig { background: var(--tq); color: #042; border: none; border-radius: 14px; padding: 14px 28px; font-family: var(--fuente-titulo); font-weight: 600; font-size: 15px; cursor: pointer; }
.cuest-sig:hover { filter: brightness(1.05); }

.cuest-gracias { text-align: center; }
.cuest-ok { width: 72px; height: 72px; border-radius: 50%; background: rgba(30, 205, 186, 0.18); color: var(--tq); font-size: 36px; line-height: 72px; margin: 0 auto 18px; }

/* --- Botón flotante "Escríbele a Marta" --- */
.fab-msg { position: fixed; right: 18px; bottom: calc(78px + env(safe-area-inset-bottom)); width: 54px; height: 54px; border-radius: 50%; border: none; background: var(--tq); color: #042; display: flex; align-items: center; justify-content: center; cursor: pointer; z-index: 55; box-shadow: 0 10px 26px rgba(0, 0, 0, 0.4); }
.fab-msg svg { width: 24px; height: 24px; }

/* Lista de conversaciones (centro de mensajes) */
.conv { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 11px 13px; margin-bottom: 8px; cursor: pointer; font-family: var(--fuente-texto); color: var(--white); }
.conv .conv-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.conv .conv-h b { font-family: var(--fuente-titulo); font-weight: 500; font-size: 13.5px; }
.conv .conv-h small { font-size: 10.5px; color: var(--soft); }
.conv p { font-size: 12.5px; color: var(--soft); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.conv-estado { display: inline-block; margin-top: 6px; font-size: 10.5px; font-weight: 700; color: var(--gold); }

/* --- Nota clicable (Inicio) + conversación --- */
.rec.nota-clic { cursor: pointer; transition: border-color 0.15s; }
.rec.nota-clic:hover { border-left-color: var(--gold); }
.rec-resp { display: block; margin-top: 8px; font-size: 11px; font-weight: 600; color: var(--tq); }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 50vh; overflow-y: auto; margin-bottom: 4px; }
.chat-msg { display: flex; }
.chat-msg.mia { justify-content: flex-end; }
.chat-msg.suya { justify-content: flex-start; }
.chat-bubble { max-width: 82%; border: 1px solid var(--line); border-radius: 14px; padding: 9px 12px; font-size: 13.5px; line-height: 1.5; color: var(--white); }
.chat-msg.mia .chat-bubble { background: var(--teal); border-color: var(--teal); }
.chat-msg.suya .chat-bubble { background: var(--card2); }
.chat-quien { font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--soft); font-weight: 700; margin-bottom: 3px; }

/* --- Campanita de novedades --- */
.top-acc { display: flex; align-items: center; gap: 12px; }
.campana { position: relative; background: none; border: none; color: var(--white); cursor: pointer; padding: 4px; display: flex; align-items: center; }
.campana svg { width: 24px; height: 24px; }
.campana-badge { position: absolute; top: -2px; right: -4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--gold); color: #042; font-family: var(--fuente-titulo); font-weight: 700; font-size: 10px; line-height: 17px; text-align: center; }

/* Lista de novedades en la hoja */
#notif-lista { max-height: 60vh; overflow-y: auto; }
.notif { display: block; width: 100%; text-align: left; background: var(--card); border: 1px solid var(--line); border-radius: 13px; padding: 12px 14px; margin-bottom: 8px; cursor: pointer; font-family: var(--fuente-texto); color: var(--white); }
.notif.nueva { border-left: 3px solid var(--tq); }
.notif .notif-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.notif .notif-h b { font-family: var(--fuente-titulo); font-weight: 500; font-size: 14px; }
.notif .notif-h small { font-size: 10.5px; color: var(--soft); flex: none; }
.notif p { font-size: 12.5px; color: var(--soft); line-height: 1.5; margin-top: 4px; }

/* --- Pautas estructuradas: badge de archivo --- */
.pauta-badge { display: inline-block; margin-top: 8px; font-size: 11px; font-weight: 600; color: var(--tq); background: rgba(30, 205, 186, 0.14); border-radius: 20px; padding: 3px 10px; }

/* --- Preview del archivo en el detalle de una pauta (adaptable) --- */
.pauta-preview { display: block; width: 100%; max-height: 260px; object-fit: contain; border-radius: 12px; background: var(--card2); margin-top: 12px; cursor: pointer; }
.pauta-preview-pdf { display: block; width: 100%; height: 240px; border: 1px solid var(--line); border-radius: 12px; margin-top: 12px; background: var(--card2); }
.pauta-preview-otro { display: flex; align-items: center; gap: 10px; margin-top: 12px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 28px; }
.pauta-preview-otro span { font-family: var(--fuente-titulo); font-weight: 600; font-size: 14px; color: var(--white); }

/* --- Archivos: icono para no-imágenes y detalle --- */
.fa-icono { display: flex; align-items: center; justify-content: center; height: 120px; font-size: 44px; background: var(--card2); }
#pauta-archivo .btn { margin-top: 14px; }
.fa-detalle-img { display: block; width: 100%; max-height: 50vh; object-fit: contain; border-radius: 12px; background: var(--card2); margin-bottom: 10px; }
.fa-detalle-icono { text-align: center; font-size: 72px; margin-bottom: 10px; }
.fa-detalle-meta { font-size: 13px; color: var(--soft); margin-bottom: 6px; }

/* --- Visor de imagen a tamaño completo --- */
.img-viewer { position: fixed; inset: 0; z-index: 80; display: none; align-items: center; justify-content: center; background: rgba(2, 18, 16, 0.94); padding: 20px; }
.img-viewer.on { display: flex; }
.img-viewer img { max-width: 100%; max-height: 88vh; border-radius: 12px; }
.img-cerrar { position: absolute; top: 16px; right: 16px; width: 40px; height: 40px; border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 18px; cursor: pointer; }
.img-cerrar:hover { background: rgba(255, 255, 255, 0.25); }

/* --- Toast --- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(160%); background: var(--tq); color: #042; border-radius: 14px; padding: 13px 22px; font-family: var(--fuente-titulo); font-weight: 600; font-size: 14px; z-index: 90; transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4); max-width: 90%; text-align: center; }
.toast.show { transform: translateX(-50%) translateY(0); }

/* --- Tanita del cliente (evolución, dentro de Perfil) --- */
#tanita-cliente-wrap:empty { display: none; }
.tc-chart { width: 100%; height: auto; display: block; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 8px; margin-top: 4px; }
.tc-chart .tc-x, .tc-chart .tc-y { fill: var(--soft); font-size: 9px; font-family: var(--fuente-texto); }
.tc-chart .tc-y { opacity: 0.85; }
.tc-chart .tc-grid { stroke: rgba(255, 255, 255, 0.09); stroke-width: 1; }
.tc-chart .tc-axis { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.tc-chart .tc-tick { stroke: rgba(255, 255, 255, 0.28); stroke-width: 1; }
.tc-leyenda { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; margin: 8px 0 2px; font-size: 12px; color: var(--soft); }
.tc-leyenda span { display: inline-flex; align-items: center; gap: 6px; }
.tc-leyenda i { width: 12px; height: 3px; border-radius: 2px; display: inline-block; }
.tc-ultima { margin-top: 12px; font-family: var(--fuente-label); letter-spacing: 1px; text-transform: uppercase; font-size: 10px; color: var(--tq); }
.tc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 8px; }
.tc-stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; }
.tc-stat b { display: block; font-family: var(--fuente-titulo); font-size: 18px; color: var(--white); }
.tc-stat span { display: block; font-size: 11px; color: var(--soft); margin-top: 2px; }
.tc-lista { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.tc-row { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tc-row-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.tc-row-h b { font-family: var(--fuente-titulo); font-size: 15px; color: var(--white); }
.tc-row-h span { color: var(--tq); font-weight: 600; font-size: 14px; }
.tc-vals { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 8px; font-size: 13px; color: var(--soft); }
.tc-vals b { color: var(--white); font-weight: 600; }
