/* ---------- Tensly CRM — Design tokens ---------- */
:root {
  --bg-0: #0a0a0b;
  --bg-1: #0f1012;
  --bg-2: #141518;
  --bg-3: #1a1c20;
  --bg-elev: #1f2126;
  --line: rgba(255,255,255,0.06);
  --line-2: rgba(255,255,255,0.10);
  --line-3: rgba(255,255,255,0.16);
  --text: #ececee;
  --text-2: #b6b7bc;
  --text-3: #7a7c83;
  --text-4: #4f5158;
  --accent: #fe4444;
  --accent-2: #ff6b6b;
  --accent-soft: rgba(254,68,68,0.12);
  --accent-line: rgba(254,68,68,0.30);
  --good: #6ed29a;
  --good-soft: rgba(110,210,154,0.12);
  --warn: #e6b765;
  --warn-soft: rgba(230,183,101,0.14);
  --info: #7aa6ff;
  --info-soft: rgba(122,166,255,0.12);
  --radius-xs: 6px;
  --radius-s: 8px;
  --radius-m: 10px;
  --radius-l: 14px;
  --radius-xl: 20px;
  --shadow-1: 0 1px 0 rgba(255,255,255,0.04) inset, 0 1px 2px rgba(0,0,0,0.4);
  --shadow-2: 0 10px 30px rgba(0,0,0,0.45), 0 2px 8px rgba(0,0,0,0.35);
  --shadow-pop: 0 20px 60px rgba(0,0,0,0.6), 0 4px 14px rgba(0,0,0,0.4);
  --mono: "JetBrains Mono", "SF Mono", ui-monospace, Menlo, monospace;
  --sans: "Inter", "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--sans);
  font-feature-settings: "cv11","ss01","ss03";
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
#root { height: 100%; }
button { font-family: inherit; }
input, textarea, select { font-family: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.06); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.12); }

/* ---------- Tabular numbers utility ---------- */
.tnum { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.mono { font-family: var(--mono); }

/* ---------- App shell ---------- */
.app {
  display: grid;
  grid-template-columns: 232px 1fr;
  height: 100vh;
  background: var(--bg-0);
}
.app.collapsed { grid-template-columns: 64px 1fr; }

/* ---------- Sidebar ---------- */
.sidebar {
  border-right: 1px solid var(--line);
  background: linear-gradient(180deg, #0a0a0b 0%, #0c0c0e 100%);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar .brand {
  padding: 26px 22px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .brand img { height: 32px; opacity: 0.96; filter: brightness(0) invert(1); }
.sidebar .brand .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.sidebar .section-label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-4);
  padding: 14px 22px 8px;
}
.sidebar nav { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 10px;
  border-radius: var(--radius-s);
  color: var(--text-2);
  cursor: pointer;
  border: none;
  background: transparent;
  text-align: left;
  font-size: 13.5px;
  position: relative;
}
.nav-item:hover { background: rgba(255,255,255,0.03); color: var(--text); }
.nav-item.active {
  background: rgba(255,255,255,0.04);
  color: var(--text);
}
.nav-item.active::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 8px; bottom: 8px;
  width: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.nav-item .icon { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; color: var(--text-3); flex-shrink: 0; }
.nav-item.active .icon { color: var(--text); }
.nav-item .badge {
  margin-left: auto;
  font-size: 10.5px;
  background: var(--accent-soft);
  color: var(--accent-2);
  padding: 1px 6px;
  border-radius: 99px;
  font-weight: 500;
}
.nav-item .count {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-4);
  font-variant-numeric: tabular-nums;
}

.sidebar .user-card {
  margin: auto 12px 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  background: var(--bg-1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar .user-card .avatar { width: 30px; height: 30px; border-radius: 50%; flex: 0 0 30px; }
.sidebar .user-card .meta { line-height: 1.2; min-width: 0; flex: 1; }
.sidebar .user-card .name { font-size: 12.5px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .user-card .role { font-size: 10.5px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase; }
.sidebar .user-card button.signout {
  margin-left: auto;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-3);
  width: 26px; height: 26px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
}
.sidebar .user-card button.signout:hover { color: var(--text); border-color: var(--line-2); }

/* ---------- Avatars ---------- */
.avatar {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--bg-elev);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
  flex: 0 0 28px;
  border: 1px solid rgba(255,255,255,0.04);
  text-transform: uppercase;
}
.avatar.sm { width: 22px; height: 22px; flex: 0 0 22px; font-size: 9.5px; }
.avatar.lg { width: 40px; height: 40px; flex: 0 0 40px; font-size: 14px; }
.avatar.xl { width: 56px; height: 56px; flex: 0 0 56px; font-size: 18px; }

.av-1 { background: #2a3340; color: #b6d4ff; }
.av-2 { background: #3a2a30; color: #ffb6b9; }
.av-3 { background: #2a3a30; color: #b6e9c9; }
.av-4 { background: #3a3a2a; color: #e9deb6; }
.av-5 { background: #34293a; color: #d9b6ff; }
.av-6 { background: #2f3838; color: #b6e1e9; }
.av-7 { background: #382f29; color: #e9c7b6; }
.av-8 { background: #2d2e3a; color: #c5c8ff; }

/* ---------- Top bar ---------- */
.topbar {
  height: 56px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 22px;
  gap: 18px;
  background: var(--bg-0);
  position: sticky; top: 0; z-index: 30;
}
.topbar .breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-3);
}
.topbar .breadcrumb .crumb-current { color: var(--text); font-weight: 500; }
.topbar .search {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 280px;
  height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-3);
}
.topbar .search input {
  flex: 1; min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  font-size: 13px;
}
.topbar .search input::placeholder { color: var(--text-4); }
.topbar .search kbd {
  font-family: var(--mono);
  font-size: 10px;
  color: var(--text-4);
  border: 1px solid var(--line-2);
  border-radius: 4px;
  padding: 1px 5px;
}
.topbar .icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-2);
  cursor: pointer;
  position: relative;
}
.topbar .icon-btn:hover { color: var(--text); border-color: var(--line-2); }
.topbar .icon-btn .pulse {
  position: absolute;
  top: 6px; right: 6px;
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--bg-0);
}
.topbar .icon-btn .pulse[hidden],
.notif .notif-count[hidden] { display: none !important; }

/* ---------- Notifications dropdown ---------- */
.notif { position: relative; display: inline-flex; }
.notif .notif-count {
  position: absolute;
  top: -4px; right: -4px;
  min-width: 16px; height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 0 0 2px var(--bg-0);
  font-variant-numeric: tabular-nums;
}
.notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: calc(100vw - 32px);
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-pop);
  z-index: 60;
  overflow: hidden;
  animation: fade-up 160ms both;
}
.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.notif-head h4 { margin: 0; font-size: 13px; font-weight: 600; }
.notif-head .link {
  background: transparent;
  border: none;
  color: var(--accent-2);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.notif-head .link:hover { color: var(--accent); }
.notif-body {
  max-height: 420px;
  overflow-y: auto;
}
.notif-empty {
  padding: 32px 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}
.notif-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: inherit;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  position: relative;
  transition: background 100ms;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-2); }
.notif-item .ico {
  width: 30px; height: 30px;
  flex-shrink: 0;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
  color: var(--text-3);
}
.notif-item .ico.info { background: var(--info-soft);   color: var(--info); }
.notif-item .ico.good { background: var(--good-soft);   color: var(--good); }
.notif-item .ico.warn { background: var(--warn-soft);   color: var(--warn); }
.notif-item .content {
  flex: 1; min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.notif-item .title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.notif-item .body {
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.notif-item .time {
  font-size: 11px;
  color: var(--text-4);
  margin-top: 2px;
}
.notif-item .dot {
  position: absolute;
  top: 16px; right: 14px;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  flex-shrink: 0;
}
.notif-item.new .title { color: var(--text); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: all 100ms;
}
.btn:hover { background: var(--bg-3); border-color: var(--line-3); }
.btn.primary {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.18) inset, 0 4px 14px rgba(254,68,68,0.30);
}
.btn.primary:hover { background: #ff5757; }
.btn.ghost {
  background: transparent;
  border-color: var(--line);
  color: var(--text-2);
}
.btn.ghost:hover { color: var(--text); border-color: var(--line-2); }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.lg { height: 40px; padding: 0 16px; font-size: 14px; }
.btn.icon-only { width: 32px; padding: 0; }

/* ---------- Cards / panels ---------- */
.card {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
}
.card-h {
  padding: 16px 18px 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; color: var(--text); letter-spacing: -0.01em; }
.card-h .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.card-h .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 4px 18px 18px; }

.kpi {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 124px;
  position: relative;
  overflow: hidden;
}
.kpi .label { font-size: 12px; color: var(--text-3); letter-spacing: 0.02em; }
.kpi .value { font-size: 28px; font-weight: 600; letter-spacing: -0.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.kpi .value .unit { font-size: 14px; color: var(--text-3); margin-left: 4px; font-weight: 500; }
.kpi .delta { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 2px 7px; border-radius: 99px; font-variant-numeric: tabular-nums; }
.kpi .delta.up { color: var(--good); background: var(--good-soft); }
.kpi .delta.down { color: var(--accent-2); background: var(--accent-soft); }
.kpi .spark { position: absolute; bottom: 0; left: 0; right: 0; height: 36px; opacity: 0.9; }

/* ---------- Page chrome ---------- */
.page {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
.page-body {
  flex: 1;
  overflow: auto;
  padding: 22px 26px 80px;
}
.page-title-row {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  margin-bottom: 22px;
}
.page-title-row h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text);
}
.page-title-row .sub { color: var(--text-3); font-size: 13px; margin-bottom: 2px; }
.page-title-row .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.grid { display: grid; gap: 14px; }
.grid.k4 { grid-template-columns: repeat(4, 1fr); }
.grid.k3 { grid-template-columns: repeat(3, 1fr); }
.grid.k2 { grid-template-columns: repeat(2, 1fr); }
.grid.k2-3 { grid-template-columns: 1.4fr 1fr; }
.grid.k3-1 { grid-template-columns: 2fr 1fr; }

/* ---------- Tables ---------- */
.tbl {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}
.tbl th {
  text-align: left;
  font-weight: 500;
  font-size: 11.5px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-1);
  position: sticky; top: 0;
}
.tbl td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text-2);
}
.tbl tr:hover td { background: rgba(255,255,255,0.02); }
.tbl td .pri { color: var(--text); font-weight: 500; }
.tbl .amt { font-variant-numeric: tabular-nums; }

/* ---------- Tags / Status ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 99px;
  background: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--line);
  font-weight: 500;
  white-space: nowrap;
}
.tag .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tag.good { color: var(--good); background: var(--good-soft); border-color: transparent; }
.tag.warn { color: var(--warn); background: var(--warn-soft); border-color: transparent; }
.tag.bad { color: var(--accent-2); background: var(--accent-soft); border-color: transparent; }
.tag.info { color: var(--info); background: var(--info-soft); border-color: transparent; }
.tag.muted { color: var(--text-3); background: rgba(255,255,255,0.04); border-color: transparent; }

/* ---------- Login ---------- */
.login-shell {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  height: 100vh;
  background: var(--bg-0);
}
.login-art {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(120% 70% at 110% 0%, rgba(254,68,68,0.25), transparent 55%),
    radial-gradient(60% 60% at 0% 100%, rgba(254,68,68,0.10), transparent 55%),
    linear-gradient(180deg, #0d0d0f 0%, #0a0a0b 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 38px 44px;
}
.login-art .grid-bg {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 80% at 30% 70%, #000 35%, transparent 75%);
  pointer-events: none;
}
.login-art .logo {
  display: flex; align-items: center; gap: 10px;
  position: relative; z-index: 1;
}
.login-art .logo img { height: 44px; filter: brightness(0) invert(1); }
.login-art .quote {
  margin-top: auto;
  position: relative; z-index: 1;
  max-width: 480px;
}
.login-art .quote .eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 18px;
}
.login-art .quote h2 {
  font-size: 34px;
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 22px;
}
.login-art .quote h2 em {
  color: var(--accent);
  font-style: normal;
}
.login-art .quote .author {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-3); font-size: 12.5px;
}

.login-form {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
}
.login-form-inner { width: 100%; max-width: 380px; }
.login-form h1 {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.login-form .sub { color: var(--text-3); font-size: 13.5px; margin-bottom: 28px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12px; color: var(--text-2); }
.field .input {
  height: 40px;
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-s);
  padding: 0 12px;
  font-size: 13.5px;
  color: var(--text);
  outline: none;
  transition: border 100ms;
}
.field .input:focus { border-color: var(--accent); }
.field.error .input { border-color: var(--accent); }
.field .err { color: var(--accent-2); font-size: 11.5px; }
.field .hint { color: var(--text-3); font-size: 11.5px; }

.checkrow { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); }
.checkrow input { accent-color: var(--accent); }

.suggested {
  margin-top: 22px;
  padding: 14px;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius-m);
  background: rgba(255,255,255,0.015);
}
.suggested .head {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-4);
  margin-bottom: 10px;
}
.suggested .row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-radius: var(--radius-s);
  cursor: pointer;
}
.suggested .row + .row { margin-top: 2px; }
.suggested .row:hover { background: rgba(255,255,255,0.04); }
.suggested .row .who { line-height: 1.2; }
.suggested .row .who .nm { font-size: 13px; color: var(--text); }
.suggested .row .who .rl { font-size: 11px; color: var(--text-3); margin-top: 2px; letter-spacing: 0.04em; text-transform: uppercase;}
.suggested .row .arrow { margin-left: auto; color: var(--text-4); }

/* Animations */
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.fade-up { animation: fade-up 320ms cubic-bezier(.22,.71,.36,1) both; }

@keyframes pulse-soft { 0%,100% { opacity:1 } 50% { opacity: 0.55 } }
.pulse-soft { animation: pulse-soft 1.4s ease-in-out infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin 0.7s linear infinite; }

/* ---------- Pipeline kanban ---------- */
.kanban {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(284px, 1fr);
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 12px;
}
.col {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  display: flex;
  flex-direction: column;
  min-height: 100%;
  max-height: calc(100vh - 220px);
}
.col-h {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.col-h .name { font-size: 12.5px; font-weight: 600; letter-spacing: -0.005em; color: var(--text); }
.col-h .dot { width: 8px; height: 8px; border-radius: 50%; }
.col-h .count { font-size: 11px; color: var(--text-3); padding: 2px 6px; background: rgba(255,255,255,0.04); border-radius: 99px; font-variant-numeric: tabular-nums; }
.col-h .total { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.col-body {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1;
}
.deal {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  padding: 12px;
  cursor: grab;
  transition: transform 80ms, box-shadow 120ms, border-color 120ms;
}
.deal:hover { border-color: var(--line-2); box-shadow: var(--shadow-1); }
.deal.dragging { opacity: 0.4; }
.deal .top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.deal .top .logo {
  width: 22px; height: 22px; border-radius: 5px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: var(--text);
  letter-spacing: 0.02em;
}
.deal .title { font-size: 13.5px; color: var(--text); font-weight: 500; letter-spacing: -0.005em; line-height: 1.3; }
.deal .meta { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.deal .meta .amt { font-size: 13px; color: var(--text); font-variant-numeric: tabular-nums; font-weight: 600; }
.deal .meta .ago { font-size: 11px; color: var(--text-3); }
.deal .tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.deal .bar { height: 3px; border-radius: 2px; background: rgba(255,255,255,0.06); margin-top: 10px; overflow: hidden; }
.deal .bar > i { display: block; height: 100%; background: var(--accent); }
.deal .footer { display: flex; align-items: center; gap: 6px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.col.drop-target .col-body { background: rgba(254,68,68,0.04); }

/* ---------- Generic list ---------- */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: rgba(255,255,255,0.02); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row .grow .t { color: var(--text); font-size: 13.5px; font-weight: 500; }
.list-row .grow .s { color: var(--text-3); font-size: 12px; margin-top: 2px; }

/* ---------- Filters bar ---------- */
.filters {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}
.filters .seg {
  display: inline-flex;
  border: 1px solid var(--line);
  background: var(--bg-1);
  border-radius: var(--radius-s);
  overflow: hidden;
}
.filters .seg button {
  background: transparent;
  border: none;
  color: var(--text-3);
  font-size: 12.5px;
  padding: 6px 12px;
  cursor: pointer;
}
.filters .seg button + button { border-left: 1px solid var(--line); }
.filters .seg button.on { color: var(--text); background: rgba(255,255,255,0.04); }
.filters .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
}
.filters .pill:hover { color: var(--text); border-color: var(--line-2); }
.filters .pill.active { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.filters .grow { flex: 1; }
.filters .search-input {
  height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text);
  font-size: 12.5px;
  outline: none;
  width: 240px;
}
.filters .search-input::placeholder { color: var(--text-4); }
.filters .search-input:focus { border-color: var(--line-2); }

/* ---------- Detail / drawer ---------- */
.detail {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  align-items: flex-start;
}

/* ---------- Messaging ---------- */
.chat-shell {
  display: grid;
  grid-template-columns: 280px 1fr 280px;
  gap: 0;
  height: calc(100vh - 56px - 78px);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--bg-1);
}
.chat-list { border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.chat-list .head { padding: 12px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.chat-list .head h4 { margin: 0; font-size: 13px; font-weight: 600; }
.chat-list .head .count { margin-left: auto; font-size: 11px; color: var(--text-3); }
.chat-list .body { flex: 1; overflow: auto; }
.chat-list .item { display: flex; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.chat-list .item.active { background: rgba(255,255,255,0.04); }
.chat-list .item:hover { background: rgba(255,255,255,0.025); }
.chat-list .item .meta { flex: 1; min-width: 0; }
.chat-list .item .top { display: flex; align-items: center; gap: 6px; }
.chat-list .item .nm { font-size: 13px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-list .item .ts { margin-left: auto; font-size: 11px; color: var(--text-4); white-space: nowrap; }
.chat-list .item .preview { font-size: 12px; color: var(--text-3); margin-top: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-list .item .unread { background: var(--accent); color: white; min-width: 18px; height: 18px; border-radius: 99px; padding: 0 5px; font-size: 10.5px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; }
.chat-list .item .conv-del {
  align-self: center;
  width: 24px; height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--text-4);
  cursor: pointer;
  opacity: 0;
  transition: all 140ms;
  flex-shrink: 0;
}
.chat-list .item:hover .conv-del { opacity: 1; }
.chat-list .item .conv-del:hover {
  color: var(--accent-2);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}

.chat-thread { display: flex; flex-direction: column; min-height: 0; }
.chat-thread .head {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}
.chat-thread .head .nm { font-size: 14px; font-weight: 600; }
.chat-thread .head .sub { font-size: 11.5px; color: var(--text-3); }
.chat-thread .body { flex: 1; overflow: auto; padding: 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.chat-thread .day-sep { text-align: center; color: var(--text-4); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; margin: 8px 0 4px; }
.msg { display: flex; gap: 10px; max-width: 76%; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble {
  background: var(--bg-2);
  border: 1px solid var(--line);
  padding: 9px 12px;
  border-radius: 14px;
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.4;
  border-bottom-left-radius: 4px;
}
.msg.me .bubble { background: var(--accent); color: white; border-color: transparent; border-bottom-right-radius: 4px; border-bottom-left-radius: 14px; }
.msg .when { font-size: 10.5px; color: var(--text-4); margin-top: 4px; }
.chat-thread .composer {
  border-top: 1px solid var(--line);
  padding: 12px 14px;
  display: flex;
  gap: 8px;
  align-items: center;
}
.chat-thread .composer input {
  flex: 1;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  padding: 0 12px;
  height: 36px;
  color: var(--text);
  outline: none;
  font-size: 13px;
}
.chat-thread .composer input:focus { border-color: var(--line-2); }

.chat-info { border-left: 1px solid var(--line); padding: 18px; overflow: auto; }
.chat-info h5 { font-size: 11px; text-transform: uppercase; color: var(--text-4); letter-spacing: 0.1em; margin: 0 0 8px; }
.chat-info .kv { display: flex; justify-content: space-between; font-size: 12.5px; padding: 5px 0; }
.chat-info .kv .k { color: var(--text-3); }
.chat-info .kv .v { color: var(--text); }

/* ---------- Calendar ---------- */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  background: var(--bg-1);
}
.cal-grid .dow {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-3);
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-0);
}
.cal-grid .day {
  min-height: 112px;
  padding: 8px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-1);
  position: relative;
}
.cal-grid .day:nth-child(7n) { border-right: none; }
.cal-grid .day.muted { background: var(--bg-0); color: var(--text-4); }
.cal-grid .day .n { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; padding-bottom: 2px; }
.cal-grid .day.today .n { background: var(--accent); color: white; padding: 1px 8px; border-radius: 99px; align-self: flex-start; font-weight: 600; }
.cal-grid .day.muted .n { color: var(--text-4); }
.cal-event {
  padding: 2px 6px;
  font-size: 10.5px;
  border-radius: 4px;
  border-left: 2px solid currentColor;
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}
.cal-event.r { color: var(--accent-2); background: var(--accent-soft); }
.cal-event.b { color: var(--info); background: var(--info-soft); }
.cal-event.g { color: var(--good); background: var(--good-soft); }
.cal-event.y { color: var(--warn); background: var(--warn-soft); }

/* ---------- Invoice list ---------- */
.invoice-row .num { font-family: var(--mono); font-size: 12px; color: var(--text-2); }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.empty {
  padding: 30px 18px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.brand-mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.bm-1 { background: #2a3340; color: #b6d4ff; }
.bm-2 { background: #3a2a30; color: #ffb6b9; }
.bm-3 { background: #2a3a30; color: #b6e9c9; }
.bm-4 { background: #3a3a2a; color: #e9deb6; }
.bm-5 { background: #34293a; color: #d9b6ff; }
.bm-6 { background: #2f3838; color: #b6e1e9; }
.bm-7 { background: #382f29; color: #e9c7b6; }
.bm-8 { background: #2d2e3a; color: #c5c8ff; }

/* ---------- Modal ---------- */
.modal-veil {
  position: fixed; inset: 0;
  background: rgba(5,5,6,0.6);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100;
  animation: fade-up 200ms both;
}
.modal {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-pop);
  width: min(560px, 92vw);
  max-height: 86vh;
  overflow: auto;
}
.modal h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.modal-h .x { margin-left: auto; cursor: pointer; color: var(--text-3); border: 1px solid var(--line); border-radius: 6px; width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; background: transparent; }
.modal-b { padding: 18px 22px; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }

/* ---------- Radio inputs (forme native + dimensions explicites pour Safari) ---------- */
/* Safari collapsait l'input à width:0 dans un <label> flex sans dimensions.
   On force la forme native via -webkit-appearance + width/height + flex-shrink:0. */
.radio-input {
  -webkit-appearance: radio;
  -moz-appearance: radio;
  appearance: auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  flex-shrink: 0;
  margin: 0;
  accent-color: var(--accent);
  cursor: pointer;
}

/* ---------- Toast ---------- */
.toast-stack { position: fixed; bottom: 22px; right: 22px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  padding: 10px 14px;
  border-radius: var(--radius-m);
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-pop);
  animation: fade-up 200ms both;
  display: flex; align-items: center; gap: 10px;
}
.toast .ico { color: var(--accent-2); }

/* ---------- Select-pill (tag-like select inline) ---------- */
.select-pill {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-color: var(--bg-3);
  color: var(--text-2);
  border: 1px solid var(--line);
  border-radius: 99px;
  padding: 3px 24px 3px 10px;
  height: 24px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  outline: none;
  transition: border-color 100ms, background 100ms;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%237a7c83' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 6px center;
  background-size: 11px;
}
.select-pill:hover  { border-color: var(--line-2); color: var(--text); }
.select-pill:focus  { border-color: var(--line-3); }
.select-pill option { background: var(--bg-1); color: var(--text); }

.select-pill.good { color: var(--good);     background-color: var(--good-soft);   border-color: transparent; }
.select-pill.warn { color: var(--warn);     background-color: var(--warn-soft);   border-color: transparent; }
.select-pill.bad  { color: var(--accent-2); background-color: var(--accent-soft); border-color: transparent; }
.select-pill.info { color: var(--info);     background-color: var(--info-soft);   border-color: transparent; }

/* ---------- Row actions (icon buttons inline dans les tables) ---------- */
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  opacity: 0.6;
  transition: opacity 120ms;
}
.tbl tr:hover .row-actions { opacity: 1; }

.row-actions .ico-btn {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text-3);
  cursor: pointer;
  transition: all 100ms;
}
.row-actions .ico-btn:hover { color: var(--text); border-color: var(--line-2); background: var(--bg-2); }
.row-actions .ico-btn.danger:hover { color: var(--accent-2); border-color: var(--accent-line); background: var(--accent-soft); }

/* ---------- Confirm dialog ---------- */
.confirm-box {
  background: var(--bg-1);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-pop);
  width: min(420px, 92vw);
  overflow: hidden;
}
.confirm-box .head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px 14px;
}
.confirm-box .head .icon {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.confirm-box .head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.confirm-box .msg {
  padding: 0 20px 18px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}
.confirm-box .actions {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: var(--bg-2);
}

/* ---------- Prospection : KPIs compacts ---------- */
.prospection-page .grid.k4 {
  margin-bottom: 12px !important;
  gap: 10px;
}
.prospection-page .kpi {
  min-height: 0;
  padding: 10px 14px;
  border-radius: 10px;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  overflow: hidden;
}
.prospection-page .kpi .label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-3);
  margin: 0;
  white-space: nowrap;
  flex-shrink: 0;
}
.prospection-page .kpi .value {
  font-size: 18px !important;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-left: auto;
}
.prospection-page .kpi .tag {
  font-size: 10.5px;
  padding: 2px 8px;
}
.prospection-page .kpi .prog-mini {
  margin: 0;
  flex: 1;
  max-width: 90px;
  height: 5px;
}
.prospection-page .kpi-ico {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.prospection-page .kpi-ico-info { background: var(--info-soft); color: var(--info); }
.prospection-page .kpi-ico-good { background: var(--good-soft); color: var(--good); }
.prospection-page .kpi-ico-warn { background: var(--warn-soft); color: var(--warn); }
.prospection-page .kpi-ico-bad  { background: var(--accent-soft); color: var(--accent-2); }

/* ---------- Prospection : barre de filtres plus aérée ---------- */
.prospection-page .filters {
  gap: 10px;
  padding: 10px 12px;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-1);
}
.prospection-page .filters .seg {
  border-radius: 9px;
  background: var(--bg-0);
  border-color: var(--line);
}
.prospection-page .filters .seg button {
  padding: 7px 14px;
  font-size: 12.5px;
  transition: color 120ms, background 120ms;
}
.prospection-page .filters .seg button:hover { color: var(--text); }
.prospection-page .filters .seg button.on {
  background: var(--accent-soft);
  color: var(--accent-2);
  font-weight: 500;
}
.prospection-page .filters .pill {
  height: 36px;
  padding: 0 14px;
  border-radius: 9px;
  font-size: 12.5px;
  background: var(--bg-0);
  transition: all 140ms;
}
.prospection-page .filters .pill:hover { background: var(--bg-3); }

/* Combo recherche + scope */
.search-combo {
  display: flex;
  align-items: stretch;
  height: 38px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  min-width: 380px;
  transition: border-color 160ms, box-shadow 160ms;
}
.search-combo:focus-within {
  border-color: var(--accent-line);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-combo .search-scope {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px 0 14px;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border-right: 1px solid var(--line);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  max-width: 240px;
  transition: background 140ms;
}
.search-combo .search-scope:hover {
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-3) 100%);
}
.search-combo .search-scope .scope-label {
  font-size: 10.5px;
  color: var(--text-4);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 600;
  user-select: none;
  pointer-events: none;
}
.search-combo .search-scope select {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  padding: 0 26px 0 0;
  height: 100%;
  cursor: pointer;
  outline: none;
  font-family: inherit;
  background-image:
    linear-gradient(45deg,  transparent 50%, var(--text-3) 50%),
    linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px)  50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  padding-right: 28px;
}
.search-combo .search-input {
  flex: 1;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent;
  min-width: 160px;
  height: 100%;
  font-size: 13.5px;
  padding: 0 14px 0 38px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237a7c83' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m20 20-3.5-3.5'/></svg>");
  background-repeat: no-repeat;
  background-position: 14px 50%;
}
.search-combo .search-input:focus {
  border-color: transparent !important;
  outline: none;
}
.search-combo .search-input::placeholder { color: var(--text-4); }

@media (max-width: 900px) {
  .search-combo { min-width: 100%; }
}

/* ---------- Prospection ---------- */
/* La hauteur de .prospection-scroll est calculée dynamiquement en JS
   pour fitter exactement la hauteur restante du viewport. Le scroll
   est confiné à l'intérieur → le thead sticky reste collé en haut. */
.page-body.prospection-active {
  overflow: hidden !important;
  padding-bottom: 22px !important;
}
.prospection-card {
  overflow: hidden;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.prospection-scroll {
  overflow: auto;
  position: relative;
  -webkit-overflow-scrolling: touch;
  /* la hauteur est définie en inline-style par fitProspectionHeight() */
}
.prospection-tbl {
  min-width: 100%;
  width: max-content;
}
.prospection-tbl thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%);
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
  user-select: none;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-3);
  padding: 11px 14px;
}
.prospection-tbl th.sortable { cursor: pointer; transition: color 120ms, background 120ms; }
.prospection-tbl th.sortable:hover {
  color: var(--text);
  background: linear-gradient(180deg, var(--bg-2) 0%, var(--bg-3) 100%);
}
.prospection-tbl th.sortable.on { color: var(--accent-2); }

/* --- Drag & drop des colonnes --- */
/* IMPORTANT : on ne déclare PAS position:relative ici, sinon ça écrase
   le position:sticky du thead. Le sticky crée déjà un contexte de
   positionnement pour les pseudo-elements ::before/::after. */
.prospection-tbl th.draggable .grip {
  display: inline-block;
  margin-right: 6px;
  color: var(--text-4);
  font-size: 10px;
  letter-spacing: -2px;
  vertical-align: middle;
  cursor: grab;
  opacity: 0;
  transition: opacity 120ms;
  user-select: none;
}
.prospection-tbl th.draggable:hover .grip { opacity: 1; }
.prospection-tbl th.draggable:active { cursor: grabbing; }
.prospection-tbl th.is-dragging {
  opacity: 0.4;
  background: var(--bg-3) !important;
}
.prospection-tbl th.drop-left::before,
.prospection-tbl th.drop-right::after {
  content: '';
  position: absolute;
  top: 4px; bottom: 4px;
  width: 3px;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  border-radius: 99px;
  pointer-events: none;
}
.prospection-tbl th.drop-left::before  { left: -2px; }
.prospection-tbl th.drop-right::after  { right: -2px; }
.prospection-tbl th .th-label { display: inline-flex; align-items: center; gap: 6px; }
.prospection-tbl th .sort-ind {
  display: inline-flex;
  margin-left: 6px;
  vertical-align: middle;
  color: var(--accent-2);
}
.prospection-tbl td {
  padding: 10px 14px;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.prospection-tbl td.col-sorted { color: var(--text); }
.prospection-tbl tr.is-handled td:not(.col-check) {
  color: var(--text-4);
  text-decoration: line-through;
  text-decoration-color: rgba(255,255,255,0.15);
}
.prospection-tbl tbody tr:hover td { background: rgba(255,255,255,0.025); }
.prospection-tbl tbody tr.is-handled:hover td:not(.col-check) { color: var(--text-3); }
.prospection-tbl th.col-check,
.prospection-tbl td.col-check {
  position: sticky;
  left: 0;
  z-index: 1;
  background: var(--bg-1);
  border-right: 1px solid var(--line);
  padding-left: 14px;
  padding-right: 8px;
  text-align: center;
}
.prospection-tbl thead th.col-check { z-index: 3; background: linear-gradient(180deg, var(--bg-1) 0%, var(--bg-2) 100%); }
.prospection-tbl tbody tr:hover td.col-check { background: var(--bg-2); }
.prospection-tbl tbody tr.is-handled td.col-check { background: rgba(110,210,154,0.06); }

.prospection-link {
  color: var(--info);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 120ms, color 120ms;
}
.prospection-link:hover { color: var(--text); border-bottom-color: var(--info); }
tr.is-handled .prospection-link { color: var(--text-4); }

.prospection-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--text-3);
  font-size: 12px;
}

/* Checkbox custom */
.cb-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  width: 22px;
  height: 22px;
}
.cb-wrap input.cb-handled {
  position: absolute;
  opacity: 0;
  inset: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  margin: 0;
}
.cb-wrap .cb-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1.5px solid var(--line-3);
  background: var(--bg-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: transparent;
  transition: all 140ms;
}
.cb-wrap:hover .cb-box { border-color: var(--text-3); }
.cb-wrap input.cb-handled:checked + .cb-box {
  background: var(--good);
  border-color: var(--good);
  color: #0a1c12;
}
.cb-wrap input.cb-handled:focus-visible + .cb-box {
  box-shadow: 0 0 0 3px rgba(110,210,154,0.25);
}

/* Mini barre de progression dans le KPI Avancement */
.prog-mini {
  width: 100%;
  height: 6px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
  margin-top: 8px;
}
.prog-mini span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  border-radius: 99px;
  transition: width 280ms ease;
}
