/* Customer policy pages share the existing visual language and have no editing controls. */
.customer-shell-main [hidden],#appointment-dialog [hidden] { display:none !important; }
.customer-shell-main { display:block; width:100%; max-width:none; margin:0; padding:var(--page-block-padding) var(--page-gutter) 36px; }
.cp-module-bar { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:20px; }
.cp-module-bar>strong { color:#235fc1; font-size:18px; }
.cp-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; min-height:180px; padding:30px 18px; color:#6d7b90; }
.cp-empty strong { font-size:16px; color:#34445c; }
.cp-empty p { line-height:1.7; margin:10px 0 0; }
/* Preserve native disclosure behavior while using the shared date-filter components. */
.cp-date-filter>summary { list-style:none; cursor:pointer; }
.cp-date-filter>summary::-webkit-details-marker { display:none; }
.cp-amount { font:inherit; color:inherit; font-variant-numeric:tabular-nums; white-space:nowrap; }
.cp-amount>.cp-currency,.cp-amount>.cp-amount-value { font:inherit; color:inherit; }
.cp-amount>.cp-amount-value { display:inline-block; white-space:nowrap; }
/* Reuse the business detail grid, headings, statistics and tabs at full page width. */
.customer-shell-main .detail-title { flex-wrap:wrap; }
.customer-shell-main .detail-heading>div { min-width:0; }
.customer-shell-main .detail-stats { margin-top:0; }
.customer-shell-main .detail-stat .cp-amount,.customer-shell-main .summary-premium-metrics .cp-amount { white-space:normal; overflow-wrap:normal; }
.customer-shell-main .detail-tabs { overflow-x:auto; }
.customer-shell-main .detail-tabs .tab { flex-shrink:0; white-space:nowrap; }
.customer-shell-main .detail-content>.side-stack { min-width:0; }
.customer-shell-main .side-card .timeline-time { white-space:normal; }
.customer-shell-main .cp-detail-attachments .attachment-row { flex-wrap:wrap; gap:12px; }
.customer-shell-main .cp-detail-attachments .attachment-row>div:first-child { flex:1 1 100%; }
.customer-shell-main .side-card .cp-empty { min-height:100px; padding:20px 8px; }
@media (max-width:600px) {
  .customer-shell-main .summary-premium-metrics { column-gap:16px; }
  .customer-shell-main .detail-stats { row-gap:0; }
  .customer-shell-main .detail-stat:first-child { grid-column:1 / -1; border-right:0; border-bottom:1px solid var(--line); }
  .customer-shell-main .detail-stat:nth-child(2) { border-right:1px solid var(--line); }
  .customer-shell-main .detail-stat.standard-premium { grid-column:auto; border-top:0; padding-top:17px; }
}
.cp-detail-section { padding:26px 30px; margin-bottom:18px; }
.cp-detail-section h2 { font-size:17px; margin:28px 0 18px; }
.cp-detail-section h2:first-child { margin-top:0; }
.cp-detail-section h3 { font-size:15px; margin:24px 0 18px; }
.cp-detail-section .field-grid { grid-template-columns:repeat(3,minmax(0,1fr)); gap:22px 28px; }
.cp-detail-section .field-row { min-width:0; }
.field-row dd { overflow-wrap:anywhere; }
.cp-detail-section .field-row dd { line-height:1.65; }
.cp-detail-section .resource-item { margin-bottom:16px; padding:22px; }
.cp-detail-section .resource-item header { display:flex; gap:12px; justify-content:space-between; flex-wrap:wrap; margin-bottom:20px; }
.cp-preline { white-space:pre-wrap; overflow-wrap:anywhere; line-height:1.8; }
/* Customer screens reuse the shared summary, attachment and record components. */
.customer-shell-main .cp-open-detail { margin-top:18px; }
.customer-shell-main .attachment-row>div:first-child { min-width:0; }
.customer-shell-main .attachment-name>.icon { flex-shrink:0; }
.customer-shell-main .attachment-name>span { min-width:0; overflow-wrap:anywhere; }
/* Payment previews and records use the shared business payment components. */
.cp-payment-unconfirmed { margin-top:8px; font-size:12px; }
.cp-payment-preview>div { min-width:0; }
.cp-payment-preview .cp-amount { white-space:normal; }
.cp-payment-records .resource-item header>div { min-width:0; }
.cp-payment-records .file-chip { max-width:100%; }
.cp-payment-records .file-chip>.icon { flex-shrink:0; }
.cp-payment-records .file-chip>span { min-width:0; overflow-wrap:anywhere; }
.cp-payment-records .metadata { margin-bottom:0; }

.customer-shell-main .summary-body { max-height:none; }
/* Keep the customer submission state within the shared dialog and form layout. */
#appointment-form { display:flex; flex-direction:column; max-height:92dvh; }
#appointment-dialog .dialog-header,#appointment-dialog .dialog-footer { flex-shrink:0; }
#appointment-dialog .dialog-body { min-height:0; overflow:auto; }
#appointment-dialog .form-field { min-width:0; }
#appointment-dialog .form-field label { margin-bottom:0; }
#appointment-dialog input:not([type=checkbox]),#appointment-dialog select,#appointment-dialog textarea { min-width:0; box-sizing:border-box; }
#appointment-dialog .policy-name-control input[hidden] { display:none; }
.cp-appointment-footer { display:flex; flex-direction:column; align-items:stretch; }
.cp-appointment-footer .actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:10px; }
#appointment-result:not(:empty) { color:var(--text); font-size:14px; line-height:1.65; padding:0 0 14px; }
.customer-shell-main button:focus:not(:focus-visible) { outline:none; }
.customer-shell-main button:focus-visible,#appointment-dialog button:focus-visible { outline:2px solid #3979df; outline-offset:3px; }
@media (max-width:1100px) { .customer-shell-main .list-layout { grid-template-columns:minmax(0,1fr); } .customer-shell-main .summary { position:static; } .customer-shell-main .summary-body { display:block; } .cp-detail-section .field-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:760px) {
  .customer-shell-main { padding:var(--page-block-padding) var(--page-gutter) 28px; }
  .cp-detail-section { padding:22px 18px; }
  .cp-detail-section .field-grid { gap:20px 14px; }
  .cp-detail-section .resource-item { padding:14px; }
  .attachment-row { align-items:flex-start; flex-wrap:wrap; gap:12px; }
  #appointment-form { max-height:94dvh; }
}
@media (max-width:400px) { .cp-detail-section .field-grid { grid-template-columns:minmax(0,1fr); }  }

/* Keep refresh in the shared account row on every authenticated customer page. */
.topbar .customer-page-refresh { flex-shrink:0; white-space:nowrap; }
@media (max-width:480px) {
  .topbar .user-block { display:grid; grid-template-columns:44px 44px; grid-template-areas:"refresh account" "date date"; column-gap:8px; row-gap:0; }
  .topbar .customer-page-refresh { grid-area:refresh; width:44px; min-height:44px; padding:8px; }
  .topbar .customer-page-refresh span { display:none; }
  .topbar .account-menu-wrap { grid-area:account; }
  .topbar .topbar-date { grid-area:date; justify-self:center; font-size:10px; line-height:16px; }
}

/* A scope card precedes the six status cards only for accounts with shared access. */
.customer-shell-main .stats.cp-stats-with-mine { grid-template-columns:repeat(7,minmax(0,1fr)); }
@media(max-width:1250px) and (min-width:1101px), (max-width:760px) {
  .customer-shell-main .stats.cp-stats-with-mine { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .customer-shell-main .cp-stats-with-mine .stat:first-child { grid-column:1 / -1; border-right:0; border-bottom:1px solid var(--line); min-height:72px; }
  .customer-shell-main .cp-stats-with-mine .stat:nth-child(-n+4) { border-bottom:1px solid var(--line); }
  .customer-shell-main .cp-stats-with-mine .stat:nth-child(3) { border-right:1px solid var(--line); }
  .customer-shell-main .cp-stats-with-mine .stat:nth-child(4),.customer-shell-main .cp-stats-with-mine .stat:last-child { border-right:0; }
}

/* Appointment recognition follows the existing form spacing without narrowing the dialog. */
#appointment-dialog .cp-appointment-importer>.field-help { margin:12px 0 18px; }
#appointment-dialog .policy-import-actions { margin:14px 0 18px; }
#appointment-dialog .policy-template-actions { display:flex; flex-wrap:wrap; gap:10px; }
#appointment-dialog .table-dropzone { margin-top:16px; }
#appointment-dialog .table-dropzone input[type=file] { height:auto; min-height:44px; padding:10px; }
#appointment-dialog .import-file { margin-top:16px; }
#appointment-dialog .import-file-heading { flex-wrap:wrap; }
#appointment-dialog .import-file-heading strong { overflow-wrap:anywhere; }
#appointment-dialog .import-file label { display:block; margin:14px 0 8px; }
#appointment-dialog .import-warnings { margin-top:12px; }
#appointment-dialog .import-warnings summary { cursor:pointer; }
#appointment-dialog .import-warnings ul { padding-left:22px; line-height:1.7; }
@media(max-width:760px) { #appointment-dialog .policy-import-actions { align-items:stretch; } #appointment-dialog .policy-import-actions>.btn { flex:1; } #appointment-dialog .policy-template-actions { width:100%; } #appointment-dialog .policy-template-actions>.btn { flex:1; text-align:center; } }
#appointment-dialog #appointment-title:focus { outline:none; }
