@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap");

/* =========================================================================
   Base — reset, tipografía, foco, alertas y utilidades.
   Depende de tokens.css (variables). No define componentes de página.
   ========================================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  
}

body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-sans);
}

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

button {
  cursor: pointer;
}

img {
  max-width: 100%;
}

/* ------------------------------ Foco visible ----------------------------- */
:focus-visible {
  outline: 2px solid var(--gray-900);
  outline-offset: 2px;
}

/* ------------------------------- Tipografía ------------------------------ */
h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.page-title {
  font-size: var(--text-xl);
  line-height: 1.2;
  color: var(--gray-900);
}

.page-description {
  margin: 0;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.eyebrow {
  margin: 0 0 var(--space-2);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* -------------------------------- Alertas -------------------------------- */
.alert {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  width: 100%;
  max-width: 760px;
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  line-height: 1.45;
  background: var(--surface);
}

.alert::before {
  content: "";
  width: 6px;
  height: 100%;
  min-height: 20px;
  border-radius: var(--radius-pill);
  background: currentColor;
  opacity: 0.9;
  flex-shrink: 0;
}

.alert-success { color: var(--success); background: var(--success-bg); border-color: var(--success-border); }
.alert-error,
.alert-danger  { color: var(--danger);  background: var(--danger-bg);  border-color: var(--danger-border); }
.alert-warning { color: var(--warning); background: var(--warning-bg); border-color: var(--warning-border); }
.alert-info    { color: var(--info);    background: var(--info-bg);    border-color: var(--info-border); }

.login-wrapper .alert {
  width: min(100%, 420px);
  margin: 0 auto var(--space-4);
}

/* Mensaje de error general de formulario (no asociado a un campo). */
.message {
  margin-bottom: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-md);
  color: var(--danger);
  background: var(--danger-bg);
  font-size: var(--text-sm);
}

/* ------------------------------- Utilidades ------------------------------ */
/* Enlace para saltar al contenido (teclado / lectores de pantalla). */
.skip-link {
  position: absolute;
  top: -100%;
  left: var(--space-3);
  z-index: 2000;
  padding: var(--space-2) var(--space-3);
  color: var(--gray-0);
  background: var(--gray-900);
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-3);
}

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

/* Respeto por la preferencia de movimiento reducido. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
  }
}