.auth-shell-unified .auth-card,
.auth-shell-unified .auth-hero,
.auth-card-unified,
.auth-hero-unified {
  background: rgba(255, 255, 255, 0.96);
  border-color: var(--line);
}

.auth-page-unified {
  width: min(1100px, calc(100vw - 2rem));
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 1rem;
  align-items: stretch;
  padding: 2rem 0;
}

.auth-hero-unified,
.auth-card-unified {
  padding: clamp(1.4rem, 2vw, 2rem);
}

.brand-stack {
  display: grid;
  gap: 1rem;
  margin-bottom: 1rem;
}

.secondary-entry-details {
  margin-top: 1rem;
  padding: 0.4rem 0;
  border-top: 1px solid rgba(91, 91, 91, 0.12);
}

.text-link {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 0;
  color: #2563eb;
  font: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.auth-reset-link {
  display: inline-block;
  width: fit-content;
  margin-top: 0.7rem;
}

.auth-reset-modal {
  z-index: 1200;
}

.auth-reset-card {
  width: min(92vw, 430px);
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 72px rgba(15, 23, 42, 0.22);
}

.auth-reset-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
}

.auth-reset-steps span {
  display: grid;
  place-items: center;
  min-height: 2rem;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #475569;
  font-weight: 800;
}

.auth-reset-steps span.is-active {
  border-color: #2563eb;
  background: #dbeafe;
  color: #1d4ed8;
}

.auth-reset-message {
  padding: 0.75rem 0.85rem;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-weight: 700;
}

.auth-reset-message[data-tone="error"] {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.auth-reset-message[data-tone="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.secondary-entry-details summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}

.secondary-entry-body {
  padding-top: 0.9rem;
  display: grid;
  gap: 0.85rem;
}

.auth-shell {
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-page {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  display: grid;
  gap: 1.4rem;
}

.auth-hero,
.auth-card {
  background: var(--surface);
  backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
}

.auth-hero {
  display: grid;
  gap: 0.9rem;
}

.brand-logo-auth {
  width: min(100%, 320px);
}

.auth-hero h1 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 0.96;
}

.auth-card .stack-form {
  margin-top: 1rem;
}

.auth-support-grid,
.auth-card-grid {
  display: grid;
  gap: 1rem;
}

.auth-support-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 0.35rem;
}

.auth-card-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-support-card {
  display: grid;
  gap: 0.45rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(46, 32, 17, 0.08);
  box-shadow: 0 12px 24px rgba(72, 48, 24, 0.04);
}

.auth-support-card p {
  color: var(--muted);
  line-height: 1.6;
}

.compact-support-card {
  padding: 0.9rem 1rem;
}

.auth-mini-checklist,
.auth-inline-links {
  display: grid;
  gap: 0.8rem;
}

.auth-inline-links {
  margin-top: 1rem;
}

.auth-error {
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  background: rgba(182, 60, 53, 0.08);
  border: 1px solid rgba(182, 60, 53, 0.22);
  color: var(--danger);
}

.portal-auth-page {
  grid-template-columns: 1fr;
}

.portal-auth-compact {
  width: min(760px, 100%);
}

.portal-login-card,
.portal-login-grid {
  display: grid;
  gap: 1rem;
}

.portal-login-grid {
  grid-template-columns: 1fr;
}

@media (max-width: 1240px) {
  .auth-support-grid,
  .auth-card-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 980px) {
  .auth-page-unified {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .auth-support-grid,
  .auth-card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .auth-page {
    width: min(100% - 0.75rem, 100%);
  }

  .auth-card,
  .auth-hero {
    padding: 1rem;
  }
}
