:root {
  color-scheme: light;
  --ink: #1d2a2e;
  --muted: #657579;
  --line: #d8e1df;
  --paper: #f7faf8;
  --panel: #ffffff;
  --accent: #0d766e;
  --accent-dark: #075e59;
  --warm: #b65f2a;
  --shadow: 0 14px 40px rgba(25, 50, 48, 0.1);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--accent-dark);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px 1fr;
}

.sidebar {
  background: #173c3a;
  color: white;
  padding: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 34px;
}

.mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f1c27d;
  color: #173c3a;
  font-weight: 800;
}

.brand-logo {
  width: 54px;
  height: 54px;
  border-radius: 8px;
  object-fit: cover;
  background: white;
}

.portrait-logo {
  border-radius: 999px;
  object-position: center;
}

.login-logo {
  width: min(220px, 70%);
  height: auto;
}

.brand strong,
.brand span {
  display: block;
}

.brand span,
.nav-note {
  color: rgba(255, 255, 255, 0.72);
  font-size: 14px;
}

.nav-list {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
}

.nav-item.active {
  background: white;
  color: #173c3a;
}

.main {
  padding: 32px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

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

h1 {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1.05;
  max-width: 760px;
}

.page-subtitle {
  color: var(--muted);
  max-width: 760px;
}

.actions,
.field-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button,
button {
  min-height: 44px;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  background: var(--accent);
  color: white;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
}

.button.secondary,
button.secondary {
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.button.warning {
  background: var(--warm);
}

button.danger {
  color: #9f2d20;
  border-color: #ecc8c2;
}

.grid {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 20px;
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 22px;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stat strong {
  display: block;
  font-size: 28px;
}

.stat span,
.meta,
.empty {
  color: var(--muted);
}

.appointment-list {
  display: grid;
  gap: 12px;
}

.appointment-actions {
  margin-top: 14px;
}

.calendar-panel {
  margin-top: 20px;
}

.calendar-list {
  display: grid;
  gap: 10px;
}

.calendar-event {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.calendar-event strong,
.calendar-event span {
  display: block;
}

.calendar-event span {
  color: var(--muted);
  font-size: 14px;
  margin-top: 4px;
}

.card {
  padding: 16px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: #e8f2ef;
  color: var(--accent-dark);
  font-size: 13px;
  white-space: nowrap;
}

.link-box {
  display: grid;
  gap: 10px;
}

.link-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfdfc;
  overflow-wrap: anywhere;
  color: var(--muted);
}

.booking-page {
  min-height: 100vh;
}

.booking-hero {
  min-height: 42vh;
  padding: 34px clamp(20px, 5vw, 72px);
  color: var(--ink);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0.86) 42%, rgba(255, 255, 255, 0.2) 100%),
    url("/mindful-logo-hd.jpg");
  background-size: cover, min(78vw, 1040px) auto;
  background-position: center, right center;
  background-repeat: no-repeat;
  display: flex;
  align-items: end;
}

.booking-hero h1 {
  max-width: 820px;
  margin-bottom: 14px;
}

.booking-hero p {
  max-width: 640px;
  color: var(--muted);
}

.language-control {
  display: inline-flex;
  gap: 6px;
  padding: 4px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
}

.language-control button {
  min-height: 34px;
  padding: 0 12px;
  background: transparent;
  color: var(--ink);
  border-color: transparent;
}

.language-control button.active {
  background: var(--accent);
  color: white;
}

.booking-content {
  width: min(1120px, calc(100% - 32px));
  margin: -44px auto 48px;
  display: grid;
  grid-template-columns: 0.92fr 1.08fr;
  gap: 20px;
  align-items: start;
}

.thanks-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(rgba(247, 250, 248, 0.9), rgba(247, 250, 248, 0.9)),
    url("https://images.unsplash.com/photo-1506126613408-eca07ce68773?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
}

.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(560px, 100%);
  display: grid;
  gap: 14px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 42px);
}

.thanks-panel {
  width: min(680px, 100%);
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: clamp(24px, 5vw, 44px);
}

.confirmation-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #e8f2ef;
  color: var(--accent-dark);
  font-size: 30px;
  font-weight: 800;
  margin-bottom: 20px;
}

.confirmation-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0;
}

.confirmation-details div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfdfc;
}

.confirmation-details span,
.confirmation-details strong {
  display: block;
}

.confirmation-details span {
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.map-section {
  display: grid;
  gap: 12px;
  margin: 26px 0;
}

.map-section h2 {
  font-size: 20px;
  margin-bottom: 4px;
}

.office-map {
  width: 100%;
  min-height: 260px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink);
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 10px 12px;
  background: white;
  color: var(--ink);
}

.phone-row {
  display: grid;
  grid-template-columns: minmax(112px, 0.36fr) 1fr;
  gap: 8px;
}

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

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

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(164px, 1fr));
  gap: 10px;
  max-height: 430px;
  overflow: auto;
  padding-right: 4px;
}

.slot {
  min-height: 58px;
  background: white;
  color: var(--ink);
  border-color: var(--line);
}

.slot.selected {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  background: #173c3a;
  color: white;
  padding: 14px 16px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  transform: translateY(140%);
  transition: transform 180ms ease;
  max-width: min(420px, calc(100vw - 40px));
}

.toast.show {
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(14, 32, 34, 0.42);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(560px, 100%);
  display: grid;
  gap: 18px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 22px;
}

.modal-actions {
  justify-content: flex-end;
}

@media (max-width: 900px) {
  .shell,
  .grid,
  .booking-content,
  .confirmation-details {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 20px;
  }

  .main {
    padding: 22px;
  }

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

  .topbar,
  .card-header {
    align-items: stretch;
    flex-direction: column;
  }

  .booking-hero {
    min-height: 36vh;
  }
}
