:root {
  --bg:         oklch(0.985 0.004 85);
  --panel:      oklch(0.965 0.006 85);
  --ink:        oklch(0.18  0.010 250);
  --ink-2:      oklch(0.38  0.008 250);
  --ink-3:      oklch(0.58  0.006 250);
  --line:       oklch(0.90  0.005 250);
  --line-2:     oklch(0.82  0.006 250);
  --field:      #ffffff;
  --accent:     #2f7a4a;
  --accent-ink: #ffffff;
  --accent-rgb: 47, 122, 74;
  --danger:     oklch(0.56 0.18 28);
  --danger-bg:  oklch(0.97 0.03 28);
  --radius:     10px;
  --shadow:     0 1px 2px rgba(15,23,42,.04), 0 8px 24px -12px rgba(15,23,42,.08);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ── Layout ─────────────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

/* ── Side panel ─────────────────────────────────────────── */
.side {
  position: relative;
  background: linear-gradient(180deg, oklch(0.22 0.015 250) 0%, oklch(0.16 0.018 250) 100%);
  color: oklch(0.96 0.004 250);
  padding: 40px 48px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  isolation: isolate;
}
.side::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% -20%;
  height: 60%;
  background: radial-gradient(ellipse at center, rgba(var(--accent-rgb), 0.18), transparent 60%);
  z-index: -1;
  pointer-events: none;
}
.side::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 32px 32px;
  z-index: -1;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.side__brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.side__brandname {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 20px;
  letter-spacing: -0.01em;
  font-weight: 500;
}

.side__middle {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  max-width: 480px;
}
.side__headline {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.02;
  letter-spacing: -0.025em;
  font-weight: 500;
  margin: 0 0 18px;
}
.side__headline--accent {
  color: var(--accent);
  font-style: italic;
  font-weight: 400;
}
.side__sub {
  font-size: 15px;
  line-height: 1.55;
  color: oklch(0.78 0.008 250);
  max-width: 38ch;
  margin: 0;
}
.side__foot {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: oklch(0.60 0.008 250);
  letter-spacing: 0.02em;
}
.side__dot { opacity: 0.5; }

/* ── Court illustration ─────────────────────────────────── */
.court {
  position: absolute;
  right: -80px;
  bottom: 80px;
  width: 440px;
  height: 260px;
  perspective: 800px;
  pointer-events: none;
  opacity: 0.9;
}
.court__frame {
  position: relative;
  width: 100%;
  height: 100%;
  border: 1.5px solid rgba(255,255,255,0.22);
  border-radius: 4px;
  transform: rotateX(55deg) rotateZ(-28deg);
  transform-origin: center;
  background:
    linear-gradient(180deg, rgba(var(--accent-rgb), 0.08), rgba(var(--accent-rgb), 0.02));
  box-shadow:
    0 40px 60px -20px rgba(0,0,0,0.5),
    inset 0 0 80px rgba(var(--accent-rgb), 0.1);
}
.court__net {
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 2px;
  background: rgba(255,255,255,0.35);
  transform: translateY(-1px);
}
.court__net::after {
  content: "";
  position: absolute;
  inset: -10px 0;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(255,255,255,0.18) 0 1px,
    transparent 1px 6px
  );
}
.court__service {
  position: absolute;
  top: 25%; bottom: 25%;
  width: 1px;
  background: rgba(255,255,255,0.2);
}
.court__service--left  { left: 30%; }
.court__service--right { right: 30%; }
.court__baseline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.15);
}
.court__baseline--top { top: 20%; }
.court__baseline--bot { bottom: 20%; }
.court__ball {
  position: absolute;
  top: 42%; right: 36%;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow:
    0 0 0 3px rgba(var(--accent-rgb), 0.25),
    0 20px 30px rgba(0,0,0,0.4);
}

/* ── Main column ────────────────────────────────────────── */
.main {
  padding: 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.main__brandMobile {
  display: none;
  align-items: center;
  gap: 10px;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 18px;
  margin-bottom: 8px;
}

/* ── Card ───────────────────────────────────────────────── */
.card {
  width: 100%;
  max-width: 420px;
  background: var(--bg);
  padding: 8px 0;
}
.card__head { margin-bottom: 28px; }
.card__title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 32px;
  font-weight: 500;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
  color: var(--ink);
}
.card__sub {
  font-size: 14.5px;
  color: var(--ink-2);
  margin: 0;
}

/* ── Alert ──────────────────────────────────────────────── */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--danger-bg);
  border: 1px solid oklch(0.85 0.06 28);
  color: var(--danger);
  font-size: 13.5px;
  line-height: 1.4;
  margin-bottom: 18px;
}
.alert svg { margin-top: 1px; flex-shrink: 0; }

/* ── Fields ─────────────────────────────────────────────── */
.field { margin-bottom: 18px; }
.field__label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 6px;
  letter-spacing: 0.005em;
}
.field__wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.field__icon {
  position: absolute;
  left: 14px;
  color: var(--ink-3);
  display: flex;
  pointer-events: none;
  transition: color .15s ease;
}
.field__trailing {
  position: absolute;
  right: 6px;
  display: flex;
}
.field__toggle {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 8px;
  color: var(--ink-3);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field__toggle:hover { color: var(--ink); background: oklch(0.95 0.005 250); }

.field__input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field__input::placeholder { color: oklch(0.70 0.005 250); }
.field__input--icon     { padding-left: 40px; }
.field__input--trailing { padding-right: 44px; }
.field__input:hover  { border-color: var(--line-2); }
.field__input:focus  {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.14);
  background: #fff;
}
.field__wrap:focus-within .field__icon { color: var(--ink); }

.field--error .field__input {
  border-color: var(--danger);
  background: var(--danger-bg);
}
.field--error .field__input:focus {
  box-shadow: 0 0 0 4px oklch(0.90 0.06 28 / 0.45);
}
.field--error .field__icon { color: var(--danger); }

.field__error {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--danger);
  font-size: 12.5px;
  margin-top: 6px;
  line-height: 1.3;
}

/* ── Row (remember + forgot) ────────────────────────────── */
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
  gap: 12px;
}

/* ── Checkbox ───────────────────────────────────────────── */
.check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  color: var(--ink);
}
.check input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.check__box {
  width: 18px; height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-2);
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-ink);
  flex-shrink: 0;
  transition: all .15s ease;
}
.check input:checked + .check__box {
  background: var(--accent);
  border-color: var(--accent);
}
.check input:focus-visible + .check__box {
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.22);
}
.check:hover .check__box { border-color: var(--ink-3); }

/* ── Forgot link ────────────────────────────────────────── */
.forgot {
  font-size: 13.5px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  transition: opacity .15s ease;
  white-space: nowrap;
}
.forgot:hover { opacity: 0.72; text-decoration: underline; text-underline-offset: 3px; }

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  width: 100%;
  height: 48px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius);
  transition: transform .08s ease, background .15s ease, box-shadow .15s ease, opacity .15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: 0.005em;
  text-decoration: none;
}
.btn__content { display: inline-flex; align-items: center; gap: 10px; }

.btn--primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 8px 20px -10px rgba(var(--accent-rgb), 0.6);
}
.btn--primary:hover:not(:disabled) {
  filter: brightness(1.06);
  box-shadow:
    0 1px 0 rgba(0,0,0,0.04),
    0 12px 28px -12px rgba(var(--accent-rgb), 0.7);
}
.btn--primary:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }
.btn.is-loading { opacity: 0.9; cursor: progress; }
.btn.is-success { background: oklch(0.55 0.14 150); color: white; }

.btn--secondary {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-2);
  box-shadow: 0 1px 0 rgba(0,0,0,0.02);
}
.btn--secondary:hover:not(:disabled) {
  border-color: var(--ink-3);
  background: oklch(0.98 0.004 85);
}
.btn--secondary:active:not(:disabled) { transform: translateY(1px); }

/* ── Divider ────────────────────────────────────────────── */
.divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 24px 0 18px;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 400;
  line-height: 1;
}
.divider span { padding: 0 2px; white-space: nowrap; }
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ── Spinner ────────────────────────────────────────────── */
.spinner {
  width: 16px; height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  opacity: 0.85;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Legal ──────────────────────────────────────────────── */
.legal {
  font-size: 12.5px;
  color: var(--ink-3);
  text-align: center;
  max-width: 420px;
  margin: 4px 0 0;
  line-height: 1.5;
}
.legal a {
  color: var(--ink-2);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--line-2);
}
.legal a:hover { color: var(--ink); text-decoration-color: var(--ink-3); }

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 960px) {
  .page { grid-template-columns: 1fr; }
  .side { display: none; }
  .main__brandMobile { display: inline-flex; }
  .main { padding: 60px 24px 40px; }
}
