/* General Sans + Inter fallback — self-hosted */
@font-face {
  font-family: 'General Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/general-sans-400.woff2') format('woff2');
}

/* ── Value dashboard: present, progress and future ─────────── */
.dashboard-page.dashboard-value-page {
  width:100%;
  max-width:none;
  margin:0;
  padding:28px 24px;
  box-sizing:border-box;
}
.dashboard-native-scroll {
  height:auto;
  min-height:100%;
  overflow-y:auto;
}
.dashboard-native-scroll .crm-layout {
  height:auto;
  min-height:100vh;
  overflow:visible;
}
.dashboard-native-scroll .crm-main {
  overflow:visible;
}
.dashboard-native-scroll .crm-content {
  flex:none;
  overflow:visible;
}
.dashboard-native-scroll .crm-sidebar {
  position:sticky;
  top:16px;
  align-self:flex-start;
}
.dashboard-value-hero { min-height:214px; }
.dashboard-value-hero p strong { color:inherit; font-weight:600; }
.dashboard-value-kpis { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:14px; margin:18px 0; }
.dashboard-value-kpi {
  display:flex; min-width:0; flex-direction:column; gap:7px; padding:20px;
  border:1px solid var(--gray-200); border-radius:18px; background:var(--static-static-white-0);
  color:inherit; text-decoration:none; box-shadow:var(--shadow-xs);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.dashboard-value-kpi:hover { transform:translateY(-2px); border-color:var(--gray-300); box-shadow:var(--shadow-sm); }
.dashboard-value-kpis .dashboard-value-kpi:nth-child(1) {
  background:linear-gradient(145deg,var(--brand-lighter),color-mix(in srgb,var(--brand-light) 42%,white));
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-kpis .dashboard-value-kpi:nth-child(2) {
  background:linear-gradient(145deg,var(--state-feature-lighter-50),color-mix(in srgb,var(--state-feature-light-200) 34%,white));
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-kpis .dashboard-value-kpi:nth-child(3) {
  background:linear-gradient(145deg,var(--success-50),color-mix(in srgb,var(--success-100) 40%,white));
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-kpis .dashboard-value-kpi:nth-child(4) {
  background:linear-gradient(145deg,var(--warning-50),color-mix(in srgb,var(--warning-100) 44%,white));
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-kpi>span { color:var(--gray-500); font-size:12px; font-weight:500; }
.dashboard-value-kpi>strong {
  overflow:hidden; color:var(--gray-900); font-family:var(--font-heading);
  font-size:clamp(24px,2vw,34px); font-weight:600; letter-spacing:-.04em; line-height:1.05; text-overflow:ellipsis;
}
.dashboard-value-kpi>small { color:var(--gray-500); font-size:11px; font-weight:400; line-height:1.4; }
.dashboard-value-kpi-risk { background:var(--warning-50); border-color:var(--gray-200); }
.dashboard-value-layout {
  display:grid;
  width:100%;
  grid-template-columns:repeat(12,minmax(0,1fr));
  align-items:stretch;
  gap:18px;
}
.dashboard-value-main,.dashboard-value-side { display:contents; }
.dashboard-value-layout .dashboard-action-card {
  grid-column:1 / span 4;
  grid-row:1;
}
.dashboard-value-layout .dashboard-future-card {
  grid-column:5 / span 4;
  grid-row:1;
}
.dashboard-value-layout .dashboard-recommendations {
  grid-column:9 / span 4;
  grid-row:1;
}
.dashboard-value-layout .dashboard-value-pipeline {
  grid-column:1 / span 6;
  grid-row:2;
}
.dashboard-value-layout .dashboard-hygiene-card {
  grid-column:7 / span 3;
  grid-row:2;
}
.dashboard-value-layout .dashboard-growth-card {
  grid-column:10 / span 3;
  grid-row:2 / span 2;
}
.dashboard-value-layout .dashboard-team-card {
  grid-column:1 / span 9;
  grid-row:3;
}
.dashboard-value-layout.is-executive-layout .dashboard-value-pipeline {
  grid-column:1 / span 9;
}
.dashboard-value-layout.is-executive-layout .dashboard-hygiene-card {
  grid-column:1 / span 9;
  grid-row:3;
}
.dashboard-value-layout .card {
  overflow:hidden; border:1px solid var(--gray-200); border-radius:20px;
  background:var(--static-static-white-0); box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-action-card {
  background:linear-gradient(150deg,color-mix(in srgb,var(--warning-50) 62%,white),white 68%);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-value-pipeline {
  background:linear-gradient(150deg,color-mix(in srgb,var(--brand-lighter) 78%,white),white 70%);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-team-card {
  background:linear-gradient(150deg,color-mix(in srgb,var(--colors-sky-50) 74%,white),white 72%);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-recommendations {
  background:linear-gradient(150deg,color-mix(in srgb,var(--state-feature-lighter-50) 84%,white),white 72%);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-future-card {
  background:linear-gradient(150deg,color-mix(in srgb,var(--warning-50) 82%,white),white 74%);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-growth-card {
  background:linear-gradient(150deg,color-mix(in srgb,var(--success-50) 86%,white),white 72%);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-hygiene-card {
  background:linear-gradient(150deg,color-mix(in srgb,var(--colors-paper) 82%,white),white 74%);
  border-color:var(--gray-200);
  box-shadow:var(--shadow-xs);
}
.dashboard-value-layout .dashboard-action-card .dashboard-value-eyebrow { color:var(--warning-600); }
.dashboard-value-layout .dashboard-value-pipeline .dashboard-value-eyebrow { color:var(--brand-base); }
.dashboard-value-layout .dashboard-team-card .dashboard-value-eyebrow { color:var(--colors-sky-500); }
.dashboard-value-layout .dashboard-recommendations .dashboard-value-eyebrow { color:var(--state-feature-base-500); }
.dashboard-value-layout .dashboard-future-card .dashboard-value-eyebrow { color:var(--warning-600); }
.dashboard-value-layout .dashboard-growth-card .dashboard-value-eyebrow { color:var(--success-600); }
.dashboard-value-header {
  display:flex; min-height:76px; align-items:center; justify-content:space-between; gap:16px;
  padding:18px 20px; border-bottom:1px solid var(--gray-100);
}
.dashboard-value-header h2 {
  margin:3px 0 0; color:var(--gray-900); font-family:var(--font-heading);
  font-size:17px; font-weight:600; letter-spacing:-.02em;
}
.dashboard-value-header>a { flex:0 0 auto; color:var(--brand-base); font-size:12px; font-weight:500; text-decoration:none; }
.dashboard-value-eyebrow {
  display:block; color:var(--gray-400); font-size:10px; font-weight:600;
  letter-spacing:.09em; text-transform:uppercase;
}
.dashboard-priority-list { padding:6px 20px; }
.dashboard-priority {
  display:grid; grid-template-columns:9px minmax(0,1fr) auto; align-items:center; gap:13px;
  padding:15px 0; border-bottom:1px solid var(--gray-100); color:inherit; text-decoration:none;
}
.dashboard-priority:last-child { border-bottom:0; }
.dashboard-priority>i {
  width:9px; height:9px; border-radius:50%; background:var(--gray-400); box-shadow:0 0 0 4px var(--gray-100);
}
.dashboard-priority-danger>i { background:var(--error-500); box-shadow:0 0 0 4px var(--error-50); }
.dashboard-priority-warning>i { background:var(--warning-500); box-shadow:0 0 0 4px var(--warning-50); }
.dashboard-priority-info>i { background:var(--brand-base); box-shadow:0 0 0 4px var(--brand-lighter); }
.dashboard-priority-copy { display:flex; min-width:0; flex-direction:column; gap:3px; }
.dashboard-priority-copy strong { color:var(--gray-800); font-size:13px; font-weight:600; }
.dashboard-priority-copy small {
  overflow:hidden; color:var(--gray-500); font-size:11px; font-weight:400;
  line-height:1.4; text-overflow:ellipsis; white-space:nowrap;
}
.dashboard-priority-action { color:var(--gray-500); font-size:11px; font-weight:500; transition:color .18s ease; }
.dashboard-priority:hover .dashboard-priority-action { color:var(--brand-base); }
.dashboard-empty-state {
  display:flex; align-items:center; flex-direction:column; gap:7px; padding:36px 20px;
  color:var(--gray-500); text-align:center;
}
.dashboard-empty-state strong { color:var(--gray-800); font-size:14px; font-weight:600; }
.dashboard-empty-state span,.dashboard-empty-state a { font-size:12px; }
.dashboard-empty-state a { margin-top:5px; color:var(--brand-base); font-weight:500; text-decoration:none; }
.dashboard-value-pipeline .dashboard-stage-list { padding:20px; }
.dashboard-pipeline-insight {
  display:grid;
  grid-template-columns:repeat(3,1fr);
  gap:12px;
  padding:18px 20px 20px;
  border-top:1px solid var(--brand-light);
  background:color-mix(in srgb,var(--brand-lighter) 52%,white);
}
.dashboard-pipeline-metric {
  display:flex;
  min-width:0;
  align-items:center;
  justify-content:center;
  gap:10px;
  color:var(--gray-600);
  font-size:12px;
  font-weight:500;
  line-height:1.35;
}
.dashboard-pipeline-ring {
  position:relative;
  display:grid;
  width:58px;
  height:58px;
  flex:0 0 58px;
  place-items:center;
  padding:0;
  border:0;
  border-radius:50%;
  background:conic-gradient(var(--metric-color) calc(var(--metric-progress) * 1%),color-mix(in srgb,var(--metric-color) 16%,white) 0);
}
.dashboard-pipeline-ring::after {
  content:'';
  position:absolute;
  inset:7px;
  border-radius:50%;
  background:var(--static-static-white-0);
  box-shadow:0 1px 3px rgba(25,26,35,.08);
}
.dashboard-pipeline-ring strong {
  position:relative;
  z-index:1;
  color:var(--gray-900);
  font-size:17px;
  font-weight:600;
}
.dashboard-opportunity-list,.dashboard-growth-list,.dashboard-hygiene-list { padding:6px 20px; }
.dashboard-opportunity {
  display:flex; align-items:center; gap:12px; padding:13px 0; border-bottom:1px solid var(--gray-100);
  color:inherit; text-decoration:none;
}
.dashboard-opportunity:last-child,.dashboard-growth-list a:last-child,.dashboard-hygiene-list a:last-child { border-bottom:0; }
.dashboard-opportunity>span:last-child,.dashboard-growth-list a>span {
  display:flex; min-width:0; flex:1; flex-direction:column; gap:3px;
}
.dashboard-opportunity strong,.dashboard-growth-list strong {
  overflow:hidden; color:var(--gray-800); font-size:12px; font-weight:600;
  text-overflow:ellipsis; white-space:nowrap;
}
.dashboard-opportunity small,.dashboard-growth-list small { color:var(--gray-500); font-size:10px; font-weight:400; line-height:1.4; }
.dashboard-score {
  display:inline-flex; width:38px; height:38px; flex:0 0 38px; align-items:center; justify-content:center;
  border-radius:12px; background:var(--gray-100); color:var(--gray-600); font-size:12px; font-weight:600;
}
.dashboard-score.is-high { background:var(--success-50); color:var(--success-700); }
.dashboard-recommendations .dashboard-score:not(.is-high) {
  background:color-mix(in srgb,var(--state-feature-light-200) 52%,white);
  color:var(--state-feature-base-500);
}
.dashboard-horizon-list { padding:6px 20px; }
.dashboard-horizon {
  display:flex; align-items:center; justify-content:space-between; gap:15px;
  padding:14px 0; border-bottom:1px solid var(--gray-100);
}
.dashboard-horizon:last-child { border-bottom:0; }
.dashboard-horizon>span { display:flex; flex-direction:column; gap:3px; }
.dashboard-horizon strong,.dashboard-horizon b { color:var(--gray-800); font-size:12px; font-weight:600; }
.dashboard-horizon small { color:var(--gray-500); font-size:10px; font-weight:400; }
.dashboard-growth-list a,.dashboard-hygiene-list a {
  display:flex; align-items:center; justify-content:space-between; gap:12px; padding:13px 0;
  border-bottom:1px solid var(--gray-100); color:inherit; text-decoration:none;
}
.dashboard-growth-list b { display:flex; align-items:baseline; gap:3px; color:var(--brand-base); font-size:14px; font-weight:600; }
.dashboard-hygiene-list span { color:var(--gray-600); font-size:11px; }
.dashboard-hygiene-list strong {
  display:inline-flex; min-width:26px; height:24px; align-items:center; justify-content:center;
  border-radius:8px; background:var(--gray-100); color:var(--gray-700); font-size:11px; font-weight:600;
}
.dashboard-side-empty { margin:0; padding:25px 20px; color:var(--gray-500); font-size:11px; line-height:1.5; }
.dashboard-team-table-wrap { overflow-x:auto; }
.dashboard-team-table { width:100%; min-width:760px; border-collapse:collapse; }
.dashboard-team-table th {
  padding:11px 16px; background:color-mix(in srgb,var(--colors-sky-50) 72%,white); color:var(--gray-500);
  font-size:9px; font-weight:600; letter-spacing:.04em; text-align:left; text-transform:uppercase;
}
.dashboard-team-table td { padding:13px 16px; border-top:1px solid var(--gray-100); color:var(--gray-600); font-size:11px; }
.dashboard-member { display:flex; align-items:center; gap:9px; color:var(--gray-800); font-weight:500; }
.dashboard-member i {
  display:inline-flex; width:30px; height:30px; flex:0 0 30px; align-items:center; justify-content:center;
  border-radius:10px; background:var(--brand-lighter); color:var(--brand-base);
  font-size:9px; font-style:normal; font-weight:600;
}
.dashboard-cell-risk { color:var(--error-600)!important; font-weight:600; }
@media (max-width:1180px) {
  .dashboard-value-kpis { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .dashboard-value-layout { grid-template-columns:1fr; }
  .dashboard-value-layout .dashboard-action-card,
  .dashboard-value-layout .dashboard-future-card,
  .dashboard-value-layout .dashboard-recommendations,
  .dashboard-value-layout .dashboard-value-pipeline,
  .dashboard-value-layout .dashboard-hygiene-card,
  .dashboard-value-layout .dashboard-growth-card,
  .dashboard-value-layout .dashboard-team-card,
  .dashboard-value-layout.is-executive-layout .dashboard-value-pipeline,
  .dashboard-value-layout.is-executive-layout .dashboard-hygiene-card {
    grid-column:1;
    grid-row:auto;
  }
  .dashboard-value-layout .dashboard-action-card { order:1; }
  .dashboard-value-layout .dashboard-future-card { order:2; }
  .dashboard-value-layout .dashboard-recommendations { order:3; }
  .dashboard-value-layout .dashboard-value-pipeline { order:4; }
  .dashboard-value-layout .dashboard-hygiene-card { order:5; }
  .dashboard-value-layout .dashboard-growth-card { order:6; }
  .dashboard-value-layout .dashboard-team-card { order:7; }
}
@media (max-width:900px) {
  .dashboard-native-scroll .crm-sidebar { position:fixed; top:auto; }
}
@media (max-width:720px) {
  .dashboard-page.dashboard-value-page { padding:16px 16px 92px; }
  .dashboard-value-kpis { grid-template-columns:1fr; }
  .dashboard-value-kpi { padding:17px; }
  .dashboard-value-header { min-height:68px; padding:15px 16px; }
  .dashboard-priority-list,.dashboard-opportunity-list,.dashboard-growth-list,.dashboard-hygiene-list,.dashboard-horizon-list { padding-right:16px; padding-left:16px; }
  .dashboard-priority { grid-template-columns:9px minmax(0,1fr); }
  .dashboard-priority-action { display:none; }
  .dashboard-priority-copy small { white-space:normal; }
  .dashboard-pipeline-insight { grid-template-columns:1fr; }
  .dashboard-pipeline-metric { justify-content:flex-start; }
}
@font-face {
  font-family: 'General Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/general-sans-500.woff2') format('woff2');
}
@font-face {
  font-family: 'General Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/general-sans-600.woff2') format('woff2');
}
@font-face {
  font-family: 'General Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/general-sans-700.woff2') format('woff2');
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/inter-700.woff2') format('woff2');
}

/* ============================================================
   PERSONAUT CRM — Design System v1.1
   Based on Personaut semantic tokens
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Personaut primitives used by the provided semantic tokens */
  --colors-paper: #F2F0E9;
  --colors-punto: #FFC53D;
  --colors-gray-0: #ffffff;
  --colors-gray-50: #FAFAFB;
  --colors-gray-100: #E4E5EA;
  --colors-gray-200: #E4E5EA;
  --colors-gray-300: #C4C6D1;
  --colors-gray-400: #8A8CA0;
  --colors-gray-500: #54566B;
  --colors-gray-600: #54566B;
  --colors-gray-700: #33354A;
  --colors-gray-800: #33354A;
  --colors-gray-900: #191A23;
  --colors-gray-950: #191A23;

  --colors-blue-50: #F0F3FF;
  --colors-blue-100: #CBD5FF;
  --colors-blue-200: #CBD5FF;
  --colors-blue-300: #95A9FF;
  --colors-blue-400: #5E7AFF;
  --colors-blue-500: #3452FF;
  --colors-blue-600: #1B2FB8;
  --colors-blue-700: #1B2FB8;
  --colors-blue-800: #0E1B80;
  --colors-blue-900: #0E1B80;
  --colors-blue-950: #0E1B80;

  --colors-green-50: #E3F6EC;
  --colors-green-200: #E3F6EC;
  --colors-green-400: #1FAA6D;
  --colors-green-500: #1FAA6D;
  --colors-green-600: #1FAA6D;
  --colors-green-950: #1FAA6D;
  --colors-orange-50: #FCF1DA;
  --colors-orange-200: #FCF1DA;
  --colors-orange-400: #C98A0E;
  --colors-orange-500: #C98A0E;
  --colors-orange-600: #C98A0E;
  --colors-red-50: #FCE8E6;
  --colors-red-200: #FCE8E6;
  --colors-red-400: #E0483E;
  --colors-red-500: #E0483E;
  --colors-red-600: #E0483E;
  --colors-red-950: #E0483E;
  --colors-yellow-50: #FCF1DA;
  --colors-yellow-200: #FCF1DA;
  --colors-yellow-400: #FFC53D;
  --colors-yellow-500: #FFC53D;
  --colors-yellow-600: #C98A0E;
  --colors-yellow-950: #C98A0E;
  --colors-teal-50: #E3F6EC;
  --colors-teal-200: #E3F6EC;
  --colors-teal-400: #1FAA6D;
  --colors-teal-500: #1FAA6D;
  --colors-teal-600: #1FAA6D;
  --colors-teal-950: #1FAA6D;
  --colors-sky-50: #E4F5FB;
  --colors-sky-200: #E4F5FB;
  --colors-sky-400: #2AA0D8;
  --colors-sky-500: #2AA0D8;
  --colors-sky-600: #2AA0D8;
  --colors-sky-950: #2AA0D8;
  --colors-purple-50: #F0F3FF;
  --colors-purple-200: #CBD5FF;
  --colors-purple-400: #8B6BFF;
  --colors-purple-500: #8B6BFF;
  --colors-purple-950: #33354A;
  --colors-pink-50: #FCE8E6;
  --colors-pink-200: #FCE8E6;
  --colors-pink-400: #FF6F59;
  --colors-pink-500: #FF6F59;
  --colors-pink-600: #E0483E;
  --colors-pink-950: #E0483E;

  --colors-alpha-blue-alpha-10: rgba(51,92,255,0.10);
  --colors-alpha-blue-alpha-16: rgba(51,92,255,0.16);
  --colors-alpha-blue-alpha-24: rgba(51,92,255,0.24);

  /* Light semantic tokens from the supplied palette */
  --static-static-black-950: var(--colors-gray-950);
  --static-static-white-0: var(--colors-gray-0);
  --bg-white-0: var(--colors-gray-0);
  --bg-strong-950: var(--colors-gray-950);
  --bg-weak-50: var(--colors-paper);
  --bg-sub-300: var(--colors-gray-300);
  --bg-surface-800: var(--colors-gray-800);
  --bg-soft-200: var(--colors-gray-200);
  --text-disabled-300: var(--colors-gray-300);
  --text-soft-400: var(--colors-gray-400);
  --text-sub-600: var(--colors-gray-600);
  --text-white-0: var(--colors-gray-0);
  --text-strong-950: var(--colors-gray-950);
  --border-white-0: var(--colors-gray-0);
  --border-sub-300: var(--colors-gray-300);
  --border-soft-200: var(--colors-gray-200);
  --border-strong-950: var(--colors-gray-950);
  --fg-white-0: var(--colors-gray-0);
  --fg-soft-400: var(--colors-gray-400);
  --fg-sub-600: var(--colors-gray-600);
  --fg-disabled-300: var(--colors-gray-300);
  --fg-strong-950: var(--colors-gray-950);
  --state-information-dark-950: var(--colors-blue-950);
  --state-information-lighter-50: var(--colors-blue-50);
  --state-information-light-200: var(--colors-blue-200);
  --state-information-base-500: var(--colors-blue-500);
  --state-stable-lighter-50: var(--colors-teal-50);
  --state-stable-light-200: var(--colors-teal-200);
  --state-stable-base-500: var(--colors-teal-500);
  --state-stable-dark-950: var(--colors-teal-950);
  --state-highlighted-lighter-50: var(--colors-pink-50);
  --state-highlighted-light-200: var(--colors-pink-200);
  --state-highlighted-base-500: var(--colors-pink-500);
  --state-highlighted-dark-950: var(--colors-pink-950);
  --state-verified-lighter-50: var(--colors-sky-50);
  --state-verified-light-200: var(--colors-sky-200);
  --state-verified-base-500: var(--colors-sky-500);
  --state-verified-dark-950: var(--colors-sky-950);
  --state-success-lighter-50: var(--colors-green-50);
  --state-success-light-200: var(--colors-green-200);
  --state-success-base-500: var(--colors-green-500);
  --state-success-dark-950: var(--colors-green-950);
  --state-warning-lighter-50: var(--colors-orange-50);
  --state-warning-light-200: var(--colors-orange-200);
  --state-warning-base-500: var(--colors-orange-500);
  --state-warning-dark-950: var(--colors-yellow-950);
  --state-error-lighter-50: var(--colors-red-50);
  --state-error-light-200: var(--colors-red-200);
  --state-error-base-500: var(--colors-red-500);
  --state-error-dark-950: var(--colors-red-950);
  --state-away-lighter-50: var(--colors-yellow-50);
  --state-away-light-200: var(--colors-yellow-200);
  --state-away-base-500: var(--colors-yellow-500);
  --state-away-dark-950: var(--colors-yellow-950);
  --state-feature-lighter-50: var(--colors-purple-50);
  --state-feature-light-200: var(--colors-purple-200);
  --state-feature-base-500: var(--colors-purple-500);
  --state-feature-dark-950: var(--colors-purple-950);
  --state-faded-lighter-100: var(--colors-gray-100);
  --state-faded-light-200: var(--colors-gray-200);
  --state-faded-base-500: var(--colors-gray-500);
  --state-faded-dark-950: var(--colors-gray-950);
  --brand-alpha-10: var(--colors-alpha-blue-alpha-10);
  --brand-alpha-16: var(--colors-alpha-blue-alpha-16);
  --brand-alpha-24: var(--colors-alpha-blue-alpha-24);
  --brand-lighter: var(--colors-blue-50);
  --brand-light: var(--colors-blue-100);
  --brand-base: var(--colors-blue-500);
  --brand-dark: var(--colors-blue-700);
  --brand-darker: var(--colors-blue-800);

  /* Backward-compatible app tokens */
  --paper: var(--colors-paper);
  --primary-25: var(--brand-lighter);
  --primary-50: var(--brand-lighter);
  --primary-100: var(--brand-light);
  --primary-200: var(--state-information-light-200);
  --primary-300: var(--colors-blue-300);
  --primary-400: var(--colors-blue-400);
  --primary-500: var(--brand-base);
  --primary-600: var(--brand-dark);
  --primary-700: var(--brand-dark);
  --primary-800: var(--brand-darker);
  --primary-900: var(--state-information-dark-950);

  --gray-25: var(--bg-white-0);
  --gray-50: var(--paper);
  --gray-100: var(--paper);
  --gray-200: var(--border-soft-200);
  --gray-300: var(--border-sub-300);
  --gray-400: var(--text-soft-400);
  --gray-500: var(--state-faded-base-500);
  --gray-600: var(--text-sub-600);
  --gray-700: var(--colors-gray-700);
  --gray-800: var(--bg-surface-800);
  --gray-900: var(--bg-strong-950);

  --success-50: var(--state-success-lighter-50);
  --success-100: var(--state-success-light-200);
  --success-500: var(--state-success-base-500);
  --success-600: var(--colors-green-600);
  --success-700: var(--state-success-dark-950);

  --warning-50: var(--state-warning-lighter-50);
  --warning-100: var(--state-warning-light-200);
  --warning-500: var(--state-warning-base-500);
  --warning-600: var(--colors-orange-600);
  --warning-700: var(--state-warning-dark-950);

  --error-50: var(--state-error-lighter-50);
  --error-100: var(--state-error-light-200);
  --error-200: var(--state-error-light-200);
  --error-500: var(--state-error-base-500);
  --error-600: var(--colors-red-600);
  --error-700: var(--state-error-dark-950);

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(16,24,40,0.05);
  --shadow-sm: 0 1px 3px rgba(16,24,40,0.10), 0 1px 2px rgba(16,24,40,0.06);
  --shadow-md: 0 4px 8px -2px rgba(16,24,40,0.10), 0 2px 4px -2px rgba(16,24,40,0.06);
  --shadow-lg: 0 12px 16px -4px rgba(16,24,40,0.08), 0 4px 6px -2px rgba(16,24,40,0.03);
  --shadow-xl: 0 20px 24px -4px rgba(16,24,40,0.08), 0 8px 8px -4px rgba(16,24,40,0.03);

  /* Layout */
  --sidebar-width: 260px;
  --header-height: 64px;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;
  --radius-full: 9999px;
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'General Sans', 'Inter', system-ui, sans-serif;
  font-size: 14px;
  color: var(--gray-700);
  background: var(--gray-50);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }

/* ── Layout Shell ──────────────────────────────────────────── */
.crm-layout {
  display: flex;
  height: 100vh;
  overflow: hidden;
  background: var(--gray-50);
}

/* ── Sidebar ───────────────────────────────────────────────── */
.crm-sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--gray-900);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid color-mix(in srgb, var(--static-static-white-0) 8%, transparent);
  box-shadow: 4px 0 16px color-mix(in srgb, var(--gray-950) 16%, transparent);
}

.sidebar-logo {
  display: flex;
  align-items: center;
  height: var(--header-height);
  padding: 0 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--static-static-white-0) 8%, transparent);
  flex-shrink: 0;
}

.sidebar-logo a {
  display: inline-flex;
  align-items: center;
}

.sidebar-logo img {
  width: 150px;
  height: auto;
}

.sidebar-nav {
  flex: 1;
  padding: 18px 12px;
}

.sidebar-section-label {
  padding: 18px 12px 8px;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-400);
}

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 38px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-300);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
  margin-bottom: 3px;
  position: relative;
}

.sidebar-nav a:hover {
  background: color-mix(in srgb, var(--static-static-white-0) 7%, transparent);
  color: var(--static-static-white-0);
}

.sidebar-nav a.active {
  background: color-mix(in srgb, var(--static-static-white-0) 12%, transparent);
  color: var(--static-static-white-0);
  box-shadow: inset 3px 0 0 var(--primary-500);
}

.sidebar-nav a .nav-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  opacity: 0.85;
  stroke-width: 2;
}

.sidebar-nav a.active .nav-icon { opacity: 1; }

.sidebar-user {
  padding: 14px 16px;
  border-top: 1px solid color-mix(in srgb, var(--static-static-white-0) 8%, transparent);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.sidebar-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--primary-700);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--static-static-white-0);
  flex-shrink: 0;
}

.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-link {
  display: block;
  color: var(--static-static-white-0);
  text-decoration: none;
}
.sidebar-user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--static-static-white-0);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-user-role {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 1px;
}
.sidebar-version {
  font-size: 10px;
  line-height: 1.35;
  color: var(--gray-500);
  margin-top: 3px;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-logout {
  font-size: 11px;
  color: var(--error-500);
  text-decoration: none;
  display: block;
  margin-top: 2px;
  transition: color 0.15s;
}
.sidebar-logout:hover { color: var(--error-600); }

.admin-sidebar {
  width: 240px;
}

.admin-sidebar-logo img {
  width: 130px;
}

.admin-sidebar-nav {
  padding-top: 0;
}

/* Notification badge in nav */
.nav-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: var(--error-500);
  color: var(--static-static-white-0);
  font-size: 10px;
  font-weight: 700;
  border-radius: var(--radius-full);
  box-shadow: 0 0 0 2px var(--gray-900);
}

/* ── Main area ─────────────────────────────────────────────── */
.crm-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ── Topbar ────────────────────────────────────────────────── */
.crm-topbar {
  height: var(--header-height);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: var(--static-static-white-0);
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow-xs);
  gap: 16px;
}

.topbar-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.topbar-actions select {
  width: auto;
  min-width: 160px;
  max-width: 220px;
}

.global-search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.global-search-input {
  width: 260px;
  height: 38px;
  padding: 8px 12px 8px 36px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 600;
  outline: none;
  transition: width 0.16s ease, background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.global-search-input::placeholder {
  color: var(--gray-400);
  font-weight: 600;
}

.global-search-input:focus {
  width: 320px;
  background: var(--static-static-white-0);
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--brand-alpha-16);
}

.global-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  width: 15px;
  height: 15px;
  color: var(--gray-400);
  pointer-events: none;
  transform: translateY(-50%);
}

.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  width: 380px;
  max-height: 480px;
  overflow-y: auto;
  display: none;
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.search-dropdown.open { display: block; }

.search-category {
  padding: 10px 14px 5px;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-400);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.search-category:first-child { border-top: none; }

.search-result {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  color: inherit;
  text-decoration: none;
}

.search-result:hover { background: var(--gray-50); }

.search-result-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--gray-700);
  font-size: 10px;
  font-weight: 800;
}

.search-result-body { flex: 1; min-width: 0; }

.search-result-title {
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-sub {
  margin-top: 2px;
  color: var(--gray-400);
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty {
  padding: 20px;
  color: var(--gray-400);
  font-size: 13px;
  text-align: center;
}

@media (max-width: 980px) {
  .crm-topbar {
    align-items: flex-start;
    height: auto;
    min-height: var(--header-height);
    padding: 14px 18px;
    flex-direction: column;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .global-search-wrap,
  .global-search-input,
  .global-search-input:focus {
    width: 100%;
  }

  .search-dropdown {
    width: min(100%, 380px);
  }
}

.exec-filter-select {
  width: auto !important;
  min-width: 190px;
  max-width: 260px;
  height: 38px;
  padding: 8px 38px 8px 13px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background-color: var(--static-static-white-0);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
  line-height: 20px;
  box-shadow: var(--shadow-xs);
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--gray-500) 50%),
    linear-gradient(135deg, var(--gray-500) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) 16px,
    calc(100% - 12px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.exec-filter-select:hover {
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.exec-filter-select:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--brand-alpha-16);
  outline: none;
}

.task-view-switch {
  position: relative;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 168px;
  height: 38px;
  padding: 3px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
}

.task-view-switch::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: calc(50% - 3px);
  height: 30px;
  border-radius: var(--radius-full);
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xs);
  transition: transform .18s ease;
}

.task-view-switch.is-kanban::before { transform: translateX(100%); }

.task-view-option {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 30px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  border-radius: var(--radius-full);
}

.task-view-switch[data-view="list"] .task-view-option[data-view="list"],
.task-view-switch[data-view="kanban"] .task-view-option[data-view="kanban"] {
  color: var(--gray-900);
}

.task-view-option svg {
  width: 13px;
  height: 13px;
}

/* ── Content ───────────────────────────────────────────────── */
.crm-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--primary-600);
  color: var(--static-static-white-0);
  border-color: var(--primary-600);
}
.btn-primary:hover { background: var(--primary-700); border-color: var(--primary-700); }

.btn-outline {
  background: var(--static-static-white-0);
  color: var(--gray-700);
  border-color: var(--gray-300);
  box-shadow: var(--shadow-xs);
}
.btn-outline:hover { background: var(--gray-50); }

.btn-ghost {
  background: transparent;
  color: var(--gray-600);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--gray-100); color: var(--gray-800); }

.btn-danger {
  background: var(--error-600);
  color: var(--static-static-white-0);
  border-color: var(--error-600);
}
.btn-danger:hover { background: var(--error-700); }

.btn-success {
  background: var(--success-600);
  color: var(--static-static-white-0);
  border-color: var(--success-600);
}
.btn-success:hover { background: var(--success-700); }

.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-lg { padding: 11px 20px; font-size: 15px; }

/* ── Form Elements ─────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }

.form-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-700);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 9px 13px;
  font-size: 14px;
  font-family: inherit;
  color: var(--gray-900);
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xs);
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--gray-400); }

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-500);
  box-shadow: 0 0 0 3px var(--brand-alpha-16);
}

.volt-date-field {
  position: relative;
  width: 100%;
}

.volt-date-field .form-input {
  position: relative;
  padding-right: 40px;
  color-scheme: light;
}

.volt-date-icon {
  position: absolute;
  right: 13px;
  top: 50%;
  width: 16px;
  height: 16px;
  color: var(--gray-400);
  pointer-events: none;
  transform: translateY(-50%);
  z-index: 1;
}

.volt-date-field .form-input:focus + .volt-date-icon,
.volt-date-field:focus-within .volt-date-icon {
  color: var(--primary-600);
}

.volt-date-field input[type="date"]::-webkit-calendar-picker-indicator,
.volt-date-field input[type="time"]::-webkit-calendar-picker-indicator,
.volt-date-field input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 40px;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.form-textarea { resize: vertical; min-height: 80px; line-height: 1.5; }

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.section-divider {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-400);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
  margin-top: 8px;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

.card-body { padding: 20px; }
.card-footer {
  padding: 14px 20px;
  border-top: 1px solid var(--gray-200);
  background: var(--gray-50);
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* KPI Stat Card */
.stat-card {
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px;
}
.stat-card-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-lg);
  background: var(--primary-50);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-card-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1;
}
.stat-card-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}
.stat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}

/* ── Badges ────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 600;
  border-radius: var(--radius-full);
}

.badge-gray    { background: var(--gray-100);    color: var(--gray-600); }
.badge-primary { background: var(--primary-50);  color: var(--primary-700); }
.badge-success { background: var(--success-50);  color: var(--success-700); }
.badge-warning { background: var(--warning-50);  color: var(--warning-700); }
.badge-error   { background: var(--error-50);    color: var(--error-700); }
.badge-purple  { background: var(--primary-100); color: var(--primary-800); }

.badge-dot {
  width: 6px; height: 6px;
  border-radius: var(--radius-full);
  background: currentColor;
}

/* ── Tables ────────────────────────────────────────────────── */
.table-wrap {
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
  gap: 12px;
  flex-wrap: wrap;
}

.table-toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.table-toolbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.table-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-500);
  background: var(--gray-100);
  border-radius: var(--radius-full);
  padding: 2px 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

thead tr {
  background: var(--gray-50);
  border-bottom: 1px solid var(--gray-200);
}

th {
  padding: 11px 20px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  white-space: nowrap;
}

td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
  color: var(--gray-700);
}

tr:last-child td { border-bottom: none; }

tbody tr {
  transition: background 0.1s;
  cursor: pointer;
}
tbody tr:hover td { background: var(--gray-25); }

.td-name {
  font-weight: 600;
  color: var(--gray-900);
}

/* ── Panel / Drawer ────────────────────────────────────────── */
.panel-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--static-static-black-950) 45%, transparent);
  z-index: 100;
  backdrop-filter: blur(2px);
}
.panel-overlay.open { display: block; }

.panel {
  position: fixed;
  top: 0; right: -620px;
  width: 600px;
  height: 100vh;
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xl);
  border-left: 1px solid var(--gray-200);
  z-index: 101;
  transition: right 0.25s cubic-bezier(0.4,0,0.2,1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.panel.open { right: 0; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--gray-200);
  border-top: 0;
  background: linear-gradient(180deg, var(--gray-25), var(--static-static-white-0));
  flex-shrink: 0;
}

.panel-header h2 {
  font-size: 17px;
  font-weight: 800;
  color: var(--gray-900);
}

.panel-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border: 1px solid var(--gray-200);
  background: var(--static-static-white-0);
  border-radius: var(--radius-md);
  color: var(--gray-500);
  font-size: 20px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.panel-close:hover { background: var(--gray-100); color: var(--gray-700); border-color: var(--gray-300); }

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 22px;
  background: var(--static-static-white-0);
}

.panel-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--gray-200);
  flex-shrink: 0;
  background: var(--gray-50);
}

/* ── Volt-style item modal (kanban items) ──────────────────── */
.volt-modal-overlay {
  background: color-mix(in srgb, var(--static-static-black-950) 58%, transparent);
  backdrop-filter: blur(1px);
}

.panel.volt-task-modal {
  top: 50%;
  left: 50%;
  right: auto;
  width: min(800px, calc(100vw - 32px));
  height: auto;
  max-height: calc(100vh - 32px);
  border: 1px solid var(--gray-200);
  border-left: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -48%) scale(0.98);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.panel.volt-task-modal.open {
  right: auto;
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.panel.volt-client-modal {
  width: min(920px, calc(100vw - 32px));
}

.panel.volt-client-modal .panel-body {
  max-height: calc(100vh - 190px);
}

.volt-client-modal .panel-footer .btn-outline {
  background: var(--static-static-white-0);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

.volt-client-modal .panel-footer .btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.volt-task-modal .panel-header {
  padding: 26px 32px 16px;
  border-top: none;
  background: var(--static-static-white-0);
}

.volt-task-modal .panel-header h2 {
  font-size: 21px;
  line-height: 1.25;
}

.volt-task-modal .panel-close {
  width: 36px;
  height: 36px;
  border-color: transparent;
  font-size: 24px;
}

.volt-task-modal .panel-body {
  padding: 20px 32px 24px;
  max-height: calc(100vh - 190px);
}

.volt-task-modal .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.volt-task-modal .form-group {
  gap: 7px;
}

.volt-task-modal .form-group label,
.volt-task-modal .form-label {
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
}

.volt-task-modal input:not([type="hidden"]),
.volt-task-modal select,
.volt-task-modal textarea,
.volt-task-modal .form-input,
.volt-task-modal .form-select,
.volt-task-modal .form-textarea {
  min-height: 42px;
  padding: 10px 12px;
  color: var(--gray-900);
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: none;
  font-size: 14px;
  line-height: 1.45;
}

.volt-task-modal textarea,
.volt-task-modal .form-textarea {
  min-height: 96px;
}

.volt-task-modal input:focus,
.volt-task-modal select:focus,
.volt-task-modal textarea:focus,
.volt-task-modal .form-input:focus,
.volt-task-modal .form-select:focus,
.volt-task-modal .form-textarea:focus {
  border-color: var(--brand-base);
  box-shadow: 0 0 0 3px var(--brand-alpha-16);
  outline: none;
}

.volt-task-modal .section-divider {
  margin: 8px 0 2px;
  padding: 0;
  border: none;
  color: var(--gray-900);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.volt-task-modal .contact-block,
.volt-task-modal .add-policy-form {
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.volt-task-modal .contact-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.volt-task-modal .ci-label {
  display: block;
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 800;
  margin-bottom: 4px;
}

.volt-task-modal .ci-value {
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 700;
}

.volt-task-modal .ci-value.empty {
  color: var(--gray-400);
}

.volt-task-modal .add-policy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  margin-top: 10px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--gray-50);
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.volt-task-modal .add-policy-btn:hover {
  background: var(--brand-lighter);
  border-color: var(--brand-alpha-24);
  color: var(--brand-dark);
}

.volt-task-modal .policy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 10px;
}

.volt-task-modal .policy-row .btn-ghost {
  width: 42px;
  height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--static-static-white-0);
  color: var(--gray-500);
  font-size: 18px;
  line-height: 1;
}

.volt-task-modal .policy-row .btn-ghost:hover {
  background: var(--error-50);
  border-color: var(--error-100);
  color: var(--error-600);
}

.volt-task-modal .panel-footer {
  justify-content: flex-start;
  padding: 16px 32px 30px;
  background: var(--static-static-white-0);
  border-top: 1px solid var(--gray-200);
}

.volt-task-modal .panel-footer .btn {
  min-height: 38px;
}

.volt-task-modal .panel-footer .btn-outline {
  background: var(--gray-900);
  border-color: var(--gray-900);
  color: var(--static-static-white-0);
}

.volt-task-modal .panel-footer .btn-outline:hover {
  background: var(--gray-800);
  border-color: var(--gray-800);
}

.prospect-activation-cta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.prospect-activation-confirm {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border: 1px solid var(--warning-200);
  border-radius: var(--radius-md);
  background: var(--warning-50);
  color: var(--gray-800);
  box-shadow: var(--shadow-xs);
}

.prospect-activation-confirm span {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.prospect-activation-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.prospect-stepper {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 0 12px;
  background: var(--static-static-white-0);
}

.prospect-step {
  min-height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.prospect-step span {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--static-static-white-0);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 800;
}

.prospect-step.active {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-800);
}

.prospect-step.active span,
.prospect-step.complete span {
  background: var(--primary-600);
  color: var(--static-static-white-0);
}

.prospect-step.complete {
  color: var(--gray-700);
}

.prospect-assignee-field {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--primary-200);
  border-radius: var(--radius-lg);
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xs);
}

.prospect-form-step {
  display: none;
}

.prospect-form-step.active {
  display: block;
}

.prospect-services-box {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.prospect-services-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.prospect-services-head label {
  display: block;
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 3px;
}

.prospect-services-head p,
.prospect-services-empty {
  margin: 0;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
}

.prospect-services-empty {
  padding: 12px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--static-static-white-0);
}

.prospect-footer-spacer {
  flex: 1;
}

/* ── Volt-style drawer forms (clients) ─────────────────────── */
.volt-form-panel .panel-header {
  border-top: 0;
  background: linear-gradient(180deg, var(--gray-25), var(--static-static-white-0));
}

.volt-form-panel .panel-header h2 {
  font-size: 18px;
  font-weight: 800;
}

.volt-form-panel .panel-body {
  padding: 22px;
}

.volt-form-panel .form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 20px;
}

.volt-form-panel .form-group {
  gap: 7px;
}

.volt-form-panel .form-group label,
.volt-form-panel .form-label {
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 700;
}

.volt-form-panel input:not([type="hidden"]),
.volt-form-panel select,
.volt-form-panel textarea,
.volt-form-panel .form-input,
.volt-form-panel .form-select,
.volt-form-panel .form-textarea {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  color: var(--gray-900);
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  box-shadow: none;
  font-size: 14px;
  line-height: 1.45;
}

.volt-form-panel input[type="file"] {
  padding: 9px 12px;
}

.import-client-modal .panel-body {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.import-client-intro {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xs);
}

.import-client-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--brand-dark);
  background: var(--primary-50);
}

.import-client-intro p {
  margin: 0 0 12px;
  color: var(--gray-600);
  font-size: 13px;
  line-height: 1.5;
}

.import-file-field {
  margin: 0;
}

.import-file-input {
  cursor: pointer;
}

.import-template-spec {
  padding: 14px 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  color: var(--gray-500);
  background: var(--gray-50);
  font-size: 12px;
  line-height: 1.7;
}

.import-template-spec strong {
  color: var(--gray-700);
  font-weight: 600;
}

.import-result {
  margin: 0;
}

.import-result-card {
  padding: 14px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  line-height: 1.5;
}

.import-result-card p {
  margin: 0;
  font-weight: 600;
}

.import-result-card ul {
  margin: 8px 0 0;
  padding-left: 18px;
  font-size: 12px;
}

.import-result-loading {
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  background: var(--gray-50);
}

.import-result-success {
  border: 1px solid var(--success-100);
  color: var(--success-700);
  background: var(--success-50);
}

.import-result-error {
  border: 1px solid var(--error-200);
  color: var(--error-700);
  background: var(--error-50);
}

.volt-form-panel textarea,
.volt-form-panel .form-textarea {
  min-height: 96px;
}

.volt-form-panel input:focus,
.volt-form-panel select:focus,
.volt-form-panel textarea:focus,
.volt-form-panel .form-input:focus,
.volt-form-panel .form-select:focus,
.volt-form-panel .form-textarea:focus {
  border-color: var(--brand-base);
  box-shadow: 0 0 0 3px var(--brand-alpha-16);
  outline: none;
}

.volt-form-panel .section-divider {
  margin: 8px 0 2px;
  padding: 0;
  border: none;
  color: var(--gray-900);
  font-size: 14px;
  letter-spacing: 0;
  text-transform: none;
}

.volt-form-panel .add-policy-form {
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.volt-form-panel .panel-footer {
  padding: 16px 22px;
  background: var(--gray-50);
}

.volt-form-panel .panel-footer .btn {
  min-height: 38px;
}

.volt-form-panel .panel-footer .btn-outline {
  background: var(--static-static-white-0);
}

.volt-form-panel .tabs {
  border: none;
  border-bottom: 1px solid var(--gray-200);
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.volt-form-panel .tab-btn {
  border-radius: 0;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
}

.volt-form-panel .tab-btn.active {
  color: var(--brand-dark);
  background: transparent;
  box-shadow: none;
  border-bottom-color: var(--brand-base);
}

.volt-form-panel .vfield,
.volt-form-panel .info-card {
  padding: 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}

@media (max-width: 820px) {
  .volt-form-panel .form-grid {
    grid-template-columns: 1fr;
  }
}

.volt-task-modal .tabs {
  border: none;
  border-bottom: 1px solid var(--gray-200);
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.volt-task-modal .tab-btn {
  border-radius: 0;
  padding: 10px 12px;
  border-bottom: 2px solid transparent;
}

.volt-task-modal .tab-btn.active {
  color: var(--brand-dark);
  background: transparent;
  box-shadow: none;
  border-bottom-color: var(--brand-base);
}

@media (max-width: 820px) {
  .panel.volt-task-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    right: auto;
  }

  .panel.volt-client-modal {
    width: calc(100vw - 20px);
    right: auto;
  }

  .volt-task-modal .panel-header,
  .volt-task-modal .panel-body,
  .volt-task-modal .panel-footer {
    padding-left: 18px;
    padding-right: 18px;
  }

  .volt-task-modal .form-grid,
  .volt-task-modal .contact-row,
  .volt-task-modal .policy-row {
    grid-template-columns: 1fr;
  }
}

/* ── Tabs ──────────────────────────────────────────────────── */
.tabs {
  display: flex;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 3px;
  margin-bottom: 20px;
  gap: 3px;
  background: var(--gray-50);
  overflow-x: auto;
}

.tab-btn {
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gray-500);
  background: transparent;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.tab-btn:hover { color: var(--gray-700); }
.tab-btn.active {
  color: var(--brand-dark);
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xs);
}

.tab-content { display: none; }
.tab-content.active { display: block; }

/* ── Kanban Canvas ─────────────────────────────────────────── */
.crm-canvas {
  display: flex;
  gap: 20px;
  padding: 0;
  overflow-x: auto;
  align-items: flex-start;
  flex: 1;
  width: 100%;
  min-width: 0;
  padding-bottom: 8px;
}

.prospects-topbar {
  min-height: var(--header-height);
}

.prospects-topbar-actions {
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.prospects-topbar-sub {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
}

.prospects-workspace {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--gray-100);
  min-width: 0;
}

.prospects-list-view {
  display: none;
  padding: 22px 28px 28px;
  overflow-y: auto;
}

.prospects-list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.prospects-list-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.prospects-list-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
}

.prospects-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 13px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  background: var(--static-static-white-0);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s;
}

.prospects-filter-pill span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 800;
}

.prospects-filter-pill:hover {
  border-color: var(--gray-300);
  color: var(--gray-900);
}

.prospects-filter-pill.active {
  background: var(--gray-900);
  border-color: var(--gray-900);
  color: var(--static-static-white-0);
}

.prospects-filter-pill.active span {
  background: color-mix(in srgb, var(--static-static-white-0) 18%, transparent);
  color: var(--static-static-white-0);
}

.prospects-list-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
  table-layout: fixed;
}

.prospects-list-table thead tr {
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xs);
}

.prospects-list-table thead th {
  padding: 12px 14px;
  background: var(--static-static-white-0);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  text-align: left;
  line-height: 1.2;
  white-space: nowrap;
}

.prospects-list-table thead th:first-child {
  border-left: 1px solid var(--gray-200);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.prospects-list-table thead th:last-child {
  border-right: 1px solid var(--gray-200);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.prospects-list-table th.prospect-col-main { width: 34%; }
.prospects-list-table th.prospect-col-stage { width: 12%; }
.prospects-list-table th.prospect-col-tags { width: 16%; }
.prospects-list-table th.prospect-col-products { width: 20%; }
.prospects-list-table th.prospect-col-activity { width: 18%; }

.prospects-list-heading {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.prospects-list-heading svg {
  width: 14px;
  height: 14px;
  color: var(--gray-400);
}

.prospects-list-row {
  cursor: pointer;
}

.prospects-list-row td {
  padding: 14px;
  background: var(--static-static-white-0);
  border-top: 1px solid var(--gray-200);
  border-bottom: 1px solid var(--gray-200);
  vertical-align: top;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}

.prospects-list-row td:first-child {
  border-left: 1px solid var(--gray-200);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

.prospects-list-row td:last-child {
  border-right: 1px solid var(--gray-200);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.prospects-list-row:hover td {
  border-color: var(--brand-alpha-24);
  box-shadow: var(--shadow-xs);
}

.prospects-list-name {
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.prospects-list-meta {
  margin-top: 5px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  color: var(--gray-500);
  font-size: 12px;
}

.prospects-list-tags,
.prospects-list-products {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.prospects-canvas {
  display: grid;
  grid-template-columns: repeat(3, minmax(300px, 1fr));
  align-items: start;
  width: 100%;
  padding: 22px 28px 28px;
  gap: 24px;
}

.prospects-canvas .kanban-col {
  min-width: 0;
  width: auto;
  flex: none;
}

.kanban-col {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  min-width: 340px;
  flex: 1 0 340px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - var(--header-height) - 80px);
  border: 1px solid var(--gray-200);
  box-shadow: none;
}

.kanban-col-header {
  padding: 16px 16px 12px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  border-bottom: none;
  border-top: none;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  background: transparent;
}

.kanban-col-title {
  display: block;
  font-size: 13px;
  font-weight: 800;
  color: var(--gray-900);
}

.kanban-col-sub {
  display: block;
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
}

.kanban-col-menu,
.prospect-card-menu {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  color: var(--gray-500);
  background: transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.kanban-col-menu:hover,
.prospect-card-menu:hover {
  background: var(--static-static-white-0);
  border-color: var(--gray-200);
  color: var(--gray-800);
}

.kanban-col-body {
  padding: 4px 10px 10px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 60px;
  background: transparent;
}

.kanban-col-body.drag-over {
  background: var(--brand-alpha-10);
  border-radius: var(--radius-lg);
}

/* Kanban Card */
.prospect-card {
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
  box-shadow: var(--shadow-xs);
}

.prospect-card:hover {
  border-color: var(--brand-alpha-24);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.prospect-card.dragging { opacity: 0.5; transform: rotate(1.5deg); }

.prospect-card-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 10px;
}

.card-name {
  font-size: 14px;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.35;
  margin-bottom: 0;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--gray-500);
}

.card-meta span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-tags {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.card-last-note {
  font-size: 12px;
  color: var(--gray-600);
  line-height: 1.45;
  margin-top: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-note-date {
  font-size: 10px;
  color: var(--gray-400);
  margin-top: 4px;
  font-weight: 600;
}

.card-exec {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-100);
  font-weight: 700;
}

.prospect-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-100);
  color: var(--gray-400);
  font-size: 11px;
  font-weight: 700;
}

.prospect-card-footer strong {
  color: var(--gray-600);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kanban-empty {
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
  padding: 28px 10px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background: var(--static-static-white-0);
}

.kanban-add-card {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 0 10px 10px;
  padding: 10px 12px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.kanban-add-card:hover {
  background: var(--static-static-white-0);
  border-color: var(--brand-alpha-24);
  color: var(--brand-dark);
}

.prospect-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  order: 2;
  min-width: 30px;
  height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 800;
}

.prospect-card-menu { order: 3; }

.prospect-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 8px;
}

.prospect-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
}

@media (max-width: 820px) {
  .prospects-topbar {
    height: auto;
    min-height: var(--header-height);
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-direction: column;
  }

  .prospects-topbar .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .prospects-list-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .prospects-list-actions {
    justify-content: flex-start;
    width: 100%;
  }

  .prospects-canvas {
    display: flex;
    padding: 16px;
    gap: 16px;
  }

  .kanban-col {
    min-width: min(312px, calc(100vw - 48px));
    flex-basis: min(312px, calc(100vw - 48px));
    max-height: calc(100vh - 150px);
  }

  .panel {
    width: 100vw;
    right: -100vw;
  }

  .panel-body,
  .panel-header,
  .panel-footer {
    padding-left: 16px;
    padding-right: 16px;
  }
}

/* ── View Mode (read-only fields) ──────────────────────────── */
.view-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.vfield { display: flex; flex-direction: column; gap: 3px; }
.vfield.full { grid-column: 1 / -1; }

.vfield-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
}

.vfield-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-900);
}

.vfield-value.empty {
  color: var(--gray-400);
  font-style: italic;
  font-weight: 400;
}

.vsection-label {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--gray-400);
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gray-200);
  margin-top: 8px;
}

.view-stage-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}

/* ── Last note box ─────────────────────────────────────────── */
.last-note-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 12px 14px;
  grid-column: 1 / -1;
}

.last-note-box .ln-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--gray-400);
  margin-bottom: 4px;
}

.last-note-box .ln-date {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 5px;
}

.last-note-box .ln-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
  font-style: italic;
}

/* ── Activity Log ──────────────────────────────────────────── */
.log-entry {
  padding: 12px 14px;
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  border-left: 3px solid var(--gray-200);
  margin-bottom: 8px;
}

.log-entry.reminder   { border-left-color: var(--warning-500); }
.log-entry.call       { border-left-color: var(--success-500); }
.log-entry.email      { border-left-color: var(--primary-400); }
.log-entry.meeting    { border-left-color: var(--primary-600); }
.log-entry.stage_change { border-left-color: var(--gray-300); opacity: 0.7; }

.log-date {
  font-size: 11px;
  color: var(--gray-400);
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.log-type-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--gray-400);
  background: var(--gray-200);
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

.log-text {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.5;
}

/* ── Policy Cards ──────────────────────────────────────────── */
.policy-card {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 10px;
}

.policy-card-urgent {
  border-color: var(--error-200);
  background: var(--error-50);
}

.policy-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.policy-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-900);
}

.policy-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-500);
}

.policy-meta strong { color: var(--gray-800); }

.policy-renewal {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--gray-200);
  font-size: 12px;
  color: var(--gray-600);
}

/* Policy status badges */
.ps-active    { background: var(--success-50);  color: var(--success-700); }
.ps-expired   { background: var(--error-50);    color: var(--error-700); }
.ps-cancelled { background: var(--gray-100);    color: var(--gray-600); }
.ps-renovada  { background: var(--primary-50);  color: var(--primary-700); }

/* Expiry pills */
.expiry-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  margin: 6px 0;
}
.pill-expired { background: var(--error-50);   color: var(--error-700); }
.pill-danger  { background: var(--warning-50); color: var(--warning-700); }
.pill-warn    { background: var(--state-warning-lighter-50);           color: var(--state-warning-dark-950); }

/* ── Tags / Doc tags ───────────────────────────────────────── */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
}

.tag-green {
  background: var(--success-50);
  color: var(--success-700);
}

.doc-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }

.doc-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--warning-50);
  color: var(--warning-700);
  border-radius: var(--radius-full);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--warning-100);
  transition: background 0.15s;
}
.doc-tag:hover { background: var(--warning-100); }

.doc-del {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--warning-700);
  font-size: 14px;
  line-height: 1;
  opacity: 0.6;
  padding: 0;
}
.doc-del:hover { opacity: 1; }

/* ── Toggle Switch ─────────────────────────────────────────── */
.toggle-wrap { cursor: pointer; display: inline-flex; align-items: center; }

.toggle-track {
  width: 44px; height: 24px;
  background: var(--gray-300);
  border-radius: var(--radius-full);
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle-thumb {
  width: 20px; height: 20px;
  background: var(--static-static-white-0);
  border-radius: var(--radius-full);
  position: absolute;
  top: 2px; left: 2px;
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}

/* ── Autocomplete ──────────────────────────────────────────── */
.autocomplete-wrap { position: relative; }
.autocomplete-wrap input { width: 100%; }

.autocomplete-dropdown {
  position: absolute;
  top: 100%; left: 0; right: 0;
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: var(--shadow-md);
  z-index: 200;
  max-height: 200px;
  overflow-y: auto;
  display: none;
}
.autocomplete-dropdown.show { display: block; }

.ac-item {
  padding: 9px 13px;
  font-size: 13px;
  color: var(--gray-700);
  cursor: pointer;
  transition: background 0.1s;
}
.ac-item:hover { background: var(--gray-50); }
.ac-item.new { color: var(--primary-600); font-weight: 600; }

.ac-success input {
  border-color: var(--success-500) !important;
  background: var(--success-50);
}
.ac-success::after {
  content: '✓';
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  color: var(--success-600);
  font-weight: 700;
  font-size: 14px;
  pointer-events: none;
}

/* ── Alerts ────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 16px;
}

.alert-error   { background: var(--error-50);   border: 1px solid var(--error-200);   color: var(--error-700); }
.alert-success { background: var(--success-50); border: 1px solid var(--success-100); color: var(--success-700); }
.alert-warning { background: var(--warning-50); border: 1px solid var(--warning-100); color: var(--warning-700); }
.alert-info    { background: var(--primary-50); border: 1px solid var(--primary-100); color: var(--primary-700); }

/* Dashboard alert (full-width) */
.dash-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  margin-bottom: 20px;
  border-left: 4px solid;
}
.dash-alert-warn  { background: var(--warning-50); border-color: var(--warning-500); color: var(--warning-700); }
.dash-alert-info  { background: var(--primary-50); border-color: var(--primary-500); color: var(--primary-700); }

/* ── Notifications ─────────────────────────────────────────── */
.notif-card {
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  margin-bottom: 10px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  border-left: 4px solid transparent;
}
.notif-card.danger  { border-left-color: var(--error-500); }
.notif-card.warning { border-left-color: var(--warning-500); }
.notif-card.info    { border-left-color: var(--primary-400); }
.notif-card.reminder{ border-left-color: var(--primary-600); }
.notif-card.acked   { opacity: 0.5; }

.notif-title { font-size: 14px; font-weight: 700; color: var(--gray-900); margin-bottom: 3px; }
.notif-sub   { font-size: 12px; color: var(--gray-500); line-height: 1.5; }
.notif-date  { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.notif-body  { flex: 1; }
.notif-actions { display: flex; flex-direction: column; gap: 6px; flex-shrink: 0; }

.notif-section { margin-bottom: 28px; }
.notif-section-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-ack {
  background: var(--gray-100);
  color: var(--gray-600);
  border: none;
  border-radius: var(--radius-md);
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-ack:hover { background: var(--gray-200); }

/* ── Reminders ─────────────────────────────────────────────── */
.reminder-card {
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 14px 18px;
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  box-shadow: var(--shadow-xs);
  border-left: 4px solid var(--primary-500);
}
.reminder-card.done   { border-left-color: var(--gray-300); opacity: 0.6; }
.reminder-card.overdue{ border-left-color: var(--error-500); }

.rem-title { font-size: 14px; font-weight: 700; color: var(--gray-900); margin-bottom: 3px; }
.rem-sub   { font-size: 12px; color: var(--gray-500); }
.rem-date  { font-size: 11px; color: var(--gray-400); margin-top: 3px; }

/* ── Empty States ──────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 48px 24px;
  color: var(--gray-400);
}
.empty-state-icon { font-size: 40px; margin-bottom: 12px; }
.empty-state p { font-size: 14px; }

.empty-section {
  background: var(--gray-50);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  color: var(--gray-400);
  font-size: 13px;
  border: 1px dashed var(--gray-300);
}

/* ── Pipeline pills (dashboard) ────────────────────────────── */
.pipeline-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.stage-pill {
  background: var(--static-static-white-0);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-full);
  padding: 6px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-xs);
}

.stage-dot {
  width: 8px; height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

/* ── Dashboard pilot ───────────────────────────────────────── */
.dashboard-page {
  padding: 28px;
  background: var(--gray-50);
}

.dashboard-date {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--static-static-white-0);
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-xs);
}

.dashboard-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.dashboard-hero h1 {
  margin: 0;
  color: var(--gray-900);
  font-size: 28px;
  line-height: 1.15;
  font-weight: 800;
}

.dashboard-hero p {
  margin: 6px 0 0;
  color: var(--gray-500);
  font-size: 14px;
}

.dashboard-kicker {
  margin: 0 0 8px !important;
  color: var(--brand-dark) !important;
  font-size: 11px !important;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.dashboard-alerts {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.dashboard-alerts:empty { display: none; }

.dash-alert {
  min-height: 48px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid;
  border-left-width: 4px;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xs);
}

.dash-alert-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: color-mix(in srgb, currentColor 12%, transparent);
}

.dash-alert div {
  flex: 1;
  line-height: 1.45;
}

.dash-alert a {
  color: currentColor;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.dashboard-grid {
  display: grid;
  gap: 14px;
}

.dashboard-kpis {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 18px;
}

.dashboard-stat {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 18px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.dashboard-stat:hover {
  border-color: var(--brand-alpha-24);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.dashboard-stat-icon {
  width: 42px;
  height: 42px;
  border-radius: var(--radius-lg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-stat-brand { color: var(--brand-base); background: var(--brand-lighter); }
.dashboard-stat-warning { color: var(--warning-600); background: var(--warning-50); }
.dashboard-stat-success { color: var(--success-600); background: var(--success-50); }
.dashboard-stat-error { color: var(--error-600); background: var(--error-50); }

.dashboard-stat-label {
  display: block;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 7px;
}

.dashboard-stat strong {
  display: block;
  color: var(--gray-900);
  font-size: 27px;
  line-height: 1;
  font-weight: 800;
}

.dashboard-finance {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dashboard-finance-card {
  position: relative;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--brand-alpha-24);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--brand-lighter), var(--static-static-white-0));
  box-shadow: var(--shadow-sm);
}

.dashboard-finance-card::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 70px;
  height: 70px;
  border-radius: var(--radius-full);
  background: var(--brand-alpha-10);
  pointer-events: none;
}

.dashboard-finance-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-finance-card strong {
  display: block;
  color: var(--gray-900);
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  margin-bottom: 10px;
}

.dashboard-finance-card a,
.dashboard-card-link {
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.dashboard-finance-card p {
  color: var(--gray-500);
  font-size: 13px;
  margin: 0;
}

.dashboard-finance-muted {
  background: var(--static-static-white-0);
  border-color: var(--gray-200);
}

.dashboard-finance-muted::after {
  background: var(--success-50);
}

.dashboard-pipeline {
  overflow: hidden;
}

.dashboard-stage-list {
  display: grid;
  gap: 16px;
}

.dashboard-stage {
  display: grid;
  gap: 8px;
}

.dashboard-stage-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.dashboard-stage-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 700;
}

.dashboard-stage-meta i {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}

.dashboard-stage-meta strong {
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 800;
}

.dashboard-stage-track {
  height: 9px;
  overflow: hidden;
  border-radius: var(--radius-full);
  background: var(--gray-100);
}

.dashboard-stage-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

@media (max-width: 1180px) {
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .dashboard-page { padding: 20px; }
  .dashboard-hero { align-items: flex-start; flex-direction: column; }
  .dashboard-hero-actions { justify-content: flex-start; width: 100%; }
  .dashboard-kpis,
.dashboard-finance { grid-template-columns: 1fr; }
  .dashboard-stat { min-height: 86px; }
}

/* ── Clients list: Volt bootstrap tables style ─────────────── */
.clients-page {
  padding: 28px 24px;
  background: var(--gray-50);
}

.clients-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.clients-header-search {
  position: relative;
  width: min(320px, 32vw);
  min-width: 220px;
}

.clients-header-search .form-input {
  min-height: 38px;
  padding-left: 38px;
}

.clients-header-search-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  color: var(--gray-400);
  pointer-events: none;
  transform: translateY(-50%);
}

.volt-page-heading {
  margin-bottom: 24px;
}

.volt-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
}

.volt-breadcrumb strong {
  color: var(--gray-700);
  font-weight: 700;
}

.volt-page-heading h1 {
  color: var(--gray-900);
  font-size: 28px;
  line-height: 1.2;
  font-weight: 800;
  margin: 0 0 8px;
}

.volt-page-heading p {
  color: var(--gray-500);
  font-size: 14px;
  font-weight: 500;
  margin: 0;
}

.clients-table-wrap {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
}

.clients-exec-filter {
  width: auto;
  min-height: 38px;
}

.clients-more-menu {
  position: relative;
  display: inline-flex;
}

.clients-more-trigger {
  width: 38px;
  height: 38px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.clients-more-trigger:hover,
.clients-more-menu.open .clients-more-trigger {
  border-color: var(--brand-alpha-24);
  color: var(--ink-900);
  box-shadow: 0 0 0 4px var(--brand-alpha-10);
}

.clients-more-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: none;
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-md);
}

.clients-more-menu.open .clients-more-dropdown {
  display: block;
}

.clients-more-dropdown a {
  min-height: 36px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.clients-more-dropdown a:hover {
  color: var(--ink-900);
  background: var(--primary-50);
}

.prospects-more-menu {
  position: relative;
  display: inline-flex;
}

.prospects-more-trigger {
  width: 38px;
  height: 38px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-600);
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.prospects-more-trigger:hover,
.prospects-more-menu.open .prospects-more-trigger {
  border-color: var(--brand-alpha-24);
  color: var(--ink-900);
  box-shadow: 0 0 0 4px var(--brand-alpha-10);
}

.prospects-more-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 120;
  min-width: 190px;
  padding: 6px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: none;
  background: var(--static-static-white-0);
  box-shadow: var(--shadow-md);
}

.prospects-more-menu.open .prospects-more-dropdown {
  display: block;
}

.prospects-more-dropdown a {
  min-height: 36px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  color: var(--gray-700);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
}

.prospects-more-dropdown a:hover {
  color: var(--ink-900);
  background: var(--primary-50);
}

.personaut-data-table {
  width: 100%;
  min-width: 920px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--static-static-white-0);
  font-size: 14px;
}

.personaut-data-table thead tr {
  background: #05070d;
}

.personaut-data-table th {
  padding: 16px 24px;
  border-bottom: 1px solid #05070d;
  color: var(--static-static-white-0);
  font-size: 15px;
  font-weight: 400;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.personaut-data-table td {
  padding: 18px 24px;
  border-bottom: 1px solid var(--gray-100);
  color: var(--gray-700);
  font-size: 13px;
  vertical-align: middle;
}

.personaut-data-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.personaut-data-table tbody tr:hover td {
  background: var(--gray-50);
}

.personaut-data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-entity-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}

.data-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--primary-50);
  color: var(--primary-700);
  font-size: 12px;
  font-weight: 800;
}

.data-entity-main {
  min-width: 0;
}

.data-title {
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.data-subtitle {
  margin-top: 3px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.data-muted {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
}

.data-date {
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.data-metric {
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 800;
}

.data-action-btn {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--static-static-white-0);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.data-action-btn:hover {
  border-color: var(--primary-300);
  color: var(--primary-700);
  background: var(--primary-50);
}

.quick-view-btn {
  width: 34px;
  height: 34px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--static-static-white-0);
  color: var(--gray-500);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.quick-view-btn:hover {
  border-color: var(--primary-300);
  color: var(--primary-700);
  background: var(--primary-50);
}

.quick-view-shell {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.quick-view-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.quick-view-avatar {
  width: 48px;
  height: 48px;
  font-size: 14px;
}

.quick-view-hero-main {
  min-width: 0;
}

.quick-view-name {
  color: var(--gray-900);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.2;
}

.quick-view-subtitle {
  margin-top: 4px;
  color: var(--gray-500);
  font-size: 13px;
  font-weight: 500;
}

.quick-view-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.quick-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-full);
  background: var(--static-static-white-0);
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 700;
}

.quick-view-section {
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--static-static-white-0);
}

.quick-section-title {
  margin-bottom: 12px;
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 800;
}

.quick-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.quick-info-item {
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--gray-50);
}

.quick-info-item span,
.quick-policy-item span,
.quick-policy-item em,
.quick-alert-item span,
.quick-score-widget p,
.quick-view-loading,
.quick-empty {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
  font-style: normal;
}

.quick-info-item strong {
  display: block;
  margin-top: 4px;
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quick-policy-list,
.quick-alert-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-policy-item,
.quick-alert-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}

.quick-policy-item strong,
.quick-alert-item strong {
  display: block;
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 800;
}

.quick-policy-item span,
.quick-alert-item span {
  display: block;
  margin-top: 3px;
}

.quick-alert-item {
  display: block;
  border-color: var(--warning-200);
  background: var(--warning-50);
}

.quick-alert-item.urgent {
  border-color: var(--error-200);
  background: var(--error-50);
}

.quick-alert-item p {
  margin: 8px 0 0;
  color: var(--gray-600);
  font-size: 12px;
  line-height: 1.45;
}

.quick-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.quick-score-widget {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--static-static-white-0);
}

.quick-score-ring {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.quick-score-ring strong {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 800;
}

.quick-score-widget span {
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 800;
}

.quick-score-widget p {
  margin: 4px 0 0;
}

.client-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.client-source-card {
  min-height: 96px;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 7px;
  background: var(--gray-50);
  color: var(--gray-600);
  text-align: left;
  cursor: pointer;
}

.client-source-card strong {
  color: var(--gray-900);
  font-size: 15px;
  font-weight: 800;
}

.client-source-card span,
.client-flow-empty {
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.45;
}

.client-source-card.active {
  border-color: var(--primary-300);
  background: var(--primary-50);
  box-shadow: 0 0 0 3px var(--brand-alpha-10);
}

.client-source-panel {
  margin-top: 8px;
}

.client-prospect-select-field {
  margin: 0;
  padding: 16px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  background: var(--gray-50);
}

.client-prospect-select-field label {
  display: block;
  margin-bottom: 8px;
  color: var(--gray-900);
  font-size: 13px;
  font-weight: 800;
}

.client-prospect-select-field .form-select {
  min-height: 46px;
  background-color: var(--static-static-white-0);
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 700;
}

.client-prospect-select-field p {
  margin: 8px 0 0;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
}

.client-flow-empty {
  margin-top: 10px;
  padding: 12px;
  border: 1px dashed var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--gray-50);
}

.client-stepper {
  position: sticky;
  top: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0 0 12px;
  background: var(--static-static-white-0);
}

.client-step {
  min-height: 42px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  background: var(--gray-50);
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.client-step span {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--static-static-white-0);
  color: var(--gray-500);
  font-size: 11px;
  font-weight: 800;
}

.client-step.active {
  border-color: var(--primary-300);
  background: var(--primary-50);
  color: var(--primary-800);
}

.client-step.active span,
.client-step.complete span {
  background: var(--primary-600);
  color: var(--static-static-white-0);
}

.client-form-step {
  display: none;
}

.client-form-step.active {
  display: block;
}

.client-footer-spacer {
  flex: 1;
}

#new-client-footer {
  gap: 12px;
  padding: 16px 32px 24px;
  background: var(--static-static-white-0);
}

#new-client-footer .btn {
  min-height: 42px;
  padding: 0 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  justify-content: center;
}

#new-client-footer .btn-primary {
  min-width: 150px;
}

#new-client-footer .btn-outline {
  min-width: 112px;
  background: var(--static-static-white-0);
  border-color: var(--gray-300);
  color: var(--gray-700);
}

#new-client-footer .btn-outline:hover {
  background: var(--gray-50);
  border-color: var(--gray-400);
  color: var(--gray-900);
}

.client-conversion-confirm {
  max-width: min(560px, 100%);
  border-color: var(--warning-500);
  color: var(--warning-700);
}

.client-new-badge {
  display: none;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-full);
  background: var(--success-50);
  color: var(--success-700);
  border: 1px solid var(--success-100);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.client-new-badge.show {
  display: inline-flex;
  animation: client-new-badge-confirmed 2.6s ease;
}

@keyframes client-new-badge-confirmed {
  0% { opacity: 0; transform: translateX(-4px); }
  12%,
  78% { opacity: 1; transform: translateX(0); }
  100% { opacity: 0; transform: translateX(-4px); }
}

#new-client-footer .client-conversion-confirm .btn {
  min-height: 32px;
  min-width: 0;
  padding: 0 10px;
  font-size: 12px;
}

.data-table-footer {
  min-width: 920px;
  padding: 12px 16px;
  border-top: 1px solid var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  background: var(--static-static-white-0);
}

.data-table-page-size,
.data-table-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 12px;
  font-weight: 700;
}

.data-table-page-size .form-select {
  min-width: 76px;
  min-height: 34px;
  font-size: 12px;
}

.data-page-btn {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-md);
  background: var(--static-static-white-0);
  color: var(--gray-700);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.data-page-btn:hover:not(:disabled) {
  border-color: var(--primary-300);
  color: var(--primary-700);
  background: var(--primary-50);
}

.data-page-btn:disabled {
  color: var(--gray-300);
  cursor: not-allowed;
  background: var(--gray-50);
}

.data-page-status {
  min-width: 92px;
  text-align: center;
}

.clients-volt-table {
  font-size: 14px;
  min-width: 980px;
}

.clients-volt-table thead tr {
  background: #05070d;
}

.clients-volt-table th {
  padding: 16px 24px;
  color: var(--static-static-white-0);
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.clients-volt-table td {
  padding: 18px 24px;
  color: var(--gray-700);
  font-size: 13px;
}

.clients-volt-table tbody tr {
  cursor: pointer;
  transition: background 0.15s ease;
}

.clients-volt-table tbody tr:hover td {
  background: var(--gray-50);
}

.clients-row-index {
  width: 54px;
  color: var(--gray-600);
  font-weight: 800;
}

.client-accordion-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--gray-200);
  background: var(--static-static-white-0);
  border-radius: var(--radius-md);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  color: var(--gray-500);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.client-accordion-btn:hover {
  background: var(--gray-50);
  border-color: var(--gray-300);
  color: var(--gray-800);
}

.client-name-cell {
  min-width: 0;
}

.client-name-cell strong {
  display: block;
  color: var(--gray-900);
  font-size: 14px;
  font-weight: 800;
}

.client-tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 5px;
}

.client-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 800;
}

.client-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 800;
}

.table-muted {
  color: var(--gray-400);
  font-size: 12px;
  font-weight: 600;
}

.table-date {
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 700;
}

@media (max-width: 720px) {
  .clients-page { padding: 16px; }
  .clients-topbar {
    height: auto;
    min-height: var(--header-height);
    align-items: flex-start;
    padding-top: 12px;
    padding-bottom: 12px;
    flex-direction: column;
  }
  .clients-header-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .clients-header-search {
    width: 100%;
    min-width: 0;
  }
  .clients-more-menu {
    margin-left: auto;
  }
  .clients-more-dropdown {
    right: 0;
  }
  .prospects-more-menu {
    margin-left: auto;
  }
  .prospects-more-dropdown {
    right: 0;
  }
  .volt-page-heading h1 {
    font-size: 24px;
  }
  .data-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .quick-info-grid,
  .quick-widget-grid {
    grid-template-columns: 1fr;
  }
  .quick-policy-item {
    align-items: flex-start;
    flex-direction: column;
  }
  .client-source-grid,
  .client-stepper {
    grid-template-columns: 1fr;
    position: static;
  }
}

/* ── Team cards ────────────────────────────────────────────── */
.exec-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
}
.exec-row:last-child { border-bottom: none; }

.exec-avatar {
  width: 40px; height: 40px;
  border-radius: var(--radius-full);
  background: var(--primary-100);
  color: var(--primary-700);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px;
  flex-shrink: 0;
}

.exec-name { font-size: 14px; font-weight: 700; color: var(--gray-900); }
.exec-role { font-size: 12px; color: var(--gray-500); margin-top: 1px; }

.exec-stats { display: flex; gap: 14px; margin-top: 6px; }
.exec-stat  { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.exec-stat-value { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.exec-stat-label { font-size: 10px; color: var(--gray-500); }

.you-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 8px;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: 700;
  margin-left: 6px;
}

.status-dot-active   { color: var(--success-500); }
.status-dot-inactive { color: var(--gray-400); }

/* Plan banner */
.plan-banner {
  background: var(--primary-50);
  border: 1px solid var(--primary-100);
  border-radius: var(--radius-lg);
  padding: 14px 20px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.plan-info { font-size: 13px; color: var(--primary-800); }
.plan-progress { font-size: 12px; color: var(--primary-600); font-weight: 600; }

.limit-warn {
  background: var(--warning-50);
  border: 1px solid var(--warning-100);
  border-radius: var(--radius-lg);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--warning-700);
  margin-bottom: 16px;
}

/* ── Status badges (clients table) ────────────────────────── */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
}
.status-active   { background: var(--success-50);  color: var(--success-700); }
.status-inactive { background: var(--warning-50);  color: var(--warning-700); }
.status-expired  { background: var(--error-50);    color: var(--error-700); }

.policy-count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--primary-50);
  color: var(--primary-700);
  border-radius: var(--radius-full);
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
}

.expiry-warn   { color: var(--warning-600); font-size: 12px; font-weight: 600; }
.expiry-danger { color: var(--error-600);   font-size: 12px; font-weight: 600; }

/* ── Add policy form ───────────────────────────────────────── */
.add-policy-form {
  background: var(--primary-25);
  border: 1px dashed var(--primary-200);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 12px;
}

/* ── Toast ─────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 300;
  background: var(--gray-900);
  color: var(--static-static-white-0);
  padding: 12px 18px;
  border-radius: var(--radius-lg);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s, transform 0.2s;
  pointer-events: none;
  max-width: 320px;
}
.toast.show { opacity: 1; transform: translateY(0); }

/* ── Page title ────────────────────────────────────────────── */
.page-title { font-size: 24px; font-weight: 700; color: var(--gray-900); }
.page-sub   { font-size: 14px; color: var(--gray-500); margin-top: 4px; margin-bottom: 24px; }

/* ── Misc utilities ────────────────────────────────────────── */
.mb-4  { margin-bottom: 16px; }
.mb-6  { margin-bottom: 24px; }
.mt-4  { margin-top: 16px; }
.gap-2 { gap: 8px; }
.flex  { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.font-semibold { font-weight: 600; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11px; }
.text-gray-500 { color: var(--gray-500); }
.text-gray-900 { color: var(--gray-900); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Scrollbar styling ─────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }


/* ── Legacy class compatibility ────────────────────────────── */
.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-200);
  gap: 12px;
  flex-wrap: wrap;
}
.table-header .count {
  font-size: 13px;
  color: var(--gray-500);
}
.content {
  padding: 24px;
  flex: 1;
}
.icon { font-size: 40px; margin-bottom: 12px; }
.label { font-size: 13px; color: var(--gray-500); margin-top: 4px; }
.num { font-size: 28px; font-weight: 700; color: var(--primary-600); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.section-title { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 12px; }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; }
.form-card { background: var(--static-static-white-0); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 24px; }
.form-card h2 { font-size: 15px; font-weight: 700; color: var(--gray-900); margin-bottom: 20px; }
.team-card { background: var(--static-static-white-0); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.team-card-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-200); display: flex; align-items: center; justify-content: space-between; }
.team-card-header h2 { font-size: 15px; font-weight: 700; color: var(--gray-900); }
.exec-list { padding: 4px 0; }
.exec-actions { display: flex; gap: 6px; align-items: center; }
.status-dot { width: 8px; height: 8px; border-radius: var(--radius-full); display: inline-block; margin-left: 6px; }
.dot-active { background: var(--success-500); }
.dot-inactive { background: var(--gray-400); }
.you-badge { display: inline-flex; align-items: center; padding: 1px 8px; background: var(--primary-50); color: var(--primary-700); border-radius: var(--radius-full); font-size: 10px; font-weight: 700; margin-left: 6px; }
.mb-24 { margin-bottom: 24px; }
.notif-section-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-500); margin-bottom: 10px; }
.empty-section { background: var(--gray-50); border: 1px dashed var(--gray-300); border-radius: var(--radius-lg); padding: 20px; text-align: center; color: var(--gray-400); font-size: 13px; margin-bottom: 24px; }

/* ── Section title utility ─────────────────────────────────── */
.section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gray-500);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ── Login logo (white bg - no invert) ─────────────────────── */
.login-logo img {
  width: 160px;
  height: auto;
}

.password-toggle-wrap {
  position: relative;
}

.password-toggle-wrap .form-input.has-password-toggle {
  padding-right: 46px;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gray-400);
  background: transparent;
  cursor: pointer;
  transform: translateY(-50%);
}

.password-toggle-btn:hover {
  color: var(--gray-700);
  background: var(--gray-100);
}

.password-toggle-btn svg {
  width: 18px;
  height: 18px;
}

.mobile-nav-more,
.mobile-nav-overlay {
  display: none;
}

/* ── Mobile responsive shell ─────────────────────────────────
   Keeps the PHP web usable on phones while the future React app is built. */
@media (max-width: 900px) {
  html,
  body {
    height: auto;
    min-height: 100%;
    overflow-x: hidden;
  }

  .crm-layout {
    display: block;
    height: auto;
    min-height: 100vh;
    overflow: visible;
    padding-bottom: 84px;
  }

  .crm-main {
    display: block;
    min-height: 100vh;
    overflow: visible;
  }

  .crm-sidebar,
  .admin-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    z-index: 240;
    width: 100%;
    height: 76px;
    flex-direction: row;
    align-items: stretch;
    overflow: hidden;
    border-top: 1px solid color-mix(in srgb, var(--static-static-white-0) 10%, transparent);
    border-right: none;
    box-shadow: 0 -10px 28px rgba(14,18,27,0.18);
  }

  .mobile-nav-more {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--static-static-white-0);
    background: var(--primary-600);
    box-shadow: 0 10px 24px rgba(29,78,216,0.35);
    cursor: pointer;
  }

  .mobile-nav-more svg {
    width: 27px;
    height: 27px;
  }

  .sidebar-logo,
  .sidebar-section-label,
  .sidebar-user {
    display: none;
  }

  .sidebar-nav,
  .admin-sidebar-nav {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 72px 10px 8px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar,
  .admin-sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav a {
    flex: 0 0 72px;
    min-height: 56px;
    margin: 0;
    padding: 7px 5px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    border-radius: var(--radius-md);
    font-size: 10px;
    line-height: 1.1;
    text-align: center;
    white-space: normal;
  }

  .sidebar-nav a.active {
    box-shadow: inset 0 3px 0 var(--primary-500);
  }

  .sidebar-nav a .nav-icon {
    width: 18px;
    height: 18px;
  }

  .nav-badge {
    position: absolute;
    top: 5px;
    right: 12px;
    margin-left: 0;
  }

  body.mobile-nav-open {
    overflow: hidden;
  }

  .mobile-nav-overlay {
    position: fixed;
    inset: 0;
    z-index: 320;
    display: block;
    padding: 18px;
    background: rgba(14,18,27,0.72);
  }

  .mobile-nav-overlay[hidden] {
    display: none;
  }

  .mobile-nav-sheet {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 18px;
    background: var(--static-static-white-0);
    box-shadow: 0 24px 70px rgba(14,18,27,0.28);
  }

  .mobile-nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 18px 18px 14px;
    border-bottom: 1px solid var(--gray-200);
  }

  .mobile-nav-title {
    font-size: 18px;
    font-weight: 800;
    color: var(--gray-900);
  }

  .mobile-nav-close {
    width: 40px;
    height: 40px;
    border: 1px solid var(--gray-200);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-600);
    background: var(--static-static-white-0);
    cursor: pointer;
  }

  .mobile-nav-close svg {
    width: 20px;
    height: 20px;
  }

  .mobile-nav-list {
    flex: 1;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    align-content: start;
    padding: 16px;
    overflow-y: auto;
  }

  .mobile-nav-list a {
    min-height: 88px;
    margin: 0;
    padding: 14px 10px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--gray-700);
    background: var(--static-static-white-0);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
  }

  .mobile-nav-list a.active {
    border-color: var(--primary-500);
    color: var(--primary-700);
    background: var(--primary-50);
  }

  .mobile-nav-list .nav-icon {
    width: 22px;
    height: 22px;
  }

  .crm-topbar {
    position: sticky;
    top: 0;
    z-index: 80;
    align-items: stretch;
    height: auto;
    min-height: 0;
    padding: 12px 14px;
    flex-direction: column;
    gap: 10px;
  }

  .topbar-title {
    font-size: 18px;
    line-height: 1.25;
  }

  .topbar-actions,
  .topbar-right,
  .clients-header-actions,
  .table-toolbar,
  .table-toolbar-left,
  .table-toolbar-right {
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .topbar-actions > *,
  .topbar-right > *,
  .clients-header-actions > *,
  .table-toolbar-right > *,
  .table-toolbar-left > * {
    max-width: 100%;
  }

  .topbar-actions select,
  .topbar-actions .form-select,
  .exec-filter-select {
    width: 100% !important;
    min-width: 0;
    max-width: none;
  }

  .global-search-wrap,
  .global-search-input,
  .global-search-input:focus {
    width: 100%;
  }

  .search-dropdown {
    left: 0;
    right: 0;
    width: 100%;
    max-height: min(420px, calc(100vh - 150px));
  }

  .content,
  .clients-page,
  .dashboard-content,
  .crm-canvas,
  .page-content {
    padding: 14px !important;
  }

  .grid,
  .form-grid,
  .settings-form-grid,
  .growth-grid,
  .insured-view-grid,
  .policy-detail-grid,
  .email-grid,
  .kpi-grid {
    grid-template-columns: 1fr !important;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap table {
    min-width: 720px;
  }

  .table-toolbar {
    padding: 14px;
  }

  th,
  td {
    padding: 11px 12px;
  }

  .panel {
    left: 0;
    right: 0;
    top: auto;
    bottom: -100vh;
    width: 100%;
    height: min(92vh, 760px);
    border-left: none;
    border-top: 1px solid var(--gray-200);
    border-radius: 14px 14px 0 0;
    transition: bottom 0.22s ease;
  }

  .panel.open {
    right: 0;
    bottom: 0;
  }

  .panel.volt-task-modal,
  .panel.volt-client-modal,
  .panel.volt-form-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100% !important;
    height: min(92vh, 780px);
    max-height: 92vh;
    border-radius: 14px 14px 0 0;
    transform: translateY(12px);
  }

  .panel.volt-task-modal.open,
  .panel.volt-client-modal.open,
  .panel.volt-form-panel.open {
    transform: translateY(0);
  }

  .panel-header,
  .volt-task-modal .panel-header {
    padding: 16px 16px 12px;
  }

  .panel-header h2,
  .volt-task-modal .panel-header h2 {
    font-size: 18px;
    line-height: 1.25;
  }

  .panel-body,
  .volt-task-modal .panel-body,
  .volt-form-panel .panel-body {
    padding: 14px 16px 18px;
    max-height: none;
  }

  .panel-footer,
  .volt-task-modal .panel-footer,
  .volt-form-panel .panel-footer {
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    align-items: stretch;
    justify-content: stretch;
    flex-wrap: wrap;
  }

  .panel-footer .btn {
    flex: 1 1 140px;
    justify-content: center;
  }

  #new-client-footer {
    gap: 10px;
    padding: 12px 16px max(14px, env(safe-area-inset-bottom));
  }

  #new-client-footer .client-footer-spacer {
    display: none;
  }

  #new-client-footer .btn {
    flex: 1 1 calc(50% - 6px);
    min-width: 0;
    min-height: 44px;
  }

  #new-client-footer #client-save-btn {
    flex-basis: 100%;
  }

  #new-client-footer .client-conversion-confirm {
    flex: 1 1 100%;
    align-items: flex-start;
    justify-content: space-between;
  }

  .tabs {
    margin-bottom: 14px;
  }

  .tab-btn {
    flex: 0 0 auto;
  }

  .btn,
  .form-input,
  .form-select,
  .form-textarea,
  input:not([type="hidden"]),
  select,
  textarea {
    max-width: 100%;
  }

  .toast {
    left: 14px;
    right: 14px;
    bottom: 92px;
    max-width: none;
  }
}

/* Final typography override: side menu must stay regular/medium. */
.crm-sidebar .sidebar-nav a,
.admin-sidebar .sidebar-nav a,
.crm-sidebar .sidebar-user-name,
.admin-sidebar .sidebar-user-name,
.mobile-nav-list a {
  font-weight: 500;
}

.crm-sidebar .sidebar-section-label,
.admin-sidebar .sidebar-section-label,
.crm-sidebar .sidebar-user-role,
.admin-sidebar .sidebar-user-role,
.crm-sidebar .sidebar-version,
.admin-sidebar .sidebar-version {
  font-weight: 400;
}

/* Clean dashboard hero variant */
.dashboard-hero {
  min-height: 72px;
  align-items: center;
  margin-bottom: 12px;
  padding: 12px 14px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.dashboard-hero::after {
  content: none;
}

.dashboard-hero h1 {
  max-width: 620px;
  color: var(--reference-ink);
  font-size: clamp(14px, 1.25vw, 18px);
  line-height: 1.12;
  letter-spacing: 0;
  font-weight: 500;
}

.dashboard-hero p {
  max-width: 520px;
  margin-top: 4px;
  color: var(--reference-muted);
  font-size: 12px;
  line-height: 1.35;
  font-weight: 400;
}

.dashboard-kicker {
  min-height: auto;
  padding: 0;
  margin-bottom: 5px !important;
  background: transparent;
  color: var(--reference-muted) !important;
  font-size: 10px !important;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
}

.dashboard-hero-actions {
  align-self: center;
  gap: 8px;
}

.dashboard-hero-actions .btn {
  min-height: 32px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 500;
}

@media (max-width: 820px) {
  .dashboard-hero {
    min-height: auto;
    padding: 8px 0;
  }
}

/* ── First reference-aligned screen: CRM dashboard ─────────── */
.dashboard-page {
  padding: 0 8px 24px 0;
  background: transparent;
}

.dashboard-date {
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(25,26,35,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.72);
  color: var(--gray-600);
  box-shadow: none;
}

.dashboard-hero {
  position: relative;
  min-height: 212px;
  align-items: center;
  margin-bottom: 22px;
  padding: 30px;
  overflow: hidden;
  border: 1px solid rgba(25,26,35,0.09);
  border-radius: 30px;
  background:
    radial-gradient(circle at 86% 18%, rgba(52,82,255,0.24), transparent 24%),
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(242,240,233,0.68));
  box-shadow: var(--shadow-sm);
}

.dashboard-hero::after {
  content: "";
  position: absolute;
  right: 32px;
  bottom: -38px;
  width: 220px;
  height: 220px;
  border-radius: 999px;
  border: 38px solid rgba(52,82,255,0.12);
  pointer-events: none;
}

.dashboard-hero > * {
  position: relative;
  z-index: 1;
}

.dashboard-hero h1 {
  max-width: 620px;
  color: var(--ink-900);
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 850;
}

.dashboard-hero p {
  max-width: 440px;
  margin-top: 14px;
  color: var(--gray-600);
  font-size: 15px;
  line-height: 1.65;
}

.dashboard-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(52,82,255,0.12);
  color: var(--brand-darker) !important;
  letter-spacing: 0.06em;
}

.dashboard-hero-actions {
  align-self: flex-start;
  padding-top: 4px;
}

.dashboard-alerts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.dash-alert {
  min-height: 76px;
  padding: 16px;
  border: 1px solid rgba(25,26,35,0.10);
  border-left: 0;
  border-radius: 22px;
  box-shadow: var(--shadow-xs);
}

.dash-alert-warn {
  background: var(--warning-50);
  color: var(--warning-700);
}

.dash-alert-info {
  background: var(--brand-lighter);
  color: var(--brand-darker);
}

.dash-alert-icon {
  width: 40px;
  height: 40px;
  border-radius: 16px;
  background: rgba(255,255,255,0.54);
}

.dashboard-kpis {
  grid-template-columns: repeat(5, minmax(176px, 1fr));
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-stat {
  min-height: 148px;
  align-items: flex-start;
  flex-direction: column;
  gap: 18px;
  padding: 20px;
  border-color: rgba(25,26,35,0.09);
  border-radius: 26px;
  background: rgba(255,255,255,0.76);
  box-shadow: var(--shadow-sm);
}

.dashboard-stat:hover {
  border-color: rgba(52,82,255,0.28);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.dashboard-stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 18px;
}

.dashboard-stat-brand {
  color: var(--brand-darker);
  background: var(--brand-lighter);
}

.dashboard-stat-warning {
  color: var(--warning-700);
  background: var(--warning-50);
}

.dashboard-stat-success {
  color: var(--success-700);
  background: var(--success-50);
}

.dashboard-stat-error {
  color: var(--error-700);
  background: var(--error-50);
}

.dashboard-stat-label {
  color: var(--taupe-500);
  font-size: 12px;
  letter-spacing: 0.02em;
}

.dashboard-stat strong {
  color: var(--ink-900);
  font-size: 38px;
  letter-spacing: -0.03em;
}

.dashboard-finance {
  grid-template-columns: 1.18fr 0.82fr;
  gap: 16px;
  margin-bottom: 22px;
}

.dashboard-finance-card {
  min-height: 168px;
  padding: 24px;
  border-color: rgba(25,26,35,0.09);
  border-radius: 28px;
  background:
    radial-gradient(circle at 92% 24%, rgba(52,82,255,0.20), transparent 26%),
    linear-gradient(135deg, rgba(255,255,255,0.90), rgba(242,240,233,0.72));
  box-shadow: var(--shadow-sm);
}

.dashboard-finance-card::after {
  right: -22px;
  top: auto;
  bottom: -42px;
  width: 150px;
  height: 150px;
  border: 28px solid rgba(52,82,255,0.12);
  background: transparent;
}

.dashboard-finance-card strong {
  color: var(--ink-900);
  font-size: clamp(34px, 4vw, 48px);
  letter-spacing: -0.04em;
}

.dashboard-finance-card a,
.dashboard-card-link {
  color: var(--brand-darker);
}

.dashboard-finance-muted {
  background: rgba(255,255,255,0.72);
}

.dashboard-pipeline {
  border-radius: 28px;
  background: rgba(255,255,255,0.76);
}

.dashboard-pipeline .card-header {
  padding: 22px 24px 0;
  border-bottom: 0;
}

.dashboard-pipeline .card-title {
  color: var(--ink-900);
  font-size: 20px;
  letter-spacing: -0.01em;
}

.dashboard-pipeline .card-body {
  padding: 24px;
}

.dashboard-stage-list {
  gap: 18px;
}

.dashboard-stage-meta span {
  color: var(--gray-700);
}

.dashboard-stage-track {
  height: 13px;
  background: rgba(25,26,35,0.08);
}

@media (max-width: 1180px) {
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
  .dashboard-page {
    padding: 0 0 92px;
  }

  .dashboard-hero {
    min-height: auto;
    align-items: flex-start;
    padding: 24px;
    flex-direction: column;
  }

  .dashboard-hero-actions {
    width: 100%;
  }

  .dashboard-hero-actions .btn {
    flex: 1 1 150px;
  }

  .dashboard-alerts,
  .dashboard-kpis,
  .dashboard-finance {
    grid-template-columns: 1fr;
  }

  .dashboard-stat {
    min-height: 126px;
  }
}

/* ── Typography restraint: reference uses regular/medium rhythm ─ */
body {
  font-weight: 400;
}

.sidebar-nav a,
.sidebar-user-name,
.sidebar-logout,
.topbar-title,
.page-title,
.btn,
.form-label,
.card-title,
.table-toolbar-left h2,
.badge,
.table-count,
th,
.td-name,
.search-result-title,
.dashboard-kicker,
.dashboard-stat-label,
.dashboard-card-link,
.dashboard-stage-meta span,
.section-title,
.notif-section-label,
.mobile-nav-title,
.mobile-nav-list a {
  font-weight: 500;
}

.dashboard-hero h1,
.dashboard-stat strong,
.dashboard-finance-card strong,
.dashboard-pipeline .card-title,
.dashboard-stage-meta strong,
.stat-card-value,
.admin-kpi-value,
.num {
  font-weight: 600;
}

.sidebar-section-label,
.search-category,
.dashboard-kicker,
th {
  font-weight: 500;
}

.dashboard-hero p,
.dashboard-finance-card p,
.search-result-sub,
.sidebar-user-role,
.sidebar-version,
td {
  font-weight: 400;
}

@media (max-width: 640px) {
  .page-title,
  .volt-page-heading h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  .btn {
    min-height: 38px;
  }

  .table-toolbar-left,
  .table-toolbar-right {
    flex-direction: column;
  }

  .table-toolbar-left .btn,
  .table-toolbar-right .btn,
  .topbar-actions .btn,
  .topbar-right .btn {
    width: 100%;
    justify-content: center;
  }

  .plan-banner,
  .exec-row,
  .policy-card,
  .detail-list-card,
  .growth-widget-main,
  .client-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .exec-actions,
  .exec-stats {
    width: 100%;
    flex-wrap: wrap;
  }

  .policy-card {
    gap: 12px;
  }

  .search-result {
    padding: 11px 12px;
  }

  .prospect-stepper {
    grid-template-columns: 1fr;
    position: static;
  }

  .prospect-services-head {
    flex-direction: column;
  }

  .prospect-services-head .add-policy-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ============================================================
   Personaut CRM — Official Brand UI direction
   Based on the Personaut brandbook and official palette.
   ============================================================ */
:root {
  --reference-bg: #F2F0E9;
  --reference-ink: #191A23;
  --reference-taupe: #E4E5EA;
  --reference-brown: #33354A;
  --reference-muted: #54566B;
  --reference-earth: #3452FF;
  --reference-earth-dark: #1B2FB8;
  --paper: #F2F0E9;
  --punto: #FFC53D;

  --cream-25: var(--reference-bg);
  --cream-50: var(--reference-bg);
  --cream-100: color-mix(in srgb, var(--reference-bg) 78%, var(--static-static-white-0));
  --cream-200: var(--reference-taupe);
  --taupe-300: var(--reference-taupe);
  --taupe-500: var(--reference-muted);
  --earth-500: var(--reference-earth);
  --earth-600: var(--reference-earth-dark);
  --ink-900: var(--reference-ink);

  --brand-base: var(--reference-earth);
  --brand-dark: var(--reference-earth-dark);
  --brand-darker: var(--reference-brown);
  --brand-lighter: color-mix(in srgb, var(--reference-bg) 82%, var(--reference-earth));
  --brand-light: color-mix(in srgb, var(--reference-bg) 68%, var(--reference-earth));
  --brand-alpha-10: rgba(52,82,255,0.10);
  --brand-alpha-16: rgba(52,82,255,0.16);
  --brand-alpha-24: rgba(52,82,255,0.24);

  --primary-25: var(--brand-lighter);
  --primary-50: var(--brand-lighter);
  --primary-100: var(--brand-light);
  --primary-200: #CBD5FF;
  --primary-300: #95A9FF;
  --primary-400: #5E7AFF;
  --primary-500: var(--brand-base);
  --primary-600: var(--brand-dark);
  --primary-700: #1B2FB8;
  --primary-800: #0E1B80;
  --primary-900: #0E1B80;

  --gray-25: var(--cream-25);
  --gray-50: var(--paper);
  --gray-100: var(--paper);
  --gray-200: #E4E5EA;
  --gray-300: var(--cream-200);
  --gray-400: #8A8CA0;
  --gray-500: var(--reference-muted);
  --gray-600: #54566B;
  --gray-700: var(--reference-brown);
  --gray-800: #33354A;
  --gray-900: var(--ink-900);

  --success-50: #E3F6EC;
  --success-100: #E3F6EC;
  --success-500: #1FAA6D;
  --success-600: #1FAA6D;
  --success-700: #1FAA6D;
  --warning-50: #FCF1DA;
  --warning-100: #FCF1DA;
  --warning-500: #C98A0E;
  --warning-600: #C98A0E;
  --warning-700: #C98A0E;
  --error-50: #FCE8E6;
  --error-100: #FCE8E6;
  --error-200: #FCE8E6;
  --error-500: #E0483E;
  --error-600: #E0483E;
  --error-700: #E0483E;

  --sidebar-width: 276px;
  --header-height: 78px;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-xs: 0 1px 2px rgba(25,26,35,0.04);
  --shadow-sm: 0 14px 34px rgba(25,26,35,0.06);
  --shadow-md: 0 20px 46px rgba(25,26,35,0.09);
  --shadow-lg: 0 28px 70px rgba(25,26,35,0.14);
  --shadow-xl: 0 34px 90px rgba(25,26,35,0.18);
}

html,
body {
  color: var(--gray-700);
  background:
    radial-gradient(circle at 18% 10%, rgba(52,82,255,0.12), transparent 26%),
    var(--cream-50);
}

.crm-layout {
  gap: 16px;
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.46), transparent 36%),
    var(--cream-50);
}

.crm-sidebar {
  background: color-mix(in srgb, var(--static-static-white-0) 76%, var(--cream-100));
  border: 1px solid color-mix(in srgb, var(--cream-200) 82%, transparent);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
  height: calc(100vh - 32px);
  overflow: hidden;
}

.sidebar-logo {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 82px;
  padding: 0 22px;
  border-bottom: 1px solid rgba(25,26,35,0.08);
  background: color-mix(in srgb, var(--static-static-white-0) 76%, var(--cream-100));
}

.sidebar-logo img {
  width: 154px;
  filter: none;
}

.sidebar-nav {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 14px;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--reference-taupe) 72%, transparent) transparent;
}

.sidebar-nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--reference-taupe) 72%, transparent);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--reference-muted) 56%, transparent);
}

.sidebar-section-label {
  padding: 20px 14px 9px;
  color: var(--taupe-500);
  font-size: 10px;
  letter-spacing: 0.12em;
}

.sidebar-nav a {
  min-height: 44px;
  padding: 11px 13px;
  border-radius: 16px;
  color: var(--gray-600);
  font-size: 13px;
  font-weight: 760;
  margin-bottom: 5px;
}

.sidebar-nav a:hover {
  background: rgba(52,82,255,0.10);
  color: var(--ink-900);
}

.sidebar-nav a.active {
  background: var(--ink-900);
  color: var(--cream-25);
  box-shadow: 0 14px 28px rgba(25,26,35,0.14);
}

.sidebar-nav a.active .nav-icon,
.sidebar-nav a .nav-icon {
  opacity: 1;
}

.sidebar-user {
  margin: 0 14px 14px;
  padding: 14px;
  border: 1px solid rgba(25,26,35,0.08);
  border-radius: 20px;
  background: rgba(255,255,255,0.64);
}

.sidebar-user-avatar {
  background: var(--brand-lighter);
  color: var(--brand-darker);
}

.sidebar-user-link,
.sidebar-user-name {
  color: var(--ink-900);
}

.sidebar-user-role,
.sidebar-version {
  color: var(--taupe-500);
}

.sidebar-logout {
  color: var(--earth-600);
  font-weight: 700;
}

.nav-badge {
  background: var(--error-500);
  box-shadow: 0 0 0 2px var(--static-static-white-0);
}

.crm-main {
  min-width: 0;
}

.crm-topbar {
  min-height: var(--header-height);
  height: auto;
  padding: 0 8px 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.topbar-title,
.page-title {
  color: var(--ink-900);
  font-size: 24px;
  font-weight: 820;
  letter-spacing: 0;
}

.topbar-actions {
  gap: 10px;
}

.global-search-input {
  width: 300px;
  height: 46px;
  border: 1px solid rgba(25,26,35,0.10);
  border-radius: 999px;
  background: rgba(255,255,255,0.74);
  box-shadow: var(--shadow-xs);
}

.global-search-input:focus {
  width: 360px;
  border-color: rgba(52,82,255,0.42);
  box-shadow: 0 0 0 4px var(--brand-alpha-16);
}

.search-dropdown,
.table-wrap,
.card,
.stat-card,
.notif-card,
.reminder-card,
.policy-card,
.detail-list-card,
.team-card,
.form-card {
  border: 1px solid rgba(25,26,35,0.09);
  border-radius: var(--radius-xl);
  background: color-mix(in srgb, var(--static-static-white-0) 88%, var(--cream-50));
  box-shadow: var(--shadow-sm);
}

.crm-content {
  padding: 0 8px 20px 0;
}

.btn {
  min-height: 42px;
  padding: 10px 17px;
  border-radius: 999px;
  font-weight: 760;
}

.btn-primary {
  background: var(--ink-900);
  border-color: var(--ink-900);
  color: var(--cream-25);
}

.btn-primary:hover {
  background: #191A23;
  border-color: #191A23;
}

.btn-outline {
  background: rgba(255,255,255,0.70);
  border-color: rgba(25,26,35,0.12);
  color: var(--gray-700);
}

.btn-outline:hover,
.btn-ghost:hover {
  background: var(--brand-lighter);
  color: var(--ink-900);
}

.form-input,
.form-select,
.form-textarea {
  min-height: 44px;
  border: 1px solid rgba(25,26,35,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.78);
  box-shadow: none;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: rgba(52,82,255,0.62);
  box-shadow: 0 0 0 4px var(--brand-alpha-16);
}

.card-header,
.table-toolbar {
  border-bottom-color: rgba(25,26,35,0.08);
  padding: 20px 22px;
}

.card-title,
.table-toolbar-left h2 {
  color: var(--ink-900);
  font-size: 16px;
  font-weight: 820;
}

.card-body {
  padding: 22px;
}

.badge {
  padding: 5px 11px;
  font-weight: 760;
}

thead tr {
  background: transparent;
  border-bottom-color: rgba(25,26,35,0.08);
}

th {
  color: var(--taupe-500);
  font-size: 10px;
  letter-spacing: 0.08em;
}

td {
  border-bottom-color: rgba(25,26,35,0.07);
}

tbody tr:hover td {
  background: rgba(52,82,255,0.06);
}

.panel-overlay,
.volt-modal-overlay {
  background: rgba(25,26,35,0.38);
  backdrop-filter: blur(8px);
}

.panel.volt-task-modal,
.panel.volt-client-modal {
  border-radius: 26px;
  border-color: rgba(25,26,35,0.10);
  background: var(--cream-25);
}

.panel-header {
  border-top: 0;
  border-bottom-color: rgba(25,26,35,0.08);
  background: rgba(255,255,255,0.76);
}

.panel-footer {
  border-top-color: rgba(25,26,35,0.08);
  background: rgba(242,240,233,0.72);
}

.toast {
  border-radius: 18px;
  background: var(--ink-900);
  box-shadow: var(--shadow-lg);
}

.toast.error {
  background: var(--error-600);
}

@media (max-width: 900px) {
  .crm-layout {
    padding: 0;
  }

  .crm-sidebar,
  .admin-sidebar {
    border-radius: 24px 24px 0 0;
    background: rgba(255,255,255,0.92);
    border-color: rgba(25,26,35,0.10);
    box-shadow: 0 -18px 44px rgba(25,26,35,0.12);
  }

  .sidebar-nav a {
    color: var(--gray-600);
  }

  .sidebar-nav a.active {
    background: var(--ink-900);
    color: var(--cream-25);
  }

  .mobile-nav-more {
    color: var(--cream-25);
    background: var(--ink-900);
    box-shadow: 0 14px 30px rgba(25,26,35,0.22);
  }

  .crm-topbar {
    padding: 16px;
    background: rgba(242,240,233,0.88);
    backdrop-filter: blur(12px);
  }

  .crm-content {
    padding: 16px 16px 92px;
  }

  .global-search-input,
  .global-search-input:focus {
    width: 100%;
  }
}

/* Final dashboard compact override */
.dashboard-page .dashboard-hero {
  min-height: 56px;
  margin-bottom: 10px;
  padding: 6px 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  background-image: none;
  box-shadow: none;
}

.dashboard-page .dashboard-hero::before,
.dashboard-page .dashboard-hero::after {
  display: none;
  content: none;
}

.dashboard-page .dashboard-hero h1 {
  font-size: 26px;
  line-height: 1.15;
  font-weight: 500;
  letter-spacing: 0;
}

.dashboard-page .dashboard-hero p {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.35;
  font-weight: 400;
}

.dashboard-page .dashboard-kicker {
  margin-bottom: 3px;
  font-size: 9px;
  line-height: 1.2;
  font-weight: 500;
}

.dashboard-page .dashboard-hero-actions {
  gap: 6px;
}

.dashboard-page .dashboard-hero-actions .btn {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

/* Final shared page header scale */
.topbar-title,
.page-title {
  color: var(--ink-900);
  font-size: 16px;
  line-height: 1.2;
  font-weight: 500;
  letter-spacing: 0;
}

@media (max-width: 640px) {
  .topbar-title,
  .page-title {
    font-size: 15px;
  }
}

/* Mobile shell safety: keep the bottom navigation from covering the page. */
@media (max-width: 900px) {
  .crm-layout {
    display: block;
    min-height: 100vh;
    overflow: visible;
    padding: 0 0 84px;
  }

  .crm-main {
    display: block;
    min-height: 100vh;
    overflow: visible;
  }

  .crm-sidebar,
  .admin-sidebar {
    position: fixed;
    inset: auto 0 0;
    z-index: 240;
    width: 100%;
    height: 76px;
    min-height: 76px;
    max-height: 76px;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
    padding: 8px;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    pointer-events: auto;
  }

  .sidebar-logo,
  .sidebar-section-label,
  .sidebar-user {
    display: none;
  }

  .sidebar-nav,
  .admin-sidebar-nav {
    grid-column: 1 / span 4;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: stretch;
    gap: 4px;
    padding: 0;
    height: 60px;
    min-height: 60px;
    overflow-x: hidden;
    overflow-y: hidden;
  }

  .sidebar-nav a,
  .admin-sidebar-nav a,
  .mobile-nav-more {
    min-width: 0;
    width: 100%;
    min-height: 60px;
    height: 60px;
    margin: 0;
    padding: 7px 5px;
    border: 0;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    color: var(--gray-600);
    background: transparent;
    box-shadow: none;
    font-size: 10px;
    line-height: 1.1;
    font-weight: 500;
    text-align: center;
    white-space: normal;
    cursor: pointer;
  }

  .sidebar-nav a:nth-of-type(n + 5),
  .admin-sidebar-nav a:nth-of-type(n + 5) {
    display: none;
  }

  .mobile-nav-more {
    position: static;
    grid-column: 5;
    align-self: stretch;
    justify-self: stretch;
  }

  .mobile-nav-more svg {
    width: 18px;
    height: 18px;
  }

  .sidebar-nav a.active,
  .admin-sidebar-nav a.active,
  body.mobile-nav-open .mobile-nav-more {
    background: var(--ink-900);
    color: var(--cream-25);
    box-shadow: none;
  }

  .mobile-nav-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .mobile-nav-overlay[hidden],
  body:not(.mobile-nav-open) .mobile-nav-overlay {
    display: none !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .mobile-nav-user {
    padding: 14px 16px 16px;
    border-top: 1px solid var(--gray-200);
    background: var(--static-static-white-0);
  }

  .mobile-nav-user .sidebar-user {
    display: flex;
    margin: 0;
    padding: 14px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    background: var(--cream-25);
    box-shadow: var(--shadow-xs);
  }

  .mobile-nav-user .sidebar-user-info {
    display: block;
    min-width: 0;
  }

  .mobile-nav-user .sidebar-user-avatar {
    display: flex;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
  }

  .mobile-nav-user .sidebar-logout {
    display: inline-flex;
    margin-top: 6px;
  }
}
