/* F&B Equipo · maqueta fase 0 · estilos comunes */

@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fuentes/poppins-400-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fuentes/poppins-400-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fuentes/poppins-500-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fuentes/poppins-500-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+A720-A7FF; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fuentes/poppins-600-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fuentes/poppins-600-latin-ext.woff2") format("woff2"); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+20A0-20AB, U+20AD-20C4, U+A720-A7FF; }

:root {
  /* Madrid Río: granito, agua y la banda índigo de la marca */
  --granito: #edf0ef;
  --granito-2: #e3e8e7;
  --piedra: #d3dad9;
  --piedra-2: #b9c3c2;
  --blanco: #ffffff;

  --tinta: #16213f;
  --tinta-2: #4a5470;
  --tinta-3: #5a6480;

  --indigo: #23388b;
  --indigo-hondo: #1b2c70;
  --indigo-claro: #c9d2f0;
  --indigo-tenue: #e8ecf8;

  --turquesa: #34b4b3;      /* solo lo que se pulsa y la línea de agua */
  --turquesa-2: #2aa2a1;
  --agua: #d8f1f0;
  --tinta-boton: #11204e;

  --pino: #2e6b4e;          /* firmado, hecho */
  --pino-claro: #e1efe6;
  --ladrillo: #b23f2a;      /* urgente */
  --ladrillo-claro: #f8e3dd;
  --ocre: #8a5a0b;          /* esperando */
  --ocre-claro: #fbefd6;

  --letra: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radio: 14px;
  --radio-s: 10px;
  --toque: 48px;
  --sombra: 0 1px 2px rgba(22, 33, 63, .05), 0 6px 18px rgba(22, 33, 63, .06);
  --sombra-baja: 0 -1px 2px rgba(22, 33, 63, .05), 0 -8px 24px rgba(22, 33, 63, .09);
  --suave: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scrollbar-color: var(--piedra-2) transparent;
}

body {
  margin: 0;
  font-family: var(--letra);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--tinta);
  background: var(--granito);
  caret-color: var(--indigo);
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--agua); color: var(--tinta); }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; font-weight: 600; line-height: 1.25; }
p { text-wrap: pretty; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

a { color: var(--indigo); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; border-radius: 6px; }

time, .cifra { font-variant-numeric: tabular-nums; }

.icono { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

.solo-lector {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* Aviso de maqueta */
.aviso-maqueta {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .4rem 1rem;
  font-size: .8125rem; font-weight: 500; line-height: 1.35; text-align: center;
  color: var(--ocre); background: var(--ocre-claro);
  border-bottom: 1px solid #f0dcae;
}

/* Botones */
.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: var(--toque);
  padding: .5rem 1.1rem;
  border: 1px solid transparent; border-radius: 12px;
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-align: center;
  text-decoration: none;
  transition: background-color .18s var(--suave), border-color .18s var(--suave), color .18s var(--suave), transform .12s var(--suave);
  -webkit-tap-highlight-color: transparent;
}
.boton:active:not([disabled]) { transform: translateY(1px); }
.boton--accion { background: var(--turquesa); color: var(--tinta-boton); }
.boton--accion:hover { background: var(--turquesa-2); }
.boton--normal { background: var(--blanco); color: var(--indigo); border-color: var(--piedra-2); }
.boton--normal:hover { background: var(--indigo-tenue); border-color: var(--indigo-claro); }
.boton--plano { background: transparent; color: var(--indigo); padding-inline: .75rem; }
.boton--plano:hover { background: var(--indigo-tenue); }
.boton--s { min-height: 40px; padding: .35rem .85rem; font-size: .9375rem; border-radius: 10px; }
.boton--ancho { width: 100%; }
.boton[disabled] { background: var(--granito-2); color: #737c90; border-color: transparent; cursor: not-allowed; }

/* La línea de agua: progreso con amarres (documentos, pasos del paciente) */
.cruce {
  --n: 3;
  --avance: 0;
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr));
  position: relative;
}
.cruce::before, .cruce::after {
  content: ""; position: absolute; top: 6px; height: 3px; border-radius: 2px;
  left: calc(50% / var(--n));
}
.cruce::before { right: calc(50% / var(--n)); background: var(--piedra); }
.cruce::after {
  width: calc((100% - 100% / var(--n)) * var(--avance));
  background: var(--turquesa);
  transition: width .6s var(--suave);
}
.cruce li {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  font-size: .8125rem; line-height: 1.25; color: var(--tinta-3); text-align: center;
}
.cruce li::before {
  content: ""; width: 15px; height: 15px; border-radius: 50%;
  background: var(--blanco); border: 3px solid var(--piedra-2);
  transition: background-color .3s var(--suave), border-color .3s var(--suave);
}
.cruce li.es-hecho::before { background: var(--turquesa); border-color: var(--turquesa); }
.cruce li.es-ahora { color: var(--tinta); font-weight: 600; }
.cruce li.es-ahora::before { border-color: var(--turquesa); box-shadow: 0 0 0 4px var(--agua); }
.cruce li.es-hecho { color: var(--tinta-2); }
.cruce time { display: block; font-weight: 400; color: var(--tinta-3); }

/* Avisos emergentes */
.toast {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom));
  z-index: 60;
  width: min(92vw, 460px);
  padding: .85rem 1rem;
  border-radius: 12px;
  background: var(--indigo-hondo); color: #fff;
  font-size: .9375rem; line-height: 1.4;
  box-shadow: 0 8px 28px rgba(17, 32, 78, .28);
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: transform .22s var(--suave), opacity .22s var(--suave);
}
.toast.se-ve { transform: translate(-50%, 0); opacity: 1; }
.toast b { font-weight: 600; }

/* Campos */
.campo { display: grid; gap: .35rem; }
.campo > label, .campo > .campo__titulo { font-weight: 500; font-size: .9375rem; }
.campo__ayuda { font-size: .8125rem; color: var(--tinta-3); }
.entrada {
  width: 100%; min-height: var(--toque);
  padding: .6rem .85rem;
  border: 1px solid var(--piedra-2); border-radius: var(--radio-s);
  background: var(--blanco);
  font-size: 1rem;
  transition: border-color .15s var(--suave), box-shadow .15s var(--suave);
}
.entrada::placeholder { color: #636d87; }
.entrada:hover { border-color: #9aa6a5; }
.entrada:focus { outline: none; border-color: var(--indigo); box-shadow: 0 0 0 3px var(--indigo-tenue); }
.entrada[aria-invalid="true"] { border-color: var(--ladrillo); box-shadow: 0 0 0 3px var(--ladrillo-claro); }
.error { font-size: .875rem; color: var(--ladrillo); font-weight: 500; }

.marca-check {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: .75rem .85rem; min-height: var(--toque);
  border: 1px solid var(--piedra); border-radius: var(--radio-s);
  background: var(--blanco);
  cursor: pointer;
  transition: border-color .15s var(--suave), background-color .15s var(--suave);
}
.marca-check:hover { border-color: var(--piedra-2); }
.marca-check:has(input:checked) { border-color: var(--turquesa); background: #f2fbfb; }
.marca-check input {
  flex: none; width: 22px; height: 22px; margin: .1rem 0 0;
  accent-color: var(--turquesa-2);
}
.marca-check__texto { display: grid; gap: .1rem; }
.marca-check__texto small { color: var(--tinta-3); font-size: .8125rem; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* Títulos que reciben el foco al cambiar de paso: sin anillo (el foco es para el lector de pantalla). */
[tabindex="-1"]:focus { outline: none; }
