.customer-nav, .history-tabs { display:flex; gap:10px; flex-wrap:wrap; margin:22px 0; }
.customer-nav .button[aria-pressed="true"], .history-tabs .button[aria-pressed="true"] { background:var(--accent); color:#fff; }
#my-bookings .history-tabs { margin:24px 0 12px; gap:8px; }
.history-tabs .button { padding:10px 16px; font-size:14px; min-height:44px; }
#history-status { margin:0 0 16px; padding:0; border:0; background:none; color:var(--muted); font-size:14px; min-height:0; }
#history-status:empty { display:none; }
.history-card { border:1px solid var(--line); margin:12px 0; background:var(--surface); overflow-wrap:anywhere; scroll-margin-top:24px; }
.history-card-refund > .history-card-summary { background:var(--accent-soft); }
.history-card-focused > .history-card-summary { background:var(--accent-soft); }
.history-card-summary { display:block; list-style:none; cursor:pointer; padding:20px 24px; }
.history-card-summary::-webkit-details-marker { display:none; }
.history-card-summary:hover { background:var(--accent-soft); }
.history-card-summary:focus-visible { outline:none; background:var(--accent-soft); text-decoration:none; }
.history-card-summary:focus-visible .history-toggle { text-decoration-thickness:2px; }
.history-overview { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:start; }
.history-overview-main, .history-summary-meta { display:flex; flex-direction:column; gap:4px; }
.history-date { font-size:22px; font-weight:600; color:var(--ink); line-height:1.4; font-variant-numeric:tabular-nums; }
.history-slot { font-size:15px; color:var(--body); line-height:1.7; }
.history-amount { font-size:19px; font-weight:500; white-space:nowrap; color:var(--ink); font-variant-numeric:tabular-nums; }
.history-states { display:flex; align-items:center; flex-wrap:wrap; gap:8px; margin-top:12px; }
.history-badge { display:inline-block; border:1px solid var(--field-line); padding:2px 9px; font-size:12px; line-height:1.7; color:var(--body); }
.history-badge-muted { border-color:var(--line); color:var(--muted); }
.history-badge-accent { border-color:var(--accent); background:var(--accent); color:#fff; }
.history-payment-state { color:var(--muted); font-size:13px; }
.history-summary-foot { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin-top:14px; }
.history-reference { font-variant-numeric:tabular-nums; font-size:12px; color:var(--muted); line-height:1.6; min-width:0; }
.history-toggle { color:var(--accent); text-decoration:underline; text-underline-offset:4px; white-space:nowrap; font-size:13px; }
.history-refund-strip { display:flex; align-items:baseline; gap:8px 16px; flex-wrap:wrap; margin-top:14px; padding-top:12px; border-top:1px solid var(--line); }
.history-refund-strip strong { font-size:16px; color:var(--accent); }
.history-refund-strip > span { font-size:13px; color:var(--body); line-height:1.7; }
.history-card-body { border-top:1px solid var(--line); padding:24px; }
.history-card-body h3 { margin:0 0 12px; font-size:18px; line-height:1.6; }
.history-card-body h4 { margin:16px 0 4px; font-size:14px; }
.history-card-body .summary { margin:12px 0 24px; }
.history-card .summary div, #cancel-dialog .summary div { grid-template-columns:96px minmax(0,1fr); }
.history-card .summary { font-size:14px; background:transparent; }
.history-order-actions { margin:20px 0 28px; padding-bottom:24px; border-bottom:1px solid var(--line); }
.history-order-actions .button { font-size:14px; padding:10px 16px; min-height:44px; }
.history-order-actions .history-reschedule-unavailable { flex-direction:column; gap:0; min-width:max-content; text-align:center; }
.history-reschedule-unavailable > span { white-space:nowrap; }
.history-text-links { display:flex; flex-wrap:wrap; gap:8px 24px; margin-top:24px; }
.history-text-links .button { border:0; padding:4px 0; min-height:32px; background:transparent; font-size:13px; text-decoration:underline; text-underline-offset:4px; color:var(--muted); }
.history-text-links .button:focus-visible { outline:none; color:var(--accent); text-decoration-thickness:2px; }
.history-test-note { font-size:13px; line-height:1.8; color:var(--muted); margin:0 0 20px; }
.history-refund-detail { margin:0 0 24px; padding:20px; background:var(--accent-soft); border:1px solid var(--line); }
.history-refund-detail h3 { color:var(--accent); }
.history-progress-copy { font-size:14px; line-height:1.8; margin:0 0 16px; }
.history-admin-note { margin:0; white-space:pre-wrap; font-size:14px; line-height:1.8; }
.history-refund-detail .summary { margin-bottom:0; }
.history-refund-steps { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); list-style:none; padding:0; margin:20px 0; gap:8px; counter-reset:refund-step; }
.history-refund-steps li { border-top:2px solid var(--line); padding-top:10px; color:var(--muted); font-size:13px; line-height:1.6; counter-increment:refund-step; }
.history-refund-steps li::before { content:counter(refund-step,decimal-leading-zero); display:block; font-size:11px; margin-bottom:2px; }
.history-refund-steps .is-complete { border-color:var(--accent); color:var(--body); }
.history-refund-steps .is-current { border-color:var(--accent); color:var(--accent); font-weight:600; }
.history-request-record { border-top:1px solid var(--line); padding:0; margin:0; }
.history-request-record > summary { cursor:pointer; padding:14px 0; font-size:14px; }
.history-empty { padding:32px 24px; border:1px solid var(--line); }
.history-empty h3 { font-size:18px; margin:0 0 8px; }
.history-empty p { font-size:14px; margin:0; }
.cancel-body { overflow:auto; min-height:0; padding:18px 22px; }
#cancel-dialog { max-height:calc(100dvh - 32px); }
#cancel-dialog form { min-height:0; overflow:auto; }
#cancel-dialog h2 { font-size:23px; }
.history-help { max-width:66em; margin-top:16px; line-height:1.9; }
.history-help > span { display:block; }
.history-help > span + span { margin-top:4px; }
.history-help a { overflow-wrap:anywhere; }
@media(max-width:680px) {
  .customer-nav .button { width:auto; flex:1 1 auto; }
  #my-bookings .history-tabs { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:6px; }
  .history-tabs .button { width:100%; min-width:0; padding:10px 4px; font-size:12px; white-space:nowrap; }
  .history-card-summary { padding:16px; }
  .history-date { font-size:18px; }
  .history-amount { font-size:16px; }
  .history-slot { font-size:13px; }
  .history-overview { gap:4px 8px; }
  .history-overview-main { display:contents; }
  .history-slot { grid-column:1 / -1; grid-row:2; }
  .history-summary-meta { grid-column:2; grid-row:1; }
  .history-card-body { padding:16px; }
  .history-summary-foot { flex-direction:column; align-items:flex-start; gap:8px; }
  .history-refund-detail { padding:14px; }
  .history-refund-steps { gap:6px; }
  .history-refund-steps li { font-size:12px; }
  .history-order-actions { display:flex; flex-direction:row; flex-wrap:wrap; gap:8px; }
  .history-order-actions .button { flex:1 1 130px; width:auto; padding:12px 8px; font-size:13px; }
  .history-card .summary div, #cancel-dialog .summary div { grid-template-columns:80px minmax(0,1fr); }
}

.history-refund-estimate { margin:0 0 20px; padding:16px 0; border-top:1px solid var(--line); border-bottom:1px solid var(--line); }
.history-refund-estimate p { margin:4px 0 0; font-size:13px; line-height:1.8; color:var(--muted); }
.history-refund-estimate .refund-tier { margin:0; color:var(--body); font-size:14px; }
.history-refund-estimate .refund-estimate-total { display:flex; align-items:baseline; flex-wrap:wrap; gap:8px 20px; margin:8px 0; color:var(--ink); }
.refund-estimate-total strong { color:var(--accent); font-size:24px; font-weight:500; white-space:nowrap; }
.history-refund-estimate > strong { font-size:14px; font-weight:500; color:var(--body); }
.history-order-actions .button[aria-disabled="true"] { background:var(--paper-deep); color:var(--muted); border-color:var(--line); cursor:not-allowed; }
.history-refund-reason { flex-basis:100%; margin:0; font-size:13px; line-height:1.8; color:var(--muted); }
.history-refund-reason:empty { display:none; }
