:root,
html[data-theme="green"] {
  --bg: #e8efe9;
  --bg-soft: #dfe8e1;
  --surface: #ffffff;
  --ink: #12241b;
  --muted: #5d6f65;
  --brand: #0f3d2e;
  --brand-2: #1f6b4f;
  --brand-soft: #e6f3ec;
  --warn: #9a6700;
  --danger: #b42318;
  --line: #c5d3ca;
  --sidebar-bg: #0c3226;
  --sidebar-text: #d7ebe1;
  --sidebar-muted: #8fb8a6;
  --sidebar-section: #7fa894;
  --sidebar-active: rgba(61, 155, 116, .28);
  --sidebar-accent: #3d9b74;
  --logo-gradient: linear-gradient(145deg, #3d9b74, #1f6b4f);
  --hero-gradient: linear-gradient(135deg, #143f31 0%, #1f6b4f 55%, #2f8f68 100%);
  --welcome-gradient: linear-gradient(135deg, #1f6b4f, #0f3d2e 65%);
  --chart-gradient: linear-gradient(180deg, #3d9b74, #0f3d2e);
  --auth-gradient: linear-gradient(160deg, #0f3d2e 0%, #1f6b4f 42%, #e8efe9 42%);
  --hero-eyebrow: #b7e0cb;
  --card-border: rgba(15,61,46,.08);
  --card-shadow: 0 6px 16px rgba(15,61,46,.06);
  --empty-dash: #b7c8be;
  --col-leads: #eaf3ee;
  --col-follow: #eef4fb;
  --col-demo: #f8f1e8;
  --col-quote: #f4eef8;
  --col-won: #e8f7ef;
  --sidebar-w: 260px;
  --topbar-h: 58px;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(15, 61, 46, 0.08);
  --font: "Segoe UI", system-ui, -apple-system, sans-serif;
}

html[data-theme="blue"] {
  --bg: #f0f4f9;
  --bg-soft: #e4ebf5;
  --ink: #122033;
  --muted: #5b6b7c;
  --brand: #1d4ed8;
  --brand-2: #2563eb;
  --brand-soft: #dbeafe;
  --line: #c9d5e5;
  --sidebar-bg: #0f2744;
  --sidebar-text: #d7e6f8;
  --sidebar-muted: #8fb0d6;
  --sidebar-section: #7fa3c8;
  --sidebar-active: rgba(37, 99, 235, .32);
  --sidebar-accent: #60a5fa;
  --logo-gradient: linear-gradient(145deg, #60a5fa, #2563eb);
  --hero-gradient: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
  --welcome-gradient: linear-gradient(135deg, #2563eb, #1d4ed8 65%);
  --chart-gradient: linear-gradient(180deg, #60a5fa, #1d4ed8);
  --auth-gradient: linear-gradient(160deg, #1e3a8a 0%, #2563eb 42%, #f0f4f9 42%);
  --hero-eyebrow: #bfdbfe;
  --card-border: rgba(29,78,216,.08);
  --card-shadow: 0 6px 16px rgba(29,78,216,.06);
  --empty-dash: #b7c5d8;
  --col-leads: #eaf1fb;
  --col-follow: #eef4fb;
  --col-demo: #f8f1e8;
  --col-quote: #f4eef8;
  --col-won: #e8f4ff;
  --shadow: 0 8px 24px rgba(29, 78, 216, 0.08);
}

html[data-theme="teal"] {
  --bg: #eef8f6;
  --bg-soft: #dcefec;
  --ink: #134e4a;
  --muted: #5f7a76;
  --brand: #0f766e;
  --brand-2: #0d9488;
  --brand-soft: #ccfbf1;
  --line: #c5ddd8;
  --sidebar-bg: #134e4a;
  --sidebar-text: #d5f5f0;
  --sidebar-muted: #8fc9c0;
  --sidebar-section: #7eb8ae;
  --sidebar-active: rgba(45, 212, 191, .25);
  --sidebar-accent: #2dd4bf;
  --logo-gradient: linear-gradient(145deg, #2dd4bf, #0f766e);
  --hero-gradient: linear-gradient(135deg, #115e59 0%, #0f766e 55%, #14b8a6 100%);
  --welcome-gradient: linear-gradient(135deg, #0d9488, #0f766e 65%);
  --chart-gradient: linear-gradient(180deg, #2dd4bf, #0f766e);
  --auth-gradient: linear-gradient(160deg, #134e4a 0%, #0f766e 42%, #eef8f6 42%);
  --hero-eyebrow: #99f6e4;
  --card-border: rgba(15,118,110,.1);
  --card-shadow: 0 6px 16px rgba(15,118,110,.08);
  --empty-dash: #b5d4ce;
  --col-leads: #e6f7f4;
  --col-follow: #eef4fb;
  --col-demo: #f8f1e8;
  --col-quote: #f4eef8;
  --col-won: #dcfaf4;
  --shadow: 0 8px 24px rgba(15, 118, 110, 0.08);
}

html[data-theme="slate"] {
  --bg: #f1f5f9;
  --bg-soft: #e2e8f0;
  --ink: #0f172a;
  --muted: #64748b;
  --brand: #334155;
  --brand-2: #475569;
  --brand-soft: #e2e8f0;
  --line: #cbd5e1;
  --sidebar-bg: #0f172a;
  --sidebar-text: #e2e8f0;
  --sidebar-muted: #94a3b8;
  --sidebar-section: #7c8ca2;
  --sidebar-active: rgba(148, 163, 184, .22);
  --sidebar-accent: #94a3b8;
  --logo-gradient: linear-gradient(145deg, #64748b, #334155);
  --hero-gradient: linear-gradient(135deg, #0f172a 0%, #334155 55%, #64748b 100%);
  --welcome-gradient: linear-gradient(135deg, #475569, #1e293b 65%);
  --chart-gradient: linear-gradient(180deg, #94a3b8, #334155);
  --auth-gradient: linear-gradient(160deg, #0f172a 0%, #334155 42%, #f1f5f9 42%);
  --hero-eyebrow: #cbd5e1;
  --card-border: rgba(15,23,42,.08);
  --card-shadow: 0 6px 16px rgba(15,23,42,.06);
  --empty-dash: #b6c2d0;
  --col-leads: #eef2f7;
  --col-follow: #eef4fb;
  --col-demo: #f8f1e8;
  --col-quote: #f4eef8;
  --col-won: #e8edf4;
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

html[data-theme="sunset"] {
  --bg: #faf4ef;
  --bg-soft: #f0e4d8;
  --ink: #431407;
  --muted: #7c5a48;
  --brand: #c2410c;
  --brand-2: #ea580c;
  --brand-soft: #ffedd5;
  --line: #e7d2c0;
  --sidebar-bg: #7c2d12;
  --sidebar-text: #ffedd5;
  --sidebar-muted: #fdba74;
  --sidebar-section: #f0ab7a;
  --sidebar-active: rgba(251, 146, 60, .28);
  --sidebar-accent: #fb923c;
  --logo-gradient: linear-gradient(145deg, #fb923c, #c2410c);
  --hero-gradient: linear-gradient(135deg, #7c2d12 0%, #c2410c 55%, #ea580c 100%);
  --welcome-gradient: linear-gradient(135deg, #ea580c, #9a3412 65%);
  --chart-gradient: linear-gradient(180deg, #fb923c, #c2410c);
  --auth-gradient: linear-gradient(160deg, #7c2d12 0%, #c2410c 42%, #faf4ef 42%);
  --hero-eyebrow: #fed7aa;
  --card-border: rgba(194,65,12,.1);
  --card-shadow: 0 6px 16px rgba(194,65,12,.08);
  --empty-dash: #d9c0ad;
  --col-leads: #fff4eb;
  --col-follow: #eef4fb;
  --col-demo: #f8f1e8;
  --col-quote: #f4eef8;
  --col-won: #ffedd5;
  --shadow: 0 8px 24px rgba(194, 65, 12, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.app-shell {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
}

a { color: var(--brand-2); text-decoration: none; }
h1 { margin: 0; font-size: 1.4rem; }
.muted { color: var(--muted); font-size: .9rem; }
.empty { color: var(--muted); padding: .75rem 0; }
.hidden { display: none !important; }
.eyebrow {
  margin: 0 0 .2rem; text-transform: uppercase; letter-spacing: .08em;
  font-size: .72rem; font-weight: 800; color: var(--brand-2);
}

/* Sidebar */
.sidebar {
  position: fixed; top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--sidebar-bg);
  color: var(--sidebar-text);
  z-index: 50;
  display: flex; flex-direction: column;
  transform: translateX(-105%);
  transition: transform .22s ease;
  box-shadow: 8px 0 30px rgba(0,0,0,.18);
}
.sidebar.open { transform: translateX(0); }
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(8, 24, 18, .45); z-index: 45;
}
.sidebar-brand {
  display: flex; gap: .75rem; align-items: center;
  padding: 1.1rem 1.15rem; border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand > div { flex: 1; min-width: 0; }
.sidebar-close {
  flex: 0 0 auto;
  width: 34px; height: 34px;
  border: 0; border-radius: 10px;
  background: rgba(255,255,255,.1);
  color: #fff; font-size: 1.25rem; line-height: 1;
  cursor: pointer;
}
.sidebar-close:hover { background: rgba(255,255,255,.18); }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: var(--logo-gradient);
  color: #fff; display: grid; place-items: center; font-weight: 800;
  flex: 0 0 auto;
}
.logo-text { font-weight: 800; color: #fff; line-height: 1.1; }
.logo-sub { font-size: .72rem; color: var(--sidebar-muted); }
.sidebar-nav {
  display: flex; flex-direction: column; gap: .2rem;
  padding: .85rem .7rem; flex: 1; overflow-y: auto;
}
.nav-section {
  margin: .75rem .55rem .35rem;
  font-size: .68rem; text-transform: uppercase; letter-spacing: .08em;
  color: var(--sidebar-section); font-weight: 700;
}
.sidebar-nav a {
  display: block; padding: .78rem .85rem; border-radius: 10px;
  color: var(--sidebar-text); font-weight: 650; font-size: .92rem;
}
.sidebar-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.active {
  background: var(--sidebar-active);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--sidebar-accent);
}
.sidebar-nav a.nav-danger { color: #f3a6a0; margin-top: .5rem; }
.sidebar-footer {
  display: flex; gap: .65rem; align-items: center;
  padding: .9rem 1rem; border-top: 1px solid rgba(255,255,255,.08);
}
.sidebar-footer .user-avatar {
  width: 34px; height: 34px; border-radius: 999px;
  background: var(--sidebar-accent); color: #fff; display: grid; place-items: center;
  font-size: .75rem; font-weight: 800;
}
.sidebar-footer .user-name { color: #fff; font-weight: 700; font-size: .9rem; }
.sidebar-footer .muted { color: var(--sidebar-muted); font-size: .75rem; }

.hamburger {
  display: inline-flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: 0;
}
.hamburger span {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.hamburger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger.is-open span:nth-child(2) {
  opacity: 0;
}
.hamburger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}
.shell-main {
  min-width: 0;
  min-height: 100vh;
  transition: margin-left .22s ease;
}

.topbar {
  position: sticky; top: 0; z-index: 30;
  min-height: var(--topbar-h);
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; padding: 0 .9rem;
  background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: .55rem; }
.brand-mobile { font-weight: 800; color: var(--brand); }
.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 1.15rem;
}
.topbar-date {
  display: none; font-size: .85rem; color: var(--muted);
  border: 1px solid var(--line); border-radius: 999px; padding: .4rem .75rem; background: #fff;
}
.user-menu .user-avatar {
  width: 34px; height: 34px; border-radius: 999px; background: var(--brand);
  color: #fff; display: grid; place-items: center; font-size: .72rem; font-weight: 800;
}

.page { max-width: 1200px; margin: 0 auto; padding: 1rem; }
.page-kanban { max-width: none; padding-bottom: 2rem; }
.stack { display: flex; flex-direction: column; gap: .75rem; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }

.flash {
  margin: .75rem 1rem 0; padding: .75rem 1rem; border-radius: 12px; font-size: .92rem;
}
.flash-success { background: var(--brand-soft); color: var(--brand); }
.flash-error { background: #fde2e2; color: #9b1c1c; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 42px; padding: .5rem 1rem; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 700; cursor: pointer; font-size: .9rem;
}
.btn-sm { min-height: 36px; padding: .3rem .7rem; font-size: .8rem; }
.btn-block { width: 100%; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn-light { background: rgba(255,255,255,.18); border-color: rgba(255,255,255,.35); color: #fff; }
.btn-wa { background: #128C7E; border-color: #128C7E; color: #fff; }
.btn-danger { background: #fff5f5; border-color: #f0b4b4; color: var(--danger); }

label { display: flex; flex-direction: column; gap: .35rem; font-weight: 700; font-size: .82rem; }
input, select, textarea {
  font: inherit; font-weight: 500; min-height: 44px; padding: .55rem .75rem;
  border: 1px solid var(--line); border-radius: 11px; background: #fff; color: var(--ink);
}
textarea { min-height: 100px; resize: vertical; }
.check, .radio { flex-direction: row; align-items: center; font-weight: 500; gap: .55rem; }
.check input, .radio input { width: auto; min-height: auto; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem; }

.form-card, .card-block, .ad-card, .timeline-item, .panel, .lead-row {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .9rem; box-shadow: var(--shadow);
}
.list { display: flex; flex-direction: column; gap: .55rem; }
.lead-row { display: block; color: inherit; }
.lead-main { display: flex; flex-direction: column; gap: .15rem; }
.lead-meta { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.pill {
  display: inline-flex; align-items: center; padding: .15rem .5rem;
  border-radius: 999px; background: var(--brand); color: #fff; font-size: .7rem; font-weight: 800;
}
.pill.soft { background: var(--brand-soft); color: var(--brand); }
.pill.warn { background: #f7e7c8; color: var(--warn); }

.big-phone { font-size: 1.5rem; font-weight: 800; margin: 0 0 .35rem; }
.action-bar, .row-actions, .stats-row, .quick-filters, .filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.sticky-actions {
  position: sticky; bottom: 12px; z-index: 15;
  background: rgba(232,239,233,.94); backdrop-filter: blur(8px);
  padding: .5rem; border-radius: 12px;
}
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: .35rem .75rem;
  border-radius: 999px; background: #fff; border: 1px solid var(--line);
  color: var(--ink); font-size: .85rem; font-weight: 700;
}
.filter-sheet {
  display: none; flex-direction: column; gap: .65rem;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem; box-shadow: var(--shadow);
}
.filter-sheet.open { display: flex; }

.leads-search-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  padding: .65rem .75rem;
  background: var(--card, #fff);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
}
.leads-search-field {
  flex: 1;
  min-width: min(100%, 220px);
  margin: 0;
}
.leads-search-field input {
  width: 100%;
}
.pipeline-hero-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.menu-list { display: flex; flex-direction: column; gap: .5rem; }
.menu-list a {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem; font-weight: 700; color: var(--ink); box-shadow: var(--shadow);
}
.menu-list a.danger { color: var(--danger); }

.welcome-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  background: var(--welcome-gradient);
  color: #fff; border-radius: 16px; padding: 1.15rem 1.25rem; box-shadow: var(--shadow);
}
.welcome-banner h1 { color: #fff; }
.welcome-banner p { margin: .25rem 0 0; opacity: .9; }

.metric-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
.metric-card {
  display: flex; align-items: center; gap: .75rem; min-height: 78px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: .9rem; box-shadow: var(--shadow); color: inherit;
}
.metric-icon {
  width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; font-weight: 800;
}
.metric-icon.blue { background: #dbeafe; color: #1d4ed8; }
.metric-icon.teal { background: #d1fae5; color: #047857; }
.metric-icon.amber { background: #ffedd5; color: #c2410c; }
.metric-icon.gray { background: #e5ebe7; color: #4b5563; }
.metric-icon.green { background: var(--brand-soft); color: var(--brand); }
.metric-icon.red { background: #fee2e2; color: #b91c1c; }
.metric-label { font-size: .75rem; color: var(--muted); font-weight: 700; }
.metric-value { font-size: 1.25rem; font-weight: 800; }

.panel { padding: 1rem; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: .85rem; }
.panel-head h2 { margin: 0; font-size: 1.05rem; }
.chart-bars {
  display: flex; align-items: flex-end; gap: 3px; height: 170px;
  padding-top: .5rem; border-top: 1px solid var(--line);
}
.chart-col {
  flex: 1; height: 100%; display: flex; flex-direction: column;
  justify-content: flex-end; align-items: center; gap: .25rem;
}
.chart-bar {
  width: 100%; max-width: 14px; border-radius: 4px 4px 0 0;
  background: var(--chart-gradient);
}
.chart-label { font-size: .62rem; color: var(--muted); }
.muted-label { height: .75rem; }

.timeline-head { display: flex; justify-content: space-between; gap: .5rem; }
.voice-box { border: 1px dashed var(--line); border-radius: 12px; padding: .75rem; background: #f7fbf8; }
.picked-list { background: var(--bg-soft); border-radius: 10px; padding: .6rem; font-size: .85rem; }
.inline-edit { display: flex; gap: .5rem; align-items: center; margin-bottom: .5rem; }
.inline-edit input { flex: 1; }
audio { width: 100%; margin-top: .5rem; }
.review-list { margin-top: .75rem; padding-top: .65rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.review-label { margin: 0; font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.review-item { background: var(--brand-soft); border-radius: 10px; padding: .55rem .7rem; }
.review-form { margin-top: .75rem; display: flex; flex-direction: column; gap: .45rem; }

/* Pipeline / Kanban */
.pipeline { display: flex; flex-direction: column; gap: .9rem; }
.pipeline-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap;
  background: var(--hero-gradient);
  color: #fff; border-radius: 18px; padding: 1.2rem 1.25rem; box-shadow: var(--shadow);
}
.pipeline-hero h1 { color: #fff; font-size: 1.55rem; }
.pipeline-hero .muted { color: rgba(255,255,255,.82); }
.pipeline-hero .eyebrow { color: var(--hero-eyebrow); }

.pipeline-filters {
  display: grid; grid-template-columns: 1fr; gap: .7rem;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: .9rem; box-shadow: var(--shadow);
}
.custom-dates { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.filter-actions { align-items: end; }

.kanban-stage-tabs {
  display: flex; gap: .4rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; padding: .15rem 0 .35rem;
  position: sticky; top: calc(var(--topbar-h) + 4px); z-index: 12;
  background: linear-gradient(180deg, var(--bg) 70%, transparent);
}
.kanban-stage-tabs::-webkit-scrollbar { display: none; }
.kanban-tab {
  flex: 0 0 auto; min-height: 44px; padding: .5rem .9rem; border-radius: 999px;
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 800; font-size: .78rem; display: inline-flex; align-items: center; gap: .35rem;
  white-space: nowrap;
}
.kanban-tab.active { background: var(--brand); border-color: var(--brand); color: #fff; }
.tab-count { background: rgba(0,0,0,.08); border-radius: 999px; padding: .05rem .4rem; font-size: .7rem; }
.kanban-tab.active .tab-count { background: rgba(255,255,255,.22); }

.kanban-board { display: block; }
.kanban-col {
  display: none; border-radius: 18px; padding: .7rem; min-height: 55vh;
  border: 1px solid transparent;
}
.kanban-col.active { display: block; }
.kanban-col.col-leads { background: var(--col-leads); }
.kanban-col.col-follow { background: var(--col-follow); }
.kanban-col.col-demo { background: var(--col-demo); }
.kanban-col.col-quote { background: var(--col-quote); }
.kanban-col.col-won { background: var(--col-won); }
.kanban-col.col-dnc { background: #fde8e8; }
.kanban-tab.tab-dnc.active { background: #b91c1c; border-color: #b91c1c; }

.kanban-col-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: .35rem .35rem .7rem;
}
.kanban-col-head h2 { margin: 0; font-size: 1rem; }
.col-sub { display: block; font-size: .72rem; color: var(--muted); margin-top: .1rem; }
.col-badge {
  min-width: 28px; height: 28px; border-radius: 999px; background: #fff;
  border: 1px solid var(--line); display: grid; place-items: center;
  font-size: .78rem; font-weight: 800;
}
.kanban-cards { display: flex; flex-direction: column; gap: .75rem; }
.kanban-card,
.kanban-empty {
  flex-shrink: 0;
}
.kanban-empty {
  border: 1px dashed var(--empty-dash); border-radius: 14px; padding: 1.35rem;
  text-align: center; color: var(--muted); background: rgba(255,255,255,.55);
}

.kanban-card {
  position: relative;
  display: flex;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, .06);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
  transition: transform .15s ease, box-shadow .15s ease;
}
.kanban-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(15, 23, 42, .1);
}
.kcard-accent {
  flex: 0 0 6px;
  background: var(--brand);
}
.kanban-card.stage-leads .kcard-accent { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.kanban-card.stage-follow_up .kcard-accent { background: linear-gradient(180deg, #38bdf8, #0284c7); }
.kanban-card.stage-demo_scheduled .kcard-accent { background: linear-gradient(180deg, #fbbf24, #d97706); }
.kanban-card.stage-quotation .kcard-accent { background: linear-gradient(180deg, #c084fc, #7c3aed); }
.kanban-card.stage-won .kcard-accent { background: linear-gradient(180deg, #4ade80, #16a34a); }

.kanban-card.stage-leads { background: linear-gradient(135deg, #fff 60%, #eff6ff); }
.kanban-card.stage-follow_up { background: linear-gradient(135deg, #fff 55%, #f0f9ff); }
.kanban-card.stage-demo_scheduled { background: linear-gradient(135deg, #fff 55%, #fffbeb); }
.kanban-card.stage-quotation { background: linear-gradient(135deg, #fff 55%, #faf5ff); }
.kanban-card.stage-won { background: linear-gradient(135deg, #fff 55%, #f0fdf4); }

.kcard-body {
  flex: 1;
  min-width: 0;
  padding: .85rem .9rem .9rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.kcard-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}
.kcard-ref {
  font-weight: 800;
  font-size: .92rem;
  color: var(--ink);
  letter-spacing: .01em;
  text-decoration: none;
}
.kcard-ref:hover { color: var(--brand); }
.kcard-avatar {
  flex: 0 0 auto;
  width: 30px; height: 30px;
  border-radius: 999px;
  display: grid; place-items: center;
  font-size: .68rem; font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
}
.kcard-phone {
  display: block;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--brand);
  text-decoration: none;
  letter-spacing: .01em;
}
.kcard-phone:hover { text-decoration: underline; }
.kcard-name {
  margin: 0;
  font-size: .86rem;
  color: var(--muted);
  font-weight: 600;
}
.kanban-card-compact .kcard-body {
  padding: .55rem .65rem .65rem;
  gap: .28rem;
}
.kanban-card-compact .kcard-phone {
  font-size: .88rem;
  font-weight: 700;
}
.kanban-card-compact .kcard-name {
  font-size: .76rem;
  line-height: 1.2;
}
.kcard-snippet {
  margin: 0;
  font-size: .72rem;
  color: var(--muted);
  font-style: italic;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kcard-loc {
  margin: 0;
  font-size: .7rem;
  color: var(--muted);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kcard-top-meta {
  display: flex;
  align-items: center;
  gap: .2rem;
  flex-shrink: 0;
}
.kcard-signal {
  font-size: .95rem;
  line-height: 1;
}
.kanban-card-compact .kcard-chips { gap: .25rem; }
.kanban-card-compact .kchip { font-size: .65rem; padding: .12rem .35rem; }
.kanban-card-compact .kanban-move { margin-top: .1rem; }
.kanban-card-compact .kcard-move-label { font-size: .72rem; }
.kanban-card-compact .kanban-move select { font-size: .72rem; padding: .2rem .35rem; }
.kanban-card-compact .kanban-card-actions { gap: .25rem; margin-top: .15rem; }
.kanban-card-compact .kanban-card-actions .btn {
  padding: .22rem .4rem;
  font-size: .68rem;
  min-height: 0;
}

.follow-signal-box {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  padding: .75rem;
  background: var(--brand-soft, #f0fdf4);
}
.follow-signal-title { margin: 0 0 .5rem; font-size: .9rem; }
.follow-signal-options {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.follow-signal-opt {
  display: flex;
  align-items: center;
  gap: .45rem;
  cursor: pointer;
}
.follow-signal-opt input { accent-color: var(--brand); }
.follow-signal-pill {
  font-size: .88rem;
  padding: .35rem .55rem;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  flex: 1;
}
.follow-signal-pill.signal-green { border-color: #86efac; background: #f0fdf4; }
.follow-signal-pill.signal-orange { border-color: #fdba74; background: #fff7ed; }
.follow-signal-pill.signal-red { border-color: #fca5a5; background: #fef2f2; }

.kcard-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .1rem;
}
.kchip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  border-radius: 999px;
  padding: .28rem .55rem;
  font-size: .72rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
}
.kchip-ad {
  background: #1e3a8a;
  color: #fff;
}
.kchip-money {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #86efac;
}
.kchip-calls {
  background: #e0e7ff;
  color: #3730a3;
}
.kchip-new {
  background: #fce7f3;
  color: #9d174d;
}
.chip-overdue {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fca5a5;
  animation: pulseSoft 1.6s ease-in-out infinite;
}
.chip-today {
  background: #ffedd5;
  color: #c2410c;
  border: 1px solid #fdba74;
}
.chip-soon {
  background: #e0f2fe;
  color: #0369a1;
}
@keyframes pulseSoft {
  0%, 100% { opacity: 1; }
  50% { opacity: .72; }
}

.kcard-move-label {
  display: grid;
  gap: .25rem;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  margin: .15rem 0 0;
}
.kanban-move select {
  width: 100%;
  min-height: 38px;
  margin: 0;
  font-size: .82rem;
  font-weight: 700;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.9);
}

.kanban-card-actions {
  display: grid;
  grid-template-columns: 1.1fr .9fr .9fr;
  gap: .4rem;
  margin-top: .15rem;
}
.kanban-card-actions .btn {
  justify-content: center;
  font-weight: 800;
  border-radius: 10px;
}
.btn-call {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}
.btn-wa-mini {
  background: #ecfdf5;
  color: #047857;
  border-color: #a7f3d0;
}
.btn-log {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

body.auth-body {
  min-height: 100vh; display: grid; place-items: center; padding: 1rem;
  background: var(--auth-gradient);
  font-family: var(--font); color: var(--ink);
}
.auth-wrap { width: 100%; max-width: 400px; }
.auth-card {
  background: #fff; border-radius: 16px; padding: 1.35rem;
  box-shadow: var(--shadow); border: 1px solid var(--line);
}
.auth-title { margin: 0 0 .25rem; font-size: 1.55rem; color: var(--brand); }

/* macOS-style login desktop */
body.mac-desktop {
  --mac-font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI Variable", "Segoe UI", Inter, system-ui, sans-serif;
  position: relative; overflow: hidden;
  min-height: 100vh; min-height: 100dvh;
  padding: 3rem 1rem 6.5rem;
  font-family: var(--mac-font);
  background: radial-gradient(120% 120% at 20% 10%, var(--brand-2) 0%, var(--brand) 45%, #05140f 100%);
  -webkit-font-smoothing: antialiased;
}
.mac-wallpaper { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.mac-wallpaper::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at 50% 120%, rgba(255,255,255,.18), transparent 60%);
}
.mac-wallpaper .blob {
  position: absolute; border-radius: 50%; filter: blur(70px); opacity: .75;
  animation: macFloat 22s ease-in-out infinite alternate;
}
.blob-1 { width: 520px; height: 520px; left: -120px; top: -100px; background: var(--sidebar-accent); }
.blob-2 { width: 460px; height: 460px; right: -120px; top: 10%; background: #f5c26b; opacity: .45 !important; animation-delay: -6s !important; }
.blob-3 { width: 600px; height: 600px; left: 30%; bottom: -320px; background: var(--brand-2); animation-delay: -12s !important; }
.blob-4 { width: 340px; height: 340px; right: 18%; bottom: 8%; background: #8b5cf6; opacity: .35 !important; animation-delay: -3s !important; }
@keyframes macFloat {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(40px, -30px) scale(1.08); }
  100% { transform: translate(-30px, 25px) scale(.95); }
}

.mac-menubar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 5;
  height: 30px; padding: 0 .9rem;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .8rem; color: rgba(255,255,255,.95);
  background: rgba(20, 20, 20, .28);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.mac-menubar-left, .mac-menubar-right { display: flex; align-items: center; gap: 1.1rem; }
.mac-menubar strong { font-weight: 700; }
.mac-logo { display: inline-flex; }
.mac-menu-item { opacity: .9; cursor: default; }
.mac-clock { font-variant-numeric: tabular-nums; white-space: pre; }
.mac-battery {
  position: relative; width: 22px; height: 11px; border: 1.2px solid rgba(255,255,255,.85); border-radius: 3px;
}
.mac-battery::after {
  content: ""; position: absolute; right: -4px; top: 3px; width: 2px; height: 4px; border-radius: 0 1px 1px 0;
  background: rgba(255,255,255,.85);
}
.mac-battery i { position: absolute; inset: 1.5px; right: 5px; background: #fff; border-radius: 1px; }

.mac-flash { position: fixed; top: 42px; left: 50%; transform: translateX(-50%); z-index: 6; margin: 0; box-shadow: 0 10px 30px rgba(0,0,0,.2); }

body.mac-desktop .auth-wrap { position: relative; z-index: 2; max-width: 380px; }

.mac-window {
  border-radius: 14px; overflow: hidden;
  background: rgba(255, 255, 255, .72);
  backdrop-filter: blur(40px) saturate(180%); -webkit-backdrop-filter: blur(40px) saturate(180%);
  border: 1px solid rgba(255,255,255,.55);
  box-shadow:
    0 0 0 .5px rgba(0,0,0,.18),
    0 30px 80px rgba(0,0,0,.35),
    0 10px 24px rgba(0,0,0,.18),
    inset 0 1px 0 rgba(255,255,255,.7);
  animation: macOpen .45s cubic-bezier(.2,.9,.3,1.2) backwards;
  transform-origin: center;
  transition:
    transform .45s cubic-bezier(.4,0,.2,1),
    opacity .35s ease,
    visibility 0s linear 0s;
}
.mac-window.is-closed {
  opacity: 0; transform: scale(.88); visibility: hidden; pointer-events: none;
  transition: transform .22s ease-in, opacity .2s ease-in, visibility 0s linear .22s;
}
.mac-window.is-minimized {
  opacity: 0; visibility: hidden; pointer-events: none;
  transform: translate(var(--mac-dx, 0), var(--mac-dy, 60vh)) scale(.06, .04);
  transition: transform .5s cubic-bezier(.55,0,.75,.6), opacity .5s ease-in, visibility 0s linear .5s;
}

body.mac-desktop .auth-wrap { transition: max-width .4s cubic-bezier(.4,0,.2,1); }
body.mac-zoomed .auth-wrap { max-width: min(960px, calc(100vw - 2rem)); }
body.mac-zoomed .mac-window { border-radius: 12px; }
body.mac-zoomed .mac-window-body {
  min-height: calc(100dvh - 30px - 7.5rem - 38px);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
}
body.mac-zoomed .mac-window-body > * { width: 100%; max-width: 360px; }
body.mac-zoomed .mac-avatar { width: 96px; height: 96px; }

.mac-menubar strong { cursor: default; }
body.mac-window-hidden .mac-menubar strong { cursor: pointer; }
@keyframes macOpen {
  from { opacity: 0; transform: translateY(14px) scale(.96); }
  to   { opacity: 1; transform: none; }
}
.mac-titlebar {
  position: relative; height: 50px; display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,.06);
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.25));
}
.traffic-lights { position: absolute; left: 18px; display: flex; gap: 12px; }
.tl {
  width: 20px; height: 20px; border-radius: 50%; padding: 0; border: 0; cursor: pointer;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 .5px rgba(0,0,0,.18);
}
.tl svg { width: 13px; height: 13px; opacity: 0; transition: opacity .1s; }
.tl svg path { stroke: rgba(0,0,0,.6); stroke-width: 1.3; stroke-linecap: round; fill: none; }
.tl svg path.fill { stroke: none; fill: rgba(0,0,0,.6); }
.traffic-lights:hover .tl svg { opacity: 1; }
.tl:active { filter: brightness(.85); }
.tl:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 2px; }
.tl-close { background: #ff5f57; }
.tl-min   { background: #febc2e; }
.tl-max   { background: #28c840; }
.mac-titlebar-title { font-size: .78rem; font-weight: 600; color: rgba(0,0,0,.55); }

.mac-window-body { padding: 1.75rem 1.75rem 1.4rem; text-align: center; }
.mac-avatar {
  width: 76px; height: 76px; margin: 0 auto .9rem; border-radius: 50%;
  display: grid; place-items: center; color: #fff;
  background: var(--logo-gradient);
  box-shadow: 0 8px 22px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.35);
  border: 3px solid rgba(255,255,255,.85);
}
.mac-avatar.has-logo { width: 104px; height: 104px; background: #b91c1c; overflow: hidden; }
.mac-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mac-window .auth-title { font-size: 1.45rem; font-weight: 700; letter-spacing: -.01em; color: #1d1d1f; margin: 0; }
.mac-greeting {
  min-height: 2.1rem; display: flex; align-items: center; justify-content: center;
}
.mac-window .mac-greeting { font-size: 1.85rem; letter-spacing: .01em; }
.mac-greeting-text {
  white-space: nowrap;
  background: linear-gradient(90deg, #1d1d1f 0%, var(--brand-2) 35%, #b91c1c 55%, #1d1d1f 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  animation: macGreetShimmer 6s linear infinite;
}
.mac-caret {
  display: inline-block; width: 3px; height: 1.6rem; margin-left: 4px;
  border-radius: 2px; background: var(--brand-2);
  animation: macCaretBlink 1s steps(1) infinite;
}
@keyframes macGreetShimmer {
  from { background-position: 0% 0; }
  to   { background-position: 300% 0; }
}
@keyframes macCaretBlink {
  50% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .mac-greeting-text, .mac-caret { animation: none; }
}
.mac-subtitle { margin: .3rem 0 1.25rem; font-size: .88rem; color: #6e6e73; }
.mac-inline-error { margin: 0 0 1rem; text-align: left; font-size: .85rem; border-radius: 10px; }

.mac-form { display: flex; flex-direction: column; gap: .85rem; text-align: left; }
.mac-field { display: flex; flex-direction: column; gap: .35rem; font-size: .78rem; font-weight: 600; color: #3a3a3c; }
.mac-field input {
  width: 100%; height: 40px; padding: 0 .85rem;
  font: inherit; font-size: .92rem; font-weight: 400; color: #1d1d1f;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.12); border-radius: 9px;
  box-shadow: inset 0 1px 2px rgba(0,0,0,.04);
  transition: border-color .15s, box-shadow .15s, background .15s;
  outline: none;
}
.mac-field input::placeholder { color: #a1a1a6; }
.mac-field input:focus {
  background: #fff;
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3.5px color-mix(in srgb, var(--brand-2) 28%, transparent);
}
.mac-input-wrap { position: relative; }
.mac-input-wrap input { padding-right: 4rem; }
.mac-reveal {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  height: 28px; padding: 0 .6rem; border: 0; border-radius: 6px;
  background: rgba(0,0,0,.05); color: #3a3a3c;
  font: inherit; font-size: .74rem; font-weight: 600; cursor: pointer;
}
.mac-reveal:hover { background: rgba(0,0,0,.09); }

.mac-btn-primary {
  margin-top: .4rem; height: 42px; width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  border: 0; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: .95rem; font-weight: 600; color: #fff;
  background: linear-gradient(180deg, var(--brand-2), var(--brand));
  box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 6px 16px color-mix(in srgb, var(--brand) 40%, transparent);
  transition: transform .12s, filter .15s, box-shadow .15s;
}
.mac-btn-primary:hover { filter: brightness(1.08); }
.mac-btn-primary:active { transform: scale(.985); }
.mac-btn-primary svg { transition: transform .15s; }
.mac-btn-primary:hover svg { transform: translateX(3px); }
.mac-hint { margin: 1.1rem 0 0; font-size: .74rem; color: #86868b; }

.mac-dock {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 3;
  display: flex; align-items: flex-end; gap: .55rem; padding: .5rem .65rem;
  border-radius: 20px;
  background: rgba(255,255,255,.2);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,.3);
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
}
.dock-icon {
  position: relative; width: 48px; height: 48px; border-radius: 12px;
  display: grid; place-items: center; font-size: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,.2), inset 0 1px 0 rgba(255,255,255,.4);
  transition: transform .2s cubic-bezier(.3,1.4,.5,1);
  cursor: default;
}
.dock-icon:hover { transform: translateY(-8px) scale(1.18); }
.di-1 { background: linear-gradient(160deg, #5ac8fa, #007aff); }
.di-2 { background: linear-gradient(160deg, #fff, #e5e5ea); }
.di-3 { background: linear-gradient(160deg, #ffd60a, #ff9f0a); }
.di-4 { background: linear-gradient(160deg, #bf5af2, #5e5ce6); }
.di-5 { background: var(--logo-gradient); }
.di-kanban    { background: linear-gradient(160deg, #64d2ff, #0a84ff); }
.di-today     { background: linear-gradient(160deg, #ff6b6b, #ff3b30); }
.di-route     { background: linear-gradient(160deg, #7ee08a, #30b158); }
.di-products  { background: linear-gradient(160deg, #e3b98a, #a2845e); }
.di-customers { background: linear-gradient(160deg, #ffb3c7, #ff375f); }
.di-wa        { background: linear-gradient(160deg, #5ef08a, #25d366); }
.di-activity  { background: linear-gradient(160deg, #6ee7d8, #0d9488); }
button.dock-icon { border: 0; padding: 0; cursor: pointer; font: inherit; font-size: 1.5rem; }
.dock-icon.is-bouncing { animation: dockBounce .7s ease; }
@keyframes dockBounce {
  0%, 100% { transform: translateY(0); }
  30% { transform: translateY(-18px); }
  55% { transform: translateY(0); }
  75% { transform: translateY(-7px); }
}
body.mac-window-hidden #macDockApp { animation: dockPulse 1.6s ease-in-out infinite; }
@keyframes dockPulse {
  0%, 100% { box-shadow: 0 4px 10px rgba(0,0,0,.2), 0 0 0 0 rgba(255,255,255,.5); }
  50% { box-shadow: 0 4px 10px rgba(0,0,0,.2), 0 0 0 7px rgba(255,255,255,0); }
}
.dock-icon.is-active::after {
  content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.9);
}
.dock-icon.is-selected::after {
  content: ""; position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.9);
}
.dock-tip {
  position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%) translateY(4px);
  padding: .25rem .6rem; border-radius: 6px; white-space: nowrap;
  font-family: var(--mac-font); font-size: .72rem; font-weight: 500; color: #1d1d1f;
  background: rgba(246,246,246,.92); box-shadow: 0 4px 14px rgba(0,0,0,.2);
  opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.dock-icon:hover .dock-tip { opacity: 1; transform: translateX(-50%) translateY(0); }

.mac-notify {
  position: fixed; top: 42px; right: 14px; z-index: 7;
  width: min(340px, calc(100vw - 28px));
  display: flex; align-items: flex-start; gap: .7rem; padding: .75rem .85rem;
  border-radius: 16px; cursor: pointer;
  font-family: var(--mac-font); color: #1d1d1f;
  background: rgba(246,246,246,.78);
  backdrop-filter: blur(30px) saturate(180%); -webkit-backdrop-filter: blur(30px) saturate(180%);
  border: 1px solid rgba(255,255,255,.5);
  box-shadow: 0 12px 34px rgba(0,0,0,.25);
  opacity: 0; visibility: hidden; transform: translateX(calc(100% + 30px));
  transition: transform .45s cubic-bezier(.2,.9,.3,1.1), opacity .3s, visibility 0s linear .45s;
}
.mac-notify.is-visible {
  opacity: 1; visibility: visible; transform: none;
  transition: transform .45s cubic-bezier(.2,.9,.3,1.1), opacity .3s, visibility 0s;
}
.mac-notify-icon {
  flex: none; width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center;
  font-size: 1.2rem; background: var(--logo-gradient); box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.mac-notify-text { flex: 1; display: flex; flex-direction: column; gap: .1rem; font-size: .8rem; line-height: 1.35; }
.mac-notify-text strong { font-size: .84rem; font-weight: 600; }
.mac-notify-text span { color: #3a3a3c; }
.mac-notify-time { font-size: .7rem; color: #86868b; }

.dock-sep { width: 1px; align-self: stretch; margin: 4px 2px; background: rgba(255,255,255,.35); }

@media (max-width: 900px) {
  .mac-dock { gap: .4rem; padding: .45rem .55rem; }
  .dock-icon, button.dock-icon { width: 40px; height: 40px; font-size: 1.2rem; border-radius: 10px; }
}
@media (max-width: 640px) {
  .mac-menu-item, .mac-battery { display: none; }
  .dock-extra { display: none; }
  .dock-icon { width: 42px; height: 42px; font-size: 1.3rem; }
  body.mac-desktop { padding-bottom: 5rem; }
  body.mac-zoomed .mac-window-body { min-height: calc(100dvh - 30px - 6rem - 38px); }
}
@media (prefers-reduced-motion: reduce) {
  .mac-wallpaper .blob, .mac-window { animation: none; }
}

.theme-picker {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
}
.theme-option {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem .85rem; border-radius: 12px;
  border: 1px solid var(--line); background: #fff;
  font-weight: 700; cursor: pointer;
}
.theme-option input { width: auto; min-height: auto; }
.theme-option.selected,
.theme-option:has(input:checked) {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}
.theme-swatch {
  width: 28px; height: 28px; border-radius: 999px;
  border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.12);
  flex-shrink: 0;
}
.theme-name { flex: 1; }

.reminder-bell { position: relative; text-decoration: none; }
.reminder-bell .badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; border-radius: 999px;
  background: #dc2626; color: #fff; font-size: .65rem; font-weight: 800;
  display: grid; place-items: center; padding: 0 4px;
}
.reminder-banner {
  background: linear-gradient(135deg, #9a3412, #c2410c);
  color: #fff; border-bottom: 1px solid rgba(255,255,255,.15);
}
.reminder-banner-inner {
  max-width: 1200px; margin: 0 auto; padding: .65rem .9rem;
  display: flex; flex-wrap: wrap; gap: .5rem; align-items: center;
}
.reminder-banner-inner strong { flex: 1; min-width: 160px; }
.quote-preview {
  margin: .65rem 0 0; padding: .65rem .75rem;
  background: var(--brand-soft); border-radius: 10px; font-size: .9rem;
}
.activity-item .pill { margin-top: .35rem; }

.row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}
@media (max-width: 640px) {
  .row-2 { grid-template-columns: 1fr; }
}
.quote-table-wrap { overflow-x: auto; }
.quote-edit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}
.quote-edit-table th,
.quote-edit-table td {
  padding: .4rem .35rem;
  border-bottom: 1px solid var(--border, #e2e8f0);
  vertical-align: top;
}
.quote-edit-table th { text-align: left; font-size: .8rem; color: var(--muted, #64748b); }
.quote-edit-table .num { text-align: right; width: 5.5rem; }
.quote-edit-table input.num { width: 100%; text-align: right; }
.quote-edit-table .product-pick,
.quote-edit-table .f-desc,
.quote-edit-table .f-note {
  width: 100%;
  margin-bottom: .35rem;
}
.quote-edit-table .f-note { font-size: .82rem; }
.quote-tabs {
  display: flex;
  gap: .35rem;
  margin-bottom: .75rem;
  border-bottom: 2px solid var(--border, #e2e8f0);
  padding-bottom: 0;
}
.quote-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: .55rem 1rem;
  font-weight: 600;
  color: var(--muted, #64748b);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
}
.quote-tab.active {
  color: var(--brand, #0f766e);
  border-bottom-color: var(--brand, #0f766e);
}
.quote-tab-panel { display: none; }
.quote-tab-panel.active { display: block; }
.quote-logo-preview {
  margin-top: .75rem;
  max-width: 160px;
  text-align: center;
}
.quote-logo-preview-img {
  width: 100%;
  max-height: 72px;
  object-fit: contain;
  border-radius: 10px;
}
.quote-logo-preview-tag {
  margin: .35rem 0 0;
  font-size: .85rem;
  color: var(--muted, #64748b);
}
.check-grid {
  display: grid;
  gap: .5rem;
  margin: .75rem 0;
}
.quote-grand-preview {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .75rem 0;
  margin-top: .5rem;
  border-top: 2px solid var(--border, #e2e8f0);
  font-size: 1.05rem;
}
.chip-thumb {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 4px;
  vertical-align: middle;
  margin-right: .25rem;
}
.product-edit-thumb {
  max-width: 120px;
  max-height: 90px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border, #e2e8f0);
}
.product-edit-card { gap: .5rem; }

.quote-customize-layout {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(320px, 1.1fr);
  gap: 1rem;
  align-items: start;
}
.quote-preview-pane {
  position: sticky;
  top: .75rem;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: #eef0f4;
  overflow: hidden;
  min-height: 420px;
  max-height: calc(100vh - 120px);
  display: flex;
  flex-direction: column;
}
.quote-preview-pane-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .35rem .75rem;
  padding: .65rem .85rem;
  background: #fff;
  border-bottom: 1px solid var(--border, #e2e8f0);
}
.quote-preview-pane-head .muted { font-size: .78rem; }
.quote-preview-scroll {
  flex: 1;
  overflow: auto;
  padding: .75rem;
}
.quote-live-preview-root {
  transform-origin: top center;
}
.quote-live-preview-root .quote-preview-sheet {
  width: 100%;
  max-width: 210mm;
  margin: 0 auto .75rem;
  min-height: auto;
  box-shadow: 0 4px 18px rgba(0,0,0,.1);
  font-size: 11px;
  padding-bottom: 1rem;
}
.quote-live-preview-root .q-brand { font-size: 1.35rem; }
.quote-live-preview-root .q-title { font-size: 1.15rem; }
.quote-live-preview-root .q-logo-img { height: 52px; max-width: 88px; }
.quote-live-preview-root .q-table { width: calc(100% - 1.6rem); margin: 0 .8rem; font-size: 10px; }
.quote-live-preview-root .q-parties { padding: .5rem .8rem .75rem; gap: .5rem; }
.quote-live-preview-root .q-head { padding: .65rem .8rem .25rem; }
.quote-live-preview-root .q-bottom-row { margin: .65rem .8rem 0; }
.quote-live-preview-root .q-footer { margin-top: 1rem; padding: 0 .8rem .8rem; }
.quote-live-preview-root .q-photo-page { margin-top: .5rem; }
@media (max-width: 960px) {
  .quote-customize-layout { grid-template-columns: 1fr; }
  .quote-preview-pane {
    position: static;
    max-height: 520px;
  }
}
.quote-edit-table .amount-cell { font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: .7rem; }
.hint { display: block; margin-top: .35rem; font-size: .8rem; color: var(--muted, #64748b); }
.wa-panel {
  border: 2px solid var(--brand, #0f766e);
  scroll-margin-bottom: 1rem;
}
.quote-item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .45rem;
}
.quote-item-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: .5rem;
  align-items: baseline;
  padding: .4rem 0;
  border-bottom: 1px solid var(--border, #e2e8f0);
  font-size: .9rem;
}
.product-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.chip-btn {
  appearance: none;
  border: 1px solid var(--border, #cbd5e1);
  background: #fff;
  border-radius: 999px;
  padding: .4rem .75rem;
  font-size: .82rem;
  cursor: pointer;
  display: inline-flex;
  gap: .4rem;
  align-items: center;
  text-align: left;
  max-width: 100%;
}
.chip-btn:hover {
  border-color: var(--brand, #0f766e);
  background: var(--brand-soft, #ecfdf5);
}
code {
  font-size: .78rem;
  background: var(--brand-soft, #f1f5f9);
  padding: .1rem .3rem;
  border-radius: 4px;
  margin-right: .15rem;
}

@media (min-width: 980px) {
  .sidebar.open ~ .shell-main { margin-left: var(--sidebar-w); }
  .sidebar-backdrop { display: none !important; }
  .brand-mobile, .mobile-only-user { display: none; }
  .topbar-date { display: inline-flex; }
  .metric-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .page { padding: 1.25rem 1.5rem 2rem; }

  .pipeline-filters {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
  }
  .custom-dates { grid-column: 1 / -1; max-width: 420px; }
  .kanban-stage-tabs { display: none; }
  .kanban-board {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(230px, 1fr);
    grid-template-rows: auto;
    gap: .85rem;
    align-items: stretch;
    overflow-x: auto;
    padding-bottom: .35rem;
  }
  .kanban-col {
    display: flex !important;
    flex-direction: column;
    align-self: stretch;
    height: auto;
    min-height: min-content;
  }
  .kanban-cards {
    flex: 1 1 auto;
    min-height: 0;
  }
}

/* Business Agent */
.agent-shell {
  --agent-max: 1100px;
  max-width: var(--agent-max);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.agent-top {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius);
  background: var(--welcome-gradient);
  color: #fff;
  box-shadow: var(--shadow);
}
.agent-top-main {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  min-width: 0;
}
.agent-avatar {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 700;
  letter-spacing: .04em;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.22);
  flex-shrink: 0;
}
.agent-top h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}
.agent-top p {
  margin: .25rem 0 0;
  opacity: .9;
  font-size: .9rem;
  line-height: 1.4;
  max-width: 42rem;
}
.agent-top-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
}
.agent-status {
  font-size: .75rem;
  font-weight: 600;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
}
.agent-status.ok { background: rgba(72, 220, 160, .28); }
.agent-status.bad { background: rgba(255, 120, 100, .35); }
.agent-meta-pill {
  font-size: .72rem;
  padding: .28rem .65rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
}
.agent-meta-pill.muted { opacity: .75; }

.agent-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .5rem;
}
.agent-stat {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: .65rem .7rem;
  box-shadow: var(--card-shadow);
}
.agent-stat span {
  display: block;
  font-size: .72rem;
  color: var(--muted);
}
.agent-stat strong {
  font-size: 1.15rem;
  color: var(--ink);
}
.agent-stat.warn strong { color: var(--warn); }
.agent-stat.good strong { color: var(--brand-2); }

.agent-tabs {
  display: flex;
  gap: .35rem;
  padding: .3rem;
  background: var(--bg-soft);
  border-radius: 12px;
  width: fit-content;
  max-width: 100%;
}
.agent-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: .55rem 1rem;
  border-radius: 10px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.agent-tab.active {
  background: var(--surface);
  color: var(--brand);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.agent-tab em {
  font-style: normal;
  font-size: .7rem;
  background: var(--brand-soft);
  color: var(--brand);
  padding: .1rem .4rem;
  border-radius: 999px;
}

.agent-panel { display: none; flex-direction: column; gap: .75rem; }
.agent-panel.active { display: flex; }

.agent-prompts {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}
.agent-prompts .chip {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: .5rem .9rem;
  font-size: .82rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  transition: border-color .15s, background .15s, transform .12s;
}
.agent-prompts .chip:hover {
  border-color: var(--brand-2);
  background: var(--brand-soft);
  transform: translateY(-1px);
}
.chip-ico { opacity: .85; font-size: .85rem; }

.agent-chat {
  max-height: min(52vh, 480px);
  min-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .85rem;
  padding: 1rem;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--brand-soft) 70%, transparent), transparent 42%),
    var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.agent-msg { display: flex; animation: agentIn .22s ease; }
@keyframes agentIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}
.agent-msg.user { justify-content: flex-end; }
.agent-msg.assistant { justify-content: flex-start; }
.agent-bubble {
  max-width: min(94%, 680px);
  padding: .85rem 1rem;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  line-height: 1.5;
  font-size: .92rem;
}
.agent-msg.user .agent-bubble {
  background: var(--brand);
  color: #fff;
  border-color: transparent;
  border-bottom-right-radius: 6px;
}
.agent-msg.assistant .agent-bubble {
  border-bottom-left-radius: 6px;
}
.agent-bubble-head {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .4rem;
}
.agent-bubble-head strong {
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--brand-2);
}
.agent-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-2) 25%, transparent);
}
.agent-msg.error .agent-bubble {
  background: #fde2e2;
  color: #9b1c1c;
  border-color: #f5c2c2;
}
.agent-md { white-space: pre-wrap; word-break: break-word; }
.agent-md .md-h2 {
  font-weight: 700;
  font-size: 1.02rem;
  margin: .55rem 0 .2rem;
  color: var(--brand);
}
.agent-md .md-h3 {
  font-weight: 700;
  margin: .4rem 0 .15rem;
}
.agent-md .md-li {
  position: relative;
  padding-left: 1rem;
  margin: .15rem 0;
}
.agent-md .md-li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--brand-2);
}
.agent-md .md-li.num::before { content: none; }
.agent-md .md-li.num span {
  display: inline-grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  margin-right: .35rem;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: .7rem;
  font-weight: 700;
}

.agent-composer { margin-top: .15rem; }
.agent-input-wrap {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: .55rem;
  align-items: end;
  padding: .45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--card-shadow);
}
.agent-composer textarea {
  width: 100%;
  resize: vertical;
  min-height: 56px;
  max-height: 160px;
  border: 0;
  padding: .55rem .65rem;
  font: inherit;
  background: transparent;
  color: var(--ink);
}
.agent-composer textarea:focus { outline: none; }
.agent-send {
  min-width: 88px;
  height: 42px;
  border-radius: 12px !important;
}
.agent-send.is-busy { opacity: .75; }
.agent-composer-hint { margin: .45rem .2rem 0; }
a.agent-meta-pill { color: inherit; text-decoration: none; }
a.agent-meta-pill:hover { background: rgba(255,255,255,.22); }
.agent-shell.marketing .agent-top {
  background: linear-gradient(135deg, #7a2e0e 0%, #e85d04 58%, #ffb703 100%);
}
.agent-visual {
  display: block;
  width: 100%;
  max-width: 440px;
  margin-top: .75rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
}
.agent-msg.partner .agent-bubble { box-shadow: inset 3px 0 0 #e85d04; }
.agent-shell.marketing .agent-msg.partner .agent-bubble { box-shadow: inset 3px 0 0 #7c4dff; }

/* Teach */
.teach-intro h2 {
  margin: 0 0 .25rem;
  font-size: 1.05rem;
}
.teach-intro p {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
}
.teach-form {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  box-shadow: var(--card-shadow);
}
.teach-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: .65rem;
}
.teach-form label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .82rem;
  font-weight: 600;
  color: var(--muted);
}
.teach-form input,
.teach-form select,
.teach-form textarea {
  font: inherit;
  font-weight: 400;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .7rem;
  background: var(--bg);
}
.teach-form textarea { resize: vertical; min-height: 96px; }
.teach-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.teach-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .65rem;
}
.teach-card {
  background: var(--surface);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: .85rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
  box-shadow: var(--card-shadow);
}
.teach-card.off { opacity: .65; }
.teach-card-top { display: flex; gap: .35rem; flex-wrap: wrap; }
.teach-card h3 {
  margin: 0;
  font-size: .95rem;
  color: var(--ink);
}
.teach-card p {
  margin: 0;
  font-size: .84rem;
  color: var(--muted);
  line-height: 1.4;
  white-space: pre-wrap;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.teach-card-actions {
  display: flex;
  gap: .35rem;
  margin-top: .35rem;
}
.danger-btn { color: var(--danger) !important; border-color: #f0c2c2 !important; }
.hint.ok-msg { color: var(--brand-2); }
.hint.err-msg { color: var(--danger); }
.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  border: 1px dashed var(--empty-dash);
  border-radius: 12px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

.inline-form { display: inline; margin: 0; }
.picked-list { display: flex; flex-direction: column; gap: .4rem; }
.picked-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  padding: .45rem .55rem;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  background: var(--card-bg, #fff);
  font-size: .9rem;
}

/* —— Travel route + location pin —— */
.route-lead { margin: 0; }
.page-route { padding-bottom: 5.5rem; }
.route-layout {
  display: grid;
  gap: 1rem;
}
.route-form { gap: .75rem; }
.route-field { margin: 0; }
.route-via-toggle {
  align-self: start;
  width: fit-content;
}
.route-km-block {
  display: flex;
  flex-direction: column;
  gap: .55rem;
}
.route-km-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--ink);
}
.route-km-chips {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .4rem;
}
@media (min-width: 400px) {
  .route-km-chips { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
.km-chip {
  appearance: none;
  border: 1px solid var(--card-border);
  background: var(--card-bg, #fff);
  color: var(--ink);
  border-radius: 999px;
  padding: .55rem .35rem;
  font-size: .85rem;
  font-weight: 600;
  min-height: 42px;
  cursor: pointer;
}
.km-chip.is-active {
  background: var(--brand, #0f3d2e);
  border-color: var(--brand, #0f3d2e);
  color: #fff;
}
.route-km-custom {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
  font-size: .85rem;
}
.route-km-custom input {
  width: 5.5rem;
  margin: 0;
}
.route-map-shell {
  width: 100%;
}
.route-map {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--card-border);
  overflow: hidden;
  background: #e8eef2;
}
.location-mini-map { height: 200px; margin-top: .35rem; }
.location-mini-map.is-open { display: block; }
.route-map-lg { height: min(48vh, 380px); min-height: 240px; }
#routeGoBtn {
  margin-top: .35rem;
  min-height: 48px;
  font-size: 1rem;
  font-weight: 700;
}
.route-sticky-bar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: .65rem .85rem calc(.65rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(to top, rgba(255,255,255,.98), rgba(255,255,255,.92));
  border-top: 1px solid var(--card-border);
  box-shadow: 0 -6px 20px rgba(15, 23, 42, .08);
}
.route-hit {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .85rem;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg, #fff);
  box-shadow: var(--card-shadow);
}
.route-hit-main {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  text-decoration: none;
  color: inherit;
}
.route-hit-main strong { font-size: 1rem; }
.route-hit-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .25rem;
}
.route-hit-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
}
.route-hit-actions .btn {
  min-height: 42px;
  justify-content: center;
}
.route-hit.is-outside { opacity: .72; }

/* —— Yearly customers —— */
.yc-alert {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}
.yc-alert-ok {
  background: #ecfdf5;
  border-color: #a7f3d0;
}
.yc-alert strong { display: block; margin-bottom: .35rem; }
.yc-alert-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  margin-top: .75rem;
}
.yc-alert-row,
.yc-card {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: .85rem;
  border-radius: 12px;
  background: var(--card-bg, #fff);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
}
.yc-card.is-due { border-color: #f0c28a; }
.yc-card-main {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.yc-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.yc-actions .btn { min-height: 40px; }
.quick-filters .chip.active {
  background: var(--brand, #0f3d2e);
  color: #fff;
  border-color: var(--brand, #0f3d2e);
}
@media (min-width: 720px) {
  .yc-alert-row,
  .yc-card {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .yc-actions { flex-shrink: 0; }
}
.location-pin-block {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .75rem;
  border: 1px dashed var(--card-border);
  border-radius: 12px;
  background: rgba(15, 61, 46, 0.04);
}
.location-pin-block label { margin: 0; }
.location-pin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.location-pin-actions .btn {
  flex: 1 1 calc(50% - .25rem);
  min-height: 44px;
  justify-content: center;
  padding-left: .6rem;
  padding-right: .6rem;
}

@media (min-width: 900px) {
  .route-layout {
    grid-template-columns: minmax(280px, 360px) 1fr;
    align-items: start;
  }
  .route-map-lg { height: min(62vh, 520px); min-height: 360px; }
  .page-route { padding-bottom: 2rem; }
  .route-sticky-bar { display: none !important; }
}

@media (max-width: 899px) {
  .page-route {
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 5.5rem;
  }
  .route-page > .section-head,
  .route-page > .route-lead,
  .route-page > .route-results-card {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  .route-page > .route-lead { margin-bottom: .25rem; }
  .route-form {
    margin: 0 1rem;
    border-radius: 14px;
  }
  .route-map-shell {
    margin: 0;
    border-radius: 0;
  }
  .route-map-lg {
    height: min(55vh, 420px);
    min-height: 280px;
    border-radius: 0;
    border-left: 0;
    border-right: 0;
  }
  .route-sticky-bar { display: block; }
  .location-mini-map { height: min(42vh, 280px); min-height: 200px; }
}

@media (max-width: 720px) {
  .agent-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .agent-stats .agent-stat:nth-child(4),
  .agent-stats .agent-stat:nth-child(5) { display: none; }
  .teach-grid { grid-template-columns: 1fr; }
  .agent-chat { min-height: 240px; max-height: 48vh; }
  .agent-top { padding: .95rem; }
}

/* —— Today’s work —— */
.today-page {
  gap: .55rem;
}
.today-hero {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .75rem 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--brand, #0f3d2e), #1a5c45);
  color: #fff;
}
.today-hero-compact {
  padding: .65rem .85rem;
}
.today-hero-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
}
.today-kicker {
  margin: 0;
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  opacity: .8;
}
.today-hero h1 {
  margin: 0;
  color: #fff;
  font-size: 1.15rem;
  line-height: 1.2;
}
.today-motivate {
  margin: .15rem 0 0;
  font-size: .82rem;
  opacity: .9;
  line-height: 1.3;
}
.today-progress-inline {
  flex-direction: row;
  gap: .5rem;
}
.today-ring-sm {
  width: 52px;
  height: 52px;
}
.today-ring-sm::before {
  inset: 5px;
}
.today-ring-sm .today-ring-val {
  font-size: .78rem;
}
.today-progress-track {
  height: 5px;
  border-radius: 999px;
  background: rgba(255,255,255,.2);
  overflow: hidden;
  width: 100%;
}
.today-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #fbbf24, #34d399);
  transition: width .4s ease;
}
.today-goal-line {
  margin: 0;
  font-size: .82rem;
  line-height: 1.3;
}
.today-goal-line strong { font-weight: 700; }
.today-cheer {
  margin: 0;
  font-size: .74rem;
  opacity: .75;
  font-style: italic;
}
.today-celebrate-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .65rem .85rem;
}
.today-celebrate-compact p { display: none; }
.today-work-primary {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.today-work-block {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.today-work-heading {
  margin: 0;
  font-size: .92rem;
  font-weight: 800;
}
.today-work-heading .count {
  font-weight: 700;
  color: var(--muted);
  font-size: .85em;
}
.today-task.is-next-up {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft), var(--card-shadow);
  position: relative;
  animation: nextUpPulse 2.5s ease-in-out infinite;
}
@keyframes nextUpPulse {
  0%, 100% { box-shadow: 0 0 0 2px var(--brand-soft), var(--card-shadow); }
  50% { box-shadow: 0 0 0 3px rgba(15, 125, 94, .35), var(--card-shadow); }
}
.today-next-badge {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: .03em;
  margin-bottom: .15rem;
}
.today-add-panel {
  border: 2px dashed var(--brand);
  background: var(--brand-soft);
}
.today-nav-compact {
  padding: 0;
  position: static;
  background: none;
}
.today-nav-primary {
  border-color: var(--brand);
  color: var(--brand);
  font-weight: 800;
}
.today-nav-add {
  border: none;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  font-family: inherit;
}
.today-progress {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
  flex-shrink: 0;
}
.today-ring {
  --p: 0;
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: conic-gradient(#fbbf24 calc(var(--p) * 1%), rgba(255,255,255,.2) 0);
  display: grid;
  place-items: center;
  position: relative;
}
.today-ring::before {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: #0f3d2e;
}
.today-ring-val {
  position: relative;
  z-index: 1;
  font-weight: 700;
  font-size: .95rem;
}
.today-progress-meta {
  text-align: center;
  font-size: .8rem;
  line-height: 1.25;
}
.today-progress-meta strong { display: block; color: #fff; }
.today-progress-meta .muted { color: rgba(255,255,255,.75); }
.today-celebrate {
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}
.today-celebrate strong { color: #065f46; font-size: 1.05rem; }
.today-celebrate p { margin: .35rem 0 .75rem; color: #047857; }
.today-task-list {
  display: flex;
  flex-direction: column;
  gap: .65rem;
}
.today-task {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding: .7rem .75rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg, #fff);
  box-shadow: var(--card-shadow);
}
.today-task.is-demo {
  border-color: #f0c28a;
  background: linear-gradient(180deg, #fffaf3, #fff);
}
.today-task.is-overdue {
  border-color: #f0b4b4;
}
.today-task-top {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}
.today-task-title {
  font-size: 1.05rem;
  display: block;
}
.today-task-body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.today-task-actions {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .4rem;
}
.today-task-actions .btn,
.today-done-form .btn {
  min-height: 44px;
  width: 100%;
  justify-content: center;
}
.today-done-form { margin: 0; }
.btn-done {
  background: #ecfdf5 !important;
  border-color: #6ee7b7 !important;
  color: #065f46 !important;
  font-weight: 700;
}
.btn-done:hover { filter: brightness(0.97); }
.today-done-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.today-done-row {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .7rem .8rem;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: #f8fafc;
  border: 1px solid var(--card-border);
}
.today-done-check {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #059669;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.today-done-main {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.today-more {
  border: none;
  padding: 0;
  background: transparent;
}
.today-more summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--ink);
}

/* Today page — section menus & submenus */
.today-nav {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  padding: .15rem 0 .35rem;
  position: sticky;
  top: calc(var(--topbar-h) + 4px);
  z-index: 11;
  background: linear-gradient(180deg, var(--bg) 75%, transparent);
}
.today-nav-link {
  flex: 0 0 auto;
  min-height: 36px;
  padding: .35rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  font-size: .78rem;
  text-decoration: none;
  white-space: nowrap;
}
.today-nav-link:hover {
  border-color: var(--brand);
  color: var(--brand);
}
.today-nav-add {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}

.today-section {
  border: 1px solid var(--card-border);
  border-radius: 14px;
  background: var(--card-bg, #fff);
  box-shadow: var(--card-shadow);
  overflow: hidden;
}
.today-section + .today-section {
  margin-top: .65rem;
}
.today-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .85rem 1rem;
  cursor: pointer;
  font-weight: 800;
  font-size: .95rem;
  color: var(--ink);
  list-style: none;
  user-select: none;
  background: linear-gradient(180deg, rgba(255,255,255,.6), transparent);
}
.today-section-head::-webkit-details-marker,
.today-submenu-head::-webkit-details-marker {
  display: none;
}
.today-section-head::before,
.today-submenu-head::before {
  content: '▸';
  display: inline-block;
  margin-right: .45rem;
  font-size: .85rem;
  color: var(--muted);
  transition: transform .15s ease;
}
.today-section[open] > .today-section-head::before,
.today-submenu[open] > .today-submenu-head::before {
  transform: rotate(90deg);
}
.today-section-title {
  flex: 1;
  min-width: 0;
}
.today-section-count {
  flex-shrink: 0;
  font-size: .72rem;
  font-weight: 800;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
}
.today-section-body {
  padding: 0 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.today-section-note {
  margin: 0 0 .25rem;
  font-size: .82rem;
}

.today-submenu {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255,255,255,.65);
  overflow: hidden;
}
.today-submenu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .65rem .85rem;
  cursor: pointer;
  font-weight: 700;
  font-size: .88rem;
  color: var(--ink);
  list-style: none;
}
.today-submenu-hint {
  font-size: .72rem;
  font-weight: 600;
  color: var(--muted);
}
.today-submenu-body {
  padding: 0 .85rem .85rem;
  border-top: 1px solid var(--line);
}
.today-submenu-body .task-add-form {
  margin-top: .75rem;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.demo-outcome-bar {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .75rem;
  border-radius: 12px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

@media (min-width: 720px) {
  .today-task {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .today-task-actions {
    width: min(320px, 42%);
    flex-shrink: 0;
  }
}

@media (max-width: 560px) {
  .today-hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .today-progress {
    flex-direction: row;
    gap: .75rem;
  }
  .today-task-actions {
    grid-template-columns: 1fr 1fr;
  }
  .today-task-actions .today-done-form {
    grid-column: 1 / -1;
  }
  .today-task.is-demo .today-task-actions {
    grid-template-columns: 1fr 1fr;
  }
  .today-task.is-demo .today-task-actions > .btn-primary {
    grid-column: 1 / -1;
  }
}

/* Personal tasks (Today page) */
.today-tasks-panel {
  margin-top: .5rem;
}
.task-add-form {
  gap: .65rem;
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}
.task-add-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .65rem;
}
.task-must-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-weight: 500;
  cursor: pointer;
}
.task-must-check input {
  width: auto;
  margin: 0;
}
.task-list-label {
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  margin: .75rem 0 .45rem;
}
.task-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.task-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .65rem .75rem;
  border-radius: 12px;
  border: 1px solid var(--card-border);
  background: var(--card-bg, #fff);
}
.task-item.is-must {
  border-color: #f0c28a;
  background: linear-gradient(180deg, #fffaf3, #fff);
}
.task-item.is-overdue {
  border-color: #f0b4b4;
}
.task-check {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--brand);
  background: #fff;
  color: var(--brand);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform .15s, background .15s;
}
.task-check:hover {
  transform: scale(1.08);
  background: var(--brand-soft);
}
.task-check-static {
  cursor: default;
  opacity: .45;
}
.task-check.done,
.task-done-row .task-check {
  border-color: #059669;
  background: #ecfdf5;
  color: #059669;
}
.task-body {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.task-body strong {
  font-size: .98rem;
}
.task-must-pill {
  font-size: .72rem;
  padding: .1rem .35rem;
}
.task-empty {
  margin: .5rem 0 0;
}
.task-done-list {
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px dashed var(--card-border);
}
.task-done-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .35rem 0;
  color: var(--muted);
  font-size: .92rem;
}
.well-done-toast {
  position: fixed;
  left: 50%;
  bottom: 2rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 10000;
  background: linear-gradient(135deg, #065f46, #059669);
  color: #fff;
  padding: .85rem 1.25rem;
  border-radius: 999px;
  box-shadow: 0 12px 40px rgba(5, 150, 105, .35);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  transition: transform .45s cubic-bezier(.34, 1.56, .64, 1);
  pointer-events: none;
}
.well-done-toast.show {
  transform: translateX(-50%) translateY(0);
}
.well-done-toast strong {
  font-size: 1.05rem;
}
.well-done-toast span {
  font-size: .82rem;
  opacity: .9;
}

/* Field visits calendar */
.visits-head { align-items: flex-start; }
.visits-toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.visits-nav-group { display: flex; gap: .35rem; }
.visits-period {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  flex: 1;
  text-align: center;
  min-width: 140px;
}
.visits-view-toggle {
  display: flex;
  gap: .25rem;
  padding: .2rem;
  border-radius: 999px;
  background: var(--bg);
  border: 1px solid var(--line);
}
.view-chip {
  border: none;
  background: transparent;
  padding: .4rem .85rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: .78rem;
  cursor: pointer;
  color: var(--muted);
}
.view-chip.is-active {
  background: var(--brand);
  color: #fff;
}
.visits-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .5rem;
  min-height: 320px;
}
.visits-week-col {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  background: var(--card-bg, #fff);
  min-height: 280px;
  overflow: hidden;
}
.visits-week-col.is-today {
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand-soft);
}
.visits-day-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .1rem;
  padding: .55rem .35rem;
  border: none;
  background: var(--bg);
  cursor: pointer;
  width: 100%;
  position: relative;
}
.visits-week-col.is-today .visits-day-head {
  background: var(--brand-soft);
}
.visits-dow {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
}
.visits-dom {
  font-size: 1.1rem;
  font-weight: 800;
}
.visits-count {
  position: absolute;
  top: .35rem;
  right: .35rem;
  font-size: .65rem;
  font-weight: 800;
  background: var(--brand);
  color: #fff;
  border-radius: 999px;
  padding: .1rem .35rem;
}
.visits-week-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .45rem;
  overflow-y: auto;
}
.visits-empty-day {
  margin: auto 0;
  text-align: center;
  font-size: .75rem;
  color: var(--muted);
}
.visit-card {
  padding: .45rem .5rem;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  font-size: .78rem;
}
.visit-card.is-done { opacity: .65; text-decoration: line-through; }
.visit-card.is-compact strong { font-size: .76rem; display: block; }
.visit-card-body { display: flex; flex-direction: column; gap: .1rem; }
.visit-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .35rem;
}
.visits-add-mini,
.visits-route-mini { width: 100%; margin-top: auto; }
.visits-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: .35rem;
}
.visits-month-dow {
  text-align: center;
  font-size: .72rem;
  font-weight: 700;
  color: var(--muted);
  padding: .25rem;
}
.visits-month-cell {
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: .4rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: .2rem;
  cursor: pointer;
  text-align: left;
}
.visits-month-cell.is-empty {
  border: none;
  background: transparent;
  cursor: default;
}
.visits-month-cell.is-today {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.visits-month-cell.has-visits {
  border-color: #fdba74;
  background: linear-gradient(180deg, #fffaf3, #fff);
}
.visits-month-num { font-weight: 800; font-size: .9rem; }
.visits-month-dots {
  display: flex;
  gap: 3px;
}
.visits-month-dots i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ea580c;
  font-style: normal;
}
.visits-month-meta {
  font-size: .65rem;
  color: var(--muted);
  font-weight: 600;
}
.visits-day-panel { margin-top: .5rem; }
.visits-day-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  margin-top: .75rem;
}

.visit-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 200;
}
.visit-modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  width: min(420px, calc(100vw - 2rem));
  max-height: 90vh;
  overflow-y: auto;
}
.visit-purpose-field {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}
.visit-purpose-field legend {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .25rem;
  width: 100%;
}
.visit-purpose-badge {
  display: inline-block;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: .15rem .4rem;
  border-radius: .25rem;
  margin-right: .35rem;
  vertical-align: middle;
}
.visit-purpose-badge.is-deal { background: #fef3c7; color: #92400e; }
.visit-purpose-badge.is-meeting { background: #e0f2fe; color: #075985; }
.visit-card.is-deal { border-left: 3px solid #f59e0b; }

.route-filters {
  display: grid;
  gap: .35rem;
  padding: .85rem 1rem;
}
.route-filters label { margin: 0; }
.route-visits-bar { margin-bottom: .25rem; }
.route-visits-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .65rem;
}
.route-visit-chip {
  display: inline-flex;
  align-items: center;
  padding: .35rem .65rem;
  border-radius: 999px;
  border: 1px solid #fdba74;
  background: #fff7ed;
  color: #9a3412;
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
.route-visit-chip:hover {
  background: #ffedd5;
}

@media (max-width: 900px) {
  .visits-week-grid {
    grid-template-columns: 1fr;
  }
  .visits-week-col { min-height: auto; }
  .visits-period { text-align: left; flex: 1 1 100%; order: -1; }
}

/* Customer profile hero */
.cprof {
  --cprof-a: #1f6b4f;
  --cprof-b: #3d9b74;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: .8rem;
  padding: 1rem 1rem 1.05rem;
  border-radius: 22px;
  border: 1px solid var(--card-border);
  background: #fff;
  box-shadow: 0 14px 36px rgba(15, 61, 46, .08);
}
.cprof.stage-leads { --cprof-a: #1d4ed8; --cprof-b: #22d3ee; }
.cprof.stage-follow_up { --cprof-a: #0284c7; --cprof-b: #38bdf8; }
.cprof.stage-demo_scheduled { --cprof-a: #d97706; --cprof-b: #fbbf24; }
.cprof.stage-quotation { --cprof-a: #7c3aed; --cprof-b: #e879f9; }
.cprof.stage-won { --cprof-a: #15803d; --cprof-b: #4ade80; }
.cprof-wash {
  position: absolute;
  inset: 0 0 auto 0;
  height: 108px;
  background:
    radial-gradient(120px 80px at 88% 0%, color-mix(in srgb, var(--cprof-b) 70%, #fff), transparent 70%),
    linear-gradient(120deg, color-mix(in srgb, var(--cprof-a) 22%, #fff), color-mix(in srgb, var(--cprof-b) 10%, #fff));
  pointer-events: none;
}
.cprof-bar, .cprof-who, .cprof-phone, .cprof-note, .cprof-loc, .cprof-facts, .cprof-quote, .cprof-actions {
  position: relative;
}
.cprof-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cprof-back {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  min-height: 32px;
  padding: .2rem .55rem .2rem .25rem;
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  color: var(--ink);
  font-size: .78rem;
  font-weight: 700;
  text-decoration: none;
}
.cprof-back svg { width: 18px; height: 18px; }
.cprof-ad {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 .62rem;
  border-radius: 999px;
  background: #16a34a;
  color: #fff;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
}
.cprof-who {
  display: flex;
  align-items: center;
  gap: .85rem;
}
.cprof-avatar {
  position: relative;
  flex: 0 0 58px;
  width: 58px;
  height: 58px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  background: linear-gradient(145deg, var(--cprof-a), var(--cprof-b));
  box-shadow: 0 8px 18px color-mix(in srgb, var(--cprof-a) 35%, transparent);
}
.cprof-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.cprof-titles { min-width: 0; }
.cprof-titles h1 {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.2;
  letter-spacing: -.01em;
  word-break: break-word;
}
.cprof-name {
  margin: .15rem 0 0;
  font-size: .95rem;
  font-weight: 650;
  color: var(--ink);
}
.cprof-tags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin: .4rem 0 0;
}
.cprof-tags span {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 .45rem;
  border-radius: 999px;
  background: rgba(255,255,255,.8);
  border: 1px solid rgba(15, 23, 42, .06);
  font-size: .7rem;
  font-weight: 700;
  color: var(--muted);
}
.cprof-stage {
  background: color-mix(in srgb, var(--cprof-a) 14%, #fff) !important;
  color: var(--cprof-a) !important;
  border-color: transparent !important;
}
.cprof-owner {
  width: 22px;
  height: 22px;
  padding: 0 !important;
  justify-content: center;
  border-radius: 999px !important;
  background: var(--brand) !important;
  color: #fff !important;
  border-color: transparent !important;
  font-size: .62rem !important;
}
.cprof-dnc {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border-color: #fecaca !important;
}
.cprof-phone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .72rem .85rem;
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  background: linear-gradient(180deg, #fff, var(--brand-soft));
  border: 1px solid color-mix(in srgb, var(--brand) 12%, #fff);
}
.cprof-phone small {
  display: block;
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.cprof-phone strong {
  display: block;
  margin-top: .05rem;
  font-size: 1.28rem;
  letter-spacing: .01em;
  color: var(--brand);
}
.cprof-phone i {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
}
.cprof-phone svg { width: 18px; height: 18px; }
.cprof-note {
  margin: 0;
  padding: .75rem .85rem;
  border: 0;
  border-radius: 14px;
  background: #f6f8f7;
  color: var(--ink);
  font-size: .9rem;
  font-style: italic;
  font-weight: 550;
  line-height: 1.45;
}
.cprof-loc {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin: 0;
  color: var(--muted);
  font-size: .86rem;
  font-weight: 650;
}
.cprof-loc svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--cprof-a); }
.cprof-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem;
  margin: 0;
}
.cprof-facts > div {
  margin: 0;
  padding: .6rem .7rem;
  border-radius: 14px;
  background: #f7faf8;
}
.cprof-facts dt {
  font-size: .66rem;
  font-weight: 800;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--muted);
}
.cprof-facts dd {
  margin: .18rem 0 0;
  font-size: .92rem;
  font-weight: 800;
  line-height: 1.25;
  word-break: break-word;
}
.cprof-facts .is-money dd { color: #166534; }
.cprof-facts .is-overdue { background: #fef2f2; }
.cprof-facts .is-overdue dd { color: #b91c1c; }
.cprof-facts .is-today { background: #fff7ed; }
.cprof-facts .is-today dd { color: #c2410c; }
.cprof-facts .is-soon { background: #f0f9ff; }
.cprof-facts .is-soon dd { color: #0369a1; }
.cprof-quote {
  padding: .7rem .8rem;
  border-radius: 14px;
  background: #faf5ff;
  border: 1px solid #e9d5ff;
}
.cprof-quote a {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem .6rem;
  align-items: baseline;
  color: inherit;
  text-decoration: none;
}
.cprof-quote strong { color: #6b21a8; }
.cprof-quote span, .cprof-quote p { margin: .25rem 0 0; color: var(--muted); font-size: .84rem; }
.cprof-actions {
  display: grid;
  grid-template-columns: 1.15fr .85fr 1.15fr;
  gap: .45rem;
}
.cprof-actions .btn { justify-content: center; border-radius: 12px; font-weight: 800; }
@media (min-width: 760px) {
  .cprof { padding: 1.15rem 1.2rem 1.2rem; }
  .cprof-titles h1 { font-size: 1.35rem; }
  .cprof-facts { grid-template-columns: repeat(4, 1fr); }
}
