/* AgencyZoom interactive prototype — fixed 1200×760 canvas, scaled to the frame by demo.js.
   Every colour, radius and shadow comes from the tokens below so the Vertafore theme
   (html[data-theme="vertafore"]) can re-skin the whole UI by swapping values only. */

@font-face {
  font-family: "Inter";
  src: url("../../../assets/fonts/Inter-Variable-latin.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
}

:root {
  /* primitives */
  --az-blue-600: #1a66f0;
  --az-blue-700: #1554c9;
  --az-blue-50:  #ecf3ff;
  --gray-0:   #ffffff;
  --gray-25:  #fafbfc;
  --gray-50:  #f5f6f8;
  --gray-100: #eef0f3;
  --gray-200: #e3e6eb;
  --gray-300: #cfd4dc;
  --gray-500: #868d99;
  --gray-700: #4a515e;
  --gray-900: #141820;

  /* semantic — the layer both brands share */
  --c-action:        var(--az-blue-600);
  --c-action-hover:  var(--az-blue-700);
  --c-action-wash:   var(--az-blue-50);
  --c-on-action:     #fff;
  --c-surface:       var(--gray-0);
  --c-canvas:        var(--gray-50);
  --c-column:        #f3f4f6;
  --c-raised:        var(--gray-25);
  --c-line:          var(--gray-200);
  --c-line-strong:   var(--gray-300);
  --c-ink:           var(--gray-900);
  --c-ink-2:         var(--gray-700);
  --c-ink-3:         var(--gray-500);
  --c-success:       #1f9d55;
  --c-success-wash:  #e7f6ee;
  --c-warn:          #d97706;
  --c-warn-wash:     #fdf3e3;
  --c-danger:        #d64545;
  --c-auto:          #7c4dff;   /* automation accent */
  --c-auto-wash:     #f2edff;

  --stage-1: #9aa3af; --stage-2: #8b5cf6; --stage-3: #f59e0b; --stage-4: #10b981; --stage-5: #3b82f6;

  --radius-lg: 10px;
  --radius:    8px;
  --radius-sm: 6px;
  --radius-pill: 999px;
  --shadow-card: 0 1px 2px rgba(20,24,32,.06), 0 0 0 1px rgba(20,24,32,.06);
  --shadow-pop:  0 12px 32px -8px rgba(20,24,32,.22), 0 0 0 1px rgba(20,24,32,.07);
  --focus: 0 0 0 3px color-mix(in srgb, var(--c-action) 30%, transparent);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* Vertafore theme — same semantic names, different primitives.
   Placeholder values: replace with the published Vertafore tokens. */
html[data-theme="vertafore"] {
  --c-action:       #006e7f;
  --c-action-hover: #00596a;
  --c-action-wash:  #e3f3f5;
  --c-canvas:       #f4f6f8;
  --c-column:       #eef1f4;
  --c-ink:          #0f2233;
  --c-ink-2:        #3c4d5c;
  --c-auto:         #c2410c;
  --c-auto-wash:    #fdeee6;
  --stage-2: #0e7490; --stage-3: #c2410c; --stage-4: #15803d; --stage-5: #1d4ed8;
  --radius-lg: 6px;
  --radius:    4px;
  --radius-sm: 3px;
  --shadow-card: 0 0 0 1px #d5dbe1;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; overflow: hidden; background: transparent; }
body { font-family: var(--font); color: var(--c-ink); font-size: 12px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: var(--radius-sm); }
svg.i { width: 14px; height: 14px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- stage ---------- */
#stage { position: absolute; top: 0; left: 0; width: 1200px; height: 760px; transform-origin: 0 0; overflow: hidden; background: var(--c-surface); }
.app { position: absolute; inset: 0; display: flex; flex-direction: column; }

/* ---------- top bar ---------- */
.topbar { height: 56px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 20px; border-bottom: 1px solid var(--c-line); }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 16px; letter-spacing: -.02em; }
.brand__mark { width: 22px; height: 22px; border-radius: 6px; background: var(--c-action); display: grid; place-items: center; color: #fff; }
.brand__mark svg { width: 13px; height: 13px; stroke: #fff; stroke-width: 2.4; }
.ws { position: relative; }
.ws__btn { display: flex; align-items: center; gap: 8px; padding: 5px 8px 5px 5px; border-radius: var(--radius); border: 1px solid var(--c-line); background: var(--c-surface); }
.ws__btn:hover { background: var(--c-canvas); }
.ws__logo { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #fff; }
.ws__name { font-weight: 600; font-size: 12px; text-align: left; line-height: 1.15; }
.ws__meta { display: block; font-weight: 400; font-size: 10.5px; color: var(--c-ink-3); }
.ws__menu { position: absolute; top: calc(100% + 6px); left: 0; width: 280px; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); padding: 6px; z-index: 40; }
.ws__opt { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); text-align: left; }
.ws__opt:hover, .ws__opt[aria-checked="true"] { background: var(--c-canvas); }
.ws__opt .check { margin-left: auto; color: var(--c-action); visibility: hidden; }
.ws__opt[aria-checked="true"] .check { visibility: visible; }
.ws__hint { padding: 8px 8px 4px; font-size: 10.5px; color: var(--c-ink-3); border-top: 1px solid var(--c-line); margin-top: 4px; }

.nav { display: flex; gap: 2px; padding: 3px; background: var(--c-canvas); border-radius: var(--radius); }
.nav__btn { padding: 6px 14px; border-radius: var(--radius-sm); font-weight: 500; color: var(--c-ink-2); display: flex; align-items: center; gap: 6px; }
.nav__btn:hover { color: var(--c-ink); }
.nav__btn[aria-selected="true"] { background: var(--c-surface); color: var(--c-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }
.topbar__spacer { flex: 1; }
.search { width: 220px; display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 10px; border: 1px solid var(--c-line); border-radius: var(--radius); color: var(--c-ink-3); }
.iconbtn { width: 30px; height: 30px; display: grid; place-items: center; border-radius: var(--radius-pill); color: var(--c-ink-3); position: relative; }
.iconbtn:hover { background: var(--c-canvas); color: var(--c-ink); }
.iconbtn .dot { position: absolute; top: 6px; right: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--c-danger); border: 1.5px solid var(--c-surface); }

/* avatars */
.av { width: 22px; height: 22px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 9px; font-weight: 600; color: #fff; flex: none; box-shadow: 0 0 0 2px var(--c-surface); }
.av--lg { width: 30px; height: 30px; font-size: 11px; }
.av--sm { width: 18px; height: 18px; font-size: 8px; }
.avstack { display: flex; }
.avstack .av + .av { margin-left: -6px; }

/* ---------- toolbar ---------- */
.toolbar { height: 52px; flex: none; display: flex; align-items: center; gap: 10px; padding: 0 20px; border-bottom: 1px solid var(--c-line); }
.seg { display: flex; gap: 2px; padding: 3px; background: var(--c-canvas); border-radius: var(--radius); }
.seg__btn { padding: 5px 12px; border-radius: var(--radius-sm); font-weight: 500; color: var(--c-ink-2); }
.seg__btn[aria-pressed="true"] { background: var(--c-surface); color: var(--c-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08), 0 0 0 1px rgba(0,0,0,.04); }
.btn { height: 30px; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: var(--radius); font-weight: 600; white-space: nowrap; }
.btn--ghost { border: 1px solid var(--c-line); background: var(--c-surface); color: var(--c-ink-2); }
.btn--ghost:hover { background: var(--c-canvas); color: var(--c-ink); }
.btn--primary { background: var(--c-action); color: var(--c-on-action); }
.btn--primary:hover { background: var(--c-action-hover); }
.btn--primary:disabled { opacity: .45; cursor: default; }
.btn .count { background: color-mix(in srgb, var(--c-action) 14%, transparent); color: var(--c-action); border-radius: var(--radius-pill); padding: 0 6px; font-size: 10.5px; line-height: 16px; }
.btn--primary .count { background: rgba(255,255,255,.22); color: #fff; }

.views { display: flex; gap: 6px; align-items: center; min-width: 0; overflow: hidden; }
.view-chip { height: 26px; padding: 0 10px; border-radius: var(--radius-pill); border: 1px solid var(--c-line); color: var(--c-ink-2); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.view-chip:hover { border-color: var(--c-line-strong); color: var(--c-ink); }
.view-chip[aria-pressed="true"] { background: var(--c-ink); border-color: var(--c-ink); color: var(--c-surface); }
.view-chip .lock { opacity: .6; }
.view-chip.is-new { animation: pop .6s cubic-bezier(.2,.9,.3,1.3); }

.prod-filter { display: flex; align-items: center; gap: 4px; padding-left: 10px; border-left: 1px solid var(--c-line); }
.prod-filter button { border-radius: 50%; transition: transform .15s, opacity .15s; }
.prod-filter button[aria-pressed="false"] { opacity: .35; }
.prod-filter button:hover { transform: translateY(-1px); }

/* ---------- screens ---------- */
.screen { flex: 1; min-height: 0; display: none; flex-direction: column; animation: fade .25s ease; }
.screen.is-active { display: flex; }
.is-ambient .screen.is-active { animation: screen-in .7s cubic-bezier(.2,.8,.2,1); }
.is-ambient .scrim { animation-duration: .4s; }
.is-ambient .modal { animation-duration: .5s; }
.is-ambient .drawer { animation-duration: .55s; }
.is-ambient .cursor { transition-duration: 1.35s; }

/* ---------- board ---------- */
.board { flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 12px; padding: 14px 20px 20px; overflow-x: auto; }
.col { background: var(--c-column); border-radius: var(--radius-lg); display: flex; flex-direction: column; min-height: 0; min-width: 200px; transition: background .15s, box-shadow .15s; }
.col.is-last { background: color-mix(in srgb, var(--stage-4) 7%, var(--c-column)); }
.col.is-over { background: color-mix(in srgb, var(--c-action) 7%, var(--c-column)); }
.col__head { padding: 12px 12px 8px; }
.col__title { display: flex; align-items: center; gap: 7px; font-weight: 650; font-size: 12.5px; }
.col__dot { width: 7px; height: 7px; border-radius: 50%; }
.col__meta { margin-top: 2px; font-size: 10.5px; color: var(--c-ink-3); display: flex; gap: 6px; align-items: center; }
.col__auto { display: inline-flex; align-items: center; gap: 3px; color: var(--c-auto); }
.col__auto svg { width: 11px; height: 11px; }
.col__body { flex: 1; overflow-y: auto; padding: 0 8px 10px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: none; }

.card { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 10px 11px; cursor: pointer; text-align: left; width: 100%; display: block; transition: box-shadow .15s, transform .15s; }
.card:hover { box-shadow: 0 4px 12px -4px rgba(20,24,32,.18), 0 0 0 1px rgba(20,24,32,.1); }
.card.is-dragging { opacity: .35; box-shadow: 0 0 0 1.5px var(--c-line-strong); }
.card.is-flash { animation: flash 1.4s ease; }
.card__top { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--c-ink-2); }
.card__age { color: var(--c-ink-3); font-weight: 500; display: flex; gap: 6px; align-items: center; }
.badge-new { background: var(--c-warn); color: #fff; border-radius: var(--radius-pill); font-size: 9px; font-weight: 700; padding: 1px 6px; }
.card__name { font-weight: 650; font-size: 13px; margin: 2px 0 7px; letter-spacing: -.01em; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 10.5px; color: var(--c-ink-2); }
.card__row + .card__row { margin-top: 6px; }
.lobs { display: flex; gap: 3px; flex-wrap: wrap; }
.lob { font-size: 9.5px; font-weight: 600; padding: 1px 5px; border-radius: 4px; background: var(--c-canvas); color: var(--c-ink-2); border: 1px solid var(--c-line); }
.premium { font-weight: 600; color: var(--c-ink); }
.datechip { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 2px 6px; border-radius: 4px; border: 1px solid var(--c-line); }
.datechip svg { width: 11px; height: 11px; color: var(--c-ink-3); }
.datechip.is-soon { color: var(--c-warn); border-color: color-mix(in srgb, var(--c-warn) 35%, transparent); background: var(--c-warn-wash); }
.autopill { margin-top: 8px; display: flex; align-items: center; gap: 6px; padding: 5px 7px; border-radius: var(--radius-sm); background: var(--c-auto-wash); color: var(--c-auto); font-size: 10.5px; font-weight: 600; }
.autopill svg { width: 11px; height: 11px; }
.autopill__bar { margin-left: auto; width: 34px; height: 4px; border-radius: 2px; background: color-mix(in srgb, var(--c-auto) 18%, transparent); overflow: hidden; }
.autopill__bar i { display: block; height: 100%; background: var(--c-auto); border-radius: 2px; }
.autopill.is-paused { background: var(--c-canvas); color: var(--c-ink-3); }
.card__note { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-line); display: flex; gap: 7px; font-size: 10.5px; color: var(--c-ink); line-height: 1.35; }
.card__note span { color: var(--c-ink-3); }
.card__owner { display: flex; align-items: center; gap: 5px; }

/* ---------- lifecycle ---------- */
.life { flex: 1; min-height: 0; padding: 14px 20px 20px; display: flex; flex-direction: column; gap: 12px; }
.track { position: relative; height: 34px; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.track::before { content: ""; position: absolute; left: 3%; right: 3%; top: 16px; height: 2px; background: repeating-linear-gradient(90deg, var(--c-line-strong) 0 6px, transparent 6px 11px); }
.track__flow { position: absolute; left: 3%; right: 3%; top: 13px; height: 8px; overflow: hidden; pointer-events: none; }
.track__flow i { position: absolute; top: 0; width: 8px; height: 8px; border-radius: 50%; background: var(--c-auto); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c-auto) 22%, transparent); animation: travel 9s linear infinite; }
.track__node { position: relative; z-index: 1; justify-self: center; display: flex; align-items: center; gap: 6px; background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-pill); padding: 4px 10px 4px 5px; font-weight: 600; font-size: 11px; box-shadow: 0 1px 2px rgba(0,0,0,.05); }
.track__node b { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 9.5px; }
.journey { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.jcol { background: var(--c-column); border-radius: var(--radius-lg); padding: 10px 8px; display: flex; flex-direction: column; gap: 7px; min-height: 0; overflow-y: auto; scrollbar-width: none; }
.jcol__head { display: flex; justify-content: space-between; align-items: flex-start; padding: 0 3px 4px; }
.jcol__title { font-weight: 650; font-size: 12px; }
.jcol__count { font-size: 10.5px; color: var(--c-ink-3); }
.switch { width: 26px; height: 15px; border-radius: 8px; background: var(--c-line-strong); position: relative; transition: background .2s; flex: none; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 11px; height: 11px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.switch[aria-checked="true"] { background: var(--c-success); }
.switch[aria-checked="true"]::after { transform: translateX(11px); }
.switch:disabled { opacity: .6; cursor: not-allowed; }
.step { background: var(--c-surface); border-radius: var(--radius); box-shadow: var(--shadow-card); padding: 8px 9px; text-align: left; width: 100%; display: block; transition: box-shadow .15s; }
.step:hover { box-shadow: 0 4px 12px -4px rgba(20,24,32,.18), 0 0 0 1px rgba(20,24,32,.1); }
.step.is-selected { box-shadow: 0 0 0 2px var(--c-action); }
.step__top { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--c-ink-3); font-weight: 600; }
.step__ch { width: 18px; height: 18px; border-radius: 5px; display: grid; place-items: center; }
.step__ch svg { width: 11px; height: 11px; }
.ch-email { background: #e8f0ff; color: #2563eb; }
.ch-text  { background: #e7f6ee; color: #16884a; }
.ch-task  { background: #fdf3e3; color: #b45309; }
html[data-theme="vertafore"] .ch-email { background: #e3f3f5; color: #006e7f; }
.step__title { font-weight: 600; font-size: 11.5px; margin-top: 5px; line-height: 1.3; }
.cond { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 9.5px; font-weight: 600; color: var(--c-auto); background: var(--c-auto-wash); border-radius: 4px; padding: 1px 5px; }
.cond svg { width: 10px; height: 10px; }
.addstep { border: 1px dashed var(--c-line-strong); border-radius: var(--radius); padding: 7px; color: var(--c-ink-3); font-weight: 500; font-size: 11px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.addstep:hover { color: var(--c-action); border-color: var(--c-action); }
.lockchip { display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 10px; border-radius: var(--radius-pill); background: var(--c-canvas); color: var(--c-ink-2); font-weight: 500; font-size: 11px; }

/* ---------- customers ---------- */
.cust { flex: 1; min-height: 0; display: grid; grid-template-columns: 220px 1fr; }
.side { border-right: 1px solid var(--c-line); padding: 14px 10px; overflow-y: auto; background: var(--c-raised); }
.side__h { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); padding: 8px 8px 6px; display: flex; justify-content: space-between; }
.side__item { width: 100%; display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); color: var(--c-ink-2); font-weight: 500; text-align: left; }
.side__item:hover { background: var(--c-canvas); color: var(--c-ink); }
.side__item[aria-current="true"] { background: var(--c-surface); color: var(--c-ink); font-weight: 600; box-shadow: var(--shadow-card); }
.side__item .n { margin-left: auto; font-size: 10.5px; color: var(--c-ink-3); font-weight: 500; }
.side__item svg { color: var(--c-ink-3); }
.side__item.is-new { animation: pop .6s cubic-bezier(.2,.9,.3,1.3), flash 1.6s ease; }
.side__empty { padding: 4px 8px; font-size: 11px; color: var(--c-ink-3); }
.main { min-width: 0; display: flex; flex-direction: column; }
.main__head { padding: 16px 20px 10px; display: flex; align-items: flex-end; gap: 12px; }
.main__title { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.main__sub { font-size: 11.5px; color: var(--c-ink-3); margin-top: 2px; }
.main__sub b { color: var(--c-ink); font-weight: 600; }
.main__actions { margin-left: auto; display: flex; gap: 8px; }
.fbar { padding: 0 20px 12px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; border-bottom: 1px solid var(--c-line); position: relative; }
.fchip { height: 26px; display: inline-flex; align-items: center; gap: 4px; padding: 0 4px 0 9px; border-radius: var(--radius-sm); background: var(--c-action-wash); color: var(--c-ink); font-size: 11px; border: 1px solid color-mix(in srgb, var(--c-action) 22%, transparent); animation: pop .3s ease; }
.fchip em { font-style: normal; color: var(--c-ink-3); }
.fchip b { font-weight: 600; }
.fchip button { width: 18px; height: 18px; border-radius: 4px; display: grid; place-items: center; color: var(--c-ink-3); }
.fchip button:hover { background: rgba(0,0,0,.06); color: var(--c-ink); }
.fchip button svg { width: 10px; height: 10px; }
.fbar__add { height: 26px; display: inline-flex; align-items: center; gap: 4px; padding: 0 9px; border-radius: var(--radius-sm); border: 1px dashed var(--c-line-strong); color: var(--c-ink-2); font-weight: 500; font-size: 11px; }
.fbar__add:hover { color: var(--c-action); border-color: var(--c-action); }
.fbar__clear { font-size: 11px; color: var(--c-ink-3); font-weight: 500; padding: 0 4px; }
.fbar__clear:hover { color: var(--c-ink); }
.fbar__dirty { margin-left: auto; font-size: 10.5px; color: var(--c-warn); font-weight: 600; display: flex; align-items: center; gap: 5px; }
.fbar__dirty::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c-warn); }

.tablewrap { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; background: var(--c-surface); z-index: 1; text-align: left; font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--c-ink-3); font-weight: 600; padding: 9px 10px; border-bottom: 1px solid var(--c-line); white-space: nowrap; }
td { padding: 8px 10px; border-bottom: 1px solid var(--c-line); font-size: 11.5px; white-space: nowrap; }
tr:hover td { background: var(--c-raised); }
td:first-child, th:first-child { padding-left: 20px; width: 34px; }
.cbox { width: 14px; height: 14px; border-radius: 4px; border: 1.5px solid var(--c-line-strong); display: grid; place-items: center; background: var(--c-surface); }
.cbox[aria-checked="true"], .cbox[aria-checked="mixed"] { background: var(--c-action); border-color: var(--c-action); color: #fff; }
.cbox svg { width: 10px; height: 10px; stroke-width: 2.4; visibility: hidden; }
.cbox[aria-checked="true"] svg, .cbox[aria-checked="mixed"] svg { visibility: visible; }
.hh { font-weight: 600; }
.hh small { display: block; font-weight: 400; color: var(--c-ink-3); font-size: 10.5px; }
.jstage { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; }
.jstage i { width: 6px; height: 6px; border-radius: 50%; }
.empty { padding: 60px 20px; text-align: center; color: var(--c-ink-3); }

/* ---------- popover (filter builder) ---------- */
.pop { position: absolute; z-index: 30; width: 420px; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); display: grid; grid-template-columns: 150px 1fr; overflow: hidden; animation: popin .16s ease; }
.pop__fields { border-right: 1px solid var(--c-line); padding: 6px; background: var(--c-raised); }
.pop__field { width: 100%; text-align: left; padding: 7px 8px; border-radius: var(--radius-sm); color: var(--c-ink-2); font-weight: 500; display: flex; align-items: center; gap: 7px; }
.pop__field:hover { background: var(--c-canvas); }
.pop__field[aria-selected="true"] { background: var(--c-surface); color: var(--c-ink); font-weight: 600; box-shadow: var(--shadow-card); }
.pop__field svg { color: var(--c-ink-3); }
.pop__body { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.pop__ops { display: flex; gap: 2px; padding: 2px; background: var(--c-canvas); border-radius: var(--radius-sm); align-self: flex-start; }
.pop__ops button { padding: 3px 9px; border-radius: 4px; font-size: 11px; color: var(--c-ink-2); font-weight: 500; }
.pop__ops button[aria-pressed="true"] { background: var(--c-surface); color: var(--c-ink); font-weight: 600; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
.pop__opts { display: flex; flex-direction: column; gap: 1px; max-height: 190px; overflow-y: auto; }
.pop__opt { display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--radius-sm); text-align: left; }
.pop__opt:hover { background: var(--c-canvas); }
.pop__opt .n { margin-left: auto; color: var(--c-ink-3); font-size: 10.5px; }
.pop__foot { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--c-line); font-size: 10.5px; color: var(--c-ink-3); }

/* ---------- dashboard ---------- */
.dash { flex: 1; min-height: 0; padding: 18px 20px 20px; display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: auto 1fr; gap: 12px; overflow: hidden; }
.kpi { border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 14px; }
.kpi__label { font-size: 11px; color: var(--c-ink-3); font-weight: 500; }
.kpi__val { font-size: 24px; font-weight: 700; letter-spacing: -.03em; margin-top: 4px; }
.kpi__delta { font-size: 10.5px; color: var(--c-success); font-weight: 600; margin-top: 2px; }
.kpi__bar { margin-top: 10px; height: 5px; border-radius: 3px; background: var(--c-canvas); overflow: hidden; }
.kpi__bar i { display: block; height: 100%; background: var(--c-action); border-radius: 3px; transform-origin: left; animation: grow 1s cubic-bezier(.2,.8,.2,1) both; }
.panel { border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 14px; display: flex; flex-direction: column; min-height: 0; }
.panel__h { font-weight: 650; font-size: 13px; display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.panel__h span { font-weight: 500; font-size: 11px; color: var(--c-ink-3); }
.chart { flex: 1; display: flex; align-items: flex-end; gap: 10px; padding-top: 10px; border-bottom: 1px solid var(--c-line); }
.chart__col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart__stack { width: 100%; display: flex; flex-direction: column-reverse; border-radius: 4px 4px 0 0; overflow: hidden; animation: rise .9s cubic-bezier(.2,.8,.2,1) both; transform-origin: bottom; }
.chart__x { display: flex; gap: 10px; padding-top: 6px; }
.chart__x span { flex: 1; text-align: center; font-size: 10px; color: var(--c-ink-3); }
.legend { display: flex; gap: 12px; font-size: 10.5px; color: var(--c-ink-2); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.lb { display: flex; flex-direction: column; gap: 4px; }
.lb__row { display: grid; grid-template-columns: 16px 22px 1fr auto; gap: 8px; align-items: center; padding: 6px 4px; border-radius: var(--radius-sm); }
.lb__row:hover { background: var(--c-raised); }
.lb__rank { font-size: 10.5px; color: var(--c-ink-3); font-weight: 600; }
.lb__name { font-weight: 600; font-size: 11.5px; }
.lb__name small { display: block; color: var(--c-ink-3); font-weight: 400; font-size: 10px; }
.lb__track { height: 4px; border-radius: 2px; background: var(--c-canvas); margin-top: 4px; overflow: hidden; }
.lb__track i { display: block; height: 100%; background: var(--c-success); animation: grow 1s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.lb__val { font-weight: 650; font-size: 11.5px; }
.task { display: flex; gap: 8px; align-items: flex-start; padding: 7px 4px; border-bottom: 1px solid var(--c-line); }
.task:last-child { border: 0; }
.task small { display: block; color: var(--c-ink-3); font-size: 10.5px; }

/* ---------- overlays ---------- */
.scrim { position: absolute; inset: 0; background: rgba(15,20,30,.32); z-index: 50; display: grid; place-items: center; animation: fade .18s ease; }
.scrim[hidden] { display: none; }
.modal { width: 640px; max-height: 640px; background: var(--c-surface); border-radius: 12px; box-shadow: var(--shadow-pop); display: flex; flex-direction: column; overflow: hidden; animation: rise-in .22s cubic-bezier(.2,.8,.2,1); }
.modal--sm { width: 440px; }
.modal__head { padding: 18px 20px 0; display: flex; gap: 12px; align-items: flex-start; }
.modal__eyebrow { font-size: 11px; color: var(--c-ink-3); }
.modal__title { font-size: 18px; font-weight: 700; letter-spacing: -.02em; }
.modal__close { margin-left: auto; }
.modal__meta { display: flex; gap: 8px; align-items: center; padding: 10px 20px 0; flex-wrap: wrap; }
.tabs { display: flex; gap: 18px; padding: 0 20px; border-bottom: 1px solid var(--c-line); margin-top: 14px; }
.tab { padding: 8px 0 10px; font-weight: 500; color: var(--c-ink-3); position: relative; }
.tab[aria-selected="true"] { color: var(--c-ink); font-weight: 600; }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--c-action); border-radius: 2px; }
.modal__body { padding: 16px 20px 20px; overflow-y: auto; }
.modal__foot { padding: 12px 20px; border-top: 1px solid var(--c-line); display: flex; justify-content: flex-end; gap: 8px; background: var(--c-raised); }
.stagepill { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: var(--radius-pill); border: 1px solid var(--c-line); font-weight: 600; font-size: 11px; }
.stagepill i { width: 7px; height: 7px; border-radius: 50%; }
.tl { position: relative; display: flex; flex-direction: column; gap: 2px; }
.tl__item { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; align-items: start; padding: 8px 0; position: relative; }
.tl__item::before { content: ""; position: absolute; left: 12px; top: 30px; bottom: -6px; width: 2px; background: var(--c-line); }
.tl__item:last-child::before { display: none; }
.tl__icon { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--c-surface); position: relative; z-index: 1; }
.tl__icon svg { width: 12px; height: 12px; }
.tl__item.is-done .tl__icon { background: var(--c-success-wash); color: var(--c-success); }
.tl__item.is-next .tl__icon { background: var(--c-auto); color: #fff; box-shadow: 0 0 0 4px var(--c-auto-wash); }
.tl__item.is-later .tl__icon { background: var(--c-canvas); color: var(--c-ink-3); }
.tl__title { font-weight: 600; font-size: 12px; }
.tl__sub { font-size: 11px; color: var(--c-ink-3); margin-top: 1px; }
.tl__when { font-size: 10.5px; color: var(--c-ink-3); font-weight: 500; }
.tl__group { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--c-ink-3); padding: 10px 0 2px; }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.kv dt { font-size: 10.5px; color: var(--c-ink-3); }
.kv dd { font-weight: 600; margin-top: 2px; }
.feed { display: flex; flex-direction: column; gap: 12px; }
.feed__row { display: flex; gap: 10px; }
.feed__row p { color: var(--c-ink-2); margin-top: 2px; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field > label, .field__label { font-weight: 600; font-size: 11.5px; }
.input { height: 34px; border: 1px solid var(--c-line-strong); border-radius: var(--radius); padding: 0 10px; background: var(--c-surface); }
.input:focus { outline: none; border-color: var(--c-action); box-shadow: var(--focus); }
.radios { display: flex; flex-direction: column; gap: 6px; }
.radio { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--c-line); border-radius: var(--radius); text-align: left; width: 100%; }
.radio[aria-checked="true"] { border-color: var(--c-action); background: var(--c-action-wash); }
.radio__dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--c-line-strong); flex: none; margin-top: 1px; background: var(--c-surface); }
.radio[aria-checked="true"] .radio__dot { border: 4px solid var(--c-action); }
.radio b { display: block; font-size: 12px; }
.radio small { color: var(--c-ink-3); font-size: 11px; }
.check-row { display: flex; align-items: center; gap: 8px; color: var(--c-ink-2); }
.summary { background: var(--c-raised); border: 1px solid var(--c-line); border-radius: var(--radius); padding: 10px; display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 14px; }

/* drawer */
.drawer { position: absolute; top: 56px; right: 0; bottom: 0; width: 400px; background: var(--c-surface); border-left: 1px solid var(--c-line); box-shadow: -12px 0 32px -12px rgba(20,24,32,.18); z-index: 45; display: flex; flex-direction: column; animation: slide .25s cubic-bezier(.2,.8,.2,1); }
.drawer[hidden] { display: none; }
.drawer__head { padding: 16px 18px 12px; border-bottom: 1px solid var(--c-line); display: flex; gap: 10px; align-items: flex-start; }
.drawer__body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.drawer__foot { padding: 12px 18px; border-top: 1px solid var(--c-line); display: flex; justify-content: flex-end; gap: 8px; }
.banner { display: flex; gap: 8px; padding: 9px 10px; border-radius: var(--radius); background: var(--c-auto-wash); color: var(--c-ink); font-size: 11px; margin-bottom: 14px; line-height: 1.45; }
.banner svg { color: var(--c-auto); margin-top: 1px; }
.mail { border: 1px solid var(--c-line); border-radius: var(--radius); overflow: hidden; }
.mail__head { padding: 8px 10px; background: var(--c-raised); border-bottom: 1px solid var(--c-line); font-size: 11px; color: var(--c-ink-3); }
.mail__head b { color: var(--c-ink); font-weight: 600; }
.mail__body { padding: 12px 10px; font-size: 11.5px; line-height: 1.6; color: var(--c-ink-2); }
.tag { background: var(--c-auto-wash); color: var(--c-auto); border-radius: 3px; padding: 0 3px; font-weight: 600; font-size: 10.5px; }
.cond-list { display: flex; flex-direction: column; gap: 6px; }
.cond-row { display: flex; gap: 6px; align-items: center; font-size: 11px; }
.cond-row .pill { padding: 3px 7px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); background: var(--c-surface); font-weight: 500; }
.cond-row .op { color: var(--c-ink-3); }

/* toast */
.toasts { position: absolute; left: 50%; top: 66px; transform: translateX(-50%); z-index: 70; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--c-ink); color: var(--c-surface); padding: 10px 14px; border-radius: var(--radius-lg); font-weight: 500; box-shadow: var(--shadow-pop); animation: toast-in .3s cubic-bezier(.2,.8,.2,1); }
.toast svg { color: #c4b5fd; }
.toast.is-out { animation: toast-out .3s ease forwards; }

/* ---------- tour ---------- */
.demo-controls { position: absolute; right: 16px; bottom: 16px; z-index: 80; display: flex; gap: 6px; align-items: center; }
.demo-controls[hidden] { display: none; }
.demo-btn { height: 32px; display: inline-flex; align-items: center; gap: 6px; padding: 0 14px 0 11px; border-radius: var(--radius-pill); background: var(--c-action); color: #fff; font-weight: 600; box-shadow: 0 6px 18px -6px color-mix(in srgb, var(--c-action) 70%, transparent); }
.demo-btn:hover { background: var(--c-action-hover); }
.demo-btn svg { width: 12px; height: 12px; fill: currentColor; stroke: none; }
.demo-stop { width: 32px; height: 32px; border-radius: 50%; background: var(--c-surface); box-shadow: var(--shadow-pop); display: grid; place-items: center; color: var(--c-ink-2); }
.demo-stop[hidden] { display: none; }
.demo-steps { display: flex; gap: 3px; margin-right: 6px; }
.demo-steps i { width: 14px; height: 3px; border-radius: 2px; background: rgba(20,24,32,.15); }
.demo-steps i.is-done { background: var(--c-action); }
.caption { position: absolute; left: 16px; bottom: 16px; z-index: 80; max-width: 520px; background: var(--c-ink); color: var(--c-surface); padding: 10px 14px; border-radius: var(--radius-lg); font-size: 12.5px; font-weight: 500; line-height: 1.4; box-shadow: var(--shadow-pop); display: flex; gap: 10px; align-items: center; animation: toast-in .3s ease; }
.caption[hidden] { display: none; }
.caption b { font-size: 10.5px; color: rgba(255,255,255,.55); font-weight: 600; font-variant-numeric: tabular-nums; }
/* Tour cursor: a pointing hand. The fingertip is the hotspot (top-left of the box + 10,2). */
.cursor { position: absolute; z-index: 90; left: 0; top: 0; width: 22px; height: 22px; pointer-events: none; transition: transform 1s cubic-bezier(.45,0,.2,1), opacity .3s; }
.cursor__hand { width: 22px; height: 22px; display: block; filter: drop-shadow(0 2px 2px rgba(0,0,0,.22)); transform-origin: 40% 10%; transition: transform .35s cubic-bezier(.2,.8,.2,1), opacity .35s ease; opacity: .92; }
.cursor.is-idle .cursor__hand { transform: scale(.4); opacity: 0; }
.cursor.is-press .cursor__hand { transform: scale(.86); }
.cursor__ripple { position: absolute; left: 7px; top: 1px; width: 0; height: 0; }
.cursor__ripple::before { content: ""; position: absolute; left: -18px; top: -18px; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--c-action) 22%, transparent); border: 1.5px solid color-mix(in srgb, var(--c-action) 55%, transparent); transform: scale(0); opacity: 0; }
.cursor.is-click .cursor__ripple::before { animation: ripple .6s ease-out; }
.ghost-card { position: absolute; z-index: 85; pointer-events: none; transition: transform .9s cubic-bezier(.5,0,.2,1); box-shadow: 0 18px 36px -12px rgba(20,24,32,.35), 0 0 0 1px rgba(20,24,32,.08) !important; rotate: 2deg; }

@keyframes fade { from { opacity: 0; } }
@keyframes screen-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes popin { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
@keyframes rise-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
@keyframes pop { 0% { transform: scale(.85); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes flash { 0%, 100% { box-shadow: var(--shadow-card); } 25% { box-shadow: 0 0 0 2px var(--c-auto), 0 0 0 6px var(--c-auto-wash); } }
@keyframes travel { 0% { left: -2%; opacity: 0; } 4% { opacity: 1; } 96% { opacity: 1; } 100% { left: 100%; opacity: 0; } }
@keyframes grow { from { transform: scaleX(0); } }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }
@keyframes ripple { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(1.6); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .track__flow { display: none; }
}

/* keep the tour controls clear of the step drawer */
.drawer:not([hidden]) ~ .demo-controls { right: 416px; }
.drawer:not([hidden]) ~ .caption { max-width: 360px; }
.brand { white-space: nowrap; }
.brand__by { font-size: 10.5px; font-weight: 600; color: var(--c-ink-3); letter-spacing: 0; padding: 2px 6px; border: 1px solid var(--c-line); border-radius: var(--radius-sm); }
.seg__btn, .nav__btn { white-space: nowrap; }
.toolbar .seg, .prod-filter, .toolbar .btn { flex: none; }
.views { flex: 1 1 auto; }
.ws__name, .ws__meta { white-space: nowrap; }

/* ambient (hero background) — no toasts or chrome competing with the page title */
.is-ambient .toasts { display: none; }
html { background: var(--c-surface); }
.is-ambient .ghost-card { transition-duration: 1.4s; }

/* ---------- Dark mode (?mode=dark) — same components, dark semantic values ---------- */
html[data-mode="dark"] {
  color-scheme: dark;
  --c-surface: #101114;
  --c-canvas: #0a0b0d;
  --c-column: #0d0e11;
  --c-raised: #16171b;
  --c-line: #22242a;
  --c-line-strong: #30333a;
  --c-ink: #eef0f3;
  --c-ink-2: #aab0ba;
  --c-ink-3: #7b828d;
  --c-action: #3b82f6;
  --c-action-hover: #5b96f8;
  --c-action-wash: rgba(59,130,246,.14);
  --c-auto: #a78bfa;
  --c-auto-wash: rgba(167,139,250,.12);
  --c-success-wash: rgba(31,157,85,.16);
  --c-warn: #f59e0b;
  --c-warn-wash: rgba(245,158,11,.12);
  --shadow-card: 0 0 0 1px rgba(255,255,255,.05);
  --shadow-pop: 0 16px 40px -10px rgba(0,0,0,.8), 0 0 0 1px rgba(255,255,255,.08);
}
html[data-mode="dark"] .ch-email { background: rgba(59,130,246,.16); color: #7fb0ff; }
html[data-mode="dark"] .ch-text  { background: rgba(31,157,85,.18); color: #5fd394; }
html[data-mode="dark"] .ch-task  { background: rgba(245,158,11,.14); color: #f7b955; }
html[data-mode="dark"] .col.is-last { background: color-mix(in srgb, var(--stage-4) 6%, var(--c-column)); }
html[data-mode="dark"] .nav__btn[aria-selected="true"], html[data-mode="dark"] .seg__btn[aria-pressed="true"] { background: var(--c-raised); box-shadow: 0 0 0 1px rgba(255,255,255,.06); }
html[data-mode="dark"] .lob { background: var(--c-raised); }
html[data-mode="dark"] .switch::after { background: #e8eaee; }
html[data-mode="dark"] .scrim { background: rgba(0,0,0,.55); }

/* ---------- Top bar: one quiet row — brand / workspace / text menu ---------- */
.topbar { gap: 6px; }
.ws { margin-left: 10px; padding-left: 14px; border-left: 1px solid var(--c-line); }
.ws__btn { border: 0; background: none; padding: 6px 8px; gap: 6px; }
.ws__btn:hover { background: var(--c-canvas); }
.nav { background: none; padding: 0; gap: 2px; margin-left: 14px; align-self: stretch; }
.nav__btn { position: relative; height: 100%; border-radius: 0; padding: 0 12px; font-weight: 500; }
.nav__btn[aria-selected="true"], html[data-mode="dark"] .nav__btn[aria-selected="true"] { background: none; box-shadow: none; font-weight: 600; color: var(--c-ink); }
.nav__btn[aria-selected="true"]::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--c-ink); }
.search { width: 150px; height: 30px; }

/* ---------- Drop slot ---------- */
.drop-slot { flex: none; border-radius: var(--radius); border: 1.5px dashed color-mix(in srgb, var(--c-action) 55%, transparent); background: color-mix(in srgb, var(--c-action) 6%, transparent); animation: slot-in .25s cubic-bezier(.2,.8,.2,1); }
@keyframes slot-in { from { opacity: 0; transform: scaleY(.6); } }

/* ---------- AI hint on a card ---------- */
.ai-hint { margin-top: 8px; display: flex; gap: 6px; align-items: flex-start; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 10.5px; line-height: 1.35; color: var(--c-ink); background: linear-gradient(90deg, color-mix(in srgb, var(--c-action) 9%, transparent), color-mix(in srgb, var(--c-auto) 9%, transparent)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--c-auto) 18%, transparent); }
.ai-hint svg { width: 11px; height: 11px; flex: none; margin-top: 1px; fill: var(--c-auto); stroke: none; }

/* ---------- Upsell: invite a producer ---------- */
.invite { display: inline-flex; align-items: center; gap: 7px; height: 28px; padding: 0 10px 0 4px; margin-left: 4px; border-radius: var(--radius-pill); color: var(--c-ink-2); font-weight: 500; border: 1px dashed var(--c-line-strong); flex: none; }
.invite:hover { color: var(--c-action); border-color: var(--c-action); }
.invite__av { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: var(--c-canvas); }
.invite__av svg { width: 11px; height: 11px; }
.unlock { display: flex; flex-direction: column; gap: 2px; }
.unlock__row { display: flex; gap: 10px; padding: 8px 0; }
.unlock__row b { display: block; font-size: 12px; }
.unlock__row small { color: var(--c-ink-3); font-size: 11px; }
.unlock__ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; background: var(--c-action-wash); color: var(--c-action); flex: none; }

/* ---------- Menu separator ---------- */
.nav { position: relative; padding-left: 16px; margin-left: 12px; }
.nav::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 1px; background: var(--c-line); }

/* ---------- Dashboard: marketing-style, with an acquisition funnel ---------- */
.dash { grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr); gap: 10px; padding: 14px 20px 16px; background: var(--c-canvas); }
.db-card { background: var(--c-surface); border: 1px solid var(--c-line); border-radius: var(--radius-lg); padding: 12px 14px; display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.db-span2 { grid-column: span 2; }
.db-label { font-size: 10.5px; color: var(--c-ink-3); font-weight: 500; }
.db-kpi__row { display: flex; align-items: baseline; gap: 8px; margin-top: 2px; }
.db-kpi__row b { font-size: 21px; font-weight: 700; letter-spacing: -.03em; }
.db-delta { font-size: 10px; font-weight: 600; color: var(--c-success); background: var(--c-success-wash); padding: 1px 6px; border-radius: var(--radius-pill); }
.db-spark { width: 100%; height: 26px; margin-top: 6px; }
.db-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.db-head b { font-size: 12px; font-weight: 650; }
.db-head > span { font-size: 10.5px; color: var(--c-ink-3); }
.db-funnel { width: 100%; flex: 1; min-height: 0; }
.db-funnel__labels { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.db-funnel__labels span { display: block; font-size: 10.5px; color: var(--c-ink-3); }
.db-funnel__labels b { display: block; font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.db-funnel__labels em { display: block; font-style: normal; font-size: 10px; color: var(--c-success); font-weight: 600; }
.db-grow { transform-box: fill-box; transform-origin: bottom; animation: rise .8s cubic-bezier(.2,.8,.2,1) both; }
.db-funnel .db-grow { transform-origin: center; animation-name: grow-y; }
@keyframes grow-y { from { transform: scaleY(0); } }
.db-gauge__wrap { position: relative; display: flex; justify-content: center; }
.db-gauge { width: 100%; max-width: 190px; }
.db-gauge__val { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; }
.db-gauge__val b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.02em; }
.db-gauge__val span { font-size: 10px; color: var(--c-ink-3); }
.db-legend { margin-top: 8px; display: flex; flex-direction: column; gap: 4px; }
.db-legend li { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: var(--c-ink-2); }
.db-legend i { width: 7px; height: 7px; border-radius: 2px; }
.db-legend b { margin-left: auto; color: var(--c-ink); font-weight: 600; }
.db-list { display: flex; flex-direction: column; gap: 9px; margin-top: 2px; }
.db-list li { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "n v" "b b"; align-items: center; gap: 4px 6px; font-size: 11px; }
.db-list li .av { grid-area: auto; }
.db-list li:has(.av) { grid-template-columns: auto 1fr auto; grid-template-areas: "a n v" "b b b"; }
.db-list span { grid-area: n; font-weight: 500; }
.db-list em { grid-area: v; font-style: normal; color: var(--c-ink-3); font-size: 10.5px; text-align: right; }
.db-list i { grid-area: b; height: 4px; border-radius: 2px; background: var(--c-canvas); overflow: hidden; }
.db-list i b { display: block; height: 100%; border-radius: 2px; background: var(--c-action); animation: grow 1s cubic-bezier(.2,.8,.2,1) both; transform-origin: left; }
.db-chart { width: 100%; flex: 1; min-height: 0; }
.db-chart text { font-size: 9.5px; fill: var(--c-ink-3); font-family: var(--font); }
.db-table { width: 100%; border-collapse: collapse; }
.db-table th { position: static; padding: 4px 6px; font-size: 9.5px; background: none; }
.db-table td { padding: 6px; font-size: 11px; }
.db-table td:first-child, .db-table th:first-child { padding-left: 0; width: auto; }
.db-table td:not(:first-child), .db-table th:not(:first-child) { text-align: right; }
.db-table tr:last-child td { border-bottom: 0; }
.db-zap { display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 4px; background: var(--c-auto-wash); color: var(--c-auto); margin-right: 6px; vertical-align: -3px; }
.db-zap svg { width: 10px; height: 10px; }

/* ---------- White-label theme: an agency's own brand on the same components ---------- */
html[data-theme="whitelabel"] {
  --c-action: #b4441c; --c-action-hover: #96370f; --c-action-wash: #fbeee7;
  --c-canvas: #f7f4ef; --c-column: #f3eee6; --c-raised: #fbf9f6;
  --c-ink: #1f1a17; --c-ink-2: #574c45; --c-line: #e7e0d6; --c-line-strong: #d6ccbf;
  --c-auto: #6d4fc2; --c-auto-wash: #f1ecfb;
  --radius-lg: 14px; --radius: 12px; --radius-sm: 9px;
}
html[data-theme="whitelabel"] .brand__mark { background: #b4441c; }

/* ---------- Notification center ---------- */
.notif { position: absolute; z-index: 46; top: 52px; right: 14px; width: 390px; max-height: 640px; display: flex; flex-direction: column; background: var(--c-surface); border-radius: var(--radius-lg); box-shadow: var(--shadow-pop); overflow: hidden; animation: popin .2s ease; }
.notif__head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 10px; }
.notif__head b { font-size: 14px; font-weight: 700; letter-spacing: -.01em; margin-right: 8px; }
.notif__head span { font-size: 11px; color: var(--c-action); font-weight: 600; }
.notif__link { font-size: 11px; color: var(--c-ink-3); font-weight: 500; }
.notif__link:hover { color: var(--c-ink); }
.notif__tabs { display: flex; gap: 4px; padding: 0 12px 10px; border-bottom: 1px solid var(--c-line); }
.notif__tabs button { height: 26px; padding: 0 10px; border-radius: var(--radius-pill); font-weight: 500; color: var(--c-ink-2); display: inline-flex; align-items: center; gap: 5px; }
.notif__tabs button[aria-pressed="true"] { background: var(--c-ink); color: var(--c-surface); }
.notif__tabs i { font-style: normal; font-size: 10px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--c-danger); color: #fff; display: grid; place-items: center; padding: 0 4px; }
.notif__list { overflow-y: auto; padding: 4px 8px 8px; }
.notif__day { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--c-ink-3); padding: 10px 8px 4px; }
.nt { position: relative; display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; padding: 10px 8px; border-radius: var(--radius); cursor: pointer; }
.nt:hover { background: var(--c-raised); }
.nt.is-unread { background: var(--c-action-wash); }
.nt__ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--c-canvas); color: var(--c-ink-2); }
.nt__ic svg { width: 13px; height: 13px; }
.nt--ai .nt__ic { background: var(--c-auto-wash); color: var(--c-auto); }
.nt--ai .nt__ic svg { fill: var(--c-auto); stroke: none; }
.nt--reply .nt__ic { background: #e7f6ee; color: #16884a; }
.nt--task .nt__ic { background: var(--c-warn-wash); color: var(--c-warn); }
.nt--auto .nt__ic { background: var(--c-auto-wash); color: var(--c-auto); }
.nt__t { font-weight: 600; font-size: 12px; line-height: 1.35; }
.nt__s { font-size: 11px; color: var(--c-ink-2); margin-top: 2px; line-height: 1.4; }
.nt__act { margin-top: 7px; height: 24px; padding: 0 10px; border-radius: var(--radius-sm); background: var(--c-surface); box-shadow: inset 0 0 0 1px var(--c-line-strong); font-weight: 600; font-size: 11px; color: var(--c-ink); }
.nt--ai .nt__act, .nt.is-unread .nt__act { background: var(--c-action); color: var(--c-on-action); box-shadow: none; }
.nt__when { font-size: 10.5px; color: var(--c-ink-3); white-space: nowrap; }
.notif__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px; border-top: 1px solid var(--c-line); font-size: 10.5px; color: var(--c-ink-3); background: var(--c-raised); }
.notif__foot svg { width: 12px; height: 12px; }
.notif__route { margin-left: auto; color: var(--c-ink-2); font-weight: 500; }

/* ---------- Design-system highlights ---------- */
[data-hl="semantic"] .btn--primary, [data-hl="semantic"] .col__dot, [data-hl="semantic"] .col__auto, [data-hl="semantic"] .datechip.is-soon, [data-hl="semantic"] .badge-new, [data-hl="semantic"] .nav__btn[aria-selected="true"]::after { outline: 2px solid #22d3ee; outline-offset: 2px; border-radius: 6px; }
[data-hl="components"] .autopill, [data-hl="components"] .ai-hint, [data-hl="components"] .view-chip, [data-hl="components"] .lob, [data-hl="components"] .step, [data-hl="components"] .fchip, [data-hl="components"] .kpi, [data-hl="components"] .db-card { outline: 2px dashed #f59e0b; outline-offset: 2px; }
.hl-tag { position: absolute; z-index: 75; left: 16px; bottom: 16px; padding: 7px 12px; border-radius: var(--radius-pill); background: #111; color: #fff; font-size: 11.5px; font-weight: 600; box-shadow: var(--shadow-pop); animation: toast-in .3s ease; }
.tokpanel { position: absolute; z-index: 74; right: 16px; bottom: 16px; width: 230px; padding: 12px; border-radius: 12px; background: #111; color: #f2f2f2; box-shadow: var(--shadow-pop); animation: toast-in .3s ease; }
.tokpanel__h { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #9a9a9a; margin-bottom: 6px; }
.tokpanel__row { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; padding: 4px 0; font-size: 11px; }
.tokpanel__row i { width: 16px; height: 16px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }
.tokpanel__r { background: transparent; box-shadow: inset 0 0 0 1.5px #f2f2f2 !important; }
.tokpanel__row code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 10.5px; color: #bdbdbd; }

/* notifications: a clear gap between rows, unread shown by tint only */
.notif__list { display: flex; flex-direction: column; gap: 4px; }
.notif__day { padding-bottom: 2px; }
/* invite sits with the other actions on the right */
.invite { margin: 0 2px 0 0; }

/* Dark mode keeps each brand's accent */
html[data-mode="dark"][data-theme="vertafore"] { --c-action: #19a2b5; --c-action-hover: #33b5c6; --c-action-wash: rgba(25,162,181,.16); --c-auto: #fb923c; --c-auto-wash: rgba(251,146,60,.14); }
html[data-mode="dark"][data-theme="whitelabel"] { --c-action: #e0703f; --c-action-hover: #e98a5f; --c-action-wash: rgba(224,112,63,.16); --c-auto: #a78bfa; }
html[data-mode="dark"][data-theme="whitelabel"] .brand__mark { background: #e0703f; }
