/* Visual layer for the six CRM modules. No business rules or data are defined here. */
.crm-workspace .crm-page-container { max-width:100rem; padding:28px 32px; }
.crm-workspace .crm-navigation { padding:22px 16px; }
.crm-workspace .crm-navigation-brand { padding-inline:4px; }
.crm-workspace .crm-brand-copy strong { font-size:17px; }
.crm-workspace .crm-topbar { padding-block:12px; }
.crm-workspace .crm-button { border-radius:10px; }
.crm-workspace .crm-button-icon { border-radius:50%; }
.crm-workspace .crm-stage-badge { display:inline-block; padding:4px 10px; border-radius:20px; background:var(--crm-field-surface); color:var(--crm-primary-hover); font-size:14px; }
.crm-workspace .crm-table thead th { background:var(--crm-field-surface); color:var(--crm-muted); font-size:14px; white-space:nowrap; }
.crm-workspace .crm-table td { font-size:14px; padding-block:16px; }
.crm-module-page { width:100%; min-width:0; margin-inline:auto; }
.crm-page-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:20px; margin-bottom:24px; }
.crm-page-heading .crm-help { margin-top:6px; font-size:14px; }
.crm-page-heading > .crm-button { flex-shrink:0; }
.crm-client-filters { display:flex; flex-wrap:wrap; gap:16px; align-items:end; margin-bottom:20px; }
.crm-client-filters > div { min-width:0; flex:1 1 140px; }
.crm-client-filters .crm-label { font-size:14px; }
.crm-client-filters .crm-field { background:var(--crm-field-surface); }
.crm-client-page #clientsStats { margin-bottom:20px; }
.crm-client-page .crm-stat { position:relative; padding:20px; background:var(--crm-surface); }
.crm-link-with-icon { display:inline-flex; align-items:center; gap:6px; }
.crm-admin-card > .crm-link { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.crm-client-page .crm-export-toolbar { padding:16px 20px; background:var(--crm-surface); }
.crm-commercial-table { min-width:0; border-radius:12px; background:var(--crm-surface); }
.crm-commercial-table .crm-table { min-width:640px; }
.crm-commercial-table .crm-table tbody tr:last-child > * { border-bottom:0; }
.crm-module-overview { margin-bottom:24px; min-width:0; }
.crm-overview-caption { font-size:14px; color:var(--crm-muted); margin-bottom:12px; }
.crm-overview-metrics { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; }
.crm-overview-metrics h2 { font-size:14px; font-weight:500; }
.crm-overview-metrics strong { display:block; margin-block:12px 8px; font-size:25px; font-variant-numeric:tabular-nums; }
.crm-overview-metrics .crm-help { font-size:14px; }
.crm-leads-layout { display:grid; grid-template-columns:minmax(0,2fr) minmax(250px,1fr); gap:20px; align-items:start; }
.crm-lead-distribution { min-width:0; }
.crm-lead-distribution .crm-section-title { font-size:16px; }
.crm-lead-distribution > .crm-help { margin-top:8px; font-size:14px; }
.crm-distribution-item { margin-top:24px; font-size:14px; }
.crm-distribution-item progress { appearance:none; display:block; height:10px; width:100%; margin-top:10px; border:0; border-radius:8px; overflow:hidden; background:var(--crm-field-surface); color:var(--crm-primary); }
.crm-distribution-item progress::-webkit-progress-bar { background:var(--crm-field-surface); }
.crm-distribution-item progress::-webkit-progress-value { background:var(--crm-primary); border-radius:8px; }
.crm-distribution-item progress::-moz-progress-bar { background:var(--crm-primary); }
.crm-pipeline-overview { display:grid; grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr)); gap:16px; }
.crm-pipeline-stage { padding:18px; border:1px solid var(--crm-border); border-top:3px solid var(--crm-primary); border-radius:10px; background:var(--crm-surface); }
.crm-pipeline-stage h2 { font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.crm-pipeline-stage strong { display:block; font-size:26px; margin-block:10px 4px; }
.crm-pipeline-stage .crm-help { font-size:14px; }
.crm-pipeline-stage .crm-link { display:inline-flex; align-items:center; gap:8px; margin-top:16px; min-height:44px; font-size:14px; }
.crm-admin-hub { margin-bottom:32px; }
.crm-admin-cards { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:20px; }
.crm-admin-card { display:flex; flex-direction:column; gap:12px; }
.crm-admin-card > .crm-icon { color:var(--crm-primary); }
.crm-admin-card h2 { font-size:16px; font-weight:600; }
.crm-admin-card .crm-help { font-size:14px; }
.crm-admin-card .crm-link { margin-top:auto; padding-top:12px; font-size:14px; }
.crm-integration-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,280px),1fr)); gap:20px; list-style:none; padding:0; }
.crm-integration-list > li { padding:24px; border:1px solid var(--crm-border); border-radius:12px; background:var(--crm-surface); }
.crm-integration-list > li > div { margin-top:16px; }
@media(max-width:1100px) { .crm-leads-layout { grid-template-columns:minmax(0,1fr); } }
@media(max-width:760px) {
    .crm-overview-metrics { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .crm-workspace .crm-page-container { padding:24px 16px; }
    .crm-page-heading { align-items:flex-start; }
}
@media(max-width:420px) {
    .crm-overview-metrics { grid-template-columns:minmax(0,1fr); }
    .crm-client-filters > div { flex-basis:100%; }
}
