:root {
  --bg: #f6f1e7;
  --bg-soft: #fbf7f1;
  --ink: #17322d;
  --ink-soft: #55746d;
  --line: rgba(23, 50, 45, 0.12);
  --card: rgba(255, 251, 246, 0.88);
  --card-strong: rgba(255, 255, 255, 0.94);
  --teal: #1d766d;
  --teal-deep: #0e5b56;
  --sand: #e9d3ab;
  --clay: #bb6c4d;
  --gold: #d79e3d;
  --shadow: 0 28px 70px rgba(79, 64, 40, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(29, 118, 109, 0.14), transparent 22%),
    radial-gradient(circle at top right, rgba(187, 108, 77, 0.12), transparent 26%),
    linear-gradient(180deg, #f7f1e5 0%, #f4ecde 48%, #f9f5ef 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(29, 118, 109, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(29, 118, 109, 0.04) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at center, black 38%, transparent 80%);
  opacity: 0.5;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.shell {
  width: min(1220px, calc(100% - 32px));
  margin: 0 auto;
  padding-bottom: 48px;
}

.topbar {
  position: sticky;
  top: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 16px 18px;
  border: 1px solid rgba(23, 50, 45, 0.1);
  border-radius: 24px;
  background: rgba(255, 251, 245, 0.85);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.brand-badge,
.status-chip,
.button,
.eyebrow {
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.brand-badge {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--teal), var(--gold));
  color: white;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand strong {
  display: block;
  font-size: 1.05rem;
}

.brand small {
  color: var(--ink-soft);
}

.topnav {
  display: inline-flex;
  align-items: center;
  gap: 20px;
}

.topnav a {
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.topnav a:hover {
  color: var(--ink);
}

.hero,
.workspace,
.section-grid {
  margin-top: 32px;
}

.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 24px;
  align-items: center;
  padding-top: 42px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--teal);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.hero h1,
.section-head h2,
.section-head h3 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(3.1rem, 7vw, 5.4rem);
  line-height: 0.94;
  max-width: 12ch;
}

.section-head h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 0.96;
}

.section-head h3 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1;
}

.hero-text,
.feedback,
.empty-state,
.callout p,
.deliverables li,
.detail-pane p,
.stack-item p,
.notification-item p {
  color: var(--ink-soft);
  line-height: 1.7;
}

.hero-text {
  max-width: 56ch;
  margin: 18px 0 0;
  font-size: 1.05rem;
}

.hero-actions,
.button-row,
.quick-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease, border-color 180ms ease;
}

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

.button-primary {
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--teal-deep));
  box-shadow: 0 18px 40px rgba(29, 118, 109, 0.2);
}

.button-secondary {
  color: white;
  background: linear-gradient(135deg, var(--clay), #9d5032);
  box-shadow: 0 18px 40px rgba(187, 108, 77, 0.18);
}

.button-ghost {
  color: var(--ink);
  border-color: rgba(23, 50, 45, 0.14);
  background: rgba(255, 255, 255, 0.66);
}

.hero-credentials,
.summary-grid,
.surface-metrics,
.workspace-grid,
.section-grid,
.inline-grid {
  display: grid;
  gap: 16px;
}

.hero-credentials {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.hero-credentials article,
.metric-card,
.summary-tile {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.56);
}

.hero-credentials span,
.metric-card span,
.summary-tile span,
.stack-item small,
.slot-chip small,
.tiny-label {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.hero-credentials strong,
.metric-card strong,
.summary-tile strong,
.stack-item strong,
.slot-chip strong {
  display: block;
  margin-top: 8px;
}

.hero-panel {
  position: relative;
  min-height: 540px;
  display: grid;
  place-items: center;
}

.feature-surface,
.card,
.stack-item,
.notification-item {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent),
    var(--card);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.feature-surface::after,
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, transparent 20%, rgba(255, 255, 255, 0.3), transparent 80%);
  transform: translateX(-130%);
  animation: sheen 10s linear infinite;
  pointer-events: none;
}

.feature-surface {
  width: min(100%, 480px);
  padding: 24px;
}

.surface-heading,
.section-head,
.section-head.compact,
.stack-item-head,
.slot-chip-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.surface-heading {
  align-items: center;
}

.surface-heading p,
.surface-notes p {
  margin: 0;
}

.surface-track {
  margin-top: 22px;
  padding: 18px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.track-labels,
.track-bars,
.surface-notes,
.detail-meta,
.slot-grid,
.pill-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.track-labels {
  justify-content: space-between;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.track-bars {
  margin-top: 14px;
}

.bar {
  display: block;
  flex: 1 1 120px;
  height: 16px;
  border-radius: 999px;
}

.bar-a {
  background: linear-gradient(90deg, rgba(29, 118, 109, 0.3), rgba(29, 118, 109, 0.9));
}

.bar-b {
  background: linear-gradient(90deg, rgba(215, 158, 61, 0.35), rgba(215, 158, 61, 0.88));
}

.bar-c {
  background: linear-gradient(90deg, rgba(187, 108, 77, 0.3), rgba(187, 108, 77, 0.9));
}

.surface-notes {
  margin-top: 18px;
}

.surface-notes p {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(23, 50, 45, 0.1);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-chip.accent {
  color: var(--teal-deep);
  background: rgba(29, 118, 109, 0.12);
  border-color: rgba(29, 118, 109, 0.16);
}

.status-chip.subtle {
  background: rgba(255, 255, 255, 0.68);
}

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

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

.narrow-top {
  margin-top: 20px;
}

.card {
  padding: 24px;
}

.section-head {
  align-items: flex-start;
  margin-bottom: 20px;
}

.section-head.compact {
  margin-bottom: 16px;
}

.stack-form,
.booking-form {
  display: grid;
  gap: 16px;
}

.auth-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

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

.field {
  display: grid;
  gap: 8px;
}

.field span,
.checkbox-row span {
  font-size: 0.9rem;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: 12px 14px;
  border: 1px solid rgba(23, 50, 45, 0.12);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
}

.field textarea {
  min-height: 110px;
  resize: vertical;
}

.feedback {
  margin: 0;
}

.callout {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.66);
}

.doctor-list,
.appointment-list,
.notification-list,
.stack-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.doctor-card,
.stack-item,
.notification-item,
.slot-chip {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
}

.doctor-card h3,
.detail-pane h3,
.detail-pane h4,
.stack-item h4 {
  margin: 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  letter-spacing: -0.02em;
}

.doctor-card h3 {
  font-size: 1.8rem;
}

.detail-pane {
  display: grid;
  gap: 14px;
}

.detail-meta span,
.pill-wrap span,
.slot-chip .badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.slot-grid {
  margin-top: 6px;
}

.slot-chip {
  min-width: 160px;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.slot-chip:hover,
.slot-chip.active {
  transform: translateY(-2px);
  border-color: rgba(29, 118, 109, 0.28);
  background: rgba(29, 118, 109, 0.12);
}

.slot-chip.unavailable {
  opacity: 0.62;
  cursor: not-allowed;
}

.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--teal);
}

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

.reschedule-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(187, 108, 77, 0.22);
  border-radius: 22px;
  background: rgba(187, 108, 77, 0.08);
}

.reschedule-banner p {
  margin: 6px 0 0;
  color: var(--ink-soft);
}

.hidden,
.doctor-only.hidden-field {
  display: none;
}

.appointment-card-actions,
.stack-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.mini-button,
.status-select {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid rgba(23, 50, 45, 0.12);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
}

.mini-button {
  cursor: pointer;
  font-weight: 700;
}

.pill-wrap {
  margin-bottom: 18px;
}

.deliverables {
  margin: 0;
  padding-left: 18px;
  line-height: 1.8;
}

.empty-state {
  margin: 0;
}

.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 700ms ease, transform 700ms ease;
}

.js .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes sheen {
  0% {
    transform: translateX(-130%);
  }
  100% {
    transform: translateX(130%);
  }
}

@media (max-width: 1100px) {
  .hero,
  .section-grid,
  .workspace-grid,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }

  .topnav {
    flex-wrap: wrap;
  }
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 18px, 1220px);
  }

  .topbar {
    top: 10px;
    padding: 14px;
  }

  .topnav {
    display: none;
  }

  .hero {
    padding-top: 24px;
  }

  .hero-credentials,
  .inline-grid,
  .summary-grid,
  .surface-metrics {
    grid-template-columns: 1fr;
  }

  .card,
  .feature-surface {
    padding: 18px;
  }

  .button,
  .button-primary,
  .button-secondary,
  .button-ghost {
    width: 100%;
  }

  .reschedule-banner,
  .surface-heading,
  .section-head,
  .stack-item-head,
  .slot-chip-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
