/* ============================================================
   Sporara — shared styles for login / signup / forgot-password
   ============================================================ */
body { margin: 0; padding: 0; background: var(--sp-surface); font-family: var(--font-text); color: var(--sp-ink); }

/* ---- Split layout (desktop) ---- */
.auth-shell {
  min-height: 100vh;
  display: grid; grid-template-columns: 1fr 1fr;
}

/* ---- LEFT: brand visual ---- */
/* Görsel: sporcu sağda, sol taraf boş mavi → metin sol boşluğa oturur.
   Gradient, görsel yüklenene kadar (ve görselin bittiği yerde) zemin olarak kalır. */
.auth-brand {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #003A99 0%, #0066ff 50%, #00B5C5 100%);
  background-image: url('/images/login-gorsel.webp');
  background-size: cover;
  background-position: right center;
  background-repeat: no-repeat;
  color: #fff; padding: 48px 56px;
  display: flex; flex-direction: column; justify-content: flex-start;
}
/* Okunabilirlik perdesi: soldan sağa koyulaşan mavi — başlık her kırpmada okunur kalsın. */
.auth-brand::before {
  content: ''; position: absolute; inset: 0;
  background:
    linear-gradient(100deg, rgba(0,26,82,0.82) 0%, rgba(0,42,124,0.45) 42%, rgba(0,60,160,0.10) 68%, transparent 88%),
    radial-gradient(circle at 88% 12%, rgba(215,255,102,0.22) 0%, transparent 38%);
}
.auth-brand > * { position: relative; z-index: 1; }
.auth-brand .logo {
  display: inline-flex; align-items: baseline; gap: 5px;
  font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -0.05em;
  color: #fff; text-decoration: none;
}
.auth-brand .logo .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--sp-lime); transform: translateY(-12px);
}
.auth-brand .hero {
  margin: 32px 0 0; max-width: 520px;
}
.auth-brand .hero h2 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(40px, 5vw, 64px);
  letter-spacing: -0.04em; line-height: 1; margin: 0 0 18px; color: #fff;
}
.auth-brand .hero h2 em { font-style: normal; color: var(--sp-lime); }
.auth-brand .hero p {
  font-size: 16px; line-height: 1.55; color: rgba(255,255,255,0.85); margin: 0 0 28px; max-width: 440px;
}

/* Floating brand tiles (decorative) */
.brand-tiles {
  position: absolute; right: 56px; bottom: 56px;
  display: grid; gap: 14px;
  width: 320px;
}
.brand-tile {
  background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.18);
  backdrop-filter: blur(18px); border-radius: 18px; padding: 16px 18px;
  display: flex; gap: 12px; align-items: center;
  color: #fff;
}
.brand-tile.lime { background: var(--sp-lime); border-color: transparent; color: var(--sp-ink); }
.brand-tile.lime .stat { color: var(--sp-ink); }
.brand-tile .ic {
  width: 38px; height: 38px; border-radius: 12px;
  background: rgba(255,255,255,0.16); display: grid; place-items: center; flex: 0 0 auto;
}
.brand-tile.lime .ic { background: rgba(31,67,143,0.14); color: var(--sp-ink); }
.brand-tile .ic svg { width: 18px; height: 18px; }
.brand-tile .lbl { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 700; opacity: 0.75; }
.brand-tile .stat { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.015em; margin-top: 2px; line-height: 1.1; }

/* ---- RIGHT: form pane ---- */
.auth-form {
  display: flex; align-items: center; justify-content: center;
  padding: 48px 56px;
}
.auth-card {
  width: 100%; max-width: 440px;
}

/* "X / Y" step pill above form heading */
.auth-step {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 5px 12px; border-radius: 999px; background: var(--sp-blue-50); color: var(--sp-blue);
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em;
  margin-bottom: 18px;
}
.auth-step .pulse { width: 6px; height: 6px; border-radius: 50%; background: var(--sp-blue); }

.auth-card h1 {
  font-family: var(--font-display); font-weight: 600; font-size: clamp(32px, 3.6vw, 44px);
  letter-spacing: -0.035em; line-height: 1.05; margin: 0 0 8px;
}
.auth-card .sub { font-size: 15px; color: var(--sp-mute); margin: 0 0 30px; line-height: 1.5; }

/* Form fields */
.f {
  display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px;
}
.f .l {
  font-size: 13px; font-weight: 600; color: var(--sp-ink);
  display: flex; justify-content: space-between; align-items: baseline;
}
.f .l a {
  font-size: 12px; color: var(--sp-blue); font-weight: 600; text-decoration: none;
}
.f .l a:hover { text-decoration: underline; }
.f .input {
  display: flex; align-items: center; gap: 10px;
  background: #fff; border: 1.5px solid var(--sp-line); border-radius: 14px;
  padding: 13px 16px; transition: border-color .15s, box-shadow .15s, background .15s;
}
.f .input:focus-within {
  border-color: var(--sp-blue);
  box-shadow: 0 0 0 4px rgba(0,102,255,0.12);
}
.f.error .input { border-color: var(--sp-error); background: rgba(229,72,77,0.04); }
.f.success .input { border-color: var(--sp-success); }
.f .input svg { width: 18px; height: 18px; color: var(--sp-mute); flex: 0 0 auto; }
.f .input input {
  border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 15px; color: var(--sp-ink); width: 100%;
}
.f .input input::placeholder { color: var(--sp-mute-2); }
.f .input .toggle-eye {
  cursor: pointer; padding: 4px; border: 0; background: transparent; color: var(--sp-mute);
  display: grid; place-items: center; border-radius: 8px;
}
.f .input .toggle-eye:hover { background: var(--sp-surface); color: var(--sp-ink); }
.f .help { font-size: 12px; color: var(--sp-mute); }
.f .err {
  font-size: 12px; color: var(--sp-error); font-weight: 500;
  display: none; align-items: center; gap: 4px;
}
.f.error .err { display: inline-flex; }

/* Password strength */
.pwd-meter {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 6px;
}
.pwd-meter span {
  height: 4px; border-radius: 2px; background: var(--sp-line);
  transition: background .2s;
}
.pwd-meter.s1 span:nth-child(-n+1) { background: var(--sp-error); }
.pwd-meter.s2 span:nth-child(-n+2) { background: var(--sp-warn); }
.pwd-meter.s3 span:nth-child(-n+3) { background: var(--sp-blue); }
.pwd-meter.s4 span { background: var(--sp-success); }
.pwd-hint { font-size: 11px; color: var(--sp-mute); margin-top: 6px; }
.pwd-hint b { color: var(--sp-ink); font-weight: 600; }

/* Checkbox row */
.check-row {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px; color: var(--sp-ink); line-height: 1.5; cursor: pointer; user-select: none;
  margin: 4px 0 18px;
}
.check-row input { position: absolute; opacity: 0; pointer-events: none; }
.check-row .box {
  width: 20px; height: 20px; border-radius: 6px;
  border: 1.5px solid var(--sp-line-strong); background: #fff;
  display: grid; place-items: center; flex: 0 0 auto;
  transition: background .15s, border-color .15s;
  margin-top: 1px;
}
.check-row .box svg { width: 13px; height: 13px; color: #fff; opacity: 0; }
.check-row input:checked + .box { background: var(--sp-blue); border-color: var(--sp-blue); }
.check-row input:checked + .box svg { opacity: 1; }
.check-row a { color: var(--sp-blue); text-decoration: none; font-weight: 600; }
.check-row a:hover { text-decoration: underline; }

/* Submit button */
.btn-primary {
  width: 100%; background: var(--sp-ink); color: #fff; border: 0;
  padding: 15px; border-radius: 14px; font-weight: 600; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: background .15s, transform .1s;
  font-family: inherit;
}
.btn-primary:hover:not(:disabled) { background: #1a2138; }
.btn-primary:active:not(:disabled) { transform: scale(0.99); }
.btn-primary:disabled { background: var(--sp-line-strong); cursor: not-allowed; }
.btn-primary svg { width: 16px; height: 16px; }
.btn-primary.loading .spinner {
  display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
.btn-primary.loading .label { opacity: 0.5; }
@keyframes spin { to { transform: rotate(360deg); } }

/* OR divider */
.divider {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center;
  margin: 22px 0; color: var(--sp-mute); font-size: 12px; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase;
}
.divider::before, .divider::after {
  content: ''; height: 1px; background: var(--sp-line);
}

/* Social buttons */
.social-row {
  display: grid; grid-template-columns: 1fr; gap: 10px;
}
.btn-social {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #fff; color: var(--sp-ink); border: 1px solid var(--sp-line);
  padding: 12px; border-radius: 14px; font-weight: 600; font-size: 14px; cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: inherit; text-decoration: none;
}
.btn-social:hover { border-color: var(--sp-line-strong); background: var(--sp-surface); }
.btn-social svg { width: 18px; height: 18px; }

/* Footer link */
.auth-footer {
  text-align: center; margin-top: 22px; font-size: 14px; color: var(--sp-mute);
}
.auth-footer a { color: var(--sp-ink); font-weight: 600; text-decoration: none; }
.auth-footer a:hover { color: var(--sp-blue); text-decoration: underline; }

/* Legal footnote */
.auth-legal {
  margin-top: 28px; font-size: 11.5px; color: var(--sp-mute-2); line-height: 1.55;
}
.auth-legal a { color: var(--sp-mute); text-decoration: underline; }

/* Success card (forgot password sent) */
.success-card {
  background: #fff; border: 1px solid var(--sp-line); border-radius: 18px; padding: 28px;
  text-align: center; display: none;
}
.success-card.show { display: block; }
.success-card .check-ring {
  width: 64px; height: 64px; border-radius: 50%; background: var(--sp-lime);
  display: grid; place-items: center; margin: 0 auto 18px; color: var(--sp-ink);
}
.success-card .check-ring svg { width: 28px; height: 28px; }
.success-card h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 22px; letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.success-card p { font-size: 14px; color: var(--sp-mute); line-height: 1.5; margin: 0 0 18px; }
.success-card p b { color: var(--sp-ink); font-weight: 600; }
.success-card .resend {
  font-size: 13px; color: var(--sp-blue); font-weight: 600; cursor: pointer;
  background: transparent; border: 0; padding: 0;
}
.success-card .resend:hover { text-decoration: underline; }

/* Back link */
.back-link {
  display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600;
  color: var(--sp-mute); text-decoration: none; margin-bottom: 24px;
}
.back-link:hover { color: var(--sp-ink); }
.back-link svg { width: 14px; height: 14px; }

/* ===== Tablet / Phone ===== */
@media (max-width: 1024px) {
  .auth-shell { grid-template-columns: 1fr; min-height: auto; }
  /* Mobilde marka paneli kısa üst banner olur; görsel (dikey) 'cover' ile üstten kırpılır.
     Sporcunun yüzü görselin üst kısmında → 'center top' ile yüz görünür kalır
     (desktop'ta panel yüksek olduğundan 'right center' doğru, sadece mobilde değişir). */
  .auth-brand { padding: 28px 24px 24px; min-height: 240px; background-position: center top; }
  .auth-brand .hero { margin-top: 24px; }
  .auth-brand .hero h2 { font-size: clamp(28px, 6vw, 40px); margin-bottom: 12px; }
  .auth-brand .hero p { display: none; }
  .brand-tiles { display: none; }
  .auth-form { padding: 28px 24px 56px; }
  .auth-card { max-width: none; }
}
@media (max-width: 720px) {
  .auth-brand { min-height: 180px; padding: 22px 18px 20px; }
  .auth-brand .logo { font-size: 22px; }
  .auth-brand .hero h2 { font-size: 26px; }
  .auth-form { padding: 24px 18px 48px; }
  .auth-card h1 { font-size: 26px; }
  .auth-card .sub { font-size: 14px; margin-bottom: 22px; }
  .social-row { grid-template-columns: 1fr; }
}
