:root {
  /* Paleta corporativa sobria */
  --primary-color: #2a49a5;        /* Botón hover / acentos */
  --secondary-color: #3157d5;      /* Botón base */
  --text-color: #ffffff;
  --muted-text: #bfc5d6;

  --error-color: #ff5a5a;

  --bg-1: #0e1221;                 /* Fondo base */
  --bg-2: #151a2e;                 /* Degradado sutil */
  --card-bg: rgba(18, 22, 39, 0.8);/* Tarjeta */
  --card-border: rgba(255,255,255,0.08);
  --input-bg: rgba(255,255,255,0.04);
  --input-border: rgba(255,255,255,0.12);

  --ring: rgba(66, 133, 244, 0.32);/* Focus ring */
}

/* Reset básico */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell,
               Noto Sans, Helvetica Neue, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text-color);
  background: radial-gradient(1200px 800px at 10% 10%, #17203e 0%, transparent 60%),
              radial-gradient(1000px 700px at 90% 20%, #13203a 0%, transparent 55%),
              linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
}

/* Sutil “glow” corporativo atrás de la tarjeta */
.background-glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
}
.background-glow::before {
  content: "";
  position: absolute;
  width: 540px; height: 540px;
  left: 50%; top: 15%;
  translate: -50% 0;
  background: radial-gradient(closest-side, rgba(63, 108, 255, 0.14), transparent 70%);
  filter: blur(20px);
}
.background-glow::after {
  content: "";
  position: absolute;
  width: 680px; height: 680px;
  left: 10%; bottom: -8%;
  background: radial-gradient(closest-side, rgba(0, 178, 255, 0.10), transparent 70%);
  filter: blur(30px);
}

/* Contenedor */
.login-container {
  width: 100%;
  max-width: 420px;
  position: relative;
  padding: 36px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(18,22,39,0.85), rgba(18,22,39,0.78));
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.45),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Borde/halo elegante */
.login-container::before {
  content: "";
  position: absolute; inset: 0;
  border-radius: 18px;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  -webkit-mask:
    linear-gradient(#000 0 0) content-box, 
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask-composite: exclude;
  pointer-events: none;
}

/* Encabezado */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}
.brand__logo {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #3f6cff, #4cc3ff);
  box-shadow: 0 8px 20px rgba(79, 140, 255, 0.25);
  font-weight: 700;
}
.brand__title {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand__title small {
  color: var(--muted-text);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.brand__title strong {
  font-size: 20px;
  font-weight: 600;
}

/* Título principal */
h2 {
  color: var(--text-color);
  margin: 10px 0 22px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: .3px;
}

/* Formulario */
.form-group { margin-bottom: 18px; }

label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted-text);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: .02em;
}

.input-wrap {
  position: relative;
}

input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  color: var(--text-color);
  font-size: 15px;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
input::placeholder { color: rgba(255,255,255,0.42); }

input:focus {
  outline: none;
  border-color: #3f6cff;
  box-shadow: 0 0 0 4px var(--ring);
  background: rgba(255,255,255,0.055);
}

/* Botón */
button {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--secondary-color);
  border: 0;
  color: var(--text-color);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 10px 20px rgba(60, 102, 255, 0.25);
}
button:hover {
  background: var(--primary-color);
  transform: translateY(-1px);
}
button:active {
  transform: translateY(0);
}

/* Mensaje de error */
.error-message {
  color: #ffd7d7;
  text-align: center;
  margin-bottom: 16px;
  background: rgba(226, 38, 38, 0.10);
  border: 1px solid rgba(255, 90, 90, 0.22);
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 13px;
}

/* Pie sutil */
.footer-note {
  margin-top: 18px;
  text-align: center;
  color: var(--muted-text);
  font-size: 12px;
  opacity: .85;
  user-select: none;
}

/* Responsive */
@media (max-width: 480px) {
  .login-container { padding: 28px; border-radius: 16px; }
  h2 { font-size: 20px; }
}
