@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@400;500;600&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --cream: #FAF8F4;
  --cream-t: rgba(250,248,244,0.97);
  --ink: #2C2118;
  --muted: #8C7B6E;
  --line: rgba(180,155,120,0.22);
  --gold: #B8955A;
  --gold-light: #F5EDD9;
  --gold-dark: #9a7a46;
  --green: #2D7A4F;
  --green-light: #EAF5EE;
  --red: #C0392B;
  --red-light: #FDECEA;
  --blue: #1A5276;
  --blue-light: #EAF2F8;
  --input-bg: rgba(184,149,90,0.06);
  --radius: 8px;
  --shadow: 0 4px 24px rgba(180,155,120,0.18), 0 1px 4px rgba(180,155,120,0.10);
  --shadow-lg: 0 8px 40px rgba(180,155,120,0.22), 0 2px 8px rgba(180,155,120,0.12);
}

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

html { height: 100%; }

body {
  font-family: 'DM Sans', sans-serif;
  color: var(--ink);
  min-height: 100vh;
  background: #F7F2EA;
  overflow-x: hidden;
}

/* ── Background collage ── */
.bg-collage {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background: #EDE5D8;
}

.bg-collage-inner {
  position: absolute;
  top: -10%;
  left: -10%;
  width: 120%;
  height: 120%;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(4, 1fr);
  gap: 6px;
  animation: collageDrift 40s ease-in-out infinite alternate;
}

@keyframes collageDrift {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(-1.5%, 1%) scale(1.02); }
  50%  { transform: translate(1%, -1.5%) scale(1.01); }
  75%  { transform: translate(-0.8%, 0.8%) scale(1.03); }
  100% { transform: translate(1.2%, -0.5%) scale(1.02); }
}

.bg-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  border-radius: 3px;
  animation: photoFade 6s ease-in-out infinite alternate;
}

.bg-photo:nth-child(even) { animation-delay: -3s; }
.bg-photo:nth-child(3n)   { animation-delay: -1.5s; }
@keyframes photoFade {
  0%   { opacity: 0.45; }
  100% { opacity: 0.62; }
}

.bg-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #E8DDD0 0%, #D9CCBA 50%, #E8DDD0 100%);
  border-radius: 3px;
}

.bg-overlay {
  position: fixed;
  inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 50%, rgba(247,242,234,0.30) 0%, rgba(247,242,234,0.55) 100%);
}

/* ── App ── */
#app {
  position: relative;
  z-index: 2;
  min-height: 100vh;
}

.screen { display: none; }
.screen.active { display: block; }

/* ── Home ── */
.home-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.home-brand {
  text-align: center;
  margin-bottom: 52px;
}

.home-logo {
  font-size: 36px;
  color: var(--gold);
  margin-bottom: 12px;
  animation: pulse 4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.7; transform: scale(0.95); }
}

.home-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 6vw, 56px);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.home-sub {
  font-size: 14px;
  color: var(--gold);
  margin-top: 8px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.home-nav {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 560px;
}

.nav-tile {
  background: rgba(250,248,244,0.72);
  border: 0.5px solid rgba(184,149,90,0.25);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 16px;
  padding: 28px 20px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  color: var(--ink);
}

.nav-tile:hover {
  background: rgba(250,248,244,0.92);
  border-color: rgba(184,149,90,0.55);
  transform: translateY(-2px);
}

.nav-tile:active { transform: translateY(0); }

.nav-tile-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(184,149,90,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0.5px solid rgba(184,149,90,0.3);
}

.nav-tile-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--gold);
}

.nav-tile-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.nav-tile-sub {
  font-size: 12px;
  color: var(--muted);
}

/* ── Pages ── */
.page-wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.page-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.page-title-block { flex: 1; }

.page-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 600;
  color: var(--ink);
  line-height: 1.2;
}

.page-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-top: 3px;
}

.brand-badge {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--gold);
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.btn-home {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px 16px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: rgba(250,248,244,0.8);
  color: var(--ink);
  cursor: pointer;
  backdrop-filter: blur(8px);
  transition: background 0.15s, border-color 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.btn-home:hover {
  background: var(--cream);
  border-color: var(--gold);
  color: var(--ink);
}
.btn-home svg { stroke: currentColor; }

/* ── Cards ── */
.card {
  background: var(--cream);
  border-radius: 14px;
  border: 0.5px solid var(--line);
  padding: 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.card-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.card-section-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

/* ── Form fields ── */
.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field-group label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.field-group input,
.field-group textarea,
.field-group select {
  background: var(--input-bg);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: border-color 0.15s, background 0.15s;
  width: 100%;
  resize: vertical;
}

.field-group input:focus,
.field-group textarea:focus { border-color: var(--gold); background: #fff; }
.field-group input.matched  { border-color: var(--green); background: #fff; }

textarea { min-height: 72px; line-height: 1.55; }

/* ── Sections ── */
.sections-card { padding: 8px 28px; }

.section-item {
  padding: 16px 0;
  border-top: 0.5px solid var(--line);
}

.section-hdr {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 8px;
}

.sn {
  font-family: 'Cormorant Garamond', serif;
  font-size: 13px;
  color: var(--gold);
  font-weight: 500;
  min-width: 18px;
}

.st {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 600;
}

.sb {
  font-size: 13px;
  line-height: 1.65;
  color: var(--muted);
  padding-left: 28px;
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-left: 28px;
  margin-top: 8px;
}

.checklist li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  line-height: 1.45;
  color: #3a3733;
}

.checklist li input[type=checkbox] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.media-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding-left: 28px;
  font-size: 13px;
  line-height: 1.5;
  color: #3a3733;
}

.media-row input[type=checkbox] {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
  margin-top: 2px;
}

.consent-affirmation {
  background: var(--gold-light);
  border: 0.5px solid rgba(184,149,90,.3);
}

.consent-affirmation p {
  font-size: 13.5px;
  line-height: 1.65;
  color: #4a3e2f;
}

/* ── Signature ── */
.sig-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.sig-wrap {
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  cursor: crosshair;
  position: relative;
}

#sigpad {
  display: block;
  width: 100%;
  height: 140px;
  touch-action: none;
}

.sig-hint {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: opacity 0.2s;
}

/* ── Buttons ── */
.btn-primary {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 13px 28px;
  border: none;
  border-radius: var(--radius);
  background: var(--gold);
  color: #fff;
  cursor: pointer;
  letter-spacing: 0.04em;
  transition: opacity 0.15s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}
.btn-primary:hover { opacity: 0.88; }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 11px 22px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  transition: background 0.15s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-ghost:hover { background: var(--input-bg); }

.btn-ghost-sm {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 6px 14px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.btn-ghost-sm:hover { background: rgba(0,0,0,.04); }

.btn-icon-sm {
  background: transparent;
  border: 0.5px solid var(--line);
  border-radius: 5px;
  cursor: pointer;
  padding: 5px 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-icon-sm svg { width: 13px; height: 13px; stroke: var(--muted); stroke-width: 1.75; fill: none; stroke-linecap: round; stroke-linejoin: round; transition: stroke 0.15s; }
.btn-icon-sm:hover { background: var(--input-bg); }
.btn-icon-sm:hover svg { stroke: var(--ink); }
.btn-icon-sm.view:hover { background: var(--gold-light); }
.btn-icon-sm.view:hover svg { stroke: var(--gold); }
.btn-icon-sm.note:hover { background: var(--blue-light); }
.btn-icon-sm.note:hover svg { stroke: var(--blue); }
.btn-icon-sm.photo:hover { background: var(--green-light); }
.btn-icon-sm.photo:hover svg { stroke: var(--green); }
.btn-icon-sm.danger:hover { background: var(--red-light); }
.btn-icon-sm.danger:hover svg { stroke: var(--red); }
.btn-icon-sm.has-note svg { stroke: var(--blue); }
.btn-icon-sm.has-note { background: var(--blue-light); border-color: rgba(26,82,118,.25); }
.btn-icon-sm.has-photo svg { stroke: var(--green); }
.btn-icon-sm.has-photo { background: var(--green-light); border-color: rgba(45,122,79,.25); }

.btn-upload-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 20px;
  border: 0.5px solid var(--gold);
  border-radius: var(--radius);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 14px;
}
.btn-upload-label:hover { background: var(--gold-light); }
.btn-upload-label svg { width: 15px; height: 15px; stroke: var(--gold); stroke-width: 2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

/* ── Search bar ── */
.search-bar {
  position: relative;
}
.search-bar .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  stroke: var(--muted);
  stroke-width: 2;
  fill: none;
  pointer-events: none;
}
.search-bar input {
  width: 100%;
  background: var(--input-bg);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 14px 10px 38px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--ink);
  outline: none;
}
.search-bar input:focus { border-color: var(--gold); background: #fff; }

/* ── Stats ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
.stat-box {
  background: var(--input-bg);
  border-radius: var(--radius);
  padding: 14px 16px;
}
.stat-label { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.stat-val { font-size: 22px; font-weight: 500; color: var(--ink); }

/* ── Records ── */
.record-row {
  background: #fff;
  border: 0.5px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.record-row-main {
  display: grid;
  grid-template-columns: 76px 1fr 110px 96px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
}

.record-badge {
  font-size: 10px;
  font-weight: 500;
  padding: 4px 8px;
  border-radius: 20px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-align: center;
}
.badge-consent  { background: var(--gold-light);  color: #7a5c28; }
.badge-checkin  { background: var(--green-light); color: #1e5c35; }

.record-info { min-width: 0; }
.record-name { font-size: 14px; font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.record-meta { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.record-date { font-size: 12px; color: var(--muted); text-align: right; }

.record-btns {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.comment-panel {
  display: none;
  border-top: 0.5px solid var(--line);
  padding: 12px 14px;
  background: #FAFAF8;
}
.comment-panel textarea {
  width: 100%;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  color: var(--ink);
  background: #fff;
  outline: none;
  resize: vertical;
  min-height: 80px;
  line-height: 1.55;
}
.comment-panel textarea:focus { border-color: var(--gold); }
.comment-panel-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}
.btn-comment-save {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  padding: 7px 16px;
  border: none;
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
}
.btn-comment-cancel {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 7px 14px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.comment-display {
  font-size: 12px;
  color: var(--muted);
  padding: 8px 14px 10px;
  border-top: 0.5px solid var(--line);
  background: #FAFAF8;
  line-height: 1.6;
  white-space: pre-wrap;
}
.comment-display strong {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
}

/* Photo upload panel */
.photo-panel {
  display: none;
  border-top: 0.5px solid var(--line);
  padding: 12px 14px;
  background: #FAFAF8;
}
.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.photo-thumb {
  width: 72px;
  height: 72px;
  object-fit: cover;
  border-radius: 6px;
  border: 0.5px solid var(--line);
  cursor: pointer;
}
.photo-thumb-wrap {
  position: relative;
  display: inline-block;
}
.photo-thumb-del {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--red);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

/* ── Client list ── */
.client-row {
  background: var(--cream);
  border: 0.5px solid var(--line);
  border-radius: 10px;
  margin-bottom: 8px;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.client-row:hover {
  background: rgba(250,248,244,0.97);
  border-color: rgba(184,149,90,0.3);
}
.client-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}
.client-info { flex: 1; min-width: 0; }
.client-name { font-size: 15px; font-weight: 500; color: var(--ink); }
.client-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.client-appt-badge {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--gold-light);
  color: var(--gold-dark);
  white-space: nowrap;
  flex-shrink: 0;
}
.client-arrow { color: var(--muted); flex-shrink: 0; }
.client-arrow svg { width: 14px; height: 14px; stroke: currentColor; stroke-width: 2; fill: none; }

/* Client detail */
.detail-card {
  background: var(--cream);
  border-radius: 12px;
  border: 0.5px solid var(--line);
  padding: 24px;
  margin-bottom: 12px;
}
.detail-section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 0.5px solid var(--line);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.detail-field { display: flex; flex-direction: column; gap: 3px; }
.detail-field-label { font-size: 10px; font-weight: 500; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted); }
.detail-field-val { font-size: 14px; color: var(--ink); }

/* ── Check-in lookup result ── */
.checkin-lookup-result {
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 13px;
  margin: 12px 0;
  line-height: 1.55;
}
.lookup-found { background: var(--green-light); border: 0.5px solid rgba(45,122,79,.25); color: #1e5c35; }
.lookup-notfound { background: var(--gold-light); border: 0.5px solid rgba(184,149,90,.3); color: #7a5c28; }

.client-card-inner {
  background: var(--input-bg);
  border-radius: 10px;
  padding: 16px;
  border: 0.5px solid var(--line);
}

/* ── Success ── */
.success-card {
  background: var(--cream-t);
  backdrop-filter: blur(20px);
  border-radius: 14px;
  border: 0.5px solid rgba(255,255,255,0.15);
  padding: 48px 32px;
  text-align: center;
  box-shadow: var(--shadow);
}
.success-card h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.success-card p { font-size: 14px; color: var(--muted); }
.success-sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.success-btns { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

.tick {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.tick svg { width: 28px; height: 28px; }
.tick-gold { background: var(--gold-light); }
.tick-gold svg { stroke: var(--gold); }
.tick-green { background: var(--green-light); }
.tick-green svg { stroke: var(--green); }

/* ── Background photo grid ── */
.bg-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.bg-thumb-wrap { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; }
.bg-thumb { width: 100%; height: 100%; object-fit: cover; display: block; }
.bg-thumb-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(192,57,43,0.85);
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.bg-thumb-del:hover { opacity: 1; }

/* ── Empty state ── */
.empty-state {
  text-align: center;
  padding: 32px 20px;
  color: var(--muted);
  font-size: 13px;
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp 0.25s ease forwards; }

/* ── Responsive ── */
@media (max-width: 600px) {
  .home-nav { grid-template-columns: 1fr 1fr; gap: 12px; }
  .nav-tile { padding: 20px 14px; }
  .form-grid-2 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .record-row-main { grid-template-columns: 70px 1fr auto; }
  .record-row-main .record-date { display: none; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .page-wrap { padding: 24px 14px 60px; }
  .card { padding: 20px 16px; }
}

/* ── Password screen ── */
.password-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.password-card {
  background: var(--cream);
  border-radius: 16px;
  border: 0.5px solid var(--line);
  padding: 40px 36px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.password-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 6px;
}

.password-sub {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 24px;
}

.password-form input[type=password] {
  width: 100%;
  background: var(--input-bg);
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--ink);
  outline: none;
  text-align: center;
  letter-spacing: 0.1em;
}
.password-form input[type=password]:focus { border-color: var(--gold); background: #fff; }

.password-error {
  font-size: 13px;
  color: var(--red);
  margin-top: 8px;
  min-height: 18px;
}

/* ── Client avatar ── */
.client-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.client-avatar-lg {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-light);
  display: block;
}

.client-avatar-lg-placeholder {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', serif;
  font-size: 28px;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
  border: 2px solid rgba(184,149,90,0.2);
}

.avatar-upload-btn {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid var(--cream);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
}
.avatar-upload-btn:hover { opacity: 0.85; }
.avatar-upload-btn svg { width: 11px; height: 11px; stroke: #fff; stroke-width: 2.5; fill: none; }

.client-profile-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.client-profile-info { flex: 1; min-width: 0; }
.client-profile-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 4px;
}
.client-profile-meta { font-size: 13px; color: var(--muted); }

/* ── Delete client ── */
.btn-delete-client {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 8px 16px;
  border: 0.5px solid rgba(192,57,43,0.3);
  border-radius: var(--radius);
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-delete-client:hover { background: var(--red-light); border-color: var(--red); }
.btn-delete-client.confirm-1 { background: var(--red-light); border-color: var(--red); font-weight: 500; }
.btn-delete-client.confirm-2 { background: var(--red); color: #fff; border-color: var(--red); font-weight: 500; }

/* ── PDF Modal ── */
.pdf-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.pdf-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(26,23,20,0.6);
  backdrop-filter: blur(4px);
}

.pdf-modal-box {
  position: relative;
  z-index: 1;
  background: var(--cream);
  border-radius: 14px;
  border: 0.5px solid var(--line);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 820px;
  height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 0.5px solid var(--line);
  flex-shrink: 0;
}

.pdf-modal-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
}

.pdf-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--muted);
  display: flex;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}
.pdf-modal-close:hover { background: var(--input-bg); color: var(--ink); }

#pdf-modal-frame {
  flex: 1;
  width: 100%;
  border: none;
  background: #525659;
}

/* ── Bullet list (replaces checklist in consent form) ── */
.bullet-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-left: 28px;
  margin-top: 8px;
}

.bullet-list li {
  font-size: 13px;
  line-height: 1.5;
  color: #3a3733;
  padding-left: 14px;
  position: relative;
}

.bullet-list li::before {
  content: '·';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-size: 18px;
  line-height: 1.1;
  font-weight: 600;
}

/* ── Backup status ── */
.backup-status {
  font-size: 13px;
  font-weight: 500;
}

/* ── Home nav 5-tile layout ── */
.home-nav-5 {
  grid-template-columns: repeat(3, 1fr);
}
.home-nav-5 .nav-tile:last-child:nth-child(odd) {
  grid-column: 2;
}
@media(max-width:500px) {
  .home-nav-5 { grid-template-columns: 1fr 1fr; }
  .home-nav-5 .nav-tile:last-child:nth-child(odd) { grid-column: auto; }
}

/* ── Calendar ── */
.cal-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-week-nav {
  background: transparent;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  padding: 7px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background .15s;
  flex-shrink: 0;
}
.btn-week-nav svg { width: 16px; height: 16px; stroke: var(--muted); }
.btn-week-nav:hover { background: var(--gold-light); }
.btn-week-nav:hover svg { stroke: var(--gold-dark); }

.cal-week-label {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--ink);
  flex: 1;
  text-align: center;
}



.btn-cal-today {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 7px 14px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s;
}
.btn-cal-today:hover { background: var(--gold-light); color: var(--gold-dark); border-color: var(--gold); }

.cal-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}
.legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.cal-card {
  padding: 0 !important;
  overflow: hidden;           /* horizontal: clip */
  /* vertical height is set inline by JS after render — card sizes to content */
}

.cal-grid {
  display: grid;
  grid-template-columns: 52px repeat(7, 1fr);
  position: relative;
  user-select: none;
  /* No touch-action here — let .cal-scroll handle vertical pan */
}

.cal-time-col {
  border-right: 0.5px solid var(--line);
  position: sticky;
  left: 0;
  z-index: 8;  /* above day columns, below headers */
  background: var(--cream);
}

.cal-time-label {
  position: absolute;
  right: 8px;
  top: 2px;  /* sit just below the hour boundary line — keeps 7am visible below sticky header */
  font-size: 11px;
  line-height: 1;
  color: var(--muted);
  pointer-events: none;
  white-space: nowrap;
  z-index: 1;
}


.cal-day-col {
  border-right: 0.5px solid var(--line);
  position: relative;
  cursor: crosshair;
  /* touch-action intentionally omitted — pan-y from parent allows scrolling */
}
.cal-day-col:last-child { border-right: none; }

.cal-day-header {
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;  /* above window elements during scroll */
  cursor: default;
}
.cal-day-name { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.cal-day-num {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.1;
}
.cal-day-num.today {
  width: 30px;
  height: 30px;
  background: var(--gold);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.cal-time-header {
  height: 48px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
  position: sticky;
  top: 0;
  z-index: 10;
}

.cal-cell {
  height: 24px;
  max-height: 24px;
  overflow: visible; /* labels float above via position:absolute */
  border-bottom: 0.5px solid rgba(180,155,120,0.1);
  position: relative;
  box-sizing: border-box;
}
.cal-cell.half-hour {
  border-bottom-style: dashed;
  border-bottom-color: rgba(180,155,120,0.06);
}
.cal-cell:hover { background: rgba(184,149,90,0.04); }

/* Availability windows */
.cal-window {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 6px;
  background: rgba(184,149,90,0.15);
  border: 1.5px solid var(--gold);
  z-index: 3;
  overflow: hidden;
  cursor: pointer;
  transition: background .15s;
  touch-action: none; /* only windows block scroll — empty space still pans */
}
.cal-window:hover { background: rgba(184,149,90,0.25); }
.cal-window.has-bookings { background: rgba(45,122,79,0.12); border-color: var(--green); }
.cal-window.has-bookings:hover { background: rgba(45,122,79,0.2); }

.cal-window-inner {
  padding: 4px 7px;
  height: 100%;
  overflow: hidden;
}
.cal-window-time {
  font-size: 11px;
  font-weight: 500;
  color: var(--gold-dark);
  line-height: 1.3;
}
.cal-window.has-bookings .cal-window-time { color: var(--green); }
.cal-window-bookings {
  font-size: 10px;
  color: var(--green);
  margin-top: 2px;
}

.cal-window-resize {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 12px;   /* larger hit target on mobile */
  cursor: ns-resize;
  background: linear-gradient(transparent, rgba(184,149,90,0.3));
  border-radius: 0 0 6px 6px;
  touch-action: none;
}
.cal-window.has-bookings .cal-window-resize {
  background: linear-gradient(transparent, rgba(45,122,79,0.3));
}

/* Booking chips inside window */
.cal-booking-chip {
  font-size: 10px;
  background: var(--green);
  color: #fff;
  border-radius: 3px;
  padding: 1px 5px;
  margin-top: 2px;
  display: inline-block;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* Ghost during draw */
.cal-ghost {
  position: absolute;
  left: 3px;
  right: 3px;
  border-radius: 6px;
  background: rgba(184,149,90,0.2);
  border: 1.5px dashed var(--gold);
  z-index: 4;
  pointer-events: none;
}

/* Detail popover */
.cal-popover {
  position: fixed;
  z-index: 100;
  background: var(--cream);
  border: 0.5px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(26,23,20,0.15);
  padding: 16px 18px;
  min-width: 220px;
  max-width: 280px;
}
.cal-popover-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cal-popover-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px;
  color: var(--muted);
  display: flex;
  border-radius: 4px;
}
.cal-popover-close:hover { background: var(--input-bg); color: var(--ink); }
.cal-popover-row { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.cal-popover-row strong { color: var(--ink); font-weight: 500; }
.cal-popover-bookings { margin: 10px 0; }
.cal-popover-booking {
  background: var(--green-light);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 12px;
  margin-bottom: 6px;
  color: var(--ink);
}
.cal-popover-booking-name { font-weight: 500; }
.cal-popover-booking-meta { color: var(--muted); margin-top: 1px; }
.cal-popover-actions { display: flex; gap: 7px; margin-top: 12px; }
.btn-popover-del {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 7px 12px;
  border: 0.5px solid rgba(192,57,43,.3);
  border-radius: var(--radius);
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition: background .15s;
  flex: 1;
}
.btn-popover-del:hover { background: var(--red-light); }

.cal-hint {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  color: var(--muted);
  padding: 8px 4px;
}
.cal-hint svg { stroke: var(--muted); flex-shrink: 0; }

/* Booking detail in popover */
.booking-cancel-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  padding: 3px 8px;
  border: 0.5px solid rgba(192,57,43,.3);
  border-radius: 4px;
  background: transparent;
  color: var(--red);
  cursor: pointer;
  margin-top: 4px;
  display: inline-block;
}
.booking-cancel-btn:hover { background: var(--red-light); }

/* ── Calendar v2 additions ── */
.cal-window-resize-top {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 12px;   /* larger hit target on mobile */
  cursor: ns-resize;
  background: linear-gradient(rgba(184,149,90,0.3), transparent);
  border-radius: 6px 6px 0 0;
  z-index: 4;
  touch-action: none;
}
.cal-window.has-bookings .cal-window-resize-top {
  background: linear-gradient(rgba(45,122,79,0.3), transparent);
}
.cal-window-segments {
  position: absolute;
  inset: 8px 0;
  cursor: grab;
  overflow: hidden;
  touch-action: none;
}
.cal-window-segments:active { cursor: grabbing; }
.cal-window-label {
  position: absolute;
  bottom: 10px;
  left: 0; right: 0;
  padding: 0 7px;
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
}
.cal-window-time {
  font-size: 10px;
  font-weight: 600;
  color: var(--gold-dark);
  background: rgba(245,237,217,0.88);
  border-radius: 3px;
  padding: 1px 4px;
  display: inline-block;
}
.cal-window.has-bookings .cal-window-time {
  color: var(--green);
  background: rgba(234,245,238,0.9);
}
.cal-window-book-count {
  font-size: 10px;
  color: var(--green);
  margin-left: 4px;
  font-weight: 500;
}
.cal-dragging {
  box-shadow: 0 8px 24px rgba(26,23,20,0.2);
  transform: scale(1.02);
}
.cal-drop-target {
  background: rgba(184,149,90,0.06) !important;
  outline: 1.5px dashed var(--gold);
  outline-offset: -2px;
}

/* ── Calendar scroll container ── */
.cal-card-outer {
  background: var(--cream);
  border-radius: 14px;
  border: 0.5px solid var(--line);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cal-scroll {
  overflow-x: auto;
  overflow-y: auto;
  /* max-height caps the scroll box; grid content determines actual height.
     If grid < max-height, box shrinks to fit — no phantom whitespace. */
  max-height: calc(100vh - 260px);
  overscroll-behavior: contain;
  touch-action: pan-y;
  -webkit-overflow-scrolling: touch;
}

/* Draw mode: disable pan so finger drags create windows instead of scrolling */
.cal-scroll.draw-mode {
  touch-action: none;
}

/* On mobile: min column width so days are usable */
@media (max-width: 700px) {
  .cal-grid {
    grid-template-columns: 44px repeat(7, minmax(44px, 1fr));
    min-width: 360px; /* forces horizontal scroll on very small screens */
  }
  .cal-day-name { font-size: 10px; }
  .cal-day-num  { font-size: 16px; }
}

/* ── Calendar end-of-day marker row ── */
.cal-end-marker {
  cursor: default !important;
  pointer-events: none;
  border-bottom: none;
}
.cal-end-marker:hover { background: transparent !important; }

/* ── Calendar view toggle ── */
.cal-view-toggle {
  display: flex;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}
.btn-view-toggle {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 6px 14px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-view-toggle:first-child { border-right: 0.5px solid var(--line); }
.btn-view-toggle.active { background: var(--gold-light); color: var(--gold-dark); font-weight: 500; }
.btn-view-toggle:hover:not(.active) { background: var(--input-bg); }

/* ── Month view ── */
.cal-month-outer {
  background: var(--cream);
  border-radius: 14px;
  border: 0.5px solid var(--line);
  margin-bottom: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cal-month-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}

.cal-month-dow {
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  text-align: center;
  padding: 10px 4px;
  border-bottom: 1px solid var(--line);
  background: var(--cream);
}

.cal-month-cell {
  min-height: 88px;
  border-right: 0.5px solid var(--line);
  border-bottom: 0.5px solid var(--line);
  padding: 6px 5px 4px;
  position: relative;
  vertical-align: top;
}
.cal-month-cell:nth-child(7n) { border-right: none; }
.cal-month-cell.other-month { background: rgba(180,155,120,0.04); }
.cal-month-cell.today-cell .cal-month-day { background: var(--gold); color: #fff; }
.cal-month-cell.has-avail { background: rgba(184,149,90,0.04); }

.cal-month-day {
  font-family: 'Cormorant Garamond', serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  margin-bottom: 4px;
  flex-shrink: 0;
}
.cal-month-cell.other-month .cal-month-day { color: var(--muted); font-weight: 400; }

.cal-month-avail-bar {
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.cal-month-avail-bar.available {
  background: rgba(184,149,90,0.15);
  color: var(--gold-dark);
  border-left: 2px solid var(--gold);
}
.cal-month-avail-bar.booked {
  background: rgba(45,122,79,0.12);
  color: var(--green);
  border-left: 2px solid var(--green);
}
.cal-month-more {
  font-size: 10px;
  color: var(--muted);
  padding: 1px 4px;
}

@media (max-width: 600px) {
  .cal-month-cell { min-height: 60px; padding: 4px 3px 3px; }
  .cal-month-avail-bar { font-size: 9px; padding: 1px 4px; }
  .cal-month-day { font-size: 13px; width: 22px; height: 22px; }
}

/* ── Service info editor (settings) ── */
.service-photos-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.service-photo-slot {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-photo-preview {
  aspect-ratio: 4/3;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: var(--input-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.service-photo-preview img {
  width: 100%; height: 100%; object-fit: cover;
}
.service-photo-empty {
  font-size: 12px;
  color: var(--muted);
}
.btn-upload-svc {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 7px 14px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: center;
  transition: background .15s;
}
.btn-upload-svc:hover { background: var(--gold-light); color: var(--gold-dark); border-color: var(--gold); }
.btn-del-svc {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 5px 14px;
  border: 0.5px solid rgba(192,57,43,.3);
  border-radius: var(--radius);
  background: transparent;
  color: var(--red);
  cursor: pointer;
  transition: background .15s;
}
.btn-del-svc:hover { background: var(--red-light); }
@media(max-width:500px) {
  .service-photos-row { grid-template-columns: 1fr; }
}

/* ── Services & Products settings ── */
.svc-tabs {
  display: flex;
  gap: 0;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  width: fit-content;
}
.svc-tab {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 7px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.svc-tab:first-child { border-right: 0.5px solid var(--line); }
.svc-tab.active { background: var(--gold-light); color: var(--gold-dark); font-weight: 500; }

.svc-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.svc-empty { font-size: 13px; color: var(--muted); font-style: italic; padding: 8px 0; }

.svc-row {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--input-bg);
  border: 0.5px solid var(--line);
  border-radius: 10px;
  padding: 10px 14px;
}
.svc-row-photo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.svc-row-photo-empty {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  background: var(--line);
  flex-shrink: 0;
}
.svc-row-info { flex: 1; min-width: 0; }
.svc-row-name { font-size: 14px; font-weight: 500; color: var(--ink); }
.svc-row-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.svc-inactive-badge {
  font-size: 10px; font-weight: 400;
  background: var(--line); color: var(--muted);
  border-radius: 4px; padding: 1px 5px; margin-left: 6px;
}
.svc-row-actions { display: flex; gap: 6px; flex-shrink: 0; }

.btn-add-svc {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  padding: 9px 18px;
  border: 0.5px solid var(--gold);
  border-radius: var(--radius);
  background: transparent;
  color: var(--gold-dark);
  cursor: pointer;
  display: flex; align-items: center; gap: 7px;
  transition: background .15s;
}
.btn-add-svc:hover { background: var(--gold-light); }

/* Service modal */
.svc-modal-bg {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26,23,20,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.svc-modal {
  background: var(--cream);
  border-radius: 16px;
  border: 0.5px solid var(--line);
  box-shadow: 0 16px 48px rgba(26,23,20,0.2);
  width: 100%; max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
}
.svc-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px 0;
  margin-bottom: 16px;
}
.svc-modal-header h3 {
  font-family: 'Cormorant Garamond', serif;
  font-size: 20px; font-weight: 600; color: var(--ink);
}
.svc-modal-close {
  background: transparent; border: none; cursor: pointer;
  padding: 4px; color: var(--muted); border-radius: 4px;
  display: flex; transition: background .15s;
}
.svc-modal-close:hover { background: var(--input-bg); color: var(--ink); }
.svc-modal-body { padding: 0 22px 22px; display: flex; flex-direction: column; gap: 12px; }

.svc-form-photos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.svc-form-photo-wrap { display: flex; flex-direction: column; gap: 6px; }
.svc-form-photo-preview {
  aspect-ratio: 4/3;
  border-radius: 8px;
  border: 1px dashed var(--line);
  background: var(--input-bg);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.svc-form-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media(max-width: 480px) {
  .svc-form-photos, .svc-form-row { grid-template-columns: 1fr; }
}

/* ── Booking page consent signature ── */
.sig-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 12px 4px;
}
.btn-clear-sig {
  position: absolute;
  top: 6px; right: 8px;
  font-size: 11px;
  color: var(--muted);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
}
.btn-clear-sig:hover { background: var(--input-bg); }
.sig-canvas {
  display: block;
  width: 100%;
  height: 120px;
  cursor: crosshair;
  touch-action: none;
}
.sig-wrap {
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  position: relative;
}
.booking-details-banner {
  background: rgba(184,149,90,0.08);
  border: 0.5px solid rgba(184,149,90,0.2);
  border-radius: 10px;
  padding: 14px 18px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--ink);
  line-height: 1.65;
  white-space: pre-wrap;
}

/* ── Draw mode toggle ── */
.btn-draw-mode {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  padding: 7px 14px;
  border: 0.5px solid var(--line);
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background .15s, color .15s, border-color .15s;
  flex-shrink: 0;
}
.btn-draw-mode:hover { background: var(--gold-light); color: var(--gold-dark); border-color: var(--gold); }
.btn-draw-mode.active {
  background: var(--gold);
  color: #fff;
  border-color: var(--gold);
}
.btn-draw-mode.active svg { stroke: #fff; }

/* Draw mode: show crosshair on day columns */
.cal-draw-active .cal-day-col { cursor: crosshair !important; }

/* Draw mode banner shown inside the scroll area */
.cal-draw-banner {
  display: none;
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--gold);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 7px;
  letter-spacing: .02em;
}
.cal-draw-active .cal-draw-banner { display: block; }

/* Larger resize handles for touch */
.cal-window-resize-top { height: 16px !important; }
.cal-window-resize     { height: 16px !important; }
