.crm-tabs { display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid var(--line); margin-bottom:22px; }
.crm-tabs button { background:transparent; border:0; border-bottom:2px solid transparent; padding:12px; color:var(--muted); font-size:13px; }
.crm-tabs button[aria-selected=true] { border-color:var(--primary); color:var(--primary); font-weight:700; }
.crm-toolbar { display:flex; flex-wrap:wrap; align-items:end; gap:12px; margin:22px 0; }
.crm-toolbar label { display:grid; gap:5px; }
.crm-toolbar input,.crm-toolbar select { padding:8px 10px; border:1px solid var(--line); background:white; }
.crm-toolbar input { width:240px; }
.crm-toolbar .primary-button { margin-left:auto; }
.crm-board { display:grid; grid-template-columns:repeat(6,minmax(210px,1fr)); overflow:auto; max-height:650px; gap:12px; padding-bottom:16px; }
.crm-column { min-width:0; background:#edf2f5; border-radius:6px; padding:12px; }
.crm-column h3 { font-size:13px; display:flex; justify-content:space-between; }
.crm-deal { background:#fff; border:1px solid var(--line); border-radius:6px; padding:14px; margin-top:10px; }
.crm-deal button { padding:0; border:0; background:none; text-align:left; color:var(--primary); font-weight:650; overflow-wrap:anywhere; }
.crm-deal p { margin:8px 0; font-size:12px; color:var(--muted); }
.crm-deal select { width:100%; border:1px solid var(--line); background:white; padding:4px; font-size:12px; }
.crm-empty { padding:32px 16px; text-align:center; color:var(--muted); background:#fff; border:1px dashed var(--line); border-radius:6px; }
.crm-link { border:0; background:none; color:var(--primary); text-align:left; padding:0; font-weight:600; }
.crm-overdue { color:#ae4526; font-weight:600; }
.crm-actions { display:flex; gap:10px; flex-wrap:wrap; margin-top:20px; }
.crm-dialog { width:min(720px,calc(100vw - 28px)); max-height:90dvh; overflow:auto; border:1px solid var(--line); border-radius:8px; padding:24px; color:var(--ink); }
.crm-dialog::backdrop { background:#263b4d66; }
.crm-dialog header { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:20px; }
.crm-dialog h2 { font-size:20px; }
.crm-dialog label { display:grid; gap:6px; }
.crm-dialog input,.crm-dialog select,.crm-dialog textarea { width:100%; padding:9px; border:1px solid var(--line); background:white; }
.crm-dialog .form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); }
.crm-timeline { padding:0; list-style:none; max-height:260px; overflow:auto; }
.crm-timeline li { border-bottom:1px solid var(--line); padding:12px 0; }
.crm-timeline small { display:block; color:var(--muted); }
.crm-report { display:grid; gap:16px; }
.crm-report .bar-track { margin-top:6px; }
@media(max-width:600px) { .crm-dialog .form-grid { grid-template-columns:1fr; } .crm-toolbar label,.crm-toolbar input { width:100%; } .crm-toolbar .primary-button { margin-left:0; } }
@media print { .crm-actions { display:none; } }
.view > #crmWorkspace, #crmResults { min-width:0; max-width:100%; }
.crm-extra-items { margin-top:20px; }
.crm-item-row { display:grid; grid-template-columns:2fr 1fr 1fr 32px; gap:8px; align-items:end; margin-bottom:12px; }
@media(max-width:600px) { .crm-item-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); } }
.crm-tabs { flex-wrap:nowrap; overflow:auto; gap:22px; margin:0 -28px; padding:0 28px; scrollbar-width:thin; }
.crm-tabs button { display:flex; align-items:center; gap:7px; white-space:nowrap; padding:16px 0 14px; font-size:12px; font-weight:500; }
.crm-tabs button svg { width:15px;height:15px; }
.crm-tabs button[aria-selected=true] { color:#087ca3; border-color:#087ca3; }
.crm-page-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:28px 0 24px; }
.crm-breadcrumb { color:#9aa5ae; font-size:10px; margin:0 0 7px; }
.crm-page-heading h2 { font-size:25px; font-weight:650; }
.crm-heading-actions { display:flex; align-items:center; gap:10px; }
.crm-icon { width:32px; height:32px; display:inline-flex; align-items:center; justify-content:center; border:0; background:transparent; color:#8a99a4; border-radius:4px; padding:6px; cursor:pointer; }
.crm-icon:hover { background:#e8f0f4; color:#087ca3; }
.crm-icon svg { width:16px;height:16px; }
.export-action { border:1px solid var(--line);width:36px;height:36px; }
.crm-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border:1px solid #e4e9ed; border-radius:6px; margin-bottom:24px; background:#fff; }
.crm-summary > div,.crm-summary > button { min-width:0; padding:18px 20px; border:0; background:none; text-align:left; }
.crm-summary > * + * { border-left:1px solid #e4e9ed; }
.crm-summary span,.crm-summary small { display:block; color:#8b98a3; font-size:11px; font-weight:400; }
.crm-summary span { color:#5e6f7b; margin-bottom:9px; }
.crm-summary span small { display:inline; margin-left:6px; font-size:9px; }
.crm-summary strong { display:flex; align-items:center; justify-content:space-between; font-size:25px; font-weight:650; color:#263843; margin-bottom:5px; font-variant-numeric:tabular-nums; }
.crm-summary strong svg { width:18px; color:#c4a078; }
.crm-summary > button:hover { background:#fffaf4; }
.crm-toolbar { flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 18px; }
.crm-toolbar > select { width:auto; min-width:100px; max-width:180px; min-height:34px; height:34px; padding:4px 24px 4px 10px; border:1px solid #e1e7eb; border-radius:5px; color:#687985; font-size:11px; }
.crm-toolbar .crm-search-label { position:relative; display:flex; align-items:center; width:230px; margin-right:auto; }
.crm-toolbar .crm-search-label svg { position:absolute; left:10px; width:14px; height:14px; color:#9ba8b2; }
.crm-toolbar .crm-search-label input { width:100%; height:34px; min-height:34px; padding:6px 10px 6px 32px; font-size:12px; }
.crm-viewbar { display:flex; justify-content:space-between; align-items:center; padding:0 0 14px; }
.crm-scopes { display:flex; gap:14px; }
.crm-scopes button { border:0; background:none; padding:6px 0; color:#8b98a3; font-size:11px; }
.crm-scopes button[aria-pressed=true] { color:#2a4658; font-weight:600; }
.crm-scopes button span { display:inline-block; padding:1px 6px; margin-left:5px; background:#eef3f6; border-radius:4px; font-size:10px; }
.crm-layout-switch { display:flex; border:1px solid #e2e8ec; padding:2px; border-radius:5px; }
.crm-layout-switch button { display:grid;place-items:center; background:none; border:0; padding:5px 8px;color:#99a5ae;border-radius:3px; }
.crm-layout-switch button[aria-pressed=true] { background:#eef4f7;color:#087ca3; }
.crm-layout-switch svg { width:15px;height:15px; }
.crm-board { grid-template-columns:repeat(var(--columns,4),minmax(220px,1fr)); gap:14px; max-height:calc(100dvh - 390px); min-height:350px; overflow:auto; padding-bottom:12px; align-items:start; }
.crm-column { background:#f6f8fa; border:1px solid #edf0f3; padding:12px 10px; border-radius:6px; min-height:320px; }
.crm-column-head { display:flex; align-items:center; justify-content:space-between; }
.crm-column-head h3 { justify-content:start; align-items:center; gap:7px; margin:0; font-size:11px; font-weight:650; }
.crm-stage-dot { width:6px;height:6px;border-radius:50%;background:#87b9d5; }
.stage-qualified { background:#b9a9d9; }.stage-proposal { background:#e5ba80; }.stage-negotiation { background:#83c4b1; }.stage-won {background:#68b598;}.stage-lost {background:#dd9b91;}
.crm-count { font-size:10px; color:#96a3ad; font-weight:400; }
.crm-column-total { color:#91a0aa; font-size:11px; margin:0 0 14px 13px; }
.crm-deal { padding:14px; margin:0 0 10px; border:1px solid #e4e9ee; border-radius:6px; box-shadow:0 2px 3px #1d3c5003; cursor:grab; }
.crm-deal:hover { border-color:#b8d2e1; box-shadow:0 3px 9px #1b40520a; }
.crm-deal-top { display:flex; justify-content:space-between; align-items:center; gap:8px; color:#9ba7b0; margin-bottom:9px; }
.crm-deal-top > svg { width:13px;height:13px;flex:none; }
.crm-company-label { font-size:10px; overflow:hidden; text-overflow:ellipsis;white-space:nowrap; }
.crm-deal .crm-deal-title { color:#364c5c; font-size:12px; font-weight:600; line-height:1.5; }
.crm-deal-value { display:block; font-size:16px; color:#263e4d; font-weight:650; margin:12px 0; }
.crm-deal .crm-next-action { display:flex; gap:5px; font-size:10px; color:#97a3ac; margin:0 0 14px; align-items:flex-start; }
.crm-next-action svg { width:12px;height:12px;flex:none; }
.crm-deal-foot { display:flex; align-items:center; gap:8px; padding-top:10px; border-top:1px solid #f0f3f5; color:#97a3ad; }
.crm-person { width:23px;height:23px;display:inline-grid;place-items:center;border-radius:50%;background:#edf1f8;color:#7d8fa7;font-size:8px;flex:none; }
.crm-deal-foot > span:nth-child(2) { display:flex;align-items:center;gap:4px; font-size:9px; }
.crm-deal-foot svg { width:11px;height:11px; }
.crm-deal-foot button { margin-left:auto; width:24px;height:24px;display:grid;place-items:center; }
.crm-deal select { border:0;border-top:1px solid #f0f3f5; background:#fff; min-height:27px; height:27px; font-size:10px; padding:2px 0; margin-top:8px; color:#8d9ca7; }
.crm-column-empty { border:1px dashed #dde5ea;border-radius:5px;padding:22px 8px;text-align:center;font-size:10px;color:#a5b0b8; }
.crm-result-count { font-size:11px;color:#96a3ad;margin:14px 0; }
.crm-empty { min-height:280px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px; border-color:#e5ebef; background:#fafcfd; }
.crm-empty > svg { width:30px;height:30px;color:#a7bac7; }.crm-empty p,.crm-empty h3 {margin:0;}.crm-empty h3 {font-size:15px;}
.crm-dialog { position:fixed; margin:0 0 0 auto; inset:0 0 0 auto; width:min(600px,100vw); height:100dvh; max-height:100dvh; border:0; border-left:1px solid #dce5eb; border-radius:0; padding:0 26px 24px; box-shadow:-10px 0 50px #173c5412; }
.crm-dialog::backdrop { background:#19344426; }
.crm-dialog header { position:sticky;top:0;z-index:2;background:white;margin:0 -26px;padding:22px 26px;border-bottom:1px solid #e7edf1; }
.crm-dialog header h2 { font-size:19px;font-weight:600; }.crm-dialog header button { border:0;background:#f5f8fa;width:30px;height:30px;display:grid;place-items:center;padding:6px; }
.crm-dialog header button svg {width:16px;height:16px;}
.crm-drawer-context { font-size:11px;color:#93a1ac;margin:18px 0 24px; }
.crm-dialog label { font-size:11px;font-weight:500;color:#70808c;gap:7px; }
.crm-dialog input,.crm-dialog select { min-height:38px;font-size:12px; }
.crm-dialog textarea { font-size:12px;min-height:100px; }
.crm-wide-field { grid-column:1/-1; }
.crm-dialog .crm-actions { position:sticky;bottom:-24px;background:white;z-index:1;padding:18px 0;border-top:1px solid #e8edf1;margin-top:24px; }
.crm-timeline li { font-size:12px; border-left:2px solid #d9e8ef;padding:12px 14px;margin-left:4px; }
.crm-timeline small { font-size:10px;margin:5px 0; }
@media(max-width:1100px) { .crm-summary strong {font-size:21px;} .crm-summary > div,.crm-summary > button {padding:16px 12px;} }
@media(max-width:760px) {
 .crm-tabs { margin:0 -16px;padding:0 16px;gap:20px; }.crm-tabs button {font-size:11px;padding:14px 0;}
 .crm-page-heading { padding:24px 0 20px; }.crm-page-heading h2 {font-size:22px;}.crm-heading-actions .export-action {display:none;}
 .crm-summary {grid-template-columns:repeat(2,minmax(0,1fr));}.crm-summary > :nth-child(3){border-left:0;border-top:1px solid var(--line);}.crm-summary > :nth-child(4){border-top:1px solid var(--line);}
 .crm-toolbar {gap:7px;}.crm-toolbar .crm-search-label {width:100%;}.crm-toolbar > select {flex:1;min-width:100px;max-width:100%;font-size:10px;}
 .crm-board {max-height:none;min-height:360px;grid-template-columns:repeat(var(--columns,4),minmax(250px,1fr));scroll-snap-type:x proximity;}.crm-column {scroll-snap-align:start;}
 .crm-dialog {padding:0 20px 24px;}.crm-dialog header {margin:0 -20px;padding:20px;}
}
