:root {
  --ink: #17312e;
  --muted: #6a7c79;
  --brand: #0d685f;
  --brand-dark: #084b45;
  --brand-soft: #e6f4f1;
  --accent: #e9a43a;
  --surface: #ffffff;
  --background: #f2f6f5;
  --line: #dbe7e4;
  --danger: #b93b45;
  --shadow: 0 24px 70px rgba(20, 66, 59, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 90% 5%, rgba(233, 164, 58, 0.15), transparent 25rem),
    linear-gradient(155deg, #edf6f3 0%, var(--background) 52%, #f8f4eb 100%);
  font-family: "DM Sans", sans-serif;
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

button {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.agenda-page {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom));
}

.agenda-hero {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 22px;
  align-items: end;
  padding: 8px 4px 28px;
}

.brand {
  grid-column: 1 / -1;
  width: fit-content;
}

.brand img {
  display: block;
  width: 140px;
  max-height: 56px;
  object-fit: contain;
  object-position: left center;
}

.eyebrow,
.section-kicker {
  color: var(--brand);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2 {
  font-family: "Manrope", sans-serif;
  letter-spacing: -0.035em;
}

h1 {
  margin: 7px 0 8px;
  font-size: clamp(2rem, 8vw, 3.5rem);
  line-height: 1.03;
}

.hero-copy p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.hero-icon {
  display: none;
  width: 76px;
  height: 76px;
  border: 1px solid rgba(13, 104, 95, 0.15);
  border-radius: 24px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.7);
  place-items: center;
  transform: rotate(4deg);
}

.hero-icon span {
  font-size: 38px;
}

.booking-card {
  padding: 22px 18px;
  border: 1px solid rgba(219, 231, 228, 0.9);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.steps {
  display: flex;
  align-items: flex-start;
  margin-bottom: 32px;
}

.step {
  display: grid;
  justify-items: center;
  gap: 5px;
  color: #94a5a2;
  font-size: 0.72rem;
  font-weight: 700;
}

.step span {
  display: grid;
  width: 32px;
  height: 32px;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  place-items: center;
}

.step.active {
  color: var(--brand);
}

.step.active span,
.step.complete span {
  border-color: var(--brand);
  color: white;
  background: var(--brand);
}

.step-line {
  height: 2px;
  flex: 1;
  margin: 15px 8px 0;
  background: var(--line);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.section-title h2,
.success-step h2 {
  margin: 4px 0 0;
  font-size: clamp(1.45rem, 6vw, 2rem);
}

.section-title p {
  margin: 5px 0 0;
  color: var(--muted);
}

.icon-button,
.back-button {
  border: 0;
  color: var(--brand);
  background: transparent;
  cursor: pointer;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--brand-soft);
  place-items: center;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: -6px 0 18px;
  padding: 6px 0;
  font-size: 0.86rem;
  font-weight: 700;
}

.selection-grid {
  display: grid;
  gap: 10px;
}

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

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

.choice-card {
  position: relative;
  min-height: 94px;
  padding: 16px 12px;
  border: 1.5px solid var(--line);
  border-radius: 18px;
  color: var(--ink);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.choice-card:hover:not(:disabled),
.choice-card:focus-visible:not(:disabled) {
  border-color: var(--brand);
  box-shadow: 0 10px 26px rgba(13, 104, 95, 0.12);
  transform: translateY(-2px);
  outline: none;
}

.choice-card strong,
.choice-card span {
  display: block;
}

.date-card .weekday {
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.date-card strong {
  margin-top: 5px;
  font-family: "Manrope", sans-serif;
  font-size: 1.05rem;
}

.time-card {
  min-height: 86px;
}

.time-card strong {
  font-family: "Manrope", sans-serif;
  font-size: 1.35rem;
}

.time-card span {
  margin-top: 5px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 700;
}

.time-card:disabled {
  color: #98a5a3;
  background: #f3f5f5;
  cursor: not-allowed;
}

.time-card:disabled span {
  color: var(--danger);
}

.booking-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
  padding: 14px;
  border-radius: 18px;
  background: var(--brand-soft);
}

.summary-item {
  display: flex;
  gap: 9px;
  align-items: center;
}

.summary-item .material-icons-round {
  color: var(--brand);
}

.summary-item small,
.summary-item strong {
  display: block;
}

.summary-item small {
  color: var(--muted);
}

.field {
  display: block;
  margin-bottom: 18px;
}

.field > span {
  display: block;
  margin-bottom: 7px;
  font-size: 0.86rem;
  font-weight: 700;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: 15px;
  background: white;
  transition: border-color 160ms, box-shadow 160ms;
}

.input-wrap:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(13, 104, 95, 0.08);
}

.input-wrap .material-icons-round {
  color: var(--brand);
}

.input-wrap input {
  min-width: 0;
  height: 100%;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 1rem;
}

.field.invalid .input-wrap {
  border-color: var(--danger);
}

.field-error {
  display: block;
  min-height: 17px;
  padding: 4px 4px 0;
  color: var(--danger);
}

.primary-button,
.secondary-button {
  display: flex;
  width: 100%;
  min-height: 54px;
  border-radius: 15px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 800;
  cursor: pointer;
}

.primary-button {
  border: 0;
  color: white;
  background: var(--brand);
  box-shadow: 0 12px 24px rgba(13, 104, 95, 0.22);
}

.primary-button:hover {
  background: var(--brand-dark);
}

.primary-button:disabled {
  opacity: 0.7;
  cursor: wait;
}

.secondary-button {
  border: 1.5px solid var(--brand);
  color: var(--brand);
  background: white;
}

.feedback {
  margin-bottom: 20px;
  padding: 13px 15px;
  border-radius: 14px;
  color: #8b3038;
  background: #fdebed;
  line-height: 1.4;
}

.loading-state,
.empty-state {
  grid-column: 1 / -1;
  display: grid;
  min-height: 170px;
  color: var(--muted);
  text-align: center;
  place-items: center;
  align-content: center;
  gap: 12px;
}

.empty-state .material-icons-round {
  color: var(--brand);
  font-size: 38px;
}

.empty-state p,
.loading-state p {
  margin: 0;
}

.spinner {
  width: 30px;
  height: 30px;
  border: 3px solid var(--brand-soft);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.success-step {
  padding: 12px 0 4px;
  text-align: center;
}

.success-icon {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  border-radius: 24px;
  color: white;
  background: var(--brand);
  box-shadow: 0 14px 30px rgba(13, 104, 95, 0.24);
  place-items: center;
}

.success-icon span {
  font-size: 40px;
}

.success-details {
  margin: 24px 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  text-align: left;
}

.success-details p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.success-details p:last-child {
  border-bottom: 0;
}

.success-details span {
  color: var(--muted);
}

footer {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  padding: 22px 12px 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

footer span {
  font-size: 16px !important;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@media (min-width: 620px) {
  .agenda-page {
    padding-top: 32px;
  }

  .hero-icon {
    display: grid;
  }

  .booking-card {
    padding: 30px 34px;
  }

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

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
