/* Coach Y — sign-in / sign-up / password reset (matches landing purple + gold) */
:root {
  --bg: #0a0516;
  --bg2: #0f0a1e;
  --purple: #7c3aed;
  --purple-soft: #a78bfa;
  --gold: #f59e0b;
  --gold-light: #fcd34d;
  --white: #f4f0ff;
  --muted: #8b7aa8;
  --border: rgba(124, 58, 237, 0.22);
  --card: rgba(15, 10, 30, 0.88);
  --danger: #fca5a5;
  --ok: #86efac;
}

html {
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html:not(.auth-ready) body {
  visibility: hidden;
}

body.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", system-ui, -apple-system, sans-serif;
  color: var(--white);
  background:
    radial-gradient(ellipse 80% 60% at 15% 10%, rgba(124, 58, 237, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse 70% 50% at 85% 90%, rgba(245, 158, 11, 0.07) 0%, transparent 55%),
    var(--bg);
  background-attachment: fixed;
  display: grid;
  place-items: center;
  padding: 20px;
}

.auth-wrap,
.login-wrap,
.signup-wrap {
  width: min(94vw, 440px);
  margin: 0 auto;
}

.login-wrap {
  width: min(94vw, 420px);
}

.panel {
  width: min(94vw, 440px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(124, 58, 237, 0.08);
  padding: 24px;
}

h1 {
  margin: 0;
  font-family: "Sora", system-ui, sans-serif;
  font-size: clamp(1.25rem, 2.5vw, 1.6rem);
  color: var(--white);
}

.sub {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.92rem;
}

.auth-brand {
  text-align: center;
  margin-bottom: 4px;
}

.auth-brand .sub {
  margin-top: 6px;
}

.auth-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 14px;
  object-fit: cover;
  filter: drop-shadow(0 0 22px rgba(124, 58, 237, 0.45));
}

.signup-brand {
  margin-bottom: 18px;
}

.signup-coachy-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1rem;
  object-fit: cover;
  box-shadow:
    0 0 0 3px rgba(124, 58, 237, 0.5),
    0 0 20px rgba(124, 58, 237, 0.3);
}

.signup-coachy-eyebrow {
  margin: 0 0 0.65rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: #fcd34d;
}

.password-wrap {
  position: relative;
}

.password-wrap .inp {
  padding-right: 4.75rem;
}

.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 6px;
  font-family: inherit;
}

.password-toggle:hover {
  color: var(--gold);
}

.password-toggle:focus-visible {
  outline: 2px solid var(--purple-soft);
  outline-offset: 2px;
  border-radius: 4px;
}

.label {
  display: block;
  margin: 14px 0 6px;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

.label-optional {
  font-weight: 500;
  color: rgba(139, 122, 168, 0.85);
}

.inp {
  width: 100%;
  border-radius: 10px;
  border: 1px solid rgba(124, 58, 237, 0.28);
  background: rgba(10, 5, 22, 0.65);
  color: var(--white);
  padding: 11px 12px;
  font: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.inp:focus {
  outline: none;
  border-color: rgba(167, 139, 250, 0.55);
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.2);
}

.inp::placeholder {
  color: rgba(139, 122, 168, 0.75);
}

.forgot-row {
  margin-top: 6px;
  text-align: right;
}

.forgot-row a,
.signup-foot a,
.trial-note a,
.foot a,
.consent a {
  color: var(--gold-light);
  font-weight: 600;
  text-decoration: none;
}

.forgot-row a:hover,
.signup-foot a:hover,
.trial-note a:hover,
.foot a:hover,
.consent a:hover {
  text-decoration: underline;
  color: var(--gold);
}

.btn {
  margin-top: 16px;
  border: none;
  border-radius: 999px;
  padding: 11px 18px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #1c1240;
  box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35);
  width: 100%;
  transition: box-shadow 0.15s ease, transform 0.1s ease;
}

.btn:hover:not(:disabled) {
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.45);
}

.btn:active:not(:disabled) {
  transform: scale(0.98);
}

.btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.btn-secondary {
  margin-top: 10px;
  background: transparent;
  color: var(--purple-soft);
  border: 1px solid var(--border);
  box-shadow: none;
  display: block;
  text-align: center;
  text-decoration: none;
  line-height: 1.3;
  padding: 11px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-secondary:hover {
  border-color: rgba(124, 58, 237, 0.45);
  color: var(--white);
}

.error {
  margin: 12px 0 0;
  color: var(--danger);
  font-size: 0.88rem;
  font-weight: 600;
}

.success {
  margin: 12px 0 0;
  color: var(--ok);
  font-size: 0.88rem;
  font-weight: 600;
}

.signup-foot {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 0.88rem;
  color: var(--muted);
}

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 14px;
  font-size: 0.85rem;
  color: #c4b5fd;
  line-height: 1.45;
}

.consent input {
  margin-top: 3px;
  accent-color: var(--purple);
}

.trial-note {
  margin-top: 14px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
  text-align: center;
}

.trial-note a {
  display: inline-block;
  cursor: pointer;
  position: relative;
  z-index: 1;
}

.foot {
  margin-top: 18px;
  font-size: 0.88rem;
  text-align: center;
  color: var(--muted);
}

#coachy-site-footer {
  color: var(--muted) !important;
  border-top-color: var(--border) !important;
}
