:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-2: #eef3ef;
  --text: #17211d;
  --muted: #637069;
  --line: #dce4de;
  --accent: #0f766e;
  --accent-strong: #0b5f59;
  --brand-secondary: #eef3ef;
  --danger: #b42318;
  --warn: #b7791f;
  --shadow: 0 16px 44px rgba(23, 33, 29, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.booking-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(340px, 42vw) 1fr;
}

.booking-hero {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
  background: #17211d;
}

.booking-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.hero-bar {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 8px;
  background: rgba(23, 33, 29, 0.76);
  color: #ffffff;
  backdrop-filter: blur(10px);
  border-top: 4px solid var(--accent);
}

.hero-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.booking-hero .company-logo {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  object-fit: contain;
  background: #ffffff;
}

.company-welcome {
  max-width: 440px;
  margin-top: 6px;
  color: #e5efea;
  line-height: 1.4;
}

.hero-bar a {
  color: #ffffff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 7px;
  padding: 9px 12px;
}

.booking-workspace {
  min-width: 0;
  padding: 28px;
}

.booking-header,
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.booking-header {
  margin-bottom: 20px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  font-size: 24px;
}

h3 {
  font-size: 15px;
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.hero-bar .eyebrow {
  color: #cfe0d8;
}

.settings-row {
  display: grid;
  grid-template-columns: 180px 170px;
  gap: 10px;
}

.steps-grid {
  display: grid;
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.booking-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
}

.booking-steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-secondary) 42%, white);
  color: var(--muted);
  font-weight: 800;
}

.booking-steps span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 12px;
}

.panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.form-grid {
  display: grid;
  gap: 13px;
}

.date-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
}

.primary-button,
.secondary-button {
  min-height: 40px;
  border-radius: 7px;
  border: 1px solid var(--line);
  padding: 0 12px;
  background: #ffffff;
  color: var(--text);
  font-weight: 800;
}

.primary-button {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.primary-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.secondary-button:hover,
.primary-button:not(:disabled):hover {
  border-color: var(--accent-strong);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.link-button {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.slot-panel {
  display: grid;
  gap: 16px;
}

.field-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.branch-summary,
.service-summary {
  display: grid;
  gap: 3px;
  margin-top: -6px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--brand-secondary) 32%, white);
}

.branch-summary span,
.service-summary span,
.service-summary small {
  color: var(--muted);
  font-size: 12px;
}

.service-summary small {
  margin-top: 3px;
  color: var(--warn);
  font-weight: 800;
  line-height: 1.35;
}

.collapsed-field {
  display: none;
}

.optional-details {
  display: grid;
  gap: 10px;
}

.optional-details summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 800;
}

.optional-details[open] {
  padding-top: 4px;
}

.confirmation-card {
  width: min(680px, 100%);
  margin: 0 auto;
  padding: 32px;
  text-align: center;
}

.confirmation-success {
  display: grid;
  place-items: center;
  width: 76px;
  height: 76px;
  margin: 0 auto 18px;
  border: 4px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-size: 42px;
  font-weight: 800;
}

.confirmation-card.pending-confirmation .confirmation-success {
  border-color: var(--warn);
  color: var(--warn);
}

.confirmation-card.pending-confirmation .eyebrow {
  color: var(--warn);
}

.confirmation-message {
  margin-top: 8px;
  color: var(--muted);
  font-size: 16px;
}

.confirmation-detail {
  display: grid;
  margin: 26px 0 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.confirmation-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}

.confirmation-row:last-child {
  border-bottom: 0;
}

.confirmation-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.confirmation-row strong {
  font-size: 15px;
}

.confirmation-delivery {
  margin-bottom: 20px;
  color: var(--muted);
  line-height: 1.5;
}

.confirmation-card .button-row {
  justify-content: center;
}

.confirmation-panel {
  margin-top: 16px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: color-mix(in srgb, var(--brand-secondary) 36%, white);
  white-space: nowrap;
}

.slots-list {
  display: grid;
  gap: 14px;
}

.day-group {
  display: grid;
  gap: 10px;
}

.day-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-secondary) 28%, white);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.day-toggle:hover {
  border-color: var(--line);
  background: color-mix(in srgb, var(--brand-secondary) 42%, white);
}

.day-toggle span {
  font-weight: 800;
}

.day-toggle small {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.day-toggle strong {
  color: var(--accent);
  font-size: 12px;
  text-transform: uppercase;
  white-space: nowrap;
}

.day-group.collapsed .day-toggle {
  border-color: var(--line);
  background: #ffffff;
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}

.slot-button {
  display: grid;
  gap: 4px;
  min-height: 58px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #ffffff;
  color: var(--text);
  text-align: left;
}

.slot-button:hover,
.slot-button.active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--brand-secondary) 42%, white);
}

.slot-button span {
  color: var(--muted);
  font-size: 12px;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  background: color-mix(in srgb, var(--brand-secondary) 36%, white);
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  max-width: 380px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #17211d;
  color: #ffffff;
  box-shadow: var(--shadow);
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.toast.error {
  background: var(--danger);
}

.hidden {
  display: none !important;
}

@media (max-width: 980px) {
  .booking-shell {
    grid-template-columns: 1fr;
  }

  .booking-hero {
    position: relative;
    height: 30vh;
    min-height: 220px;
  }

  .steps-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .booking-workspace {
    padding: 16px;
  }

  .booking-header,
  .panel-header,
  .hero-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .settings-row,
  .date-row,
  .booking-steps {
    grid-template-columns: 1fr;
  }

  .confirmation-card {
    padding: 24px 18px;
  }

  .confirmation-row {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .booking-header .status-pill {
    align-self: flex-start;
  }

  .slot-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .button-row > button,
  .button-row > a {
    flex: 1 1 150px;
    justify-content: center;
  }

  .toast {
    right: 12px;
    bottom: 12px;
    left: 12px;
    max-width: none;
  }
}

@media (max-width: 420px) {
  .day-toggle {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .day-toggle small {
    grid-column: 1 / -1;
  }

  .slot-grid {
    grid-template-columns: 1fr;
  }
}
.consent-options { display:grid; gap:8px; margin:0; padding:14px; border:1px solid var(--line); border-radius:8px; background:#f7faf9; }
.consent-options legend { padding:0 6px; font-weight:700; }
.consent-options .check-row { display:flex; align-items:flex-start; gap:8px; }
.consent-options .check-row input { width:auto; margin-top:3px; }
.consent-options small { color:var(--muted); line-height:1.4; }
