:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #eff6ff;
  --text-primary: #0f172a;
  --text-secondary: #64748b;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
  --background: #f8fafc;
  --surface: #ffffff;
  --success: #16a34a;
  --danger: #dc2626;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-card: 20px;
  --shadow-soft: 0 4px 20px rgba(15, 23, 42, 0.05);
}

body { background: var(--background); color: var(--text-primary); }
.public-nav { background: rgba(255,255,255,.96); border-bottom-color: #eaeff5; }
.nav-inner { min-height: 64px; max-width: 900px; }
.brand { gap: 10px; font-size: 18px; font-weight: 800; line-height: 1.35; }
.brand-logo { width: 38px; height: 38px; border-radius: 12px; box-shadow: none; }
.brand small { color: var(--text-secondary); font-size: 11px; font-weight: 500; }
.booking-page { padding: 24px 0 120px; }
.booking-layout { max-width: 900px; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
.booking-main { padding: 24px; border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.booking-summary { top: 82px; padding: 20px; border-radius: var(--radius-card); box-shadow: var(--shadow-soft); }
.mini-footer { width: 100%; display: flex; align-items: center; justify-content: center; gap: 5px; margin: 0 auto; padding: 14px 20px 24px; border-top: 1px solid rgba(226,232,240,.8); color: var(--text-secondary); font-size: 12px; text-align: center; }
.mini-footer-heart { color: #ef4444; font-size: 16px; line-height: 1; }
.mini-footer a { color: var(--primary); font-weight: 800; text-decoration: none; transition: color .2s ease, transform .2s ease; }
.mini-footer a:hover { color: var(--primary-dark); transform: translateY(-1px); }
.success-wrap { min-height: calc(100vh - 150px); }

.booking-progress { margin-bottom: 22px; }
.step-count { color: var(--text-secondary); font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.stepper { display: flex; direction: rtl; align-items: flex-start; gap: 0; margin: 0; height: 48px; }
.step-dot { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 0; color: var(--text-muted); background: none; border: 0; font-size: 10px; font-weight: 500; cursor: default; }
.step-dot:not(:last-child)::after { content: ""; position: absolute; top: 11px; right: calc(50% + 12px); width: calc(100% - 24px); height: 2px; background: var(--border); z-index: 0; transition: background .2s ease; }
.step-indicator { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--border); position: relative; z-index: 1; font-size: 10px; line-height: 1; transition: .2s ease; }
.step-dot.active { color: var(--primary); font-weight: 800; }
.step-dot.active .step-indicator { color: #fff; border-color: var(--primary); background: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.step-dot.done { color: var(--primary); cursor: pointer; }
.step-dot.done .step-indicator { color: #fff; border-color: var(--primary); background: var(--primary); }
.step-dot.done .step-indicator::before { content: "✓"; }
.step-dot.done .step-indicator { font-size: 0; }
.step-dot.done .step-indicator::before { font-size: 12px; animation: check-in .2s ease; }
.step-dot.done:not(:last-child)::after { background: var(--primary); }

.panel-title { margin: 0 0 4px; font-size: clamp(27px,4vw,32px); line-height: 1.4; font-weight: 800; letter-spacing: -.02em; }
.panel-subtitle { margin: 0 0 20px; color: var(--text-secondary); font-size: 16px; }
.date-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.date-toolbar h2 { margin: 0; font-size: 14px; font-weight: 750; }
.calendar-trigger { min-height: 44px; padding: 0 8px; display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: var(--primary); font-size: 13px; font-weight: 700; border-radius: var(--radius-sm); }
.calendar-trigger:hover { background: var(--primary-light); }
.date-scroll { direction: rtl; display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth; scrollbar-width: none; padding: 4px 3px 10px; }
.date-scroll::-webkit-scrollbar { display: none; }
.choice-card { min-width: 128px; width: 128px; height: 148px; flex: 0 0 128px; scroll-snap-align: center; padding: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: var(--radius-card); background: var(--surface); color: var(--text-primary); box-shadow: var(--shadow-soft); transition: transform .18s ease,border-color .18s ease,background .18s ease,box-shadow .18s ease; }
.choice-card:hover:not(:disabled) { border-color: #93c5fd; transform: translateY(-2px); }
.choice-card:active:not(:disabled) { transform: scale(.98); }
.choice-card .today-badge { min-height: 22px; display: inline-flex; align-items: center; padding: 2px 8px; margin-bottom: 4px; border-radius: 99px; background: var(--primary-light); color: var(--primary-dark); font-size: 10px; font-weight: 700; }
.choice-card .date-weekday { min-height: 22px; color: var(--text-secondary); font-size: 12px; font-weight: 600; }
.choice-card .date-number { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -.04em; }
.choice-card .date-month { color: var(--text-secondary); font-size: 13px; font-weight: 600; }
.choice-card .date-status { min-height: 20px; margin-top: 6px; color: var(--primary); font-size: 10px; font-style: normal; font-weight: 700; }
.choice-card.selected { border: 2px solid var(--primary); padding: 11px; background: var(--primary-light); box-shadow: 0 6px 24px rgba(37,99,235,.12); }
.choice-card.selected .date-status::before { content: "✓ "; }
.choice-card.unavailable:disabled { opacity: 1; background: #f1f5f9; color: #64748b; border-color: #e2e8f0; box-shadow: none; }
.choice-card.unavailable .date-number { color: #64748b; }
.choice-card.unavailable .date-status { color: #64748b; }
.scroll-hint { margin: 2px 0 0; color: var(--text-secondary); font-size: 11px; }
.next-step-note { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--radius-md); background: #f1f5f9; color: var(--text-secondary); }
.next-step-note > span { width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--primary); font-size: 12px; font-weight: 800; }
.next-step-note p { margin: 0; font-size: 12px; line-height: 1.75; }
.next-step-note strong { color: var(--text-primary); }
.date-skeleton { overflow: hidden; pointer-events: none; }
.date-skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(100%); background: linear-gradient(90deg,transparent,rgba(255,255,255,.75),transparent); animation: shimmer 1.35s infinite; }
.date-skeleton { position: relative; background: #eef2f7; border-color: transparent; box-shadow: none; }
.date-skeleton span { width: 64%; height: 11px; border-radius: 6px; background: #dfe6ee; margin: 7px; }
.date-skeleton span:nth-child(2) { width: 40%; height: 30px; }
.date-state { width: 100%; min-height: 154px; padding: 22px; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); display: grid; justify-items: center; align-content: center; gap: 6px; text-align: center; color: var(--text-secondary); }
.date-state svg { color: var(--text-muted); }
.empty-icon svg { margin-inline: auto; }
.date-state strong { color: var(--text-primary); }
.date-state .btn { min-height: 44px; margin-top: 6px; }

.booking-controls .btn-primary::after, .mobile-booking-bar .btn-primary::after { content: "←"; font-size: 19px; font-weight: 400; }
.booking-controls .btn-primary:disabled::after, .mobile-booking-bar .btn-primary:disabled::after { display: none; }
.mobile-booking-bar { min-height: 80px; }
.mobile-summary { min-width: 112px; line-height: 1.45; }
.mobile-summary span { display: block; color: var(--text-secondary); font-size: 10px; }
.mobile-summary strong { display: block; color: var(--text-primary); font-size: 12px; }
.mobile-booking-bar .btn-primary { min-height: 54px; max-width: 240px; padding-inline: 18px; border-radius: 15px; font-size: 14px; white-space: nowrap; box-shadow: 0 5px 16px rgba(37,99,235,.18); }
.mobile-booking-bar .btn-primary:disabled { background: #e2e8f0; color: #64748b; opacity: 1; box-shadow: none; }

.calendar-sheet { position: fixed; inset: 0; z-index: 100; visibility: hidden; pointer-events: none; }
.calendar-sheet.open { visibility: visible; pointer-events: auto; }
.calendar-backdrop { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; background: rgba(15,23,42,.42); opacity: 0; transition: opacity .2s ease; }
.calendar-sheet.open .calendar-backdrop { opacity: 1; }
.calendar-dialog { position: absolute; top: 50%; left: 50%; width: min(500px,calc(100% - 32px)); max-height: calc(100vh - 40px); overflow: auto; transform: translate(-50%,-46%); padding: 22px; border-radius: 22px; background: var(--surface); box-shadow: 0 20px 60px rgba(15,23,42,.2); opacity: 0; transition: .2s ease; }
.calendar-sheet.open .calendar-dialog { transform: translate(-50%,-50%); opacity: 1; }
.calendar-handle { display: none; }
.calendar-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 18px; }
.calendar-head span { color: var(--primary); font-size: 11px; font-weight: 700; }
.calendar-head h2 { margin: 1px 0 0; font-size: 19px; }
.calendar-close { width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); color: var(--text-secondary); font-size: 26px; line-height: 1; }
.calendar-weekdays,.calendar-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 6px; }
.calendar-weekdays { margin-bottom: 7px; color: var(--text-secondary); text-align: center; font-size: 11px; }
.calendar-day { min-width: 0; aspect-ratio: 1; border: 1px solid transparent; border-radius: var(--radius-sm); background: var(--surface); color: var(--text-primary); font-weight: 700; }
.calendar-day:hover:not(:disabled) { background: var(--primary-light); }
.calendar-day.selected { border-color: var(--primary); background: var(--primary); color: #fff; }
.calendar-day:disabled { background: #f1f5f9; color: var(--text-muted); opacity: 1; }
.calendar-day.blank { visibility: hidden; }
.calendar-note { margin: 14px 0 0; color: var(--text-secondary); font-size: 11px; }

@keyframes shimmer { to { transform: translateX(-100%); } }
@keyframes check-in { from { transform: scale(.6); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 820px) {
  .booking-layout { display: block; }
  .booking-main { padding: 20px; }
  .mobile-booking-bar { display: flex; padding: 9px 16px calc(9px + env(safe-area-inset-bottom)); }
}
@media (max-width: 560px) {
  .container { width: min(100% - 32px,720px); }
  .nav-inner { min-height: 60px; }
  .brand { font-size: 16px; }
  .brand-logo { width: 36px; height: 36px; }
  .booking-page { padding-top: 14px; padding-bottom: 118px; }
  .booking-main { padding: 0; }
  .booking-progress { margin-bottom: 14px; }
  .step-label { font-size: 9px; }
  .panel-title { font-size: 28px; }
  .panel-subtitle { margin-bottom: 16px; font-size: 15px; }
  .date-scroll { margin-inline: -16px; padding-inline: 16px; scroll-padding-inline: 16px; }
  .choice-card { min-width: 124px; width: 124px; flex-basis: 124px; height: 144px; }
  .mobile-booking-bar { gap: 9px; }
  .mobile-booking-bar .icon-btn { width: 44px; flex: 0 0 44px; }
  .mobile-booking-bar .btn-primary { padding-inline: 14px; font-size: 13px; }
  .calendar-dialog { top: auto; right: 0; bottom: 0; left: 0; width: 100%; max-height: 88vh; transform: translateY(100%); border-radius: 22px 22px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); }
  .calendar-sheet.open .calendar-dialog { transform: translateY(0); }
  .calendar-handle { display: block; width: 42px; height: 4px; margin: 0 auto 12px; border-radius: 99px; background: #cbd5e1; }
}
@media (max-width: 390px) {
  .mobile-summary { min-width: 94px; }
  .mobile-booking-bar .btn-primary { max-width: 174px; font-size: 12px; }
  .step-dot { font-size: 8px; }
}

.slot-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 26px 0; }
.slot-loading .loader-ring { width: 34px; height: 34px; border-width: 3px; border-color: #dbeafe; border-top-color: var(--primary); }
.booking-controls .btn-primary.is-loading::after, .mobile-booking-bar .btn-primary.is-loading::after { display: none; }
.mobile-booking-bar .btn-primary.is-loading { max-width: none; }
