:root {
  --navy: #233559;
  --brand: #0c2955;
  --gold: #c79b3b;
  --gold-light: #e3bf70;
  --gold-soft: #fbf7ed;
  --muted: #60666e;
  --border: #9fa4aa;
  --white: #fff;
  font-family: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color: var(--navy);
  background: var(--white);
  font-synthesis: none;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button, a, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: var(--brand); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #2177c9; outline-offset: 4px; }

.ventana { min-height: 100svh; }
.panel-marca { display: none; }
.columna-forma {
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px 96px;
  background: var(--white);
}
.acceso { width: 100%; max-width: 320px; text-align: center; }
.marca {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 42px;
  padding: 7px 15px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
}
.marca img { width: 24px; height: 28px; object-fit: contain; filter: brightness(0) invert(1); }
h1 { margin: 16px 0 0; font-size: 24px; font-weight: 700; line-height: 1.5; }
.presentacion { max-width: 240px; margin: 0 auto 16px; font-size: 12px; font-weight: 400; line-height: 1.5; color: var(--muted); }

.pestanas { display: flex; gap: 4px; margin: 24px 0 0; border-bottom: 1px solid #e5e7eb; }
.pestana {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border-radius: 7px 7px 0 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  border-bottom: 2px solid transparent;
}
.pestana.activa { color: var(--brand); background: var(--gold-soft); border-bottom-color: var(--gold); font-weight: 600; }
.pestana:hover { color: var(--brand); background: #f7f9fc; }
.field-group { margin: 0 0 20px; }
.field-label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.field-wrap { display: flex; align-items: center; position: relative; }
.field-wrap input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  color: var(--navy);
  padding: 0 43px 0 51px;
  font-size: 14px;
  font-weight: 300;
  transition: border-color .15s, box-shadow .15s;
}
.field-wrap input::placeholder { color: #60666e; opacity: 1; }
.field-wrap input:focus { outline: none; border-color: #2362a7; box-shadow: 0 0 0 3px #e5eff9; }
.field-icon { position: absolute; left: 10px; display: flex; align-items: center; height: 24px; padding-right: 9px; color: #717980; border-right: 1px solid #a8adb2; pointer-events: none; }
.eye-toggle { position: absolute; right: 1px; top: 0; width: 42px; height: 44px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #717980; }
.eye-toggle:hover { color: var(--brand); }
.eye-slash { display: none; }
.eye-toggle[aria-pressed="true"] .eye-slash { display: block; }
.recuperacion { min-height: 20px; margin: 2px 0 16px; text-align: left; font-size: 12px; line-height: 1.65; color: var(--muted); }
.recuperacion a { text-decoration: none; }
.recuperacion a:hover { text-decoration: underline; }
.aviso-clave strong { color: var(--navy); font-weight: 500; }
.btn-submit { width: 100%; min-height: 42px; border: 0; border-radius: 8px; color: #fff; background: var(--brand); box-shadow: inset 0 -2px 0 var(--gold); font-size: 14px; font-weight: 600; transition: background .15s; }
.btn-submit:hover { background: #17437b; }
.btn-submit:disabled { background: #a3aab9; color: #fff; cursor: default; }
.acceso-nota { margin: 20px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.error-block { margin: 0 0 18px; border: 1px solid #f2c5c5; border-radius: 8px; background: #fff4f4; padding: 12px; color: #a62424; text-align: left; font-size: 13px; line-height: 1.5; }

.ayuda { position: fixed; right: 22px; bottom: 22px; z-index: 5; }
.ayuda summary { display: flex; align-items: center; justify-content: flex-end; gap: 9px; min-height: 44px; list-style: none; font-size: 11px; color: var(--muted); cursor: pointer; }
.ayuda summary::-webkit-details-marker { display: none; }
.ayuda-icono { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--brand); color: #fff; }
.ayuda-contenido { position: absolute; bottom: 58px; right: 0; width: min(360px, calc(100vw - 32px)); max-height: min(600px, calc(100svh - 100px)); overflow-y: auto; padding: 24px; background: #fff; border: 1px solid #e1e6ed; border-radius: 16px; box-shadow: 0 10px 40px #0c295526; }
.ayuda-intro { margin: 0 0 18px; font-size: 13px; line-height: 1.6; }
.pie-cols { display: grid; gap: 20px; }
.pie-titulo { color: var(--navy); font-size: 12px; font-weight: 700; }
.pie-col p { margin: 7px 0 0; font-size: 12px; line-height: 1.7; color: var(--muted); }
.pie-redes { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; }
.pie-redes a, .pie-docs a { font-size: 12px; line-height: 1.8; }
.pie-docs { margin: 6px 0 0; padding-left: 16px; }
.pie-legal { padding-top: 20px; margin-top: 20px; border-top: 1px solid #e5e7eb; font-size: 10px; color: var(--muted); }

@media (min-width: 900px) {
  .ventana.partida { display: grid; grid-template-columns: 1fr 1fr; padding: 16px; gap: 32px; background: #fff; }
  .panel-marca { display: block; min-height: calc(100svh - 32px); position: relative; overflow: hidden; border-radius: 12px; background: #173765; }
  .galeria { position: absolute; inset: 0; }
  .galeria-foto { position: absolute; inset: 0; opacity: 0; visibility: hidden; transition: opacity .45s ease, visibility .45s ease; }
  .galeria-foto.visible { opacity: 1; visibility: visible; }
  .galeria-foto img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
  .galeria-foto::after { content: ''; position: absolute; inset: 0; background: #0a326dbf; }
  .panel-alto { position: absolute; top: 10%; left: 7%; right: 6%; border-left: 2px solid var(--gold-light); padding-left: 16px; color: #fff; }
  .panel-overline { margin: 0 0 6px; font-size: 15px; line-height: 1.5; font-weight: 300; text-transform: uppercase; }
  .panel-nombre { margin: 0; max-width: 410px; font-size: 32px; line-height: 1.2; font-weight: 700; }
  .panel-bajo { position: absolute; left: 4%; right: 4%; bottom: 6%; z-index: 1; color: #fff; }
  .panel-rotulo { margin: 0 0 72px; font-size: clamp(18px, 2.2vw, 26px); font-weight: 500; letter-spacing: .2em; opacity: .6; }
  .panel-sede { margin: 0; font-size: clamp(36px, 4.8vw, 64px); font-weight: 600; line-height: 1.1; opacity: .6; }
  .galeria-flecha { position: absolute; top: 50%; margin-top: -25px; width: 44px; height: 50px; display: grid; place-items: center; border: 0; background: transparent; color: #0099ff; }
  .galeria-flecha svg { width: 40px; height: 48px; }
  .galeria-flecha.anterior { left: 3px; }
  .galeria-flecha.anterior svg { transform: rotate(180deg); }
  .galeria-flecha.siguiente { right: 3px; }
  .galeria-puntos { position: absolute; bottom: 5px; left: 0; right: 0; display: flex; justify-content: center; }
  .galeria-puntos button { width: 28px; height: 32px; border: 0; padding: 0; background: transparent; display: grid; place-items: center; }
  .galeria-puntos span { width: 7px; height: 7px; border-radius: 50%; background: #ffffff70; }
  .galeria-puntos button[aria-current="true"] span { background: #0099ff; }
  .columna-forma { min-height: calc(100svh - 32px); padding: 42px 24px 86px; }
}

@media (max-width: 380px) {
  .columna-forma { padding-inline: 20px; }
  .marca { font-size: 18px; }
  .field-wrap input { font-size: 16px; }
  .ayuda { right: 16px; bottom: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
