:root {
  color-scheme: light dark;
  --background: #f7f5ef;
  --text: #1d2528;
  --muted: #5a666b;
  --accent: #256d68;
  --surface: #ffffff;
  --border: #d7d1c2;
  --danger: #9f2727;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #15191a;
    --text: #f5f1e8;
    --muted: #b8c2c4;
    --accent: #72d0c6;
    --surface: #202628;
    --border: #3a4446;
    --danger: #ff9a9a;
  }
}

body[data-theme="light"] {
  color-scheme: light;
  --background: #f7f5ef;
  --text: #1d2528;
  --muted: #5a666b;
  --accent: #256d68;
  --surface: #ffffff;
  --border: #d7d1c2;
  --danger: #9f2727;
}

body[data-theme="dark"] {
  color-scheme: dark;
  --background: #15191a;
  --text: #f5f1e8;
  --muted: #b8c2c4;
  --accent: #72d0c6;
  --surface: #202628;
  --border: #3a4446;
  --danger: #ff9a9a;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding: 1rem 0;
}

.brand,
.nav a,
.link-button {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav form {
  margin: 0;
}

.link-button {
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  font: inherit;
}

.shell {
  width: min(100% - 2rem, 58rem);
  margin: 0 auto;
  padding: 4rem 0;
}

.home-shell {
  width: min(100% - 1.5rem, 72rem);
  padding: 1rem 0 3rem;
}

.intro {
  max-width: 42rem;
}

.panel {
  max-width: 42rem;
  padding: 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.panel + .panel {
  margin-top: 1rem;
}

.panel-wide {
  max-width: 58rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--accent);
  font-size: 0.875rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1 {
  max-width: 12ch;
  margin: 0;
  font-size: clamp(2.25rem, 4vw, 4.5rem);
  line-height: 1;
}

h2 {
  margin: 0;
  font-size: 1.5rem;
}

p {
  max-width: 36rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 1.05rem;
}

.actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0 1rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: var(--background);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button-secondary {
  background: transparent;
  color: var(--accent);
}

.button-on-image {
  border-color: rgba(255, 255, 255, 0.72);
  color: #ffffff;
}

.home-hero {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(30rem, 68svh, 42rem);
  overflow: hidden;
  border-radius: 8px;
  isolation: isolate;
}

.home-hero-image,
.home-hero-overlay {
  position: absolute;
  inset: 0;
}

.home-hero-image {
  z-index: -2;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 10%;
}

.home-hero-overlay {
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(10, 17, 18, 0.84), rgba(10, 17, 18, 0.48) 46%, rgba(10, 17, 18, 0.08)),
    linear-gradient(0deg, rgba(10, 17, 18, 0.64), rgba(10, 17, 18, 0.04) 48%);
}

.home-hero-content {
  width: min(100%, 39rem);
  max-width: 100%;
  padding: clamp(1.25rem, 4vw, 3rem);
}

.home-hero .eyebrow {
  color: #b8f2e9;
}

.home-hero h1 {
  max-width: 13.5ch;
  color: #ffffff;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.home-hero p {
  color: rgba(255, 255, 255, 0.86);
  text-wrap: pretty;
}

.home-reservation-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--border);
}

.home-reservation-strip div {
  display: grid;
  gap: 0.25rem;
  min-height: 7rem;
  align-content: center;
  padding: 1rem;
  background: var(--surface);
}

.home-reservation-strip span {
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.home-reservation-strip strong {
  max-width: 18rem;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.25;
}

.button-danger {
  border-color: var(--danger);
  background: var(--danger);
}

.stack {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

label {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  background: var(--background);
  color: var(--text);
  font: inherit;
}

input,
select {
  min-height: 2.75rem;
}

textarea {
  resize: vertical;
}

input:disabled {
  border-style: dashed;
  color: var(--muted);
  opacity: 0.72;
  cursor: not-allowed;
}

.date-time-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 8rem;
  gap: 0.75rem;
  align-items: end;
}

.fixed-time {
  text-align: center;
  font-weight: 700;
}

.form-note {
  margin: -0.25rem 0 0;
  font-size: 0.95rem;
}

.messages {
  display: grid;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.message {
  max-width: none;
  margin: 0;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.message-error {
  border-color: var(--danger);
  color: var(--danger);
}

.status-note {
  color: var(--danger);
  font-weight: 700;
}

.table-list {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.row-link small {
  display: block;
  color: var(--muted);
}

.activity-row {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.activity-row small {
  display: block;
  color: var(--muted);
}

.activity-row p {
  max-width: none;
  margin: 0;
}

.filter-form {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: end;
}

.filter-form h2 {
  grid-column: 1 / -1;
}

.calendar-widget {
  display: grid;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

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

.calendar-weekdays span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-align: center;
}

.calendar-day {
  display: grid;
  align-content: start;
  gap: 0.5rem;
  min-height: 8rem;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--background);
}

.calendar-day-muted {
  opacity: 0.48;
}

.calendar-day-today {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.calendar-day-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
}

.calendar-events {
  display: grid;
  gap: 0.35rem;
}

.calendar-event {
  display: grid;
  gap: 0.15rem;
  padding: 0.4rem 0.45rem;
  border-left: 0.25rem solid var(--accent);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.82rem;
  line-height: 1.25;
  text-decoration: none;
}

.calendar-event strong,
.calendar-event span {
  overflow-wrap: anywhere;
}

.calendar-event span {
  color: var(--muted);
}

.calendar-event-confirmed {
  border-left-color: var(--accent);
}

.calendar-event-pending {
  border-left-color: #b37a13;
}

.calendar-event-rejected,
.calendar-event-cancelled {
  border-left-color: var(--danger);
  opacity: 0.72;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: 0 0.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 700;
}

.badge-group {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.badge-attention {
  border-color: var(--danger);
  color: var(--danger);
}

.details {
  display: grid;
  gap: 0.75rem;
  margin: 1.5rem 0 0;
}

.details div {
  display: grid;
  gap: 0.2rem;
}

.details dt {
  color: var(--muted);
  font-weight: 700;
}

.details dd {
  margin: 0;
}

.details-subtle {
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.details-subtle dd {
  color: var(--text);
}

@media (max-width: 40rem) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .home-shell {
    width: min(100% - 1rem, 72rem);
    padding-top: 0.5rem;
  }

  .home-hero {
    min-height: 34rem;
  }

  .home-hero-image {
    object-position: 50% 50%;
  }

  .home-hero-overlay {
    background:
      linear-gradient(0deg, rgba(10, 17, 18, 0.9), rgba(10, 17, 18, 0.28) 58%, rgba(10, 17, 18, 0.08)),
      linear-gradient(90deg, rgba(10, 17, 18, 0.54), rgba(10, 17, 18, 0.06));
  }

  .home-hero-content {
    padding: 1rem;
  }

  .home-hero h1 {
    max-width: 20rem;
    font-size: clamp(2.25rem, 9.4vw, 2.5rem);
    text-wrap: auto;
  }

  .home-hero p {
    max-width: 19rem;
    font-size: 1rem;
    overflow-wrap: anywhere;
  }

  .home-reservation-strip {
    grid-template-columns: 1fr;
  }

  .home-reservation-strip div {
    min-height: 5.75rem;
  }

  h1 {
    max-width: none;
  }

  .filter-form {
    grid-template-columns: 1fr;
  }

  .calendar-weekdays {
    display: none;
  }

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

  .calendar-day {
    min-height: auto;
  }

  .calendar-day-muted:has(.calendar-events:empty) {
    display: none;
  }
}
