/* ===== Base ===== */
* { box-sizing: border-box; }
html, body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Raleway", sans-serif;
  background: #000;
  color: #fff;
}

/* ===== Video de fondo ===== */
.video-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.32) contrast(1.05);
  z-index: -1;
}

/* ===== Contenedor central ===== */
.center-wrapper {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1rem;
}

/* ===== Tarjeta ===== */
.login-container {
  width: 100%;
  max-width: 440px;
  background: rgba(0,0,0,0.82);
  border: 1px solid rgba(106,210,223,0.28);
  border-radius: 16px;
  padding: 1.8rem 1.4rem;
  text-align: center;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35), 0 0 18px rgba(106,210,223,0.12) inset;
}

.login-container img {
  width: 100px;
  margin-bottom: 0.6rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
}

.login-container h1 {
  margin: 0.3rem 0 0.2rem;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: .2px;
}

.login-container .intro {
  margin: 0 0 1.1rem 0;
  color: #d9f1f4;
  font-size: 0.98rem;
}

/* ===== Formulario ===== */
form {
  width: 100%;
  margin: 0 auto;
  text-align: left;
}

.field { margin-bottom: 0.9rem; }

label {
  display: block;
  font-weight: 600;
  color: #bfe9ee;
  margin-bottom: 0.35rem;
  letter-spacing: 0.2px;
}

input {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(20,20,20,0.66);
  color: #fff;
  outline: none;
  font-size: 1rem;
  box-shadow: 0 2px 8px rgba(106,210,223,0.07);
  transition: border-color .2s, background .2s, box-shadow .2s;
}

input::placeholder { color: #9fb3b7; }

input:focus {
  border-color: #6ad2df;
  background: #181a1be6;
  box-shadow: 0 0 0 3px rgba(106,210,223,0.18);
}

.error {
  display: block;
  min-height: 1em;
  color: #ff8aa0;
  font-size: 0.86rem;
  margin-top: 0.28rem;
}

/* ===== Botón ===== */
button[type="submit"] {
  width: 100%;
  margin-top: 0.2rem;
  border: none;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  font-weight: 800;
  letter-spacing: .3px;
  cursor: pointer;
  background: #6ad2df;
  color: #121212;
  transition: background .18s, transform .1s, box-shadow .18s;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
button[type="submit"]:hover { background: #21a7b6; }
button[type="submit"]:active { transform: scale(0.99); }
button[type="submit"]:focus-visible { outline: 2px solid #6ad2df; outline-offset: 2px; }

/* Spinner dentro del botón */
.btn-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
button.loading .btn-text { opacity: 0.35; }
button.loading .btn-spinner { display: inline-block; }

/* ===== Ayuda / Estado ===== */
.help-msg {
  text-align: center;
  margin: 0.8rem 0 0;
  color: #cfd6d7;
  font-size: 0.95rem;
}
.help-msg a {
  color: #6ad2df;
  text-decoration: none;
  font-weight: 700;
}
.help-msg a:hover { color: #21a7b6; text-decoration: underline; }

.status {
  text-align: center;
  margin-top: 0.7rem;
  font-size: 0.98rem;
  color: #d9f1f4;
  min-height: 1.2em;
}

/* ===== Link volver ===== */
.volver {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  margin-top: 0.9rem;
  color: #e6f8fb;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
}
.volver:hover { color: #6ad2df; }

/* ===== Responsive ===== */
@media (max-width: 520px) {
  .login-container {
    padding: 1.2rem 0.9rem 1.2rem;
    max-width: 92vw;
  }
  .login-container h1 { font-size: 1.38rem; }
  .intro { font-size: 0.95rem; }
}
