/* ============================================================
   base.css — Estilos compartidos entre todas las páginas
   ============================================================ */

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

:root {
  /* Paleta de colores */
  --bg:      #0f1117;
  --surface: #1a1d27;
  --card:    #22263a;
  --border:  #2e3350;
  --accent:  #4f8ef7;
  --accent2: #7c3aed;
  --success: #22c55e;
  --warn:    #f59e0b;
  --danger:  #ef4444;
  --text:    #e2e8f0;
  --muted:   #64748b;

  /* Colores semánticos para tarjetas de app */
  --blue-fill:   #1e3a5f;
  --blue-border: #2d5a9e;
  --green-fill:  #1a3a2a;
  --green-border:#2d6b47;
  --amber-fill:  #3a2a0a;
  --amber-border:#8a5a10;
  --coral-fill:  #4a1f1f;
  --coral-border:#b84040;
  --purple-fill:  #2a1a4a;
  --purple-border:#6d3aad;
  --teal-fill:    #0f2e2e;
  --teal-border:  #1a7a6e;

  /* Layout */
  --radius: 12px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
}

/* ── Componentes reutilizables ── */

/* Títulos con gradiente */
.gradient-title {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
}

/* Tarjeta genérica */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 560px;
}

/* Botón primario */
.btn {
  display: block;
  width: 100%;
  padding: .8rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s, transform .1s;
  margin-top: 1.25rem;
}
.btn:hover   { opacity: .9; }
.btn:active  { transform: scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

/* Campos de formulario */
.field { margin-bottom: 1rem; }
label {
  display: block;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: .35rem;
}
input[type="text"],
input[type="password"],
textarea {
  width: 100%;
  padding: .7rem .9rem;
  background: #0f1117;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: .9rem;
  transition: border-color .2s;
  resize: vertical;
}
input:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
}
.hint {
  font-size: .76rem;
  color: var(--muted);
  margin-top: .35rem;
  line-height: 1.4;
}

/* Mostrar/ocultar contraseña */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 2.8rem; }
.toggle-pass {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: .85rem;
}

/* Alertas */
.alert-error {
  background: rgba(239, 68, 68, .12);
  border: 1px solid rgba(239, 68, 68, .35);
  color: #fca5a5;
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: .88rem;
  line-height: 1.5;
}
.alert-success {
  background: rgba(34, 197, 94, .1);
  border: 1px solid rgba(34, 197, 94, .35);
  color: #86efac;
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: 1.25rem;
  font-size: .88rem;
  line-height: 1.5;
}

/* Modificador base para alertas con clases semánticas */
.alert {
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
  font-size: .9rem;
  line-height: 1.5;
}

