:root {
  color-scheme: light;
  --ink: #17233c;
  --muted: #677489;
  --line: #dce3ec;
  --accent: #075fc9;
  --accent-dark: #004aa5;
  --soft: #eef5fd;
  --success: #168454;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background: #f5f7fa;
  color: var(--ink);
  font: 16px/1.45 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button, input { font: inherit; }
button { cursor: pointer; }

.platform-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1080px;
  margin: auto;
  padding: 24px 28px;
}

.platform-head a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.platform-head small { color: var(--muted); }

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 10px;
  background: var(--accent);
  color: white;
}

main {
  width: min(920px, calc(100% - 32px));
  margin: 20px auto 70px;
}

.organization-hero {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-bottom: 22px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 44px rgba(23, 35, 60, .07);
}

.organization-avatar {
  display: grid;
  flex: 0 0 74px;
  height: 74px;
  place-items: center;
  border-radius: 20px;
  background: linear-gradient(145deg, #0c6fdc, #00499e);
  color: white;
  font-size: 32px;
  font-weight: 800;
}

.organization-avatar img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}

h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 7px; font-size: clamp(26px, 5vw, 40px); }
h2 { margin-bottom: 0; font-size: clamp(23px, 4vw, 31px); }
.organization-hero p:last-child { margin: 0; color: var(--muted); }
.eyebrow { margin-bottom: 6px; color: var(--accent); font-size: 13px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }

.booking-progress {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 13px;
}

.booking-progress b {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 50%;
  background: #dfe6ef;
  color: #516174;
}

.booking-progress b.done { background: var(--success); color: white; }
.booking-progress i { width: 34px; height: 1px; background: var(--line); }

.content-card, .loading-card, .error-card, .success-card {
  padding: clamp(22px, 5vw, 42px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: white;
  box-shadow: 0 14px 44px rgba(23, 35, 60, .07);
}

.section-title { margin-bottom: 24px; }
.entry-grid, .choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }

.entry-card, .choice-card {
  display: flex;
  min-height: 110px;
  align-items: center;
  gap: 16px;
  padding: 19px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: white;
  color: var(--ink);
  text-align: left;
  transition: .16s ease;
}

.entry-card { align-items: flex-start; flex-direction: column; }
.entry-card:hover, .choice-card:hover { border-color: var(--accent); box-shadow: 0 9px 24px rgba(7, 95, 201, .1); transform: translateY(-2px); }
.entry-icon { font-size: 28px; }
.entry-card strong, .choice-card strong { display: block; font-size: 17px; }
.entry-card small, .choice-card small { display: block; margin-top: 4px; color: var(--muted); }
.choice-meta { margin-left: auto; color: var(--accent); font-weight: 750; text-align: right; }

.doctor-photo {
  display: grid;
  flex: 0 0 58px;
  height: 58px;
  overflow: hidden;
  place-items: center;
  border-radius: 15px;
  background: var(--soft);
  color: var(--accent);
  font-size: 23px;
  font-weight: 800;
}

.doctor-photo img { width: 100%; height: 100%; object-fit: cover; }

.back-button {
  margin: -8px 0 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
}

.selection-summary, .booking-summary {
  margin-bottom: 20px;
  padding: 13px 15px;
  border-radius: 12px;
  background: var(--soft);
  color: var(--accent-dark);
}

.booking-summary { display: flex; justify-content: space-between; gap: 12px; }
.availability-list { display: grid; gap: 22px; }
.availability-day h3 { margin-bottom: 10px; font-size: 17px; text-transform: capitalize; }
.availability-day div { display: flex; flex-wrap: wrap; gap: 9px; }
.availability-day button {
  min-width: 72px;
  padding: 10px 13px;
  border: 1px solid #bdd4ef;
  border-radius: 10px;
  background: #f7fbff;
  color: var(--accent-dark);
  font-weight: 750;
}
.availability-day button:hover { border-color: var(--accent); background: var(--accent); color: white; }

.contact-card form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.contact-card label { display: grid; gap: 7px; font-weight: 650; }
.contact-card label:first-child, .consent, .cancellation-notice, .submit-button, .form-status { grid-column: 1 / -1; }
input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--ink);
}
input:focus { border-color: var(--accent); outline: 3px solid rgba(7, 95, 201, .12); }
.consent { display: flex !important; grid-template-columns: auto 1fr; align-items: flex-start; font-weight: 400 !important; }
.consent input { width: 18px; min-height: 18px; margin-top: 3px; }
.submit-button, .secondary-button, .error-card button {
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  background: var(--accent);
  color: white;
  font-weight: 800;
}
.submit-button:hover { background: var(--accent-dark); }
.submit-button:disabled { opacity: .6; cursor: wait; }
.form-status { margin: 0; color: #b52f2f; }
.cancellation-notice {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #f0d396;
  border-radius: 11px;
  background: #fff9eb;
  color: #6c5018;
}
.cancellation-notice span { font-size: 14px; }

.loading-card, .error-card, .success-card { text-align: center; }
.spinner {
  display: inline-block;
  width: 34px;
  height: 34px;
  border: 3px solid #dbe8f7;
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.success-mark { display: grid; width: 72px; height: 72px; margin: 0 auto 18px; place-items: center; border-radius: 50%; background: #dcf7e9; color: var(--success); font-size: 36px; font-weight: 800; }
.success-details { display: grid; gap: 4px; margin: 24px auto; padding: 18px; border-radius: 14px; background: var(--soft); }
.success-cancellation { max-width: 560px; margin: 0 auto 24px; color: #6c5018; }
.secondary-button { padding: 0 24px; background: white; border: 1px solid var(--line); color: var(--ink); }
.empty-state { padding: 30px; border-radius: 14px; background: #f7f9fc; text-align: center; }

footer { padding: 24px; color: var(--muted); font-size: 13px; text-align: center; }

@media (max-width: 650px) {
  .platform-head { padding: 18px 16px; }
  .platform-head small { display: none; }
  main { width: min(100% - 20px, 920px); margin-top: 4px; }
  .organization-hero { align-items: flex-start; padding: 20px; }
  .organization-avatar { flex-basis: 54px; height: 54px; border-radius: 15px; font-size: 23px; }
  .booking-progress span { display: none; }
  .entry-grid, .choice-grid, .contact-card form { grid-template-columns: 1fr; }
  .contact-card label { grid-column: 1; }
  .booking-summary { align-items: flex-start; flex-direction: column; }
  .choice-card { min-height: 92px; }
}
