/* ============================================================
   SCHEDMATE AUTH EXPERIENCE — LUXURY SPLIT LAYOUT v101
   Used by /auth/login.html and /auth/signup.html only.
============================================================ */
:root {
  --auth-ink: #07111f;
  --auth-ink-2: #10233d;
  --auth-paper: #f7f8fb;
  --auth-card: rgba(255, 255, 255, 0.94);
  --auth-text: #101828;
  --auth-muted: #667085;
  --auth-line: #dfe4ec;
  --auth-line-strong: #c8d0dc;
  --auth-brand: #4169e1;
  --auth-brand-dark: #2949b8;
  --auth-accent: #8ce6d0;
  --auth-success: #18805f;
  --auth-danger: #c93c55;
  --auth-warning: #a86812;
  --auth-ring: 0 0 0 4px rgba(65, 105, 225, 0.14);
  --auth-shadow: 0 34px 90px rgba(10, 24, 45, 0.19);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--auth-paper); }
body.sm-auth-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 82% 4%, rgba(65, 105, 225, 0.12), transparent 30rem),
    linear-gradient(135deg, #f4f5f8 0%, #fbfbfd 58%, #eef3fb 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.sm-auth-page a { color: inherit; text-decoration: none; }
.sm-auth-page button,
.sm-auth-page input { font: inherit; }
.sm-auth-page button { -webkit-tap-highlight-color: transparent; }

.sm-auth-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 0.93fr) minmax(520px, 1.07fr);
}

.sm-auth-story {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 4.8vw, 72px);
  color: #f8fbff;
  background:
    radial-gradient(circle at 12% 12%, rgba(128, 166, 255, 0.28), transparent 24rem),
    radial-gradient(circle at 85% 82%, rgba(140, 230, 208, 0.18), transparent 28rem),
    linear-gradient(145deg, #06101d 0%, #0c1c32 58%, #102846 100%);
}

.sm-auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -2;
  opacity: 0.28;
  background-image:
    linear-gradient(rgba(255,255,255,0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.sm-auth-story::after {
  content: "";
  position: absolute;
  width: 34rem;
  height: 34rem;
  right: -17rem;
  bottom: -15rem;
  z-index: -1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow:
    0 0 0 70px rgba(255,255,255,0.025),
    0 0 0 140px rgba(255,255,255,0.018);
}

.sm-auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: #fff;
}

.sm-auth-brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: linear-gradient(145deg, #7fa0ff, #4169e1);
  box-shadow: 0 18px 42px rgba(65, 105, 225, 0.34), inset 0 1px 0 rgba(255,255,255,0.36);
}

.sm-auth-brand-mark svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sm-auth-brand-copy { display: grid; line-height: 1.08; }
.sm-auth-brand-copy strong { font-size: 1.05rem; letter-spacing: -0.02em; }
.sm-auth-brand-copy small { margin-top: 4px; color: rgba(235, 242, 255, 0.68); font-size: 0.74rem; font-weight: 650; }

.sm-auth-story-main { max-width: 620px; margin: clamp(70px, 12vh, 150px) 0 auto; }
.sm-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 22px;
  color: #bcd0ff;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.sm-auth-eyebrow::before { content: ""; width: 24px; height: 1px; background: #8ce6d0; }

.sm-auth-story h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2.55rem, 5.2vw, 5.35rem);
  line-height: 0.97;
  letter-spacing: -0.062em;
  font-weight: 760;
}

.sm-auth-story-lead {
  max-width: 570px;
  margin: 26px 0 0;
  color: rgba(235, 242, 255, 0.73);
  font-size: clamp(1rem, 1.25vw, 1.16rem);
  line-height: 1.7;
}

.sm-auth-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 38px;
}

.sm-auth-benefit {
  min-height: 124px;
  padding: 17px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 20px;
  background: rgba(255,255,255,0.055);
  backdrop-filter: blur(14px);
}
.sm-auth-benefit svg {
  width: 21px;
  height: 21px;
  margin-bottom: 21px;
  fill: none;
  stroke: #9bb5ff;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sm-auth-benefit strong { display: block; font-size: 0.86rem; letter-spacing: -0.015em; }
.sm-auth-benefit span { display: block; margin-top: 7px; color: rgba(235,242,255,0.58); font-size: 0.74rem; line-height: 1.45; }

.sm-auth-story-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 54px;
  color: rgba(235,242,255,0.52);
  font-size: 0.75rem;
}
.sm-auth-secure { display: inline-flex; align-items: center; gap: 8px; }
.sm-auth-secure svg { width: 16px; height: 16px; fill: none; stroke: #8ce6d0; stroke-width: 2; }

.sm-auth-workspace {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: clamp(26px, 5vw, 76px);
}

.sm-auth-mobile-brand { display: none; }

.sm-auth-panel {
  width: min(100%, 520px);
  animation: sm-auth-arrive 0.55s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes sm-auth-arrive {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.sm-auth-step {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 25px;
  color: #667085;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.sm-auth-step::before { content: ""; width: 34px; height: 2px; border-radius: 999px; background: linear-gradient(90deg, #4169e1, #8ce6d0); }

.sm-auth-panel h2 {
  margin: 0;
  color: #0e1729;
  font-size: clamp(2rem, 3.4vw, 3.05rem);
  line-height: 1.03;
  letter-spacing: -0.052em;
  font-weight: 770;
}

.sm-auth-subtitle {
  margin: 15px 0 0;
  color: var(--auth-muted);
  font-size: 0.98rem;
  line-height: 1.65;
}

.sm-auth-form {
  display: grid;
  gap: 17px;
  margin-top: 31px;
}

.sm-auth-field { display: grid; gap: 8px; }
.sm-auth-field-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sm-auth-field label,
.sm-auth-label {
  color: #344054;
  font-size: 0.82rem;
  font-weight: 760;
  letter-spacing: -0.01em;
}
.sm-auth-field-row a { color: var(--auth-brand-dark); font-size: 0.79rem; font-weight: 760; }
.sm-auth-field-row a:hover { text-decoration: underline; text-underline-offset: 3px; }

.sm-auth-input-wrap { position: relative; }
.sm-auth-input-wrap > svg {
  position: absolute;
  left: 15px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: #98a2b3;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.sm-auth-field input,
.sm-auth-field select {
  width: 100%;
  height: 54px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  outline: 0;
  color: #101828;
  background: rgba(255,255,255,0.84);
  padding: 0 48px 0 46px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.03), inset 0 1px 0 rgba(255,255,255,0.8);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.sm-auth-field select {
  appearance: none;
  cursor: pointer;
}
.sm-auth-field input::placeholder { color: #a0a8b5; }
.sm-auth-field input:hover,
.sm-auth-field select:hover { border-color: var(--auth-line-strong); background: #fff; }
.sm-auth-field input:focus,
.sm-auth-field select:focus { border-color: #6f8bf0; background: #fff; box-shadow: var(--auth-ring); }
.sm-auth-field input[aria-invalid="true"] { border-color: #e26a7e; box-shadow: 0 0 0 4px rgba(201,60,85,0.10); }

.sm-auth-toggle {
  position: absolute;
  top: 50%;
  right: 9px;
  width: 38px;
  height: 38px;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 11px;
  color: #667085;
  background: transparent;
  cursor: pointer;
}
.sm-auth-toggle:hover { color: #344054; background: #f1f4f8; }
.sm-auth-toggle svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.sm-auth-hint { margin: 0; color: #7b8493; font-size: 0.76rem; line-height: 1.45; }
.sm-auth-field-error { min-height: 16px; margin: -2px 0 0; color: var(--auth-danger); font-size: 0.75rem; font-weight: 650; }

.sm-auth-password-meter { display: grid; gap: 8px; margin-top: 1px; }
.sm-auth-meter-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.sm-auth-meter-bars i { height: 4px; border-radius: 999px; background: #e3e7ee; transition: background .2s ease; }
.sm-auth-password-meter[data-strength="1"] i:nth-child(-n+1) { background: #d55068; }
.sm-auth-password-meter[data-strength="2"] i:nth-child(-n+2) { background: #d88a2f; }
.sm-auth-password-meter[data-strength="3"] i:nth-child(-n+3) { background: #4f82d9; }
.sm-auth-password-meter[data-strength="4"] i:nth-child(-n+4) { background: #239b73; }
.sm-auth-meter-copy { color: #7b8493; font-size: 0.73rem; }

.sm-auth-consent {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: #667085;
  font-size: 0.78rem;
  line-height: 1.55;
}
.sm-auth-consent input { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--auth-brand); }
.sm-auth-consent a { color: #344fb2; font-weight: 760; }
.sm-auth-consent a:hover { text-decoration: underline; }

.sm-auth-submit {
  position: relative;
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(135deg, #4169e1, #2f54c6);
  box-shadow: 0 16px 34px rgba(65,105,225,0.24), inset 0 1px 0 rgba(255,255,255,0.2);
  font-weight: 790;
  letter-spacing: -0.015em;
  cursor: pointer;
  transition: transform .16s ease, box-shadow .16s ease, filter .16s ease;
}
.sm-auth-submit:hover { transform: translateY(-1px); box-shadow: 0 21px 42px rgba(65,105,225,0.3); filter: saturate(1.06); }
.sm-auth-submit:active { transform: translateY(0); }
.sm-auth-submit:disabled { cursor: wait; opacity: .68; transform: none; }
.sm-auth-submit svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sm-auth-spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: sm-auth-spin .75s linear infinite; }
.sm-auth-submit.is-loading .sm-auth-spinner { display: block; }
.sm-auth-submit.is-loading .sm-auth-button-icon { display: none; }
@keyframes sm-auth-spin { to { transform: rotate(360deg); } }

.sm-auth-message {
  min-height: 20px;
  margin: 0;
  padding: 0;
  color: #667085;
  font-size: 0.79rem;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}
.sm-auth-message.ok { color: var(--auth-success); }
.sm-auth-message.err { color: var(--auth-danger); }

.sm-auth-divider {
  display: flex;
  align-items: center;
  gap: 13px;
  margin: 1px 0;
  color: #98a2b3;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.sm-auth-divider::before,
.sm-auth-divider::after { content: ""; flex: 1; height: 1px; background: #e4e7ec; }

.sm-auth-switch {
  display: flex;
  justify-content: center;
  gap: 7px;
  color: #667085;
  font-size: 0.85rem;
}
.sm-auth-switch a { color: #2949b8; font-weight: 800; }
.sm-auth-switch a:hover { text-decoration: underline; text-underline-offset: 3px; }

.sm-auth-trust {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 23px;
  color: #7b8493;
  font-size: 0.72rem;
}
.sm-auth-trust span { display: inline-flex; align-items: center; gap: 6px; }
.sm-auth-trust svg { width: 14px; height: 14px; fill: none; stroke: #667085; stroke-width: 1.8; }

.sm-auth-back {
  position: absolute;
  top: 28px;
  right: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #667085;
  font-size: 0.78rem;
  font-weight: 760;
}
.sm-auth-back:hover { color: #344054; }
.sm-auth-back svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; }

.sm-auth-invite {
  display: none;
  margin: 23px 0 0;
  padding: 14px 16px;
  border: 1px solid #bce8db;
  border-radius: 14px;
  color: #17664f;
  background: #effbf7;
  font-size: 0.81rem;
  font-weight: 700;
  line-height: 1.45;
}
.sm-auth-invite:not(.hidden) { display: block; }
.hidden { display: none !important; }

@media (max-width: 1080px) {
  .sm-auth-layout { grid-template-columns: minmax(350px, .78fr) minmax(480px, 1.22fr); }
  .sm-auth-story { padding: 38px; }
  .sm-auth-benefits { grid-template-columns: 1fr; }
  .sm-auth-benefit { min-height: 0; display: grid; grid-template-columns: 25px 1fr; column-gap: 12px; }
  .sm-auth-benefit svg { margin: 0; grid-row: span 2; }
}

@media (max-width: 820px) {
  body.sm-auth-page { background: linear-gradient(145deg, #eef2f8, #fbfbfd); }
  .sm-auth-layout { display: block; }
  .sm-auth-story { display: none; }
  .sm-auth-workspace { min-height: 100svh; padding: 28px 20px 40px; align-content: center; }
  .sm-auth-mobile-brand { display: inline-flex; margin-bottom: 42px; color: #0e1729; }
  .sm-auth-mobile-brand .sm-auth-brand-copy small { color: #7b8493; }
  .sm-auth-panel { width: min(100%, 520px); }
  .sm-auth-back { top: 22px; right: 22px; }
}

@media (max-width: 520px) {
  .sm-auth-workspace { place-items: start; padding: 24px 18px 34px; }
  .sm-auth-mobile-brand { margin-bottom: 48px; }
  .sm-auth-panel h2 { font-size: 2.25rem; }
  .sm-auth-form { margin-top: 26px; gap: 15px; }
  .sm-auth-trust { flex-direction: column; align-items: center; gap: 7px; }
  .sm-auth-back { position: static; margin: 26px auto 0; width: fit-content; }
}

@media (prefers-reduced-motion: reduce) {
  .sm-auth-panel { animation: none; }
  .sm-auth-submit, .sm-auth-field input { transition: none; }
}


/* Google OAuth — v105 */
.sm-auth-oauth {
  position: relative;
  width: 100%;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 1px solid #d7dde7;
  border-radius: 16px;
  color: #1d2939;
  background: rgba(255,255,255,.94);
  box-shadow: 0 7px 22px rgba(16,24,40,.06), inset 0 1px 0 rgba(255,255,255,.92);
  font-weight: 780;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.sm-auth-oauth:hover { transform: translateY(-1px); border-color: #b9c3d2; background: #fff; box-shadow: 0 12px 28px rgba(16,24,40,.09); }
.sm-auth-oauth:focus-visible { outline: 0; border-color: #6f8bf0; box-shadow: var(--auth-ring); }
.sm-auth-oauth:disabled { cursor: wait; opacity: .66; transform: none; }
.sm-auth-google-mark { width: 20px; height: 20px; flex: 0 0 20px; }
.sm-auth-oauth-spinner { display: none; width: 17px; height: 17px; border: 2px solid rgba(65,105,225,.25); border-top-color: #4169e1; border-radius: 50%; animation: sm-auth-spin .75s linear infinite; }
.sm-auth-oauth.is-loading .sm-auth-google-mark { display: none; }
.sm-auth-oauth.is-loading .sm-auth-oauth-spinner { display: block; }
.sm-auth-divider-email { margin-block: -2px 1px; }
.sm-auth-oauth-legal { margin: -7px 12px 0; color: #7b8493; font-size: .72rem; line-height: 1.5; text-align: center; }
.sm-auth-oauth-legal a { color: #344fb2; font-weight: 760; }
.sm-auth-oauth-legal a:hover { text-decoration: underline; }


.sm-oauth-callback-shell { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.sm-oauth-callback-card { width: min(100%, 470px); display: grid; justify-items: center; padding: 42px; border: 1px solid rgba(255,255,255,.1); border-radius: 26px; color: #f4f8ff; background: linear-gradient(145deg,#071321,#10243d); box-shadow: 0 36px 100px rgba(4,13,26,.34); text-align: center; }
.sm-oauth-callback-card .sm-auth-brand-mark { margin-bottom: 24px; color: #fff; }
.sm-oauth-callback-card h1 { margin: 22px 0 8px; font-size: 1.8rem; letter-spacing: -.04em; }
.sm-oauth-callback-card p { margin: 0; color: rgba(232,240,251,.68); line-height: 1.65; }
.sm-oauth-callback-card a { margin-top: 23px; padding: 11px 16px; border-radius: 12px; color: #fff; background: #5868ec; font-weight: 760; }
.sm-oauth-callback-spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.17); border-top-color: #91a7ff; border-radius: 50%; animation: sm-auth-spin .78s linear infinite; }

/* ============================================================
   DARK MODE — auth workspace (login / signup / forgot / reset / confirm)
   The left "story" panel and the OAuth callback card are intentional
   always-dark brand surfaces and are unchanged by theme. Everything
   below re-themes the light workspace panel and form.
============================================================ */
html.dark, html[data-theme="dark"] {
  --auth-paper: #0b0f19;
  --auth-card: rgba(20,26,45,.9);
  --auth-text: #f4f6fb;
  --auth-muted: rgba(244,246,251,.64);
  --auth-line: rgba(148,163,184,.22);
  --auth-line-strong: rgba(148,163,184,.34);
}

html.dark body.sm-auth-page,
html[data-theme="dark"] body.sm-auth-page {
  color: var(--auth-text);
  background:
    radial-gradient(circle at 82% 4%, rgba(65,105,225,.16), transparent 30rem),
    linear-gradient(135deg, #0b0f19 0%, #0e1324 58%, #0c1120 100%);
}

html.dark .sm-auth-panel h2,
html[data-theme="dark"] .sm-auth-panel h2,
html.dark .sm-auth-field label,
html[data-theme="dark"] .sm-auth-field label,
html.dark .sm-auth-label,
html[data-theme="dark"] .sm-auth-label,
html.dark .sm-auth-field input,
html[data-theme="dark"] .sm-auth-field input,
html.dark .sm-auth-mobile-brand,
html[data-theme="dark"] .sm-auth-mobile-brand {
  color: var(--auth-text);
}

html.dark .sm-auth-field input,
html[data-theme="dark"] .sm-auth-field input {
  background: rgba(255,255,255,.06);
  border-color: var(--auth-line);
}
html.dark .sm-auth-field input::placeholder,
html[data-theme="dark"] .sm-auth-field input::placeholder { color: rgba(244,246,251,.4); }
html.dark .sm-auth-field input:hover,
html[data-theme="dark"] .sm-auth-field input:hover,
html.dark .sm-auth-field input:focus,
html[data-theme="dark"] .sm-auth-field input:focus { background: rgba(255,255,255,.09); }

html.dark .sm-auth-hint,
html[data-theme="dark"] .sm-auth-hint,
html.dark .sm-auth-message,
html[data-theme="dark"] .sm-auth-message,
html.dark .sm-auth-divider,
html[data-theme="dark"] .sm-auth-divider,
html.dark .sm-auth-switch,
html[data-theme="dark"] .sm-auth-switch,
html.dark .sm-auth-trust,
html[data-theme="dark"] .sm-auth-trust,
html.dark .sm-auth-back,
html[data-theme="dark"] .sm-auth-back,
html.dark .sm-auth-meter-copy,
html[data-theme="dark"] .sm-auth-meter-copy,
html.dark .sm-auth-oauth-legal,
html[data-theme="dark"] .sm-auth-oauth-legal,
html.dark .sm-auth-consent,
html[data-theme="dark"] .sm-auth-consent {
  color: var(--auth-muted);
}
html.dark .sm-auth-divider::before, html.dark .sm-auth-divider::after,
html[data-theme="dark"] .sm-auth-divider::before, html[data-theme="dark"] .sm-auth-divider::after {
  background: var(--auth-line);
}
html.dark .sm-auth-back:hover,
html[data-theme="dark"] .sm-auth-back:hover { color: var(--auth-text); }

html.dark .sm-auth-toggle,
html[data-theme="dark"] .sm-auth-toggle { color: var(--auth-muted); }
html.dark .sm-auth-toggle:hover,
html[data-theme="dark"] .sm-auth-toggle:hover { color: var(--auth-text); background: rgba(255,255,255,.08); }

html.dark .sm-auth-oauth,
html[data-theme="dark"] .sm-auth-oauth {
  color: var(--auth-text);
  background: rgba(255,255,255,.05);
  border-color: var(--auth-line);
}
html.dark .sm-auth-oauth:hover,
html[data-theme="dark"] .sm-auth-oauth:hover { background: rgba(255,255,255,.08); border-color: var(--auth-line-strong); }

html.dark .sm-auth-invite,
html[data-theme="dark"] .sm-auth-invite {
  color: #b8eadf;
  background: rgba(34,197,94,.1);
  border-color: rgba(140,230,208,.28);
}

@media (max-width: 820px) {
  html.dark body.sm-auth-page,
  html[data-theme="dark"] body.sm-auth-page {
    background: linear-gradient(145deg, #0b0f19, #0e1324);
  }
}

/* ============================================================
   v115 SaaS authentication journey
============================================================ */
.sm-signup-flow { display: grid; }
.sm-signup-stage { display: grid; gap: 17px; animation: sm-stage-in .28s ease both; }
.sm-signup-stage[hidden] { display: none !important; }
@keyframes sm-stage-in { from { opacity: 0; transform: translateX(9px); } to { opacity: 1; transform: none; } }

.sm-auth-action-row { display: grid; grid-template-columns: 112px 1fr; gap: 10px; }
.sm-auth-secondary,
.sm-auth-text-button {
  border: 0;
  font: inherit;
  cursor: pointer;
}
.sm-auth-secondary {
  min-height: 54px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  color: #344054;
  background: rgba(255,255,255,.72);
  font-weight: 780;
}
.sm-auth-secondary:hover { border-color: var(--auth-line-strong); background: #fff; }
.sm-auth-secondary:disabled { opacity: .55; cursor: wait; }
.sm-auth-text-button { padding: 8px; color: #344fb2; background: transparent; font-weight: 780; }
.sm-auth-text-button:hover { text-decoration: underline; text-underline-offset: 3px; }

.sm-auth-account-chip {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 11px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid var(--auth-line);
  border-radius: 16px;
  background: rgba(247,249,252,.78);
}
.sm-auth-account-chip > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(145deg,#4169e1,#2844aa);
  font-weight: 850;
}
.sm-auth-account-chip div { min-width: 0; display: grid; }
.sm-auth-account-chip strong,
.sm-auth-account-chip small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sm-auth-account-chip strong { color: #172033; font-size: .84rem; }
.sm-auth-account-chip small { margin-top: 3px; color: #7b8493; font-size: .72rem; }
.sm-auth-account-chip button { border: 0; color: #344fb2; background: transparent; font-weight: 780; cursor: pointer; }

.sm-auth-trial-card {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border: 1px solid rgba(65,105,225,.17);
  border-radius: 18px;
  background: linear-gradient(145deg,rgba(65,105,225,.08),rgba(140,230,208,.08));
}
.sm-auth-trial-card > span { display: grid; place-items: center; min-height: 48px; border-radius: 14px; color: #2f54c6; background: rgba(255,255,255,.78); font-size: .78rem; font-weight: 850; }
.sm-auth-trial-card div { display: grid; gap: 4px; }
.sm-auth-trial-card strong { color: #202b40; font-size: .8rem; }
.sm-auth-trial-card small { color: #6e7888; font-size: .71rem; line-height: 1.45; }

.sm-auth-blueprint {
  position: relative;
  display: grid;
  gap: 4px;
  margin-top: 36px;
  padding: 7px 0;
}
.sm-auth-blueprint-track { position: absolute; left: 20px; top: 28px; bottom: 28px; width: 1px; background: linear-gradient(#8ce6d0,rgba(140,230,208,.15)); }
.sm-auth-blueprint article { position: relative; display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: center; min-height: 72px; padding: 10px 13px 10px 0; border-radius: 18px; }
.sm-auth-blueprint article:first-of-type { background: rgba(255,255,255,.055); }
.sm-auth-blueprint i { z-index: 1; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid rgba(255,255,255,.15); border-radius: 14px; color: #bcd0ff; background: #0d1b2d; font-size: .72rem; font-style: normal; font-weight: 850; }
.sm-auth-blueprint div { display: grid; gap: 4px; }
.sm-auth-blueprint strong { font-size: .86rem; }
.sm-auth-blueprint span { color: rgba(235,242,255,.58); font-size: .75rem; }
.sm-auth-blueprint b { padding: 5px 8px; border-radius: 999px; color: #9cf0db; background: rgba(140,230,208,.1); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }

.sm-auth-workspace-preview,
.sm-auth-day-card {
  margin-top: 30px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 24px;
  background: linear-gradient(145deg,rgba(255,255,255,.085),rgba(255,255,255,.035));
  box-shadow: 0 28px 70px rgba(0,0,0,.18);
  backdrop-filter: blur(16px);
}
.sm-auth-preview-head,
.sm-auth-day-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 17px 18px; border-bottom: 1px solid rgba(255,255,255,.09); }
.sm-auth-preview-head span { color: rgba(235,242,255,.72); font-size: .75rem; font-weight: 760; }
.sm-auth-preview-head b,
.sm-auth-day-head > span { padding: 5px 9px; border-radius: 999px; color: #9cf0db; background: rgba(140,230,208,.11); font-size: .63rem; letter-spacing: .06em; text-transform: uppercase; }
.sm-auth-preview-grid { display: grid; grid-template-columns: repeat(3,1fr); }
.sm-auth-preview-grid > div { display: grid; gap: 6px; padding: 19px 18px; border-right: 1px solid rgba(255,255,255,.08); }
.sm-auth-preview-grid > div:last-child { border-right: 0; }
.sm-auth-preview-grid small { color: rgba(235,242,255,.5); font-size: .66rem; text-transform: uppercase; letter-spacing: .08em; }
.sm-auth-preview-grid strong { font-size: 1.45rem; letter-spacing: -.04em; }
.sm-auth-preview-grid span { color: rgba(235,242,255,.52); font-size: .68rem; line-height: 1.4; }

.sm-auth-day-head div { display: grid; gap: 4px; }
.sm-auth-day-head small { color: rgba(235,242,255,.5); font-size: .64rem; text-transform: uppercase; letter-spacing: .08em; }
.sm-auth-day-head strong { font-size: .93rem; }
.sm-auth-day-line { display: grid; grid-template-columns: 44px 9px 1fr auto; gap: 12px; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sm-auth-day-line.is-current { background: rgba(65,105,225,.13); }
.sm-auth-day-line time { color: rgba(235,242,255,.48); font-size: .68rem; }
.sm-auth-day-line i { width: 8px; height: 8px; border-radius: 50%; background: #7fa0ff; box-shadow: 0 0 0 4px rgba(127,160,255,.12); }
.sm-auth-day-line div { display: grid; gap: 4px; }
.sm-auth-day-line strong { font-size: .78rem; }
.sm-auth-day-line span { color: rgba(235,242,255,.52); font-size: .67rem; }
.sm-auth-day-line b { color: #bcd0ff; font-size: .63rem; text-transform: uppercase; letter-spacing: .07em; }
.sm-auth-day-line.is-current b { color: #9cf0db; }
.sm-auth-day-foot { display: grid; grid-template-columns: 1fr 1fr; }
.sm-auth-day-foot span { padding: 15px 18px; color: rgba(235,242,255,.55); font-size: .69rem; }
.sm-auth-day-foot span + span { border-left: 1px solid rgba(255,255,255,.08); }
.sm-auth-day-foot strong { margin-right: 4px; color: #fff; font-size: .85rem; }

.sm-auth-check-email { display: grid; justify-items: center; gap: 14px; margin-top: 25px; text-align: center; animation: sm-auth-arrive .45s ease both; }
.sm-auth-check-email[hidden] { display: none !important; }
.sm-auth-mail-orbit,
.sm-auth-confirm-orbit { width: 76px; height: 76px; display: grid; place-items: center; border-radius: 25px; color: #fff; background: linear-gradient(145deg,#4169e1,#2948b2); box-shadow: 0 18px 44px rgba(65,105,225,.28),0 0 0 12px rgba(65,105,225,.07); }
.sm-auth-mail-orbit svg,
.sm-auth-confirm-orbit svg { width: 31px; height: 31px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sm-auth-check-kicker { color: #536aaf; font-size: .7rem; font-weight: 850; text-transform: uppercase; letter-spacing: .12em; }
.sm-auth-check-email h2 { margin: 0; }
.sm-auth-check-email > p { max-width: 430px; margin: 0; color: var(--auth-muted); line-height: 1.65; }
.sm-auth-check-email > p strong { color: #202b40; word-break: break-word; }
.sm-auth-check-actions { width: 100%; display: grid; gap: 9px; margin-top: 8px; }
.sm-auth-check-actions .sm-auth-submit { cursor: default; background: linear-gradient(135deg,#3d5dc6,#304aa4); }
.sm-auth-check-actions .sm-auth-submit:hover { transform: none; }

.sm-auth-center-shell { min-height: 100svh; display: grid; align-content: center; justify-items: center; gap: 25px; padding: 28px; background: radial-gradient(circle at 50% -10%,rgba(65,105,225,.18),transparent 34rem),linear-gradient(145deg,#07111f,#0e2037); }
.sm-auth-center-brand { color: #fff; }
.sm-auth-confirm-card { width: min(100%,520px); display: grid; justify-items: center; gap: 15px; padding: clamp(30px,6vw,52px); border: 1px solid rgba(255,255,255,.12); border-radius: 30px; color: #f6f8fc; background: rgba(13,25,43,.84); box-shadow: 0 35px 100px rgba(0,0,0,.35); backdrop-filter: blur(18px); text-align: center; }
.sm-auth-confirm-card h1 { margin: 0; font-size: clamp(1.8rem,5vw,2.65rem); line-height: 1.06; letter-spacing: -.05em; }
.sm-auth-confirm-card > p { margin: 0; color: rgba(235,242,255,.66); line-height: 1.65; }
.sm-auth-confirm-progress { width: 100%; height: 5px; margin-top: 6px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.08); }
.sm-auth-confirm-progress i { display: block; width: 34%; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#7fa0ff,#8ce6d0); animation: sm-confirm-progress 1.15s ease-in-out infinite alternate; }
@keyframes sm-confirm-progress { to { transform: translateX(195%); } }
.sm-auth-confirm-actions { width: 100%; display: grid; gap: 10px; margin-top: 5px; }
.sm-auth-confirm-actions .sm-auth-submit { text-decoration: none; }
.sm-auth-confirm-actions .sm-auth-text-button { color: #bcd0ff; text-decoration: none; }
.sm-auth-confirm-foot { font-size: .72rem; }
.is-confirm-error .sm-auth-confirm-orbit { background: linear-gradient(145deg,#ba3f57,#8c2f42); box-shadow: 0 18px 44px rgba(186,63,87,.24),0 0 0 12px rgba(186,63,87,.07); }

html.dark .sm-auth-secondary,
html[data-theme="dark"] .sm-auth-secondary,
html.dark .sm-auth-account-chip,
html[data-theme="dark"] .sm-auth-account-chip,
html.dark .sm-auth-trial-card > span,
html[data-theme="dark"] .sm-auth-trial-card > span { color: var(--auth-text); background: rgba(255,255,255,.055); border-color: var(--auth-line); }
html.dark .sm-auth-account-chip strong,
html[data-theme="dark"] .sm-auth-account-chip strong,
html.dark .sm-auth-trial-card strong,
html[data-theme="dark"] .sm-auth-trial-card strong,
html.dark .sm-auth-check-email > p strong,
html[data-theme="dark"] .sm-auth-check-email > p strong { color: var(--auth-text); }
html.dark .sm-auth-account-chip small,
html[data-theme="dark"] .sm-auth-account-chip small,
html.dark .sm-auth-trial-card small,
html[data-theme="dark"] .sm-auth-trial-card small { color: var(--auth-muted); }
html.dark .sm-auth-field select,
html[data-theme="dark"] .sm-auth-field select { color: var(--auth-text); background: rgba(255,255,255,.06); border-color: var(--auth-line); }
html.dark .sm-auth-field select option,
html[data-theme="dark"] .sm-auth-field select option { color: #101828; background: #fff; }

@media (max-width: 1080px) {
  .sm-auth-blueprint article { min-height: 64px; }
  .sm-auth-workspace-preview { display: none; }
}
@media (max-width: 520px) {
  .sm-auth-action-row { grid-template-columns: 1fr; }
  .sm-auth-action-row .sm-auth-secondary { order: 2; }
  .sm-auth-confirm-card { border-radius: 24px; padding: 30px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .sm-signup-stage,.sm-auth-check-email,.sm-auth-confirm-progress i { animation: none; }
}
