.customers-view { min-width: 0; }
.customers-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:28px; margin:0 0 22px; }
.customers-heading h1 { margin:4px 0 5px; font-size:clamp(1.75rem,3vw,2.45rem); letter-spacing:-.045em; }
.customers-heading p { margin:0; color:var(--muted); max-width:720px; }
.customers-heading-meta { display:flex; flex-direction:column; align-items:flex-end; gap:8px; color:var(--muted); font-size:.78rem; }
.customers-source { display:inline-flex; align-items:center; gap:7px; padding:7px 10px; border:1px solid var(--line); border-radius:999px; background:var(--card); color:var(--ink); white-space:nowrap; font-size:.78rem; font-weight:700; }
.customers-source i { width:8px; height:8px; border-radius:50%; background:#22a06b; box-shadow:0 0 0 3px color-mix(in srgb,#22a06b 15%,transparent); }
.customers-source.is-warning i { background:#d5891c; box-shadow:0 0 0 3px color-mix(in srgb,#d5891c 15%,transparent); }
.customers-source-alert,.customers-notice,.customers-inline-error { display:flex; gap:8px; align-items:center; margin:0 0 15px; padding:11px 14px; border:1px solid #f1cf8c; border-radius:12px; background:#fff8e8; color:#704d0b; font-size:.84rem; }
.customers-source-alert { justify-content:space-between; }
.customers-source-alert > div { display:flex; align-items:center; gap:8px; min-width:0; }
.customers-source-alert a { flex:0 0 auto; color:inherit; font-weight:800; }
.customers-notice { border-color:#aed7c2; background:#edf9f3; color:#185c3b; }
.customers-inline-error { margin:12px; border-color:#efb2ad; background:#fff1ef; color:#8c2f28; }
.customers-inline-error button { border:0; background:none; color:inherit; text-decoration:underline; cursor:pointer; font-weight:800; }
.customers-loading { min-height:360px; display:grid; place-content:center; justify-items:center; gap:9px; color:var(--muted); text-align:center; }
.customers-loading > span { width:30px; height:30px; border:3px solid var(--line); border-top-color:var(--accent); border-radius:50%; animation:customers-spin .8s linear infinite; }
.customers-loading b { color:var(--ink); }
.customers-loading small { max-width:380px; }
@keyframes customers-spin { to { transform:rotate(360deg); } }
.customer-kpis { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:10px; margin-bottom:16px; }
.customer-kpis button { display:flex; flex-direction:column; align-items:flex-start; min-height:88px; padding:15px; border:1px solid var(--line); border-radius:14px; background:var(--card); color:var(--ink); text-align:left; cursor:pointer; box-shadow:0 5px 20px rgba(23,39,59,.035); }
.customer-kpis button:hover { border-color:color-mix(in srgb,var(--accent) 55%,var(--line)); transform:translateY(-1px); }
.customer-kpis span { color:var(--muted); font-size:.78rem; font-weight:700; }
.customer-kpis b { margin-top:auto; font-size:1.6rem; line-height:1; letter-spacing:-.035em; }
.customer-directory-panel,.followup-list,.followup-editor { border:1px solid var(--line); border-radius:16px; background:var(--card); box-shadow:0 8px 28px rgba(23,39,59,.045); overflow:hidden; }
.customer-panel-head { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:18px 20px 15px; }
.customer-panel-head h2 { margin:0 0 3px; font-size:1.12rem; }
.customer-panel-head p { margin:0; color:var(--muted); font-size:.82rem; }
.customer-filterbar { display:grid; grid-template-columns:minmax(260px,2fr) minmax(150px,1fr) minmax(150px,1fr) auto auto; align-items:end; gap:9px; padding:12px 20px 15px; border-top:1px solid var(--line); background:color-mix(in srgb,var(--bg) 42%,var(--card)); }
.customer-filterbar label,.followup-toolbar label,.followup-editor label { display:flex; flex-direction:column; gap:5px; min-width:0; }
.customer-filterbar label > span,.followup-editor label > span { color:var(--muted); font-size:.69rem; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
.customer-filterbar input,.customer-filterbar select,.followup-toolbar input,.followup-editor input,.followup-editor select,.followup-editor textarea,.customer-pagination select { width:100%; min-height:38px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--ink); padding:7px 9px; font:inherit; font-size:.82rem; }
.customer-search input { padding-left:11px; }
.customer-filter-more { min-width:132px; }
.customer-filter-more summary { display:flex; align-items:center; justify-content:space-between; gap:9px; min-height:38px; padding:7px 11px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--ink); font-size:.82rem; font-weight:750; cursor:pointer; list-style:none; }
.customer-filter-more summary::-webkit-details-marker { display:none; }
.customer-filter-more summary::after { content:'⌄'; color:var(--muted); font-size:.9rem; }
.customer-filter-more[open] { grid-column:1/-1; }
.customer-filter-more[open] summary { width:max-content; min-width:132px; }
.customer-filter-more[open] summary::after { transform:rotate(180deg); }
.customer-filter-more summary b { display:inline-grid; place-items:center; min-width:20px; height:20px; margin-left:auto; padding:0 6px; border-radius:999px; background:color-mix(in srgb,var(--accent) 13%,var(--card)); color:var(--accent); font-size:.69rem; }
.customer-filter-more-body { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:9px; margin-top:10px; padding:12px; border:1px solid var(--line); border-radius:11px; background:var(--card); }
.customer-filter-clear { align-self:end; min-height:38px; border:0; background:transparent; color:var(--accent); font-weight:800; cursor:pointer; }
.customers-progress { padding:7px 20px; border-top:1px solid var(--line); color:var(--muted); font-size:.78rem; }
.customer-table-wrap { overflow:auto; border-top:1px solid var(--line); }
.customer-table { width:100%; min-width:1160px; table-layout:fixed; border-collapse:separate; border-spacing:0; font-size:.79rem; }
.customer-table th { padding:9px 11px; border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--bg) 58%,var(--card)); color:var(--muted); text-align:left; font-size:.67rem; line-height:1.25; letter-spacing:.035em; text-transform:uppercase; white-space:normal; }
.customer-table th button { display:flex; align-items:center; gap:5px; border:0; padding:0; background:none; color:inherit; font:inherit; font-weight:inherit; letter-spacing:inherit; text-transform:inherit; cursor:pointer; }
.customer-table td { padding:12px 11px; border-bottom:1px solid var(--line); vertical-align:top; overflow-wrap:anywhere; }
.customer-table tr:last-child td { border-bottom:0; }
.customer-table tr:hover td { background:color-mix(in srgb,var(--accent) 3%,var(--card)); }
.customer-table tr.has-exception td:first-child { box-shadow:inset 3px 0 #e78b33; }
.customer-table th:first-child,.customer-table td:first-child { position:sticky; left:0; z-index:2; background:var(--card); box-shadow:1px 0 0 var(--line); }
.customer-table th:first-child { z-index:4; background:color-mix(in srgb,var(--bg) 58%,var(--card)); }
.customer-table tr:hover td:first-child { background:color-mix(in srgb,var(--accent) 3%,var(--card)); }
.customer-table td b,.customer-table td small,.customer-name-link { display:block; }
.customer-table td small { margin-top:3px; color:var(--muted); font-size:.71rem; line-height:1.35; }
.customer-name-link { color:var(--ink); text-decoration:none; max-width:215px; }
.customer-name-link:hover b { color:var(--accent); text-decoration:underline; }
.customer-name-link small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-name-link.is-unlinked { cursor:default; }
.customer-muted { color:var(--muted); }
.customer-trend,.customer-risk-count { display:flex; flex-direction:column; }
.customer-trend b,.customer-status { width:max-content; max-width:100%; padding:3px 7px; border-radius:999px; font-size:.69rem; }
.customer-trend.good b,.customer-risk-count.good b,.customer-status.active { color:#176443; background:#e5f6ed; }
.customer-trend.bad b,.customer-risk-count.bad b,.customer-status.on_hold { color:#9a352d; background:#fde9e7; }
.customer-trend.info b,.customer-status.watch { color:#7a5514; background:#fff1cf; }
.customer-trend.neutral b,.customer-status.inactive { color:#536173; background:#edf0f3; }
.customer-risk-count b { font-size:1rem; color:#176443; }
.customer-pagination { display:flex; justify-content:space-between; align-items:center; gap:12px; padding:12px 18px; border-top:1px solid var(--line); color:var(--muted); font-size:.78rem; }
.customer-pagination label,.customer-pagination div { display:flex; align-items:center; gap:8px; }
.customer-pagination select { width:auto; min-height:32px; }
.customer-limitations { margin-top:12px; padding:12px 15px; border:1px solid var(--line); border-radius:12px; color:var(--muted); font-size:.8rem; background:var(--card); }
.customer-limitations summary { color:var(--ink); font-weight:800; cursor:pointer; }
.customer-limitations ul { margin:9px 0 0; padding-left:20px; }
.customers-state { min-height:230px; display:flex; flex-direction:column; justify-content:center; align-items:center; padding:40px 24px; color:var(--muted); text-align:center; }
.customers-state > span { display:grid; place-content:center; width:42px; height:42px; margin-bottom:12px; border-radius:50%; background:var(--bg); color:var(--muted); font-size:1.3rem; }
.customers-state h2 { margin:0 0 5px; color:var(--ink); font-size:1.05rem; }
.customers-state p { margin:0 0 14px; max-width:540px; }
.customers-state.denied > span,.customers-state.error > span { color:#9a352d; background:#fde9e7; }
.customer-empty-state { min-height:210px; }
.customer-empty-state > span { background:#e5f6ed; color:#176443; font-weight:900; }
.is-overdue > b,.is-overdue > small { color:#9a352d !important; }
.followup-toolbar { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.followup-toolbar > label { margin-left:auto; width:min(330px,35vw); }
.followup-scope { display:flex; gap:4px; padding:4px; border:1px solid var(--line); border-radius:10px; background:var(--card); }
.followup-scope button,.followup-modes button { border:0; border-radius:7px; background:transparent; color:var(--muted); padding:7px 11px; font:inherit; font-weight:750; cursor:pointer; }
.followup-scope button[aria-selected="true"] { background:#e8edf2; color:#12243a; }
.followup-modes { display:flex; gap:7px; margin-bottom:12px; overflow:auto; }
.followup-modes button { display:flex; align-items:center; gap:7px; border:1px solid var(--line); background:var(--card); white-space:nowrap; }
.followup-modes button[aria-current="page"] { border-color:var(--accent); color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.followup-modes b { display:grid; place-content:center; min-width:20px; height:20px; padding:0 5px; border-radius:999px; background:var(--bg); font-size:.7rem; }
.followup-layout { display:grid; grid-template-columns:minmax(0,1fr); gap:14px; align-items:start; }
.followup-layout:has(.followup-editor) { grid-template-columns:minmax(0,1.6fr) minmax(330px,.8fr); }
.followup-list { padding:8px; }
.followup-card { position:relative; display:grid; grid-template-columns:95px minmax(0,1fr) auto; align-items:start; gap:14px; padding:15px 12px; border-bottom:1px solid var(--line); }
.followup-card:last-child { border-bottom:0; }
.followup-priority { display:flex; align-items:center; gap:6px; color:var(--muted); font-size:.7rem; font-weight:800; text-transform:uppercase; }
.followup-priority i { width:8px; height:8px; border-radius:50%; background:#7d8997; }
.priority-critical .followup-priority i { background:#c53d35; }
.priority-high .followup-priority i { background:#e78b33; }
.priority-medium .followup-priority i { background:#3277c8; }
.followup-copy > a { color:var(--accent); font-size:.78rem; font-weight:800; text-decoration:none; }
.followup-copy h3 { margin:3px 0 5px; font-size:.98rem; }
.followup-copy p { margin:0 0 8px; color:var(--muted); font-size:.79rem; white-space:pre-line; }
.followup-copy > div { display:flex; flex-wrap:wrap; gap:6px 14px; color:var(--muted); font-size:.72rem; }
.followup-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:5px; }
.followup-editor { position:sticky; top:76px; }
.followup-editor > header { display:flex; justify-content:space-between; align-items:start; padding:16px 17px; border-bottom:1px solid var(--line); }
.followup-editor h2 { margin:2px 0 0; font-size:1.08rem; }
.followup-editor > header > button { width:30px; height:30px; border:0; border-radius:8px; background:var(--bg); color:var(--muted); font-size:1.2rem; cursor:pointer; }
.followup-editor form { display:grid; grid-template-columns:1fr 1fr; gap:12px; padding:17px; }
.followup-editor .wide,.followup-editor footer { grid-column:1/-1; }
.followup-editor textarea { resize:vertical; line-height:1.45; }
.followup-editor footer { display:flex; justify-content:flex-end; gap:8px; }

@media (max-width:1400px) {
  .customer-kpis { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .customer-filterbar { grid-template-columns:minmax(240px,2fr) repeat(2,minmax(145px,1fr)) auto auto; }
  .customer-filter-more-body { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .followup-layout:has(.followup-editor) { grid-template-columns:1fr; }
  .followup-editor { position:static; grid-row:1; }
}
@media (max-width:760px) {
  .customers-heading { flex-direction:column; gap:12px; }
  .customers-heading-meta { align-items:flex-start; width:100%; }
  .customers-source { max-width:100%; white-space:normal; }
  .customer-kpis { grid-template-columns:1fr 1fr; }
  .customer-kpis button { min-height:78px; }
  .customer-panel-head,.followup-toolbar { align-items:stretch; flex-direction:column; }
  .followup-toolbar > label { order:2; margin:0; width:100%; }
  .customer-filterbar { grid-template-columns:1fr 1fr; padding:12px; }
  .customer-search { grid-column:1/-1; }
  .customer-filter-more[open] { grid-column:1/-1; }
  .customer-filter-more-body { grid-template-columns:1fr 1fr; }
  .customers-source-alert,.customers-source-alert > div { align-items:flex-start; flex-direction:column; }
  .customer-table { display:block; min-width:0; }
  .customer-table thead { display:none; }
  .customer-table tbody { display:grid; gap:10px; padding:10px; }
  .customer-table tr { display:grid; grid-template-columns:1fr 1fr; gap:0; border:1px solid var(--line); border-radius:12px; overflow:hidden; }
  .customer-table tr.has-exception td:first-child { box-shadow:inset 3px 0 #e78b33; }
  .customer-table td { display:block; min-width:0; padding:10px; border-bottom:1px solid var(--line); }
  .customer-table th:first-child,.customer-table td:first-child { position:static; box-shadow:none; }
  .customer-table td::before { content:attr(data-label); display:block; margin-bottom:4px; color:var(--muted); font-size:.62rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
  .customer-table td:first-child { grid-column:1/-1; }
  .customer-table td:last-child { border-bottom:0; }
  .customer-pagination { flex-wrap:wrap; }
  .followup-card { grid-template-columns:1fr; }
  .followup-actions { justify-content:flex-start; }
}
@media (max-width:480px) {
  .customer-kpis,.customer-filterbar,.followup-editor form,.customer-table tr { grid-template-columns:1fr; }
  .customer-search,.customer-table td:first-child { grid-column:auto; }
  .customer-filter-more[open] { grid-column:auto; }
  .customer-filter-more-body { grid-template-columns:1fr; }
  .customer-kpis button { min-height:70px; }
  .customer-pagination { align-items:flex-start; flex-direction:column; }
}

/* Connected Customers & Sales workspace */
.customers-workspace-heading { align-items:center; margin-bottom:18px; }
.customers-workspace-heading h1 { margin-top:0; }
.customers-heading-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.customers-readonly-note { display:inline-flex; align-items:center; min-height:38px; padding:0 12px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--muted); font-size:.76rem; font-weight:750; }
.customer-workflow { display:grid; grid-template-columns:repeat(var(--customer-workflow-columns,4),minmax(0,1fr)); margin:0 0 12px; border:1px solid var(--line); border-radius:12px; background:var(--card); overflow:hidden; }
.customer-workflow button { position:relative; display:grid; grid-template-columns:36px minmax(0,1fr) auto 12px; align-items:center; gap:10px; min-width:0; min-height:68px; padding:10px 12px; border:0; border-right:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.customer-workflow button:last-child { border-right:0; }
.customer-workflow button:hover,.customer-workflow button:focus-visible { background:color-mix(in srgb,var(--accent) 5%,var(--card)); }
.customer-workflow-icon { display:grid; place-content:center; width:34px; height:34px; border:1px solid color-mix(in srgb,var(--accent) 32%,var(--line)); border-radius:50%; color:var(--accent); }
.customer-workflow-icon svg { width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.customer-workflow button > span:nth-child(2) { min-width:0; }
.customer-workflow b,.customer-workflow small { display:block; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.customer-workflow b { font-size:.78rem; }
.customer-workflow small { margin-top:2px; color:var(--muted); font-size:.65rem; }
.customer-workflow strong { color:var(--muted); font-size:.76rem; }
.customer-workflow-arrow { color:var(--muted); font-size:1.2rem; }
.customer-action-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); margin-bottom:12px; border:1px solid var(--line); border-radius:12px; background:var(--card); overflow:hidden; }
.customer-action-summary button { display:grid; grid-template-columns:38px minmax(0,1fr) auto; align-items:center; gap:12px; min-height:78px; padding:12px 16px; border:0; border-right:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.customer-action-summary button:last-child { border-right:0; }
.customer-action-summary button:hover,.customer-action-summary button:focus-visible { background:color-mix(in srgb,var(--accent) 4%,var(--card)); }
.customer-action-summary button span:nth-child(2) b,.customer-action-summary button span:nth-child(2) small { display:block; }
.customer-action-summary button span:nth-child(2) b { font-size:.84rem; }
.customer-action-summary button span:nth-child(2) small { margin-top:3px; color:var(--muted); font-size:.7rem; }
.customer-action-summary button > strong { font-size:1.28rem; }
.customer-summary-icon { display:grid; place-content:center; width:36px; height:36px; border-radius:10px; background:#eef4fb; color:#1766ad; font-size:1rem; font-weight:900; }
.customer-summary-icon.warning { background:#fff0df; color:#b66213; }
.customer-summary-icon.danger { background:#fde8e6; color:#b93632; }
.customer-overview-layout { display:grid; grid-template-columns:minmax(0,1.8fr) minmax(280px,.72fr); gap:12px; align-items:start; }
.customer-overview-main { display:grid; gap:12px; min-width:0; }
.customer-operational-panel,.customer-today-panel { min-width:0; border:1px solid var(--line); border-radius:12px; background:var(--card); overflow:hidden; }
.customer-operational-panel > header,.customer-today-panel > header { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:13px 15px; border-bottom:1px solid var(--line); }
.customer-operational-panel h2,.customer-today-panel h2 { margin:0; font-size:.98rem; }
.customer-operational-panel header p,.customer-today-panel header p { margin:2px 0 0; color:var(--muted); font-size:.72rem; }
.customer-text-action { min-height:34px; border:0; background:transparent; color:var(--accent); font:inherit; font-size:.76rem; font-weight:800; cursor:pointer; white-space:nowrap; }
.customer-priority-list > a { display:grid; grid-template-columns:5px minmax(150px,.8fr) minmax(230px,1.4fr) minmax(115px,.55fr) 14px; align-items:center; gap:12px; min-height:58px; padding:9px 15px 9px 0; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.customer-priority-list > a:last-child { border-bottom:0; }
.customer-priority-list > a:hover { background:color-mix(in srgb,var(--accent) 3%,var(--card)); }
.customer-priority-marker { align-self:stretch; background:#d9e1e9; }
.customer-priority-marker.high { background:#e28731; }
.customer-priority-list b,.customer-priority-list small { display:block; }
.customer-priority-list b { font-size:.78rem; }
.customer-priority-list small { margin-top:3px; color:var(--muted); font-size:.68rem; }
.customer-priority-customer b { color:var(--accent); }
.customer-priority-list .is-overdue { padding:5px 8px; border-radius:8px; background:#fff1ef; }
.customer-pipeline-rail { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); }
.customer-pipeline-rail button { position:relative; min-height:66px; padding:11px; border:0; border-right:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.customer-pipeline-rail button:last-child { border-right:0; }
.customer-pipeline-rail button:hover { background:color-mix(in srgb,var(--accent) 4%,var(--card)); }
.customer-pipeline-rail span,.customer-pipeline-rail b { display:block; }
.customer-pipeline-rail span { color:var(--muted); font-size:.68rem; font-weight:750; }
.customer-pipeline-rail b { margin-top:8px; font-size:1.1rem; }
.customer-order-list > a { display:grid; grid-template-columns:minmax(145px,.7fr) minmax(120px,.55fr) minmax(150px,.7fr) 14px; align-items:center; gap:12px; min-height:55px; padding:9px 15px; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.customer-order-list > a:last-child { border-bottom:0; }
.customer-order-list > a:hover { background:color-mix(in srgb,var(--accent) 3%,var(--card)); }
.customer-order-list b,.customer-order-list small { display:block; }
.customer-order-list b { font-size:.78rem; }
.customer-order-list small { margin-top:3px; color:var(--muted); font-size:.68rem; }
.customer-coverage { display:flex; flex-direction:column; }
.customer-coverage.covered b { color:#176443; }
.customer-coverage.at_risk b { color:#a44524; }
.customer-today-panel > header { align-items:flex-start; }
.customer-today-panel > section { padding:12px 14px; border-bottom:1px solid var(--line); }
.customer-today-panel > section:last-child { border-bottom:0; }
.customer-today-title { display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:7px; }
.customer-today-title b { font-size:.79rem; }
.customer-today-title strong { min-width:24px; padding:3px 6px; border-radius:999px; background:var(--bg); color:var(--muted); font-size:.68rem; text-align:center; }
.customer-today-panel section > button:not(.customer-text-action) { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:10px; width:100%; padding:9px 0; border:0; border-bottom:1px solid var(--line); background:transparent; color:var(--ink); text-align:left; cursor:pointer; }
.customer-today-panel section > button:not(.customer-text-action) b,.customer-today-panel section > button:not(.customer-text-action) small { display:block; }
.customer-today-panel section > button:not(.customer-text-action) b { font-size:.73rem; }
.customer-today-panel section > button:not(.customer-text-action) small,.customer-empty-copy { margin:2px 0 0; color:var(--muted); font-size:.67rem; }
.customer-today-panel .customer-text-action { padding-left:0; }
.customer-kpis-four { grid-template-columns:repeat(4,minmax(0,1fr)); }
.customer-kpis button small { margin-top:5px; color:var(--muted); font-size:.68rem; }
.customer-compact-filters { display:grid; grid-template-columns:minmax(260px,2fr) repeat(3,minmax(140px,1fr)) auto; gap:9px; padding:12px 20px 15px; border-top:1px solid var(--line); background:color-mix(in srgb,var(--bg) 42%,var(--card)); }
.customer-compact-filters label { display:flex; flex-direction:column; gap:5px; min-width:0; }
.customer-compact-filters label > span { color:var(--muted); font-size:.69rem; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
.customer-compact-filters input,.customer-compact-filters select { width:100%; min-height:38px; padding:7px 9px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--ink); font:inherit; font-size:.82rem; }
.customer-scope-switch { display:flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:9px; background:var(--bg); }
.customer-scope-switch button { min-height:32px; padding:0 12px; border:0; border-radius:7px; background:transparent; color:var(--muted); font:inherit; font-size:.75rem; font-weight:750; cursor:pointer; }
.customer-scope-switch button[aria-selected="true"] { background:var(--card); color:var(--ink); box-shadow:0 1px 2px rgba(23,39,59,.09); }
.customer-workflow-table { min-width:1180px; }
.customer-orders-table { min-width:1120px; }
.customer-order-view-switch { display:flex; gap:3px; padding:3px; border:1px solid var(--line); border-radius:9px; background:var(--bg); }
.customer-order-view-switch button { min-height:32px; padding:0 13px; border:0; border-radius:7px; background:transparent; color:var(--muted); font:inherit; font-size:.75rem; font-weight:780; cursor:pointer; }
.customer-order-view-switch button[aria-selected="true"] { background:var(--card); color:var(--ink); box-shadow:0 1px 2px rgba(23,39,59,.09); }
.customer-active-filter { display:flex; padding:10px 18px 0; border-top:1px solid var(--line); }
.customer-date-chip { display:inline-flex; align-items:center; gap:8px; min-height:32px; padding:0 10px; border:1px solid color-mix(in srgb,var(--accent) 35%,var(--line)); border-radius:999px; background:color-mix(in srgb,var(--accent) 8%,var(--card)); color:var(--accent); font:inherit; font-size:.73rem; font-weight:780; cursor:pointer; }
.customer-calendar-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); border-top:1px solid var(--line); border-bottom:1px solid var(--line); background:color-mix(in srgb,var(--bg) 34%,var(--card)); }
.customer-calendar-summary > div { min-height:74px; padding:13px 16px; border-right:1px solid var(--line); }
.customer-calendar-summary > div:last-child { border-right:0; }
.customer-calendar-summary span,.customer-calendar-summary small,.customer-calendar-summary b { display:block; }
.customer-calendar-summary span { color:var(--muted); font-size:.67rem; font-weight:800; letter-spacing:.035em; text-transform:uppercase; }
.customer-calendar-summary b { margin-top:7px; font-size:1.08rem; line-height:1.1; }
.customer-calendar-summary small { margin-top:3px; color:var(--muted); font-size:.67rem; }
.customer-calendar-toolbar { display:flex; align-items:center; gap:8px; min-height:58px; padding:10px 16px; border-bottom:1px solid var(--line); }
.customer-calendar-toolbar h3 { min-width:180px; margin:0 4px; font-size:1rem; text-align:center; }
.customer-calendar-toolbar > span { display:flex; align-items:center; gap:7px; margin-left:auto; color:var(--muted); font-size:.69rem; font-weight:700; }
.customer-calendar-toolbar > span i { width:11px; height:11px; border-radius:3px; background:color-mix(in srgb,var(--accent) 22%,var(--card)); box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--accent) 40%,var(--line)); }
.customer-calendar-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(300px,350px); min-height:520px; }
.customer-calendar { min-width:0; padding:14px; border-right:1px solid var(--line); }
.customer-calendar-weekdays,.customer-calendar-grid { display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); }
.customer-calendar-weekdays span { padding:0 6px 8px; color:var(--muted); font-size:.63rem; font-weight:800; letter-spacing:.04em; text-align:center; text-transform:uppercase; }
.customer-calendar-grid { gap:5px; }
.customer-calendar-blank { min-height:94px; }
.customer-calendar-day { position:relative; display:flex; flex-direction:column; align-items:flex-start; min-width:0; min-height:94px; padding:8px; border:1px solid var(--line); border-radius:10px; background:var(--card); color:var(--ink); font:inherit; text-align:left; cursor:pointer; }
.customer-calendar-day:hover,.customer-calendar-day:focus-visible { border-color:color-mix(in srgb,var(--accent) 65%,var(--line)); }
.customer-calendar-day.load-low { background:color-mix(in srgb,var(--accent) 6%,var(--card)); }
.customer-calendar-day.load-medium { background:color-mix(in srgb,var(--accent) 12%,var(--card)); }
.customer-calendar-day.load-high { background:color-mix(in srgb,var(--accent) 20%,var(--card)); }
.customer-calendar-day.is-selected { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent),0 4px 13px rgba(20,91,145,.12); }
.customer-calendar-day.is-today > span:first-child { display:grid; place-content:center; width:23px; height:23px; margin:-2px 0 1px -2px; border-radius:50%; background:var(--accent); color:#fff; }
.customer-calendar-day > span { color:var(--muted); font-size:.67rem; font-weight:850; }
.customer-calendar-day strong { display:flex; align-items:baseline; gap:3px; margin-top:auto; font-size:1rem; line-height:1; }
.customer-calendar-day strong small { color:var(--muted); font-size:.58rem; font-weight:700; }
.customer-calendar-day em { margin-top:4px; color:var(--muted); font-size:.62rem; font-style:normal; }
.customer-calendar-day i { margin-top:4px; color:#9a352d; font-size:.58rem; font-style:normal; font-weight:800; }
.customer-calendar-day i.is-unit { color:#7a5514; }
.customer-calendar-detail { min-width:0; padding:16px; background:color-mix(in srgb,var(--bg) 28%,var(--card)); }
.customer-calendar-detail > header { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.customer-calendar-detail > header span { color:var(--muted); font-size:.64rem; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.customer-calendar-detail > header h3 { margin:4px 0 0; font-size:1.05rem; }
.customer-calendar-day-total { display:grid; grid-template-columns:repeat(3,1fr); margin:14px 0; border:1px solid var(--line); border-radius:10px; background:var(--card); overflow:hidden; }
.customer-calendar-day-total > div { padding:11px; border-right:1px solid var(--line); }
.customer-calendar-day-total > div:last-child { border-right:0; }
.customer-calendar-day-total b,.customer-calendar-day-total span { display:block; }
.customer-calendar-day-total b { font-size:1.06rem; }
.customer-calendar-day-total span { margin-top:2px; color:var(--muted); font-size:.62rem; }
.customer-calendar-day-total .is-risk b { color:#a44524; }
.customer-calendar-orders { max-height:340px; border:1px solid var(--line); border-radius:10px; background:var(--card); overflow:auto; }
.customer-calendar-order { display:grid; grid-template-columns:minmax(0,1fr) auto 12px; align-items:center; gap:10px; padding:11px 12px; border-bottom:1px solid var(--line); color:var(--ink); text-decoration:none; }
.customer-calendar-order:last-child { border-bottom:0; }
.customer-calendar-order:hover { background:color-mix(in srgb,var(--accent) 5%,var(--card)); }
.customer-calendar-order span:nth-child(2) { text-align:right; }
.customer-calendar-order b,.customer-calendar-order small { display:block; }
.customer-calendar-order b { font-size:.74rem; }
.customer-calendar-order small { margin-top:2px; color:var(--muted); font-size:.64rem; }
.customer-calendar-order > span:last-child { color:var(--accent); font-size:.64rem; font-weight:800; }
.customer-calendar-empty { margin:0; padding:22px 14px; color:var(--muted); font-size:.75rem; text-align:center; }
.customer-calendar-warning,.customer-calendar-suggestion,.customer-calendar-undated { display:flex; flex-direction:column; gap:3px; margin:12px 0; padding:11px 12px; border:1px solid #eccb91; border-radius:10px; background:#fff8e8; color:#6f4a11; }
.customer-calendar-warning b,.customer-calendar-suggestion b,.customer-calendar-undated b { font-size:.73rem; }
.customer-calendar-warning span,.customer-calendar-suggestion span,.customer-calendar-undated span { font-size:.67rem; line-height:1.4; }
.customer-calendar-suggestion { border-color:color-mix(in srgb,var(--accent) 28%,var(--line)); background:color-mix(in srgb,var(--accent) 6%,var(--card)); color:var(--ink); }
.customer-calendar-governance { margin:13px 2px 0; color:var(--muted); font-size:.66rem; line-height:1.45; }
.customer-calendar-undated { margin:0; border-width:1px 0 0; border-radius:0; padding:12px 18px; }
.customer-service-table { min-width:1160px; }
.customer-row-link { display:grid; place-content:center; width:32px; height:32px; border-radius:8px; color:var(--accent); text-decoration:none; font-size:1.2rem; }
.customers-table-note { margin:0; padding:10px 18px 14px; border-top:1px solid var(--line); color:var(--muted); font-size:.72rem; }
.customer-status.discovery,.customer-status.qualification { color:#2b6094; background:#e8f1fa; }
.customer-status.quote,.customer-status.negotiation,.customer-status.waiting_customer,.customer-status.waiting_internal { color:#7a5514; background:#fff1cf; }
.customer-status.won,.customer-status.resolved,.customer-status.closed { color:#176443; background:#e5f6ed; }
.customer-status.lost,.customer-status.critical { color:#9a352d; background:#fde9e7; }
.customer-status.on_hold,.customer-status.in_progress,.customer-status.open { color:#536173; background:#edf0f3; }
.customer-record-dialog { width:min(760px,calc(100vw - 32px)); max-height:min(860px,calc(100vh - 32px)); padding:0; border:1px solid var(--line); border-radius:15px; background:var(--card); color:var(--ink); box-shadow:0 24px 70px rgba(18,36,58,.24); overflow:auto; }
.customer-record-dialog::backdrop { background:rgba(18,31,47,.42); backdrop-filter:blur(2px); }
.customer-record-dialog > section > header { position:sticky; top:0; z-index:2; display:flex; align-items:flex-start; justify-content:space-between; gap:18px; padding:18px 20px; border-bottom:1px solid var(--line); background:var(--card); }
.customer-record-dialog header h2 { margin:0 0 3px; font-size:1.16rem; }
.customer-record-dialog header p { margin:0; color:var(--muted); font-size:.77rem; }
.customer-record-dialog header button { width:34px; height:34px; border:0; border-radius:8px; background:var(--bg); color:var(--muted); font-size:1.2rem; cursor:pointer; }
.customer-record-dialog form:not([data-customer-dialog-close]) { display:grid; grid-template-columns:1fr 1fr; gap:13px; padding:20px; }
.customer-record-dialog label { display:flex; flex-direction:column; gap:6px; min-width:0; }
.customer-record-dialog label.wide,.customer-record-dialog footer { grid-column:1/-1; }
.customer-record-dialog label > span { color:var(--muted); font-size:.69rem; font-weight:800; letter-spacing:.03em; text-transform:uppercase; }
.customer-record-dialog label > small { color:var(--muted); font-size:.66rem; }
.customer-record-dialog input,.customer-record-dialog select,.customer-record-dialog textarea { width:100%; min-height:40px; padding:8px 10px; border:1px solid var(--line); border-radius:9px; background:var(--card); color:var(--ink); font:inherit; font-size:.84rem; }
.customer-record-dialog textarea { resize:vertical; line-height:1.45; }
.customer-record-dialog footer { position:sticky; bottom:-20px; display:flex; justify-content:flex-end; gap:8px; margin:4px -20px -20px; padding:14px 20px; border-top:1px solid var(--line); background:var(--card); }

@media (max-width:1180px) {
  .customer-overview-layout { grid-template-columns:1fr; }
  .customer-today-panel { display:grid; grid-template-columns:1fr 1fr; }
  .customer-today-panel > header { grid-column:1/-1; }
  .customer-today-panel > section:nth-child(2) { border-right:1px solid var(--line); border-bottom:0; }
  .customer-compact-filters { grid-template-columns:minmax(220px,2fr) repeat(2,minmax(140px,1fr)); }
  .customer-calendar-layout { grid-template-columns:1fr; }
  .customer-calendar { border-right:0; border-bottom:1px solid var(--line); }
}

@media (max-width:760px) {
  .customers-workspace-heading { align-items:stretch; }
  .customers-workspace-heading h1 { font-size:1.65rem; }
  .customers-heading-actions { justify-content:flex-start; width:100%; }
  .customers-heading-actions .btn { min-height:44px; }
  .customer-workflow { display:flex; overflow-x:auto; scroll-snap-type:x proximity; }
  .customer-workflow button { flex:0 0 210px; min-height:74px; border-bottom:0 !important; scroll-snap-align:start; }
  .customer-action-summary { grid-template-columns:1fr; }
  .customer-action-summary button { min-height:72px; border-right:0; border-bottom:1px solid var(--line); }
  .customer-action-summary button:last-child { border-bottom:0; }
  .customer-priority-list > a { grid-template-columns:5px minmax(0,1fr) 16px; gap:10px; padding-right:12px; }
  .customer-priority-list > a > span:nth-child(3),.customer-priority-list > a > span:nth-child(4) { grid-column:2; }
  .customer-priority-list > a > span:last-child { grid-column:3; grid-row:1/4; }
  .customer-pipeline-rail { display:flex; overflow-x:auto; }
  .customer-pipeline-rail button { flex:0 0 120px; }
  .customer-order-list > a { grid-template-columns:minmax(0,1fr) 16px; }
  .customer-order-list > a > span:nth-child(2),.customer-order-list > a > span:nth-child(3) { grid-column:1; }
  .customer-order-list > a > span:last-child { grid-column:2; grid-row:1/4; }
  .customer-today-panel { display:block; }
  .customer-today-panel > header { display:block; }
  .customer-today-panel > section:nth-child(2) { border-right:0; border-bottom:1px solid var(--line); }
  .customer-kpis-four { grid-template-columns:1fr 1fr; }
  .customer-compact-filters { grid-template-columns:1fr 1fr; padding:12px; }
  .customer-compact-filters .customer-search { grid-column:1/-1; }
  .customer-compact-filters .customer-filter-clear { min-height:44px; }
  .customer-scope-switch { width:100%; }
  .customer-scope-switch button { flex:1; min-height:40px; }
  .customer-order-view-switch { width:100%; }
  .customer-order-view-switch button { flex:1; min-height:40px; }
  .customer-calendar-summary { grid-template-columns:1fr 1fr; }
  .customer-calendar-summary > div:nth-child(2) { border-right:0; }
  .customer-calendar-summary > div:nth-child(-n+2) { border-bottom:1px solid var(--line); }
  .customer-calendar-toolbar { flex-wrap:wrap; }
  .customer-calendar-toolbar h3 { min-width:150px; flex:1; }
  .customer-calendar-toolbar > span { width:100%; margin:0; }
  .customer-calendar { padding:9px; overflow-x:auto; }
  .customer-calendar-weekdays,.customer-calendar-grid { min-width:690px; }
  .customer-calendar-day,.customer-calendar-blank { min-height:88px; }
  .customer-record-dialog { width:calc(100vw - 16px); max-height:calc(100vh - 16px); border-radius:12px; }
  .customer-record-dialog form:not([data-customer-dialog-close]) { grid-template-columns:1fr; padding:15px; }
  .customer-record-dialog label.wide,.customer-record-dialog footer { grid-column:auto; }
  .customer-record-dialog footer { margin:4px -15px -15px; padding:12px 15px; }
}

@media (max-width:480px) {
  .customer-kpis-four { grid-template-columns:1fr; }
  .customer-order-kpis { grid-template-columns:1fr 1fr; }
  .customer-order-kpis button { min-height:92px; padding:12px; }
  .customer-order-kpis b { font-size:1.35rem; }
  .customer-compact-filters { grid-template-columns:1fr; }
  .customer-compact-filters .customer-search { grid-column:auto; }
  .customer-calendar-detail { padding:13px; }
  .customer-record-dialog footer { flex-direction:column-reverse; }
  .customer-record-dialog footer .btn { width:100%; min-height:44px; }
}
