/* ===================================================================
   STYLE.CSS — Dear Self Nail, Salon and Spa
   Design tokens
   --cream        #f5e0cb  soft background / panels
   --rose         #a85176  primary accent (CTAs, headings)
   --terracotta   #a35353  secondary accent (hovers, highlights)
   --white        #ffffff  page background
   =================================================================== */

:root {
  --cream: #f5e0cb;
  --cream-soft: #fbf3e9;
  --rose: #a85176;
  --rose-deep: #8a3d5f;
  --terracotta: #a35353;
  --white: #ffffff;
  --ink: #3c2430;
  --ink-soft: #74596a;
  --line: #ecd9c4;
  --success: #5e8c61;
  --warn: #c98a2e;
  --danger: #b3423f;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Jost', 'Segoe UI', sans-serif;

  --radius-lg: 26px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-soft: 0 10px 30px rgba(163, 83, 83, 0.12);
  --shadow-pop: 0 18px 46px rgba(58, 23, 36, 0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.2px;
}

a { color: inherit; text-decoration: none; }
button { font-family: var(--font-body); cursor: pointer; border: none; background: none; }
ul { list-style: none; }
img { display: block; max-width: 100%; }
input, select, textarea { font-family: var(--font-body); }
.password-field { position: relative; }
.password-field input { width: 100%; padding-right: 46px; }
.password-toggle { position: absolute; top: 50%; right: 8px; display: grid; place-items: center; width: 32px; height: 32px; transform: translateY(-50%); border-radius: 50%; color: var(--ink-soft); }
.password-toggle:hover { color: var(--rose-deep); background: var(--cream-soft); }
.password-toggle svg { width: 18px; height: 18px; }

.specialty-field { border: 0; min-width: 0; }
.specialty-field legend { font-size: 12px; font-weight: 600; color: var(--ink); text-transform: uppercase; letter-spacing: .5px; }
.field-hint { margin: 4px 0 8px; color: var(--ink-soft); font-size: 12px; line-height: 1.4; }
.specialty-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.specialty-option { position: relative; display: flex; align-items: center; gap: 9px; min-height: 78px; padding: 12px; border: 1.5px solid var(--line); border-radius: 13px; color: var(--ink); font-size: 12px; text-transform: none; letter-spacing: 0; cursor: pointer; transition: transform .18s, border-color .18s, box-shadow .18s, background .18s; }
.specialty-option:hover { transform: translateY(-2px); border-color: var(--rose); background: var(--cream-soft); box-shadow: 0 8px 20px rgba(168,81,118,.15); }
.specialty-option:has(input:checked) { border-color: var(--rose); background: var(--cream-soft); color: var(--rose-deep); box-shadow: 0 0 0 3px rgba(168,81,118,.12); }
.specialty-option input { width: auto; accent-color: var(--rose); }
.specialty-option small { display: block; margin-bottom: 3px; color: var(--ink-soft); font-size: 9px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; }
.specialty-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #fff; font-size: 17px; box-shadow: 0 2px 6px rgba(60,36,48,.09); }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--cream); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--rose); }

/* ---------- decorative blob signature ---------- */
.stone-decor {
  position: absolute;
  border-radius: 58% 42% 63% 37% / 41% 56% 44% 59%;
  background: linear-gradient(135deg, var(--cream), #fff);
  opacity: 0.7;
  z-index: 0;
  pointer-events: none;
}

/* =========================== NAVBAR =========================== */
.navbar {
  position: relative;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 40px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; box-shadow: 0 4px 12px rgba(168,81,118,.14); }
.brand .mark {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--terracotta));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-display); font-size: 19px; font-weight: 700;
}
.brand .word { font-family: var(--font-display); font-size: 23px; color: var(--rose-deep); }
.brand .word small { display: block; font-family: var(--font-body); font-size: 10px; letter-spacing: 3px; color: var(--ink-soft); text-transform: uppercase; }

.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links button {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 18px; border-radius: 999px; font-size: 14px; color: var(--ink);
  transition: background .2s, color .2s;
}
.nav-links button svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-links button:hover { background: var(--cream-soft); color: var(--rose-deep); }
.nav-links .btn-login {
  background: var(--rose); color: #fff; padding: 10px 22px; border-radius: 999px;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-soft);
}
.nav-links .btn-login:hover { background: var(--rose-deep); color: #fff; }

/* Hamburger toggle — hidden on desktop, shown on mobile via media query below */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
}
.nav-toggle svg { width: 24px; height: 24px; }
.nav-toggle:hover { background: var(--cream-soft); }

/* Dimmed backdrop shown behind the mobile menu panel while it's open */
.nav-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .35);
  /* .navbar has z-index: 50 and therefore forms its own stacking context.
     Keep this backdrop below that context; otherwise it covers the slide-out
     links and absorbs every tap even when .nav-links itself has z-index: 70. */
  z-index: 40;
}
.nav-scrim.show { display: block; }

/* =========================== BUTTONS =========================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: 999px; font-size: 14.5px; font-weight: 500;
  transition: transform .15s, box-shadow .2s, background .2s, color .2s;
}
.btn-primary { background: var(--rose); color: #fff; box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--rose-deep); transform: translateY(-1px); }
.btn-secondary { background: var(--cream); color: var(--rose-deep); }
.btn-secondary:hover { background: #edd6b9; }
.btn-ghost { background: transparent; color: var(--rose-deep); border: 1.5px solid var(--rose); }
.btn-ghost:hover { background: var(--rose); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.88; }
.btn-sm { padding: 7px 16px; font-size: 12.5px; border-radius: 999px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.payment-method-select { appearance: none; padding: 9px 34px 9px 13px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--terracotta), var(--rose)); box-shadow: 0 6px 15px rgba(168,81,118,.22); font: 600 12.5px var(--font-body); cursor: pointer; transition: transform .18s, box-shadow .18s, filter .18s; }
.payment-method-select:hover:not(:disabled) { transform: translateY(-1px); filter: brightness(1.06); box-shadow: 0 10px 20px rgba(168,81,118,.3); }
.payment-method-select:disabled { opacity: .58; cursor: not-allowed; }
.booking-payment-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; width: 100%; }
.payment-cell { overflow: visible; }
.payment-cell .booking-payment-actions { position: relative; z-index: 2; }
.pay-down-btn { padding: 9px 15px; border: 0; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--rose), #ca6687); box-shadow: 0 7px 16px rgba(168,81,118,.25); font: 600 12.5px var(--font-body); cursor: pointer; transition: transform .18s, box-shadow .18s, background .18s; }
.pay-down-btn:hover { transform: translateY(-2px); background: linear-gradient(135deg, var(--rose-deep), var(--rose)); box-shadow: 0 11px 22px rgba(138,61,95,.34); }
.pay-down-btn:active { transform: translateY(0); box-shadow: 0 4px 10px rgba(138,61,95,.25); }
.add-services-btn { padding: 8px 14px; border: 1.5px solid var(--rose); border-radius: 999px; color: var(--rose-deep); background: #fff; font: 600 12.5px var(--font-body); cursor: pointer; transition: color .18s, background .18s, transform .18s, box-shadow .18s; }
.add-services-btn span { font-size: 16px; vertical-align: -1px; }
.add-services-btn:hover { color: #fff; background: var(--rose); transform: translateY(-1px); box-shadow: 0 7px 16px rgba(168,81,118,.2); }
.services-summary { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; min-width: 128px; }
.services-summary-btn { display: inline-flex; align-items: center; gap: 7px; padding: 7px 11px; border: 1px solid var(--rose); border-radius: 999px; color: var(--rose-deep); background: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.services-summary-btn:hover, .services-summary-btn:focus-visible { color: #fff; background: var(--rose); outline: none; }
.services-summary-btn strong { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; color: #fff; background: var(--rose); font-size: 11px; }
.services-summary-btn:hover strong, .services-summary-btn:focus-visible strong { color: var(--rose-deep); background: #fff; }
.services-summary-preview { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-soft); font-size: 11.5px; }
.service-details-modal { max-width: 560px; }
.service-details-list { display: grid; gap: 8px; max-height: 52vh; overflow: auto; }
.service-detail-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--cream-soft); }
.service-detail-row strong, .service-detail-row small { display: block; }
.service-detail-row small { margin-top: 2px; color: var(--ink-soft); font-size: 11px; text-transform: capitalize; }
.service-detail-row > span { color: var(--ink-soft); font-size: 12px; text-align: right; }
/* Booking hours note: a soft full-width line under the date + time fields. */
.time-input-hint { display: block; margin: -4px 0 16px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--cream-soft); border: 1px solid var(--line); border-left: 3px solid var(--rose); color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.time-input-hint:empty { display: none; }
.time-input-wrap { position: relative; }
.time-input-wrap input[type=time] { position: relative; z-index: 1; }
.time-input-placeholder { position: absolute; top: 50%; left: 14px; z-index: 2; transform: translateY(-50%); color: var(--ink-soft); font-size: 14px; pointer-events: none; }
.time-input-wrap.has-value .time-input-placeholder, .time-input-wrap:focus-within .time-input-placeholder { display: none; }
.time-input-wrap:not(.has-value) input[type=time] { color: transparent; }
.time-input-wrap:not(.has-value) input[type=time]:focus { color: var(--ink); }
.time-past-blocked { border-color: var(--danger) !important; background: #fdf0ef !important; }
.payment-confirm-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; background: var(--cream-soft); color: var(--rose-deep); font-size: 15px;
  transition: background .2s;
}
.icon-btn:hover { background: var(--cream); }

/* =========================== LANDING HERO =========================== */
.landing-page { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.hero {
  flex: 1; position: relative; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 26px; padding: 20px 40px 30px; overflow: visible;
}
.hero .stone-decor.s1 { width: 360px; height: 360px; top: -140px; left: -120px; }
.hero .stone-decor.s2 { width: 280px; height: 280px; bottom: -120px; right: -90px; }

.hero-copy { text-align: center; max-width: 640px; z-index: 2; }
.hero-copy .eyebrow {
  font-size: 12px; letter-spacing: 4px; text-transform: uppercase; color: var(--terracotta);
  font-weight: 600; margin-bottom: 10px; display: block;
}
.hero-copy h1 { font-size: 44px; line-height: 1.15; margin-bottom: 12px; }
.hero-copy p { color: var(--ink-soft); font-size: 15.5px; line-height: 1.6; }

.service-grid { display: grid; grid-template-columns: repeat(3, minmax(220px, 1fr)); gap: 22px; width: 100%; max-width: 980px; z-index: 2; }
.service-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden; height: 260px;
  box-shadow: var(--shadow-soft); cursor: pointer; transition: transform .25s, box-shadow .25s;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-pop); }
.service-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.service-card:hover img { transform: scale(1.08); }
.service-card .overlay {
  position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 20px; background: linear-gradient(0deg, rgba(58,23,30,0.78) 0%, rgba(58,23,30,0.05) 60%);
  color: #fff;
}
.service-card .overlay h3 { color: #fff; font-size: 24px; margin-bottom: 10px; }
.service-card .overlay .btn { align-self: flex-start; }

/* =========================== MODAL =========================== */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(60, 36, 48, 0.45); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 200;
}
.modal-overlay.open { display: flex; }
#modalBooking { z-index: 200; }
#modalLegal, #modalOtp { z-index: 500; }
.modal {
  background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 460px;
  max-height: 88vh; overflow-y: auto; padding: 30px 32px; box-shadow: var(--shadow-pop);
  position: relative; animation: pop .22s ease;
}
.modal.modal-wide { max-width: 720px; }
.modal.modal-xl { max-width: 880px; }
@keyframes pop { from { transform: scale(.95); opacity: 0;} to { transform: scale(1); opacity: 1;} }
.modal-close {
  position: sticky; top: 0; z-index: 5; float: right; margin: -4px -4px -32px auto; width: 36px; height: 36px; border-radius: 50%;
  background: var(--cream-soft); display: flex; align-items: center; justify-content: center; font-size: 16px; color: var(--ink-soft);
  flex: 0 0 auto;
}
.modal-close svg { width: 16px; height: 16px; }
.modal-close:hover { background: var(--cream); }
.modal h2 { font-size: 26px; margin-bottom: 6px; }
.modal .sub { color: var(--ink-soft); font-size: 13.5px; margin-bottom: 20px; }
.confirm-logout-actions { display: flex; gap: 12px; justify-content: center; }
.confirm-logout-actions .btn { min-width: 120px; }

/* =========================== FORMS =========================== */
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .5px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 14px; color: var(--ink); background: var(--cream-soft); transition: border-color .2s, background .2s;
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--rose); background: #fff;
}
.field textarea { resize: none; min-height: 80px; }
.field-row { display: flex; gap: 12px; }
.field-row .field { flex: 1; }
.field-error { color: var(--danger); font-size: 12px; margin-top: 4px; display: none; }
.form-note { font-size: 12.5px; color: var(--ink-soft); text-align: center; margin-top: 14px; }
.form-note button { color: var(--rose-deep); font-weight: 600; }

.divider-or { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--ink-soft); font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.divider-or::before, .divider-or::after { content: ''; flex: 1; height: 1px; background: var(--line); }

.oauth-row { display: flex; gap: 10px; }
.btn-oauth {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px; border-radius: var(--radius-sm); border: 1.5px solid var(--line); font-size: 13.5px; font-weight: 500;
  background: #fff; color: var(--ink);
}
.btn-oauth:hover { border-color: var(--rose); background: var(--cream-soft); }
.oauth-wordmark { height: 20px; width: auto; }

.role-tabs { display: flex; background: var(--cream-soft); border-radius: 999px; padding: 4px; margin-bottom: 20px; }
.role-tabs button { flex: 1; padding: 9px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.role-tabs button.active { background: var(--rose); color: #fff; }
.role-picker { margin-bottom: 20px; }
.role-picker > label { display:block; margin-bottom:7px; font-size:12px; color:var(--ink-soft); font-weight:600; }
.role-select-wrap { position:relative; }
.role-select-wrap select { width:100%; appearance:none; border:1px solid var(--line); border-radius:12px; background:var(--cream-soft); color:var(--ink); padding:11px 40px 11px 13px; font:inherit; font-size:13px; cursor:pointer; }
.role-select-wrap select:focus { outline:2px solid var(--rose); outline-offset:2px; }
.role-select-wrap svg { position:absolute; right:13px; top:50%; width:16px; transform:translateY(-50%); pointer-events:none; color:var(--rose); }
.booking-identity-choice { display:flex; gap:8px; margin:16px 0 12px; }
.identity-choice { flex:1; min-height:40px; display:flex; align-items:center; justify-content:center; gap:7px; border:1px solid var(--line); border-radius:10px; background:var(--cream-soft); color:var(--ink-soft); font:inherit; font-size:12px; cursor:pointer; }
.identity-choice[hidden] { display:none; }
.identity-choice.active { border-color:var(--rose); background:var(--rose-soft, #f6e5eb); color:var(--rose); font-weight:600; }
.identity-choice img { height:18px; width:auto; display:block; margin:0; }
.login-modal { max-width: 480px; }
.guest-login-note { display: none; }

/* star rating */
.star-rate { display: flex; gap: 6px; font-size: 26px; }
.star-rate span { color: var(--line); transition: color .15s; cursor: pointer; }
.star-rate span.active, .star-rate span:hover { color: var(--terracotta); }

/* steps */
.step-track { display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.step-track .dot { width: 26px; height: 26px; border-radius: 50%; background: var(--cream); color: var(--ink-soft); font-size: 12px; display: flex; align-items: center; justify-content: center; font-weight: 600; }
.step-track .dot.active { background: var(--rose); color: #fff; }
.step-track .bar { flex: 1; height: 2px; background: var(--line); }
.booking-step { display: none; }
.booking-step.active { display: block; animation: fadein .2s ease; }
@keyframes fadein { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }

.service-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.service-pick label {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-size: 13px; text-transform: none; letter-spacing: 0;
}
.service-pick input { width: auto; accent-color: var(--rose); }
.service-pick label:has(input:checked) { border-color: var(--rose); background: var(--cream-soft); }
.price-tag { color: var(--terracotta); font-weight: 600; }

.summary-box { background: var(--cream-soft); border-radius: var(--radius-md); padding: 16px 18px; font-size: 13.5px; }
.summary-box .row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.summary-box .row:last-child { border-bottom: none; font-weight: 600; color: var(--rose-deep); }

/* multi-category service picker running selection */
.selected-services-box { margin-top: 14px; background: var(--cream-soft); border-radius: var(--radius-md); padding: 12px 14px; }
.selected-services-label { font-size: 12px; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 8px; }
.selected-service-chip { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.selected-service-chip .cat-tag { font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); background: var(--white); border-radius: 999px; padding: 2px 8px; margin-right: 6px; }
.selected-service-chip button { background: none; color: var(--danger); font-size: 16px; line-height: 1; padding: 0 4px; }

/* staff assignment step */
.staff-assignment-card { background: var(--cream-soft); border-radius: var(--radius-md); padding: 14px 16px; margin-bottom: 10px; }
.staff-assignment-choice { display: block; width: 100%; border: 2px solid transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; transition: border-color .2s, background .2s; }
.staff-assignment-choice:hover, .staff-assignment-choice:focus-visible { border-color: var(--rose); outline: none; }
.staff-assignment-choice.selected { border-color: var(--rose-deep); background: #fff; box-shadow: 0 0 0 2px rgba(177, 79, 122, .12); }
.staff-assignment-choice .name, .staff-assignment-choice .meta { display: block; }
.staff-assignment-card .name { font-weight: 600; color: var(--rose-deep); font-size: 14.5px; }
.staff-assignment-card .meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 2px; }
.staff-assignment-group { margin-bottom: 14px; }
.staff-assignment-group-title { margin: 4px 0 7px; color: var(--ink); font-size: 13px; font-weight: 600; }
.staff-assignment-alert { background: #fbeceb; border: 1.5px solid var(--danger); color: var(--danger); border-radius: var(--radius-sm); padding: 12px 14px; font-size: 13px; margin-bottom: 12px; }
.alt-slot-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.alt-slot-row button { padding: 8px 14px; border-radius: 999px; border: 1.5px solid var(--rose); color: var(--rose-deep); font-size: 12.5px; font-weight: 500; background: #fff; }
.alt-slot-row button:hover { background: var(--rose); color: #fff; }

/* admin: weekly working-hours grid */
.schedule-grid { border: 1.5px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.schedule-row { display: grid; grid-template-columns: 1.4fr 0.7fr 1fr 1fr; align-items: center; gap: 8px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.schedule-row:last-child { border-bottom: none; }
.schedule-row-head { background: var(--cream-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); font-weight: 600; }
.schedule-row input[type=checkbox] { width: auto; accent-color: var(--rose); justify-self: start; }
.schedule-row input[type=time] { width: 100%; padding: 6px 8px; border: 1.5px solid var(--line); border-radius: 8px; font-size: 12.5px; background: var(--cream-soft); }
.schedule-row input[type=time]:disabled { opacity: .4; }

/* =========================== DASHBOARD SHELL =========================== */
/* The row is pinned to the window height so a long sidebar menu on a short screen
   scrolls by itself instead of stretching (and clipping) the whole dashboard. */
.dash { height: 100vh; height: 100dvh; display: grid; grid-template-columns: 250px 1fr; grid-template-rows: minmax(0, 1fr); background: var(--white); }
.sidebar {
  background: linear-gradient(180deg, var(--rose-deep), var(--rose)); color: #fff;
  display: flex; flex-direction: column; padding: 24px 18px; min-height: 0; overflow-y: auto;
}
.dashboard-nav-toggle, .dashboard-nav-scrim { display: none; }
.sidebar .brand { color: #fff; margin-bottom: 28px; }
.sidebar .brand .word { color: #fff; }
.sidebar .brand .word small { color: rgba(255,255,255,0.75); }
.sidebar nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar nav button {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--radius-sm);
  color: rgba(255,255,255,0.85); font-size: 14px; text-align: left; transition: background .2s;
}
.sidebar nav button .ic { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-notice { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 999px; background: #fff; color: var(--rose-deep); font-size: 10px; font-weight: 700; }
.sidebar nav button:hover { background: rgba(255,255,255,0.12); }
.sidebar nav button.active { background: rgba(255,255,255,0.22); color: #fff; font-weight: 600; }
.sidebar .logout-btn { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,0.8); padding: 12px 14px; font-size: 13.5px; border-top: 1px solid rgba(255,255,255,0.18); margin-top: 10px; text-align: left; }
.sidebar .logout-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar .logout-btn:hover { color: #fff; }

.main-area { display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; padding: 18px 32px;
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 24px; }
.profile-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 42px; height: 42px; border-radius: 50%; background: var(--cream); color: var(--rose-deep);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--font-display); font-size: 17px;
  overflow: hidden; border: 2px solid var(--cream); position: relative; cursor: pointer;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.avatar .avatar-render { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.avatar .avatar-render img { width: 100%; height: 100%; object-fit: cover; }
.profile-chip .who { font-size: 13.5px; }
.profile-chip .who b { display: block; font-size: 14px; }
.profile-chip .who span { color: var(--ink-soft); text-transform: capitalize; font-size: 12px; }

/* overflow-y:auto: a panel taller than the window (forms, schedules) scrolls instead of being cut off. */
.panel-wrap { flex: 1; overflow-y: auto; padding: 22px 32px 26px; display: flex; flex-direction: column; }
.panel { display: none; flex: 1; min-height: 0; flex-direction: column; }
.panel.active { display: flex; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.search-bar { display: flex; align-items: center; gap: 8px; background: var(--cream-soft); border-radius: 999px; padding: 9px 16px; flex: 1; max-width: 320px; }
.search-bar .search-ic { width: 16px; height: 16px; flex-shrink: 0; color: var(--ink-soft); }
.search-bar input { border: none; background: transparent; flex: 1; font-size: 13.5px; }
.search-bar input:focus { outline: none; }

.table-wrap { flex: 1; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th { position: sticky; top: 0; background: var(--cream); color: var(--rose-deep); text-align: left; padding: 12px 16px; font-weight: 600; z-index: 1; }
tbody td { padding: 11px 16px; border-top: 1px solid var(--line); vertical-align: middle; }
tbody tr:hover { background: var(--cream-soft); }
.empty-row td { text-align: center; padding: 36px; color: var(--ink-soft); }
.row-actions { display: flex; gap: 8px; }

.badge { padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 600; display: inline-block; }
.badge-active, .badge-approved, .badge-paid { background: #e4f0e3; color: var(--success); }
.badge-inactive, .badge-pending, .badge-unpaid { background: #fbe9d8; color: var(--warn); }
.badge-dept { background: var(--blush, #f6e3e7); color: var(--ink, inherit); text-transform: capitalize; }
.badge-partial { background: #e3edfa; color: #2b5fa8; }
.badge-cancelled, .badge-rejected { background: #f7e0df; color: var(--danger); }

.cards-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card { background: var(--cream-soft); border-radius: var(--radius-md); padding: 16px 18px; }
.stat-card .num { font-family: var(--font-display); font-size: 30px; color: var(--rose-deep); }
.stat-card .lbl { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }

.split-panel { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; flex: 1; min-height: 0; }
.sub-block { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; overflow-y: auto; }
.sub-block h3 { font-size: 15.5px; margin-bottom: 12px; }

/* chat */
.chat-shell { display: grid; grid-template-columns: 260px 1fr; flex: 1; min-height: 0; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.chat-list-panel { display: flex; flex-direction: column; min-height: 0; background: var(--cream-soft); border-right: 1px solid var(--line); }
.chat-search { display: flex; align-items: center; gap: 7px; margin: 10px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--ink-soft); }
.chat-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; font-size: 12px; color: var(--ink); }
.chat-list { background: var(--cream-soft); overflow-y: auto; border-right: 1px solid var(--line); }
.chat-list .convo { display: flex; gap: 10px; align-items: center; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid var(--line); position: relative; }
.chat-list .convo:hover, .chat-list .convo.active { background: var(--cream); }
.chat-list .convo .name { font-size: 13.5px; font-weight: 600; }
.chat-list .convo .preview { font-size: 11.5px; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.chat-list .convo .preview.unread { color: var(--ink); font-weight: 600; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); border: 2px solid var(--cream-soft); position: absolute; bottom: -1px; right: -1px; }
.status-dot.online { background: #3fb950; }
.unread-badge { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); flex-shrink: 0; margin-left: auto; }
.chat-head-status { font-size: 11.5px; font-weight: 400; color: var(--ink-soft); }
.chat-head-status.online { color: #2b8a3e; }
.chat-main { display: flex; flex-direction: column; min-height: 0; }
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 14px; background: #fff; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 70%; padding: 10px 14px; border-radius: 16px; font-size: 13.5px; line-height: 1.4; }
.msg.in { align-self: flex-start; background: var(--cream-soft); border-bottom-left-radius: 4px; }
.msg.out { align-self: flex-end; background: var(--rose); color: #fff; border-bottom-right-radius: 4px; }
.msg .meta { font-size: 10px; opacity: .65; margin-top: 4px; display: block; }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line); }
.chat-input input { flex: 1; padding: 11px 16px; border-radius: 999px; border: 1.5px solid var(--line); font-size: 13.5px; }
.chat-input input:focus { outline: none; border-color: var(--rose); }
.chat-input button:disabled { opacity: .45; cursor: not-allowed; }
.chat-connection { min-height: 18px; padding: 0 16px 8px; font-size: 11px; color: var(--ink-soft); }
.chat-connection[data-state="error"], .chat-connection[data-state="offline"] { color: var(--danger, #b3261e); }
.chat-connection[data-state="delivered"] { color: #2b8a3e; }
#chatAddUserBtn { width: 36px; height: 36px; min-width: 36px; padding: 0; display: inline-grid; place-items: center; border-radius: 50%; }
#chatAddUserBtn svg { width: 18px; height: 18px; }

/* promos */
.promo-form { display: flex; gap: 14px; margin-bottom: 18px; background: var(--cream-soft); padding: 16px; border-radius: var(--radius-md); align-items: flex-end; flex-wrap: wrap; }
.promo-form .field { flex: 1; min-width: 180px; margin-bottom: 0; }
.upload-box {
  width: 90px; height: 70px; border: 1.5px dashed var(--rose); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--rose-deep);
  position: relative; text-align: center; background: #fff; overflow: hidden;
}
.upload-box img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.upload-box input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.promo-list { flex: 1; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; align-content: start; }
.promo-card { border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; background: #fff; }
.promo-card-clickable { display: block; width: 100%; padding: 0; color: inherit; text-align: left; cursor: pointer; transition: transform .18s, box-shadow .18s, border-color .18s; }
.promo-card-clickable:hover, .promo-card-clickable:focus-visible { transform: translateY(-3px); border-color: var(--rose); box-shadow: var(--shadow-soft); outline: none; }
.promo-card .ph { height: 110px; background: var(--cream); display: flex; align-items: center; justify-content: center; color: var(--rose-deep); font-size: 12px; }
.promo-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.promo-card .body { padding: 12px 14px; }
.promo-card h4 { font-size: 14.5px; margin-bottom: 4px; }
.promo-card p { font-size: 12px; color: var(--ink-soft); line-height: 1.4; margin-bottom: 8px; }
.promo-card .del { color: var(--danger); font-size: 11.5px; font-weight: 600; }
.promo-card .body { display: block; }
.promo-card .body strong, .promo-card .body span, .promo-card .body small { display: block; }
.promo-card .body strong { font-family: var(--font-display); font-size: 15px; color: var(--rose-deep); margin-bottom: 4px; }
.promo-card .body span { font-size: 12px; color: var(--ink-soft); line-height: 1.4; margin-bottom: 7px; }
.promo-card .body small { color: var(--terracotta); font-size: 11px; font-weight: 600; }
.promo-details-modal { max-width: 560px; }
.promo-detail-grid { display: grid; grid-template-columns: minmax(130px, .8fr) 1.2fr; gap: 9px 14px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--cream-soft); font-size: 12.5px; }
.promo-detail-grid span { color: var(--ink-soft); }
.promo-detail-grid strong { color: var(--ink); text-align: right; overflow-wrap: anywhere; }
.promo-terms { margin: 14px 0; color: var(--ink-soft); font-size: 12px; line-height: 1.5; }
.promo-active-toggle { display: flex; align-items: center; gap: 8px; width: 100%; color: var(--ink-soft); font-size: 12px; margin-bottom: 12px; }
.promo-active-toggle input { width: auto; accent-color: var(--rose); }
.promo-applied { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 10px 0; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--success); background: #edf6eb; font-size: 12px; }
.promo-applied button { color: var(--danger); font-weight: 600; font-size: 11px; }
.promo-error { margin: 10px 0; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--danger); background: #fbe9d8; font-size: 12px; }
.promo-discount-row { color: var(--success); }
.sidebar-close { display: none; }

/* feedback list */
.feedback-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.feedback-item { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; }
.feedback-item + .feedback-item { margin-top: 12px; }
.feedback-item .top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.feedback-item .stars { color: var(--terracotta); font-size: 14px; }
.feedback-item .name { font-weight: 600; font-size: 13.5px; }
.feedback-item .when { font-size: 11px; color: var(--ink-soft); }
.feedback-item p { font-size: 13px; color: var(--ink-soft); line-height: 1.5; }

/* =========================== SECTION HEADER (Feedback / Contact) =========================== */
.section-header { text-align: center; margin-bottom: 26px; }
.section-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 600;
  letter-spacing: 1.5px; text-transform: uppercase; color: var(--rose-deep); margin-bottom: 10px;
}
.section-eyebrow::before, .section-eyebrow::after { content: ''; width: 22px; height: 1px; background: var(--rose-deep); }
.section-header h2 { font-family: var(--font-display); font-size: 32px; color: var(--ink); margin-bottom: 8px; }
.section-header .sub { font-size: 13.5px; color: var(--ink-soft); max-width: 460px; margin: 0 auto; }
.section-squiggle { text-align: center; color: var(--rose); opacity: .55; font-size: 15px; margin-top: 10px; letter-spacing: 2px; }
.section-header.on-dark .section-eyebrow, .section-header.on-dark .section-eyebrow::before, .section-header.on-dark .section-eyebrow::after { color: var(--cream); background: var(--cream); }
.section-header.on-dark h2 { color: #fff; }
.section-header.on-dark .sub { color: rgba(255,255,255,.72); }

/* =========================== FEEDBACK MODAL (form left, list right) =========================== */
.feedback-panel { display: grid; grid-template-columns: 1fr 1.25fr; gap: 22px; height: 420px; }
.feedback-panel .sub-block h3 { font-family: var(--font-display); font-size: 19px; margin-bottom: 4px; }
.feedback-panel .sub-block .block-note { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 16px; }

/* =========================== CONTACT MODAL (dark, form left, info card right) =========================== */
.contact-panel {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px;
  background: linear-gradient(135deg, #a84d75 0%, #913b62 100%); border-radius: var(--radius-lg); padding: 28px;
}
.contact-panel .field label { color: rgba(255,255,255,.75); }
.contact-panel .field input, .contact-panel .field textarea { background: rgba(255,255,255,.95); border: none; }
.contact-info-card {
  background: rgba(62, 13, 41, .28); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius-md);
  padding: 20px; color: #fff;
}
.contact-info-card h3 { font-family: var(--font-display); font-size: 18px; color: #fff; margin-bottom: 14px; }
.contact-info-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; margin-bottom: 12px; color: rgba(255,255,255,.9); }
.contact-info-row .glyph { flex-shrink: 0; width: 18px; text-align: center; opacity: .85; }
.modal-menu { max-width: 920px; max-height: 90dvh; overflow: hidden; display: flex; flex-direction: column; }
.modal-menu > .modal-close { position: absolute; top: 24px; right: 24px; margin: 0; }
.modal-menu > .section-header { flex: 0 0 auto; padding-right: 42px; }
.menu-location-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 18px 0; padding: 16px 18px; border-radius: var(--radius-md); background: var(--cream-soft); color: var(--ink); }
.menu-location-card div { display: grid; gap: 4px; }
.menu-location-card strong { color: var(--rose-deep); font-family: var(--font-display); font-size: 20px; }
.menu-location-card span { font-size: 12.5px; color: var(--ink-soft); }
.menu-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  /* Fix: prevent grid from stretching each cell to match its sibling's height.
     Without this, overflow:hidden on .menu-table-section clips the expanded
     accordion panel on desktop because the section can't grow past the row size. */
  align-items: start;
  align-content: start;
}
.menu-table-section { min-width: 0; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.menu-table-wide { grid-column: 1 / -1; }
.menu-offers { grid-column: auto; }
.menu-table-heading { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; color: var(--ink); text-align: left; background: var(--cream-soft); border-bottom: 1px solid var(--line); }
.menu-table-heading > span { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.menu-table-heading strong { color: var(--rose-deep); font-family: var(--font-display); font-size: 21px; font-weight: 600; }
.menu-table-heading small { color: var(--ink-soft); font: 11px var(--font-body); }
.menu-table-heading svg { flex: 0 0 auto; color: var(--rose); transition: transform .22s ease; }
.menu-table-heading[aria-expanded="true"] svg { transform: rotate(180deg); }
.menu-table-panel {
  display: block;
  max-height: 2000px;
  overflow: hidden;
  opacity: 1;
  transition: max-height .24s ease, opacity .2s ease;
}
.menu-table-panel[hidden] { display: block; max-height: 0; opacity: 0; }
.menu-table-scroll { overflow-x: auto; }
.menu-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.menu-table th, .menu-table td { padding: 8px 12px; border-bottom: 1px solid #f0e4e3; vertical-align: top; }
.menu-table thead th { color: var(--ink-soft); background: #fffaf7; font-size: 10px; font-weight: 600; letter-spacing: .55px; text-align: left; text-transform: uppercase; }
.menu-table thead th:not(:first-child), .menu-table td:not(:first-child) { text-align: right; white-space: nowrap; }
.menu-table td:first-child { color: var(--ink); }
.menu-table tbody tr:last-child td { border-bottom: 0; }
.menu-table .menu-subhead th { padding-top: 12px; color: var(--terracotta); font-family: var(--font-display); font-size: 14px; font-weight: 600; text-align: left; text-transform: none; background: #fffaf7; }
.menu-table .menu-subhead th:not(:first-child) { text-align: left; }
.menu-offers .menu-table td:nth-child(2) { text-align: left; white-space: normal; }
.menu-offers .menu-table td:last-child { color: var(--rose-deep); font-weight: 600; }
.menu-note { margin: 0; padding: 11px 14px; color: var(--ink-soft); background: #fffaf7; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.45; }
.social-links { display: flex; gap: 10px; margin-top: 18px; }
.social-badge {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.14);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: #fff;
  border: 1px solid rgba(255,255,255,.2);
}
.social-badge img { width: 22px; height: 22px; object-fit: contain; }
.social-badge svg { width: 17px; height: 17px; }
.social-badge:hover { background: rgba(255,255,255,.26); }
.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; }
.promo-admin-item { display: flex; flex-direction: column; min-width: 0; }
.promo-admin-actions { display: flex; align-items: stretch; gap: 8px; padding: 10px 2px 0; }
.promo-admin-actions .del { flex: 1; min-height: 34px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--rose-deep); font: 600 11.5px var(--font-body); transition: background .18s, border-color .18s, color .18s, transform .18s; }
.promo-admin-actions .del:hover { transform: translateY(-1px); border-color: var(--rose); background: var(--cream-soft); }
.promo-admin-actions [data-toggle-promo] { color: var(--warn); }
.promo-admin-actions [data-del-promo] { color: var(--danger); }

@media (max-width: 720px) {
  .feedback-panel, .contact-panel { grid-template-columns: 1fr; }
  .menu-location-card { align-items: flex-start; flex-direction: column; }
  .menu-tables { grid-template-columns: 1fr; }
  .menu-table-wide { grid-column: auto; }
}

/* toast */
.toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink);
  color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 13.5px; opacity: 0; pointer-events: none; transition: all .25s; z-index: 400; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; color: var(--ink-soft); text-align: center; }
.empty-state .glyph { font-size: 34px; color: var(--cream); }

footer.mini { margin-top: auto; padding: 12px 40px calc(12px + env(safe-area-inset-bottom)); text-align: center; font-size: 11.5px; color: var(--ink-soft); border-top: 1px solid var(--line); }

/* auth page (used by staff/admin/receptionist login is modal-based on landing, but reset flows reuse .authpage on other files if needed) */
.center-page { height: 100vh; height: 100dvh; display: flex; align-items: center; justify-content: center; background: var(--cream-soft); }

/* misc */
.pill-note { background: var(--cream-soft); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12px; color: var(--ink-soft); margin-bottom: 14px; }
.tag-status { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }

/* =========================== RESPONSIVE =========================== */

/* ---------- TABLET: dashboard sidebar collapses to icon rail ---------- */
@media (max-width: 980px) {
  /* Keep every dashboard module reachable at tablet widths. The previous
     icon-only rail hid labels and, because the menu toggle lived inside the
     transformed sidebar, could leave the whole module navigation invisible. */
  .dash { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 280px);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 18px;
    z-index: 70;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.16);
    align-items: stretch;
    overflow-y: auto;
    padding-bottom: 92px;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand { display: flex; margin-top: 34px; }
  .sidebar-close { display: flex; position: absolute; top: 16px; right: 16px; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 50%; color: #fff; background: rgba(255,255,255,.14); z-index: 3; }
  .sidebar-close:hover, .sidebar-close:focus-visible { background: rgba(255,255,255,.28); outline: 2px solid #fff; outline-offset: 2px; }
  .sidebar .brand .word,
  .sidebar nav button span.lbl,
  .sidebar .logout-btn span.lbl { display: inline; }
  .sidebar nav { flex-direction: column; width: 100%; justify-content: flex-start; flex: 1; }
  .sidebar nav button { justify-content: flex-start; }
  .sidebar .logout-btn { justify-content: flex-start; }
  /* Keep logout above mobile browser controls instead of allowing the
     flex column to place it underneath the visual viewport. */
  .sidebar .logout-btn {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: max(48px, env(safe-area-inset-bottom));
    z-index: 2;
    margin: 0;
    background: linear-gradient(180deg, rgba(138,61,95,.2), rgba(138,61,95,.82));
    border-radius: var(--radius-sm);
    flex: none;
  }
  .dashboard-nav-toggle {
    display: flex;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 80;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--rose);
    color: #fff;
    box-shadow: var(--shadow-soft);
  }
  .dashboard-nav-toggle svg { width: 22px; height: 22px; }
  .dashboard-nav-scrim { display: none; position: fixed; inset: 0; z-index: 60; background: rgba(30, 18, 25, .36); }
  .dashboard-nav-scrim.show { display: block; }
  .topbar { padding-left: 72px; }
  .topbar h1 {
    min-width: 0;
    font-size: clamp(18px, 4vw, 22px);
    line-height: 1.15;
    overflow-wrap: anywhere;
  }
  .cards-row { grid-template-columns: repeat(2, 1fr); }
  .split-panel { grid-template-columns: 1fr; }
  .service-grid { grid-template-columns: repeat(2, minmax(180px, 1fr)); }
  .chat-shell { grid-template-columns: 220px 1fr; }
  html, body { overflow-y: auto; }
}

/* ---------- TABLET: landing nav starts collapsing into a hamburger ---------- */
@media (max-width: 860px) {
  .navbar { padding: 14px 20px; }
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    width: min(78vw, 300px);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 90px 20px 20px;
    box-shadow: -8px 0 24px rgba(0,0,0,.12);
    transform: translateX(100%);
    transition: transform .25s ease;
    z-index: 70;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links button {
    width: 100%;
    justify-content: flex-start;
    padding: 14px 16px;
    border-radius: 12px;
  }
  .nav-links button svg { width: 18px; height: 18px; }
  .nav-links .btn-login { justify-content: center; margin-top: 8px; }

  .hero-copy h1 { font-size: 36px; }
  .service-grid { grid-template-columns: 1fr 1fr; gap: 16px; }
}

/* ---------- PHONE ---------- */
@media (max-width: 600px) {
  .brand .word { font-size: 19px; }
  .brand .word small { font-size: 9px; letter-spacing: 2px; }

  .hero { padding: 20px 20px 30px; }
  .hero-copy h1 { font-size: clamp(26px, 8vw, 32px); }
  .hero-copy p { font-size: 14px; }
  .service-grid { grid-template-columns: 1fr; gap: 14px; }
  /* Cards were still using the desktop 260px height here — full-width AND
     tall meant each one dominated the whole screen, forcing a lot of
     scrolling just to see Salon/Nails/Spa. Shrinking the height and
     scaling the overlay text/button down together keeps it readable
     without looking sparse inside a smaller card. */
  .service-card { height: 150px; }
  .service-card .overlay { padding: 14px; }
  .service-card .overlay h3 { font-size: 18px; margin-bottom: 8px; }
  .service-card .overlay .btn { padding: 7px 16px; font-size: 12.5px; }

  .cards-row { grid-template-columns: 1fr; }

  .dash { grid-template-columns: 1fr; height: auto; min-height: 100vh; min-height: 100dvh; }
  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(82vw, 280px);
    height: 100vh;
    height: 100dvh;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 18px;
    z-index: 70;
    transform: translateX(-105%);
    transition: transform .25s ease;
    box-shadow: 8px 0 24px rgba(0,0,0,.16);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar .brand { display: flex; margin-top: 34px; }
  .sidebar nav { flex-direction: column; width: 100%; justify-content: flex-start; flex: 1; }
  .sidebar nav button { padding: 12px 14px; justify-content: flex-start; }
  .sidebar nav button span.lbl, .sidebar .logout-btn span.lbl { display: inline; }
  .sidebar .logout-btn { border-top: 1px solid rgba(255,255,255,0.18); margin: 0; padding: 12px 14px; justify-content: flex-start; }
  .dashboard-nav-toggle {
    display: flex;
    position: fixed;
    top: 14px;
    left: 14px;
    z-index: 80;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--rose);
    color: #fff;
    box-shadow: var(--shadow-soft);
  }
  .dashboard-nav-toggle svg { width: 22px; height: 22px; }
  .dashboard-nav-scrim { display: none; position: fixed; inset: 0; z-index: 60; background: rgba(30, 18, 25, .36); }
  .dashboard-nav-scrim.show { display: block; }
  .topbar { padding-left: 72px; }
  .main-area { padding-bottom: 0; }

  .topbar { padding: 14px 18px 14px 72px; flex-wrap: wrap; gap: 10px; }
  .topbar h1 {
    font-size: clamp(17px, 5vw, 20px);
    line-height: 1.1;
    max-width: calc(100vw - 110px);
  }
  .panel-wrap { padding: 16px 18px 20px; }

  .toolbar { flex-direction: column; align-items: stretch; }
  .search-bar { max-width: none; }

  .table-wrap {
    overflow-x: visible; border: none; border-radius: 0;
  }
  /* Responsive table -> stacked cards. Horizontal-scroll tables hide the
     Actions column off-screen with no visual hint it's there — this is
     what made buttons "not easily viewable" on phones. Each row becomes
     its own card instead; every cell shows its column name (from the
     data-label attribute each render function already sets) as a small
     label next to (or above, for multi-button cells) its value. */
  table { min-width: 0; }
  thead { display: none; }
  table, tbody, tr, td { display: block; width: 100%; }
  tbody tr {
    margin-bottom: 12px; padding: 12px 14px; background: #fff;
    border: 1px solid var(--line); border-radius: var(--radius-md);
  }
  tbody tr.empty-row { text-align: center; color: var(--ink-soft); padding: 24px 14px; }
  td {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    padding: 8px 0; border-bottom: 1px solid var(--cream-soft); text-align: right; font-size: 13px;
  }
  tr.empty-row td { display: block; border-bottom: none; padding: 0; text-align: center; }
  td:last-child { border-bottom: none; padding-bottom: 0; }
  td::before {
    content: attr(data-label); flex-shrink: 0; text-align: left;
    font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft);
  }
  /* Cells with more than one button/control (Actions, and the customer
     bookings Payment cell) read better stacked under their label than
     squeezed onto one line. */
  td.row-actions {
    flex-direction: column; align-items: stretch; justify-content: flex-start; gap: 8px;
  }
  td.row-actions::before { text-align: center; margin-bottom: 2px; }
  td.row-actions button, td.row-actions select { width: 100%; }

  /* Every modal used to stretch edge-to-edge on phones (.modal-overlay had
     no side padding and .modal was width:100%) — this is what made the
     login panel feel like it was "occupying the entire screen" instead of
     looking like a card floating over the page. */
  .modal-overlay { padding: 20px 16px; align-items: flex-start; padding-top: 8vh; }
  .modal { max-height: 84vh; }

  /* ---- Booking modal: scrollable step body on mobile ----
     The modal becomes a flex column. The h2/sub/step-track
     sit at the top (flex:0), the active step content scrolls
     in the middle (flex:1 + overflow-y:auto), and the
     Back/Continue buttons inside the step stay visible at
     the bottom because they are part of the scrollable area
     but the step itself has enough height to never clip them. */
  #modalBooking.modal-overlay { padding-top: 4vh; }
  #modalBooking .modal {
    display: flex;
    flex-direction: column;
    max-height: 92vh;
    max-height: 92dvh;
    padding-bottom: 0;
    overflow-y: hidden;
  }
  #modalBooking .modal > .modal-close { flex: 0 0 auto; }
  #modalBooking .modal > h2 { flex: 0 0 auto; }
  #modalBooking .modal > .sub { flex: 0 0 auto; }
  #modalBooking .modal > .step-track { flex: 0 0 auto; }
  #modalBooking .booking-step.active {
    flex: 1 1 auto;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
    /* Give a minimum height so short steps don't collapse */
    min-height: 0;
  }

  .chat-shell { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .chat-list-panel { max-height: 190px; border-right: none; border-bottom: 1px solid var(--line); }
  .chat-list { border-right: none; }
  .schedule-row > span { font-size: 0; }
  .schedule-row > span::after { content: attr(data-short); font-size: 13px; }
  .msg { max-width: 86%; }

  .promo-form { flex-direction: column; align-items: stretch; }
  .promo-list { grid-template-columns: 1fr; }

  .field-row { flex-direction: column; gap: 0; }
  .booking-payment-actions { min-width: 250px; align-items: stretch; }
  .specialty-options { grid-template-columns: 1fr; }
  .modal { padding: 22px 20px; max-height: 92vh; }
  /* Keep the booking modal's inner padding consistent on the flex children */
  #modalBooking .modal { padding: 22px 20px 0; }
  .modal h2 { font-size: 22px; }

  .btn { padding: 11px 20px; font-size: 13.5px; }
  h1, .hero h1 { font-size: clamp(24px, 7vw, 34px); }

  footer.mini { padding: 12px 20px; }
}

/* ---------- SMALL PHONE ---------- */
@media (max-width: 1024px) {
  .panel-wrap { padding-left: 24px; padding-right: 24px; }
  .table-wrap { overflow-x: auto; }
  table { min-width: 760px; }
  .toolbar h2 { font-size: 17px !important; }
  .booking-payment-actions { min-width: 160px; }
  .payment-method-select, .pay-down-btn { max-width: 100%; }
}

@media (max-width: 768px) {
  .panel-wrap { padding: 18px 20px 22px; }
  .toolbar { align-items: stretch; }
  .search-bar { max-width: none; }
  .table-wrap { overflow-x: visible; }
  table { min-width: 0; }
  .services-summary-preview { max-width: 52vw; }
  .service-details-modal { width: min(100%, 560px); }
  .field-row { gap: 0; }
  .booking-payment-actions { flex-direction: column; align-items: stretch; }
  .booking-payment-actions > * { width: 100%; }
  .payment-method-select, .pay-down-btn, .add-services-btn { min-height: 38px; }
}

@media (max-width: 480px) {
  html, body { overflow-y: auto; }
  .hero { padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
  .panel-wrap { padding: 14px 12px 18px; }
  .topbar { padding-right: 12px; }
  .profile-chip .who { display: none; }
  .toolbar { margin-bottom: 12px; }
  td { font-size: 12.5px; }
  td::before { font-size: 10px; }
  tbody tr { padding: 10px 11px; }
  .services-summary { width: 100%; }
  .services-summary-btn { width: 100%; justify-content: space-between; }
  .services-summary-preview { max-width: 100%; }
  .service-detail-row { align-items: flex-start; flex-direction: column; gap: 6px; }
  .service-detail-row > span { text-align: left; }
  .modal-overlay { padding-left: 10px; padding-right: 10px; }
  .modal { padding: 20px 16px; }
  /* Booking modal flex-column override: keep zero bottom-padding so the
     scrollable step fills the remaining height without adding dead space. */
  #modalBooking .modal { padding: 20px 16px 0; max-height: 94vh; max-height: 94dvh; }
  #modalBooking .booking-step.active {
    padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  }
  .modal-menu {
    height: 90dvh;
    max-height: 90dvh;
    padding: 18px 12px calc(18px + env(safe-area-inset-bottom));
  }
  .modal-menu > .modal-close { top: 16px; right: 12px; }
  .modal-menu > .section-header { padding-right: 38px; }
  .modal-menu .menu-location-card { margin: 14px 0; padding: 14px; }
  .modal-menu .menu-location-card .btn { width: 100%; }
  .modal-menu .menu-tables {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 10px;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    padding-right: 0;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }
  .modal-menu .menu-table-wide { grid-column: auto; }
  .modal-menu .menu-table-heading { padding: 12px 13px; }
  .modal-menu .menu-table-heading strong { font-size: 20px; }
  .modal-menu .menu-table-heading small { font-size: 10.5px; }
  .modal-menu .menu-table { display: block; font-size: 12px; }
  .modal-menu .menu-table tbody { display: block; }
  .modal-menu .menu-table tbody tr:not(.menu-subhead) {
    display: grid; grid-template-columns: minmax(0, 1fr) max-content; align-items: baseline;
    gap: 4px 12px; margin: 0; padding: 9px 12px; border: 0; border-bottom: 1px solid var(--cream-soft); border-radius: 0;
  }
  .modal-menu .menu-table tbody tr:not(.menu-subhead) td { display: block; width: auto; padding: 0; border: 0; text-align: left; font-size: 12px; }
  .modal-menu .menu-table tbody tr:not(.menu-subhead) td:not(:first-child) { text-align: right; white-space: nowrap; color: var(--rose-deep); }
  .modal-menu .menu-table tbody tr:not(.menu-subhead) td::before { display: none; }
  .modal-menu .menu-table tbody tr.menu-subhead { display: block; margin: 0; padding: 9px 12px 5px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: #fffaf7; }
  .modal-menu .menu-table tbody tr.menu-subhead th { display: block; padding: 0; border: 0; font-size: 13px; }
  .modal-menu .menu-table tbody tr.menu-subhead th:not(:first-child) { display: none; }
  .modal-menu .menu-table thead { display: none; }
  .modal-menu .menu-table tbody tr:not(.menu-subhead):has(td:nth-child(4)) { grid-template-columns: minmax(0, 1fr) repeat(3, max-content); }
  .modal-menu .menu-table tbody tr:not(.menu-subhead) td[colspan] { grid-column: 2 / -1; }
  .modal-menu .menu-offers .menu-table tbody tr:not(.menu-subhead) { grid-template-columns: minmax(0, 1fr) max-content; }
  .modal-menu .menu-offers .menu-table tbody tr:not(.menu-subhead) td:nth-child(2) { grid-column: 1; grid-row: 2; text-align: left; color: var(--ink-soft); font-size: 11px; line-height: 1.35; white-space: normal; }
  .modal-menu .menu-offers .menu-table tbody tr:not(.menu-subhead) td:nth-child(3) { grid-column: 2; grid-row: 1; }
}

@media (max-width: 380px) {
  .navbar { padding: 12px 14px; }
  .nav-links { width: 88vw; padding: 84px 16px 16px; }
  .brand .mark { width: 32px; height: 32px; font-size: 15px; }
  .brand-logo { width: 38px; height: 38px; }
  .sidebar nav button .lbl { display: none; }
  .cards-row .stat-card { padding: 12px 14px; }
}
/* Privacy and terms consent */
.consent-check { display:flex; align-items:flex-start; gap:8px; margin-top:14px; color:var(--ink-soft); font-size:12px; line-height:1.55; text-transform:none; }
.consent-check input { width:auto; margin-top:3px; flex:0 0 auto; }
.legal-link { border:0; padding:0; background:none; color:var(--rose); text-decoration:underline; cursor:pointer; font:inherit; }
.modal-legal { max-width:640px; max-height:80vh; overflow:auto; }
.legal-copy { color:var(--ink-soft); font-size:13px; line-height:1.7; }
.legal-copy li { margin:7px 0; }
.google-link-card { display:flex; flex-direction:column; gap:5px; padding:12px; margin:14px 0; border:1px solid var(--line); border-radius:10px; background:var(--surface, #fff); color:var(--ink-soft); font-size:12px; }
.google-link-card strong { color:var(--ink); font-size:13px; }
.google-link-card .btn { align-self:flex-start; margin-top:4px; }

/* ===================================================================
   v3 ADDITIONS — calendar, history, reschedule/cancel dialogs,
   standardized close button, shared form states.
   =================================================================== */
.muted { color: var(--ink-soft); font-size: 13px; }
.cap { text-transform: capitalize; }
.form-error { color: var(--danger); font-size: 13px; margin: 8px 0; }
.notice-box { background: var(--cream-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; font-size: 13px; color: var(--ink); margin: 10px 0; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.badge-done, .badge-confirmed { background: #e4f0e3; color: var(--success); }
.data-table { width: 100%; border-collapse: collapse; }
.detail-list { display: grid; grid-template-columns: max-content 1fr; gap: 8px 16px; font-size: 14px; }
.detail-list dt { color: var(--ink-soft); }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }

/* ---- Standardized close (X) button: always the same corner, same size, never moves with content ---- */
.modal > .modal-close, .modal > * > .modal-close { position: sticky; top: 0; float: right; z-index: 6; width: 40px; height: 40px; min-width: 40px; margin: -10px -12px -30px auto; border: 0; border-radius: 50%; background: var(--cream-soft); color: var(--ink-soft); display: inline-flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; cursor: pointer; }
.modal-close:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.modal h2 { padding-right: 36px; overflow-wrap: anywhere; }
.modal-body { min-width: 0; }
.confirm-logout-actions { flex-wrap: wrap; }

/* ---- Reschedule dialog ---- */
.rs-services { border: 0; padding: 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.rs-services legend { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
.rs-group { margin-bottom: 10px; width: 100%; }
.rs-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-top: 6px; cursor: pointer; text-transform: none; font-size: 14px; color: var(--ink); }
.rs-row input { width: auto; flex: 0 0 auto; }
.rs-name { flex: 1 1 140px; min-width: 0; overflow-wrap: anywhere; }
.rs-meta { color: var(--ink-soft); font-size: 12.5px; white-space: nowrap; }
.reschedule-compare { display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: center; background: var(--cream-soft); border-radius: var(--radius-md); padding: 14px; margin: 14px 0 8px; }
.reschedule-compare h4 { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 4px; }
.reschedule-compare .arrow { font-size: 22px; color: var(--rose); }

/* ---- History tables ---- */
.history-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
.history-toolbar input, .history-toolbar select { flex: 1 1 160px; min-width: 0; height: 40px; padding: 0 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: inherit; }
.history-pager { display: flex; align-items: center; justify-content: center; gap: 14px; padding: 12px 0; flex-wrap: wrap; }
.history-page { font-size: 13px; color: var(--ink-soft); }

/* ---- Staff calendar ---- */
.cal { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.cal-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.cal-nav, .cal-views { display: flex; gap: 6px; flex-wrap: wrap; }
.cal-title { font-size: 20px; flex: 1 1 200px; text-align: center; min-width: 0; overflow-wrap: anywhere; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; color: var(--ink-soft); }
.cal-legend .lg::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-avail::before { background: #e4f0e3; border: 1px solid #b7d3b5; }
.lg-busy::before { background: var(--rose); }
.lg-off::before { background: repeating-linear-gradient(45deg, #ddd, #ddd 3px, #f3f3f3 3px, #f3f3f3 6px); }
.cal-body { min-width: 0; }
.cal-day { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.cal-timeline { position: relative; border-left: 1px solid var(--line); margin-left: 64px; min-width: 0; }
.cal-hour { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--line); }
.cal-hour span { position: absolute; left: -64px; top: -8px; width: 56px; text-align: right; font-size: 11px; color: var(--ink-soft); }
.cal-avail { position: absolute; left: 0; right: 0; background: #e4f0e3; opacity: .55; }
.cal-avail span { font-size: 11px; color: var(--success); padding: 2px 8px; }
.cal-dayoff { padding: 14px; color: var(--ink-soft); font-size: 13px; }
.cal-timeoff { position: absolute; left: 0; right: 0; background: repeating-linear-gradient(45deg, #ddd, #ddd 6px, #f3f3f3 6px, #f3f3f3 12px); font-size: 12px; color: #555; padding: 4px 8px; overflow: hidden; }
.cal-block { position: absolute; left: 6px; right: 6px; overflow: hidden; }
.cal-block .cal-appt { height: 100%; }
.cal-appt { display: flex; flex-direction: column; gap: 1px; width: 100%; text-align: left; border: 0; border-left: 4px solid var(--rose); border-radius: 8px; background: #fff; box-shadow: var(--shadow-soft); padding: 6px 10px; cursor: pointer; font: inherit; color: var(--ink); overflow: hidden; }
.cal-appt.status-done { border-left-color: var(--success); }
.cal-appt.status-cancelled { border-left-color: var(--danger); opacity: .6; }
.cal-appt-time { font-size: 12px; font-weight: 600; }
.cal-appt-name { font-size: 13px; overflow-wrap: anywhere; }
.cal-appt-svc { font-size: 11.5px; color: var(--ink-soft); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-agenda { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.cal-col { background: var(--cream-soft); border-radius: var(--radius-sm); padding: 8px; display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 120px; }
.cal-col.today { outline: 2px solid var(--rose); }
.cal-col header { font-size: 12.5px; color: var(--ink-soft); }
.cal-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-dow { text-align: center; font-size: 12px; color: var(--ink-soft); padding: 4px 0; }
.cal-cell { aspect-ratio: 1 / 0.8; min-height: 44px; background: var(--cream-soft); border: 0; border-radius: 8px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font: inherit; color: var(--ink); }
.cal-cell.other { opacity: .4; }
.cal-cell.today { outline: 2px solid var(--rose); }
.cal-cell em { font-style: normal; font-size: 11px; background: var(--rose); color: #fff; border-radius: 999px; padding: 0 7px; }
.cal-timeoff-panel { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 10px 14px; }
.cal-timeoff-panel summary { cursor: pointer; font-weight: 500; }
.cal-timeoff-panel .field-row { flex-wrap: wrap; align-items: flex-end; margin-top: 10px; }
.cal-timeoff-list { list-style: none; margin-top: 8px; font-size: 13px; }
.cal-timeoff-list li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; }

@media (max-width: 900px) {
  .cal-day { grid-template-columns: 1fr; }
  .cal-week { grid-template-columns: 1fr; }
  .cal-col { min-height: 0; }
  .reschedule-compare { grid-template-columns: 1fr; }
  .reschedule-compare .arrow { transform: rotate(90deg); justify-self: center; }
}
@media (max-width: 600px) {
  .cal-title { order: -1; flex-basis: 100%; font-size: 18px; }
  .cal-timeline { margin-left: 52px; }
  .cal-hour span { left: -52px; width: 46px; font-size: 10px; }
  .cal-timeoff-panel .field-row { flex-direction: column; align-items: stretch; }
  .history-toolbar > * { flex-basis: 100%; }
  .detail-list { grid-template-columns: 1fr; gap: 2px; }
  .detail-list dd { margin-bottom: 8px; }
}

/* ---- v3 polish from browser checks ---- */
.table-wrap { overflow-x: auto; }
.data-table th, .data-table td { white-space: normal; overflow-wrap: anywhere; }
@media (min-width: 701px) { .data-table { min-width: 640px; } }
.cal-block[data-short] .cal-appt { flex-direction: row; align-items: center; gap: 8px; padding-top: 2px; padding-bottom: 2px; }
.cal-block[data-short] .cal-appt-svc { display: none; }
.panel > .sub { margin: 4px 0 12px; color: var(--ink-soft); font-size: 13.5px; }
.modal-menu > .modal-close { top: 16px; right: 16px; }
.rs-services .rs-row { display: flex; text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); margin: 6px 0 0; }
.rs-services .rs-name { font-weight: 500; }
.rs-services .rs-meta { margin-left: auto; padding-left: 8px; }

/* ===================================================================
   v3.1 — Actions panel, booking tabs, giant customer calendar,
   packages, staff status list, schedule summary
   =================================================================== */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.dot-sep { color: var(--ink-soft); margin: 0 4px; }
.cal-jump input { height: 36px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: inherit; }

/* record tabs (Upcoming / My History / Calendar) */
.record-tabs { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.rec-tab { background: none; border: 0; padding: 8px 14px; border-radius: 999px; font: inherit; font-weight: 500; color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.rec-tab:hover { background: var(--cream-soft); }
.rec-tab.active { background: var(--cream-soft); color: var(--rose-deep, var(--rose)); box-shadow: inset 0 -2px 0 var(--rose); }
.rec-tab:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
[hidden] { display: none !important; }

/* the "Actions" pill + panel */
.actions-pill { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 22px; border: 1.5px solid var(--rose); border-radius: 999px; background: #fff; color: var(--rose-deep, var(--rose)); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.actions-pill:hover { background: var(--cream-soft); }
.actions-pill:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.actions-context { color: var(--ink-soft); font-size: 13px; margin: 0 0 14px; overflow-wrap: anywhere; }
.actions-stack { display: flex; flex-direction: column; gap: 12px; }
.actions-stack .btn { min-height: 52px; border-radius: 999px; font-weight: 600; }
/* Change Staff modal */
.change-staff-form { display: flex; flex-direction: column; gap: 12px; }
.change-staff-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--cream-soft); }
.change-staff-who { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.change-staff-who small { color: var(--ink-soft); font-size: 12px; overflow-wrap: anywhere; text-transform: capitalize; }
.change-staff-none { margin: 0; font-size: 12.5px; }
@media (max-width: 600px) { .change-staff-row { grid-template-columns: 1fr; } }
.btn-outline { background: #fff; color: var(--rose-deep, var(--rose)); border: 1.5px solid var(--rose); }
.btn-outline:hover { background: var(--cream-soft); }
.btn-outline.is-danger { color: var(--danger); border-color: var(--danger); }

/* giant month calendar for guests */
.gcal { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.gcal-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.gcal-nav { display: flex; gap: 6px; }
.gcal-title { flex: 1 1 220px; text-align: center; font-size: 28px; color: var(--rose-deep, var(--rose)); }
.gcal-pickers { display: flex; gap: 6px; }
.gcal-pickers select { height: 38px; padding: 0 10px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: inherit; }
.gcal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.gcal-dow { text-align: center; padding: 8px 0; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.gcal-cell { position: relative; min-height: 132px; background: var(--cream-soft); border: 2px solid transparent; border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 6px; overflow: hidden; cursor: pointer; min-width: 0; }
.gcal-cell.out { opacity: .45; }
.gcal-cell.today { border-color: var(--rose); }
.gcal-cell.selected { background: #fff; box-shadow: var(--shadow-soft); }
.gcal-cell:focus-visible { outline: 2px solid var(--rose); outline-offset: 2px; }
.gcal-num { font-weight: 600; font-size: 15px; }
.gcal-cell.today .gcal-num { background: var(--rose); color: #fff; border-radius: 999px; padding: 0 8px; align-self: flex-start; }
.gcal-items { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.gcal-appt { display: flex; flex-direction: column; gap: 1px; text-align: left; width: 100%; border: 0; border-left: 4px solid var(--rose); border-radius: 8px; background: #fff; box-shadow: var(--shadow-soft); padding: 5px 8px; cursor: pointer; font: inherit; color: var(--ink); min-width: 0; }
.gcal-appt.st-done { border-left-color: var(--success); opacity: .75; }
.gcal-time { font-size: 12px; font-weight: 600; }
.gcal-svc { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gcal-meta { font-size: 11px; color: var(--ink-soft); text-transform: capitalize; }
.gcal-count { display: none; }
.gcal-agenda { display: none; flex-direction: column; gap: 8px; }
.gcal-agenda h4 { font-size: 15px; }
@media (max-width: 900px) {
  .gcal-title { font-size: 22px; order: -1; flex-basis: 100%; }
  .gcal-cell { min-height: 64px; align-items: center; padding: 6px 2px; }
  .gcal-items { display: none; }
  .gcal-count { display: inline-block; background: var(--rose); color: #fff; border-radius: 999px; font-size: 11px; padding: 0 7px; }
  .gcal-agenda { display: flex; }
}

/* packages */
.package-card .ph { background: var(--cream-soft); color: var(--rose); font-family: var(--font-display, inherit); }

/* staff status list in the booking flow */
.staff-status-box { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.staff-status-box h4 { font-size: 14px; margin-bottom: 8px; }
.staff-status-list { list-style: none; display: flex; flex-direction: column; gap: 6px; padding: 0; margin: 0; }
.staff-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.ss-name { font-weight: 500; flex: 1 1 120px; overflow-wrap: anywhere; }
.ss-chip { font-size: 12px; padding: 2px 10px; border-radius: 999px; background: #e4f0e3; color: var(--success); white-space: nowrap; }
.status-busy .ss-chip { background: #fbeacc; color: #9a6a12; }
.status-unavailable .ss-chip { background: #e9e6e6; color: #666; }
.status-unavailable { opacity: .8; }
.ss-reason { font-size: 12px; color: var(--ink-soft); flex-basis: 100%; }
.duration-row { background: var(--cream-soft); border-radius: 8px; padding: 8px 10px; }
.duration-row small { color: var(--ink-soft); display: block; }

/* schedule grid helper text */
.schedule-summary { margin-top: 8px; font-size: 13px; }
.schedule-summary.is-bad { color: var(--danger); font-weight: 600; }

/* =========================== CREATE TEAM ACCOUNT =========================== */
/* Numbered section cards: 1 Account details · 2 Sign-in (Contact details for a guest) ·
   3 Department · 4 Weekly schedule, then an action bar. Hidden cards aren't counted, so a
   guest sees 1 and 2. Phones/tablets: one column. Desktop: details on the left, the
   schedule card on the right, the action bar across the bottom. */
.create-account-form { max-width: 680px; display: flex; flex-direction: column; gap: 16px; counter-reset: ca-step; }
.create-account-details { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ca-card {
  margin: 0; min-width: 0; padding: 18px 20px 16px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--radius-md); box-shadow: 0 2px 12px rgba(60, 36, 48, .04);
}
.ca-card:not([hidden]) { counter-increment: ca-step; }
.ca-card[hidden] { display: none; }
.ca-card-title,
.ca-card > legend.ca-card-title {
  display: flex; align-items: center; gap: 10px; width: 100%; margin: 0 0 14px; padding: 0;
  font-family: var(--font-body); font-size: 15px; font-weight: 600; color: var(--ink); text-transform: none; letter-spacing: 0;
}
/* A <legend> normally sits on the fieldset border; floating it puts it inside the card like a heading. */
.ca-card > legend.ca-card-title { float: left; }
.ca-card > legend.ca-card-title + * { clear: both; }
.ca-card-title::before {
  content: counter(ca-step); flex: 0 0 26px; height: 26px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rose); color: #fff; font-size: 13px; font-weight: 600;
}
.ca-card .field:last-child, .ca-card .field-row:last-child { margin-bottom: 0; }
.ca-card > .field-hint:last-child { margin-bottom: 0; }
.ca-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.ca-grid[hidden] { display: none; }
.ca-card .signin-choice { margin-bottom: 14px; }
.ca-schedule .field-hint { margin-top: 0; }
.ca-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 16px; flex-wrap: wrap;
  padding: 14px 20px; border-radius: var(--radius-md); background: var(--cream-soft); border: 1px solid var(--line);
}
.ca-actions .field-hint { margin: 0; flex: 1 1 260px; }
.ca-actions #createAcctSubmit { min-width: 220px; padding: 12px 28px; }
@media (min-width: 1100px) {
  .create-account-form {
    max-width: 1240px;
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    grid-template-areas: "details schedule" "actions actions";
    gap: 16px 20px;
    align-items: start;
  }
  .create-account-form > .create-account-details { grid-area: details; }
  .create-account-form > #createAcctScheduleField { grid-area: schedule; position: sticky; top: 12px; }
  .create-account-form > .ca-actions { grid-area: actions; }
}
@media (max-width: 600px) {
  .ca-card { padding: 16px 14px 14px; }
  .ca-grid { grid-template-columns: minmax(0, 1fr); }
  .ca-actions { padding: 14px; }
  .ca-actions #createAcctSubmit { width: 100%; min-width: 0; } /* phones: easy to tap */
}

/* =========================== MOBILE PANEL SCROLLING =========================== */
/* Tablets and phones: drop the fixed-height app shell and let the whole page
   scroll, so every panel can be reached with one natural scroll instead of
   small nested scroll boxes. Chat keeps a fixed window so its message list
   still scrolls by itself. */
@media (max-width: 980px) {
  html, body { height: auto; overflow-y: auto; }
  .dash { height: auto; min-height: 100vh; min-height: 100dvh; grid-template-rows: auto; }
  .main-area { overflow: visible; min-width: 0; }
  .panel-wrap { flex: none; overflow: visible; }
  .panel.active { flex: none; min-height: auto; }
  .table-wrap, .promo-list, .feedback-list, .sub-block, .split-panel { flex: none; overflow-y: visible; }
  .chat-shell { flex: none; height: calc(100dvh - 150px); min-height: 460px; }
}

/* =========================== APPOINTMENT LIFECYCLE =========================== */
/* Booking status badges: Booked · Confirmed · On Session · For Payment · Complete · No-show */
.badge-on_session { background: #e6eefb; color: #2f5f9e; }
.badge-for_payment { background: #fbeacc; color: #8a5a0c; }
.badge-complete { background: #e4f0e3; color: var(--success); }
.badge-no_show { background: #ece7e9; color: #6b5560; }

/* Staff live status: Available · Scheduled · Tending · Unavailable · Off Duty */
.staff-live { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.staff-live-available { background: #e4f0e3; color: var(--success); }
.staff-live-scheduled { background: #fbeacc; color: #8a5a0c; }
.staff-live-tending { background: #e6eefb; color: #2f5f9e; }
.staff-live-unavailable { background: #f7e0df; color: var(--danger); }
.staff-live-off_duty { background: #ece7e9; color: #6b5560; }

/* Booking panel team list (landing + customer dashboard) */
.status-scheduled .ss-chip { background: #fbeacc; color: #8a5a0c; }
.status-tending .ss-chip { background: #e6eefb; color: #2f5f9e; }
.status-off_duty .ss-chip { background: #ece7e9; color: #6b5560; }
.status-unavailable .ss-chip { background: #f7e0df; color: var(--danger); }
.ss-now, .ss-next { font-size: 11.5px; color: var(--ink-soft); }
.ss-now { color: #2f5f9e; font-weight: 600; }

/* ---------- Staff: Today's Sessions ---------- */
.session-status-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; font-size: 13.5px; }
.session-status-bar small { color: var(--ink-soft); }
.session-group { margin-bottom: 18px; }
.session-group h3 { font-size: 16px; color: var(--rose-deep); margin-bottom: 8px; }
.session-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; background: #fff; margin-bottom: 10px; display: flex; flex-direction: column; gap: 8px; }
.session-card.is-tending { border-color: #9cb6dd; box-shadow: 0 0 0 3px #e6eefb; }
.session-card.is-done { background: var(--cream-soft); }
.session-card > .btn { align-self: flex-start; min-width: 140px; }
.session-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.session-meta, .session-notes { font-size: 12.5px; color: var(--ink-soft); }
.session-notes { background: var(--cream-soft); padding: 6px 10px; border-radius: 8px; overflow-wrap: anywhere; }
.session-plan { margin: 0; padding-left: 18px; font-size: 13px; }
.session-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.session-checklist li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.session-checklist li.is-done { background: #f1f7f0; border-color: #cfe3cd; }
.session-checklist li.is-waived { background: #f4f1f2; opacity: .85; }
.session-checklist label { display: flex; align-items: center; gap: 10px; cursor: pointer; min-width: 0; }
.session-checklist input[type=checkbox] { width: 20px; height: 20px; accent-color: var(--rose); flex-shrink: 0; }
.session-checklist li.is-done .session-svc b { text-decoration: line-through; text-decoration-color: rgba(94, 140, 97, .6); }
.session-svc { overflow-wrap: anywhere; }
.session-when { font-size: 11.5px; color: var(--ink-soft); }

/* ---------- Front desk: Live Floor ---------- */
.floor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 16px; align-items: start; }
.floor-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; background: #fff; min-width: 0; }
.floor-wide { grid-column: 1 / -1; }
.floor-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.floor-card h3 { font-size: 16px; color: var(--rose-deep); }
.floor-notes-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 360px; overflow-y: auto; }
.floor-note { display: grid; gap: 2px; width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; font: inherit; cursor: pointer; }
.floor-note span { font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.floor-note small { font-size: 11px; color: var(--ink-soft); }
.floor-notes-list li.is-unread .floor-note { border-color: var(--rose); background: #fbf0f4; }
.floor-staff-row { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px solid var(--cream-soft); }
.floor-staff-row:last-child { border-bottom: none; }
.floor-staff-name { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.floor-staff-name small { color: var(--ink-soft); font-size: 12px; }
.floor-staff-session { font-size: 12.5px; color: var(--ink-soft); background: #f3f6fb; border-radius: 8px; padding: 6px 10px; }
.floor-staff-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.floor-appt { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 10px; transition: box-shadow .3s; }
.floor-appt.flash { box-shadow: 0 0 0 3px var(--rose); }
.floor-appt-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.floor-appt-head small { color: var(--ink-soft); }
.floor-alerts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.floor-alerts span { font-size: 11.5px; font-weight: 600; color: var(--danger); background: #f7e0df; border-radius: 999px; padding: 2px 10px; }
.floor-assignments { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.floor-assignments li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; padding: 6px 10px; background: var(--cream-soft); border-radius: 8px; }
.floor-assignments small { color: var(--ink-soft); }
.floor-assign-state, .appt-live-staff span { font-size: 11.5px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #ece7e9; color: #6b5560; }
.floor-assign-state.assign-tending, .appt-live-staff span.assign-tending { background: #e6eefb; color: #2f5f9e; }
.floor-assign-state.assign-done, .appt-live-staff span.assign-done { background: #e4f0e3; color: var(--success); }
.floor-payment { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 13px; padding: 8px 10px; border-radius: 8px; background: #fdf4e3; }
.floor-appt-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.floor-history { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.floor-history small { color: var(--ink-soft); }
.btn.is-danger { color: var(--danger); }

/* ---------- Customer: current appointment ---------- */
.appt-live-wrap { display: flex; flex-direction: column; gap: 12px; margin-bottom: 16px; flex: none; }
.appt-live { border: 1.5px solid var(--line); border-radius: var(--radius-md); padding: 14px 16px; background: #fff; display: flex; flex-direction: column; gap: 10px; }
.appt-live.appt-on_session { border-color: #9cb6dd; }
.appt-live.appt-for_payment { border-color: #e7c27e; }
.appt-live-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13.5px; }
.appt-live-staff, .appt-live-services { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; }
.appt-live-staff li { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.appt-live-services li { padding: 2px 10px; border-radius: 999px; background: var(--cream-soft); }
.appt-live-services li.is-done { background: #e4f0e3; color: var(--success); }
.appt-live-pay { background: #fdf4e3; border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.appt-live-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.appt-feedback { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.appt-feedback textarea { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); font: inherit; background: var(--cream-soft); }
.appt-feedback .star-row { display: flex; gap: 4px; }
.appt-feedback .star-row button { font-size: 26px; line-height: 1; color: #d9c6b4; background: none; border: 0; cursor: pointer; padding: 2px; }
.appt-feedback .star-row button.active { color: #e0a21b; }
.appt-live-thanks { color: var(--success); font-weight: 600; }

@media (max-width: 980px) {
  .floor-grid { grid-template-columns: 1fr; }
  .floor-notes-list { max-height: none; }
}
@media (max-width: 600px) {
  .session-card > .btn, .appt-live-actions .btn, .floor-appt-actions .btn { width: 100%; }
  .floor-staff-actions .btn { flex: 1 1 30%; }
}

/* Staff assignment step: how the services are staffed, and suggested times with end time + staff count */
.staff-plan-note { background: var(--cream-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 13px; margin-bottom: 10px; }
.alt-slot-row button { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.alt-slot-row button small { font-size: 11.5px; font-weight: 400; opacity: .85; }

/* Booking step 2: Nails / Salon / Spa + live Promos and Packages tabs */
#serviceCategoryTabs { overflow-x: auto; scrollbar-width: none; }
#serviceCategoryTabs::-webkit-scrollbar { display: none; }
#serviceCategoryTabs button { flex: 1 0 auto; white-space: nowrap; padding-left: 12px; padding-right: 12px; }
.offer-count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; margin-left: 4px; padding: 0 5px; border-radius: 999px; background: var(--rose); color: #fff; font-size: 10.5px; font-weight: 700; }
#serviceCategoryTabs button.active .offer-count { background: #fff; color: var(--rose-deep); }
.offer-card { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.offer-card.is-chosen { border-color: var(--rose); background: #fbf0f4; }
.offer-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.offer-badge { font-weight: 700; color: var(--terracotta); font-size: 13px; white-space: nowrap; }
.offer-badge s { font-weight: 400; color: var(--ink-soft); margin-left: 4px; }
.offer-text, .offer-meta, .offer-hint { font-size: 12.5px; color: var(--ink-soft); overflow-wrap: anywhere; }
.offer-hint { color: var(--warn); }
.offer-card .btn { align-self: flex-start; }

/* =========================== DASHBOARD REMODEL (Oct 2026) =========================== */
/* Panel headers: one consistent title style for the remodelled panels. */
.panel-head { align-items: flex-end; gap: 16px; }
.panel-head h2 { font-family: var(--font-display); font-size: 26px; color: var(--rose-deep); line-height: 1.1; }
.panel-head .sub { margin-top: 4px; max-width: 640px; }

/* ---------- Promos & Packages: shared image cards (admin + customer) ---------- */
.offer-filters { display: inline-flex; gap: 6px; padding: 4px; background: var(--cream-soft); border-radius: 999px; margin-bottom: 16px; max-width: 100%; overflow-x: auto; }
.offer-filter { padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.offer-filter span { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #fff; font-size: 11px; color: var(--rose-deep); }
.offer-filter.active { background: var(--rose); color: #fff; }
.offer-filter.active span { color: var(--rose-deep); }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; align-content: start; }
.offer-grid > .empty-state { grid-column: 1 / -1; padding: 40px 12px; }
.offer-tile { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); overflow: hidden; box-shadow: 0 6px 18px rgba(138, 61, 95, .07); transition: transform .2s, box-shadow .2s; }
.offer-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.offer-tile.is-off { opacity: .62; }
.offer-media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, #f6e5eb, var(--cream)); cursor: pointer; }
.offer-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer-media-ph { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; gap: 4px; color: var(--rose-deep); font-family: var(--font-display); font-size: 20px; }
.offer-media-ph span { font-size: 28px; opacity: .6; }
.offer-package .offer-media { background: linear-gradient(135deg, var(--cream-soft), #ecd9c4); }
.offer-kind { position: absolute; top: 10px; left: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .92); color: var(--rose-deep); font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; }
.offer-flag { position: absolute; right: 10px; bottom: 10px; padding: 5px 12px; border-radius: 999px; background: var(--rose); color: #fff; font-weight: 700; font-size: 13px; box-shadow: 0 4px 12px rgba(0, 0, 0, .15); }
.offer-flag s { opacity: .75; font-weight: 400; margin-left: 4px; }
.offer-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.offer-body h3 { font-family: var(--font-display); font-size: 20px; color: var(--ink); line-height: 1.15; }
.offer-desc { font-size: 13px; color: var(--ink-soft); overflow-wrap: anywhere; }
.offer-scope, .offer-foot { font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }
.offer-scope b { color: var(--ink); font-weight: 600; }
.offer-state { font-weight: 700; }
.offer-state.on { color: var(--success); }
.offer-state.off { color: var(--warn); }
.offer-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.offer-cta { margin-top: auto; align-self: stretch; }
.offer-hero { width: calc(100% + 64px); max-width: none; margin: -30px -32px 16px; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }

/* Customer: header banner above the grid. */
.offers-hero { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; padding: 22px 24px; margin-bottom: 18px; border-radius: var(--radius-md); background: linear-gradient(120deg, #fbf0f4, var(--cream-soft) 60%, var(--cream)); border: 1px solid var(--line); }
.offers-hero h2 { font-family: var(--font-display); font-size: 30px; color: var(--rose-deep); line-height: 1.05; }
.offers-hero .sub { margin-top: 6px; max-width: 560px; }
.offers-eyebrow { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--rose); font-weight: 700; }

/* The one "Promos and Packages" modal. */
.offer-form { display: flex; flex-direction: column; gap: 4px; }
.offer-form-top { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 18px; align-items: start; }
.offer-upload { position: relative; display: block; cursor: pointer; }
.offer-upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.offer-upload-preview { display: grid; place-content: center; text-align: center; gap: 4px; aspect-ratio: 4 / 3; border: 2px dashed var(--rose); border-radius: var(--radius-md); background: var(--cream-soft); color: var(--rose-deep); overflow: hidden; }
.offer-upload-preview > span { font-size: 26px; }
.offer-upload-preview small { color: var(--ink-soft); font-size: 11px; }
.offer-upload-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.offer-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; }
.offer-fields[hidden], .offer-form [data-only][hidden] { display: none; }
.offer-services { max-height: 260px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }

/* ---------- Team profile: one Google button ---------- */
.btn-google { display: inline-flex; align-items: center; justify-content: center; gap: 10px; margin: 6px 0 14px; background: #fff; color: var(--ink); border: 1.5px solid var(--line); font-weight: 600; }
.btn-google:hover { border-color: var(--rose); background: var(--cream-soft); }
.btn-google img { width: 20px; height: 20px; }

/* ---------- Live Floor ---------- */
.floor-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.floor-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid var(--line); background: #fff; }
.floor-stat b { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--rose-deep); }
.floor-stat span { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.floor-stat-tending { background: #f3f6fb; } .floor-stat-tending b { color: #2f5f9e; }
.floor-stat-payment { background: #fdf4e3; } .floor-stat-payment b { color: #8a5a0c; }
.floor-stat-staff { background: #f1f7f0; } .floor-stat-staff b { color: var(--success); }
.floor-grid { grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); }
.floor-side { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.floor-card { box-shadow: 0 4px 14px rgba(138, 61, 95, .05); }
.floor-staff-row { grid-template-columns: minmax(0, 1fr); }
.floor-avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--cream); color: var(--rose-deep); font-size: 12px; font-weight: 700; flex-shrink: 0; }
.seg { display: inline-flex; flex-wrap: nowrap; gap: 0; padding: 3px; border-radius: 999px; background: var(--cream-soft); border: 1px solid var(--line); max-width: 100%; }
.seg-btn { flex: 1 1 auto; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--ink-soft); white-space: nowrap; }
.seg-btn.is-on { background: #fff; color: var(--rose-deep); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.seg-btn:disabled { opacity: .45; cursor: not-allowed; }
.floor-notes-list { max-height: 420px; }

/* ---------- Customer dashboard: live card spacing ---------- */
.appt-live { box-shadow: 0 6px 18px rgba(138, 61, 95, .06); }

/* ---------- Phones & tablets ---------- */
@media (max-width: 980px) {
  .floor-grid { grid-template-columns: 1fr; }
  .floor-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .panel-head h2 { font-size: 22px; }
  .panel-head .btn { width: 100%; }
  .offer-grid { grid-template-columns: 1fr; gap: 14px; }
  .offers-hero { padding: 18px; }
  .offers-hero h2 { font-size: 24px; }
  .offers-hero .btn { width: 100%; }
  .offer-form-top { grid-template-columns: 1fr; }
  .offer-upload-preview { aspect-ratio: 16 / 9; }
  .offer-hero { width: calc(100% + 40px); margin: -22px -20px 14px; }
  .floor-stat b { font-size: 24px; }
  .seg { width: 100%; }
  .offer-actions .btn { flex: 1 1 auto; }
}

/* Sidebar brand: the real Dear Self logo instead of the "DS" initials. */
.brand img.mark-logo { width: 44px; height: 44px; padding: 0; background: #fff; object-fit: cover; border: 2px solid rgba(255, 255, 255, .55); box-shadow: 0 4px 12px rgba(0, 0, 0, .15); flex-shrink: 0; }

/* Phone/tablet slide-out menu: one close button (top right), with the logo + name on the same line. */
@media (max-width: 980px) {
  body.dashboard-nav-open .dashboard-nav-toggle { opacity: 0; pointer-events: none; }
  .dashboard-nav-toggle { transition: opacity .2s ease; }
  .sidebar .brand { margin-top: 0; min-height: 44px; padding-right: 48px; margin-bottom: 26px; }
  .sidebar-close { top: 29px; right: 18px; }
}

/* =========================== REVIEWS & STAFF RATINGS =========================== */
.stars { display: inline-flex; gap: 1px; color: #e3d2c1; font-size: 15px; letter-spacing: 1px; }
.stars .on { color: #e0a21b; }
.rating-badge { display: inline-flex; align-items: baseline; gap: 3px; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: #fdf4e3; color: #8a5a0c; font-size: 12px; font-weight: 700; white-space: nowrap; }
.rating-badge small { font-weight: 400; color: var(--ink-soft); }
.rating-badge.is-new { background: var(--cream-soft); color: var(--ink-soft); font-weight: 600; }

.review-list { display: flex; flex-direction: column; gap: 10px; }
.review-card { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.review-card.review-negative { border-left: 3px solid var(--danger); background: #fffafa; }
.review-card.review-positive { border-left: 3px solid #e0a21b; }
.review-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-bottom: 4px; }
.review-name { font-weight: 600; color: var(--ink); }
.review-when { margin-left: auto; font-size: 11.5px; color: var(--ink-soft); }
.review-flag { font-size: 11px; font-weight: 700; color: var(--danger); background: #f7e0df; border-radius: 999px; padding: 1px 8px; }
.review-card p { font-size: 13.5px; color: var(--ink-soft); overflow-wrap: anywhere; }

/* Team Feedback Record */
.review-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.review-stat { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; border-radius: var(--radius-md); border: 1px solid var(--line); background: #fff; }
.review-stat b { font-family: var(--font-display); font-size: 30px; line-height: 1; color: var(--rose-deep); }
.review-stat span { font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }
.review-stat-good { background: #f1f7f0; } .review-stat-good b { color: var(--success); }
.review-stat-bad { background: #fffafa; } .review-stat-bad b { color: var(--danger); }
.review-section { margin-bottom: 22px; }
.review-section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.review-section-head h3 { font-family: var(--font-display); font-size: 20px; color: var(--rose-deep); }
.review-section-head small { color: var(--ink-soft); font-size: 12px; }
.review-section-head .offer-filters { margin-bottom: 0; }
.staff-ratings { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.staff-rating-row { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }
.staff-rating-name small { display: block; font-size: 11.5px; color: var(--ink-soft); text-transform: capitalize; }
.staff-rating-score { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.staff-rating-score b, .my-rating b { font-family: var(--font-display); font-size: 26px; color: var(--rose-deep); line-height: 1; }
.staff-rating-score small, .my-rating span { color: var(--ink-soft); font-size: 12px; }
.staff-rating-last { font-size: 12.5px; color: var(--ink-soft); font-style: italic; overflow-wrap: anywhere; }
.my-rating { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 14px 16px; margin-bottom: 12px; border-radius: var(--radius-md); background: #fdf4e3; border: 1px solid var(--line); }
.my-rating .stars { font-size: 20px; }

/* Customer Feedback page: write on the left, positive reviews on the right */
.feedback-layout { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 24px; align-items: start; }
.feedback-write, .feedback-read { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: #fff; }
.feedback-write h3, .feedback-read h3 { font-family: var(--font-display); font-size: 20px; color: var(--rose-deep); margin-bottom: 10px; }
.feedback-read .review-list { max-height: 560px; overflow-y: auto; padding-right: 4px; }

/* End-of-visit card: rate each staff member */
.staff-rate-list { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--cream-soft); }
.staff-rate-title { font-size: 12.5px; font-weight: 600; color: var(--ink); }
.staff-rate { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 13.5px; }
.staff-rate .star-row button { font-size: 22px; }
.appt-feedback .star-row button, .staff-rate .star-row button { line-height: 1; color: #d9c6b4; background: none; border: 0; cursor: pointer; padding: 2px; }
.appt-feedback .star-row button.active { color: #e0a21b; }

@media (max-width: 980px) {
  .feedback-layout { grid-template-columns: 1fr; }
  .review-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .review-stat b { font-size: 24px; }
  .feedback-read .review-list { max-height: none; }
}

/* ---------- Live Floor notifications: compact (On Session & payments only) ---------- */
.floor-notes { padding: 10px 12px; }
.floor-notes .floor-card-head { margin-bottom: 6px; }
.floor-notes .floor-card-head h3 { font-size: 15px; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.floor-notes .floor-card-head h3 small { font-family: var(--font-body, inherit); font-size: 11px; font-weight: 500; color: var(--ink-soft); }
.floor-notes .floor-card-head .btn { padding: 4px 10px; font-size: 12px; min-height: 0; white-space: nowrap; flex-shrink: 0; }
.floor-notes-list { max-height: 210px; gap: 4px; }
.floor-note { grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; padding: 6px 9px; }
.floor-note b { font-size: 12.5px; }
.floor-note small { text-align: right; }
.floor-note span { grid-column: 1 / -1; font-size: 12px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.floor-notes .muted { font-size: 12.5px; margin: 0; }
@media (max-width: 980px) { .floor-notes-list { max-height: 240px; } }

/* ---------- Main panel (Live Floor · Staff Calendars · Business Hours) ---------- */
.main-head { align-items: flex-end; gap: 12px; flex-wrap: wrap; }
.main-tabs { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.main-section > .toolbar:first-child { margin-top: 4px; }
.main-section > .toolbar:first-child h3 { font-family: var(--font-display, inherit); }
@media (max-width: 600px) {
  .main-tabs { width: 100%; flex-wrap: nowrap; gap: 2px; }
  .main-tabs .rec-tab { flex: 1 1 0; min-width: 0; justify-content: center; padding: 8px 4px; font-size: 12px; white-space: nowrap; }
  .main-tabs .rec-tab svg, .main-tabs .rec-tab i { display: none; }
}

/* ---------- Live Floor: compact "Staff right now" list ---------- */
.floor-staff-list { list-style: none; margin: 0; padding: 0; display: grid; }
.floor-staff .floor-staff-row { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--cream-soft); }
.floor-staff .floor-staff-row:last-child { border-bottom: none; }
.floor-staff-main { display: grid; gap: 1px; min-width: 0; }
.floor-staff .floor-staff-name { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
.floor-staff .floor-staff-name b { font-size: 14px; }
.floor-staff .floor-staff-name small { font-size: 11.5px; color: var(--ink-soft); text-transform: capitalize; }
.floor-staff-why { font-size: 12px; color: var(--ink-soft); overflow-wrap: anywhere; }
.floor-staff-btn { min-height: 32px; padding: 0 12px; font-size: 12.5px; }
.floor-staff-btn.is-danger { border-color: var(--danger); color: var(--danger); }
.floor-staff-btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- About Us: story, family/pet-friendly notes and photo gallery ---------- */
.about-modal .about-text { font-size: 13.5px; color: var(--ink-soft); line-height: 1.7; margin-top: 12px; max-width: 70ch; }
.about-tags { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.about-tags li { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: 999px; background: var(--cream-soft); border: 1px solid var(--line); color: var(--rose-deep); font-size: 12.5px; font-weight: 500; }
.about-tags li svg, .about-tags li i { width: 15px; height: 15px; }
.about-heading { font-family: var(--font-display); font-size: 22px; color: var(--rose-deep); margin: 22px 0 10px; }
.about-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.about-gallery figure { margin: 0; display: grid; gap: 6px; align-content: start; min-width: 0; }
.about-gallery img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: center; border-radius: var(--radius-md); background: var(--cream-soft); display: block; }
.about-gallery figcaption { font-size: 12.5px; color: var(--ink-soft); line-height: 1.45; }
.about-gallery figcaption b { display: block; color: var(--ink); font-size: 13.5px; font-weight: 600; }
@media (max-width: 600px) {
  .modal.about-modal { padding: 24px 18px; }
  .about-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}

/* ---------- Phones (iPhone fix): every pop-up scrolls as one page ----------
   iOS Safari doesn't reliably scroll an overflow:auto child inside a flex column that only
   has a max-height, and its vh units include the area behind the toolbar, so the lower part
   of the Booking panel (and other pop-ups) couldn't be reached on iPhones. On phones the
   dimmed overlay itself is the single scroll area: the card keeps its full height and the
   whole pop-up scrolls like a page; the X stays pinned at the top while scrolling. */
@media (max-width: 600px) {
  .modal-overlay {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    align-items: flex-start;
    padding: calc(12px + env(safe-area-inset-top, 0px)) 10px calc(28px + env(safe-area-inset-bottom, 0px));
  }
  .modal:not(.modal-menu),
  #modalBooking .modal {
    display: block;
    max-height: none;
    overflow: visible;
    margin: 0 auto;
    flex-shrink: 0;
    padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  }
  #modalBooking .booking-step.active { overflow: visible; min-height: 0; padding-bottom: 0; }
}

/* iPhones and iPads zoom into any form field with text under 16px and stay zoomed, pushing the
   panel's lower part off screen. iOS/iPadOS only (Android and Windows keep the 14px fields). */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 1366px) {
    input, select, textarea, .field input, .field select, .field textarea { font-size: 16px !important; }
  }
}

/* ---------- No down payment: pay after the service ---------- */
.pay-after-box { margin: 0 0 16px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--cream-soft); border: 1px solid var(--line); font-size: 13.5px; color: var(--ink-soft); line-height: 1.55; }
.pay-after-box b { color: var(--rose-deep); }
.pay-after-row span:last-child { color: var(--rose-deep); font-weight: 600; text-align: right; }
.pay-after-note { font-size: 12.5px; color: var(--ink-soft); }

/* ---------- Landing: service cards beat like a heart to invite a booking ----------
   A "lub-dub" pulse every 2.4 s, each card slightly after the previous one. Hovering a
   card stops the beat so its own lift/zoom takes over; reduced-motion users see no beat. */
@keyframes ds-heartbeat {
  0%, 40%, 100% { transform: scale(1); }
  10% { transform: scale(1.035); }
  20% { transform: scale(1.005); }
  30% { transform: scale(1.025); }
}
@keyframes ds-heartbeat-glow {
  0%, 40%, 100% { box-shadow: 0 0 0 0 rgba(168, 81, 118, 0); }
  10% { box-shadow: 0 0 0 6px rgba(168, 81, 118, .35); }
  30% { box-shadow: 0 0 0 10px rgba(168, 81, 118, 0); }
}
.service-card { animation: ds-heartbeat 2.4s ease-in-out infinite; will-change: transform; }
.service-card .overlay .btn { animation: ds-heartbeat-glow 2.4s ease-out infinite; }
.service-card:nth-child(2), .service-card:nth-child(2) .overlay .btn { animation-delay: .25s; }
.service-card:nth-child(3), .service-card:nth-child(3) .overlay .btn { animation-delay: .5s; }
.service-card:hover, .service-card:focus-within { animation: none; }
.service-card:hover .overlay .btn, .service-card:focus-within .overlay .btn { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .service-card, .service-card .overlay .btn { animation: none; }
}

/* ---------- About Us: centred header, full-width justified paragraphs ---------- */
.about-modal > h2 { text-align: center; padding-left: 36px; padding-right: 36px; } /* room for the X on both sides keeps it truly centred */
.about-modal > h2 + .sub { text-align: center; text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 600; color: var(--rose); }
.about-modal .about-text {
  max-width: none; margin: 14px 0 0;
  font-size: 14.5px; line-height: 1.8;
  text-align: justify; text-justify: inter-word; hyphens: auto;
  text-indent: 2em;
}
.about-modal .about-text + .about-text { margin-top: 10px; }
.about-tags { justify-content: center; margin-top: 18px; }
.about-heading { text-align: center; margin-top: 26px; }
@media (max-width: 600px) {
  .about-modal .about-text { font-size: 14px; text-indent: 1.4em; }
}

/* ---------- 1-hour grace period reminder (customer) ---------- */
.grace-note { margin: 0 0 12px; padding: 10px 12px; border-radius: var(--radius-sm); background: #fdf4e3; color: #8a5a0c; font-size: 13px; }
.grace-chip { display: inline-block; margin-top: 4px; font-size: 11.5px; color: #8a5a0c; font-weight: 600; }

/* ---------- Profile: switch login email to the linked Gmail ---------- */
.use-google-email { margin-top: 8px; font-size: 13px; white-space: normal; }

/* ---------- Footer: readable on every screen ----------
   The decorative cream shape used to sit on top of the footer and wash out its
   text; the footer now stacks above it on its own white strip, in darker ink. */
footer.mini { position: relative; z-index: 2; background: var(--white); color: var(--ink); font-weight: 500; }
@media (max-width: 600px) {
  footer.mini { font-size: 12.5px; line-height: 1.6; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); }
}

/* ---------- Mobile menu: links start higher (clear of the close button, not at the very top) ---------- */
@media (max-width: 860px) {
  .nav-links { padding-top: 64px; }
}
@media (max-width: 380px) {
  .nav-links { padding-top: 60px; }
}

/* ---------- Contact form: who the message goes to ---------- */
.contact-to { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); }
.contact-to-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: rgba(255,255,255,.75); }
.contact-to-address { color: #fff; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; user-select: all; }

/* ---------- Phones: pop-ups end at the top of the on-screen keyboard ----------
   --vv-height / --vv-top come from keyboardSafe.js (the visible area). In browsers
   that lay the keyboard over the page (e.g. Messenger's in-app browser), the pop-up's
   scroll area now stops above the keys, so the field being typed in can be scrolled
   into view. Falls back to the full screen where the variables aren't set. */
@media (max-width: 600px) {
  .modal-overlay {
    top: var(--vv-top, 0px);
    bottom: auto;
    height: var(--vv-height, 100%);
    padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    scroll-padding-bottom: 24px;
  }
}

/* ---------- Front desk: guest booking (walk-in · Messenger · phone call) ---------- */
.fd-form { display: flex; flex-direction: column; gap: 4px; }
.fd-services { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 12px 14px; margin: 6px 0 12px; display: grid; gap: 10px; max-height: 300px; overflow-y: auto; }
.fd-services legend { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); padding: 0 6px; }
.fd-cat { display: grid; gap: 4px; }
.fd-cat > strong { font-size: 13px; color: var(--rose-deep); }
.fd-svc { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 8px; border-radius: var(--radius-sm); font-size: 13.5px; text-transform: none; cursor: pointer; }
.fd-svc:hover { background: var(--cream-soft); }
.fd-svc input { width: auto; }
.fd-svc small { color: var(--ink-soft); white-space: nowrap; }
.fd-svc.in-package { background: #f3e4ee; cursor: default; }
.fd-svc.in-package small::after { content: " · in package"; color: var(--rose-deep); font-weight: 600; }
.fd-offers { margin-top: 4px; }
.fd-offers-none { margin: 0 0 10px; }
.fd-sms-manual { font-size: 12.5px; margin: 2px 0 6px; }
.fd-preview { border-radius: var(--radius-md); background: var(--cream-soft); padding: 12px 14px; margin: 6px 0 12px; font-size: 13.5px; }
.fd-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.fd-plan small { color: var(--ink-soft); }
.fd-plan-total { margin: 8px 0 0; font-weight: 600; color: var(--rose-deep); }
.fd-notice { display: grid; gap: 8px; margin: 12px 0; }
.fd-notice-ok { color: var(--success); font-weight: 600; margin: 0; }
.fd-notice-warn { color: #8a5a0c; margin: 0; }
.fd-notice-label { font-size: 12.5px; font-weight: 600; color: var(--ink); text-transform: none; }
.fd-sms { width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; font: inherit; font-size: 13.5px; resize: vertical; }
.fd-notice-actions { display: flex; gap: 8px; flex-wrap: wrap; }
#bookForGuestBtn { white-space: nowrap; }
/* Guest (walk-in · Messenger · phone call): no schedule column, so one centred column. */
@media (min-width: 1100px) {
  .create-account-form.is-guest { max-width: 680px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "details" "actions"; }
}

/* ---------- Staff Google sign-in invites ---------- */
.signin-choice { border: 0; padding: 0; margin: 0 0 16px; min-width: 0; }
.signin-choice legend { display: block; padding: 0; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .5px; }
.signin-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.signin-option { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--cream-soft); cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.signin-option:hover { border-color: var(--rose); }
.signin-option input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--rose); cursor: pointer; }
.signin-option-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.signin-option-text b { font-size: 14px; font-weight: 600; color: var(--ink); }
.signin-option-text small { font-size: 12px; color: var(--ink-soft); }
.signin-option:has(input:checked) { border-color: var(--rose); background: #fff; box-shadow: 0 0 0 3px rgba(168, 81, 118, .12); }
.signin-option:has(input:focus-visible) { outline: 2px solid var(--rose); outline-offset: 2px; }
.signin-choice .field-hint, #createAcctPasswordHint { margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-soft); }
#createAcctPasswordHint { margin: -6px 0 16px; }
@media (max-width: 420px) { .signin-options { grid-template-columns: minmax(0, 1fr); } }
.badge-invited { background: #f3e4ee; color: #8a3d5f; white-space: normal; }
.staff-notes { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; }
.staff-note { font-size: 11.5px; color: var(--ink-soft); }
.staff-note.is-warn { color: var(--warn); font-weight: 600; }
.profile-google-note { margin: 4px 0 6px; }

/* accept-invite.html */
.invite-page { min-height: 100vh; min-height: 100dvh; margin: 0; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--cream-soft); font-family: var(--font-body); color: var(--ink); box-sizing: border-box; }
.invite-card { width: 100%; max-width: 440px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-soft); padding: 30px 26px; text-align: center; box-sizing: border-box; }
.invite-logo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.invite-kicker { margin: 10px 0 4px; font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: var(--rose); }
.invite-card h1 { font-family: var(--font-display); font-size: 30px; color: var(--rose-deep); margin: 0 0 8px; }
.invite-lead { font-size: 15px; line-height: 1.6; color: var(--ink-soft); margin: 0 0 18px; }
.invite-steps { list-style: none; display: flex; gap: 8px; justify-content: center; padding: 0; margin: 0 0 18px; counter-reset: step; }
.invite-steps li { counter-increment: step; font-size: 12.5px; color: var(--ink-soft); padding: 6px 12px; border-radius: 999px; background: var(--cream-soft); border: 1px solid var(--line); }
.invite-steps li::before { content: counter(step) ". "; font-weight: 600; }
.invite-steps li.is-current { background: var(--rose); border-color: var(--rose); color: #fff; }
.invite-steps li.is-done { color: var(--success); border-color: var(--success); }
.invite-step { text-align: left; }
.invite-step .btn-google { width: 100%; }
.invite-error { margin: 14px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); background: #fbe7e6; color: var(--danger); font-size: 13.5px; text-align: left; }
#inviteDone { margin-top: 6px; }

/* ---------- Paying the owner's GCash / Maya directly ---------- */
.pay-options { display: grid; gap: 10px; margin: 14px 0 6px; }
.pay-option { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-md); background: var(--cream-soft); color: var(--ink); cursor: pointer; font: inherit; transition: border-color .2s, background .2s; }
.pay-option:hover, .pay-option:focus-visible { border-color: var(--rose); background: #fff; outline: none; }
.pay-option-name { font-weight: 600; font-size: 15px; }
.pay-option small { color: var(--ink-soft); font-size: 12.5px; }
.ewallet-steps { margin: 10px 0 16px; padding-left: 20px; display: grid; gap: 10px; font-size: 14px; line-height: 1.55; color: var(--ink); }
.ewallet-number { display: inline-flex; align-items: center; gap: 6px; font-size: 16px; letter-spacing: .5px; }
.ewallet-qr { display: block; width: 180px; max-width: 100%; margin-top: 8px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: #fff; }
.ewallet-proof { display: block; max-width: 100%; max-height: 420px; margin: 12px auto 4px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.floor-ewallet { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 8px 0; padding: 10px 12px; border-radius: var(--radius-sm); background: #f3e4ee; color: var(--rose-deep); font-size: 13.5px; }
.payacct-card { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 16px 18px; margin-bottom: 18px; background: #fff; }
.payacct-card h3 { font-family: var(--font-display); color: var(--rose-deep); font-size: 20px; margin: 0 0 4px; }
.payacct { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 14px; margin: 12px 0; min-width: 0; }
.payacct legend { font-weight: 600; color: var(--ink); padding: 0 6px; }
.payacct-on { display: flex; align-items: center; gap: 8px; font-size: 13.5px; margin: 4px 0 10px; color: var(--ink); }
.payacct-qr { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.payacct-qr img { width: 96px; height: 96px; object-fit: contain; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; }

/* Change Password button on every profile; receipt link in Payment Records */
.change-password-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; margin: 14px 0 16px; }
.receipt-link { font-size: 12.5px; color: var(--rose); font-weight: 600; }

/* Booking step 1: does the chosen promo fit the services? (shown as services are ticked) */
.promo-fit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 0; padding: 10px 12px; border-radius: var(--radius-sm); font-size: 13px; line-height: 1.5; }
.promo-fit.is-warn { background: #fdf1e1; border: 1.5px solid var(--warn); color: #7a4d0f; }
.promo-fit.is-ok { background: #e9f3e8; border: 1px solid #b9d6b6; color: #3f6b42; }
.promo-fit .btn { flex: none; }

/* Customer dashboard step 1: preferred staff per department */
.pref-staff-box { margin-top: 12px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--cream-soft); border: 1px solid var(--line); }
.pref-staff-box small { font-weight: 400; color: var(--ink-soft); text-transform: none; letter-spacing: 0; }
.pref-staff-hint { font-size: 12.5px; color: var(--ink-soft); margin: 2px 0 10px; }
.pref-staff-field { margin-bottom: 10px; }
.pref-unavailable { border-left: 3px solid var(--warn); padding-left: 10px; }
.pref-unavailable p { margin: 0 0 6px; }

/* Shown while the sign-in check waits for the network (never a logout) */
.reconnecting-bar { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 3000; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 999px; background: #3c2430; color: #fff; font-size: 13px; box-shadow: var(--shadow-pop); text-align: center; }

/* Group booking: number of people (customer dashboard Book Service and Edit) */
.people-field { margin: 14px 0 12px; }
.people-field input, .rs-people input { max-width: 160px; }
.selected-people-total { margin: 8px 0 0; font-size: 13px; color: var(--rose-deep); }

/* Check-in and the 2-hour online-change window */
.badge-arrived { background: #e4f0e3; color: var(--success); }
.grace-note.is-closed, .grace-chip.is-closed { color: var(--warn); }

/* Waitlist (customer dashboard) */
.ss-wait { margin-left: auto; font-size: 12px; padding: 4px 10px; }
.pref-wait { margin-top: 8px; font-size: 13px; }
.my-waitlist { border: 1px solid var(--line, #e7dfd6); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--surface, #fff); }
.my-waitlist h3 { font-size: 15px; margin: 0 0 4px; color: var(--ink); }
.waitlist-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.waitlist-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13.5px; }
.waitlist-row > span:first-child { flex: 1 1 200px; min-width: 0; }
.waitlist-row.is-notified { font-weight: 600; }

/* Receipts (Payment History / Payment Records) */
.receipt-btn { margin-top: 6px; font-size: 12px; padding: 3px 10px; }
.receipt { color: var(--ink); font-size: 14px; }
.receipt-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line, #e7dfd6); padding-bottom: 10px; margin-bottom: 10px; }
.receipt-head h3 { margin: 0 0 4px; font-size: 17px; }
.receipt-head p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }
.receipt-no { text-align: right; display: grid; gap: 2px; }
.receipt-no span { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-soft); }
.receipt-meta, .receipt-totals { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 0 0 12px; }
.receipt-meta dt, .receipt-totals dt { color: var(--ink-soft); font-size: 12.5px; }
.receipt-meta dd, .receipt-totals dd { margin: 0; overflow-wrap: anywhere; }
.receipt-items { width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.receipt-items th, .receipt-items td { padding: 6px 4px; border-bottom: 1px solid var(--line, #e7dfd6); text-align: left; }
.receipt-items th:nth-child(n+2), .receipt-items td:nth-child(n+2) { text-align: right; white-space: nowrap; }
.receipt-totals { margin-left: auto; max-width: 320px; }
.receipt-totals dd { text-align: right; }
.receipt-totals .is-strong { font-weight: 700; color: var(--ink); }
.receipt-note { font-size: 11.5px; color: var(--ink-soft); margin: 8px 0 0; }
.receipt-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
@media print {
  body.printing-receipt > *:not(#receiptModal) { display: none !important; }
  body.printing-receipt #receiptModal { position: static !important; background: none !important; display: block !important; }
  body.printing-receipt #receiptModal .modal { box-shadow: none !important; max-width: none !important; width: auto !important; max-height: none !important; overflow: visible !important; }
  body.printing-receipt #receiptModal .modal-close, body.printing-receipt .receipt-actions { display: none !important; }
}
.waitlist-hint { margin: 8px 0 0; }


/* Booking › services: the price and time never split across lines; narrow tiles put the
   price under the name, and phones get one service per row. */
.service-pick label { flex-wrap: wrap; }
.service-pick label > span:first-child { display: inline-flex; align-items: center; gap: 8px; flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; }
.service-pick .price-tag { white-space: nowrap; margin-left: auto; }
@media (max-width: 560px) {
  .service-pick { grid-template-columns: minmax(0, 1fr); max-height: min(46vh, 340px); }
}
/* Phones: every service category tab stays in view (two rows if needed) instead of
   "Packages" hiding past the edge of a sideways scroller. */
@media (max-width: 560px) {
  #serviceCategoryTabs { flex-wrap: wrap; overflow-x: visible; border-radius: 18px; gap: 2px; }
  #serviceCategoryTabs button { flex: 1 1 auto; padding: 8px 10px; white-space: nowrap; }
}

/* ---------- On-screen keyboard open (phones and tablets) ----------
   keyboardSafe.js sets html.kb-open and --kb-height (how much the keyboard covers)
   when a keyboard sits over the page (iPhone/iPad Safari, some Android in-app
   browsers). Extra space under the content lets the last field scroll above the
   keys; pop-ups shrink to the visible area so their own scroll stops at the keys. */
@media (max-width: 980px) {
  html.kb-open body { padding-bottom: var(--kb-height, 0px); }
  html.kb-open .chat-shell { height: calc(var(--vv-height, 100dvh) - 16px); min-height: 0; }
}
html.kb-open .panel-wrap { padding-bottom: calc(26px + var(--kb-height, 0px)); }
html.kb-open .invite-page { align-items: flex-start; padding-bottom: calc(24px + var(--kb-height, 0px)); }
/* Tablets (iPad): the card scrolls by itself, so it shrinks to the area above the keys.
   Phones already scroll the whole pop-up within the visible area (rules above). */
@media (min-width: 601px) {
  html.kb-open .modal-overlay {
    top: var(--vv-top, 0px); bottom: auto; height: var(--vv-height, 100%);
    align-items: flex-start; padding-top: 12px; padding-bottom: 12px;
  }
  html.kb-open .modal,
  html.kb-open #modalBooking .modal { max-height: calc(var(--vv-height, 100vh) - 24px); }
}
html.kb-open .toast,
html.kb-open .reconnecting-bar { bottom: calc(12px + var(--kb-height, 0px)); }

/* ---------- Receipt window: the header clears the X; on phones the services stay a table ---------- */
.receipt-head { padding-right: 46px; }
.receipt-head h3 { margin-top: 0; }
.receipt-btn { white-space: nowrap; }
@media (max-width: 600px) {
  .receipt-head { flex-direction: column; gap: 10px; padding-right: 42px; }
  .receipt-no { text-align: left; justify-items: start; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--cream-soft); }
  .receipt-meta { grid-template-columns: 104px minmax(0, 1fr); font-size: 13.5px; }
  .receipt .receipt-items { display: table; width: 100%; table-layout: auto; }
  .receipt .receipt-items thead { display: table-header-group; }
  .receipt .receipt-items tbody { display: table-row-group; }
  .receipt .receipt-items tr { display: table-row; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
  .receipt .receipt-items th,
  .receipt .receipt-items td { display: table-cell; width: auto; padding: 8px 4px; font-size: 13px; text-align: left; border-bottom: 1px solid var(--line); }
  .receipt .receipt-items th:nth-child(n+2),
  .receipt .receipt-items td:nth-child(n+2) { text-align: right; white-space: nowrap; }
  .receipt .receipt-items td::before { content: none; }
  .receipt-totals { max-width: none; }
  .receipt-actions .btn { flex: 1 1 0; }
}

/* ---------- Phones: history / payment record cards ---------- */
@media (max-width: 600px) {
  .data-table tbody tr { box-shadow: 0 2px 10px rgba(60, 36, 48, .05); }
  .data-table tbody tr td:first-child { font-weight: 600; color: var(--ink); }
  /* A cell with several pieces (badge + button, id + note) stacks them on the right. */
  .data-table td > .cell { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 0; text-align: right; }
  .data-table td > .cell > br { display: none; }
  .data-table td > .cell small { font-size: 11.5px; color: var(--ink-soft); }
  .data-table .badge { white-space: nowrap; }
}
