body.auth-page {
  --auth-bg: #090d16;
  --auth-surface: #13192a;
  --auth-surface-hover: #1a2030;
  --auth-border: rgba(255, 255, 255, 0.06);
  --auth-border-strong: rgba(255, 255, 255, 0.1);
  --auth-text: #e8e5de;
  --auth-text-secondary: #9c9a92;
  --auth-text-muted: #5c5a52;
  --auth-gold: #d4ad0e;
  --auth-gold-bright: #eab308;
  --auth-gold-bg: rgba(234, 179, 8, 0.06);
  --auth-gold-border: rgba(234, 179, 8, 0.16);
  --auth-red: #fda4af;
  --auth-red-bg: rgba(190, 24, 93, 0.16);
  --auth-red-border: rgba(244, 114, 182, 0.18);
  --auth-green: #86efac;
  --auth-green-bg: rgba(22, 101, 52, 0.22);
  --auth-green-border: rgba(134, 239, 172, 0.18);
  --auth-font: "Plus Jakarta Sans", system-ui, sans-serif;
  --auth-font-display: "Instrument Serif", Georgia, serif;
  margin: 0;
  min-height: 100vh;
  font-family: var(--auth-font);
  background:
    radial-gradient(circle at top, rgba(234, 179, 8, 0.06), transparent 28%),
    linear-gradient(180deg, #0a0f19 0%, var(--auth-bg) 22%, #070b12 100%);
  color: var(--auth-text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.auth-page * {
  box-sizing: border-box;
}

body.auth-page a {
  color: inherit !important;
  text-decoration: none !important;
}

body.auth-page a:hover {
  color: inherit !important;
}

body.auth-page h1,
body.auth-page h2,
body.auth-page h3,
body.auth-page h4,
body.auth-page h5,
body.auth-page h6,
body.auth-page p {
  margin: 0 !important;
  color: var(--auth-text) !important;
}

.auth-page-shell {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 20px;
  padding: 44px 40px 36px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.4),
    0 0 120px rgba(234, 179, 8, 0.02);
}

body.auth-page--register .auth-card {
  max-width: 540px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-mark {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--auth-gold), #b8960e);
  color: #090d16;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.auth-logo-mark svg {
  width: 15px;
  height: 15px;
}

.auth-logo-name {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--auth-text) !important;
}

.auth-logo-name span {
  color: var(--auth-gold) !important;
}

.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.auth-tab {
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--auth-text-secondary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.auth-tab:hover {
  color: var(--auth-text);
  background: var(--auth-surface-hover);
}

.auth-tab.is-active {
  background: rgba(234, 179, 8, 0.12);
  color: var(--auth-gold);
  font-weight: 600;
}

.auth-header {
  text-align: center;
  margin-bottom: 28px;
  padding: 0;
}

.auth-title {
  margin: 0 0 8px;
  font-family: var(--auth-font-display);
  font-size: 26px;
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--auth-text) !important;
  text-align: center !important;
}

.auth-sub {
  width: 100%;
  text-align: center !important;
  color: var(--auth-text-secondary) !important;
  font-size: 14px;
  line-height: 1.55;
  max-width: none !important;
}

.auth-alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 13px;
  line-height: 1.55;
}

.auth-alert-error {
  color: var(--auth-red);
  background: var(--auth-red-bg);
  border-color: var(--auth-red-border);
}

.auth-alert-success {
  color: var(--auth-green);
  background: var(--auth-green-bg);
  border-color: var(--auth-green-border);
}

.auth-field {
  margin-bottom: 16px;
}

.auth-label {
  display: block;
  margin-bottom: 6px;
  color: var(--auth-text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.auth-pw-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--auth-border-strong);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--auth-text);
  font: inherit;
  font-size: 14px;
  line-height: 1.4;
  outline: none;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.auth-input::placeholder {
  color: var(--auth-text-muted);
}

.auth-input:hover {
  background: rgba(255, 255, 255, 0.05);
}

.auth-input:focus {
  border-color: rgba(234, 179, 8, 0.34);
  box-shadow: 0 0 0 3px var(--auth-gold-bg);
}

.auth-input[readonly],
.auth-input:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-help,
.password-requirements,
.promo-message,
.error-message {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--auth-text-muted);
}

.promo-valid {
  color: var(--auth-green);
}

.promo-invalid,
.error-message {
  color: var(--auth-red);
}

.auth-btn,
.btn,
.google-signin-btn,
.toggle-form-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--auth-text);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease,
    box-shadow 0.2s ease,
    opacity 0.2s ease;
}

.auth-btn:hover,
.btn:hover,
.google-signin-btn:hover,
.toggle-form-btn:hover {
  transform: translateY(-1px);
}

.auth-btn:disabled,
.btn:disabled,
.google-signin-btn:disabled,
.toggle-form-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  transform: none;
  box-shadow: none;
}

.auth-btn-google,
.google-signin-btn {
  color: #1f1f1f;
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.auth-btn-google:hover,
.google-signin-btn:hover {
  background: #f8f8f8;
}

.auth-btn-primary,
.btn:not(.btn-secondary) {
  color: #090d16;
  background: var(--auth-gold);
  border-color: rgba(234, 179, 8, 0.34);
}

.auth-btn-primary:hover,
.btn:not(.btn-secondary):hover {
  background: var(--auth-gold-bright);
  box-shadow: 0 4px 16px rgba(234, 179, 8, 0.18);
}

.auth-btn-outline,
.btn-secondary,
.toggle-form-btn {
  color: var(--auth-text);
  background: transparent;
  border-color: var(--auth-border-strong);
}

.auth-btn-outline:hover,
.btn-secondary:hover:not(:disabled),
.toggle-form-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.15);
}

.auth-btn-secondary {
  margin-top: 10px;
}

.google-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--auth-border);
}

.auth-divider span {
  color: var(--auth-text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.auth-link,
.auth-pw-forgot {
  color: var(--auth-text-muted) !important;
  font-size: 13px;
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link:hover,
.auth-pw-forgot:hover {
  color: var(--auth-text-secondary) !important;
}

button.auth-link {
  width: 100%;
  padding: 8px 0;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: center;
  cursor: pointer;
}

.auth-inline-link {
  color: var(--auth-gold) !important;
  font-weight: 600;
  text-decoration: none;
}

.auth-inline-link:hover {
  color: var(--auth-gold-bright) !important;
}

.auth-value {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 16px;
  color: var(--auth-text-muted);
  font-size: 11px;
  line-height: 1.4;
}

.auth-value svg {
  width: 12px;
  height: 12px;
  color: var(--auth-gold);
  flex-shrink: 0;
}

.auth-success {
  padding: 10px 0 4px;
  text-align: center;
}

.auth-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: var(--auth-gold-bg);
  border: 1px solid var(--auth-gold-border);
  color: var(--auth-gold);
}

.auth-success-icon svg {
  width: 26px;
  height: 26px;
}

.auth-success-title {
  margin: 0 0 8px;
  font-family: var(--auth-font-display);
  font-size: 24px;
  font-weight: 400;
  color: var(--auth-text) !important;
}

.auth-success-text {
  margin: 0 auto;
  max-width: 300px;
  color: var(--auth-text-secondary) !important;
  font-size: 14px;
  line-height: 1.6;
}

.auth-footer {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--auth-border);
  text-align: center;
}

.auth-footer-copy {
  margin: 0;
  color: var(--auth-text-muted) !important;
  font-size: 13px;
  line-height: 1.6;
}

.auth-footer-links {
  margin-top: 12px;
  color: var(--auth-text-muted) !important;
  font-size: 11px;
  line-height: 1.6;
}

.auth-footer-links a {
  color: inherit !important;
  text-decoration: none;
}

.auth-footer-links a:hover {
  color: var(--auth-text-secondary) !important;
  text-decoration: underline !important;
}

.auth-section {
  display: block;
}

.auth-hidden,
.hidden,
[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .auth-page-shell {
    padding: 24px;
  }

  .auth-card {
    padding: 36px 28px 30px;
    border-radius: 16px;
  }
}
