/**
 * Shared styles for login & register pages (user + admin).
 * Best practices: labels above inputs, clear focus states, accessible, gradient store-name headings.
 */
:root {
  --auth-bg-start: #f0f4ff;
  --auth-bg-end: #e8eef9;
  --auth-card-bg: #ffffff;
  --auth-card-shadow: 0 10px 40px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
  --auth-card-radius: 16px;
  --auth-input-border: #d1d9e6;
  --auth-input-focus: #6366f1;
  --auth-input-focus-ring: rgba(99, 102, 241, 0.25);
  --auth-label: #374151;
  --auth-text-muted: #6b7280;
  --auth-link: #4f46e5;
  --auth-link-hover: #4338ca;
  --auth-gradient-1: #6366f1;
  --auth-gradient-2: #8b5cf6;
  --auth-gradient-3: #a855f7;
  --auth-btn-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
  --auth-btn-hover: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #9333ea 100%);
}

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(145deg, var(--auth-bg-start) 0%, var(--auth-bg-end) 100%);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--auth-card-bg);
  border-radius: var(--auth-card-radius);
  box-shadow: var(--auth-card-shadow);
  overflow: hidden;
}

.auth-card-body {
  padding: 2rem 2rem 1.75rem;
}

/* Gradient heading: wrap store name in .auth-store-name */
.auth-heading {
  text-align: center;
  margin: 0 0 0.25rem 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.3;
}

.auth-heading .auth-store-name {
  background: var(--auth-btn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.auth-subtitle {
  text-align: center;
  font-size: 0.9375rem;
  color: var(--auth-text-muted);
  margin: 0 0 1.5rem 0;
}

/* Tenant indicator pill */
.auth-tenant-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  margin-bottom: 1.25rem;
  font-size: 0.8125rem;
  color: var(--auth-text-muted);
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
}

.auth-tenant-pill strong {
  color: #4338ca;
  margin-left: 0.25rem;
}

/* Form groups: label above input (best practice) */
.auth-form-group {
  margin-bottom: 1.25rem;
}

.auth-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-label);
  margin-bottom: 0.375rem;
}

.auth-input {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  line-height: 1.5;
  color: #1f2937;
  background: #fff;
  border: 1px solid var(--auth-input-border);
  border-radius: 10px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input::placeholder {
  color: #9ca3af;
}

.auth-input:hover {
  border-color: #a5b4d4;
}

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

.auth-input:focus-visible {
  outline: none;
}

/* Password container with toggle */
.auth-password-wrap {
  position: relative;
}

.auth-password-wrap .auth-input {
  padding-right: 3rem;
}

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

.auth-password-toggle:hover {
  color: var(--auth-link);
  background: rgba(99, 102, 241, 0.08);
}

.auth-password-toggle:focus {
  outline: none;
  box-shadow: 0 0 0 2px var(--auth-input-focus-ring);
}

.auth-hint {
  font-size: 0.8125rem;
  color: var(--auth-text-muted);
  margin-top: 0.375rem;
}

/* Primary submit button with gradient */
.auth-btn-primary {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.875rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--auth-btn-gradient);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.auth-btn-primary:hover {
  background: var(--auth-btn-hover);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.45);
  transform: translateY(-1px);
}

.auth-btn-primary:active {
  transform: translateY(0);
}

.auth-btn-primary:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--auth-input-focus-ring);
}

.auth-btn-primary:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Message area */
.auth-message {
  margin-top: 1rem;
  min-height: 1.5rem;
}

.auth-alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.auth-alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* When auth.js sets .alert.alert-success / .alert.alert-danger on #form-message */
.auth-message.alert,
#form-message.alert {
  padding: 0.75rem 1rem;
  border-radius: 10px;
  font-size: 0.875rem;
}

.auth-message.alert-success,
#form-message.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-message.alert-danger,
#form-message.alert-danger {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-message.alert a,
#form-message.alert a {
  color: #059669;
  font-weight: 500;
}

/* Links row */
.auth-links {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.auth-link {
  color: var(--auth-link);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s ease;
}

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

.auth-link:focus-visible {
  outline: 2px solid var(--auth-input-focus);
  outline-offset: 2px;
  border-radius: 4px;
}

/* Optional gradient text for single line (e.g. "Create account") */
.auth-gradient-text {
  background: var(--auth-btn-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Admin variant: slightly different accent if needed */
.auth-page.admin-theme .auth-tenant-pill {
  background: rgba(16, 185, 129, 0.08);
  border-color: rgba(16, 185, 129, 0.25);
}

.auth-page.admin-theme .auth-tenant-pill strong {
  color: #047857;
}

@media (max-width: 480px) {
  .auth-card-body {
    padding: 1.5rem 1.25rem 1.5rem;
  }

  .auth-heading {
    font-size: 1.35rem;
  }

  .auth-links {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
  }
}

/* Storefront customer auth pages */
.storefront-auth-page {
  --auth-brand: #e8420e;
  --auth-brand-dark: #c23208;
  --auth-brand-light: #fff0eb;
  --auth-ink: #0f0d0b;
  --auth-ink-soft: #3a3530;
  --auth-muted: #7a736c;
  --auth-surface: #fafaf8;
  --auth-surface-2: #f2f0ec;
  --auth-surface-3: #e8e4de;
  min-height: 100vh;
  margin: 0;
  padding: 24px;
  display: block;
  background:
    radial-gradient(circle at top right, rgba(232, 66, 14, 0.14), transparent 28%),
    linear-gradient(180deg, #f7f2ec 0%, #efe9e2 100%);
  color: var(--auth-ink);
  font-family: 'DM Sans', sans-serif;
}

.storefront-auth-page .storefront-auth-shell {
  width: 100%;
  max-width: 1200px;
  min-height: calc(100vh - 48px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 520px);
  gap: 28px;
  align-items: stretch;
}

.storefront-auth-page .storefront-auth-showcase {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
  padding: 34px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(232, 66, 14, 0.4), transparent 30%),
    linear-gradient(155deg, #0f0d0b 0%, #1d1713 100%);
  color: rgba(255, 255, 255, 0.88);
  box-shadow: 0 30px 90px rgba(15, 13, 11, 0.18);
}

.storefront-auth-page .storefront-auth-showcase::after {
  content: '';
  position: absolute;
  right: -72px;
  bottom: -72px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
}

.storefront-auth-page .storefront-auth-brand {
  position: relative;
  z-index: 1;
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.storefront-auth-page .storefront-auth-brand-mark {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--auth-brand);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 21px;
  font-weight: 800;
}

.storefront-auth-page .storefront-auth-brand-text {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.storefront-auth-page .storefront-auth-copy,
.storefront-auth-page .storefront-auth-metrics,
.storefront-auth-page .storefront-auth-support {
  position: relative;
  z-index: 1;
}

.storefront-auth-page .storefront-auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.storefront-auth-page .storefront-auth-copy h1 {
  margin: 18px 0 12px;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.3rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.05em;
}

.storefront-auth-page .storefront-auth-copy p {
  max-width: 34rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 17px;
  line-height: 1.7;
}

.storefront-auth-page .storefront-auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.storefront-auth-page .storefront-auth-metric {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
}

.storefront-auth-page .storefront-auth-metric strong {
  display: block;
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 6px;
}

.storefront-auth-page .storefront-auth-metric span {
  display: block;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  line-height: 1.55;
}

.storefront-auth-page .storefront-auth-support {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.storefront-auth-page .storefront-auth-support-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.storefront-auth-page .storefront-auth-support-copy strong {
  color: #fff;
  font-size: 15px;
  font-weight: 600;
}

.storefront-auth-page .storefront-auth-support-copy span {
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}

.storefront-auth-page .storefront-auth-support-link {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.storefront-auth-page .storefront-auth-support-link:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.28);
  transform: translateY(-1px);
}

.storefront-auth-page .storefront-auth-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.storefront-auth-page .auth-card {
  width: 100%;
  max-width: none;
  border: 1px solid rgba(15, 13, 11, 0.08);
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 32px 90px rgba(15, 13, 11, 0.12);
  overflow: hidden;
}

.storefront-auth-page .auth-card-body {
  padding: 34px;
}

.storefront-auth-page .storefront-auth-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.storefront-auth-page .storefront-auth-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--auth-brand-light);
  color: var(--auth-brand);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.storefront-auth-page .storefront-auth-backlink {
  color: var(--auth-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s ease;
}

.storefront-auth-page .storefront-auth-backlink:hover {
  color: var(--auth-brand);
}

.storefront-auth-page .auth-heading {
  margin: 0 0 10px;
  color: var(--auth-ink);
  text-align: left;
  font-family: 'Syne', sans-serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.03;
  letter-spacing: -0.04em;
}

.storefront-auth-page .auth-heading .auth-store-name {
  background: linear-gradient(135deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.storefront-auth-page .auth-subtitle {
  max-width: 34ch;
  margin: 0 0 26px;
  color: var(--auth-muted);
  text-align: left;
  font-size: 15px;
  line-height: 1.7;
}

.storefront-auth-page .storefront-auth-grid {
  display: grid;
  gap: 16px;
}

.storefront-auth-page .storefront-auth-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.storefront-auth-page .auth-form-group {
  margin-bottom: 16px;
}

.storefront-auth-page .auth-label {
  margin-bottom: 8px;
  color: var(--auth-ink-soft);
  font-size: 13px;
  font-weight: 600;
}

.storefront-auth-page .auth-input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border: 1.5px solid var(--auth-surface-3);
  border-radius: 16px;
  background: var(--auth-surface-2);
  color: var(--auth-ink);
  font-size: 15px;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

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

.storefront-auth-page .auth-input:hover {
  border-color: #d8d0c6;
}

.storefront-auth-page .auth-input:focus {
  border-color: var(--auth-brand);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(232, 66, 14, 0.08);
}

.storefront-auth-page .auth-password-wrap .auth-input {
  padding-right: 92px;
}

.storefront-auth-page .auth-password-toggle {
  right: 10px;
  width: auto;
  min-width: 58px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid rgba(15, 13, 11, 0.08);
  border-radius: 999px;
  background: #fff;
  color: var(--auth-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.storefront-auth-page .auth-password-toggle:hover {
  background: var(--auth-brand-light);
  color: var(--auth-brand);
}

.storefront-auth-page .auth-hint {
  margin-top: 7px;
  color: var(--auth-muted);
  font-size: 12px;
  line-height: 1.55;
}

.storefront-auth-page .auth-btn-primary {
  width: 100%;
  min-height: 56px;
  margin-top: 8px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--auth-brand) 0%, var(--auth-brand-dark) 100%);
  box-shadow: 0 16px 34px rgba(232, 66, 14, 0.22);
  color: #fff;
  font-family: 'Syne', sans-serif;
  font-size: 16px;
  font-weight: 700;
}

.storefront-auth-page .auth-btn-primary:hover {
  background: linear-gradient(135deg, #f04f18 0%, #c23208 100%);
  box-shadow: 0 18px 36px rgba(232, 66, 14, 0.28);
}

.storefront-auth-page .auth-message {
  margin-top: 16px;
  min-height: 0;
}

.storefront-auth-page .auth-message.alert,
.storefront-auth-page #form-message.alert {
  border-radius: 16px;
}

.storefront-auth-page .auth-links {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--auth-surface-3);
}

.storefront-auth-page .auth-link {
  color: var(--auth-brand);
  font-size: 14px;
  font-weight: 600;
}

.storefront-auth-page .auth-link:hover {
  color: var(--auth-brand-dark);
}

.storefront-auth-page .auth-tenant-pill {
  margin-bottom: 20px;
  background: var(--auth-brand-light);
  border-color: rgba(232, 66, 14, 0.18);
  color: var(--auth-muted);
}

.storefront-auth-page .auth-tenant-pill strong {
  color: var(--auth-brand);
}

html[data-storefront-template="classic"] .storefront-auth-page {
  background: linear-gradient(180deg, #f4f6fb 0%, #eef2f8 100%);
  color: #1f2937;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-shell {
  max-width: 520px;
  min-height: calc(100vh - 48px);
  grid-template-columns: 1fr;
  gap: 0;
  align-items: center;
}

html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-showcase {
  display: none;
}

html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-panel {
  justify-content: center;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-card {
  max-width: 480px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-card-body {
  padding: 32px;
}

html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-topline {
  margin-bottom: 18px;
}

html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-pill {
  background: rgba(13, 110, 253, 0.08);
  color: #0d6efd;
}

html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-backlink {
  color: #64748b;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-heading {
  margin-bottom: 10px;
  color: #111827;
  text-align: center;
  font-family: inherit;
  font-size: 1.7rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-heading .auth-store-name {
  background: linear-gradient(135deg, #0d6efd 0%, #2563eb 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-subtitle {
  max-width: none;
  margin: 0 0 22px;
  color: #6b7280;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.65;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-label {
  color: #374151;
  font-size: 0.875rem;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-input {
  min-height: 50px;
  border-width: 1px;
  border-radius: 12px;
  background: #ffffff;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-input:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.12);
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-password-wrap .auth-input {
  padding-right: 84px;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-password-toggle {
  min-width: 54px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.08);
  font-size: 12px;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-btn-primary {
  min-height: 50px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d6efd 0%, #2563eb 100%);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
  font-family: inherit;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-btn-primary:hover {
  background: linear-gradient(135deg, #0b5ed7 0%, #1d4ed8 100%);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-links {
  justify-content: center;
  text-align: center;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-link {
  color: #0d6efd;
}

html[data-storefront-template="classic"] .storefront-auth-page .auth-link:hover {
  color: #0b5ed7;
}

@media (max-width: 1040px) {
  .storefront-auth-page .storefront-auth-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .storefront-auth-page .storefront-auth-panel {
    justify-content: stretch;
  }

  html[data-storefront-template="modern"] .storefront-auth-page .storefront-auth-panel {
    order: 1;
  }

  html[data-storefront-template="modern"] .storefront-auth-page .storefront-auth-showcase {
    order: 2;
  }
}

@media (max-width: 720px) {
  .storefront-auth-page {
    padding: 16px;
  }

  .storefront-auth-page .storefront-auth-showcase,
  .storefront-auth-page .auth-card-body {
    padding: 26px;
  }

  .storefront-auth-page .storefront-auth-metrics {
    grid-template-columns: 1fr;
  }

  .storefront-auth-page .storefront-auth-topline,
  .storefront-auth-page .storefront-auth-support {
    flex-direction: column;
    align-items: flex-start;
  }

  .storefront-auth-page .storefront-auth-grid-2 {
    grid-template-columns: 1fr;
  }

  .storefront-auth-page .auth-links {
    flex-direction: column;
    align-items: stretch;
    text-align: left;
  }

  html[data-storefront-template="modern"] .storefront-auth-page .storefront-auth-showcase {
    display: none;
  }
}

@media (max-width: 520px) {
  .storefront-auth-page {
    padding: 12px;
  }

  .storefront-auth-page .storefront-auth-shell {
    gap: 16px;
  }

  .storefront-auth-page .storefront-auth-showcase,
  .storefront-auth-page .auth-card-body {
    padding: 22px;
    border-radius: 24px;
  }

  .storefront-auth-page .auth-card {
    border-radius: 24px;
  }

  .storefront-auth-page .storefront-auth-brand-text {
    font-size: 22px;
  }

  .storefront-auth-page .storefront-auth-copy h1 {
    font-size: 2.1rem;
  }

  html[data-storefront-template="classic"] .storefront-auth-page .auth-card-body {
    padding: 24px 20px;
  }

  html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  html[data-storefront-template="classic"] .storefront-auth-page .storefront-auth-grid-2 {
    grid-template-columns: 1fr;
  }
}
