/* Inter — self-hosted */
@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-gray-0: #ffffff;
  --colors-gray-50: #f7f8fa;
  --colors-gray-100: #eff1f4;
  --colors-gray-200: #e1e4ea;
  --colors-gray-300: #cacfd8;
  --colors-gray-400: #99a0ae;
  --colors-gray-500: #717784;
  --colors-gray-600: #525866;
  --colors-gray-700: #2b303b;
  --colors-gray-800: #222631;
  --colors-gray-900: #181b25;
  --colors-gray-950: #0e121b;

  --colors-blue-50: #ebf1ff;
  --colors-blue-100: #dbe7ff;
  --colors-blue-200: #bfd4ff;
  --colors-blue-300: #93b5ff;
  --colors-blue-400: #6895ff;
  --colors-blue-500: #335cff;
  --colors-blue-600: #2547d0;
  --colors-blue-700: #1d39a8;
  --colors-blue-800: #182f8f;
  --colors-blue-900: #172a72;
  --colors-blue-950: #111c4e;

  --colors-green-50: #ecfdf5;
  --colors-green-200: #a7f3d0;
  --colors-green-400: #34d399;
  --colors-green-500: #10b981;
  --colors-green-600: #059669;
  --colors-green-950: #052e26;
  --colors-orange-50: #fff7ed;
  --colors-orange-200: #fed7aa;
  --colors-orange-400: #fb923c;
  --colors-orange-500: #f97316;
  --colors-orange-600: #ea580c;
  --colors-red-50: #fef2f2;
  --colors-red-200: #fecaca;
  --colors-red-400: #f87171;
  --colors-red-500: #ef4444;
  --colors-red-600: #dc2626;
  --colors-red-950: #450a0a;
  --colors-yellow-50: #fefce8;
  --colors-yellow-200: #fef08a;
  --colors-yellow-400: #facc15;
  --colors-yellow-500: #eab308;
  --colors-yellow-600: #ca8a04;
  --colors-yellow-950: #422006;
  --colors-teal-50: #f0fdfa;
  --colors-teal-200: #99f6e4;
  --colors-teal-400: #2dd4bf;
  --colors-teal-500: #14b8a6;
  --colors-teal-600: #0d9488;
  --colors-teal-950: #042f2e;
  --colors-sky-50: #f0f9ff;
  --colors-sky-200: #bae6fd;
  --colors-sky-400: #38bdf8;
  --colors-sky-500: #0ea5e9;
  --colors-sky-600: #0284c7;
  --colors-sky-950: #082f49;
  --colors-purple-50: #faf5ff;
  --colors-purple-200: #e9d5ff;
  --colors-purple-400: #c084fc;
  --colors-purple-500: #a855f7;
  --colors-purple-950: #3b0764;
  --colors-pink-50: #fdf2f8;
  --colors-pink-200: #fbcfe8;
  --colors-pink-400: #f472b6;
  --colors-pink-500: #ec4899;
  --colors-pink-600: #db2777;
  --colors-pink-950: #500724;

  --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-gray-50);
  --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 */
  --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(--bg-weak-50);
  --gray-100: var(--state-faded-lighter-100);
  --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: '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;
  filter: brightness(0) invert(1);
}

.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: 3px solid var(--brand-base);
  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;
}

/* ── Volt-style drawer forms (clients) ─────────────────────── */
.volt-form-panel .panel-header {
  border-top: 3px solid var(--brand-base);
  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;
}

.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);
}

.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-table-wrap .table-toolbar {
  padding: 18px 20px;
  background: var(--static-static-white-0);
}

.clients-table-wrap .table-toolbar-left {
  gap: 12px;
}

.clients-table-wrap .table-toolbar-left h2 {
  color: var(--gray-900);
  font-size: 18px;
  line-height: 1.25;
  font-weight: 800;
  margin: 0;
}

.clients-table-wrap .table-toolbar-right {
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

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

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

.clients-volt-table th {
  padding: 12px 20px;
  color: var(--gray-600);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: none;
}

.clients-volt-table td {
  padding: 14px 20px;
  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-topbar .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }
  .volt-page-heading h1 {
    font-size: 24px;
  }
  .clients-table-wrap .table-toolbar {
    align-items: flex-start;
  }
  .clients-table-wrap .table-toolbar-right {
    width: 100%;
    justify-content: flex-start;
  }
}

/* ── 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;
}
