:root {
  --bg: #f7efe0;
  --bg-warm: #f2d7a3;
  --ink: #0f2d34;
  --ink-soft: #31555d;
  --teal: #0f6c74;
  --teal-deep: #0b4b52;
  --amber: #f2a13a;
  --amber-soft: #ffd08a;
  --paper: rgba(255, 250, 241, 0.88);
  --border: rgba(15, 45, 52, 0.12);
  --shadow: 0 24px 70px rgba(15, 45, 52, 0.14);
  --success: #2f8f63;
  --error: #bc4f42;
  --muted: rgba(15, 45, 52, 0.66);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Avenir Next", "Trebuchet MS", Verdana, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(255, 208, 138, 0.9), transparent 28%),
    radial-gradient(circle at top right, rgba(15, 108, 116, 0.18), transparent 22%),
    linear-gradient(135deg, #fff8ea 0%, #f7efe0 46%, #f3e6d0 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(15, 45, 52, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 45, 52, 0.03) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(circle at center, black 45%, transparent 92%);
}

.page-shell {
  width: min(1200px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 2rem 0 3rem;
}

.hero,
.panel {
  animation: rise-in 0.7s ease both;
}

.hero {
  padding: 2rem 2rem 1.75rem;
}

.eyebrow,
.panel-kicker,
.status-label {
  margin: 0;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-size: 0.74rem;
  color: var(--teal-deep);
}

.hero h1,
.panel h2,
.scheduler-copy h3 {
  margin: 0;
  font-family: Georgia, "Palatino Linotype", serif;
  font-weight: 700;
  line-height: 1.05;
}

.hero h1 {
  font-size: clamp(1rem, 2vw, 1.8rem);
  max-width: none;
  white-space: nowrap;
}

.hero-copy {
  max-width: 58ch;
  margin: 1rem 0 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.hero-badges span {
  padding: 0.72rem 1rem;
  border-radius: 999px;
  border: 1px solid rgba(15, 108, 116, 0.18);
  background: rgba(255, 250, 241, 0.78);
  font-size: 0.92rem;
  color: var(--ink-soft);
  backdrop-filter: blur(12px);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 1.5rem;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.form-panel,
.status-panel {
  padding: 1.5rem;
}

.panel-heading {
  margin-bottom: 1.4rem;
}

.panel-heading p {
  margin: 0.5rem 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.booking-form {
  display: grid;
  gap: 1.25rem;
}

.field-grid,
.schedule-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

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

.field-wide {
  grid-column: span 2;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.field span {
  font-size: 0.88rem;
  color: var(--ink-soft);
}

.field input,
.field select {
  width: 100%;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(15, 45, 52, 0.16);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus,
.field select:focus {
  outline: none;
  border-color: rgba(15, 108, 116, 0.7);
  box-shadow: 0 0 0 4px rgba(15, 108, 116, 0.12);
  transform: translateY(-1px);
}

.scheduler-box {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(15, 108, 116, 0.08), rgba(242, 161, 58, 0.14)),
    rgba(255, 255, 255, 0.56);
  border: 1px solid rgba(15, 108, 116, 0.12);
}

.scheduler-copy p {
  margin: 0.55rem 0 1rem;
  color: var(--muted);
  line-height: 1.6;
}

.schedule-name-row {
  margin-bottom: 1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
}

.actions button {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.95rem 1.25rem;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.actions button:hover {
  transform: translateY(-1px);
}

.actions button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.primary-action {
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  color: #fffaf4;
  box-shadow: 0 18px 32px rgba(15, 108, 116, 0.22);
}

.secondary-action {
  background: linear-gradient(135deg, var(--amber), #f08b2e);
  color: #3f2300;
  box-shadow: 0 18px 32px rgba(242, 161, 58, 0.24);
}

.form-note {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.status-stack {
  display: grid;
  gap: 1rem;
}

.status-card,
.result-card {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(15, 45, 52, 0.08);
}

.endpoint-preview {
  display: block;
  margin-top: 0.45rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(15, 45, 52, 0.06);
  color: var(--ink-soft);
  white-space: pre-wrap;
  word-break: break-word;
}

.flash-message {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-md);
  line-height: 1.5;
  background: rgba(15, 108, 116, 0.09);
  border: 1px solid rgba(15, 108, 116, 0.14);
  color: var(--teal-deep);
}

.flash-message.error {
  background: rgba(188, 79, 66, 0.08);
  border-color: rgba(188, 79, 66, 0.18);
  color: #8e352c;
}

.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.result-badge {
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
}

.result-badge.neutral {
  background: rgba(15, 45, 52, 0.08);
  color: var(--ink-soft);
}

.result-badge.success {
  background: rgba(47, 143, 99, 0.14);
  color: var(--success);
}

.result-badge.error {
  background: rgba(188, 79, 66, 0.14);
  color: var(--error);
}

.result-output {
  margin: 0.95rem 0 0;
  padding: 1rem;
  min-height: 240px;
  border-radius: var(--radius-md);
  background: #11262c;
  color: #edf7ef;
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.86rem;
  line-height: 1.55;
  overflow: auto;
}

code {
  font-family: "Cascadia Code", Consolas, monospace;
  font-size: 0.92em;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@media (max-width: 700px) {
  .page-shell {
    width: min(100% - 1rem, 100%);
    padding-top: 1rem;
  }

  .hero,
  .form-panel,
  .status-panel {
    padding: 1.2rem;
  }

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

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

  .field-wide {
    grid-column: auto;
  }

  .actions {
    flex-direction: column;
  }

  .actions button {
    width: 100%;
  }
}
