/* Customers page — desktop operational overview. Mobile is handled in a separate stage. */
.customers-page .customers-header{margin-bottom:18px}
.customers-header-copy{max-width:760px}
.customers-overview{display:grid;grid-template-columns:minmax(300px,.92fr) minmax(0,2.08fr);gap:14px;margin-bottom:18px;align-items:stretch}
.customers-action-card,.customers-kpi-card{position:relative;min-width:0;border:1px solid var(--border,#e5e8f0);background:var(--surface,#fff);border-radius:16px;box-shadow:0 5px 18px rgba(27,31,67,.045)}
.customers-action-card{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"icon copy" "button button";gap:14px 16px;align-items:center;padding:20px}
.customers-action-icon{grid-area:icon;display:grid;place-items:center;width:54px;height:54px;border-radius:14px;background:linear-gradient(135deg,rgba(103,72,238,.12),rgba(92,128,255,.08));color:var(--primary,#6748ee)}
.customers-action-icon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.customers-action-copy{grid-area:copy;display:grid;gap:4px;min-width:0}
.customers-action-copy strong{font-size:18px;line-height:1.25;color:var(--text,#171a36)}
.customers-action-copy small{font-size:12px;line-height:1.55;color:var(--muted,#70758d)}
.customers-action-card .primary{grid-area:button;width:100%;justify-content:center;min-height:42px}
.customers-summary-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}
.customers-kpi-card{display:flex;flex-direction:column;justify-content:center;min-height:156px;padding:20px;overflow:hidden}
.customers-kpi-card>span{font-size:13px;font-weight:650;color:var(--text,#292d49)}
.customers-kpi-card>strong{margin-top:9px;font-size:31px;line-height:1;font-weight:800;letter-spacing:-.5px;color:var(--text,#171a36)}
.customers-kpi-card>small{margin-top:10px;max-width:80%;font-size:11px;line-height:1.45;color:var(--muted,#70758d)}
.customers-kpi-card>i{position:absolute;inset-inline-end:16px;inset-block-end:16px;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:rgba(103,72,238,.08);color:var(--primary,#6748ee)}
.customers-kpi-card>i svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.customers-kpi-contact>i{background:rgba(39,174,96,.09);color:#239557}
.customers-kpi-month>i{background:rgba(47,118,255,.09);color:#3478ee}
[data-theme="dark"] .customers-action-card,[data-theme="dark"] .customers-kpi-card{background:var(--surface,#17192a);border-color:var(--border,#2b2e46);box-shadow:none}
@media (min-width:981px) and (max-width:1180px){.customers-overview{grid-template-columns:1fr}.customers-action-card{grid-template-columns:auto minmax(0,1fr) auto;grid-template-areas:"icon copy button"}.customers-action-card .primary{width:auto;min-width:150px}.customers-kpi-card{min-height:140px}}

/* Stage 3 — desktop search, filtering and export */
@media (min-width: 981px){
  .customers-toolbar{
    display:grid;
    grid-template-columns:minmax(320px,1.5fr) minmax(210px,.72fr) minmax(190px,.62fr) auto;
    align-items:end;
    gap:14px;
    padding:18px;
    margin-bottom:20px;
  }
  .customers-search-field,.customers-filter-field{display:grid;gap:7px;min-width:0}
  .customers-control-label{font-size:12px;font-weight:700;color:var(--muted,#6b7280)}
  .customers-search-control{position:relative;display:block}
  .customers-search-control input{width:100%;padding-inline-start:44px;background:var(--surface,#fff)}
  .customers-search-control svg{position:absolute;inset-inline-start:15px;top:50%;width:19px;height:19px;transform:translateY(-50%);fill:none;stroke:currentColor;stroke-width:1.8;color:var(--muted,#7b8191);pointer-events:none}
  .customers-filter-field select{width:100%;min-width:0;background:var(--surface,#fff)}
  .customers-toolbar-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;white-space:nowrap}
  .customers-toolbar-actions button{min-height:43px}
  .customers-export-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8}
  .customers-toolbar-meta{grid-column:1/-1;display:flex;align-items:center;gap:12px;padding-top:2px;font-size:12px;color:var(--muted,#6b7280)}
  .customers-toolbar-meta #customersActiveFilters{padding:5px 9px;border-radius:999px;background:rgba(103,72,238,.08);color:var(--primary,#6748ee);font-weight:700}
  .customers-toolbar.has-active-filters{border-color:rgba(103,72,238,.24);box-shadow:0 6px 18px rgba(103,72,238,.06)}
}

html[data-theme="dark"] .customers-toolbar,
body.dark .customers-toolbar{background:var(--surface,#171923);border-color:var(--border,#2b3040)}
html[data-theme="dark"] .customers-search-control input,
html[data-theme="dark"] .customers-filter-field select,
body.dark .customers-search-control input,
body.dark .customers-filter-field select{background:var(--surface-2,#11131b);border-color:var(--border,#303647);color:var(--text,#f4f5f7)}

/* Stage 4 — operational customers table */
.customers-table-region{overflow:auto;border:1px solid var(--border,#e5e7eb);border-radius:16px;background:var(--surface,#fff)}
.customers-table{width:100%;border-collapse:collapse;min-width:960px}
.customers-table th,.customers-table td{padding:14px 16px;text-align:right;border-bottom:1px solid var(--border,#edf0f5);vertical-align:middle}
.customers-table th{font-size:12px;font-weight:700;color:var(--muted,#6b7280);background:color-mix(in srgb,var(--surface,#fff) 92%,var(--primary,#6750ed) 8%);white-space:nowrap}
.customers-table tbody tr:last-child td{border-bottom:0}
.customer-table-row{cursor:pointer;transition:background .16s ease,box-shadow .16s ease}
.customer-table-row:hover{background:color-mix(in srgb,var(--surface,#fff) 94%,var(--primary,#6750ed) 6%)}
.customer-table-row:focus-visible{outline:3px solid color-mix(in srgb,var(--primary,#6750ed) 28%,transparent);outline-offset:-3px}
.customer-identity{display:flex;align-items:center;gap:10px;min-width:220px}
.customer-identity>i{display:grid;place-items:center;width:38px;height:38px;border-radius:12px;background:color-mix(in srgb,var(--primary,#6750ed) 13%,var(--surface,#fff));color:var(--primary,#6750ed);font-style:normal;font-weight:800}
.customer-identity>span{display:grid;gap:2px;min-width:0}
.customer-identity strong{font-size:14px;color:var(--text,#111827)}
.customer-identity small{max-width:240px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted,#6b7280)}
.customers-table a{color:var(--text,#111827);text-decoration:none}
.customers-table a:hover{text-decoration:underline}
.customer-missing{color:var(--muted,#9ca3af);font-size:12px}
.customer-value{white-space:nowrap}
.customer-row-actions{display:flex;align-items:center;gap:6px}
.customer-action{display:grid;place-items:center;width:34px;height:34px;border:1px solid var(--border,#e5e7eb);border-radius:9px;background:var(--surface,#fff);color:var(--text,#111827);font-size:18px}
.customer-action:hover{border-color:var(--primary,#6750ed);color:var(--primary,#6750ed)}
.customers-pagination{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;padding:14px 4px 0;color:var(--muted,#6b7280);font-size:12px}
.customers-page-controls{display:flex;align-items:center;gap:5px}
.customers-page-controls button{min-width:34px;height:34px;border:1px solid var(--border,#e5e7eb);border-radius:9px;background:var(--surface,#fff)}
.customers-page-controls button.active{background:var(--primary,#6750ed);border-color:var(--primary,#6750ed);color:#fff}
.customers-page-controls button:disabled{opacity:.45;cursor:not-allowed}
.customers-page-size{justify-self:end;display:flex;align-items:center;gap:8px}
.customers-page-size select{min-height:36px;width:76px}
.customers-empty-state{display:grid;place-items:center;text-align:center;gap:8px;min-height:250px;padding:32px;border:1px solid var(--border,#e5e7eb);border-radius:16px;background:var(--surface,#fff)}
.customers-empty-state h3,.customers-empty-state p{margin:0}
.customers-empty-state p{color:var(--muted,#6b7280)}
@media(max-width:980px){.customers-pagination{grid-template-columns:1fr auto}.customers-page-size{display:none}}

/* Stage 5: desktop customer detail panel */
@media (min-width:981px){
  .customers-content-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:18px;align-items:start}
  .customers-content-grid:has(.customer-details-panel:not(.hidden)){grid-template-columns:minmax(0,1fr) 310px}
  .customer-details-panel{position:sticky;top:96px;border:1px solid #e4e7ef;border-radius:18px;background:#fff;box-shadow:0 8px 24px rgba(27,31,67,.055);padding:20px;min-width:0;max-height:calc(100vh - 120px);overflow:auto}
  .customer-details-head{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:12px;align-items:center;padding-bottom:16px;border-bottom:1px solid #edf0f5}
  .customer-details-close{width:32px;height:32px;border:0;background:transparent;border-radius:9px;font-size:24px;line-height:1;color:#697086;cursor:pointer}
  .customer-details-avatar{width:48px;height:48px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,rgba(100,70,238,.14),rgba(93,180,255,.13));color:#6748ee;font-weight:800;font-size:20px}
  .customer-details-head h3{margin:0 0 4px;font-size:19px}
  .customer-details-status{font-size:11px;color:#239b63;background:#e9f8f0;border-radius:999px;padding:4px 8px;display:inline-flex}
  .customer-details-contact{display:grid;gap:2px;padding:14px 0;border-bottom:1px solid #edf0f5}
  .customer-details-contact>a,.customer-details-contact>div{display:flex;justify-content:space-between;gap:10px;padding:8px 0;text-decoration:none;color:inherit}
  .customer-details-contact span,.customer-details-notes>span{font-size:12px;color:#7a8195}
  .customer-details-contact strong{font-size:13px;text-align:left;overflow-wrap:anywhere}
  .customer-details-notes{padding:14px 0;border-bottom:1px solid #edf0f5}
  .customer-details-notes p{margin:7px 0 0;font-size:13px;line-height:1.55;color:#4f566b;white-space:pre-wrap}
  .customer-details-summary,.customer-details-latest{padding:15px 0;border-bottom:1px solid #edf0f5}
  .customer-details-summary h4,.customer-details-latest h4{font-size:15px;margin:0 0 12px}
  .customer-details-summary dl{display:grid;gap:9px;margin:0}
  .customer-details-summary dl>div{display:flex;justify-content:space-between;gap:12px}
  .customer-details-summary dt{font-size:12px;color:#7a8195}.customer-details-summary dd{font-size:13px;font-weight:750;margin:0}
  .customer-details-latest div{padding:11px;border-radius:12px;background:#f7f8fc;display:grid;gap:4px}.customer-details-latest strong{font-size:13px}.customer-details-latest small,.customer-details-latest p{font-size:12px;color:#7a8195;margin:0}
  .customer-details-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px;padding-top:16px}
  .customer-details-actions .primary{grid-column:1/-1}
  .customer-details-actions button{min-height:40px;padding:9px 10px}
  .customer-details-loading{min-height:300px;display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;text-align:center}.customer-details-loading strong{flex-basis:100%;font-size:13px}.customer-details-loading span{width:7px;height:7px;border-radius:50%;background:#7657f3;animation:customer-detail-pulse 1s infinite alternate}.customer-details-loading span:nth-child(2){animation-delay:.15s}.customer-details-loading span:nth-child(3){animation-delay:.3s}
  .customer-details-error{text-align:center;padding:40px 10px}.customer-details-error h3{font-size:17px}.customer-details-error p{color:#7a8195;font-size:13px}
  .customer-table-row.is-selected{background:rgba(103,72,238,.055)}.customer-table-row.is-selected td:first-child{box-shadow:inset -3px 0 #7657f3}
  html[data-theme="dark"] .customer-details-panel,body.dark .customer-details-panel{background:#171925;border-color:#2b2f40}
  html[data-theme="dark"] .customer-details-head,html[data-theme="dark"] .customer-details-contact,html[data-theme="dark"] .customer-details-notes,html[data-theme="dark"] .customer-details-summary,html[data-theme="dark"] .customer-details-latest,body.dark .customer-details-head,body.dark .customer-details-contact,body.dark .customer-details-notes,body.dark .customer-details-summary,body.dark .customer-details-latest{border-color:#292d3c}
  html[data-theme="dark"] .customer-details-latest div,body.dark .customer-details-latest div{background:#202331}
}
@keyframes customer-detail-pulse{to{opacity:.35;transform:translateY(-3px)}}

/* Stage 6: desktop system states, accessibility and production hardening */
.customers-list-shell[aria-busy="true"]{cursor:progress}
.customer-skeleton-row{pointer-events:none}
.customer-skeleton-row td{height:70px}
.customer-skeleton-block,.customer-skeleton-line{display:block;border-radius:8px;background:linear-gradient(90deg,rgba(120,126,150,.10),rgba(120,126,150,.20),rgba(120,126,150,.10));background-size:220% 100%;animation:customer-skeleton 1.25s ease-in-out infinite}
.customer-skeleton-block{width:72px;height:13px}.customer-skeleton-block.wide{width:150px;height:16px}.customer-skeleton-line{width:105px;height:9px;margin-top:8px}
.customers-system-state{display:grid;place-items:center;text-align:center;gap:10px;min-height:270px;padding:36px;border:1px solid var(--border,#e5e7eb);border-radius:16px;background:var(--surface,#fff)}
.customers-system-state h3,.customers-system-state p{margin:0}.customers-system-state p{max-width:430px;color:var(--muted,#6b7280);line-height:1.55}
.customers-state-icon{display:grid;place-items:center;width:52px;height:52px;border-radius:15px;background:rgba(220,38,38,.09);color:#c62828;font-size:24px;font-weight:850}
.customers-error-state .primary{margin-top:6px}
.customer-sort-button{min-height:34px;border-radius:8px}
.customer-sort-button:focus-visible,.customer-action:focus-visible,.customers-page-controls button:focus-visible,.customer-details-close:focus-visible{outline:3px solid color-mix(in srgb,var(--primary,#6750ed) 30%,transparent);outline-offset:2px}
#customerForm[aria-busy="true"]{opacity:.82;pointer-events:none}
#customerForm input[aria-invalid="true"],#customerForm textarea[aria-invalid="true"]{border-color:#d14343;box-shadow:0 0 0 3px rgba(209,67,67,.12)}
#customerFormError:not(:empty){display:block;margin:2px 0 0;padding:10px 12px;border:1px solid rgba(209,67,67,.28);border-radius:10px;background:rgba(209,67,67,.07);color:#b42318;font-size:12px;line-height:1.45}
html[data-theme="dark"] .customers-table-region,html[data-theme="dark"] .customers-system-state,body.dark .customers-table-region,body.dark .customers-system-state{background:var(--surface,#171925);border-color:var(--border,#2b2f40)}
html[data-theme="dark"] .customers-table th,body.dark .customers-table th{background:#202331;color:#aeb5c8}
html[data-theme="dark"] .customers-table td,body.dark .customers-table td{border-color:#292d3c}
html[data-theme="dark"] .customer-action,html[data-theme="dark"] .customers-page-controls button,body.dark .customer-action,body.dark .customers-page-controls button{background:#1b1e2b;border-color:#303547;color:#f2f4f8}
html[data-theme="dark"] #customerFormError:not(:empty),body.dark #customerFormError:not(:empty){background:rgba(239,68,68,.09);border-color:rgba(239,68,68,.25);color:#fca5a5}
@keyframes customer-skeleton{to{background-position:-220% 0}}
@media (prefers-reduced-motion:reduce){.customer-skeleton-block,.customer-skeleton-line,.customer-details-loading span{animation:none!important}.customer-table-row,.customer-action{transition:none!important}}

/* Stage 7: complete responsive customers workspace */
@media (max-width:980px){
  .customers-page{padding-bottom:28px}
  .customers-page .customers-header{margin-bottom:14px}
  .customers-header-copy{max-width:none}
  .customers-header-copy h2{font-size:clamp(28px,8vw,38px)}
  .customers-header-copy p{font-size:13px;line-height:1.55}

  .customers-overview{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:14px}
  .customers-action-card{grid-template-columns:48px minmax(0,1fr);grid-template-areas:"icon copy" "button button";padding:16px;gap:12px}
  .customers-action-icon{width:48px;height:48px;border-radius:13px}
  .customers-action-copy strong{font-size:17px}
  .customers-action-card .primary{min-height:46px}
  .customers-summary-metrics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
  .customers-kpi-card{min-height:116px;padding:14px 12px}
  .customers-kpi-card>span{font-size:11px;line-height:1.35}
  .customers-kpi-card>strong{font-size:25px;margin-top:7px}
  .customers-kpi-card>small{font-size:10px;max-width:100%;padding-inline-end:30px;margin-top:7px}
  .customers-kpi-card>i{width:32px;height:32px;border-radius:10px;inset-inline-end:10px;inset-block-end:10px}
  .customers-kpi-card>i svg{width:18px;height:18px}

  .customers-toolbar{display:grid;grid-template-columns:1fr 1fr;align-items:end;gap:10px;padding:12px;margin-bottom:14px}
  .customers-search-field{grid-column:1/-1;display:grid;gap:6px}
  .customers-filter-field{display:grid;gap:6px;min-width:0}
  .customers-control-label{font-size:11px;font-weight:700;color:var(--muted,#6b7280)}
  .customers-search-control{position:relative;display:block}
  .customers-search-control input{width:100%;min-height:44px;padding-inline-start:42px}
  .customers-search-control svg{position:absolute;inset-inline-start:14px;top:50%;width:18px;height:18px;transform:translateY(-50%);fill:none;stroke:currentColor;stroke-width:1.8;color:var(--muted,#7b8191);pointer-events:none}
  .customers-filter-field select{width:100%;min-width:0;min-height:44px}
  .customers-toolbar-actions{grid-column:1/-1;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .customers-toolbar-actions button{min-height:44px;justify-content:center}
  .customers-reset-btn.hidden{display:none!important}
  .customers-toolbar-actions:has(.customers-reset-btn.hidden) .customers-export-btn{grid-column:1/-1}
  .customers-toolbar-meta{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:11px;color:var(--muted,#6b7280)}
  .customers-toolbar-meta #customersActiveFilters{padding:4px 8px;border-radius:999px;background:rgba(103,72,238,.08);color:var(--primary,#6748ee);font-weight:700}

  .customers-content-grid{display:block}
  .customers-table-region{overflow:visible;border:0;background:transparent}
  .customers-table{display:block;min-width:0;width:100%}
  .customers-table thead{display:none}
  .customers-table tbody{display:grid;gap:10px}
  .customers-table tr.customer-table-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:10px 12px;padding:14px;border:1px solid var(--border,#e5e7eb);border-radius:15px;background:var(--surface,#fff);box-shadow:0 4px 14px rgba(27,31,67,.04)}
  .customers-table tr.customer-table-row:hover{background:var(--surface,#fff)}
  .customers-table td{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0;border:0;min-width:0;font-size:12px}
  .customers-table td::before{content:attr(data-label);font-size:11px;font-weight:700;color:var(--muted,#6b7280);flex:0 0 auto}
  .customers-table td:first-child{grid-column:1/-1;display:block;padding-bottom:11px;border-bottom:1px solid var(--border,#edf0f5)}
  .customers-table td:first-child::before,.customers-table td:last-child::before{display:none}
  .customers-table td:nth-child(2),.customers-table td:nth-child(3){grid-column:1/-1}
  .customers-table td:nth-child(4),.customers-table td:nth-child(5),.customers-table td:nth-child(6){grid-column:1/-1}
  .customers-table td:last-child{grid-column:1/-1;justify-content:flex-end;padding-top:4px}
  .customer-identity{min-width:0;width:100%}
  .customer-identity>i{width:42px;height:42px;border-radius:13px;flex:0 0 auto}
  .customer-identity strong{font-size:15px}
  .customer-identity small{max-width:100%;font-size:11px}
  .customers-table a,.customers-table td>strong,.customers-table time{min-width:0;overflow-wrap:anywhere;text-align:left}
  .customer-row-actions{width:100%;display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .customer-action{width:100%;height:42px;border-radius:10px;font-size:18px}
  .customer-table-row.is-selected{box-shadow:0 0 0 2px rgba(103,72,238,.22)}
  .customer-table-row.is-selected td:first-child{box-shadow:none}

  .customers-pagination{display:grid;grid-template-columns:1fr;gap:10px;padding:12px 0 0;text-align:center}
  .customers-page-controls{justify-content:center;flex-wrap:wrap}
  .customers-page-controls button{min-width:40px;height:40px}
  .customers-page-size{display:flex;justify-self:center}
  .customers-page-size select{min-height:40px}

  .customers-empty-state,.customers-system-state{min-height:220px;padding:26px 18px}
  .customer-skeleton-row{display:block!important;padding:14px!important}
  .customer-skeleton-row td{display:block!important;height:auto!important;margin:8px 0}

  .customer-details-panel{position:fixed;inset:0;z-index:80;border:0;border-radius:0;background:var(--surface,#fff);padding:calc(18px + env(safe-area-inset-top)) 18px calc(18px + env(safe-area-inset-bottom));max-height:none;overflow:auto;box-shadow:none}
  .customer-details-panel.hidden{display:none!important}
  .customer-details-head{display:grid;grid-template-columns:auto auto minmax(0,1fr);gap:12px;align-items:center;padding-bottom:16px;border-bottom:1px solid var(--border,#edf0f5)}
  .customer-details-close{width:44px;height:44px;border:1px solid var(--border,#e5e7eb);background:var(--surface,#fff);border-radius:12px;font-size:26px;color:var(--muted,#697086)}
  .customer-details-avatar{width:50px;height:50px;border-radius:15px;display:grid;place-items:center;background:linear-gradient(135deg,rgba(100,70,238,.14),rgba(93,180,255,.13));color:var(--primary,#6748ee);font-weight:800;font-size:20px}
  .customer-details-head h3{margin:0 0 4px;font-size:19px}
  .customer-details-status{font-size:11px;color:#239b63;background:#e9f8f0;border-radius:999px;padding:4px 8px;display:inline-flex}
  .customer-details-contact{display:grid;gap:2px;padding:14px 0;border-bottom:1px solid var(--border,#edf0f5)}
  .customer-details-contact>a,.customer-details-contact>div{display:flex;justify-content:space-between;gap:12px;padding:10px 0;text-decoration:none;color:inherit}
  .customer-details-contact span,.customer-details-notes>span{font-size:12px;color:var(--muted,#7a8195)}
  .customer-details-contact strong{font-size:13px;text-align:left;overflow-wrap:anywhere}
  .customer-details-notes,.customer-details-summary,.customer-details-latest{padding:16px 0;border-bottom:1px solid var(--border,#edf0f5)}
  .customer-details-notes p{margin:7px 0 0;font-size:13px;line-height:1.55;white-space:pre-wrap}
  .customer-details-summary h4,.customer-details-latest h4{font-size:15px;margin:0 0 12px}
  .customer-details-summary dl{display:grid;gap:10px;margin:0}
  .customer-details-summary dl>div{display:flex;justify-content:space-between;gap:12px}
  .customer-details-summary dt{font-size:12px;color:var(--muted,#7a8195)}
  .customer-details-summary dd{font-size:13px;font-weight:750;margin:0}
  .customer-details-latest div{padding:12px;border-radius:12px;background:color-mix(in srgb,var(--surface,#fff) 94%,var(--primary,#6750ed) 6%);display:grid;gap:4px}
  .customer-details-actions{position:sticky;bottom:calc(-18px - env(safe-area-inset-bottom));display:grid;grid-template-columns:1fr 1fr;gap:8px;margin:18px -18px calc(-18px - env(safe-area-inset-bottom));padding:12px 18px calc(12px + env(safe-area-inset-bottom));background:color-mix(in srgb,var(--surface,#fff) 92%,transparent);backdrop-filter:blur(12px);border-top:1px solid var(--border,#e5e7eb)}
  .customer-details-actions .primary{grid-column:1/-1}
  .customer-details-actions button{min-height:46px}
  .customer-details-loading{min-height:55vh}
  body:has(.customer-details-panel:not(.hidden)){overflow:hidden}
}

@media (max-width:560px){
  .customers-summary-metrics{grid-template-columns:1fr}
  .customers-kpi-card{min-height:104px}
  .customers-kpi-card>small{padding-inline-end:42px}
  .customers-toolbar{grid-template-columns:1fr}
  .customers-search-field,.customers-toolbar-actions,.customers-toolbar-meta{grid-column:1}
  .customers-toolbar-actions{grid-template-columns:1fr}
  .customers-toolbar-actions:has(.customers-reset-btn:not(.hidden)){grid-template-columns:1fr 1fr}
  .customers-toolbar-actions:has(.customers-reset-btn.hidden) .customers-export-btn{grid-column:1}
}

html[data-theme="dark"] .customer-details-panel,body.dark .customer-details-panel{background:var(--surface,#171925)}
html[data-theme="dark"] .customer-details-close,body.dark .customer-details-close{background:#1b1e2b;border-color:#303547;color:#f2f4f8}

@media (max-width:980px){
  .customers-export-btn{display:inline-flex!important;align-items:center!important;justify-content:center!important;gap:8px!important;height:44px!important;min-height:44px!important;max-height:44px!important;padding:9px 14px!important;overflow:hidden}
  .customers-export-btn svg{display:block!important;width:18px!important;height:18px!important;min-width:18px!important;max-width:18px!important;min-height:18px!important;max-height:18px!important;fill:none!important;stroke:currentColor!important;stroke-width:1.8!important;flex:0 0 18px!important}
}
