.toolbar,.panel { background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); }
.toolbar { display:flex; align-items:center; gap:10px; flex-wrap:wrap; padding:12px; margin-bottom:20px; }
.field { height:38px; padding:0 10px; color:var(--fg); background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); }
.field.search-field { flex:1; min-width:230px; }
.count { margin-left:auto; color:var(--muted); font-size:var(--text-xs); }
.kpi-row { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:20px; }
.metric { padding:16px; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); }
.metric-label,.metric-note { color:var(--muted); font-size:var(--text-xs); }
.metric-value { margin:5px 0 2px; font-size:var(--text-xl); font-weight:600; letter-spacing:-.02em; }
.lane-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(280px,1fr)); gap:16px; align-items:start; }
.lane { min-height:175px; overflow:hidden; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-md); }
.lane-head { display:flex; align-items:center; gap:8px; padding:14px; border-bottom:1px solid var(--border-soft); }
.lane-title { overflow-wrap:anywhere; font-weight:600; }
.lane-count { padding:2px 7px; color:var(--muted); background:var(--bg); border-radius:var(--radius-pill); font-size:var(--text-xs); }
.lane-more { display:grid; place-items:center; width:28px; height:28px; margin-left:auto; border:0; border-radius:var(--radius-sm); color:var(--muted); background:transparent; }
.lane-more:hover { background:var(--surface-warm); }
.lane-body { display:grid; gap:10px; padding:10px; }
.empty { padding:18px 14px; color:var(--muted); font-size:var(--text-xs); }
.lead { width:100%; padding:12px; color:var(--fg); text-align:left; background:var(--surface); border:1px solid var(--border); border-radius:var(--radius-sm); }
.lead:hover { border-color:color-mix(in oklab,var(--accent),var(--border) 65%); }
.lead-top { display:flex; align-items:center; gap:8px; }
.photo { display:grid; place-items:center; width:28px; height:28px; color:var(--accent); background:var(--surface-warm); border-radius:50%; font-size:11px; font-weight:600; }
.lead-name { overflow:hidden; min-width:0; font-weight:600; text-overflow:ellipsis; white-space:nowrap; }
.chevron { margin-left:auto; color:var(--muted); }
.lead-detail { display:none; margin:10px 0 0 36px; color:var(--muted); font-size:var(--text-xs); }
.lead.expanded .lead-detail { display:block; }
.lead-meta { display:flex; justify-content:space-between; margin-top:8px; }
.chip.success { color:var(--success); border-color:color-mix(in oklab,var(--success),var(--border) 70%); }
.chip.warn { color:var(--warn); border-color:color-mix(in oklab,var(--warn),var(--border) 70%); }
.view,.crm-pane { display:none; }
.view.active,.crm-pane.active { display:block; }
.section-head { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-bottom:14px; }
.split { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(300px,1fr); gap:16px; }
.panel { padding:18px; }
.panel + .panel { margin-top:16px; }
.stack { display:grid; gap:12px; }
.row { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:11px 0; border-bottom:1px solid var(--border-soft); }
.row:last-child { border-bottom:0; }
.row-title { font-weight:600; }
.row-meta { color:var(--muted); font-size:var(--text-xs); }
.table-wrap { overflow:auto; }
table { width:100%; min-width:700px; border-collapse:collapse; }
th,td { padding:11px 12px; border-bottom:1px solid var(--border-soft); text-align:left; white-space:nowrap; }
th { color:var(--muted); font-size:var(--text-xs); font-weight:600; }
td button { border:0; color:var(--accent); background:transparent; font-weight:600; }
.chart { display:grid; gap:12px; padding-top:8px; }
.bar-row { display:grid; grid-template-columns:80px minmax(100px,1fr) 48px; gap:10px; align-items:center; font-size:var(--text-xs); }
.bar-track { height:8px; overflow:hidden; background:var(--border-soft); border-radius:var(--radius-pill); }
.bar { height:100%; width:calc(var(--v) / var(--max) * 100%); background:var(--accent); border-radius:inherit; }
.status-dot { width:8px; height:8px; border-radius:50%; background:var(--success); }
.status-dot.warn { background:var(--warn); }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.form-grid label { display:grid; gap:5px; color:var(--fg-2); font-size:var(--text-xs); font-weight:600; }
textarea.field { height:90px; padding:10px; resize:vertical; }
.full { grid-column:1/-1; }
[hidden] { display:none !important; }
.modal-wrap { position:fixed; inset:0; z-index:60; display:none; place-items:center; padding:16px; background:color-mix(in oklab,var(--fg),transparent 50%); }
.modal-wrap.open { display:grid; }
.modal { width:min(520px,100%); max-height:90vh; overflow:auto; padding:22px; background:var(--surface); border-radius:var(--radius-lg); box-shadow:var(--elev-raised); }
.modal-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:18px; }
.modal-close { border:0; color:var(--fg-2); background:transparent; font-size:24px; }
.modal-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:18px; }
.toast { position:fixed; right:20px; bottom:20px; z-index:70; padding:12px 16px; color:var(--surface); background:var(--fg); border-radius:var(--radius-sm); box-shadow:var(--elev-raised); opacity:0; transform:translateY(90px); transition:var(--motion-base) var(--ease-standard); }
.toast.show { opacity:1; transform:translateY(0); }
.dark { --bg:#0b1220; --surface:#111827; --surface-warm:color-mix(in oklab,var(--accent),var(--surface) 87%); --fg:#f2f5fa; --fg-2:#c4ccd8; --muted:#91a0b5; --border:#283548; --border-soft:#1c293a; }
