.auth-page {
  min-height: calc(100vh - var(--nav-h));
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: calc(var(--nav-h) + 28px);
  padding-bottom: 80px;
}

.auth-card {
  width: min(440px, 100%);
  padding: 32px;
}

.auth-card h1 {
  margin: 0 0 8px;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-lead {
  margin: 0 0 24px;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.3);
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-tertiary);
  font-family: var(--font);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-tab.active {
  color: #0c0f18;
  background: var(--gradient-btn);
}

.auth-field {
  display: block;
  margin-bottom: 14px;
}

.auth-field span {
  display: block;
  margin-bottom: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-tertiary);
}

.auth-field input {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text);
  font-family: var(--font);
  font-size: 0.92rem;
}

.auth-msg {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  line-height: 1.5;
}

.auth-msg.is-error {
  display: block;
  color: #fca5a5;
  border: 1px solid rgba(248, 113, 113, 0.3);
  background: rgba(255, 255, 255, 0.06);
}

.auth-msg.is-success {
  display: block;
  color: #86efac;
  border: 1px solid rgba(74, 222, 128, 0.35);
  background: rgba(34, 197, 94, 0.12);
}

.auth-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 8px;
}

.auth-actions .btn { justify-content: center; width: 100%; }

.auth-otp-block {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.auth-note {
  margin: 18px 0 0;
  font-size: 0.76rem;
  color: var(--text-tertiary);
  line-height: 1.55;
  text-align: center;
}

.auth-note a { color: var(--accent-cyan); }

/* ── Light theme (revenue sage) ── */
html[data-theme="light"] .auth-tabs {
  background: var(--surface-2);
  border-color: var(--border);
}

html[data-theme="light"] .auth-tab.active {
  color: #fff;
}

html[data-theme="light"] .auth-field input {
  background: var(--surface-2);
  border-color: var(--border);
  color: var(--text);
}

html[data-theme="light"] .auth-field input:focus {
  border-color: rgba(61, 122, 74, 0.45);
  box-shadow: 0 0 0 3px rgba(176, 212, 184, 0.35);
}

html[data-theme="light"] .auth-msg.is-error {
  color: #bf4a4a;
  border-color: rgba(191, 74, 74, 0.28);
  background: rgba(191, 74, 74, 0.06);
}

html[data-theme="light"] .auth-msg.is-success {
  color: #2f8c44;
  border-color: rgba(47, 140, 68, 0.28);
  background: rgba(47, 140, 68, 0.08);
}

html[data-theme="light"] .auth-note a {
  color: #3d7a4a;
}

@media (max-width: 768px) {
  .auth-page {
    align-items: flex-start;
    padding-top: calc(var(--nav-h) + 16px);
    padding-bottom: 48px;
  }

  .auth-card {
    padding: 24px 18px;
    margin-top: 8px;
  }

  .auth-tab,
  .auth-submit {
    min-height: 44px;
  }
}

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

  .auth-card h1 {
    font-size: 1.3rem;
  }
}


.auth-forgot-link,
.auth-back-link {
  display: block;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent, #5b8cff);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  text-align: right;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-back-link {
  margin-top: 16px;
  text-align: center;
}

.auth-forgot-lead {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: var(--text-tertiary);
  line-height: 1.45;
}

.auth-or {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-tertiary, rgba(255,255,255,0.45));
}
.auth-or::before,
.auth-or::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border, rgba(255,255,255,0.12));
}
.auth-google-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: transparent;
}
.auth-google-hit {
  position: relative;
  width: 100%;
  max-width: 360px;
  min-height: 40px;
}
.auth-google-custom-btn {
  width: 100%;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(60, 64, 67, 0.28);
  border-radius: 999px;
  background: #fff;
  color: #1f1f1f;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 0.55rem 1rem;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(60, 64, 67, 0.08);
}
.auth-google-custom-btn:disabled {
  opacity: 0.72;
  cursor: wait;
}
html[data-theme="dark"] .auth-google-custom-btn {
  background: #202124;
  color: #e8eaed;
  border-color: rgba(232, 234, 237, 0.22);
  box-shadow: none;
}
.auth-google-hit:hover .auth-google-custom-btn {
  filter: brightness(0.98);
  border-color: rgba(60, 64, 67, 0.4);
}
html[data-theme="dark"] .auth-google-hit:hover .auth-google-custom-btn {
  filter: brightness(1.08);
  border-color: rgba(232, 234, 237, 0.35);
}
.auth-google-custom-btn::before {
  content: "";
  display: inline-block;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3Cpath fill='none' d='M0 0h48v48H0z'/%3E%3C/svg%3E");
}
.auth-google-btn {
  display: none !important;
}
.auth-facebook-btn {
  width: 100%;
  max-width: 360px;
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid rgba(24, 119, 242, 0.45);
  border-radius: 999px;
  background: #1877f2;
  color: #fff;
  font: inherit;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  padding: 0.55rem 1rem;
  transition: filter 0.15s ease, opacity 0.15s ease;
}
.auth-facebook-btn:hover:not(:disabled) {
  filter: brightness(1.06);
}
.auth-facebook-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}
.auth-facebook-btn::before {
  content: "";
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  background: center / contain no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3E%3Cpath d='M14 13.5h2.5l.5-3H14v-1.9c0-.8.2-1.4 1.4-1.4H17V4.1C16.6 4.1 15.7 4 14.7 4 12.4 4 11 5.4 11 8v2.5H8.5v3H11V20h3v-6.5z'/%3E%3C/svg%3E");
}
