/* Account page — theme toggle */
.theme-preference-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.theme-preference-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--inv-text);
}

.theme-preference-hint {
  margin-top: 4px;
  font-size: 13px;
  color: var(--inv-muted);
}

.theme-switch {
  position: relative;
  flex-shrink: 0;
  width: 56px;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  box-sizing: border-box;
}

.theme-switch-track {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.12);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.theme-switch.is-bright .theme-switch-track {
  background: rgba(96, 165, 250, 0.45);
  border-color: rgba(96, 165, 250, 0.55);
}

.theme-switch-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  z-index: 2;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #f8fafc;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
  transition: transform 0.2s ease;
}

.theme-switch.is-bright .theme-switch-thumb {
  transform: translateX(24px);
}

.theme-switch-icons {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 7px;
  pointer-events: none;
}

.theme-switch-icons .material-symbols-outlined {
  font-size: 16px;
  color: rgba(248, 250, 252, 0.85);
}

.theme-switch:focus-visible .theme-switch-track {
  outline: 2px solid var(--inv-accent);
  outline-offset: 2px;
}

html[data-theme="bright"] .theme-switch-track {
  background: rgba(148, 163, 184, 0.35);
  border-color: #cbd5e1;
}

html[data-theme="bright"] .theme-switch.is-bright .theme-switch-track {
  background: rgba(37, 99, 235, 0.22);
  border-color: rgba(37, 99, 235, 0.4);
}

html[data-theme="bright"] .theme-switch-icons .material-symbols-outlined {
  color: #64748b !important;
}

@media (max-width: 900px) {
  .theme-preference-row {
    flex-wrap: nowrap;
    align-items: center;
    gap: 14px;
  }

  .theme-preference-copy {
    flex: 1 1 auto;
    min-width: 0;
  }

  .theme-preference-row .theme-switch {
    width: 56px !important;
    height: 32px !important;
    min-height: 32px !important;
    max-height: 32px !important;
    align-self: center;
    flex-shrink: 0;
  }

  .theme-preference-row .theme-switch-track,
  .theme-preference-row .theme-switch-icons {
    height: 32px;
  }
}

.account-name-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

@media (max-width: 640px) {
  .account-name-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Sign in — first-visit brand intro splash */
.influx-intro {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 62% 8%, rgba(125, 211, 252, 0.16), transparent 28rem),
    radial-gradient(circle at 12% 18%, rgba(148, 163, 184, 0.12), transparent 22rem),
    linear-gradient(135deg, #101721 0%, #1a222e 46%, #0b111a 100%);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.45s ease, visibility 0.45s ease;
  cursor: pointer;
}

html[data-theme="bright"] .influx-intro {
  background:
    radial-gradient(circle at 70% 0%, rgba(37, 99, 235, 0.08), transparent 24rem),
    linear-gradient(180deg, #f8fafc 0%, #eef2f7 100%);
}

.influx-intro[hidden],
.influx-intro.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.influx-intro-skip {
  position: absolute;
  top: 20px;
  right: 24px;
  border: 0;
  background: transparent;
  color: rgba(159, 176, 196, 0.92);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 8px 4px;
  z-index: 2;
}

html[data-theme="bright"] .influx-intro-skip {
  color: #64748b;
}

.influx-intro-skip:hover {
  color: #8bd6ff;
}

html[data-theme="bright"] .influx-intro-skip:hover {
  color: #2563eb;
}

.influx-intro-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  max-width: 360px;
  animation: influx-intro-rise 0.7s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.influx-intro-mark {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
}

.influx-intro-bird {
  width: 88px;
  height: 88px;
  object-fit: contain;
  animation: influx-bird-float 2.4s ease-in-out infinite;
}

.influx-intro-notes {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.influx-intro-note {
  position: absolute;
  font-size: 22px;
  font-weight: 700;
  color: #8bd6ff;
  line-height: 1;
  animation: influx-note-bob 1.35s ease-in-out infinite;
}

html[data-theme="bright"] .influx-intro-note {
  color: #2563eb;
}

.influx-intro-note--1 {
  top: 8px;
  right: 2px;
  animation-delay: 0s;
}

.influx-intro-note--2 {
  top: 28px;
  right: -18px;
  font-size: 28px;
  animation-delay: 0.22s;
}

.influx-intro-note--3 {
  top: 54px;
  right: 6px;
  font-size: 18px;
  animation-delay: 0.44s;
}

.influx-intro-brand {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.9px;
  line-height: 1;
}

.influx-intro-brand .black-text {
  color: #f8fafc;
}

.influx-intro-brand .blue-text {
  color: #8bd6ff;
  font-weight: 300;
  font-style: italic;
}

html[data-theme="bright"] .influx-intro-brand .black-text {
  color: #111827;
}

html[data-theme="bright"] .influx-intro-brand .blue-text {
  color: #2563eb;
}

.influx-intro-waves {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 6px;
  height: 28px;
}

.influx-intro-waves span {
  display: block;
  width: 5px;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #8bd6ff, #2563eb);
  transform-origin: bottom center;
  animation: influx-wave 1.1s ease-in-out infinite;
}

html[data-theme="bright"] .influx-intro-waves span {
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}

.influx-intro-waves span:nth-child(1) { animation-delay: 0s; }
.influx-intro-waves span:nth-child(2) { animation-delay: 0.12s; }
.influx-intro-waves span:nth-child(3) { animation-delay: 0.24s; }
.influx-intro-waves span:nth-child(4) { animation-delay: 0.36s; }
.influx-intro-waves span:nth-child(5) { animation-delay: 0.48s; }

.influx-intro-tagline {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  font-style: italic;
  color: #9fb0c4;
}

html[data-theme="bright"] .influx-intro-tagline {
  color: #64748b;
}

body.auth-standalone.intro-active .auth-header,
body.auth-standalone.intro-active .welcome-landing,
body.auth-standalone.intro-active .signin-overlay {
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
}

body.auth-standalone.intro-revealed .auth-header,
body.auth-standalone.intro-revealed .welcome-landing {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.45s ease 0.08s, transform 0.45s ease 0.08s;
}

@keyframes influx-intro-rise {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes influx-bird-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes influx-note-bob {
  0%, 100% {
    transform: translateY(0);
    opacity: 0.55;
  }
  50% {
    transform: translateY(-14px);
    opacity: 1;
  }
}

@keyframes influx-wave {
  0%, 100% { transform: scaleY(0.3); opacity: 0.55; }
  50% { transform: scaleY(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .influx-intro-inner,
  .influx-intro-bird,
  .influx-intro-note,
  .influx-intro-waves span {
    animation: none !important;
  }
}

/* Sign in / Sign up — shared header + theme toggle */
.auth-header {
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 32px 12px;
  box-sizing: border-box;
  flex-shrink: 0;
  align-self: stretch;
}

.auth-header .top-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.auth-header .auth-top-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.auth-header .auth-top-tools .theme-switch {
  flex-shrink: 0;
  display: block;
  overflow: visible;
}

.auth-header .auth-top-tools .theme-switch-track {
  background: rgba(30, 41, 59, 0.72);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}

.auth-header .auth-top-tools .theme-switch.is-bright .theme-switch-track {
  background: rgba(37, 99, 235, 0.42);
  border-color: rgba(147, 197, 253, 0.55);
}

.auth-header .auth-top-tools .theme-switch-thumb {
  background: #ffffff;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.28),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.auth-header .auth-top-tools .theme-switch-icons .material-symbols-outlined {
  color: rgba(248, 250, 252, 0.92);
}

html[data-theme="bright"] .auth-header .auth-top-tools .theme-switch-track {
  background: #dbe3ee;
  border-color: #c7d2e0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.08);
}

html[data-theme="bright"] .auth-header .auth-top-tools .theme-switch.is-bright .theme-switch-track {
  background: rgba(37, 99, 235, 0.24);
  border-color: rgba(37, 99, 235, 0.42);
}

html[data-theme="bright"] .auth-header .auth-top-tools .theme-switch-thumb {
  background: #ffffff;
  box-shadow:
    0 1px 3px rgba(15, 23, 42, 0.16),
    0 0 0 1px rgba(15, 23, 42, 0.06);
}

html[data-theme="bright"] .auth-header .auth-top-tools .theme-switch-icons .material-symbols-outlined {
  color: #475569 !important;
}

.auth-header .auth-lang-links {
  display: flex;
  align-items: center;
  gap: 10px;
}

@media (max-width: 640px) {
  .auth-header {
    padding: 14px 0 10px;
    gap: 10px;
    min-height: 48px;
  }

  .auth-header .top-brand-header {
    flex: 1 1 auto;
    min-width: 0;
    gap: 10px;
  }

  .auth-header .nav-logo-img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .auth-header .brand-logo-split {
    font-size: 18px;
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .auth-header .auth-top-tools {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
  }

  .auth-header .auth-top-tools .theme-switch {
    width: 56px;
    height: 32px;
    min-height: 32px;
    max-height: 32px;
  }

  .auth-header .auth-top-tools .theme-switch-track,
  .auth-header .auth-top-tools .theme-switch-icons {
    height: 32px;
  }

  .auth-header .auth-top-tools .theme-switch-thumb {
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
  }

  .auth-header .auth-top-tools .theme-switch.is-bright .theme-switch-thumb {
    transform: translateX(24px);
  }

  .auth-header .auth-top-tools .theme-switch-icons {
    padding: 0 7px;
  }

  .auth-header .auth-top-tools .theme-switch-icons .material-symbols-outlined {
    font-size: 16px;
  }

  .auth-header .auth-lang-links {
    padding-left: 10px;
    border-left: 1px solid rgba(148, 163, 184, 0.32);
    font-size: 12px;
    gap: 8px;
    white-space: nowrap;
  }

  html[data-theme="bright"] .auth-header .auth-lang-links {
    border-left-color: #d1d9e6;
  }
}

/* Auth pages — shared vertical layout + header/card alignment */
body.auth-standalone {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 24px 20px 40px;
  background-color: #f8f9fa;
}

body.auth-standalone .auth-header {
  max-width: none;
  width: 100%;
  align-self: stretch;
  padding: 16px 0 12px;
  box-sizing: border-box;
  justify-content: space-between;
}

body.auth-standalone .auth-header .top-brand-header {
  flex: 0 1 auto;
  align-items: center;
  margin-right: auto;
}

body.auth-standalone .auth-header .auth-top-tools {
  flex: 0 0 auto;
  align-items: center;
  margin-left: auto;
}

body.auth-standalone .login-card,
body.auth-standalone .signup-card {
  width: 100%;
  max-width: 420px;
}

@media (max-width: 640px) {
  body.auth-standalone {
    justify-content: flex-start;
    padding: 8px 16px 32px;
  }

  body.auth-standalone .auth-header {
    padding: 12px 0 10px;
  }

  body.auth-standalone .login-card,
  body.auth-standalone .signup-card {
    margin-top: 20px;
    padding: 28px 24px;
  }
}

/* Welcome landing — post-intro product tour */
body.auth-standalone.welcome-mode {
  justify-content: flex-start;
  padding: 0 20px 56px;
  max-width: 100%;
}

body.auth-standalone.welcome-mode .welcome-nav-bar {
  width: calc(100% + 40px);
  max-width: none;
  margin: 0 -20px 0;
  padding: 14px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 34, 0.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 100;
}

html[data-theme="bright"] body.auth-standalone.welcome-mode .welcome-nav-bar {
  background: rgba(255, 255, 255, 0.82);
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

.welcome-brand-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.welcome-nav-tagline {
  font-size: 12px;
  font-weight: 600;
  color: #9fb0c4;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html[data-theme="bright"] .welcome-nav-tagline {
  color: #64748b;
}

.auth-header-signin-btn {
  border: 0;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.auth-header-signin-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
}

html[data-theme="bright"] .auth-header-signin-btn {
  background: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.18);
}

.welcome-landing {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 20px 0 0;
}

.welcome-top-banner {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 32px 28px 24px;
  margin-bottom: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.14) 0%, rgba(15, 23, 34, 0.5) 42%, rgba(11, 17, 26, 0.72) 100%);
  box-shadow:
    0 28px 64px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

html[data-theme="bright"] .welcome-top-banner {
  background:
    linear-gradient(145deg, rgba(37, 99, 235, 0.1) 0%, rgba(255, 255, 255, 0.96) 55%, rgba(248, 250, 252, 0.98) 100%);
  border-color: rgba(37, 99, 235, 0.12);
  box-shadow:
    0 24px 56px rgba(37, 99, 235, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.welcome-top-banner-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.welcome-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.55;
}

.welcome-orb--1 {
  width: 220px;
  height: 220px;
  top: -60px;
  right: -40px;
  background: rgba(96, 165, 250, 0.45);
  animation: welcome-orb-float 8s ease-in-out infinite;
}

.welcome-orb--2 {
  width: 160px;
  height: 160px;
  bottom: -30px;
  left: -20px;
  background: rgba(139, 214, 255, 0.28);
  animation: welcome-orb-float 10s ease-in-out infinite reverse;
}

.welcome-orb--3 {
  width: 120px;
  height: 120px;
  top: 40%;
  left: 42%;
  background: rgba(37, 99, 235, 0.22);
  animation: welcome-orb-float 12s ease-in-out infinite;
}

.welcome-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  align-items: center;
}

.welcome-hero-copy {
  text-align: left;
}

.welcome-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #8bd6ff;
  background: rgba(139, 214, 255, 0.12);
  border: 1px solid rgba(139, 214, 255, 0.22);
  margin-bottom: 18px;
}

.welcome-hero-badge .material-symbols-outlined {
  font-size: 16px;
}

html[data-theme="bright"] .welcome-hero-badge {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.08);
  border-color: rgba(37, 99, 235, 0.16);
}

.welcome-hero-copy h1 {
  font-size: clamp(32px, 4.8vw, 48px);
  font-weight: 800;
  letter-spacing: -0.035em;
  line-height: 1.08;
  color: #f8fafc;
  margin-bottom: 16px;
}

html[data-theme="bright"] .welcome-hero-copy h1 {
  color: #0f172a;
}

.welcome-headline-accent {
  background: linear-gradient(135deg, #8bd6ff, #60a5fa, #2563eb);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

html[data-theme="bright"] .welcome-headline-accent {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.welcome-hero-copy p {
  font-size: clamp(15px, 2.2vw, 17px);
  line-height: 1.65;
  color: #b6c5d8;
  max-width: 520px;
  margin: 0 0 24px;
}

html[data-theme="bright"] .welcome-hero-copy p {
  color: #64748b;
}

.welcome-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}

.welcome-cta-primary,
.welcome-cta-secondary {
  border: 0;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 22px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.welcome-cta-primary .material-symbols-outlined {
  font-size: 18px;
}

.welcome-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.welcome-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #9fb0c4;
}

.welcome-trust-item .material-symbols-outlined {
  font-size: 16px;
  color: #34d399;
}

html[data-theme="bright"] .welcome-trust-item {
  color: #64748b;
}

.welcome-preview-wrap {
  position: relative;
}

.welcome-preview-glow {
  position: absolute;
  inset: 10% -8% -8% -8%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.28), transparent 68%);
  pointer-events: none;
  z-index: 0;
}

.welcome-quick-strip {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

html[data-theme="bright"] .welcome-quick-strip {
  border-top-color: rgba(15, 23, 42, 0.08);
}

.welcome-quick-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.welcome-quick-pill .material-symbols-outlined {
  font-size: 16px;
  color: #8bd6ff;
}

html[data-theme="bright"] .welcome-quick-pill {
  color: #334155;
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.12);
}

html[data-theme="bright"] .welcome-quick-pill .material-symbols-outlined {
  color: #2563eb;
}

.welcome-section-head {
  text-align: center;
  margin-bottom: 22px;
}

.welcome-section-sub {
  margin-top: 8px;
  font-size: 14px;
  color: #9fb0c4;
}

html[data-theme="bright"] .welcome-section-sub {
  color: #64748b;
}

@keyframes welcome-orb-float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(8px, -10px) scale(1.06); }
}

/* legacy hero aliases kept for compatibility */
.welcome-hero {
  text-align: center;
  padding: 28px 12px 36px;
}

.welcome-hero h1 {
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.12;
  color: #f8fafc;
  margin-bottom: 14px;
}

html[data-theme="bright"] .welcome-hero h1 {
  color: #111827;
}

.welcome-hero p {
  font-size: clamp(15px, 2.5vw, 18px);
  line-height: 1.6;
  color: #9fb0c4;
  max-width: 620px;
  margin: 0 auto 28px;
}

html[data-theme="bright"] .welcome-hero p {
  color: #64748b;
}

.welcome-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.welcome-hero-copy .welcome-hero-actions {
  justify-content: flex-start;
}

.welcome-cta-primary,
.welcome-cta-secondary {
  border: 0;
  font-size: 15px;
  font-weight: 700;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.welcome-cta-primary {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.welcome-cta-primary:hover {
  transform: translateY(-2px);
}

.welcome-cta-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  border: 1px solid rgba(255, 255, 255, 0.12);
}

html[data-theme="bright"] .welcome-cta-secondary {
  background: #ffffff;
  color: #374151;
  border-color: #e5e7eb;
}

.welcome-cta-secondary:hover {
  transform: translateY(-1px);
}

/* Animated workspace preview */
.welcome-preview {
  position: relative;
  z-index: 1;
  margin: 0;
  max-width: none;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(15, 23, 34, 0.72);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.32);
}

html[data-theme="bright"] .welcome-preview {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.08);
}

.welcome-preview-chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
}

html[data-theme="bright"] .welcome-preview-chrome {
  border-bottom-color: #eef2f7;
  background: #f8fafc;
}

.welcome-preview-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(148, 163, 184, 0.4);
}

.welcome-preview-dot:nth-child(1) { background: #ef4444; opacity: 0.7; }
.welcome-preview-dot:nth-child(2) { background: #f59e0b; opacity: 0.7; }
.welcome-preview-dot:nth-child(3) { background: #10b981; opacity: 0.7; }

.welcome-preview-body {
  display: grid;
  grid-template-columns: 72px 1fr;
  min-height: 220px;
}

.welcome-preview-sidebar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.12);
}

html[data-theme="bright"] .welcome-preview-sidebar {
  border-right-color: #eef2f7;
  background: #f1f5f9;
}

.welcome-preview-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  color: #64748b;
  animation: welcome-nav-pulse 4s ease-in-out infinite;
}

.welcome-preview-nav .material-symbols-outlined {
  font-size: 22px;
}

.welcome-preview-nav:nth-child(1) { animation-delay: 0s; }
.welcome-preview-nav:nth-child(2) { animation-delay: 0.5s; }
.welcome-preview-nav:nth-child(3) { animation-delay: 1s; }
.welcome-preview-nav:nth-child(4) { animation-delay: 1.5s; }
.welcome-preview-nav:nth-child(5) { animation-delay: 2s; }
.welcome-preview-nav:nth-child(6) { animation-delay: 2.5s; }

.welcome-preview-main {
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.welcome-preview-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.welcome-preview-stat {
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

html[data-theme="bright"] .welcome-preview-stat {
  background: #f8fafc;
  border-color: #e5e7eb;
}

.welcome-preview-stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #64748b;
  margin-bottom: 6px;
}

.welcome-preview-stat-value {
  font-size: 18px;
  font-weight: 800;
  color: #f8fafc;
}

html[data-theme="bright"] .welcome-preview-stat-value {
  color: #111827;
}

.welcome-preview-chart {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  height: 80px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

html[data-theme="bright"] .welcome-preview-chart {
  background: #f8fafc;
  border-color: #e5e7eb;
}

.welcome-preview-bar {
  flex: 1;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #8bd6ff, #2563eb);
  transform-origin: bottom center;
  animation: welcome-bar-grow 2.4s ease-in-out infinite;
}

.welcome-preview-bar:nth-child(1) { animation-delay: 0s; height: 35%; }
.welcome-preview-bar:nth-child(2) { animation-delay: 0.15s; height: 55%; }
.welcome-preview-bar:nth-child(3) { animation-delay: 0.3s; height: 42%; }
.welcome-preview-bar:nth-child(4) { animation-delay: 0.45s; height: 72%; }
.welcome-preview-bar:nth-child(5) { animation-delay: 0.6s; height: 88%; }
.welcome-preview-bar:nth-child(6) { animation-delay: 0.75s; height: 64%; }
.welcome-preview-bar:nth-child(7) { animation-delay: 0.9s; height: 48%; }

.welcome-preview-toast {
  align-self: flex-end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.22);
  animation: welcome-toast-pop 3s ease-in-out infinite;
}

/* Feature grid */
.welcome-section-title {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  text-align: center;
  margin-bottom: 20px;
}

.welcome-features {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
  margin-bottom: 36px;
}

.welcome-feature {
  text-align: left;
  padding: 20px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 37, 48, 0.48);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

html[data-theme="bright"] .welcome-feature {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

.welcome-feature:hover {
  transform: translateY(-3px);
  border-color: rgba(139, 214, 255, 0.35);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);
}

html[data-theme="bright"] .welcome-feature:hover {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.1);
}

.welcome-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  margin-bottom: 14px;
  background: rgba(37, 99, 235, 0.16);
  color: #8bd6ff;
}

html[data-theme="bright"] .welcome-feature-icon {
  background: rgba(37, 99, 235, 0.1);
  color: #2563eb;
}

.welcome-feature-icon .material-symbols-outlined {
  font-size: 24px;
}

.welcome-feature h3 {
  font-size: 16px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 8px;
}

html[data-theme="bright"] .welcome-feature h3 {
  color: #111827;
}

.welcome-feature p {
  font-size: 13px;
  line-height: 1.55;
  color: #9fb0c4;
  margin: 0;
}

html[data-theme="bright"] .welcome-feature p {
  color: #64748b;
}

/* Benefits strip */
.welcome-benefits {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 36px;
  padding: 24px;
  border-radius: 18px;
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(139, 214, 255, 0.12);
}

html[data-theme="bright"] .welcome-benefits {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.12);
}

.welcome-benefit {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.welcome-benefit .material-symbols-outlined {
  font-size: 22px;
  color: #10b981;
  flex-shrink: 0;
}

.welcome-benefit strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 4px;
}

html[data-theme="bright"] .welcome-benefit strong {
  color: #111827;
}

.welcome-benefit span {
  font-size: 13px;
  line-height: 1.5;
  color: #9fb0c4;
}

html[data-theme="bright"] .welcome-benefit span {
  color: #64748b;
}

.welcome-footer-cta {
  text-align: center;
  padding: 28px 24px;
  margin-top: 8px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(37, 99, 235, 0.08);
}

html[data-theme="bright"] .welcome-footer-cta {
  background: rgba(37, 99, 235, 0.05);
  border-color: rgba(37, 99, 235, 0.12);
}

.welcome-footer-cta p {
  font-size: 14px;
  color: #9fb0c4;
  margin-bottom: 16px;
}

html[data-theme="bright"] .welcome-footer-cta p {
  color: #64748b;
}

/* How it works — animated workflow tour */
.welcome-how-it-works {
  margin-bottom: 40px;
  --how-step-duration: 2.5s;
}

.how-work-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 20px;
  align-items: stretch;
}

.how-work-steps {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.how-work-step {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  text-align: left;
  padding: 16px 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(30, 37, 48, 0.42);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.15s ease;
  overflow: hidden;
}

html[data-theme="bright"] .how-work-step {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.how-work-step:hover {
  border-color: rgba(139, 214, 255, 0.28);
  transform: translateX(2px);
}

.how-work-step.is-active {
  border-color: rgba(96, 165, 250, 0.45);
  background: rgba(37, 99, 235, 0.12);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
}

html[data-theme="bright"] .how-work-step.is-active {
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.28);
}

.how-work-step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #8bd6ff;
  background: rgba(37, 99, 235, 0.18);
}

.how-work-step.is-active .how-work-step-num {
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  color: #fff;
}

.how-work-step-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.how-work-step-body strong {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.how-work-step-body span {
  font-size: 12px;
  line-height: 1.45;
  color: #9fb0c4;
}

html[data-theme="bright"] .how-work-step-body strong {
  color: #111827;
}

html[data-theme="bright"] .how-work-step-body span {
  color: #64748b;
}

.how-work-step-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  border-radius: 0 3px 3px 0;
}

.how-work-step.is-active .how-work-step-bar {
  animation: how-step-progress var(--how-step-duration, 2.5s) linear forwards;
}

.how-work-stage {
  position: relative;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0f172a;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

html[data-theme="bright"] .how-work-stage {
  background: #e2e8f0;
  border-color: #cbd5e1;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.how-work-scene {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.985);
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0.4s;
  pointer-events: none;
}

.how-work-scene.is-active {
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  pointer-events: auto;
}

/* Mini replica of the real Influx app shell */
.app-mock {
  display: flex;
  height: 100%;
  min-height: 420px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.app-mock-sidebar {
  width: 148px;
  flex-shrink: 0;
  background: #1e2530;
  border-right: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  flex-direction: column;
}

.app-mock-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.app-mock-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-mock-brand .brand-logo-split {
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
}

.app-mock-brand .black-text { color: #f8fafc; }
.app-mock-brand .blue-text { color: #8bd6ff; font-weight: 300; font-style: italic; }

.app-mock-nav {
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.app-mock-nav-label {
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  padding: 8px 8px 4px;
}

.app-mock-nav-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #9fb0c4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-mock-nav-item .material-symbols-outlined {
  font-size: 16px;
  color: #64748b;
  flex-shrink: 0;
}

.app-mock-nav-item.is-active {
  background: rgba(148, 163, 184, 0.18);
  color: #fff;
}

.app-mock-nav-item.is-active .material-symbols-outlined {
  color: #8bd6ff;
}

.app-mock-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #f1f5f9;
}

.app-mock-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  flex-shrink: 0;
}

.app-mock-topbar-title {
  font-size: 14px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
}

.app-mock-topbar-sub {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  margin-top: 2px;
}

.app-mock-avatar {
  font-size: 28px;
  color: #94a3b8;
}

.app-mock-page {
  flex: 1;
  padding: 14px 16px 16px;
  overflow: hidden;
  position: relative;
}

.app-mock-page--demand {
  padding: 0;
}

.app-mock-h1 {
  font-size: 17px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.4px;
  margin: 0 0 10px;
}

.app-mock-kicker {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 4px;
}

.app-mock-pos,
.app-mock-card,
.app-mock-pipeline,
.app-mock-mission,
.app-mock-rental-table {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.app-mock-pos-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.app-mock-pos-head strong {
  display: block;
  font-size: 15px;
  font-weight: 850;
  color: #0f172a;
  margin-top: 2px;
}

.app-mock-pos-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f0fdf4;
  color: #059669;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.app-mock-field {
  margin-bottom: 10px;
}

.app-mock-field label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 5px;
}

.app-mock-input {
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 650;
  color: #94a3b8;
  background: #fff;
}

.app-mock-input.is-filled {
  color: #0f172a;
  font-weight: 700;
  border-color: #cbd5e1;
  background: #f8fafc;
}

.app-mock-field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.app-mock-cart {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0;
  font-size: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
}

.app-mock-cart th {
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 8px 10px;
  text-align: left;
}

.app-mock-cart td {
  padding: 8px 10px;
  border-top: 1px solid #e2e8f0;
  color: #334155;
  font-weight: 600;
}

.app-mock-total-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
}

.app-mock-btn-green,
.app-mock-btn-blue {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 12px;
  font-weight: 850;
  cursor: default;
}

.app-mock-btn-green {
  background: #10b981;
  color: #fff;
  box-shadow: 0 8px 18px rgba(16, 185, 129, 0.22);
}

.app-mock-btn-blue {
  background: #2563eb;
  color: #fff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
  margin-top: 4px;
}

.app-mock-receipt,
.app-mock-stock-pill,
.app-mock-alert-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 700;
}

.app-mock-receipt {
  background: #ecfdf5;
  color: #047857;
  border: 1px solid #bbf7d0;
}

.app-mock-receipt .material-symbols-outlined { font-size: 16px; }

.app-mock-step-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 900;
  color: #2563eb;
  background: #eff6ff;
  border-radius: 999px;
  padding: 3px 8px;
  margin-bottom: 6px;
}

.app-mock-card-title {
  display: block;
  font-size: 14px;
  font-weight: 850;
  color: #0f172a;
  margin-bottom: 12px;
}

.app-mock-stock-pill {
  background: #eff6ff;
  color: #1d4ed8;
  border: 1px solid #bfdbfe;
}

.app-mock-stock-pill .material-symbols-outlined { font-size: 16px; }

.app-mock-demand-bg {
  padding: 14px 16px;
  opacity: 0.45;
  filter: blur(1px);
}

.app-mock-pipeline-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.app-mock-pipeline-head strong {
  font-size: 13px;
  color: #0f172a;
}

.app-mock-badge-blue,
.app-mock-badge-green {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
}

.app-mock-badge-blue { background: #eff6ff; color: #1d4ed8; }
.app-mock-badge-green { background: #ecfdf5; color: #047857; }

.app-mock-demand-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.app-mock-demand-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  padding: 8px 10px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.app-mock-demand-table td {
  padding: 9px 10px;
  border-bottom: 1px solid #f1f5f9;
  color: #0f172a;
  font-weight: 650;
}

.app-mock-status {
  display: inline-flex;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.app-mock-status.is-pending { background: #eff6ff; color: #1d4ed8; }
.app-mock-status.is-arrived { background: #ecfdf5; color: #047857; }
.app-mock-status.is-sold { background: #f0fdf4; color: #15803d; }
.app-mock-status.is-active-rental { background: #fef3c7; color: #b45309; }

.app-mock-modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.38);
}

.app-mock-modal-card {
  width: 100%;
  max-width: 280px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
}

.app-mock-modal-card strong {
  display: block;
  font-size: 15px;
  font-weight: 900;
  color: #0f172a;
  margin-bottom: 6px;
}

.app-mock-modal-card p {
  font-size: 11px;
  color: #64748b;
  font-weight: 600;
  line-height: 1.45;
  margin: 0 0 12px;
}

.app-mock-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.app-mock-modal-actions .app-mock-btn-blue {
  width: auto;
  padding: 8px 14px;
}

.app-mock-status-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #f1f5f9;
}

.app-mock-status-flow .material-symbols-outlined {
  font-size: 14px;
  color: #94a3b8;
}

.app-mock-rental-table {
  margin-top: 10px;
}

.app-mock-alert-banner {
  background: #fffbeb;
  color: #92400e;
  border: 1px solid #fde68a;
}

.app-mock-alert-banner .material-symbols-outlined { font-size: 18px; color: #f59e0b; }

.app-mock-mission {
  background: linear-gradient(135deg, #fff 0%, #eef6ff 100%);
  border-color: rgba(37, 99, 235, 0.18);
  margin-bottom: 10px;
}

.app-mock-mission strong {
  display: block;
  font-size: 14px;
  font-weight: 850;
  color: #0f172a;
  margin-bottom: 10px;
}

.app-mock-mission-bar {
  height: 8px;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
  margin-bottom: 8px;
}

.app-mock-mission-fill {
  display: block;
  height: 100%;
  width: 24%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  animation: app-mock-mission-grow 1.6s ease-out 0.4s forwards;
}

.app-mock-mission-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
}

.app-mock-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.app-mock-alert-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #fff;
}

.app-mock-alert-row .material-symbols-outlined {
  font-size: 18px;
  flex-shrink: 0;
}

.app-mock-alert-row strong {
  display: block;
  font-size: 12px;
  margin-bottom: 2px;
}

.app-mock-alert-row span {
  font-size: 10px;
  font-weight: 600;
  opacity: 0.9;
}

.app-mock-alert-row.is-danger { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.app-mock-alert-row.is-danger .material-symbols-outlined { color: #ef4444; }
.app-mock-alert-row.is-info { background: #eff6ff; border-color: #bfdbfe; color: #1e3a8a; }
.app-mock-alert-row.is-info .material-symbols-outlined { color: #3b82f6; }
.app-mock-alert-row.is-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.app-mock-alert-row.is-warn .material-symbols-outlined { color: #f59e0b; }
.app-mock-alert-row.is-success { background: #ecfdf5; border-color: #bbf7d0; color: #065f46; }
.app-mock-alert-row.is-success .material-symbols-outlined { color: #10b981; }

.how-work-scene.is-active .how-type-cursor::after {
  content: '|';
  animation: how-cursor-blink 0.8s step-end infinite;
  color: #2563eb;
  margin-left: 1px;
}

@keyframes app-mock-mission-grow {
  from { width: 24%; }
  to { width: 78%; }
}

@keyframes how-cursor-blink {
  50% { opacity: 0; }
}

/* Legacy mini-card styles below — kept for reference */
.how-scene-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #8bd6ff;
  margin-bottom: 16px;
}

.how-scene-label .material-symbols-outlined {
  font-size: 18px;
}

html[data-theme="bright"] .how-scene-label {
  color: #2563eb;
}

.how-mini-card {
  position: relative;
  padding: 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(255, 255, 255, 0.04);
  min-height: 240px;
}

html[data-theme="bright"] .how-mini-card {
  background: #ffffff;
  border-color: #e5e7eb;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.how-sale-row,
.how-sale-total {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #dbeafe;
}

html[data-theme="bright"] .how-sale-row,
html[data-theme="bright"] .how-sale-total {
  color: #334155;
  border-bottom-color: #eef2f7;
}

.how-sale-total {
  font-weight: 800;
  font-size: 15px;
  color: #f8fafc;
  border-bottom: 0;
  padding-top: 14px;
}

html[data-theme="bright"] .how-sale-total {
  color: #111827;
}

.how-pay-btns {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.how-pay-chip {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #9fb0c4;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.how-pay-chip.is-active {
  color: #fff;
  background: linear-gradient(135deg, #60a5fa, #2563eb);
  border-color: transparent;
  animation: how-pay-pulse 1.2s ease-in-out infinite;
}

html[data-theme="bright"] .how-pay-chip {
  background: #f1f5f9;
  border-color: #e2e8f0;
  color: #64748b;
}

.how-form-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
}

.how-form-line label {
  color: #9fb0c4;
  font-weight: 600;
}

.how-form-val {
  color: #f8fafc;
  font-weight: 700;
}

html[data-theme="bright"] .how-form-line {
  border-bottom-color: #eef2f7;
}

html[data-theme="bright"] .how-form-line label {
  color: #64748b;
}

html[data-theme="bright"] .how-form-val {
  color: #111827;
}

.how-stock-bar-wrap {
  margin-top: 16px;
}

.how-stock-bar-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: #9fb0c4;
  margin-bottom: 8px;
}

.how-stock-num {
  color: #34d399;
}

.how-stock-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.how-stock-fill {
  display: block;
  height: 100%;
  width: 24%;
  border-radius: inherit;
  background: linear-gradient(90deg, #34d399, #10b981);
  animation: how-stock-grow 1.4s ease-out 0.9s forwards;
}

html[data-theme="bright"] .how-stock-bar {
  background: #e2e8f0;
}

.how-demand-flow {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.how-demand-step {
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.how-demand-step p {
  margin: 6px 0 0;
  font-size: 13px;
  color: #dbeafe;
}

.how-demand-step small {
  font-size: 11px;
  color: #9fb0c4;
}

html[data-theme="bright"] .how-demand-step {
  background: #f8fafc;
  border-color: #e5e7eb;
}

html[data-theme="bright"] .how-demand-step p {
  color: #334155;
}

.how-demand-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.how-demand-badge.is-pending {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.15);
}

.how-demand-badge.is-arrived {
  color: #60a5fa;
  background: rgba(96, 165, 250, 0.15);
}

.how-demand-badge.is-sold {
  color: #34d399;
  background: rgba(52, 211, 153, 0.15);
}

.how-demand-arrow {
  text-align: center;
  color: #64748b;
}

.how-demand-arrow .material-symbols-outlined {
  font-size: 18px;
}

.how-rent-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.how-rent-item .material-symbols-outlined {
  font-size: 28px;
  color: #8bd6ff;
}

.how-rent-item strong {
  display: block;
  font-size: 14px;
  color: #f8fafc;
}

.how-rent-item small {
  font-size: 12px;
  color: #9fb0c4;
}

.how-rent-dates {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.how-rent-dates label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #64748b;
  margin-bottom: 4px;
}

.how-rent-dates span {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

html[data-theme="bright"] .how-rent-item strong,
html[data-theme="bright"] .how-rent-dates span {
  color: #111827;
}

.how-rent-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: #9fb0c4;
  margin-bottom: 12px;
}

.how-alert-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  margin-top: 10px;
}

.how-alert-card strong {
  display: block;
  font-size: 13px;
  margin-bottom: 2px;
}

.how-alert-card span {
  font-size: 11px;
  line-height: 1.4;
  opacity: 0.9;
}

.how-alert-card .material-symbols-outlined {
  font-size: 20px;
  flex-shrink: 0;
}

.how-alert-danger {
  color: #fecaca;
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.22);
}

.how-alert-danger .material-symbols-outlined { color: #f87171; }

.how-alert-info {
  color: #bfdbfe;
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.22);
}

.how-alert-info .material-symbols-outlined { color: #60a5fa; }

.how-alert-warn {
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.22);
}

.how-alert-warn .material-symbols-outlined { color: #fbbf24; }

.how-alert-success {
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.22);
}

.how-alert-success .material-symbols-outlined { color: #34d399; }

html[data-theme="bright"] .how-alert-danger { color: #991b1b; background: rgba(239, 68, 68, 0.08); }
html[data-theme="bright"] .how-alert-info { color: #1e40af; background: rgba(59, 130, 246, 0.08); }
html[data-theme="bright"] .how-alert-warn { color: #92400e; background: rgba(245, 158, 11, 0.1); }
html[data-theme="bright"] .how-alert-success { color: #065f46; background: rgba(16, 185, 129, 0.08); }

.how-alerts-stack .how-alert-card {
  margin-top: 0;
  margin-bottom: 8px;
}

.how-success-toast {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #bbf7d0;
  background: rgba(16, 185, 129, 0.16);
  border: 1px solid rgba(16, 185, 129, 0.28);
}

.how-success-toast .material-symbols-outlined {
  font-size: 18px;
  color: #34d399;
}

html[data-theme="bright"] .how-success-toast {
  color: #065f46;
  background: rgba(16, 185, 129, 0.1);
}

.how-work-scene.is-active .how-anim-fade {
  opacity: 0;
  animation: how-fade-up 0.55s ease var(--d, 0s) forwards;
}

.how-work-scene.is-active .how-anim-pop {
  opacity: 0;
  animation: how-pop-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) var(--d, 0s) forwards;
}

.how-work-scene.is-active .how-anim-slide {
  opacity: 0;
  animation: how-slide-in 0.5s ease var(--d, 0s) forwards;
}

@keyframes how-step-progress {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes how-fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes how-pop-in {
  from { opacity: 0; transform: scale(0.92) translateY(6px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes how-slide-in {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes how-stock-grow {
  from { width: 24%; }
  to { width: 88%; }
}

@keyframes how-pay-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.35); }
  50% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
}

/* Sign-in overlay modal */
.signin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  background: rgba(8, 12, 20, 0.72);
  backdrop-filter: blur(8px);
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

html[data-theme="bright"] .signin-overlay {
  background: rgba(15, 23, 42, 0.45);
}

.signin-overlay[hidden],
.signin-overlay.is-closing {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.signin-overlay-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  animation: welcome-modal-in 0.32s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.signin-overlay-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #9fb0c4;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

html[data-theme="bright"] .signin-overlay-close {
  background: #f1f5f9;
  color: #64748b;
}

.signin-overlay-close:hover {
  color: #f8fafc;
}

html[data-theme="bright"] .signin-overlay-close:hover {
  color: #111827;
}

.signin-overlay .login-card {
  margin: 0;
}

@keyframes welcome-nav-pulse {
  0%, 100% {
    background: transparent;
    color: #64748b;
  }
  8%, 18% {
    background: rgba(37, 99, 235, 0.22);
    color: #8bd6ff;
  }
}

html[data-theme="bright"] .welcome-preview-nav {
  animation-name: welcome-nav-pulse-bright;
}

@keyframes welcome-nav-pulse-bright {
  0%, 100% {
    background: transparent;
    color: #94a3b8;
  }
  8%, 18% {
    background: rgba(37, 99, 235, 0.14);
    color: #2563eb;
  }
}

@keyframes welcome-bar-grow {
  0%, 100% { transform: scaleY(0.65); opacity: 0.65; }
  50% { transform: scaleY(1); opacity: 1; }
}

@keyframes welcome-toast-pop {
  0%, 100% { opacity: 0; transform: translateY(8px); }
  12%, 40% { opacity: 1; transform: translateY(0); }
}

@keyframes welcome-modal-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 640px) {
  body.auth-standalone.welcome-mode {
    padding: 0 16px 40px;
  }

  body.auth-standalone.welcome-mode .welcome-nav-bar {
    width: calc(100% + 32px);
    margin: 0 -16px 0;
    padding: 12px 16px;
  }

  .welcome-nav-tagline {
    display: none;
  }

  .welcome-top-banner {
    padding: 24px 18px 20px;
    border-radius: 22px;
  }

  .welcome-hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
  }

  .welcome-hero-copy {
    text-align: center;
  }

  .welcome-hero-copy p {
    margin-left: auto;
    margin-right: auto;
  }

  .welcome-hero-actions,
  .welcome-trust-row {
    justify-content: center;
  }

  .welcome-quick-strip {
    justify-content: center;
  }

  .how-work-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .how-work-stage {
    min-height: 380px;
    order: -1;
  }

  .app-mock-sidebar {
    width: 118px;
  }

  .app-mock-nav-item span:not(.material-symbols-outlined) {
    display: none;
  }

  .app-mock-brand .brand-logo-split {
    display: none;
  }

  .welcome-preview-body {
    grid-template-columns: 56px 1fr;
    min-height: 200px;
  }

  .welcome-preview-nav {
    width: 36px;
    height: 36px;
  }

  .welcome-preview-stats {
    grid-template-columns: 1fr;
  }

  .welcome-features {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .welcome-preview-nav,
  .welcome-preview-bar,
  .welcome-preview-toast,
  .how-work-step.is-active .how-work-step-bar,
  .how-work-scene.is-active .how-anim-fade,
  .how-work-scene.is-active .how-anim-pop,
  .how-work-scene.is-active .how-anim-slide,
  .how-stock-fill,
  .how-pay-chip.is-active,
  .app-mock-mission-fill {
    animation: none !important;
  }

  .app-mock-mission-fill {
    width: 78%;
  }

  .how-work-scene.is-active .how-anim-fade,
  .how-work-scene.is-active .how-anim-pop,
  .how-work-scene.is-active .how-anim-slide {
    opacity: 1;
    transform: none;
  }
}
