:root {
  --navy: #1f2a44;
  --gold: #a9834f;
  --text: #201f1e;
  --muted: #605e5c;
  --border: #e1dfdd;
  --page-bg: #f3f2f1;
  --card-bg: #ffffff;
  --selected: #201f1e;
  --danger: #a4262c;
  --radius: 4px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.page {
  max-width: 640px;
  margin: 0 auto;
  background: var(--card-bg);
  min-height: 100vh;
}

/* header */
.header {
  text-align: center;
  padding: 32px 24px 24px;
}

.logo {
  width: 96px;
  height: 96px;
  margin: 0 auto 16px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: #faf9f8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.logo svg { width: 42px; height: 42px; }

.logo .logo-caption {
  font-size: 5px;
  letter-spacing: 0.06em;
  color: var(--gold);
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
}

.firm-name {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: var(--text);
}

/* section headers */
.section {
  padding: 20px 24px;
  border-top: 1px solid var(--border);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
  margin: 0 0 16px;
}

.section-title .optional {
  font-weight: 400;
  text-transform: none;
  color: var(--muted);
  letter-spacing: normal;
}

.section-title svg { width: 16px; height: 16px; flex: none; color: var(--muted); }

/* service cards */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .services { grid-template-columns: 1fr; }
}

.service-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  background: var(--card-bg);
  transition: border-color .15s ease;
}

.service-card:hover { border-color: #c7c6c4; }

.service-card.selected {
  border-top-color: var(--navy);
  border-color: var(--navy);
}

.service-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  font-weight: 600;
  margin-bottom: 6px;
}

.radio-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 1.5px solid #8a8886;
  flex: none;
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.service-card.selected .radio-dot {
  background: var(--selected);
  border-color: var(--selected);
}

.radio-dot svg { width: 11px; height: 11px; fill: #fff; display: none; }
.service-card.selected .radio-dot svg { display: block; }

.service-desc {
  color: var(--muted);
  font-size: 12.5px;
  margin-bottom: 8px;
}

.read-more {
  color: #2564cf;
  cursor: pointer;
  text-decoration: underline;
  font-size: 12.5px;
}

.service-duration {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--text);
}

.service-duration svg { width: 13px; height: 13px; color: var(--muted); }

.booking-pill {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  background: #f3f2f1;
  border-radius: 14px;
  padding: 6px 16px;
  font-size: 12.5px;
  text-align: center;
}

/* staff dropdown */
.dropdown { position: relative; }

.dropdown-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: #faf9f8;
  border-radius: var(--radius);
  font: inherit;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.dropdown-btn svg { width: 12px; height: 12px; transition: transform .15s ease; }
.dropdown.open .dropdown-btn svg { transform: rotate(180deg); }

.dropdown-list {
  display: none;
  position: absolute;
  z-index: 5;
  left: 0; right: 0;
  margin-top: 4px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 4px 14px rgba(0,0,0,.12);
  max-height: 260px;
  overflow-y: auto;
}

.dropdown.open .dropdown-list { display: block; }

.dropdown-item {
  padding: 9px 12px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
}

.dropdown-item:hover { background: #f3f2f1; }
.dropdown-item.active { background: #edf3fb; }

.avail-tag { font-size: 11px; }
.avail-tag.yes { color: #0b6a0b; }
.avail-tag.no { color: var(--muted); }

/* date/time layout */
.date-time-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
}

@media (max-width: 480px) {
  .date-time-grid { grid-template-columns: 1fr; }
}

.cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 13px;
}

.cal-head button {
  border: none;
  background: none;
  cursor: pointer;
  padding: 4px 8px;
  color: var(--text);
  font-size: 14px;
}

.cal-head button:disabled { color: #c8c6c4; cursor: default; }

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  text-align: center;
}

.cal-dow {
  font-size: 10.5px;
  color: var(--muted);
  padding: 4px 0;
  font-weight: 600;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: none;
  border-radius: 50%;
  font-size: 12.5px;
  cursor: pointer;
  color: var(--text);
  position: relative;
}

.cal-day.pad { visibility: hidden; }
.cal-day.unavailable { color: #c8c6c4; cursor: default; }
.cal-day.available::after {
  content: "";
  position: absolute;
  bottom: 2px;
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--gold);
}
.cal-day.available:hover { background: #f3f2f1; }
.cal-day.selected { background: var(--navy); color: #fff; }
.cal-day.selected::after { display: none; }

.time-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

.time-slot {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: var(--radius);
  padding: 9px 12px;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.time-slot:hover { border-color: var(--navy); }
.time-slot.selected { border-color: var(--navy); background: var(--navy); color: #fff; }

.time-slot.taken {
  border-color: #eda100;
  background: #fff8e6;
}
.time-slot.taken.selected { border-color: #b3211f; background: #fdecea; color: var(--text); }
.time-slot .warn-icon { color: #b3211f; margin-right: 2px; }
.time-slot .warn-text {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #8a5b00;
  letter-spacing: 0.02em;
  margin-top: 2px;
}

.time-empty {
  color: var(--muted);
  font-size: 12.5px;
  padding: 8px 0;
}

.tz-row {
  margin-top: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}

.tz-row svg { width: 14px; height: 14px; }

select, input[type="text"], input[type="email"], input[type="tel"], textarea {
  font: inherit;
  padding: 9px 11px;
  border: 1px solid #8a8886;
  border-radius: var(--radius);
  width: 100%;
  background: #fff;
  color: var(--text);
}

select:focus, input:focus, textarea:focus {
  outline: 2px solid var(--navy);
  outline-offset: -1px;
}

.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 5px;
}
.field .hint { color: var(--muted); font-weight: 400; }

.phone-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px;
}

textarea { min-height: 70px; resize: vertical; }

.select-a-service-hint {
  text-align: center;
  background: #f3f2f1;
  border-radius: 14px;
  padding: 8px 14px;
  font-size: 12.5px;
  margin: 18px 0 0;
}

.book-btn {
  width: 100%;
  background: var(--navy);
  color: #fff;
  border: none;
  padding: 12px;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
}

.book-btn:hover { background: #16203a; }
.book-btn:disabled { background: #c8c6c4; cursor: not-allowed; }

.footer {
  text-align: center;
  padding: 24px;
  font-size: 12px;
  color: var(--muted);
}

.footer a { color: var(--muted); }

.hidden { display: none !important; }

.confirm-panel {
  padding: 48px 24px;
  text-align: center;
}

.confirm-panel .check {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #0b6a0b;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
}

.confirm-panel h2 { margin: 0 0 8px; }
.confirm-panel p { color: var(--muted); margin: 0 0 4px; }

.demo-banner {
  background: #fff4ce;
  border-bottom: 1px solid #e8d98a;
  color: #4a3f00;
  text-align: center;
  font-size: 12px;
  padding: 6px 12px;
}

.user-bar {
  background: var(--navy);
  color: #fff;
  text-align: center;
  font-size: 12px;
  padding: 6px 12px;
}

.user-bar a { color: #fff; text-decoration: underline; }
