/* ==========================================
   MAXPLAY LOGIN — 2 PASOS (ESTILO INDEX)
   - Fondo claro azul suave
   - Card blanco + sombras suaves
   - Loading overlay 2s
========================================== */

/* Reset básico */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body { height: 100%; }

body {
  font-family: "Inter", sans-serif;
  background: linear-gradient(160deg, #ebf3ff, #dce7f7);
  color: #222;
  display: flex;
  align-items: stretch;
  justify-content: center;
}

a { text-decoration: none; }

/* Layout */
.auth-layout {
  min-height: 100vh;
  width: 100%;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Card principal (solo formulario) */
.auth-card {
  width: 100%;
  max-width: 520px;
  background: rgba(255,255,255,0.86);
  border-radius: 24px;
  box-shadow: 0 24px 80px rgba(0,0,0,0.10);
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.06);
  backdrop-filter: blur(14px);
}

.auth-card__side {
  padding: 26px 24px 22px;
}

.auth-card__side--form {
  background: #fff;
}

/* Mini brand */
.brand-mini{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom: 14px;
}

.brand-mini__icon{
  width:42px;
  height:42px;
  border-radius:14px;
  background:#2563eb;
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow: 0 12px 28px rgba(37,99,235,0.25);
  font-size:18px;
}

.brand-mini__title{
  font-weight:800;
  color:#1e3a8a;
  line-height:1.05;
}

.brand-mini__subtitle{
  font-size:.82rem;
  color:#2563eb;
  opacity:.85;
  margin-top:2px;
}

/* Header */
.form-header { margin-bottom: 16px; }
.form-header h2 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #111827;
}
.form-header p {
  font-size: .9rem;
  color: #666;
  margin-top: 4px;
}

/* Alertas */
.alert {
  display: flex;
  gap: 10px;
  padding: 10px 11px;
  border-radius: 12px;
  font-size: .82rem;
  margin-bottom: 12px;
  align-items: flex-start;
  border: 1px solid rgba(0,0,0,0.06);
  background: rgba(255,255,255,0.75);
}
.alert i { margin-top: 2px; }

.alert--danger {
  background: rgba(239, 68, 68, 0.08);
  color: #991b1b;
  border: 1px solid rgba(239, 68, 68, 0.25);
}
.alert--success {
  background: rgba(34, 197, 94, 0.10);
  color: #166534;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

/* Form */
.auth-form { margin-top: 6px; }

.form-group { margin-bottom: 14px; }
.form-group label {
  display: block;
  font-size: .8rem;
  color: #555;
  margin-bottom: 6px;
}

/* Inputs */
.field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.field-wrapper input {
  width: 100%;
  padding: 12px 40px 12px 34px;
  border-radius: 12px;
  border: 1px solid rgba(0,0,0,0.10);
  background: #fff;
  color: #111827;
  font-size: .92rem;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}

.field-wrapper input::placeholder { color: #94a3b8; }

.field-wrapper input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.field-wrapper input[readonly]{
  background: #f8fafc;
}

.field-icon {
  position: absolute;
  left: 10px;
  color: #64748b;
  font-size: .9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.field-toggle {
  position: absolute;
  right: 10px;
  border: none;
  background: transparent;
  color: #64748b;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

.field-toggle:hover { color: #111827; }

/* Mini acciones debajo del correo (cambiar correo) */
.mini-actions{
  margin-top: 8px;
  font-size: .82rem;
}
.mini-actions .link-accent i{
  margin-right: 6px;
}

/* Meta */
.form-meta {
  margin: 10px 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: .82rem;
  color: #666;
}

.remember {
  display: flex;
  align-items: center;
  gap: 6px;
}
.remember input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: #2563eb;
}

/* Botón principal */
.btn-primary {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 14px 16px;
  background: #2563eb;
  color: #fff;
  font-size: 1rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 14px 34px rgba(37, 99, 235, 0.25);
  transition: transform .12s ease, box-shadow .12s ease, filter .12s ease;
}

.btn-primary:hover {
  filter: brightness(1.02);
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(37, 99, 235, 0.30);
}

.btn-primary:active {
  transform: translateY(1px) scale(0.99);
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
}

.btn-primary:disabled{
  opacity: .75;
  cursor: not-allowed;
  transform: none;
}

/* Enlaces */
.link-muted {
  color: #555;
  text-decoration: none;
}
.link-muted:hover {
  color: #111827;
  text-decoration: underline;
}

.link-accent {
  color: #2563eb;
  text-decoration: none;
  font-weight: 700;
}
.link-accent:hover { text-decoration: underline; }

.form-footer-links {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .82rem;
  color: #666;
}

/* Seguridad */
.security-hints {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px solid rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: .82rem;
  color: #666;
}
.security-hints div{
  display:flex;
  align-items:center;
  gap: 8px;
}
.security-hints i{ color:#2563eb; }

/* Footer */
.auth-footer {
  margin-top: 18px;
  font-size: .8rem;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
}
.auth-footer__dot { opacity: .6; }

/* =========================
   LOADING OVERLAY (2s)
========================= */
.loading-overlay{
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.15);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 16px;
}

.loading-overlay.show{
  display: flex;
}

.loading-card{
  width: 100%;
  max-width: 320px;
  background: rgba(255,255,255,0.92);
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 18px;
  padding: 18px 16px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.15);
  text-align: center;
}

.spinner{
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 4px solid rgba(37,99,235,0.18);
  border-top-color: rgba(37,99,235,1);
  margin: 2px auto 12px;
  animation: spin 0.9s linear infinite;
}

@keyframes spin{
  to { transform: rotate(360deg); }
}

.loading-title{
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 4px;
}

.loading-sub{
  font-size: .9rem;
  color: #555;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-card { border-radius: 18px; }
  .form-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}
