:root {
  font-family: Arial, Helvetica, sans-serif; color: #202a36; background: #f5f7fa;
  font-size: 15px; line-height: 1.5; --blue: #245cc5; --border: #dce2eb;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; border: 1px solid var(--border); border-radius: 9px; padding: 10px 16px; font-weight: 600; background: white; color: #24324a; }
button:hover { background: #edf2fb; }
button:disabled { opacity: .45; cursor: not-allowed; }
button:focus-visible, input:focus { outline: 3px solid #87b2ff; outline-offset: 2px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.test-banner { padding: 9px 24px; background: #e8effc; color: #27436b; font-size: .82rem; text-align: center; }
header { background: white; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; padding: 20px max(24px, calc((100vw - 1360px)/2)); gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px; }
.brand strong { font-size: 1.15rem; }
.brand small { display: block; color: #697487; }
.brand-icon { display: grid; place-items: center; background: var(--blue); color: white; width: 44px; height: 44px; border-radius: 12px; font-weight: 700; }
nav { display: flex; padding: 4px; border-radius: 12px; background: #f0f3f9; gap: 4px; }
nav button { border: 0; background: transparent; }
nav button[aria-pressed=true] { color: #174ca8; background: white; box-shadow: 0 1px 4px #0001; }
main { max-width: 1408px; margin: auto; padding: 30px 24px; }
.heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
h1 { font-size: 1.9rem; line-height: 1.2; margin: 6px 0 10px; letter-spacing: -.025em; }
h2 { font-size: 1.1rem; margin: 0 0 12px; }
p { margin: 8px 0 16px; }
.eyebrow { font-size: .7rem; font-weight: 700; letter-spacing: .08em; color: #687993; margin: 0; }
.heading p:last-child { color: #647187; margin-bottom: 0; }
.metrics { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; margin-bottom: 22px; }
.metric { background: white; border: 1px solid var(--border); border-radius: 12px; padding: 14px 20px; }
.metric small { color: #607088; }
.metric strong { font-size: 1.7rem; display: block; margin-top: 3px; }
.columns { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 22px; align-items: start; }
.card { background: white; padding: 22px; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 2px 6px #1c335104; min-width: 0; }
.calendar-card { padding: 20px 16px 12px; }
.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 4px; }
.calendar-toolbar h2 { margin-bottom: 2px; }
.calendar-toolbar p { margin: 0; color: #53627a; font-size: .9rem; }
.calendar-navigation { display: flex; gap: 5px; flex-shrink: 0; }
.calendar-navigation button { padding: 7px 12px; min-height: 40px; }
.calendar-navigation button:first-child, .calendar-navigation button:last-child { font-size: 1.4rem; line-height: 1; }
.legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: .75rem; color: #5a6880; margin: 16px 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; border: 1px solid #dae0e9; }
.available-key { background: #e6f4ee; border-color: #8dc4ac !important; }
.booked-key { background: #245cc5; border-color: #245cc5 !important; }
.unavailable-key { background: #f1f3f6; }
.calendar { overflow: auto; max-height: 650px; border: 1px solid var(--border); border-radius: 9px; }
.calendar-table { width: 100%; border-collapse: separate; border-spacing: 0; table-layout: fixed; font-size: .75rem; }
.calendar-table caption { text-align: left; }
.calendar-table thead th { background: #fff; position: sticky; top: 0; z-index: 2; border-bottom: 1px solid var(--border); padding: 8px 2px; color: #5c6c84; font-weight: 400; text-align: center; }
.calendar-table thead th strong { display: block; color: #23324c; font-size: 1.2rem; line-height: 1.5; }
.calendar-table thead .is-today { background: #edf3ff; color: #245cc5; }
.calendar-table thead .is-today strong { color: #245cc5; }
.calendar-table .time-column { width: 52px; text-align: center; }
.calendar-table tbody th { font-size: .75rem; color: #5e6e85; font-weight: 400; vertical-align: top; padding: 8px 2px; background: white; }
.calendar-table td { height: 56px; padding: 3px; vertical-align: top; border-left: 1px solid #e5e9ef; border-bottom: 1px solid #e5e9ef; }
.calendar-table td.unavailable { background: #f5f6f8; }
.calendar-table td.has-event { background: white; }
.calendar-table button { width: 100%; min-height: 48px; text-align: left; padding: 5px 6px; border-radius: 5px; line-height: 1.3; overflow: hidden; }
.calendar-table button strong { display: block; font-size: .73rem; white-space: nowrap; }
.calendar-table button span { display: block; font-size: .68rem; font-weight: 400; margin-top: 3px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.calendar-slot { border-color: #b7d8c8; color: #176244; background: #edf8f2; }
.calendar-slot:hover { background: #d6efdf; border-color: #5d9e7c; }
.calendar-slot[aria-pressed=true] { background: #245cc5; color: white; border-color: #245cc5; }
.calendar-booking { background: #245cc5; color: white; border-color: #245cc5; }
.calendar-booking:hover { background: #1849a2; }
.calendar-note { margin: 12px 4px 0 !important; }
.day-strip, .day-heading { display: none; }
.booking-form-card { position: sticky; top: 18px; }
.selection { background: #f3f5f9; border: 1px solid var(--border); padding: 14px; border-radius: 9px; font-size: .9rem; color: #61718a; margin: 16px 0; }
.selection.has-selection { background: #edf3ff; border-color: #adc4ef; color: #1c4da3; font-weight: 600; }
form { display: grid; gap: 10px; }
label { margin-top: 4px; font-size: .9rem; font-weight: 600; }
input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #b8c3d3; border-radius: 8px; background: white; color: #202a36; }
.primary { background: var(--blue); border-color: var(--blue); color: white; min-height: 44px; margin-top: 8px; }
.primary:hover { background: #194ba6; }
.secondary { color: #2856a3; }
.muted { font-size: .8rem; color: #63738c; margin: 4px 0 9px; }
.test-note { background: #f3f5f9; border-radius: 9px; padding: 12px; font-size: .8rem; color: #5b697c; margin: 20px 0 0; }
.appointments-card, .instructions { margin-top: 22px; }
.card-heading { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-heading span { font-size: .75rem; color: #61718a; }
.empty { padding: 28px 10px; text-align: center; color: #647187; }
.booking { padding: 18px 0; border-top: 1px solid var(--border); }
.booking:first-child { margin-top: 8px; }
.booking.focused-booking { background: #f5f8ff; outline: 2px solid #adc4ef; outline-offset: 8px; }
.booking-head { display: flex; justify-content: space-between; gap: 12px; }
.booking strong { font-size: 1.05rem; }
.booking .name { color: #4d5f77; margin: 7px 0; }
.time-range { font-weight: 700; font-size: 1.3rem; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.actions button { font-size: .85rem; padding: 8px 12px; }
.danger { color: #a72c36; }
.badge { display: inline-block; font-size: .73rem; font-weight: 600; background: #e5f5ed; color: #176343; padding: 5px 10px; border-radius: 20px; height: max-content; }
.badge.cancelled, .badge.rejected { background: #edf0f5; color: #687487; }
.badge.pending { background: #fff1d8; color: #805b0c; }
.proposal { background: #eef4ff; border-radius: 9px; padding: 12px 14px; margin-top: 12px; font-size: .9rem; }
.instructions p { margin: 0; color: #647187; }
#notice:not(:empty) { padding: 13px 18px; border-radius: 10px; margin-bottom: 20px; background: #e5f5ed; color: #165d3f; }
#notice.error { background: #fff0ef; color: #a32d2b; }
footer { color: #6f7c8f; font-size: .8rem; margin: 28px 0 10px; }
.pending-warning { color: #9b5e07; font-size: .85rem; }
body.busy #sync { color: #245cc5; }
@media (max-width: 1120px) {
  .columns { grid-template-columns: 1fr; }
  .booking-form-card { position: static; }
  .booking-form-card form { max-width: 450px; }
}
@media (max-width: 720px) {
  header { padding: 16px; align-items: flex-start; flex-direction: column; gap: 14px; }
  nav { width: 100%; } nav button { flex: 1; }
  main { padding: 24px 16px; }
  .heading { align-items: flex-start; } h1 { font-size: 1.55rem; }
  .eyebrow { font-size: .62rem; }
  .metrics { gap: 8px; } .metric { padding: 12px; }
  .metric small { font-size: .7rem; } .metric strong { font-size: 1.4rem; }
  .columns { gap: 16px; } .card { padding: 18px; }
  .calendar-card { padding: 16px 10px 12px; }
  .heading .secondary { padding: 8px 10px; }
  .calendar-toolbar { flex-wrap: wrap; gap: 12px; }
  .calendar-toolbar p { font-size: .8rem; }
  .calendar-navigation { width: 100%; }
  .calendar-navigation button:nth-child(2) { flex: 1; }
  .legend { gap: 10px; font-size: .68rem; }
  .day-strip { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 3px; margin: 15px 0; }
  .day-strip button { padding: 7px 2px; border: 0; border-radius: 8px; font-size: .7rem; }
  .day-strip span, .day-strip strong { display: block; } .day-strip strong { font-size: 1.05rem; }
  .day-strip [aria-pressed=true] { color: white; background: #245cc5; }
  .day-heading { display: block; text-transform: capitalize; font-size: .85rem; font-weight: 600; margin: 12px 4px; }
  .calendar-table [data-current=false] { display: none; }
  .calendar-table { table-layout: auto; }
  .calendar-table thead { display: none; }
  .calendar-table .time-column { width: 52px; }
  .calendar-table td { height: 58px; }
  .calendar-table button { padding: 7px 10px; }
  .calendar-table button strong { font-size: .85rem; }
  .calendar-table button span { font-size: .75rem; }
  .calendar { max-height: 540px; }
  .booking-head { flex-wrap: wrap; } .actions button { flex: 1 1 auto; }
  .appointments-card, .instructions { margin-top: 16px; }
}

.client-steps { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0 auto 24px; max-width: 1100px; color: #738096; font-size: .9rem; }
.client-steps [aria-current=step] { color: #1f54b6; font-weight: 700; }
.customer-view .columns { display: block; }
.customer-view .booking-form-card { position: static; max-width: 580px; margin: auto; }
.customer-view .appointments-card, .customer-view .instructions, .customer-view .heading { max-width: 1100px; margin-left: auto; margin-right: auto; }
.customer-picker { display: grid; grid-template-columns: 220px minmax(280px, 1fr) 280px; max-width: 1100px; margin: auto; background: white; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.service-summary { padding: 28px 24px; border-right: 1px solid var(--border); }
.service-brand { font-size: .72rem; color: #68788e; letter-spacing: .04em; }
.service-summary h2 { font-size: 1.4rem; margin-top: 12px; }
.service-summary p { color: #55647a; margin: 10px 0; }
.service-summary .muted { margin-top: 24px; }
.month-panel { padding: 24px; }
.month-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.month-toolbar h2 { margin: 0; }
.month-toolbar h2::first-letter { text-transform: uppercase; }
.month-toolbar button { border: 0; padding: 6px 10px; font-size: 1.2rem; min-height: 36px; }
.month-weekdays, .month-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.month-weekdays { text-align: center; color: #607088; font-size: .68rem; font-weight: 700; margin-bottom: 12px; }
.month-day { border: 0; border-radius: 8px; padding: 9px 2px; min-height: 44px; background: #edf1f7; }
.month-day:disabled { background: transparent; color: #8793a5; opacity: 1; }
.month-day[aria-pressed=true] { background: #245cc5; color: white; }
.times-panel { border-left: 1px solid var(--border); padding: 24px 20px; }
.times-heading { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 16px; }
.times-heading h2 { font-size: .9rem; margin: 0; }
.clock-format { display: flex; border: 1px solid var(--border); border-radius: 8px; padding: 2px; }
.clock-format button { padding: 3px 5px; border: 0; font-size: .75rem; background: transparent; border-radius: 5px; }
.clock-format [aria-pressed=true] { background: #e8eef9; color: #1c50ac; }
.available-times { display: grid; gap: 8px; max-height: 420px; overflow-y: auto; padding: 2px; }
.time-button { display: flex; justify-content: center; align-items: center; gap: 9px; min-height: 42px; font-size: .9rem; padding: 8px; }
.availability-dot { width: 7px; height: 7px; background: #12967d; border-radius: 50%; flex-shrink: 0; }
.confirmation-card { max-width: 1100px; margin: 0 auto 24px; padding: 28px 32px; background: #fff; border: 1px solid #b6ccec; border-left: 6px solid #245cc5; border-radius: 14px; box-shadow: 0 4px 18px #1c33510b; }
.confirmation-card:focus { outline: 2px solid #87b2ff; outline-offset: 3px; }
.confirmation-card[data-status=cancelled] { border-left-color: #687487; }
.confirmation-card[data-status=pending] { border-left-color: #b17c13; }
.receipt-label { font-size: .72rem; letter-spacing: .05em; color: #59718e; margin: 0 0 8px; font-weight: 700; }
.confirmation-card h2 { font-size: 1.8rem; margin-bottom: 10px; }
.receipt-details { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.receipt-details span { display: block; color: #61718a; font-size: .82rem; margin-bottom: 5px; }
.receipt-details strong { display: block; overflow-wrap: anywhere; margin-bottom: 8px; font-size: 1.05rem; }
.delivery-note { color: #5c6c82; font-size: .88rem; background: #f3f6fb; border-radius: 8px; padding: 13px 15px; }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.receipt-actions .primary { margin: 0; }
@media (max-width: 940px) {
  .customer-picker { grid-template-columns: minmax(260px, 1fr) 260px; }
  .service-summary { grid-column: 1 / -1; border-right: 0; border-bottom: 1px solid var(--border); padding: 20px 24px; }
  .service-summary p { display: inline-block; margin-right: 20px; }
  .service-summary .muted { display: block; margin-top: 8px; }
}
@media (max-width: 620px) {
  .customer-picker { grid-template-columns: 1fr; }
  .service-summary, .month-panel, .times-panel { padding: 20px; }
  .service-summary { grid-column: auto; }
  .times-panel { border-left: 0; border-top: 1px solid var(--border); }
  .month-weekdays { font-size: .62rem; }
  .month-toolbar h2 { font-size: 1rem; }
  .available-times { max-height: none; }
  .client-steps { font-size: .72rem; gap: 12px; justify-content: space-between; }
  .confirmation-card { padding: 22px 20px; }
  .confirmation-card h2 { font-size: 1.5rem; }
  .receipt-details { grid-template-columns: 1fr; gap: 12px; margin: 18px 0; }
  .receipt-actions { flex-direction: column; align-items: stretch; }
}

.demo-links { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:8px 18px; padding:8px 24px; background:#fff; font-size:.8rem; border-bottom:1px solid var(--border); }
.demo-links a { color:#245cc5; text-underline-offset:3px; }
.demo-links a:focus-visible { outline:3px solid #87b2ff; outline-offset:3px; }
.demo-links button { padding:5px 10px; font-size:.8rem; min-height:36px; }
@media(max-width:480px) { .demo-links { justify-content:center; padding:8px 12px; gap:8px 12px; } }

.heading-actions { display:flex; gap:8px; flex-wrap:wrap; }
#availability-editor { margin-bottom:22px; }
#availability-editor h3 { margin:24px 0 12px; }
#availability-editor select { font:inherit; color:inherit; background:white; padding:10px; border:1px solid #b8c3d3; border-radius:8px; }
#availability-editor select:focus-visible { outline:3px solid #87b2ff; outline-offset:2px; }
.availability-duration { display:flex; flex-direction:column; gap:6px; max-width:250px; }
.availability-week { display:grid; gap:14px; }
.availability-day { border:1px solid var(--border); border-radius:10px; padding:14px; margin:0; min-width:0; }
.availability-day legend { padding:0 6px; font-weight:700; }
.availability-check { display:flex; align-items:center; gap:9px; margin:0 0 10px; }
.availability-check input { width:18px; height:18px; flex-shrink:0; margin:0; }
.availability-range { display:grid; grid-template-columns:minmax(130px,1fr) minmax(130px,1fr) auto; gap:12px; align-items:end; margin-bottom:12px; }
.availability-range label { display:flex; flex-direction:column; gap:5px; margin:0; }
.availability-day [data-hours-fields] > button { margin:2px 8px 12px 0; font-size:.85rem; }
.availability-range button { margin-bottom:1px; font-size:.85rem; min-height:44px; }
.availability-day input:disabled { background:#f0f2f5; color:#7b8494; }
.availability-exceptions { display:grid; gap:16px; }
.availability-exception > button { margin-top:8px; color:#a32d2b; }
.availability-add-date { display:flex; gap:12px; align-items:end; margin:18px 0; }
.availability-add-date label { display:flex; flex-direction:column; gap:5px; }
.availability-add-date button { min-height:46px; }
.availability-footer { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.availability-footer .primary { margin:0; }
.availability-preview { margin-top:20px; padding:20px; background:#f3f7fd; border:1px solid #b8cceb; border-radius:10px; }
.availability-preview h3 { margin-top:0 !important; }
.availability-diff { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
.availability-diff > div { padding:12px; background:white; border-radius:8px; border:1px solid var(--border); }
.availability-diff p { margin:6px 0 0; overflow-wrap:anywhere; }
.availability-conflicts { margin:18px 0; padding:16px; background:#fff5df; border:1px solid #e2c792; border-radius:8px; }
.availability-conflicts h4 { margin:0; }
.availability-conflicts li { margin:5px 0; }
.availability-conflicts .availability-check { margin:15px 0 0; }
[data-editor-status]:not(:empty) { padding:12px; margin:14px 0; background:#edf3ff; border-radius:8px; }
[data-editor-status].error { color:#a32d2b; background:#fff0ef; }
@media(max-width:720px) {
  .heading { flex-wrap:wrap; gap:14px; }
  .heading-actions { width:100%; }
  .heading-actions button { flex:1; }
  .availability-range { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
  .availability-range button { grid-column:1/-1; justify-self:start; }
  .availability-range input { padding:10px 6px; }
  .availability-day { padding:12px; }
  .availability-add-date { flex-direction:column; align-items:stretch; }
  .availability-diff { grid-template-columns:1fr; }
  .availability-preview { padding:14px; }
}

.scheduling-assistant textarea{display:block;width:100%;box-sizing:border-box;resize:vertical;min-height:90px;margin:8px 0;padding:12px;border:1px solid var(--line,#cbd5e1);border-radius:8px;font:inherit;color:inherit;background:#fff}.scheduling-assistant .actions{flex-wrap:wrap}.scheduling-assistant [data-assistant-status]{margin-bottom:0}.scheduling-assistant .error{color:#a02d22}.scheduling-assistant button[aria-pressed="true"]{background:#8e342b;color:#fff}
