/**
 * Login Aynifree (portales comerciante / prestador).
 * Paleta y tipografía oficiales: Montserrat + DM Sans.
 */
:root {
  --af-navy: #10146e;
  --af-green: #53f235;
  --af-teal: #39ebc7;
  --af-sky: #3dbeff;
  --af-blue: #2a7dff;
  --af-purple: #5d3cff;
  --af-yellow: #f7be13;
  --af-orange: #f58916;
  --af-gray: #666666;
  --af-ink: #10146e;
  --af-ink-soft: #3a4270;
  --af-muted: #5a6280;
  --af-surface: #f7fbff;
  --af-white: #ffffff;
  --af-border: rgba(16, 20, 110, 0.12);
  --af-radius: 14px;
  --af-shadow: 0 8px 30px rgba(16, 20, 110, 0.08);
  --af-shadow-hover: 0 14px 40px rgba(16, 20, 110, 0.12);
  --af-font: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
  --af-display: 'Montserrat', system-ui, sans-serif;
  --af-grad-free: linear-gradient(90deg, #53f235 0%, #39ebc7 45%, #2a7dff 100%);
  --af-grad-hero: linear-gradient(145deg, #10146e 0%, #2a7dff 48%, #5d3cff 100%);
}

* { box-sizing: border-box; }

html, body.af-auth {
  margin: 0;
  min-height: 100%;
  font-family: var(--af-font);
  color: var(--af-ink);
  background:
    radial-gradient(ellipse 70% 45% at 0% -8%, rgba(57, 235, 199, 0.16), transparent 55%),
    radial-gradient(ellipse 55% 40% at 100% 0%, rgba(93, 60, 255, 0.1), transparent 50%),
    var(--af-surface);
  -webkit-font-smoothing: antialiased;
}

.af-auth a { color: var(--af-blue); text-decoration: none; }
.af-auth a:hover { text-decoration: underline; }

.af-auth-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.af-auth-strip {
  position: relative;
  z-index: 50;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.75rem;
  padding: 0.55rem 1rem;
  background: var(--af-grad-free);
  color: #0a1240;
  font-family: var(--af-display);
  font-weight: 700;
  font-size: clamp(0.82rem, 2vw, 0.95rem);
  letter-spacing: -0.02em;
  overflow: hidden;
}
.af-auth-strip-word {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
  background: #10146e;
  color: #53f235;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.af-auth-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 72px;
  padding: 0.45rem 1.25rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--af-border);
  backdrop-filter: blur(12px);
}
.af-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-family: var(--af-display);
  font-weight: 800;
  color: var(--af-ink);
  text-decoration: none;
}
.af-auth-brand:hover { text-decoration: none; color: var(--af-ink); }
.af-auth-brand img { display: block; height: 48px; width: auto; }
.af-auth-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.af-word-ayni { color: var(--af-navy); }
.af-word-free {
  background: var(--af-grad-free);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.af-auth-brand-text small {
  font-family: var(--af-font);
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--af-muted);
}
.af-auth-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  font-weight: 600;
  font-size: 0.9rem;
}

.af-auth-body {
  flex: 1;
  max-width: 56rem;
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.15rem 3.5rem;
}

.af-auth-wrap {
  display: grid;
  gap: 1.5rem;
  align-items: start;
}
@media (min-width: 800px) {
  .af-auth-wrap { grid-template-columns: 1.15fr 0.85fr; }
}

.af-auth-hero {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  padding: 1.75rem 1.4rem 1.9rem;
  color: #fff;
  background: var(--af-grad-hero);
  box-shadow: var(--af-shadow-hover);
}
.af-auth-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 88% 12%, rgba(83, 242, 53, 0.22), transparent 55%),
    radial-gradient(ellipse 40% 50% at 8% 90%, rgba(57, 235, 199, 0.2), transparent 50%);
  pointer-events: none;
}
.af-auth-hero > * { position: relative; z-index: 1; }
.af-auth-kicker {
  display: inline-block;
  margin: 0 0 0.65rem;
  font-family: var(--af-display);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}
.af-auth-hero h1 {
  font-family: var(--af-display);
  font-weight: 800;
  font-size: clamp(1.7rem, 3vw, 2.25rem);
  margin: 0 0 0.65rem;
  letter-spacing: -0.04em;
  line-height: 1.15;
  color: #fff;
}
.af-auth-hero h1 span {
  background: var(--af-grad-free);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.af-auth-hero p {
  margin: 0 0 1rem;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.55;
}
.af-auth-points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.af-auth-points li {
  padding: 0.7rem 0.9rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  font-size: 0.9rem;
  color: #fff;
}

.af-auth-card {
  align-self: center;
  background: var(--af-white);
  border: 1px solid var(--af-border);
  border-radius: 20px;
  padding: 1.6rem 1.45rem 1.5rem;
  box-shadow: var(--af-shadow);
}
.af-auth-card h2 {
  font-family: var(--af-display);
  font-weight: 800;
  font-size: 1.45rem;
  margin: 0 0 0.35rem;
  letter-spacing: -0.03em;
}
.af-auth-card > p {
  margin: 0 0 1rem;
  color: var(--af-muted);
  font-size: 0.92rem;
}

.af-auth-alert {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
  font-size: 0.88rem;
}

.af-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
}
.af-field label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--af-ink-soft);
}
.af-field input {
  border: 1px solid var(--af-border);
  border-radius: 10px;
  padding: 0.7rem 0.8rem;
  font: inherit;
  background: #fff;
  color: var(--af-ink);
  width: 100%;
}
.af-field input:focus {
  outline: 2px solid rgba(42, 125, 255, 0.28);
  border-color: var(--af-blue);
}

.af-pass-wrap { position: relative; }
.af-pass-wrap input { padding-right: 4.6rem; }
.af-pass-toggle {
  position: absolute;
  right: 0.4rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--af-blue);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 0.35rem 0.55rem;
}
.af-pass-toggle:hover { text-decoration: underline; }

.af-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.8rem 1rem;
  font-family: var(--af-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  background: var(--af-navy);
  cursor: pointer;
}
.af-btn:hover { background: #1a3488; text-decoration: none; color: #fff; }

.af-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.7rem;
  border: 1.5px solid var(--af-border);
  border-radius: 12px;
  padding: 0.75rem 1rem;
  font-family: var(--af-display);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--af-navy);
  background: #fff;
  cursor: pointer;
  text-decoration: none;
}
.af-btn-outline:hover {
  background: #f3f6ff;
  text-decoration: none;
  color: var(--af-navy);
}
.af-btn-outline .af-pwa-futbol {
  width: 22px;
  height: 22px;
  margin-right: 0.45rem;
  border-radius: 6px;
  object-fit: cover;
}

.af-auth-forgot {
  margin: 0.85rem 0 0;
  text-align: center;
  font-size: 0.88rem;
}

.af-auth-alert-ok {
  margin: 0 0 0.9rem;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
  font-size: 0.88rem;
}

.af-auth-links {
  margin: 1.15rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--af-border);
  text-align: center;
  font-size: 0.85rem;
  color: var(--af-muted);
}
.af-auth-links a { font-weight: 700; }

.af-auth-foot {
  padding: 1.25rem 1.15rem 2rem;
  text-align: center;
  color: var(--af-muted);
  font-size: 0.82rem;
}
.af-auth-foot img { height: 36px; width: auto; display: block; margin: 0 auto 0.5rem; }
