:root {
  color-scheme: light;
  --ink: #1c1b1b;
  --primary: #30261f;
  --primary-soft: #473c34;
  --muted: #6f6660;
  --line: #d1c4bc;
  --line-soft: #ece7e6;
  --surface: #ffffff;
  --surface-low: #f7f3f1;
  --surface-high: #f1edec;
  --accent: #f59e0b;
  --success: #2e7d32;
  --info: #0f6ba8;
  --danger: #ba1a1a;
  --radius: 8px;
  --shadow: 0 18px 42px rgb(48 38 31 / 8%);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  background: var(--surface);
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Poppins, "Avenir Next", "Segoe UI", sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.shell {
  min-height: 100vh;
  padding: 16px;
  display: grid;
}

.booking-surface {
  width: min(1420px, 100%);
  min-height: calc(100vh - 32px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
}

.sidebar {
  padding: 26px 18px 18px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid var(--line-soft);
  background: var(--surface);
}

.brand-lockup {
  min-height: 96px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  position: relative;
  width: 74px;
  height: 46px;
  display: block;
}

.brand-mark::before,
.brand-mark::after {
  content: "";
  position: absolute;
  bottom: 7px;
  height: 8px;
  border-radius: 99px;
  transform-origin: left center;
}

.brand-mark::before {
  left: 3px;
  width: 44px;
  background: #c09663;
  transform: rotate(45deg);
}

.brand-mark::after {
  left: 31px;
  width: 64px;
  background: var(--primary);
  transform: rotate(-54deg);
}

.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  color: var(--primary);
  font-size: 2rem;
  line-height: 1;
}

.rail {
  display: grid;
  gap: 8px;
}

.step {
  width: 100%;
  min-height: 40px;
  padding: 0 14px;
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-weight: 700;
}

.step span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.step.is-active {
  background: var(--primary);
  color: white;
}

.step.is-active span {
  color: #d4c3b8;
}

.booking-summary {
  margin-top: auto;
  padding: 16px;
  display: grid;
  gap: 5px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fffdfa;
}

.booking-summary span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.booking-summary strong {
  margin-bottom: 8px;
  color: var(--primary);
  font-size: 0.93rem;
  line-height: 1.25;
}

.booking-main {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto 1fr;
  background: var(--surface);
}

.topbar {
  min-height: 106px;
  padding: 24px clamp(20px, 4vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: var(--primary);
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 700;
  line-height: 1.08;
}

h2 {
  color: var(--ink);
  font-size: clamp(1.25rem, 2vw, 1.65rem);
  font-weight: 700;
}

.status-pill {
  min-height: 36px;
  padding: 8px 12px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-low);
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 800;
  white-space: nowrap;
}

.center-search {
  padding: 18px clamp(20px, 4vw, 42px);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-low);
}

.center-search label,
.details-form label,
.verify-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.slug-row {
  margin-top: 8px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input,
textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: var(--surface);
  color: var(--ink);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgb(48 38 31 / 10%);
}

.tenant-results {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}

.tenant-result {
  width: 100%;
  min-height: 62px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.tenant-result:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow);
}

.tenant-result span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tenant-result strong,
.service-card strong {
  overflow-wrap: anywhere;
}

.tenant-result small {
  color: var(--muted);
}

.tenant-result em {
  padding: 5px 8px;
  border-radius: 999px;
  background: #eaf4eb;
  color: var(--success);
  font-size: 0.75rem;
  font-style: normal;
  font-weight: 800;
}

.tenant-result em:not(:first-child) {
  white-space: nowrap;
}

.workspace {
  min-height: 0;
  display: grid;
}

.panel {
  min-width: 0;
  padding: clamp(20px, 4vw, 42px);
}

.message {
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid #efd7a5;
  border-radius: var(--radius);
  background: #fff8e7;
  color: #8a5a00;
  font-weight: 700;
}

.message[data-tone="info"] {
  border-color: #bfd8e9;
  background: #eef7fd;
  color: var(--info);
}

.message[data-tone="error"] {
  border-color: #f0b4b4;
  background: #fff1f1;
  color: var(--danger);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.section-head {
  min-height: 44px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

output {
  color: var(--primary);
  font-weight: 900;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.service-card {
  min-height: 148px;
  padding: 15px;
  display: grid;
  align-content: space-between;
  gap: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.service-card:hover {
  border-color: var(--line);
  box-shadow: var(--shadow);
  transform: translateY(-1px);
}

.service-card.is-selected {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.service-card strong {
  font-size: 1.03rem;
  line-height: 1.25;
}

.service-card small,
.service-meta {
  color: var(--muted);
  font-size: 0.84rem;
}

.service-card.is-selected small,
.service-card.is-selected .service-meta {
  color: #d4c3b8;
}

.service-card span:last-child {
  font-weight: 900;
}

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

.slot {
  min-height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--primary);
  font-weight: 900;
}

.slot.is-selected,
.slot:hover {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.details-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.details-form .full,
.details-form button,
.verify-form,
.checkout-button {
  grid-column: 1 / -1;
}

.details-form button,
.verify-form button,
.checkout-button,
.slug-row button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--primary);
  border-radius: var(--radius);
  background: var(--primary);
  color: white;
  font-weight: 800;
}

.details-form button:hover,
.verify-form button:hover,
.checkout-button:hover,
.slug-row button:hover {
  background: var(--primary-soft);
}

.verify-form {
  max-width: 380px;
  display: grid;
  gap: 14px;
}

.checkout-button {
  margin-top: 14px;
  min-width: 220px;
}

.checkout-button:disabled {
  border-color: var(--line);
  background: var(--surface-high);
  color: var(--muted);
}

.empty {
  margin: 0;
  color: var(--muted);
  font-weight: 700;
}

@media (max-width: 900px) {
  .shell {
    padding: 0;
  }

  .booking-surface {
    min-height: 100vh;
    grid-template-columns: 1fr;
    align-content: start;
    border: 0;
    border-radius: 0;
  }

  .sidebar {
    padding: 14px;
    gap: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .brand-lockup {
    min-height: 54px;
    grid-template-columns: auto 1fr;
    justify-items: start;
    border-bottom: 0;
  }

  .brand-mark {
    width: 44px;
    height: 32px;
  }

  .brand-mark::before {
    width: 28px;
    height: 6px;
  }

  .brand-mark::after {
    left: 20px;
    width: 42px;
    height: 6px;
  }

  .brand-name {
    font-size: 1.55rem;
  }

  .rail {
    grid-template-columns: repeat(4, minmax(76px, 1fr));
    overflow-x: auto;
  }

  .step {
    min-height: 44px;
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
    font-size: 0.78rem;
  }

  .booking-summary {
    display: none;
  }

  .topbar {
    min-height: 88px;
    padding: 18px;
    align-items: flex-start;
    flex-direction: column;
  }

  .center-search,
  .panel {
    padding: 18px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .slug-row,
  .details-form {
    grid-template-columns: 1fr;
  }
}

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

  .tenant-result {
    align-items: flex-start;
    flex-direction: column;
  }
}
