:root {
  /* System-Only Tri-Font Stack */
  --sans: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Apple Garamond", "Baskerville", "Times New Roman", "Droid Serif", Times, "Source Serif Pro", serif;
  --mono: ui-monospace, "SF Mono", Monaco, "Cascadia Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier, monospace;

  /* Surfaces & Elevation (Calibrated Warm Stone OKLCH + Hex Fallbacks) */
  --bg: #f8fafc;
  --bg: oklch(0.985 0.004 95);           /* Warm stone canvas */
  --bg-2: #ffffff;
  --bg-2: oklch(1 0 0);                   /* Crisp white panels/cards */
  --bg-subtle: #f1f5f9;
  --bg-subtle: oklch(0.965 0.006 95);    /* Secondary surfaces / hover */
  --bg-muted: #e2e8f0;
  --bg-muted: oklch(0.925 0.008 95);     /* Wells and muted segments */

  /* Text & Ink (WCAG AAA/AA calibrated) */
  --ink: #0f1d1c;
  --ink: oklch(0.19 0.02 210);           /* Deep obsidian teal-slate (15.8:1) */
  --muted: #536563;
  --muted: oklch(0.48 0.02 210);         /* Readable secondary slate (5.2:1) */
  --muted-dark: #314240;
  --muted-dark: oklch(0.32 0.02 210);    /* Elevated legal/detail text (9.4:1) */

  /* Borders & Dividers */
  --line: #dce3e1;
  --line: oklch(0.89 0.008 95);          /* 1px hairline dividers */
  --line-strong: #64748b;
  --line-strong: oklch(0.56 0.016 192);  /* Interactive control border >= 3.1:1 on white (WCAG 2.2 SC 1.4.11) */

  /* Primary Brand: Sophisticated Enterprise Teal */
  --accent: #0f766e;
  --accent: oklch(0.48 0.11 188);        /* Primary action teal */
  --accent-hover: #115e59;
  --accent-hover: oklch(0.40 0.10 188);  /* Primary hover */
  --accent-ink: #ffffff;
  --accent-subtle: #f0fdfa;
  --accent-subtle: oklch(0.97 0.02 188); /* Soft teal tint */
  --accent-line: #ccfbf1;
  --accent-line: oklch(0.88 0.04 188);   /* Teal accent container border */
  --focus: #0f766e;
  --focus: oklch(0.48 0.11 188);         /* Accessible focus outline */

  /* Semantics */
  --danger: #dc2626;              /* Red-600 */
  --danger-hover: #b91c1c;        /* Red-700 */
  --danger-bg: #fef2f2;           /* Red-50 */
  --danger-line: #fecaca;         /* Red-200 */

  --ok: #16a34a;                  /* Green-600 */
  --ok-bg: #f0fdf4;               /* Green-50 */
  --ok-line: #bbf7d0;             /* Green-200 */

  --warning: #d97706;             /* Amber-600 */
  --warning-bg: #fffbeb;          /* Amber-50 */
  --warning-line: #fde68a;        /* Amber-200 */

  --info: #0284c7;                /* Sky-600 */
  --info-bg: #f0f9ff;             /* Sky-50 */
  --info-line: #bae6fd;           /* Sky-200 */

  --radius: 10px;
  --radius-sm: 8px;

  /* Physics & Spring Easings */
  --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.15);
  --ease-snappy: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);

  /* Shadows for Realistic Light-Theme Depth */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(15, 23, 42, 0.06), 0 1px 2px -1px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.07), 0 2px 4px -2px rgba(15, 23, 42, 0.04);
  --shadow-dropdown: 0 10px 25px -5px rgba(15, 23, 42, 0.1), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  font-family: var(--sans);
}

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

html, body {
  color-scheme: light;
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

p {
  text-wrap: pretty;
}

/* Tabular Numerics for Metrics, Counters, Timestamps */
.kpi-value, .stat-value, .metric-val, .badge, .status-pill, .funnel-kpi-val,
.table-cell-mono, .tabular-nums, .count-badge, .pdd-kv dd, .doc-item-meta,
.playbook-copy-btn, .time-stamp, .kb-stat-num, #kb-meter-val, .kpi-num {
  font-variant-numeric: tabular-nums;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent-hover); }

.top {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1.25rem;
  padding-top: max(0.85rem, env(safe-area-inset-top));
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88), 0 1px 2px 0 rgba(15, 23, 42, 0.03);
}

.brand {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
  text-decoration: none;
}

.brand:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  min-width: 44px;
  padding: 0 0.75rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
  user-select: none;
}
.nav-toggle svg {
  flex-shrink: 0;
  color: currentColor;
}
.nav-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--muted);
}

#nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.4rem;
  align-items: center;
}

#nav a, #nav button.link {
  color: var(--muted);
  background: none;
  border: 0;
  font: inherit;
  cursor: pointer;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease, background 0.15s ease;
}

#nav a:hover, #nav button.link:hover { color: var(--ink); background: var(--bg-subtle); text-decoration: none; }
#nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--accent-subtle);
  font-weight: 600;
}

/* Intent-Driven Navigation Groups */
.nav-group {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.nav-group-trigger {
  display: inline-flex;
  align-items: stretch;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.nav-group-trigger:hover,
.nav-group.open .nav-group-trigger {
  background: var(--bg-subtle);
  border-color: var(--line);
}

.nav-intent-link {
  color: var(--muted-dark, #334155);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem 0.4rem 0.7rem;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
  transition: color 0.15s ease;
}

.nav-intent-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.nav-group-trigger.is-active {
  background: var(--accent-subtle);
  border-color: rgba(15, 118, 110, 0.2);
}

.nav-group-trigger.is-active .nav-intent-link {
  color: var(--accent);
  font-weight: 600;
}

.nav-dropdown-btn {
  background: none;
  border: 0;
  border-left: 1px solid transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  transition: color 0.15s ease, background 0.15s ease;
}

.nav-group-trigger:hover .nav-dropdown-btn,
.nav-group.open .nav-dropdown-btn {
  border-left-color: var(--line);
  color: var(--ink);
}

.nav-group-trigger.is-active .nav-dropdown-btn {
  border-left-color: rgba(15, 118, 110, 0.2);
  color: var(--accent);
}

.nav-dropdown-btn:hover {
  background: rgba(0, 0, 0, 0.04);
}

.nav-caret {
  transition: transform 0.2s ease;
}

.nav-group.open .nav-caret {
  transform: rotate(180deg);
}

/* Flyout Menu Dropdown */
.nav-flyout {
  position: absolute;
  top: calc(100% + 5px);
  left: 0;
  min-width: 250px;
  background: var(--bg-2);
  border: 1px solid var(--line-strong, #cbd5e1);
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.04);
  padding: 0.4rem;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-5px);
  transition: opacity 0.16s ease, transform 0.16s ease, visibility 0.16s;
  pointer-events: none;
}

.nav-group.open .nav-flyout {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
}

.nav-group-user .nav-flyout {
  left: auto;
  right: 0;
  min-width: 220px;
}

.flyout-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.75rem;
  color: var(--ink);
  font-size: 0.86rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius-sm);
  background: none;
  border: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}

.flyout-item:hover {
  background: var(--bg-subtle);
  color: var(--accent);
  text-decoration: none;
}

.flyout-item[aria-current="page"] {
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 600;
}

.flyout-icon {
  font-size: 0.95rem;
  line-height: 1;
  width: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.flyout-content {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.flyout-title {
  color: inherit;
  font-weight: 500;
  line-height: 1.25;
}

.flyout-hint {
  font-size: 0.73rem;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.2;
}

.nav-flyout-divider {
  height: 1px;
  background: var(--line);
  margin: 0.35rem 0.25rem;
}

.flyout-item-logout {
  color: var(--danger, #dc2626);
}

.flyout-item-logout:hover {
  background: var(--danger-bg, #fef2f2);
  color: var(--danger-hover, #b91c1c);
}

.user-avatar-badge {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid rgba(15, 118, 110, 0.25);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  margin-right: 0.15rem;
}

.flyout-icon svg {
  display: block;
}

/* Hub Explainer Pages */
.hub-hero {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

.hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid rgba(15, 118, 110, 0.2);
  border-radius: 9999px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.hub-hero h1 {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 0.5rem;
}

.hub-lede {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 680px;
  margin: 0;
  line-height: 1.5;
}

.hub-grid {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  margin-top: 1.5rem;
  overflow: hidden;
}

.hub-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 1.25rem;
  padding: 1.25rem 1.4rem;
  background: var(--bg-2);
  border: none;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.15s ease;
  position: relative;
}

.hub-card:last-child {
  border-bottom: none;
}

.hub-card:hover {
  background: var(--bg-subtle);
  transform: none;
  box-shadow: none;
  text-decoration: none;
}

.hub-card-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.hub-card-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-subtle);
  color: var(--accent);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hub-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.hub-card-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.hub-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0;
  line-height: 1.3;
}

.hub-card-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 9999px;
  background: var(--bg-subtle);
  color: var(--muted-dark);
}

.hub-card-tag.hot {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.hub-card-desc {
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.hub-card-cta {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .hub-card {
    grid-template-columns: 40px 1fr;
    gap: 0.85rem;
    padding: 1rem;
  }
  .hub-card-cta {
    grid-column: 2 / -1;
    margin-top: 0.35rem;
  }
}

/* Panel Command Center & KPI Grid */
.panel-greeting-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.6rem;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-left: 0.5rem;
}

.panel-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 1.25rem 0 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}

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

@media (max-width: 520px) {
  .panel-kpi-grid {
    grid-template-columns: 1fr;
  }
}

.panel-kpi-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: none;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 1.25rem 1.4rem;
  text-decoration: none;
  box-shadow: none;
  transition: background 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.panel-kpi-card:hover {
  background: var(--bg-subtle);
  text-decoration: none;
}

.panel-kpi-card.priority {
  border-left: 3px solid var(--warning);
}

.panel-kpi-card.priority:hover {
  background: var(--bg-subtle);
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}

.kpi-icon-wrap {
  width: auto;
  height: auto;
  background: transparent;
  color: var(--muted);
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.kpi-icon-wrap.priority {
  background: transparent;
  color: var(--warning);
  border: none;
}

.kpi-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-subtle);
  color: var(--muted-dark);
}

.kpi-badge.priority {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.kpi-badge.ok {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.kpi-badge.info {
  background: #f0f9ff;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: 0.35rem;
}

.kpi-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.2rem;
}

.kpi-sub {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.35;
  margin-bottom: 1rem;
  flex: 1;
}

.kpi-cta {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: transform 0.15s ease;
}

.panel-kpi-card:hover .kpi-cta {
  transform: translateX(3px);
}

/* Quick Share Banner */
.panel-quick-share {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-md, 8px);
  padding: 0.9rem 1.25rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.panel-share-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.panel-share-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.panel-share-title {
  display: block;
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.panel-share-url {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 480px;
}

.panel-share-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.section-head h2 { margin: 0; }
.section-head .meta { margin: 0.2rem 0 0; }

.panel-followups-wrap {
  margin: 0 0 2rem;
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 8px);
}
.home-followup-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg-2);
  margin-bottom: 0.85rem;
  overflow: hidden;
}
.home-followup-count {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  padding: 0.65rem 0.8rem;
  border: none;
  border-right: 1px solid var(--line);
  background: transparent;
}
.home-followup-count:last-child {
  border-right: none;
}
.home-followup-count strong { font-size: 1.2rem; color: var(--ink); }
.home-followup-count span { color: var(--muted); font-size: 0.84rem; }
.home-followup-count.overdue strong { color: var(--danger); }
.home-followups-list { display: grid; gap: 0.4rem; }
.home-followup-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm, 6px);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
}
.home-followup-item:hover { border-color: var(--accent); }
.home-followup-details { display: grid; gap: 0.15rem; min-width: 0; }
.home-followup-details strong { overflow: hidden; text-overflow: ellipsis; }
.home-followup-details small { color: var(--muted); }
.home-followup-status { flex: 0 0 auto; color: var(--muted-dark); font-size: 0.8rem; font-weight: 600; }
.home-followup-status.overdue { color: var(--danger); }
.home-followup-status.today { color: var(--accent); }

@media (max-width: 520px) {
  .panel-followups-wrap { padding: 0.75rem; }
  .home-followup-summary { gap: 0.4rem; }
  .home-followup-count { display: grid; gap: 0.1rem; padding: 0.55rem; }
  .home-followup-count strong { font-size: 1.05rem; }
  .home-followup-count span { font-size: 0.75rem; }
}

.shell-guest main { width: min(1120px, calc(100% - 2rem)); margin: 2rem auto 4rem; }
.shell-app main { width: min(1200px, calc(100% - 2rem)); margin: 1.5rem auto 4rem; }
.shell-public main { width: min(560px, calc(100% - 2rem)); margin: 2rem auto 3rem; }

.hero { padding: 3rem 0 2.2rem; }
.eyebrow {
  color: var(--accent);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.74rem;
  font-weight: 700;
  margin: 0 0 0.8rem;
}

/* ==========================================================================
   Editorial Landing Page Split & Interactive Micro-Sandbox
   ========================================================================== */
.home-hero-split {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  align-items: center;
  gap: 3.5rem;
  padding: 2.5rem 0 3.5rem;
}

@media (max-width: 900px) {
  .home-hero-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    padding: 1.5rem 0 2.5rem;
  }
}

.home-hero-left .home-eyebrow {
  font-family: var(--mono);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.home-hero-left h1 {
  font-family: var(--serif);
  font-size: clamp(2.2rem, 4.5vw, 3.4rem);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.025em;
  color: var(--ink);
  margin: 0 0 1.25rem;
  text-wrap: balance;
}

.home-hero-left .home-lede {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 2rem;
  text-wrap: pretty;
  max-width: 34rem;
}

.home-hero-left .cta-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

/* Interactive Sandbox Cockpit */
.home-simulator-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: relative;
}

.simulator-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}

.simulator-title {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted-dark);
}

.simulator-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
}
.simulator-live-indicator::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.simulator-pills-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sim-source-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  color: var(--ink);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.sim-source-btn:hover {
  border-color: var(--accent);
}

.sim-source-btn.active {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent-hover);
  font-weight: 600;
}

.simulator-slider-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.simulator-slider-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.82rem;
  color: var(--muted);
}

.simulator-slider-head strong {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.simulator-range {
  width: 100%;
  accent-color: var(--accent);
  cursor: pointer;
}

.simulator-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
}

.sim-metric-cell {
  padding: 0.75rem 0.85rem;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sim-metric-cell:last-child {
  border-right: none;
}

.sim-metric-num {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
}

.sim-metric-num.highlight {
  color: var(--accent);
}

.sim-metric-label {
  font-size: 0.72rem;
  color: var(--muted);
}

/* 3-Row 1px Swiss Ledger */
.home-ledger-strip {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  margin: 1.5rem 0 3.5rem;
  overflow: hidden;
}

.home-ledger-row {
  display: grid;
  grid-template-columns: 80px 220px 1fr;
  align-items: baseline;
  gap: 1.5rem;
  padding: 1.5rem 1.75rem;
  border-bottom: 1px solid var(--line);
}

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

.home-ledger-idx {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.home-ledger-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.home-ledger-desc {
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 768px) {
  .home-ledger-row {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.25rem;
  }
}

h1, h2, h3 { font-weight: 700; letter-spacing: -0.03em; line-height: 1.25; margin: 0 0 0.75rem; color: var(--ink); }
h1 { font-size: clamp(1.6rem, 4vw, 2.4rem); }
.shell-guest h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.05rem; }
.lede { color: var(--muted); font-size: 1.05rem; max-width: 36rem; line-height: 1.6; }

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 1.4rem;
}

.page-head .lede, .page-head .meta { margin-bottom: 0; }

.cta-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.6rem; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.6rem 1.05rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}

.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); text-decoration: none; color: var(--accent-ink); }
.btn.ghost { background: var(--bg-2); color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-sm); }
.btn.ghost:hover { background: var(--bg-subtle); border-color: var(--muted); color: var(--ink); filter: none; }
.btn.danger { background: var(--bg-2); border-color: var(--danger-line); color: var(--danger); box-shadow: var(--shadow-sm); }
.btn.danger:hover { background: var(--danger); border-color: var(--danger); color: #ffffff; filter: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; filter: none; box-shadow: none; }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  box-shadow: var(--shadow-card);
}

.card p { color: var(--muted); margin: 0.4rem 0 0; }

.panel {
  width: min(400px, 100%);
  margin: 1.5rem auto;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.5rem 1.4rem 1.6rem;
  box-shadow: var(--shadow-card);
}

.shell-app .panel,
.shell-app .panel.wide {
  width: 100%;
  margin: 0;
}

.shell-public .panel {
  width: 100%;
  margin: 0;
}

body[data-page="account"] .panel {
  width: min(400px, 100%);
  margin: 1.5rem auto;
}

.panel.wide { width: min(960px, 100%); }

label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--muted-dark); margin: 0.9rem 0 0.3rem; }

input, select, textarea {
  color-scheme: light;
  width: 100%;
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 0.65rem 0.75rem;
  font: inherit;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder, textarea::placeholder {
  color: #94a3b8;
  opacity: 1;
}

select option {
  background-color: #ffffff;
  color: var(--ink);
}

textarea { min-height: 7rem; resize: vertical; }

input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  border-color: var(--focus);
}

.pw-field { position: relative; }
.pw-field input { padding-right: 5.2rem; }
.pw-toggle {
  position: absolute;
  right: 0.35rem;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  min-height: 36px;
  padding: 0 0.5rem;
}
.pw-toggle:hover { color: var(--ink); }

.pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.checks { display: grid; gap: 0.35rem; margin-top: 0.4rem; }
.check {
  display: flex;
  gap: 0.55rem;
  align-items: flex-start;
  color: var(--ink);
  font-size: 0.92rem;
}
.check input { width: auto; margin-top: 0.25rem; accent-color: var(--accent); }

.consent {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin-top: 1rem;
}
.consent input { width: auto; margin-top: 0.3rem; accent-color: var(--accent); }

.gdpr-box {
  max-height: 14rem;
  overflow: auto;
  white-space: pre-wrap;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 0.95rem;
  font-size: 0.85rem;
  color: var(--muted-dark);
  background: var(--bg-subtle);
  margin-top: 0.6rem;
  line-height: 1.6;
}

.gdpr-box-tall { max-height: min(32rem, 70vh); }

.pills { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  padding: 0.4rem 0.8rem;
  cursor: pointer;
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.pill.on { border-color: var(--accent); color: var(--accent-ink); background: var(--accent); }
.pill.on .pill-count { background: rgba(255, 255, 255, 0.25); color: var(--accent-ink); }
.pill:hover:not(.on) { color: var(--ink); border-color: var(--line-strong); background: var(--bg-subtle); }
.pill-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.05rem 0.4rem;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--muted);
  line-height: 1.2;
}

.leads-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0 0 1.2rem;
}
.leads-search-wrap {
  position: relative;
  min-width: 220px;
  flex: 1 1 260px;
  max-width: 320px;
}
.search-icon-slot {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
  display: flex;
  align-items: center;
}
.leads-search-input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2.2rem;
  font-size: 0.84rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.leads-search-input:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
.lead-user-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.avatar-initials {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  user-select: none;
}
.lead-meta-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}
.lead-name {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.92rem;
}
.lead-tags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.2rem;
}
.lead-form-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: #0369a1;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}
.lead-form-tag .icon-wrap {
  color: #0284c7;
  display: flex;
}
.lead-ref-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  font-weight: 500;
  color: #475569;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
}
.lead-ref-tag.direct {
  color: #64748b;
}
.lead-ref-tag .icon-wrap {
  color: #94a3b8;
  display: flex;
}

.status-picker-wrap {
  position: relative;
  display: inline-block;
}
.status-btn-trigger {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  transition: all 0.15s ease;
  user-select: none;
  font-family: inherit;
}
.status-btn-trigger:hover {
  filter: brightness(0.96);
  box-shadow: var(--shadow-sm);
}
.status-btn-trigger .status-chev {
  display: flex;
  opacity: 0.7;
  margin-left: 0.1rem;
}
.status-picker-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 90;
  min-width: 175px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-dropdown);
  padding: 0.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  animation: statusFadeIn 0.12s ease-out;
}
@keyframes statusFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.status-picker-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  padding: 0.25rem 0.5rem 0.35rem;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.2rem;
}
.status-picker-opt {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.4rem 0.55rem;
  border-radius: 6px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.12s ease, color 0.12s ease;
}
.status-picker-opt:hover {
  background: var(--bg-subtle);
  color: var(--ink);
}
.status-picker-opt.selected {
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 600;
}
.status-picker-check {
  margin-left: auto;
  color: var(--accent);
  display: flex;
}

.quick-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.action-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.action-btn-icon:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--bg-subtle);
}
.action-btn-icon.wa:hover {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}
.leads-table th.th-actions, .leads-table td.td-actions {
  text-align: right;
}

.btn-primary-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  color: var(--muted);
  white-space: nowrap;
}
.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}
.status-dot.new { background: #0284c7; }
.status-dot.contacted { background: #d97706; }
.status-dot.qualified { background: #9333ea; }
.status-dot.won { background: #16a34a; }
.status-dot.lost, .status-dot.junk { background: #dc2626; }

.status.new { color: #0369a1; background: #f0f9ff; border-color: #bae6fd; }
.status.contacted { color: #b45309; background: #fffbeb; border-color: #fde68a; }
.status.qualified { color: #7e22ce; background: #faf5ff; border-color: #e9d5ff; }
.status.won { color: #15803d; background: #f0fdf4; border-color: #bbf7d0; }
.status.lost, .status.junk { color: #b91c1c; background: #fef2f2; border-color: #fecaca; }

.badge-warning {
  font-size: 0.72rem;
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
  margin-top: 0.3rem;
  font-weight: 500;
  display: inline-block;
}

.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0.9rem; margin: 1.2rem 0 1.6rem; }
.dash a.card { color: inherit; text-decoration: none; }
.dash a.card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); }

.kpi-grid { margin: 0.5rem 0 1.4rem; }
.kpi-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  box-shadow: var(--shadow-card);
}
.kpi-val { font-size: 1.6rem; font-weight: 700; letter-spacing: -0.03em; color: var(--ink); line-height: 1.15; }
.kpi-label { font-size: 0.74rem; color: var(--muted-dark); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.kpi-sub { font-size: 0.78rem; color: var(--muted); line-height: 1.35; }

.forms-table th, .forms-table td {
  padding: 0.95rem 0.95rem;
  vertical-align: middle;
}
.forms-table tbody tr {
  border-bottom: 1px solid var(--line);
  transition: background 0.15s ease;
}
.forms-table tbody tr:hover {
  background: var(--bg-subtle);
}
.forms-table th.col-status, .forms-table td.col-status {
  width: 120px;
}
.forms-table th.col-perf, .forms-table td.col-perf {
  width: 200px;
  min-width: 170px;
  white-space: nowrap;
}
.forms-table th.th-actions, .forms-table td.td-actions {
  text-align: right;
  width: 1%;
  white-space: nowrap;
  vertical-align: middle;
}

.form-title-cell { display: flex; flex-direction: column; gap: 0.45rem; align-items: flex-start; }
.form-title-link { font-size: 1rem; font-weight: 600; color: var(--ink); text-decoration: none; }
.form-title-link:hover { text-decoration: underline; color: var(--accent); }

.form-link-share-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.form-url-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.76rem;
  color: var(--muted-dark);
  background: var(--bg-subtle);
  padding: 0.2rem 0.45rem 0.2rem 0.55rem;
  border-radius: 6px;
  border: 1px solid var(--line);
  max-width: 280px;
}
.form-url-pill.draft {
  background: var(--bg-2);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
}
.form-url-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 200px;
}
.form-url-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}
.form-url-copy-btn:hover {
  background: var(--bg-hover, rgba(15, 23, 42, 0.08));
  color: var(--ink);
}

.form-social-chips {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}
.social-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.32rem;
  padding: 0.24rem 0.55rem;
  font-size: 0.76rem;
  font-weight: 500;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.25;
}
.social-chip:hover {
  border-color: var(--line-strong);
  background: var(--bg-subtle);
  text-decoration: none;
}
.social-chip.wa {
  color: #166534;
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.social-chip.wa:hover {
  background: #dcfce7;
  border-color: #86efac;
  color: #14532d;
}
.social-chip.ig {
  color: #9d174d;
  border-color: #fbcfe8;
  background: #fdf2f8;
}
.social-chip.ig:hover {
  background: #fce7f3;
  border-color: #f472b6;
  color: #831843;
}
.social-chip.hub {
  color: var(--muted-dark);
  border-color: var(--line);
  background: var(--bg-subtle);
}
.social-chip.hub:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-subtle);
}

.stat-cell { display: flex; flex-direction: column; gap: 0.25rem; }
.stat-main { font-weight: 600; color: var(--ink); font-size: 0.95rem; white-space: nowrap; }
.stat-sub { font-size: 0.8rem; color: var(--muted); display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; white-space: nowrap; }
.conv-tag {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  padding: 0.1rem 0.45rem;
  font-size: 0.75rem;
  font-weight: 600;
}

#forms-filter {
  margin: 1.25rem 0 1rem 0;
}

/* Forms Source Rollup Analytics Panel */
.source-rollup {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.25rem;
  margin: 1.25rem 0 1.5rem 0;
  box-shadow: var(--shadow-sm);
}
.source-rollup-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.85rem;
  gap: 0.5rem;
}
.source-rollup-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.source-rollup-badge {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg-subtle);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  border: 1px solid var(--line);
}
.source-rollup-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 0.65rem;
}
.source-rollup-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.65rem 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.15s ease;
}
.source-rollup-card:hover {
  border-color: var(--line-strong);
}
.source-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.source-card-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.source-conv-tag {
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 4px;
  padding: 0.08rem 0.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.source-card-metrics {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
}
.source-card-metrics strong {
  color: var(--ink);
  font-weight: 600;
}
.source-metric-sep {
  color: var(--line-strong);
}
.source-note {
  margin-top: 0.75rem;
  font-size: 0.76rem;
  color: var(--muted);
}

.source-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.85rem;
}
.source-line:last-child {
  border-bottom: none;
}
.source-line-left {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 500;
  color: var(--ink);
}

.th-actions { text-align: right; }
.form-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  justify-content: flex-end;
}
.btn-action-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.36rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.15s ease;
}
.btn-action-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--accent-ink);
  text-decoration: none;
}
.btn-action {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 500;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--ink);
  border-radius: var(--radius-sm);
  cursor: pointer;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn-action:hover {
  background: var(--bg-subtle);
  border-color: var(--muted);
  color: var(--ink);
  text-decoration: none;
}
.btn-action.copied {
  background: #f0fdf4 !important;
  border-color: #86efac !important;
  color: #15803d !important;
}

.icon-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.icon-wrap svg {
  display: block;
}

.stats { display: flex; flex-wrap: wrap; gap: 1rem; color: var(--muted); font-size: 0.9rem; margin: 0.5rem 0 1rem; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { border-bottom: 1px solid var(--line); padding: 0.7rem 0; }
.timeline .when { color: var(--muted); font-size: 0.8rem; }

/* Form Builder & Section Cards */
.form-builder-main {
  width: min(840px, calc(100% - 2rem));
  margin: 1.5rem auto 4rem;
}
.form-section-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}
.form-section-head {
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.85rem;
}
.form-section-head h2 {
  font-size: 1.1rem;
  margin: 0 0 0.25rem;
}
.form-section-head .meta {
  margin: 0;
  font-size: 0.88rem;
}
.form-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-grid-url {
  display: grid;
  grid-template-columns: 1fr 140px;
  gap: 1rem;
  margin-top: 0.25rem;
}
@media (max-width: 640px) {
  .form-grid-2, .form-grid-url {
    grid-template-columns: 1fr;
  }
}
.url-input-group {
  display: flex;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}
.url-input-group:focus-within {
  border-color: var(--accent);
  outline: 2px solid var(--focus);
  outline-offset: 1px;
}
.url-prefix {
  background: var(--bg-subtle);
  color: var(--muted);
  padding: 0.65rem 0.85rem;
  font-size: 0.85rem;
  border-right: 1px solid var(--line);
  white-space: nowrap;
  user-select: none;
}
.url-input-group input#slug {
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0.65rem 0.75rem;
  flex: 1;
  outline: none;
  font-weight: 500;
  font-size: 0.92rem;
  color: var(--ink);
  box-shadow: none;
}

/* Field Builder Cards */
.field-builder-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.field-row {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field-row:hover {
  border-color: var(--line-strong);
}
.field-row.locked {
  background: var(--bg-subtle);
  border-style: dashed;
}
.field-row-head {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.field-type-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.35rem 0.65rem;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.field-type-pill:hover {
  border-color: var(--muted);
  background: var(--bg-muted);
}
.field-type-pill.locked {
  background: var(--bg-subtle);
  color: var(--muted);
  border-color: transparent;
}
.field-type-select {
  color-scheme: light;
  background: transparent;
  border: 0;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0 0.15rem;
  cursor: pointer;
  outline: none;
  width: auto;
  margin: 0;
  appearance: auto;
  -webkit-appearance: auto;
}
.field-type-select option {
  background-color: #ffffff;
  color: var(--ink);
  padding: 0.4rem 0.6rem;
}
.field-order-num {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  opacity: 0.8;
  min-width: 1.25rem;
  user-select: none;
}
.field-label-wrap {
  flex: 1 1 12rem;
  display: flex;
  flex-direction: column;
}
.field-input-guide {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
  opacity: 0.9;
}
.field-label-wrap input {
  width: 100%;
  margin: 0;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
}
.field-fixed-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  color: var(--muted-dark);
  margin: 0.15rem 0 0.45rem;
}
.field-fixed-note .icon-wrap {
  color: var(--accent);
  flex-shrink: 0;
}
.field-locked-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  white-space: nowrap;
}

/* Switch */
.field-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  cursor: pointer;
  user-select: none;
  font-size: 0.82rem;
  color: var(--muted-dark);
  margin: 0;
  flex-shrink: 0;
}
.field-switch input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}
.switch-slider {
  position: relative;
  width: 32px;
  height: 18px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: 0.2s ease;
  flex-shrink: 0;
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.1);
}
.switch-slider::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: #ffffff;
  border-radius: 50%;
  transition: 0.2s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.25);
}
.field-switch input:checked + .switch-slider {
  background: var(--accent);
}
.field-switch input:checked + .switch-slider::before {
  transform: translateX(14px);
  background: #ffffff;
}
.field-switch input:checked ~ .switch-text {
  color: var(--ink);
  font-weight: 600;
}

/* Icon Buttons */
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.icon-btn:hover:not(:disabled) {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--bg-subtle);
}
.icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  box-shadow: none;
}
.icon-btn.danger:hover:not(:disabled) {
  color: var(--danger);
  border-color: var(--danger-line);
  background: var(--danger-bg);
}
.icon-btn.small {
  width: 28px;
  height: 28px;
}
.field-row-tools {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

/* Choice Options Sub-editor */
.field-options-panel {
  margin-top: 0.75rem;
  padding: 0.75rem 0.85rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.field-options-head {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--muted-dark);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.5rem;
}
.field-options-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.field-option-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.field-option-bullet {
  color: var(--muted);
  flex-shrink: 0;
  opacity: 0.7;
  display: inline-flex;
}
.field-option-input {
  flex: 1;
  padding: 0.45rem 0.65rem;
  font-size: 0.88rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  margin: 0;
}
.add-option-btn {
  margin-top: 0.5rem;
  font-size: 0.82rem;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
}
.field-other-toggle {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
  font-size: 0.82rem;
  color: var(--muted-dark);
  cursor: pointer;
  user-select: none;
}
.field-other-toggle input[type="checkbox"] {
  width: auto;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
}
.field-other-toggle:hover {
  color: var(--ink);
}

/* Add Field Toolbar */
.field-add-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--bg-subtle);
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.field-add-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted-dark);
}
.field-add-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}
.add-type-btn {
  gap: 0.4rem;
  font-size: 0.82rem;
  padding: 0.45rem 0.8rem;
}

/* Readonly fields list */
.fields-readonly-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.field-readonly-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  box-shadow: var(--shadow-sm);
}
.field-readonly-label {
  flex: 1;
  font-weight: 500;
  color: var(--ink);
}

/* Share & Channels Section */
.share-box {
  margin-top: 1.15rem;
  padding: 1.35rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow-card);
}
.share-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 600;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  letter-spacing: 0.03em;
}
.share-status-badge.live {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-line);
}
.share-status-badge.draft {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-line);
}
.share-sub-block {
  margin-bottom: 1.35rem;
}
.share-sub-block:last-of-type {
  margin-bottom: 0;
}
.share-sub-head {
  margin-bottom: 0.65rem;
}
.share-sub-head label,
.share-sub-head .share-section-label {
  display: block;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.2rem;
}
.share-sub-head .meta {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.share-sub-block .share-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}
.share-sub-block .share-row input {
  flex: 1 1 14rem;
  font-family: monospace;
  font-size: 0.88rem;
  background: var(--bg-2);
}
.share-sub-block .share-row .btn {
  white-space: nowrap;
  gap: 0.4rem;
}
.share-tagged {
  padding-top: 1.15rem;
  border-top: 1px solid var(--line);
}
.tagged-urls-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin-top: 0.75rem;
}
.tagged-url-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.65rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease;
}
.tagged-url-row:focus-within {
  border-color: var(--accent);
}
.tagged-platform-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 7.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
  flex-shrink: 0;
}
.tagged-platform-badge svg {
  color: var(--muted);
  flex-shrink: 0;
}
.tagged-url-input {
  flex: 1 1 12rem;
  background: transparent !important;
  border: 0 !important;
  padding: 0.25rem 0.4rem !important;
  font-family: monospace;
  font-size: 0.84rem;
  color: var(--muted-dark);
  margin: 0 !important;
  outline: none !important;
  box-shadow: none !important;
}
.tagged-url-input:focus {
  color: var(--ink);
}
.tagged-copy-btn {
  flex-shrink: 0;
  gap: 0.35rem;
  font-size: 0.82rem;
  padding: 0.35rem 0.65rem;
}
@media (max-width: 640px) {
  .tagged-url-row {
    flex-wrap: wrap;
    gap: 0.4rem;
  }
  .tagged-platform-badge {
    min-width: auto;
  }
  .tagged-url-input {
    order: 3;
    width: 100%;
    flex: 1 1 100%;
    background: var(--bg-subtle) !important;
    border: 1px solid var(--line) !important;
    border-radius: var(--radius-sm) !important;
    margin-top: 0.2rem !important;
  }
  .tagged-copy-btn {
    margin-left: auto;
  }
}
#form-source-stats {
  margin-top: 0.85rem;
}
#form-source-stats .source-line {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.88rem;
  padding: 0.28rem 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
}

/* Footer Action Bar */
.form-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 0;
}
.form-footer-left {
  flex: 1 1 16rem;
}
.form-footer-left .msg,
.form-footer-left .meta {
  margin: 0;
}
.btn.small {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.choice-group { margin: 0.25rem 0 0.9rem; }
.choice-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.35rem 0 0.15rem;
}
.choice-chips .pill { min-height: 44px; }
.choice-other { margin-top: 0.45rem; }

.kv { margin: 0.6rem 0 0; }
.kv div {
  display: grid;
  grid-template-columns: minmax(7rem, 30%) 1fr;
  gap: 0.5rem;
  border-bottom: 1px solid var(--line);
  padding: 0.5rem 0;
  font-size: 0.92rem;
}
.kv dt { color: var(--muted); margin: 0; }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }

.lead-layout, .gdpr-layout {
  display: grid;
  gap: 1.4rem;
  container-type: inline-size;
  container-name: lead-layout;
}

/* Lead Navigation & Cockpit */
.lead-nav-bar { margin: 0 0 0.85rem; }
.lead-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}
.lead-back-link:hover {
  color: var(--accent);
  background: var(--bg-subtle);
}

.lead-hero {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-card);
}
.lead-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.lead-avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 2px solid var(--accent-line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.18rem;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}
.lead-hero-info {
  flex: 1;
  min-width: 220px;
}
.lead-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.lead-title-row h1 {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.lead-quick-contacts {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}
.lead-quick-contact {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: var(--muted-dark);
  text-decoration: none;
  padding: 0.2rem 0.55rem;
  background: var(--bg-subtle);
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: all 0.15s ease;
}
.lead-quick-contact:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-subtle);
}
.lead-meta-sub {
  margin: 0.35rem 0 0;
  font-size: 0.84rem;
  color: var(--muted);
}
.lead-hero-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.lead-hero-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  font-size: 0.86rem;
  font-weight: 500;
  border-radius: var(--radius-sm);
}
.lead-hero-actions .btn.lead-btn-wa {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.lead-hero-actions .btn.lead-btn-wa:hover {
  background: #dcfce7;
  border-color: #86efac;
}

.lead-hero-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 1rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.lead-hero-selectors {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.lead-select-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.25rem 0.6rem;
}
.lead-badge-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.lead-select-badge select {
  border: 0;
  background: transparent;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  padding: 0.15rem 0.35rem;
  width: auto;
  cursor: pointer;
}
.lead-select-badge select:focus {
  outline: none;
}
.lead-gloss-text {
  font-size: 0.78rem;
  color: var(--muted);
  border-left: 1px solid var(--line-strong);
  padding-left: 0.45rem;
  white-space: nowrap;
}
.lead-gloss-text:empty {
  display: none;
}

.lead-tags-container {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex: 1;
  justify-content: flex-end;
}
.lead-tags-container .lead-tags {
  margin: 0;
}
.lead-tags-container .tag-add-row {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.lead-tags-container .tag-add-row select,
.lead-tags-container .tag-add-row input {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  height: 28px;
}
.lead-tags-container .tag-add-row select { width: auto; max-width: 120px; }
.lead-tags-container .tag-add-row input { width: 100px; }
.lead-tags-container .tag-add-row .btn.small {
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  height: 28px;
}

/* Lead Panels & Sections */
.panel-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
}
.panel-header-row h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}
.lead-kv dt {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
}
.lead-kv dd {
  font-size: 0.9rem;
  color: var(--ink);
  font-weight: 500;
}
.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
.field-grid label {
  margin-top: 0;
}
.lead-sync-hint {
  background: var(--info-bg);
  border: 1px solid var(--info-line);
  color: #0369a1;
  font-size: 0.82rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-top: 0.75rem;
  line-height: 1.45;
}
.lead-note-box {
  margin-bottom: 1rem;
}
.lead-note-box textarea {
  min-height: 72px;
  resize: vertical;
  font-size: 0.88rem;
  line-height: 1.45;
  border-radius: var(--radius-sm);
}
.note-submit-bar {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.45rem;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Refined Activity Stream */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.timeline-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.65rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  border: 1px solid transparent;
}
.timeline-note {
  background: var(--accent-subtle);
  border-color: var(--accent-line);
}
.timeline-note .timeline-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}
.timeline-note .timeline-title {
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
  white-space: pre-wrap;
}
.timeline-event {
  background: var(--bg-subtle);
  border-color: var(--line);
}
.timeline-event .timeline-icon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  margin-top: 7px;
  margin-left: 7px;
  margin-right: 7px;
  flex-shrink: 0;
}
.timeline-event .timeline-title {
  color: var(--muted-dark);
  font-size: 0.84rem;
  line-height: 1.4;
}
.timeline-content {
  flex: 1;
}
.timeline-content .when {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.2rem;
}

.lead-status-wrap { margin-top: 0.85rem; max-width: 22rem; }
.lead-status-wrap label { margin-top: 0; }
.lead-status-wrap .meta { margin: 0.35rem 0 0; }
.page-head .row-actions { margin-top: 0; }

.inline-confirm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  color: var(--muted);
}

.grant-panel {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}

.shell-public .top { display: none; }
.shell-public #pf-done { color: var(--ok); }

.row-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.2rem; }

.msg { margin-top: 0.9rem; font-size: 0.92rem; color: var(--danger); }
.msg.ok { color: var(--ok); }
.msg.busy { color: var(--muted); }

.meta { color: var(--muted); margin: 0 0 1.2rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
th, td { text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th {
  color: var(--muted-dark);
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.table-wrap { overflow-x: auto; }
.table-stack tbody tr[data-href] { cursor: pointer; }
.table-stack tbody tr[data-href]:hover { background: var(--bg-subtle); }

td .btn { padding: 0.4rem 0.7rem; font-size: 0.82rem; }
td .btn + a, td .btn + .btn { margin-left: 0.35rem; }

.cell-actions { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }

.stack { display: grid; gap: 1.4rem; }

.hidden { display: none !important; }

footer.site {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 1.4rem 1.5rem 2rem;
  padding-bottom: max(2rem, env(safe-area-inset-bottom));
  font-size: 0.85rem;
}

@media (min-width: 769px) {
  .lead-layout, .gdpr-layout { grid-template-columns: 1fr 1fr; align-items: start; }
}

@media (max-width: 768px) {
  /* Topbar Mobile Controls */
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid var(--line-strong, #cbd5e1);
    border-radius: var(--radius-sm, 8px);
    background: var(--bg-2, #ffffff);
    color: var(--ink, #0f172a);
    cursor: pointer;
    box-shadow: var(--shadow-sm, 0 1px 2px rgba(0,0,0,0.05));
    transition: all 0.15s ease;
  }
  .nav-toggle:hover {
    background: var(--bg-subtle, #f1f5f9);
    border-color: var(--muted, #94a3b8);
  }
  .nav-toggle svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
  }

  /* Desktop Nav completely hidden on mobile viewports */
  #nav {
    display: none !important;
  }

  /* Global iOS Safari auto-zoom prevention */
  input, select, textarea {
    font-size: 16px !important;
  }

  .pair { grid-template-columns: 1fr; }
  .cta-row .btn, .row-actions .btn, .shell-guest .btn { width: 100%; min-height: 44px; }
  .btn, .pill, td .btn { min-height: 44px; }

  .share-row { flex-direction: column; }
  .share-row .btn { width: 100%; }

  /* Compact 3-Column Dash KPIs on Mobile */
  .dash.kpi-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 0.45rem !important;
    margin: 0.75rem 0 1.25rem !important;
  }
  .dash.kpi-grid .kpi-card {
    padding: 0.65rem 0.75rem !important;
    gap: 0.15rem !important;
  }
  .dash.kpi-grid .kpi-val {
    font-size: 1.35rem !important;
  }
  .dash.kpi-grid .kpi-label {
    font-size: 0.68rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .dash.kpi-grid .kpi-meta {
    font-size: 0.65rem !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Lead Hero & Quick Actions */
  .lead-hero { padding: 1.1rem 1rem; }
  .lead-hero-main { flex-direction: column; align-items: flex-start; }
  .lead-hero-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    width: 100%;
    gap: 0.5rem;
    margin-top: 0.75rem;
  }
  .lead-hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
  .lead-hero-strip { flex-direction: column; align-items: stretch; gap: 0.85rem; }
  .lead-tags-container { justify-content: flex-start; }
  .lead-tags-container .tag-add-row {
    flex-wrap: wrap;
    gap: 0.45rem;
  }
  .lead-tags-container .tag-add-row select,
  .lead-tags-container .tag-add-row input {
    height: 36px;
    font-size: 16px !important;
  }
  .lead-tags-container .tag-add-row .btn.small {
    height: 36px;
    padding: 0 0.75rem;
  }

  /* Form Builder URL Prefix Stack */
  .url-input-group {
    flex-direction: column;
    align-items: stretch;
  }
  .url-prefix {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding: 0.5rem 0.75rem;
    font-size: 0.78rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .url-input-group input#slug {
    width: 100%;
    padding: 0.65rem 0.75rem;
  }

  /* Landing Simulator Metrics Strip */
  .simulator-metrics-grid {
    grid-template-columns: 1fr;
  }
  .sim-metric-cell {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .sim-metric-cell:last-child {
    border-bottom: none;
  }

  /* Automation diagram mobile direction */
  .auto-guide-arrow {
    transform: rotate(90deg);
    margin: 0.35rem 0;
  }

  .field-grid { grid-template-columns: 1fr; }

  /* Mobile Responsive Table Stack Cards */
  .table-stack thead { display: none; }
  .table-stack tbody tr {
    display: block;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    margin-bottom: 0.85rem;
    box-shadow: var(--shadow-sm);
  }
  .table-stack tbody td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    border: 0;
    padding: 0.45rem 0;
    width: 100% !important;
    box-sizing: border-box;
  }
  .table-stack tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex: 0 0 auto;
  }
  .table-stack tbody td:last-child,
  .table-stack tbody td.td-actions,
  .table-stack tbody td.th-actions {
    display: flex;
    width: 100% !important;
    justify-content: stretch;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid var(--line-subtle, #f1f5f9);
  }
  .table-stack tbody td:last-child::before,
  .table-stack tbody td.td-actions::before {
    display: none;
  }
  .table-stack tbody td.td-actions .btn,
  .table-stack tbody td.td-actions .row-edit-btn,
  .table-stack tbody td:last-child .btn {
    width: 100%;
    min-height: 42px;
    justify-content: center;
    box-sizing: border-box;
  }

  .kv div { grid-template-columns: 1fr; }
  .leads-toolbar { flex-direction: column; align-items: stretch; }
  .leads-toolbar-right { flex-direction: column; align-items: stretch; width: 100%; }
  .tag-filter-wrap, .tag-filter-select { width: 100%; }
  .leads-search-wrap { max-width: 100%; min-width: 100%; }
  .table-stack tbody td .lead-user-cell { justify-content: flex-end; text-align: right; }
}

/* ==========================================================================
   Smart Mobile Navigation Drawer Styles
   ========================================================================== */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  justify-content: flex-end;
  pointer-events: none;
  visibility: hidden;
  transition: visibility 0.25s ease;
}

.mobile-drawer.is-open {
  pointer-events: auto;
  visibility: visible;
}

.mobile-drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.mobile-drawer.is-open .mobile-drawer-backdrop {
  opacity: 1;
}

.mobile-drawer-sheet {
  position: relative;
  width: 86vw;
  max-width: 360px;
  height: 100%;
  background: var(--bg-2, #ffffff);
  border-left: 1px solid var(--line, #e2e8f0);
  box-shadow: -8px 0 32px rgba(15, 23, 42, 0.18);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
  z-index: 1;
}

.mobile-drawer.is-open .mobile-drawer-sheet {
  transform: translateX(0);
}

.mobile-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.15rem;
  border-bottom: 1px solid var(--line, #e2e8f0);
  background: var(--bg-subtle, #f8fafc);
}

.mobile-drawer-user {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.mobile-drawer-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent, #0f766e);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.mobile-drawer-user-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.mobile-drawer-username {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-drawer-role {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
  text-transform: capitalize;
}

.mobile-drawer-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
  border: 1px solid var(--line-strong, #cbd5e1);
  background: var(--bg-2, #ffffff);
  color: var(--ink, #0f172a);
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-drawer-close:hover {
  background: var(--bg-subtle, #f1f5f9);
}

.mobile-drawer-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.mobile-drawer-section {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.mobile-drawer-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted, #64748b);
  padding: 0 0.5rem 0.35rem;
}

.mobile-drawer-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm, 8px);
  color: var(--ink, #0f172a);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  min-height: 44px;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.mobile-drawer-link:hover {
  background: var(--bg-subtle, #f8fafc);
  text-decoration: none;
}

.mobile-drawer-link.is-active {
  background: var(--accent-subtle, #f0fdfa);
  color: var(--accent, #0f766e);
  font-weight: 600;
  border: 1px solid var(--accent-line, #ccfbf1);
}

.mobile-drawer-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: #f1f5f9;
  color: var(--muted-dark, #475569);
  flex-shrink: 0;
}

.mobile-drawer-link.is-active .mobile-drawer-icon {
  background: var(--accent, #0f766e);
  color: #ffffff;
}

.mobile-drawer-link-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.mobile-drawer-link-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-drawer-link-hint {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-drawer-footer {
  padding: 0.85rem 1rem;
  padding-bottom: max(1rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line, #e2e8f0);
  background: var(--bg-subtle, #f8fafc);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-drawer-ai-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 42px;
  padding: 0.6rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid var(--accent-line, #ccfbf1);
  background: var(--accent-subtle, #f0fdfa);
  color: var(--accent, #0f766e);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-drawer-ai-btn:hover {
  background: #ccfbf1;
}

.mobile-drawer-logout {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  min-height: 42px;
  padding: 0.6rem;
  border-radius: var(--radius-sm, 8px);
  border: 1px solid #fee2e2;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.mobile-drawer-logout:hover {
  background: #fee2e2;
}

.lp-block {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 1.15rem 1rem;
  margin-bottom: 0.65rem;
  background: var(--bg-2, #ffffff);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.lp-block:hover {
  border-color: rgba(15, 23, 42, 0.18);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}
.lp-block.dragging {
  opacity: 0.45;
  border: 1px dashed var(--accent);
}
.lp-block.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-line), var(--shadow-card);
  transform: translateY(2px);
}
.lp-block-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line, #f1f5f9);
}
.lp-block-head-left {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.lp-drag-handle {
  cursor: grab;
  color: var(--muted, #94a3b8);
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.15rem 0.25rem;
  user-select: none;
  border-radius: 4px;
  transition: color 0.12s ease, background 0.12s ease;
}
.lp-drag-handle:hover {
  color: var(--ink, #0f172a);
  background: var(--bg-subtle, #f8fafc);
}
.lp-drag-handle:active {
  cursor: grabbing;
}
.lp-block-type-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--muted, #64748b);
  flex-shrink: 0;
}
.lp-block-type-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  letter-spacing: -0.01em;
}
.lp-block-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.65;
  transition: opacity 0.15s ease;
}
.lp-block:hover .lp-block-actions,
.lp-block:focus-within .lp-block-actions {
  opacity: 1;
}
.lp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted, #64748b);
  cursor: pointer;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.lp-action-btn:hover:not(:disabled) {
  background: var(--bg-subtle, #f1f5f9);
  color: var(--ink, #0f172a);
  border-color: var(--line, #e2e8f0);
}
.lp-action-btn.danger:hover:not(:disabled) {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.lp-action-btn:disabled {
  opacity: 0.25;
  cursor: not-allowed;
}
.lp-action-btn.lp-block-ai-fill {
  width: auto;
  gap: 0.2rem;
  padding: 0 0.35rem;
  color: var(--accent, #0f766e);
  background: var(--accent-soft, #f0fdfa);
  border-color: var(--accent-line, #99f6e4);
  font-size: 0.7rem;
  font-weight: 700;
}
.lp-block-ai-review {
  display: grid;
  gap: 0.7rem;
  margin-top: 0.8rem;
  padding: 0.85rem;
  border: 1px solid #b9e8df;
  border-left: 3px solid var(--accent, #0f766e);
  border-radius: 9px;
  background: linear-gradient(120deg, #f0fbf8 0%, #f8fcfb 100%);
  color: var(--ink, #0f172a);
  font-size: 0.84rem;
}
.lp-block-ai-review-head { display: grid; gap: 0.25rem; }
.lp-block-ai-review-title { display: flex; align-items: center; gap: 0.45rem; }
.lp-block-ai-review-title svg { color: var(--accent, #0f766e); }
.lp-block-ai-review-title strong { font-size: 0.9rem; }
.lp-block-ai-review-scope,
.lp-block-ai-review-status,
.lp-block-ai-review-error { margin: 0; }
.lp-block-ai-review-scope { color: var(--muted, #64748b); font-size: 0.78rem; }
.lp-block-ai-review-error { color: #9f3127; }
.lp-block-ai-candidate {
  display: grid;
  gap: 0;
  padding: 0.2rem 0.7rem;
  border: 1px solid #e5eeeb;
  border-radius: 7px;
  background: #fff;
}
.lp-block-ai-candidate-row {
  display: grid;
  grid-template-columns: minmax(105px, 0.24fr) minmax(0, 1fr);
  gap: 0.8rem;
  padding: 0.48rem 0;
  border-bottom: 1px solid #edf2f0;
  overflow-wrap: anywhere;
}
.lp-block-ai-candidate-row:last-child { border-bottom: 0; }
.lp-block-ai-candidate-row > span {
  color: var(--muted, #64748b);
  font-size: 0.75rem;
  font-weight: 600;
}
.lp-block-ai-review-actions { display: flex; align-items: center; gap: 0.5rem; }
.lp-block-ai-review-actions .btn { width: auto; min-height: 36px; }
.lp-block-ai-review-actions .lp-block-ai-accept { box-shadow: 0 2px 5px rgba(15, 118, 110, 0.16); }
@media (max-width: 560px) {
  .lp-block-ai-review { padding: 0.7rem; }
  .lp-block-ai-candidate-row { grid-template-columns: minmax(82px, 0.32fr) minmax(0, 1fr); gap: 0.5rem; }
  .lp-block-ai-review-actions .btn { min-height: 40px; }
}

.lp-block input[type="text"],
.lp-block select,
.lp-block textarea {
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  background: var(--bg-2, #ffffff);
  padding: 0.55rem 0.75rem;
  font-size: 0.92rem;
  color: var(--ink, #0f172a);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lp-block input[type="text"]:focus,
.lp-block select:focus,
.lp-block textarea:focus {
  border-color: var(--accent, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
  outline: none;
}
.lp-block textarea { min-height: 4.8rem; width: 100%; line-height: 1.5; }
.lp-block input[type="file"] { width: 100%; margin: 0.35rem 0 0.25rem; }
.lp-img-preview { margin: 0 0 0.5rem; }
.lp-img-preview img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  max-height: 14rem;
  object-fit: cover;
}
.lp-block-highlight {
  border-left: 3px solid var(--warning);
  background: var(--warning-bg);
}
.lp-block-faq {
  border-left: 3px solid var(--info);
  background: var(--info-bg);
}
.lp-faq-editor {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 0.35rem;
}
.lp-faq-item-card {
  padding: 0.6rem 0.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.lp-faq-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.lp-add-faq-btn {
  align-self: flex-start;
  margin-top: 0.2rem;
}

/* Inline Inserter */
.lp-inserter {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0.15rem 0;
  height: 22px;
  z-index: 1;
}
.lp-inserter.is-open {
  z-index: 1100;
}
.lp-inserter::before {
  content: "";
  position: absolute;
  left: 0.5rem;
  right: 0.5rem;
  top: 50%;
  height: 1px;
  background: var(--line);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}
.lp-inserter:hover::before,
.lp-inserter:focus-within::before,
.lp-inserter.is-open::before {
  opacity: 0.75;
}
.lp-insert-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  font-size: 0.75rem;
  font-weight: 500;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--muted);
  cursor: pointer;
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.15s ease, transform 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.lp-inserter:hover .lp-insert-btn,
.lp-inserter:focus-within .lp-insert-btn,
.lp-inserter.is-open .lp-insert-btn {
  opacity: 1;
  transform: scale(1);
  border-color: var(--accent);
  color: var(--accent);
  background: var(--bg-2);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
}
.lp-insert-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.1);
  padding: 0.45rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(10.5rem, 1fr));
  gap: 0.35rem;
  z-index: 1200;
  width: max-content;
  max-width: 26rem;
}
.lp-insert-option {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.35rem 0.55rem;
  border: 0;
  border-radius: calc(var(--radius-sm) - 2px);
  background: transparent;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s ease, color 0.1s ease;
}
.lp-insert-option:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--accent);
}
.lp-insert-option:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
.lp-insert-option .lp-type-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  flex-shrink: 0;
}

/* Stats and Unsaved Changes */
.page-word-count {
  margin: 0;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}
@media (max-width: 640px) {
  .page-word-count { display: none; }
}
.btn-dirty {
  position: relative;
  box-shadow: 0 0 0 2px var(--warning);
}
.btn-dirty::after {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--warning);
  margin-left: 0.45rem;
  vertical-align: middle;
}

.page-editor-main { width: min(74rem, calc(100% - 2rem)); }

/* Sticky Top Command Bar */
.page-command-bar {
  position: sticky;
  top: 3.8rem;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  padding: 0.5rem 0.95rem;
  margin: 0 0 1.25rem 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
  box-sizing: border-box;
}
.command-bar-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 auto;
  min-width: 0;
}
.command-bar-back {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  flex-shrink: 0;
}
.command-bar-back:hover {
  color: var(--ink);
  text-decoration: none;
}
.command-bar-sep {
  color: var(--line-strong);
  font-size: 0.82rem;
  flex-shrink: 0;
}
.command-bar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 320px;
}
.command-bar-center {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex: 0 0 auto;
  justify-content: center;
}
.lp-save-status {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 9999px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.lp-save-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lp-save-status.saved {
  background: var(--ok-bg);
  color: var(--ok);
  border: 1px solid var(--ok-line);
}
.lp-save-status.saved .status-dot {
  background: var(--ok);
}
.lp-save-status.dirty {
  background: var(--warning-bg);
  color: var(--warning);
  border: 1px solid var(--warning-line);
}
.lp-save-status.dirty .status-dot {
  background: var(--warning);
  animation: lpPulseDot 1.5s infinite;
}
@keyframes lpPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.8); }
}
.command-bar-right {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}
.command-bar-right .btn {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

/* Collapsible Settings Card */
.collapsible-card {
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
  padding: 0.2rem 0;
}
.collapsible-header:hover .collapsible-title {
  color: var(--accent);
}
.collapsible-header-info {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.collapsible-header-icon {
  font-size: 1.3rem;
  line-height: 1;
}
.collapsible-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  transition: color 0.15s ease;
}
.collapsible-meta {
  margin: 0.15rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.collapsible-arrow {
  font-size: 0.8rem;
  color: var(--muted);
  transition: transform 0.2s ease;
  padding: 0.25rem 0.5rem;
}
.collapsible-card.open .collapsible-arrow {
  transform: rotate(180deg);
}
.collapsible-content {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.collapsible-content.hidden {
  display: none !important;
}

/* Canvas Card */
.canvas-card {
  border: 1px solid var(--line, #e2e8f0);
}
.block-canvas-hint {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 500;
}

/* Responsive Progressive Disclosure for Page Command Bar */
@media (max-width: 1440px) {
  .page-word-count {
    display: none !important;
  }
  .command-bar-title {
    max-width: 150px;
  }
}

@media (max-width: 1200px) {
  .page-command-bar {
    gap: 0.45rem;
    padding: 0.45rem 0.7rem;
  }
  .command-bar-left {
    min-width: 100px;
  }
  .command-bar-title {
    max-width: 120px;
  }
  .lp-save-status .status-label {
    display: none;
  }
  .lp-save-status {
    padding: 0.3rem;
  }
  .command-bar-right #btn-ai-page-helper span,
  .command-bar-right #lp-templates-btn span,
  .command-bar-right #lp-settings-toggle-btn span,
  .command-bar-right #lp-share-btn-top span {
    display: none;
  }
  .command-bar-right #btn-ai-page-helper,
  .command-bar-right #lp-templates-btn,
  .command-bar-right #lp-settings-toggle-btn,
  .command-bar-right #lp-share-btn-top {
    padding: 0.38rem 0.55rem;
    min-width: 34px;
    justify-content: center;
  }
}

@media (max-width: 860px) {
  .page-command-bar {
    position: sticky;
    top: 3.5rem;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem 0.5rem;
    padding: 0.45rem 0.65rem;
    margin-bottom: 0.85rem;
    border-radius: var(--radius-sm);
  }
  .command-bar-left {
    order: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 190px);
  }
  .command-bar-title {
    font-size: 0.88rem;
    max-width: 170px;
  }
  .command-bar-right {
    order: 2;
    margin-left: auto;
    gap: 0.25rem;
  }
  .command-bar-right .btn.ghost span,
  .command-bar-right .ai-inline-trigger span {
    display: none;
  }
  .command-bar-right #lp-templates-btn,
  .command-bar-right #lp-settings-toggle-btn,
  .command-bar-right #lp-share-btn-top,
  .command-bar-right .ai-inline-trigger {
    padding: 0.4rem;
    min-width: 36px;
    min-height: 36px;
    justify-content: center;
  }
  .command-bar-right #lp-submit-top,
  .command-bar-right #lp-publish-btn-top {
    padding: 0.38rem 0.75rem;
    font-size: 0.82rem;
    min-height: 36px;
  }
  .command-bar-center {
    order: 3;
    width: 100%;
    justify-content: space-between;
    padding-top: 0.35rem;
    margin-top: 0.15rem;
    border-top: 1px dashed var(--line);
    gap: 0.4rem;
  }
  .view-mode-tabs {
    padding: 1px;
  }
  .view-mode-tab {
    padding: 0.22rem 0.5rem;
    font-size: 0.76rem;
  }
  .preview-device-toggle {
    gap: 2px;
  }
  .device-toggle-btn {
    padding: 0.22rem 0.45rem;
    font-size: 0.76rem;
  }
}

@media (max-width: 520px) {
  .command-bar-back .back-text {
    display: none;
  }
  .command-bar-title {
    max-width: 110px;
    font-size: 0.82rem;
  }
  .view-mode-tab span,
  .device-toggle-btn span {
    display: none;
  }
  .view-mode-tab,
  .device-toggle-btn {
    padding: 0.25rem 0.45rem;
    min-height: 32px;
  }
}

.view-mode-tabs {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  gap: 2px;
}
.view-mode-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.25rem 0.65rem;
  border-radius: calc(var(--radius-sm) - 3px);
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.view-mode-tab:hover {
  color: var(--ink);
}
.view-mode-tab.active {
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.page-editor-layout {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  transition: max-width 0.25s ease;
}
.page-editor-layout.is-previewing {
  max-width: 1200px;
}
.page-editor-layout.is-previewing.is-previewing-mobile {
  max-width: 900px;
}
.page-editor-fields,
.page-editor-preview-view {
  width: 100%;
}
.preview-device-toggle {
  display: inline-flex;
  background: var(--bg-subtle);
  padding: 2px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  gap: 2px;
}
.device-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-radius: calc(var(--radius-sm) - 3px);
  cursor: pointer;
  transition: all 0.15s ease;
}
.device-toggle-btn:hover {
  color: var(--ink);
}
.device-toggle-btn.active {
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.offer-preview-page {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  background: var(--bg-2);
  box-shadow: var(--shadow-card);
  max-width: 820px;
  margin: 0 auto;
  transition: max-width 0.2s ease, border-radius 0.2s ease, box-shadow 0.2s ease;
}
.offer-preview-page.is-mobile {
  max-width: 385px;
  margin: 0 auto;
  border: 3px solid var(--line-strong);
  border-radius: 36px;
  padding: 2rem 1.25rem;
  box-shadow: 0 16px 36px -8px rgba(15, 23, 42, 0.2);
}
.offer-preview-page.is-mobile .offer-heading {
  font-size: 1.6rem;
}

#lp-preview-form-fields {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}
#lp-preview-form-fields label {
  font-size: 0.82rem;
  margin-top: 0.25rem;
}
#lp-preview-form-fields input,
#lp-preview-form-fields textarea {
  background: var(--bg-subtle);
  opacity: 0.9;
  cursor: default;
}
#lp-preview-form-fields .choice-chips .pill {
  opacity: 0.9;
  cursor: default;
}
#lp-preview-form-fields .offer-submit {
  width: 100%;
  margin-top: 0.5rem;
  opacity: 0.9;
  cursor: default;
}

/* Theme Color Swatches */
.color-picker-wrap {
  margin-top: 1rem;
}
.color-swatches {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.4rem;
}
.color-swatch-btn {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  padding: 0;
}
.color-swatch-btn[data-color="#0f766e"] { background-color: #0f766e !important; }
.color-swatch-btn[data-color="#2563eb"] { background-color: #2563eb !important; }
.color-swatch-btn[data-color="#16a34a"] { background-color: #16a34a !important; }
.color-swatch-btn[data-color="#9a3412"] { background-color: #9a3412 !important; }
.color-swatch-btn[data-color="#d97706"] { background-color: #d97706 !important; }
.color-swatch-btn[data-color="#dc2626"] { background-color: #dc2626 !important; }
.color-swatch-btn[data-color="#334155"] { background-color: #334155 !important; }
.color-swatch-btn:hover {
  transform: scale(1.15);
}
.color-swatch-btn.active {
  box-shadow: 0 0 0 2.5px var(--ink);
  transform: scale(1.1);
}
.custom-color-input-wrap {
  position: relative;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid #ffffff;
  box-shadow: 0 0 0 1px var(--line-strong);
  cursor: pointer;
}
.custom-color-input-wrap input[type="color"] {
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  border: 0;
  padding: 0;
  cursor: pointer;
}

/* Video Block */
.lp-video-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.offer-video-figure {
  margin: 1.25rem 0;
}
.offer-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #0f172a;
  box-shadow: var(--shadow-card);
}
.offer-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.offer-video-figure figcaption {
  font-size: 0.84rem;
  color: var(--muted);
  margin-top: 0.45rem;
  text-align: center;
}
.lp-video-url-hint {
  font-size: 0.78rem;
  margin-top: 0.35rem;
  line-height: 1.4;
}
.lp-video-url-hint.text-muted {
  color: var(--muted);
}
.lp-video-url-hint.text-success {
  color: #16a34a;
  font-weight: 500;
}
.lp-video-url-hint.text-warning {
  color: #d97706;
}
.offer-video-empty {
  margin: 1.25rem 0;
  padding: 2rem 1.5rem;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle, rgba(241, 245, 249, 0.6));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.45rem;
}
.offer-video-empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--surface, #ffffff);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.offer-video-empty-text {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
}
.offer-video-empty-sub {
  font-size: 0.82rem;
  color: var(--muted);
  max-width: 22rem;
  line-height: 1.4;
}
.offer-video-empty-caption {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  margin-top: 0.25rem;
}

/* Button / CTA Block */
.lp-button-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 10rem;
  gap: 0.75rem;
  align-items: end;
}
@media (max-width: 640px) {
  .lp-button-editor-grid {
    grid-template-columns: 1fr;
  }
}
.lp-button-editor-grid label {
  display: block;
  margin-bottom: 0.25rem;
}
.offer-button-wrap {
  margin: 1.25rem 0;
  display: flex;
}
.offer-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: var(--shadow-sm);
}
.offer-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}
.offer-btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
}
.offer-btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-ink);
}
.offer-btn-secondary {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.offer-btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--muted);
  color: var(--ink);
}
.offer-btn-whatsapp {
  background: #25d366;
  color: #ffffff;
  border: 1px solid #20ba5a;
}
.offer-btn-whatsapp:hover {
  background: #20ba5a;
  color: #ffffff;
}
.offer-btn-icon {
  font-size: 1.1rem;
  line-height: 1;
}

/* Pricing Block */
.lp-pricing-editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}
.lp-pricing-col-title,
.lp-pricing-col-features {
  grid-column: span 2;
}
@media (max-width: 640px) {
  .lp-pricing-editor-grid {
    grid-template-columns: 1fr;
  }
  .lp-pricing-col-title,
  .lp-pricing-col-features {
    grid-column: span 1;
  }
}
.lp-pricing-editor-grid label {
  display: block;
  margin-bottom: 0.25rem;
}
.offer-pricing-card {
  position: relative;
  margin-block: 1.75rem;
  margin-inline: auto;
  width: min(100%, 44rem);
  padding: 1.5rem;
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border, var(--line));
  border-radius: var(--radius, 12px);
  box-shadow: var(--shadow-card, 0 4px 16px rgba(0, 0, 0, 0.05));
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.offer-pricing-badge {
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.25rem 0.65rem;
  border-radius: 9999px;
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
}
.offer-pricing-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.offer-pricing-row {
  display: flex;
  align-items: baseline;
  gap: 0.45rem;
  margin: 0.15rem 0;
}
.offer-pricing-price {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1;
}
.offer-pricing-period {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 500;
}
.offer-pricing-features {
  list-style: none;
  margin: 0.35rem 0 0.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.offer-pricing-feature-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--ink);
  line-height: 1.4;
}
.offer-pricing-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background: var(--accent-subtle, rgba(15, 118, 110, 0.12));
  color: var(--accent, #0f766e);
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 0.1rem;
}
.offer-pricing-cta {
  width: 100%;
  text-align: center;
  justify-content: center;
  margin-top: 0.5rem;
}

/* Block Outline Navigator */
.lp-outline-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.4rem 0.55rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  margin-bottom: 0.85rem;
}
.lp-outline-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.5rem;
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--ink, #0f172a);
  cursor: pointer;
  transition: all 0.12s ease;
  line-height: 1.3;
}
.lp-outline-pill:hover {
  border-color: var(--accent, #0f766e);
  background: var(--accent-subtle, rgba(15, 118, 110, 0.05));
  color: var(--accent, #0f766e);
}
.lp-outline-num {
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--muted, #94a3b8);
}
.lp-outline-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted, #64748b);
  flex-shrink: 0;
}
.lp-outline-text {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lp-block-target-flash {
  animation: lpFlashGlow 1.8s ease-out;
}
@keyframes lpFlashGlow {
  0% {
    box-shadow: 0 0 0 3px var(--accent);
    transform: scale(1.008);
  }
  50% {
    box-shadow: 0 0 0 2px var(--accent);
  }
  100% {
    box-shadow: none;
    transform: scale(1);
  }
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(15, 29, 28, 0.44);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.modal-card {
  position: relative;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-dropdown);
  padding: 1.5rem;
}
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.modal-head h2 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--ink);
}
.modal-close-btn {
  font-size: 1.1rem;
  line-height: 1;
  padding: 0.25rem 0.55rem;
  cursor: pointer;
}
.modal-desc {
  margin: 0 0 1rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Templates Modal */
.lp-templates-card {
  max-width: 680px;
  width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
}
.template-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-top: 1rem;
}
.template-card {
  display: flex;
  flex-direction: column;
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  gap: 0.6rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.template-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.template-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.4rem;
}
.template-card-head h3 {
  font-size: 0.95rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.template-badge {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  background: var(--accent-subtle, rgba(15, 118, 110, 0.12));
  color: var(--accent, #0f766e);
  white-space: nowrap;
}
.template-blocks-count {
  font-size: 0.76rem;
  color: var(--muted);
  margin-top: auto;
  padding-top: 0.25rem;
}

.offer-pitch { margin: 0; }
.offer-heading {
  font-size: clamp(1.7rem, 4vw, 2.35rem);
  line-height: 1.18;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
  font-weight: 700;
  color: var(--ink);
}
.offer-hero-jump {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.offer-hero-jump:hover {
  background: var(--bg-subtle);
  transform: translateY(1px);
}
.offer-kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 1.6rem 0 0.45rem;
}
.offer-copy {
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--ink);
  margin: 0 0 0.85rem;
}
.offer-quote {
  margin: 0 0 1.1rem;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--accent);
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg-subtle);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.offer-list {
  margin: 0 0 1.1rem;
  padding-left: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
}
.offer-list li { margin: 0 0 0.35rem; }
.offer-list-card {
  max-width: 56rem;
  margin: 1.5rem auto;
  padding: 1.5rem 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.offer-list-card .offer-list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.offer-list-card .offer-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-bottom: 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
}
.offer-list-card .offer-list li:last-child {
  margin-bottom: 0;
}
.offer-list-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  flex-shrink: 0;
  margin-top: 0.1rem;
}
@media (min-width: 640px) {
  .offer-list.cols-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem 1.5rem;
  }
  .offer-list.cols-2 li {
    margin-bottom: 0;
  }
}
.offer-rule {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 1.4rem 0;
}
.offer-figure {
  margin: 0 0 1.25rem;
}
.offer-figure img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}
.offer-figure figcaption {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.4;
}
.offer-highlight {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.85rem 1.15rem;
  margin: 1.25rem 0;
  background: var(--warning-bg);
  border: 1px solid var(--warning-line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.45;
}
.offer-highlight-icon {
  color: var(--warning);
  font-size: 1.25rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

.offer-faq {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.offer-faq-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  padding: 0.85rem 1.1rem;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.offer-faq-item[open] {
  border-color: var(--line-strong);
  background: var(--bg-subtle);
}
.offer-faq-q {
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  user-select: none;
}
.offer-faq-q::-webkit-details-marker {
  display: none;
}
.offer-faq-q::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s ease;
  line-height: 1;
}
.offer-faq-item[open] .offer-faq-q::after {
  content: "−";
  color: var(--accent);
}
.offer-faq-a {
  margin-top: 0.65rem;
  font-size: 0.96rem;
  line-height: 1.6;
  color: var(--muted-dark);
  border-top: 1px dashed var(--line);
  padding-top: 0.65rem;
}
.offer-apply {
  margin-top: 1.75rem;
  padding: 1.2rem 1.1rem 1.3rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-2);
  box-shadow: var(--shadow-card);
}
.offer-cta {
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
  text-transform: none;
  color: var(--ink);
}
.offer-apply-slot {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0;
  padding: 1.1rem 0.2rem 0.35rem;
  border-top: 1px dashed var(--line);
}
.offer-thanks {
  padding: clamp(1.75rem, 3.5vw, 2.5rem);
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line);
  border-radius: var(--page-card-radius, 12px);
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-block: 1rem;
}
.offer-thanks-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--ok-bg, #f0fdf4);
  color: var(--ok, #16a34a);
  border: 1px solid var(--ok-line, #bbf7d0);
  margin-bottom: 0.85rem;
}
.offer-thanks-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.offer-thanks-msg {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0;
}
.offer-legal-title {
  font-size: 0.92rem;
  margin: 1.15rem 0 0;
  color: var(--ink);
}

.choice-chips .pill.on,
.choice-chips .pill.active {
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
  border-color: var(--accent);
}

.shell-public.public-page,
.shell-public.public-site {
  background-color: var(--bg);
}

.shell-public.public-page main.offer-page,
.shell-public.public-site main.offer-page {
  width: min(68rem, calc(100% - clamp(1.5rem, 4vw, 3rem)));
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 0 max(3.5rem, env(safe-area-inset-bottom));
}
.public-page .offer-side,
.public-site .offer-side {
  margin-block: 2rem;
  margin-inline: auto;
  width: min(100%, 42rem);
}
.public-page .offer-apply,
.public-site .offer-apply {
  margin-top: 0;
  padding: 1.5rem 1.25rem 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
}
.public-page .offer-apply .gdpr-box-tall,
.public-site .offer-apply .gdpr-box-tall { max-height: 9rem; }
.gdpr-compact .gdpr-body {
  max-height: 5.5rem;
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}
.gdpr-toggle {
  display: inline-flex;
  align-items: center;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}
.gdpr-toggle:hover {
  text-decoration: underline;
}
:is(.public-page, .public-site, .offer-page) .consent {
  font-size: 0.92rem;
  line-height: 1.45;
  margin-top: 0.85rem;
}
:is(.public-page, .public-site, .offer-page) .consent input {
  min-width: 1.25rem;
  min-height: 1.25rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}
:is(.public-page, .public-site, .offer-apply) input:not([type="checkbox"]):not([type="hidden"]),
:is(.public-page, .public-site, .offer-apply) textarea,
:is(.public-page, .public-site, .offer-apply) select {
  font-size: 16px;
  min-height: 2.75rem;
}
:is(.public-page, .public-site, .offer-apply) textarea { min-height: 5.5rem; }
:is(.public-page, .public-site, .offer-apply) .choice-chips .pill { min-height: 2.75rem; }
:is(.public-page, .public-site, .offer-page) .offer-submit {
  width: 100%;
  min-height: 3rem;
  margin-top: 0.25rem;
}
:is(.public-page, .public-site) .site {
  margin-top: 2rem;
  padding: 1.5rem 0;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}
.public-site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  width: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: 0.8rem max(1rem, calc((100% - 68rem) / 2 + 1rem));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: var(--bg, #ffffff);
  background: color-mix(in srgb, var(--bg, #ffffff) 88%, transparent);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
  transition: padding-block 0.2s ease, box-shadow 0.2s ease;
}

@supports (animation-timeline: scroll()) {
  @media (prefers-reduced-motion: no-preference) {
    @keyframes masthead-compress {
      to {
        padding-block: 0.55rem;
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
      }
    }
    .public-site-header {
      animation: masthead-compress linear both;
      animation-timeline: scroll();
      animation-range: 0px 80px;
    }
  }
}

@media (prefers-reduced-motion: no-preference) {
  :is(.offer-btn, .offer-submit, .public-header-cta, .choice-chips .pill):active {
    transform: scale(0.982);
    transition: transform 0.1s var(--ease-spring);
  }
}
.public-header-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--ink);
  white-space: nowrap;
}
.public-header-monogram {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.public-header-title {
  font-weight: 700;
  color: var(--ink);
}
.public-header-nav {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  flex-wrap: wrap;
}
.public-header-nav a {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0.25rem 0.2rem;
  transition: color 0.15s ease;
}
.public-header-nav a:hover {
  color: var(--ink);
  background: transparent;
  text-decoration: none;
}
.public-header-nav a.active {
  color: var(--ink);
  font-weight: 650;
  background: transparent;
  text-decoration: none;
}
.public-header-nav a.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}
.public-header-spacer {
  flex: 1;
}
.public-header-cta {
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  white-space: nowrap;
}
.offer-preview-site-header {
  width: min(68rem, calc(100% - clamp(1.5rem, 4vw, 3rem)));
  margin: 0.75rem auto 1.5rem;
  padding: 0.5rem 0.75rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}
.offer-preview-site-header .preview-site-brand {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
}
.offer-preview-site-header .preview-site-nav {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.offer-preview-site-header .preview-site-nav span.active {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-sm, 6px);
  background: var(--accent-subtle);
}
.site-choice-other { margin-top: 0.5rem; }
.site-host-card { margin: 0.75rem 0; padding: 1rem; }
.site-host-card h3 { margin: 0 0 0.2rem; }
.site-host-card > a { word-break: break-all; }
.site-host-summary { padding: 0.65rem 0; border-top: 1px solid var(--line); }
.site-host-dns {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.45rem;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.82rem;
}

@media (min-width: 640px) {
  .shell-public.public-page main.offer-page,
  .shell-public.public-site main.offer-page {
    width: min(68rem, calc(100% - clamp(1.5rem, 4vw, 3rem)));
    padding-top: 2.5rem;
  }
  .public-page .offer-side,
  .public-site .offer-side {
    margin-block: 2.75rem;
    margin-inline: auto;
    width: min(100%, 42rem);
  }
  .public-page .offer-apply,
  .public-site .offer-apply {
    padding: 2.25rem 2.25rem 2.5rem;
  }
  .public-page .offer-apply .gdpr-box-tall,
  .public-site .offer-apply .gdpr-box-tall { max-height: 12rem; }
}
@media (min-width: 1024px) {
  .shell-public.public-page main.offer-page,
  .shell-public.public-site main.offer-page {
    width: min(68rem, calc(100% - clamp(1.5rem, 4vw, 3rem)));
    padding-top: 3.5rem;
  }
}

.offer-heading,
.offer-kicker,
.offer-copy,
.offer-list,
.offer-quote,
.offer-faq,
.offer-highlight,
.offer-pricing-card,
.offer-figure,
.offer-side,
.offer-apply {
  max-width: 56rem;
  margin-inline: auto;
}

.public-form h1 { margin-bottom: 0.4rem; }
.public-form #pp-blocks h2 { font-size: 1.05rem; margin: 0.8rem 0 0.35rem; }

.lead-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0.5rem 0 0.75rem; }
.lead-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
  background: var(--bg-subtle);
  color: var(--ink);
}
.lead-tag button {
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.lead-tag button:hover {
  color: var(--danger);
}
.tag-add-row { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }

.inbox-layout {
  display: grid;
  grid-template-columns: minmax(12rem, 26%) minmax(0, 1fr) minmax(12rem, 28%);
  min-height: calc(100vh - 5.5rem);
  border-top: 1px solid var(--line);
  margin: 0 -1.25rem;
  background: var(--bg-2);
}
.inbox-pane {
  border-right: 1px solid var(--line);
  overflow: auto;
  min-height: 20rem;
  background: var(--bg-2);
}
.inbox-pane:last-child { border-right: 0; }
.inbox-list-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: inherit;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: background 0.15s ease;
}
.inbox-list-item.on { background: var(--bg-subtle); }
.inbox-list-item:hover:not(.on) { background: #f8fafc; }
.inbox-list-item .meta { display: block; margin-top: 0.2rem; }
.inbox-thread {
  display: flex;
  flex-direction: column;
  min-height: 20rem;
  background: var(--bg);
}
.inbox-msgs { flex: 1; overflow: auto; padding: 1rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bubble {
  max-width: 85%;
  padding: 0.55rem 0.75rem;
  border-radius: 0.75rem;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
}
.bubble.out {
  align-self: flex-end;
  background: var(--accent-subtle);
  border-color: var(--accent-line);
  color: var(--ink);
}
.bubble.in {
  align-self: flex-start;
  background: #ffffff;
  border-color: var(--line);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}
.bubble.failed {
  opacity: 0.85;
  border-color: var(--danger-line);
  background: var(--danger-bg);
}
.inbox-compose {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid var(--line);
  background: var(--bg-2);
}
.inbox-compose-row {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.inbox-compose-row textarea { flex: 1; min-height: 3rem; }
.inbox-side { padding: 1rem; background: var(--bg-2); }
.inbox-unread { font-weight: 700; color: var(--ink); }
.badge-channel {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-sm, 4px);
  margin-right: 0.35rem;
  vertical-align: middle;
}
.badge-channel.email { background: #e0f2fe; color: #0284c7; }
.badge-channel.whatsapp { background: #dcfce7; color: #16a34a; }
.bubble-subject {
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 0.35rem;
  color: var(--ink);
}

.auto-step {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-bottom: 0.5rem;
  background: var(--bg-2);
  box-shadow: var(--shadow-sm);
}
.auto-step-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.auto-step .form-grid-2 { margin-top: 0.35rem; }
@media (max-width: 900px) {
  .inbox-layout { grid-template-columns: 1fr; margin: 0; }
  .inbox-pane { border-right: 0; border-bottom: 1px solid var(--line); max-height: 18rem; }
  .inbox-thread { max-height: none; }
}

/* ==========================================================================
   Site Hub (/pages) & Modern Page Builder Styles
   ========================================================================== */
.site-hub-main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1.75rem 1.25rem 4rem;
}
.site-hub-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.btn-primary-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 600;
  white-space: nowrap;
}
.site-hub-cta-wrap {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}
.site-quota-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 999px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--muted, #64748b);
  border: 1px solid var(--line, #e2e8f0);
}
.site-quota-badge.quota-full {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}
.inline-confirm-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.btn-danger-ghost {
  color: #dc2626 !important;
}
.btn-danger-ghost:hover {
  background: #fef2f2 !important;
  color: #b91c1c !important;
}
.btn-danger-solid {
  background: #dc2626 !important;
  color: #ffffff !important;
  border-color: #dc2626 !important;
}
.btn-danger-solid:hover {
  background: #b91c1c !important;
}

/* Site Status Hero Card */
.site-status-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1rem 1.35rem;
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  margin-bottom: 1.5rem;
}
.site-hero-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.site-hero-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  color: var(--ink, #0f172a);
  flex-shrink: 0;
}
.site-hero-details {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.site-hero-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.site-hero-domain {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  margin: 0;
  letter-spacing: -0.01em;
}
.site-hero-sub {
  margin: 0;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
}
#site-hero-badge {
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
  line-height: 1.2;
}
#site-hero-badge.won {
  background: #f0fdf4;
  color: #16a34a;
  border: 1px solid #bbf7d0;
}
#site-hero-badge.pending {
  background: #fefce8;
  color: #ca8a04;
  border: 1px solid #fef08a;
}
.site-hero-actions {
  flex-shrink: 0;
}

/* DNS Notice Card */
.site-dns-card {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}
.dns-notice-title {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  font-weight: 700;
  color: #92400e;
}
.site-host-dns {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  background: #fef3c7;
  padding: 0.4rem 0.65rem;
  border-radius: 6px;
  margin-bottom: 0.4rem;
}

/* Site Hub Sections */
.site-hub-sections {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}
.site-hub-group {
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem 1.4rem 1.4rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
}
.site-hub-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line, #f1f5f9);
  flex-wrap: wrap;
}
.site-hub-group-title {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.site-hub-group-title .group-icon {
  display: inline-flex;
  align-items: center;
  color: var(--muted, #64748b);
}
.site-hub-group-title h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  color: var(--ink);
}
.site-hub-group-title .meta {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
}

/* Mini Navbar Preview */
.site-mini-navbar-preview {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  padding: 0.25rem 0.45rem;
  border-radius: 9999px;
  flex-wrap: wrap;
}
.site-nav-pill {
  font-size: 0.76rem;
  font-weight: 500;
  padding: 0.18rem 0.5rem;
  border-radius: 9999px;
  background: var(--bg-2);
  border: 1px solid var(--line, #e2e8f0);
  color: var(--ink);
  white-space: nowrap;
}
.site-nav-pill.home {
  background: rgba(15, 118, 110, 0.08);
  border-color: rgba(15, 118, 110, 0.25);
  color: var(--accent);
}

/* Card Lists */
.site-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.site-hub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.95rem 1.25rem;
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.03);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.site-hub-card:hover {
  border-color: rgba(15, 23, 42, 0.2);
  box-shadow: 0 4px 12px -2px rgba(15, 23, 42, 0.05);
}
.site-card-left {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}
.site-card-title-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.site-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  text-decoration: none;
  letter-spacing: -0.01em;
  transition: color 0.12s ease;
}
.site-card-title:hover {
  color: var(--accent, #0f766e);
  text-decoration: none;
}
.site-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.74rem;
  font-weight: 500;
  padding: 0.15rem 0.5rem;
  border-radius: 9999px;
  line-height: 1.2;
}
.site-status-pill .status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.site-status-pill.live {
  background: #f0fdf4;
  color: #16a34a;
}
.site-status-pill.live .status-dot {
  background: #16a34a;
}
.site-status-pill.draft {
  background: #f1f5f9;
  color: #64748b;
}
.site-status-pill.draft .status-dot {
  background: #94a3b8;
}
.site-type-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted, #64748b);
  background: var(--bg-subtle, #f8fafc);
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--line, #e2e8f0);
}
.site-type-tag.home {
  color: var(--accent, #0f766e);
  background: rgba(15, 118, 110, 0.06);
  border-color: rgba(15, 118, 110, 0.18);
}
.site-type-tag.nav {
  color: #2563eb;
  background: rgba(37, 99, 235, 0.06);
  border-color: rgba(37, 99, 235, 0.18);
}
.site-card-meta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 0.82rem;
  color: var(--muted, #64748b);
  flex-wrap: wrap;
}
.site-card-path {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted, #64748b);
  font-size: 0.82rem;
}
.site-card-form {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--muted, #64748b);
  font-size: 0.82rem;
}
.site-card-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}
.count-badge {
  font-size: 0.8rem;
  padding: 0.2rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 9999px;
}
.empty-group-msg {
  padding: 1.25rem;
  text-align: center;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  margin: 0;
}

/* ==========================================================================
   Unified Form Block & Add Block Popover in Editor (/page)
   ========================================================================== */
.lp-block-form {
  border-left: 3px solid var(--accent);
  background: linear-gradient(180deg, var(--bg-2) 0%, rgba(15, 118, 110, 0.02) 100%);
}
.lp-form-block-body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-top: 0.75rem;
}
.lp-form-block-body label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.25rem;
  display: block;
}
.lp-form-block-body input,
.lp-form-block-body select,
.lp-form-block-body textarea {
  width: 100%;
}

/* Categorized Add Block Popover */
.lp-add-block-wrapper {
  position: relative;
  display: inline-flex;
}
.lp-add-block-main-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius);
}
.lp-add-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: 380px;
  max-width: 90vw;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-dropdown);
  z-index: 100;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.lp-add-dropdown.hidden {
  display: none !important;
}
.lp-dropdown-category {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.lp-dropdown-cat-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin: 0 0 0.15rem 0.25rem;
}
.lp-dropdown-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 0.35rem;
}
.lp-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.55rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  transition: all 0.12s ease;
}
.lp-dropdown-item:hover:not(:disabled) {
  border-color: var(--accent);
  background: var(--bg-2);
  color: var(--accent);
}
.lp-dropdown-item:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.lp-dropdown-item .item-icon {
  font-size: 0.95rem;
  line-height: 1;
  flex-shrink: 0;
}

/* Page Settings Modal */
.lp-settings-modal-card {
  max-width: 580px;
  width: 94vw;
  max-height: 88vh;
  overflow-y: auto;
}
.settings-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  margin-top: 0.75rem;
}
.form-group-radio-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}
.form-group-radio-box .meta {
  margin: 0.35rem 0 0 1.6rem;
  font-size: 0.8rem;
}
.settings-theme-box {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--line);
}
.settings-theme-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}
.settings-archetypes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}
@media (max-width: 560px) {
  .settings-archetypes-grid {
    grid-template-columns: 1fr;
  }
}
.settings-archetype-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.settings-archetype-btn strong {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink);
}
.settings-archetype-btn span {
  font-size: 0.74rem;
  line-height: 1.38;
  color: var(--muted);
}
.settings-archetype-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--bg-2);
}
.settings-archetype-btn.active {
  border-color: #0f766e;
  background: #f0f9f7;
  box-shadow: inset 0 0 0 1px #0f766e;
}
.settings-palettes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}
@media (max-width: 560px) {
  .settings-palettes-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
.settings-palette-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}
.settings-palette-btn strong {
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--ink);
}
.settings-palette-btn:hover:not(:disabled) {
  border-color: var(--line-strong);
  background: var(--bg-2);
}
.settings-palette-btn.active {
  border-color: #0f766e;
  background: #f0f9f7;
  box-shadow: inset 0 0 0 1px #0f766e;
}
.palette-chip-trio {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  border: 1px solid rgba(15, 23, 42, 0.14);
  border-radius: 5px;
  overflow: hidden;
}
.palette-chip-trio > span {
  display: block;
  width: 11px;
  height: 20px;
}
.settings-custom-accent-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.15rem;
}
.settings-custom-accent-row input[type="color"] {
  width: 32px;
  height: 28px;
  min-height: 28px;
  padding: 2px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--bg-2);
  cursor: pointer;
}

/* Visitor Preview Header Mock */
.offer-preview-site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.25rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  margin-bottom: 1.25rem;
  border-radius: 8px 8px 0 0;
}
.preview-site-brand {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}
.preview-site-nav {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.preview-site-nav span {
  font-size: 0.78rem;
  color: var(--muted);
}
.preview-site-nav span.active {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 768px) {
  .site-hub-head {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-status-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-hub-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  .site-card-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Social Media & Quick Sharing */
.social-share-card {
  max-width: 580px;
  width: 95vw;
  max-height: 90vh;
  overflow-y: auto;
}
.social-share-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.social-share-section:first-of-type {
  margin-top: 0.5rem;
  padding-top: 0;
  border-top: none;
}
.social-section-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin-bottom: 0.65rem;
}
.social-quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 0.5rem;
}
.social-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.6rem 0.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
  min-height: 38px;
}
.social-quick-btn:hover {
  background: var(--bg-hover, rgba(15, 23, 42, 0.04));
  border-color: var(--ink-2);
}
.social-quick-btn.wa:hover {
  background: #25d366;
  border-color: #25d366;
  color: #fff;
}
.social-quick-btn.x:hover {
  background: #0f1419;
  border-color: #0f1419;
  color: #fff;
}
.social-quick-btn.fb:hover {
  background: #1877f2;
  border-color: #1877f2;
  color: #fff;
}
.social-quick-btn.li:hover {
  background: #0a66c2;
  border-color: #0a66c2;
  color: #fff;
}

.page-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

/* Public Page Share Bar */
.offer-share-bar {
  margin-top: 2.25rem;
  padding: 1rem 1.25rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.offer-share-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
}
.offer-share-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}
.offer-share-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.65rem;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
  transition: all 0.15s ease;
}
.offer-share-btn:hover {
  border-color: var(--ink-2);
  background: var(--bg-hover, rgba(15, 23, 42, 0.04));
}

/* Leads Import Feature */
.btn-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.import-modal-card {
  max-width: 680px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
}

.import-guidelines-box {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

.import-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  font-size: 0.92rem;
}

.import-guide-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.84rem;
  color: var(--muted-dark);
  line-height: 1.5;
}

.import-source-zone {
  margin-bottom: 1rem;
}

.import-dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 1.6rem 1rem;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.import-dropzone:hover,
.import-dropzone.dragover {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.dropzone-icon {
  stroke: var(--muted);
  margin-bottom: 0.35rem;
}

.dropzone-text {
  margin: 0.2rem 0;
  font-size: 0.92rem;
  color: var(--ink);
}

.dropzone-link {
  color: var(--accent);
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.dropzone-sub {
  margin: 0.2rem 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.import-paste-toggle-wrap {
  margin-top: 0.5rem;
  text-align: right;
}

.btn-link-action {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.84rem;
  cursor: pointer;
  text-decoration: underline;
  padding: 0.2rem 0;
}

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

.import-textarea {
  width: 100%;
  box-sizing: border-box;
  font-family: monospace;
  font-size: 0.82rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  margin-top: 0.35rem;
  resize: vertical;
}

.import-paste-actions {
  margin-top: 0.4rem;
  text-align: right;
}

.import-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  margin: 0.75rem 0 0.4rem;
}

.import-badge {
  display: inline-flex;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  border-radius: 9999px;
  padding: 0.2rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
}

.import-table-wrap {
  max-height: 180px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
}

.import-table {
  width: 100%;
  font-size: 0.82rem;
  margin: 0;
}

.import-table th {
  position: sticky;
  top: 0;
  background: var(--bg-subtle);
  z-index: 1;
}

.import-options {
  margin: 0.75rem 0;
}

.checkbox-inline {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  cursor: pointer;
  line-height: 1.4;
  color: var(--ink);
}

.checkbox-inline input[type="checkbox"] {
  margin-top: 0.15rem;
  cursor: pointer;
}

.gdpr-notice-box {
  background: #fffbeb;
  border: 1px solid #fef3c7;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  margin: 1rem 0;
}

.gdpr-notice-title {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: #92400e;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
}

.gdpr-notice-title svg {
  stroke: #b45309;
  flex-shrink: 0;
}

.gdpr-notice-body {
  font-size: 0.82rem;
  color: #78350f;
  line-height: 1.45;
  margin: 0 0 0.75rem 0;
}

.gdpr-confirm-label {
  color: #78350f;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 1rem;
}

.import-result-box {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-top: 1rem;
  font-size: 0.88rem;
}

.import-result-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.import-result-stat-item {
  display: flex;
  flex-direction: column;
}

.import-result-stat-num {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
}

.import-result-stat-num.created { color: var(--accent); }
.import-result-stat-num.updated { color: #2563eb; }
.import-result-stat-num.skipped { color: var(--muted); }
.import-result-stat-num.errors { color: var(--danger); }

.import-result-stat-label {
  font-size: 0.78rem;
  color: var(--muted);
}

.import-errors-list {
  max-height: 120px;
  overflow-y: auto;
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
  font-size: 0.8rem;
  color: var(--danger);
}

/* ==========================================================================
   Automations 2.0: Recipes, Live Storyboard & Journey Visualizer
   ========================================================================== */
.auto-recipes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
  margin-top: 0.75rem;
}
.auto-recipes-grid.mini {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.75rem;
}
.auto-recipe-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  text-align: left;
}
.auto-recipe-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.auto-recipe-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.6rem;
}
.auto-recipe-icon {
  font-size: 1.5rem;
  line-height: 1;
}
.auto-recipe-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}
.auto-recipe-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 0.35rem;
}
.auto-recipe-desc {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.45;
  margin: 0 0 0.85rem;
  flex-grow: 1;
}
.auto-recipe-action {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.auto-empty-hero {
  text-align: center;
  padding: 2.25rem 1.5rem;
  max-width: 900px;
  margin: 1.5rem auto;
}
.auto-empty-icon {
  font-size: 2.4rem;
  margin-bottom: 0.75rem;
}
.auto-empty-hero h2 {
  font-size: 1.35rem;
  margin: 0 0 0.5rem;
  color: var(--ink);
}
.auto-empty-hero p.meta {
  max-width: 620px;
  margin: 0 auto 1.25rem;
  font-size: 0.92rem;
  line-height: 1.5;
}
.auto-recipes-title {
  text-align: left;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}

.auto-recipes-bar {
  margin-bottom: 1.5rem;
  border: 1px dashed var(--line-strong);
  background: var(--bg-subtle);
}
.auto-recipes-bar-head {
  margin-bottom: 0.5rem;
}
.auto-recipes-bar-tag {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Flow pills on table and cards */
.auto-flow-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.4rem;
}
.auto-flow-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  color: var(--ink);
  white-space: nowrap;
}
.auto-flow-pill.trigger {
  background: var(--info-bg);
  border-color: var(--info-line);
  color: var(--info);
  font-weight: 600;
}
.auto-flow-pill.cond {
  background: var(--warning-bg);
  border-color: var(--warning-line);
  color: var(--warning);
}
.auto-flow-pill.act {
  background: var(--ok-bg);
  border-color: var(--ok-line);
  color: var(--ok);
}
.auto-flow-arrow {
  color: var(--muted);
  font-size: 0.75rem;
}

/* ==========================================================================
   Automations 2.0: Visual Pipeline, Explainer Guide & Action Timeline
   ========================================================================== */

/* Illustrated Explainer Guide Box */
.auto-guide-box {
  margin-bottom: 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--accent-line);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
}
.auto-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.auto-guide-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.auto-guide-close {
  background: transparent;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 0.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}
.auto-guide-close:hover {
  color: var(--ink);
  background: var(--bg-subtle);
}
.auto-guide-desc {
  font-size: 0.88rem;
  color: var(--muted);
  margin: 0 0 1.25rem;
  line-height: 1.45;
}
.auto-guide-diagram {
  display: flex;
  align-items: stretch;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
@media (max-width: 768px) {
  .auto-guide-diagram {
    flex-direction: column;
  }
}
.auto-guide-step-card {
  flex: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 0.9rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.auto-guide-icon-wrap {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.65rem;
}
.auto-guide-step-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.auto-guide-step-text {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.auto-guide-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  opacity: 0.6;
}
@media (max-width: 768px) {
  .auto-guide-arrow {
    transform: rotate(90deg);
    margin: -0.25rem 0;
  }
}
.auto-guide-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  background: var(--bg);
  border: 1px dashed var(--line);
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  color: var(--muted-dark);
}
.auto-guide-tip svg {
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: var(--accent);
}

/* Dynamic Humane Turkish Summary Card */
.auto-human-summary {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  background: var(--bg-2);
  border-left: 4px solid var(--accent);
  padding: 0.95rem 1.15rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius-sm);
}
.auto-summary-icon-wrap {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.15rem;
}
.auto-summary-content {
  flex-grow: 1;
}
.auto-summary-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}
.auto-summary-text {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.5;
  font-weight: 500;
}

/* Meta Card: Name & Active toggle */
.auto-meta-card {
  margin-bottom: 1.5rem;
}
.auto-status-toggle-wrap {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.auto-label-header {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

/* 3-Stage Visual Pipeline */
.auto-pipeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-bottom: 1.5rem;
}
.auto-stage-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
}
.auto-stage-head {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
}
.auto-stage-badge {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--accent-line);
  flex-shrink: 0;
}
.auto-stage-info h2 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
  color: var(--ink);
}
.auto-stage-info p.meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

/* Pipeline Connector */
.auto-pipeline-connector {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: -1px 0;
  position: relative;
  z-index: 2;
  height: 2.25rem;
  justify-content: center;
}
.auto-connector-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--line);
  z-index: 1;
}
.auto-connector-arrow {
  position: relative;
  z-index: 2;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
}

/* Stage 1: Choice Grid */
.auto-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1rem;
}
.auto-choice-card {
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 1rem 1.15rem;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: all 0.15s ease;
  color: inherit;
  position: relative;
}
.auto-choice-card:hover {
  border-color: var(--line-strong);
  background: var(--bg-subtle);
}
.auto-choice-card.active {
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 1px var(--accent);
}
.auto-choice-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.5rem;
}
.auto-choice-icon {
  width: 2rem;
  height: 2rem;
  border-radius: 6px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}
.auto-choice-card.active .auto-choice-icon {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--bg);
}
.auto-choice-check {
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  color: transparent;
}
.auto-choice-card.active .auto-choice-check {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.auto-choice-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.25rem;
}
.auto-choice-desc {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.4;
}
.auto-resubmit-box {
  margin-top: 0.65rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
}

/* Stage 2: Scope Segmented Control */
.auto-scope-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  background: var(--bg);
  padding: 0.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}
.auto-scope-btn {
  flex: 1;
  min-width: 200px;
  padding: 0.55rem 0.85rem;
  font-size: 0.84rem;
  font-weight: 600;
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: all 0.15s ease;
}
.auto-scope-btn:hover {
  color: var(--ink);
}
.auto-scope-btn.active {
  background: var(--bg-2);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line-strong);
}
.auto-conds-empty {
  padding: 0.9rem 1rem;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  color: var(--muted);
}
.auto-conds-empty p {
  margin: 0;
}
.auto-filter-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  background: var(--bg);
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
}
@media (max-width: 600px) {
  .auto-filter-row {
    flex-wrap: wrap;
  }
}
.auto-filter-badge {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg-subtle);
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  border: 1px solid var(--line);
  flex-shrink: 0;
}
.auto-filter-field-sel {
  flex: 1;
  min-width: 140px;
}
.auto-filter-val-wrap {
  flex: 2;
  min-width: 180px;
}
.auto-filter-del {
  flex-shrink: 0;
  color: var(--danger);
}

/* Stage 3: Actions Timeline */
.auto-actions-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.auto-acts-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--bg);
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--muted);
}
.auto-act-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 3.5px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
}
.auto-act-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.auto-act-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-grow: 1;
}
.auto-act-num {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
  flex-shrink: 0;
}
.auto-act-type-sel {
  font-weight: 600;
  max-width: 280px;
}
.auto-act-body {
  padding-top: 0.35rem;
}
.auto-act-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.auto-act-row label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink);
}
.auto-stop-hint {
  font-size: 0.82rem;
  color: var(--muted);
  font-style: italic;
  padding: 0.4rem 0.6rem;
  background: var(--bg-2);
  border-radius: 4px;
}
.auto-add-act-btn {
  width: 100%;
  justify-content: center;
  padding: 0.65rem;
  border: 1.5px dashed var(--line-strong);
  background: var(--bg);
}
.auto-add-act-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Variable token inserters & WhatsApp chat bubble preview */
.wa-token-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.4rem;
  padding: 0.35rem 0.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.wa-token-label {
  font-size: 0.76rem;
  color: var(--muted);
  margin-right: 0.2rem;
}
.wa-token-btn {
  font-size: 0.76rem;
  padding: 0.25rem 0.55rem;
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  cursor: pointer;
  color: var(--accent);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: background 0.1s ease, border-color 0.1s ease;
}
.wa-token-btn:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
}
.wa-bubble-preview {
  margin-top: 0.75rem;
  background: #efeae2;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}
.wa-bubble-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #54656f;
  margin-bottom: 0.45rem;
}
.wa-bubble-box {
  background: #dcf8c6;
  color: #111b21;
  padding: 0.6rem 0.8rem 0.4rem;
  border-radius: 8px 0px 8px 8px;
  max-width: 85%;
  margin-left: auto;
  box-shadow: 0 1px 2px rgba(11,20,26,.15);
  font-size: 0.85rem;
  line-height: 1.45;
  word-break: break-word;
  white-space: pre-wrap;
}
.wa-bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  font-size: 0.68rem;
  color: #667781;
  margin-top: 0.25rem;
}
.wa-checks {
  display: inline-flex;
  align-items: center;
}

/* Row inline active toggle */
.auto-toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  user-select: none;
}
.auto-toggle-switch {
  position: relative;
  width: 36px;
  height: 20px;
  background: var(--bg-muted);
  border-radius: 999px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}
.auto-toggle-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s;
}
.auto-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.auto-toggle-input:checked + .auto-toggle-switch {
  background: var(--ok);
}
.auto-toggle-input:checked + .auto-toggle-switch::after {
  transform: translateX(16px);
}
.auto-toggle-input:disabled + .auto-toggle-switch {
  opacity: 0.5;
  cursor: not-allowed;
}
.auto-toggle-text {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-dark);
}

/* ==========================================================================
   Funnel & Friction Intelligence Cockpit Styles
   ========================================================================== */

.funnel-doctor-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}
.funnel-doctor-card {
  padding: 1rem 1.25rem;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--bg-2, #ffffff);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.funnel-doctor-card.warning {
  border-color: #fef08a;
  background: #fefce8;
}
.funnel-doctor-card.info {
  border-color: #bae6fd;
  background: #f0f9ff;
}
.funnel-doctor-card.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}
.funnel-doctor-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.funnel-doctor-icon {
  font-size: 1.1rem;
}
.funnel-doctor-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
}
.funnel-doctor-msg {
  font-size: 0.88rem;
  color: var(--muted-dark, #475569);
  margin: 0 0 0.5rem 0;
  line-height: 1.45;
}
.funnel-doctor-tip {
  font-size: 0.82rem;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  color: var(--ink, #0f172a);
  line-height: 1.4;
}
.funnel-doctor-tip span {
  font-weight: 600;
}

/* Stage Flow */
.funnel-stage-block {
  margin-bottom: 1.75rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
}
.funnel-subhead {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted-dark, #475569);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0 0 1rem 0;
}
.funnel-pipeline-flow {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}
.funnel-step-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.funnel-step-box {
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  padding: 0.85rem 1.15rem;
  min-width: 130px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}
.funnel-step-val {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.funnel-step-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted-dark, #475569);
  margin-top: 0.2rem;
}
.funnel-step-sub {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
  margin-top: 0.15rem;
}
.funnel-step-arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}
.funnel-step-badge {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  color: var(--primary, #0f766e);
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.funnel-arrow-svg {
  color: var(--muted, #94a3b8);
  display: flex;
  align-items: center;
}

/* 2-column Grid */
.funnel-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 860px) {
  .funnel-details-grid {
    grid-template-columns: 1fr;
  }
}
.funnel-card {
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.funnel-card-head {
  margin-bottom: 1.25rem;
}
.funnel-card-head h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  margin: 0;
}
.funnel-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
#friction-total-badge {
  font-size: 0.75rem;
  font-weight: 600;
  background: #fee2e2;
  color: #b91c1c;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

/* Friction Meters */
.friction-meters-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.friction-meter-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.friction-meter-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}
.friction-field-name {
  font-weight: 500;
  color: var(--ink, #0f172a);
}
.friction-field-stats {
  color: var(--muted-dark, #475569);
  font-weight: 600;
}
.meter-track {
  width: 100%;
  height: 8px;
  background: var(--bg-subtle, #f1f5f9);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 999px;
  overflow: hidden;
}
.meter-fill {
  height: 100%;
  background: #f97316;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.meter-fill.warn {
  background: #ef4444;
}

/* Device Split */
.device-split-row {
  display: flex;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.device-stat-pill {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
}
.device-stat-icon {
  color: var(--ink, #0f172a);
  display: flex;
  align-items: center;
  justify-content: center;
}
.device-stat-top {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
}
.device-stat-sub {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  margin-top: 0.15rem;
}

/* Sources Table */
.funnel-sources-table-wrap {
  overflow-x: auto;
}
.funnel-sources-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.funnel-sources-table th {
  text-align: left;
  padding: 0.5rem 0.65rem;
  border-bottom: 1px solid var(--line, #e2e8f0);
  font-weight: 600;
  color: var(--muted-dark, #475569);
}
.funnel-sources-table th.num,
.funnel-sources-table td.num {
  text-align: right;
}
.funnel-sources-table td {
  padding: 0.55rem 0.65rem;
  border-bottom: 1px solid var(--line, #f1f5f9);
  color: var(--ink, #0f172a);
}
.funnel-sources-table td.bold {
  font-weight: 600;
}
.source-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: capitalize;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--ink, #0f172a);
  border: 1px solid var(--line, #e2e8f0);
}
.source-tag.instagram { background: #fdf2f8; color: #be185d; border-color: #fbcfe8; }
.source-tag.facebook { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.source-tag.google_ads, .source-tag.google { background: #fefce8; color: #a16207; border-color: #fef08a; }
.source-tag.whatsapp { background: #f0fdf4; color: #15803d; border-color: #bbf7d0; }
.source-tag.tiktok { background: #faf5ff; color: #7e22ce; border-color: #f3e8ff; }
.funnel-empty-box {
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--bg-subtle, #f8fafc);
  border: 1px dashed var(--line, #cbd5e1);
  border-radius: 10px;
}

/* ==========================================================================
   Modern Visual Funnel Cockpit (/funnel) Design System
   ========================================================================== */

/* 1. Control Toolbar */
.funnel-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.funnel-control-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.funnel-control-left .control-label {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--muted-dark, #475569);
}
.funnel-control-left select {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink, #0f172a);
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 8px;
  padding: 0.45rem 2rem 0.45rem 0.85rem;
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.funnel-control-left select:focus {
  border-color: var(--primary, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
.funnel-control-right {
  display: flex;
  align-items: center;
}
.funnel-time-segmented {
  display: inline-flex;
  align-items: center;
  background: var(--bg-subtle, #f1f5f9);
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--line, #e2e8f0);
  gap: 2px;
}
.segmented-pill {
  appearance: none;
  -webkit-appearance: none;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted-dark, #475569);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.segmented-pill:hover:not(.active) {
  color: var(--ink, #0f172a);
}
.segmented-pill.active {
  background: var(--bg-2, #ffffff);
  color: var(--primary, #0f766e);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

/* 2. Hero Funnel Section */
.funnel-hero-card {
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.75rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.funnel-hero-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line, #f1f5f9);
}
.funnel-hero-head-left {
  display: flex;
  flex-direction: column;
}
.funnel-hero-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.2rem 0.6rem;
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #ccfbf1;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  width: fit-content;
}
.funnel-hero-badge-tag .icon-wrap {
  display: flex;
  align-items: center;
}
.funnel-hero-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
  margin: 0 0 0.25rem 0;
  letter-spacing: -0.02em;
}
.funnel-kpi-group {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  flex-wrap: wrap;
}
.funnel-kpi-item {
  display: flex;
  flex-direction: column;
  padding: 0.65rem 1rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  min-width: 140px;
}
.funnel-kpi-item.primary {
  background: #f0fdfa;
  border-color: #ccfbf1;
}
.funnel-kpi-item .kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted-dark, #475569);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.funnel-kpi-item .kpi-val {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--primary, #0f766e);
  font-variant-numeric: tabular-nums;
  line-height: 1.2;
  margin: 0.15rem 0;
}
.funnel-kpi-item .kpi-sub {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
}

/* 3. The Real Tapered Visual Funnel Architecture */
.funnel-canvas-container {
  width: 100%;
}
.funnel-visual-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 0.5rem 0 1rem;
}
.funnel-tier-row {
  width: 100%;
  display: flex;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Geometric Tapering: Physically narrows down the page */
.funnel-tier-row.tier-stage-1 { max-width: 100%; }
.funnel-tier-row.tier-stage-2 { max-width: 88%; }
.funnel-tier-row.tier-stage-3 { max-width: 76%; }
.funnel-tier-row.tier-stage-4 { max-width: 64%; }
.funnel-tier-row.tier-stage-5 { max-width: 52%; }

@media (max-width: 860px) {
  .funnel-tier-row.tier-stage-1 { max-width: 100%; }
  .funnel-tier-row.tier-stage-2 { max-width: 96%; }
  .funnel-tier-row.tier-stage-3 { max-width: 92%; }
  .funnel-tier-row.tier-stage-4 { max-width: 88%; }
  .funnel-tier-row.tier-stage-5 { max-width: 84%; }
}

.funnel-tier-card {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.95rem 1.35rem;
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.funnel-tier-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  border-color: var(--line-strong, #cbd5e1);
}

/* Progression Accents */
.funnel-tier-card.accent-sky {
  border-left: 4px solid #0284c7;
  background: linear-gradient(90deg, rgba(240, 249, 255, 0.6) 0%, #ffffff 45%);
}
.funnel-tier-card.accent-teal {
  border-left: 4px solid #0d9488;
  background: linear-gradient(90deg, rgba(240, 253, 250, 0.6) 0%, #ffffff 45%);
}
.funnel-tier-card.accent-emerald {
  border-left: 4px solid #059669;
  background: linear-gradient(90deg, rgba(236, 253, 245, 0.6) 0%, #ffffff 45%);
}
.funnel-tier-card.accent-indigo {
  border-left: 4px solid #6366f1;
  background: linear-gradient(90deg, rgba(238, 242, 255, 0.6) 0%, #ffffff 45%);
}
.funnel-tier-card.accent-gold {
  border-left: 4px solid #10b981;
  background: linear-gradient(90deg, rgba(209, 250, 229, 0.7) 0%, #ffffff 50%);
}

.tier-card-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex: 1;
  min-width: 170px;
}
.tier-icon-wrap {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tier-icon-wrap.sky { background: #e0f2fe; color: #0284c7; }
.tier-icon-wrap.teal { background: #ccfbf1; color: #0f766e; }
.tier-icon-wrap.emerald { background: #d1fae5; color: #059669; }
.tier-icon-wrap.indigo { background: #e0e7ff; color: #4f46e5; }
.tier-icon-wrap.gold { background: #dcfce7; color: #15803d; }

.tier-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.tier-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.tier-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
}
.tier-step-num {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--muted-dark, #475569);
  border-radius: 4px;
}
.tier-desc {
  font-size: 0.75rem;
  color: var(--muted, #64748b);
}

.tier-card-center {
  flex: 1 1 120px;
  max-width: 160px;
  display: flex;
  align-items: center;
}
@media (max-width: 680px) {
  .tier-card-center { display: none; }
}
.tier-bar-track {
  width: 100%;
  height: 6px;
  background: var(--bg-subtle, #f1f5f9);
  border-radius: 999px;
  overflow: hidden;
}
.tier-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease;
}
.tier-bar-fill.sky { background: #0284c7; }
.tier-bar-fill.teal { background: #0d9488; }
.tier-bar-fill.emerald { background: #059669; }
.tier-bar-fill.indigo { background: #6366f1; }
.tier-bar-fill.gold { background: #10b981; }

.tier-card-right {
  text-align: right;
  min-width: 90px;
}
.tier-metric-num {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--ink, #0f172a);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}
.tier-metric-share {
  font-size: 0.72rem;
  color: var(--muted, #64748b);
  font-weight: 500;
  margin-top: 0.15rem;
}

/* Transition & Drop-off Gates */
.funnel-transition-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  padding: 0.45rem 0;
  width: 100%;
}
.gate-line {
  width: 2px;
  height: 14px;
  background: var(--line, #e2e8f0);
  margin-bottom: 0.25rem;
}
.gate-pills-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.gate-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}
.gate-pill.conversion {
  background: #f0fdfa;
  color: #0f766e;
  border: 1px solid #ccfbf1;
}
.gate-pill.dropoff {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
}

/* 4. Optimization Insights (Funnel Doctor) - Non-intrusive card below the funnel */
.funnel-spotlight-wrap {
  margin-bottom: 1.75rem;
}
.funnel-insights-card {
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 14px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.funnel-insights-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line, #f1f5f9);
}
.insights-head-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.insights-sparkle-icon {
  color: var(--primary, #0f766e);
  display: flex;
  align-items: center;
}
.funnel-insights-head h3 {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  margin: 0;
}
.badge-subtle {
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--muted-dark, #475569);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
}
.funnel-insights-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.insight-item {
  padding: 0.95rem 1.15rem;
  border-radius: 10px;
  border: 1px solid var(--line, #e2e8f0);
  background: var(--bg-subtle, #f8fafc);
}
.insight-item.warning {
  border-left: 4px solid #f59e0b;
  background: #fffdfa;
}
.insight-item.success {
  border-left: 4px solid #10b981;
  background: #f0fdf4;
}
.insight-item.info {
  border-left: 4px solid #0284c7;
  background: #f0f9ff;
}
.insight-item-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}
.insight-icon-slot {
  display: flex;
  align-items: center;
}
.insight-icon-slot.warning { color: #d97706; }
.insight-icon-slot.success { color: #059669; }
.insight-icon-slot.info { color: #0284c7; }
.insight-title {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
}
.insight-msg {
  font-size: 0.85rem;
  color: var(--muted-dark, #475569);
  margin: 0 0 0.5rem 0;
  line-height: 1.45;
}
.insight-tip-box {
  font-size: 0.8rem;
  background: rgba(255, 255, 255, 0.85);
  padding: 0.45rem 0.75rem;
  border-radius: 6px;
  border: 1px solid rgba(0, 0, 0, 0.05);
  color: var(--ink, #0f172a);
  line-height: 1.4;
}
.tip-label {
  font-weight: 600;
  color: var(--primary, #0f766e);
}

/* 5. Controllable Drilldown Lenses (Segmented Tabs) */
.funnel-drilldown-section {
  margin-top: 1.75rem;
}
.drilldown-tabs-bar {
  display: flex;
  gap: 0.35rem;
  border-bottom: 1px solid var(--line, #e2e8f0);
  margin-bottom: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1px;
}
.drilldown-tab {
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 0.7rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--muted-dark, #475569);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
  outline: none;
}
.drilldown-tab:hover {
  color: var(--ink, #0f172a);
}
.drilldown-tab.active {
  color: var(--primary, #0f766e);
  border-bottom-color: var(--primary, #0f766e);
  font-weight: 600;
}
.drilldown-tab .tab-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--muted-dark, #475569);
}
.drilldown-tab.active .tab-badge {
  background: #ccfbf1;
  color: #0f766e;
}

/* 6. Modernized Table & Cells */
.funnel-table {
  width: 100%;
}
.form-title-cell {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}
.form-main-link {
  font-weight: 600;
  color: var(--ink, #0f172a);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.15s;
}
.form-main-link:hover {
  color: var(--primary, #0f766e);
  text-decoration: underline;
}
.form-slug-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.75rem;
  color: var(--muted, #64748b);
  text-decoration: none;
  width: fit-content;
  padding: 0.1rem 0.45rem;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 4px;
  transition: all 0.15s;
}
.form-slug-badge:hover {
  border-color: var(--line-strong, #cbd5e1);
  color: var(--ink, #0f172a);
}
.conversion-pill {
  display: inline-block;
  padding: 0.2rem 0.55rem;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.conversion-pill.good {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.conversion-pill.regular {
  background: #fffbeb;
  color: #d97706;
  border: 1px solid #fde68a;
}
.conversion-pill.low {
  background: #f8fafc;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

.friction-summary-card {
  background: var(--bg-2, #ffffff);
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.friction-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.friction-card-header h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink, #0f172a);
  margin: 0 0 0.25rem 0;
}
.friction-card-header #friction-total-stat {
  background: #fee2e2;
  color: #b91c1c;
  font-weight: 600;
  font-size: 0.78rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}
.funnel-modal-card {
  max-width: 780px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
}
.funnel-modal-body {
  padding: 1rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}





/* ==========================================================================
   Pro AI Assistant Drawer & Zero-Jargon User Approval Card ("Onay Kartı")
   ========================================================================== */

.nav-ai-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.nav-ai-trigger:hover {
  background: #ccfbf1;
  border-color: var(--accent);
  color: var(--accent-hover);
}
.nav-ai-trigger:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.mobile-ai-trigger {
  display: none;
}
@media (max-width: 768px) {
  .mobile-ai-trigger {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 32px;
    padding: 0.25rem 0.65rem;
    margin-left: auto;
    margin-right: 0.5rem;
    border-radius: 999px;
    border: 1px solid var(--accent-line);
    background: var(--accent-subtle);
    color: var(--accent);
    font-family: var(--sans);
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.15s ease;
  }
  .mobile-ai-trigger:hover {
    background: #ccfbf1;
    border-color: var(--accent);
  }
}

.ai-inline-trigger {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 38px;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.ai-inline-trigger:hover {
  background: #ccfbf1;
  border-color: var(--accent);
  color: var(--accent-hover);
}
.command-bar-right .ai-inline-trigger {
  min-height: 32px;
  padding: 0.35rem 0.75rem;
  font-size: 0.82rem;
}

.ai-drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(15, 29, 28, 0.44);
  display: flex;
  justify-content: flex-end;
  opacity: 1;
  transition: opacity 0.18s ease;
}
.ai-drawer-backdrop.hidden {
  display: none !important;
}

.ai-drawer-panel {
  width: 100%;
  max-width: 600px;
  height: 100%;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-dropdown);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ai-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.ai-drawer-head-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.ai-btn-reset-thread {
  font-family: var(--sans);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.28rem 0.6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.ai-btn-reset-thread:hover {
  color: var(--ink);
  border-color: var(--line-strong);
  background: var(--bg-2);
}
.ai-drawer-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.ai-drawer-badge-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ai-drawer-title-group h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.ai-drawer-title-group p {
  margin: 0.1rem 0 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.ai-drawer-context-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  margin-top: 0.25rem;
  width: fit-content;
}

.ai-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* Preset Quick-Action Cards */
.ai-presets-section {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}
.ai-presets-heading {
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0 0 0.25rem 0;
}
.ai-presets-subheading {
  font-size: 0.78rem;
  color: var(--muted-dark);
  margin: 0 0 0.7rem 0;
  line-height: 1.35;
}
.ai-presets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}
.ai-preset-card {
  display: flex;
  align-items: stretch;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.ai-preset-card:hover {
  border-color: var(--accent-line);
  box-shadow: var(--shadow-sm);
}
.ai-preset-card-body {
  flex: 1;
  display: flex;
  align-items: flex-start;
  text-align: left;
  padding: 0.75rem 0.9rem;
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
}
.ai-preset-card-body:hover .ai-preset-btn-text strong {
  color: var(--accent);
}
.ai-preset-btn-text strong {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.15rem;
  transition: color 0.15s ease;
}
.ai-preset-btn-text span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.4;
}
.ai-preset-ask-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0 0.85rem;
  background: var(--bg-2);
  border: none;
  border-left: 1px solid var(--line);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}
.ai-preset-ask-btn:hover:not(:disabled) {
  background: var(--accent);
  color: var(--accent-ink);
}
.ai-preset-ask-btn:disabled,
.ai-preset-card-body:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Collapsed Quick Chips when Thread is active */
.ai-presets-section.ai-presets-collapsed {
  padding: 0.65rem 0.85rem;
  background: var(--bg-2);
}
.ai-presets-section.ai-presets-collapsed .ai-presets-heading {
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
}
.ai-presets-section.ai-presets-collapsed .ai-presets-subheading {
  display: none;
}
.ai-presets-section.ai-presets-collapsed .ai-presets-grid {
  display: flex;
  overflow-x: auto;
  gap: 0.45rem;
  padding-bottom: 0.25rem;
  scrollbar-width: thin;
}
.ai-presets-section.ai-presets-collapsed .ai-preset-card {
  flex: 0 0 auto;
  max-width: 250px;
  background: var(--bg);
}
.ai-presets-section.ai-presets-collapsed .ai-preset-card-body {
  padding: 0.45rem 0.65rem;
}
.ai-presets-section.ai-presets-collapsed .ai-preset-btn-text span {
  display: none;
}
.ai-presets-section.ai-presets-collapsed .ai-preset-btn-text strong {
  margin-bottom: 0;
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ai-presets-section.ai-presets-collapsed .ai-preset-ask-btn {
  padding: 0 0.55rem;
  font-size: 0.75rem;
}

/* Step Progress & Status Banner */
.ai-status-box {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--info-line);
  background: var(--info-bg);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
}
.ai-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--accent-line);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: ai-spin 0.7s linear infinite;
  flex-shrink: 0;
}
@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

/* AI User Prompt Bubble */
.ai-user-bubble {
  align-self: flex-end;
  max-width: 88%;
  background: var(--accent);
  color: var(--accent-ink);
  border-radius: 12px 12px 2px 12px;
  padding: 0.65rem 0.95rem;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  box-shadow: var(--shadow-sm);
  word-break: break-word;
}

/* AI Reply & Navigation Guide Cards */
.ai-reply-card {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow-sm);
  font-size: 0.9rem;
  color: var(--ink);
  line-height: 1.55;
  white-space: pre-wrap;
}

.ai-nav-cards {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.ai-nav-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--accent-line);
  background: var(--accent-subtle);
}
.ai-nav-card-info strong {
  display: block;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.15rem;
}
.ai-nav-card-info span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted-dark);
}

/* ==========================================================================
   Pristine User Approval Card ("Onayınız Bekleniyor")
   ========================================================================== */
.ai-proposal-card {
  background: var(--bg-2);
  border: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
}

.ai-proposal-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  background: var(--accent-subtle);
  border-bottom: 1px solid var(--accent-line);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
}
.ai-proposal-banner-left {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.ai-proposal-head {
  padding: 1rem 1.1rem 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
}
.ai-proposal-head h3 {
  margin: 0 0 0.35rem 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--ink);
}
.ai-proposal-head p {
  margin: 0;
  font-size: 0.86rem;
  color: var(--muted-dark);
  line-height: 1.45;
}

.ai-proposal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 1.1rem;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
}
.ai-select-all-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  min-height: 32px;
}
.ai-select-all-label input[type="checkbox"],
.ai-prop-checkbox {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.ai-reassurance-note {
  font-size: 0.76rem;
  color: var(--muted-dark);
}

.ai-proposal-list {
  max-height: 360px;
  overflow-y: auto;
}
.ai-prop-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
  transition: opacity 0.15s ease, background 0.15s ease;
  cursor: pointer;
}
.ai-prop-item:last-child {
  border-bottom: none;
}
.ai-prop-item:hover {
  background: var(--bg);
}
.ai-prop-item.is-unchecked {
  opacity: 0.48;
  background: var(--bg-subtle);
}

.ai-prop-check-wrap {
  padding-top: 0.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-prop-content {
  flex: 1;
  min-width: 0;
}
.ai-prop-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.35rem;
}
.ai-prop-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.ai-prop-sub {
  font-size: 0.78rem;
  color: var(--muted);
}

/* Visual Before -> After Badges */
.ai-prop-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.35rem;
}
.ai-diff-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  border-radius: 6px;
  background: var(--bg-subtle);
  border: 1px solid var(--line-strong);
  font-size: 0.78rem;
  line-height: 1.3;
}
.ai-diff-label {
  font-weight: 600;
  color: var(--muted-dark);
}
.ai-diff-from {
  color: var(--muted);
  text-decoration: line-through;
}
.ai-diff-arrow {
  color: var(--accent);
  font-weight: 700;
}
.ai-diff-to {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-subtle);
  padding: 0.08rem 0.4rem;
  border-radius: 4px;
  border: 1px solid var(--accent-line);
}

.ai-prop-reason {
  font-size: 0.8rem;
  color: var(--muted-dark);
  line-height: 1.4;
}
.ai-prop-skip-tag {
  display: none;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 0.4rem;
}
.ai-prop-item.is-unchecked .ai-prop-skip-tag {
  display: inline;
}

.ai-proposal-actions {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1rem 1.1rem;
  background: var(--bg);
  border-top: 1px solid var(--line);
}
.ai-proposal-primary-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.ai-btn-approve {
  flex: 1;
  min-height: 44px;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background 0.15s ease;
}
.ai-btn-approve:hover:not(:disabled) {
  background: var(--accent-hover);
}
.ai-btn-approve:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ai-btn-reject {
  min-height: 44px;
  padding: 0.6rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg-2);
  color: var(--muted-dark);
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-btn-reject:hover:not(:disabled) {
  background: var(--bg-subtle);
  color: var(--ink);
}

.ai-btn-next-batch {
  width: 100%;
  min-height: 42px;
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
  font-family: var(--sans);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
}
.ai-btn-next-batch:hover:not(:disabled) {
  background: #ccfbf1;
}

/* Completion Receipt Banner */
.ai-receipt-banner {
  padding: 1rem 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--ok-line);
  background: var(--ok-bg);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.ai-receipt-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 700;
  color: var(--ok);
  font-size: 0.92rem;
}
.ai-receipt-body {
  font-size: 0.85rem;
  color: var(--muted-dark);
}

/* Drawer Footer Prompt Input */
.ai-drawer-foot {
  padding: 0.9rem 1.25rem;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
}
.ai-prompt-form {
  display: flex;
  gap: 0.5rem;
  align-items: flex-end;
}
.ai-prompt-input {
  flex: 1;
  min-height: 44px;
  max-height: 110px;
  padding: 0.6rem 0.8rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.88rem;
  resize: vertical;
}
.ai-prompt-input:focus {
  outline: 2px solid var(--focus);
  outline-offset: 1px;
  background: var(--bg-2);
}
.ai-prompt-submit {
  min-height: 44px;
  padding: 0 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-family: var(--sans);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.ai-prompt-submit:hover:not(:disabled) {
  background: var(--accent-hover);
}
.ai-prompt-submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

@media (max-width: 768px) {
  .ai-drawer-panel {
    max-width: 100%;
  }
  .ai-proposal-toolbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
  }
  .ai-proposal-primary-row {
    flex-direction: column;
    align-items: stretch;
  }
  .ai-btn-approve,
  .ai-btn-reject {
    width: 100%;
  }
}

/* Customer Tags in Leads Table & Popover */
.lead-chip-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.73rem;
  font-weight: 500;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 0.12rem 0.45rem;
  border-radius: 4px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
}
.lead-chip-tag:hover {
  background: #ccfbf1;
  border-color: #99f6e4;
  color: #115e59;
}
.lead-chip-tag.active {
  background: #0f766e;
  color: #ffffff;
  border-color: #0f766e;
}
.lead-chip-tag .chip-tag-icon {
  display: flex;
  align-items: center;
}
.lead-tag-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px dashed var(--line-strong, #cbd5e1);
  padding: 0.1rem 0.38rem;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
  line-height: 1.2;
}
.lead-tag-add-btn:hover {
  color: var(--ink);
  border-color: var(--accent, #0f766e);
  background: var(--bg-subtle, #f1f5f9);
}

.tag-popover-wrap {
  position: relative;
  display: inline-block;
}
.tag-picker-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 95;
  width: 260px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  padding: 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  animation: statusFadeIn 0.12s ease-out;
}
.tag-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.35rem;
}
.tag-picker-head span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
  text-transform: uppercase;
}
.tag-picker-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}
.tag-picker-close:hover {
  color: var(--ink);
}
.tag-picker-current {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  min-height: 22px;
}
.tag-picker-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.72rem;
  font-weight: 500;
  color: #0f766e;
  background: #f0fdfa;
  border: 1px solid #ccfbf1;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}
.tag-picker-chip button {
  background: transparent;
  border: 0;
  color: #0d9488;
  cursor: pointer;
  padding: 0;
  font-size: 0.75rem;
  line-height: 1;
}
.tag-picker-chip button:hover {
  color: var(--danger, #dc2626);
}
.tag-picker-empty {
  font-size: 0.75rem;
  color: var(--muted);
  font-style: italic;
}
.tag-picker-options {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  max-height: 130px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0.25rem;
}
.tag-picker-opt {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.3rem 0.45rem;
  border: 0;
  background: transparent;
  border-radius: 4px;
  font-size: 0.78rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.tag-picker-opt:hover {
  background: var(--bg-subtle, #f1f5f9);
}
.tag-picker-opt.selected {
  background: #f0fdfa;
  color: #0f766e;
  font-weight: 600;
}
.tag-picker-create-row {
  display: flex;
  gap: 0.3rem;
}
.tag-picker-create-row input {
  flex: 1;
  min-width: 0;
  height: 28px;
  font-size: 0.78rem;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--bg-2);
}
.tag-picker-create-row .btn {
  height: 28px;
  padding: 0.2rem 0.55rem;
  font-size: 0.75rem;
}

/* Leads Toolbar Right & Tag Filter */
.leads-toolbar-right {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.tag-filter-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.tag-filter-select {
  height: 38px;
  padding: 0 1.8rem 0 0.85rem;
  font-size: 0.84rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.7rem center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.tag-filter-select:hover {
  border-color: var(--line-strong, #cbd5e1);
}
.tag-filter-select:focus {
  border-color: var(--accent, #0f766e);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.12);
}

/* ==========================================================================
   Crisp Editorial Utility (Light Mode) — App-Wide Design System & Density
   ========================================================================== */

/* 1. Ergonomic Container Widths & Anchored Command Header Bar */
.shell-app main {
  width: min(1060px, calc(100% - 2rem));
  margin: 1.25rem auto 3.5rem;
}

.site-hub-main {
  width: min(920px, calc(100% - 2rem));
  max-width: 920px;
  margin: 1.25rem auto 3.5rem;
  padding: 0;
}

.top {
  padding: 0.65rem max(1.25rem, calc((100% - 1060px) / 2));
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
}

.page-head {
  align-items: center;
  padding-bottom: 0.9rem;
  margin: 0 0 1.15rem;
  border-bottom: 1px solid var(--line);
}

.page-head h1 {
  font-size: clamp(1.35rem, 2.2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0 0 0.2rem;
}

.page-head .lede {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--muted);
  max-width: 44rem;
}

/* 2. Pillar 1: Unified Flush Data Lists & Framed Tables */
.table-wrap:not(.import-table-wrap) {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  font-size: 0.88rem;
}

.table-wrap thead th {
  background: #f8fafc;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table-wrap tbody td {
  padding: 0.7rem 1rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

.table-wrap tbody tr:last-child td {
  border-bottom: 0;
}

.table-wrap tbody tr {
  transition: background-color 0.12s ease;
}

.table-wrap tbody tr:hover,
.table-stack tbody tr[data-href]:hover {
  background: #f8fafc;
}

.num,
td.num,
th.num {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

/* 3. Pillar 2: Single Primary Action Rule & Ghost Row Controls */
.btn-action-primary,
.row-edit-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.34rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--ink);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  text-decoration: none;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.14s ease;
}

.btn-action-primary:hover,
.row-edit-btn:hover,
tr[data-href]:hover .btn-action-primary,
tr[data-href]:hover .row-edit-btn,
.site-hub-card:hover .row-edit-btn {
  background: var(--accent-subtle);
  border-color: rgba(15, 118, 110, 0.35);
  color: var(--accent);
  text-decoration: none;
}

/* Site Hub (/pages): Convert Floating Wide Cards into a Unified Flush List */
.site-hub-group {
  padding: 1.1rem 1.25rem 1.25rem;
}

.site-cards-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  overflow: hidden;
}

.site-hub-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 1rem;
  background: var(--bg-2);
  border: 0;
  border-bottom: 1px solid #f1f5f9;
  border-radius: 0;
  box-shadow: none;
  cursor: pointer;
  transition: background-color 0.12s ease;
}

.site-hub-card:last-child {
  border-bottom: 0;
}

.site-hub-card:hover {
  background: #f8fafc;
  border-color: #f1f5f9;
  box-shadow: none;
}

.site-card-left {
  display: grid;
  grid-template-columns: minmax(180px, 1.35fr) minmax(160px, 1fr);
  align-items: center;
  gap: 0.5rem 1.25rem;
  flex: 1;
  min-width: 0;
}

.site-card-title {
  font-size: 0.92rem;
  font-weight: 600;
}

.site-card-meta {
  gap: 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.site-card-path {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--muted-dark);
}

/* 4. Pillar 3: De-Pilling Metadata, Neutral Data Links & Restrained Chips */
.data-link,
.table-wrap td a[href^="tel:"],
.table-wrap td a[href^="mailto:"] {
  color: var(--ink);
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  text-decoration: none;
  transition: color 0.12s ease;
}

.data-link:hover,
.table-wrap td a[href^="tel:"]:hover,
.table-wrap td a[href^="mailto:"]:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* De-pill form & referrer metadata in Leads table */
.lead-tags-row {
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.lead-form-tag,
.lead-ref-tag {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--muted-dark);
}

.lead-form-tag .icon-wrap,
.lead-ref-tag .icon-wrap {
  color: var(--muted);
}

.lead-form-tag + .lead-ref-tag::before {
  content: "·";
  color: var(--line-strong);
  margin-right: 0.35rem;
  font-weight: 700;
}

/* Restrained neutral customer tag chips */
.lead-chip-tag {
  color: var(--muted-dark);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 0.08rem 0.42rem;
  border-radius: 4px;
  font-size: 0.72rem;
}

.lead-chip-tag:hover {
  background: var(--accent-subtle);
  border-color: var(--accent-line);
  color: var(--accent);
}

/* Restrained Social Share Chips in Forms table */
.social-chip,
.social-chip.wa,
.social-chip.ig,
.social-chip.hub {
  color: var(--muted-dark);
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 0.18rem 0.48rem;
  font-size: 0.74rem;
  border-radius: 5px;
}

.social-chip.wa:hover {
  color: #15803d;
  border-color: #86efac;
  background: #f0fdf4;
}

.social-chip.ig:hover {
  color: #9d174d;
  border-color: #f9a8d4;
  background: #fdf2f8;
}

.social-chip.hub:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-subtle);
}

/* De-pill conversion rate tag in Forms table */
.conv-tag {
  background: transparent;
  border: 0;
  padding: 0;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.conv-tag::before {
  content: "· ";
  color: var(--line-strong);
  font-weight: 400;
}

/* Refined Status Badges (Sentence-case feel, less visual shouting) */
.status {
  font-size: 0.73rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
}

.badge.live,
.badge.draft {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.73rem;
  font-weight: 600;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
}

.badge.live {
  background: #f0fdf4;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.badge.draft {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
}

/* 5. Pillar 4: True Proportional Data Bar Funnel (/funnel) */
.funnel-hero-card {
  padding: 1.25rem 1.4rem;
}

.funnel-hero-head {
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
}

.funnel-visual-stack {
  max-width: 780px;
  margin: 0 auto;
  padding: 0.25rem 0 0.5rem;
}

.funnel-tier-row.tier-stage-1,
.funnel-tier-row.tier-stage-2,
.funnel-tier-row.tier-stage-3,
.funnel-tier-row.tier-stage-4,
.funnel-tier-row.tier-stage-5 {
  max-width: 100%;
}

.funnel-tier-card {
  padding: 0.75rem 1.15rem;
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

.funnel-tier-card.accent-sky {
  background: linear-gradient(90deg, rgba(224, 242, 254, 0.55) var(--stage-pct, 100%), #ffffff var(--stage-pct, 100%));
}

.funnel-tier-card.accent-teal {
  background: linear-gradient(90deg, rgba(204, 251, 241, 0.55) var(--stage-pct, 50%), #ffffff var(--stage-pct, 50%));
}

.funnel-tier-card.accent-emerald {
  background: linear-gradient(90deg, rgba(209, 250, 229, 0.55) var(--stage-pct, 35%), #ffffff var(--stage-pct, 35%));
}

.funnel-tier-card.accent-indigo {
  background: linear-gradient(90deg, rgba(224, 231, 255, 0.55) var(--stage-pct, 20%), #ffffff var(--stage-pct, 20%));
}

.funnel-tier-card.accent-gold {
  background: linear-gradient(90deg, rgba(220, 252, 231, 0.65) var(--stage-pct, 10%), #ffffff var(--stage-pct, 10%));
}

.funnel-transition-gate {
  padding: 0.2rem 0;
}

.gate-line {
  height: 8px;
  margin-bottom: 0.15rem;
}

.gate-pill {
  padding: 0.12rem 0.5rem;
  font-size: 0.7rem;
}

/* 6. Pillar 5: Mobile-First & Touch Ergonomics Audit Fixes */
@media (max-width: 768px) {
  .shell-app main,
  .site-hub-main {
    width: calc(100% - 1.5rem);
    margin: 1rem auto 3rem;
  }

  .page-head {
    padding-bottom: 0.75rem;
    margin-bottom: 1rem;
  }

  /* Prevent iOS Safari auto-zoom on form controls */
  input,
  select,
  textarea,
  .leads-search-input,
  .tag-filter-select,
  .funnel-control-left select {
    font-size: 16px !important;
  }

  .leads-search-input,
  .tag-filter-select {
    min-height: 42px;
  }

  /* Mobile Stacked Table Cards: Clean Unnested Surface & Left-Aligned Card Header */
  .table-wrap:not(.import-table-wrap) {
    background: transparent;
    border: 0;
    box-shadow: none;
    border-radius: 0;
    overflow-x: visible;
  }

  .table-stack tbody tr {
    padding: 0.85rem 1rem;
    margin-bottom: 0.65rem;
    background: var(--bg-2);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
  }

  .table-stack tbody td {
    padding: 0.35rem 0;
    border-bottom: 0;
  }

  .table-stack tbody td:first-child {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding-bottom: 0.6rem;
    margin-bottom: 0.25rem;
    border-bottom: 1px solid #f1f5f9;
  }

  .table-stack tbody td:first-child::before {
    display: none;
  }

  .table-stack tbody td .lead-user-cell {
    justify-content: flex-start;
    text-align: left;
    width: 100%;
  }

  /* Touch-friendly tap targets on mobile */
  .action-btn-icon {
    width: 38px;
    height: 38px;
  }

  .social-chip,
  .social-chip.wa,
  .social-chip.ig,
  .social-chip.hub {
    min-height: 36px;
    padding: 0.3rem 0.65rem;
  }

  .btn-action-primary,
  .row-edit-btn {
    min-height: 38px;
    padding: 0.4rem 0.85rem;
  }

  /* Site Hub (/pages) mobile stack */
  .site-card-left {
    grid-template-columns: 1fr;
    gap: 0.35rem;
    width: 100%;
  }

  .site-hub-card {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.85rem 1rem;
  }

  .site-card-actions {
    width: 100%;
    justify-content: flex-end;
    padding-top: 0.45rem;
    border-top: 1px solid #f1f5f9;
  }

  /* Funnel mobile controls */
  .funnel-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    padding: 0.75rem 0.9rem;
  }

  .funnel-control-left,
  .funnel-control-right,
  .funnel-control-left .select-wrap,
  .funnel-control-left select {
    width: 100%;
  }

  .funnel-time-segmented {
    width: 100%;
    justify-content: space-between;
  }

  .segmented-pill {
    flex: 1;
    text-align: center;
    min-height: 38px;
  }

  .funnel-hero-card {
    padding: 1rem;
  }

  .funnel-kpi-group {
    width: 100%;
  }

  .funnel-kpi-item {
    flex: 1;
  }
}


/* ==========================================================================
   Modern Landing Page Blocks (Hero, Features, Stats, Testimonials, Steps)
   ========================================================================== */

/* Split Hero Section */
.offer-hero-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  align-items: center;
  margin: 1.5rem 0 3.5rem;
  padding: 1.5rem 0;
}
@media (min-width: 860px) {
  .offer-hero-split {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3.5rem;
    padding: 2.5rem 0 3.5rem;
  }
}
.offer-hero-split.hero-media-none,
.offer-hero-split.no-media {
  grid-template-columns: minmax(0, 1fr);
  max-width: 56rem;
  margin-inline: auto;
  text-align: center;
}
.offer-hero-split.hero-media-none .offer-hero-actions,
.offer-hero-split.no-media .offer-hero-actions {
  justify-content: center;
}
.offer-hero-content,
.offer-hero-left {
  display: flex;
  flex-direction: column;
}
.offer-hero-eyebrow {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  border-radius: 999px;
  margin-bottom: 1.15rem;
}
.offer-hero-split.hero-media-none .offer-hero-eyebrow,
.offer-hero-split.no-media .offer-hero-eyebrow {
  align-self: center;
}
.offer-hero-title {
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin: 0 0 1.1rem;
}
.offer-hero-subhead,
.offer-hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  line-height: 1.6;
  color: var(--muted);
  margin: 0 0 2rem;
}
.offer-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  align-items: center;
}
.offer-hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.65rem;
  font-size: 1.05rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.offer-hero-cta.primary,
.offer-btn-primary.offer-hero-cta {
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
  border: 1px solid var(--accent);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.22), 0 1px 2px oklch(0.19 0.02 210 / 0.08);
}
.offer-hero-cta.primary:hover,
.offer-btn-primary.offer-hero-cta:hover {
  background: var(--accent-hover);
  color: var(--accent-ink, #ffffff);
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 oklch(1 0 0 / 0.28), 0 4px 12px oklch(0.19 0.02 210 / 0.12);
}
.offer-hero-cta.secondary {
  background: var(--bg-2);
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.offer-hero-cta.secondary:hover {
  background: var(--bg-subtle);
  transform: translateY(-1px);
}
.offer-hero-media {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.offer-hero-img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
  border-radius: var(--radius-lg, 16px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--line);
}
.offer-hero-video-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius-lg, 16px);
  overflow: hidden;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.12);
  border: 1px solid var(--line);
}
.offer-hero-video-box iframe,
.offer-hero-video-box video {
  width: 100%;
  height: 100%;
  border: 0;
}

/* Features Grid Section */
.offer-features-section {
  margin: 3.5rem 0;
}
.offer-section-header {
  text-align: center;
  max-width: 44rem;
  margin: 0 auto 2.5rem;
}
.offer-section-header h2,
.offer-section-title {
  font-size: clamp(1.65rem, 3.5vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin: 0 0 0.65rem;
  text-align: center;
}
.offer-section-header p,
.offer-section-subhead {
  font-size: 1.05rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 2rem;
  text-align: center;
}
.offer-features-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .offer-features-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .offer-features-grid.cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 960px) {
  .offer-features-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}
.offer-feature-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.offer-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-color: var(--line-strong);
}
.offer-feature-icon-box,
.offer-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--accent-subtle);
  color: var(--accent);
  margin-bottom: 1.25rem;
  border: 1px solid var(--accent-line);
}
.offer-feature-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
  letter-spacing: -0.015em;
}
.offer-feature-desc {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* Stats / Metrics Bar */
.offer-stats-section {
  margin: 3.5rem 0;
  padding: 2.5rem 1.5rem;
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 16px);
}
.offer-stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 540px) {
  .offer-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 860px) {
  .offer-stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 2.5rem;
  }
}
.offer-stat-item,
.offer-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.offer-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  margin-bottom: 0.5rem;
}
.offer-stat-value {
  font-size: clamp(2.25rem, 4vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink);
  line-height: 1.1;
  margin-bottom: 0.4rem;
}
.offer-stat-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  line-height: 1.4;
}

/* Testimonials Grid */
.offer-testimonials-section {
  margin: 3.5rem 0;
}
.offer-testimonials-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
@media (min-width: 640px) {
  .offer-testimonials-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (min-width: 720px) {
  .offer-testimonials-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}
.offer-testimonial-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.offer-testimonial-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
  border-color: var(--line-strong);
}
.offer-testimonial-rating,
.offer-stars-row {
  display: flex;
  gap: 0.25rem;
  color: #f59e0b;
  margin-bottom: 1rem;
}
.offer-stars-row .star-filled,
.offer-testimonial-rating .star-filled {
  color: #f59e0b;
}
.offer-stars-row .star-filled svg,
.offer-testimonial-rating .star-filled svg {
  fill: currentColor;
  stroke: currentColor;
}
.offer-stars-row .star-empty svg,
.offer-testimonial-rating .star-empty svg {
  fill: none;
  stroke: currentColor;
}
.offer-stars-row .star-empty {
  color: var(--line, #cbd5e1);
  opacity: 0.5;
}
.offer-testimonial-badge,
.offer-verified-badge {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-subtle);
  color: var(--accent);
  border: 1px solid var(--accent-line);
}
.offer-testimonial-text {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0 0 1.25rem;
  flex-grow: 1;
  font-style: italic;
}
.offer-testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: auto;
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.offer-testimonial-avatar,
.offer-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1rem;
  flex-shrink: 0;
}
.offer-testimonial-meta,
.offer-author-meta {
  display: flex;
  flex-direction: column;
}
.offer-testimonial-name,
.offer-author-name {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--ink);
}
.offer-testimonial-role,
.offer-author-role {
  font-size: 0.82rem;
  color: var(--muted);
}

/* Steps / Process Section */
.offer-steps-section {
  margin: 3.5rem 0;
}
.offer-steps-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  position: relative;
}
@media (min-width: 768px) {
  .offer-steps-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
  }
}
.offer-step-card {
  display: flex;
  flex-direction: column;
  padding: 1.75rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg, 14px);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.offer-step-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  border-color: var(--line-strong);
}
.offer-step-num,
.offer-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink, #ffffff);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 32%, transparent);
}
.offer-step-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0 0 0.5rem;
}
.offer-step-desc,
.offer-step-text {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--muted);
  margin: 0;
}

/* In-Editor Icon Picker Modal & Sub-item Card Styles */
.lp-icon-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 29, 28, 0.44);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lp-icon-modal-card {
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg, 14px);
  width: min(38rem, 100%);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}
.lp-icon-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line);
}
.lp-icon-modal-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
}
.lp-icon-modal-body {
  padding: 1.25rem 1.4rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.lp-icon-modal-search {
  width: 100%;
}
.lp-icon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 0.65rem;
}
.lp-icon-pick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.75rem 0.4rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  font-size: 0.72rem;
  text-align: center;
  line-height: 1.2;
}
.lp-icon-pick-item:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}
.lp-icon-pick-item.is-selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.lp-icon-pick-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.85rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  font-size: 0.88rem;
  cursor: pointer;
  transition: all 0.15s ease;
}
.lp-icon-pick-btn:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}
.lp-card-item-box {
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 0.75rem;
  position: relative;
}
.lp-card-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.75rem;
  font-weight: 600;
  font-size: 0.88rem;
}
.lp-card-item-del {
  background: transparent;
  border: none;
  color: var(--danger, #ef4444);
  cursor: pointer;
  padding: 0.2rem;
  border-radius: 4px;
}
.lp-card-item-del:hover {
  background: rgba(239, 68, 68, 0.1);
}

/* Modern Block Editor Form Controls & In-Editor Live Canvas Enhancements */
.lp-block-hero-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.lp-card-item-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}
@media (min-width: 600px) {
  .lp-card-item-row {
    grid-template-columns: 1fr 1fr;
  }
}
.lp-add-subitem-btn {
  margin-top: 0.5rem;
  width: 100%;
  border: 1px dashed var(--line-strong);
  color: var(--accent);
  padding: 0.55rem;
  border-radius: var(--radius);
  font-weight: 600;
  cursor: pointer;
  background: var(--bg-2);
  transition: all 0.15s ease;
}
.lp-add-subitem-btn:hover {
  background: var(--accent-subtle);
  border-color: var(--accent);
  border-style: solid;
}

.form-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.canvas-meta-stats {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.canvas-meta-stats .page-word-count {
  display: inline-block !important;
  font-weight: 500;
}

.auto-run-history-list { display: grid; gap: 0.75rem; }
.auto-run-entry { padding: 1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-2); }
.auto-run-head { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem 0.75rem; }
.auto-run-head > span:nth-child(2) { color: var(--muted); font-size: 0.88rem; }
.auto-run-status { margin-left: auto; padding: 0.2rem 0.55rem; border-radius: 999px; background: var(--ok-bg); color: var(--ok); font-size: 0.78rem; font-weight: 650; }
.auto-run-status.failed { background: var(--danger-bg); color: var(--danger); }
.auto-run-steps { display: grid; gap: 0.35rem; margin: 0.75rem 0 0; padding-left: 1.25rem; color: var(--muted-dark); font-size: 0.9rem; }
.auto-run-steps li.failed { color: var(--danger); }
.follow-up-date { white-space: nowrap; }

@media (max-width: 600px) {
  .auto-run-status { margin-left: 0; }
}

/* ========================================================================
   Satış Panosu (Pipeline / Kanban) Styles — Sleek, Responsive, Zero-Horizontal Scroll
   ======================================================================== */

.pipeline-main {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 1.25rem 1.5rem 1.5rem;
  box-sizing: border-box;
}

.pipeline-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 0.85rem;
}

.pipeline-title-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.pipeline-title-group h1 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pipeline-count-pill {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent, #0d9488);
  background: var(--accent-subtle, #f0fdfa);
  border: 1px solid rgba(13, 148, 136, 0.2);
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pipeline-header-actions {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pipeline-header-actions .btn.active-filter {
  background: var(--accent-subtle, #f0fdfa);
  border-color: var(--accent, #0d9488);
  color: var(--accent, #0d9488);
}

.pipeline-filters-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.pipeline-search-box {
  position: relative;
  flex: 1 1 260px;
  max-width: 440px;
}

.pipeline-search-input {
  width: 100%;
  height: 38px;
  padding: 0 1rem 0 2.25rem;
  font-size: 0.84rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.pipeline-filters-right {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.pipeline-select-filter {
  height: 38px;
  padding: 0 1.8rem 0 0.85rem;
  font-size: 0.82rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-2);
  color: var(--ink);
  cursor: pointer;
  outline: none;
  font-family: inherit;
  transition: border-color 0.15s ease;
}

.pipeline-select-filter:focus {
  border-color: var(--accent);
}

/* Kanban Board Container & Grid */
.pipeline-board-container {
  width: 100%;
  box-sizing: border-box;
}

.pipeline-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.85rem;
  width: 100%;
  box-sizing: border-box;
  align-items: stretch;
}

.pipeline-board.hide-closed {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pipeline-col {
  background: #f8fafc;
  border: 1px solid var(--line, #e2e8f0);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  min-height: 480px;
  max-height: 840px;
  box-sizing: border-box;
  overflow: hidden;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.pipeline-col.drag-over {
  border-color: var(--accent, #0d9488);
  background: #f0fdfa;
  box-shadow: 0 0 0 2px rgba(13, 148, 136, 0.2), 0 4px 12px rgba(13, 148, 136, 0.08);
}

.pipeline-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2, #ffffff);
  border-radius: 10px 10px 0 0;
  user-select: none;
  flex-shrink: 0;
}

.pipeline-col-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.pipeline-col-title {
  font-weight: 650;
  font-size: 0.86rem;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pipeline-col-count {
  font-size: 0.72rem;
  font-weight: 650;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid var(--line);
  flex-shrink: 0;
}

/* Card List with Sleek Subtle Scrollbar */
.pipeline-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: 0.65rem;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 100px;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.3) transparent;
}

.pipeline-card-list::-webkit-scrollbar {
  width: 4px;
}
.pipeline-card-list::-webkit-scrollbar-track {
  background: transparent;
}
.pipeline-card-list::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.28);
  border-radius: 999px;
}
.pipeline-card-list::-webkit-scrollbar-thumb:hover {
  background: rgba(100, 116, 139, 0.5);
}

.pipeline-col-empty {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  padding: 2.5rem 0.5rem;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  background: rgba(248, 250, 252, 0.6);
  user-select: none;
  margin: auto 0;
}

/* Pipeline Card */
.pipeline-card {
  background: #ffffff;
  border: 1px solid var(--line, #e2e8f0);
  border-left: 3.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
  cursor: grab;
  user-select: none;
  box-sizing: border-box;
  position: relative;
  min-width: 0;
}

.pipeline-card.pipeline-card-new { border-left-color: #0284c7; }
.pipeline-card.pipeline-card-contacted { border-left-color: #d97706; }
.pipeline-card.pipeline-card-qualified { border-left-color: #9333ea; }
.pipeline-card.pipeline-card-won { border-left-color: #16a34a; }
.pipeline-card.pipeline-card-lost { border-left-color: #dc2626; }

.pipeline-card:hover {
  border-color: #94a3b8;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
  transform: translateY(-1.5px);
}

.pipeline-card.is-dragging {
  opacity: 0.35;
  transform: scale(0.97) rotate(-1deg);
  border: 1.5px dashed var(--accent, #0d9488);
  box-shadow: none;
}

/* Global drag active: disable child pointer events to avoid drag flicker */
body.is-dragging-global .pipeline-card * {
  pointer-events: none !important;
}
body.is-dragging-global .pipeline-card {
  cursor: grabbing !important;
}

.pipeline-drop-slot {
  height: 52px;
  border: 2px dashed var(--accent, #0d9488);
  border-radius: 8px;
  background: rgba(13, 148, 136, 0.06);
  margin: 0.2rem 0;
  pointer-events: none;
  box-sizing: border-box;
  animation: slotFadeIn 0.12s ease-out;
}
@keyframes slotFadeIn {
  from { opacity: 0; transform: scaleY(0.7); }
  to { opacity: 1; transform: scaleY(1); }
}

/* Card Content Rows */
.pipeline-card-meta-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  font-size: 0.72rem;
  min-width: 0;
}

.pipeline-card-src {
  font-size: 0.68rem;
  font-weight: 600;
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
  border-radius: 4px;
  padding: 0.12rem 0.45rem;
  white-space: nowrap;
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.pipeline-card-time {
  font-size: 0.7rem;
  color: #94a3b8;
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
}

.pipeline-card-name {
  display: block;
  width: 100%;
  font-size: 0.94rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
  margin: 0.1rem 0 0.05rem;
  box-sizing: border-box;
}

.pipeline-card-name:hover {
  color: var(--accent, #0d9488);
  text-decoration: underline;
}

.pipeline-card-contact {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-size: 0.78rem;
  min-width: 0;
}

.pipeline-phone-link {
  color: #0f172a;
  text-decoration: none;
  font-weight: 550;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: fit-content;
}

.pipeline-phone-link:hover {
  color: var(--accent, #0d9488);
}

.pipeline-email-text {
  font-size: 0.73rem;
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: block;
  max-width: 100%;
}

.pipeline-card-note {
  font-size: 0.75rem;
  color: #475569;
  line-height: 1.35;
  background: #f8fafc;
  padding: 0.35rem 0.55rem;
  border-radius: 6px;
  border: 1px solid #f1f5f9;
  border-left: 2.5px solid var(--accent, #0d9488);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  word-break: break-word;
}

.pipeline-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-top: 0.15rem;
}

.pipeline-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.pipeline-tags-wrap .lead-chip-tag {
  font-size: 0.68rem;
  padding: 0.1rem 0.4rem;
  border-radius: 4px;
}

.pipeline-follow-badge {
  font-size: 0.7rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.12rem 0.45rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  white-space: nowrap;
}

.pipeline-follow-badge.overdue {
  color: #b91c1c;
  background: #fef2f2;
  border-color: #fecaca;
}

.pipeline-follow-badge.today {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

.pipeline-follow-badge.upcoming {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.pipeline-card-bottom {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 0.25rem;
  padding-top: 0.45rem;
  border-top: 1px solid #f1f5f9;
}

.pipeline-stage-pill {
  width: 100%;
  font-size: 0.74rem;
  font-family: inherit;
  font-weight: 600;
  border-radius: 6px;
  padding: 0.28rem 0.6rem;
  cursor: pointer;
  outline: none;
  transition: all 0.12s ease;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 0.65rem;
  padding-right: 1.5rem;
  text-align: left;
  border: 1px solid transparent;
}

.pipeline-stage-pill.stage-new {
  color: #0369a1;
  background-color: #f0f9ff;
  border-color: #bae6fd;
}
.pipeline-stage-pill.stage-contacted {
  color: #b45309;
  background-color: #fffbeb;
  border-color: #fde68a;
}
.pipeline-stage-pill.stage-qualified {
  color: #7e22ce;
  background-color: #faf5ff;
  border-color: #e9d5ff;
}
.pipeline-stage-pill.stage-won {
  color: #15803d;
  background-color: #f0fdf4;
  border-color: #bbf7d0;
}
.pipeline-stage-pill.stage-lost {
  color: #b91c1c;
  background-color: #fef2f2;
  border-color: #fecaca;
}

.pipeline-stage-pill:hover {
  filter: brightness(0.96);
}

/* Responsive Breakpoints: Tablet & Mobile */
@media (max-width: 1080px) {
  .pipeline-board-container {
    overflow-x: auto;
    padding-bottom: 0.85rem;
    -webkit-overflow-scrolling: touch;
  }
  .pipeline-board {
    display: flex;
    min-width: min-content;
    gap: 0.85rem;
  }
  .pipeline-col {
    flex: 0 0 275px;
    width: 275px;
    height: calc(100vh - 220px);
  }
}

@media (max-width: 768px) {
  .pipeline-main {
    padding: 1rem 0.85rem 1.5rem;
  }
  .pipeline-header-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .pipeline-header-actions {
    justify-content: space-between;
  }
  .pipeline-filters-bar {
    flex-direction: column;
    align-items: stretch;
  }
  .pipeline-search-box {
    max-width: 100%;
  }
  .pipeline-filters-right {
    width: 100%;
    justify-content: flex-start;
  }
  .pipeline-select-filter {
    flex: 1 1 140px;
  }
  .pipeline-col {
    flex: 0 0 260px;
    width: 260px;
  }
  .pipeline-drawer {
    width: 100vw;
    max-width: 100vw;
  }
}

/* ==========================================================================
   Client Dossier, Native Documents & AI Brief Styles
   ========================================================================== */

/* AI Brief Card */
.lead-brief-card {
  background: linear-gradient(180deg, #f0fdf4 0%, #f8fafc 100%);
  border: 1px solid #bbf7d0;
  border-radius: 12px;
  box-shadow: 0 4px 16px -2px rgba(16, 185, 129, 0.08);
  margin: 1rem 0 1.25rem;
  overflow: hidden;
}

.lead-brief-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.15rem;
  background: #ffffff;
  border-bottom: 1px solid #e2e8f0;
}

.lead-brief-title-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  color: #0f172a;
}

.brief-sparkle-icon {
  font-size: 1.1rem;
}

.brief-source-tag {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.lead-brief-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.btn-brief-close {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.btn-brief-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.lead-brief-body {
  padding: 1.1rem 1.35rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #1e293b;
}

.lead-brief-body h2,
.lead-brief-body h3,
.lead-brief-body h4 {
  margin: 0.85rem 0 0.35rem;
  color: #0f172a;
  font-weight: 700;
}
.lead-brief-body h2:first-child,
.lead-brief-body h3:first-child,
.lead-brief-body h4:first-child {
  margin-top: 0;
}

.lead-brief-body .brief-ul {
  margin: 0.35rem 0 0.75rem 1.25rem;
  padding: 0;
}
.lead-brief-body .brief-ul li {
  margin-bottom: 0.25rem;
}
.lead-brief-body .brief-p {
  margin: 0 0 0.6rem;
}

/* Living Dossier */
.lead-panel-dossier {
  border-top: 2px solid var(--accent);
}

.dossier-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.dossier-save-badge {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-subtle);
  transition: all 0.2s ease;
}
.dossier-save-badge.saving {
  color: var(--accent);
  background: var(--accent-subtle);
}
.dossier-save-badge.saved {
  color: #16a34a;
  background: #dcfce7;
  font-weight: 600;
}

.dossier-editor-wrap {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.dossier-interactive-todos {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.65rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.dossier-todo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
}
.dossier-todo-item input[type="checkbox"] {
  margin-top: 3px;
  cursor: pointer;
  accent-color: var(--accent);
}
.dossier-todo-item.is-done {
  text-decoration: line-through;
  opacity: 0.55;
  color: var(--muted);
}

#lead-dossier-textarea {
  width: 100%;
  box-sizing: border-box;
  min-height: 120px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  padding: 0.75rem 0.85rem;
  font-family: inherit;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink);
  resize: vertical;
}
#lead-dossier-textarea:focus-visible,
#lead-dossier-textarea:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  box-shadow: none;
}

/* Client Documents Library */
.lead-panel-docs {
  border-top: 2px solid var(--accent);
}

.doc-dropzone {
  border: 2px dashed var(--line-strong);
  border-radius: 10px;
  padding: 1.25rem 1rem;
  text-align: center;
  background: var(--bg);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
  margin-bottom: 0.65rem;
}
.doc-dropzone:hover,
.doc-dropzone.drag-over {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.dropzone-icon {
  font-size: 1.8rem;
  display: block;
  margin-bottom: 0.25rem;
}

.dropzone-text {
  margin: 0;
  font-size: 0.88rem;
  color: var(--ink);
}

.dropzone-meta {
  margin: 0.2rem 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.dropzone-selected {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  font-size: 0.85rem;
  color: var(--accent-hover);
  font-weight: 500;
}

.btn-clear-selection {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  color: #64748b;
}

.doc-meta-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.65rem;
  flex-wrap: wrap;
}
.doc-meta-row input {
  flex: 1 1 200px;
}
.doc-actions-row {
  display: flex;
  gap: 0.35rem;
}

.lead-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.lead-doc-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lead-doc-item:hover {
  border-color: #cbd5e1;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.doc-item-icon {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
}
.doc-item-icon.is-pdf {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}
.doc-item-icon.is-img {
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

.doc-item-info {
  flex: 1;
  min-width: 0;
}

.doc-item-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.doc-item-meta {
  font-size: 0.75rem;
  color: #64748b;
  margin-top: 2px;
}

.doc-item-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
}

.btn-danger-soft {
  color: #dc2626 !important;
}
.btn-danger-soft:hover {
  background: #fee2e2 !important;
  border-color: #fca5a5 !important;
}

/* ==========================================================================
   Pipeline Slide-Over Drawers (Quick Dossier & Playbook)
   ========================================================================== */

.pipeline-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 29, 28, 0.44);
  z-index: 999;
  transition: opacity 0.2s ease;
}

.pipeline-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 92vw;
  background: #ffffff;
  z-index: 1000;
  box-shadow: -8px 0 28px -4px rgba(0, 0, 0, 0.16);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}

.pipeline-drawer.open {
  transform: translateX(0);
}

.pipeline-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
  flex-shrink: 0;
}

.pipeline-drawer-header h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.drawer-header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-drawer-close {
  background: transparent;
  border: none;
  font-size: 1.25rem;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}
.btn-drawer-close:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.pipeline-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.pipeline-drawer-body::-webkit-scrollbar {
  width: 4px;
}
.pipeline-drawer-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.pdd-stage-badge {
  display: inline-block;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 600;
  margin-top: 4px;
  background: #e2e8f0;
  color: #475569;
}
.pdd-stage-badge.status-new { background: #e0f2fe; color: #0369a1; }
.pdd-stage-badge.status-contacted { background: #fef3c7; color: #b45309; }
.pdd-stage-badge.status-qualified { background: #f3e8ff; color: #7e22ce; }
.pdd-stage-badge.status-won { background: #dcfce7; color: #15803d; }
.pdd-stage-badge.status-lost { background: #fee2e2; color: #b91c1c; }

.pdd-quick-contacts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.btn-wa-soft {
  color: #15803d !important;
  border-color: #bbf7d0 !important;
  background: #f0fdf4 !important;
}
.btn-wa-soft:hover {
  background: #dcfce7 !important;
}

.pdd-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.pdd-section h3 {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #334155;
}

.pdd-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.pdd-kv {
  margin: 0;
  font-size: 0.82rem;
}
.pdd-kv div {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px dashed #f1f5f9;
}
.pdd-kv dt {
  color: #64748b;
  font-weight: 500;
}
.pdd-kv dd {
  margin: 0;
  color: #0f172a;
  font-weight: 600;
  text-align: right;
}

.pdd-todos-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.pdd-todo-item {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: #334155;
  cursor: pointer;
  user-select: none;
}
.pdd-todo-item input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
  accent-color: var(--accent);
}
.pdd-todo-item.is-done {
  text-decoration: line-through;
  opacity: 0.55;
}

#pdd-notes-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-family: inherit;
  font-size: 0.85rem;
  line-height: 1.5;
  resize: vertical;
}
#pdd-notes-input:focus-visible,
#pdd-notes-input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.pdd-docs-list {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

/* Playbook Drawer */
.playbook-search-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
}
.playbook-search-row input:focus-visible,
.playbook-search-row input:focus {
  border-color: var(--accent);
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.playbook-items-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.playbook-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  transition: border-color 0.15s ease;
}
.playbook-card:hover {
  border-color: #cbd5e1;
}

.playbook-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}
.playbook-card-head h4 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: #0f172a;
}

.playbook-copy-btn {
  font-size: 0.78rem;
  padding: 2px 8px;
}

.playbook-card-body {
  font-size: 0.85rem;
  line-height: 1.55;
  color: #475569;
  white-space: pre-wrap;
}

/* Minimum 24x24px Hit Targets for Compact Actions */
.tag-remove,
.tag-pill-remove,
.btn-clear-selection,
.btn-drawer-close,
.status-pill-close,
.row-action-btn-compact {
  min-width: 24px;
  min-height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ==========================================================================
   Accessibility Gates (WCAG 2.2 AAA / AA Compliance)
   ========================================================================== */

/* Reduced Transparency: Disable all glass filters and replace with opaque surfaces */
/* Button Active Physics */
.btn:active {
  transform: scale(0.985);
}
.btn {
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.1s var(--ease-spring, ease), box-shadow 0.15s ease;
}

/* Universal Non-blocking Notification Toast */
.alf-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #ffffff;
  padding: 0.65rem 1.15rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.2s var(--ease-spring), opacity 0.2s ease;
  z-index: 100000;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.alf-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}
.alf-toast.is-error {
  background: var(--danger, #dc2626);
  color: #ffffff;
}

/* Two-step inline confirmation active state */
.btn-confirm-active {
  background: var(--danger, #dc2626) !important;
  color: #ffffff !important;
  border-color: var(--danger, #dc2626) !important;
  font-weight: 600 !important;
}

/* Layout-Stable AI Skeletons (CLS < 0.05) */
.ai-skeleton-wrap {
  min-height: 136px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 0.5rem 0;
}
.ai-skeleton-line {
  height: 14px;
  background: linear-gradient(90deg, var(--bg-muted) 25%, var(--bg-subtle) 50%, var(--bg-muted) 75%);
  background-size: 200% 100%;
  animation: skeletonPulse 1.4s ease-in-out infinite;
  border-radius: 4px;
}
.ai-skeleton-line.w-80 { width: 80%; }
.ai-skeleton-line.w-60 { width: 60%; }
.ai-skeleton-line.w-95 { width: 95%; }
.ai-skeleton-line.w-40 { width: 40%; }

@keyframes skeletonPulse {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Source Citation Chips */
.brief-citations-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px dashed var(--line);
  flex-wrap: wrap;
}
.brief-citation-label {
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.brief-citation-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.74rem;
  color: var(--accent);
  background: var(--accent-subtle);
  border: 1px solid var(--accent-line);
  padding: 2px 7px;
  border-radius: 999px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 500;
}
.brief-citation-chip:hover {
  background: var(--accent-line);
  text-decoration: none;
}

/* Universal <dialog id="alf-omnibox"> */
#alf-omnibox {
  position: fixed;
  top: 15vh;
  margin: 0 auto;
  width: min(540px, 94vw);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px -8px rgba(15, 23, 42, 0.22);
  padding: 0;
  overflow: hidden;
  color: var(--ink);
  z-index: 10000;
}
#alf-omnibox::backdrop {
  background: rgba(15, 29, 28, 0.44);
}
.omnibox-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--line);
  background: var(--bg-2);
}
.omnibox-head svg {
  color: var(--muted);
  flex-shrink: 0;
}
.omnibox-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  color: var(--ink);
  outline: none;
  font-family: inherit;
}
.omnibox-esc-badge {
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--muted);
  background: var(--bg-subtle);
  border: 1px solid var(--line);
  padding: 2px 5px;
  border-radius: 4px;
}
.omnibox-list {
  max-height: 320px;
  overflow-y: auto;
  padding: 0.4rem 0;
  display: flex;
  flex-direction: column;
}
.omnibox-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.6rem 1rem;
  text-decoration: none;
  color: var(--ink);
  font-size: 0.88rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.1s ease;
}
.omnibox-item:hover,
.omnibox-item.is-selected {
  background: var(--bg-subtle);
  color: var(--accent-hover);
}
.omnibox-item-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.omnibox-item-left svg {
  color: var(--muted);
}
.omnibox-item.is-selected .omnibox-item-left svg {
  color: var(--accent);
}
.omnibox-item-hint {
  font-size: 0.75rem;
  color: var(--muted);
}
.omnibox-empty {
  padding: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: var(--muted);
}

@media (prefers-reduced-transparency: reduce) {
  .top,
  .public-header,
  .public-site-header,
  .command-bar,
  .modal-backdrop,
  .ai-drawer-backdrop,
  .pipeline-drawer-backdrop,
  .lp-icon-modal-overlay,
  .alf-chat-window {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: var(--bg-2) !important;
  }
}

/* Contrast Boost: Enforce high-contrast borders and foreground ink */
@media (prefers-contrast: more) {
  :root,
  body:is(.shell-app, .shell-guest, .shell-public) {
    --line: #000000;
    --line-strong: #000000;
    --muted: #111111;
    --muted-dark: #000000;
    --shadow-sm: none;
    --shadow-card: none;
    --shadow-md: none;
    --shadow-dropdown: none;
  }
  .card, .panel, .top, .modal-card, .pipeline-drawer, .btn,
  .public-site-header, .offer-feature-card, .offer-pricing-card,
  .offer-testimonial-card, .offer-step-card, .offer-stat-card,
  .offer-faq-item, .offer-apply, .offer-btn, .choice-chips .pill.on {
    border-color: #000000 !important;
  }
}

/* Forced Colors (Windows High Contrast Mode) */
@media (forced-colors: active) {
  .btn-primary,
  .btn-accent,
  .tag-pill.active,
  .offer-btn-primary,
  .offer-hero-cta.primary,
  .choice-chips .pill.on,
  .public-header-cta,
  .offer-pricing-badge {
    forced-color-adjust: none;
    background-color: Highlight !important;
    color: HighlightText !important;
    border: 1px solid ButtonBorder !important;
  }
  .top, .command-bar, .card, .panel, .public-site-header,
  .offer-feature-card, .offer-pricing-card, .offer-apply {
    border: 1px solid ButtonBorder !important;
  }
}

/* Reduced Motion: Eliminate all non-essential movement and physics */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* View Transition Root Animation */
@view-transition {
  navigation: auto;
}



