:root{--sales-ink:#172033;--sales-muted:#6b7280;--sales-line:#e7eaf0;--sales-surface:#fff;--sales-bg:#f4f6fa;--sales-primary:#5b4ee8;--sales-primary-dark:#4438ca;--sales-danger:#e5484d;--sales-success:#13966f}
.sales-leads-page{min-height:100%;background:var(--sales-bg);color:var(--sales-ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}.sales-hero{display:flex;align-items:flex-end;justify-content:space-between;padding:30px 32px 24px;background:linear-gradient(135deg,#181b32 0%,#282454 55%,#45378c 100%);color:#fff;overflow:hidden;position:relative}.sales-hero:after{content:"";position:absolute;width:320px;height:320px;border-radius:50%;right:14%;top:-230px;border:58px solid rgba(255,255,255,.055)}.sales-eyebrow,.sales-panel-kicker{font-weight:800;font-size:10px;letter-spacing:.16em;color:#8e83ff}.sales-eyebrow{color:#c7c2ff;margin-bottom:6px}.sales-eyebrow span{display:inline-block;width:19px;height:2px;background:#9e94ff;vertical-align:middle;margin-right:7px}.sales-hero h1{font-size:30px;font-weight:800;margin:0 0 5px;letter-spacing:-.025em}.sales-hero p{margin:0;color:#cbcbe2;font-size:14px}.sales-hero-actions{display:flex;gap:10px;position:relative;z-index:1}.sales-btn-primary,.sales-btn-ghost{border-radius:9px;padding:9px 15px;font-weight:700;font-size:13px;box-shadow:none!important}.sales-btn-primary{background:var(--sales-primary);border:1px solid var(--sales-primary);color:#fff}.sales-btn-primary:hover{background:var(--sales-primary-dark);border-color:var(--sales-primary-dark);color:#fff}.sales-btn-ghost{background:#fff;border:1px solid #dfe3ea;color:#394056}.sales-hero .sales-btn-ghost{background:rgba(255,255,255,.11);border-color:rgba(255,255,255,.25);color:#fff}.sales-btn-primary i,.sales-btn-ghost i{margin-right:6px}.sales-content{padding:20px 32px 42px}.sales-filter-bar{display:flex;align-items:flex-end;gap:12px;padding:13px 16px;background:#fff;border:1px solid var(--sales-line);border-radius:12px;margin-bottom:16px;box-shadow:0 3px 12px rgba(20,28,50,.025)}.sales-filter-title{display:flex;align-items:center;gap:8px;align-self:center;padding-right:10px;border-right:1px solid var(--sales-line);font-size:13px;font-weight:750}.sales-filter-title i{color:var(--sales-primary)}.sales-filter-bar label{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#8a91a1;font-weight:750;margin:0}.sales-filter-bar .form-control{height:35px;border-radius:7px;border-color:#dfe3ea;margin-top:4px;font-size:13px;min-width:135px;text-transform:none;letter-spacing:0}.sales-filter-bar .sales-owner-filter{min-width:230px}.sales-text-button{border:0;background:transparent;color:var(--sales-primary);font-size:12px;font-weight:750;padding:8px;cursor:pointer}.sales-kpi-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin-bottom:16px}.sales-kpi-card{background:#fff;border:1px solid var(--sales-line);border-radius:12px;padding:16px;display:flex;align-items:center;gap:13px;min-height:105px;transition:transform .18s,box-shadow .18s}.sales-kpi-card[role=button]{cursor:pointer}.sales-kpi-card[role=button]:hover{transform:translateY(-2px);box-shadow:0 8px 22px rgba(27,35,58,.08)}.sales-kpi-icon{width:40px;height:40px;border-radius:10px;display:grid;place-items:center;font-size:15px;flex:0 0 40px}.sales-kpi-card span{display:block;color:#717889;font-size:11px;font-weight:700}.sales-kpi-card strong{display:block;font-size:25px;line-height:1.12;margin:4px 0 3px;letter-spacing:-.035em}.sales-kpi-card small{font-size:10px;color:#9aa0ad}.kpi-total .sales-kpi-icon{background:#eeecff;color:#6558dc}.kpi-new .sales-kpi-icon{background:#e9f3ff;color:#2879d8}.kpi-due .sales-kpi-icon{background:#fff5d9;color:#d48a00}.kpi-overdue .sales-kpi-icon{background:#ffebed;color:#e5484d}.kpi-rate .sales-kpi-icon{background:#e7f8f1;color:#13966f}.is-loading{opacity:.65}.sales-insight-grid{display:grid;grid-template-columns:minmax(400px,.92fr) minmax(460px,1.08fr);gap:16px;margin-bottom:16px}.sales-panel{background:#fff;border:1px solid var(--sales-line);border-radius:13px;box-shadow:0 3px 14px rgba(20,28,50,.025)}.sales-panel-header{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px}.sales-panel h2,.sales-list-head h2{font-size:17px;font-weight:800;margin:3px 0 0;letter-spacing:-.015em}.sales-panel-note{font-size:10px;color:#a0a5b1}.sales-source-list{padding:2px 20px 17px}.sales-source-row{display:flex;align-items:center;gap:11px;padding:9px 0;border-bottom:1px solid #f0f1f5}.sales-source-row:last-child{border:0}.source-symbol{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;flex:0 0 34px}.source-main{flex:1}.source-main>div:first-child{display:flex;justify-content:space-between;align-items:center;margin-bottom:6px}.source-main strong{font-size:12px}.source-main span{font-size:10px;color:#8f95a3}.source-progress{height:4px;border-radius:6px;background:#eef0f4;overflow:hidden}.source-progress i{display:block;height:100%;border-radius:6px;min-width:2px}.source-rate{width:60px;text-align:right}.source-rate strong{display:block;font-size:13px}.source-rate span{display:block;font-size:9px;color:#a0a5b1}.focus-panel{overflow:hidden}.focus-item{display:flex;width:100%;border:0;border-top:1px solid #f0f1f5;background:#fff;align-items:center;padding:11px 18px;text-align:left;transition:background .15s}.focus-item:hover{background:#fafaff}.customer-avatar{width:35px;height:35px;border-radius:10px;background:linear-gradient(135deg,#685bea,#958aee);color:#fff;display:grid;place-items:center;font-weight:800;text-transform:uppercase;flex:0 0 35px}.focus-info{display:block;flex:1;padding:0 11px;min-width:0}.focus-info strong{display:block;font-size:12px}.focus-info small{display:block;font-size:10px;color:#8e94a1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:2px}.focus-time{font-size:10px;color:#717889;background:#f5f6f9;padding:6px 8px;border-radius:7px}.focus-time.is-overdue{background:#ffedef;color:#d63c43;font-weight:700}.focus-arrow{font-size:9px;color:#b9bdc6;margin-left:9px}.focus-empty{min-height:220px;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#a0a5b1}.focus-empty i{font-size:30px;color:#55ba97;margin-bottom:10px}.focus-empty strong{color:#374151;font-size:13px}.focus-empty span{font-size:11px;margin-top:3px}.sales-list-panel{overflow:hidden}.sales-list-head{padding:18px 20px 14px;display:flex;align-items:flex-end;justify-content:space-between;gap:18px}.sales-list-head h2 em{font-size:10px;font-style:normal;background:#eeecff;color:#5d50d5;padding:3px 7px;border-radius:10px;vertical-align:3px;margin-left:4px}.sales-list-tools{display:flex;gap:8px}.sales-list-tools .form-control{height:35px;width:145px;border-radius:7px;font-size:12px;border-color:#e0e3e9}.sales-search{height:35px;width:260px;position:relative}.sales-search i{position:absolute;left:11px;top:11px;color:#a5aab5;font-size:12px}.sales-search input{width:100%;height:100%;border:1px solid #e0e3e9;border-radius:7px;padding:0 10px 0 31px;font-size:12px;outline:none}.sales-search input:focus{border-color:#958bef;box-shadow:0 0 0 3px rgba(91,78,232,.08)}.active-quick-filter{margin:0 20px 12px;background:#fff2f3;color:#b72b34;border-radius:7px;padding:7px 10px;font-size:11px}.active-quick-filter button{border:0;background:transparent;float:right;color:#b72b34}.sales-table-wrap{overflow-x:auto}.sales-lead-table{width:100%;border-collapse:collapse;min-width:1050px}.sales-lead-table th{background:#f8f9fb;border-top:1px solid #eceef2;border-bottom:1px solid #e5e7ec;color:#838998;text-transform:uppercase;letter-spacing:.075em;font-size:9px;padding:10px 14px}.sales-lead-table td{padding:12px 14px;border-bottom:1px solid #eff0f3;font-size:11px;vertical-align:middle}.sales-lead-table tbody tr:hover{background:#fbfbfe}.lead-overdue-row{box-shadow:inset 3px 0 #e5484d}.lead-customer{display:flex;align-items:center;gap:9px}.lead-customer .customer-avatar{width:32px;height:32px;flex-basis:32px;border-radius:9px;font-size:12px}.lead-customer button{display:block;background:none;border:0;padding:0;font-weight:750;font-size:12px;color:#242a3a}.lead-customer button:hover{color:var(--sales-primary)}.lead-customer small,.company-text{display:block;color:#9096a4;font-size:9px;margin-top:2px}.source-pill{display:inline-flex;align-items:center;gap:6px;background:#f7f8fa;border-radius:7px;padding:5px 7px;font-weight:650}.need-text{display:block;font-size:11px;max-width:180px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.owner-name{display:inline-flex;align-items:center;gap:5px}.owner-name i{color:#65a98e;font-size:9px}.unassigned{color:#c47b15;background:#fff5df;border-radius:7px;padding:4px 6px}.follow-date{display:inline-flex;align-items:center;gap:5px;color:#697080}.follow-date.is-overdue{color:#d53b43;font-weight:700}.status-badge{display:inline-block;border-radius:20px;padding:5px 8px;font-weight:750;font-size:9px;white-space:nowrap}.status-new{background:#e9f3ff;color:#2474cb}.status-assigned{background:#efedff;color:#6255d2}.status-contacting,.status-consulting{background:#fff3d8;color:#b57300}.status-quoted{background:#e0f2fe;color:#0284c7;border:1px solid #bae6fd}.status-follow_up{background:#f2eaff;color:#8a42c0}.status-won{background:#e5f7ef;color:#108662}.status-lost{background:#ffeaec;color:#cf3740}.lead-actions{white-space:nowrap}.lead-actions button{width:30px;height:30px;border:1px solid #e5e7ec;border-radius:7px;background:#fff;color:#707788;margin-left:4px}.lead-actions button:hover{border-color:#aaa2f2;color:var(--sales-primary)}.sales-table-state{text-align:center!important;padding:42px!important;color:#9298a5}.sales-table-state i{margin-right:7px}.sales-pagination{display:flex;justify-content:flex-end;align-items:center;gap:12px;padding:12px 20px;color:#898f9c;font-size:10px}.sales-pagination button{width:30px;height:28px;background:#fff;border:1px solid #e0e3e9}.sales-pagination button:first-child{border-radius:7px 0 0 7px}.sales-pagination button:last-child{border-radius:0 7px 7px 0;margin-left:-1px}.sales-pagination button:disabled{opacity:.4}.sales-modal .modal-content{border:0;border-radius:14px;box-shadow:0 18px 55px rgba(20,24,45,.25);overflow:hidden}.sales-modal .modal-header{border:0;padding:20px 22px 12px;align-items:flex-start}.sales-modal .modal-header h3{font-size:19px;font-weight:800;margin:3px 0 0}.sales-modal .modal-header small{color:#8b91a0;font-size:10px}.sales-modal .close{font-size:25px;font-weight:400;color:#7f8592}.sales-modal .modal-body{padding:10px 22px 22px}.sales-modal .modal-footer{border-top:1px solid #eef0f3;padding:12px 22px}.sales-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px 14px}.sales-form-grid .field-wide{grid-column:span 2}.sales-form-grid .field-full{grid-column:1/-1}.sales-form-grid label{margin:0}.sales-form-grid label>span{display:block;color:#626979;font-weight:750;font-size:10px;text-transform:uppercase;letter-spacing:.055em;margin-bottom:5px}.sales-form-grid label b{color:#e5484d}.sales-form-grid .form-control{border-color:#dfe3e9;border-radius:8px;min-height:38px;font-size:12px}.sales-form-grid .form-control:focus{border-color:#958bef;box-shadow:0 0 0 3px rgba(91,78,232,.08)}.duplicate-warning{display:flex;align-items:center;gap:10px;background:#fff6e6;border:1px solid #f3d89e;color:#8a5b08;border-radius:9px;padding:10px 12px;margin-bottom:14px}.duplicate-warning>i{font-size:18px}.duplicate-warning div{flex:1}.duplicate-warning strong,.duplicate-warning span{display:block;font-size:11px}.duplicate-warning span{font-size:10px;margin-top:2px}.duplicate-warning button{border:0;background:#d38b0b;color:#fff;border-radius:7px;padding:7px 9px;font-weight:700;font-size:10px}.followup-callout{display:flex;align-items:center;background:#f7f7fc;border:1px solid #e9e8f4;border-radius:10px;padding:10px;margin-bottom:16px}.followup-callout>div{flex:1;margin-left:10px}.followup-callout strong,.followup-callout small{display:block}.followup-callout strong{font-size:11px}.followup-callout small{font-size:9px;color:#8a91a0}.followup-callout a{background:#e5f7ef;color:#118460;border-radius:8px;padding:8px 10px;font-size:10px;font-weight:750}.lead-detail-summary{display:grid;grid-template-columns:repeat(4,1fr);background:#f7f8fb;border-radius:10px;padding:13px}.lead-detail-summary div{padding:0 12px;border-right:1px solid #e3e6ed}.lead-detail-summary div:last-child{border:0}.lead-detail-summary span,.lead-detail-summary strong{display:block}.lead-detail-summary span{font-size:9px;color:#9298a6;text-transform:uppercase;letter-spacing:.06em}.lead-detail-summary strong{font-size:11px;margin-top:4px}.timeline-title{font-size:13px;font-weight:800;margin:20px 0 12px}.lead-timeline{position:relative;padding-left:7px}.lead-timeline:before{content:"";position:absolute;left:16px;top:5px;bottom:10px;width:1px;background:#e0e3e9}.timeline-item{display:flex;gap:12px;position:relative;margin-bottom:15px}.timeline-item>i{width:20px;height:20px;border-radius:50%;display:grid;place-items:center;background:#eeecff;color:#6255d2;font-size:7px;z-index:1}.timeline-item strong{font-size:11px}.timeline-item p{font-size:11px;margin:3px 0;color:#555d6c}.timeline-item small{font-size:9px;color:#979daa}.detail-loading{text-align:center;padding:50px;color:#7165de}

/* Keep long lead forms inside the viewport while the actions remain reachable. */
.sales-modal .modal-content {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 3.5rem);
}

.sales-modal .modal-header,
.sales-modal .modal-footer {
  flex-shrink: 0;
}

.sales-modal .modal-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sales-form-expand {
  grid-column: 1 / -1;
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--sales-primary);
  font-size: 12px;
  font-weight: 750;
  padding: 2px 0;
  cursor: pointer;
}

.sales-form-expand i {
  margin-right: 7px;
}

.sales-tabs{display:flex;gap:4px;margin-bottom:14px;border-bottom:1px solid #dfe3ea}.sales-tabs button{border:0;background:transparent;color:#747b8b;padding:10px 14px;border-bottom:2px solid transparent;font-size:12px;font-weight:750;cursor:pointer}.sales-tabs button i{margin-right:7px}.sales-tabs button.active{color:var(--sales-primary);border-bottom-color:var(--sales-primary)}
.sales-period-shortcuts{display:flex;gap:5px;margin-left:auto;align-self:center}.sales-period-shortcuts button{border:1px solid #dfe3ea;background:#fff;color:#555d6c;border-radius:7px;padding:7px 9px;font-size:10px;font-weight:700}.sales-period-shortcuts button:hover{border-color:#958bef;color:var(--sales-primary)}
.sales-report-heading{display:flex;align-items:flex-end;justify-content:space-between;margin:4px 0 16px}.sales-report-heading h2{font-size:23px;font-weight:800;margin:3px 0}.sales-report-heading p{margin:0;color:#858b98;font-size:11px}
.sales-report-kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:11px;margin-bottom:16px}.sales-report-kpis article{background:#fff;border:1px solid var(--sales-line);border-top:3px solid #7c70e8;border-radius:11px;padding:14px 15px}.sales-report-kpis span,.sales-report-kpis small{display:block}.sales-report-kpis span{color:#727989;font-size:10px;font-weight:750;text-transform:uppercase;letter-spacing:.045em}.sales-report-kpis strong{display:block;font-size:25px;margin:4px 0 2px}.sales-report-kpis small{color:#999fab;font-size:9px}.sales-report-kpis .report-kpi-success{border-top-color:#20a47d}.sales-report-kpis .report-kpi-warning{border-top-color:#e4a11b}.sales-report-kpis .report-kpi-danger{border-top-color:#e5484d}
.sales-report-grid{display:grid;grid-template-columns:minmax(0,1.5fr) minmax(245px,.65fr) minmax(245px,.65fr);gap:16px;margin-bottom:16px}.report-trend-panel{min-height:335px}.report-chart-legend{display:flex;justify-content:flex-end;gap:16px;padding:0 20px;color:#777e8d;font-size:9px}.report-chart-legend i{display:inline-block;width:8px;height:8px;border-radius:2px;margin-right:5px}.legend-created{background:#6558dc}.legend-won{background:#20a47d}.report-bars{height:235px;display:flex;align-items:flex-end;gap:6px;padding:20px 18px 14px;overflow-x:auto}.report-bar-day{height:100%;min-width:34px;flex:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.report-bar-values{height:170px;width:100%;display:flex;align-items:flex-end;justify-content:center;gap:3px;border-bottom:1px solid #e7e9ef}.report-bar-values i{display:block;width:8px;min-height:0;border-radius:3px 3px 0 0}.bar-created{background:#6558dc}.bar-won{background:#20a47d}.report-bar-day strong{font-size:9px;margin-top:4px}.report-bar-day span{font-size:8px;color:#9298a6;margin-top:2px}.report-empty{height:235px;display:grid;place-items:center;color:#969ca8;font-size:11px}
.report-donut{width:132px;height:132px;border-radius:50%;margin:5px auto 16px;display:grid;place-items:center}.report-donut>div{width:82px;height:82px;border-radius:50%;background:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column;box-shadow:0 0 0 1px rgba(0,0,0,.025)}.report-donut strong{font-size:21px}.report-donut span{font-size:9px;color:#8c92a0}.report-source-legend{padding:0 18px 16px}.report-source-legend>div{display:flex;align-items:center;justify-content:space-between;padding:5px 0;font-size:9px}.report-source-legend span{display:flex;align-items:center;color:#626979}.report-source-legend span i{width:7px;height:7px;border-radius:2px;margin-right:6px}.report-source-legend strong{font-size:10px}.report-source-legend small{color:#969ca8;font-size:8px;margin-left:3px}.report-source-legend .report-source-empty{display:block;text-align:center;color:#969ca8;padding:18px 0}
.report-health-list{padding:3px 20px 14px}.report-health-list>div{display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #eff1f4;padding:12px 2px}.report-health-list span{font-size:11px;color:#646c7b}.report-health-list strong{font-size:16px}.health-success,.report-success-cell{color:#128562}.health-danger,.report-danger-cell{color:#d33f47}.health-warning{color:#c58108}.report-meeting-note{display:flex;gap:10px;margin:3px 18px 18px;padding:11px;background:#fff7e5;border-radius:9px;color:#8a6010}.report-meeting-note>i{margin-top:2px}.report-meeting-note strong,.report-meeting-note span{display:block}.report-meeting-note strong{font-size:10px}.report-meeting-note span{font-size:9px;margin-top:3px;line-height:1.45}
.report-team-panel{overflow:hidden}.sales-report-table{width:100%;border-collapse:collapse;min-width:720px}.sales-report-table th{background:#f8f9fb;border-top:1px solid #eceef2;border-bottom:1px solid #e5e7ec;color:#838998;text-transform:uppercase;letter-spacing:.065em;font-size:9px;padding:10px 16px;text-align:right}.sales-report-table th:first-child{text-align:left}.sales-report-table td{padding:12px 16px;border-bottom:1px solid #eff0f3;font-size:11px;text-align:right}.sales-report-table td:first-child{text-align:left}.sales-report-table tbody tr:hover{background:#fbfbfe}

@media (max-width: 1200px) {
  .sales-report-kpis{grid-template-columns:repeat(3,1fr)}
}

@media (max-width: 768px) {
  .sales-report-kpis{grid-template-columns:repeat(2,1fr)}
  .sales-report-grid{grid-template-columns:1fr}
  .sales-report-heading{align-items:flex-start;gap:12px;flex-direction:column}
  .sales-period-shortcuts{width:100%;margin-left:0}
  .sales-period-shortcuts button{flex:1}
}

@media (max-width: 575.98px) {
  .sales-modal .modal-content {
    max-height: calc(100vh - 1rem);
  }
}
@media(max-width:1200px){.sales-kpi-grid{grid-template-columns:repeat(3,1fr)}.sales-insight-grid{grid-template-columns:1fr}.sales-list-head{align-items:flex-start;flex-direction:column}.sales-list-tools{width:100%}.sales-search{flex:1}}
@media(max-width:768px){.sales-hero{padding:22px 16px;align-items:flex-start;gap:18px;flex-direction:column}.sales-hero h1{font-size:25px}.sales-content{padding:14px}.sales-hero-actions{width:100%}.sales-hero-actions .btn{flex:1}.sales-filter-bar{align-items:stretch;flex-wrap:wrap}.sales-filter-title{width:100%;border:0}.sales-filter-bar label{flex:1;min-width:130px}.sales-filter-bar .sales-owner-filter{min-width:100%}.sales-kpi-grid{grid-template-columns:repeat(2,1fr)}.sales-kpi-card{padding:12px;min-height:91px}.sales-kpi-card strong{font-size:21px}.sales-insight-grid{display:block}.sales-insight-grid .sales-panel{margin-bottom:14px}.sales-list-tools{flex-wrap:wrap}.sales-search{width:100%;flex-basis:100%}.sales-list-tools .form-control{flex:1}.sales-form-grid{grid-template-columns:1fr}.sales-form-grid .field-wide,.sales-form-grid .field-full{grid-column:1}.lead-detail-summary{grid-template-columns:repeat(2,1fr);gap:12px}.lead-detail-summary div{border:0;padding:0}.focus-time{display:none}}
@media(max-width:440px){.sales-kpi-grid{grid-template-columns:1fr 1fr}.sales-kpi-icon{display:none}.sales-panel-header,.sales-source-list,.sales-list-head{padding-left:14px;padding-right:14px}.source-rate{display:none}}

/* Sales workspace 2.0 — task-first */
.sales-workspace-page{background:#f5f6f8;min-height:100%;color:#202430}
.sales-workspace-header{min-height:78px;padding:16px 28px;background:#fff;border-bottom:1px solid #e4e6eb;display:flex;align-items:center;justify-content:space-between;gap:24px}
.sales-workspace-header h1{margin:0;font-size:23px;font-weight:800;letter-spacing:-.02em;color:#202430}
.sales-workspace-header p{margin:3px 0 0;font-size:12px;color:#777e8d}
.sales-workspace-actions{display:flex;align-items:center;gap:10px}
.sales-global-search{position:relative;width:310px;height:38px}
.sales-global-search i{position:absolute;left:12px;top:12px;color:#9aa0ac;font-size:12px}
.sales-global-search input{width:100%;height:100%;padding:0 12px 0 34px;border:1px solid #dfe2e8;border-radius:8px;background:#fafbfc;font-size:12px;outline:none}
.sales-global-search input:focus{background:#fff;border-color:#776be1;box-shadow:0 0 0 3px rgba(101,88,220,.09)}
.sales-workspace-content{padding:0 28px 34px}
.sales-workspace-tabs{margin:0 0 16px;height:49px;align-items:flex-end}
.sales-workspace-tabs button{height:49px;padding:0 15px;font-size:12px}
.sales-queue-bar{display:flex;gap:8px;overflow-x:auto;padding:0 0 14px}
.sales-queue-bar button{flex:0 0 auto;display:flex;align-items:center;gap:9px;border:1px solid #dfe2e8;border-radius:8px;background:#fff;padding:8px 11px;color:#5e6573;font-size:11px;font-weight:700;cursor:pointer}
.sales-queue-bar button strong{display:grid;place-items:center;min-width:21px;height:20px;padding:0 5px;background:#eef0f4;color:#4e5563;border-radius:10px;font-size:10px}
.sales-queue-bar button:hover{border-color:#b8b3e9;color:#5145c7}
.sales-queue-bar button.active{border-color:#6558dc;background:#f1efff;color:#5145c7;box-shadow:0 0 0 2px rgba(101,88,220,.07)}
.sales-queue-bar button.active strong{background:#6558dc;color:#fff}
.sales-queue-bar button.is-danger:not(.active){border-color:#efc7ca;color:#bd343c;background:#fffafa}
.sales-toolbar{min-height:46px;background:#fff;border:1px solid #e2e5ea;border-bottom:0;border-radius:10px 10px 0 0;padding:6px 12px;display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:nowrap;overflow-x:auto}
.sales-toolbar-main{display:flex;align-items:center;gap:6px;min-width:0;flex-wrap:nowrap;flex:1}
.sales-toolbar .form-control{height:30px;border-color:#e0e3e8;border-radius:6px;font-size:11px;padding:3px 18px 3px 6px;background-position:right 5px center}
.sales-sel-owner{width:115px;min-width:105px;max-width:130px;flex-shrink:0}
.sales-sel-source{width:88px;min-width:78px;max-width:98px;flex-shrink:0}
.sales-sel-status{width:102px;min-width:92px;max-width:112px;flex-shrink:0}
.sales-sel-priority{width:86px;min-width:76px;max-width:92px;flex-shrink:0}
.sales-sel-saved{width:105px;min-width:95px;max-width:115px;flex-shrink:0}
.sales-filter-reset{border:0;background:transparent;color:#6558dc;font-size:10.5px;font-weight:700;padding:4px 6px;cursor:pointer;white-space:nowrap;display:inline-flex;align-items:center;gap:4px;flex-shrink:0;border-radius:5px}
.sales-filter-reset:hover{background:#f1efff;color:#5145c7}
.sales-save-btn{color:#5b4ee8;font-weight:700}
.sales-clear-btn{color:#dc2626}
.sales-clear-btn:hover{background:#fef2f2;color:#b91c1c}
.sales-date-filter-box{display:inline-flex;align-items:center;gap:4px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px;padding:2px 5px;height:30px;flex-shrink:0}
.sales-date-types{display:inline-flex;align-items:center;gap:4px;border-right:1px solid #e2e8f0;padding-right:4px}
.sales-date-option{display:inline-flex;align-items:center;gap:2px;font-size:10px;font-weight:600;color:#64748b;margin:0;cursor:pointer;padding:1px 2px;border-radius:3px;white-space:nowrap;user-select:none}
.sales-date-option input{margin:0;accent-color:#6558dc;cursor:pointer}
.sales-date-option.is-active{color:#4338ca;font-weight:700}
.sales-date-range{display:inline-flex;align-items:center;gap:3px}
.sales-date-field{height:24px!important;padding:1px 3px!important;font-size:10px!important;border:1px solid #cbd5e1!important;border-radius:4px!important;width:105px!important;min-width:95px!important;max-width:110px!important;background:#fff!important}
.sales-date-sep{font-size:10px;color:#94a3b8;font-weight:700}
.sales-date-clear{border:0;background:transparent;color:#94a3b8;font-size:9.5px;padding:1px 3px;cursor:pointer}
.sales-date-clear:hover{color:#dc2626}
.sales-list-summary{font-size:11px;color:#858c99;white-space:nowrap}.sales-list-summary strong{color:#333947}
.sales-bulk-bar{min-height:48px;display:flex;align-items:center;gap:8px;padding:7px 12px;background:#eeecff;border:1px solid #cbc6f5;border-bottom:0;color:#5145c7;font-size:11px}.sales-bulk-bar>strong{margin-right:5px;white-space:nowrap}.sales-bulk-bar .form-control{height:32px;max-width:210px;border-color:#c9c4ef;font-size:11px}.sales-bulk-bar .btn{height:32px;padding:5px 11px;font-size:10px}
.sales-work-table-card{background:#fff;border:1px solid #e2e5ea;border-radius:0 0 10px 10px;overflow:hidden}
.sales-work-table{width:100%;border-collapse:collapse;table-layout:fixed}
.sales-work-table th{background:#fafbfc;color:#7e8592;text-transform:uppercase;letter-spacing:.055em;font-size:9px;font-weight:800;padding:10px 12px;text-align:left;border-bottom:1px solid #e7e9ed}
.sales-work-table td{padding:11px 12px;border-bottom:1px solid #eceef1;font-size:11px;vertical-align:middle;color:#414754}
.sales-sortable-th{cursor:pointer;user-select:none;transition:background .15s,color .15s}
.sales-sortable-th:hover{background:#f1f3f7!important;color:#242936!important}
.sales-sortable-th:hover .sales-th-flex i{color:#6558dc;opacity:1}
.sales-th-flex{display:flex;align-items:center;justify-content:space-between;gap:6px}
.sales-th-flex span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sales-th-flex i{font-size:10px;color:#b0b5c1;opacity:.6;transition:all .15s;flex-shrink:0}
.sales-th-flex i.is-active{color:#6558dc!important;opacity:1!important;font-size:11px}
.sales-work-table th:nth-child(1){width:3%}.sales-work-table th:nth-child(2){width:15%}.sales-work-table th:nth-child(3){width:13%}.sales-work-table th:nth-child(4){width:12%}.sales-work-table th:nth-child(5){width:10%}.sales-work-table th:nth-child(6){width:9%}.sales-work-table th:nth-child(7){width:18%}.sales-work-table th:nth-child(8){width:11%}.sales-work-table th:nth-child(9){width:6%}.sales-work-table th:nth-child(10){width:3%}
.sales-col-filter-row th{background:#fdfdfd!important;padding:4px 5px!important;border-bottom:1px solid #e2e5ea!important;font-weight:400!important}
.sales-col-input{height:25px!important;font-size:10.5px!important;padding:2px 5px!important;border:1px solid #dfe2e8!important;border-radius:5px!important;background:#fff!important;color:#334155!important;width:100%!important;box-shadow:none!important;font-weight:500!important}
.sales-col-input:focus{border-color:#958bef!important;box-shadow:0 0 0 2px rgba(101,88,220,.12)!important;background:#fff!important}
.sales-col-clear-btn{font-size:10px!important;padding:3px 5px!important;line-height:1!important;border-radius:5px!important;white-space:nowrap!important;border-color:#cbd5e1!important;color:#64748b!important;background:#fff!important;transition:all .15s!important}
.sales-col-clear-btn:hover{background:#f1f5f9!important;border-color:#94a3b8!important;color:#334155!important}
.sales-revenue-cell{font-weight:750;color:#0f766e;font-size:11.5px;font-variant-numeric:tabular-nums;white-space:nowrap}
.sales-revenue-empty{color:#94a3b8;font-weight:600}
.sales-date-cell{white-space:nowrap;line-height:1.35}
.sales-date-cell span{display:block;font-size:11px;color:#334155;font-weight:600}
.sales-date-cell small{display:block;font-size:9.5px;color:#64748b}
.sales-update-cell{min-width:0}
.sales-check-cell{text-align:center!important;padding-left:8px!important;padding-right:4px!important}.sales-check-cell input{accent-color:#6558dc;cursor:pointer}
.sales-work-table tbody tr{cursor:pointer;transition:background .12s,box-shadow .12s}
.sales-work-table tbody tr:hover,.sales-work-table tbody tr.is-selected{background:#f8f7ff}
.sales-work-table tbody tr.is-overdue{box-shadow:inset 3px 0 #dc424a}
.sales-customer-cell strong,.sales-customer-cell span{display:block}.sales-customer-cell strong{font-size:12px;color:#242936}.sales-customer-cell span{font-size:10px;color:#777e8c;margin-top:3px}.sales-customer-cell em{font-style:normal}
.sales-clamp{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;line-height:1.38;color:#343a47}
.sales-work-table td small{display:block;margin-top:3px;color:#9197a3;font-size:9px}.sales-work-table td .sales-update-time{color:#555d6c;font-weight:800}
.sales-deadline{display:inline-flex;border-radius:6px;padding:5px 7px;background:#f1f2f5;color:#626976;font-size:10px;font-weight:700;white-space:nowrap}
.sales-deadline.is-overdue{background:#ffebed;color:#c9343c}.sales-deadline.is-today{background:#fff3d8;color:#a96900}.sales-deadline.is-no_schedule{background:#fff7e6;color:#9b6916}.sales-deadline.is-upcoming{background:#eaf6f1;color:#167b5f}
.sales-unassigned{display:inline-flex;background:#fff3d8;color:#a76b00;border-radius:6px;padding:5px 7px;font-size:10px;font-weight:700}
.sales-row-action{text-align:right}.sales-row-action button{width:28px;height:28px;border:0;border-radius:7px;background:transparent;color:#999faa}.sales-row-action button:hover{background:#eceaff;color:#6558dc}
.sales-pagination{min-height:48px}.sales-pagination label{display:flex;align-items:center;gap:6px;margin:0;font-weight:500}.sales-pagination select{height:28px;border:1px solid #dfe2e8;border-radius:6px;background:#fff}

/* Manager Sales Leads dashboard */
.sales-report-dashboard{--report-purple:#6558dc;--report-blue:#2780d9;--report-green:#13966f;--report-amber:#d18a0b;--report-red:#dc424a}
.sales-report-dashboard .sales-report-heading{align-items:center;margin-bottom:20px}.sales-report-dashboard .sales-report-heading h2{margin-bottom:2px}.sales-report-dashboard .sales-report-actions .btn{height:35px;white-space:nowrap;padding:7px 11px;font-size:11px}
.report-section-title{display:flex;align-items:flex-end;justify-content:space-between;margin:12px 1px 9px}.report-section-title>div strong,.report-section-title>div span{display:block}.report-section-title>div strong{font-size:12px;color:#333947}.report-section-title>div span{font-size:9px;color:#949aa7;margin-top:2px}.report-section-title>em{font-style:normal;color:#999fab;font-size:9px}
.sales-report-dashboard .sales-report-kpis{gap:9px;margin-bottom:17px}.sales-report-dashboard .sales-report-kpis article{min-height:90px;padding:12px 13px;border-top-width:2px;box-shadow:0 2px 8px rgba(20,28,50,.02)}.sales-report-dashboard .sales-report-kpis strong{font-size:24px;line-height:1.05}.sales-report-dashboard .sales-report-kpis small{line-height:1.35}.sales-report-dashboard .sales-report-kpis .report-kpi-neutral{border-top-color:#788190}.sales-report-dashboard .sales-report-kpis small.is-positive{color:#128562}.sales-report-dashboard .sales-report-kpis small.is-negative{color:#d33f47}.sales-report-dashboard .sales-report-kpis small.is-neutral{color:#9298a5}
.sales-report-dashboard .sales-panel{margin-bottom:16px}.report-manager-grid{grid-template-columns:minmax(310px,.72fr) minmax(520px,1.28fr)}.report-insight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-report-dashboard .sales-panel-header{padding:16px 18px 10px}.sales-report-dashboard .sales-panel h2{font-size:15px}
.report-attention-list{padding:0 12px 12px}.report-attention-list button{display:grid;grid-template-columns:32px minmax(0,1fr) auto 10px;align-items:center;gap:9px;width:100%;padding:9px 7px;border:0;border-top:1px solid #eff1f4;background:#fff;text-align:left;color:#333947}.report-attention-list button:hover{background:#fafaff}.report-attention-list button>span:nth-child(2){min-width:0}.report-attention-list strong,.report-attention-list small{display:block}.report-attention-list strong{font-size:10px}.report-attention-list small{font-size:8.5px;color:#9298a4;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.report-attention-list em{font-style:normal;font-size:18px;font-weight:800}.report-attention-list button>.fa-chevron-right{font-size:8px;color:#b0b5bf}.report-attention-icon{width:28px;height:28px;border-radius:8px;background:#f0f1f5;color:#697180;display:grid;place-items:center;font-size:10px}.report-attention-list .is-danger .report-attention-icon{background:#ffebed;color:var(--report-red)}.report-attention-list .is-danger em{color:var(--report-red)}.report-attention-list .is-warning .report-attention-icon{background:#fff4db;color:var(--report-amber)}.report-attention-list .is-warning em{color:#b87300}
.sales-report-dashboard .report-trend-panel{min-height:300px}.sales-report-dashboard .report-chart-legend{padding:0 18px;gap:12px}.legend-contacted{background:var(--report-blue)}.bar-contacted{background:var(--report-blue)}.sales-report-dashboard .report-bars{height:220px;padding-top:10px}.sales-report-dashboard .report-bar-values{height:156px}.sales-report-dashboard .report-bar-values i{width:6px}.sales-report-dashboard .report-bar-day{min-width:31px}.sales-report-dashboard .report-bar-day strong{display:flex;gap:2px;align-items:center}.sales-report-dashboard .report-bar-day strong small{font-size:7px;color:#9aa0ac;font-weight:500}
.report-funnel{padding:4px 18px 17px}.report-funnel-row{display:grid;grid-template-columns:105px minmax(120px,1fr) 35px 42px;gap:9px;align-items:center;padding:7px 0}.report-funnel-row>span{font-size:10px;color:#596171}.report-funnel-row>div{height:10px;background:#eff0f5;border-radius:7px;overflow:hidden}.report-funnel-row>div i{display:block;height:100%;min-width:0;border-radius:7px;background:linear-gradient(90deg,#776be5,#5548ce)}.report-funnel-row strong{font-size:11px;text-align:right}.report-funnel-row em{font-size:9px;color:#8e95a3;font-style:normal;text-align:right}.report-funnel-row:last-child>div i{background:linear-gradient(90deg,#36b78d,#13966f)}
.report-aging-chart{padding:7px 18px 10px}.report-aging-chart>div{display:grid;grid-template-columns:75px minmax(120px,1fr) 32px;gap:10px;align-items:center;padding:8px 0}.report-aging-chart span{font-size:10px;color:#596171}.report-aging-chart>div>div{height:12px;border-radius:7px;background:#eff1f4;overflow:hidden}.report-aging-chart i{display:block;height:100%;border-radius:7px;background:linear-gradient(90deg,#67a8e9,#347fc9)}.report-aging-chart .is-risk i{background:linear-gradient(90deg,#f0b341,#dc6b32)}.report-aging-chart strong{text-align:right;font-size:11px}.report-chart-help{margin:2px 18px 15px;padding:8px 9px;border-radius:7px;background:#fff7e7;color:#8f6516;font-size:9px}
.report-source-quality-panel,.report-team-panel{overflow:hidden}.report-source-quality-panel{margin-top:0}.report-source-table{min-width:850px}.report-team-table{min-width:1180px}.report-warning-cell{color:#b36f00}.report-row-note{display:block;color:#9aa0ac;font-size:8px;margin-top:2px}.report-source-name{display:flex;align-items:center;gap:7px}.report-source-name i{width:8px;height:8px;border-radius:3px}.report-quality{display:inline-block;border-radius:10px;padding:4px 7px;background:#f0f1f4;color:#687080;font-size:8px;font-weight:750}.report-quality.is-good{background:#e6f7f0;color:#128562}.report-quality.is-risk{background:#ffedef;color:#c93841}.report-quality.is-neutral{background:#fff5dd;color:#a76b00}.report-empty-small{height:180px}

/* Dedicated A4 landscape PDF layout. */
.sales-report-pdf{display:none}.sales-report-pdf.is-exporting{display:block;position:fixed;left:-12000px;top:0;width:1080px;z-index:-1;background:#fff;color:#202635;padding:28px 30px;font-family:Arial,"Segoe UI",sans-serif;font-size:11px}.report-pdf-header{display:flex;align-items:flex-start;justify-content:space-between;padding-bottom:15px;border-bottom:3px solid #6558dc}.report-pdf-header>div:first-child{display:grid;grid-template-columns:88px 1fr;column-gap:16px;align-items:center}.report-pdf-header img{width:76px;max-height:42px;object-fit:contain;grid-row:1/3}.report-pdf-header h1{font-size:22px;margin:0;color:#282454}.report-pdf-header p{margin:4px 0 0;color:#747b88}.report-pdf-header>div:last-child{text-align:right}.report-pdf-header>div:last-child strong,.report-pdf-header>div:last-child span{display:block}.report-pdf-header>div:last-child strong{font-size:14px;color:#6558dc}.report-pdf-header>div:last-child span{font-size:9px;color:#8e95a2;margin-top:4px}.report-pdf-title{margin:16px 0 9px;font-size:10px;font-weight:800;letter-spacing:.12em;color:#6558dc}.report-pdf-kpis{display:grid;grid-template-columns:repeat(5,1fr);gap:7px;margin-bottom:16px}.report-pdf-kpis>div{border:1px solid #e1e4ea;border-top:3px solid #6558dc;border-radius:7px;padding:9px}.report-pdf-kpis span,.report-pdf-kpis strong{display:block}.report-pdf-kpis span{font-size:8px;color:#777e8c;text-transform:uppercase}.report-pdf-kpis strong{font-size:19px;margin-top:4px}.report-pdf-kpis .is-danger{border-top-color:#dc424a}.report-pdf-kpis .is-danger strong{color:#c9363e}.report-pdf-kpis .is-warning{border-top-color:#d18a0b}.report-pdf-kpis .is-success{border-top-color:#13966f}.report-pdf-kpis .is-success strong{color:#128562}.report-pdf-columns{display:grid;grid-template-columns:1fr 1fr;gap:20px}.sales-report-pdf h3{font-size:12px;margin:8px 0;color:#303746}.report-pdf-attention{display:grid;grid-template-columns:1fr 35px;gap:2px 8px;padding:7px 8px;border-bottom:1px solid #e8eaf0}.report-pdf-attention>span{font-weight:700}.report-pdf-attention>strong{text-align:right;font-size:14px;color:#dc424a}.report-pdf-attention>small{grid-column:1/-1;color:#858c99}.report-pdf-funnel{display:grid;grid-template-columns:100px 1fr 70px;gap:8px;align-items:center;padding:6px 0}.report-pdf-funnel>span{font-size:9px}.report-pdf-funnel>i{display:block;height:9px;background:#edeff3;border-radius:5px;overflow:hidden}.report-pdf-funnel b{display:block;height:100%;background:#6558dc;border-radius:5px}.report-pdf-funnel>strong{text-align:right;font-size:9px}.sales-report-pdf table{width:100%;border-collapse:collapse;font-size:9px}.sales-report-pdf th{padding:7px 6px;background:#f2f3f6;color:#606877;text-align:right;border:1px solid #e2e4e9}.sales-report-pdf td{padding:7px 6px;text-align:right;border:1px solid #e5e7eb}.sales-report-pdf th:first-child,.sales-report-pdf td:first-child{text-align:left}.report-pdf-team{margin-bottom:12px}.report-pdf-note{padding:9px 11px;background:#f5f4ff;border-left:3px solid #6558dc;color:#626978;font-size:8px;line-height:1.45}.report-pdf-page-break{break-before:page;page-break-before:always;height:1px}

@media(max-width:1200px){.report-manager-grid{grid-template-columns:minmax(280px,.85fr) minmax(450px,1.15fr)}.report-insight-grid{grid-template-columns:1fr 1fr}}
@media(max-width:900px){.report-manager-grid,.report-insight-grid{grid-template-columns:1fr}.sales-report-dashboard .sales-report-actions{width:100%}.sales-report-dashboard .sales-report-actions select{flex:1}.report-attention-list small{white-space:normal}}
@media(max-width:600px){.sales-report-dashboard .sales-report-heading{margin-bottom:14px}.sales-report-dashboard .sales-report-actions{display:grid;grid-template-columns:1fr 1fr}.sales-report-dashboard .sales-report-actions .form-control,.sales-report-dashboard .sales-report-actions .btn{width:100%;max-width:none}.sales-report-dashboard .sales-report-actions select{grid-column:1/-1}.report-section-title{align-items:flex-start}.report-section-title>div span{max-width:240px}.sales-report-dashboard .sales-report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-report-dashboard .sales-report-kpis article{min-height:86px}.sales-report-dashboard .sales-report-kpis article:last-child{grid-column:1/-1}.report-manager-grid,.report-insight-grid{display:block}.report-attention-list button{grid-template-columns:30px minmax(0,1fr) auto 8px}.sales-report-dashboard .report-bars{padding-left:10px;padding-right:10px}.report-funnel-row{grid-template-columns:88px minmax(90px,1fr) 28px 35px}.sales-report-dashboard .sales-panel-header{align-items:flex-start;gap:8px}.report-chart-legend{justify-content:flex-start!important;flex-wrap:wrap}.report-aging-chart>div{grid-template-columns:68px minmax(90px,1fr) 28px}}
.sales-section-heading{display:flex;align-items:center;justify-content:space-between;margin:3px 0 15px}.sales-section-heading h2{font-size:20px;margin:0;color:#242936}.sales-section-heading p{margin:4px 0 0;color:#838a97;font-size:11px}
.sales-pipeline-board{display:grid;grid-template-columns:repeat(5,minmax(210px,1fr));gap:10px;overflow-x:auto;padding-bottom:12px}
.sales-pipeline-column{background:#eceef2;border-radius:9px;min-height:520px;overflow:hidden}
.sales-pipeline-column>header{height:46px;padding:0 12px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #dfe2e7;color:#444b59;font-size:11px;font-weight:800}
.sales-pipeline-column>header strong{display:grid;place-items:center;background:#fff;border-radius:10px;min-width:21px;height:20px;font-size:10px}
.sales-pipeline-list{padding:8px}.sales-pipeline-card{display:block;width:100%;border:1px solid #e0e2e7;background:#fff;border-radius:8px;padding:11px;margin-bottom:8px;text-align:left;box-shadow:0 1px 2px rgba(20,28,40,.035);cursor:pointer}
.sales-pipeline-card:hover{border-color:#aaa3ea;box-shadow:0 4px 12px rgba(30,35,55,.07)}
.sales-pipeline-card strong,.sales-pipeline-card span,.sales-pipeline-card small,.sales-pipeline-card em{display:block}.sales-pipeline-card strong{font-size:11px;color:#272c38}.sales-pipeline-card span{font-size:10px;color:#626976;margin:5px 0;line-height:1.4}.sales-pipeline-card small{font-size:9px;color:#8b919c}.sales-pipeline-card em{font-style:normal;font-size:9px;color:#b06d00;background:#fff5db;border-radius:5px;padding:4px 6px;margin-top:7px}
.sales-pipeline-card select{width:100%;height:28px;border:1px solid #e0e3e8;border-radius:6px;background:#fafbfc;color:#555c69;font-size:9px;margin-top:9px;padding:3px 6px;cursor:pointer}
.sales-pipeline-empty{text-align:center;color:#989eaa;font-size:10px;padding:28px 8px}

/* Final report grid overrides are kept last because this stylesheet contains legacy duplicates. */
.sales-report-dashboard .report-manager-grid{grid-template-columns:minmax(310px,.72fr) minmax(520px,1.28fr)}
.sales-report-dashboard .report-insight-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:900px){.sales-report-dashboard .report-manager-grid,.sales-report-dashboard .report-insight-grid{grid-template-columns:1fr}}
@media(max-width:600px){.sales-report-dashboard .report-manager-grid,.sales-report-dashboard .report-insight-grid{display:block}}
.sales-report-actions{display:flex;align-items:center;gap:7px}.sales-report-actions .form-control{height:35px;width:auto;max-width:210px;font-size:11px}.sales-report-grid{grid-template-columns:minmax(0,1.5fr) minmax(260px,.6fr)}
.sales-report-kpis article[role=button]{cursor:pointer;transition:transform .15s,box-shadow .15s}.sales-report-kpis article[role=button]:hover{transform:translateY(-2px);box-shadow:0 7px 18px rgba(25,30,45,.07)}
.sales-drawer-backdrop{position:fixed;inset:0;background:rgba(20,23,32,.46);backdrop-filter:blur(2px);z-index:1050;opacity:0;visibility:hidden;transition:opacity .2s,visibility .2s}.sales-drawer-backdrop.is-open{opacity:1;visibility:visible}
.sales-lead-drawer{position:fixed;z-index:1051;left:50%;top:50%;width:min(800px,calc(100vw - 32px));max-height:calc(100vh - 40px);background:#fff;border-radius:14px;box-shadow:0 22px 65px rgba(20,24,45,.3);opacity:0;visibility:hidden;transform:translate(-50%,-47%) scale(.97);transition:opacity .2s,visibility .2s,transform .2s ease;overflow-y:auto}.sales-lead-drawer.is-open{opacity:1;visibility:visible;transform:translate(-50%,-50%) scale(1)}
.sales-drawer-inner{min-height:100%;display:flex;flex-direction:column;padding-bottom:20px}.sales-drawer-loading{min-height:420px;display:grid;place-items:center;color:#6558dc;font-size:25px}
.sales-drawer-header{padding:20px 24px 14px;border-bottom:1px solid #eceef1;display:flex;justify-content:space-between;gap:20px}.sales-drawer-header span{font-size:9px;color:#9298a4;font-weight:800;letter-spacing:.07em}.sales-drawer-header h2{font-size:21px;margin:4px 0 3px;color:#222733}.sales-drawer-header p{margin:0;font-size:11px;color:#747b88}.sales-drawer-header p em{font-style:normal}.sales-drawer-header>button{width:32px;height:32px;border:0;border-radius:8px;background:#f2f3f5;color:#757c88;cursor:pointer;transition:all .15s}.sales-drawer-header>button:hover{background:#e2e8f0;color:#1e293b}
.sales-drawer-actions{display:flex;gap:8px;padding:12px 24px}.sales-drawer-actions a,.sales-drawer-actions button{display:inline-flex;align-items:center;gap:6px;border:1px solid #dfe2e7;border-radius:7px;background:#fff;color:#4c5360;padding:7px 11px;font-size:10.5px;font-weight:700;text-decoration:none;cursor:pointer;transition:all .15s}.sales-drawer-actions a:hover,.sales-drawer-actions button:hover{background:#f8fafc;border-color:#cbd5e1}.sales-drawer-actions a:first-child{background:#e8f7f1;border-color:#cfebdf;color:#13775b}
.sales-drawer-summary{display:grid;grid-template-columns:repeat(auto-fit, minmax(130px, 1fr));gap:1px;background:#e8eaf0;border:1px solid #e8eaf0;margin:0 24px 16px;border-radius:8px;overflow:hidden}.sales-drawer-summary>div{background:#f8f9fb;padding:10px 11px}.sales-drawer-summary span,.sales-drawer-summary strong{display:block}.sales-drawer-summary span{text-transform:uppercase;font-size:8px;font-weight:800;color:#969ca7;letter-spacing:.05em}.sales-drawer-summary strong{font-size:10.5px;color:#3b414e;margin-top:4px;line-height:1.4}
.sales-drawer-followup{margin:0 24px 18px;background:#fbfbfe;border:1px solid #e4e6fb;border-radius:10px;padding:14px 16px;box-shadow:0 1px 4px rgba(101,88,220,.04)}
.sales-followup-box-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:10px}.sales-followup-box-header strong{font-size:11.5px;color:#4338ca;display:inline-flex;align-items:center;gap:6px}.sales-followup-box-header span{font-size:10px;color:#818cf8}
.sales-drawer-followup label{display:block;margin:0 0 11px}.sales-drawer-followup label>span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.05em;font-weight:800;color:#676e7b;margin-bottom:4px}.sales-drawer-followup label b{color:#dc424a}.sales-drawer-followup .form-control{border-color:#dfe2e7;border-radius:7px;font-size:11.5px;box-shadow:none}.sales-drawer-followup textarea{resize:vertical;min-height:68px}
.sales-drawer-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}.sales-drawer-followup footer{display:flex;align-items:center;justify-content:space-between;gap:12px;border-top:1px solid #edeef8;padding-top:12px;margin-top:4px}.sales-drawer-followup footer>span{font-size:9.5px;color:#94a3b8;display:inline-flex;align-items:center;gap:4px}
.sales-drawer-history-section{margin:0 24px;border-top:1px solid #edf0f5;padding-top:16px}
.sales-history-section-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.sales-history-section-header>div{display:inline-flex;align-items:center;gap:7px;font-size:12px;color:#1e293b;font-weight:750}.sales-history-section-header>div i{color:#6558dc;font-size:13px}
.sales-history-badge{font-size:9.5px;background:#f1efff;color:#5145c7;font-weight:750;padding:2px 8px;border-radius:10px}
.sales-drawer-history{position:relative;padding-left:14px}
.sales-drawer-history::before{content:"";position:absolute;left:27px;top:10px;bottom:10px;width:2px;background:#e9edf3;z-index:1}
.sales-drawer-history .timeline-item{display:flex;align-items:flex-start;gap:12px;position:relative;margin-bottom:12px;z-index:2}
.timeline-icon-wrap{width:28px;height:28px;border-radius:50%;display:grid;place-items:center;flex-shrink:0;font-size:11px;background:#fff;border:2px solid #e2e8f0;box-shadow:0 0 0 2px #fff}
.timeline-icon-wrap.is-followup{background:#eeecff;border-color:#6558dc;color:#6558dc}
.timeline-icon-wrap.is-created{background:#e6f7f0;border-color:#13966f;color:#13966f}
.timeline-icon-wrap.is-other{background:#fff8eb;border-color:#d18a0b;color:#d18a0b}
.timeline-card{flex:1;min-width:0;background:#f8fafc;border:1px solid #e8ecf2;border-radius:8px;padding:10px 12px;box-shadow:0 1px 2px rgba(20,28,45,.025)}
.timeline-card-header{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}
.timeline-status-badge{display:inline-block;background:#6558dc;color:#fff;font-size:9px;font-weight:800;padding:2px 6px;border-radius:4px;letter-spacing:.02em}
.timeline-action-title{font-size:11px;font-weight:750;color:#334155}
.timeline-time{font-size:9.5px;color:#94a3b8;white-space:nowrap;display:inline-flex;align-items:center;gap:3px}
.timeline-content{font-size:11px;color:#334155;line-height:1.45;white-space:pre-wrap;margin:0 0 6px}
.timeline-card-meta{display:flex;align-items:center;flex-wrap:wrap;gap:10px;font-size:9.5px;color:#64748b;border-top:1px solid #edf1f7;padding-top:5px;margin-top:3px}
.timeline-author{display:inline-flex;align-items:center;gap:4px}
.timeline-schedule{display:inline-flex;align-items:center;gap:4px;color:#b45309;background:#fef3c7;padding:1px 5px;border-radius:4px;font-weight:600}
.sales-history-empty{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:30px 15px;color:#94a3b8;font-size:11px;text-align:center}
.sales-history-empty i{font-size:24px;color:#cbd5e1}
.sales-tab-badge{display:inline-grid;place-items:center;min-width:18px;height:18px;padding:0 5px;margin-left:7px;background:#e5484d;color:#fff;border-radius:10px;font-size:10px;font-weight:800;vertical-align:2px}
.sales-drawer-actions button.active{border-color:#6558dc;background:#f1efff;color:#5145c7}
.sales-template-panel{margin:0 24px 14px;padding:12px;background:#f8f9fb;border:1px solid #e2e5ea;border-radius:9px}
.sales-template-panel .form-control{font-size:11px;border-color:#dfe2e7;border-radius:7px}
.sales-template-panel textarea{margin-top:9px;resize:vertical}
.sales-template-actions{display:flex;gap:8px;margin-top:9px}
.sales-template-actions button,.sales-template-actions a{display:inline-flex;align-items:center;gap:6px;border:1px solid #dfe2e7;border-radius:7px;background:#fff;color:#4c5360;padding:7px 10px;font-size:10px;font-weight:700;text-decoration:none;cursor:pointer}
.sales-template-actions a{background:#e8f7f1;border-color:#cfebdf;color:#13775b}

.sales-setup .sales-section-heading p{margin-top:4px}
.sales-setup .sales-section-heading code{background:#f1f2f5;border-radius:4px;padding:1px 5px;font-size:10px;color:#5145c7}
.sales-template-form-body{padding:0 20px 18px}
.sales-template-form-actions{margin:0;padding:0 20px 20px}
.sales-template-table th:nth-child(1){width:22%;text-align:left}.sales-template-table th:nth-child(2){text-align:left}.sales-template-table th:nth-child(3){width:80px}
.sales-template-table td:nth-child(1),.sales-template-table td:nth-child(2){text-align:left}
.sales-template-table .sales-row-action button{margin-left:4px}

@media(max-width:1200px){
  .sales-workspace-header,.sales-workspace-content{padding-left:18px;padding-right:18px}
  .sales-work-table th:nth-child(3),.sales-work-table td:nth-child(3){display:none}
  .sales-work-table th:nth-child(1){width:4%}.sales-work-table th:nth-child(2){width:19%}.sales-work-table th:nth-child(4){width:28%}.sales-work-table th:nth-child(5){width:17%}.sales-work-table th:nth-child(6){width:12%}.sales-work-table th:nth-child(7){width:16%}.sales-work-table th:nth-child(8){width:4%}
}
@media(max-width:900px){
  .sales-workspace-header{align-items:flex-start;flex-direction:column}.sales-workspace-actions{width:100%}.sales-global-search{flex:1;width:auto}
  .sales-toolbar{align-items:flex-start;flex-direction:column}.sales-toolbar-main{width:100%;flex-wrap:wrap}.sales-toolbar .form-control{flex:1}
  .sales-work-table{min-width:860px;table-layout:fixed}.sales-work-table th:nth-child(3),.sales-work-table td:nth-child(3){display:table-cell}
  .sales-report-heading,.sales-report-actions{align-items:flex-start;flex-wrap:wrap}.sales-report-grid{grid-template-columns:1fr}
}
@media(max-width:600px){
  .sales-workspace-header{padding:14px}.sales-workspace-content{padding:0 14px 24px}.sales-workspace-header p{display:none}.sales-workspace-actions{align-items:stretch;flex-direction:column}.sales-global-search{width:100%;flex:auto}
  .sales-workspace-tabs{overflow-x:auto}.sales-workspace-tabs button{white-space:nowrap}
  .sales-toolbar .form-control{min-width:calc(50% - 5px)}.sales-list-summary{display:none}
  .sales-bulk-bar{align-items:stretch;flex-wrap:wrap}.sales-bulk-bar .form-control{max-width:none;flex:1;min-width:45%}
  .sales-lead-drawer{width:calc(100vw - 20px);max-height:calc(100vh - 20px);border-radius:11px}.sales-drawer-header,.sales-drawer-actions,.sales-drawer-followup,.sales-drawer-history{padding-left:16px;padding-right:16px}.sales-drawer-summary{margin-left:16px;margin-right:16px}.sales-drawer-mode{padding-left:16px;padding-right:16px}.sales-drawer-form-grid{grid-template-columns:1fr}.sales-drawer-followup footer{align-items:stretch;flex-direction:column}.sales-drawer-followup footer .btn{width:100%}
}

/* ===== UX pass: ưu tiên hành động, liên hệ nhanh, kỷ luật màu ===== */

/* Số liệu sống trên header thay cho câu slogan tĩnh */
.sales-header-live{margin:0;display:flex;align-items:center;flex-wrap:wrap;gap:6px;font-size:13px;color:var(--sales-muted)}
.sales-header-live>span{color:#c3c9d4}
.sales-header-live button{background:none;border:0;padding:2px 4px;border-radius:6px;color:var(--sales-muted);font-size:13px;line-height:1.3}
.sales-header-live button strong{font-weight:800;color:var(--sales-ink);margin-right:3px}
.sales-header-live button:hover{background:#eef0f6;color:var(--sales-ink)}
.sales-header-live button.is-danger strong{color:var(--sales-danger)}
.sales-header-live button.is-warning strong{color:#b45309}

/* Chip hàng đợi: cái nào bằng 0 thì mờ đi, đừng tranh chỗ với việc thật */
.sales-queue-bar button.is-empty{opacity:.45}
.sales-queue-bar button.is-empty.active{opacity:1}
.sales-queue-more{margin-left:4px;background:none;border:1px dashed var(--sales-line);color:var(--sales-muted);border-radius:9px;padding:7px 11px;font-size:12px;font-weight:600;display:inline-flex;align-items:center;gap:6px}
.sales-queue-more:hover{border-color:var(--sales-primary);color:var(--sales-primary)}

/* Tổng pipeline: con số quan trọng nhất của một màn hình sale */
.sales-list-summary{display:flex;flex-direction:column;align-items:flex-end;gap:3px;white-space:nowrap}
.sales-summary-pipeline{display:flex;align-items:center;gap:10px;font-size:12px}
.sales-summary-money{font-weight:800;color:var(--sales-success)}
.sales-summary-money i{margin-right:4px;opacity:.8}
.sales-summary-missing{color:#b45309;font-weight:600;cursor:help}
.sales-summary-missing i{margin-right:4px}

/* Thanh trạng thái sắp xếp + công tắc lọc theo cột */
.sales-sort-bar{display:flex;align-items:center;flex-wrap:wrap;gap:10px;padding:8px 4px 10px;font-size:12px;color:var(--sales-muted)}
.sales-sort-label i{margin-right:5px}
.sales-sort-bar strong{color:var(--sales-ink);font-weight:700}
.sales-sort-bar strong em{font-style:normal;font-weight:500;color:var(--sales-muted)}
.sales-sort-reset,.sales-colfilter-toggle{background:#fff;border:1px solid var(--sales-line);border-radius:8px;padding:4px 10px;font-size:12px;font-weight:600;color:#394056;display:inline-flex;align-items:center;gap:6px}
.sales-sort-reset:hover,.sales-colfilter-toggle:hover{border-color:var(--sales-primary);color:var(--sales-primary)}
.sales-colfilter-toggle{margin-left:auto}
.sales-colfilter-toggle.is-active{background:var(--sales-primary);border-color:var(--sales-primary);color:#fff}

/* Gọi / Zalo ngay trên dòng — thao tác có giá trị cao nhất của sale */
.sales-customer-cell .sales-contact-line{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.sales-quick-call{display:inline-flex;align-items:center;gap:5px;color:var(--sales-primary);font-weight:600;font-size:12.5px;text-decoration:none;padding:1px 6px 1px 4px;border-radius:6px;border:1px solid transparent}
.sales-quick-call:hover{background:#eeecfd;border-color:#d6d1fa;color:var(--sales-primary-dark);text-decoration:none}
.sales-quick-call i{font-size:10px;opacity:.75}
.sales-quick-zalo{width:22px;height:22px;border-radius:6px;border:1px solid #cfe6f6;background:#eaf5fd;color:#0284c7;font-size:11px;display:inline-flex;align-items:center;justify-content:center;padding:0}
.sales-quick-zalo:hover{background:#0284c7;border-color:#0284c7;color:#fff}

/* Badge SLA: quá X giờ mà chưa ai gọi lần nào */
.sales-sla-badge{display:inline-flex;align-items:center;gap:4px;margin-left:6px;padding:1px 6px;border-radius:20px;background:#fdecec;color:#b42318;border:1px solid #f7c9c9;font-size:10.5px;font-weight:700;letter-spacing:.01em;vertical-align:middle}
.sales-sla-badge i{font-size:9px}

/* Nguồn lead có mã màu để so sánh nhanh chất lượng đầu vào */
.sales-source-tag{font-weight:600;font-size:11px}
.sales-source-tag i{margin-right:4px;font-size:10px}

/* "Chưa có tương tác" là cảnh báo, không phải một dòng cập nhật bình thường */
.sales-no-activity{color:#b45309;font-weight:600;font-style:italic}
.sales-no-activity i{margin-right:5px;font-size:11px}

/* Lead đã đóng thì "chưa phân công" không còn là việc cần làm -> bỏ màu cảnh báo */
.sales-owner-muted{color:#aab0bd;font-style:italic}

/* Gợi ý bước tiếp theo khi bảng rỗng, thay vì để sale đứng hình */
.sales-empty-next{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-top:12px}
.sales-empty-next button{background:#fff;border:1px solid var(--sales-line);border-radius:8px;padding:6px 12px;font-size:12px;font-weight:600;color:var(--sales-primary)}
.sales-empty-next button:hover{border-color:var(--sales-primary);background:#f5f4fe}


@media (max-width:900px){
  .sales-sort-bar{gap:8px}
  .sales-colfilter-toggle{margin-left:0}
  .sales-list-summary{align-items:flex-start}
}

@media (max-width:600px){
  /* Header p bị ẩn trên mobile, nhưng dãy số việc cần làm thì phải luôn thấy */
  .sales-workspace-header p.sales-header-live{display:flex}
  .sales-header-live{font-size:12px;gap:4px}
  /* Giữ lại tổng pipeline trên mobile, chỉ đổi sang một hàng ngang gọn */
  .sales-list-summary{display:flex;flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:10px;padding-top:8px;border-top:1px solid var(--sales-line)}
}

/* ===== Drawer: gom thông tin theo tầng, nhập liệu ít thao tác ===== */
/* Rule cũ đặt summary là grid; giờ nó là hộp chứa 3 tầng nên trả về block */
.sales-drawer-summary{display:block;background:transparent;border:0;border-radius:0;overflow:visible}
.sales-drawer-summary>div{background:transparent;padding:0}
.sales-drawer-summary .sales-drawer-chips span{display:inline-flex}
.sales-drawer-summary .sales-drawer-strip span{display:inline-flex;align-items:center;text-transform:none;font-size:11px;font-weight:600;letter-spacing:0}
.sales-drawer-summary .sales-drawer-facts>div{background:#fff;padding:9px 12px}
.sales-drawer-summary .sales-drawer-facts span{text-transform:uppercase;font-size:9.5px;font-weight:800;color:#8b93a2;letter-spacing:.08em}
.sales-drawer-summary .sales-drawer-facts strong{font-size:12.5px;color:#242936;margin-top:3px}


.sales-drawer-phone{color:var(--sales-primary);font-weight:700;text-decoration:none}
.sales-drawer-phone:hover{text-decoration:underline;color:var(--sales-primary-dark)}
.sales-drawer-actions a.is-primary{background:var(--sales-primary);border-color:var(--sales-primary);color:#fff}
.sales-drawer-actions a.is-primary:hover{background:var(--sales-primary-dark);border-color:var(--sales-primary-dark);color:#fff}

/* Tầng 1: nhãn nhận diện nhanh */
.sales-drawer-chips{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-bottom:11px}
.sales-chip-plain{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;background:#fff;border:1px solid var(--sales-line)}
.sales-chip-plain i{font-size:10px}
.sales-chip-priority{color:#64748b}
.sales-chip-priority.is-high{color:#b42318;border-color:#f7c9c9;background:#fdecec}
.sales-chip-priority.is-medium{color:#b45309;border-color:#f3ddb8;background:#fdf6e9}
.sales-chip-alert{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:700;padding:3px 9px;border-radius:20px;background:#fdecec;color:#b42318;border:1px solid #f7c9c9}

/* Tầng 2: các thông tin phải đọc trước khi gọi */
.sales-drawer-facts{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px;background:var(--sales-line);border:1px solid var(--sales-line);border-radius:10px;overflow:hidden}
.sales-drawer-facts>div{background:#fff;padding:9px 12px;min-width:0}
.sales-drawer-facts .fact-wide{grid-column:1/-1}
.sales-drawer-facts span{display:block;font-size:9.5px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#8b93a2;margin-bottom:3px}
.sales-drawer-facts strong{display:block;font-size:12.5px;color:#242936;font-weight:700;word-break:break-word}
.sales-drawer-facts em{display:block;font-style:normal;font-size:10.5px;font-weight:600;color:#b45309;margin-top:3px}
.sales-drawer-facts em i{margin-right:4px}
.sales-drawer-facts>div.is-warning{background:#fffaf0}
.sales-drawer-facts>div.is-warning strong{color:#b45309}
.sales-drawer-facts>div.is-danger{background:#fff5f5}
.sales-drawer-facts>div.is-danger strong{color:#b42318}

/* Tầng 3: mốc thời gian, đọc lướt */
.sales-drawer-strip{display:flex;flex-wrap:wrap;gap:14px;margin-top:9px;font-size:11px;color:#79808f}
.sales-drawer-strip i{margin-right:5px;opacity:.8}
.sales-drawer-strip .is-warning{color:#b45309;font-weight:700}

/* Khối nhập chung */
.sales-field{display:block;margin-top:13px}
.sales-field-label{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#6b7280;margin-bottom:7px}
.sales-field-hint{display:block;font-style:normal;font-size:11px;color:#6b7280;margin-top:7px;line-height:1.45}
.sales-field-hint i{margin-right:5px;color:var(--sales-primary)}

/* Giai đoạn dạng chip thay cho dropdown 8 dòng: thấy được mình đang ở đâu trong pipeline */
.sales-stage-chips{display:flex;flex-wrap:wrap;gap:6px}
.sales-stage-chips button{border:1px solid var(--sales-line);background:#fff;color:#5c6474;border-radius:20px;padding:5px 12px;font-size:12px;font-weight:600;line-height:1.35}
.sales-stage-chips button:hover{border-color:var(--sales-primary);color:var(--sales-primary)}
.sales-stage-chips button.is-done{background:#f1f0fe;border-color:#ddd9fb;color:#6b62c9}
.sales-stage-chips button.is-current{background:var(--sales-primary);border-color:var(--sales-primary);color:#fff;box-shadow:0 2px 7px rgba(91,78,232,.28)}
.sales-close-chips{display:flex;flex-wrap:wrap;align-items:center;gap:7px;margin-top:9px;padding-top:9px;border-top:1px dashed var(--sales-line)}
.sales-close-chips>span{font-size:11px;color:#8b93a2;font-weight:600}
.sales-close-chips button{border:1px solid var(--sales-line);background:#fff;border-radius:20px;padding:5px 12px;font-size:12px;font-weight:700;display:inline-flex;align-items:center;gap:6px}
.sales-close-chips button i{font-size:10px}
.sales-close-chips .is-won{color:var(--sales-success)}
.sales-close-chips .is-won:hover,.sales-close-chips .is-won.is-active{background:var(--sales-success);border-color:var(--sales-success);color:#fff}
.sales-close-chips .is-lost{color:var(--sales-danger)}
.sales-close-chips .is-lost:hover,.sales-close-chips .is-lost.is-active{background:var(--sales-danger);border-color:var(--sales-danger);color:#fff}

/* Doanh số dự tính: gõ số dài rất dễ sai nên có nút cộng nhanh + soi lại số đã nhập */
.sales-revenue-field{display:block;margin-top:13px;padding:12px;border-radius:10px;border:1px solid var(--sales-line);background:#fbfbfd}
.sales-revenue-field.is-required{border-color:#f3ddb8;background:#fffaf0}
.sales-revenue-field>span{display:block;font-size:10px;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#6b7280;margin-bottom:7px}
.sales-revenue-field>span b{color:var(--sales-danger);margin-left:2px}
.sales-revenue-input-row{position:relative;display:flex;align-items:center}
.sales-revenue-input{font-weight:700;font-size:14px;padding-right:32px}
.sales-revenue-clear{position:absolute;right:7px;width:20px;height:20px;border:0;border-radius:5px;background:#eceef3;color:#6b7280;font-size:10px;display:inline-flex;align-items:center;justify-content:center;padding:0}
.sales-revenue-clear:hover{background:var(--sales-danger);color:#fff}
.sales-revenue-presets{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin-top:8px}
.sales-revenue-presets button{border:1px solid var(--sales-line);background:#fff;border-radius:7px;padding:3px 10px;font-size:11.5px;font-weight:700;color:#5c6474}
.sales-revenue-presets button:hover{border-color:var(--sales-primary);color:var(--sales-primary);background:#f5f4fe}
.sales-revenue-preview{margin-left:auto;font-size:12.5px;font-weight:800;color:var(--sales-success)}

/* Lịch tiếp theo: 90% trường hợp rơi vào vài mốc quen thuộc */
.sales-schedule-row{display:flex;flex-wrap:wrap;align-items:center;gap:6px}
.sales-schedule-row button{border:1px solid var(--sales-line);background:#fff;border-radius:7px;padding:5px 11px;font-size:12px;font-weight:600;color:#5c6474;white-space:nowrap}
.sales-schedule-row button:hover{border-color:var(--sales-primary);color:var(--sales-primary)}
.sales-schedule-row button.is-active{background:var(--sales-primary);border-color:var(--sales-primary);color:#fff}
.sales-schedule-row .form-control{flex:1;min-width:190px}

@media (max-width:600px){
  .sales-drawer-facts{grid-template-columns:repeat(2,minmax(0,1fr))}
  .sales-revenue-preview{margin-left:0;width:100%}
  .sales-schedule-row .form-control{min-width:100%}
}

/* Ô tiền: chừa chỗ bên phải cho ký hiệu ₫ và nút xóa, số to dễ soi */
.sales-revenue-input{padding-right:56px;letter-spacing:.02em}
.sales-revenue-unit{position:absolute;right:32px;font-size:13px;font-weight:700;color:#8b93a2;pointer-events:none}
.sales-revenue-presets{row-gap:7px}
.sales-revenue-presets button{min-width:56px}

/* Giai đoạn đã ngừng dùng: vẫn hiện cho lead cũ nhưng trông rõ là hàng tồn, không mời gọi chọn */
.sales-stage-chips button.is-legacy{border-style:dashed;color:#9aa1ae;background:#fafbfc}
.sales-stage-chips button.is-legacy em{font-style:normal;font-size:10px;opacity:.75}
.sales-stage-chips button.is-legacy.is-current{background:#8b93a2;border-color:#8b93a2;border-style:solid;color:#fff;box-shadow:none}
.sales-legacy-hint{color:#b45309}
.sales-legacy-hint i{color:#b45309}
.sales-pipeline-column.is-legacy{opacity:.72}
.sales-pipeline-column.is-legacy>header{border-bottom:1px dashed #c9cedb}
.sales-pipeline-column.is-legacy>header span:after{content:" (cũ)";font-size:10px;color:#8b93a2;font-weight:600}

/* ===== Báo cáo: đưa tiền lên hàng đầu, phần còn lại hạ trọng số để scan nhanh ===== */

/* Ô chốt được bao nhiêu là lớn nhất trang, bốn ô phụ nhỏ hơn hẳn */
.report-money-row{display:grid;grid-template-columns:1.55fr repeat(4,1fr);gap:12px;margin:4px 0 14px}
.report-money-hero,.report-money-card{background:#fff;border:1px solid var(--sales-line);border-radius:13px;padding:15px 17px;display:flex;flex-direction:column;gap:5px;text-align:left;position:relative;overflow:hidden;transition:border-color .15s,box-shadow .15s}
.report-money-hero:hover,.report-money-card:hover{border-color:var(--sales-primary);box-shadow:0 6px 18px rgba(20,28,50,.07)}
.report-money-hero span,.report-money-card span{font-size:10px;font-weight:800;letter-spacing:.09em;text-transform:uppercase;color:#8b93a2}
.report-money-hero span em,.report-money-card span em{font-style:normal;font-weight:600;letter-spacing:.02em;text-transform:none;opacity:.8}
.report-money-hero strong{font-size:31px;font-weight:800;line-height:1.05;letter-spacing:-.03em;color:var(--sales-success)}
.report-money-card strong{font-size:21px;font-weight:800;line-height:1.1;letter-spacing:-.025em;color:var(--sales-ink)}
.report-money-hero small,.report-money-card small{font-size:11px;color:#79808f;font-weight:600}
.report-money-hero{background:linear-gradient(135deg,#f4fbf8 0%,#fff 62%);border-color:#c9e8dc}
.report-money-hero:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--sales-success)}
.report-money-card.is-open strong{color:var(--sales-primary)}
.report-money-card.is-hot{background:#fffdf6;border-color:#f0e0bb}
.report-money-card.is-hot strong{color:#b45309}
.report-money-card.is-lost strong{color:var(--sales-danger)}

/* Dải độ phủ: nói thẳng số liệu tiền đang đáng tin tới đâu */
.report-coverage{display:flex;align-items:center;gap:12px;padding:11px 15px;border-radius:11px;margin-bottom:18px;border:1px solid;font-size:12.5px}
.report-coverage>i{font-size:15px;flex-shrink:0}
.report-coverage div{display:flex;flex-direction:column;gap:2px;min-width:0}
.report-coverage strong{font-weight:800}
.report-coverage span{color:#5c6474;line-height:1.45}
.report-coverage b{font-weight:800}
.report-coverage button{margin-left:auto;flex-shrink:0;background:#fff;border:1px solid var(--sales-line);border-radius:8px;padding:6px 12px;font-size:12px;font-weight:700;color:var(--sales-primary);white-space:nowrap}
.report-coverage button:hover{border-color:var(--sales-primary);background:#f5f4fe}
.report-coverage button i{margin-left:5px;font-size:9px}
.report-coverage.is-good{background:#f2fbf7;border-color:#c9e8dc}
.report-coverage.is-good>i,.report-coverage.is-good strong{color:var(--sales-success)}
.report-coverage.is-warning{background:#fffaf0;border-color:#f3ddb8}
.report-coverage.is-warning>i,.report-coverage.is-warning strong{color:#b45309}
.report-coverage.is-danger{background:#fdf2f2;border-color:#f7c9c9}
.report-coverage.is-danger>i,.report-coverage.is-danger strong{color:#b42318}

/* Công tắc funnel lead / tiền */
.report-funnel-toggle{display:inline-flex;background:#f1f2f6;border-radius:8px;padding:2px;gap:2px}
.report-funnel-toggle button{border:0;background:transparent;border-radius:6px;padding:4px 11px;font-size:11.5px;font-weight:700;color:#6b7280}
.report-funnel-toggle button.is-active{background:#fff;color:var(--sales-primary);box-shadow:0 1px 3px rgba(20,28,50,.09)}

/* Cột tiền trong bảng: canh phải, dùng chữ số đều nhau để so sánh theo cột */
.report-money-cell{text-align:right;font-variant-numeric:tabular-nums}
.report-money-cell strong{font-weight:800;color:var(--sales-ink)}
.report-money-cell .report-row-note{display:block;text-align:right}
.report-aging-value{display:block;font-style:normal;font-size:10.5px;font-weight:700;color:#79808f;margin-top:1px}

/* Bản PDF: hàng tiền in đậm hơn hàng đếm */
.report-pdf-money div strong{font-size:15px}

@media (max-width:1180px){
  .report-money-row{grid-template-columns:repeat(2,1fr)}
  .report-money-hero{grid-column:1/-1}
}
@media (max-width:600px){
  .report-money-row{grid-template-columns:1fr}
  .report-money-hero strong{font-size:27px}
  .report-coverage{flex-wrap:wrap}
  .report-coverage button{margin-left:0;width:100%;text-align:center}
}

/* ===== Báo cáo: nén mật độ, bỏ khoảng trống chết ===== */

/* Dải thay thế khi chưa có đồng doanh số nào */
.report-money-empty{display:flex;align-items:center;gap:13px;padding:13px 16px;margin:4px 0 16px;border-radius:12px;background:linear-gradient(135deg,#f7f6ff 0%,#fff 60%);border:1px dashed #d6d1fa}
.report-money-empty>i{font-size:19px;color:var(--sales-primary);flex-shrink:0}
.report-money-empty div{display:flex;flex-direction:column;gap:2px;min-width:0}
.report-money-empty strong{font-size:13px;font-weight:800;color:var(--sales-ink)}
.report-money-empty span{font-size:12px;color:#6b7280;line-height:1.45}
.report-money-empty button{margin-left:auto;flex-shrink:0;background:var(--sales-primary);border:1px solid var(--sales-primary);color:#fff;border-radius:8px;padding:7px 14px;font-size:12px;font-weight:700;white-space:nowrap}
.report-money-empty button:hover{background:var(--sales-primary-dark);border-color:var(--sales-primary-dark)}
.report-money-empty button i{margin-left:6px;font-size:9px}

/* Ô KPI: số nằm cạnh nhãn thay vì chồng lên nhau -> cao còn ~60%, quét ngang nhanh hơn */
.sales-report-kpis{gap:9px;margin-bottom:12px}
.sales-report-kpis article{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"num label" "num note";align-items:center;column-gap:11px;row-gap:1px;padding:11px 13px;border-top-width:2px;border-radius:10px}
.sales-report-kpis article strong{grid-area:num;font-size:23px;line-height:1;margin:0;letter-spacing:-.02em}
.sales-report-kpis article span{grid-area:label;font-size:9.5px;line-height:1.25}
.sales-report-kpis article small{grid-area:note;font-size:9px;line-height:1.3}

/* Tiêu đề nhóm gộp về một dòng */
.report-section-title{align-items:baseline;margin:14px 1px 8px;gap:10px}
.report-section-title>div{display:flex;align-items:baseline;gap:9px;flex-wrap:wrap;min-width:0}
.report-section-title>div strong,.report-section-title>div span{display:inline}
.report-section-title>div span{margin-top:0}

/* Biểu đồ nhịp độ: thấp lại, ngày rỗng không còn nhãn "0/0/0" */
.report-trend-panel{min-height:0}
.report-bars{height:170px;padding:8px 10px 10px}
.report-bar-day{min-width:22px}
.report-bar-day.is-empty .report-bar-values{opacity:.45}
.report-bar-day strong{min-height:11px}
.report-bar-day span{white-space:nowrap;font-size:8px}

/* Bảng: bớt padding và cho số tiền dùng chữ số đều bề ngang */
.sales-report-table th{padding:8px 12px}
.sales-report-table td{padding:8px 12px;font-variant-numeric:tabular-nums}
.sales-report-table td .report-row-note{font-size:9px;margin-top:1px}

/* Panel: bớt lề trong để nội dung chiếm chỗ thay vì khoảng trắng */
.sales-report-grid{gap:12px;margin-bottom:12px}
.report-funnel-row{padding-top:3px;padding-bottom:3px}
.report-chart-help{margin-top:8px;margin-bottom:0}

@media (max-width:1180px){
  .sales-report-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media (max-width:760px){
  .sales-report-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  .report-money-empty{flex-wrap:wrap}
  .report-money-empty button{margin-left:0;width:100%;text-align:center}
}

/* Các rule gốc dùng tiền tố .sales-report-dashboard nên phải khớp specificity mới đè được */
.sales-report-dashboard .sales-report-kpis{gap:9px;margin-bottom:12px}
.sales-report-dashboard .sales-report-kpis article{min-height:0;padding:10px 12px}
.sales-report-dashboard .sales-report-kpis strong{font-size:22px;line-height:1}
.sales-report-dashboard .report-trend-panel{min-height:0}
.sales-report-dashboard .report-bars{height:auto;padding:6px 10px 8px}
.sales-report-dashboard .report-bar-values{height:112px}
.sales-report-dashboard .report-bar-day{min-width:22px}
.sales-report-dashboard .sales-panel{margin-bottom:12px}
.sales-report-dashboard .sales-panel-header{padding:13px 16px 8px}

/* Donut tỷ trọng lead theo nguồn, đặt cạnh bảng hiệu quả nguồn */
.report-source-grid{grid-template-columns:minmax(250px,290px) minmax(0,1fr);align-items:start}
.sales-report-dashboard .report-source-grid{grid-template-columns:minmax(250px,290px) minmax(0,1fr)}
.report-source-mix-panel{display:flex;flex-direction:column}
.report-mix-wrap{padding:2px 16px 15px}
.report-mix-donut{display:block;width:100%;max-width:170px;margin:0 auto 10px;overflow:visible}
.report-mix-donut circle{transition:opacity .15s}
.report-mix-wrap:hover circle[stroke-dasharray]{opacity:.55}
.report-mix-wrap circle[stroke-dasharray]:hover{opacity:1}
.report-mix-total{font-size:26px;font-weight:800;fill:var(--sales-ink);letter-spacing:-.03em}
.report-mix-caption{font-size:9.5px;font-weight:700;fill:#98a0ae;letter-spacing:.09em;text-transform:uppercase}

.report-mix-legend{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:1px}
.report-mix-legend li{display:flex;align-items:center;gap:8px;padding:5px 2px;border-bottom:1px solid #f2f3f7;font-size:11.5px}
.report-mix-legend li:last-child{border-bottom:0}
.report-mix-legend i{width:9px;height:9px;border-radius:3px;flex-shrink:0}
.report-mix-legend span{color:#4b5261;font-weight:600;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.report-mix-legend b{font-weight:800;color:var(--sales-ink);font-variant-numeric:tabular-nums}
.report-mix-legend em{font-style:normal;font-size:10px;font-weight:700;color:#98a0ae;min-width:52px;text-align:right;font-variant-numeric:tabular-nums;cursor:help}

.report-mix-note{margin:10px 0 0;padding:8px 10px;border-radius:8px;background:#f7f8fb;font-size:11px;line-height:1.5;color:#5c6474}
.report-mix-note i{margin-right:5px;color:var(--sales-primary)}
.report-mix-note b{font-weight:800;color:var(--sales-ink)}

@media (max-width:980px){
  .report-source-grid,.sales-report-dashboard .report-source-grid{grid-template-columns:1fr}
  .report-mix-donut{max-width:150px}
}
