* { box-sizing: border-box; }

:root {
  --accent: #5F4590;
  --accent-dark: #4c3676;
  --ink: #102033;
  --muted: #66758a;
  --line: #dbe3ee;
  --soft: #f6f8fb;
  --panel: #ffffff;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f3f7fb 0%, #edf3f8 100%);
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: clamp(300px, 24vw, 390px) minmax(0, 1fr);
}

.summary {
  min-height: 100vh;
  background: var(--panel);
  padding: clamp(32px, 4vw, 56px) clamp(24px, 3vw, 44px);
  border-right: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 28px;
}

.brand-link {
  width: fit-content;
  text-decoration: none;
  transition: opacity .18s ease, transform .18s ease;
}

.brand-link:hover {
  opacity: .86;
  transform: translateY(-1px);
}

.brand img {
  width: min(200px, 100%);
  height: auto;
  object-fit: contain;
}

h1 { font-size: 32px; line-height: 1.15; margin: 0 0 16px; }
h2 { font-size: 20px; margin: 0 0 14px; }
p { line-height: 1.55; color: var(--muted); }

.session-instructions {
  margin-top: 18px;
  color: #344256;
  line-height: 1.6;
}

.session-instructions h1,
.session-instructions h2,
.session-instructions h3 {
  font-size: 18px;
  margin: 18px 0 8px;
}

.session-instructions ul,
.session-instructions ol {
  padding-left: 20px;
}

.session-instructions a {
  color: var(--accent);
}

.meta,
.types {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 24px;
}

.meta span,
.types a {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  color: #334155;
  text-decoration: none;
  background: #fff;
}

.types a.active {
  border-color: var(--accent);
  color: var(--accent);
}

.types-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  margin-top: 0;
}

.types-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 62px;
}

.booking {
  width: 100%;
  max-width: none;
  padding: clamp(28px, 4vw, 56px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 28px;
  margin: 24px;
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 16px;
}

label {
  font-weight: 800;
  font-size: 14px;
}

label span {
  color: #7b8797;
  font-weight: 400;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  background: #fff;
}

button,
.slot {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  padding: 11px 14px;
  font-weight: 800;
  cursor: pointer;
}

.step-head {
  margin-bottom: 26px;
}

.schedule-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1.2fr) minmax(300px, 0.8fr);
  gap: 20px;
  align-items: start;
  width: 100%;
}

.calendar-shell,
.slots-panel,
.compact-confirm {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 70px rgba(18, 30, 48, 0.08);
}

.calendar-shell,
.slots-panel {
  padding: clamp(16px, 2vw, 24px);
}

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

.calendar-month {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 900;
  text-align: center;
}

.calendar-sub {
  color: var(--muted);
  font-size: 13px;
  text-align: center;
  margin-top: 3px;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 8px;
  background: var(--soft);
  color: #1f2937;
  border-color: var(--line);
}

.calendar-weekdays,
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: clamp(6px, 0.8vw, 10px);
}

.calendar-weekdays {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  margin-bottom: 10px;
}

.day {
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  background: var(--soft);
  color: #1f2937;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.day:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.day.selected {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

.day:disabled {
  color: #b7c0ce;
  background: #f1f5f9;
  cursor: not-allowed;
}

.day.empty {
  border: 0;
  background: transparent;
}

.slots-panel {
  min-height: 430px;
}

.slots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  max-height: calc(100vh - 230px);
  overflow: auto;
  padding-right: 4px;
}

.slot {
  min-height: 40px;
  background: #fff;
  color: var(--accent);
}

.slot.active {
  background: var(--accent);
  color: #fff;
}

.form {
  max-width: 520px;
}

.compact-confirm {
  padding: 22px;
  margin-top: 20px;
  width: 100%;
  box-shadow: none;
}

.message,
.muted {
  color: var(--muted);
  margin-top: 16px;
}

.message.is-processing {
  display: grid;
  gap: 4px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  border: 1px solid rgba(95, 69, 144, .45);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: 0 18px 40px rgba(95, 69, 144, .28);
  font-size: 15px;
}

.message.is-processing strong {
  color: #fff;
  font-size: 18px;
}

.message.is-processing span {
  color: rgba(255, 255, 255, .86);
}

.message.is-error {
  color: #8a1f1f;
  background: #fff2f2;
  border: 1px solid #f2b8b8;
  border-radius: 10px;
  padding: 14px 16px;
  font-weight: 800;
}

button:disabled {
  opacity: .74;
  cursor: wait;
}

.confirmation-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  box-shadow: 0 24px 70px rgba(18, 30, 48, 0.08);
  max-width: 760px;
}

.confirmation-card h2 {
  color: var(--accent);
}

.confirmation-card dl {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr);
  gap: 10px 16px;
  margin: 18px 0;
}

.confirmation-card dt {
  font-weight: 800;
  color: var(--ink);
}

.confirmation-card dd {
  margin: 0;
  color: #344256;
}

.confirmation-instructions {
  border-top: 1px solid var(--line);
  margin-top: 18px;
  padding-top: 18px;
}

.confirmation-instructions h3 {
  margin: 0 0 10px;
}

.confirmation-actions {
  margin-top: 20px;
}

.calendar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-weight: 800;
}

.calendar-button:hover {
  background: var(--accent-dark);
  color: #fff;
}

.admin {
  max-width: 900px;
  margin: 0 auto;
  padding: 32px 16px;
}

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

  .summary {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

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

  .slots {
    max-height: none;
  }
}

@media (max-width: 560px) {
  .summary,
  .booking {
    padding: 26px 18px;
  }

  .calendar-shell,
  .slots-panel {
    padding: 14px;
  }

  .calendar-weekdays,
  .calendar-grid {
    gap: 5px;
  }
}
