/* CanchaYa · pantallas de acceso (login, recuperación) */

.auth { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); background: var(--bg); overflow-x: hidden; }

/* ---------- Panel de marca ---------- */
.auth-brand {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: clamp(32px, 5vw, 64px); color: #e8eef7;
  background:
    radial-gradient(900px 500px at 85% -10%, rgba(163, 230, 53,.22), transparent 60%),
    radial-gradient(700px 500px at -10% 110%, rgba(37, 99, 235, .22), transparent 60%),
    linear-gradient(160deg, var(--base) 0%, var(--base-2) 55%, var(--base-3) 100%);
}
/* Líneas de cancha */
.auth-brand::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='900' height='900' viewBox='0 0 900 900' fill='none' stroke='%23a3e635' stroke-opacity='.16' stroke-width='2'%3E%3Crect x='80' y='120' width='740' height='660' rx='14'/%3E%3Cpath d='M450 120v660'/%3E%3Ccircle cx='450' cy='450' r='96'/%3E%3Ccircle cx='450' cy='450' r='4' fill='%23a3e635' fill-opacity='.3'/%3E%3Crect x='80' y='300' width='140' height='300'/%3E%3Crect x='680' y='300' width='140' height='300'/%3E%3Crect x='80' y='380' width='56' height='140'/%3E%3Crect x='764' y='380' width='56' height='140'/%3E%3C/svg%3E") center / cover no-repeat;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
          mask-image: linear-gradient(180deg, transparent 0%, #000 30%, #000 70%, transparent 100%);
}

.auth-pitch { max-width: 520px; }
.auth-pitch .eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 99px; font-size: .78rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); background: rgba(163, 230, 53,.1); border: 1px solid rgba(163, 230, 53,.25); margin-bottom: 22px; }
.auth-pitch h2 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-bottom: 16px; }
.auth-pitch h2 em { font-style: normal; color: var(--accent); }
.auth-pitch > p { color: #a9b9cf; font-size: 1.02rem; max-width: 46ch; }

.feature-list { list-style: none; padding: 0; margin: 36px 0 0; display: grid; gap: 14px; }
.feature-list li { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08); backdrop-filter: blur(6px); }
.feature-list .ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; color: var(--accent); background: rgba(163, 230, 53,.12); flex: none; }
.feature-list strong { display: block; font-size: .95rem; }
.feature-list span { font-size: .84rem; color: #9db0c8; }

.auth-foot { font-size: .8rem; color: #7f93ad; }

/* ---------- Columna del formulario ---------- */
.auth-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); place-items: center; padding: clamp(24px, 4vw, 56px); min-width: 0; }
.auth-tools { position: absolute; top: 20px; right: 20px; display: flex; gap: 8px; }

.auth-card { width: 100%; max-width: 420px; animation: rise .5s var(--ease) both; }
.auth-card .brand { color: var(--text); margin-bottom: 36px; display: none; }
.auth-card h1 { font-size: 1.75rem; font-weight: 800; letter-spacing: -.03em; margin-bottom: 8px; }
.auth-card .subtitle { color: var(--muted); margin-bottom: 28px; }
.auth-card .alert { margin-bottom: 20px; }
.auth-card .alert[hidden] { display: none; }

.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 22px; flex-wrap: wrap; }
.row-between a { font-size: .88rem; font-weight: 600; }

.caps { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--warn); font-weight: 600; }
.caps[hidden] { display: none; }

.auth-secure { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 28px; font-size: .8rem; color: var(--muted); }
.auth-secure .icon { color: var(--accent-strong); }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: .88rem; font-weight: 600; color: var(--muted); margin-bottom: 28px; }
.back-link:hover { color: var(--text); text-decoration: none; }

/* ---------- Pasos de recuperación ---------- */
.stepper { display: flex; gap: 8px; margin-bottom: 28px; }
.stepper i { flex: 1; height: 4px; border-radius: 99px; background: var(--border); transition: background .3s; }
.stepper i.done { background: var(--accent-strong); }
.step[hidden] { display: none; }
.step { animation: rise .4s var(--ease) both; }

.code-inputs { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 8px; }
.code-inputs input { height: 56px; text-align: center; font-size: 1.4rem; font-weight: 700; padding: 0; }

.resend { font-size: .86rem; color: var(--muted); margin-bottom: 20px; }
.resend button { background: none; border: 0; padding: 0; color: var(--link); font-weight: 600; cursor: pointer; }
.resend button:disabled { color: var(--muted); cursor: default; }

.meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.meter i { height: 4px; border-radius: 99px; background: var(--border); transition: background .2s; }
.meter[data-level="1"] i:nth-child(-n+1) { background: var(--danger); }
.meter[data-level="2"] i:nth-child(-n+2) { background: var(--warn); }
.meter[data-level="3"] i:nth-child(-n+3) { background: #65a30d; }
.meter[data-level="4"] i { background: var(--accent-strong); }
.rules { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: .78rem; color: var(--muted); }
.rules li { display: flex; align-items: center; gap: 6px; }
.rules li .icon { width: 14px; height: 14px; opacity: .35; }
.rules li.ok { color: var(--ok); }
.rules li.ok .icon { opacity: 1; }

.success { text-align: center; padding: 8px 0; }
.success .ring { width: 72px; height: 72px; margin: 0 auto 20px; border-radius: 50%; display: grid; place-items: center; background: var(--ok-bg); color: var(--ok); }
.success .ring .icon { width: 34px; height: 34px; stroke-width: 2.4; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-card .brand { display: inline-flex; }
  .auth-main { align-items: start; padding-top: 72px; }
}
@media (max-width: 420px) {
  .code-inputs { gap: 6px; }
  .code-inputs input { height: 50px; font-size: 1.2rem; }
  .rules { grid-template-columns: 1fr; }
}
