.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 24px;
}

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

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 20px;
  padding: 32px 28px 26px;
  box-shadow:
    0 24px 64px rgba(15, 40, 80, 0.12),
    0 2px 8px rgba(15, 40, 80, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
}

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

.auth-brand-lockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.auth-brand-icon {
  display: block;
  width: 80px;
  height: auto;
  object-fit: contain;
}

.auth-brand-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-brand-tagline {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.auth-brand-lead {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.auth-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(0, 113, 227, 0.14), rgba(10, 132, 255, 0.08));
  border: 1px solid rgba(0, 113, 227, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  font-size: 1.5rem;
  line-height: 1;
}

.auth-logo-mark-img {
  display: block;
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  object-fit: contain;
}

.auth-logo-full {
  display: block;
  width: min(100%, 280px);
  height: auto;
  margin: 0 auto 14px;
  object-fit: contain;
}

.auth-brand h1 {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  margin: 0 0 8px;
}

.auth-brand > p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin: 0;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 22px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.55);
}

.auth-tab {
  flex: 1;
  text-align: center;
  padding: 10px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  font-family: var(--font-body);
  color: var(--text-muted);
  border-radius: 9px;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}

.auth-tab:hover:not(.active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.65);
}

.auth-tab.active {
  color: var(--text);
  background: #fff;
  box-shadow: 0 1px 4px rgba(15, 40, 80, 0.08);
}

.auth-hcaptcha-mount {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-hcaptcha-note {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.auth-form label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
  margin-top: 14px;
}

.auth-form label:first-of-type {
  margin-top: 0;
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  box-sizing: border-box;
}

.auth-form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.auth-field-password {
  position: relative;
}

.auth-field-password input {
  padding-right: 44px;
}

.auth-password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.auth-password-toggle:hover {
  color: var(--accent);
  background: rgba(0, 113, 227, 0.08);
}

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

.auth-check--inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.auth-check--inline input {
  width: auto;
  accent-color: var(--accent);
}

.btn-auth-submit {
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  border: none;
  border-radius: 12px;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, var(--accent), var(--blue));
  color: var(--on-accent);
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.28);
}

.btn-auth-submit:hover {
  filter: brightness(1.04);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 14px;
  font-size: 0.78rem;
  color: var(--text-dim);
  text-transform: lowercase;
}

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

.auth-social {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-social-btn:hover:not(:disabled) {
  border-color: var(--accent-dim);
  background: #fff;
}

.auth-social-btn:disabled {
  opacity: 0.72;
  cursor: not-allowed;
}

.auth-legal {
  margin: 18px 0 0;
  text-align: center;
  font-size: 0.74rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.auth-legal a {
  color: var(--accent);
  text-decoration: none;
}

.auth-legal a:hover {
  text-decoration: underline;
}

.auth-flash {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
}

.auth-flash li {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  margin-bottom: 8px;
}

.auth-flash-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #991b1b;
}

.auth-flash-success {
  background: var(--accent-glow);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: var(--text);
}

.auth-flash-info {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.auth-client-error {
  list-style: none;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.45;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #991b1b;
}

.auth-forgot-wrap {
  margin: 0;
  text-align: right;
}

.auth-link-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  font-size: 0.84rem;
  color: var(--accent);
  cursor: pointer;
  text-decoration: none;
}

.auth-link-btn:hover {
  color: var(--blue);
  text-decoration: underline;
}

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

.auth-forgot-panel.hidden {
  display: none;
}

.auth-footer-link {
  margin-top: 20px;
  text-align: center;
  font-size: 0.88rem;
}

.auth-footer-link a {
  color: var(--accent);
}

.auth-client-success {
  list-style: none;
  margin: 0 0 16px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  line-height: 1.45;
  background: rgba(34, 197, 94, 0.18);
  border: 1px solid rgba(34, 197, 94, 0.45);
  color: #0b1f12;
}

.auth-stale-session {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text);
  background: rgba(245, 158, 11, 0.14);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.auth-stale-session[hidden] {
  display: none;
}

.auth-signed-in-banner {
  margin: 0 0 20px;
  padding: 14px;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  background: var(--accent-glow);
}

.auth-signed-in-banner.hidden {
  display: none;
}

.auth-signed-in-text {
  margin: 0 0 12px;
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.45;
}

.auth-signed-in-out {
  margin: 12px 0 0;
  text-align: center;
}

.auth-continue-link {
  display: block;
  text-align: center;
  text-decoration: none;
  box-sizing: border-box;
}

.auth-optional {
  font-weight: 400;
  color: var(--text-dim);
}

.auth-optin-group {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 16px;
  text-align: left;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.auth-optin-legend {
  margin: 0 0 10px;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 600;
}

.auth-form .auth-optin-group label.auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  margin-top: 10px;
  margin-bottom: 0;
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--text-muted);
  cursor: pointer;
  text-align: left;
  box-sizing: border-box;
}

.auth-form .auth-optin-group label.auth-check:first-of-type {
  margin-top: 0;
}

.auth-check span {
  flex: 1;
  min-width: 0;
  line-height: 1.45;
}

.auth-check input {
  margin-top: 3px;
  flex-shrink: 0;
  width: auto;
  accent-color: var(--accent);
}

.auth-privacy-note {
  margin-top: 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--text-dim);
}

.auth-tabs.hidden {
  display: none;
}

.auth-confirm-screen {
  text-align: center;
  padding: 8px 0 4px;
}

.auth-confirm-screen.hidden {
  display: none;
}

.auth-confirm-icon {
  font-size: 2.5rem;
  line-height: 1;
  margin-bottom: 12px;
}

.auth-confirm-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text);
}

.auth-confirm-body {
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.auth-confirm-hint {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 20px;
}

.auth-confirm-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.auth-confirm-back {
  font-size: 0.88rem;
}

.portal-footer--auth {
  position: relative;
  z-index: 1;
  margin-top: 0;
  padding: 0 8px 8px;
  border-top: none;
  background: transparent;
  max-width: none;
  color: var(--text-dim);
  font-size: 0.82rem;
}
