/* App de clientes ATRYASOL — diseño móvil.
   Los colores del fondo oscuro y los brillos son variables: la app de una empresa de la red las cambia por las suyas. */
:root { --fondo-1: #0f2140; --fondo-2: #0a1628; --fondo-3: #050a14; --brillo: rgba(245,166,35,.22); --brillo-fuerte: rgba(240,160,26,.55);
  --sombra-marca: rgba(232,88,0,.45); --sombra-boton: var(--sombra-boton); }
body { background: var(--bg); }
:root { color-scheme: dark; } /* siempre modo oscuro: también teclado, selectores y barras de desplazamiento */
#shell { min-height: 100vh; padding-bottom: calc(92px + env(safe-area-inset-bottom)); }
main { max-width: 640px; margin: 0 auto; padding: 0 16px 1.5rem; }
.center { text-align: center; }
.btn-block { width: 100%; min-height: 50px; font-size: .98rem; box-shadow: 0 8px 24px -8px var(--sombra-boton); }
button:not(.btn-icon):not(.tipo):not(.accion):not(.check-item):not(.menu-fila):not(.icon-btn):not(.chat-form button), .btn:not(.icon-btn) { border-radius: 999px; }
h1 { font-size: 1.5rem; }

/* ---------- Acceso ---------- */
.login { min-height: 100vh; display: flex; flex-direction: column; background: radial-gradient(500px 300px at 85% 10%, var(--brillo), transparent 60%), linear-gradient(165deg, var(--fondo-1) 0%, var(--fondo-2) 55%, var(--fondo-3) 100%); }
.login-top { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #fff; text-align: center; padding: calc(2.5rem + env(safe-area-inset-top)) 24px 2rem; }
.login-logo { width: 120px; height: auto; margin-bottom: .6rem; filter: drop-shadow(0 8px 24px var(--sombra-marca)); }
.login-top h1 { color: #fff; font-size: 1.9rem; letter-spacing: .06em; margin: 0; }
.login-top p { color: rgba(255,255,255,.75); margin: .4rem 0 0; }
.login-card { background: var(--surface); border-radius: 28px 28px 0 0; padding: 1.6rem 22px calc(1.6rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: .9rem; max-width: 640px; width: 100%; margin: 0 auto; }
.login-card h2 { margin: 0 0 .2rem; font-size: 1.25rem; }

/* ---------- Cabecera (hero) ---------- */
.hero {
  position: relative; overflow: hidden; margin: 0 -16px 1.1rem; padding: calc(1.2rem + env(safe-area-inset-top)) 20px 1.6rem;
  color: #fff;
  /* Sin corte: el azul se funde con el fondo de la página, al estilo de iOS 26.
     Capa de arriba: el color del fondo aparece con una curva suave (smootherstep, 11 pasos) a lo largo de 11rem,
     mezclado en OKLab para que el paso del azul al claro no se vea gris. */
  --f: var(--bg); --alto: 11rem;
  background:
    linear-gradient(180deg,
      transparent calc(100% - var(--alto)),
      color-mix(in oklab, var(--f) 1%, transparent) calc(100% - var(--alto) * .9),
      color-mix(in oklab, var(--f) 6%, transparent) calc(100% - var(--alto) * .8),
      color-mix(in oklab, var(--f) 16%, transparent) calc(100% - var(--alto) * .7),
      color-mix(in oklab, var(--f) 32%, transparent) calc(100% - var(--alto) * .6),
      color-mix(in oklab, var(--f) 50%, transparent) calc(100% - var(--alto) * .5),
      color-mix(in oklab, var(--f) 68%, transparent) calc(100% - var(--alto) * .4),
      color-mix(in oklab, var(--f) 84%, transparent) calc(100% - var(--alto) * .3),
      color-mix(in oklab, var(--f) 94%, transparent) calc(100% - var(--alto) * .2),
      color-mix(in oklab, var(--f) 99%, transparent) calc(100% - var(--alto) * .1),
      var(--f) 100%),
    linear-gradient(160deg, var(--fondo-1) 0%, var(--fondo-2) 60%, var(--fondo-3) 100%);
  padding-bottom: calc(var(--alto) - 1rem); margin-bottom: calc(1.1rem - var(--alto) + 3.2rem);
}
.hero > * { position: relative; z-index: 1; }
/* Lo que va después de la cabecera se pinta encima del fundido (los botones quedan montados sobre él) */
.hero ~ * { position: relative; z-index: 2; }
/* Cristal sobre la cabecera azul: logo (arriba a la izquierda) y botón de perfil */
.hero-top .brand, .hero-top .icon-btn {
  background: linear-gradient(180deg, rgba(255,255,255,.2), rgba(255,255,255,.05));
  -webkit-backdrop-filter: blur(18px) saturate(180%); backdrop-filter: blur(18px) saturate(180%);
  border: 1px solid rgba(255,255,255,.22);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(255,255,255,.06), 0 8px 22px -10px rgba(0,0,0,.6);
}
.hero-top .brand { padding: .3rem .95rem .3rem .35rem; border-radius: 999px; }
.hero-top .icon-btn { width: 44px; height: 44px; border-radius: 999px; display: grid; place-items: center; }
.hero-top .icon-btn:active { transform: scale(.94); }
.hero::after { content: ""; position: absolute; right: -40px; top: -40px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, var(--brillo-fuerte), transparent 70%); }
.hero-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.hero-top .brand { display: flex; align-items: center; gap: .5rem; font-weight: 750; letter-spacing: .06em; font-size: .9rem; color: rgba(255,255,255,.9); }
.hero-top .brand img { width: 34px; height: 34px; object-fit: contain; filter: drop-shadow(0 2px 8px var(--sombra-marca)); }
.hero h1 { color: #fff; margin: 1.1rem 0 .2rem; font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; position: relative; z-index: 1; }
.hero h1 em { font-style: normal; color: var(--resalte, var(--brand)); }
.hero .sub { color: rgba(255,255,255,.78); font-size: .92rem; position: relative; z-index: 1; }
.hero .estado { display: inline-flex; align-items: center; gap: .45rem; margin-top: .9rem; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); padding: .4rem .75rem; border-radius: 999px; font-size: .85rem; font-weight: 600; position: relative; z-index: 1; }
.hero .estado .dot { background: var(--accent); width: 8px; height: 8px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.12); color: #fff; border: 0; padding: 0; min-height: 0; }
.icon-btn:hover { background: rgba(255,255,255,.2); }
.page-title { display: flex; align-items: center; justify-content: space-between; padding: calc(1rem + env(safe-area-inset-top)) 0 .9rem; }
.page-title h1 { margin: 0; }

/* ---------- Bloques ---------- */
.section-title { font-size: .78rem; font-weight: 750; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 1.4rem 4px .6rem; display: flex; align-items: center; gap: .5rem; }
.card { border-radius: 20px; padding: 1.1rem 1.15rem; }
.card + .card { margin-top: .8rem; }
.card h2 { font-size: 1.05rem; }

.acciones { display: grid; grid-template-columns: repeat(4, 1fr); gap: .6rem; }
.accion { display: flex; flex-direction: column; align-items: center; gap: .45rem; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: .85rem .3rem .75rem; color: var(--text); font-size: .74rem; font-weight: 600; text-align: center; text-decoration: none; min-height: 0; box-shadow: var(--shadow-sm); line-height: 1.2; }
.accion:hover { background: var(--surface); border-color: var(--brand); text-decoration: none; }
.accion .ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; }
.accion .ico .icon { width: 22px; height: 22px; }

/* Expediente */
.expediente .barra { height: 10px; border-radius: 6px; background: var(--surface-2); overflow: hidden; margin: .6rem 0 .9rem; }
.expediente .barra i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--brand)); box-shadow: 0 0 12px var(--sombra-boton); transition: width .6s var(--ease); }
.check-item { display: flex; align-items: center; gap: .75rem; padding: .6rem 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; width: 100%; background: none; border-left: 0; border-right: 0; border-bottom: 0; border-radius: 0; min-height: 0; font-weight: 500; text-align: left; justify-content: flex-start; }
.check-item:hover { background: none; text-decoration: none; }
.check-item .estado-ico { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--border-strong); color: transparent; }
.check-item.ok .estado-ico { background: var(--ok); border-color: var(--ok); color: #fff; }
.check-item.ok .txt { color: var(--muted); text-decoration: line-through; }
.check-item .txt { flex: 1; font-size: .92rem; }
.check-item .ir { color: var(--brand-text); font-size: .82rem; font-weight: 650; }

/* Peticiones del equipo */
.pet { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 1rem; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.pet::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--accent); }
.pet + .pet { margin-top: .7rem; }
.pet-info::before { background: var(--info); } .pet-violet::before { background: var(--violet); } .pet-brand::before { background: var(--brand); }
.pet-head { display: flex; gap: .75rem; align-items: center; }
.pet-head .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.pet-tipo { font-size: .72rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.pet-titulo { font-weight: 650; font-size: 1rem; line-height: 1.3; }
.pet-desc { margin: .6rem 0 0; font-size: .92rem; color: var(--text-2); white-space: pre-wrap; }
.cita-fecha { display: flex; gap: .4rem; align-items: center; margin-top: .6rem; font-weight: 650; color: var(--violet); }
.pet-acciones { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .85rem; }
.pet-acciones > * { flex: 1 1 auto; min-height: 44px; border-radius: 12px; }
label.btn { margin: 0; color: var(--brand-ink); font-size: .9rem; cursor: pointer; }
label.btn.btn-ghost { color: var(--text); }
.btn.disabled, button:disabled { opacity: .5; pointer-events: none; }

/* Proyecto */
.proyecto .fase-actual { display: flex; gap: .8rem; align-items: center; background: var(--brand-soft); border-radius: 14px; padding: .8rem .9rem; margin: .8rem 0; }
.proyecto .fase-actual .ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand); color: var(--brand-ink); flex: none; }
.proyecto .fase-actual b { display: block; }
.proyecto .fase-actual span { font-size: .86rem; color: var(--text-2); }
.datos { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .5rem; margin-top: .6rem; }
.datos div { background: var(--surface-2); border-radius: 12px; padding: .6rem .75rem; }
.datos b { display: block; font-size: 1.05rem; }
.datos span { font-size: .78rem; color: var(--muted); }
details summary { cursor: pointer; color: var(--brand-text); font-size: .9rem; font-weight: 600; }

.aviso-card { display: flex; align-items: center; gap: .8rem; text-decoration: none; color: var(--text); background: var(--info-soft); border: 1px solid transparent; border-radius: 18px; padding: .9rem 1rem; margin-top: .8rem; }
.aviso-card:hover { text-decoration: none; }
.aviso-card .grow { flex: 1; }
.aviso-card.warn { background: var(--warn-soft); }

/* Listas */
.fila { display: flex; align-items: center; gap: .8rem; padding: .75rem 0; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; }
.fila:first-of-type { border-top: 0; }
.card > .fila:first-child, .card > h2 + .fila { border-top: 0; }
.fila:hover { text-decoration: none; }
.fila .grow { min-width: 0; flex: 1; }
.fila .t { font-weight: 600; overflow-wrap: anywhere; }
.fila .d { font-size: .8rem; color: var(--muted); }
.file-ico { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex: none; font-size: .62rem; font-weight: 800; }

/* Subir documento: tipos */
.tipos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.tipo { display: flex; flex-direction: column; align-items: center; gap: .35rem; padding: .8rem .3rem; border-radius: 14px; border: 2px solid var(--border); background: var(--surface); color: var(--text); font-size: .76rem; font-weight: 600; min-height: 0; text-align: center; }
.tipo:hover { background: var(--surface); border-color: var(--border-strong); }
.tipo.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-text); }
.tipo .icon { width: 22px; height: 22px; }
.subir-zona { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin-top: .8rem; }
.subir-zona label { margin: 0; }
.subir-zona .btn { width: 100%; min-height: 50px; border-radius: 14px; }
.archivos-sel { margin-top: .6rem; font-size: .85rem; color: var(--text-2); }

/* Perfil */
.perfil-head { display: flex; align-items: center; gap: 1rem; margin: .4rem 0 1rem; }
.perfil-head .avatar { width: 64px; height: 64px; border-radius: 20px; font-size: 1.3rem; }
.perfil-head h1 { margin: 0; font-size: 1.3rem; }
.dato { display: flex; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-top: 1px solid var(--border); font-size: .92rem; }
.dato:first-of-type { border-top: 0; }
.dato span { color: var(--muted); }
.dato b { text-align: right; font-weight: 600; overflow-wrap: anywhere; }
.menu-fila { display: flex; align-items: center; gap: .8rem; width: 100%; padding: .85rem 0; border-top: 1px solid var(--border); background: none; color: var(--text); border-radius: 0; border-left: 0; border-right: 0; border-bottom: 0; min-height: 0; font-weight: 550; justify-content: flex-start; }
.menu-fila:hover { background: none; }
.menu-fila:first-child { border-top: 0; }
.menu-fila .grow { flex: 1; text-align: left; }
.menu-fila.peligro { color: var(--bad); }

/* Chat */
.chat-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.chat { height: calc(100vh - 300px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); min-height: 300px; overflow-y: auto; padding: 1rem; display: flex; flex-direction: column; gap: .5rem; background: var(--surface-2); }
.msg { max-width: 82%; padding: .6rem .85rem; border-radius: 18px; font-size: .95rem; box-shadow: var(--shadow-sm); }
.msg.yo { align-self: flex-end; background: var(--navy); color: #fff; border-bottom-right-radius: 6px; }
.msg.ellos { align-self: flex-start; background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 6px; }
.msg-autor { font-size: .72rem; font-weight: 700; color: var(--brand-text); margin-bottom: .1rem; }
.msg-txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-hora { font-size: .68rem; opacity: .7; margin-top: .2rem; text-align: right; }
.msg-doc { display: inline-flex; gap: .35rem; align-items: center; margin-top: .35rem; font-size: .85rem; font-weight: 600; color: inherit; text-decoration: underline; }
.chat-form { display: flex; gap: .5rem; padding: .6rem; border-top: 1px solid var(--border); background: var(--surface); align-items: flex-end; }
.chat-form textarea { min-height: 44px; resize: none; border-radius: 22px; padding: .6rem .95rem; }
.chat-form button { width: 44px; min-height: 44px; border-radius: 50%; padding: 0; flex: none; }
.chips-gestion { display: flex; gap: .5rem; overflow-x: auto; padding: .1rem 0 .8rem; }
.chips-gestion button { white-space: nowrap; border-radius: 999px; min-height: 36px; font-size: .84rem; }

/* Barra inferior flotante de cristal («liquid glass», como la de iOS 26) */
.tabbar {
  --pad: 6px;
  position: fixed; z-index: 10; left: 16px; right: 16px; bottom: calc(10px + env(safe-area-inset-bottom));
  max-width: 480px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); padding: var(--pad);
  border-radius: 999px; isolation: isolate;
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.04)), color-mix(in srgb, var(--surface) 55%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(190%); backdrop-filter: blur(22px) saturate(190%);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), inset 0 -1px 0 rgba(255,255,255,.08), 0 12px 32px -10px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.12);
}
/* Lente: la burbuja de cristal que marca la pestaña activa y se desliza al cambiar */
.tab-lente {
  position: absolute; z-index: -1; top: var(--pad); bottom: var(--pad); width: calc((100% - 2 * var(--pad)) / 4);
  left: calc(var(--pad) + var(--tab-activa, 0) * (100% - 2 * var(--pad)) / 4); border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.06)), color-mix(in srgb, var(--text) 9%, transparent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), inset 0 0 0 1px rgba(255,255,255,.14), 0 4px 14px -6px rgba(0,0,0,.35);
  transition: left .45s cubic-bezier(.34,1.45,.5,1);
}
.tabbar.sin-activa .tab-lente { opacity: 0; }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: .45rem 0 .4rem; border-radius: 999px; text-decoration: none; color: var(--muted); font-size: .66rem; font-weight: 650; transition: color .2s, transform .15s; }
.tabbar a:active { transform: scale(.92); }
.tabbar a .tab-ico { position: relative; display: grid; place-items: center; width: 44px; height: 26px; }
.tabbar a.active { color: var(--brand-text); }
@media (prefers-reduced-motion: reduce) { .tab-lente, .tabbar a { transition: none; } }
.tab-badge { position: absolute; top: -4px; right: 4px; background: var(--bad); color: #fff; border-radius: 999px; font-size: .62rem; padding: 0 .35rem; line-height: 1.5; font-weight: 750; }

.preview-banner { background: var(--accent); color: #fff; font-weight: 650; font-size: .8rem; text-align: center; padding: .45rem 1rem; position: sticky; top: 0; z-index: 20; }
body.preview .hero { padding-top: 1.2rem; }
@media (min-width: 700px) { .acciones { gap: .8rem; } }

/* Pantallas de aviso (sin conexión, actualizar la app, cuenta eliminada) */
.aviso-pantalla { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: .3rem;
  padding: calc(2rem + env(safe-area-inset-top)) 28px calc(2rem + env(safe-area-inset-bottom)); color: #fff;
  background: radial-gradient(500px 300px at 85% 10%, var(--brillo), transparent 60%), linear-gradient(165deg, var(--fondo-1) 0%, var(--fondo-2) 55%, var(--fondo-3) 100%); }
.aviso-pantalla .login-logo { width: 84px; }
.aviso-pantalla .ico { display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--brillo); color: var(--resalte, var(--brand)); margin-top: .8rem; }
.aviso-pantalla h1 { color: #fff; font-size: 1.4rem; margin: .5rem 0 0; }
.aviso-pantalla p { color: rgba(255,255,255,.78); max-width: 360px; margin: .2rem 0 1rem; }
.aviso-pantalla button { max-width: 320px; }
.aviso-pantalla .enlace-claro { background: none; border: 0; color: rgba(255,255,255,.75); font-weight: 600; font-size: .9rem; min-height: 44px; box-shadow: none; }
/* Bloqueo con Face ID / huella: tapa la app hasta que el dueño del móvil se identifica */
#bloqueo { position: fixed; inset: 0; z-index: 300; }
.btn-invitado { width: 100%; min-height: 46px; }
.interruptor { flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .2s; }
.interruptor::after { content: ''; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.interruptor.on { background: var(--ok); }
.interruptor.on::after { transform: translateX(18px); }
.enlace-eliminar { display: block; margin: 1rem auto .4rem; background: none; border: 0; color: var(--bad); font-weight: 600; font-size: .9rem; min-height: 44px; }
.enlace-eliminar:disabled { opacity: .5; }
/* En la app instalada no se puede seleccionar texto de la interfaz ni hacer zoom con doble toque */
.nativo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; touch-action: manipulation; }
.nativo input, .nativo textarea, .nativo .msg-txt, .nativo .dato b { -webkit-user-select: text; user-select: text; }
/* iPhone amplía la pantalla al tocar un campo con letra de menos de 16 px: en la app los campos van a 16 px */
@supports (-webkit-touch-callout: none) { input, select, textarea { font-size: 16px; } }
/* Bajo la barra de estado (hora, batería…): el contenido se desenfoca y se oscurece poco a poco, sin franja con corte */
.nativo body::before { content: ''; position: fixed; z-index: 90; top: 0; left: 0; right: 0; height: calc(env(safe-area-inset-top) + 28px); pointer-events: none;
  background: linear-gradient(180deg, color-mix(in srgb, var(--fondo-2) 92%, transparent), color-mix(in srgb, var(--fondo-2) 55%, transparent) 60%, transparent);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent); mask-image: linear-gradient(180deg, #000 55%, transparent); }
/* Detrás de la barra de pestañas: mismo difuminado hacia abajo */
#shell::after { content: ''; position: fixed; z-index: 9; left: 0; right: 0; bottom: 0; height: calc(env(safe-area-inset-bottom) + 96px); pointer-events: none;
  background: linear-gradient(0deg, color-mix(in srgb, var(--bg) 70%, transparent), transparent);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(0deg, #000 35%, transparent); mask-image: linear-gradient(0deg, #000 35%, transparent); }
.teclado #shell::after { display: none; }

/* ---------- Marca de la empresa (app de una empresa de la red) ---------- */
.login-logo.marca { width: 150px; background: #fff; border-radius: 22px; padding: 10px 12px; filter: none; box-shadow: 0 10px 30px -8px rgba(0,0,0,.45); }
.colabora { display: inline-flex; align-items: center; gap: .45rem; margin-top: 1rem; padding: .35rem .8rem .35rem .4rem; border-radius: 999px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); color: rgba(255,255,255,.85); font-size: .78rem; font-weight: 600; }
.colabora img { width: 24px; height: 24px; object-fit: contain; }
.colabora b { letter-spacing: .05em; color: #fff; }
.colabora.claro { background: var(--surface-2); border-color: var(--border); color: var(--muted); }
.colabora.claro b { color: var(--text); }
.hero-top .brand img.marca { background: #fff; border-radius: 9px; padding: 2px; filter: none; }
.aviso-pantalla .login-logo.marca { width: 110px; }
/* App nativa con el teclado abierto: sin barra de pestañas y con el chat más corto, para que se vea lo que se escribe */
.teclado .tabbar { display: none; }
.teclado .chat { height: calc(100vh - var(--teclado, 0px) - 200px - env(safe-area-inset-top)); min-height: 120px; }
/* Con el teclado abierto la pantalla no se encoge: se deja el hueco a mano.
   Página: espacio extra abajo para que el último campo pueda subir por encima del teclado.
   Paneles (cambiar contraseña, subir documento…): se apoyan justo encima del teclado y caben en lo que queda. */
.teclado #shell, .teclado .login { padding-bottom: var(--teclado, 0px); }
.teclado .modal-bg { padding-bottom: var(--teclado, 0px); transition: padding-bottom .25s ease-out; }
.teclado .modal { max-height: calc(100vh - var(--teclado, 0px) - env(safe-area-inset-top) - 12px); }
.modal-bg { transition: padding-bottom .2s ease-out; }
.modal { overscroll-behavior: contain; }

/* Modo oscuro: mis mensajes con el color de la marca (el azul marino no se distingue del fondo) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .msg.yo { background: var(--brand); color: var(--brand-ink, #fff); } }
:root[data-theme="dark"] .msg.yo { background: var(--brand); color: var(--brand-ink, #fff); }

/* ---------- Sistema de color 60-30-10 ----------
   60 % neutro (fondos y tarjetas), 30 % azul marino de la marca (cabecera, iconos, textos fuertes),
   10 % naranja de la marca SOLO para lo que hay que tocar (botón principal, pestaña activa, aviso).
   Los verdes y rojos solo se usan para estados (hecho / error). En la app de una empresa de la red,
   --navy y --brand salen de su color, así que la regla se cumple igual. */
:root { --tinta: var(--navy, #0f2140); --tinta-suave: color-mix(in srgb, var(--tinta) 7%, var(--surface)); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --tinta: var(--text); --tinta-suave: var(--surface-2); } }
:root[data-theme="dark"] { --tinta: var(--text); --tinta-suave: var(--surface-2); }

/* Iconos: todos del mismo tono marino sobre gris muy suave, sin arcoíris */
.tone-info, .tone-violet, .tone-ok, .tone-accent, .tone-brand { background: var(--tinta-suave); color: var(--tinta); }
.accion .ico { background: var(--tinta-suave); color: var(--tinta); }
.accion { font-weight: 600; color: var(--text); }

/* Cabecera: el nombre en blanco (el naranja se reserva para acciones) y brillo más discreto */
.hero h1 { font-weight: 750; }
.hero h1 em { color: #fff; }
.hero::after { opacity: .45; }
.hero .estado { font-weight: 550; }

/* Tarjetas de «pendiente»: sin franjas de colores; la acción principal (naranja) es lo que destaca */
.pet::before { display: none; }
.pet { box-shadow: 0 1px 2px rgba(15,33,64,.05), 0 8px 24px -14px rgba(15,33,64,.18); }
.pet-tipo { color: var(--muted); }

/* Etiquetas y contadores: neutras; las de estado (ok / warn / bad) siguen con su color */
.tag.info, .tag.brand, .tag.marca, .tag.violet { background: var(--tinta-suave); color: var(--tinta); }
.section-title .tag.accent { background: var(--brand); color: var(--brand-ink); }

/* Barra de progreso y pestaña activa */
.expediente .barra i { background: var(--brand); box-shadow: none; }
.tabbar a.active { color: var(--tinta); font-weight: 750; }
.tabbar a.active .tab-ico { color: var(--brand); }

/* ---------- Repaso de espacios (nada pegado a los bordes) ---------- */
/* Accesos rápidos: mismo tamaño de siempre; el icono en el naranja exacto del logo de ATRYASOL (#E85801) */
.accion .ico { background: color-mix(in srgb, var(--logo-naranja) 16%, transparent); color: var(--logo-naranja); }
/* Cabecera de tarjeta (título + botón) separada del contenido */
.card > .spread { gap: .75rem; margin-bottom: .35rem; }
.card > .spread + .fila, .card > .spread + div > .dato:first-child { border-top: 0; }
.card > .spread + .fila { margin-top: .4rem; }
.fila { gap: .9rem; padding: .85rem 0; }
.fila .d { margin-top: .15rem; line-height: 1.4; }
.dato { padding: .8rem 0; align-items: baseline; }
.dato b { text-align: right; overflow-wrap: anywhere; font-weight: 600; }
.card { padding: 1.2rem 1.25rem; }
.pet { padding: 1.1rem 1.15rem; }
.pet-desc { margin-top: .7rem; line-height: 1.5; }
.section-title { margin-top: 1.6rem; }
/* Formularios en panel: más aire entre un campo y la etiqueta del siguiente */
.modal form > * + * { margin-top: .95rem; }
.modal form label { margin-bottom: .35rem; }
/* Atajos del chat (Incidencia, Pedir cita, Recomendar…): se desvanecen en el borde en vez de cortarse en seco */
.chips-gestion { -webkit-mask-image: linear-gradient(90deg, #000 82%, transparent); mask-image: linear-gradient(90deg, #000 82%, transparent); padding-right: 1.5rem; }
/* Documentos: la etiqueta «De ATRYASOL» más discreta, para que el nombre del archivo respire */
.fila > .tag { flex: none; font-size: .66rem; padding: .15rem .5rem; opacity: .85; }

/* ---------- Avisos dentro de la app: en el naranja del logo de ATRYASOL ----------
   (en la app de una empresa de la red, su segundo color de marca) */
:root { --logo-naranja: var(--resalte, #E85801); }
.tab-badge { background: var(--logo-naranja); color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--surface) 80%, transparent); }
.section-title .tag.accent { background: var(--logo-naranja); color: #fff; }
.aviso-card:not(.warn) { background: color-mix(in srgb, var(--logo-naranja) 14%, var(--surface)); border-color: color-mix(in srgb, var(--logo-naranja) 35%, transparent); }
.aviso-card:not(.warn) > .icon:first-child { color: var(--logo-naranja); }
.hero .estado .dot { background: var(--logo-naranja); }

/* ---------- El 10 % de la regla 60-30-10: el naranja exacto del logo (#E85801) en TODA la app ----------
   Botones principales, pestaña activa, enlaces, «Editar/Añadir», mis mensajes del chat, barras de progreso, foco de los campos…
   Mismos selectores que estilos.css (que se carga antes, así que este gana). La app de una empresa de la red
   pone después sus propios colores (#marca-css) y les gana a estos. */
:root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
  --brand: #E85801; --brand-hover: #F46A16; --brand-ink: #ffffff;
  --brand-soft: color-mix(in srgb, #E85801 16%, var(--surface)); --brand-text: #FF7A2E;
  --accent: #E85801; --accent-ink: #FF8A47; --accent-soft: color-mix(in srgb, #E85801 16%, var(--surface));
  --resalte: #E85801; --sombra-boton: rgba(232, 88, 1, .45); --sombra-marca: rgba(232, 88, 1, .45);
  --brillo: rgba(232, 88, 1, .2); --brillo-fuerte: rgba(232, 88, 1, .45);
}

/* ---------- Tarjeta «Recomiéndanos» ----------
   Es la ÚNICA tarjeta entera de color de toda la app: sobre el fondo marino, el naranja del logo en degradado
   (complementario del azul) es lo que más contrasta, así que el ojo va directo a ella. Botón blanco con texto naranja
   (el inverso del resto de botones) para que se distinga como la acción especial de la pantalla. */
.card.recomienda {
  position: relative; overflow: hidden; margin-top: 1.4rem; border: 0; color: #fff; padding: 1.35rem 1.3rem 1.3rem;
  background:
    radial-gradient(260px 180px at 100% 0%, rgba(255,255,255,.28), transparent 70%),
    linear-gradient(140deg, color-mix(in srgb, var(--brand) 85%, #ffb066) 0%, var(--brand) 45%, color-mix(in srgb, var(--brand) 70%, #5a1400) 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 18px 40px -18px var(--sombra-boton), 0 0 0 1px rgba(255,255,255,.08);
}
.card.recomienda::after { content: ""; position: absolute; right: -50px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; border: 28px solid rgba(255,255,255,.08); pointer-events: none; }
.recomienda-ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: .8rem;
  background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.3); box-shadow: inset 0 1px 0 rgba(255,255,255,.4); color: #fff; }
.card.recomienda h2 { color: #fff; font-size: 1.15rem; line-height: 1.3; margin: 0 0 .35rem; position: relative; }
.card.recomienda p { color: rgba(255,255,255,.88); font-size: .9rem; margin: 0 0 1rem; position: relative; }
.recomienda-btn { position: relative; display: inline-flex; align-items: center; gap: .35rem; min-height: 46px; padding: 0 1.2rem;
  background: #fff; color: var(--brand); border: 0; font-weight: 750; box-shadow: 0 8px 20px -8px rgba(0,0,0,.45); }
.recomienda-btn:hover { background: #fff; filter: brightness(.97); }
.recomienda-btn:active { transform: scale(.97); }

/* Documentos: la etiqueta «De ATRYASOL» (documentos que manda la empresa) en el naranja del logo */
.fila > .tag.info { opacity: 1; background: color-mix(in srgb, var(--brand) 18%, transparent); color: var(--brand-text);
  border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }

/* =====================================================================
   Mejoras de la app (15/11/2026)
   ===================================================================== */

/* Sin MAYÚSCULAS: títulos de sección y tipo de petición en letra normal, más elegantes */
.section-title { text-transform: none; letter-spacing: -.01em; font-size: 1.02rem; font-weight: 700; color: var(--text); margin-left: 2px; }
.pet-tipo { text-transform: none; letter-spacing: 0; font-size: .8rem; font-weight: 600; }

/* Cabecera más baja */
.hero { padding-top: calc(.9rem + env(safe-area-inset-top)); }
.hero h1 { margin-top: .8rem; font-size: 1.6rem; }
.hero .sub { font-size: .9rem; line-height: 1.4; max-width: 34ch; }

/* Barra compacta al bajar (el título grande se encoge en una barra de cristal) */
.barra-top { position: fixed; z-index: 40; top: 0; left: 0; right: 0; padding: calc(env(safe-area-inset-top) + .55rem) 16px .6rem;
  text-align: center; font-weight: 700; font-size: .95rem; color: var(--text); pointer-events: none;
  background: color-mix(in srgb, var(--bg) 72%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  opacity: 0; transform: translateY(-8px); transition: opacity .2s, transform .2s; }
.compacta .barra-top { opacity: 1; transform: none; }
.teclado .barra-top { display: none; }

/* Deslizar para actualizar */
.tirar { position: fixed; z-index: 45; left: 50%; top: calc(env(safe-area-inset-top) + 6px); width: 38px; height: 38px; margin-left: -19px;
  display: grid; place-items: center; border-radius: 50%; color: var(--brand); pointer-events: none;
  background: color-mix(in srgb, var(--surface) 85%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  box-shadow: 0 6px 18px -6px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.15);
  opacity: calc(var(--d, 0px) / 70px); transform: translateY(calc(var(--d, 0px) - 50px)) rotate(calc(var(--d, 0px) * 3)); }
.tirar.listo { color: #fff; background: var(--brand); }
.tirar.girando { opacity: 1; transform: translateY(14px); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: translateY(14px) rotate(360deg); } }

/* Tu ahorro */
.card.ahorro { position: relative; overflow: hidden; margin-top: 1rem; }
.card.ahorro::before { content: ""; position: absolute; inset: 0; background: radial-gradient(240px 140px at 100% 0%, color-mix(in srgb, var(--ok) 16%, transparent), transparent 70%); pointer-events: none; }
.ahorro-top { display: flex; align-items: center; gap: .5rem; font-weight: 650; color: var(--text-2); font-size: .9rem; position: relative; }
.ahorro-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); }
.ahorro-cifra { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; color: var(--ok); margin: .5rem 0 .8rem; position: relative; }
.ahorro-cifra small { font-size: .95rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ahorro-comp { display: grid; gap: .45rem; position: relative; }
.ahorro-comp > div { display: grid; grid-template-columns: 3.6rem 1fr auto; align-items: center; gap: .6rem; font-size: .85rem; }
.ahorro-comp span { color: var(--muted); }
.ahorro-comp i { height: 10px; border-radius: 6px; background: var(--border-strong); display: block; }
.ahorro-comp .ahora i { background: var(--ok); }
.ahorro-pie { margin-top: .85rem; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .88rem; color: var(--text-2); position: relative; }
.ahorro-pie b { color: var(--text); }

/* Aviso de fin de contrato */
.aviso-card.fin-contrato { align-items: flex-start; }
.aviso-card.fin-contrato .btn-sm { margin-top: .7rem; }

/* Proyecto: barra de pasos que se puede tocar y botones de pie */
.fases-btn { display: block; width: 100%; background: none; border: 0; padding: 0; min-height: 0; border-radius: 6px; box-shadow: none; }
.fases-btn:hover { background: none; }
.proyecto-pie { display: flex; gap: .5rem; margin-top: .9rem; flex-wrap: wrap; }
.pie-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 38px; padding: 0 .9rem; font-size: .84rem; font-weight: 600;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.pie-btn:hover { background: var(--surface-3, var(--surface-2)); }
.pie-btn .icon { color: var(--brand); }
.pie-btn .cuenta { background: var(--brand); color: #fff; border-radius: 999px; font-size: .7rem; padding: 0 .4rem; line-height: 1.5; font-weight: 750; }
.pasos { list-style: none; margin: 0; padding: 0; }
.pasos li { display: flex; gap: .8rem; padding: .7rem 0; position: relative; }
.pasos li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 2.6rem; bottom: -.3rem; width: 2px; background: var(--border); }
.pasos li.hecho:not(:last-child)::after { background: var(--brand); }
.paso-ico { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700;
  border: 2px solid var(--border-strong); color: var(--muted); background: var(--surface); position: relative; z-index: 1; }
.pasos li.hecho .paso-ico { background: var(--brand); border-color: var(--brand); color: #fff; }
.pasos li.ahora .paso-ico { border-color: var(--brand); color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 22%, transparent); }
.pasos li > div { display: flex; flex-direction: column; justify-content: center; min-height: 32px; }
.pasos li > div span { font-size: .84rem; color: var(--muted); margin-top: .1rem; }
.pasos li.luego b { color: var(--muted); font-weight: 550; }

/* Pantallas vacías */
.card.vacio { text-align: center; padding: 1.8rem 1.4rem; display: flex; flex-direction: column; align-items: center; gap: .3rem; margin-top: 1rem; }
.vacio-ico { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 20px; margin-bottom: .5rem;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); }
.vacio-ico .icon { width: 28px; height: 28px; }
.card.vacio b { font-size: 1.05rem; }
.card.vacio p { color: var(--muted); font-size: .9rem; margin: .1rem 0 .9rem; max-width: 30ch; line-height: 1.45; }
.chat-vacio { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: .35rem; color: var(--muted); font-size: .88rem; max-width: 28ch; }
.chat-vacio .icon { width: 34px; height: 34px; color: var(--brand); margin-bottom: .3rem; }
.chat-vacio b { color: var(--text); font-size: 1rem; }

/* Bloques de carga */
.skel-chat { display: flex; flex-direction: column; gap: .7rem; padding: .5rem 0; }
.skel-chat .skel { height: 52px; width: 70%; border-radius: 18px; }
.skel-chat .skel.yo { align-self: flex-end; width: 55%; }

/* Chat: clip para adjuntar, «leído» y horario */
.chat-adjuntar { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; color: var(--muted); cursor: pointer; margin: 0; }
.chat-adjuntar:active { background: var(--surface-2); }
.msg-visto { margin-left: .45rem; opacity: .8; }
.msg-visto.si { opacity: 1; font-weight: 700; }
.horario { display: flex; align-items: center; gap: .4rem; color: var(--muted); font-size: .84rem; margin: -.4rem 0 .8rem; }

/* Datos ocultos (DNI) */
.dato-oculto { display: inline-flex; align-items: center; gap: .3rem; }
.ver-btn { width: 32px; height: 32px; min-height: 0; padding: 0; display: grid; place-items: center; border-radius: 50%; background: none; border: 0; color: var(--muted); box-shadow: none; }
.ver-btn:hover { background: var(--surface-2); }

/* Tu renta */
.renta-resumen { display: grid; grid-template-columns: 1.3fr 1fr; gap: .6rem; margin-bottom: .6rem; }
.renta-resumen > div { background: var(--surface-2); border-radius: 14px; padding: .8rem .9rem; display: flex; flex-direction: column; gap: .15rem; }
.renta-resumen span { font-size: .78rem; color: var(--muted); }
.renta-resumen b { font-size: 1.25rem; letter-spacing: -.02em; }
.renta-resumen small { font-size: .75rem; color: var(--text-2); }
.renta-prox { background: color-mix(in srgb, var(--brand) 14%, var(--surface)) !important; }
.renta-prox b { color: var(--brand-text); }
.renta-cert { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }

/* Firma */
.firma-zona { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); background: #fff; }
.firma-zona canvas { display: block; width: 100%; height: 190px; touch-action: none; }
.firma-linea { position: absolute; left: 1rem; right: 1rem; bottom: 2.2rem; border-top: 1px dashed #b8bfcc; color: #8a93a6; font-size: .78rem; padding-top: .3rem; pointer-events: none; }
#firma-borrar { margin-top: .6rem; }

/* Cita: días y horas */
.cita-dias { display: flex; gap: .5rem; overflow-x: auto; padding: .2rem 0 .4rem; scrollbar-width: none; }
.cita-dias::-webkit-scrollbar { display: none; }
.cita-dia { flex: none; width: 62px; min-height: 0; padding: .55rem 0; display: flex; flex-direction: column; align-items: center; gap: .05rem; border-radius: 16px;
  background: var(--surface-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; }
.cita-dia small { font-size: .68rem; color: var(--muted); text-transform: capitalize; }
.cita-dia b { font-size: 1.2rem; }
.cita-dia.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cita-dia.on small { color: rgba(255,255,255,.85); }
.cita-horas { display: grid; grid-template-columns: repeat(4, 1fr); gap: .45rem; }
.cita-hora { min-height: 42px; padding: 0; border-radius: 12px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); box-shadow: none; font-weight: 600; }
.cita-hora.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.cita-ok { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .35rem; padding: .4rem 0 1.1rem; }
.cita-ok .icon { width: 40px; height: 40px; color: var(--brand); margin-bottom: .3rem; }
.cita-ok b { font-size: 1.05rem; }
.cita-ok span { color: var(--muted); font-size: .88rem; }

/* Recomendar */
.recomienda-premio { position: relative; display: inline-flex; align-items: center; gap: .45rem; margin: -.3rem 0 1rem; padding: .4rem .75rem; border-radius: 999px;
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3); font-size: .85rem; font-weight: 650; }
.premio-caja { display: flex; gap: .8rem; align-items: center; padding: .9rem 1rem; border-radius: 16px; margin-bottom: 1rem;
  background: color-mix(in srgb, var(--brand) 15%, var(--surface)); border: 1px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.premio-caja > .icon { width: 28px; height: 28px; color: var(--brand); flex: none; }
.premio-caja b { display: block; }
.premio-caja span { font-size: .88rem; color: var(--text-2); }
.compartir { display: grid; gap: .5rem; }
.o-separador { display: flex; align-items: center; gap: .7rem; color: var(--muted); font-size: .8rem; margin: 1.1rem 0 .3rem; }
.o-separador::before, .o-separador::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.mis-recomendados { margin-top: .4rem; }
.mis-recomendados > b { display: block; margin-bottom: .2rem; }

/* Factura leída */
.aviso-leido { display: flex; gap: .55rem; align-items: center; padding: .75rem .9rem; border-radius: 14px; margin-bottom: .9rem; font-size: .88rem; font-weight: 600;
  background: var(--ok-soft); color: var(--ok); }

/* ---------- Presentación de bienvenida (la primera vez que se abre la app) ---------- */
.intro { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; color: #fff; overflow: hidden;
  background: radial-gradient(520px 340px at 80% 8%, var(--brillo), transparent 62%),
              radial-gradient(420px 300px at 10% 95%, var(--brillo), transparent 60%),
              linear-gradient(165deg, var(--fondo-1) 0%, var(--fondo-2) 55%, var(--fondo-3) 100%); }
.intro.saliendo { animation: intro-fuera .45s cubic-bezier(.4,0,.2,1) forwards; }
@keyframes intro-fuera { to { opacity: 0; transform: scale(1.04); } }
.intro-saltar { position: absolute; z-index: 2; top: calc(12px + env(safe-area-inset-top)); right: 14px; background: rgba(255,255,255,.1) !important;
  color: rgba(255,255,255,.85) !important; border: 1px solid rgba(255,255,255,.14) !important; padding: .45rem .95rem; font-size: .85rem; min-height: 0;
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.intro-pistas { flex: 1; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.intro-pistas::-webkit-scrollbar { display: none; }
.intro-pag { flex: 0 0 100%; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: calc(4rem + env(safe-area-inset-top)) 28px 1rem; max-width: 100vw; box-sizing: border-box; }
.intro-pag h1 { color: #fff; font-size: 1.85rem; line-height: 1.15; margin: 1.6rem 0 .6rem; letter-spacing: -.01em; }
.intro-pag p { color: rgba(255,255,255,.74); font-size: 1.02rem; line-height: 1.5; margin: 0; max-width: 340px; }
.intro-pag > * { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.intro-pag.activa > * { opacity: 1; transform: none; }
.intro-pag.activa > h1 { transition-delay: .12s; }
.intro-pag.activa > p { transition-delay: .22s; }
.intro-pag.activa > .intro-botones { transition-delay: .34s; }
.intro-botones { width: 100%; max-width: 360px; display: flex; flex-direction: column; gap: .7rem; margin-top: 1.8rem; }
.intro-botones .btn-invitado { color: #fff; border-color: rgba(255,255,255,.28); }
.intro-pie { display: flex; align-items: center; justify-content: space-between; padding: 1rem 24px calc(1.4rem + env(safe-area-inset-bottom)); }
.intro-puntos { display: flex; gap: 7px; }
.intro-puntos i { width: 7px; height: 7px; border-radius: 99px; background: rgba(255,255,255,.28); transition: width .35s ease, background .35s ease; }
.intro-puntos i.on { width: 24px; background: var(--brand); }
.intro-sig { min-height: 44px; padding: 0 1.4rem; box-shadow: 0 8px 24px -8px var(--sombra-boton); transition: opacity .3s; }
.intro.ultima .intro-sig { opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .3s, visibility 0s .3s; }

/* Dibujos animados de cada página */
.intro-arte { position: relative; width: 210px; height: 210px; display: grid; place-items: center; }
.arte-sol .halo { position: absolute; inset: 18px; border-radius: 50%; background: radial-gradient(circle, var(--brillo-fuerte), var(--brillo) 55%, transparent 70%); animation: latido 3.2s ease-in-out infinite; }
.arte-sol .rayos { position: absolute; inset: 0; border-radius: 50%; animation: girar 22s linear infinite;
  background: repeating-conic-gradient(from 0deg, rgba(245,166,35,.38) 0 4deg, transparent 4deg 22.5deg);
  -webkit-mask: radial-gradient(circle, transparent 46%, #000 47%, #000 66%, transparent 67%); mask: radial-gradient(circle, transparent 46%, #000 47%, #000 66%, transparent 67%); }
.intro-logo { position: relative; width: 112px; height: auto; filter: drop-shadow(0 10px 28px var(--sombra-marca)); animation: flotar 4s ease-in-out infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
@keyframes latido { 50% { transform: scale(1.08); opacity: .8; } }
@keyframes flotar { 50% { transform: translateY(-8px); } }

.factura { position: relative; width: 120px; height: 150px; border-radius: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16);
  padding: 22px 16px; box-sizing: border-box; display: flex; flex-direction: column; gap: 12px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.factura i { height: 8px; border-radius: 9px; background: rgba(255,255,255,.22); }
.factura i:nth-child(2) { width: 70%; } .factura i:nth-child(3) { width: 45%; }
.factura b { position: absolute; right: -26px; bottom: 18px; background: var(--brand); color: #fff; border-radius: 99px; padding: .4rem .75rem; font-size: 1.05rem;
  box-shadow: 0 10px 26px -6px var(--sombra-boton); transform: scale(0) rotate(-12deg); }
.intro-pag.activa .factura b { animation: sello .7s .5s cubic-bezier(.3,1.6,.5,1) forwards; }
.arte-factura .flecha { position: absolute; left: 22px; top: 40px; width: 18px; height: 70px; border-radius: 9px; background: linear-gradient(#22c55e, transparent); opacity: 0; }
.intro-pag.activa .arte-factura .flecha { animation: bajar 1.8s .9s ease-in-out infinite; }
@keyframes sello { to { transform: scale(1) rotate(-6deg); } }
@keyframes bajar { 0% { opacity: 0; transform: translateY(-14px); } 40% { opacity: .9; } 100% { opacity: 0; transform: translateY(30px); } }

.arte-placas .panel { display: grid; grid-template-columns: repeat(3, 44px); gap: 5px; transform: perspective(380px) rotateX(38deg); margin-top: 60px; }
.arte-placas .panel i { height: 32px; border-radius: 5px; background: linear-gradient(135deg, #1e3a8a, #0f1f4d); border: 1px solid rgba(147,197,253,.35); position: relative; overflow: hidden; }
.arte-placas .panel i::after { content: ''; position: absolute; inset: 0; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.45) 50%, transparent 70%); transform: translateX(-120%); }
.intro-pag.activa .arte-placas .panel i::after { animation: brillo 2.6s ease-in-out infinite; }
.arte-placas .panel i:nth-child(2)::after, .arte-placas .panel i:nth-child(5)::after { animation-delay: .15s; }
.arte-placas .panel i:nth-child(3)::after, .arte-placas .panel i:nth-child(6)::after { animation-delay: .3s; }
.sol-mini { position: absolute; top: 8px; right: 26px; width: 54px; height: 54px; border-radius: 50%; background: radial-gradient(circle, #ffe3a3, var(--resalte, var(--brand)) 65%);
  box-shadow: 0 0 40px 10px rgba(245,166,35,.45); animation: latido 3s ease-in-out infinite; }
@keyframes brillo { 0%, 30% { transform: translateX(-120%); } 70%, 100% { transform: translateX(120%); } }

.nave { position: relative; margin-top: 40px; }
.tejado { display: grid; grid-template-columns: repeat(4, 36px); gap: 4px; padding: 6px; background: #4b5563; border-radius: 6px 6px 0 0; transform: perspective(300px) rotateX(30deg); }
.tejado i { height: 22px; border-radius: 3px; background: linear-gradient(135deg, #1e3a8a, #0f1f4d); border: 1px solid rgba(147,197,253,.3); transform: scale(0); }
.intro-pag.activa .tejado i { animation: aparece .45s cubic-bezier(.3,1.5,.5,1) forwards; }
.intro-pag.activa .tejado i:nth-child(2) { animation-delay: .12s; } .intro-pag.activa .tejado i:nth-child(3) { animation-delay: .24s; } .intro-pag.activa .tejado i:nth-child(4) { animation-delay: .36s; }
.muro { height: 62px; background: linear-gradient(#d1d5db, #9ca3af); border-radius: 0 0 4px 4px; margin: 0 6px; }
.moneda { position: absolute; top: 12px; left: 50%; width: 38px; height: 38px; margin-left: -19px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe08a, #f5a623);
  color: #7c4a03; font-weight: 800; display: grid; place-items: center; box-shadow: 0 6px 18px -4px rgba(245,166,35,.6); opacity: 0; }
.moneda.m2 { margin-left: 18px; }
.intro-pag.activa .moneda { animation: subir 2.4s .7s ease-out infinite; }
.intro-pag.activa .moneda.m2 { animation-delay: 1.5s; }
@keyframes aparece { to { transform: scale(1); } }
@keyframes subir { 0% { opacity: 0; transform: translateY(40px) scale(.6); } 25% { opacity: 1; } 100% { opacity: 0; transform: translateY(-30px) scale(1); } }

.movil { position: relative; width: 104px; height: 186px; border-radius: 26px; border: 3px solid rgba(255,255,255,.4); background: rgba(255,255,255,.06);
  padding: 30px 12px; box-sizing: border-box; display: flex; flex-direction: column; gap: 9px; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.movil i { height: 22px; border-radius: 8px; background: rgba(255,255,255,.14); }
.movil i:first-child { background: var(--brand); opacity: .85; }
.burbuja { position: absolute; right: -48px; top: 60px; background: #fff; color: #0a1628; font-weight: 700; font-size: .85rem; border-radius: 16px 16px 16px 4px;
  padding: .45rem .7rem; box-shadow: 0 10px 24px -8px rgba(0,0,0,.5); transform: scale(0); transform-origin: left bottom; }
.intro-pag.activa .burbuja { animation: sello .6s .5s cubic-bezier(.3,1.6,.5,1) forwards; }
@media (prefers-reduced-motion: reduce) { .intro *, .intro *::after { animation: none !important; transition: none !important; }
  .factura b, .tejado i, .burbuja { transform: none; } .moneda { opacity: 1; } }

/* ---------- Acceso: «Soy nuevo» / «Ya soy cliente» ---------- */
.acceso-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.acceso-tabs button { position: relative; z-index: 1; background: transparent !important; color: var(--muted) !important; border: 0 !important; min-height: 40px;
  font-weight: 600; box-shadow: none !important; transition: color .25s; }
.acceso-tabs button.on { color: var(--brand-ink) !important; }
.acceso-tabs-fondo { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 999px; background: var(--brand);
  box-shadow: 0 6px 18px -6px var(--sombra-boton); transition: transform .35s cubic-bezier(.3,1.3,.5,1); }
.acceso-tabs[data-modo="login"] .acceso-tabs-fondo { transform: translateX(100%); }
.acceso-form { display: flex; flex-direction: column; gap: .85rem; animation: entra-form .35s ease; }
@keyframes entra-form { from { opacity: 0; transform: translateY(8px); } }
.acceso-intro { margin: 0; }
.fila-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.chips-interes { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .35rem; }
.chips-interes button { background: var(--surface-2) !important; color: var(--text) !important; border: 1px solid var(--border) !important; min-height: 36px;
  padding: 0 .85rem; font-size: .86rem; box-shadow: none !important; }
.chips-interes button.on { background: var(--brand-soft) !important; border-color: var(--brand) !important; color: var(--brand-text) !important; }
.trampa { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.acceso-pie { margin: .2rem 0 0; }
.login-card .enlace-claro { align-self: center; }
.intro-saltar { transition: opacity .3s; } .intro.ultima .intro-saltar { opacity: 0; pointer-events: none; }

/* ---------- Bienvenida y acceso: detalles (28/11/2026) ---------- */
/* Logo de una empresa de la red: en su cápsula blanca, como en la cabecera */
.intro-logo.marca { width: 150px; background: #fff; border-radius: 24px; padding: 12px 14px; filter: none; box-shadow: 0 14px 34px -10px rgba(0,0,0,.55); }
/* Sin registro (la empresa no lo ha activado en el CRM): solo «Entrar» y «Quiero que me llaméis» */
.sin-registro .acceso-tabs, .sin-registro #i-registro { display: none; }
.login:not(.sin-registro) #l-contacto { display: none; }
/* Contraseña con botón para verla */
.campo-clave { position: relative; }
.campo-clave input { padding-right: 48px; width: 100%; box-sizing: border-box; }
.ver-clave { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; min-height: 0; padding: 0;
  display: grid; place-items: center; background: none !important; border: 0 !important; box-shadow: none !important; color: var(--muted) !important; }
/* Seguridad de la contraseña nueva */
.fuerza-clave { height: 4px; border-radius: 4px; background: var(--surface-3); margin-top: .45rem; overflow: hidden; }
.fuerza-clave i { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .3s, background .3s; }
.fuerza-clave[data-nivel="baja"] i { width: 30%; background: var(--bad); }
.fuerza-clave[data-nivel="media"] i { width: 65%; background: var(--warn, #f5a623); }
.fuerza-clave[data-nivel="alta"] i { width: 100%; background: var(--ok); }
/* Texto de las páginas de la presentación: que no quede pegado a los bordes en móviles estrechos */
.intro-pag p { text-wrap: pretty; }
.intro-pag h1 { text-wrap: balance; }
/* Más contraste en los dibujos sobre fondos azules (apps de marca) */
.arte-placas .panel i { border-color: rgba(255,255,255,.45); box-shadow: 0 6px 14px -6px rgba(0,0,0,.6); background: linear-gradient(135deg, #1d3a7a, #0b1838); }
.factura b { color: var(--brand-ink); }
/* Enlaces de texto dentro de la tarjeta de acceso (no son botones de color) */
.login-card .enlace-claro { background: none !important; border: 0 !important; box-shadow: none !important; color: var(--brand-text) !important;
  font-weight: 600; font-size: .9rem; min-height: 44px; padding: 0 .5rem; }
