:root {
  color-scheme: light dark;
  --fondo: #f7f7f8;
  --tarjeta: #ffffff;
  --borde: #d4d4d8;
  --texto: #1d1d1f;
  --suave: #6b6b70;
  --acento: #2563eb;
  --acento-texto: #ffffff;
  --error: #b91c1c;
}
@media (prefers-color-scheme: dark) {
  :root {
    --fondo: #141416; --tarjeta: #1f1f23; --borde: #3f3f46;
    --texto: #f2f2f4; --suave: #a1a1a8; --acento: #60a5fa; --acento-texto: #0b1220; --error: #f87171;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--fondo);
  color: var(--texto);
  line-height: 1.5;
}
main { max-width: 26rem; margin: 0 auto; padding: 2rem 1rem; }
.marca { text-align: center; margin-bottom: 1.5rem; }
.marca h1 { font-size: 2.5rem; margin: 0; color: var(--acento); }
.marca p { margin: 0; color: var(--suave); }
h2 { font-size: 1.25rem; margin: 0 0 .75rem; }
.tarjeta {
  display: flex; flex-direction: column; gap: .4rem;
  background: var(--tarjeta); border: 1px solid var(--borde);
  border-radius: .75rem; padding: 1.25rem;
}
label { font-weight: 600; margin-top: .5rem; }
.ayuda { font-weight: 400; color: var(--suave); }
input {
  font: inherit; width: 100%; padding: .65rem .75rem;
  border: 1px solid var(--borde); border-radius: .5rem;
  background: var(--fondo); color: var(--texto);
}
input:focus-visible { outline: 2px solid var(--acento); outline-offset: 1px; }
.clave { display: flex; gap: .5rem; }
.clave input { flex: 1; min-width: 0; }
button {
  font: inherit; cursor: pointer; border: 0; border-radius: .5rem;
  padding: .7rem 1rem; background: var(--acento); color: var(--acento-texto); font-weight: 600;
}
button[type="submit"] { margin-top: 1rem; }
button:disabled { opacity: .6; cursor: progress; }
.ver-clave, .secundario {
  background: transparent; color: var(--acento); border: 1px solid var(--borde); font-weight: 500;
}
.error { color: var(--error); margin: .5rem 0 0; }
.nota { color: var(--suave); font-size: .9rem; }
.cambiar { text-align: center; }
a { color: var(--acento); }
footer { text-align: center; margin-top: 2rem; }
