/* ==========================================================================
   PyWorks SaaS 50/50 Split Authentication Layout (Login & Signup)
   Aligned with index.html Pearl Design System
   ========================================================================== */

:root {
  --bg-pearl: #F6F7FB;
  --bg-card: #FFFFFF;
  --ink: #111322;
  --ink-soft: #5C6178;
  --ink-faint: #9DA1B4;
  --coral: #111322;
  --coral-2: #33364A;
  --peach: #D9DAE2;
  --peach-soft: #F1F1F4;
  --green: #16A34A;
  --border: rgba(17, 19, 34, 0.08);
  --border-soft: rgba(17, 19, 34, 0.05);
  --glass: rgba(255, 255, 255, 0.75);
  --glass-strong: rgba(255, 255, 255, 0.90);
  --shadow-sm: 0 4px 14px rgba(23, 23, 42, 0.04);
  --shadow-md: 0 20px 40px rgba(23, 23, 42, 0.06);
  --shadow-lg: 0 30px 70px rgba(23, 23, 42, 0.10);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --auth-sidebar-bg: #f8fafc;
  --auth-sidebar-border: rgba(17, 19, 34, 0.08);
  --auth-card-bg: rgba(255, 255, 255, 0.82);
}

[data-theme="dark"] {
  --bg-pearl: #0b0f19;
  --bg-card: #151b2b;
  --ink: #ffffff;
  --ink-soft: #94a3b8;
  --ink-faint: #64748b;
  --coral: #ffffff;
  --coral-2: #cbd5e1;
  --peach: #1e293b;
  --peach-soft: #1e293b;
  --border: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.05);
  --glass: rgba(21, 27, 43, 0.75);
  --glass-strong: rgba(21, 27, 43, 0.92);
  --auth-sidebar-bg: #0d1322;
  --auth-sidebar-border: rgba(255, 255, 255, 0.08);
  --auth-card-bg: rgba(255, 255, 255, 0.04);
}

* {
  box-sizing: border-box;
}

body.auth-split-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--bg-pearl);
  color: var(--ink);
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

/* Full Screen 50/50 Split Grid */
.auth-split-layout {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* --------------------------------------------------------------------------
   LEFT SHOWCASE PANEL (SaaS Value Proposition)
   -------------------------------------------------------------------------- */
.auth-showcase-panel {
  position: relative;
  background: var(--auth-sidebar-bg);
  border-right: 1px solid var(--auth-sidebar-border);
  padding: 3.5rem 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Ambient Pearl Glow mesh */
.auth-showcase-panel::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -100px;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(217, 218, 226, 0.25) 50%, transparent 70%);
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}

.auth-showcase-panel::after {
  content: '';
  position: absolute;
  bottom: -150px;
  right: -100px;
  width: 450px;
  height: 450px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(168, 85, 247, 0.08) 0%, transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.auth-showcase-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
  max-width: 520px;
  margin: auto 0;
}

/* Brand Link / Header with official PyWorks Logo */
.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  position: relative;
  z-index: 1;
}

.auth-brand-mark {
  height: 32px;
  width: auto;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.auth-brand img,
.auth-brand-logo-img {
  height: 32px !important;
  max-height: 32px !important;
  width: auto !important;
  max-width: 44px !important;
  object-fit: contain !important;
  display: block !important;
  flex-shrink: 0 !important;
  transition: filter 0.25s var(--ease);
}

[data-theme="dark"] .auth-brand-logo-img,
[data-theme="dark"] .auth-brand img {
  filter: brightness(0) invert(1);
}

.brand-text-lockup {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  line-height: 1;
  width: fit-content;
  user-select: none;
}

.brand-name {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 850;
  font-size: 1.05rem;
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1;
  display: block;
  white-space: nowrap;
}

.brand-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.48rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2.5px;
  letter-spacing: 0;
}

.brand-sub span {
  display: inline-block;
  line-height: 1;
  text-align: center;
}

.auth-brand .brand-name {
  font-size: 1.35rem;
}

.auth-brand .brand-sub {
  font-size: 0.6rem;
  margin-top: 3.5px;
}

.auth-brand-text {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.auth-brand-badge {
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.2rem 0.6rem;
  border-radius: 100px;
  background: var(--peach-soft);
  color: var(--ink-soft);
  border: 1px solid var(--border);
  line-height: 1;
}

/* Showcase Headlines */
.auth-headline {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 2.45rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0;
}

.auth-headline span.gradient-text {
  background: linear-gradient(100deg, var(--coral) 10%, var(--coral-2) 55%, #53566E 90%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

[data-theme="dark"] .auth-headline span.gradient-text {
  background: linear-gradient(100deg, #ffffff 10%, #c4b5fd 60%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.auth-subheadline {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin: 0;
  font-weight: 400;
}

/* Feature List Cards styled like index.html bento items */
.auth-features-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.auth-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: 18px;
  background: var(--auth-card-bg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}

.auth-feature-item:hover {
  transform: translateY(-2px);
  border-color: rgba(17, 19, 34, 0.16);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .auth-feature-item:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--peach-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.auth-feature-icon svg {
  width: 20px;
  height: 20px;
  color: var(--coral);
  stroke-width: 2px;
}

[data-theme="dark"] .auth-feature-icon svg {
  color: #c4b5fd;
}

.auth-feature-content h4 {
  margin: 0 0 0.25rem 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.01em;
}

.auth-feature-content p {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.48;
  color: var(--ink-soft);
}

/* Showcase Social Proof Footer (Actual Store Logos!) */
.auth-showcase-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1.75rem;
  border-top: 1px solid var(--border);
  gap: 1rem;
}

.auth-social-proof-pill {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

/* Real client store logos overlapping group */
.auth-avatars-group {
  display: flex;
  align-items: center;
}

.auth-avatars-group .avatar-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--bg-card);
  margin-left: -10px;
  background: #ffffff;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  display: block;
  flex-shrink: 0;
  transition: transform 0.2s ease, z-index 0.2s ease;
}

.auth-avatars-group .avatar-logo:first-child {
  margin-left: 0;
}

.auth-avatars-group .avatar-logo:hover {
  transform: scale(1.15);
  z-index: 5;
}

.auth-proof-text {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink-soft);
  line-height: 1.4;
}

.auth-proof-text strong {
  color: var(--ink);
  font-weight: 700;
}

.auth-uptime-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  font-weight: 800;
  color: #16A34A;
  background: rgba(22, 163, 74, 0.08);
  border: 1px solid rgba(22, 163, 74, 0.2);
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  flex-shrink: 0;
}

.auth-uptime-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #16A34A;
  animation: uptimePulse 2s infinite;
}

@keyframes uptimePulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.3); }
}

/* --------------------------------------------------------------------------
   RIGHT AUTH FORM PANEL
   -------------------------------------------------------------------------- */
.auth-form-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 3.5rem 2.5rem;
  background: var(--bg-card);
  min-height: 100vh;
}

.auth-form-container {
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
  animation: authFadeUp 0.5s var(--ease) both;
}

@keyframes authFadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile top branding (hidden on desktop) */
.auth-mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  width: 100%;
  padding-right: 3.5rem; /* Room for floating theme toggle */
}

/* Form Titles */
.auth-header {
  margin-bottom: 2rem;
  text-align: left;
}

.auth-header.auth-header-centered {
  text-align: center;
  margin-bottom: 1.75rem;
}

.auth-header.auth-header-centered .auth-title {
  text-align: center;
}

.auth-header.auth-header-centered .auth-subtitle {
  text-align: center;
  max-width: 380px;
  margin: 0.35rem auto 0;
}

.auth-title {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  margin: 0 0 0.45rem 0;
}

.auth-subtitle {
  color: var(--ink-soft);
  font-size: 0.94rem;
  font-weight: 450;
  margin: 0;
  line-height: 1.5;
}

/* Mobile-only components (hidden on desktop) */
.auth-mobile-nav,
.auth-mobile-pillars,
.auth-mobile-social-proof {
  display: none;
}

/* Google Social Button */
.auth-google-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .auth-google-btn {
  background: #1e293b;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.12);
}

.auth-google-btn:hover {
  background: #f8fafc;
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

[data-theme="dark"] .auth-google-btn:hover {
  background: #283548;
}

/* Social Buttons Stack */
.auth-social-stack {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  width: 100%;
}

/* Facebook Social Button */
.auth-facebook-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: #1877F2;
  color: #ffffff;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(24, 119, 242, 0.25);
}

.auth-facebook-btn:hover {
  background: #166fe5;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.35);
}

.auth-facebook-btn:active {
  transform: scale(0.99);
}

/* Security Notice Card */
.auth-notice-card {
  margin-top: 1.75rem;
  padding: 1.1rem 1.2rem;
  border-radius: 16px;
  background: var(--peach-soft);
  border: 1px solid var(--border);
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

[data-theme="dark"] .auth-notice-card {
  background: rgba(255, 255, 255, 0.03);
  border-color: rgba(255, 255, 255, 0.08);
  color: #94a3b8;
}

.auth-notice-card strong {
  color: var(--ink);
  display: block;
  margin-bottom: 0.15rem;
}

[data-theme="dark"] .auth-notice-card strong {
  color: #f1f5f9;
}

/* Minimal Terms Note */
.auth-terms-note {
  margin-top: 1.5rem;
  font-size: 0.8rem;
  color: var(--ink-faint);
  text-align: center;
  line-height: 1.5;
}

.auth-terms-note a {
  color: var(--ink-soft);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
  transition: color 0.15s ease;
}

.auth-terms-note a:hover {
  color: var(--ink);
}

[data-theme="dark"] .auth-terms-note a:hover {
  color: #ffffff;
}

/* Modern Separator */
.auth-divider {
  display: flex;
  align-items: center;
  margin: 1.5rem 0;
  color: var(--ink-faint);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 1rem;
}

/* Inputs & Form Groups */
.auth-input-group {
  margin-bottom: 1.25rem;
}

.auth-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.45rem;
  letter-spacing: -0.01em;
}

.auth-input-field {
  width: 100%;
  height: 48px;
  padding: 0 1.15rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-pearl);
  color: var(--ink);
  font-size: 0.92rem;
  font-family: inherit;
  font-weight: 500;
  transition: all 0.2s var(--ease);
  outline: none;
}

.auth-input-field::placeholder {
  color: var(--ink-faint);
  opacity: 0.8;
}

.auth-input-field:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(17, 19, 34, 0.08);
  background: #ffffff;
}

[data-theme="dark"] .auth-input-field:focus {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
  background: #1e293b;
}

/* Password Toggle Wrapper */
.auth-password-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-password-wrapper .auth-input-field {
  padding-right: 44px;
}

.auth-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.auth-password-toggle:hover {
  color: var(--ink);
}

/* Forgot Password Link */
.auth-forgot-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -0.5rem;
  margin-bottom: 1.25rem;
}

.auth-forgot-link {
  font-size: 0.82rem;
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.auth-forgot-link:hover {
  color: var(--ink);
  text-decoration: underline;
}

/* Primary Submit Button matching index.html pill buttons */
.auth-submit-btn {
  width: 100%;
  height: 48px;
  border-radius: 14px;
  background: #111322;
  color: #ffffff;
  border: 1px solid rgba(17, 19, 34, 0.15);
  font-size: 0.95rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  margin-top: 0.75rem;
}

[data-theme="dark"] .auth-submit-btn {
  background: #ffffff;
  color: #0b0f19;
  border-color: rgba(255, 255, 255, 0.2);
}

.auth-submit-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  opacity: 0.95;
}

.auth-submit-btn:active {
  transform: translateY(0);
}

.auth-submit-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

/* Bottom switch prompt */
.auth-switch-prompt {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.auth-switch-prompt a {
  color: var(--ink);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-left: 0.25rem;
}

.auth-switch-prompt a:hover {
  opacity: 0.8;
}

/* Error and Success alerts */
.auth-alert-message {
  display: none;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-align: center;
}

.auth-alert-message.show {
  display: block;
  animation: authFadeUp 0.3s ease;
}

.auth-alert-error {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #dc2626;
}

.auth-alert-success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: #16a34a;
}

/* Minimal Legal Footer */
.auth-legal-footer {
  width: 100%;
  max-width: 410px;
  margin: 2rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  text-align: center;
}

.auth-copyright {
  font-size: 0.75rem;
  color: var(--ink-faint);
}

.auth-legal-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.auth-legal-nav a {
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-legal-nav a:hover {
  color: var(--ink);
}

.auth-legal-nav .dot {
  color: var(--ink-faint);
  opacity: 0.4;
  font-size: 0.65rem;
}

/* Floating theme toggle button */
.auth-theme-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 50;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  box-shadow: var(--shadow-sm);
}

.auth-theme-toggle:hover {
  transform: scale(1.08);
  box-shadow: var(--shadow-md);
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (Tablets & Mobile Phones)
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  html {
    min-height: 100%;
    height: 100%;
  }

  body.auth-split-body {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
  }

  .auth-split-layout {
    grid-template-columns: 1fr;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
    width: 100%;
    overflow: visible;
  }

  .auth-showcase-panel {
    display: none; /* Streamline mobile directly to form */
  }

  /* Floating Glass Pill Mobile Navbar (Matches index.html pill navbar) */
  .auth-mobile-nav {
    display: flex;
    position: sticky;
    top: 0;
    z-index: 2100;
    justify-content: center;
    padding-top: calc(8px + env(safe-area-inset-top, 0px));
    padding-left: 14px;
    padding-right: 14px;
    padding-bottom: 0;
    width: 100%;
    flex-shrink: 0;
  }

  .auth-mobile-nav .nav-inner {
    width: 100%;
    max-width: 410px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 6px 8px 6px 14px;
    background: var(--glass);
    backdrop-filter: blur(22px) saturate(160%);
    -webkit-backdrop-filter: blur(22px) saturate(160%);
    border: 1px solid var(--border);
    border-radius: 100px;
    box-shadow: var(--shadow-sm);
  }

  .auth-mobile-nav .brand {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Instrument Sans', sans-serif;
    font-weight: 800;
    font-size: 1rem;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: var(--ink);
  }

  .auth-mobile-nav .brand-mark {
    height: 22px;
    width: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .auth-mobile-nav .brand-mark img {
    height: 22px;
    width: auto;
    object-fit: contain;
    display: block;
  }

  [data-theme="dark"] .auth-mobile-nav .brand-mark img {
    filter: brightness(0) invert(1);
  }

  .auth-mobile-nav .brand-beta-badge {
    background: rgba(148, 163, 184, 0.14);
    color: #94a3b8;
    font-size: 0.6rem;
    font-weight: 700;
    padding: 2px 5px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    border: 1px solid rgba(148, 163, 184, 0.25);
    vertical-align: middle;
    margin-left: 3px;
    line-height: 1;
    display: inline-block;
  }

  .auth-nav-theme-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--ink);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s var(--ease), background 0.2s var(--ease);
    box-shadow: var(--shadow-sm);
  }

  .auth-nav-theme-btn:active {
    transform: scale(0.9);
  }

  /* Hide the standalone floating toggle on mobile since the navbar contains it */
  .auth-theme-toggle {
    display: none !important;
  }

  .auth-mobile-header {
    display: none !important;
  }

  .auth-form-panel {
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0px));
    min-height: calc(100vh - 56px);
    min-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
  }

  .auth-form-container {
    width: 100%;
    max-width: 390px;
    margin: auto 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .auth-header.auth-header-centered {
    margin-bottom: 0.95rem;
  }

  .auth-header.auth-header-centered .auth-title {
    font-size: 1.68rem;
    margin-bottom: 0.25rem;
    letter-spacing: -0.025em;
  }

  .auth-header.auth-header-centered .auth-subtitle {
    font-size: 0.84rem;
    line-height: 1.35;
    color: var(--ink-soft);
    max-width: 320px;
    margin: 0 auto;
  }

  .auth-social-stack {
    gap: 0.55rem;
  }

  .auth-google-btn,
  .auth-facebook-btn {
    height: 44px;
    font-size: 0.88rem;
    border-radius: 12px;
  }

  /* 3 SaaS Pillars Scattered Floating Badges (Organic, comfortable, no edge touching) */
  .auth-mobile-pillars {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px 10px;
    width: 100%;
    max-width: 310px;
    margin: 1.1rem auto 0;
    padding: 0 4px;
  }

  .auth-pillar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 13px;
    background: var(--auth-card-bg);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ink);
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), border-color 0.25s var(--ease);
  }

  /* Scattered organic tilt & placement */
  .auth-pillar-badge.pill-1 {
    transform: rotate(-1.5deg) translateY(-1px);
  }

  .auth-pillar-badge.pill-2 {
    transform: rotate(2deg) translateY(-2px);
  }

  .auth-pillar-badge.pill-3 {
    transform: rotate(-1deg) translateY(1px);
  }

  .auth-pillar-badge:hover,
  .auth-pillar-badge:active {
    transform: translateY(-3px) scale(1.03);
    box-shadow: var(--shadow-md);
    border-color: rgba(17, 19, 34, 0.16);
  }

  [data-theme="dark"] .auth-pillar-badge:hover,
  [data-theme="dark"] .auth-pillar-badge:active {
    border-color: rgba(255, 255, 255, 0.2);
  }

  .auth-pillar-badge svg {
    color: var(--coral);
    flex-shrink: 0;
  }

  [data-theme="dark"] .auth-pillar-badge svg {
    color: #c4b5fd;
  }

  /* Social proof right above the footer separator */
  .auth-mobile-social-proof {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    width: 100%;
    max-width: 360px;
    margin: 1.25rem auto 0.45rem;
    text-align: center;
    flex-shrink: 0;
  }

  .auth-mobile-social-proof .auth-avatars-group {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .auth-mobile-social-proof .avatar-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
    margin-left: -6px;
    background: #ffffff;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
  }

  .auth-mobile-social-proof .avatar-logo:first-child {
    margin-left: 0;
  }

  .auth-mobile-social-proof .auth-proof-text {
    font-size: 0.74rem;
    font-weight: 500;
    color: var(--ink-soft);
    line-height: 1.25;
    white-space: nowrap;
  }

  .auth-mobile-social-proof .auth-proof-text strong {
    color: var(--ink);
    font-weight: 700;
  }

  /* Legal footer with clean separator line */
  .auth-legal-footer {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding-top: 0.5rem;
    padding-bottom: 0.25rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.22rem;
    flex-shrink: 0;
  }

  .auth-copyright {
    font-size: 0.68rem;
    color: var(--ink-faint);
  }

  .auth-legal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    white-space: nowrap;
    flex-wrap: nowrap;
  }

  .auth-legal-nav a {
    font-size: 0.69rem;
    color: var(--ink-soft);
    text-decoration: none;
    transition: color 0.15s ease;
  }

  .auth-legal-nav a:hover {
    color: var(--coral);
  }

  .auth-legal-nav .dot {
    font-size: 0.48rem;
    color: var(--ink-faint);
  }
}
