:root {
  color-scheme: light dark;
  --bg: #f4f5f7;
  --tarjeta-bg: #ffffff;
  --texto: #1a1a1a;
  --subtexto: #6b7280;
  --borde: #d1d5db;
  --primario: #2563eb;
  --primario-hover: #1d4ed8;
  --exito-bg: #dcfce7;
  --exito-texto: #166534;
  --error-bg: #fee2e2;
  --error-texto: #991b1b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--texto);
  padding: 24px;
}

.tarjeta {
  background: var(--tarjeta-bg);
  border-radius: 12px;
  padding: 32px;
  max-width: 420px;
  width: 100%;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.logo {
  display: block;
  max-width: 220px;
  width: 100%;
  height: auto;
  margin: 0 auto 20px;
}

h1 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  text-align: center;
}

.subtitulo {
  margin: 0 0 24px;
  color: var(--subtexto);
  font-size: 0.95rem;
}

.campo {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

label {
  font-size: 0.85rem;
  font-weight: 600;
}

input {
  padding: 10px 12px;
  border: 1px solid var(--borde);
  border-radius: 8px;
  font-size: 1rem;
  background: transparent;
  color: inherit;
}

input:focus {
  outline: none;
  border-color: var(--primario);
}

button {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  background: var(--primario);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--primario-hover);
}

button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.mensaje {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.9rem;
}

.mensaje.oculto {
  display: none;
}

.mensaje.exito {
  background: var(--exito-bg);
  color: var(--exito-texto);
}

.mensaje.error {
  background: var(--error-bg);
  color: var(--error-texto);
}
