/* ===== Login / Register ===== */
.auth-wrap {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  position: relative;
  overflow: hidden;
}

/* Radial accent glow */
.auth-glow {
  position: absolute;
  top: -120px;
  left: 50%;
  transform: translateX(-50%);
  width: 560px;
  height: 440px;
  background: radial-gradient(circle, rgba(198,242,78,.06), transparent 65%);
  pointer-events: none;
}

/* Brand lockup above card */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 28px;
  position: relative;
}
.auth-brand-dot {
  display: block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  flex-shrink: 0;
}

/* Card */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 32px 30px 28px;
  position: relative;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 24px;
  border-bottom: 1px solid var(--line);
}
.auth-tab {
  flex: 1;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  padding: 10px 4px 12px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  cursor: pointer;
  transition: color .15s, border-color .15s;
}
.auth-tab:hover { color: var(--text-2); }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

/* Heading block */
.auth-heading {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-sub { font-size: 14px; color: var(--text-2); margin-bottom: 22px; line-height: 1.5; }

/* Form */
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.field-group { display: flex; flex-direction: column; gap: 6px; }
.field-row { display: flex; gap: 12px; }
.field-row .field-group { flex: 1; min-width: 0; }
.field-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
}
.field-input {
  width: 100%;
  background: var(--card-inset);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  padding: 11px 14px;
  color: var(--text-1);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 14.5px;
  outline: none;
  transition: border-color .15s;
}
.field-input::placeholder { color: var(--text-3); }
.field-input:focus { border-color: var(--accent); }

/* Show/hide password toggle */
.pw-wrap { position: relative; display: flex; }
.pw-wrap .field-input { padding-right: 44px; }
.pw-toggle {
  position: absolute;
  top: 0; bottom: 0; right: 0;
  width: 42px;
  display: flex; align-items: center; justify-content: center;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-3);
  transition: color .15s;
}
.pw-toggle:hover { color: var(--text-1); }
.pw-toggle:focus-visible { color: var(--accent); outline: none; }
.pw-toggle svg { width: 18px; height: 18px; }
.pw-toggle .pw-eye-off { display: none; }
.pw-toggle.revealed .pw-eye { display: none; }
.pw-toggle.revealed .pw-eye-off { display: block; }

/* Password requirements checklist */
.pw-requirements {
  list-style: none;
  margin: 2px 0 0;
  padding: 0;
  display: none;
  flex-direction: column;
  gap: 3px;
}
.pw-requirements.visible { display: flex; }
.pw-requirements li {
  font-size: 12px;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color .15s;
}
.pw-requirements li::before {
  content: "✕";
  font-size: 10px;
  width: 12px;
  flex-shrink: 0;
  text-align: center;
}
.pw-requirements li.met { color: var(--accent); }
.pw-requirements li.met::before { content: "✓"; }

.pw-all-good {
  display: none;
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--accent);
}
.pw-all-good.visible { display: block; }

/* Tight group for the terms checkbox, its error slot, and the submit button —
   these read as one action block, so they shouldn't get the form's full field gap. */
.auth-actions { display: flex; flex-direction: column; gap: 6px; }
.auth-actions .auth-submit { margin-top: 2px; }

/* Agree-to-terms checkbox */
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.4;
  cursor: pointer;
}
.auth-checkbox input { margin-top: 2px; accent-color: var(--accent); flex-shrink: 0; }
.auth-checkbox a { color: var(--accent); text-decoration: none; }
.auth-checkbox a:hover { text-decoration: underline; }

/* Error */
.auth-error {
  font-size: 13px;
  color: var(--danger);
  min-height: 18px;
  line-height: 1.4;
}

/* Notice */
.auth-notice {
  font-size: 13px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 16px;
  line-height: 1.4;
}

/* Submit */
.auth-submit {
  width: 100%;
  padding: 13px;
  border-radius: 10px;
  background: var(--btn-bg);
  color: var(--btn-text);
  border: none;
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  margin-top: 4px;
}
.auth-submit:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(255,255,255,.14); }
.auth-submit:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* Divider ("or") between password auth and social auth */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-3);
  font-size: 12px;
  margin: -4px 0;
}
.auth-divider::before, .auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* Social sign-in buttons (Google, GitHub) */
.auth-google, .auth-github {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  font-family: 'Hanken Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.auth-google:hover, .auth-github:hover { border-color: var(--text-3); background: var(--accent-soft); }
.auth-google-note {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.4;
  margin-top: -6px;
}
.auth-google-note a { color: var(--text-3); text-decoration: underline; }

/* Switch-mode text */
.auth-switch {
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}
.auth-switch a { color: var(--accent); text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* Back link */
.auth-back {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-3);
  text-decoration: none;
  transition: color .15s;
}
.auth-back:hover { color: var(--text-2); }

@media (max-width: 480px) {
  .auth-card { padding: 26px 20px; border-radius: 14px; }
}
