/* ============================================
   Quest2Offer Landing — Premium Dark Theme
   ============================================ */

:root {
  --bg: #09090b;
  --bg-subtle: #111114;
  --surface: #18181b;
  --surface-2: #1e1e22;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(255, 255, 255, 0.12);
  --text: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #71717a;
  --accent: #6366f1;
  --accent-light: #818cf8;
  --accent-2: #a855f7;
  --green: #22c55e;
  --orange: #f97316;
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;
  --nav-h: 64px;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 24px);
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---- Nav ---- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: rgba(9, 9, 11, 0.75);
  border-bottom: 1px solid var(--border);
  transition: background 0.3s;
}

.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.nav__links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}

.nav__links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s;
}

.nav__links a:hover { color: var(--text); }

.nav__cta { margin-left: 16px; flex-shrink: 0; }

.nav__burger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  margin-left: auto;
  flex-direction: column;
  gap: 5px;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: 0.3s;
}

.nav__mobile {
  display: none;
  flex-direction: column;
  padding: 8px 24px 20px;
  gap: 12px;
}
.nav__mobile a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
}
.nav__mobile.active { display: flex; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: inherit;
  font-weight: 600;
  font-size: 15px;
  border: none;
  border-radius: var(--radius-sm);
  padding: 12px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn--sm { padding: 8px 18px; font-size: 14px; }
.btn--lg { padding: 16px 32px; font-size: 16px; }
.btn--full { width: 100%; }

.btn--primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  box-shadow: 0 0 24px rgba(99, 102, 241, 0.3);
}
.btn--primary:hover {
  box-shadow: 0 0 40px rgba(99, 102, 241, 0.5);
  transform: translateY(-1px);
}

.btn--outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}
.btn--outline:hover {
  background: var(--surface);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); }

.btn--loading {
  opacity: 0.7;
  cursor: not-allowed;
  pointer-events: none;
  position: relative;
}
.btn--loading::after {
  content: '';
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: btn-spin 0.6s linear infinite;
  flex-shrink: 0;
}
@keyframes btn-spin {
  to { transform: rotate(360deg); }
}

/* ---- Pill ---- */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-light);
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.2);
  border-radius: 999px;
  padding: 6px 16px;
}
.pill--small { font-size: 12px; padding: 5px 14px; }

.pill__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

/* ---- Gradient text ---- */
.gradient-text {
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent-2) 50%, var(--orange) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ---- Section header ---- */
.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 56px;
}
.section-header h2 {
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 16px 0 12px;
}
.section-header p {
  color: var(--text-secondary);
  font-size: 17px;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  padding: calc(var(--nav-h) + 60px) 0 80px;
  overflow: hidden;
}

.hero__glow {
  position: absolute;
  top: -200px;
  left: 50%;
  transform: translateX(-50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, rgba(168, 85, 247, 0.08) 40%, transparent 70%);
  pointer-events: none;
}

.hero .container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero__content { max-width: 560px; }

.hero__title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 20px 0;
}

.hero__sub {
  color: var(--text-secondary);
  font-size: 17px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero__proof {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.hero__proof p {
  font-size: 14px;
  color: var(--text-secondary);
}
.hero__proof strong { color: var(--text); }

.hero__avatars {
  display: flex;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  border: 2px solid var(--bg);
  flex-shrink: 0;
}
.hero__avatars .avatar + .avatar { margin-left: -8px; }

/* ---- Hero demo ---- */
.hero__visual { perspective: 1200px; }

.hero__demo {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 20px 60px rgba(0,0,0,0.4),
    0 0 80px rgba(99, 102, 241, 0.08);
  transform: rotateY(-4deg) rotateX(2deg);
  transition: transform 0.5s ease;
}
.hero__demo:hover { transform: rotateY(0) rotateX(0); }

.demo__header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border);
}
.demo__dot { width: 10px; height: 10px; border-radius: 50%; }
.demo__dot--red { background: #ef4444; }
.demo__dot--yellow { background: #eab308; }
.demo__dot--green { background: #22c55e; }
.demo__title {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
}

.demo__body { padding: 20px; display: grid; gap: 16px; }

.demo__line {
  display: grid;
  gap: 6px;
}
.demo__tag {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.demo__tag--ai { color: var(--accent-light); }
.demo__text {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-secondary);
}
.demo__line--ai .demo__text { color: var(--text); }

.demo__status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--green);
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.demo__pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 1.5s ease infinite;
}

/* ---- Logos ---- */
.logos {
  padding: 48px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.logos__label {
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.logos__grid {
  display: flex;
  justify-content: center;
  gap: 48px;
  flex-wrap: wrap;
}
.logos__item {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-muted);
  opacity: 0.5;
  transition: opacity 0.3s;
}
.logos__item:hover { opacity: 0.8; }

/* ---- Features ---- */
.features {
  padding: 100px 0;
}

.features__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}
.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--c, var(--accent)), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}
.feature-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.feature-card:hover::before { opacity: 1; }

.feature-card__icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  color: var(--c, var(--accent));
  margin-bottom: 20px;
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ---- Steps ---- */
.steps {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.steps__grid {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 0;
  position: relative;
}
.steps__grid::before {
  content: '';
  position: absolute;
  left: 31px;
  top: 32px;
  bottom: 32px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  opacity: 0.3;
}

.step {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  align-items: flex-start;
}

.step__number {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.step__content h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 6px;
}
.step__content p {
  color: var(--text-secondary);
  font-size: 15px;
}

/* ---- Testimonials ---- */
.testimonials {
  padding: 100px 0;
}

.testimonials__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.testimonial {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all 0.3s;
}
.testimonial:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.testimonial__stars {
  color: #eab308;
  font-size: 16px;
  letter-spacing: 2px;
}
.testimonial__text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.55;
  flex: 1;
}
.testimonial__author {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.testimonial__author strong {
  display: block;
  font-size: 14px;
}
.testimonial__author span {
  font-size: 12px;
  color: var(--text-muted);
}

/* ---- Pricing ---- */
.pricing {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.pricing__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: start;
}

.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  transition: all 0.3s;
}
.pricing-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pricing-card--popular {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(99, 102, 241, 0.06) 0%, var(--surface) 100%);
  box-shadow: 0 0 60px rgba(99, 102, 241, 0.1);
  transform: scale(1.04);
}
.pricing-card--popular:hover {
  transform: scale(1.04) translateY(-4px);
  box-shadow: 0 0 80px rgba(99, 102, 241, 0.15), 0 20px 60px rgba(0,0,0,0.3);
}

.pricing-card__badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 16px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.pricing-card__head {
  text-align: center;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
}
.pricing-card__head h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 12px;
}
.pricing-card__head p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 8px;
}

.pricing-card__price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
}
.pricing-card__amount {
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1;
}
.pricing-card__period {
  font-size: 15px;
  color: var(--text-muted);
  font-weight: 500;
}

.pricing-card__features {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}
.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-secondary);
}
.pricing-card__features svg { flex-shrink: 0; }

.checkout-status {
  text-align: center;
  margin-top: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  min-height: 20px;
}

/* ---- FAQ ---- */
.faq {
  padding: 100px 0;
}

.faq__list {
  max-width: 720px;
  margin: 0 auto;
  display: grid;
  gap: 8px;
}

.faq__item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}
.faq__item[open] { border-color: var(--border-hover); }

.faq__item summary {
  padding: 20px 24px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
  user-select: none;
  transition: color 0.2s;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 300;
  color: var(--text-muted);
  transition: transform 0.3s;
}
.faq__item[open] summary::after {
  transform: rotate(45deg);
}
.faq__item summary:hover { color: var(--accent-light); }

.faq__item p {
  padding: 0 24px 20px;
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- CTA ---- */
.cta {
  padding: 100px 0;
  background: var(--bg-subtle);
}

.cta__inner {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 64px 48px;
  text-align: center;
  overflow: hidden;
}
.cta__glow {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  width: 600px;
  height: 400px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.06) 50%, transparent 80%);
  pointer-events: none;
}

.cta__inner h2 {
  font-size: clamp(26px, 4vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-bottom: 12px;
  position: relative;
}
.cta__inner > p {
  color: var(--text-secondary);
  font-size: 17px;
  margin-bottom: 32px;
  position: relative;
}

.cta__form { position: relative; max-width: 520px; margin: 0 auto; }

.cta__inputs {
  display: flex;
  gap: 10px;
  margin-bottom: 12px;
}

.cta__form input {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
}
.cta__form input:focus { border-color: var(--accent); }
.cta__form input::placeholder { color: var(--text-muted); }

.cta__note {
  margin-top: 12px;
  font-size: 13px;
  color: var(--text-muted);
  position: relative;
}

.signup-status {
  margin-top: 12px;
  font-size: 14px;
  color: var(--green);
  min-height: 20px;
}

/* ---- Footer ---- */
.footer {
  padding: 56px 0 32px;
  border-top: 1px solid var(--border);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  margin-bottom: 40px;
}

.footer__brand p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-muted);
  max-width: 280px;
}

.footer__links {
  display: flex;
  gap: 64px;
}
.footer__links h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer__links a {
  display: block;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 4px 0;
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--text); }

.footer__bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer__bottom p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ---- Animations ---- */
.reveal {
  opacity: 1;
  transform: translateY(0);
}
body.has-reveal .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
body.has-reveal .reveal--delay { transition-delay: 0.15s; }
body.has-reveal .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes typing {
  from { width: 0; }
  to { width: 100%; }
}

/* ---- Responsive ---- */
@media (max-width: 960px) {
  .hero .container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero__content { max-width: 100%; }
  .hero__actions { justify-content: center; }
  .hero__proof { justify-content: center; }
  .hero__demo { transform: none; }
  .hero__demo:hover { transform: none; }

  .features__grid,
  .testimonials__grid,
  .pricing__grid {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }

  .pricing-card--popular {
    transform: none;
    order: -1;
  }
  .pricing-card--popular:hover { transform: translateY(-4px); }

  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: flex; }

  .footer__inner { flex-direction: column; gap: 32px; }
  .footer__links { gap: 40px; }
}

@media (max-width: 600px) {
  .hero { padding: calc(var(--nav-h) + 40px) 0 60px; }
  .hero__title { font-size: 32px; }
  .hero__actions { flex-direction: column; align-items: stretch; }
  .cta__inputs { flex-direction: column; }
  .cta__inner { padding: 40px 24px; }

  .features, .steps, .testimonials, .pricing, .faq, .cta { padding: 64px 0; }

  .logos__grid { gap: 24px; }
  .logos__item { font-size: 15px; }

  .step { gap: 16px; }
  .step__number { width: 48px; height: 48px; font-size: 18px; }
  .steps__grid::before { left: 23px; }
}

/* ---- New public checkout UI ---- */
.lang-switch {
  display: inline-flex;
  gap: 8px;
}

.lang-switch__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.lang-switch__item.is-active {
  border-color: rgba(99, 102, 241, 0.6);
  background: rgba(99, 102, 241, 0.16);
  color: var(--text);
}

.lang-switch--mobile {
  margin-top: 12px;
}

.invoice-box {
  margin-top: 20px;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  background: rgba(20, 24, 52, 0.6);
}

.invoice-box__hint {
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 14px;
}

.invoice-box__grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.invoice-box__full {
  grid-column: 1 / -1;
}

.invoice-box__label {
  color: var(--text-muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.invoice-box__value {
  color: var(--text);
  font-weight: 600;
  word-break: break-word;
}

.invoice-box__address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
}

.invoice-box__actions {
  margin-top: 18px;
}

.status-hero {
  padding-top: calc(var(--nav-h) + 48px);
  min-height: 86vh;
}

.status-box {
  max-width: 860px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 28px;
  background: rgba(17, 22, 45, 0.72);
}

.status-actions {
  margin-top: 22px;
}

@media (max-width: 600px) {
  .invoice-box__grid {
    grid-template-columns: 1fr;
  }
}

/* ---- Web wallet dashboard ---- */
.dashboard-page {
  min-height: 100vh;
  background: radial-gradient(circle at 10% 10%, rgba(56, 189, 248, 0.14), transparent 35%),
    radial-gradient(circle at 85% 25%, rgba(99, 102, 241, 0.12), transparent 36%),
    linear-gradient(180deg, #07090f 0%, #0f1220 55%, #0a0f1e 100%);
}

.dashboard-main {
  padding-top: calc(var(--nav-h) + 44px);
  padding-bottom: 56px;
}

.dashboard-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 28px;
  background: rgba(9, 12, 23, 0.82);
  backdrop-filter: blur(10px);
}

.auth-card {
  max-width: 760px;
  margin: 20px auto 0;
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 12px;
}

.auth-card p {
  color: var(--text-secondary);
}

.auth-card .btn {
  margin: 20px auto 14px;
}

.dashboard-header-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.dashboard-header-row h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 8px;
}

.dashboard-header-row p {
  color: var(--text-secondary);
}

.dashboard-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

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

.balance-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.balance-card__label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.balance-card__value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wallet-controls {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
}

.wallet-controls label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.wallet-controls select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 10px;
}

.deposit-grid {
  margin-top: 20px;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 12px;
}

.deposit-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.deposit-panel h3 {
  font-size: 13px;
  color: var(--text-muted);
  margin: 12px 0 6px;
}

.deposit-panel h3:first-child {
  margin-top: 0;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
}

.mono-wrap {
  word-break: break-all;
}

.qr-panel {
  display: grid;
  place-items: center;
}

.qr-panel img {
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  display: block;
}

.dashboard-user-email {
  display: inline-block;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.table-title {
  margin-top: 20px;
  font-size: 16px;
}

.table-wrap {
  margin-top: 8px;
  overflow-x: auto;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
}

.table-wrap th,
.table-wrap td {
  text-align: left;
  padding: 10px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.table-wrap th {
  color: var(--text-secondary);
  font-weight: 600;
}

.pricing__grid--dashboard {
  margin-top: 20px;
}

/* ── Usage bars ── */
.usage-section {
  margin-top: 20px;
}

.usage-section__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.usage-bars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.usage-bar__header {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.usage-bar__label {
  color: var(--text-secondary);
}

.usage-bar__value {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.usage-bar__track {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
  overflow: hidden;
}

.usage-bar__fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent);
  transition: width 0.4s ease, background 0.3s ease;
}

.usage-bar__fill--warn {
  background: var(--orange);
}

.usage-bar__fill--danger {
  background: #ef4444;
}

/* ── Plan card states ── */
.pricing-card--current {
  border-color: var(--green);
}

.pricing-card--current .btn,
.pricing-card--downgrade .btn {
  pointer-events: none;
  opacity: 0.45;
}

.pricing-card--downgrade {
  opacity: 0.55;
}

/* ── Usage summary in wallet card ── */
.balance-card__usage {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

@media (max-width: 900px) {
  .balance-grid {
    grid-template-columns: 1fr;
  }
  .wallet-controls {
    grid-template-columns: 1fr;
  }
  .deposit-grid {
    grid-template-columns: 1fr;
  }
  .usage-bars {
    grid-template-columns: 1fr;
  }
  .dashboard-header-row {
    flex-direction: column;
  }
}

/* ── Wallet page v2 ── */

.wallet-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 4px;
}

.wallet-header h1 {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 8px;
}

.wallet-header p {
  color: var(--text-secondary);
}

.wallet-header__actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
}

.wallet-header__email {
  font-size: 13px;
  color: var(--text-muted);
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Overview: balance + plan */
.wallet-overview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 20px;
}

.wallet-overview__finance {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.wallet-overview__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.balance-card__value--lg {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.balance-card__value--muted {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-secondary);
}

.wallet-overview__refresh {
  align-self: flex-start;
  margin-top: 14px;
}

.wallet-overview__plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wallet-overview__plan-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wallet-overview__plan-badge {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-light);
}

.wallet-usage-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.wallet-overview__plan-link {
  font-size: 13px;
  color: var(--accent-light);
  text-decoration: none;
  margin-top: auto;
}

.wallet-overview__plan-link:hover {
  text-decoration: underline;
}

/* Deposit flow card */
.wallet-deposit {
  margin-top: 20px;
}

.wallet-deposit__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 20px;
}

.wallet-deposit__step {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--border);
}

.wallet-deposit__step:first-of-type {
  border-top: none;
  padding-top: 0;
}

.wallet-deposit__step-num {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.wallet-deposit__step-body {
  flex: 1;
  min-width: 0;
}

.wallet-deposit__selectors {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wallet-deposit__label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}

.wallet-deposit__label select {
  width: 100%;
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 10px;
}

.wallet-deposit__suggested {
  margin-top: 14px;
  padding: 12px 16px;
  border-radius: 10px;
  background: rgba(99, 102, 241, 0.08);
  border: 1px solid rgba(99, 102, 241, 0.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.wallet-deposit__suggested-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.wallet-deposit__suggested-amount {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent-light);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.wallet-deposit__address-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}

.wallet-deposit__address-label {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.wallet-deposit__address-value {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
}

.wallet-deposit__qr-col img {
  background: #fff;
  border-radius: 12px;
  padding: 8px;
  display: block;
}

.wallet-deposit__wait-text {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Deposit history collapsible */
.wallet-history {
  margin-top: 16px;
}

.wallet-history__summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.wallet-history__summary::-webkit-details-marker {
  display: none;
}

.wallet-history__summary h3 {
  font-size: 16px;
  font-weight: 600;
}

.wallet-history__toggle {
  font-size: 14px;
  color: var(--text-muted);
  transition: transform 0.2s;
}

details[open] > .wallet-history__summary .wallet-history__toggle {
  transform: rotate(180deg);
}

/* ── User Glossaries ── */
.wallet-glossaries {
  margin-top: 16px;
}

.glossary-plan-gate {
  padding: 20px 0 8px;
}

.glossary-plan-gate p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.glossary-toolbar {
  display: flex;
  justify-content: flex-end;
  padding: 14px 0 10px;
}

.glossary-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 8px;
  transition: border-color 0.2s;
}

.glossary-card:hover {
  border-color: var(--border-hover);
}

.glossary-card__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.glossary-card__name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.glossary-card__meta {
  font-size: 12px;
  color: var(--text-muted);
}

.glossary-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.glossary-form {
  padding: 18px 0 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.glossary-form h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.glossary-form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}

.glossary-form input[type="text"],
.glossary-form textarea,
.glossary-form select {
  width: 100%;
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 14px;
}

.glossary-form textarea {
  resize: vertical;
}

.glossary-form-actions {
  display: flex;
  gap: 8px;
  padding-top: 4px;
}

.glossary-terms-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 10px;
}

.glossary-terms-header h4 {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
}

.glossary-no-data {
  padding: 16px 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

/* Responsive wallet v2 */
@media (max-width: 900px) {
  .wallet-header {
    flex-direction: column;
  }
  .wallet-overview {
    grid-template-columns: 1fr;
  }
  .wallet-deposit__selectors {
    grid-template-columns: 1fr;
  }
  .wallet-deposit__address-row {
    grid-template-columns: 1fr;
  }
  .wallet-deposit__qr-col {
    justify-self: center;
  }
}
