* {
  box-sizing: border-box;
}

:root {
  --bg: #eef5f6;
  --ink: #092033;
  --muted: #657583;
  --line: rgba(9, 32, 51, 0.12);
  --paper: rgba(255, 255, 255, 0.92);
  --teal: #2d8f8f;
  --blue: #356d9a;
  --shadow: 0 18px 54px rgba(9, 32, 51, 0.12);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(45, 143, 143, 0.22), transparent 34%),
    linear-gradient(160deg, #f8fbfb 0%, var(--bg) 48%, #dfecef 100%);
}

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

.app-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: 18px 14px 28px;
}

.hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 24px 22px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 26px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 38, 58, 0.94), rgba(45, 143, 143, 0.78)),
    linear-gradient(45deg, rgba(255, 255, 255, 0.12), transparent);
  box-shadow: var(--shadow);
}

.eyebrow {
  margin: 0 0 8px;
  color: #bfe7e2;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 10px;
  font-size: 34px;
  line-height: 1.08;
}

.hero p:last-child {
  max-width: 440px;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
}

.status-pill {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
  color: #dff7f4;
  font-size: 12px;
  font-weight: 800;
}

.section {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 22px;
  background: var(--paper);
  box-shadow: 0 12px 34px rgba(9, 32, 51, 0.08);
  backdrop-filter: blur(14px);
}

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

.section-head h2 {
  margin-bottom: 0;
  font-size: 20px;
}

.section-head span {
  color: var(--muted);
  font-size: 13px;
}

.doctor-grid,
.slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.doctor-card,
.date-button,
.slot-button {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.doctor-card {
  min-height: 132px;
  padding: 16px;
  text-align: left;
}

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

.doctor-card strong {
  margin-bottom: 6px;
  font-size: 17px;
}

.doctor-card span {
  margin-bottom: 10px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.doctor-card small {
  color: var(--muted);
  line-height: 1.4;
}

.doctor-card.active,
.date-button.active,
.slot-button.active {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 143, 143, 0.14);
}

.calendar-toolbar {
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.calendar-toolbar > div {
  min-width: 0;
  text-align: center;
}

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

.calendar-toolbar strong {
  font-size: 18px;
}

.calendar-toolbar div span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.calendar-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.calendar-nav span {
  transform: translateY(-1px);
  font-size: 30px;
  font-weight: 400;
  line-height: 1;
}

.calendar-nav:disabled {
  cursor: default;
  opacity: 0.35;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 7px;
}

.calendar-weekday {
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.date-button {
  display: flex;
  min-width: 0;
  min-height: 64px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4px;
  border-radius: 12px;
}

.date-button strong,
.date-button span {
  display: block;
}

.date-button strong {
  font-size: 17px;
  line-height: 1.15;
}

.date-button span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
}

.date-button.busy {
  cursor: not-allowed;
  color: #8f9ba4;
  background: #f1f5f6;
}

.date-button.muted {
  cursor: default;
  color: #b7c0c7;
  background: rgba(241, 245, 246, 0.5);
  opacity: 0.65;
}

.slot-button {
  min-height: 48px;
  padding: 0 10px;
  font-weight: 800;
}

.slot-button.busy {
  cursor: not-allowed;
  color: #98a4ad;
  background: #f1f5f6;
  text-decoration: line-through;
}

.booking-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.booking-form label {
  display: grid;
  gap: 6px;
}

.booking-form label:nth-child(4) {
  grid-column: 1 / -1;
}

.booking-form span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

input,
select {
  height: 48px;
  padding: 0 13px;
}

textarea {
  resize: vertical;
  min-height: 84px;
  padding: 13px;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(45, 143, 143, 0.14);
}

.primary-button {
  grid-column: 1 / -1;
  min-height: 52px;
  border: 0;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--teal), var(--blue));
  color: #fff;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 18px 34px rgba(45, 143, 143, 0.24);
}

.result {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  font-weight: 800;
  line-height: 1.45;
  white-space: pre-line;
}

.result-success {
  border: 1px solid rgba(45, 143, 143, 0.3);
  background: rgba(45, 143, 143, 0.14);
  color: #0d514f;
}

.result-error {
  border: 1px solid rgba(185, 57, 57, 0.28);
  background: rgba(185, 57, 57, 0.1);
  color: #8c2424;
}

@media (max-width: 560px) {
  .app-shell {
    padding: 10px 10px 20px;
  }

  .hero {
    display: block;
    padding: 22px 18px;
  }

  .status-pill {
    display: inline-flex;
    margin-top: 14px;
  }

  h1 {
    font-size: 30px;
  }

  .doctor-grid,
  .slot-grid,
  .booking-form {
    grid-template-columns: 1fr;
  }

  .section-calendar {
    padding-inline: 12px;
  }

  .calendar-grid {
    gap: 5px;
  }

  .date-button {
    min-height: 44px;
    border-radius: 10px;
  }

  .date-button strong {
    font-size: 15px;
  }

  .date-button span {
    font-size: 8px;
  }

  .booking-form label:nth-child(4),
  .primary-button {
    grid-column: auto;
  }
}
