/* ============================================================
   TChess · Login
   ============================================================ */

.auth-wrap {
  position: relative;
  min-height: calc(100vh - 71px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 30px 20px 60px;
}

/* Decoración de fondo */
.auth-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.auth-bg__circle {
  position: absolute;
  top: 14%;
  left: 50%;
  transform: translateX(-50%);
  width: 720px;
  height: 720px;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(176,135,90,.06), transparent 62%);
  background-color: #fafaf8;
  background-image:
    linear-gradient(45deg, rgba(14,14,15,.025) 25%, transparent 25%, transparent 75%, rgba(14,14,15,.025) 75%),
    linear-gradient(45deg, rgba(14,14,15,.025) 25%, transparent 25%, transparent 75%, rgba(14,14,15,.025) 75%);
  background-size: 64px 64px;
  background-position: 0 0, 32px 32px;
  -webkit-mask-image: radial-gradient(circle at center, #000 38%, transparent 70%);
          mask-image: radial-gradient(circle at center, #000 38%, transparent 70%);
}
.auth-piece {
  position: absolute;
  height: auto;
  filter: drop-shadow(0 34px 44px rgba(17,17,20,.12));
}
.auth-piece--knight { left: 8%;  top: 40%;  width: 150px; }
.auth-piece--pawn   { left: 6%;  bottom: 2%; width: 110px; }
.auth-piece--king   { right: 6%; top: 44%;  width: 180px; }

@media (max-width: 1100px) {
  .auth-piece { display: none; }
}

/* Contenido */
.auth-content {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 460px;
  text-align: center;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: .92rem;
  font-weight: 500;
  margin-bottom: 28px;
  transition: color .15s ease;
}
.auth-back:hover { color: var(--ink); }

.auth-title {
  font-size: clamp(2.2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -.03em;
  margin: 0 0 12px;
}
.auth-subtitle {
  color: var(--muted);
  font-size: 1.02rem;
  margin: 0 0 30px;
}

.auth-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 32px 30px;
  text-align: left;
}

.auth-secure {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: max-content;
  margin: 0 auto 26px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-soft);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--muted);
}

.auth-alert {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fdecec;
  border: 1px solid #f6c9c9;
  color: #a11d1d;
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  font-size: .9rem;
  margin-bottom: 18px;
}
/* Variante de aviso (dorado de marca) */
.auth-alert--warn {
  background: var(--gold-bg);
  border-color: rgba(176, 135, 90, .35);
  color: #7a5b30;
}
/* Variante de éxito */
.auth-alert--success {
  background: #eafaf0;
  border-color: #bfe9cf;
  color: #1c7a4d;
}

/* Texto de ayuda bajo un campo */
.field__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 8px 2px 0;
  font-size: .82rem;
  color: var(--muted);
}

.field { margin-bottom: 18px; }
.field__label {
  display: block;
  font-size: .85rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.field__control {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: #fff;
  padding: 0 14px;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field__control:focus-within {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(14,14,15,.06);
}
.field__control > i.lead { color: var(--muted-2); font-size: .95rem; }
.field__control input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: .98rem;
  padding: 13px 0;
  color: var(--ink);
}
.field__control input::placeholder { color: var(--muted-2); }
.field__toggle {
  border: none;
  background: transparent;
  color: var(--muted-2);
  cursor: pointer;
  padding: 4px;
  font-size: .95rem;
}
.field__toggle:hover { color: var(--ink); }

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
}
.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  font-weight: 500;
  color: var(--ink-2);
  cursor: pointer;
  user-select: none;
}
.auth-check input {
  width: 17px;
  height: 17px;
  accent-color: var(--ink);
  cursor: pointer;
}
.auth-forgot {
  font-size: .9rem;
  font-weight: 500;
  color: var(--muted);
}
.auth-forgot:hover { color: var(--gold); }

.btn-submit {
  width: 100%;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 15px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  transition: background .15s ease, opacity .15s ease, transform .12s ease;
}
.btn-submit:hover:not(:disabled) { background: #000; }
.btn-submit:active:not(:disabled) { transform: translateY(1px); }
.btn-submit:disabled { opacity: .45; cursor: not-allowed; }

.auth-help {
  margin-top: 26px;
  text-align: center;
  font-size: .92rem;
  color: var(--muted);
}
.auth-help a {
  font-weight: 600;
  color: var(--ink);
}
.auth-help a:hover { color: var(--gold); }

.auth-trust {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 26px;
  color: var(--muted-2);
  font-size: .82rem;
}

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; }
  .auth-bg__piece { font-size: 9rem; }
}
