/* ============ Portal theme tokens ============ */
:root {
  --lg-emerald: #059669;
  --lg-emerald-dark: #047857;
  --lg-ink: #0f172a;
}

/* App background: subtle gradient instead of flat gray */
#app-shell { background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%); min-height: 100vh; }

/* ============ Mobile responsiveness safeguards ============ */
/* Never allow the page to scroll sideways on small screens. */
html, body { max-width: 100%; overflow-x: hidden; }
@media (max-width: 640px) {
  /* Wide data tables become horizontally scrollable instead of breaking layout.
     (Report tables have their own .report-doc table rule — exclude them here.) */
  #app-shell table:not(.report-doc table) { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  /* Modal/drawer body: let long words/URLs wrap instead of forcing overflow. */
  #modal-body, #drawer-content { word-break: break-word; overflow-wrap: anywhere; }
  /* Comfortable tap targets for nav + primary buttons. */
  .mtab { min-height: 52px; }
}

/* ============ Contrast safety net ============
   Guard against "invisible text" bugs: form fields must always render dark text
   on their light background, even if a global reset or stray class strips color.
   Inputs/selects/textareas live on white cards throughout the app. */
input, select, textarea, .lg-input { color: #0f172a; }
input::placeholder, textarea::placeholder { color: #94a3b8; }
select option { color: #0f172a; background: #fff; }
/* Gradient-clipped headings can collapse to transparent on browsers that fail to
   support background-clip:text — give them a solid fallback color so text never
   disappears. The gradient still shows where supported. */
.lg-gradient-text, .lg-violet-text { color: #0f766e; }
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .lg-gradient-text, .lg-violet-text { color: transparent; }
}
/* Any element that explicitly opts into a white text color is fine; this only
   protects elements that accidentally end up with no readable color on white. */

/* ============ Tab navigation (desktop pill nav) ============ */
.tab-btn {
  color: #334155;
  background: transparent;
  position: relative;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  border-radius: 0.625rem;
  transition: color .2s ease, background .2s ease;
}
.tab-btn:hover { background: #f1f5f9; color: #0f172a; }
.tab-btn:active { transform: scale(.97); }
.tab-active {
  background: linear-gradient(135deg, #059669, #0d9488) !important;
  color: #fff !important;
  box-shadow: 0 6px 16px -6px rgba(5, 150, 105, .55);
  /* A gentle pop when a tab becomes active. */
  animation: lgtabpop .28s cubic-bezier(.2,.8,.3,1.1);
}
.tab-active .tab-count { background: rgba(255,255,255,.25) !important; color: #fff !important; }
@keyframes lgtabpop { 0%{transform:scale(.94)} 60%{transform:scale(1.03)} 100%{transform:scale(1)} }
@media (prefers-reduced-motion: reduce) { .tab-active { animation: none; } }

/* Mobile bottom nav */
.mtab { color: #94a3b8; transition: color .2s ease, transform .15s ease; position: relative; }
.mtab i { transition: transform .2s cubic-bezier(.2,.8,.3,1.1); }
.mtab:active { transform: scale(.94); }
.mtab.tab-active-m { color: #059669; }
.mtab.tab-active-m i { transform: translateY(-3px) scale(1.08); }
/* Little active dot under the current mobile tab for a clearer "you are here". */
.mtab.tab-active-m::after {
  content: ""; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 999px; background: #059669;
}

/* ============ Cards ============ */
.lg-pcard {
  background: #fff;
  border: 1px solid #e9eef5;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04), 0 8px 24px -16px rgba(15,23,42,.12);
}
.lg-pcard-hover { transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease; }
.lg-pcard-hover:hover { transform: translateY(-2px); box-shadow: 0 12px 32px -16px rgba(15,23,42,.22); border-color: #cde9dd; }

/* ============ Phase 1 polish: micro-interactions ============ */
/* Subtle press feedback for interactive cards/buttons that opt in. */
.lg-press { transition: transform .12s ease, box-shadow .12s ease, filter .12s ease; }
.lg-press:active { transform: scale(.985); }

/* A clearer, accessible keyboard focus ring everywhere. We only show it for
   keyboard users (:focus-visible) so mouse clicks stay clean. */
a:focus-visible, button:focus-visible, [role="button"]:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 2px solid #10b981;
  outline-offset: 2px;
  border-radius: .55rem;
}
/* Inputs already draw their own focus ring; don't double up. */
.lg-input:focus-visible { outline: none; }

/* Primary button: ripple-free press + a touch more lift consistency. */
.lg-btn-primary:focus-visible { outline: 2px solid #047857; outline-offset: 2px; }

/* Soft "ghost" / secondary button used for Refresh / toolbar actions. Lets us
   make those scattered inline-styled buttons consistent over time. */
.lg-btn-ghost {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #334155;
  border-radius: .75rem;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .12s ease;
}
.lg-btn-ghost:hover { background: #f8fafc; border-color: #cbd5e1; color: #0f172a; }
.lg-btn-ghost:active { transform: translateY(1px); }

/* ============ Empty states ============ */
.lg-empty {
  border: 1px dashed #d8e0ea;
  border-radius: 1rem;
  background: linear-gradient(180deg,#ffffff, #fbfdff);
  padding: 2.5rem 1.5rem;
  text-align: center;
}
.lg-empty-icon {
  width: 3.5rem; height: 3.5rem; margin: 0 auto .9rem;
  border-radius: 1rem;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.35rem;
  background: linear-gradient(135deg,#ecfdf5,#d1fae5);
  color: #059669;
  box-shadow: 0 8px 20px -12px rgba(5,150,105,.55);
}
.lg-empty-title { font-weight: 800; color: #334155; font-size: 1.05rem; letter-spacing: -.01em; }
.lg-empty-sub { font-size: .875rem; color: #64748b; margin-top: .3rem; max-width: 26rem; margin-left: auto; margin-right: auto; line-height: 1.5; }

/* Stat tile */
.lg-stat {
  background: #fff;
  border: 1px solid #e9eef5;
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  transition: transform .2s ease, box-shadow .2s ease;
}
.lg-stat:hover { transform: translateY(-2px); box-shadow: 0 12px 28px -18px rgba(15,23,42,.25); }

/* ============ Inputs ============ */
.lg-input {
  width: 100%;
  border: 1px solid #d8e0ea;
  border-radius: 0.75rem;
  /* Use longhand padding so left/right utility classes (e.g. Tailwind's .pl-9
     for inputs that have an absolutely-positioned leading icon) are NOT
     clobbered by a shorthand. Default left/right padding stays sensible for
     plain inputs without an icon. */
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
  padding-left: 0.875rem;
  padding-right: 0.875rem;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, .06);
  transition: border-color .15s ease, box-shadow .15s ease;
  outline: none;
}
/* Inputs that carry a leading icon opt in with .lg-input-icon — gives enough
   left room for the icon regardless of CSS load order / utility specificity. */
.lg-input.lg-input-icon { padding-left: 2.4rem; }
.lg-input:focus { border-color: #34d399; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.lg-input::placeholder { color: #7d8aa0; }

/* ---- Custom Business-category dropdown (replaces the unstyled native
   <datalist> popup, which had no max-height, no hover styling, and a width
   that didn't match the input). Matches the input width, caps its height with
   a scroll, and adds polished hover/active states + leading icons. ---- */
.cat-menu {
  /* position:fixed so the menu escapes the hero card's overflow:hidden clip
     (the card clips its decorative blur circles, which would otherwise cut the
     dropdown off). Exact top/left/width are set in JS from the input's rect. */
  position: fixed;
  z-index: 60;
  max-height: 18rem;            /* ~6.5 rows, then scrolls */
  overflow-y: auto;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0.875rem;
  box-shadow: 0 12px 28px -8px rgba(15, 23, 42, .22), 0 2px 6px rgba(15,23,42,.06);
  padding: 0.375rem;
  -webkit-overflow-scrolling: touch;
}
.cat-menu-head {
  padding: 0.4rem 0.6rem 0.3rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #94a3b8;
}
.cat-opt {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
  text-align: left;
  padding: 0.5rem 0.6rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  border: none;
  background: transparent;
  transition: background-color .12s ease, color .12s ease;
}
.cat-opt .cat-opt-ic {
  width: 1.75rem;
  height: 1.75rem;
  flex: none;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  color: #059669;
  background: #ecfdf5;
  transition: background-color .12s ease, color .12s ease;
}
.cat-opt:hover, .cat-opt.is-active {
  background: #f1f5f9;
  color: #0f172a;
}
.cat-opt.is-active .cat-opt-ic, .cat-opt:hover .cat-opt-ic {
  background: #059669;
  color: #fff;
}
.cat-opt .cat-opt-add { margin-left: auto; font-size: 11px; font-weight: 700; color: #059669; opacity: 0; transition: opacity .12s ease; }
.cat-opt:hover .cat-opt-add, .cat-opt.is-active .cat-opt-add { opacity: 1; }
.cat-menu-empty { padding: 0.75rem 0.6rem; font-size: 0.8rem; color: #94a3b8; text-align: center; }
.cat-caret-open i { transform: rotate(180deg); }
/* scrollbar polish (webkit) */
.cat-menu::-webkit-scrollbar { width: 8px; }
.cat-menu::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; border: 2px solid #fff; }
.cat-menu::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Primary button shimmer */
.lg-btn-primary {
  background: linear-gradient(135deg, #059669, #0d9488);
  color: #fff;
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
  box-shadow: 0 8px 20px -10px rgba(5,150,105,.7);
}
.lg-btn-primary:hover { filter: brightness(1.05); transform: translateY(-1px); box-shadow: 0 12px 26px -10px rgba(5,150,105,.75); }
.lg-btn-primary:active { transform: translateY(0); }

/* ============ Drawer ============ */
#drawer { transition: transform .28s cubic-bezier(.22,.7,.3,1); }

/* ============ Custom scrollbar ============ */
#drawer::-webkit-scrollbar, #modal-body::-webkit-scrollbar, .lg-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
#drawer::-webkit-scrollbar-thumb, #modal-body::-webkit-scrollbar-thumb, .lg-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
#drawer::-webkit-scrollbar-thumb:hover, #modal-body::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Skeleton shimmer for loading states */
.lg-skeleton { background: linear-gradient(90deg,#eef2f7 25%,#e2e8f0 37%,#eef2f7 63%); background-size: 400% 100%; animation: lgshimmer 1.4s ease infinite; border-radius: .5rem; }
@keyframes lgshimmer { 0%{background-position:100% 50%} 100%{background-position:0 50%} }
/* Convenience skeleton primitives so loaders can compose a believable shape. */
.lg-sk { background: linear-gradient(90deg,#eef2f7 25%,#e2e8f0 37%,#eef2f7 63%); background-size: 400% 100%; animation: lgshimmer 1.4s ease infinite; border-radius: .5rem; display: block; }
.lg-sk-line { height: .8rem; }
.lg-sk-pill { border-radius: 999px; }
.lg-sk-circle { border-radius: 999px; }
@media (prefers-reduced-motion: reduce) {
  .lg-skeleton, .lg-sk { animation: none; }
}

/* Fade-in for view sections */
.lg-fade { animation: lgfadein .35s ease both; }
@keyframes lgfadein { from{opacity:0;transform:translateY(8px)} to{opacity:1;transform:translateY(0)} }
/* Staggered entrance for lists of cards. Loaders can add .lg-stagger to a
   wrapper; direct children rise in sequence. Cheap and respects reduced-motion. */
.lg-stagger > * { animation: lgrisein .45s cubic-bezier(.2,.7,.3,1) both; }
.lg-stagger > *:nth-child(1){animation-delay:.02s}
.lg-stagger > *:nth-child(2){animation-delay:.06s}
.lg-stagger > *:nth-child(3){animation-delay:.10s}
.lg-stagger > *:nth-child(4){animation-delay:.14s}
.lg-stagger > *:nth-child(5){animation-delay:.18s}
.lg-stagger > *:nth-child(6){animation-delay:.22s}
.lg-stagger > *:nth-child(n+7){animation-delay:.26s}
@keyframes lgrisein { from{opacity:0;transform:translateY(10px)} to{opacity:1;transform:translateY(0)} }
@media (prefers-reduced-motion: reduce) {
  .lg-fade, .lg-stagger > * { animation: none; }
}

/* ============ Prose (legacy AI reports) ============ */
.prose h1 { font-size: 1.4rem; font-weight: 700; margin-bottom: .5rem; }
.prose h2 { font-size: 1.1rem; font-weight: 600; margin-top: 1rem; margin-bottom: .4rem; color: #047857; }
.prose ul { list-style: disc; padding-left: 1.25rem; margin: .5rem 0; }
.prose ol { list-style: decimal; padding-left: 1.25rem; margin: .5rem 0; }
.prose blockquote { border-left: 3px solid #10b981; padding-left: .75rem; color: #475569; font-style: italic; margin: .75rem 0; }
.prose code { background: #f1f5f9; padding: 0 .25rem; border-radius: .25rem; }
.prose hr { margin: 1rem 0; border-color: #e2e8f0; }
.prose p { margin: .5rem 0; }
table { border-collapse: collapse; }
html { scroll-behavior: smooth; }

/* ============ Leads results table: sizing + user-resizable columns ============ */
/* The leads table keeps cells on a single line by default and auto-fits to
   content; the wrapper scrolls horizontally if the columns need more room. */
.leads-table { width: 100%; }
.leads-table th, .leads-table td { white-space: nowrap; }
/* Let the Business and Email columns wrap (they hold long text); everything
   else (phone, rating, etc.) stays on one line. */
.leads-table td.col-wrap, .leads-table th.col-wrap { white-space: normal; }
/* Resizable column headers: a thin grab handle on the right edge of each <th>. */
.leads-table th.col-resizable { position: relative; }
.leads-table th.col-resizable .col-grip {
  position: absolute; top: 0; right: 0; width: 10px; height: 100%;
  cursor: col-resize; user-select: none; touch-action: none;
  border-right: 1px solid transparent; transition: background .12s, border-color .12s;
}
/* Faint separator so users can see columns are draggable. */
.leads-table th.col-resizable + th.col-resizable { border-left: 1px solid rgba(148,163,184,.18); }
.leads-table th.col-resizable .col-grip:hover,
.leads-table th.col-resizable .col-grip.dragging {
  background: rgba(16,185,129,.25); border-right-color: rgba(16,185,129,.6);
}
/* Keep every cell top-aligned so a tall Email cell (multiple addresses) never
   pushes the Phone / Score / Rating values to the vertical middle. */
.leads-table td { vertical-align: top; }
/* When a column has an explicit width set by the user, honour it and clip. */
.leads-table.has-fixed-cols { table-layout: fixed; }
.leads-table.has-fixed-cols td { overflow: hidden; text-overflow: ellipsis; }
.leads-table.has-fixed-cols td.col-wrap { overflow: visible; text-overflow: clip; }

/* ============ Agency report document ============ */
.report-doc {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: #1e293b;
  font-size: 14px;
  line-height: 1.65;
}
.report-doc > *:first-child { margin-top: 0; }
.report-doc h1 {
  font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em;
  color: #0f172a; margin: 0 0 .35rem;
}
.report-doc h2 {
  font-size: 1.05rem; font-weight: 700; letter-spacing: -.01em;
  color: #047857; margin: 1.6rem 0 .65rem;
  padding-bottom: .4rem; border-bottom: 1px solid #e2e8f0;
  display: flex; align-items: center; gap: .5rem;
}
.report-doc h2::before {
  content: ""; width: 4px; height: 1.05rem; border-radius: 2px;
  background: linear-gradient(180deg,#059669,#0d9488); flex: none;
}
.report-doc h3 { font-size: .92rem; font-weight: 700; color: #334155; margin: 1.1rem 0 .4rem; }
.report-doc p { margin: .6rem 0; color: #334155; }
.report-doc strong { color: #0f172a; font-weight: 700; }
.report-doc ul { list-style: none; padding-left: 0; margin: .6rem 0; }
.report-doc ul li {
  position: relative; padding-left: 1.5rem; margin: .45rem 0; color: #334155;
}
.report-doc ul li::before {
  content: "\f058"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  position: absolute; left: 0; top: .12rem; color: #10b981; font-size: .82rem;
}
.report-doc ol { counter-reset: rd; list-style: none; padding-left: 0; margin: .6rem 0; }
.report-doc ol li {
  position: relative; padding-left: 2.1rem; margin: .6rem 0; color: #334155;
}
.report-doc ol li::before {
  counter-increment: rd; content: counter(rd);
  position: absolute; left: 0; top: .05rem;
  width: 1.45rem; height: 1.45rem; border-radius: .5rem;
  background: linear-gradient(135deg,#059669,#0d9488); color: #fff;
  font-size: .72rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 10px -4px rgba(5,150,105,.6);
}
.report-doc blockquote {
  margin: 1rem 0; padding: .85rem 1rem; border: 0;
  border-left: 4px solid #10b981; border-radius: 0 .6rem .6rem 0;
  background: #ecfdf5; color: #065f46; font-style: normal;
}
.report-doc blockquote p { margin: 0; color: #065f46; }
.report-doc code { background: #f1f5f9; padding: .08rem .35rem; border-radius: .3rem; font-size: .85em; color: #0f766e; }
.report-doc hr { margin: 1.4rem 0; border: 0; border-top: 1px dashed #cbd5e1; }
.report-doc table { width: 100%; border-collapse: collapse; margin: .8rem 0; font-size: .85rem; display: table; }
@media (max-width: 640px) {
  .report-doc table { display: block; overflow-x: auto; white-space: nowrap; }
}
.report-doc th { background: #f0fdf4; color: #065f46; text-align: left; font-weight: 700; padding: .55rem .7rem; border: 1px solid #d1fae5; }
.report-doc td { padding: .5rem .7rem; border: 1px solid #e2e8f0; color: #334155; }
.report-doc tr:nth-child(even) td { background: #f8fafc; }
.report-doc em { color: #64748b; }
.report-doc a { color: #047857; text-decoration: underline; }

/* Report header band (score + meta) */
.report-hero {
  border-radius: .9rem; padding: 1rem 1.15rem; margin-bottom: 1rem;
  background: linear-gradient(135deg,#0f172a,#134e4a);
  color: #e2e8f0; position: relative; overflow: hidden;
}
.report-hero::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: radial-gradient(circle, rgba(16,185,129,.35), transparent 70%);
}
.report-score-ring {
  width: 58px; height: 58px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; color: #fff;
}

/* On-screen report "document frame": white page on a tinted backdrop with
   generous padding so the report reads like a polished deliverable, not cramped
   modal content. The negative margins pull it to the modal-body edges so the
   tinted backdrop spans the full width. */
.report-frame {
  margin: -1.25rem;            /* cancel modal-body p-5 padding */
  padding: 1.5rem 1.25rem;
  background: #eef2f6;
}
.report-page {
  max-width: 680px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 1rem;
  padding: 1.75rem 2rem;
  box-shadow: 0 10px 30px rgba(15,23,42,.08);
}
@media (max-width: 640px) {
  .report-frame { padding: 1rem .6rem; }
  .report-page { padding: 1.25rem 1.15rem; border-radius: .85rem; }
}

/* Print: clean white document */
@media print {
  body * { visibility: hidden; }
  #report-print, #report-print * { visibility: visible; }
  #report-print { position: absolute; left: 0; top: 0; width: 100%; padding: 24px; background: #fff; }
  .report-frame { margin: 0; padding: 0; background: #fff; }
  .report-page { max-width: none; box-shadow: none; border-radius: 0; padding: 0; }
  .no-print { display: none !important; }
}

/* ── Post-payment billing onboarding modal ──────────────────────────────── */
.lg-ob-card {
  animation: lgObIn .28s cubic-bezier(.16,1,.3,1) both;
}
@keyframes lgObIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .lg-ob-card { animation: none; }
}

/* ── Brief highlight when we deep-scroll to the Buy-credits card ─────────── */
.lg-flash {
  animation: lgFlash 1.6s ease-out both;
}
@keyframes lgFlash {
  0%   { box-shadow: 0 0 0 0 rgba(245,158,11,.0); }
  15%  { box-shadow: 0 0 0 4px rgba(245,158,11,.45); }
  100% { box-shadow: 0 0 0 0 rgba(245,158,11,.0); }
}
@media (prefers-reduced-motion: reduce) {
  .lg-flash { animation: none; }
}

/* ════════════════════════════════════════════════════════════════════════
   DENSE DASHBOARD SHELL  (Style C — Stripe-admin)
   Reusable layout for Sequence Templates, Saved Reports & Connect APIs.
   Sidebar (filters / nav) + main (toolbar + dense list rows).
   ════════════════════════════════════════════════════════════════════════ */

/* Two-pane grid: fixed-ish sidebar + fluid main. Collapses on mobile. */
.dash {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}
@media (max-width: 860px) {
  .dash { grid-template-columns: 1fr; gap: .85rem; }
}

/* Sidebar panel — sticky on desktop so filters stay in view while scrolling. */
.dash-aside {
  position: sticky;
  top: 1rem;
  background: #fff;
  border: 1px solid #eef1f5;
  border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  padding: .85rem;
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}
@media (max-width: 860px) {
  .dash-aside { position: static; max-height: none; }
}

/* Section label inside the sidebar */
.dash-aside-label {
  font-size: .65rem; font-weight: 800; letter-spacing: .07em;
  text-transform: uppercase; color: #94a3b8;
  padding: .25rem .5rem .4rem; display: flex; align-items: center; gap: .4rem;
}
.dash-aside-label + .dash-aside-label { margin-top: .35rem; }

/* A clickable filter/nav row in the sidebar */
.dash-navrow {
  width: 100%;
  display: flex; align-items: center; gap: .6rem;
  padding: .5rem .6rem;
  border-radius: .65rem;
  font-size: .8rem; font-weight: 600; color: #475569;
  background: transparent; border: 0; cursor: pointer;
  transition: background .15s ease, color .15s ease;
  text-align: left;
}
.dash-navrow:hover { background: #f6f8fa; color: #0f172a; }
.dash-navrow .dash-dot {
  width: .55rem; height: .55rem; border-radius: 999px; flex: 0 0 auto;
  box-shadow: 0 0 0 3px rgba(255,255,255,.6);
}
.dash-navrow .dash-navlabel { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dash-navrow .dash-count {
  font-size: .68rem; font-weight: 700; color: #94a3b8;
  background: #f1f5f9; border-radius: 999px; padding: .05rem .45rem;
}
/* Active state — emerald brand tint */
.dash-navrow.is-active {
  background: #ecfdf5; color: #047857;
}
.dash-navrow.is-active .dash-count { background: #d1fae5; color: #047857; }

/* Main toolbar (search + count + sort) */
.dash-toolbar {
  display: flex; align-items: center; gap: .65rem; flex-wrap: wrap;
  margin-bottom: .85rem;
}
.dash-search {
  position: relative; flex: 1 1 220px; min-width: 0;
}
.dash-search input {
  width: 100%;
  border: 1px solid #e2e8f0; border-radius: .7rem;
  padding: .55rem .8rem .55rem 2.1rem;
  font-size: .85rem; background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.dash-search input:focus { outline: none; border-color: #34d399; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }
.dash-search .dash-search-ic { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: #94a3b8; font-size: .8rem; pointer-events: none; }
.dash-count-pill { font-size: .8rem; color: #64748b; white-space: nowrap; }
.dash-count-pill b { color: #0f172a; }
.dash-sort {
  border: 1px solid #e2e8f0; border-radius: .7rem;
  padding: .55rem 2rem .55rem .8rem; font-size: .82rem; font-weight: 600; color: #475569;
  background: #fff 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='%2394a3b8' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right .7rem center;
  -webkit-appearance: none; appearance: none; cursor: pointer;
}
.dash-sort:focus { outline: none; border-color: #34d399; box-shadow: 0 0 0 3px rgba(16,185,129,.15); }

/* The list container (rows separated by hairlines) */
.dash-list {
  background: #fff; border: 1px solid #eef1f5; border-radius: 1rem;
  box-shadow: 0 1px 2px rgba(15,23,42,.04); overflow: hidden;
}
.dash-row {
  display: flex; align-items: center; gap: .85rem;
  padding: .8rem 1rem;
  border-top: 1px solid #f1f5f9;
  transition: background .12s ease;
}
.dash-row:first-child { border-top: 0; }
.dash-row:hover { background: #fafbfc; }

/* Avatar / icon square that leads each row */
.dash-av {
  width: 2.5rem; height: 2.5rem; border-radius: .7rem; flex: 0 0 auto;
  display: grid; place-items: center; font-weight: 800; font-size: 1rem;
}

/* Chip / tag */
.dash-chip {
  display: inline-flex; align-items: center; gap: .3rem;
  font-size: .68rem; font-weight: 700; border-radius: 999px;
  padding: .12rem .55rem; white-space: nowrap;
}

/* Mobile: rows wrap a bit more gracefully */
@media (max-width: 560px) {
  .dash-row { flex-wrap: wrap; }
  .dash-row .dash-row-actions { width: 100%; justify-content: flex-end; margin-top: .4rem; }
}

/* ── Full-page sequence builder (GHL-style) drag-and-drop polish ── */
.cb-node { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.cb-node:active { cursor: grabbing; }
.cb-node[draggable="true"]:hover .cb-drag-handle { color: #94a3b8; }
.cb-node.opacity-40 { transform: scale(.98); }
.cb-drag-handle { touch-action: none; }
/* Smooth the drop indicator line */
.cb-drop-line { box-shadow: 0 0 0 2px rgba(16,185,129,.25); }

/* ── GHL-style workflow nodes (trigger / condition / action / end) ── */
.cb-trigger-node { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.cb-node-wrap { position: relative; }
/* Centre the vertical connector lines under nodes for a cleaner flow look */
.cb-node-wrap > .flex.justify-center { position: relative; }
