:root {
  --bg: #f4f7f1;
  --surface: #ffffff;
  --surface-strong: #102215;
  --text: #122017;
  --muted: #536257;
  --line: rgba(18, 32, 23, 0.1);
  --accent: #2f7d44;
  --accent-dark: #1d4f2b;
  --danger: #9e2a2b;
  --shadow: 0 20px 60px rgba(16, 34, 21, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(47, 125, 68, 0.16), transparent 28%),
    linear-gradient(180deg, #f8fbf6 0%, var(--bg) 60%, #eef3ed 100%);
}

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

img {
  display: block;
  width: 100%;
  border-radius: 24px;
}

button,
input,
select {
  font: inherit;
}

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

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 0;
}

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

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--surface-strong));
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  font-size: 0.95rem;
}

.nav-inline-form {
  margin: 0;
}

.nav-inline-form button {
  padding: 0.6rem 1rem;
}

.button-link,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.9rem 1.2rem;
  border: 0;
  cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease;
}

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

.button-link.primary,
button,
.button-link {
  background: var(--surface-strong);
  color: white;
}

.button-link.secondary,
.ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

.ghost.danger {
  color: var(--danger);
}

.full {
  width: 100%;
}

.hero,
.booking-highlight,
.dashboard {
  display: grid;
  gap: 24px;
}

.hero {
  grid-template-columns: 1.6fr 1fr;
  padding: 44px 0 28px;
  align-items: stretch;
}

.hero-copy,
.hero-card,
.dashboard-card,
.auth-card,
.card,
.booking-panel,
.list-panel {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 36px;
}

.hero-card,
.dashboard-card,
.auth-card,
.booking-panel,
.list-panel {
  padding: 24px;
}

.hero h1,
.section-heading h2,
.dashboard-card h1,
.dashboard-card h2,
.auth-card h1 {
  margin: 0;
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.hero h1 {
  font-size: clamp(2.6rem, 6vw, 5.2rem);
  max-width: 10ch;
}

.lead,
.card p,
.booking-highlight p,
.footer p,
.auth-card p,
.legal-page p {
  color: var(--muted);
  line-height: 1.65;
}

.eyebrow,
.card-kicker {
  margin: 0 0 12px;
  font-size: 0.82rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent-dark);
  font-weight: 700;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.feature-list {
  padding-left: 18px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.8;
}

.grid-section,
.gallery-section,
.upcoming-section {
  padding: 28px 0;
}

.section-heading {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.section-heading.compact {
  margin-bottom: 12px;
}

.card-grid,
.gallery-grid {
  display: grid;
  gap: 18px;
}

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

.card {
  padding: 24px;
}

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

.gallery-grid-page {
  margin-top: 22px;
}

.gallery-card {
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 28px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.gallery-image-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-card img {
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 0;
}

.gallery-card-actions {
  padding: 16px;
}

.gallery-admin-panel {
  margin-top: 18px;
  padding: 20px;
  background: rgba(16, 34, 21, 0.05);
  border: 1px solid var(--line);
  border-radius: 24px;
}

.gallery-upload-hint {
  margin: 0;
  color: var(--muted);
}

body.lightbox-open {
  overflow: hidden;
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 18, 12, 0.86);
  cursor: zoom-out;
}

.gallery-lightbox-dialog {
  position: relative;
  z-index: 1;
  width: min(1100px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
}

.gallery-lightbox-dialog img {
  width: 100%;
  max-height: calc(100vh - 32px);
  object-fit: contain;
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.96);
  color: var(--surface-strong);
}

.booking-highlight {
  grid-template-columns: 1.2fr 0.9fr;
  align-items: center;
  padding: 36px 0;
}

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

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

input,
select {
  width: 100%;
  border-radius: 16px;
  border: 1px solid var(--line);
  padding: 0.95rem 1rem;
  background: white;
}

.dashboard {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 16px;
}

.dashboard-card-wide {
  grid-column: 1 / -1;
}

.narrow-page {
  width: min(640px, 100%);
  margin: 40px auto 0;
}

.list-panel {
  display: grid;
  gap: 12px;
}

.calendar-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(280px, 360px);
  gap: 22px;
  align-items: start;
}

.calendar-stage {
  min-width: 0;
  padding: 14px;
  border-radius: 24px;
  background: rgba(249, 251, 248, 0.96);
  border: 1px solid rgba(18, 32, 23, 0.08);
}

.calendar-sidebar {
  display: grid;
  gap: 18px;
  padding: 20px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(248, 250, 247, 0.98), rgba(237, 243, 236, 0.94));
  border: 1px solid rgba(18, 32, 23, 0.08);
  position: sticky;
  top: 16px;
}

.calendar-sidebar-copy {
  margin: -4px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.calendar-selection-card {
  min-height: 88px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(18, 32, 23, 0.08);
  font-weight: 600;
  line-height: 1.5;
}

.calendar-load-error {
  padding: 18px;
  border-radius: 18px;
  background: rgba(158, 42, 43, 0.12);
  color: #6b1516;
  font-weight: 600;
}

.calendar-load-pending {
  min-height: 140px;
  display: grid;
  place-items: center;
  background: rgba(16, 34, 21, 0.05);
  color: var(--muted);
}

#booking-calendar .fc {
  --fc-border-color: rgba(18, 32, 23, 0.08);
  --fc-now-indicator-color: #c2410c;
  --fc-neutral-bg-color: rgba(18, 32, 23, 0.04);
  font-family: "Segoe UI", "Helvetica Neue", sans-serif;
}

#booking-calendar .fc-toolbar-title {
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

#booking-calendar .fc-button {
  background: var(--surface-strong);
  border-color: var(--surface-strong);
  border-radius: 999px;
  padding: 0.65rem 0.95rem;
  text-transform: none;
  box-shadow: none;
}

#booking-calendar .fc-button:hover,
#booking-calendar .fc-button:focus {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: none;
}

#booking-calendar .fc-button-primary:not(:disabled).fc-button-active,
#booking-calendar .fc-button-primary:not(:disabled):active {
  background: #0b1a10;
  border-color: #0b1a10;
}

#booking-calendar .fc-timegrid-slot {
  height: 2.8rem;
}

#booking-calendar .fc-col-header-cell-cushion,
#booking-calendar .fc-timegrid-axis-cushion,
#booking-calendar .fc-timegrid-slot-label-cushion {
  color: var(--muted);
}

#booking-calendar .fc-col-header-cell-cushion {
  display: block;
  padding: 0.55rem 0.35rem;
  text-align: center;
}

#booking-calendar .fc-day-header-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  line-height: 1.1;
}

#booking-calendar .fc-day-header-name,
#booking-calendar .fc-day-header-date {
  display: block;
  white-space: nowrap;
}

#booking-calendar .fc-day-header-name {
  font-weight: 700;
}

#booking-calendar .fc-day-header-date {
  font-size: 0.86em;
}

#booking-calendar .fc-timegrid-col.fc-day-today,
#booking-calendar .fc-daygrid-day.fc-day-today {
  background: rgba(47, 125, 68, 0.06);
}

#booking-calendar .fc-highlight {
  background: rgba(37, 99, 235, 0.22);
}

#booking-calendar .fc-selection-preview {
  background: rgba(37, 99, 235, 0.28);
}

#booking-calendar .fc-bg-event.fc-selection-preview,
#booking-calendar .fc-timegrid-bg-harness .fc-selection-preview {
  background: rgba(37, 99, 235, 0.32) !important;
  opacity: 1 !important;
}

#booking-calendar .fc-event {
  border: 0;
  border-radius: 0;
  padding: 0;
  margin: 0 !important;
}

#booking-calendar .fc-event-booked {
  background: rgba(16, 34, 21, 0.92);
}

#booking-calendar .fc-event-own {
  background: linear-gradient(135deg, #1fa34a, #37c96b);
  color: white;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

#booking-calendar .fc-event-time,
#booking-calendar .fc-event-title {
  font-weight: 600;
}

#booking-calendar .fc-timegrid-event-harness,
#booking-calendar .fc-timegrid-event-harness-inset {
  inset-inline: 0 !important;
}

#booking-calendar .fc-timegrid-event {
  inset-inline: 0 !important;
  width: 100% !important;
}

#booking-calendar .fc-timegrid-event .fc-event-main {
  height: 100%;
  padding: 4px 6px;
}

.week-legend {
  display: grid;
  gap: 12px;
}

.legend-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(18, 32, 23, 0.08);
}

.legend-chip.available {
  background: rgba(37, 99, 235, 0.28);
  color: #123f9d;
  border-color: rgba(37, 99, 235, 0.22);
}

.legend-chip.busy {
  background: rgba(16, 34, 21, 0.92);
  color: white;
  border-color: transparent;
}

.legend-chip.own {
  background: linear-gradient(135deg, #1fa34a, #37c96b);
  color: white;
  border-color: transparent;
}

.booking-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.booking-row:last-child {
  border-bottom: 0;
}

.booking-row p {
  margin: 4px 0 0;
  color: var(--muted);
}

.booking-row-stacked {
  align-items: flex-start;
}

.status {
  font-size: 0.9rem;
  font-weight: 600;
}

.status.cancelled {
  color: var(--danger);
}

.status.active {
  color: var(--accent-dark);
}

.flash {
  padding: 14px 18px;
  border-radius: 18px;
  margin-bottom: 18px;
}

.flash-success {
  background: rgba(47, 125, 68, 0.12);
  color: var(--accent-dark);
}

.flash-error {
  background: rgba(158, 42, 43, 0.12);
  color: #6b1516;
}

.inline-action {
  margin-bottom: 16px;
}

.footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.cookie-banner {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 18px;
  background: rgba(16, 34, 21, 0.95);
  color: white;
}

.cookie-banner p {
  margin: 0;
  max-width: 70ch;
  font-size: 0.92rem;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.cookie-banner-dismiss {
  padding: 0.7rem 1rem;
  border-radius: 999px;
  background: white;
  color: var(--surface-strong);
  font-weight: 700;
}

.cookie-banner-dismiss:hover,
.cookie-banner-dismiss:focus {
  background: #edf3ee;
}

@media (max-width: 900px) {
  .hero,
  .booking-highlight,
  .dashboard,
  .card-grid,
  .gallery-grid,
  .footer {
    grid-template-columns: 1fr;
  }

  .topbar,
  .cookie-banner,
  .booking-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-shell {
    width: min(100vw - 20px, 1120px);
  }

  .hero-copy {
    padding: 28px 22px;
  }

  .hero h1 {
    max-width: none;
  }

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

  .calendar-sidebar {
    position: static;
    order: -1;
    padding: 16px;
    gap: 14px;
  }

  #booking-calendar .fc-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
  }

  #booking-calendar .fc-toolbar-chunk {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .dashboard-card,
  .list-panel {
    padding: 18px;
  }

  .calendar-stage {
    padding: 8px;
    border-radius: 20px;
    overflow-x: auto;
  }

  .calendar-selection-card {
    min-height: 72px;
    padding: 14px;
  }

  .week-legend {
    gap: 10px;
  }

  .legend-chip {
    font-size: 0.9rem;
  }

  #booking-calendar .fc {
    min-width: 760px;
  }

  #booking-calendar .fc-toolbar-title {
    font-size: 1rem;
  }

  #booking-calendar .fc-button {
    padding: 0.55rem 0.8rem;
    font-size: 0.88rem;
  }

  #booking-calendar .fc-timegrid-slot {
    height: 2.4rem;
  }

  #booking-calendar .fc-timegrid-axis-cushion,
  #booking-calendar .fc-timegrid-slot-label-cushion,
  #booking-calendar .fc-col-header-cell-cushion {
    font-size: 0.78rem;
  }

  #booking-calendar .fc-event {
    font-size: 0.72rem;
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: min(100vw - 14px, 1120px);
  }

  .topbar {
    padding: 14px 0;
  }

  .brand {
    gap: 10px;
    font-size: 0.95rem;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
  }

  .nav {
    gap: 8px;
    font-size: 0.88rem;
  }

  .dashboard {
    gap: 16px;
  }

  .dashboard-card,
  .list-panel,
  .calendar-sidebar {
    padding: 14px;
    border-radius: 20px;
  }

  .section-heading {
    gap: 6px;
    margin-bottom: 12px;
  }

  .section-heading h2,
  .dashboard-card h1,
  .dashboard-card h2 {
    font-size: 1.25rem;
  }

  .calendar-sidebar-copy,
  .booking-row p,
  .week-legend p {
    font-size: 0.92rem;
  }

  #booking-calendar .fc {
    min-width: 690px;
  }

  #booking-calendar .fc-scrollgrid {
    border-radius: 14px;
  }

  #booking-calendar .fc-timegrid-slot {
    height: 2.1rem;
  }
}
