:root {
  /* Val Growth brand — pulled from valgrowth.co */
  --brand: #E6228F; --brand-hi: #FF2FA0;
  --dark: #0C0C0E; --dark-2: #141417; --dark-3: #1A1A1E;
  --green: #2ECC71; --orange: #F39C12; --red: #E74C3C;
  --canvas: #F4F0F6; --card: #FFFFFF; --border: #E8E4EA;
  --ink: #0C0C0E; --mut: #6B6B73;
  /* legacy aliases so every rule below picks up the new theme */
  --navy: #0C0C0E; --navy-deep: #141417;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--canvas); color: var(--ink);
  font: 14px/1.5 "Inter", system-ui, sans-serif;
}
h1, h2 { font-family: "Inter", sans-serif; font-weight: 700; }
h1 { letter-spacing: -.02em; }
h2, h3 { letter-spacing: -.01em; }
h3 { font-family: "Inter", sans-serif; }
.kv, .pv { font-family: "Space Mono", ui-monospace, monospace; letter-spacing: -.02em; }
h1 { font-size: 22px; margin: 0; }
h3 { font-size: 13px; margin: 0 0 10px; color: var(--mut); text-transform: uppercase; letter-spacing: .06em; }
a { color: var(--brand); }

/* ---------- sidebar ---------- */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 248px;
  background: linear-gradient(180deg, #0C0C0E, #141417);
  color: #C9C9D1; padding: 18px 14px; overflow-y: auto;
  display: flex; flex-direction: column;
}
.brand { display: flex; gap: 10px; align-items: center; margin-bottom: 20px; color: #fff; }
.brand small { display: block; font-size: 10px; color: #9A9AA2; letter-spacing: .08em; text-transform: uppercase; }
.brand-mark { width: 34px; height: 34px; display: block; background: rgba(255,255,255,.06);
  border-radius: 11px; padding: 5px; box-sizing: content-box; }
.nav-group { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #5E5E68; margin: 16px 8px 4px; }
.nav-item {
  display: flex; gap: 10px; align-items: center; padding: 8px 10px;
  border-radius: 9px; color: #C9C9D1; font-size: 13px; font-weight: 500;
  text-decoration: none; margin: 1px 0;
}
.nav-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav-item.on { background: var(--brand); color: #fff;
  box-shadow: 0 6px 18px rgba(230,34,143,.32); }
.nav-item.on .ni { color: #fff; }
.ni { width: 16px; text-align: center; color: #9A9AA2; }
.nav-dash { margin-bottom: 4px; }
.sidebar-foot { margin-top: auto; padding: 12px 8px 0; font-size: 12px;
  display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.foot-user { display: flex; gap: 9px; align-items: center; min-width: 0; }
.foot-avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px;
  background: linear-gradient(135deg, var(--brand), #FF2FA0); color: #fff;
  font-size: 11px; font-weight: 700; display: flex; align-items: center;
  justify-content: center; letter-spacing: .02em; }
.foot-id { display: flex; flex-direction: column; min-width: 0; }
.foot-id strong { color: #E8E4EA; font-size: 12px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.foot-id small { color: #6B6B73; font-size: 10px; }
.sidebar-foot a { color: #9A9AA2; }

/* ---------- layout ---------- */
.content { margin-left: 248px; padding: 24px 28px 60px; }
.page-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 16px; }
.page-head .btn {
  display: inline-block; background: var(--brand); color: #fff; border: 0;
  padding: 9px 16px; border-radius: 10px; font-weight: 700; font-size: 13px;
  cursor: pointer; text-decoration: none; font-family: Inter, sans-serif;
  transition: background .12s;
}
.page-sub { color: var(--mut); font-size: 13px; }
.flash { background: #FDEBF5; border: 1px solid var(--brand); color: #A31264;
  padding: 8px 14px; border-radius: 8px; margin-bottom: 14px; }
.flash.error { background: #FDEAE7; border-color: var(--red); color: #B03328; }
.flash.warn { background: #FDF3E1; border-color: var(--orange); color: #A66B0A; }

/* ---------- pulse band ---------- */
.pulse {
  background: radial-gradient(900px 380px at 82% -30%, rgba(230,34,143,.22), transparent 60%),
              linear-gradient(135deg, #0C0C0E, #1A1A1E);
  border-radius: 18px; color: #fff; padding: 20px 24px; margin-bottom: 18px;
  border: 1px solid #26262C;
  box-shadow: 0 18px 40px -18px rgba(12,12,14,.5);
}
.pulse-head { display: flex; align-items: center; gap: 14px; margin-bottom: 14px;
  flex-wrap: wrap; row-gap: 10px; }
.pulse-head h1, .pulse-head h2 { white-space: nowrap; }
.pulse-date { white-space: nowrap; }
.status-dot { white-space: nowrap; }
.syncall button, .syncall { white-space: nowrap; }
.pulse-head h1 { color: #fff; }
.pulse-date { color: #9A9AA2; font-size: 12px; }
.pulse-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.pulse-cell { background: rgba(255,255,255,.055); border-radius: 12px; padding: 12px 14px; }
.pd { display: block; margin-top: 6px; font-size: 10.5px; letter-spacing: .02em; }
.pd-good { color: #6FE3A1; }
.pd-flat { color: #7A7A84; }
.status-dot { display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; color: #9FE8BE; }
.status-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(46,204,113,.18); }
.pv { font-size: 26px; font-weight: 700; display: block; }
.pv em { font-style: normal; font-size: 15px; color: #9A9AA2; }
.pl { font-size: 11px; color: #9A9AA2; text-transform: uppercase; letter-spacing: .05em; }
.pbar { height: 5px; background: rgba(255,255,255,.15); border-radius: 3px; margin-top: 8px; overflow: hidden; }
.pbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-hi)); border-radius: 3px; }
.pbar.big { height: 10px; background: #EDE8EF; margin-top: 6px; }

.client-switch { margin-left: 10px; }
.syncall { margin-left: auto; }
.client-switch select {
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid #3A3A40;
  border-radius: 8px; padding: 7px 12px; font: inherit; font-weight: 600;
}
.client-switch select option { color: var(--ink); background: #fff; }

/* ---------- cards ---------- */
.cards4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.cards2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-bottom: 18px; }
.tight { margin-bottom: 14px; }
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: 14px;
  padding: 16px 18px; box-shadow: 0 1px 2px rgba(22,36,58,.05);
}
.kpi { border-left: 4px solid var(--brand); }
.kpi.b-green { border-left-color: var(--green); }
.kpi.b-orange { border-left-color: var(--orange); }
.kpi.b-navy { border-left-color: var(--brand); }
.kv { font-size: 24px; font-weight: 700; display: block; }
.kl { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.prog-row { display: flex; justify-content: space-between; font-size: 13px; }

.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.client-card { text-decoration: none; color: var(--ink); border-top: 3px solid var(--brand);
  transition: box-shadow .15s, transform .15s; }
.client-card:hover { box-shadow: 0 6px 18px rgba(230,34,143,.14); transform: translateY(-2px); }
.client-card.all { border-top-color: var(--dark); }
.cc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.cc-name { font-family: "Inter", sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -.01em; }
.cc-count { font-family: "Space Mono", monospace; font-size: 30px; font-weight: 700; display: block; }
.cc-label { font-size: 11px; color: var(--mut); text-transform: uppercase; letter-spacing: .05em; }
.client-chip { background: #FDEBF5; color: #A31264; border: 1px solid #F5C6E1;
  padding: 4px 12px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.client-chip a { margin-left: 8px; font-weight: 500; }

/* ---------- tables ---------- */
.table-card { padding: 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 11px 14px; background: #F8F5F9; color: var(--mut);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; }
td { padding: 10px 14px; border-bottom: 1px solid #F0ECF1; vertical-align: top; }
tr:hover td { background: #FBF8FB; }
.empty { text-align: center; color: var(--mut); padding: 28px; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; }
.row-actions button { background: none; border: none; color: var(--red); cursor: pointer; font: inherit; padding: 0; margin-left: 10px; }
.mini td { padding: 6px 0; border: none; }
.mini td:last-child { text-align: right; font-weight: 600; }
.widget-title { font-weight: 600; margin: 0 0 10px; }
.note { color: var(--mut); font-size: 12px; }

.chart-wrap { position: relative; height: 220px; }

/* ---------- pills & health ---------- */
.pill { display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.pill.ok { background: #E8F8EF; color: #1E7A45; }
.pill.warn { background: #FDF3E1; color: #A66B0A; }
.pill.bad { background: #FDEAE7; color: #B03328; }
.pill.muted { background: #EFEBF0; color: var(--mut); }
.health { font-weight: 700; }
.health.ok { color: var(--green); }
.health.warn { color: var(--orange); }
.health.bad { color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 8px; }
.dot.ok { background: var(--green); } .dot.warn { background: var(--orange); } .dot.bad { background: var(--red); }
.issues { list-style: none; margin: 0; padding: 0; }
.issues li { padding: 7px 0; border-bottom: 1px solid #F0ECF1; font-size: 13px; }
.issues li:last-child { border: none; }

/* ---------- forms ---------- */
.form-card form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field.wide { grid-column: 1 / -1; }
.field span { font-size: 12px; font-weight: 600; color: var(--mut); }
input, select, textarea {
  font: inherit; padding: 8px 10px; border: 1px solid var(--border);
  border-radius: 8px; background: #fff; color: var(--ink);
}
input:focus, select:focus, textarea:focus, .tick:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 1px;
}
.form-actions { grid-column: 1 / -1; }
.btn {
  display: inline-block; background: var(--brand); color: #fff;
  font-weight: 600; border: none; border-radius: 8px; padding: 9px 18px;
  cursor: pointer; text-decoration: none; font-size: 13px;
}
.btn:hover { background: #FF2FA0; }
.btn.ghost { background: #fff; border: 1px solid var(--border); color: var(--ink); }
.btn.ghost:hover { background: #fff; border-color: var(--brand); color: var(--brand); }
.btn.full { width: 100%; }
.btn.small { padding: 5px 12px; font-size: 12px; }
.alerts-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.alerts-head h3 { margin: 0; }
.alert-count { background: var(--brand); color: #fff; border-radius: 12px;
  padding: 1px 8px; font-size: 11px; margin-left: 6px; font-family: "Space Mono", monospace; }
.alert-link { color: var(--ink); text-decoration: none; }
.alert-link:hover { color: var(--brand); }

.settings-group { margin-bottom: 26px; }
.sg-head { margin-bottom: 12px; display: flex; align-items: baseline; gap: 12px; }
.sg-head h2 { font-size: 17px; margin: 0; }
.settings-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.setting-card { padding: 14px 16px; }
.setting-card.narrow { max-width: 420px; }
.sc-head { display: flex; justify-content: space-between; align-items: baseline; }
.sc-reset { background: none; border: none; color: var(--mut); font-size: 11px;
  cursor: pointer; text-decoration: underline; padding: 0; }
.sc-reset:hover { color: var(--brand); }
.setting-card .note { margin: 3px 0 10px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; min-height: 42px;
  border: 1px solid var(--border); border-radius: 10px; background: #FBFAFC; cursor: text; }
.chips:focus-within { border-color: var(--brand); }
.chip { display: inline-flex; align-items: center; gap: 5px; background: #fff;
  border: 1px solid var(--border); border-radius: 16px; padding: 3px 6px 3px 11px;
  font-size: 12px; font-weight: 500; }
.chip-x { background: #EFEBF0; color: var(--mut); border: none; border-radius: 50%;
  width: 17px; height: 17px; line-height: 1; cursor: pointer; font-size: 12px; padding: 0; }
.chip-x:hover { background: var(--brand); color: #fff; }
.chip-entry { border: none !important; background: transparent; outline: none !important;
  flex: 1; min-width: 90px; font: inherit; font-size: 12px; padding: 3px; }
.save-bar { display: flex; align-items: center; gap: 14px; margin: 4px 0 30px; }
.pw-form { display: flex; flex-direction: column; gap: 12px; }

.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; }
.perm-item { display: flex; gap: 9px; align-items: center; font-size: 13px;
  padding: 7px 10px; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.perm-item:hover { border-color: var(--brand); }
.perm-item input { accent-color: var(--brand); width: 15px; height: 15px; }

/* ---------- checklist grid ---------- */
.grid th.today, .grid td.today { background: #FDF1F8; }
.grid th small { display: block; font-weight: 400; }
.tick-cell { text-align: center; }
.tick { width: 34px; height: 30px; border-radius: 8px; border: 1px solid var(--border);
  background: #fff; cursor: pointer; font-size: 14px; }
.tick.ok { background: #E8F8EF; color: #1E7A45; border-color: var(--green); }
.tick.bad { background: #FDEAE7; color: #B03328; border-color: var(--red); }
.tick.muted { color: var(--mut); }
.totals td { background: #F8F5F9; }

.modal-back { position: fixed; inset: 0; background: rgba(12,12,14,.55);
  display: grid; place-items: center; z-index: 60; }
.modal-back[hidden] { display: none !important; }
.modal { background: #fff; border-radius: 14px; padding: 24px 26px; width: 340px;
  box-shadow: 0 18px 50px rgba(12,12,14,.35); }
.modal h3 { font-family: "Inter", sans-serif; font-weight: 700; font-size: 16px;
  text-transform: none; letter-spacing: 0; color: var(--ink); margin-bottom: 4px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.btn.danger { background: var(--red); color: #fff; }
.btn.danger:hover { background: #C93A2E; }

.table-tools { padding: 12px 14px; border-bottom: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.table-tools input[type="search"] { width: 230px; max-width: 100%; }
.tbl-filter { font-size: 12px; padding: 7px 8px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--ink);
  max-width: 200px; }
.tbl-filter:not([value=""]):focus { border-color: var(--brand); }
.tbl-count { margin-left: auto; font-size: 12px; color: var(--mut);
  font-family: "Space Mono", monospace; white-space: nowrap; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--brand); }
th.s-asc::after { content: " ↑"; color: var(--brand); }
th.s-desc::after { content: " ↓"; color: var(--brand); }
.req { color: var(--red); font-style: normal; }
.chart-note { margin-top: 10px; }

.error-wrap { display: grid; place-items: center; min-height: 60vh; }
.error-card { text-align: center; max-width: 420px; padding: 40px; }
.err-code { font-family: "Space Mono", monospace; font-size: 44px; font-weight: 700;
  color: var(--brand); display: block; }
.error-card .btn { margin-top: 16px; }

.score-row { display: flex; gap: 16px; align-items: center; margin-bottom: 14px; }
.score { font-family: "Space Mono", monospace; font-size: 40px; font-weight: 700;
  border-radius: 14px; padding: 8px 18px; }
.score.ok { background: #E8F8EF; color: #1E7A45; }
.score.warn { background: #FDF3E1; color: #A66B0A; }
.score.bad { background: #FDEAE7; color: #B03328; }
code { background: #F4F0F6; padding: 2px 6px; border-radius: 6px; font-size: 11px;
  word-break: break-all; }

/* ---------- login ---------- */
.login-body { display: grid; place-items: center; min-height: 100vh;
  background: radial-gradient(1200px 600px at 70% -10%, rgba(230,34,143,.25), transparent 60%),
              linear-gradient(135deg, var(--dark) 0%, var(--dark-3) 100%); }
.login-card { background: #fff; border-radius: 14px; padding: 32px; width: 340px; }
.login-card .brand { color: var(--ink); justify-content: center; margin-bottom: 22px; }
.login-card .brand small { color: var(--mut); }
.login-card form { display: flex; flex-direction: column; gap: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .pulse-grid { grid-template-columns: repeat(3, 1fr); }
  .cards4 { grid-template-columns: repeat(2, 1fr); }
  .cards3 { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .sidebar { position: static; width: 100%; height: auto; }
  .content { margin-left: 0; padding: 16px; }
  .cards4, .cards2, .pulse-grid { grid-template-columns: 1fr 1fr; }
  .form-card form { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* leads database */
.stage-tabs { display: flex; gap: 10px; align-items: center; margin: 0 0 14px; }
.stage-tab { padding: 9px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px;
  text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.stage-tab.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.stage-tab .stage-count { font-family: "Space Mono", monospace; font-size: 12px;
  background: rgba(0,0,0,.12); border-radius: 6px; padding: 1px 7px; }
.stage-tab.on .stage-count { background: rgba(255,255,255,.22); }
.pager { display: flex; gap: 12px; align-items: center; justify-content: center;
  padding: 14px; border-top: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
.form-grid .wide { grid-column: 1 / -1; }
.empty-state { text-align: center; color: var(--mut); padding: 34px 0 !important; }

.mono { font-family: "Space Mono", monospace; }

.quick-links { margin: 10px 0 0; padding: 0 0 0 18px; }
.quick-links li { margin: 6px 0; }
.quick-links a { color: var(--brand); font-weight: 600; }

/* dashboard bar breakdown + meter */
.bar-list { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.bar-row { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; }
.bar-label { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { height: 10px; background: var(--canvas); border-radius: 6px; overflow: hidden; }
.bar-track i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), #FF2FA0); border-radius: 6px; }
.bar-val { text-align: right; font-size: 12px; color: var(--mut); }
.meter { margin-top: 8px; height: 5px; background: rgba(255,255,255,.14); border-radius: 4px; overflow: hidden; width: 100%; }
.meter i { display: block; height: 100%; background: var(--brand); }

/* leads hero — apollo-style */
.leads-hero { position: relative; overflow: hidden; }
.leads-hero::before { content: ""; position: absolute; inset: -40% -20% auto auto;
  width: 60%; height: 180%; pointer-events: none;
  background: radial-gradient(closest-side, rgba(230,34,143,.28), transparent 70%); }
.leads-hero .pulse-cell { position: relative; }
.stat-ico { position: absolute; top: 14px; right: 14px; width: 26px; height: 26px;
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; }
.i-brand { background: rgba(230,34,143,.2); color: #FF6FC0; }
.i-green { background: rgba(46,204,113,.18); color: #6FE3A1; }
.i-orange { background: rgba(243,156,18,.18); color: #FFC966; }
.i-navy { background: rgba(255,255,255,.1); color: #C9C9D1; }
.empty-hero { text-align: center; padding: 34px 20px 38px; position: relative; }
.empty-hero .eh-badge { width: 58px; height: 58px; margin: 0 auto 16px; border-radius: 16px;
  background: linear-gradient(135deg, var(--brand), #FF2FA0); color: #fff;
  font-size: 26px; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 28px rgba(230,34,143,.4); }
.empty-hero h2 { color: #fff; margin: 0 0 8px; }
.empty-hero p { color: #B9B9C2; font-size: 14px; line-height: 1.55; margin: 0 0 18px; }
.eh-actions { display: flex; gap: 10px; justify-content: center; }
.feed { display: flex; flex-direction: column; }
.feed-row { display: flex; gap: 12px; align-items: center; padding: 10px 2px;
  border-bottom: 1px solid var(--border); }
.feed-row:last-child { border-bottom: 0; }
.feed-ico { width: 30px; height: 30px; border-radius: 9px; flex: 0 0 30px;
  display: flex; align-items: center; justify-content: center; font-weight: 700; }
.feed-row .i-green { background: #E8F8EF; color: #1F9D5B; }
.feed-row .i-orange { background: #FDF3E1; color: #C87F0A; }
.feed-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.feed-main strong { font-size: 13.5px; }
.feed-count { font-size: 14px; }
.feed-dl { color: var(--brand); font-weight: 700; text-decoration: none; padding: 4px 8px;
  border-radius: 8px; }
.feed-dl:hover { background: #FCE9F4; }

/* ai copy studio */
.studio { display: flex; flex-direction: column; gap: 18px; max-width: 860px; }
.step-n { display: inline-flex; width: 24px; height: 24px; margin-right: 8px;
  border-radius: 8px; background: var(--brand); color: #fff; font-size: 13px;
  align-items: center; justify-content: center; }
.ai-out { margin-top: 14px; border-top: 1px solid var(--border); padding-top: 12px; }
.ai-out h4 { margin: 0 0 8px; font-size: 13px; color: var(--mut); font-weight: 600; }
.ai-out pre { white-space: pre-wrap; word-wrap: break-word; background: var(--canvas);
  border: 1px solid var(--border); border-radius: 10px; padding: 14px;
  font-family: Inter, sans-serif; font-size: 13px; line-height: 1.55; max-height: 480px;
  overflow: auto; }
button[disabled] { opacity: .45; cursor: not-allowed; }
.pb-list { margin-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.pb-chip { display: flex; justify-content: space-between; align-items: center;
  background: var(--canvas); border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; font-size: 13px; }

/* opportunities board */
.opp-filters { display: flex; gap: 8px; }
.opp-filters select { font-size: 13px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--border); background: #fff; }
.board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 14px;
  align-items: flex-start; }
.board-col { flex: 0 0 240px; background: #EFEAF1; border-radius: 14px;
  padding: 10px; min-height: 220px; transition: box-shadow .15s, background .15s; }
.board-col.drop-ok { background: #FCE4F1; box-shadow: 0 0 0 2px var(--brand) inset; }
.col-head { display: flex; justify-content: space-between; align-items: center; }
.col-name { font-weight: 700; font-size: 13px; }
.col-count { font-family: "Space Mono", monospace; font-size: 11px;
  background: #fff; border-radius: 6px; padding: 1px 7px; }
.col-total { font-family: "Space Mono", monospace; font-size: 11px;
  color: var(--mut); margin: 3px 0 10px; }
.col-won .col-name { color: #1F9D5B; }
.col-lost .col-name { color: #C0392B; }
.col-cards { display: flex; flex-direction: column; gap: 8px; }
.col-empty { border: 1.5px dashed var(--border); border-radius: 10px;
  color: var(--mut); font-size: 12px; text-align: center; padding: 16px 0; }
.opp-card { background: #fff; border: 1px solid var(--border); border-radius: 11px;
  padding: 10px 12px; cursor: grab; box-shadow: 0 1px 2px rgba(12,12,14,.05); }
.opp-card.dragging { opacity: .45; }
.opp-card:active { cursor: grabbing; }
.opp-name { font-weight: 600; font-size: 13.5px; color: var(--ink);
  text-decoration: none; display: block; }
.opp-name:hover { color: var(--brand); }
.opp-sub { font-size: 12px; color: var(--mut); margin-top: 2px; }
.opp-meta { font-size: 11.5px; color: var(--mut); margin-top: 6px;
  display: flex; gap: 4px; flex-wrap: wrap; }
.opp-tags { display: flex; justify-content: space-between; align-items: center;
  margin-top: 8px; }
.opp-owner { width: 22px; height: 22px; border-radius: 50%; background: var(--dark);
  color: #fff; font-size: 11px; font-weight: 700; display: flex;
  align-items: center; justify-content: center; }

.pipeline-edit input[type="number"] { width: 60px; }
.pipeline-edit td { padding: 5px 6px; }
.pipeline-edit .new-row input { opacity: .85; }


/* segmented client switcher */
.client-seg { display: inline-flex; gap: 3px; background: #fff;
  border: 1px solid var(--border); border-radius: 10px; padding: 3px; }
.client-seg .seg { padding: 6px 13px; border-radius: 8px; font-size: 12.5px;
  font-weight: 600; color: var(--mut); text-decoration: none;
  transition: background .12s, color .12s; }
.client-seg .seg:hover { color: var(--ink); }
.client-seg .seg.on { background: var(--brand); color: #fff;
  box-shadow: 0 3px 10px rgba(230,34,143,.3); }

/* current value beside chart titles */
.h3-val { float: right; font-family: "Space Mono", monospace; font-size: 14px;
  font-weight: 700; }


/* switcher at scale */
.client-seg { max-width: 46%; overflow-x: auto; scrollbar-width: none; }
.client-seg::-webkit-scrollbar { display: none; }
.client-seg .seg { white-space: nowrap; }
.client-seg-select { padding: 3px; overflow: visible; max-width: none; }
.client-seg-select select { border: 0; background: transparent; font: 600 12.5px Inter, sans-serif;
  color: var(--ink); padding: 6px 10px; border-radius: 8px; cursor: pointer; outline: none; }
@media (max-width: 1200px) { .client-seg { max-width: 100%; } }

/* profile popup (slack-style) */
.sidebar-foot { position: relative; }
.foot-user { background: none; border: 0; padding: 6px; margin: -6px; cursor: pointer;
  border-radius: 10px; display: flex; gap: 9px; align-items: center; min-width: 0;
  text-align: left; font-family: Inter, sans-serif; flex: 1; }
.foot-user:hover, .foot-user[aria-expanded="true"] { background: rgba(255,255,255,.07); }
.foot-caret { color: #6B6B73; font-size: 11px; margin-left: auto; transform: translateY(1px); }
.user-menu { position: absolute; bottom: calc(100% + 12px); left: 0; width: 224px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 18px 44px -12px rgba(12,12,14,.35); padding: 8px; z-index: 60; }
.um-head { display: flex; gap: 10px; align-items: center; padding: 8px 8px 6px; }
.um-avatar { width: 36px; height: 36px; font-size: 13px; flex: 0 0 36px; }
.um-who { min-width: 0; display: flex; flex-direction: column; }
.um-who strong { color: var(--ink); font-size: 13.5px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.um-who small { color: var(--mut); font-size: 11px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.um-role { display: block; margin: 0 8px 6px; padding: 3px 9px; background: var(--canvas);
  border-radius: 7px; font-size: 10.5px; color: var(--mut); width: fit-content; }
.um-item { display: flex; gap: 9px; align-items: center; padding: 8px 9px;
  border-radius: 9px; color: var(--ink); font-size: 13px; font-weight: 500;
  text-decoration: none; }
.um-item:hover { background: #FCE9F4; color: var(--brand); }
.um-ic { width: 16px; text-align: center; color: var(--mut); }
.um-item:hover .um-ic { color: var(--brand); }
.um-sep { height: 1px; background: var(--border); margin: 6px 4px; }
.um-signout { color: var(--red, #E74C3C); }
.um-signout .um-ic { color: var(--red, #E74C3C); }
.um-signout:hover { background: #FDEDEB; color: #E74C3C; }

/* profile page */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 18px;
  align-items: start; max-width: 940px; }
@media (max-width: 900px) { .profile-grid { grid-template-columns: 1fr; } }
.profile-card { text-align: center; padding: 26px 20px; }
.profile-photo { width: 110px; height: 110px; border-radius: 26px; object-fit: cover;
  margin: 0 auto 14px; display: block; box-shadow: 0 10px 26px rgba(230,34,143,.25); }
.profile-initials { display: flex; font-size: 34px; }
.profile-card h2 { margin: 0 0 4px; }
.profile-title { color: var(--mut); font-size: 13px; margin: 0 0 10px; }
.profile-card .um-role { margin: 0 auto 10px; }
.profile-status { font-size: 13px; background: var(--canvas); border-radius: 9px;
  padding: 7px 12px; width: fit-content; margin: 0 auto 6px; }
.profile-contact { text-align: left; border-top: 1px solid var(--border);
  margin-top: 16px; padding-top: 12px; }
.profile-contact h3 { font-size: 12px; color: var(--mut); text-transform: uppercase;
  letter-spacing: .06em; margin: 0 0 8px; }
.profile-contact p { display: flex; gap: 8px; font-size: 13px; margin: 5px 0; }
.foot-photo { object-fit: cover; }
.um-status { display: block; margin: 0 8px 6px; font-size: 12px; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- dark theme ---------- */
[data-theme="dark"] {
  --canvas: #0F0F12; --card: #17171B; --ink: #ECECF1;
  --mut: #9A9AA2; --border: #26262C;
}
[data-theme="dark"] body { background: var(--canvas); color: var(--ink); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea {
  background: #101014; color: var(--ink); border-color: var(--border); }
[data-theme="dark"] .btn.ghost { background: #17171B; color: var(--ink); }
[data-theme="dark"] .client-seg, [data-theme="dark"] .stage-tab,
[data-theme="dark"] .col-count { background: #17171B; color: var(--ink); }
[data-theme="dark"] .client-seg-select select { color: var(--ink); }
[data-theme="dark"] .user-menu { background: #1B1B20;
  box-shadow: 0 18px 44px -12px rgba(0,0,0,.7); }
[data-theme="dark"] .um-item { color: var(--ink); }
[data-theme="dark"] .um-item:hover { background: rgba(230,34,143,.14); }
[data-theme="dark"] .um-signout:hover { background: rgba(231,76,60,.14); }
[data-theme="dark"] .board-col { background: #141418; }
[data-theme="dark"] .opp-card { background: #1B1B20; box-shadow: none; }
[data-theme="dark"] .opp-name { color: var(--ink); }
[data-theme="dark"] .bar-track { background: #26262C; }
[data-theme="dark"] .pb-chip, [data-theme="dark"] .ai-out pre,
[data-theme="dark"] .profile-status, [data-theme="dark"] .um-role,
[data-theme="dark"] .feed-row .i-green, [data-theme="dark"] .feed-row .i-orange {
  background: #101014; }
[data-theme="dark"] th { color: var(--mut); }
[data-theme="dark"] tr:hover td { background: rgba(255,255,255,.02); }
[data-theme="dark"] .flash { background: #17171B; border-color: var(--border); color: var(--ink); }
[data-theme="dark"] .fedd-dl:hover, [data-theme="dark"] .feed-dl:hover { background: rgba(230,34,143,.14); }
.um-theme { width: 100%; background: none; border: 0; cursor: pointer;
  font-family: Inter, sans-serif; }

/* settings tabs */
.settings-tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--border);
  margin: 4px 0 22px; }
.stab { background: none; border: 0; padding: 8px 2px 11px; font: 600 13.5px Inter, sans-serif;
  color: var(--mut); cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; }
.stab:hover { color: var(--ink); }
.stab.on { color: var(--brand); border-bottom-color: var(--brand); }
.acct-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
[data-theme="dark"] .stab:hover { color: var(--ink); }

/* integrations grid */
.intg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px; max-width: 980px; }
.intg-card { background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(22,36,58,.05); }
.intg-head { display: flex; gap: 11px; align-items: center; margin-bottom: 11px; }
.intg-ico { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 34px;
  color: #fff; font-weight: 800; font-size: 13px; display: flex;
  align-items: center; justify-content: center; letter-spacing: .01em; }
.intg-name { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.intg-name strong { font-size: 13.5px; }
.intg-name small { color: var(--mut); font-size: 11px; }
.intg-status { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: var(--canvas); color: var(--mut); white-space: nowrap; }
.intg-status.on { background: #E8F8EF; color: #1F9D5B; }
[data-theme="dark"] .intg-status.on { background: rgba(46,204,113,.15); color: #6FE3A1; }
.intg-card input { width: 100%; box-sizing: border-box; }
.intg-card .note { margin: 7px 0 0; font-size: 11.5px; }
.intg-code { display: flex; gap: 8px; align-items: center; }
.intg-code code { flex: 1; background: var(--canvas); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 11px; font-size: 11px; overflow-x: auto;
  white-space: nowrap; font-family: "Space Mono", monospace; }
.intg-savebar { margin-top: 16px; }

/* password visibility + forgot */
.pw-wrap { position: relative; display: block; }
.pw-wrap input { width: 100%; box-sizing: border-box; padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-size: 15px; opacity: .45;
  padding: 4px 6px; border-radius: 7px; }
.pw-eye:hover { opacity: .8; }
.pw-eye.on { opacity: 1; }
.login-forgot { text-align: center; margin: 12px 0 0; font-size: 12.5px; }
.login-forgot a { color: var(--mut); text-decoration: none; }
.login-forgot a:hover { color: var(--brand); }
.forgot-card { margin-top: 12px; background: var(--canvas); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px; font-size: 12.5px; line-height: 1.6;
  color: var(--ink); }
.forgot-card code { background: #fff; border: 1px solid var(--border); border-radius: 5px;
  padding: 1px 5px; font-size: 11px; }

/* ============ mobile ============ */
.mob-bar { display: none; }
.mob-backdrop { display: none; }

@media (max-width: 860px) {
  /* topbar */
  .mob-bar { display: flex; align-items: center; gap: 11px; position: sticky; top: 0;
    z-index: 55; background: linear-gradient(180deg, #0C0C0E, #141417);
    padding: 11px 14px; }
  .mob-logo { width: 26px; height: 26px; background: rgba(255,255,255,.06);
    border-radius: 8px; padding: 4px; box-sizing: content-box; }
  .mob-title { color: #fff; font-size: 14.5px; letter-spacing: -.01em; }
  .mob-burger { background: none; border: 0; padding: 6px; cursor: pointer;
    display: flex; flex-direction: column; gap: 4.5px; }
  .mob-burger span { width: 20px; height: 2px; background: #E8E4EA; border-radius: 2px;
    transition: transform .18s, opacity .18s; }
  body.nav-open .mob-burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  body.nav-open .mob-burger span:nth-child(2) { opacity: 0; }
  body.nav-open .mob-burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

  /* drawer */
  .sidebar { transform: translateX(-100%); transition: transform .22s ease;
    z-index: 70; width: min(280px, 84vw); box-shadow: none; }
  body.nav-open .sidebar { transform: translateX(0);
    box-shadow: 24px 0 60px -20px rgba(0,0,0,.55); }
  .mob-backdrop { position: fixed; inset: 0; background: rgba(12,12,14,.5);
    z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; }
  body.nav-open .mob-backdrop { display: block; opacity: 1; pointer-events: auto; }
  body.nav-open { overflow: hidden; }

  /* content full width */
  .content { margin-left: 0; padding: 16px 14px 60px; }

  /* dashboard pieces */
  .pulse { padding: 16px; border-radius: 15px; }
  .pulse-grid { grid-template-columns: repeat(2, 1fr); }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .charts, .chart-row, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .pulse-head h1 { font-size: 19px; }
  .client-seg { max-width: 100%; }

  /* kanban: touch scroll, fixed column width */
  .board { -webkit-overflow-scrolling: touch; }
  .board-col { min-width: 240px; }

  /* tables scroll inside their cards */
  .card { overflow-x: auto; }
  .card table { min-width: 560px; }

  /* settings + forms */
  .settings-tabs { overflow-x: auto; scrollbar-width: none; gap: 16px; }
  .settings-tabs::-webkit-scrollbar { display: none; }
  .intg-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .page-head { flex-wrap: wrap; gap: 10px; }
  .acct-row { flex-direction: column; align-items: flex-start; }

  /* profile popup fits small screens */
  .user-menu { width: min(240px, 78vw); }
}
