/* Prospection Nétozia — design system.
   Même famille visuelle que l'application Nétozia (violet #5B3CF0, DM Sans, cartes douces), avec
   une barre latérale sombre propre à l'outil. Tout passe par des variables : le mode sombre ne
   redéfinit que les couleurs. */
:root {
  --bg: #F5F5FA;
  --surface: #FFFFFF;
  --surface-alt: #F2F1F9;
  --surface-hover: #F8F7FD;
  --text: #15171B;
  --text-2: #3F4252;
  --text-muted: #6B6F80;
  --border: #E6E5F0;
  --border-strong: #D3D1E6;
  --primary: #5B3CF0;
  --primary-dark: #3820C0;
  --primary-light: #EFECFE;
  --primary-soft: #E2DCFF;
  --primary-rgb: 91, 60, 240;
  --on-primary: #FFFFFF;
  --success: #15803D;
  --success-soft: #E5F6EC;
  --warning: #B45309;
  --warning-soft: #FFF3E0;
  --danger: #DC2626;
  --danger-soft: #FDECEC;
  --info: #0369A1;
  --info-soft: #E6F2FB;
  --side-bg: #17152E;
  --side-bg-2: #1F1C3E;
  --side-text: #B9B5DA;
  --side-text-strong: #FFFFFF;
  --side-active: rgba(139, 123, 255, 0.2);
  --side-hover: rgba(255, 255, 255, 0.06);
  --side-border: rgba(255, 255, 255, 0.08);
  --radius: 16px;
  --radius-sm: 11px;
  --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(21, 23, 27, 0.05);
  --shadow-md: 0 10px 30px rgba(21, 23, 27, 0.08);
  --shadow-lg: 0 24px 60px rgba(91, 60, 240, 0.18);
  --sidebar-w: 252px;
  --topbar-h: 62px;
  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0E0E17;
  --surface: #161624;
  --surface-alt: #1D1D2E;
  --surface-hover: #1F1F33;
  --text: #ECEBF6;
  --text-2: #C9C7DE;
  --text-muted: #9794B4;
  --border: #272739;
  --border-strong: #363650;
  --primary: #8F7CFF;
  --primary-dark: #B5A8FF;
  --primary-light: rgba(143, 124, 255, 0.16);
  --primary-soft: rgba(143, 124, 255, 0.28);
  --primary-rgb: 143, 124, 255;
  --on-primary: #0E0E17;
  --success: #4ADE80;
  --success-soft: rgba(74, 222, 128, 0.14);
  --warning: #FBBF24;
  --warning-soft: rgba(251, 191, 36, 0.14);
  --danger: #F87171;
  --danger-soft: rgba(248, 113, 113, 0.14);
  --info: #60A5FA;
  --info-soft: rgba(96, 165, 250, 0.14);
  --side-bg: #0B0B14;
  --side-bg-2: #12121F;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.6);
  color-scheme: dark;
}

/* ============================================================ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 14px; line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; min-height: 100vh;
}
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }
small, .muted, .hint { color: var(--text-muted); font-size: 12.5px; }
strong { font-weight: 700; }
code, .mono { font-family: var(--mono); font-size: 12.5px; }
[hidden] { display: none !important; }
img { max-width: 100%; }
hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
::selection { background: var(--primary-soft); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0 !important; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-20 { margin-top: 20px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0 !important; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }
.text-success { color: var(--success); } .text-danger { color: var(--danger); } .text-warning { color: var(--warning); } .text-primary { color: var(--primary); }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(0.98); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(var(--primary-rgb), 0.45); } 70% { box-shadow: 0 0 0 7px rgba(var(--primary-rgb), 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ============================================================ shell */
.shell { display: grid; grid-template-columns: var(--sidebar-w) minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--side-bg-2), var(--side-bg) 40%); color: var(--side-text);
  padding: 18px 14px 14px; z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; color: var(--side-text-strong); }
.brand-mark {
  width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: grid; place-items: center;
  background: linear-gradient(135deg, #7C66FF, #5B3CF0 60%, #3820C0); color: #fff; box-shadow: 0 8px 20px rgba(91, 60, 240, 0.45);
}
.brand-mark svg { width: 20px; height: 20px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 15.5px; letter-spacing: -0.01em; }
.brand-text small { color: var(--side-text); font-size: 11.5px; opacity: 0.85; }
.nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-text); opacity: 0.6; padding: 10px 12px 6px; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: var(--side-text);
  font-weight: 500; font-size: 13.5px; transition: background .15s, color .15s, transform .15s; position: relative;
}
.nav a:hover { background: var(--side-hover); color: var(--side-text-strong); transform: translateX(2px); }
.nav a.active { background: var(--side-active); color: var(--side-text-strong); font-weight: 600; }
.nav a.active::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #8F7CFF; }
.nav-ic { width: 18px; height: 18px; flex-shrink: 0; opacity: 0.85; }
.nav a.active .nav-ic { opacity: 1; }
.nav-badge {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 7px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, 0.1); color: var(--side-text-strong); font-variant-numeric: tabular-nums;
}
.nav-badge:empty { display: none; }
.nav-badge.hot { background: #F59E0B; color: #1A1200; }
.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding-top: 14px; border-top: 1px solid var(--side-border); }
.pulse-card {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: rgba(255, 255, 255, 0.04);
  font-size: 12px; line-height: 1.35; color: var(--side-text);
}
.pulse-card strong { color: var(--side-text-strong); font-weight: 600; display: block; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 4px; flex-shrink: 0; background: #64748B; }
.pulse-dot.ok { background: #4ADE80; animation: pulse 2.2s ease-in-out infinite; }
.pulse-dot.warn { background: #FBBF24; }
.pulse-dot.err { background: #F87171; }
.sidebar-foot a.logout { display: flex; align-items: center; gap: 9px; padding: 8px 12px; border-radius: 10px; color: var(--side-text); font-size: 13px; font-weight: 500; }
.sidebar-foot a.logout:hover { background: var(--side-hover); color: var(--side-text-strong); }
.sidebar-foot a.logout svg { width: 16px; height: 16px; }

.content { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; height: var(--topbar-h); display: flex; align-items: center; gap: 14px; padding: 0 28px;
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border);
}
.menu-toggle { display: none; }
.search { position: relative; flex: 1; max-width: 460px; }
.search input.search-input {
  width: 100%; height: 40px; padding: 0 14px 0 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text); font: inherit; font-size: 13.5px; transition: border-color .15s, box-shadow .15s;
}
.search input.search-input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }
.search-ic { position: absolute; left: 13px; top: 11px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; }
.search-results {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-md); overflow: hidden; display: none; z-index: 50;
}
.search-results.open { display: block; animation: popIn .15s ease; }
.search-group { padding: 8px 12px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }
.search-item { display: flex; align-items: center; gap: 10px; padding: 9px 14px; color: var(--text); cursor: pointer; }
.search-item:hover, .search-item.active { background: var(--surface-hover); }
.search-item small { color: var(--text-muted); }
.search-empty { padding: 14px; color: var(--text-muted); font-size: 13px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; transition: border-color .15s, background .15s, transform .1s;
}
.icon-btn:hover { border-color: var(--border-strong); background: var(--surface-hover); }
.icon-btn:active { transform: scale(0.95); }
.icon-btn svg { width: 17px; height: 17px; }

.main { padding: 26px 28px 60px; max-width: 1340px; width: 100%; animation: fadeUp .3s ease; }
.main.is-loading { opacity: 0.55; pointer-events: none; transition: opacity .15s; }

/* ============================================================ page head */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: 25px; }
.page-sub { color: var(--text-muted); font-size: 13.5px; margin-top: 4px; max-width: 70ch; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); margin-bottom: 8px; }
.crumbs a { color: var(--text-muted); }
.crumbs a:hover { color: var(--primary); }
.crumbs svg { width: 14px; height: 14px; }

/* ============================================================ cards */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow-sm); min-width: 0; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.card-head h2 { font-size: 15.5px; }
.card-sub { color: var(--text-muted); font-size: 12.5px; margin-top: 2px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush .card-head { padding: 18px 22px 0; }
.card-tone-primary { background: linear-gradient(135deg, var(--primary-light), var(--surface) 70%); border-color: var(--primary-soft); }
.card-tone-danger { border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2-1 { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.grid-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
.grid > .card { margin-top: 0; }
.section { margin-top: 18px; }

/* ============================================================ KPI */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpis.cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpis.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow-sm); min-width: 0; position: relative; overflow: hidden; animation: fadeUp .35s ease backwards; }
.kpis .kpi:nth-child(2) { animation-delay: .05s; } .kpis .kpi:nth-child(3) { animation-delay: .1s; } .kpis .kpi:nth-child(4) { animation-delay: .15s; } .kpis .kpi:nth-child(5) { animation-delay: .2s; }
.kpi-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.kpi-label { font-size: 12.5px; font-weight: 600; color: var(--text-muted); }
.kpi-ic { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); flex-shrink: 0; }
.kpi-ic svg { width: 16px; height: 16px; }
.kpi-ic.success { background: var(--success-soft); color: var(--success); }
.kpi-ic.warning { background: var(--warning-soft); color: var(--warning); }
.kpi-ic.danger { background: var(--danger-soft); color: var(--danger); }
.kpi-ic.info { background: var(--info-soft); color: var(--info); }
.kpi-value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; margin-top: 10px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi-value small { font-size: 14px; color: var(--text-muted); font-weight: 600; margin-left: 2px; }
.kpi-trend { margin-top: 6px; font-size: 12px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 4px; min-height: 18px; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-trend.flat { color: var(--text-muted); font-weight: 500; }
.kpi.compact { padding: 12px 14px; }
.kpi.compact .kpi-value { font-size: 22px; margin-top: 4px; }

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .15s, border-color .15s, color .15s, transform .1s, box-shadow .15s; line-height: 1;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn:hover { background: var(--surface-hover); border-color: var(--border-strong); color: var(--text); }
.btn:active { transform: scale(0.97); }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.55; cursor: default; transform: none; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--on-primary); box-shadow: 0 6px 16px rgba(var(--primary-rgb), 0.28); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--on-primary); transform: translateY(-1px); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--surface-alt); border-color: transparent; }
.btn-soft { background: var(--primary-light); border-color: transparent; color: var(--primary); }
.btn-soft:hover { background: var(--primary-soft); border-color: transparent; color: var(--primary-dark); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { filter: brightness(0.92); color: #fff; }
.btn-success { background: var(--success-soft); border-color: transparent; color: var(--success); }
.btn-success:hover { background: var(--success); color: #fff; border-color: var(--success); }
.btn-sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 9px; }
.btn-sm svg { width: 14px; height: 14px; }
.btn-xs { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 14.5px; }
.btn-block { width: 100%; }
.btn-icon { width: 34px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.btn-icon.btn-xs { width: 27px; }
.btn .spinner { width: 14px; height: 14px; }
.spinner { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(var(--primary-rgb), 0.25); border-top-color: var(--primary); animation: spin .7s linear infinite; display: inline-block; }
.btn-primary .spinner { border-color: rgba(255, 255, 255, 0.35); border-top-color: #fff; }
.btn-group { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-alt); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { height: 32px; padding: 0 13px; border: 0; border-radius: 9px; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: background .15s, color .15s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* ============================================================ forms */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="number"], input[type="tel"], input[type="url"], input[type="date"], input[type="time"], input[type="search"], select, textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-size: 13.5px;
  transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
input:disabled, select:disabled, textarea:disabled { opacity: 0.6; background: var(--surface-alt); }
textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
textarea.code { font-family: var(--mono); font-size: 12.5px; min-height: 180px; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6F80' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
select[multiple], select[size] { background-image: none; padding-right: 12px; }
input[type="checkbox"], input[type="radio"] { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; vertical-align: middle; cursor: pointer; }
.field { margin-bottom: 14px; min-width: 0; }
.field:last-child { margin-bottom: 0; }
.field .help { display: block; margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-row-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 16px; }
.form-msg { margin-top: 10px; font-size: 13px; font-weight: 600; min-height: 0; }
.form-msg:empty { display: none; }
.form-msg.ok { color: var(--success); }
.form-msg.err { color: var(--danger); }
.form-msg.info { color: var(--text-muted); font-weight: 500; }
.check { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: 13.5px; color: var(--text); cursor: pointer; margin: 0; }
.check-card { display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 12px; cursor: pointer; margin: 0; font-weight: 400; color: var(--text); background: var(--surface); transition: border-color .15s, background .15s; }
.check-card:hover { border-color: var(--border-strong); }
.check-card:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }
.check-card input { margin-top: 2px; flex-shrink: 0; }
.check-card strong { display: block; font-size: 13.5px; }
.check-card small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.radio-cards { display: grid; gap: 8px; }
.radio-cards .check-card { align-items: center; }
.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--text); margin: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track { width: 38px; height: 22px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background .15s; flex-shrink: 0; }
.switch-track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2); }
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 4px var(--primary-light); }
.day-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.day-chip { position: relative; margin: 0; cursor: pointer; }
.day-chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; }
.day-chip span { display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 34px; padding: 0 10px; border-radius: 9px; border: 1.5px solid var(--border); font-size: 13px; font-weight: 600; color: var(--text-muted); background: var(--surface); transition: all .15s; }
.day-chip input:checked + span { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.time-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.time-row input[type="time"] { width: 120px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: all .15s; }
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.var-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; align-items: center; }
.var-chip { height: 26px; padding: 0 9px; border-radius: 7px; border: 1px dashed var(--border-strong); background: var(--surface-alt); color: var(--primary); font-family: var(--mono); font-size: 11.5px; font-weight: 600; cursor: pointer; }
.var-chip:hover { background: var(--primary-light); border-color: var(--primary); }
.copy-field { display: flex; gap: 8px; align-items: center; }
.copy-field input { font-family: var(--mono); font-size: 12.5px; }
.input-group { display: flex; gap: 8px; }
.input-group input { flex: 1; min-width: 0; }
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter-bar > * { width: auto; }
.filter-bar .search-field { position: relative; flex: 1; min-width: 220px; }
.filter-bar .search-field input { width: 100%; padding-left: 36px; }
.filter-bar .search-field svg { position: absolute; left: 11px; top: 11px; width: 16px; height: 16px; color: var(--text-muted); }
.filter-bar select { min-width: 150px; }

/* ============================================================ tables */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text); }
.table th.sorted::after { content: ' ↓'; color: var(--primary); }
.table th.sorted.asc::after { content: ' ↑'; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background .12s; }
.table tbody tr:hover { background: var(--surface-hover); }
.table tbody tr[data-href] { cursor: pointer; }
.table tbody tr.selected { background: var(--primary-light); }
.table td.dim, .table .dim { color: var(--text-muted); }
.table .col-check { width: 36px; padding-right: 0; }
.table .col-actions { width: 44px; text-align: right; padding-left: 0; }
.table .col-num { text-align: right; font-variant-numeric: tabular-nums; }
.table th.col-num { text-align: right; }
.table-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding-top: 12px; font-size: 12.5px; color: var(--text-muted); }
.card-flush .table th:first-child, .card-flush .table td:first-child { padding-left: 22px; }
.card-flush .table th:last-child, .card-flush .table td:last-child { padding-right: 22px; }
.card-flush .table-foot { padding: 12px 22px 16px; }
.cell-main { display: flex; align-items: center; gap: 11px; min-width: 0; }
.cell-main .lines { min-width: 0; }
.cell-title { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.cell-sub { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: inline-grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; flex-shrink: 0; background: var(--primary); letter-spacing: 0.02em; }
.avatar.lg { width: 52px; height: 52px; border-radius: 14px; font-size: 18px; }
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 10.5px; }
.pager { display: flex; align-items: center; gap: 4px; }
.pager button { min-width: 32px; height: 32px; padding: 0 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.pager button:hover { border-color: var(--border-strong); }
.pager button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pager button:disabled { opacity: 0.4; cursor: default; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 14px; border-radius: 12px; background: var(--primary-light); border: 1px solid var(--primary-soft); margin-bottom: 12px; animation: fadeUp .2s ease; }
.bulk-bar strong { color: var(--primary); }

/* ============================================================ pills, dots, alerts */
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap; background: var(--surface-alt); color: var(--text-2); line-height: 1; }
.pill svg { width: 12px; height: 12px; }
.pill-primary { background: var(--primary-light); color: var(--primary); }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-muted { background: var(--surface-alt); color: var(--text-muted); }
.pill-dot::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.lg { height: 28px; padding: 0 12px; font-size: 12.5px; }
.stage-a_contacter { background: var(--surface-alt); color: var(--text-2); }
.stage-contacte { background: var(--info-soft); color: var(--info); }
.stage-a_repondu { background: var(--primary-light); color: var(--primary); }
.stage-demo { background: var(--warning-soft); color: var(--warning); }
.stage-essai { background: #E0F2FE; color: #0369A1; }
.stage-client { background: var(--success-soft); color: var(--success); }
.stage-perdu { background: var(--surface-alt); color: var(--text-muted); }
:root[data-theme="dark"] .stage-essai { background: rgba(56, 189, 248, 0.16); color: #7DD3FC; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: var(--text-muted); flex-shrink: 0; }
.dot.ok { background: var(--success); } .dot.warn { background: var(--warning); } .dot.err { background: var(--danger); } .dot.info { background: var(--info); }
.status-line { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; margin-bottom: 12px; color: var(--text-2); line-height: 1.4; }
.status-line .dot { margin-top: 1px; }
.alert { display: flex; gap: 11px; align-items: flex-start; padding: 12px 15px; border-radius: 12px; font-size: 13.5px; line-height: 1.45; border: 1px solid transparent; margin-bottom: 16px; }
.alert svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: 1px; }
.alert.info { background: var(--info-soft); color: var(--info); border-color: color-mix(in srgb, var(--info) 25%, transparent); }
.alert.ok { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 25%, transparent); }
.alert.warn { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 25%, transparent); }
.alert.danger { background: var(--danger-soft); color: var(--danger); border-color: color-mix(in srgb, var(--danger) 25%, transparent); }
.alert.primary { background: var(--primary-light); color: var(--primary-dark); border-color: var(--primary-soft); }
.alert a { color: inherit; text-decoration: underline; font-weight: 600; }
.alert .btn { margin-left: auto; flex-shrink: 0; }
.alert-stack { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.alert-stack .alert { margin: 0; }
.banner { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 18px; margin: 0 28px; margin-top: 16px; border-radius: 14px; background: var(--warning-soft); color: var(--warning); font-size: 13.5px; font-weight: 500; border: 1px solid color-mix(in srgb, var(--warning) 30%, transparent); }
.banner a { color: inherit; font-weight: 700; text-decoration: underline; }

/* ============================================================ tabs & menus */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs button { height: 40px; padding: 0 14px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--text-muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; gap: 7px; transition: color .15s, border-color .15s; }
.tabs button:hover { color: var(--text); }
.tabs button.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-count { min-width: 20px; height: 19px; padding: 0 6px; border-radius: 999px; background: var(--surface-alt); color: var(--text-muted); font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tabs button.active .tab-count { background: var(--primary-light); color: var(--primary); }
.tabs.pills { border: 0; gap: 6px; margin-bottom: 14px; }
.tabs.pills button { height: 32px; border: 1px solid var(--border); border-radius: 999px; padding: 0 12px; margin: 0; font-size: 12.5px; }
.tabs.pills button.active { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tabs.pills button.active .tab-count { background: rgba(255, 255, 255, 0.22); color: #fff; }
.menu { position: relative; display: inline-block; }
.menu-list { position: absolute; right: 0; top: calc(100% + 4px); min-width: 210px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); padding: 6px; z-index: 60; display: none; }
.menu.open .menu-list { display: block; animation: popIn .12s ease; }
.menu.up .menu-list { top: auto; bottom: calc(100% + 4px); }
.menu-list button, .menu-list a { display: flex; align-items: center; gap: 9px; width: 100%; text-align: left; padding: 9px 11px; border: 0; border-radius: 8px; background: none; color: var(--text); font: inherit; font-size: 13.5px; font-weight: 500; cursor: pointer; }
.menu-list button:hover, .menu-list a:hover { background: var(--surface-alt); color: var(--text); }
.menu-list button.danger { color: var(--danger); }
.menu-list button.danger:hover { background: var(--danger-soft); }
.menu-list svg { width: 15px; height: 15px; color: var(--text-muted); }
.menu-list .sep { height: 1px; background: var(--border); margin: 5px 4px; }
.menu-list .menu-title { padding: 6px 11px 4px; font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

/* ============================================================ modals, toasts, dialogs */
.modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(12, 10, 30, 0.55); backdrop-filter: blur(3px); }
.modal.open { display: flex; animation: fadeIn .15s ease; }
.modal-box { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow-lg); animation: popIn .18s ease; margin: auto; }
.modal-box.lg { max-width: 760px; }
.modal-box.xl { max-width: 960px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 0; }
.modal-head h2 { font-size: 17px; }
.modal-head p { color: var(--text-muted); font-size: 13px; margin-top: 3px; }
.modal-close { width: 32px; height: 32px; border-radius: 9px; border: 0; background: var(--surface-alt); color: var(--text-muted); cursor: pointer; display: grid; place-items: center; flex-shrink: 0; }
.modal-close:hover { background: var(--border); color: var(--text); }
.modal-close svg { width: 15px; height: 15px; }
.modal-body { padding: 18px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; padding: 0 22px 20px; }
.modal-foot .left { margin-right: auto; }
.dialog-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 12px; background: var(--primary-light); color: var(--primary); }
.dialog-icon.danger { background: var(--danger-soft); color: var(--danger); }
.dialog-icon.warning { background: var(--warning-soft); color: var(--warning); }
.dialog-icon svg { width: 22px; height: 22px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; max-width: min(420px, calc(100vw - 40px)); }
.toast { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 13px; background: #15171B; color: #fff; font-size: 13.5px; font-weight: 500; box-shadow: var(--shadow-md); animation: popIn .2s ease; border-left: 4px solid var(--primary); line-height: 1.4; }
.toast.ok { border-left-color: #4ADE80; }
.toast.err { border-left-color: #F87171; }
.toast.warn { border-left-color: #FBBF24; }
.toast svg { width: 17px; height: 17px; flex-shrink: 0; margin-top: 1px; }
.toast.ok svg { color: #4ADE80; } .toast.err svg { color: #F87171; } .toast.warn svg { color: #FBBF24; } .toast.info svg { color: #A5B4FC; }
.toast.hide { opacity: 0; transform: translateY(6px); transition: all .25s; }
:root[data-theme="dark"] .toast { background: #26263A; }
.toast .toast-action { margin-left: auto; background: none; border: 0; color: #C4B5FD; font: inherit; font-weight: 700; cursor: pointer; padding: 0 2px; }

/* ============================================================ empty & skeleton */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); }
.empty-ic { width: 54px; height: 54px; border-radius: 16px; margin: 0 auto 12px; display: grid; place-items: center; background: var(--primary-light); color: var(--primary); animation: popIn .3s ease; }
.empty-ic svg { width: 24px; height: 24px; }
.empty h3 { color: var(--text); font-size: 15px; margin-bottom: 4px; }
.empty p { font-size: 13px; max-width: 46ch; margin: 0 auto; }
.empty .btn { margin-top: 14px; }
.empty.compact { padding: 22px 10px; }
.skel { display: block; border-radius: 8px; background: linear-gradient(90deg, var(--surface-alt) 25%, var(--surface-hover) 50%, var(--surface-alt) 75%); background-size: 800px 100%; animation: shimmer 1.3s infinite linear; height: 14px; }
.skel.line { margin: 6px 0; }
.skel.w-40 { width: 40%; } .skel.w-60 { width: 60%; } .skel.w-80 { width: 80%; }
.skel.block { height: 80px; border-radius: 12px; }

/* ============================================================ components */
.progress { height: 8px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.progress-bar { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #8F7CFF); transition: width .5s ease; }
.progress.lg { height: 12px; }
.progress.indeterminate .progress-bar { width: 40% !important; animation: shimmer 1.4s infinite linear; background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light)); background-size: 400px 100%; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before { content: ''; position: absolute; left: 17px; top: 10px; bottom: 10px; width: 2px; background: var(--border); }
.tl-item { display: flex; gap: 14px; padding: 10px 0; position: relative; }
.tl-ic { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; flex-shrink: 0; background: var(--surface-alt); border: 2px solid var(--surface); position: relative; z-index: 1; font-size: 15px; color: var(--text-2); }
.tl-ic.primary { background: var(--primary-light); color: var(--primary); }
.tl-ic.success { background: var(--success-soft); color: var(--success); }
.tl-ic.warning { background: var(--warning-soft); color: var(--warning); }
.tl-ic.danger { background: var(--danger-soft); color: var(--danger); }
.tl-ic.info { background: var(--info-soft); color: var(--info); }
.tl-ic svg { width: 16px; height: 16px; }
.tl-body { min-width: 0; flex: 1; padding-top: 6px; }
.tl-title { font-weight: 600; font-size: 13.5px; }
.tl-meta { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.tl-text { margin-top: 6px; padding: 9px 12px; border-radius: 10px; background: var(--surface-alt); font-size: 13px; white-space: pre-wrap; line-height: 1.5; }
.tl-day { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); padding: 12px 0 2px 50px; position: relative; }
.info-list { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 8px 14px; margin: 0; font-size: 13.5px; }
.info-list dt { color: var(--text-muted); font-weight: 500; }
.info-list dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.info-list dd a { font-weight: 600; }
.stat-list { display: flex; flex-direction: column; gap: 10px; }
.stat-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13.5px; }
.stat-row strong { font-variant-numeric: tabular-nums; }
.funnel-row { margin-bottom: 12px; }
.funnel-row-head { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 5px; }
.funnel-row-head strong { font-variant-numeric: tabular-nums; }
.funnel-track { height: 10px; border-radius: 999px; background: var(--surface-alt); overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary), #8F7CFF); transition: width .6s ease; }
.funnel-pct { font-size: 11.5px; color: var(--text-muted); margin-top: 3px; }
.step-flow { display: flex; flex-direction: column; gap: 8px; }
.step-flow-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--border); cursor: pointer; transition: border-color .15s, background .15s; }
.step-flow-item:hover { border-color: var(--primary); background: var(--surface-hover); }
.step-num { width: 28px; height: 28px; border-radius: 9px; background: var(--primary-light); color: var(--primary); display: grid; place-items: center; font-weight: 700; font-size: 12.5px; flex-shrink: 0; }
.step-flow-item .lines { flex: 1; min-width: 0; }
.step-flow-item .t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-flow-item .s { font-size: 12px; color: var(--text-muted); }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: 0; }
.list-item .lines { flex: 1; min-width: 0; }
.list-item .t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .s { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.status-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.status-strip.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.status-item { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; min-width: 0; box-shadow: var(--shadow-sm); }
.status-item .dot { margin-top: 5px; }
.status-item strong { display: block; font-size: 13px; }
.status-item span.sub { color: var(--text-muted); font-size: 12px; display: block; }
.status-item a { font-weight: 600; }
.countdown { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--primary); }
.reason-chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: var(--surface-alt); color: var(--text-2); }
.reason-chip.callback { background: var(--warning-soft); color: var(--warning); }
.reason-chip.reply { background: var(--success-soft); color: var(--success); }
.reason-chip.click, .reason-chip.video { background: var(--primary-light); color: var(--primary); }
.reason-chip.open { background: var(--info-soft); color: var(--info); }
.reason-chip.hiring { background: #FFE8D6; color: #B3410F; }
.reason-chip.flag { background: var(--warning-soft); color: var(--warning); }
:root[data-theme="dark"] .reason-chip.hiring { background: rgba(251, 146, 60, 0.18); color: #FDBA74; }
.signal-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: var(--primary-light); color: var(--primary); margin-right: 4px; }
.tag-hiring { display: inline-flex; align-items: center; gap: 3px; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 700; background: #FFE8D6; color: #B3410F; }
:root[data-theme="dark"] .tag-hiring { background: rgba(251, 146, 60, 0.18); color: #FDBA74; }
.phone-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.phone-link:hover { color: var(--primary); }
.phone-link svg { width: 14px; height: 14px; color: var(--primary); }
.sql { background: #15171B; color: #E6E6F0; padding: 14px 16px; border-radius: 12px; font-family: var(--mono); font-size: 12px; line-height: 1.5; max-height: 280px; overflow: auto; white-space: pre; }
.steps-howto { margin: 0 0 14px; padding-left: 20px; font-size: 13.5px; color: var(--text-2); line-height: 1.6; }
.steps-howto li { margin-bottom: 4px; }
.wizard { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.wizard-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; cursor: pointer; color: var(--text-muted); transition: background .15s; min-width: 0; }
.wizard-step:hover { background: var(--surface-alt); }
.wizard-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); font-size: 12.5px; font-weight: 700; flex-shrink: 0; }
.wizard-step.active { color: var(--text); }
.wizard-step.active .wizard-num { border-color: var(--primary); background: var(--primary); color: var(--on-primary); }
.wizard-step.done .wizard-num { border-color: var(--success); background: var(--success); color: #fff; }
.wizard-step .t { font-weight: 600; font-size: 13.5px; white-space: nowrap; }
.wizard-step .s { font-size: 11.5px; white-space: nowrap; }
.wizard-line { flex: 1; height: 2px; background: var(--border); min-width: 16px; }
.summary-row { padding: 10px 0; border-bottom: 1px solid var(--border); }
.summary-row:last-child { border: 0; }
.summary-lbl { font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-muted); }
.summary-val { font-weight: 600; margin-top: 2px; overflow-wrap: anywhere; }
.summary-big { font-size: 30px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; margin-top: 2px; }
.step-card { border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; margin-bottom: 12px; background: var(--surface); }
.step-card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.step-card-head .title { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.step-actions { display: flex; gap: 6px; }
.delay-inline { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-muted); }
.delay-inline input { width: 64px; padding: 5px 8px; text-align: center; }
.donut { width: 150px; height: 150px; border-radius: 50%; position: relative; flex-shrink: 0; background: conic-gradient(var(--surface-alt) 0deg 360deg); }
.donut::after { content: ''; position: absolute; inset: 22px; border-radius: 50%; background: var(--surface); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 1; }
.donut-center span:first-child { font-size: 24px; font-weight: 700; }
.donut-center span:last-child { font-size: 11.5px; color: var(--text-muted); }
.legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; }
.legend-item { display: flex; align-items: center; gap: 8px; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.legend-val { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.estimate { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 14px 18px; border-radius: 14px; background: var(--primary-light); border: 1px solid var(--primary-soft); margin: 16px 0; }
.estimate-num { font-size: 24px; font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.estimate-arrow { color: var(--primary); opacity: 0.6; }
.city-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 30; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-md); overflow: hidden; display: none; margin-top: 4px; }
.city-list.open { display: block; }
.city-list button { display: block; width: 100%; text-align: left; background: none; color: var(--text); border: 0; padding: 9px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.city-list button:hover { background: var(--surface-alt); }
.quick-dates { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.quick-dates button { height: 28px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); font: inherit; font-size: 12px; font-weight: 600; cursor: pointer; }
.quick-dates button.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.outcome-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.outcome-grid .check-card { padding: 10px 12px; align-items: center; }
.outcome-grid .check-card strong { font-size: 13px; }
.preview-frame { width: 100%; min-height: 520px; border: 0; background: #fff; display: block; }

/* ============================================================ kanban */
.kanban { display: grid; grid-template-columns: repeat(7, minmax(230px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.kanban-col { background: var(--surface-alt); border-radius: 16px; padding: 10px; min-height: 240px; border: 2px solid transparent; transition: border-color .15s, background .15s; }
.kanban-col.drop-over { border-color: var(--primary); background: var(--primary-light); }
.kanban-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px 10px; font-weight: 700; font-size: 13px; }
.kanban-count { min-width: 24px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: 11.5px; display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.kcard { display: block; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px; color: var(--text); cursor: grab; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .15s, border-color .15s; }
.kcard:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-1px); color: var(--text); }
.kcard.dragging { opacity: 0.5; }
.kcard .t { font-weight: 600; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kcard .s { font-size: 12px; color: var(--text-muted); margin-top: 2px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.kanban-more { display: block; text-align: center; padding: 8px; font-size: 12.5px; font-weight: 600; }

/* ============================================================ call cards */
.call-list { display: grid; gap: 10px; }
.call-card { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 14px 18px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-sm); transition: border-color .15s; }
.call-card:hover { border-color: var(--border-strong); }
.call-card.top { border-left: 4px solid var(--primary); }
.call-main { min-width: 0; flex: 1; display: flex; gap: 14px; align-items: flex-start; }
.call-name { font-weight: 700; font-size: 15px; }
.call-name a { color: var(--text); }
.call-name a:hover { color: var(--primary); }
.call-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.call-reasons { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.call-note { margin-top: 6px; font-size: 13px; color: var(--text-2); font-style: italic; }
.call-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; }

/* ============================================================ settings */
.settings-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 22px; align-items: start; }
.settings-nav { position: sticky; top: calc(var(--topbar-h) + 20px); display: flex; flex-direction: column; gap: 2px; }
.settings-nav a { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-radius: 10px; color: var(--text-muted); font-weight: 600; font-size: 13.5px; }
.settings-nav a:hover { background: var(--surface-alt); color: var(--text); }
.settings-nav a.active { background: var(--primary-light); color: var(--primary); }
.settings-nav .dot { margin-left: auto; }
.settings-section { scroll-margin-top: 80px; }

/* ============================================================ login */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: linear-gradient(160deg, #1F1C3E, #17152E 50%, #0E0D1E); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth-side::before { content: ''; position: absolute; width: 520px; height: 520px; border-radius: 50%; background: radial-gradient(circle, rgba(124, 102, 255, 0.45), transparent 70%); top: -160px; right: -160px; }
.auth-side::after { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(91, 60, 240, 0.35), transparent 70%); bottom: -180px; left: -120px; }
.auth-side > * { position: relative; z-index: 1; }
.auth-side h2 { font-size: 30px; line-height: 1.15; letter-spacing: -0.02em; margin: 24px 0 12px; }
.auth-side p { color: #B9B5DA; font-size: 15px; max-width: 46ch; }
.auth-points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 12px; }
.auth-points li { display: flex; gap: 11px; align-items: flex-start; color: #DDD9F5; font-size: 14px; }
.auth-points svg { width: 18px; height: 18px; color: #A5B4FC; flex-shrink: 0; margin-top: 1px; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: 24px; margin-bottom: 6px; }
.auth-card p.lead { color: var(--text-muted); font-size: 14px; margin-bottom: 22px; }
.auth-error { display: flex; gap: 9px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.auth-foot { margin-top: 26px; font-size: 12.5px; color: var(--text-muted); }

/* ============================================================ public pages */
.public { max-width: 560px; margin: 0 auto; padding: 60px 20px; text-align: center; }
.public .brand-mark { margin: 0 auto 18px; width: 48px; height: 48px; border-radius: 14px; }
.public .brand-mark svg { width: 26px; height: 26px; }
.public h1 { font-size: 26px; margin-bottom: 10px; }
.public p { color: var(--text-muted); font-size: 15px; }

/* ============================================================ responsive */
@media (max-width: 1200px) {
  .kpis, .kpis.cols-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-strip, .status-strip.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2-1, .grid-1-2, .grid-3 { grid-template-columns: minmax(0, 1fr); }
  .settings-layout { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { position: static; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 960px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); height: 100vh; transform: translateX(-104%); transition: transform .22s ease; box-shadow: var(--shadow-lg); z-index: 120; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::before { content: ''; position: fixed; inset: 0; background: rgba(10, 8, 30, 0.5); z-index: 110; }
  .menu-toggle { display: inline-flex; }
  .topbar { padding: 0 16px; }
  .main { padding: 18px 16px 50px; }
  .banner { margin: 14px 16px 0; }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .page-head h1 { font-size: 22px; }
  .wizard-step .s { display: none; }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { display: none; }
  .card { padding: 16px; }
  .card-flush .table th:first-child, .card-flush .table td:first-child { padding-left: 16px; }
  .card-flush .table th:last-child, .card-flush .table td:last-child { padding-right: 16px; }
  .card-flush .table-foot { padding: 12px 16px 14px; }
}
@media (max-width: 640px) {
  .kpis, .kpis.cols-5, .kpis.cols-3, .status-strip, .status-strip.cols-3 { grid-template-columns: minmax(0, 1fr); }
  .form-row, .form-row-3, .outcome-grid { grid-template-columns: minmax(0, 1fr); }
  .search { display: none; }
  .wizard { gap: 4px; }
  .wizard-step { padding: 6px; gap: 6px; }
  .wizard-step .t { display: none; }
  .wizard-step.active .t { display: block; }
  .wizard-line { min-width: 6px; }
  .call-card { flex-direction: column; align-items: stretch; }
  .call-actions { justify-content: flex-start; }
  .modal { padding: 10px; }
  .modal-box { max-height: calc(100vh - 20px); }
  .page-actions .btn { flex: 1; }
  .toasts { right: 10px; left: 10px; bottom: 10px; max-width: none; }
}
@media print {
  .sidebar, .topbar, .page-actions, .toasts { display: none !important; }
  .shell { grid-template-columns: 1fr; }
}
