/* Shared appointment palette; the top-level brand retains its own colors. */
:root:has(.appointment-theme){background:#f1f6fc}
.appointment-theme,.payment-dialog,:root:has(.appointment-theme) :is(.customer-dialog,.customer-create-popup){
  --ink:#193955;--muted:#5c728a;--green:#176bb5;--green-hover:#10558f;
  --wash:#ecf5ff;--paper:#f1f6fc;--line:#d9e5f2;--white:#fff;color:var(--ink)
}
.appointment-theme:is(dialog),.payment-dialog{background:var(--paper);border-color:var(--line);box-shadow:0 24px 80px #19395526}
.appointment-theme::backdrop,.payment-dialog::backdrop{background:#1939555c}
.appointment-theme .customer-form-card{border-color:var(--line);background:var(--white)}
.appointment-theme :is(.appointment-selected,.appointment-repeat-summary){background:var(--wash);border-color:#c3dcf8}
.appointment-theme .appointment-section-title>span{background:var(--wash);color:var(--green)}
.appointment-theme .appointment-slot:disabled{background:#f3f6fb;color:#8191a4}
.appointment-theme .appointment-loading-backdrop{background:linear-gradient(135deg,#edf5ff99,#f1f6fcb3)}
.appointment-theme .appointment-customer-results{background:#fff6d7;border-color:#ead38f}
.appointment-theme .appointment-customer-choice{background:#fffbeb;border-color:#eadba9;color:#805700}
.appointment-theme .appointment-customer-choice span{color:#7b6a42}
.appointment-theme .appointment-customer-choice:is(:hover,:focus-visible){background:#fff0b5}
.appointment-theme .appointment-customer-choice:focus-visible{outline:2px solid #b78d28;outline-offset:-2px}
.appointment-theme .appointment-customer-recent{background:#fff6d7;border-color:#ead38f}
.appointment-theme .appointment-customer-recent-list,.appointment-theme .appointment-customer-recent-list>li+li{border-color:#eadba9}
.appointment-theme .appointment-customer-recent-list>li{background:#fffbeb}
.appointment-theme .appointment-customer-recent-list>li.is-cancelled{background:#fff5df}
.appointment-theme .appointment-customer-recent>h3,.appointment-theme .appointment-customer-recent-main>strong{color:#805700}
.appointment-theme .appointment-customer-recent-main>span{color:#7b6a42}
.appointment-theme .appointment-customer-recent .appointment-repeat{background:#fff0b5;border-color:#d5b45c;color:#805700}
.appointment-theme .appointment-customer-recent .appointment-repeat:hover:not(:disabled){background:#ffe79a;border-color:#b78d28}
.appointment-theme .appointment-badge.status-active{background:#fff0f6;color:#b72e68}
.appointment-theme .appointment-badge.status-cancelled{background:#e5ebf4;color:#5c728a}
.appointment-theme .appointment-signals>.awaiting-confirmation{background:#fff0f6;border-color:#f3b4cd;color:#b72e68}
.appointment-theme .customer-avatar{background:#e6f1ff;color:var(--green)}
.appointment-theme .customer-credit-balance{background:var(--wash);border-color:#c3dcf8;color:var(--green)}
#app:has(.appointment-theme) .workspace-menu{border-color:#dce7f4}
#app:has(.appointment-theme) .workspace-nav a[aria-current=page]{background:#e7f2ff;border-color:#bdd9f8;color:#1268b7}
#app:has(.appointment-theme) .tag{background:#edf6ff;border-color:#d5e7f9;color:#225e91}
.payment-dialog .payment-layout{background:var(--paper)}
.payment-dialog .payment-service{border-color:var(--line)}
.payment-dialog .payment-service:hover,.payment-dialog .payment-service.is-selected{background:var(--wash);border-color:#8bbcea}
.payment-dialog .payment-addon-group{border-color:var(--line)}
.payment-dialog .payment-quick-method{background:var(--wash);border-color:#c3dcf8}
.payment-dialog .payment-quick-method:hover:not(:disabled){background:#dfefff;border-color:var(--green)}
.appointment-theme :is(.calendar-grid,.calendar-axis,.calendar-axis span){background:var(--white)}
.appointment-theme :is(.calendar-corner,.calendar-column-heading,.calendar-empty,.calendar-agenda-empty,.calendar-week-strip button){background:var(--paper)}
.appointment-theme .calendar-column-heading.is-today{background:var(--wash)}
.appointment-theme .calendar-switch{background:var(--wash)}
.appointment-theme .calendar-switch button[aria-pressed=true]{background:var(--green)}
.appointment-theme .calendar-week-strip button[aria-pressed=true]{background:var(--green);color:white}
.appointment-theme .calendar-column{background:repeating-linear-gradient(to bottom,transparent 0,transparent 47px,#edf3fb 47px,#edf3fb 48px,transparent 48px,transparent 95px,#d9e5f2 95px,#d9e5f2 96px)}
.appointment-theme .calendar-off{background:repeating-linear-gradient(135deg,#edf1f880 0,#edf1f880 4px,#d9e5f280 4px,#d9e5f280 5px)}
.appointment-theme .calendar-active{--event-accent:#e84e8b;--event-bg:#fff4f8;--event-text:#a63162}
.appointment-theme .calendar-completed{--event-accent:#22a66b;--event-bg:#edfbf3;--event-text:#22634a}
.appointment-theme .calendar-cancelled{--event-accent:#9baac0;--event-bg:#f3f6fb;--event-text:#5c728a}

/* The customer card opens as a summary. Editing is a separate, reversible view. */
.customer-detail-overview{display:grid;gap:18px;min-width:0}
.customer-detail-overview[hidden],#customer-edit-panel[hidden]{display:none}
.customer-summary-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.customer-summary-identity{display:flex;align-items:center;gap:12px;min-width:0}
.customer-summary-identity>div{min-width:0}
.customer-summary-identity h2{margin:0 0 5px;font:600 21px/1.35 system-ui;overflow-wrap:anywhere}
.customer-summary-phone{color:var(--muted);font-size:14px;text-decoration:none;display:inline-flex;align-items:center;min-height:28px}
.customer-summary-phone:hover{text-decoration:underline;color:var(--green)}
.customer-summary-actions{display:flex;flex-wrap:wrap;gap:8px;flex-shrink:0}
.customer-summary-actions .btn{min-height:44px;font-size:13px;padding:10px 14px}
.customer-summary-facts{display:flex;flex-wrap:wrap;gap:12px 36px;margin:18px 0 0;padding-top:14px;border-top:1px solid var(--line)}
.customer-summary-facts>div{min-width:0}
.customer-summary-facts dt{font-size:11px;color:var(--muted);margin-bottom:5px}
.customer-summary-facts dd{margin:0;font-size:13px;overflow-wrap:anywhere}
.customer-summary-facts dd>span:not(.customer-summary-rating){display:block;margin-top:4px;color:var(--muted);font-size:12px}
.customer-summary-rating{color:#886014;white-space:nowrap}.customer-summary-rating>span{letter-spacing:1px}
.customer-summary-flags{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}
.customer-summary-flags>span{padding:4px 8px;background:var(--wash);border:1px solid var(--line);border-radius:6px;font-size:11px;font-weight:600}
.customer-summary-flags>.customer-banned{background:#fff0ed;border-color:#e4b4aa}
.customer-summary-notes{margin-top:14px;padding:10px 12px;background:var(--paper);border-radius:8px;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
.customer-summary-notes p{margin:3px 0 0;white-space:pre-wrap}
.customer-summary-bookings{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start}
.customer-summary-bookings>.customer-history{min-width:0;margin:0}
.customer-summary-bookings .customer-history-heading h2{font:600 19px/1.4 system-ui}
.customer-summary-bookings .customer-history-total{font-size:11px;padding:4px 8px}
.customer-summary-bookings .customer-history-table tbody{background:#fff5f9}
.customer-summary-bookings .customer-history:has(#customer-history-cancelled) .customer-history-table tbody{background:#f3f6fb}
.customer-summary-bookings .customer-history-table td:first-child{padding-left:8px}
.customer-summary-bookings .customer-history-table td:last-child{padding-right:8px}
.customer-summary-bookings .customer-history-cancellation td{padding:0 8px 8px}
.customer-summary-bookings .customer-history-status.status-active{background:#ffe6f0;color:#b72e68}
.customer-summary-bookings .customer-history-status.status-cancelled{background:#e5ebf4;color:#5c728a}
.customer-summary-bookings .customer-cancellation-history>li.is-cancelled{background:#eaf0f8;color:#5c728a}
.customer-summary-more{min-width:0;border:1px solid var(--line);border-radius:14px;background:var(--white)}
.customer-summary-more>summary{padding:14px 18px;min-height:48px;color:var(--green);font-size:14px;font-weight:600;cursor:pointer}
.customer-summary-more>.customer-form-card,.customer-detail-popup .customer-summary-more>.customer-form-card{border:0;border-radius:0 0 14px 14px;margin:0;padding:0 18px 18px}
#customer-edit-panel{max-width:800px;margin-inline:auto}
#customer-edit-panel .customer-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 20px}
#customer-edit-panel .customer-fields>.field{min-width:0;margin:0}
#customer-edit-panel :is(#customer-referral,.customer-flags,.customer-fields>.field:last-child){grid-column:1/-1}
#customer-edit-panel .customer-rating{margin:0;min-width:0}
#customer-edit-panel .customer-record-footer{margin-bottom:0}
@media(max-width:850px){
  .customer-summary-bookings{grid-template-columns:minmax(0,1fr)}
  .customer-summary-top{flex-wrap:wrap}
}
@media(max-width:600px){
  .customer-detail-overview{gap:12px}
  .customer-summary-top{gap:12px}
  .customer-summary-identity h2{font-size:18px}
  .customer-summary-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  .customer-summary-actions .btn{min-width:0;padding:8px;font-size:12px;gap:5px}
  .customer-summary-facts{gap:12px 22px;margin-top:14px;padding-top:12px}
  .customer-summary-bookings{gap:12px}
  .customer-summary-bookings .customer-history-heading h2{font-size:17px}
  .customer-summary-more>summary{padding:12px 14px;font-size:13px}
  #customer-edit-panel .customer-fields{grid-template-columns:minmax(0,1fr);gap:14px}
}
