/* FINDLEY MEDICAL · Inicio de la app (inicio-app.html). Diseño «Final» aprobado el 28/11/2026. */
:root { --tinta: #0B1F33; --gris: #5b6b7f; --linea: #e3e9f1; --suave: #F4F7FB; --azul: #155eef; --teal: #14b8a6; --verde: #0f8a5f; --rojo: #b4232f;
  --sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif; --arriba: env(safe-area-inset-top, 0px); --abajo: env(safe-area-inset-bottom, 0px); }
* { box-sizing: border-box; }
html, body { margin: 0; background: #fff; color: var(--tinta); font-family: var(--sans); -webkit-tap-highlight-color: transparent; }
body { overscroll-behavior-y: none; }
button, input { font: inherit; color: inherit; }
a { color: var(--azul); }
[hidden] { display: none !important; }
.ai-oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

.ai { max-width: 520px; margin: 0 auto; min-height: 100vh; position: relative; }
.ai-pant { padding: calc(18px + var(--arriba)) 20px calc(118px + var(--abajo)); animation: aiEntra .22s ease; }
@keyframes aiEntra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* Cabecera */
.ai-cab { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; }
.ai-cab-der { display: flex; gap: 10px; align-items: center; }
.ai-logo { display: flex; flex-direction: column; line-height: .86; font-weight: 800; letter-spacing: -.03em; font-size: 20px; }
.ai-logo b { color: var(--tinta); }
.ai-logo i { font-style: normal; padding-left: 10px; background: linear-gradient(90deg, var(--azul), var(--teal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ai-ico { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--linea); background: #fff; color: var(--rojo); display: grid; place-items: center; }
.ai-avatar { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--tinta); color: #fff; font-weight: 800; font-size: 15px; cursor: pointer; }
.ai-cab-titulo h1 { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.ai-btn-chico { height: 40px; display: inline-flex; align-items: center; padding: 0 14px; border-radius: 12px; background: var(--azul); color: #fff; text-decoration: none; font-weight: 800; font-size: 14px; }

.ai-hola { margin: 22px 0 2px; color: var(--gris); font-size: 15px; font-weight: 500; }
.ai-h1 { margin: 0; font-size: 29px; line-height: 1.12; font-weight: 800; letter-spacing: -.03em; }

/* Tarjeta de salud */
.ai-tarjeta { margin-top: 18px; border-radius: 26px; padding: 18px 20px; color: #fff; position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px;
  background: linear-gradient(135deg, #0f3fbf 0%, #155eef 55%, #14a9b8 100%); box-shadow: 0 20px 40px rgba(21, 94, 239, .26); }
.ai-tarjeta::before, .ai-tarjeta::after { content: ""; position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.2); pointer-events: none; }
.ai-tarjeta::before { width: 220px; height: 220px; right: -70px; top: -96px; }
.ai-tarjeta::after { width: 150px; height: 150px; right: -34px; top: -62px; border-color: rgba(255,255,255,.15); }
.ai-tj-arriba { display: flex; justify-content: space-between; align-items: center; font-size: 11px; font-weight: 700; letter-spacing: .14em; color: #dbe7ff; }
.ai-tj-arriba svg { width: 34px; height: 20px; color: #fff; }
.ai-tj-nombre { font-size: 22px; font-weight: 800; letter-spacing: -.02em; position: relative; }
.ai-tj-datos { font-size: 13px; color: #dbe7ff; margin-top: 3px; }
.ai-tj-datos button { background: none; border: 0; padding: 0; color: #fff; text-decoration: underline; font-weight: 700; cursor: pointer; }
.ai-tj-cita { position: relative; display: flex; align-items: center; gap: 12px; background: #fff; color: var(--tinta); text-decoration: none; border-radius: 16px; padding: 10px 12px; border: 0; width: 100%; text-align: left; cursor: pointer; }
.ai-tj-cita > span:first-child { width: 36px; height: 36px; border-radius: 12px; background: #e8f0ff; color: var(--azul); display: grid; place-items: center; }
.ai-tj-cita svg { width: 18px; height: 18px; }
.ai-tj-cita em { font-style: normal; display: flex; flex-direction: column; flex: 1; min-width: 0; }
.ai-tj-cita em small { font-size: 12px; color: var(--gris); }
.ai-tj-cita em b { font-size: 14px; }
.ai-pildora { font-size: 12px; font-weight: 800; color: #0d7a72; background: #dcf7f3; border-radius: 999px; padding: 5px 10px; white-space: nowrap; }
.ai-tj-entrar { position: relative; height: 48px; border-radius: 14px; border: 0; background: #fff; color: var(--azul); font-weight: 800; font-size: 15px; cursor: pointer; }

/* Cuéntame */
.ai-cuentame { margin-top: 14px; background: var(--suave); border: 1px solid var(--linea); border-radius: 22px; padding: 8px 8px 8px 16px; display: flex; align-items: center; gap: 10px; }
.ai-cuentame-txt { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ai-cuentame input { border: 0; outline: none; background: transparent; font-size: 16px; font-weight: 700; padding: 4px 0; min-width: 0; -webkit-appearance: none; }
.ai-cuentame input::placeholder { color: var(--tinta); opacity: 1; }
.ai-cuentame small { font-size: 12px; color: var(--gris); }
.ai-cuentame button { width: 46px; height: 46px; border-radius: 16px; border: 0; background: var(--tinta); color: #fff; display: grid; place-items: center; cursor: pointer; }

/* Tu día */
.ai-fila { margin-top: 20px; display: flex; align-items: center; justify-content: space-between; }
.ai-fila h2 { margin: 0; font-size: 16px; font-weight: 800; }
.ai-link { background: none; border: 0; color: var(--azul); font-weight: 700; font-size: 13px; cursor: pointer; padding: 8px 0; }
.ai-dia { margin-top: 6px; display: flex; flex-direction: column; gap: 8px; }
.ai-toma { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--linea); border-radius: 16px; background: #fff; width: 100%; text-align: left; cursor: pointer; min-height: 52px; }
.ai-toma .ai-check { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #cfd8e3; display: grid; place-items: center; flex-shrink: 0; }
.ai-toma[aria-pressed="true"] .ai-check { background: #dff5ec; border-color: #dff5ec; color: var(--verde); }
.ai-toma .ai-check svg { width: 14px; height: 14px; stroke-width: 3; }
.ai-toma b { flex: 1; font-size: 14px; }
.ai-toma[aria-pressed="true"] b { color: var(--gris); text-decoration: line-through; }
.ai-toma small { font-size: 12px; font-weight: 700; color: var(--azul); }
.ai-toma[aria-pressed="true"] small { color: var(--gris); }
.ai-vacio { border: 1px dashed #cfd8e3; border-radius: 16px; padding: 14px; font-size: 14px; color: var(--gris); line-height: 1.45; }

.ai-rapidos { margin-top: 12px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ai-rapidos a { min-height: 48px; border-radius: 14px; border: 1px solid var(--linea); color: var(--tinta); text-decoration: none; font-weight: 700; font-size: 13px; display: grid; place-items: center; text-align: center; padding: 6px; line-height: 1.2; }
.ai-rapidos a.ai-rojo { border: 0; background: #fdecee; color: var(--rojo); font-weight: 800; }

/* Listas (citas, recetas) */
.ai-sec { margin: 22px 0 10px; font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--gris); }
.ai-cita { border: 1px solid var(--linea); border-radius: 20px; padding: 14px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; background: #fff; }
.ai-cita-arriba { display: flex; align-items: center; gap: 12px; }
.ai-ini { width: 48px; height: 48px; border-radius: 15px; background: #e8f0ff; color: var(--azul); display: grid; place-items: center; font-weight: 800; font-size: 16px; flex-shrink: 0; overflow: hidden; }
.ai-ini img { width: 100%; height: 100%; object-fit: cover; }
.ai-cita-arriba .ai-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ai-cita-arriba .ai-txt b { font-size: 15px; }
.ai-cita-arriba .ai-txt small { font-size: 12px; color: var(--gris); }
.ai-estado { align-self: flex-start; }
.ai-estado { font-size: 11px; font-weight: 800; border-radius: 999px; padding: 4px 9px; background: var(--suave); color: var(--gris); white-space: nowrap; }
.ai-estado.ok { background: #dff5ec; color: var(--verde); } .ai-estado.az { background: #e8f0ff; color: var(--azul); } .ai-estado.am { background: #fff4d6; color: #8a5a00; }
.ai-cita-botones { display: flex; gap: 8px; }
.ai-cita-botones a { flex: 1; min-height: 44px; border-radius: 14px; display: grid; place-items: center; text-decoration: none; font-weight: 800; font-size: 14px; border: 1px solid var(--linea); color: var(--tinta); }
.ai-cita-botones a.ai-prim { background: var(--azul); color: #fff; border: 0; }

.ai-rx { background: #fff; border-radius: 24px; overflow: hidden; box-shadow: 0 14px 34px rgba(11, 31, 51, .08); border: 1px solid var(--linea); margin-bottom: 14px; }
.ai-rx-cab { background: linear-gradient(135deg, #0f3fbf 0%, #155eef 55%, #14a9b8 100%); color: #fff; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; }
.ai-rx-cab .ai-logo { font-size: 15px; } .ai-rx-cab .ai-logo b { color: #fff; } .ai-rx-cab .ai-logo i { background: none; color: #bff5ee; }
.ai-rx-cab small { font-size: 11px; font-weight: 700; letter-spacing: .12em; color: #dbe7ff; }
.ai-rx-meta { padding: 12px 16px 4px; display: flex; justify-content: space-between; font-size: 12px; color: var(--gris); gap: 10px; }
.ai-rx-med { display: flex; gap: 12px; padding: 10px 16px; }
.ai-rx-med i { width: 30px; height: 30px; border-radius: 10px; background: #e8f0ff; color: var(--azul); display: grid; place-items: center; font-style: normal; font-weight: 800; font-size: 13px; flex-shrink: 0; }
.ai-rx-med span { display: flex; flex-direction: column; gap: 2px; } .ai-rx-med b { font-size: 15px; } .ai-rx-med small { font-size: 13px; color: var(--gris); }
.ai-rx-pie { margin: 6px 16px 0; border-top: 2px dashed #dfe7f1; padding: 10px 0 14px; display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--gris); }
.ai-rx-pie .vig { color: var(--verde); font-weight: 700; } .ai-rx-pie .ven { color: var(--rojo); font-weight: 700; }
.ai-rx > a { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; margin: 0 12px 12px; border-radius: 16px; background: var(--tinta); color: #fff; text-decoration: none; font-weight: 800; font-size: 15px; }

/* Familia / tarjeta */
.ai-form { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.ai-campo { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: var(--gris); }
.ai-campo input, .ai-campo select { height: 52px; border-radius: 14px; border: 1.5px solid var(--linea); padding: 0 14px; font-size: 16px; font-weight: 600; color: var(--tinta); background: #fff; width: 100%; }
.ai-campo input:focus, .ai-campo select:focus { outline: 3px solid #b9d3ff; border-color: var(--azul); }
.ai-tel { display: flex; align-items: center; border: 1.5px solid var(--linea); border-radius: 14px; overflow: hidden; }
.ai-tel b { padding: 0 12px; color: var(--tinta); font-size: 16px; }
.ai-tel input { border: 0 !important; outline: none !important; border-radius: 0; padding-left: 0; }
.ai-codigo { letter-spacing: .5em; text-align: center; font-size: 24px !important; font-weight: 800 !important; }
.ai-btn { height: 56px; border-radius: 18px; border: 0; background: var(--azul); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; width: 100%; }
.ai-btn:disabled { opacity: .6; }
.ai-btn-borde { height: 50px; border-radius: 16px; border: 1px solid var(--linea); background: #fff; color: var(--tinta); font-weight: 700; font-size: 15px; cursor: pointer; width: 100%; }
.ai-miembro { display: flex; align-items: center; gap: 12px; border: 1px solid var(--linea); border-radius: 16px; padding: 10px 12px; }
.ai-miembro .ai-txt { flex: 1; display: flex; flex-direction: column; } .ai-miembro small { color: var(--gris); font-size: 12px; }
.ai-miembro button { background: none; border: 0; color: var(--rojo); font-weight: 700; cursor: pointer; min-height: 40px; }
.ai-nota { font-size: 13px; color: var(--gris); line-height: 1.5; }
.ai-error { margin: 0; color: #a12020; background: #fde4e4; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }
.ai-ok { margin: 0; color: var(--verde); background: #dff5ec; border-radius: 12px; padding: 10px 12px; font-size: 14px; font-weight: 600; }

/* Hoja: entrar */
.ai-hoja-fondo { position: fixed; inset: 0; z-index: 50; background: rgba(4, 17, 31, .5); display: flex; align-items: flex-end; justify-content: center; }
.ai-hoja { background: #fff; width: 100%; max-width: 520px; border-radius: 28px 28px 0 0; padding: 12px 22px calc(26px + var(--abajo)); display: flex; flex-direction: column; gap: 12px; animation: aiSube .25s ease; }
@keyframes aiSube { from { transform: translateY(40px); opacity: .5; } to { transform: none; opacity: 1; } }
.ai-asa { align-self: center; width: 40px; height: 5px; border-radius: 3px; background: #dfe7f1; }
.ai-hoja h2 { margin: 4px 0 0; font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.ai-hoja > p { margin: 0; color: var(--gris); font-size: 14px; line-height: 1.5; }

/* Barra de abajo */
.ai-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(255, 255, 255, .97); border-top: 1px solid #edf1f6; display: flex; justify-content: space-around; align-items: flex-start;
  padding: 10px 6px calc(10px + var(--abajo)); max-width: 520px; margin: 0 auto; }
.ai-barra button { background: none; border: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; color: #6b7a8c; font-size: 11px; font-weight: 600; min-width: 58px; min-height: 48px; cursor: pointer; }
.ai-barra button[aria-current="page"] { color: var(--azul); font-weight: 800; }
.ai-barra .ai-centro { width: 60px; height: 60px; min-width: 60px; border-radius: 22px; background: linear-gradient(135deg, var(--azul), var(--teal)); color: #fff; display: grid; place-items: center;
  margin-top: -28px; box-shadow: 0 12px 26px rgba(21, 94, 239, .35); border: 4px solid #fff; }
.ai-barra .ai-centro svg { width: 26px; height: 26px; stroke-width: 2; }
.ai-barra .ai-centro[aria-current="page"] { color: #fff; }

/* Escáner dentro de la app */
.ai-pant-escaner #donde-duele { margin-top: 14px; }
.ai-pant-escaner #donde-duele .ex-rejilla { grid-template-columns: minmax(0, 1fr); margin-top: 14px; }
