/* ═══════════════════════════════════════════════════════════
   QRflo — Styles
   Color palette: Deep Twilight → Light Cyan ocean gradient
   ═══════════════════════════════════════════════════════════ */

:root {
  --deep-twilight:    #03045e;
  --french-blue:      #023e8a;
  --bright-teal:      #0077b6;
  --blue-green:       #0096c7;
  --turquoise:        #00b4d8;
  --sky-aqua:         #48cae4;
  --frosted:          #90e0ef;
  --frosted-2:        #ade8f4;
  --light-cyan:       #caf0f8;

  /* Semantic aliases */
  --bg:               #f4f8fb;
  --bg-alt:           var(--light-cyan);
  --surface:          #fff;
  --border:           #d6e4ed;
  --border-light:     #e8f1f6;
  --text:             #1a2a3a;
  --text-muted:       #5a7080;
  --text-faint:       #8fa4b2;
  --accent:           var(--bright-teal);
  --accent-hover:     var(--blue-green);
  --accent-light:     var(--light-cyan);
  --danger:           #d63031;
  --success:          #00a67e;
  --radius-sm:        6px;
  --radius:           10px;
  --radius-lg:        16px;
  --radius-xl:        20px;
  --shadow:           0 2px 12px rgba(3,4,94,0.06);
  --shadow-lg:        0 8px 32px rgba(3,4,94,0.10);
  --shadow-xl:        0 16px 48px rgba(3,4,94,0.14);
  --gradient-hero:    linear-gradient(135deg, var(--deep-twilight) 0%, var(--french-blue) 40%, var(--bright-teal) 100%);
  --gradient-accent:  linear-gradient(135deg, var(--bright-teal) 0%, var(--turquoise) 100%);
  --gradient-surface: linear-gradient(180deg, var(--light-cyan) 0%, #fff 100%);
}

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

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }

/* ── Page structure ───────────────────────────────────────── */

.page-wrap {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.page-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 24px;
}

/* ── Header ───────────────────────────────────────────────── */

.site-header {
  background: linear-gradient(135deg, #020340 0%, var(--deep-twilight) 50%, #031a50 100%);
  padding: 0 36px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid rgba(72,202,228,0.12);
  box-shadow:
    0 1px 0 0 rgba(72,202,228,0.06),
    0 4px 24px rgba(3,4,94,0.25);
}

/* ── Logo ─────────────────────────────────────────────── */

.logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  height: 34px;
  width: 34px;
  display: block;
  flex-shrink: 0;
}

.logo-wordmark {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -1.2px;
  color: white;
  line-height: 1.2;
  overflow: visible;
}

.logo-flo {
  background: linear-gradient(90deg, #90e0ef, #caf0f8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  padding-right: 3px;
}

/* ── Nav ──────────────────────────────────────────────── */

.site-nav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 100%;
}

.nav-links {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 100%;
}

.nav-auth {
  display: flex;
  align-items: stretch;
  gap: 2px;
  height: 100%;
}

.nav-auth-form {
  display: flex;
  align-items: stretch;
  height: 100%;
}

/* All page links and log out share the same base style */
.nav-link {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.55);
  text-decoration: none;
  padding: 0 16px;
  display: flex;
  align-items: center;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
}

.nav-link > span { position: relative; z-index: 1; }

/* Animated underline on hover */
.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sky-aqua), var(--frosted));
  border-radius: 2px 2px 0 0;
  transition: width 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), left 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-link:hover {
  color: #fff;
}

.nav-link:hover::after {
  width: calc(100% - 16px);
  left: 8px;
}

/* Log out — same shape as nav-link, rendered as a button */
.nav-logout-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(255,255,255,0.55);
  padding: 0 16px;
  display: flex;
  align-items: center;
  position: relative;
  transition: color 0.2s;
  white-space: nowrap;
  height: 100%;
}

.nav-logout-btn::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--sky-aqua), var(--frosted));
  border-radius: 2px 2px 0 0;
  transition: width 0.25s cubic-bezier(0.22, 0.61, 0.36, 1), left 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-logout-btn:hover {
  color: #fff;
}

.nav-logout-btn:hover::after {
  width: calc(100% - 16px);
  left: 8px;
}

/* Thin divider between page links and auth actions */
.nav-divider {
  width: 1px;
  height: 18px;
  background: rgba(255,255,255,0.1);
  margin: 0 10px;
  flex-shrink: 0;
  align-self: center;
}

/* Sign up — pill CTA with glow */
.nav-cta {
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--bright-teal) 0%, var(--turquoise) 100%);
  text-decoration: none;
  padding: 8px 20px;
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 6px;
  margin-left: 6px;
  border-radius: 100px;
  transition: transform 0.2s, box-shadow 0.2s;
  white-space: nowrap;
  box-shadow:
    0 0 12px rgba(0,180,216,0.25),
    0 2px 8px rgba(0,119,182,0.2);
}

.nav-cta svg {
  transition: transform 0.2s;
}

.nav-cta:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 20px rgba(0,180,216,0.35),
    0 4px 16px rgba(0,119,182,0.3);
}

.nav-cta:hover svg {
  transform: translateX(2px);
}

/* ── Mobile toggle ── */
.nav-mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: background 0.15s;
}

.nav-mobile-toggle:hover {
  background: rgba(255,255,255,0.06);
}

.nav-mobile-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
  transition: all 0.25s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.nav-mobile-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-mobile-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-mobile-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 640px) {
  .site-header { padding: 0 16px; height: 60px; }
  .logo-icon { height: 28px; width: 28px; }
  .logo-wordmark { font-size: 18px; }
  .nav-mobile-toggle { display: flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: linear-gradient(180deg, #020340 0%, #03045e 100%);
    border-bottom: 1px solid rgba(72,202,228,0.1);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 14px 18px;
    gap: 2px;
    z-index: 500;
    box-shadow: 0 16px 40px rgba(3,4,94,0.5);
  }
  .site-nav.open { display: flex; }
  .nav-links, .nav-auth { flex-direction: column; height: auto; }
  .nav-auth-form { height: auto; }
  .nav-link, .nav-logout-btn {
    font-size: 14.5px;
    padding: 12px 14px;
    border-radius: 8px;
  }
  .nav-link:hover, .nav-logout-btn:hover {
    background: rgba(255,255,255,0.05);
  }
  .nav-link::after, .nav-logout-btn::after { display: none; }
  .nav-divider { width: 100%; height: 1px; margin: 6px 0; }
  .nav-cta {
    text-align: center;
    justify-content: center;
    padding: 12px 20px;
    margin-left: 0;
    margin-top: 4px;
    border-radius: 10px;
    font-size: 14px;
  }
  .nav-cta:hover { transform: none; }
}

/* ── Shared buttons ───────────────────────────────────────── */

.btn-primary {
  display: inline-block;
  padding: 13px 30px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,119,182,0.3);
}

.btn-ghost {
  display: inline-block;
  padding: 13px 30px;
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: all 0.15s;
}

.btn-ghost:hover {
  background: rgba(255,255,255,0.25);
  border-color: rgba(255,255,255,0.5);
}

/* On light backgrounds */
.btn-ghost-dark {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-ghost-dark:hover {
  background: var(--light-cyan);
  border-color: var(--frosted);
}

.btn-lg { padding: 16px 36px; font-size: 15px; }

/* ── Shared section layout ────────────────────────────────── */

.section {
  padding: 72px 24px;
  position: relative;
}

.section-alt {
  background: var(--gradient-surface);
}

.section-dark {
  background: var(--gradient-hero);
  color: #fff;
}

.section-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.section-narrow {
  max-width: 680px;
}

.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--turquoise);
  margin-bottom: 10px;
}

.section-dark .section-eyebrow { color: var(--sky-aqua); }

.section-title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.2;
  color: var(--deep-twilight);
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.section-dark .section-title { color: #fff; }

.section-sub {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 520px;
}

.section-dark .section-sub { color: rgba(255,255,255,0.7); }

/* ── Wave dividers ────────────────────────────────────────── */

.wave-divider {
  display: block;
  width: 100%;
  height: auto;
  margin-top: -1px;
  vertical-align: bottom;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding: 100px 24px 120px;
  text-align: center;
  background: linear-gradient(
    135deg,
    #03045e 0%,
    #023e8a 16%,
    #0077b6 32%,
    #0096c7 48%,
    #0077b6 64%,
    #023e8a 80%,
    #03045e 100%
  );
  background-size: 400% 400%;
  animation: hero-gradient 16s ease infinite;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 0 160px 40px rgba(2,3,64,0.5);
}

@keyframes hero-gradient {
  0%   { background-position: 0% 50%; }
  25%  { background-position: 100% 25%; }
  50%  { background-position: 50% 100%; }
  75%  { background-position: 0% 75%; }
  100% { background-position: 0% 50%; }
}

/* Dot grid overlay */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.07) 1px, transparent 1px);
  background-size: 24px 24px;
  pointer-events: none;
}

/* Glowing orb */
.hero::after {
  content: '';
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,180,216,0.15) 0%, transparent 70%);
  top: -100px;
  right: -150px;
  pointer-events: none;
}

.hero-inner {
  max-width: 660px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.hero-eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sky-aqua);
  margin-bottom: 20px;
}

.hero-title {
  font-size: 48px;
  font-weight: 800;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
}

.hero-sub {
  font-size: 17px;
  line-height: 1.7;
  color: rgba(255,255,255,0.7);
  margin-bottom: 36px;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-actions .btn-primary {
  box-shadow:
    0 0 20px rgba(0,180,216,0.3),
    0 6px 24px rgba(0,0,0,0.35);
  border: 1px solid rgba(255,255,255,0.15);
}

.hero-actions .btn-primary:hover {
  box-shadow:
    0 0 28px rgba(0,180,216,0.4),
    0 8px 32px rgba(0,0,0,0.4);
}

.hero-actions .btn-ghost {
  border: 1px solid rgba(255,255,255,0.35);
  box-shadow: 0 6px 24px rgba(0,0,0,0.3);
}

.hero-actions .btn-ghost:hover {
  border-color: rgba(255,255,255,0.6);
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
}

@media (max-width: 600px) {
  .hero { padding: 56px 20px 80px; }
  .hero-title { font-size: 30px; }
  .hero-sub { font-size: 15px; }
  .hero-actions { flex-direction: column; align-items: center; }
}

/* ── Metrics bar ──────────────────────────────────────────── */

.metrics-bar {
  background: var(--deep-twilight);
  padding: 40px 24px;
  position: relative;
  z-index: 1;
}

.metrics-inner {
  max-width: 840px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 100px;
}

.metric-val {
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.metric-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--sky-aqua);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

@media (max-width: 500px) {
  .metrics-inner { gap: 16px; }
  .metric-val { font-size: 22px; }
}

/* ── Features grid ────────────────────────────────────────── */

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

.feature-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  width: 44px;
  height: 44px;
  background: var(--light-cyan);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  color: var(--bright-teal);
}

.feature-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--deep-twilight);
  margin-bottom: 8px;
}

.feature-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 720px) {
  .features-grid { grid-template-columns: 1fr; gap: 16px; }
}

@media (min-width: 721px) and (max-width: 900px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ── Steps / How it works ─────────────────────────────────── */

.steps-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.step { text-align: center; }

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 800;
  border-radius: 50%;
  margin-bottom: 18px;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.step-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--deep-twilight);
  margin-bottom: 8px;
}

.step-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .steps-row { grid-template-columns: 1fr; gap: 28px; }
}

/* ── CTA Section ──────────────────────────────────────────── */

.cta-section {
  background: var(--gradient-hero);
  padding: 80px 24px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.cta-section .section-inner { position: relative; z-index: 1; }
.cta-section .section-title { color: #fff; }
.cta-section .section-sub { color: rgba(255,255,255,0.7); margin: 0 auto; }

/* ── Pricing plan cards ───────────────────────────────────── */

.plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 740px;
  margin: 0 auto;
}

.plan-grid-three {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1000px;
}

.plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 36px 28px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.2s;
}

.plan-card:hover { transform: translateY(-2px); }

.plan-card-featured {
  border: 2px solid var(--bright-teal);
  box-shadow: var(--shadow-xl);
}

.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 18px;
  border-radius: 20px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.plan-header { margin-bottom: 28px; }

.plan-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--deep-twilight);
  margin-bottom: 8px;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin-bottom: 4px;
}

.price-amount {
  font-size: 40px;
  font-weight: 800;
  color: var(--deep-twilight);
  letter-spacing: -0.03em;
}

.price-period {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

.plan-price-sub {
  font-size: 12px;
  color: var(--text-faint);
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1;
  margin-bottom: 28px;
}

.plan-feature {
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.5;
  padding: 9px 0;
  border-bottom: 1px solid var(--border-light);
}

.plan-feature:last-child { border-bottom: none; }

.plan-feature.disabled { color: var(--text-faint); }
.plan-feature strong { font-weight: 700; }

.check {
  color: var(--success);
  font-weight: 700;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.feat-highlight { color: var(--bright-teal); }

.x-mark {
  color: #ccc;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

.plan-cta {
  width: 100%;
  text-align: center;
  padding: 13px;
}

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

@media (min-width: 601px) and (max-width: 860px) {
  .plan-grid-three {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

/* ── Feature detail grid ──────────────────────────────────── */

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.detail-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--deep-twilight);
  margin-bottom: 8px;
}

.detail-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

.detail-pro-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--light-cyan);
  color: var(--bright-teal);
  padding: 2px 8px;
  border-radius: 20px;
  vertical-align: middle;
  margin-left: 6px;
}

@media (max-width: 600px) {
  .detail-grid { grid-template-columns: 1fr; gap: 28px; }
}

/* ── FAQ ──────────────────────────────────────────────────── */

.faq-list {
  margin-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.faq-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border-light);
}

.faq-item:first-child { border-top: 1px solid var(--border-light); }

.faq-q {
  font-size: 15px;
  font-weight: 700;
  color: var(--deep-twilight);
  margin-bottom: 8px;
}

.faq-a {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ── Prose (about, legal pages) ───────────────────────────── */

.prose { margin-top: 36px; }

.prose p {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 16px;
}

.prose h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--deep-twilight);
  margin-top: 40px;
  margin-bottom: 12px;
}

.prose a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.prose a:hover { color: var(--accent-hover); }
.prose strong { color: var(--text); }

.legal-updated {
  font-size: 12px;
  color: var(--text-faint);
  margin-top: 4px;
}

/* ── Contact page ─────────────────────────────────────────── */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 40px;
  margin-top: 36px;
  align-items: flex-start;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.contact-textarea {
  resize: vertical;
  min-height: 120px;
  font-family: inherit;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 24px;
  background: var(--light-cyan);
  border-radius: var(--radius-lg);
  border: 1px solid var(--frosted);
}

.contact-info-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 4px;
}

.contact-info-val {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  text-decoration: none;
}

a.contact-info-val:hover { color: var(--accent); text-decoration: underline; }

.contact-success {
  padding: 32px;
  background: #eafaf3;
  border: 1px solid #b2e5cf;
  border-radius: var(--radius-lg);
  text-align: center;
}

.contact-success-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 6px;
}

.contact-success-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

@media (max-width: 600px) {
  .contact-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Full footer ──────────────────────────────────────────── */

.site-footer { display: none; }

.site-footer-full {
  background: var(--deep-twilight);
  color: rgba(255,255,255,0.5);
  padding: 56px 32px 0;
}

.footer-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 32px;
}

.footer-logo {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.03em;
}

.footer-tagline {
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  margin-top: 8px;
  line-height: 1.5;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sky-aqua);
  margin-bottom: 4px;
}

.footer-col a {
  font-size: 13px;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.15s;
}

.footer-col a:hover { color: #fff; }

.footer-bottom {
  max-width: 1000px;
  margin: 48px auto 0;
  padding: 20px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  font-size: 12px;
  color: rgba(255,255,255,0.3);
}

@media (max-width: 600px) {
  .site-footer-full { padding: 36px 20px 0; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 24px; }
  .footer-brand-col { grid-column: 1 / -1; }
}


/* ═══════════════════════════════════════════════════════════
   EXISTING APP STYLES — Editor, Dashboard, Auth, View
   (updated to use new palette variables)
   ═══════════════════════════════════════════════════════════ */

/* ── Editor card ──────────────────────────────────────────── */

.editor-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 900px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.editor-header {
  padding: 24px 28px 20px;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.editor-header-left {}

.editor-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--deep-twilight);
  margin-bottom: 2px;
}

.editor-subtitle {
  font-size: 13px;
  color: var(--text-muted);
}

.editor-body {
  display: grid;
  grid-template-columns: 280px 1fr;
}

/* Controls panel */
.controls-panel {
  border-right: 1px solid var(--border-light);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.panel-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 5px;
}

.field-hint {
  font-size: 11px;
  color: var(--text-faint);
}

.optional {
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: #ccc;
}

/* Tooltips */
.tip-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--light-cyan);
  color: var(--bright-teal);
  font-size: 9px;
  font-weight: 800;
  cursor: default;
  flex-shrink: 0;
  letter-spacing: 0;
  text-transform: none;
}

.tip-box {
  display: none;
  position: absolute;
  bottom: calc(100% + 6px);
  left: 0;
  background: var(--deep-twilight);
  color: rgba(255,255,255,0.9);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0;
  text-transform: none;
  padding: 7px 10px;
  border-radius: 8px;
  width: 210px;
  white-space: normal;
  z-index: 200;
  pointer-events: none;
}

.tip-box::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 8px;
  border: 5px solid transparent;
  border-top-color: var(--deep-twilight);
}

.tip-wrap:hover .tip-box { display: block; }

/* Text inputs */
.text-input {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
}

.text-input:focus {
  border-color: var(--bright-teal);
  box-shadow: 0 0 0 3px rgba(0,119,182,0.1);
}

.field-error {
  font-size: 11px;
  color: var(--danger);
  margin-top: 2px;
}

/* Style picker */
.style-grid {
  display: flex;
  gap: 6px;
}

.style-btn {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  cursor: pointer;
  font-size: 10px;
  font-family: inherit;
  color: var(--text-muted);
  transition: all 0.15s;
}

.style-btn:hover { background: var(--light-cyan); }

.style-btn.active {
  background: var(--deep-twilight);
  border-color: var(--deep-twilight);
  color: #fff;
}

.style-icon { width: 20px; height: 20px; }

/* Toggle */
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.toggle-row input[type="checkbox"] { display: none; }

.toggle-track {
  width: 34px;
  height: 19px;
  background: var(--border);
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 15px;
  height: 15px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-row input:checked + .toggle-track { background: var(--bright-teal); }
.toggle-row input:checked + .toggle-track .toggle-thumb { transform: translateX(15px); }

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

/* Error correction */
.ec-group {
  display: flex;
  gap: 5px;
}

.ec-btn {
  flex: 1;
  padding: 6px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 11px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.ec-btn:hover { background: var(--light-cyan); }
.ec-btn.active { background: var(--deep-twilight); border-color: var(--deep-twilight); color: #fff; }
.ec-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Colors */
.color-row { display: flex; gap: 12px; }
.color-field { display: flex; flex-direction: column; gap: 5px; flex: 1; }
.color-label { font-size: 11px; color: var(--text-muted); }

.color-swatch-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color 0.15s;
}

.color-swatch-wrap:hover { border-color: var(--bright-teal); }

input[type="color"] {
  width: 18px;
  height: 18px;
  border: 1px solid #ccc;
  padding: 0;
  border-radius: 3px;
  cursor: pointer;
  background: none;
  outline: 1px solid #e8e8e8;
  outline-offset: 1px;
}

.color-hex {
  font-size: 11px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-muted);
}

/* Icon upload */
.icon-upload-area { display: flex; align-items: center; gap: 8px; }

.upload-btn {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: 11px;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s;
  white-space: nowrap;
}

.upload-btn:hover { background: var(--light-cyan); }

.upload-hint { font-size: 11px; color: var(--text-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  background: var(--light-cyan);
  border-radius: 7px;
  border: 1px solid var(--frosted);
}

.icon-shape-row { display: flex; align-items: center; gap: 6px; }
.shape-group { display: flex; gap: 4px; }

.shape-btn {
  width: 26px;
  height: 26px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.15s;
}

.shape-btn:hover { background: var(--light-cyan); }
.shape-btn.active { background: var(--deep-twilight); border-color: var(--deep-twilight); color: #fff; }

.remove-icon-btn {
  margin-left: auto;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  font-family: inherit;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.15s;
}

.remove-icon-btn:hover { border-color: var(--danger); color: var(--danger); }

/* Sliders */
.slider-row { display: flex; align-items: center; gap: 8px; }
.slider-label { font-size: 11px; color: var(--text-muted); min-width: 30px; }
input[type="range"] { flex: 1; accent-color: var(--bright-teal); cursor: pointer; }
.slider-val { font-size: 11px; color: var(--text-muted); min-width: 36px; text-align: right; font-family: monospace; }

/* Preview panel */
.preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 40px;
  background: #eef1f5;
  min-height: 420px;
}

.qr-stage { display: flex; align-items: center; justify-content: center; }

#qr-canvas {
  display: block;
  box-shadow: 0 8px 32px rgba(3,4,94,0.12);
  border-radius: 4px;
}

.preview-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.download-btn {
  padding: 11px 28px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.download-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,119,182,0.3); }
.download-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

/* Vanity URL */
.vanity-row {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s;
}

.vanity-row:focus-within { border-color: var(--bright-teal); box-shadow: 0 0 0 3px rgba(0,119,182,0.1); }

.vanity-prefix {
  padding: 7px 8px;
  background: var(--light-cyan);
  border-right: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  font-family: monospace;
}

.vanity-row input {
  flex: 1;
  padding: 7px 9px;
  border: none;
  outline: none;
  font-size: 12px;
  font-family: monospace;
  min-width: 0;
  color: var(--text);
}

.coming-soon { font-size: 10px; color: var(--text-faint); }

/* ── Responsive editor ───────────────────────────────────── */

@media (max-width: 720px) {
  .page-main { padding: 0; align-items: stretch; }

  .editor-card {
    border-radius: 0;
    border-left: none;
    border-right: none;
    border-top: none;
    max-width: 100%;
  }

  .editor-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .editor-body { grid-template-columns: 1fr; }

  .preview-panel {
    order: -1;
    min-height: auto;
    padding: 24px 16px;
    border-bottom: 1px solid var(--border-light);
    border-right: none;
  }

  .controls-panel {
    border-right: none;
    padding: 16px;
    gap: 20px;
  }

  .tip-box { width: 180px; }
}

/* ── Pro feature gating ───────────────────────────────────── */

.pro-locked {
  position: relative;
  opacity: 0.5;
  pointer-events: none;
  user-select: none;
}

.pro-locked::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 8px;
  cursor: pointer;
  pointer-events: auto;
}

.pro-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  background: var(--gradient-accent);
  padding: 2px 7px;
  border-radius: 3px;
  margin-left: 4px;
  vertical-align: middle;
}

/* Upgrade banner */
.upgrade-banner { display: none; }

/* ─── Mode picker ─────────────────────────────────────────────────────────────── */

#mode-picker {
  width: 100%;
  max-width: 900px;
}

.mpc-topbar {
  width: 100%;
  max-width: 900px;
  margin-bottom: 36px;
}

.mpc-header {
  text-align: center;
  margin-bottom: 40px;
}

.mpc-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--deep-twilight);
  letter-spacing: -0.4px;
  margin-bottom: 8px;
}

.mpc-sub {
  font-size: 14px;
  color: var(--text-muted);
}

.mpc-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.mpc-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px 28px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.15s;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: var(--shadow);
  outline: none;
  user-select: none;
}

.mpc-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.mpc-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(0,119,182,0.3);
}

/* Dynamic card — featured */
.mpc-card-dynamic {
  border-color: var(--accent);
  background: linear-gradient(160deg, #f0f9ff 0%, #fff 60%);
  box-shadow: 0 4px 24px rgba(0,119,182,0.1);
}

.mpc-card-dynamic:hover {
  box-shadow: 0 8px 36px rgba(0,119,182,0.16);
}

/* Locked dynamic card */
.mpc-card-locked {
  opacity: 0.7;
  cursor: pointer; /* still clickable — shows upgrade prompt */
}

.mpc-card-locked:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

/* Badges */
.mpc-recommended {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
}

.mpc-lock-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
}

.mpc-lock-badge-limit {
  background: #fee2e2;
  color: #991b1b;
}

/* Card icon */
.mpc-icon {
  width: 48px;
  height: 48px;
  padding: 10px;
  border-radius: 12px;
  margin-bottom: 4px;
}

.mpc-card-static .mpc-icon { color: #64748b; background: #f1f5f9; }
.mpc-card-dynamic .mpc-icon { color: var(--accent); background: var(--light-cyan); }
.mpc-card-locked .mpc-icon { color: #94a3b8; background: #f1f5f9; }

/* Card text */
.mpc-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--deep-twilight);
  margin-bottom: 2px;
}

.mpc-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
  margin-bottom: 6px;
}

/* Feature list */
.mpc-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0 0 16px;
  flex: 1;
}

.mpc-features li {
  font-size: 12.5px;
  line-height: 1.4;
  padding: 8px 0 8px 24px;
  position: relative;
  color: var(--text);
  border-bottom: 1px solid var(--border-light);
}

.mpc-features li:last-child {
  border-bottom: none;
}

.mpc-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.mf-yes::before {
  background-color: #dcfce7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2,6 5,9 10,3' fill='none' stroke='%2316a34a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.mf-no {
  color: var(--text-faint);
}

.mpc-features li.mf-no .mf-note {
  display: inline-block;
  text-decoration: none !important;
  color: var(--text-faint);
}

.mf-no::before {
  background-color: #f1f5f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cline x1='3' y1='3' x2='9' y2='9' stroke='%238fa4b2' stroke-width='1.8' stroke-linecap='round'/%3E%3Cline x1='9' y1='3' x2='3' y2='9' stroke='%238fa4b2' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.mf-note {
  font-size: 11px;
  color: var(--text-faint);
  font-style: italic;
}

.mf-pro.mf-yes::before { color: var(--accent); }

/* CTA row at bottom */
.mpc-cta {
  margin-top: auto;
  font-size: 13px;
  font-weight: 700;
  color: var(--deep-twilight);
  display: flex;
  align-items: center;
  gap: 4px;
}

.mpc-card-dynamic .mpc-cta { color: var(--accent); }

.mpc-cta-locked {
  color: var(--text-muted);
  font-weight: 500;
}

/* ── Mode-driven field visibility ── */

#editor-wrap[data-mode="static"] .dynamic-only { display: none !important; }

/* ── Dynamic button variant ── */
.download-btn-dynamic {
  background: var(--gradient-accent) !important;
}

@media (max-width: 640px) {
  .mpc-cards { grid-template-columns: 1fr; }
  .mpc-title { font-size: 22px; }
  .mpc-card  { padding: 28px 20px 24px; }
}

/* ── Dashboard ────────────────────────────────────────────── */

.new-qr-btn {
  padding: 9px 20px;
  background: var(--gradient-accent);
  color: #fff;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
  display: block;
}

.new-qr-btn:hover { transform: translateY(-1px); }

.dash-body { padding: 0; }

.dash-empty { padding: 48px 24px; text-align: center; color: var(--text-muted); font-size: 14px; }

.new-qr-link { display: inline-block; margin-top: 10px; color: var(--accent); font-weight: 600; text-decoration: underline; font-size: 13px; }

.dash-table { width: 100%; border-collapse: collapse; font-size: 13px; }

.dash-table thead th {
  text-align: left;
  padding: 10px 16px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border-light);
  white-space: nowrap;
}

.dash-table tbody tr { border-bottom: 1px solid var(--border-light); transition: background 0.1s; }
.dash-table tbody tr:hover { background: var(--light-cyan); }
.dash-table td { padding: 12px 16px; vertical-align: middle; }

.dash-preview-wrap { position: relative; width: 40px; height: 40px; }
.dash-preview-img { display: block; width: 40px; height: 40px; border-radius: 6px; }

.dash-hover-preview {
  display: none;
  position: fixed;
  width: 200px;
  height: 200px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  border: 2px solid #fff;
  z-index: 1000;
  pointer-events: none;
  background: #fff;
}

.dash-name { font-weight: 600; color: var(--text); }
.dash-name-link { color: var(--text); text-decoration: none; font-weight: 600; }
.dash-name-link:hover { text-decoration: underline; color: var(--accent); }

.dash-dest a { color: var(--text-muted); text-decoration: none; font-family: monospace; font-size: 12px; }
.dash-dest a:hover { text-decoration: underline; color: var(--accent); }

.dash-scans { font-family: monospace; color: var(--text-muted); }
.dash-date { color: var(--text-faint); white-space: nowrap; }

.dash-actions { display: flex; gap: 6px; white-space: nowrap; }

.dash-btn {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  color: var(--text-muted);
  transition: all 0.15s;
  line-height: 1.4;
}

.dash-btn:hover { background: var(--light-cyan); border-color: var(--frosted); color: var(--accent); }
.dash-delete:hover { color: var(--danger); border-color: #f0a0a0; background: #fef5f5; }

.dash-short-link { font-family: monospace; font-size: 11px; }
.short-link-inner { display: flex; align-items: center; gap: 6px; }
.short-link-text { color: var(--text-muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.short-link-copy {
  flex-shrink: 0;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  font-size: 10px;
  font-family: inherit;
  color: var(--text-faint);
  cursor: pointer;
  transition: all 0.15s;
}

.short-link-copy:hover { border-color: var(--bright-teal); color: var(--bright-teal); }

@media (max-width: 720px) {
  .dash-table thead { display: none; }
  .dash-table tbody tr { display: grid; grid-template-columns: 40px 1fr; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--border-light); }
  .dash-table td { padding: 0; }
  .dash-table td:first-child { grid-row: 1 / 4; }
  .dash-actions { grid-column: 1 / -1; margin-top: 8px; }
}

/* ── Modal ────────────────────────────────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(3,4,94,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  backdrop-filter: blur(2px);
}

.modal-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px 24px 22px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-xl);
}

.modal-title { font-size: 16px; font-weight: 700; color: var(--deep-twilight); margin-bottom: 6px; }
.modal-sub { font-size: 13px; color: var(--text-muted); line-height: 1.5; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

.modal-cancel {
  padding: 8px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.modal-cancel:hover { background: var(--bg); }

.modal-confirm {
  padding: 8px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--danger);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.modal-confirm:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,0,0,0.2); }

.modal-confirm-accent {
  background: var(--gradient-accent);
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.modal-confirm-accent:hover {
  box-shadow: 0 6px 20px rgba(0,119,182,0.3);
}

/* Download modal */
.dl-modal-card { max-width: 420px; }
.dl-preview-wrap { display: flex; justify-content: center; padding: 16px 0; }
.dl-preview-img { width: 180px; height: 180px; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.dl-name { text-align: center; font-size: 13px; font-weight: 600; color: var(--text-muted); margin-bottom: 16px; }
.dl-size-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px; }

.dl-size-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s;
}

.dl-size-btn:hover { background: var(--light-cyan); border-color: var(--frosted); color: var(--accent); }

.dl-actions { display: flex; justify-content: space-between; align-items: center; }

.dl-all-btn {
  padding: 8px 18px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.dl-all-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,119,182,0.3); }

/* Edit modal */
.edit-modal-fields { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.edit-field { display: flex; flex-direction: column; gap: 5px; }
.edit-field-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.edit-save-btn { background: var(--gradient-accent) !important; }
.edit-save-btn:hover { opacity: 0.9; }

/* ── View page ────────────────────────────────────────────── */

.view-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 820px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.view-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border-light);
}

.view-header-left { display: flex; flex-direction: column; }

.view-body { display: grid; grid-template-columns: 280px 1fr; }

.view-qr-col {
  border-right: 1px solid var(--border-light);
  padding: 32px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef1f5;
}

.view-qr-wrap {
  width: 220px;
  height: 220px;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.12), 0 1px 4px rgba(0,0,0,0.08);
  background: #fff;
}

.view-qr-img { display: block; width: 100%; height: 100%; object-fit: contain; }

.view-details-col { padding: 28px; display: flex; flex-direction: column; gap: 28px; }
.view-meta { display: flex; flex-direction: column; gap: 14px; }
.view-name { font-size: 20px; font-weight: 700; color: var(--deep-twilight); line-height: 1.2; }
.view-dest { display: flex; flex-direction: column; gap: 3px; }
.view-dest-label { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.view-dest-url { font-size: 13px; color: var(--text-muted); text-decoration: none; word-break: break-all; }
.view-dest-url:hover { color: var(--accent); text-decoration: underline; }

.view-stats-row { display: flex; gap: 24px; }
.view-stat { display: flex; flex-direction: column; gap: 2px; }
.view-stat-val { font-size: 20px; font-weight: 800; color: var(--deep-twilight); }
.view-stat-key { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }

.view-shortlink-section { display: flex; flex-direction: column; gap: 6px; }
.view-shortlink-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }

.view-shortlink-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.view-shortlink-text { font-family: monospace; font-size: 12px; color: var(--text-muted); flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── View page analytics ──────────────────────────────── */

.view-analytics {
  border-top: 1px solid var(--border-light);
  padding: 28px;
}

.view-analytics-header { margin-bottom: 16px; }

.analytics-loading {
  text-align: center;
  padding: 24px;
  font-size: 13px;
  color: var(--text-faint);
}

.analytics-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.analytics-stat-card {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.analytics-stat-val {
  font-size: 22px;
  font-weight: 800;
  color: var(--deep-twilight);
}

.analytics-stat-key {
  font-size: 11px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

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

.analytics-panel {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 16px;
}

.analytics-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.analytics-chart {
  height: 120px;
  display: flex;
  align-items: flex-end;
  gap: 2px;
}

.analytics-bar {
  flex: 1;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
  min-height: 2px;
  position: relative;
  transition: opacity 0.15s;
}

.analytics-bar:hover { opacity: 0.7; }

.analytics-bar-tip {
  display: none;
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--deep-twilight);
  color: #fff;
  font-size: 10px;
  padding: 3px 6px;
  border-radius: 4px;
  white-space: nowrap;
  margin-bottom: 4px;
  pointer-events: none;
}

.analytics-bar:hover .analytics-bar-tip { display: block; }

.analytics-breakdown {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.analytics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  font-size: 13px;
}

.analytics-row:last-child { border-bottom: none; }

.analytics-row-label { color: var(--text); }
.analytics-row-val { font-weight: 600; color: var(--deep-twilight); }
.analytics-row-pct {
  font-size: 11px;
  color: var(--text-faint);
  margin-left: 6px;
}

@media (max-width: 640px) {
  .analytics-stats-row { grid-template-columns: repeat(2, 1fr); }
  .analytics-grid { grid-template-columns: 1fr; }
  .view-analytics { padding: 20px 16px; }
}

.view-dl-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 10px; }

.view-dl-all-btn {
  display: block;
  margin-top: 10px;
  padding: 10px 0;
  background: var(--gradient-accent);
  color: #fff;
  text-align: center;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.view-dl-all-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,119,182,0.3); }

.view-edit-section { display: flex; flex-direction: column; }
.view-edit-row { display: flex; align-items: flex-start; gap: 12px; }
.view-edit-row .view-edit-field { flex: 1; }
.view-edit-field { display: flex; flex-direction: column; gap: 5px; }
.view-edit-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-faint); }
.view-input-locked { background: var(--bg); color: var(--text-faint); border-color: var(--border-light); cursor: default; }

.view-toggle-btn {
  margin-top: 20px;
  padding: 0;
  border: none;
  background: none;
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-faint);
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
}

.view-toggle-btn:hover { color: var(--accent); }
.view-toggle-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.view-toggle-saving { color: var(--accent); }

.gen-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.gen-back-link::before {
  content: '';
  display: inline-block;
  width: 7px;
  height: 7px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  flex-shrink: 0;
  margin-bottom: -1px;
}

.gen-back-link:hover {
  background: var(--bg);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 2px 8px rgba(0,119,182,0.12);
}

/* Back button row — sits above the card in the page gutter */
.page-topbar {
  width: 100%;
  margin-bottom: 16px;
}

#editor-topbar  { max-width: 900px; }
.view-page-topbar { max-width: 820px; }

@media (max-width: 720px) {
  .view-card { border-radius: 0; border-left: none; border-right: none; border-top: none; max-width: 100%; }
  .view-body { grid-template-columns: 1fr; }
  .view-qr-col { border-right: none; border-bottom: 1px solid var(--border-light); padding: 24px 16px; }
  .view-details-col { padding: 20px 16px; }
}

/* ── Auth pages ───────────────────────────────────────────── */

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 400px;
  padding: 36px 32px 28px;
  box-shadow: var(--shadow);
}

.auth-header { margin-bottom: 24px; }
.auth-title { font-size: 22px; font-weight: 800; color: var(--deep-twilight); margin-bottom: 4px; }
.auth-sub { font-size: 13px; color: var(--text-muted); }
.auth-sub a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.auth-sub a:hover { color: var(--accent-hover); }

.auth-error {
  padding: 10px 12px;
  background: #fef5f5;
  border: 1px solid #f0a0a0;
  border-radius: var(--radius);
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 20px;
  line-height: 1.4;
}

.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-field { display: flex; flex-direction: column; gap: 6px; }
.auth-remember { margin: -4px 0; }
.auth-submit { width: 100%; padding: 12px; font-size: 14px; }

.auth-link {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.auth-link:hover { color: var(--accent); }

.auth-legal { font-size: 11px; color: var(--text-faint); text-align: center; line-height: 1.5; margin-top: -4px; }
.auth-legal a { color: var(--text-muted); text-decoration: underline; }

@media (max-width: 720px) {
  .auth-card { border-radius: 0; border-left: none; border-right: none; max-width: 100%; }
}

/* Saved banner */
.saved-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #eafaf3;
  border: 1px solid #b2e5cf;
  border-radius: var(--radius);
  font-size: 12px;
  flex-wrap: wrap;
}

.saved-check { color: var(--success); font-weight: 700; }
.saved-link { color: var(--success); text-decoration: none; font-family: monospace; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.saved-link:hover { text-decoration: underline; }

.saved-copy {
  padding: 3px 10px;
  border: 1px solid #b2e5cf;
  border-radius: 5px;
  background: #fff;
  font-size: 11px;
  cursor: pointer;
  color: var(--success);
  white-space: nowrap;
}

.saved-copy:hover { background: #eafaf3; }

/* Misc */
.type-gate-msg { font-size: 12px; color: var(--text-muted); margin-top: 6px; }
.type-gate-msg a { color: var(--accent); font-weight: 600; text-decoration: underline; }
.qr-type-badge { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); background: var(--light-cyan); padding: 3px 10px; border-radius: 20px; }

/* ── Global responsive ────────────────────────────────────── */

.error-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  width: 100%;
  max-width: 420px;
  margin: 80px auto;
  padding: 48px 40px 40px;
  box-shadow: var(--shadow);
  text-align: center;
}

.error-code {
  font-size: 72px;
  font-weight: 900;
  color: var(--border);
  line-height: 1;
  margin: 0 0 12px;
  letter-spacing: -2px;
}

.error-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--deep-twilight);
  margin: 0 0 10px;
}

.error-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 28px;
}

.error-card .download-btn {
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 600px) {
  .section { padding: 48px 20px; }
  .section-title { font-size: 24px; }
  .section-sub { font-size: 14px; }
  .error-card { margin: 40px auto; padding: 36px 24px 32px; }
  .error-code  { font-size: 56px; }
  .verify-banner { gap: 10px; padding: 10px 16px; text-align: center; }
}

/* ─── Email verification banner ──────────────────────────────────────────────── */

.verify-banner {
  background: #fffbeb;
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 24px;
  flex-wrap: wrap;
}

.verify-banner-text {
  font-size: 13px;
  color: #78350f;
  line-height: 1.5;
}

.verify-banner-form { display: contents; }

.verify-banner-btn {
  font-size: 12px;
  font-weight: 600;
  color: #78350f;
  background: transparent;
  border: 1.5px solid rgba(245, 158, 11, 0.5);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.verify-banner-btn:hover {
  background: #fef3c7;
  border-color: #f59e0b;
}

/* ─── Verify email page ───────────────────────────────────────────────────────── */

.verify-card { text-align: center; }

.verify-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.verify-icon svg { width: 28px; height: 28px; }

.verify-icon-success  { background: #dcfce7; color: #16a34a; }
.verify-icon-info     { background: var(--light-cyan); color: var(--bright-teal); }
.verify-icon-error    { background: #fee2e2; color: var(--danger); }

/* ─── Past-due payment banner ─────────────────────────────────────────────────── */

.past-due-banner {
  background: #fff1f2;
  border-bottom: 1px solid rgba(220, 38, 38, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 10px 24px;
  flex-wrap: wrap;
}

.past-due-banner-text {
  font-size: 13px;
  color: #7f1d1d;
  line-height: 1.5;
}

.past-due-banner-btn {
  font-size: 12px;
  font-weight: 600;
  color: #7f1d1d;
  background: transparent;
  border: 1.5px solid rgba(220, 38, 38, 0.4);
  border-radius: var(--radius-sm);
  padding: 4px 12px;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
  display: inline-block;
}

.past-due-banner-btn:hover {
  background: #fee2e2;
  border-color: #dc2626;
  color: #7f1d1d;
}

/* ─── Dashboard header right ─────────────────────────────────────────────────── */

.dash-header-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.dash-plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 5px 12px 5px 8px;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}

.plan-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.plan-dot-good { background: var(--success); }
.plan-dot-at   { background: #f59e0b; }
.plan-dot-over { background: var(--danger); }

.plan-pill-name   { font-weight: 700; color: var(--text); }
.plan-pill-sep    { color: var(--border); }
.plan-pill-detail { color: var(--text-muted); }

.plan-pill-manage {
  margin-left: 4px;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 1px 6px;
  border-radius: 4px;
  transition: background 0.15s;
}

.plan-pill-manage:hover { background: var(--light-cyan); }

.dash-new-locked {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 3px;
}

.new-qr-btn-locked {
  opacity: 0.45;
  cursor: not-allowed;
}

.dash-new-locked-hint {
  font-size: 11px;
  color: #f59e0b;
  font-weight: 500;
  text-align: right;
}

.dash-plan-section {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.dash-plan-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  padding-right: 2px;
}

/* ─── Dashboard plan limit banners ───────────────────────────────────────────── */

.dash-limit-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid transparent;
  flex-wrap: wrap;
}

.dash-limit-text {
  font-size: 13px;
  line-height: 1.55;
  flex: 1;
  min-width: 200px;
}

.dash-limit-cta {
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: var(--radius);
  white-space: nowrap;
  background: var(--gradient-accent);
  color: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.dash-limit-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,119,182,0.3); }

.dash-limit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  flex-wrap: wrap;
}

.dash-limit-or {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.dash-limit-at  .dash-limit-or  { color: #92400e; }
.dash-limit-over .dash-limit-or { color: #9a3412; }

/* At limit — amber */
.dash-limit-at {
  background: #fffbeb;
  border-top-color: rgba(245, 158, 11, 0.2);
}

.dash-limit-at .dash-limit-text  { color: #78350f; }

/* Over limit — orange (downgraded) */
.dash-limit-over {
  background: #fff7ed;
  border-top-color: rgba(234, 88, 12, 0.2);
}

.dash-limit-over .dash-limit-text { color: #7c2d12; }

/* ─── Plan selection page ─────────────────────────────────────────────────────── */

.plan-select-page {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
}

.plan-select-header {
  text-align: center;
  margin-bottom: 36px;
}

.plan-select-title {
  font-size: 30px;
  font-weight: 800;
  color: var(--deep-twilight);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.plan-select-sub {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* Billing toggle — CSS-only via hidden checkbox */

.billing-toggle-cb { display: none; }

.plan-toggle-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 32px;
}

.billing-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.toggle-opt {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
  transition: color 0.15s;
}

.toggle-pill {
  width: 44px;
  height: 24px;
  background: var(--border);
  border-radius: 12px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-pill-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}

/* Checked state */
.billing-toggle-cb:checked ~ .plan-toggle-wrap .toggle-pill {
  background: var(--accent);
}

.billing-toggle-cb:checked ~ .plan-toggle-wrap .toggle-pill-thumb {
  transform: translateX(20px);
}

.billing-toggle-cb:checked ~ .plan-toggle-wrap .toggle-opt-yearly {
  color: var(--text);
}

.billing-toggle-cb:not(:checked) ~ .plan-toggle-wrap .toggle-opt-monthly {
  color: var(--text);
}

.save-badge {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--light-cyan);
  color: var(--bright-teal);
  padding: 2px 7px;
  border-radius: 20px;
}

/* Price/form show-hide driven by checkbox — must be siblings of .billing-toggle-cb */

.plan-price-yearly,
.plan-form-yearly { display: none; }

.billing-toggle-cb:checked ~ .plan-cards .plan-price-monthly,
.billing-toggle-cb:checked ~ .plan-cards .plan-form-monthly { display: none; }

.billing-toggle-cb:checked ~ .plan-cards .plan-price-yearly,
.billing-toggle-cb:checked ~ .plan-cards .plan-form-yearly  { display: block; }

/* Plan cards */

.plan-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.plan-cards-three {
  grid-template-columns: repeat(3, 1fr);
  max-width: 1100px;
  margin: 0 auto;
}

.plan-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  position: relative;
  transition: box-shadow 0.2s;
  overflow: hidden;
}

.plan-card:hover { box-shadow: var(--shadow-lg); }

.plan-card-featured {
  border-color: var(--accent);
  box-shadow: 0 4px 24px rgba(0,119,182,0.12);
}

.plan-card-featured:hover { box-shadow: 0 8px 36px rgba(0,119,182,0.18); }

.plan-popular-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 0 0 10px 10px;
  white-space: nowrap;
}

.plan-card-inner {
  padding: 28px 24px 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.plan-cards-three .plan-card-inner {
  padding: 28px 20px 22px;
}

.plan-card-inner .plan-features {
  flex: 1;
}

.plan-name {
  font-size: 18px;
  font-weight: 800;
  color: var(--deep-twilight);
  margin-bottom: 12px;
}

.plan-price {
  margin-bottom: 4px;
}

.plan-price-sub {
  font-size: 12px;
  color: var(--text-faint);
  margin-bottom: 20px;
}

.price-amount {
  font-size: 36px;
  font-weight: 800;
  color: var(--deep-twilight);
  letter-spacing: -1px;
  line-height: 1;
}

.price-period {
  font-size: 14px;
  color: var(--text-muted);
  margin-left: 2px;
}

.plan-features {
  list-style: none;
  margin: 0 0 24px;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.plan-features li {
  font-size: 13px;
  color: var(--text);
  padding: 8px 0 8px 24px;
  position: relative;
  line-height: 1.45;
  border-bottom: 1px solid var(--border-light);
}

.plan-features li:last-child {
  border-bottom: none;
}

.plan-features li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background-size: 10px;
  background-position: center;
  background-repeat: no-repeat;
}

.feature-yes::before {
  background-color: #dcfce7;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpolyline points='2,6 5,9 10,3' fill='none' stroke='%2316a34a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.feature-no {
  color: var(--text-faint);
}

.feature-no::before {
  background-color: #f1f5f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cline x1='3' y1='3' x2='9' y2='9' stroke='%238fa4b2' stroke-width='1.8' stroke-linecap='round'/%3E%3Cline x1='9' y1='3' x2='3' y2='9' stroke='%238fa4b2' stroke-width='1.8' stroke-linecap='round'/%3E%3C/svg%3E");
}

.plan-form { margin: 0; }

.plan-btn {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.plan-btn:hover  { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,119,182,0.3); }
.plan-btn:active { transform: scale(0.98); }

.plan-btn-primary {
  background: var(--gradient-accent);
  color: #fff;
}

.plan-btn-secondary {
  background: var(--gradient-accent);
  color: #fff;
}

.plan-footer-note {
  text-align: center;
  font-size: 12px;
  color: var(--text-faint);
  line-height: 1.6;
  margin-top: 28px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 640px) {
  .plan-cards { grid-template-columns: 1fr; }
  .plan-cards-three { grid-template-columns: 1fr; }
  .plan-select-title { font-size: 24px; }
  .plan-card-inner { padding: 24px 20px 20px; }
}

@media (min-width: 641px) and (max-width: 900px) {
  .plan-cards-three { grid-template-columns: 1fr; max-width: 420px; margin: 0 auto; }
}

/* ── Admin ─────────────────────────────────────────────────── */

.admin-header { margin-bottom: 28px; }
.admin-title { font-size: 28px; font-weight: 800; color: var(--deep-twilight); margin-bottom: 16px; }

.admin-nav { display: flex; gap: 4px; border-bottom: 2px solid var(--border-light); padding-bottom: 0; }
.admin-tab {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}
.admin-tab:hover { color: var(--accent); }
.admin-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}

.admin-metric-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.admin-metric-val { font-size: 24px; font-weight: 800; color: var(--deep-twilight); }
.admin-metric-key { font-size: 11px; color: var(--text-faint); text-transform: uppercase; letter-spacing: 0.06em; }

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

.admin-panel {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 20px;
}

.admin-panel-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 12px;
}

.admin-panel-desc {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: -4px;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
  border-bottom: 1px solid var(--border-light);
}

.admin-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border-light);
  color: var(--text);
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 20px;
  text-transform: capitalize;
}

.admin-status-active   { background: #dcfce7; color: #16a34a; }
.admin-status-past_due { background: #fef3c7; color: #92400e; }
.admin-status-canceled, .admin-status-none { background: #f1f5f9; color: #64748b; }

.admin-search {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-bottom: 20px;
}

.admin-search-input {
  flex: 1;
  max-width: 360px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
}

.admin-search-input:focus { outline: none; border-color: var(--accent); }

.admin-btn {
  padding: 8px 16px;
  background: var(--gradient-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 12px rgba(0,119,182,0.2);
}

.admin-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,119,182,0.3); }

.admin-link {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: underline;
}

.admin-pagination {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 0 0;
  justify-content: center;
}

.admin-page-info { font-size: 13px; color: var(--text-muted); }

/* Settings form */
.admin-settings-form { display: flex; flex-direction: column; gap: 20px; }

.admin-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-bottom: 12px;
}

.admin-field:last-child { margin-bottom: 0; }

.admin-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.admin-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 13px;
  font-family: inherit;
  transition: border-color 0.15s;
}

.admin-input:focus { outline: none; border-color: var(--accent); }

.admin-textarea { resize: vertical; min-height: 60px; font-family: monospace; font-size: 12px; }

.admin-hint {
  font-size: 11px;
  color: var(--text-faint);
  line-height: 1.4;
}

/* Impersonation banner */
.impersonate-banner {
  background: #fef3c7;
  border-bottom: 1px solid #fbbf24;
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: 13px;
  color: #78350f;
}

.impersonate-stop {
  font-weight: 600;
  color: #92400e;
  text-decoration: underline;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font-size: inherit;
  cursor: pointer;
  font-family: inherit;
}

@media (max-width: 640px) {
  .admin-metrics { grid-template-columns: repeat(2, 1fr); }
  .admin-grid { grid-template-columns: 1fr; }
  .admin-table { font-size: 12px; }
  .admin-table th, .admin-table td { padding: 6px 6px; }
}
