:root {
  --fondo: #f4f4f3;
  --superficie: #ffffff;
  --borde: #e0e0de;
  --texto: #2a2a2a;
  --texto-2: #595959;
  --texto-3: #787878;
  --oro: #a8822f;
  --oro-claro: #c9a54c;
  --oro-oscuro: #7d5f1f;
  --error: #a3402c;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--fondo);
  color: var(--texto);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- portada privada (Toño, 09/11/2026) ----------
   Solo la marca y una foto: a la izquierda el negro-gris de la barra del sistema con el logo de HEMI y a la derecha la
   foto con un velo negro del 30 %. En el celular, la marca va en una barra arriba y la foto abajo. */
.privada {
  position: fixed;
  inset: 0;
  display: grid;
  grid-template-columns: 47fr 53fr;
  touch-action: manipulation;          /* los 5 toques del acceso no hacen zoom */
  -webkit-user-select: none;
  user-select: none;
}
.privada-marca { display: grid; place-items: center; background: #1C1C1E; }
.privada-marca img { display: block; width: clamp(170px, 16vw, 250px); height: auto; }
.privada-foto {
  background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .3)), url("/cliente/img/portada.webp") center / cover no-repeat;
}

@media (max-width: 760px) {
  .privada { grid-template-columns: 1fr; grid-template-rows: 96px 1fr; }
  .privada-marca img { width: 112px; }
  .privada-foto {
    background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .3)),
      image-set(url("/cliente/img/portada-900.webp") 1x, url("/cliente/img/portada.webp") 2x) center / cover no-repeat;
  }
}

/* ---------- acceso oculto ----------
   Proporciones tomadas del diseño de referencia (tarjeta de 640 × 1287).
   Todo dentro de la tarjeta se mide en cqw (1cqw = 1% de su ancho), así
   tamaños y espacios se conservan a cualquier escala. */
.velo {
  position: fixed;
  inset: 0 0 0 47vw;          /* solo sobre la foto: la marca de la izquierda queda nítida */
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 16px;
  /* Desenfoque tipo Cupertino detrás de la tarjeta (material de Apple: oscurece poco y satura) */
  background: rgba(28, 28, 30, .22);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  backdrop-filter: blur(20px) saturate(180%);
  animation: aparecer .25s ease-out;
}
.velo[hidden] { display: none; }

.acceso {
  container-type: inline-size;
  width: min(380px, calc(53vw - 32px), calc((100svh - 32px) * 0.4973));   /* cabe sobre la foto (en el celular, ver abajo) */
  aspect-ratio: 640 / 1287;
  background: #f6f6f5;
  border-radius: 28px;
  box-shadow: 0 40px 90px rgba(40, 40, 40, .16), 0 0 0 1px rgba(201, 165, 76, .12);
  overflow: hidden;
}
@media (max-width: 760px) {
  .velo { inset: 96px 0 0; }   /* debajo de la barra de la marca */
  .acceso { width: min(380px, calc(100vw - 32px), calc((100svh - 96px - 32px) * 0.4973)); }
}

.acceso-cuerpo {
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: 19.8cqw 8.6cqw 0;
  border-radius: 7.5cqw;
}

/* El logo de HEMI arriba y el nombre del sistema al pie de la tarjeta */
.acceso-logo {
  align-self: center;
  flex: none;
  width: 60cqw;
  margin-bottom: 13cqw;
}
.acceso-logo img { display: block; width: 100%; height: auto; }
.acceso-sistema {
  margin: auto 0 8cqw;
  text-align: center;
  font-size: 3.4cqw;
  letter-spacing: .04em;
  color: var(--texto-3);
}
.acceso-sistema strong { color: var(--oro); font-weight: 600; letter-spacing: .12em; }

.campo {
  flex: none;
  height: 21.6cqw;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.9cqw;
  padding: 0 4.4cqw;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 5.9cqw;
  box-shadow: 0 2.5cqw 7cqw rgba(40, 40, 40, .06);
  cursor: text;
  transition: border-color .15s, box-shadow .15s;
}
.campo + .campo { margin-top: 9.1cqw; }
.campo:focus-within {
  border-color: rgba(184, 145, 59, .45);
  box-shadow: 0 2.5cqw 7cqw rgba(40, 40, 40, .08), 0 0 0 3px rgba(201, 165, 76, .14);
}

.campo-titulo {
  font-size: 4.7cqw;
  font-weight: 500;
  line-height: 1.2;
  color: #404040;
}

.campo-fila {
  display: flex;
  align-items: center;
  gap: 2.2cqw;
}
.campo-fila > svg {
  flex: none;
  width: 4.2cqw;
  height: 4.2cqw;
  fill: none;
  stroke: #8a8a8a;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.campo input {
  flex: 1;
  min-width: 0;
  font: inherit;
  font-size: 3.9cqw;
  line-height: 1.3;
  color: var(--texto);
  background: transparent;
  border: 0;
  padding: 0;
  outline: none;
}
.campo input::placeholder {
  color: #b3b3b1;
  letter-spacing: .25em;
}

.ojo {
  flex: none;
  display: grid;
  place-items: center;
  width: 8cqw;
  height: 8cqw;
  margin: -2cqw 0;
  padding: 0;
  color: #8a8a8a;
  background: none;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: color .15s, background .15s;
}
.ojo:hover { color: var(--oro); background: rgba(201, 165, 76, .1); }
.ojo:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 1px; }
.ojo svg {
  width: 4.6cqw;
  height: 4.6cqw;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ojo .ojo-cerrado,
.ojo[aria-pressed="true"] .ojo-abierto { display: none; }
.ojo[aria-pressed="true"] .ojo-cerrado { display: block; }

/* Entrar y Verificar en el oscuro de la marca HEMI (el de la barra lateral y «Nueva orden» del sistema) */
.entrar {
  flex: none;
  height: 13.75cqw;
  margin-top: 9.1cqw;
  font: inherit;
  font-size: 4.7cqw;
  font-weight: 700;
  color: #fff;
  background: #1C1C1E;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, transform .15s;
}
.entrar:hover { background: #2C2C2E; }
.entrar:active { transform: translateY(1px); }
.entrar:disabled { background: #8e8e93; cursor: default; }
.entrar:focus-visible { outline: 2px solid #1C1C1E; outline-offset: 3px; }

.acceso-enlaces {
  display: flex;
  justify-content: flex-end;
  margin-top: 8.6cqw;
  padding: 0 1.7cqw 0 0;
}
.olvide {
  font: inherit;
  font-size: 3.4cqw;
  color: #666666;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.olvide:hover { color: var(--oro-oscuro); text-decoration: underline; }
.olvide:focus-visible { outline: 2px solid var(--oro-claro); outline-offset: 2px; }

.aviso {
  margin: 6cqw 0 0;
  font-size: 3.3cqw;
  line-height: 1.4;
  text-align: center;
  color: var(--error);
}

@keyframes aparecer { from { opacity: 0; } }

/* ---------- verificación en dos pasos (en la misma tarjeta) ---------- */
.acceso-cuerpo[hidden], .acceso-paso .campo[hidden], .paso-qr[hidden] { display: none; }
.acceso-paso { padding-top: 12cqw; overflow-y: auto; }
.paso-titulo { margin: 0; font-size: 6cqw; font-weight: 700; line-height: 1.2; color: #2a2a2a; text-align: center; }
.paso-texto { margin: 3cqw 0 6cqw; font-size: 3.6cqw; line-height: 1.45; color: #555; text-align: center; }
.paso-alta { display: grid; justify-items: center; gap: 2cqw; margin-bottom: 6cqw; }
.paso-alta[hidden] { display: none; }
.paso-qr { width: 56cqw; height: 56cqw; padding: 2.5cqw; background: #fff; border-radius: 4cqw; box-shadow: 0 2.5cqw 7cqw rgba(40, 40, 40, .08); }
.paso-nota { margin: 2cqw 0 0; font-size: 3.2cqw; color: #666; text-align: center; }
.paso-secreto { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 3.6cqw; letter-spacing: .06em; color: #2a2a2a;
  text-align: center; user-select: all; word-break: break-word; }
.acceso-paso .campo input { letter-spacing: .3em; font-variant-numeric: tabular-nums; }
.paso-recordar { display: flex; align-items: center; gap: 2.4cqw; margin-top: 5cqw; font-size: 3.5cqw; color: #444; cursor: pointer; }
.paso-recordar[hidden] { display: none; }
.paso-recordar input { width: 4.4cqw; height: 4.4cqw; accent-color: #b8913b; }
.paso-codigos { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4cqw 5cqw; margin: 0 0 2cqw; padding: 5cqw 6cqw; list-style: none;
  font-family: ui-monospace, Consolas, monospace; font-size: 4cqw; color: #2a2a2a; background: #fff; border-radius: 5cqw;
  box-shadow: 0 2.5cqw 7cqw rgba(40, 40, 40, .06); user-select: all; }
.paso-codigos[hidden] { display: none; }
.paso-enlaces { justify-content: space-between; gap: 4cqw; }
.paso-enlaces .olvide[hidden] { display: none; }
