/* Billing and document extensions inherit the approved portal shell. */
.customer-records { margin: 20px 0 30px; min-width: 0; }
.customer-records-tabs { display: flex; gap: 28px; border-bottom: 1px solid var(--border); }
.customer-records-tab { color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 14px 2px; min-height: 48px; cursor: pointer; font: 600 14px var(--font); }
.customer-records-tab:hover { color: var(--ink); }
.customer-records-tab[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--accent-ink); }
.customer-records-panel { padding: 24px 0 0; min-width: 0; }
.customer-records-panel:empty { min-height: 160px; }
#panel-documents { min-width: 0; }
.billing-setup-banner { display:flex; align-items:center; justify-content:space-between; gap:24px; margin-bottom:28px; padding:20px 22px; border:1px solid var(--border-strong); border-radius:10px; background:var(--surface-muted,#eef5f2); color:var(--ink); }
.billing-setup-banner[hidden] { display:none; }
.billing-setup-banner h2 { margin:0 0 6px; font:650 20px/1.3 var(--font-display); letter-spacing:-.025em; }
.billing-setup-banner p { margin:0; max-width:70ch; color:var(--ink-2); font-size:14px; line-height:1.6; }
.billing-setup-banner p + p { margin-top:6px; }
.billing-setup-banner .btn { flex-shrink:0; }
@media (max-width: 600px) {
  .billing-setup-banner { align-items:stretch; flex-direction:column; gap:16px; padding:18px; }
  .customer-records-tabs { gap: 24px; }
  .customer-records-panel { padding-top: 20px; }
}

/* The customer detail is a workspace, not a stack of every admin control. */
.customer-summary { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:24px 0 10px; }
.customer-summary-identity { min-width:0; }
.customer-summary-eyebrow { margin:0 0 8px; color:var(--muted); font-size:12px; font-weight:650; letter-spacing:.04em; text-transform:uppercase; }
.customer-summary-title { margin:0; font:650 clamp(28px,3vw,38px)/1.15 var(--font-display); letter-spacing:-.035em; overflow-wrap:anywhere; }
.customer-summary-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px 18px; margin-top:14px; color:var(--muted); font-size:13px; }
.customer-link-status { display:inline-flex; align-items:center; gap:7px; color:var(--ink-2); }
.customer-link-status::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--accent-ink); }
.customer-link-status.is-warning::before { background:#b77a35; }
.customer-summary > .btn { flex-shrink:0; min-height:44px; }
.customer-workspace { min-width:0; }
.customer-workspace .customer-records { margin-top:22px; }
.customer-records-tabs { overflow-x:auto; scrollbar-width:thin; gap:28px; padding-inline:2px; }
.customer-records-tab { flex-shrink:0; white-space:nowrap; }
.customer-records-tab:focus-visible { outline-offset:-4px; }
.customer-records-panel[hidden] { display:none; }
.customer-records-panel:focus-visible { outline:2px solid var(--accent-ink); outline-offset:4px; }
.customer-overview-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:24px; align-items:start; }
.customer-overview-grid > .card { margin:0; min-width:0; }
.customer-feature-list { list-style:none; margin:0; padding:0; }
.customer-feature-list li { display:flex; justify-content:space-between; align-items:center; gap:20px; padding:10px 0; border-bottom:1px solid var(--border); font-size:14px; }
.customer-feature-on { color:var(--accent-ink); font-weight:650; }
.customer-feature-off { color:var(--muted); }
.customer-routing-summary { display:flex; flex-direction:column; gap:6px; margin-top:22px; font-size:14px; }
.customer-more-activity summary, .customer-advanced > summary { cursor:pointer; min-height:48px; padding:15px 0; font-weight:600; color:var(--ink); }
.customer-more-activity { margin-top:12px; }
.customer-advanced { margin-top:26px; border-top:1px solid var(--border); }
.customer-advanced > summary span { display:block; margin:6px 0 0 17px; font-size:13px; font-weight:400; color:var(--muted); }
.customer-advanced-content { padding-top:10px; }
.customer-advanced-content .detail-head { background:none; min-height:0; padding:0; margin:0 0 14px; border:0; box-shadow:none; }
@media (max-width:800px) {
  .customer-overview-grid { grid-template-columns:minmax(0,1fr); gap:20px; }
}
@media (max-width:600px) {
  .customer-summary { align-items:flex-start; flex-direction:column; gap:20px; padding-top:20px; }
  .customer-summary-meta { gap:8px 14px; }
  .customer-records-tabs { gap:24px; }
}

#panel-customers.customer-detail-open > .page-head { display:none; }
.customer-overview-grid > .card { padding-top:0; border-top:0; }
.customer-link-status:not(.is-warning)::before { background:#31715a; }

/* Keep operational details available without filling customer cards with warnings. */
.customer-tile { position:relative; }
.customer-tile-open { appearance:none; display:flex; flex-direction:column; align-items:flex-start; gap:inherit; width:100%; padding:0; border:0; background:none; text-align:left; color:inherit; font:inherit; cursor:pointer; }
.customer-tile-open::after { content:''; position:absolute; inset:0; border-radius:var(--radius-lg); }
.customer-tile-open:focus-visible { outline:none; }
.customer-tile-open:focus-visible::after { outline:2px solid var(--accent-ink); outline-offset:3px; }
.customer-tile-alerts { position:relative; z-index:1; cursor:auto; }
.customer-tile-alerts > summary { display:flex; align-items:center; gap:7px; width:fit-content; min-height:44px; padding:0 9px; margin:-8px 0 -8px -9px; border-radius:6px; color:var(--ink-2); font:600 13px/1.4 var(--font); list-style:none; cursor:pointer; }
.customer-tile-alerts > summary::-webkit-details-marker { display:none; }
.customer-tile-alerts > summary::marker { content:''; }
.customer-tile-alerts > summary:hover, .customer-tile-alerts[open] > summary { background:var(--surface-muted,#eef5f2); }
.customer-tile-alerts > summary:focus-visible { outline:2px solid var(--accent-ink); outline-offset:1px; }
.customer-tile-alerts svg { width:16px; height:16px; flex-shrink:0; color:#91602d; }
.customer-tile-alerts ul { margin:14px 0 2px; padding:0 0 0 18px; color:var(--ink-2); font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.customer-tile-alerts li + li { margin-top:8px; }
