/* Páginas públicas (login, consentimiento, activación). Tokens en brand/brand.css. */

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { font-size: 106.25%; } /* 17 px: algo más grande que el default, para leer sin zoom */
body {
  background: var(--ns-bg);
  color: var(--ns-text);
  font: 400 1rem/1.55 var(--ns-font);
  -webkit-font-smoothing: antialiased;
}

/* Diseño: panel de marca + columna del formulario */
.layout { display: grid; grid-template-columns: minmax(320px, 42%) 1fr; min-height: 100vh; }

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 48px;
  color: #FFFFFF;
  background: linear-gradient(160deg, var(--ns-teal) 0%, #0B5F78 55%, var(--ns-navy) 100%);
}
/* Recurso gráfico del brandbook: módulos del isotipo en contorno blanco, ampliados. */
.brand-panel::after {
  content: "";
  position: absolute;
  right: -12%;
  bottom: -10%;
  width: 78%;
  aspect-ratio: 49.6 / 66.6;
  background: url("../brand/isotipo-outline-white.bc626f859b66.svg") no-repeat center / contain;
  opacity: 0.35;
  pointer-events: none;
}
.brand-panel .logo { width: 200px; height: auto; position: relative; z-index: 1; }
.brand-copy { position: relative; z-index: 1; max-width: 26rem; }
.brand-copy .tagline { margin: 0 0 12px; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ns-teal-50); }
.brand-copy h2 { margin: 0; font-size: 2rem; line-height: 1.2; font-weight: 800; }
.brand-copy p { margin: 12px 0 0; color: var(--ns-teal-50); }

.content { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.card {
  width: 100%;
  max-width: 480px;
  padding: 36px 32px;
  background: var(--ns-card);
  border: 1px solid var(--ns-border);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(25, 33, 61, 0.08);
}
.card .logo-mobile { display: none; width: 150px; height: auto; margin-bottom: 24px; }

/* Encabezado al estilo del brandbook: etiqueta teal + título navy + subrayado corto */
.eyebrow { margin: 0 0 6px; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ns-accent); }
h1 { margin: 0 0 18px; font-size: 1.6rem; line-height: 1.25; font-weight: 700; color: var(--ns-heading); }
h1::after { content: ""; display: block; width: 40px; height: 3px; margin-top: 12px; border-radius: 2px; background: var(--ns-teal); }

p { margin: 0 0 14px; }
a { color: var(--ns-link); }
strong { color: var(--ns-heading); }
.muted, .helptext { color: var(--ns-muted); font-size: 0.9rem; }
.field-help { margin: 6px 0 0; font-size: 0.82rem; }
.after-form { margin-top: 18px; }
code { font-size: 0.85em; word-break: break-all; }

/* Formularios */
label { display: block; margin: 18px 0 6px; font-weight: 600; font-size: 0.92rem; color: var(--ns-heading); }
input[type=text], input[type=password], input[type=email] {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--ns-border);
  border-radius: 10px;
  background: var(--ns-card);
  color: var(--ns-text);
  font: inherit;
}
input:focus-visible, button:focus-visible, a:focus-visible { outline: 3px solid var(--ns-focus); outline-offset: 2px; }

button, .button {
  display: inline-block;
  margin-top: 24px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  background: var(--ns-button-bg);
  color: var(--ns-button-fg);
  font: 700 1rem var(--ns-font);
  text-decoration: none;
  cursor: pointer;
}
button:hover, .button:hover { background: var(--ns-button-hover); }
form > button[type=submit]:only-of-type { width: 100%; }
button.secondary { background: transparent; color: var(--ns-heading); border: 1px solid var(--ns-border); }
button.secondary:hover { background: var(--ns-bg); }
button.link { margin: 0; padding: 0; background: none; border: 0; color: var(--ns-link); font: inherit; text-decoration: underline; }
button.link:hover { background: none; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
.actions button { flex: 1 1 140px; }

.errorlist { margin: 8px 0 0; padding: 10px 12px; list-style: none; border-radius: 8px; background: var(--ns-error-bg); color: var(--ns-error); font-size: 0.9rem; }
.warning { padding: 12px 14px; border-left: 4px solid var(--ns-lime); border-radius: 8px; background: var(--ns-bg); font-size: 0.92rem; }

/* Consentimiento */
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 8px 14px; margin: 18px 0; padding: 16px; border-radius: 12px; background: var(--ns-bg); }
.facts dt { color: var(--ns-muted); font-size: 0.9rem; }
.facts dd { margin: 0; word-break: break-word; }
.facts ul { margin: 0; padding-left: 18px; }
form.inline { margin-top: 22px; }

/* Enrolamiento MFA */
.qr { width: 220px; max-width: 100%; margin: 16px auto; padding: 10px; background: #FFFFFF; border-radius: 12px; border: 1px solid var(--ns-line); }
.qr svg { display: block; width: 100%; height: auto; }
.codes { columns: 2; padding-left: 20px; }

/* Móvil: el panel de marca se reduce a una franja */
@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; }
  .brand-panel { display: none; }
  .content { padding: 24px 16px; align-items: flex-start; }
  .card { padding: 28px 20px; border-radius: 16px; }
  .card .logo-mobile { display: block; }
}
