/* ============================================================
   Cnct — Site Styles
   ============================================================ */

/* === Variables === */
:root {
  --bg:             #0A0A12;
  --bg-alt:         #0F0F1A;
  --surface:        rgba(255, 255, 255, 0.04);
  --surface-hover:  rgba(255, 255, 255, 0.07);
  --border:         rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(255, 255, 255, 0.16);

  --text:       #F0F0FA;
  --text-muted: #8888A8;
  --text-dim:   #4E4E6A;

  --grad-start: #833AB4;
  --grad-mid:   #FD1D1D;
  --grad-end:   #FCAF45;

  --green: #22C55E;

  --nav-height: 72px;
  --radius:     16px;
  --radius-sm:  10px;
  --radius-lg:  24px;

  --ease: 200ms ease;
  --shadow:    0 4px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 48px rgba(0, 0, 0, 0.6);

  /* Frosted glass + glow tokens */
  --glass-bg:      linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
  --glass-border:  rgba(255, 255, 255, 0.10);
  --glass-inset:   inset 0 1px 0 rgba(255, 255, 255, 0.07);
  --glass-shadow:  0 8px 30px rgba(0, 0, 0, 0.30);
  --glow-brand:    0 0 26px rgba(131, 58, 180, 0.18);
  --glow-green:    0 0 12px rgba(34, 197, 94, 0.25);
}

/* === Reset === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; border: none; background: none; }
/* The [hidden] attribute must win over component display rules (e.g. .stub-card{display:flex}) */
[hidden] { display: none !important; }

/* === Typography === */
h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: 1.05rem; font-weight: 700; }

/* === Gradient text === */
.text-gradient {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === Layout === */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow { max-width: 760px; }

/* === Buttons === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: 10px;
  font-size: 0.93rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--ease);
  white-space: nowrap;
  border: 1.5px solid transparent;
}

.btn--gradient {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid), var(--grad-end));
  color: #fff;
}
.btn--gradient:hover {
  opacity: 0.88;
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(131, 58, 180, 0.45);
}

.btn--ghost {
  background: transparent;
  color: var(--text-muted);
}
.btn--ghost:hover {
  color: var(--text);
  background: var(--surface);
}

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

.btn--lg {
  padding: 14px 30px;
  font-size: 1rem;
  border-radius: 12px;
}
.btn--full {
  width: 100%;
  justify-content: center;
}

/* === NAV === */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--nav-height);
  background: rgba(10, 10, 18, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}
.nav__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}
.nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* === HERO === */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-height);
  overflow: hidden;
}
.hero__bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
}
.hero__bg-orb--1 {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(131, 58, 180, 0.18) 0%, transparent 70%);
  top: -120px;
  left: -200px;
}
.hero__bg-orb--2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(253, 29, 29, 0.12) 0%, transparent 70%);
  bottom: -80px;
  right: -80px;
}
.hero__container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  padding-top: 80px;
  padding-bottom: 80px;
}
.hero__content { max-width: 560px; }

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 100px;
  background: rgba(131, 58, 180, 0.14);
  border: 1px solid rgba(131, 58, 180, 0.28);
  color: #C97EF5;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 24px;
}
.hero__headline {
  margin-bottom: 20px;
}
.hero__subheadline {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 480px;
  margin-bottom: 36px;
}
.hero__cta-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.hero__note {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 0.83rem;
  color: var(--text-dim);
}

/* === PHONE MOCKUP === */
.hero__visual {
  display: flex;
  justify-content: center;
  align-items: center;
}
.phone-mockup {
  width: 290px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px 18px 24px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.phone-mockup__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.phone-mockup__screen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.mock-comment,
.mock-reply {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  position: relative;
}
.mock-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}
.mock-avatar--brand {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
}
.mock-comment__body {
  background: rgba(255, 255, 255, 0.07);
  border-radius: 10px 10px 10px 3px;
  padding: 8px 11px;
  flex: 1;
  min-width: 0;
}
.mock-reply .mock-comment__body {
  background: rgba(131, 58, 180, 0.18);
  border: 1px solid rgba(131, 58, 180, 0.28);
  border-radius: 10px 10px 3px 10px;
}
.mock-username {
  display: block;
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 2px;
}
.mock-text {
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.4;
}
.mock-auto-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #C97EF5;
  background: rgba(131, 58, 180, 0.18);
  border: 1px solid rgba(131, 58, 180, 0.3);
  padding: 2px 7px;
  border-radius: 100px;
}
.mock-divider {
  height: 1px;
  background: var(--border);
  margin: 2px 0;
}
.mock-dm {
  display: flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.22), rgba(253, 29, 29, 0.16));
  border: 1px solid rgba(131, 58, 180, 0.22);
  border-radius: 9px;
  padding: 8px 11px;
  font-size: 0.76rem;
  color: var(--text);
}
.mock-check {
  margin-left: auto;
  flex-shrink: 0;
}

/* === SECTIONS === */
.section { padding: 100px 0; }
.section--alt { background: var(--bg-alt); }

.section__header {
  text-align: center;
  margin-bottom: 64px;
}
.section__title { margin-bottom: 12px; }
.section__subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 500px;
  margin: 0 auto;
}

/* === HOW IT WORKS (Steps) === */
.steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
}
.step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 36px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all var(--ease);
  cursor: default;
}
.step:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}
.step__number {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid));
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.step__icon {
  width: 56px;
  height: 56px;
  background: var(--surface-hover);
  border: 1px solid var(--border);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px;
}
.step__title { margin-bottom: 10px; }
.step__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}
.step__connector {
  flex-shrink: 0;
  width: 44px;
  height: 2px;
  background: linear-gradient(90deg, var(--grad-start), var(--grad-mid));
  opacity: 0.35;
  margin-top: 98px;
}

/* === FEATURES GRID === */
.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: 30px 26px;
  transition: all var(--ease);
  cursor: default;
}
.feature-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.feature-card__icon {
  width: 46px;
  height: 46px;
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.18), rgba(253, 29, 29, 0.12));
  border: 1px solid rgba(131, 58, 180, 0.18);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: #C07AF0;
}
.feature-card__title { margin-bottom: 8px; }
.feature-card__desc {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.65;
}

/* === PRICING === */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: relative;
  transition: border-color var(--ease);
}
.pricing-card:hover { border-color: var(--border-hover); }

.pricing-card--popular {
  background: rgba(131, 58, 180, 0.07);
  border-color: rgba(131, 58, 180, 0.38);
  box-shadow: 0 0 0 1px rgba(131, 58, 180, 0.25), var(--shadow-lg);
}
.pricing-card--popular:hover {
  border-color: rgba(131, 58, 180, 0.55);
}
.pricing-card__popular-badge {
  position: absolute;
  top: -13px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid));
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 4px 16px;
  border-radius: 100px;
  white-space: nowrap;
}
.pricing-card__tier {
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.pricing-card__tier--gradient {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.pricing-card__price {
  display: flex;
  align-items: baseline;
  gap: 5px;
}
.pricing-card__amount {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}
.pricing-card__period {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.pricing-card__features {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}
.pricing-card__features li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.pricing-card__features li svg { flex-shrink: 0; }

/* === FAQ === */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color var(--ease);
}
.faq-item:has(.faq-question[aria-expanded="true"]) {
  border-color: rgba(131, 58, 180, 0.32);
}
.faq-question {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px;
  text-align: left;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background var(--ease);
  background: var(--surface);
}
.faq-question:hover { background: var(--surface-hover); }
.faq-question:focus-visible {
  outline: 2px solid rgba(131, 58, 180, 0.6);
  outline-offset: -2px;
}
.faq-chevron {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform 220ms ease;
}
.faq-question[aria-expanded="true"] .faq-chevron {
  transform: rotate(180deg);
}
.faq-answer {
  padding: 0 22px 20px;
  background: var(--surface);
}
.faq-answer p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.72;
}
.faq-answer strong {
  color: var(--text);
  font-weight: 600;
}

/* === FINAL CTA === */
.cta-section { background: var(--bg-alt); }
.cta-block {
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  padding: 60px 40px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.cta-block__title {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 12px;
}
.cta-block__subtitle {
  color: var(--text-muted);
  margin-bottom: 28px;
  font-size: 0.97rem;
}

/* === FOOTER === */
.footer {
  padding: 34px 0;
  border-top: 1px solid var(--border);
}
.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}
.footer__links {
  display: flex;
  gap: 22px;
}
.footer__links a {
  font-size: 0.85rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--ease);
}
.footer__links a:hover { color: var(--text-muted); }
.footer__copy {
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* === RESPONSIVE 1024px === */
@media (max-width: 1024px) {
  .hero__container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 48px;
  }
  .hero__content { max-width: 100%; }
  .hero__subheadline { margin: 0 auto 36px; }
  .hero__cta-group { justify-content: center; }
  .hero__note { justify-content: center; }
  .hero__visual { display: none; }

  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid  { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid > .pricing-card:last-child {
    grid-column: 1 / -1;
    max-width: 400px;
    margin: 0 auto;
    width: 100%;
  }
}

/* === RESPONSIVE 768px === */
@media (max-width: 768px) {
  .section { padding: 72px 0; }
  .section__header { margin-bottom: 48px; }

  .steps { flex-direction: column; align-items: center; gap: 0; }
  .step  { max-width: 100%; width: 100%; }
  .step__connector {
    width: 2px;
    height: 28px;
    background: linear-gradient(180deg, var(--grad-start), var(--grad-mid));
    margin: 0 auto;
  }

  .features-grid { grid-template-columns: 1fr; }
  .pricing-grid  { grid-template-columns: 1fr; }
  .pricing-grid > .pricing-card:last-child {
    grid-column: auto;
    max-width: 100%;
  }

  .footer__inner { flex-direction: column; text-align: center; }
  .footer__links { justify-content: center; }
}

/* === RESPONSIVE 480px === */
@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .nav__inner { padding: 0 16px; }

  .hero__cta-group { flex-direction: column; align-items: stretch; }
  .hero__cta-group .btn { text-align: center; justify-content: center; }

  .cta-block { padding: 40px 22px; }
  .pricing-card { padding: 30px 22px; }
}

/* ============================================================
   Dashboard App Shell
   ============================================================ */

/* === App layout === */
.app-body {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--bg);
}

/* === Sidebar === */
.sidebar {
  width: 240px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border-right: 1px solid var(--border);
  height: 100vh;
  position: fixed;
  left: 0;
  top: 0;
  z-index: 30;
  overflow-y: auto;
}
.sidebar__logo {
  padding: 20px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.sidebar__logo-link {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  cursor: pointer;
}
.sidebar__logo-link:hover { opacity: 0.85; }

.sidebar__nav {
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--ease);
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}
.nav-item:hover {
  color: var(--text);
  background: var(--surface-hover);
}
.nav-item.active {
  color: var(--text);
  background: rgba(131, 58, 180, 0.14);
}
.nav-item.active svg { color: #C97EF5; }
.nav-item:focus-visible {
  outline: 2px solid rgba(131, 58, 180, 0.6);
  outline-offset: -2px;
}

/* === App main === */
.app-main {
  margin-left: 240px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

/* === Topbar === */
.topbar {
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  gap: 12px;
}
.topbar__left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar__title {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar__hamburger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--ease);
  background: transparent;
  border: none;
  flex-shrink: 0;
}
.topbar__hamburger:hover { color: var(--text); background: var(--surface); }

.topbar__right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.topbar__username {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar__logout { gap: 6px; }
.topbar__logout-label { font-size: 0.85rem; }

/* === Plan badge === */
.plan-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: 1px solid;
  cursor: default;
}
.plan-badge[data-plan="free"] {
  color: #9CA3AF;
  border-color: rgba(156, 163, 175, 0.3);
  background: rgba(156, 163, 175, 0.08);
}
.plan-badge[data-plan="pro"] {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid), var(--grad-end));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  border-color: rgba(131, 58, 180, 0.4);
  background-color: rgba(131, 58, 180, 0.1);
}
.plan-badge[data-plan="agency"] {
  color: #FCAF45;
  border-color: rgba(252, 175, 69, 0.35);
  background: rgba(252, 175, 69, 0.08);
}
.plan-badge--lg {
  font-size: 0.75rem;
  padding: 4px 14px;
}

/* === App content === */
.app-content {
  flex: 1;
  overflow-y: auto;
  padding: 32px;
}
.app-section { max-width: 960px; }

/* === Section header === */
.section-header { margin-bottom: 28px; }
.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
  color: var(--text);
}
.section-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* === Stat grid === */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
  transition: border-color var(--ease);
}
.stat-card:hover { border-color: var(--border-hover); }
.stat-card__label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.stat-card__value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

/* === Stub cards (empty states) === */
.stub-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.stub-card__icon {
  width: 60px;
  height: 60px;
  border-radius: 16px;
  background: rgba(131, 58, 180, 0.12);
  border: 1px solid rgba(131, 58, 180, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #C97EF5;
  margin-bottom: 4px;
}
.stub-card__icon--ig {
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.15), rgba(253, 29, 29, 0.1));
}
.stub-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
}
.stub-card__desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 420px;
}
.stub-card__note {
  font-size: 0.78rem;
  color: var(--text-dim);
}
.stub-card .btn[disabled],
.stub-card .btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* === Billing plan card === */
.billing-plan-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.billing-plan-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.billing-plan-card__label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.billing-plan-card__name {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
}
.billing-limits {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.billing-limit-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}
.billing-limit-item__label { color: var(--text-muted); }
.billing-limit-item__value { color: var(--text); font-weight: 600; }
.billing-plan-card .stub-card__note {
  text-align: left;
  margin-top: -8px;
}
.billing-plan-card .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* === Settings card === */
.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  max-width: 480px;
  overflow: hidden;
}
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.settings-row:last-of-type { border-bottom: none; }
.settings-row__label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
}
.settings-row__value {
  font-size: 0.88rem;
  color: var(--text);
  text-align: right;
  word-break: break-all;
}
.settings-actions {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
}
.settings-card + .settings-card { margin-top: 20px; }
.settings-card__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
}
.settings-card__body { padding: 20px 24px; }
.settings-card__body .auth-form { gap: 14px; }
.settings-card__desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}
.settings-card--danger { border-color: rgba(239, 68, 68, 0.35); }
.settings-card--danger .settings-card__title {
  color: #F87171;
  border-bottom-color: rgba(239, 68, 68, 0.2);
}
.btn--danger {
  background: rgba(239, 68, 68, 0.12);
  color: #F87171;
  border-color: rgba(239, 68, 68, 0.4);
}
.btn--danger:hover {
  background: #EF4444;
  color: #fff;
  border-color: #EF4444;
  transform: translateY(-1px);
}

/* === Alert banners === */
.alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  font-weight: 500;
  margin-bottom: 20px;
}
.alert--success {
  background: rgba(34, 197, 94, 0.10);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #4ADE80;
}
.alert--error {
  background: rgba(239, 68, 68, 0.10);
  border: 1px solid rgba(239, 68, 68, 0.28);
  color: #F87171;
}
.alert--warn {
  background: rgba(245, 158, 11, 0.10);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: #FBBF24;
}
.alert--info {
  background: rgba(131, 58, 180, 0.12);
  border: 1px solid rgba(131, 58, 180, 0.30);
  color: #C4A2E8;
}

/* Price + renewal note on the in-app upgrade cards */
.plan-compare__price {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 4px 0 10px;
}
.plan-compare__price span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim, #8A8A9E);
}
.plan-compare__note {
  font-size: 0.8rem;
  color: var(--text-dim, #8A8A9E);
  margin-top: 14px;
}

/* === Instagram account cards === */
.ig-accounts-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}
.ig-account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: border-color var(--ease);
}
.ig-account-card:hover { border-color: var(--border-hover); }
.ig-account-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--grad-start), var(--grad-end));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}
.ig-account-card__info { flex: 1; min-width: 0; }
.ig-account-card__username {
  font-weight: 600;
  font-size: 0.93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ig-account-card__meta {
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}
.ig-account-card__badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 100px;
  font-size: 0.72rem;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.11);
  color: #22C55E;
  border: 1px solid rgba(34, 197, 94, 0.24);
  flex-shrink: 0;
  white-space: nowrap;
}
.ig-account-card__badge--warn {
  background: rgba(251, 191, 36, 0.11);
  color: #FBBF24;
  border-color: rgba(251, 191, 36, 0.26);
}

/* === Connect Instagram section === */
.ig-connect-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  max-width: 560px;
}
.ig-connect-section__title {
  font-size: 0.95rem;
  font-weight: 700;
}
.ig-connect-section__desc {
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.6;
}
.ig-connect-section__note {
  font-size: 0.76rem;
  color: var(--text-dim);
}

/* === Mobile nav (bottom) === */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
}
.mobile-nav__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 6px 4px;
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  cursor: pointer;
  transition: color var(--ease);
  background: transparent;
  border: none;
  min-height: 44px;
}
.mobile-nav__item:hover,
.mobile-nav__item.active { color: #C97EF5; }
.mobile-nav__item span { line-height: 1; }

/* === Sidebar overlay for mobile === */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 29;
}

/* === Btn small === */
.btn--sm {
  padding: 7px 14px;
  font-size: 0.82rem;
  border-radius: 8px;
}

/* ============================================================
   Auth Pages (login / register)
   ============================================================ */

.auth-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: var(--bg);
  overflow-x: hidden;
}
.auth-nav {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.auth-card__header { text-align: center; }
.auth-card__title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: 6px;
}
.auth-card__subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}
.auth-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #FCA5A5;
}
.auth-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.85rem;
  color: #86EFAC;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-label {
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.form-label__optional {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-dim);
  background: var(--surface-hover);
  padding: 1px 7px;
  border-radius: 100px;
}
.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  color: var(--text);
  font-size: 0.93rem;
  font-family: inherit;
  transition: border-color var(--ease), background var(--ease);
  outline: none;
}
.form-input::placeholder { color: var(--text-dim); }
.form-input:hover { border-color: var(--border-hover); }
.form-input:focus {
  border-color: rgba(131, 58, 180, 0.5);
  background: rgba(131, 58, 180, 0.05);
  box-shadow: 0 0 0 3px rgba(131, 58, 180, 0.12);
}
.auth-card__footer {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}
.auth-link {
  color: #C97EF5;
  font-weight: 600;
  cursor: pointer;
  transition: color var(--ease);
}
.auth-link:hover { color: #D9A0FF; }

/* ============================================================
   Dashboard Responsive
   ============================================================ */

@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Hide sidebar, show hamburger + bottom nav */
  .sidebar {
    transform: translateX(-100%);
    transition: transform 250ms ease;
    z-index: 40;
  }
  .sidebar--open { transform: translateX(0); }

  .app-main { margin-left: 0; }

  .topbar__hamburger { display: flex; }
  .topbar__logout-label { display: none; }
  .topbar__username { display: none; }

  .mobile-nav { display: flex; }

  .app-content {
    padding: 20px 16px;
    padding-bottom: calc(72px + 20px);
  }

  .stub-card { padding: 36px 24px; }
  .billing-plan-card { max-width: 100%; }
  .settings-card { max-width: 100%; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 16px; }
  .stat-card__value { font-size: 1.6rem; }
  .auth-card { padding: 28px 20px; }
}

/* ============================================================
   Automations (Phase 9)
   ============================================================ */

.section-header--row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}
.section-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.automations-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.automation-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: border-color var(--ease);
}
.automation-card:hover { border-color: var(--border-hover); }
.automation-card__main { min-width: 0; flex: 1; }
.automation-card__top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.automation-card__name {
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
}
.automation-card__meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.automation-card__kw {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.automation-card__actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.status-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  background: none;
  transition: opacity var(--ease);
}
.status-badge:hover { opacity: 0.8; }
.status-badge--on {
  color: var(--green);
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
}
.status-badge--off {
  color: var(--text-muted);
  background: var(--surface-hover);
  border-color: var(--border);
}

.kw-chip {
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 6px;
}
.kw-chip--any { font-style: italic; color: var(--text-dim); }

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 60;
}
.modal-overlay[hidden] { display: none; }
.modal {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.modal__header,
.modal__footer {
  display: flex;
  align-items: center;
  padding: 18px 22px;
}
.modal__header {
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.modal__title { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.modal__close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: color var(--ease), background var(--ease);
}
.modal__close:hover { color: var(--text); background: var(--surface-hover); }
.modal__body {
  padding: 20px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.modal__footer {
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--border);
}

.form-textarea { resize: vertical; line-height: 1.5; }
.form-label--row { justify-content: space-between; width: 100%; }
.form-hint { font-size: 0.75rem; color: var(--text-dim); margin-top: 2px; }
.char-counter { font-size: 0.72rem; color: var(--text-dim); font-weight: 500; }
.link-btn {
  background: none;
  border: none;
  color: #C97EF5;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.link-btn:hover { color: #D9A0FF; }

.scope-toggle { display: flex; gap: 10px; }
.scope-toggle__opt {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 0.86rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color var(--ease), background var(--ease);
}
.scope-toggle__opt:hover { border-color: var(--border-hover); }
.scope-toggle__opt input { accent-color: var(--grad-start); }

/* Keyword tag input */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 9px;
  cursor: text;
}
.tag-input:focus-within { border-color: rgba(131, 58, 180, 0.5); }
.tag-input__tags { display: contents; }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.78rem;
  color: var(--text);
  background: rgba(131, 58, 180, 0.18);
  border: 1px solid rgba(131, 58, 180, 0.35);
  padding: 2px 4px 2px 9px;
  border-radius: 6px;
}
.tag__x {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 0 3px;
}
.tag__x:hover { color: var(--text); }
.tag-input__field {
  flex: 1;
  min-width: 120px;
  background: none;
  border: none;
  outline: none;
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  padding: 4px;
}
.tag-input__field::placeholder { color: var(--text-dim); }

/* Post picker */
.post-picker {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  max-height: 240px;
  overflow-y: auto;
}
.post-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface-hover);
}
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-thumb--selected { border-color: var(--grad-mid); }
.post-thumb__noimg {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 0.62rem;
  color: var(--text-dim);
}

@media (max-width: 600px) {
  .automation-card { flex-direction: column; align-items: stretch; }
  .automation-card__actions { justify-content: flex-end; }
  .post-picker { grid-template-columns: repeat(3, 1fr); }
  .section-header--row { flex-direction: column; }
}

/* ============================================================
   Activity Log (Phase 11)
   ============================================================ */

.log-section { margin-top: 4px; }
.log-section__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.log-section__title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.log-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow-x: auto;
}
.log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.log-table th {
  padding: 11px 14px;
  text-align: left;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.log-table td {
  padding: 11px 14px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.log-table tr:last-child td { border-bottom: none; }
.log-table tbody tr:hover { background: var(--surface-hover); }
.log-table td:first-child { color: var(--text-dim); white-space: nowrap; }
.log-table td.log-auto-name { color: var(--text); font-weight: 500; }

.log-check { color: var(--green); }
.log-x { color: var(--text-dim); }
.log-error {
  color: #F87171;
  font-size: 0.76rem;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.log-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
}
.log-pagination__btn {
  padding: 6px 14px;
  border-radius: 7px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-family: inherit;
  transition: all var(--ease);
}
.log-pagination__btn:hover:not(:disabled) {
  border-color: var(--border-hover);
  color: var(--text);
}
.log-pagination__btn:disabled { opacity: 0.35; cursor: not-allowed; }
.log-pagination__info {
  font-size: 0.8rem;
  color: var(--text-dim);
  padding: 0 4px;
}

/* ============================================================
   Glass & Glow layer — frosted surfaces, ambient light, soft
   glow accents. Appended last on purpose: overrides the flat
   surface styles above at equal specificity.
   ============================================================ */

/* --- Ambient background light (all pages) --- */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(131, 58, 180, 0.16), transparent 60%),
    radial-gradient(900px 650px at -15% 20%, rgba(64, 93, 230, 0.10), transparent 60%),
    radial-gradient(1000px 800px at 55% 115%, rgba(253, 29, 29, 0.07), transparent 60%);
}

/* Alt sections become translucent so the ambient light shows through */
.section--alt,
.cta-section { background: rgba(15, 15, 26, 0.55); }

/* --- Frosted glass surfaces --- */
.step,
.feature-card,
.pricing-card,
.cta-block,
.faq-item,
.auth-card,
.stat-card,
.stub-card,
.billing-plan-card,
.settings-card,
.ig-account-card,
.ig-connect-section,
.automation-card,
.log-table-wrap,
.phone-mockup {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: var(--glass-inset), var(--glass-shadow);
}

/* FAQ children go transparent so the item-level glass reads through */
.faq-question { background: transparent; }
.faq-answer   { background: transparent; }

/* Popular pricing card keeps its brand tint, now with a real glow */
.pricing-card--popular {
  background: linear-gradient(180deg, rgba(131, 58, 180, 0.16), rgba(131, 58, 180, 0.05));
  border-color: rgba(160, 90, 220, 0.45);
  box-shadow: var(--glass-inset), 0 12px 44px rgba(0, 0, 0, 0.45), 0 0 40px rgba(131, 58, 180, 0.22);
}

/* --- Glow hovers --- */
.step:hover,
.feature-card:hover {
  background: var(--glass-bg);
  border-color: rgba(160, 90, 220, 0.35);
  box-shadow: var(--glass-inset), 0 12px 36px rgba(0, 0, 0, 0.40), var(--glow-brand);
}
.pricing-card:hover {
  border-color: rgba(160, 90, 220, 0.40);
  box-shadow: var(--glass-inset), var(--glass-shadow), var(--glow-brand);
}
.pricing-card--popular:hover {
  border-color: rgba(180, 110, 235, 0.60);
  box-shadow: var(--glass-inset), 0 14px 48px rgba(0, 0, 0, 0.50), 0 0 52px rgba(131, 58, 180, 0.30);
}
.stat-card { transition: all var(--ease); }
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(160, 90, 220, 0.32);
  box-shadow: var(--glass-inset), 0 10px 32px rgba(0, 0, 0, 0.40), var(--glow-brand);
}
.stat-card__value { text-shadow: 0 0 28px rgba(201, 126, 245, 0.30); }
.automation-card:hover,
.ig-account-card:hover {
  border-color: rgba(160, 90, 220, 0.30);
  box-shadow: var(--glass-inset), var(--glass-shadow), 0 0 18px rgba(131, 58, 180, 0.12);
}

/* --- Buttons --- */
.btn--gradient {
  box-shadow: 0 4px 18px rgba(131, 58, 180, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.btn--gradient:hover {
  opacity: 1;
  filter: brightness(1.08);
  box-shadow: 0 8px 30px rgba(131, 58, 180, 0.45), 0 2px 14px rgba(253, 29, 29, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.20);
}
.btn--outline:hover { box-shadow: 0 0 18px rgba(131, 58, 180, 0.14); }

/* --- Chrome: landing nav, app sidebar/topbar, mobile nav --- */
.nav {
  background: rgba(10, 10, 18, 0.55);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  backdrop-filter: blur(22px) saturate(160%);
}
.sidebar {
  background: rgba(13, 13, 24, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}
.topbar {
  background: rgba(11, 11, 20, 0.60);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  backdrop-filter: blur(18px) saturate(150%);
}
.mobile-nav {
  background: rgba(12, 12, 22, 0.80);
  -webkit-backdrop-filter: blur(20px) saturate(150%);
  backdrop-filter: blur(20px) saturate(150%);
}
.nav-item.active {
  box-shadow: inset 0 0 0 1px rgba(131, 58, 180, 0.28), 0 0 16px rgba(131, 58, 180, 0.12);
}

/* --- Badges & chips --- */
.hero__badge {
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 0 22px rgba(131, 58, 180, 0.20);
}
.status-badge--on { box-shadow: var(--glow-green); }
.ig-account-card__badge { box-shadow: 0 0 12px rgba(34, 197, 94, 0.16); }
.plan-badge[data-plan="pro"] { box-shadow: 0 0 14px rgba(131, 58, 180, 0.18); }
.plan-badge[data-plan="agency"] { box-shadow: 0 0 14px rgba(252, 175, 69, 0.16); }

/* --- Forms --- */
.form-input { background: rgba(255, 255, 255, 0.05); }
.form-input:focus {
  box-shadow: 0 0 0 3px rgba(131, 58, 180, 0.15), 0 0 20px rgba(131, 58, 180, 0.16);
}
.tag-input:focus-within {
  border-color: rgba(131, 58, 180, 0.5);
  box-shadow: 0 0 0 3px rgba(131, 58, 180, 0.12), 0 0 16px rgba(131, 58, 180, 0.14);
}
.post-thumb--selected {
  box-shadow: 0 0 0 1px rgba(253, 29, 29, 0.4), 0 0 16px rgba(253, 29, 29, 0.30);
}

/* --- Modal: frosted panel over a deeper, blurrier overlay --- */
.modal-overlay {
  background: rgba(4, 4, 10, 0.60);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.modal {
  background: rgba(17, 17, 30, 0.78);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  backdrop-filter: blur(24px) saturate(150%);
  border-color: var(--glass-border);
  box-shadow: var(--glass-inset), 0 24px 80px rgba(0, 0, 0, 0.60), 0 0 60px rgba(131, 58, 180, 0.10);
}

/* --- Hero headline: a whisper of glow behind the gradient text --- */
.hero__headline .text-gradient {
  filter: drop-shadow(0 0 26px rgba(131, 58, 180, 0.30));
}

/* --- Page niceties --- */
::selection { background: rgba(131, 58, 180, 0.45); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(255, 255, 255, 0.14) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.10);
  border-radius: 100px;
  border: 3px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 255, 255, 0.18); }

/* --- No backdrop-filter? Fall back to near-solid surfaces --- */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .nav, .sidebar, .topbar, .mobile-nav { background: rgba(12, 12, 22, 0.97); }
  .modal { background: #12121F; }
}

/* ═══════════════════════════════════════════════════════════════
   LIGHT THEME — scoped to the logged-in app (.app-body) only.
   The marketing landing + auth pages keep the dark palette.
   Redefining tokens here flips every app section at once; the
   rules below patch the few spots that hardcoded dark "glass".
   ═══════════════════════════════════════════════════════════════ */
.app-body {
  --bg:            #F4F5F7;
  --bg-alt:        #FFFFFF;
  --surface:       #FFFFFF;
  --surface-hover: #EEEEF3;
  --border:        rgba(20, 20, 43, 0.08);
  --border-hover:  rgba(20, 20, 43, 0.18);
  --text:          #14142B;
  --text-muted:    #6A6A85;
  --text-dim:      #A2A2B8;
  --shadow:        0 1px 2px rgba(20, 20, 43, 0.04), 0 4px 14px rgba(20, 20, 43, 0.06);
  --shadow-lg:     0 16px 48px rgba(20, 20, 43, 0.16);
  --glass-bg:      #FFFFFF;
  --glass-border:  rgba(20, 20, 43, 0.08);
  --glass-inset:   none;
  --glass-shadow:  0 10px 30px rgba(20, 20, 43, 0.10);
}

/* White panels float with a soft shadow instead of only a border */
.app-body .stat-card,
.app-body .automation-card,
.app-body .link-card,
.app-body .ig-account-card,
.app-body .billing-plan-card,
.app-body .settings-card,
.app-body .dash-panel { box-shadow: var(--shadow); }

/* Inputs / selects / tag-input → solid white (were translucent glass) */
.app-body .form-input,
.app-body .tag-input { background: #fff; border: 1px solid var(--border); color: var(--text); }
.app-body .form-input::placeholder { color: var(--text-dim); }

/* Modal → white card on a soft scrim */
.app-body .modal { background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow-lg); }
.app-body .modal-overlay { background: rgba(20, 20, 43, 0.35); }

/* Brand accents were tuned for a dark bg; deepen for white */
.app-body .nav-item.active svg,
.app-body .mobile-nav__item.active,
.app-body .stub-card__icon { color: #9B3FD4; }
.app-body .nav-item.active { background: rgba(131, 58, 180, 0.10); }
/* Sidebar/topbar/mobile-nav hardcode a dark "glass" bg later in the file — re-light them here */
.app-body .sidebar { background: var(--bg-alt); border-right: 1px solid var(--border); }
.app-body .topbar { background: var(--bg-alt); border-bottom: 1px solid var(--border); }
.app-body .mobile-nav { background: #fff; border-top: 1px solid var(--border); }
.app-body *::-webkit-scrollbar-thumb { background-color: rgba(20, 20, 43, 0.18); }
.app-body *::-webkit-scrollbar-thumb:hover { background-color: rgba(20, 20, 43, 0.30); }

/* ═══ DASHBOARD (bento) ═══════════════════════════════════════ */
.stat-card--hero {
  background: linear-gradient(135deg, var(--grad-start), var(--grad-mid), var(--grad-end));
  border: none;
  color: #fff;
}
.stat-card--hero .stat-card__label { color: rgba(255, 255, 255, 0.85); }
.stat-card--hero .stat-card__value { color: #fff; }
.stat-card__sub { font-size: 0.72rem; color: rgba(255, 255, 255, 0.82); margin-top: 6px; }
.app-body .stat-card--hero { box-shadow: 0 10px 28px rgba(131, 58, 180, 0.28); }

.stat-grid--secondary { grid-template-columns: repeat(3, 1fr); margin-top: -12px; }

.dash-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 28px; }
.dash-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.dash-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.dash-panel__title { font-size: 0.9rem; font-weight: 700; color: var(--text); }
.dash-panel--chart .daychart { height: 150px; background: transparent; border: none; padding: 0; }

.dash-top-links { display: flex; flex-direction: column; gap: 2px; }
.toplink-row {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 8px;
  border-radius: 8px;
  cursor: pointer;
  background: transparent;
  border: none;
  transition: background var(--ease);
}
.toplink-row:hover { background: var(--surface-hover); }
.toplink-row__rank { font-size: 0.8rem; font-weight: 700; color: var(--text-dim); text-align: center; }
.toplink-row__title { font-size: 0.86rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.toplink-row__clicks { font-size: 0.9rem; font-weight: 700; color: var(--text); }

@media (max-width: 760px) {
  .dash-row { grid-template-columns: 1fr; }
  .stat-grid--secondary { grid-template-columns: 1fr 1fr; }
}

/* ═══ LINKS ═══════════════════════════════════════════════════ */
.links-list { display: flex; flex-direction: column; gap: 12px; }

.link-clicks-chip { color: var(--grad-end); font-weight: 600; }

.link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  transition: border-color var(--ease);
}
.link-card:hover { border-color: var(--border-hover); }
.link-card__main { min-width: 0; flex: 1; }
.link-card__top { display: flex; align-items: center; gap: 10px; margin-bottom: 5px; }
.link-card__title {
  font-weight: 600;
  color: var(--text);
  font-size: 0.98rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 60%;
}
.link-card__dest {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 8px;
}
.link-card__dest:hover { color: var(--text); text-decoration: underline; }
.link-card__short { display: flex; align-items: center; gap: 8px; }

.short-pill {
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 0.78rem;
  color: var(--text);
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.16), rgba(253, 29, 29, 0.1));
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.short-pill--lg { font-size: 0.85rem; padding: 5px 14px; }

.link-copy-btn {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-hover);
  border: 1px solid var(--border);
  padding: 3px 10px;
  border-radius: 100px;
  cursor: pointer;
  transition: color var(--ease), border-color var(--ease);
}
.link-copy-btn:hover { color: var(--text); border-color: var(--border-hover); }

.link-card__side { display: flex; align-items: center; gap: 18px; flex-shrink: 0; }
.link-card__clicks { text-align: right; line-height: 1.1; }
.link-card__clicks-num { display: block; font-size: 1.35rem; font-weight: 700; color: var(--text); }
.link-card__clicks-lbl { font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.link-card__actions { display: flex; gap: 6px; }

/* Short-URL row inside the create/edit modal */
.short-url-row { display: flex; gap: 8px; align-items: center; }
.short-url-row__input { flex: 1; font-family: var(--mono, ui-monospace, monospace); font-size: 0.82rem; }

/* ═══ LINK STATS MODAL ════════════════════════════════════════ */
.modal--wide { max-width: 720px; width: 100%; }

.stats-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }
.stats-head__dest {
  font-size: 0.82rem; color: var(--text-muted); text-decoration: none;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
}
.stats-head__dest:hover { color: var(--text); }

.stats-total { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; }
.stats-total__num { font-size: 2.4rem; font-weight: 800; line-height: 1; background: linear-gradient(135deg, var(--grad-start), var(--grad-mid), var(--grad-end)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.stats-total__lbl { font-size: 0.85rem; color: var(--text-muted); }

.stats-block { margin-bottom: 20px; }
.stats-block__title { font-size: 0.75rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 10px; }
.stats-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stats-empty { font-size: 0.85rem; color: var(--text-dim); padding: 8px 0; }

/* 30-day bar chart */
.daychart {
  display: flex; align-items: flex-end; gap: 3px;
  height: 96px; padding: 6px 2px 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.daybar {
  flex: 1; min-height: 3px; border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(131, 58, 180, 0.75), rgba(253, 29, 29, 0.55));
  transition: opacity var(--ease);
}
.daybar:hover { opacity: 0.7; }
.daybar--peak { background: linear-gradient(180deg, var(--grad-start), var(--grad-mid)); }
.daybar--zero { background: var(--surface-hover); }

/* Horizontal stat bars (devices, referrers) */
.statbars { display: flex; flex-direction: column; gap: 8px; }
.statbar-row { display: grid; grid-template-columns: 84px 1fr 34px; align-items: center; gap: 10px; }
.statbar-row__label { font-size: 0.8rem; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.statbar-row__track { height: 8px; background: var(--surface-hover); border-radius: 100px; overflow: hidden; }
.statbar-row__fill { display: block; height: 100%; border-radius: 100px; background: linear-gradient(90deg, var(--grad-start), var(--grad-mid)); }
.statbar-row__val { font-size: 0.8rem; color: var(--text-muted); text-align: right; }

/* Upsell for free tier */
.stats-upsell {
  text-align: center; padding: 22px 20px;
  background: linear-gradient(135deg, rgba(131, 58, 180, 0.14), rgba(253, 29, 29, 0.08));
  border: 1px solid var(--border); border-radius: var(--radius-sm);
}
.stats-upsell__title { font-weight: 700; color: var(--text); margin-bottom: 6px; }
.stats-upsell__desc { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 14px; max-width: 420px; margin-left: auto; margin-right: auto; }

@media (max-width: 640px) {
  .link-card { flex-direction: column; align-items: stretch; gap: 12px; }
  .link-card__side { justify-content: space-between; }
  .link-card__title { max-width: 100%; }
  .stats-grid2 { grid-template-columns: 1fr; }
}

/* ═══ BILLING ═════════════════════════════════════════════════ */
.billing-actions { margin-top: 12px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.billing-sub-status { font-size: 0.9rem; color: var(--text-muted); }
.plan-compare { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 20px; }
.plan-compare__card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
}
.app-body .plan-compare__card { box-shadow: var(--shadow); }
.plan-compare__name { font-size: 1.1rem; font-weight: 700; margin-bottom: 14px; color: var(--text); }
.plan-compare__list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; }
.plan-compare__list li { font-size: 0.85rem; color: var(--text-muted); padding-left: 22px; position: relative; }
.plan-compare__list li::before { content: '✓'; position: absolute; left: 0; color: var(--grad-start); font-weight: 800; }
@media (max-width: 640px) { .plan-compare { grid-template-columns: 1fr; } }

/* ============================================================
   Legal / policy pages (privacy, terms, data-deletion)
   Dark theme to match the rest of the site. Replaces the old
   inline .legal blocks that rendered dark-grey text on near-black.
   ============================================================ */
.legal {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  /* top pad clears the fixed 72px glass nav; flex pushes the footer down on short pages */
  padding: calc(var(--nav-height) + 32px) 24px 96px;
  flex: 1 0 auto;
}
.legal h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: 6px; color: var(--text); }
.legal h2 { font-size: 1.3rem; margin-top: 40px; margin-bottom: 12px; color: var(--text); letter-spacing: -0.01em; }
.legal h3 { font-size: 1.02rem; margin-top: 22px; margin-bottom: 6px; color: var(--text); }
.legal p, .legal li { color: var(--text-muted); font-size: 0.97rem; line-height: 1.75; }
.legal p { margin-bottom: 12px; }
.legal ul, .legal ol { padding-left: 1.4rem; margin-bottom: 12px; list-style: revert; }
.legal li { margin-bottom: 6px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal a { color: #C4A7FF; text-decoration: underline; text-underline-offset: 2px; }
.legal a:hover { color: var(--text); }
.legal code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.9em;
  color: var(--text);
}
.legal__updated { color: var(--text-dim); font-size: 0.9rem; margin: 4px 0 34px; }
.legal__note { color: var(--text-dim); font-size: 0.85rem; margin-top: 40px; line-height: 1.7; }
.legal__highlight {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  margin: 16px 0;
}
.legal__highlight p:last-child { margin-bottom: 0; }
.legal table {
  border-collapse: collapse;
  width: 100%;
  margin: 16px 0;
  font-size: 0.9rem;
}
.legal th, .legal td {
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}
.legal th { background: var(--surface); color: var(--text); font-weight: 600; }
.legal td { color: var(--text-muted); }

/* === Footer legal disclaimer (Meta / trademark line) === */
.footer__disclaimer {
  width: 100%;
  order: 3;
  color: var(--text-dim);
  font-size: 0.78rem;
  line-height: 1.6;
  max-width: 760px;
}

/* === "Agree to Terms" line under the register button === */
.auth-agree {
  font-size: 0.8rem;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.6;
  margin-top: -6px;
}
.auth-agree a { color: var(--text-muted); text-decoration: underline; text-underline-offset: 2px; }
.auth-agree a:hover { color: var(--text); }

/* === Auth secondary link (e.g. "Forgot password?") === */
.auth-form__aux { text-align: right; margin-top: -8px; }
.auth-form__aux a { font-size: 0.82rem; color: var(--text-muted); text-decoration: none; }
.auth-form__aux a:hover { color: var(--text); text-decoration: underline; }

/* === Pricing auto-renewal note under the plan cards === */
.pricing-note {
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-top: 26px;
}
