/* LandMonk CRM — clean white + blue theme */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --line: #E5E7EB;
  --line-2: #F1F3F6;
  --ink: #0F172A;
  --ink-2: #334155;
  --muted: #64748B;
  --brand: #2563EB;
  --brand-ink: #FFFFFF;
  --brand-600: #1D4ED8;
  --brand-50: #EFF6FF;
  --brand-100: #DBEAFE;
  --gold: #2563EB;
  --gold-600: #1D4ED8;
  --gold-50: #EFF6FF;
  --gold-100: #DBEAFE;
  --amber: #92400E;
  --amber-bg: #FEF3C7;
  --amber-line: #FDE68A;
  --red: #B91C1C;
  --red-bg: #FEE2E2;
  --blue: #2563EB;
  --blue-bg: #EFF6FF;
  --violet: #6D28D9;
  --violet-bg: #F3E8FF;
  --side: #FFFFFF;
  --side-2: #F1F5F9;
  --side-ink: #475569;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05), 0 1px 3px rgba(15, 23, 42, .04);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 24px -12px rgba(15, 23, 42, .18);
  --shadow-lg: 0 24px 60px -20px rgba(15, 23, 42, .30);
  --font: "Inter", system-ui, -apple-system, sans-serif;
  --display: "Inter", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--ink);
  background:
    radial-gradient(900px 500px at 100% -10%, rgba(37, 99, 235, .13), transparent 60%),
    radial-gradient(800px 500px at 20% 0%, rgba(37, 99, 235, .08), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--brand); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); margin: 0; letter-spacing: -0.01em; }
.mono { font-family: var(--mono); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
::selection { background: var(--gold-100); }

/* ---------- Shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 256px; flex: 0 0 256px;
  background:
    radial-gradient(420px 260px at 0% 0%, rgba(37, 99, 235, .20), transparent 70%),
    radial-gradient(380px 300px at 100% 100%, rgba(37, 99, 235, .35), transparent 70%),
    linear-gradient(180deg, #0F172A 0%, #0F172A 100%);
  color: var(--side-ink);
  display: flex; flex-direction: column; gap: 4px;
  padding: 22px 14px 18px; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  border-right: 1px solid rgba(37, 99, 235, .18);
}
.brand { display: flex; align-items: center; gap: 12px; padding: 2px 8px 22px; }
.brand-mark {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
  background: linear-gradient(145deg, #93C5FD 0%, #2563EB 45%, #1D4ED8 100%);
  display: grid; place-items: center; color: #FFFFFF;
  font-family: var(--display); font-weight: 800; font-size: 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .45), 0 8px 22px -8px rgba(37, 99, 235, .7);
}
.brand-name { font-family: var(--display); font-weight: 800; font-size: 17px; color: #fff; letter-spacing: .01em; }
.brand-sub { font-size: 11px; color: #64748B; letter-spacing: .14em; text-transform: uppercase; font-weight: 600; margin-top: 1px; }
.client-switch { padding: 0 4px 16px; }
.client-switch label { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em; color: #94A3B8; margin: 0 0 6px 4px; font-weight: 600; }
.client-switch select {
  width: 100%; min-height: 42px; border-radius: 11px; padding: 0 10px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); color: #F7F8FA;
}
.client-switch select option { color: #14171A; }
.nav-item {
  display: flex; align-items: center; gap: 12px; position: relative;
  min-height: 44px; padding: 0 12px; border-radius: 11px;
  color: var(--side-ink); background: transparent; border: 0; width: 100%;
  text-align: left; font-size: 14px; font-weight: 500;
  transition: background .15s, color .15s;
}
.nav-item svg { opacity: .8; }
.nav-item:hover { background: var(--side-2); color: #fff; }
.nav-item[aria-current="page"] {
  background: linear-gradient(90deg, rgba(37, 99, 235, .22), rgba(37, 99, 235, .04));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .28);
}
.nav-item[aria-current="page"] svg { opacity: 1; color: #93C5FD; }
.nav-item[aria-current="page"]::before {
  content: ""; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 3px;
  border-radius: 0 3px 3px 0; background: #93C5FD; box-shadow: 0 0 12px rgba(147, 197, 253, .8);
}
.nav-item .count {
  margin-left: auto; font-size: 11px; font-weight: 700;
  background: rgba(255, 255, 255, .12); color: #F7F8FA; padding: 2px 8px; border-radius: 999px;
}
.nav-item .count.warn { background: #2563EB; color: #FFFFFF; }
.sidebar-foot {
  margin-top: auto; padding: 12px; border-radius: 12px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .08);
  display: flex; align-items: center; gap: 10px;
}
.sync-dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #3DD68C; box-shadow: 0 0 0 4px rgba(61, 214, 140, .18), 0 0 10px rgba(61, 214, 140, .6); }
.sync-dot.off { background: #94A3B8; box-shadow: none; }
.sidebar-foot small { color: #94A3B8; display: block; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 30px; background: rgba(255, 255, 255, .78);
  backdrop-filter: saturate(1.5) blur(14px); -webkit-backdrop-filter: saturate(1.5) blur(14px);
  border-bottom: 1px solid var(--line);
}
.btn.menu-btn { display: none; }
.search { flex: 1 1 260px; max-width: 480px; position: relative; }
.search input {
  width: 100%; min-height: 44px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--surface); padding: 0 14px 0 40px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s;
}
.search input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(37, 99, 235, .16); }
.search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.content { padding: 26px 30px 56px; display: flex; flex-direction: column; gap: 22px; }

/* Hero header on every page */
.page-head {
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 26px 28px; border-radius: 20px; color: #fff;
  background:
    radial-gradient(500px 220px at 100% 0%, rgba(147, 197, 253, .35), transparent 65%),
    radial-gradient(400px 200px at 0% 100%, rgba(61, 214, 140, .18), transparent 70%),
    linear-gradient(120deg, #0F172A 0%, #1E293B 55%, #2563EB 100%);
  box-shadow: 0 20px 40px -22px rgba(15, 23, 42, .75);
}
.page-head::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(90deg, transparent 30%, #000);
  mask-image: linear-gradient(90deg, transparent 30%, #000);
}
.page-head > * { position: relative; z-index: 1; }
.page-head h1 { font-size: 28px; font-weight: 800; color: #fff; }
.page-head h1::after { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; margin-top: 10px; background: linear-gradient(90deg, #93C5FD, #2563EB); }
.page-head p { margin: 10px 0 0; color: rgba(255, 255, 255, .78); max-width: 640px; }
.page-head .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.page-head .btn:hover { background: rgba(255, 255, 255, .18); border-color: rgba(255, 255, 255, .35); }
.page-head .btn.primary { background: linear-gradient(145deg, #93C5FD, #2563EB); border-color: #2563EB; color: #FFFFFF; box-shadow: 0 8px 20px -8px rgba(37, 99, 235, .8); }
.page-head .btn.primary:hover { background: linear-gradient(145deg, #3B82F6, #1D4ED8); }
.page-head .seg { background: rgba(0, 0, 0, .22); }
.page-head .seg button { color: rgba(255, 255, 255, .78); }
.page-head .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.page-head .toolbar select { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.page-head .toolbar select option { color: var(--ink); }
.demo-tag { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); background: var(--blue-bg); padding: 3px 8px; border-radius: 999px; vertical-align: middle; margin-left: 8px; }

/* ---------- Buttons & inputs ---------- */
.btn {
  min-height: 42px; padding: 0 16px; border-radius: 11px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 600; font-size: 14px; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .08s;
}
.btn:hover { background: var(--surface-2); border-color: #D1D5DB; }
.btn:active { transform: translateY(1px); }
.btn.primary {
  background: linear-gradient(145deg, #3B82F6, #1D4ED8); border-color: #1D4ED8; color: var(--brand-ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 8px 18px -10px rgba(37, 99, 235, .9);
}
.btn.primary:hover { background: linear-gradient(145deg, #1D4ED8, #1E40AF); }
.btn.ghost { background: transparent; border-color: transparent; box-shadow: none; }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--red); }
.btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.block { width: 100%; }
.icon-btn { width: 40px; height: 40px; padding: 0; border-radius: 11px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field input, .field select, .field textarea {
  min-height: 44px; border-radius: 11px; border: 1px solid #D1D5DB;
  background: var(--surface); padding: 9px 12px; font-weight: 400; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(37, 99, 235, .16); }
.field textarea { resize: vertical; min-height: 80px; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.seg { display: inline-flex; background: #E9E5D9; padding: 4px; border-radius: 12px; gap: 2px; }
.seg button { border: 0; background: transparent; min-height: 34px; padding: 0 13px; border-radius: 9px; font-weight: 600; font-size: 13px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; }
.switch input { appearance: none; width: 42px; height: 24px; border-radius: 999px; background: #CFCABD; position: relative; transition: background .15s; cursor: pointer; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: var(--shadow-sm); transition: transform .15s; }
.switch input:checked { background: var(--brand); }
.switch input:checked::after { transform: translateX(18px); }

/* ---------- Cards / KPIs ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 16px 22px; border-bottom: 1px solid var(--line-2); }
.card-head h2 { font-size: 15px; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.card-head h2::before { content: ""; width: 8px; height: 8px; border-radius: 3px; background: linear-gradient(145deg, #93C5FD, #2563EB); }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.kpi {
  --k: var(--brand); --kbg: var(--brand-50);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.kpi::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: linear-gradient(90deg, var(--k), transparent); }
.kpi::after { content: ""; position: absolute; right: -40px; top: -40px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, var(--kbg) 0%, transparent 70%); pointer-events: none; }
.kpis .kpi:nth-child(2) { --k: var(--gold); --kbg: var(--gold-50); }
.kpis .kpi:nth-child(3) { --k: var(--blue); --kbg: var(--blue-bg); }
.kpis .kpi:nth-child(4) { --k: var(--violet); --kbg: var(--violet-bg); }
.kpi .label { color: var(--muted); font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; position: relative; z-index: 1; }
.kpi .value { font-family: var(--display); font-size: 32px; font-weight: 800; letter-spacing: -0.02em; position: relative; z-index: 1; line-height: 1.1; }
.kpi .delta { font-size: 12px; font-weight: 600; color: var(--muted); position: relative; z-index: 1; }
.kpi .delta.up { color: var(--brand); }
.kpi .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--kbg); color: var(--k); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.funnel { display: flex; flex-direction: column; gap: 12px; padding: 20px 22px; }
.funnel-row { display: grid; grid-template-columns: 110px 1fr 76px; align-items: center; gap: 12px; font-size: 13px; font-weight: 500; }
.funnel-bar { height: 30px; background: var(--line-2); border-radius: 9px; overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: 9px; background: linear-gradient(90deg, #1D4ED8, #3B82F6 60%, #60A5FA); transition: width .6s cubic-bezier(.2, .8, .2, 1); min-width: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.funnel-row:nth-child(n+4) .funnel-bar span { background: linear-gradient(90deg, #1D4ED8, #2563EB 60%, #93C5FD); }
.funnel-row b { text-align: right; font-family: var(--display); }
.chart { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding: 20px 22px 8px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .bar i { display: block; width: 100%; max-width: 30px; min-height: 3px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #DBEAFE, #BFDBFE); position: relative; transition: filter .15s; }
.chart .bar:hover i { filter: brightness(.95) saturate(1.2); }
.chart .bar i em { position: absolute; left: 0; right: 0; bottom: 0; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #3B82F6, #1D4ED8); }
.chart .bar small { font-size: 10px; color: var(--muted); }
.legend { display: flex; gap: 16px; padding: 0 22px 16px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend span:first-child i { background: #BFDBFE !important; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 13px 22px; border-top: 1px solid var(--line-2); transition: background .12s; }
.list li:hover { background: #F9FAFB; }
.list li:first-child { border-top: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.empty { padding: 30px 20px; text-align: center; color: var(--muted); }

/* ---------- Pills / avatars ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.pill.green { background: var(--brand-50); color: var(--brand-600); box-shadow: inset 0 0 0 1px var(--brand-100); }
.pill.amber { background: var(--amber-bg); color: var(--amber); box-shadow: inset 0 0 0 1px var(--amber-line); }
.pill.red { background: var(--red-bg); color: var(--red); box-shadow: inset 0 0 0 1px #F3C6C0; }
.pill.blue { background: var(--blue-bg); color: var(--blue); box-shadow: inset 0 0 0 1px #C9DBF2; }
.pill.dark { background: #14171A; color: #F7F8FA; }
.chip { font-size: 12px; background: var(--surface-2); border: 1px solid var(--line-2); color: var(--ink-2); padding: 3px 9px; border-radius: 7px; white-space: nowrap; font-weight: 500; }
.chip:empty { display: none; }
.avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; display: grid; place-items: center;
  font-weight: 700; font-size: 12px; color: #fff; letter-spacing: .02em;
  background-image: linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(0, 0, 0, .18));
  box-shadow: 0 0 0 2px #fff, 0 4px 10px -4px rgba(0, 0, 0, .35);
}
.avatar.lg { width: 52px; height: 52px; flex-basis: 52px; font-size: 17px; }
.meta-badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #1877F2, #0E5BC4); padding: 3px 8px; border-radius: 7px; }

/* ---------- Pipeline board ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar select { min-height: 40px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); padding: 0 10px; }
.stale-banner { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(90deg, var(--gold-50), #FFF9EC); border: 1px solid var(--gold-100); color: var(--amber); border-radius: 14px; padding: 13px 16px; }
.stale-banner .grow { flex: 1 1 260px; }
.board-wrap { overflow-x: auto; padding-bottom: 10px; margin: 0 -4px; }
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(272px, 1fr); gap: 14px; padding: 4px; min-width: min-content; }
.col {
  --c: #7C8AA0;
  background: linear-gradient(180deg, color-mix(in srgb, var(--c) 10%, #fff) 0, rgba(255, 255, 255, .55) 120px, rgba(255, 255, 255, .45) 100%);
  border-radius: 16px; padding: 10px;
  display: flex; flex-direction: column; gap: 10px; min-height: 500px;
  border: 1px solid var(--line); border-top: 3px solid var(--c);
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.col.drag-over { background: color-mix(in srgb, var(--c) 14%, #fff); border-color: var(--c); box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.col-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 4px 4px; }
.col-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-family: var(--display); font-size: 14px; }
.col-title .dot { width: 10px; height: 10px; border-radius: 50%; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.col-count { color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); font-weight: 700; font-size: 12px; padding: 1px 8px; border-radius: 999px; font-family: var(--font); }
.col-event { font-family: var(--mono); font-size: 10.5px; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); padding: 2px 7px; border-radius: 7px; white-space: nowrap; }
.col-event.none { color: var(--muted); background: transparent; }
.lead-card {
  --c: var(--brand);
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 13px;
  padding: 13px 13px 13px 12px; display: flex; flex-direction: column; gap: 10px;
  box-shadow: var(--shadow-sm); cursor: grab; transition: box-shadow .18s, transform .18s, border-color .18s;
  text-align: left; width: 100%;
}
.lead-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.lead-card.dragging { opacity: .45; transform: rotate(2deg); }
.lead-card.flash { animation: flash 1.2s ease; }
@keyframes flash { 0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, .6); } 40% { box-shadow: 0 0 0 7px rgba(37, 99, 235, .2); } 100% { box-shadow: var(--shadow-sm); } }
.lc-top { display: flex; gap: 10px; align-items: center; }
.lc-name { font-weight: 700; font-size: 14px; line-height: 1.25; }
.lc-sub { font-size: 12px; color: var(--muted); }
.lc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.lc-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; padding-top: 9px; border-top: 1px dashed var(--line); }
.lc-sync { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--brand); }
.lc-sync.queued { color: var(--gold-600); }
.lc-sync.off { color: var(--muted); font-weight: 500; }
.lc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lc-actions .btn { min-height: 36px; font-size: 13px; }
.drop-zones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.drop-zone {
  border: 2px dashed #D3CDBC; border-radius: 14px; padding: 15px 16px;
  display: flex; align-items: center; gap: 12px; color: var(--muted); background: rgba(255, 255, 255, .45);
  transition: background .15s, border-color .15s;
}
.drop-zone.drag-over { background: var(--red-bg); border-color: #E4A49D; color: var(--red); }
.drop-zone b { color: var(--ink-2); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 700; color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
td { padding: 12px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #FBF8EF; }

/* ---------- Drawer / modal ---------- */
.scrim { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); z-index: 50; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(580px, 100%); z-index: 60;
  background: var(--bg); box-shadow: var(--shadow-lg); display: flex; flex-direction: column;
  animation: slide .24s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slide { from { transform: translateX(40px); opacity: 0; } }
.drawer-head {
  padding: 22px 22px 20px; display: flex; gap: 14px; align-items: flex-start; color: #fff;
  background:
    radial-gradient(380px 180px at 100% 0%, rgba(147, 197, 253, .32), transparent 70%),
    linear-gradient(120deg, #0F172A, #2563EB);
}
.drawer-head h2 { color: #fff; }
.drawer-head .muted { color: rgba(255, 255, 255, .75); }
.drawer-head .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.drawer-head .btn:hover { background: rgba(255, 255, 255, .2); }
.drawer-head .pill { box-shadow: none; background: rgba(255, 255, 255, .92) !important; }
.drawer-head .avatar { box-shadow: 0 0 0 3px rgba(255, 255, 255, .35); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 30px; display: flex; flex-direction: column; gap: 16px; }
.stage-track { display: flex; gap: 4px; }
.stage-track button {
  flex: 1; min-height: 42px; border: 0; background: var(--line-2); color: var(--muted);
  font-size: 11.5px; font-weight: 700; border-radius: 8px; padding: 0 4px; transition: background .15s, color .15s;
}
.stage-track button.done { background: var(--brand-100); color: var(--brand-600); }
.stage-track button.current { background: linear-gradient(145deg, #3B82F6, #1D4ED8); color: #fff; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .8); }
.stage-track button:hover:not(.current) { background: #DCEDE3; color: var(--brand-600); }
.answers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; margin: 0; }
.answers dt { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.answers dd { margin: 4px 0 0; font-weight: 600; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 16px 28px; }
.timeline li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: linear-gradient(180deg, var(--line), transparent); }
.timeline li:last-child::before { display: none; }
.timeline .tdot { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--surface); border: 3px solid var(--brand); }
.timeline .tdot.note { border-color: var(--blue); }
.timeline .tdot.meta { border-color: var(--gold); }
.timeline .ttitle { font-weight: 600; font-size: 13px; }
.timeline .tsub { font-size: 12px; color: var(--muted); margin-top: 2px; white-space: pre-wrap; }
.modal {
  position: fixed; z-index: 70; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(560px, calc(100% - 32px)); max-height: calc(100vh - 48px); overflow-y: auto;
  background: var(--surface); border-radius: 20px; box-shadow: var(--shadow-lg);
  border-top: 4px solid var(--gold);
  animation: pop .2s cubic-bezier(.2, .8, .2, 1);
}
@keyframes pop { from { transform: translate(-50%, -46%); opacity: 0; } }
.modal-head { padding: 20px 24px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; justify-content: space-between; }
.modal-head h2 { font-size: 19px; font-weight: 800; }
.modal-body { padding: 20px 24px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 14px 24px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 20px 20px; }

/* ---------- Inventory ---------- */
.plots { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; }
.plot { overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.plot:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.plot-map {
  height: 132px; position: relative;
  background:
    radial-gradient(160px 90px at 80% 20%, rgba(147, 197, 253, .35), transparent 70%),
    repeating-linear-gradient(45deg, #DCE8DE 0 10px, #E8F0E8 10px 20px);
  border-bottom: 1px solid var(--line);
}
.plot-map::before { content: ""; position: absolute; left: 0; right: 0; bottom: 18px; height: 8px; background: rgba(60, 60, 60, .18); }
.plot-map .plot-shape { position: absolute; inset: 20px 34px 34px; border: 2px solid var(--brand); border-radius: 6px; background: rgba(37, 99, 235, .14); display: grid; place-items: center; font-family: var(--display); font-weight: 800; color: var(--brand-600); font-size: 18px; box-shadow: 0 6px 16px -8px rgba(37, 99, 235, .6); }
.plot-map .pill { position: absolute; top: 10px; right: 10px; }
.plot-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.plot-body h3 { font-size: 15px; }
.plot-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; font-size: 12px; }
.plot-stats div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 8px 10px; color: var(--muted); }
.plot-stats b { display: block; font-size: 13px; margin-top: 2px; color: var(--ink); }
.plot-foot { display: flex; gap: 8px; margin-top: auto; }

/* ---------- Follow-ups ---------- */
.fu-group h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-600); margin: 0 0 10px; }
.check { width: 22px; height: 22px; border-radius: 7px; border: 2px solid #C9C3B3; background: var(--surface); flex: 0 0 22px; display: grid; place-items: center; padding: 0; transition: background .15s, border-color .15s; }
.check:hover { border-color: var(--brand); }
.check.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.done .title { text-decoration: line-through; color: var(--muted); }

/* ---------- Meta sync ---------- */
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 20px 22px; }
.flow-step { flex: 1 1 140px; background: linear-gradient(180deg, #fff, var(--surface-2)); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; box-shadow: var(--shadow-sm); }
.flow-step:first-child { border-top: 3px solid #1877F2; }
.flow-step:last-child { border-top: 3px solid var(--gold); }
.flow-step b { display: block; font-size: 13px; margin-bottom: 2px; }
.flow-step small { color: var(--muted); }
.flow-arrow { color: var(--gold); }
.map-row { display: grid; grid-template-columns: 1fr 24px 1fr; align-items: center; gap: 10px; padding: 8px 22px; }
.map-row select { min-height: 40px; border-radius: 10px; border: 1px solid var(--line); padding: 0 8px; background: var(--surface); }

/* ---------- Toasts ---------- */
.toasts { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: linear-gradient(135deg, #14171A, #1E2A25); color: #F7F8FA; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow-lg); border: 1px solid rgba(37, 99, 235, .35); display: flex; align-items: center; gap: 10px; font-weight: 500; animation: pop-up .22s ease; pointer-events: auto; }
.toast .t-ic { color: #93C5FD; display: grid; }
@keyframes pop-up { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; z-index: 80; transform: translateX(-100%); transition: transform .2s; }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .btn.menu-btn { display: inline-flex; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; }
  .page-head { padding: 22px 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .drop-zones { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 23px; }
}

/* While dragging, Lost / Junk zones float at the bottom so they're always reachable */
body.is-dragging .drop-zones {
  position: fixed; left: 286px; right: 30px; bottom: 20px; z-index: 40;
  animation: pop-up .15s ease;
}
body.is-dragging .drop-zone { background: var(--surface); box-shadow: var(--shadow-lg); border-color: #BDB6A3; }
body.is-dragging .drop-zone.drag-over { background: var(--red-bg); border-color: #E4A49D; }
body.is-dragging .drop-zone .btn { display: none; }
@media (max-width: 860px) { body.is-dragging .drop-zones { left: 16px; right: 16px; } }

/* ---------- CSV import ---------- */
.modal.wide { width: min(760px, calc(100% - 32px)); }
.file-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center;
  padding: 34px 20px; border: 2px dashed #D0C9B6; border-radius: 16px; background: var(--surface-2);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.file-drop:hover, .file-drop.drag-over, .file-drop:focus-within { border-color: var(--gold); background: var(--gold-50); }
.file-drop .ic { width: 54px; height: 54px; border-radius: 15px; display: grid; place-items: center; background: linear-gradient(145deg, #93C5FD, #2563EB); color: #FFFFFF; margin-bottom: 4px; box-shadow: 0 10px 22px -10px rgba(37, 99, 235, .9); }
.file-drop b { font-size: 15px; }
.hints { margin: 0; padding-left: 18px; color: var(--muted); font-size: 13px; display: flex; flex-direction: column; gap: 4px; }
.imp-file-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px; }
.imp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.imp-stats div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.imp-stats div:first-child { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); }
.imp-stats b { font-family: var(--display); font-size: 24px; }
.imp-stats span { font-size: 12px; color: var(--muted); }
.imp-map { max-height: 300px; overflow-y: auto; border: 1px solid var(--line); border-radius: 12px; }
.imp-map td { padding: 8px 14px; }
.imp-map select { min-height: 36px; border-radius: 9px; border: 1px solid #D1D5DB; padding: 0 8px; background: var(--surface); width: 100%; min-width: 150px; }
.imp-map select.ignored { color: var(--muted); background: var(--surface-2); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 860px) { .imp-stats { grid-template-columns: 1fr 1fr 1fr; } }

/* ---------- Sign in ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; place-items: center; padding: 24px 16px;
  background:
    radial-gradient(700px 420px at 85% 10%, rgba(147, 197, 253, .30), transparent 65%),
    radial-gradient(700px 500px at 10% 100%, rgba(61, 214, 140, .18), transparent 65%),
    linear-gradient(140deg, #0F172A 0%, #1E293B 55%, #2563EB 100%);
}
.auth-card { width: min(430px, 100%); background: rgba(255, 255, 255, .97); border: 1px solid rgba(255, 255, 255, .6); border-top: 4px solid var(--gold); border-radius: 22px; padding: 30px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .6); }
.auth-card .brand-sub { color: var(--gold-600); }
.auth-card .btn.primary { min-height: 48px; }
.auth-msg { background: var(--red-bg); color: var(--red); padding: 10px 12px; border-radius: 11px; font-size: 13px; }
.auth-msg.ok { background: var(--brand-50); color: var(--brand-600); }

/* ---------- Live status bits ---------- */
.sync-state { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--line); padding: 6px 11px; border-radius: 999px; }
.sync-state::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #2FB07A; box-shadow: 0 0 0 3px rgba(47, 176, 122, .18); }
.sync-state[data-s="saving"]::before { background: var(--gold); box-shadow: 0 0 0 3px rgba(37, 99, 235, .2); }
.sync-state[data-s="error"] { color: var(--red); }
.sync-state[data-s="error"]::before { background: var(--red); }
.account { display: flex; align-items: center; gap: 8px; padding: 10px 8px 0; }
.account-mail { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #94A3B8; }
.account .btn { color: #C9D1CB; }
.account .btn:hover { background: var(--side-2); color: #fff; }
.conn-ok { display: flex; gap: 10px; align-items: center; background: var(--brand-50); color: var(--brand-600); border: 1px solid var(--brand-100); border-radius: 12px; padding: 11px 13px; }
.conn-ok small { color: var(--ink-2); }
.copy-row { display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.copy-row span { min-width: 0; }
.copy-row small { word-break: break-all; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- WhatsApp ---------- */
.btn.wa { background: linear-gradient(145deg, #2BD86B, #1DA851); border-color: #1DA851; color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 8px 18px -10px rgba(29, 168, 81, .9); }
.btn.wa:hover { background: linear-gradient(145deg, #36E176, #1FB257); border-color: #1FB257; }
.lc-right { display: inline-flex; align-items: center; gap: 8px; }
.lc-wa { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; border: 1px solid #BFEBCF; background: #EAFBF0; color: #128C4A; display: grid; place-items: center; padding: 0; transition: background .15s, color .15s, transform .1s; }
.lc-wa:hover { background: #25D366; color: #fff; border-color: #25D366; transform: scale(1.06); }
.wa-modal .modal-head h2 { display: flex; align-items: center; gap: 10px; }
.wa-modal .modal-head h2 svg { color: #1DA851; }
.wa-to { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 13px; }
.wa-to b { font-size: 14px; }
.wa-tpls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.wa-tpl { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 7px 14px; font-weight: 600; font-size: 13px; color: var(--ink-2); transition: border-color .15s, background .15s; }
.wa-tpl:hover { border-color: #25D366; }
.wa-tpl[aria-pressed="true"] { background: #E7FAEE; border-color: #25D366; color: #0E6B37; box-shadow: inset 0 0 0 1px #25D366; }
.field textarea.wa-text { background: #E9FCDD; border-color: #CBEAB8; line-height: 1.55; font-size: 14px; min-height: 220px; }
.field textarea.wa-text:focus { border-color: #25D366; box-shadow: 0 0 0 4px rgba(37, 211, 102, .16); }
.wa-miss { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; color: var(--amber); background: var(--amber-bg); border: 1px solid var(--amber-line); border-radius: 10px; padding: 9px 12px; }
.wa-miss svg { flex: 0 0 auto; margin-top: 1px; }
.wa-foot { flex-wrap: wrap; }
.wa-sp { flex: 1; }
.wa-fields { display: flex; flex-wrap: wrap; gap: 6px; }
.wa-field { cursor: pointer; }
.wa-field:hover { border-color: var(--gold); color: var(--gold-600); background: var(--gold-50); }
.wa-ic { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px; background: #E7FAEE; color: #128C4A; display: grid; place-items: center; }
.wa-prev { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 860px) { .wa-sp { display: none; } .wa-foot .btn { flex: 1 1 auto; } }

/* ---------- v2: alerts, call list, outcomes, duplicates, bulk, report ---------- */
.icon-btn.alerts-on { color: var(--gold-600); border-color: var(--gold-100); background: var(--gold-50); }
.call-list .list li { gap: 10px; }
.prio { width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px; background: var(--line-2); color: var(--muted); }
.prio.warm { background: var(--gold-50); color: var(--gold-600); box-shadow: inset 0 0 0 1px var(--gold-100); }
.prio.hot { background: linear-gradient(145deg, #F5745F, #C2392B); color: #fff; box-shadow: 0 6px 14px -6px rgba(194, 57, 43, .8); }
.cl-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: transparent; padding: 0; text-align: left; }
.cl-main .title { display: block; }
.cl-main .sub { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wait { color: var(--brand-600); font-weight: 700; }
.wait.late { color: var(--red); }
.wait-pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--brand-50); color: var(--brand-600); white-space: nowrap; }
.wait-pill.late { background: var(--red-bg); color: var(--red); }
.call-log.live { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(37, 99, 235, .18), var(--shadow); }
.outcomes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.oc { min-height: 42px; border-radius: 11px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: 13px; padding: 6px 8px; transition: background .15s, border-color .15s, transform .08s; }
.oc:hover { border-color: var(--gold); background: var(--gold-50); }
.oc:active { transform: translateY(1px); }
.oc-interested:hover, .oc-visit:hover { border-color: #25A86A; background: var(--brand-50); }
.oc-notint:hover, .oc-wrong:hover { border-color: #E4A49D; background: var(--red-bg); }
.dup-banner { display: flex; gap: 12px; align-items: flex-start; background: var(--gold-50); border: 1px solid var(--gold-100); color: var(--amber); border-radius: 14px; padding: 12px 14px; }
.dup-banner svg { flex: 0 0 auto; margin-top: 2px; }
.dup-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; color: var(--ink-2); font-size: 13px; }
.stale-banner.dup { background: linear-gradient(90deg, #FFF5E0, #FFFBF2); }
.match { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); }
.match-ic { width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.sel-col { width: 36px; padding-right: 0 !important; }
.sel-col input { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }
tr.selected td { background: #FBF5E6; }
.bulk-bar { position: sticky; top: 76px; z-index: 15; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 14px; background: #14171A; color: #F7F8FA; box-shadow: var(--shadow-lg); }
.bulk-bar select { min-height: 34px; border-radius: 9px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .08); color: #fff; padding: 0 8px; }
.bulk-bar select option { color: var(--ink); }
.bulk-bar .btn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .22); color: #fff; }
.bulk-bar .btn.danger { color: #FFB4AB; }
.bulk-bar .btn.ghost { background: transparent; border-color: transparent; }
table.report td.num, table.report th.num { text-align: right; white-space: nowrap; }
table.report tr.camp td { background: var(--surface-2); border-top: 2px solid var(--line); }
table.report .ad-name { padding-left: 14px; display: inline-block; color: var(--ink-2); }
.acct-form { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; border-top: 3px solid var(--gold); }
.acct-form .grow { flex: 1 1 280px; }
.acct-form input { min-height: 42px; border-radius: 11px; border: 1px solid #D1D5DB; padding: 0 12px; min-width: 220px; }
.member-form { display: flex; gap: 10px; flex-wrap: wrap; padding: 12px 20px; border-top: 1px solid var(--line-2); }
.member-form input { flex: 1 1 160px; min-height: 40px; border-radius: 10px; border: 1px solid #D1D5DB; padding: 0 12px; }
@media (max-width: 860px) { .outcomes { grid-template-columns: repeat(2, minmax(0, 1fr)); } .bulk-bar { top: 64px; } .call-list .btn.sm { padding: 0 10px; } }

/* ---------- v3: send to team ---------- */
.team-send-btn { margin-top: 8px; align-self: flex-start; font-weight: 600; }
.ts-phone { display: flex; gap: 8px; }
.ts-phone input { flex: 1; min-width: 0; }

.lc-team { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; border: 1px solid var(--gold-100); background: var(--gold-50); color: var(--gold-600); display: grid; place-items: center; padding: 0; transition: background .15s, color .15s, transform .1s; }
.lc-team:hover { background: var(--gold); color: #FFFFFF; border-color: var(--gold); transform: scale(1.06); }
.call-list .lc-team { margin-left: -2px; }

/* ================= v5: charts ================= */
.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 12px; color: var(--muted); align-items: center; }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend b { color: var(--ink); font-family: var(--display); }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.area-wrap { padding: 14px 18px 6px; overflow: hidden; }
.area-chart { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font); }
.area-chart .grid line { stroke: var(--line-2); stroke-dasharray: 3 5; }
.area-chart .grid text, .area-chart .xl { fill: var(--muted); font-size: 11px; font-weight: 500; }
.area-chart .ln { fill: none; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; }
.area-chart .l1 { stroke: #2563EB; filter: drop-shadow(0 4px 6px rgba(37, 99, 235, .35)); }
.area-chart .l2 { stroke: #2563EB; filter: drop-shadow(0 4px 6px rgba(37, 99, 235, .3)); }
.area-chart .dot { fill: #fff; stroke: #2563EB; stroke-width: 2; transform-box: fill-box; transform-origin: center; }
.area-chart .hv rect { fill: transparent; }
.area-chart .hv line { stroke: var(--ink); stroke-opacity: .2; stroke-dasharray: 3 3; }
.area-chart .hv line, .area-chart .hv circle, .area-chart .tip { opacity: 0; transition: opacity .15s ease; pointer-events: none; }
.area-chart .hv:hover line, .area-chart .hv:hover circle, .area-chart .hv:hover .tip { opacity: 1; }
.area-chart .pa { fill: #2563EB; stroke: #fff; stroke-width: 2.5; }
.area-chart .pq { fill: #2563EB; stroke: #fff; stroke-width: 2.5; }
.area-chart .tip rect { fill: #14171A; filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .25)); }
.area-chart .tip text { fill: #fff; font-size: 11.5px; font-weight: 700; }
.area-chart .tip .tv { fill: rgba(255, 255, 255, .78); font-weight: 500; font-size: 11px; }

.donut-wrap { display: flex; align-items: center; gap: 24px; padding: 20px 22px; flex-wrap: wrap; }
.donut { position: relative; width: 156px; height: 156px; flex: 0 0 156px; }
.donut svg { width: 100%; height: 100%; overflow: visible; }
.donut circle { fill: none; stroke-width: 5.4; }
.donut .track { stroke: var(--line-2); }
.donut .arc { transition: stroke-width .2s ease, filter .2s ease; cursor: default; }
.donut .arc:hover { stroke-width: 6.8; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .18)); }
.donut-c { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; pointer-events: none; }
.donut-c b { font-family: var(--display); font-size: 30px; font-weight: 800; line-height: 1; letter-spacing: -0.02em; }
.donut-c small { color: var(--muted); font-size: 11.5px; font-weight: 600; margin-top: 5px; }
.donut-legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 170px; display: flex; flex-direction: column; gap: 9px; font-size: 13px; }
.donut-legend li { display: grid; grid-template-columns: 10px 1fr auto 40px; align-items: center; gap: 10px; padding: 3px 6px; margin: 0 -6px; border-radius: 8px; transition: background .15s; }
.donut-legend li:hover { background: var(--line-2); }
.donut-legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-legend b { font-family: var(--display); }
.donut-legend small { color: var(--muted); text-align: right; font-weight: 600; }

.kpi-viz { position: absolute; right: 16px; bottom: 14px; z-index: 1; pointer-events: auto; }
.spark { display: block; overflow: visible; }
.spark .sl { fill: none; stroke: #2563EB; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1 2; }
.spark .se { fill: #2563EB; stroke: #fff; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: beat 2.4s ease-in-out infinite; }
.ring-wrap { position: relative; display: grid; place-items: center; width: 52px; height: 52px; }
.ring { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 4.2; }
.ring .rt { stroke: var(--line-2); }
.ring .rv { stroke: var(--k); stroke-linecap: round; }
.ring-wrap small { font-size: 11px; font-weight: 800; color: var(--k); font-family: var(--display); }

/* ================= v5: motion ================= */
@keyframes rise { from { opacity: 0; transform: translateY(16px) scale(.985); } }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes slideIn { from { opacity: 0; transform: translateX(-12px); } }
@keyframes pop { 0% { opacity: 0; transform: scale(0); } 70% { opacity: 1; transform: scale(1.3); } }
@keyframes draw { from { stroke-dashoffset: 1; } }
@keyframes areaIn { from { opacity: 0; transform: scaleY(.2); } }
@keyframes arcIn { from { stroke-dasharray: 0 100; } }
@keyframes spinIn { from { transform: rotate(-140deg) scale(.85); opacity: 0; } }
@keyframes ringIn { from { stroke-dasharray: 0 100; } }
@keyframes grow { from { width: 0; } }
@keyframes sheen { from { transform: translateX(-110%); } to { transform: translateX(110%); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.35); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61, 214, 140, .55), 0 0 10px rgba(61, 214, 140, .6); } 70% { box-shadow: 0 0 0 9px rgba(61, 214, 140, 0), 0 0 10px rgba(61, 214, 140, .6); } 100% { box-shadow: 0 0 0 0 rgba(61, 214, 140, 0), 0 0 10px rgba(61, 214, 140, .6); } }

.content.enter > * { animation: rise .65s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--d, 0ms) - var(--el, 0ms)); }
.content.enter > .kpis, .content.enter > .dash-grid { animation: none; }
.content.enter > *:nth-child(1) { --d: 0ms; }
.content.enter > *:nth-child(2) { --d: 70ms; }
.content.enter > *:nth-child(3) { --d: 140ms; }
.content.enter > *:nth-child(4) { --d: 210ms; }
.content.enter > *:nth-child(5) { --d: 280ms; }
.content.enter > *:nth-child(6) { --d: 350ms; }
.content.enter > *:nth-child(7) { --d: 420ms; }
.content.enter > *:nth-child(8) { --d: 490ms; }
.content.enter > *:nth-child(9) { --d: 560ms; }
.content.enter > *:nth-child(10) { --d: 630ms; }
.content.enter .page-head::before { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .16) 50%, transparent 65%); transform: translateX(-110%); animation: sheen 1.6s ease-in-out forwards; animation-delay: calc(350ms - var(--el, 0ms)); }
.content.enter .kpi { animation: rise .65s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--dk, 0ms) - var(--el, 0ms)); }
.content.enter .kpi:nth-child(1) { --dk: 80ms; }
.content.enter .kpi:nth-child(2) { --dk: 160ms; }
.content.enter .kpi:nth-child(3) { --dk: 240ms; }
.content.enter .kpi:nth-child(4) { --dk: 320ms; }
.content.enter .dash-grid > * { animation: rise .7s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--dg, 0ms) - var(--el, 0ms)); }
.content.enter .dash-grid > *:nth-child(1) { --dg: 260ms; }
.content.enter .dash-grid > *:nth-child(2) { --dg: 340ms; }
.content.enter .dash-grid > *:nth-child(3) { --dg: 420ms; }
.content.enter .dash-grid > *:nth-child(4) { --dg: 500ms; }
.content.enter .dash-grid > *:nth-child(5) { --dg: 580ms; }
.content.enter .dash-grid > *:nth-child(6) { --dg: 660ms; }
.content.enter .dash-grid > *:nth-child(7) { --dg: 740ms; }
.content.enter .dash-grid > *:nth-child(8) { --dg: 820ms; }
.content.enter .dash-grid > *:nth-child(9) { --dg: 900ms; }
.content.enter .dash-grid > *:nth-child(10) { --dg: 980ms; }
.content.enter .funnel-bar span { animation: grow 1s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(450ms + var(--i, 0) * 90ms - var(--el, 0ms)); }
.content.enter .area-chart .ar { transform-box: fill-box; transform-origin: 50% 100%; animation: areaIn 1.1s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(650ms - var(--el, 0ms)); }
.content.enter .area-chart .a2 { animation-delay: calc(850ms - var(--el, 0ms)); }
.content.enter .area-chart .ln { animation: draw 1.6s cubic-bezier(.45, .1, .2, 1) backwards; animation-delay: calc(500ms - var(--el, 0ms)); }
.content.enter .area-chart .l2 { animation-delay: calc(750ms - var(--el, 0ms)); }
.content.enter .area-chart .dot { animation: pop .45s ease-out backwards; animation-delay: calc(700ms + var(--i, 0) * 70ms - var(--el, 0ms)); }
.content.enter .area-chart .grid, .content.enter .area-chart .xl { animation: fadeIn .6s ease backwards; animation-delay: calc(400ms - var(--el, 0ms)); }
.content.enter .donut svg { animation: spinIn 1.1s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(350ms - var(--el, 0ms)); }
.content.enter .donut .arc { animation: arcIn 1s cubic-bezier(.3, .7, .2, 1) backwards; animation-delay: calc(500ms + var(--i, 0) * 140ms - var(--el, 0ms)); }
.content.enter .donut-legend li { animation: slideIn .5s ease-out backwards; animation-delay: calc(600ms + var(--i, 0) * 70ms - var(--el, 0ms)); }
.content.enter .spark .sl { animation: draw 1.4s ease-out backwards; animation-delay: calc(400ms - var(--el, 0ms)); }
.content.enter .spark .sa { animation: fadeIn 1s ease backwards; animation-delay: calc(900ms - var(--el, 0ms)); }
.content.enter .ring .rv { animation: ringIn 1.2s cubic-bezier(.3, .7, .2, 1) backwards; animation-delay: calc(450ms - var(--el, 0ms)); }
.content.enter .col { animation: rise .6s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--dc, 0ms) - var(--el, 0ms)); }
.content.enter .col:nth-child(1) { --dc: 120ms; }
.content.enter .col:nth-child(2) { --dc: 180ms; }
.content.enter .col:nth-child(3) { --dc: 240ms; }
.content.enter .col:nth-child(4) { --dc: 300ms; }
.content.enter .col:nth-child(5) { --dc: 360ms; }
.content.enter .col:nth-child(6) { --dc: 420ms; }
.content.enter .col:nth-child(7) { --dc: 480ms; }
.content.enter .col:nth-child(8) { --dc: 540ms; }
.content.enter .lead-card { animation: rise .55s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--dc, 0ms) + var(--dl, 0ms) - var(--el, 0ms)); }
.content.enter .lead-card:nth-child(1) { --dl: 160ms; }
.content.enter .lead-card:nth-child(2) { --dl: 215ms; }
.content.enter .lead-card:nth-child(3) { --dl: 270ms; }
.content.enter .lead-card:nth-child(4) { --dl: 325ms; }
.content.enter .lead-card:nth-child(5) { --dl: 380ms; }
.content.enter .lead-card:nth-child(6) { --dl: 435ms; }
.content.enter .lead-card:nth-child(7) { --dl: 490ms; }
.content.enter .lead-card:nth-child(8) { --dl: 545ms; }
.content.enter .lead-card:nth-child(n+9) { --dl: 600ms; }
.content.enter tbody tr { animation: fadeIn .45s ease backwards; animation-delay: calc(var(--dr, 0ms) - var(--el, 0ms)); }
.content.enter tbody tr:nth-child(1) { --dr: 180ms; }
.content.enter tbody tr:nth-child(2) { --dr: 215ms; }
.content.enter tbody tr:nth-child(3) { --dr: 250ms; }
.content.enter tbody tr:nth-child(4) { --dr: 285ms; }
.content.enter tbody tr:nth-child(5) { --dr: 320ms; }
.content.enter tbody tr:nth-child(6) { --dr: 355ms; }
.content.enter tbody tr:nth-child(7) { --dr: 390ms; }
.content.enter tbody tr:nth-child(8) { --dr: 425ms; }
.content.enter tbody tr:nth-child(9) { --dr: 460ms; }
.content.enter tbody tr:nth-child(10) { --dr: 495ms; }
.content.enter tbody tr:nth-child(11) { --dr: 530ms; }
.content.enter tbody tr:nth-child(12) { --dr: 565ms; }
.content.enter tbody tr:nth-child(13) { --dr: 600ms; }
.content.enter tbody tr:nth-child(14) { --dr: 635ms; }
.content.enter tbody tr:nth-child(n+15) { --dr: 680ms; }
.content.enter .list li { animation: slideIn .5s ease-out backwards; animation-delay: calc(var(--dli, 0ms) - var(--el, 0ms)); }
.content.enter .list li:nth-child(1) { --dli: 420ms; }
.content.enter .list li:nth-child(2) { --dli: 475ms; }
.content.enter .list li:nth-child(3) { --dli: 530ms; }
.content.enter .list li:nth-child(4) { --dli: 585ms; }
.content.enter .list li:nth-child(5) { --dli: 640ms; }
.content.enter .list li:nth-child(6) { --dli: 695ms; }
.content.enter .list li:nth-child(7) { --dli: 750ms; }
.content.enter .list li:nth-child(8) { --dli: 805ms; }

/* always-on touches */
.sync-dot:not(.off) { animation: pulse 2.4s ease-out infinite; }
.dash-grid > .card { transition: box-shadow .25s ease, transform .25s ease; }
.dash-grid > .card:hover { box-shadow: var(--shadow); }
.btn:active:not(:disabled) { transform: scale(.97); }
.nav-item svg { transition: transform .2s ease; }
.nav-item:hover svg { transform: translateX(2px) scale(1.08); }
.kpi .ic { transition: transform .3s cubic-bezier(.2, .8, .2, 1); }
.kpi:hover .ic { transform: rotate(-8deg) scale(1.1); }

@media (max-width: 760px) {
  .donut { width: 128px; height: 128px; flex-basis: 128px; }
  .kpi-viz { right: 12px; bottom: 12px; transform: scale(.85); transform-origin: 100% 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .content.enter *, .content.enter *::before, .sync-dot, .spark .se { animation: none !important; }
}

/* ================= v6: team chat ================= */
.content:has(> .chat) { padding-top: 18px; padding-bottom: 18px; }
.chat {
  display: grid; grid-template-columns: 340px minmax(0, 1fr);
  height: calc(100dvh - 112px); min-height: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px; overflow: hidden;
  box-shadow: 0 24px 50px -30px rgba(15, 23, 42, .45);
}
.chat-side { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: #FFFFFF; }
.cs-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 18px 12px; }
.cs-head h2 { font-size: 20px; font-weight: 800; font-family: var(--display); }
.cs-head small { color: var(--muted); font-size: 12px; font-weight: 600; }
.cs-search { display: flex; align-items: center; gap: 8px; margin: 0 14px 10px; padding: 0 12px; height: 38px; border-radius: 11px; background: var(--line-2); color: var(--muted); }
.cs-search input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--ink); min-width: 0; }
.cs-search input:focus { outline: none; }
.cs-search:focus-within { box-shadow: 0 0 0 2px var(--gold-100); background: #fff; }
.cs-list { flex: 1; overflow-y: auto; padding: 0 8px 10px; }
.r-sec { display: flex; align-items: center; justify-content: space-between; padding: 12px 10px 6px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.r-sec .btn { min-height: 26px; width: 26px; padding: 0; }
.room { width: 100%; display: flex; align-items: center; gap: 12px; padding: 9px 10px; border: 0; background: transparent; border-radius: 13px; text-align: left; cursor: pointer; color: var(--ink); font: inherit; transition: background .15s; }
.room:hover { background: var(--line-2); }
.room.active { background: linear-gradient(90deg, var(--brand-50), #F1F8F3); box-shadow: inset 3px 0 0 var(--brand); }
.r-av { position: relative; flex: 0 0 auto; display: inline-grid; place-items: center; }
.r-av .avatar { width: 42px; height: 42px; font-size: 14px; }
.r-av.hash { width: 42px; height: 42px; border-radius: 13px; background: var(--brand-50); color: var(--brand); }
.r-av.hash.bot { background: var(--gold-50); color: var(--gold-600); }
.r-av.hash.sm { width: 28px; height: 28px; border-radius: 9px; }
.r-av .on, .face .on { position: absolute; right: -1px; bottom: -1px; width: 12px; height: 12px; border-radius: 50%; background: #2563EB; border: 2.5px solid #fff; }
.r-av .on.off { background: #B5B9B2; }
.r-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.r-top, .r-bot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.r-top b { flex: 1; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-top time { font-size: 11.5px; color: var(--muted); flex: 0 0 auto; }
.room.has-unread .r-top time { color: #2563EB; font-weight: 700; }
.r-last { flex: 1; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 3px; }
.room.has-unread .r-last { color: var(--ink-2, #3B403A); font-weight: 600; }
.r-last .tick { margin: 0 2px 0 0; }
.r-typing { color: #2563EB; font-weight: 600; font-style: italic; }
.r-hint { color: #9AA096; }
.r-badge { flex: 0 0 auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #2563EB; color: #fff; font-size: 11.5px; font-weight: 800; display: inline-grid; place-items: center; animation: badgeIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.r-badge.muted { background: #B9BEB5; }
.r-badge.at { background: var(--gold); }
@keyframes badgeIn { from { transform: scale(0); } }
.r-none { padding: 8px 12px; font-size: 12.5px; color: var(--muted); }
.r-invite { display: flex; gap: 12px; margin: 4px 6px; padding: 14px; border-radius: 14px; background: var(--gold-50); border: 1px dashed var(--gold-100); color: var(--gold-600); }
.r-invite div { display: flex; flex-direction: column; gap: 4px; color: var(--ink); }
.r-invite span { font-size: 12.5px; color: var(--muted); }
.r-invite .btn { align-self: flex-start; margin-top: 4px; }
.cs-me { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; }
.cs-me .avatar { width: 36px; height: 36px; font-size: 13px; }
.cs-me div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.cs-me b { font-size: 13.5px; } .cs-me small { font-size: 11.5px; color: var(--muted); }

.chat-main { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0;
  background-color: #F7F8FA;
  background-image:
    radial-gradient(rgba(37, 99, 235, .07) 1.2px, transparent 1.3px),
    radial-gradient(rgba(37, 99, 235, .08) 1.2px, transparent 1.3px);
  background-size: 26px 26px, 26px 26px; background-position: 0 0, 13px 13px; }
.chat-main.drop::after { content: "Drop files to send"; position: absolute; inset: 10px; border: 3px dashed var(--brand); border-radius: 16px; background: rgba(230, 243, 236, .9); display: grid; place-items: center; font-weight: 800; font-size: 18px; color: var(--brand); z-index: 6; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 10px 16px; min-height: 64px; background: #fff; border-bottom: 1px solid var(--line); z-index: 2; }
.chat-head .r-av .avatar, .chat-head .r-av.hash { width: 40px; height: 40px; }
.ch-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ch-t b { font-size: 15px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-t small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ch-t .online, .online { color: #2563EB; font-weight: 600; }
.ch-t .typing { color: #2563EB; font-weight: 600; font-style: italic; }
.ch-actions { display: flex; align-items: center; gap: 6px; }
.ch-faces { display: flex; padding-left: 8px; }
.face { position: relative; margin-left: -8px; }
.face .avatar { width: 30px; height: 30px; font-size: 11px; border: 2px solid #fff; }
.face .on { width: 10px; height: 10px; border-width: 2px; }
.chat-back { display: none; }

.chat-thread { position: relative; flex: 1; overflow-y: auto; padding: 14px 6% 18px; display: flex; flex-direction: column; gap: 2px; scroll-behavior: auto; }
.chat-day { display: flex; justify-content: center; margin: 12px 0 8px; position: sticky; top: 4px; z-index: 1; }
.chat-day span { background: rgba(255, 255, 255, .92); color: #54656F; font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 9px; box-shadow: 0 1px 1px rgba(0, 0, 0, .08); }
.chat-day.start { position: static; } .chat-day.start span { background: #FFF6D6; color: #6B5B2A; max-width: 460px; text-align: center; }
.chat-unread { display: flex; justify-content: center; margin: 10px -6%; padding: 4px 0; background: rgba(255, 255, 255, .55); }
.chat-unread span { font-size: 12px; font-weight: 700; color: #54656F; background: #fff; padding: 4px 14px; border-radius: 999px; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); }

.msg { position: relative; display: flex; align-items: flex-end; gap: 8px; margin-top: 8px; max-width: 100%; }
.msg.grouped { margin-top: 2px; }
.msg.mine { justify-content: flex-end; }
.msg-av { width: 32px; flex: 0 0 32px; align-self: flex-start; }
.msg-av .avatar { width: 32px; height: 32px; font-size: 11.5px; }
.bot-av { background: linear-gradient(145deg, #93C5FD, #2563EB) !important; color: #FFFFFF !important; display: inline-grid; place-items: center; }
.msg-col { display: flex; flex-direction: column; max-width: min(72%, 560px); min-width: 0; }
.msg.mine .msg-col { align-items: flex-end; }
.bubble { position: relative; padding: 6px 9px 7px 10px; border-radius: 12px; background: #fff; box-shadow: 0 1px .5px rgba(11, 20, 26, .13); font-size: 14.2px; line-height: 1.42; color: #111B21; min-width: 70px; word-wrap: break-word; overflow-wrap: anywhere; }
.msg.theirs:not(.grouped) .bubble { border-top-left-radius: 3px; }
.msg.mine:not(.grouped) .bubble { border-top-right-radius: 3px; }
.msg.theirs:not(.grouped) .bubble::before, .msg.mine:not(.grouped) .bubble::before { content: ""; position: absolute; top: 0; width: 10px; height: 13px; }
.msg.theirs:not(.grouped) .bubble::before { left: -8px; background: #fff; clip-path: polygon(0 0, 100% 0, 100% 100%); }
.msg.mine .bubble { background: #DBEAFE; }
.msg.mine:not(.grouped) .bubble::before { right: -8px; background: #DBEAFE; clip-path: polygon(0 0, 100% 0, 0 100%); }
.msg.bot .bubble, .msg.bot:not(.grouped) .bubble::before { background: #FFFFFF; }
.msg.mentioned:not(.mine) .bubble { box-shadow: 0 0 0 2px rgba(37, 99, 235, .55), 0 1px .5px rgba(11, 20, 26, .13); }
.msg-name { display: block; font-size: 12.8px; font-weight: 700; margin-bottom: 1px; }
.msg-text { white-space: normal; }
.msg-text a { color: #027EB5; text-decoration: none; } .msg-text a:hover { text-decoration: underline; }
.mention { color: #027EB5; font-weight: 600; background: rgba(2, 126, 181, .08); border-radius: 4px; padding: 0 2px; }
.mention.me { color: #1D4ED8; background: var(--gold-50); }
.msg-meta { float: right; margin: 6px 0 -4px 12px; font-size: 11px; color: #667781; display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; line-height: 1; position: relative; top: 2px; }
.tick { display: inline-flex; color: #8696A0; }
.tick.read { color: #2FA8E0; }
.tick.wait { color: #8696A0; }
.tick.fail { width: 16px; height: 16px; border-radius: 50%; background: var(--red, #B8352B); color: #fff; font-size: 11px; font-weight: 900; border: 0; padding: 0; justify-content: center; align-items: center; cursor: pointer; }
.msg.jumbo .bubble { background: transparent !important; box-shadow: none !important; font-size: 40px; line-height: 1.15; padding: 0 2px; }
.msg.jumbo .bubble::before { display: none; }
.msg.jumbo .msg-meta { background: rgba(255, 255, 255, .85); padding: 3px 6px; border-radius: 8px; font-size: 10.5px; }
.msg.deleted .bubble { color: #8696A0; font-style: italic; }
.del { display: inline-flex; align-items: center; gap: 6px; }
.msg.flash .bubble { animation: msgFlash 1.6s ease; }
@keyframes msgFlash { 0%, 40% { box-shadow: 0 0 0 4px rgba(37, 99, 235, .55); } 100% { box-shadow: 0 1px .5px rgba(11, 20, 26, .13); } }

.quote { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; margin: 2px 0 5px; padding: 6px 10px; border: 0; border-left: 4px solid var(--qc, var(--brand)); border-radius: 7px; background: rgba(11, 20, 26, .05); font: inherit; cursor: pointer; color: inherit; }
.quote b { font-size: 12.5px; color: var(--qc, var(--brand)); }
.quote span { font-size: 12.8px; color: #54656F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.quote { min-width: 0; }

.att-img { display: block; position: relative; padding: 0; margin: -2px -5px 4px -6px; border: 0; border-radius: 9px; overflow: hidden; cursor: zoom-in; background: #E5E7EB; width: calc(100% + 11px); max-width: 340px; min-width: 200px; max-height: 360px; }
.att-img img { display: block; width: 100%; height: 100%; object-fit: cover; min-height: 120px; }
.msg.has-img .bubble { padding-top: 5px; }
.att-busy { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .25); }
.att-busy::after, .spinner { content: ""; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .8s linear infinite; display: inline-block; }
.spinner { border-color: var(--brand-100); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }
.att-file { display: flex; align-items: center; gap: 10px; min-width: 240px; margin: 2px -3px 4px; padding: 10px 12px; border-radius: 10px; background: rgba(11, 20, 26, .05); color: inherit; text-decoration: none; }
.att-file:hover { background: rgba(11, 20, 26, .08); }
.af-ic { width: 38px; height: 44px; border-radius: 6px; background: #E5533D; color: #fff; font-size: 10px; font-weight: 900; display: grid; place-items: end center; padding-bottom: 6px; flex: 0 0 auto; }
.af-b { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.af-b b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .af-b small { font-size: 11.5px; color: #667781; }
.vp { display: flex; align-items: center; gap: 10px; min-width: 250px; padding: 4px 2px 2px; }
.vp-btn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; display: grid; place-items: center; cursor: pointer; flex: 0 0 auto; padding: 0 0 0 2px; }
.vp.playing .vp-btn { padding: 0; }
.vp-track { position: relative; flex: 1; height: 26px; display: flex; align-items: center; gap: 2px; }
.vp-track i { flex: 1; background: #B9C3BD; border-radius: 2px; height: 30%; }
.vp-track i:nth-child(3n) { height: 70%; } .vp-track i:nth-child(4n+1) { height: 50%; } .vp-track i:nth-child(5n+2) { height: 90%; } .vp-track i:nth-child(7n) { height: 40%; }
.vp-fill { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(37, 99, 235, .22); border-radius: 4px; pointer-events: none; transition: width .2s linear; }
.vp.playing .vp-track i { background: var(--brand); }
.vp-time { font-size: 11.5px; color: #667781; min-width: 30px; font-variant-numeric: tabular-nums; }
.vp-av { width: 26px; height: 26px; border-radius: 50%; background: var(--gold-50); color: var(--gold-600); display: grid; place-items: center; }
.lead-chip { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 250px; margin: 3px -2px 4px; padding: 9px 11px; border: 1px solid rgba(37, 99, 235, .18); border-radius: 11px; background: linear-gradient(135deg, #fff, #F3FAF6); text-align: left; font: inherit; color: inherit; cursor: pointer; transition: transform .15s, box-shadow .15s; }
button.lead-chip:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -10px rgba(37, 99, 235, .6); }
.lead-chip .avatar { width: 36px; height: 36px; font-size: 12.5px; }
.lcb { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.lcb b { font-size: 14px; } .lcb small { font-size: 12px; color: #667781; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-stage { flex: 0 0 auto; font-size: 11px; font-weight: 800; color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, #fff); border: 1px solid color-mix(in srgb, var(--sc) 30%, #fff); padding: 3px 9px; border-radius: 999px; }
.lead-chip.gone { color: var(--muted); font-size: 12.5px; cursor: default; background: rgba(11, 20, 26, .04); border-style: dashed; }
.lead-chip.static { cursor: default; }
.reacts { display: flex; flex-wrap: wrap; gap: 4px; margin: -5px 8px 0; position: relative; z-index: 1; }
.react { display: inline-flex; align-items: center; gap: 3px; height: 24px; padding: 0 7px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; cursor: pointer; box-shadow: 0 1px 2px rgba(0, 0, 0, .08); animation: pop .35s ease-out; }
.react b { font-size: 11.5px; color: #54656F; }
.react.on { background: #E7F6EE; border-color: #9FD9B9; }

.msg-tools { position: absolute; top: -14px; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: #fff; box-shadow: 0 4px 14px rgba(0, 0, 0, .14); opacity: 0; pointer-events: none; transform: translateY(4px); transition: opacity .12s, transform .12s; z-index: 4; }
.msg-col { position: relative; }
.msg.theirs .msg-tools { right: -14px; } .msg.mine .msg-tools { left: -14px; }
.msg:hover .msg-tools, .msg.tools-open .msg-tools { opacity: 1; pointer-events: auto; transform: none; }
.msg-tools button { width: 30px; height: 28px; border: 0; background: transparent; border-radius: 7px; color: #54656F; display: grid; place-items: center; cursor: pointer; }
.msg-tools button:hover { background: var(--line-2); color: var(--ink); }
.chat-pop { position: absolute; z-index: 8; background: #fff; border-radius: 14px; box-shadow: 0 14px 40px -10px rgba(11, 20, 26, .35), 0 0 0 1px rgba(0, 0, 0, .04); animation: popIn .16s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes popIn { from { opacity: 0; transform: translateY(6px) scale(.96); } }
.react-pop { top: -58px; display: flex; gap: 2px; padding: 6px; border-radius: 999px; }
.msg.theirs .react-pop { left: 0; } .msg.mine .react-pop { right: 0; }
.react-pop button { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 50%; font-size: 23px; cursor: pointer; transition: transform .12s; }
.react-pop button:hover { transform: scale(1.3); background: var(--line-2); }
.menu-pop { top: 18px; min-width: 210px; padding: 6px; display: flex; flex-direction: column; }
.msg.theirs .menu-pop { left: 40%; } .msg.mine .menu-pop { right: 40%; }
.menu-pop button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 13.5px; text-align: left; cursor: pointer; color: var(--ink); }
.menu-pop button:hover { background: var(--line-2); }
.menu-pop button.danger { color: var(--red, #B8352B); }

.chat-jump { position: absolute; right: 22px; bottom: 86px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #54656F; box-shadow: 0 4px 14px rgba(0, 0, 0, .18); display: grid; place-items: center; cursor: pointer; z-index: 5; animation: popIn .2s ease; }
.chat-jump[hidden] { display: none; }
.chat-jump b { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: #2563EB; color: #fff; font-size: 11px; display: none; place-items: center; }
.chat-jump.has-new b { display: grid; }
.chat-compose-wrap { background: #F7F8FA; border-top: 1px solid var(--line); z-index: 3; }
.chat-bar { display: flex; align-items: center; gap: 10px; margin: 8px 12px 0; padding: 8px 10px 8px 12px; border-left: 4px solid var(--qc); border-radius: 10px; background: #fff; color: var(--qc); animation: popIn .18s ease; }
.chat-bar div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-bar b { font-size: 12.5px; } .chat-bar span { font-size: 12.8px; color: #54656F; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-compose { position: relative; display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px; }
.c-btn { width: 42px; height: 42px; flex: 0 0 auto; border: 0; border-radius: 50%; background: transparent; color: #54656F; display: grid; place-items: center; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.c-btn:hover, .c-btn.on { background: #E5E7EB; color: var(--ink); }
.c-btn.on { transform: rotate(-8deg); }
#chat-input { flex: 1; min-height: 42px; max-height: 168px; resize: none; padding: 11px 16px; border: 0; border-radius: 22px; background: #fff; font: inherit; font-size: 14.5px; line-height: 1.4; color: var(--ink); box-shadow: 0 1px 1px rgba(0, 0, 0, .06); }
#chat-input:focus { outline: none; box-shadow: 0 0 0 2px var(--brand-100); }
.send-btn { width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 50%; background: linear-gradient(145deg, #3B82F6, #1D4ED8); color: #fff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 6px 14px -6px rgba(29, 78, 216, .8); transition: transform .15s; animation: popIn .2s ease; }
.send-btn:hover { transform: scale(1.06); }
.send-btn:active { transform: scale(.94); }
.chat-compose.rec { align-items: center; gap: 12px; }
.rec-dot { width: 12px; height: 12px; border-radius: 50%; background: #E5533D; animation: recPulse 1s ease-in-out infinite; }
@keyframes recPulse { 50% { opacity: .3; transform: scale(.8); } }
.rec-time { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 42px; }
.rec-wave { flex: 1; height: 30px; display: flex; align-items: center; gap: 3px; }
.rec-wave i { flex: 1; height: 30%; border-radius: 2px; background: var(--brand); animation: wave 1s ease-in-out infinite; }
.rec-wave i:nth-child(2n) { animation-delay: -.3s; } .rec-wave i:nth-child(3n) { animation-delay: -.6s; } .rec-wave i:nth-child(5n) { animation-delay: -.15s; }
@keyframes wave { 50% { height: 95%; } }
.rec-hint { font-size: 12px; color: var(--muted); }
#chat-pops { position: absolute; left: 12px; bottom: calc(100% + 6px); z-index: 9; }
#chat-pops .chat-pop { position: static; }
.emoji-pop { display: grid; grid-template-columns: repeat(8, 40px); gap: 2px; padding: 10px; }
.emoji-pop button { width: 40px; height: 40px; border: 0; background: transparent; border-radius: 10px; font-size: 22px; cursor: pointer; transition: transform .1s; }
.emoji-pop button:hover { background: var(--line-2); transform: scale(1.18); }
.attach-pop { display: flex; flex-direction: column; padding: 8px; min-width: 200px; }
.attach-pop button { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 0; background: transparent; border-radius: 10px; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.attach-pop button:hover { background: var(--line-2); }
.attach-pop span { width: 36px; height: 36px; border-radius: 50%; color: #fff; display: grid; place-items: center; }
.mention-pop { display: flex; flex-direction: column; padding: 6px; min-width: 240px; }
.mention-pop button { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border: 0; background: transparent; border-radius: 9px; font: inherit; cursor: pointer; text-align: left; }
.mention-pop button.first, .mention-pop button:hover { background: var(--brand-50); }
.mention-pop .avatar { width: 28px; height: 28px; font-size: 10.5px; }
.mention-pop b { flex: 1; font-size: 13.5px; } .mention-pop small { font-size: 11px; }

.chat-empty { margin: auto; max-width: 380px; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 26px 24px; border-radius: 18px; background: rgba(255, 255, 255, .78); box-shadow: 0 10px 30px -18px rgba(0, 0, 0, .3); color: var(--muted); font-size: 13.5px; }
.chat-empty b { color: var(--ink); font-size: 16px; }
.ce-ic { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; background: var(--brand-50); color: var(--brand); }
.ce-ic .avatar { width: 60px; height: 60px; font-size: 20px; border-radius: 18px; }
.ce-hint { font-size: 12.5px; color: var(--gold-600); background: var(--gold-50); padding: 5px 12px; border-radius: 999px; }
.chat-loading .chat-side { padding: 18px; gap: 12px; }
.sk { height: 52px; border-radius: 12px; background: linear-gradient(90deg, var(--line-2), #fff, var(--line-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.chat-setup { display: flex; gap: 18px; align-items: flex-start; }
.chat-setup h2 { font-size: 19px; font-weight: 800; margin-bottom: 6px; }
.chat-setup p { margin: 0 0 10px; }
.cs-ic { width: 52px; height: 52px; border-radius: 15px; background: var(--brand-50); color: var(--brand); display: grid; place-items: center; flex: 0 0 auto; }
.code-row { display: flex; align-items: center; gap: 10px; margin: 6px 0 12px; padding: 10px 12px; border-radius: 12px; background: #0F1A15; }
.code-row code { flex: 1; color: #B7F5D2; font-family: var(--mono); font-size: 13px; overflow-x: auto; white-space: nowrap; }
.share-rooms { display: flex; flex-direction: column; gap: 4px; max-height: 260px; overflow-y: auto; margin-top: 6px; }
.share-room { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; font-weight: 600; font-size: 13.5px; }
.share-room:has(input:checked) { border-color: var(--brand); background: var(--brand-50); }
.share-room input { accent-color: var(--brand); }
.share-room .avatar { width: 28px; height: 28px; font-size: 10.5px; }
.share-room .sr-name { flex: 1; }
.share-room .avatar, .share-room .r-av { flex: 0 0 auto; }
.lead-pick { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto; }
.lead-pick .lead-chip { margin: 0; min-width: 0; }
.lightbox-scrim { background: rgba(8, 12, 10, .88); }
.lightbox { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 20px; pointer-events: none; }
.lightbox > * { pointer-events: auto; }
.lb-bar { display: flex; align-items: center; gap: 10px; color: #fff; width: min(1000px, 100%); }
.lb-bar span { flex: 1; font-size: 13.5px; opacity: .85; }
.lb-bar .btn { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); color: #fff; }
.lightbox img { max-width: min(1000px, 100%); max-height: calc(100vh - 110px); border-radius: 12px; box-shadow: 0 30px 60px rgba(0, 0, 0, .5); animation: popIn .2s ease; }
.nav-item .chat-count { background: #2563EB; color: #fff; }

@media (max-width: 1100px) { .chat { grid-template-columns: 290px minmax(0, 1fr); } .chat-thread { padding: 12px 3% 16px; } }
@media (max-width: 760px) {
  .content:has(> .chat) { padding: 8px 8px 8px; }
  .chat { grid-template-columns: 1fr; height: calc(100dvh - 146px); min-height: 440px; border-radius: 16px; }
  .chat .chat-main { display: none; }
  .chat.show-main .chat-side { display: none; }
  .chat.show-main .chat-main { display: flex; }
  .chat-back { display: inline-flex; margin-left: -8px; }
  .ch-actions .btn span, .ch-faces { display: none; }
  .msg-col { max-width: 84%; }
  .lead-chip, .att-file { min-width: 0; } .vp { min-width: 210px; } .att-img { min-width: 0; } .lc-stage { display: none; }
  .emoji-pop { grid-template-columns: repeat(7, 38px); }
  .msg-tools { display: none; }
  .msg.tools-open .msg-tools { display: flex; }
}

/* ================= v7: team chat, refined look ================= */
.chat {
  --c-forest: #0F172A; --c-em: #2563EB; --c-em2: #1D4ED8; --c-gold: #2563EB; --c-gold-d: #1D4ED8; --c-gold-l: #BFDBFE;
  --c-stone: #F7F8FA; --c-ink: #1B2420; --c-mute: #6B756F; --c-line: #E2E7E3;
  border: 1px solid var(--c-line); border-radius: 22px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .8) inset, 0 30px 60px -36px rgba(15, 23, 42, .45), 0 2px 6px -2px rgba(15, 23, 42, .08);
}
/* list */
.chat-side { background: #fff; border-right: 1px solid var(--c-line); }
.cs-head { padding: 20px 20px 14px; }
.cs-head h2 { font-family: var(--display); font-size: 19px; font-weight: 800; letter-spacing: -.01em; color: var(--c-forest); }
.cs-head small { color: var(--c-mute); font-weight: 500; }
.cs-search { margin: 0 16px 8px; height: 40px; border-radius: 12px; background: var(--c-stone); border: 1px solid transparent; }
.cs-search:focus-within { background: #fff; border-color: var(--c-gold); box-shadow: 0 0 0 4px rgba(37, 99, 235, .14); }
.r-sec { padding: 16px 12px 6px; font-size: 12.5px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--c-mute); }
.room { position: relative; padding: 10px 12px; border-radius: 14px; gap: 12px; }
.room:hover { background: #F5F7FA; }
.room.active { background: #EFF6FF; box-shadow: none; }
.room.active::before { content: ""; position: absolute; left: -8px; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--c-gold); }
.r-av .avatar { width: 44px; height: 44px; box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c-line); }
.r-av.hash { width: 44px; height: 44px; border-radius: 14px; background: linear-gradient(150deg, #EFF6FF, #DBEAFE); color: var(--c-em); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .12); }
.r-av.hash.bot { background: linear-gradient(150deg, #EFF6FF, #DBEAFE); color: var(--c-gold-d); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .2); }
.r-av .on, .face .on { background: #22A06B; border-color: #fff; }
.r-top b { font-weight: 650; color: var(--c-ink); }
.room.has-unread .r-top b { font-weight: 800; }
.r-top time { font-size: 11.5px; color: #9AA29D; font-variant-numeric: tabular-nums; }
.room.has-unread .r-top time { color: var(--c-em); font-weight: 700; }
.r-last { color: var(--c-mute); }
.room.has-unread .r-last { color: var(--c-ink); font-weight: 550; }
.r-typing { color: var(--c-em); font-style: normal; font-weight: 600; }
.r-badge { min-width: 22px; height: 22px; background: var(--c-em); font-size: 11.5px; box-shadow: 0 4px 10px -4px rgba(37, 99, 235, .7); }
.r-badge.muted { background: #DCE2DE; color: #56605A; box-shadow: none; }
.r-badge.at { background: var(--c-gold); color: #FFFFFF; }
.r-last .tick.read, .r-last .tick { color: #9AA29D; }
.r-last .tick.read { color: var(--c-gold-d); }
.r-invite { background: linear-gradient(160deg, #F8FAFC, #EFF6FF); border: 1px solid #DBEAFE; border-radius: 16px; }
.cs-me { padding: 14px 18px; border-top: 1px solid var(--c-line); background: linear-gradient(180deg, #fff, #F9FAFB); }

/* conversation */
.chat-main {
  background-color: var(--c-stone);
  background-image:
    radial-gradient(1200px 500px at 110% -10%, rgba(37, 99, 235, .10), transparent 60%),
    radial-gradient(900px 500px at -20% 110%, rgba(37, 99, 235, .08), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560' viewBox='0 0 560 560'%3E%3Cg fill='none' stroke='%2315724F' stroke-opacity='.075' stroke-width='1.1'%3E%3Cpath d='M-20 120c60-40 120-10 180-30s110-70 190-50 140 60 230 30'/%3E%3Cpath d='M-20 160c70-35 130-5 190-25s120-60 190-40 150 55 220 25'/%3E%3Cpath d='M-20 205c80-30 140 0 200-20s110-55 185-35 150 50 215 22'/%3E%3Cpath d='M120 330c30-50 110-70 160-40s40 100-20 120-150-20-140-80z'/%3E%3Cpath d='M150 335c20-32 80-46 115-25s28 70-14 84-110-14-101-59z'/%3E%3Cpath d='M182 340c12-18 48-26 70-13s17 42-8 50-66-8-62-37z'/%3E%3Cpath d='M-20 440c90-30 150 20 230 10s130-60 210-40 110 40 160 30'/%3E%3Cpath d='M-20 485c90-25 160 20 235 12s130-50 205-32 115 35 160 26'/%3E%3Cpath d='M380 250c40-30 110-20 130 20s-20 80-70 80-100-60-60-100z'/%3E%3C/g%3E%3C/svg%3E");
  background-size: auto, auto, 560px 560px;
}
.chat-head { min-height: 68px; padding: 12px 20px; background: rgba(255, 255, 255, .86); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--c-line); }
.ch-t b { font-family: var(--display); font-weight: 750; font-size: 15.5px; color: var(--c-forest); letter-spacing: -.005em; }
.ch-t small { color: var(--c-mute); }
.ch-t .online, .online, .ch-t .typing { color: var(--c-em); font-style: normal; }
.ch-actions .btn.ghost { border: 1px solid var(--c-line); background: #fff; }
.ch-actions .btn.ghost:hover { border-color: var(--c-gold); background: #FFFFFF; }
.chat-thread { padding: 18px 7% 22px; }
.chat-day span { background: rgba(255, 255, 255, .9); color: var(--c-mute); font-size: 11.5px; font-weight: 650; padding: 5px 14px; border-radius: 999px; box-shadow: 0 0 0 1px var(--c-line), 0 4px 10px -8px rgba(15, 23, 42, .4); backdrop-filter: blur(6px); }
.chat-day.start span { background: #F8FAFC; color: #1E40AF; box-shadow: 0 0 0 1px #DBEAFE; }
.chat-unread { margin: 12px 0; padding: 0; background: none; position: relative; }
.chat-unread::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, var(--c-gold), transparent); }
.chat-unread span { position: relative; background: #fff; color: var(--c-gold-d); box-shadow: 0 0 0 1px #DBEAFE; font-size: 11.5px; }

/* bubbles: no tails; a tighter corner points at the speaker */
.msg.theirs:not(.grouped) .bubble::before, .msg.mine:not(.grouped) .bubble::before { display: none; }
.bubble { padding: 8px 12px 8px; border-radius: 18px; background: #fff; color: var(--c-ink); font-size: 14.3px; line-height: 1.45; box-shadow: 0 0 0 1px rgba(15, 23, 42, .06), 0 6px 14px -10px rgba(15, 23, 42, .35); }
.msg.theirs:not(.grouped) .bubble { border-top-left-radius: 6px; }
.msg.mine:not(.grouped) .bubble { border-top-right-radius: 6px; }
.msg.mine .bubble { background: linear-gradient(160deg, #3B82F6 0%, var(--c-em) 45%, var(--c-em2) 100%); color: #F4FBF7; box-shadow: 0 8px 18px -10px rgba(29, 78, 216, .75), inset 0 1px 0 rgba(255, 255, 255, .12); }
.msg.mine .msg-meta { color: rgba(236, 248, 241, .72); }
.msg.mine .tick { color: rgba(236, 248, 241, .65); }
.msg.mine .tick.read { color: var(--c-gold-l); }
.msg.mine .msg-text a { color: var(--c-gold-l); text-decoration: underline; text-underline-offset: 2px; }
.msg.mine .mention { color: #FFFFFF; background: var(--c-gold-l); }
.msg.mine .quote { background: rgba(255, 255, 255, .12); border-left-color: var(--c-gold-l); }
.msg.mine .quote b { color: var(--c-gold-l) !important; }
.msg.mine .quote span { color: rgba(244, 251, 247, .8); }
.msg.mine .att-file { background: rgba(255, 255, 255, .12); color: #fff; }
.msg.mine .att-file:hover { background: rgba(255, 255, 255, .18); }
.msg.mine .af-b small { color: rgba(244, 251, 247, .7); }
.msg.mine .vp-btn { background: #fff; color: var(--c-em); }
.msg.mine .vp-track i { background: rgba(255, 255, 255, .45); }
.msg.mine .vp.playing .vp-track i { background: var(--c-gold-l); }
.msg.mine .vp-fill { background: rgba(255, 255, 255, .18); }
.msg.mine .vp-time { color: rgba(244, 251, 247, .75); }
.msg.mine .vp-av { background: rgba(255, 255, 255, .14); color: var(--c-gold-l); }
.msg.mine .lead-chip { background: #fff; color: var(--c-ink); border-color: transparent; box-shadow: 0 6px 14px -10px rgba(0, 0, 0, .5); }
.msg.mine.deleted .bubble { background: rgba(37, 99, 235, .12); color: var(--c-mute); box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .15); }
.msg.mine.deleted .msg-meta { color: var(--c-mute); }
.msg.bot .bubble { background: #FFFFFF; box-shadow: 0 0 0 1px #DBEAFE, 0 6px 14px -10px rgba(37, 99, 235, .45); }
.msg.mentioned:not(.mine) .bubble { box-shadow: 0 0 0 2px var(--c-gold), 0 6px 14px -10px rgba(37, 99, 235, .5); }
.msg-name { font-size: 12.5px; font-weight: 750; letter-spacing: .005em; }
.msg-meta { color: #8C958F; font-variant-numeric: tabular-nums; }
.tick { color: #A2AAA5; } .tick.read { color: var(--c-gold-d); }
.msg-av .avatar { box-shadow: 0 0 0 2px #fff; }
.bot-av { background: linear-gradient(145deg, #BFDBFE, #2563EB) !important; color: #FFFFFF !important; }
.mention { color: var(--c-em); background: #EFF6FF; }
.mention.me { color: #1E40AF; background: #EFF6FF; }
.msg-text a { color: var(--c-em); }
.quote { border-left-color: var(--qc, var(--c-em)); background: #F3F4F6; border-radius: 10px; }
.att-img { border-radius: 13px; background: #DDE5E0; }
.att-file { background: #F3F4F6; border-radius: 12px; }
.af-ic { border-radius: 8px; background: linear-gradient(160deg, #D96B55, #B8432F); }
.vp-btn { background: var(--c-em); }
.vp-track i { background: #C9D3CD; }
.vp.playing .vp-track i { background: var(--c-em); }
.vp-av { background: #EFF6FF; color: var(--c-gold-d); }
.lead-chip { border-radius: 14px; border-color: var(--c-line); background: #fff; }
.lead-chip .avatar { box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--c-line); }
.react { height: 26px; padding: 0 8px; border-color: var(--c-line); box-shadow: 0 4px 10px -8px rgba(15, 23, 42, .45); }
.react.on { background: #EFF6FF; border-color: rgba(37, 99, 235, .35); }
.react.on b { color: var(--c-em); }
.msg-tools { border-radius: 12px; box-shadow: 0 0 0 1px var(--c-line), 0 10px 24px -12px rgba(15, 23, 42, .45); }
.chat-pop { border-radius: 16px; box-shadow: 0 0 0 1px var(--c-line), 0 24px 50px -20px rgba(15, 23, 42, .45); }
.menu-pop button:hover, .attach-pop button:hover, .emoji-pop button:hover { background: #F3F4F6; }
.attach-pop span { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25); }
.chat-jump { box-shadow: 0 0 0 1px var(--c-line), 0 10px 22px -10px rgba(15, 23, 42, .5); color: var(--c-em); }
.chat-jump b { background: var(--c-gold); color: #FFFFFF; }

/* composer: one floating tray */
.chat-compose-wrap { background: transparent; border-top: 0; padding: 0 16px 16px; }
.chat-bar { margin: 0 0 8px; border-radius: 14px; border-left-width: 3px; box-shadow: 0 0 0 1px var(--c-line), 0 8px 18px -14px rgba(15, 23, 42, .5); }
.chat-compose { padding: 6px; gap: 4px; align-items: flex-end; background: #fff; border-radius: 20px; box-shadow: 0 0 0 1px var(--c-line), 0 14px 30px -18px rgba(15, 23, 42, .45); }
.chat-compose:focus-within { box-shadow: 0 0 0 1px var(--c-gold), 0 0 0 5px rgba(37, 99, 235, .14), 0 14px 30px -18px rgba(15, 23, 42, .45); }
.c-btn { width: 40px; height: 40px; color: #7B857F; }
.c-btn:hover, .c-btn.on { background: #F3F4F6; color: var(--c-em); transform: none; }
#chat-input { padding: 10px 8px; border-radius: 12px; background: transparent; box-shadow: none; font-size: 14.5px; }
#chat-input:focus { box-shadow: none; }
#chat-input::placeholder { color: #9AA29D; }
.send-btn { width: 42px; height: 42px; border-radius: 14px; background: linear-gradient(160deg, #3B82F6, var(--c-em2)); box-shadow: 0 8px 16px -8px rgba(29, 78, 216, .8), inset 0 1px 0 rgba(255, 255, 255, .18); }
.send-btn.mic { background: #F3F4F6; color: var(--c-em); box-shadow: inset 0 0 0 1px var(--c-line); }
.send-btn.mic:hover { background: #EFF6FF; }
.chat-compose.rec { padding: 8px 10px; }
.rec-dot { background: #C2462F; }
.rec-wave i { background: var(--c-em); }
#chat-pops { left: 6px; bottom: calc(100% + 10px); }

/* empty + setup */
.chat-empty { background: rgba(255, 255, 255, .88); box-shadow: 0 0 0 1px var(--c-line), 0 20px 40px -24px rgba(15, 23, 42, .45); border-radius: 20px; backdrop-filter: blur(6px); }
.ce-ic { background: linear-gradient(150deg, #EFF6FF, #DBEAFE); color: var(--c-em); }
.ce-hint { background: #F8FAFC; color: #1E40AF; box-shadow: inset 0 0 0 1px #DBEAFE; }
.nav-item .chat-count { background: var(--c-gold, #2563EB); color: #FFFFFF; }
.sidebar .nav-item .chat-count { background: #2563EB; color: #FFFFFF; }

@media (max-width: 760px) {
  .chat-compose-wrap { padding: 0 8px 8px; }
  .chat-thread { padding: 12px 10px 16px; }
}
.chat-day { position: static; }

/* ================= v8: clean white + blue ================= */
body { background: var(--bg); }
h1, h2, h3, .brand-name, .kpi .value { letter-spacing: -0.02em; }

/* sidebar: white, quiet */
.sidebar { background: #FFFFFF; border-right: 1px solid var(--line); color: var(--side-ink); padding: 20px 12px 16px; }
.brand { padding: 2px 8px 20px; }
.brand-mark { background: #2563EB; color: #fff; box-shadow: 0 6px 14px -6px rgba(37, 99, 235, .7); border-radius: 11px; font-weight: 800; }
.brand-name { color: var(--ink); font-weight: 750; font-size: 16px; }
.brand-sub { color: var(--muted); letter-spacing: 0; text-transform: none; font-size: 12px; font-weight: 500; }
.client-switch label { color: var(--muted); letter-spacing: 0; text-transform: none; font-size: 12px; }
.client-switch select { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.nav-item { color: var(--side-ink); min-height: 40px; border-radius: 9px; font-weight: 500; }
.nav-item svg { opacity: 1; color: #94A3B8; }
.nav-item:hover { background: #F1F5F9; color: var(--ink); }
.nav-item[aria-current="page"] { background: #EFF6FF; color: #1D4ED8; font-weight: 600; box-shadow: none; }
.nav-item[aria-current="page"] svg { color: #2563EB; }
.nav-item[aria-current="page"]::before { display: none; }
.nav-item .count { background: #F1F5F9; color: #475569; }
.nav-item .count.warn { background: #FEF3C7; color: #92400E; }
.nav-item .chat-count, .sidebar .nav-item .chat-count { background: #2563EB; color: #fff; }
.sidebar-foot { background: #F8FAFC; border: 1px solid var(--line); }
.sidebar-foot small { color: var(--muted); }
.sync-dot { background: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
.sync-dot.off { background: #CBD5E1; }
.account, .account-mail { color: var(--muted); }

/* top bar */
.topbar { background: rgba(255, 255, 255, .85); }
.search input { box-shadow: none; background: #F8FAFC; }
.search input:focus { background: #fff; }

/* page titles: plain text, no banner */
.page-head { background: none; box-shadow: none; color: var(--ink); padding: 6px 2px 2px; border-radius: 0; overflow: visible; }
.page-head::after, .content.enter .page-head::before { display: none; }
.page-head h1 { color: var(--ink); font-size: 26px; font-weight: 750; }
.page-head h1::after { display: none; }
.page-head p { color: var(--muted); margin-top: 6px; }
.page-head .btn { background: #fff; border-color: var(--line); color: var(--ink); }
.page-head .btn:hover { background: #F8FAFC; border-color: #CBD5E1; }
.page-head .btn.primary { background: #2563EB; border-color: #2563EB; color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .3); }
.page-head .btn.primary:hover { background: #1D4ED8; }
.page-head .seg { background: #F1F5F9; }
.page-head .seg button { color: var(--muted); }
.page-head .seg button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .1); }
.page-head .toolbar select { background: #fff; border-color: var(--line); color: var(--ink); }

/* buttons + fields */
.btn:hover { border-color: #CBD5E1; }
.btn.primary { background: #2563EB; border-color: #2563EB; color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .25); }
.btn.primary:hover { background: #1D4ED8; border-color: #1D4ED8; }
.field input:focus, .field select:focus, .field textarea:focus, .search input:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
:focus-visible { outline-color: #2563EB; }
.card { border-color: var(--line); box-shadow: var(--shadow-sm); }

/* number cards: one accent each, no glow */
.kpi::after { display: none; }
.kpi::before { height: 0; }
.kpis .kpi:nth-child(1) { --k: #2563EB; --kbg: #EFF6FF; }
.kpis .kpi:nth-child(2) { --k: #0891B2; --kbg: #ECFEFF; }
.kpis .kpi:nth-child(3) { --k: #7C3AED; --kbg: #F5F3FF; }
.kpis .kpi:nth-child(4) { --k: #0F766E; --kbg: #F0FDFA; }
.kpi .value { font-weight: 750; }
.funnel-bar span, .funnel-row:nth-child(n+4) .funnel-bar span { background: #2563EB; box-shadow: none; }
.funnel-row:nth-child(n+4) .funnel-bar span { background: #93C5FD; }
.funnel-bar { background: #F1F5F9; }
.spark .sl { stroke: #2563EB; } .spark .se { fill: #2563EB; }

/* lead drawer + login */
.drawer-head { background: #fff; color: var(--ink); border-bottom: 1px solid var(--line); }
.drawer-head h2 { color: var(--ink); }
.drawer-head .muted { color: var(--muted); }
.drawer-head .btn { background: #fff; border-color: var(--line); color: var(--ink); }
.drawer-head .btn:hover { background: #F8FAFC; }
.auth-wrap { background: linear-gradient(180deg, #EFF6FF 0%, #F7F8FA 60%); }
.auth-card { border-top: 0; box-shadow: 0 0 0 1px var(--line), var(--shadow-lg); }

/* team chat in the same language */
.chat { --c-forest: #0F172A; --c-em: #2563EB; --c-em2: #1D4ED8; --c-gold: #2563EB; --c-gold-d: #1D4ED8; --c-gold-l: #BFDBFE; --c-stone: #F7F8FA; --c-ink: #0F172A; --c-mute: #64748B; --c-line: #E5E7EB; box-shadow: var(--shadow-sm); border-radius: 16px; }
.chat-main { background: #F7F8FA; background-image: none; }
.msg.mine .bubble { background: #2563EB; color: #fff; box-shadow: 0 1px 2px rgba(37, 99, 235, .35); }
.msg.mine .tick.read { color: #fff; }
.msg.mine .tick { color: rgba(255, 255, 255, .7); }
.bubble { box-shadow: 0 0 0 1px #E5E7EB, 0 1px 2px rgba(15, 23, 42, .04); }
.msg.bot .bubble { background: #fff; box-shadow: 0 0 0 1px #DBEAFE, 0 1px 2px rgba(15, 23, 42, .04); }
.room.active::before { background: #2563EB; }
.r-av.hash { background: #EFF6FF; box-shadow: none; }
.r-av.hash.bot { background: #F1F5F9; color: #475569; box-shadow: none; }
.r-av .avatar { box-shadow: none; }
.bot-av { background: #E2E8F0 !important; color: #334155 !important; }
.chat-unread::before { background: linear-gradient(90deg, transparent, #93C5FD, transparent); }
.chat-day.start span { background: #F8FAFC; color: #475569; box-shadow: 0 0 0 1px #E5E7EB; }
.send-btn { border-radius: 12px; background: #2563EB; box-shadow: none; }
.send-btn:hover { background: #1D4ED8; transform: none; }
.r-badge, .chat-jump b { background: #2563EB; color: #fff; box-shadow: none; }
.r-badge.at { background: #F59E0B; color: #fff; }
.mention.me { color: #92400E; background: #FEF3C7; }
.msg.mentioned:not(.mine) .bubble { box-shadow: 0 0 0 2px #F59E0B; }
.cs-me { background: #fff; }
.r-invite { background: #F8FAFC; border-color: #E5E7EB; color: #2563EB; }
.area-chart .l1 { stroke: #93C5FD; filter: none; } .area-chart .l2 { stroke: #2563EB; filter: none; }
.area-chart .dot { stroke: #93C5FD; } .area-chart .pa { fill: #93C5FD; } .area-chart .pq { fill: #2563EB; }
.chart-legend i[style*="brand"] { background: #2563EB !important; }

/* ================= v9: lead cards, notes, clock, calendar ================= */
.avatar.xs { width: 24px; height: 24px; flex: 0 0 24px; font-size: 9.5px; }
/* lead card */
.lead-card.lc2 { gap: 9px; padding: 14px; border-left-width: 3px; border-radius: 12px; }
.lc2 .lc-top { align-items: flex-start; }
.lc2 .lc-id { flex: 1; min-width: 0; }
.lc2 .lc-name { font-size: 14.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc2 .lc-sub { margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.lc-when { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 12px; color: var(--ink-2); background: #F8FAFC; border: 1px solid var(--line-2); border-radius: 9px; padding: 6px 8px; }
.lc-when > span:first-child { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 550; }
.lc-when svg { color: var(--muted); }
.lc-src { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 55%; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-src.meta { color: #1D4ED8; font-weight: 600; }
.lc-src.meta svg { flex: 0 0 auto; }
.lc2 .lc-chips .chip { background: #fff; border-color: var(--line); font-size: 11.5px; padding: 2px 8px; border-radius: 999px; }
.lc-line { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.lc-note { display: flex; gap: 7px; align-items: flex-start; font-size: 12.5px; line-height: 1.4; color: var(--ink-2); background: #FFFBEB; border: 1px solid #FEF3C7; border-radius: 9px; padding: 7px 9px; }
.lc-note svg { flex: 0 0 auto; margin-top: 2px; color: #B45309; }
.lc-note span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lc-note.pinned { border-color: #FDE68A; }
.lc-fu { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #1D4ED8; }
.lc-fu span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lc-fu.late { color: var(--red); }
.lc-flags { display: flex; flex-wrap: wrap; gap: 6px; }
.lc2 .lc-foot { border-top: 1px solid var(--line-2); padding-top: 10px; }
.lc-owner { display: inline-flex; }
.lc-ic { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 9px; border: 1px solid var(--line); background: #fff; color: var(--muted); display: grid; place-items: center; padding: 0; transition: background .15s, color .15s, border-color .15s; }
.lc-ic:hover { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
/* notes */
.notes-card { display: flex; flex-direction: column; gap: 12px; }
.nc-head { display: flex; align-items: baseline; justify-content: space-between; }
.nc-head h3 { font-size: 14px; }
.nc-head .muted { font-size: 12px; }
.note-new { display: flex; flex-direction: column; gap: 8px; }
.note-new textarea, .note.editing textarea { width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 13.5px; resize: vertical; min-height: 64px; background: #fff; }
.note-new textarea:focus, .note.editing textarea:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.note-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.note-chip { border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; transition: background .12s, border-color .12s, color .12s; }
.note-chip:hover { background: #EFF6FF; border-color: #BFDBFE; color: #1D4ED8; }
.note-new-foot { display: flex; justify-content: flex-end; }
.notes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.note { position: relative; display: flex; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line-2); }
.note.pinned { background: #FFFBEB; margin: 0 -12px; padding: 12px; border-radius: 10px; border-top-color: transparent; }
.note.auto .note-t { color: var(--muted); }
.note-b { flex: 1; min-width: 0; }
.note-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.note-h b { color: var(--ink); font-size: 12.5px; }
.note-pin { display: inline-flex; align-items: center; gap: 3px; color: #B45309; font-weight: 600; }
.note-t { margin-top: 3px; font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; color: var(--ink); }
.note-acts { display: flex; gap: 2px; align-self: flex-start; opacity: 0; transition: opacity .15s; }
.note:hover .note-acts, .note:focus-within .note-acts { opacity: 1; }
.note-acts button { width: 28px; height: 28px; border: 0; background: transparent; border-radius: 7px; color: var(--muted); display: grid; place-items: center; padding: 0; }
.note-acts button:hover { background: #F1F5F9; color: var(--ink); }
.note-acts button[data-act="note-del"]:hover { color: var(--red); background: var(--red-bg); }
.note.editing form { width: 100%; display: flex; flex-direction: column; gap: 8px; }
.note-ed-foot { display: flex; justify-content: flex-end; gap: 8px; }
@media (pointer: coarse) { .note-acts { opacity: 1; } }
.toast-undo { pointer-events: auto; margin-left: 8px; border: 0; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; font-size: 12.5px; padding: 5px 12px; border-radius: 8px; cursor: pointer; }
.toast-undo:hover { background: rgba(255, 255, 255, .24); }
/* clock */
.clock-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 12px; border-radius: 11px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 13px; cursor: pointer; font-variant-numeric: tabular-nums; }
.clock-pill:hover { border-color: #BFDBFE; background: #F8FAFF; }
.clock-pill svg { color: #2563EB; }
.clock-pill b { font-weight: 700; color: var(--ink); padding-left: 8px; border-left: 1px solid var(--line); }
.page-head .toolbar:has(.today-widget) { align-items: stretch; }
.today-widget { display: flex; align-items: center; gap: 18px; padding: 10px 16px 10px 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-sm); }
.tw-clock { display: flex; align-items: flex-start; gap: 4px; font-variant-numeric: tabular-nums; color: var(--ink); }
.tw-clock #tw-time { font-size: 32px; font-weight: 750; letter-spacing: -0.03em; line-height: 1; }
.tw-side { display: flex; flex-direction: column; font-size: 11px; font-weight: 700; line-height: 1.15; color: var(--muted); padding-top: 2px; }
.tw-side #tw-sec { color: #2563EB; }
.tw-date { display: flex; flex-direction: column; padding-left: 16px; border-left: 1px solid var(--line); }
.tw-date b { font-size: 14px; color: var(--ink); }
.tw-date span { font-size: 12.5px; color: var(--muted); }
.tw-stats { display: flex; flex-direction: column; gap: 3px; padding-left: 16px; border-left: 1px solid var(--line); }
.tw-stats button { border: 0; background: none; padding: 0; text-align: left; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.tw-stats button b { color: #2563EB; font-size: 13px; margin-right: 2px; }
.tw-stats button.late b, .tw-stats button.late { color: var(--red); }
.tw-stats button:hover { color: var(--ink); }
/* calendar */
.cal-nav { display: inline-flex; gap: 6px; }
.cal-nav .btn.icon-btn:first-child svg { transform: rotate(180deg); }
.cal-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.cal { overflow: hidden; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); background: #F8FAFC; }
.cal-week span { padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); grid-auto-rows: minmax(118px, 1fr); }
.cal-cell { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 8px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); cursor: pointer; min-width: 0; transition: background .12s; outline-offset: -2px; }
.cal-cell:nth-child(7n) { border-right: 0; }
.cal-cell:hover { background: #F8FAFF; }
.cal-cell.out { background: #FAFBFC; }
.cal-cell.out .cal-num { color: #CBD5E1; }
.cal-cell.sel { background: #EFF6FF; box-shadow: inset 0 0 0 2px #2563EB; }
.cal-cell.drop-on { background: #DBEAFE; box-shadow: inset 0 0 0 2px #2563EB; }
.cal-top { display: flex; align-items: center; justify-content: space-between; }
.cal-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.cal-cell.today .cal-num { background: #2563EB; color: #fff; }
.cal-leads { font-size: 11px; font-weight: 700; color: #0F766E; background: #F0FDFA; border: 1px solid #CCFBF1; padding: 1px 7px; border-radius: 999px; }
.cal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-ev { display: flex; gap: 5px; align-items: center; font-size: 11.5px; line-height: 1.3; padding: 3px 6px; border-radius: 6px; background: #EFF6FF; color: #1E40AF; border-left: 3px solid #2563EB; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: grab; }
.cal-ev i { font-style: normal; font-weight: 700; flex: 0 0 auto; font-variant-numeric: tabular-nums; }
.cal-ev.late { background: #FEF2F2; color: #B91C1C; border-left-color: #EF4444; }
.cal-ev.done { background: #F1F5F9; color: #94A3B8; border-left-color: #CBD5E1; text-decoration: line-through; }
.cal-more { font-size: 11px; color: var(--muted); padding-left: 4px; }
.cal-tag { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 6px; display: inline-flex; align-items: center; gap: 3px; align-self: flex-start; }
.cal-tag.visit { background: #ECFEFF; color: #0E7490; }
.cal-tag.won { background: #F0FDF4; color: #15803D; }
.cal-dots { display: none; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 16px; padding: 12px 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; }
.lg-fu { background: #2563EB; } .lg-late { background: #EF4444; } .lg-done { background: #CBD5E1; } .lg-lead { background: #14B8A6; }
.cal-side { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.cs-day { display: flex; align-items: center; gap: 12px; }
.cs-big { font-size: 40px; font-weight: 750; letter-spacing: -0.03em; color: #2563EB; line-height: 1; font-variant-numeric: tabular-nums; }
.cs-day div { flex: 1; display: flex; flex-direction: column; }
.cs-day b { font-size: 16px; } .cs-day div span { font-size: 13px; color: var(--muted); }
.cs-sec h4 { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; margin: 0 0 6px; }
.cs-sec h4 span { font-size: 11px; font-weight: 700; color: var(--muted); background: #F1F5F9; padding: 1px 7px; border-radius: 999px; }
.cs-sec .list { margin: 0 -18px; }
.cs-sec .list li { padding: 10px 18px; }
.cs-sec p { margin: 0; font-size: 13px; }
.cal-leads-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.cal-lead { width: 100%; display: flex; align-items: center; gap: 10px; padding: 8px; border: 0; background: transparent; border-radius: 10px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.cal-lead:hover { background: #F8FAFC; }
.cal-lead .avatar { width: 32px; height: 32px; flex-basis: 32px; font-size: 11px; }
.cal-lead .grow { display: flex; flex-direction: column; min-width: 0; }
.cal-lead b { font-size: 13px; } .cal-lead small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1100px) { .cal-wrap { grid-template-columns: 1fr; } .cal-side { position: static; } .today-widget .tw-stats { display: none; } }
@media (max-width: 760px) {
  .clock-pill { display: none; }
  .today-widget { width: 100%; }
  .cal-grid { grid-auto-rows: 64px; }
  .cal-items { display: none; }
  .cal-leads { display: none; }
  .cal-dots { display: flex; gap: 3px; justify-content: center; margin-top: auto; }
  .cal-dots i { width: 6px; height: 6px; border-radius: 50%; }
  .cal-dots .d-fu { background: #2563EB; } .cal-dots .d-lead { background: #14B8A6; }
  .cal-cell { padding: 4px; align-items: center; }
  .cal-week span { padding: 8px 4px; text-align: center; }
}
.board { grid-auto-columns: minmax(300px, 1fr); }
.lc2 .lc-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.lc2 .lc-sync { white-space: nowrap; }
.cal-ev i { font-size: 10.5px; }

/* ================= v10: 3D touches ================= */
/* number cards: flip + tilt */
.kpi3d { perspective: 1100px; cursor: pointer; border-radius: var(--radius); outline-offset: 3px; }
.k-tilt { height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.2, .8, .2, 1); will-change: transform; border-radius: var(--radius); }
.k-tilt.tilting { transition: transform .12s ease-out; }
.k-inner { display: grid; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.2, .8, .2, 1); }
.kpi3d.flipped .k-inner { transform: rotateY(180deg); }
.kface { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; position: relative; border-radius: var(--radius); }
.kface > .kpi { height: 100%; }
.kface::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 255, 255, .55), transparent 55%); }
.k-tilt.tilting .kface::after { opacity: 1; }
.k-tilt.tilting .kpi, .k-tilt.tilting .k-back { box-shadow: 0 18px 34px -18px rgba(15, 23, 42, .35); }
.kpi3d .kpi:hover { transform: none; }
.k-back { transform: rotateY(180deg); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; background: linear-gradient(160deg, #1D4ED8, #2563EB); color: #fff; border-color: transparent; }
.kb-title { font-size: 13px; font-weight: 700; opacity: .9; }
.kb-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.kb-rows li { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding-bottom: 5px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.kb-rows li:last-child { border-bottom: 0; }
.kb-rows span { opacity: .85; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kb-rows b { font-variant-numeric: tabular-nums; }
.kb-foot { font-size: 11.5px; opacity: .75; }
.kb-foot a { color: #fff; font-weight: 700; }
.kpis3d .kpi3d:nth-child(1) .kpi { --k: #2563EB; --kbg: #EFF6FF; }
.kpis3d .kpi3d:nth-child(2) .kpi { --k: #0891B2; --kbg: #ECFEFF; }
.kpis3d .kpi3d:nth-child(3) .kpi { --k: #7C3AED; --kbg: #F5F3FF; }
.kpis3d .kpi3d:nth-child(4) .kpi { --k: #0F766E; --kbg: #F0FDFA; }
.kpis3d .kpi3d:nth-child(2) .k-back { background: linear-gradient(160deg, #0E7490, #0891B2); }
.kpis3d .kpi3d:nth-child(3) .k-back { background: linear-gradient(160deg, #6D28D9, #7C3AED); }
.kpis3d .kpi3d:nth-child(4) .k-back { background: linear-gradient(160deg, #115E59, #0F766E); }
.content.enter .kpi3d { animation: rise .65s cubic-bezier(.2, .8, .2, 1) backwards; animation-delay: calc(var(--dk, 0ms) - var(--el, 0ms)); }
.content.enter .kpi3d .kpi { animation: none; }
.kpis3d .kpi3d:nth-child(1) { --dk: 80ms; } .kpis3d .kpi3d:nth-child(2) { --dk: 160ms; } .kpis3d .kpi3d:nth-child(3) { --dk: 240ms; } .kpis3d .kpi3d:nth-child(4) { --dk: 320ms; }
/* any tilting card */
[data-tilt] { transition: transform .45s cubic-bezier(.2, .8, .2, 1), box-shadow .2s; transform-style: preserve-3d; will-change: transform; }
[data-tilt].tilting { transition: transform .12s ease-out, box-shadow .2s; }
.card.plot[data-tilt] { position: relative; }
.card.plot[data-tilt]::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .2s;
  background: radial-gradient(circle at var(--sx, 50%) var(--sy, 50%), rgba(255, 255, 255, .5), transparent 55%); }
.card.plot.tilting { box-shadow: 0 22px 40px -20px rgba(15, 23, 42, .4); }
.card.plot.tilting::after { opacity: 1; }
/* flip clock */
.flipclock { display: inline-flex; perspective: 300px; }
.fd { display: inline-block; transform-origin: 50% 50%; backface-visibility: hidden; -webkit-backface-visibility: hidden; min-width: .58em; text-align: center; }
.fd.flip { animation: fdflip .45s cubic-bezier(.2, .8, .3, 1.2); }
@keyframes fdflip { 0% { transform: rotateX(-90deg); opacity: .15; } 60% { opacity: 1; } 100% { transform: rotateX(0); } }
#tw-sec .fd { min-width: .62em; }
.fd.sep { min-width: 0; padding: 0 .04em; }
/* lead panel swings open like a door */
.drawer { animation: none; }
.drawer.door-in { transform-origin: right center; animation: doorIn .55s cubic-bezier(.2, .85, .25, 1) both; }
@keyframes doorIn { 0% { transform: perspective(1400px) rotateY(-38deg) translateX(30px); opacity: 0; } 55% { opacity: 1; } 100% { transform: perspective(1400px) rotateY(0) translateX(0); opacity: 1; } }
/* calendar page turn */
.cal.turn-next { transform-origin: left center; animation: turnNext .5s cubic-bezier(.2, .8, .25, 1); }
.cal.turn-prev { transform-origin: right center; animation: turnPrev .5s cubic-bezier(.2, .8, .25, 1); }
@keyframes turnNext { 0% { transform: perspective(1600px) rotateY(24deg); opacity: .35; } 100% { transform: perspective(1600px) rotateY(0); opacity: 1; } }
@keyframes turnPrev { 0% { transform: perspective(1600px) rotateY(-24deg); opacity: .35; } 100% { transform: perspective(1600px) rotateY(0); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .k-inner, .k-tilt, [data-tilt] { transition: none !important; }
  .drawer.door-in, .cal.turn-next, .cal.turn-prev, .fd.flip { animation: none !important; }
}

/* ================= v11: WhatsApp bridge ================= */
.chat.info-open { grid-template-columns: 300px minmax(0, 1fr) 372px; }
.chat-info { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); background: #fff; animation: infoIn .28s cubic-bezier(.2, .8, .2, 1); }
@keyframes infoIn { from { transform: translateX(24px); opacity: 0; } }
.wab-head { display: flex; align-items: center; gap: 12px; padding: 16px 16px 14px 18px; border-bottom: 1px solid var(--line); }
.wab-head div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.wab-head b { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.wab-head small { font-size: 12px; color: var(--muted); }
.wab-logo { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; color: #fff; background: linear-gradient(150deg, #2BD86B, #128C4A); box-shadow: 0 6px 14px -6px rgba(18, 140, 74, .7); }
.wab-body { flex: 1; overflow-y: auto; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 18px; }
.wab-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; background: #F8FAFC; font-size: 13px; }
.wab-card h4 { margin: 0 0 6px; font-size: 13.5px; } .wab-card p { margin: 0 0 8px; color: var(--ink-2); }
.wab-err { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; background: var(--red-bg); color: var(--red); font-size: 12.5px; line-height: 1.45; overflow-wrap: anywhere; }
.wab-err svg { flex: 0 0 auto; margin-top: 1px; }
/* setup steps */
.wab-steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.wab-steps > li { position: relative; display: flex; gap: 12px; padding-bottom: 18px; }
.wab-steps > li:not(:last-child)::before { content: ""; position: absolute; left: 13px; top: 30px; bottom: 2px; width: 2px; background: var(--line); border-radius: 2px; }
.wab-steps .n { width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #1D4ED8; background: #EFF6FF; box-shadow: inset 0 0 0 1px #BFDBFE; }
.wab-steps li > div { flex: 1; min-width: 0; }
.wab-steps b { font-size: 13.5px; }
.wab-steps p { margin: 4px 0 8px; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.wab-copy small { display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.wab-copy div { display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 10px; border: 1px solid var(--line); border-radius: 10px; background: #F8FAFC; }
.wab-copy code { flex: 1; min-width: 0; font-family: var(--mono); font-size: 11.5px; white-space: nowrap; overflow-x: auto; scrollbar-width: none; }
.wab-copy .btn { min-height: 28px; padding: 0 8px; }
.wab-form { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.wab-form .field { font-size: 12.5px; }
.wab-form .field input { min-height: 38px; font-size: 13px; }
.wab-form .opt { font-weight: 500; color: var(--muted); font-size: 11.5px; margin-left: 4px; }
.wab-form .field { display: block; }
.wab-form .field input { display: block; width: 100%; margin-top: 5px; }
.wab-hint { display: flex; gap: 7px; align-items: flex-start; margin: 0; font-size: 12px; line-height: 1.45; color: var(--muted); }
.wab-hint svg { flex: 0 0 auto; margin-top: 2px; }
.wab-form-foot { display: flex; justify-content: flex-end; gap: 8px; }
/* live status */
.wab-live { display: flex; flex-direction: column; gap: 12px; }
.wab-num { position: relative; padding: 16px; border-radius: 16px; color: #fff; background: linear-gradient(150deg, #0F172A 0%, #1E293B 60%, #14532D 130%); overflow: hidden; display: flex; flex-direction: column; gap: 2px; }
.wab-num::after { content: ""; position: absolute; right: -30px; top: -30px; width: 130px; height: 130px; border-radius: 50%; background: radial-gradient(circle, rgba(43, 216, 107, .35), transparent 70%); }
.wab-num b { font-size: 20px; font-weight: 750; letter-spacing: -.01em; font-variant-numeric: tabular-nums; margin-top: 8px; }
.wab-num small { font-size: 12px; opacity: .75; }
.live-pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 999px; background: rgba(43, 216, 107, .16); color: #86EFAC; box-shadow: inset 0 0 0 1px rgba(134, 239, 172, .3); }
.live-pill i, .wa-bridge-btn .pulse { width: 7px; height: 7px; border-radius: 50%; background: #22C55E; animation: livePulse 2s ease-out infinite; }
@keyframes livePulse { 0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, .6); } 100% { box-shadow: 0 0 0 7px rgba(34, 197, 94, 0); } }
.wab-stats { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.wab-stats div { padding: 10px 6px; text-align: center; display: flex; flex-direction: column; gap: 1px; border-right: 1px solid var(--line-2); }
.wab-stats div:last-child { border-right: 0; }
.wab-stats b { font-size: 18px; font-weight: 750; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.wab-stats span { font-size: 10.5px; color: var(--muted); line-height: 1.2; }
.wab-stats .bad b { color: #B45309; }
.wab-live-acts { display: flex; gap: 8px; }
/* members */
.wab-sec-h { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.wab-sec h4 { margin: 0; font-size: 13.5px; font-weight: 650; display: flex; align-items: center; gap: 8px; }
.wab-sec h4 span { font-size: 11px; font-weight: 700; color: var(--muted); background: #F1F5F9; padding: 1px 7px; border-radius: 999px; }
.wab-add { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.wab-add input { min-height: 36px; border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; font-size: 13px; min-width: 0; }
.wab-add input:focus { outline: none; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.wab-sugg { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.wab-sugg button { display: inline-flex; align-items: center; gap: 5px; border: 1px dashed #BFDBFE; background: #F8FAFF; color: #1D4ED8; font-size: 12px; font-weight: 600; padding: 5px 10px; border-radius: 999px; cursor: pointer; }
.wab-sugg button:hover { background: #EFF6FF; border-style: solid; }
.wab-members { list-style: none; margin: 0 -8px; padding: 0; }
.wab-m { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; padding: 8px; border-radius: 12px; }
.wab-m:hover { background: #F8FAFC; }
.wab-m.off { opacity: .6; }
.wab-m-main { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; min-width: 0; font: inherit; color: inherit; }
.wab-m-main .avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 11.5px; }
.wab-m-main > span:not(.avatar) { display: flex; flex-direction: column; min-width: 0; }
.wab-m-main b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wab-m-main small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.wab-m .wa-st { grid-column: 1; margin-left: 44px; justify-self: start; }
.wab-m-acts { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 2px; }
.wab-m-acts button { width: 30px; height: 30px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); display: grid; place-items: center; padding: 0; cursor: pointer; }
.wab-m-acts button:hover { background: #EEF2F7; color: var(--ink); }
.wab-m-acts button.sure, .wab-m-acts button[data-act="wab-remove"]:hover { background: var(--red-bg); color: var(--red); }
.wab-empty { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.wa-st { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.wa-st::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #CBD5E1; }
.wa-st.on { color: #15803D; } .wa-st.on::before { background: #22C55E; }
.wa-st.wait { color: #B45309; } .wa-st.wait::before { background: #F59E0B; }
.wa-st.mute::before { background: #94A3B8; }
.wab-how summary { cursor: pointer; font-size: 13px; font-weight: 650; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; list-style: none; }
.wab-how summary::-webkit-details-marker { display: none; }
.wab-how[open] summary { border-radius: 12px 12px 0 0; background: #F8FAFC; }
.wab-how ul { margin: 0; padding: 12px 14px 12px 30px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; font-size: 12.5px; line-height: 1.7; color: var(--ink-2); }
/* in the chat itself */
.wa-bridge-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.wa-bridge-btn svg { color: #128C4A; }
.wa-bridge-btn:hover, .wa-bridge-btn.open { border-color: #86EFAC; background: #F0FDF4; color: #14532D; }
.wa-bridge-btn.live { border-color: #BBF7D0; }
.wa-dot { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: #22C55E; color: #fff; display: grid; place-items: center; border: 2px solid #fff; }
.via-wa { display: inline-grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; background: #DCFCE7; color: #15803D; margin-left: 5px; vertical-align: -2px; }
.msg-meta .via-wa { margin: 0 3px 0 0; }
.wa-chip { display: inline-flex; align-items: center; gap: 3px; margin-left: 5px; padding: 1px 6px 1px 5px; border-radius: 999px; font-size: 10px; font-weight: 700; background: rgba(255, 255, 255, .2); color: inherit; cursor: default; }
.msg:not(.mine) .wa-chip { background: #F1F5F9; color: #475569; }
.wa-chip.warn { background: #FEF3C7 !important; color: #92400E !important; }
.msg.mine .wa-chip.read { background: rgba(255, 255, 255, .32); }
.tick.warn { color: #F59E0B !important; }
@media (max-width: 1280px) {
  .chat.info-open { grid-template-columns: 300px minmax(0, 1fr); }
  .chat-info { position: absolute; top: 0; right: 0; bottom: 0; width: min(380px, 100%); z-index: 12; box-shadow: -20px 0 40px -24px rgba(15, 23, 42, .4); }
  .chat { position: relative; }
}
@media (max-width: 760px) { .wa-bridge-btn span { display: none; } .wa-bridge-btn { padding: 0 9px; } .chat.info-open { grid-template-columns: 1fr; } }

/* ================= v12: lead sort + days filter ================= */
.f-days, .f-sort { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 4px 0 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--muted); }
.f-days.on, .f-sort.on { border-color: #93C5FD; background: #EFF6FF; color: #1D4ED8; }
.f-days select, .f-sort select, .page-head .toolbar .f-days select, .page-head .toolbar .f-sort select { border: 0 !important; background: transparent !important; min-height: 38px; padding: 0 6px 0 0; font-weight: 600; color: var(--ink); box-shadow: none !important; cursor: pointer; }
.f-days.on select, .f-sort.on select { color: #1D4ED8 !important; }
.f-days select:focus, .f-sort select:focus { outline: none; }
.f-days:focus-within, .f-sort:focus-within { box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); border-color: #2563EB; }
#f-days-n { width: 62px; min-height: 30px; border: 1px solid #BFDBFE; border-radius: 8px; padding: 0 8px; font: inherit; font-weight: 700; color: #1D4ED8; background: #fff; text-align: center; font-variant-numeric: tabular-nums; }
#f-days-n:focus { outline: none; border-color: #2563EB; }
.f-days-u { font-size: 13px; font-weight: 600; padding-right: 8px; }
.filter-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.filter-sum b { color: var(--ink); font-size: 14px; }
.fs-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 4px 3px 10px; border-radius: 999px; background: #EFF6FF; color: #1D4ED8; font-weight: 600; font-size: 12.5px; border: 1px solid #DBEAFE; }
.fs-chip.sort { background: #F1F5F9; color: #334155; border-color: #E2E8F0; }
.fs-chip button { width: 20px; height: 20px; border: 0; border-radius: 50%; background: transparent; color: inherit; display: grid; place-items: center; padding: 0; cursor: pointer; }
.fs-chip button:hover { background: rgba(37, 99, 235, .14); }
.filter-sum a { font-weight: 600; margin-left: 2px; }
.th-sort { border: 0; background: none; padding: 0; font: inherit; font-weight: inherit; color: inherit; cursor: pointer; text-transform: inherit; letter-spacing: inherit; white-space: nowrap; }
.th-sort:hover, .th-sort.on { color: #1D4ED8; }
@media (max-width: 760px) { .f-days, .f-sort { flex: 1 1 calc(50% - 6px); } .f-days select, .f-sort select { flex: 1; min-width: 0; } }

/* ================= v13: message all follow-ups ================= */
.fb-modal { width: min(980px, calc(100vw - 32px)); }
.fb-modal .modal-head h2 { display: flex; align-items: center; gap: 10px; }
.fb-modal .modal-head h2 svg { color: #1DA851; }
.fb-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.fb-left { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.fb-preview small { display: block; color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.fb-bubble { background: #DCF8C6; color: #111B21; border-radius: 12px 12px 12px 4px; padding: 10px 12px; font-size: 13.5px; line-height: 1.45; max-height: 180px; overflow: auto; }
.fb-right { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.fb-progress { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.fb-progress b { font-size: 16px; }
.fb-bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.fb-bar i { display: block; height: 100%; background: #1DA851; border-radius: inherit; transition: width .35s ease; }
.fb-list { list-style: none; margin: 0; padding: 4px; max-height: 420px; overflow: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.fb-list li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; }
.fb-list li .grow { min-width: 0; display: flex; flex-direction: column; }
.fb-list li b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-list li small { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fb-list li.next { background: #EFF6FF; }
.fb-list li.sent { opacity: .62; }
.fb-tip { font-size: 12.5px; }
@media (max-width: 760px) { .fb-grid { grid-template-columns: 1fr; } .fb-tip { display: none; } .fb-list { max-height: 260px; } }

/* ================= v14: ui cleanup ================= */
/* attention strip (replaces the two big banners) */
.attn { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 6px 8px 6px 12px; border: 1px solid #FDE68A; background: linear-gradient(90deg, #FFFBEB, #FFFFFF 70%); border-radius: 12px; font-size: 13px; }
.attn-t { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: #92400E; margin-right: 4px; }
.attn-i { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #FDE68A; background: #fff; border-radius: 999px; padding: 4px 6px 4px 11px; font: inherit; font-size: 13px; color: #78350F; cursor: pointer; }
.attn-i b { font-weight: 800; }
.attn-i span { background: #FEF3C7; color: #92400E; font-weight: 700; border-radius: 999px; padding: 2px 9px; font-size: 12px; }
.attn-i:hover { border-color: #F59E0B; }
.attn-i.dup { border-color: #DBEAFE; color: #1E3A8A; } .attn-i.dup span { background: #EFF6FF; color: #1D4ED8; } .attn-i.dup:hover { border-color: #2563EB; }

/* board fits more: narrower columns, empty columns fold to a slim rail */
.board, .board.compact { grid-auto-columns: auto; grid-template-columns: none; }
.board .col { width: 284px; }
.board.compact .col { width: 252px; }
.board .col.empty-col { width: 150px; }
.board .col.empty-col .col-empty, .board .col.empty-col .empty { font-size: 12px; }

/* compact cards */
.board.compact .lc2 { padding: 11px 12px 10px; gap: 7px; }
.board.compact .lc2 .lc-note, .board.compact .lc2 .lc-line { display: none; }
.board.compact .lc2 .lc-chips .chip:nth-child(n+3) { display: none; }
.board.compact .lc2 .lc-sub { font-size: 12px; }
.board.compact .lc2 .lc-foot .lc-ic, .board.compact .lc2 .lc-foot .lc-team { opacity: 0; transition: opacity .15s; }
.board.compact .lc2:hover .lc-foot .lc-ic, .board.compact .lc2:hover .lc-foot .lc-team, .board.compact .lc2:focus-within .lc-foot .lc-ic, .board.compact .lc2:focus-within .lc-foot .lc-team { opacity: 1; }
.lc-next { display: flex; gap: 6px; }
.lc-move { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px; height: 30px; border-radius: 9px; border: 1px solid #BFDBFE; background: #EFF6FF; color: #1D4ED8; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.lc-move:hover { background: #2563EB; border-color: #2563EB; color: #fff; }
.lc-move.no { flex: 0 0 auto; padding: 0 11px; border-color: var(--line); background: #fff; color: var(--muted); font-weight: 600; }
.lc-move.no:hover { background: #F8FAFC; color: var(--ink); border-color: #CBD5E1; }
.dense-btn[aria-pressed="true"] { color: #1D4ED8; border-color: #BFDBFE; background: #EFF6FF; }

/* More menu */
.more-menu { position: relative; }
.more-menu > summary { list-style: none; cursor: pointer; }
.more-menu > summary::-webkit-details-marker { display: none; }
.more-menu[open] > summary { border-color: #93C5FD; background: #EFF6FF; color: #1D4ED8; }
.mm-pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 6px; box-shadow: 0 18px 40px -16px rgba(15, 23, 42, .35); display: grid; gap: 2px; }
.mm-pop button { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 9px 10px; border-radius: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; text-align: left; }
.mm-pop button:hover { background: #F1F5F9; }

/* priority: three levels you can read at a glance */
.prio.hot { background: linear-gradient(145deg, #F87171, #DC2626) !important; color: #fff !important; box-shadow: 0 6px 14px -6px rgba(220, 38, 38, .7) !important; }
.prio.warm { background: #FEF3C7 !important; color: #92400E !important; box-shadow: inset 0 0 0 1px #FDE68A !important; }
.prio.cool { background: #F1F5F9 !important; color: #64748B !important; box-shadow: inset 0 0 0 1px #E2E8F0 !important; }
.prio-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.prio-key i { width: 10px; height: 10px; border-radius: 3px; margin-left: 6px; display: inline-block; }
.prio-key i.hot { background: #DC2626; } .prio-key i.warm { background: #FCD34D; } .prio-key i.cool { background: #CBD5E1; }

/* lead trend bars */
.mbars rect { fill: #BFDBFE; transform-box: fill-box; transform-origin: 50% 100%; animation: mbIn .6s cubic-bezier(.2, .8, .2, 1) backwards; }
.mbars rect.now { fill: #2563EB; }
.mbars rect.zero { fill: #E2E8F0; }
.mbars rect:nth-child(odd) { animation-delay: .05s; }
@keyframes mbIn { from { transform: scaleY(0); } }
@media (prefers-reduced-motion: reduce) { .mbars rect { animation: none; } }

/* one badge rule: blue = new, amber = due today, red = overdue */
.nav-item .count.new { background: #2563EB !important; color: #fff !important; }
.nav-item .count.warn { background: #FEF3C7 !important; color: #92400E !important; }
.nav-item .count.late { background: #DC2626 !important; color: #fff !important; }
.nav-item.active .count.new { background: #1D4ED8 !important; }

/* drawer: next step under the name */
.dh-next { display: inline-flex; align-items: center; gap: 6px; margin-top: 9px; border: 1px solid #BFDBFE; background: #EFF6FF; color: #1D4ED8; border-radius: 999px; padding: 4px 11px; font: inherit; font-size: 12.5px; font-weight: 700; cursor: pointer; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dh-next.late { border-color: #FECACA; background: #FEF2F2; color: #B91C1C; }
.dh-next.none { border-style: dashed; background: #fff; color: var(--muted); font-weight: 600; }
@media (max-width: 760px) {
  .dw-acts { display: grid !important; grid-template-columns: 1fr 1fr 44px !important; gap: 8px !important; }
  .dw-acts > * { min-width: 0; }
  .dw-acts > :last-child { font-size: 0; padding: 0; gap: 0; }
  .dw-acts > :last-child svg { width: 18px; height: 18px; }
  .board .col, .board.compact .col { width: 82vw; }
  .board .col.empty-col { width: 46vw; }
  .attn { font-size: 12.5px; }
}
@media (max-width: 760px) {
  .stage-track { display: flex !important; overflow-x: auto; gap: 6px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); padding-bottom: 2px; }
  .stage-track::-webkit-scrollbar { display: none; }
  .stage-track button { flex: 0 0 auto; white-space: nowrap; padding: 0 12px; }
}

/* ================= WhatsApp AI ================= */
.ai-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.ai-stat { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; box-shadow: var(--shadow-sm); min-width: 0; }
.ai-stat-t { font-size: 12px; color: var(--muted); font-weight: 600; }
.ai-stat-s { font-size: 14px; font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-stat > div { min-width: 0; }
.ai-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: #CBD5E1; }
.ai-stat.on .ai-dot { background: #22C55E; box-shadow: 0 0 0 4px rgba(34, 197, 94, .16); }
.ai-stat.wait .ai-dot { background: #F59E0B; box-shadow: 0 0 0 4px rgba(245, 158, 11, .16); animation: ai-pulse 1.6s ease-in-out infinite; }
.ai-stat.bad .ai-dot { background: #EF4444; box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.ai-stat.mode { background: linear-gradient(135deg, #ECFDF5, #F0FDF4); border-color: #BBF7D0; }
@keyframes ai-pulse { 50% { opacity: .45; } }
.ai-banner { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 11px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--amber-bg); border: 1px solid var(--amber-line); color: var(--amber); font-size: 13px; }
.ai-banner span { flex: 1; min-width: 200px; }
.ai-banner code, .ai-notes code, .card code { background: rgba(15, 23, 42, .07); padding: 1px 6px; border-radius: 6px; font-family: var(--mono); font-size: 12px; color: var(--ink); }
.ai-qr { display: flex; gap: 24px; align-items: center; padding: 20px 22px; margin-bottom: 14px; flex-wrap: wrap; }
.ai-qr img { border-radius: 12px; border: 1px solid var(--line); background: #fff; padding: 8px; width: 240px; height: 240px; }
.ai-qr h2 { font-size: 17px; margin: 0 0 8px; }
.ai-qr ol { margin: 0 0 10px; padding-left: 20px; line-height: 1.9; }
.ai-qr p { margin: 0; font-size: 13px; }

.ai-inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); height: calc(100vh - 290px); min-height: 480px; overflow: hidden; }
.ai-side { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.ai-search { position: relative; padding: 12px; border-bottom: 1px solid var(--line-2); }
.ai-search svg { position: absolute; left: 24px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.ai-search input { width: 100%; min-height: 38px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px 0 36px; font: inherit; font-size: 14px; background: var(--surface-2); }
.ai-list { list-style: none; margin: 0; padding: 6px; overflow-y: auto; flex: 1; }
.ai-item { display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px; border-radius: 10px; cursor: pointer; font: inherit; color: inherit; }
.ai-item:hover { background: var(--line-2); }
.ai-item.on { background: #ECFDF5; box-shadow: inset 3px 0 0 #22C55E; }
.ai-item .grow { min-width: 0; flex: 1; }
.ai-item-top { display: flex; justify-content: space-between; gap: 8px; }
.ai-item-top b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-item-top time { font-size: 11px; color: var(--muted); flex: none; }
.ai-item-sub { display: flex; align-items: center; gap: 6px; margin-top: 2px; }
.ai-last { flex: 1; min-width: 0; font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-unread { background: #22C55E; color: #fff; font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; border-radius: 10px; display: inline-grid; place-items: center; padding: 0 6px; }
.ai-flag { font-size: 10.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.ai-flag.off { background: var(--line-2); color: var(--muted); }
.ai-flag.pause { background: var(--amber-bg); color: var(--amber); }

.ai-thread { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #F4F1EA; background-image: radial-gradient(rgba(15, 23, 42, .045) 1px, transparent 1px); background-size: 18px 18px; }
.ai-pick { margin: auto; max-width: 340px; }
.ai-pick svg { color: #22C55E; }
.ai-thead { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ai-thead .grow { min-width: 140px; }
.ai-thead .title { font-weight: 700; }
.ai-thead .sub { font-size: 12.5px; color: var(--muted); }
.ai-tools { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.ai-back { display: none; transform: rotate(180deg); }
.ai-msgs { flex: 1; overflow-y: auto; padding: 18px 6% 10px; display: flex; flex-direction: column; gap: 6px; }
.ai-day { align-self: center; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: rgba(255, 255, 255, .92); padding: 4px 12px; border-radius: 8px; margin: 10px 0 4px; box-shadow: var(--shadow-sm); }
.ai-msg { max-width: min(560px, 78%); padding: 7px 11px 6px; border-radius: 12px; box-shadow: 0 1px 1px rgba(15, 23, 42, .08); font-size: 14px; line-height: 1.45; word-wrap: break-word; }
.ai-msg.in { align-self: flex-start; background: #fff; border-top-left-radius: 4px; }
.ai-msg.out { align-self: flex-end; background: #D9FDD3; border-top-right-radius: 4px; }
.ai-msg.out.by-ai { background: #E0F2FE; }
.ai-msg.out.by-greeting { background: #EDE9FE; }
.ai-who { font-size: 11px; font-weight: 700; color: #0369A1; margin-bottom: 2px; display: flex; align-items: center; gap: 4px; }
.ai-msg.by-human .ai-who, .ai-msg.by-phone .ai-who { color: #15803D; }
.ai-msg.by-greeting .ai-who { color: var(--violet); }
.ai-meta { font-size: 11px; color: var(--muted); text-align: right; margin-top: 2px; }
.ai-meta a { font-size: 11px; }
.ai-fail { color: var(--red); font-weight: 700; }
.ai-msg.draft { background: #FFFBEB; border: 1.5px dashed #F59E0B; width: min(560px, 78%); }
.ai-msg.draft .ai-who { color: var(--amber); }
.ai-msg.draft textarea { width: 100%; border: 1px solid var(--amber-line); border-radius: 8px; padding: 8px 10px; font: inherit; font-size: 14px; line-height: 1.45; background: #fff; resize: vertical; }
.ai-draft-btns { display: flex; gap: 6px; justify-content: flex-end; margin-top: 6px; }
.ai-compose { display: flex; gap: 8px; align-items: flex-end; padding: 10px 12px; background: var(--surface); border-top: 1px solid var(--line); }
.ai-compose textarea { flex: 1; resize: none; min-height: 42px; max-height: 168px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.4; }
.ai-compose textarea:focus { outline: none; border-color: #22C55E; box-shadow: 0 0 0 3px rgba(34, 197, 94, .15); }
.ai-compose .btn { min-height: 42px; }

.ai-settings .ai-hint { font-size: 12px; margin-top: -8px; }
.ai-notes p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.55; }
.ai-save { grid-column: 1 / -1; display: flex; justify-content: flex-end; position: sticky; bottom: 12px; }
.ai-save .btn { box-shadow: var(--shadow); min-width: 160px; }

@media (max-width: 1100px) { .ai-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .ai-inbox { grid-template-columns: 1fr; height: calc(100vh - 230px); }
  .ai-inbox.has-chat .ai-side { display: none; }
  .ai-inbox:not(.has-chat) .ai-thread { display: none; }
  .ai-back { display: inline-flex; }
  .ai-msgs { padding: 14px 10px; }
  .ai-msg, .ai-msg.draft { max-width: 88%; }
  .ai-msg.draft { width: 88%; }
}

/* WhatsApp follow-up campaigns */
.ai-camp-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
.ai-camp-grid .ai-safety { grid-column: 2; }
.ai-fs { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ai-fs legend { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; padding: 0; }
.ai-chk { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; background: var(--surface); }
.ai-chk:has(input:checked) { background: #ECFDF5; border-color: #86EFAC; color: #166534; }
.ai-chk small { color: var(--muted); font-weight: 500; }
.ai-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ai-aud { background: #ECFDF5; border: 1px solid #BBF7D0; color: #14532D; border-radius: 12px; padding: 12px 14px; font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.ai-aud span { font-size: 12.5px; color: #3F6212; }
.ai-aud.none { background: var(--line-2); border-color: var(--line); color: var(--muted); }
.ai-warns { display: flex; flex-direction: column; gap: 6px; }
.ai-warn { display: flex; gap: 8px; align-items: flex-start; font-size: 12.5px; padding: 8px 10px; border-radius: 10px; background: var(--amber-bg); color: var(--amber); border: 1px solid var(--amber-line); }
.ai-warn.bad { background: var(--red-bg); color: var(--red); border-color: #F3C6C0; }
.ai-warn svg { flex: none; margin-top: 1px; }
.ai-camp-list { list-style: none; margin: 0; padding: 0; }
.ai-camp { padding: 14px 20px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 8px; }
.ai-camp:last-child { border-bottom: 0; }
.ai-camp-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ai-bar { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; }
.ai-bar span { display: block; height: 100%; background: linear-gradient(90deg, #4ADE80, #16A34A); border-radius: 99px; transition: width .4s ease; }
.ai-camp-stats { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--muted); }
.ai-camp-stats b { color: var(--ink); }
.ai-camp-btns { display: flex; gap: 6px; flex-wrap: wrap; }
.ai-targets { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; border: 1px solid var(--line-2); border-radius: 10px; }
.ai-targets li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 7px 12px; font-size: 13px; border-bottom: 1px solid var(--line-2); }
.ai-targets li:last-child { border-bottom: 0; }
.ai-targets small { flex-basis: 100%; }
.ai-t { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--line-2); color: var(--muted); }
.ai-t.sent { background: #DBEAFE; color: #1D4ED8; }
.ai-t.replied { background: #DCFCE7; color: #166534; }
.ai-t.opted_out, .ai-t.failed { background: var(--red-bg); color: var(--red); }
.ai-t.sending { background: var(--amber-bg); color: var(--amber); }
.ai-msg.out.by-campaign { background: #FEF9C3; }
.ai-msg.by-campaign .ai-who { color: #A16207; }
@media (max-width: 1100px) { .ai-camp-grid { grid-template-columns: 1fr; } .ai-camp-grid .ai-safety { grid-column: auto; } }
@media (max-width: 600px) { .ai-row { grid-template-columns: 1fr; } }

/* WhatsApp follow-ups on the calendar */
.cal-tag.wa { background: #DCFCE7; color: #166534; display: inline-flex; align-items: center; gap: 3px; }
.cal-tag.wa.done { background: #E0F2FE; color: #075985; }
.cal-legend .lg-wa { background: #22C55E; }
.cs-wa-note { font-size: 12px; margin: -2px 0 8px; line-height: 1.45; }

/* ================= v3: scores, site visits, plot photos ================= */
.score { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; flex: none; }
.score.hot { background: linear-gradient(135deg, #FEE2E2, #FFEDD5); color: #C2410C; box-shadow: inset 0 0 0 1px #FDBA74; }
.score.warm { background: #FEF9C3; color: #A16207; box-shadow: inset 0 0 0 1px #FDE68A; }
.score.cold { background: #EFF6FF; color: #1E40AF; box-shadow: inset 0 0 0 1px #BFDBFE; }
.score.big { font-size: 12px; padding: 3px 10px; }
.lc-top .score { margin-left: auto; align-self: flex-start; }
.score-why { font-size: 12px; color: var(--muted); margin-top: 8px; line-height: 1.45; }
.score-why b { color: var(--ink-2); }

.vz-card { display: flex; flex-direction: column; gap: 12px; }
.vz-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.vz { display: flex; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.vz.scheduled { border-color: #A7F3D0; background: linear-gradient(135deg, #F0FDF4, #FFFFFF); }
.vz.cancelled, .vz.no_show { opacity: .7; }
.vz-when { display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 74px; padding: 6px 8px; border-radius: 10px; background: #fff; box-shadow: var(--shadow-sm); text-align: center; }
.vz-when b { font-size: 12.5px; }
.vz-when span { font-size: 15px; font-weight: 800; color: #15803D; }
.vz-title { font-weight: 700; font-size: 14px; }
.vz-sub { font-size: 12px; display: block; margin-top: 2px; }
.vz-ticks { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 6px; }
.vz-tick { font-size: 11.5px; color: var(--muted); }
.vz-tick.on { color: #15803D; font-weight: 600; }
.vz-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.cal-ev.visit { background: #DCFCE7; color: #166534; border-left-color: #22C55E; cursor: pointer; }
.cal-ev.visit.done { background: #E0F2FE; color: #075985; }
.cal-ev.visit.no_show { background: var(--red-bg); color: var(--red); }

.pl-photos { display: flex; flex-wrap: wrap; gap: 8px; }
.pl-ph { position: relative; width: 84px; height: 64px; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow-sm); }
.pl-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-ph button { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: rgba(15, 23, 42, .7); color: #fff; display: grid; place-items: center; cursor: pointer; }
.pl-ph:first-child::after { content: "Cover"; position: absolute; left: 4px; bottom: 4px; font-size: 9.5px; font-weight: 700; background: rgba(255, 255, 255, .9); color: var(--ink); padding: 1px 5px; border-radius: 5px; }
.pl-add { width: 84px; height: 64px; border-radius: 10px; border: 1.5px dashed #94A3B8; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 600; color: var(--muted); cursor: pointer; background: var(--surface-2); }
.pl-add:hover { border-color: var(--brand); color: var(--brand); }
.plot-map.has-photo { background-size: cover; background-position: center; }
.plot-map.has-photo::before { display: none; }
.plot-map.has-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 23, 42, 0) 45%, rgba(15, 23, 42, .55)); }
.plot-size-tag { position: absolute; left: 12px; bottom: 10px; z-index: 1; color: #fff; font-weight: 800; font-size: 18px; text-shadow: 0 1px 4px rgba(0, 0, 0, .4); }
.plot-ph-count { position: absolute; right: 10px; bottom: 10px; z-index: 1; display: inline-flex; align-items: center; gap: 4px; font-size: 11px; font-weight: 700; color: #fff; background: rgba(15, 23, 42, .55); padding: 2px 8px; border-radius: 99px; }
.plot-map .pill { z-index: 1; }
.ai-team { display: flex; flex-wrap: wrap; gap: 6px; }

/* ================= v15: landing sign-in ================= */
.lp { min-height: 100vh; background: #F7F8FA; color: var(--ink); }
.lp-hero {
  position: relative; color: #E2E8F0; padding: 0 24px 72px;
  background:
    linear-gradient(90deg, rgba(148, 163, 184, .07) 1px, transparent 1px) 0 0 / 96px 96px,
    linear-gradient(0deg, rgba(148, 163, 184, .07) 1px, transparent 1px) 0 0 / 96px 96px,
    radial-gradient(900px 520px at 88% 0%, rgba(37, 99, 235, .45), transparent 60%),
    #0B1730;
}
.lp-top { max-width: 1160px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 22px 0; }
.lp-brand { display: flex; align-items: center; gap: 12px; }
.lp-brand b { display: block; font-family: var(--display); font-weight: 800; font-size: 17px; color: #fff; }
.lp-brand small { display: block; font-size: 12.5px; color: #93C5FD; }
.lp-top-btn { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .3); border-radius: 10px; padding: 9px 16px; font: 600 14px var(--font); cursor: pointer; }
.lp-top-btn:hover { background: rgba(255, 255, 255, .08); }
.lp-top-btn:focus-visible, .lp a:focus-visible { outline: 2px solid #93C5FD; outline-offset: 2px; }
.lp-hero-grid { max-width: 1160px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 420px); gap: 64px; align-items: center; padding-top: 40px; }
.lp-pitch h1 { font-size: clamp(34px, 4.6vw, 54px); line-height: 1.06; color: #fff; letter-spacing: -0.025em; max-width: 13ch; }
.lp-lede { font-size: 18px; line-height: 1.55; color: #CBD5E1; max-width: 52ch; margin: 22px 0 28px; }
.lp-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.lp-points li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; color: #E2E8F0; }
.lp-points svg { flex: none; color: #0B1730; background: #60A5FA; border-radius: 50%; padding: 3px; width: 21px; height: 21px; }
.lp-card { background: #fff; color: var(--ink); border-radius: 20px; padding: 30px; box-shadow: 0 30px 70px -25px rgba(0, 0, 0, .55); scroll-margin-top: 24px; }
.lp-form { display: flex; flex-direction: column; gap: 14px; }
.lp-form h2 { font-size: 22px; }
.lp-form p.muted { margin: 6px 0 0; font-size: 14px; }
.lp-form .btn.primary { min-height: 48px; font-size: 15px; }
.lp-links { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; color: var(--muted); }
.lp-feats, .lp-steps { max-width: 1160px; margin: 0 auto; padding: 72px 24px 0; }
.lp-feats > h2, .lp-steps > h2 { font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -0.015em; max-width: 24ch; margin-bottom: 28px; }
.lp-feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.lp-feat { padding: 26px 26px 28px 0; border-bottom: 1px solid var(--line); }
.lp-feat:not(:nth-child(3n + 1)) { padding-left: 26px; border-left: 1px solid var(--line); }
.lp-ic { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; background: var(--brand-50); color: var(--brand); margin-bottom: 14px; }
.lp-feat h3 { font-size: 16.5px; margin-bottom: 6px; }
.lp-feat p { margin: 0; color: var(--ink-2); font-size: 14.5px; line-height: 1.55; max-width: 38ch; }
.lp-steps ol { list-style: none; counter-reset: s; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.lp-steps li { counter-increment: s; background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 22px; display: flex; flex-direction: column; gap: 6px; }
.lp-steps li::before { content: counter(s); font: 800 15px var(--display); color: #fff; background: var(--brand); width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 8px; }
.lp-steps li b { font-size: 16px; }
.lp-steps li span { color: var(--ink-2); font-size: 14.5px; line-height: 1.5; }
.lp-foot { max-width: 1160px; margin: 0 auto; padding: 56px 24px 40px; color: var(--muted); font-size: 13px; }
@media (max-width: 900px) {
  .lp-hero { padding: 0 16px 48px; }
  .lp-top { padding: 16px 0; }
  .lp-hero-grid { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; }
  .lp-lede { font-size: 16.5px; margin: 16px 0 20px; }
  .lp-card { padding: 22px; }
  .lp-feats, .lp-steps { padding: 52px 16px 0; }
  .lp-feat-grid { grid-template-columns: 1fr 1fr; }
  .lp-feat, .lp-feat:not(:nth-child(3n + 1)) { padding: 22px 18px 22px 0; border-left: 0; }
  .lp-feat:nth-child(2n) { padding-left: 18px; border-left: 1px solid var(--line); }
  .lp-steps ol { grid-template-columns: 1fr; gap: 12px; }
  .lp-foot { padding: 40px 16px 32px; }
}
@media (max-width: 560px) {
  .lp-feat-grid { grid-template-columns: 1fr; }
  .lp-feat, .lp-feat:nth-child(2n) { padding: 20px 0; border-left: 0; }
  .lp-links { flex-direction: column; }
}
.lp-feats, .lp-steps, .lp-foot { max-width: calc(1160px + 48px); }
@media (min-width: 901px) { .lp-top-btn { display: none; } }
@media (max-width: 900px) { .lp-feats, .lp-steps, .lp-foot { max-width: none; } }
