:root {
  --green-900: #1d3b22;
  --green-700: #2f6b3a;
  --green-600: #3a7d49;
  --green-100: #e6f1e6;
  --sand: #f6f3ec;
  --ink: #21261f;
  --muted: #6b7466;
  --line: #d9d8ce;
  --danger: #b3261e;
  --amber: #b7791f;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 8px 24px rgba(0, 0, 0, 0.06);
  --maxw: 960px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--sand);
  line-height: 1.55;
}

a { color: var(--green-700); }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* Header / hero */
.hero {
  background:
    linear-gradient(160deg, rgba(29, 59, 34, 0.78), rgba(20, 40, 25, 0.86)),
    url("/images/field-blue-sky.jpg") center 40% / cover no-repeat;
  color: #fff;
  padding: 64px 0 80px;
}
.hero .wrap { display: flex; flex-direction: column; gap: 10px; }
.hero h1 { margin: 0; font-size: clamp(1.9rem, 4vw, 2.8rem); letter-spacing: -0.02em; }
.hero p { margin: 0; max-width: 46ch; color: #e8f0e6; font-size: 1.05rem; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; opacity: 0.95; }
.brand-mark { flex: none; }
.topnav { display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px; }
.topnav a { color: #fff; text-decoration: none; opacity: 0.9; font-size: 0.95rem; }
.topnav a:hover { opacity: 1; text-decoration: underline; }
.topnav-links { display: flex; gap: 18px; }

.hero-prices {
  list-style: none; margin: 14px 0 4px; padding: 0;
  display: flex; flex-direction: column; gap: 4px;
  color: #eef5ec; font-size: 1rem;
}
.hero-prices strong { color: #fff; }
.hero-prices span { color: #cfe0cb; font-size: 0.9rem; }
.hero-cta { margin-top: 10px !important; font-weight: 600; color: #eef5ec; }

/* Sections */
.section { padding: 40px 0; }
.section h2 { margin: 0 0 6px; font-size: 1.4rem; }
.section .lead { color: var(--muted); margin: 0 0 22px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}

.grid { display: grid; gap: 28px; grid-template-columns: 1.2fr 1fr; align-items: start; }
@media (max-width: 820px) { .grid { grid-template-columns: 1fr; } }

/* Calendar */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.cal-toolbar .months-label { font-weight: 600; }
.cal-nav button {
  border: 1px solid var(--line);
  background: var(--white);
  width: 36px; height: 36px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
}
.cal-nav button:disabled { opacity: 0.4; cursor: not-allowed; }
.cal-nav button:not(:disabled):hover { background: var(--green-100); }

.calendars { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 560px) { .calendars { grid-template-columns: 1fr; } }

.month h3 { text-align: center; margin: 0 0 10px; font-size: 1rem; font-weight: 600; }
.dow, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dow span { text-align: center; font-size: 0.72rem; color: var(--muted); padding-bottom: 4px; }

.day {
  aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  user-select: none;
}
.day.empty { cursor: default; }
.day.available:hover { border-color: var(--green-600); }
.day.unavailable {
  background: repeating-linear-gradient(135deg, #ececec, #ececec 4px, #e2e2e2 4px, #e2e2e2 8px);
  color: #a7a7a7;
  cursor: not-allowed;
  text-decoration: line-through;
}
.day.past { color: #c2c2c2; cursor: not-allowed; }
.day.selected { background: var(--green-700); color: #fff; border-color: var(--green-700); }
.day.in-range { background: var(--green-100); border-radius: 0; }
.day.range-start { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.day.range-end { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }
.day.today { font-weight: 700; box-shadow: inset 0 0 0 1px var(--green-600); }

.legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 16px; font-size: 0.82rem; color: var(--muted); }
.legend .swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; margin-right: 6px; vertical-align: -2px; }
.swatch.free { background: var(--white); border: 1px solid var(--line); }
.swatch.taken { background: repeating-linear-gradient(135deg, #ececec, #ececec 3px, #e2e2e2 3px, #e2e2e2 6px); }
.swatch.sel { background: var(--green-700); }

/* Forms */
label { display: block; font-size: 0.85rem; font-weight: 600; margin: 0 0 5px; }
input, select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  font: inherit;
  background: var(--white);
  color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--green-600); outline-offset: 1px; border-color: var(--green-600); }
.field { margin-bottom: 14px; }
.field.invalid input, .field.invalid select { border-color: var(--danger); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.help { font-size: 0.8rem; color: var(--muted); margin-top: 4px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--green-700); color: #fff; border: none;
  padding: 11px 18px; border-radius: 10px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer;
}
.btn:hover { background: var(--green-600); }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn.secondary { background: var(--white); color: var(--ink); border: 1px solid var(--line); }
.btn.secondary:hover { background: var(--green-100); }
.btn.danger { background: var(--white); color: var(--danger); border: 1px solid var(--line); }
.btn.danger:hover { background: #fbeae9; }
.btn.small { padding: 6px 12px; font-size: 0.82rem; }

.selection-summary {
  background: var(--green-100); border: 1px solid #cfe3cf; color: var(--green-900);
  padding: 10px 12px; border-radius: 9px; font-size: 0.9rem; margin-bottom: 14px;
}
.selection-summary.empty { background: #f3f1ea; border-color: var(--line); color: var(--muted); }

.notice { padding: 12px 14px; border-radius: 9px; font-size: 0.9rem; margin-bottom: 14px; }
.notice.success { background: #e7f4e8; border: 1px solid #bfe0c1; color: #1f5128; }
.notice.error { background: #fbeae9; border: 1px solid #f0c5c2; color: var(--danger); }
.hidden { display: none !important; }

/* Info / good-to-know */
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 460px) { .info-grid { grid-template-columns: 1fr; } }
.info-item {
  background: var(--white); border: 1px solid var(--line);
  border-left: 4px solid var(--green-600);
  border-radius: var(--radius); padding: 14px 16px 14px 18px; box-shadow: var(--shadow);
}
.info-item strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.info-item span { color: var(--muted); font-size: 0.85rem; }

/* Price box */
.price-box {
  background: var(--green-100); border: 1px solid #cfe3cf;
  border-radius: 10px; padding: 12px 14px; margin: 4px 0 16px; font-size: 0.9rem;
}
.price-box .muted { color: var(--muted); }
.price-box .pl { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; color: var(--green-900); }
.price-box .pl.total { border-top: 1px solid #cfe3cf; margin-top: 6px; padding-top: 8px; font-weight: 700; font-size: 1.05rem; }

/* Gallery */
.gallery-section { padding-top: 12px; }
.gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
@media (max-width: 760px) { .gallery { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px) { .gallery { grid-template-columns: 1fr; } }
.gallery figure {
  margin: 0;
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 22px 14px 10px;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

/* Contact */
.contact-section { padding-top: 12px; }
.contact-card p { margin: 6px 0; font-size: 1rem; }
.contact-card strong { display: inline-block; min-width: 64px; color: var(--muted); font-weight: 600; }

/* People-count warning */
.warn-text { color: var(--danger); font-weight: 600; }

/* Footer */
footer { padding: 30px 0 50px; color: var(--muted); font-size: 0.85rem; text-align: center; }

/* Admin */
.admin-shell { max-width: 1000px; }
.tabs { display: flex; gap: 8px; margin: 0 0 20px; flex-wrap: wrap; }
.tab { border: 1px solid var(--line); background: #fff; padding: 8px 14px; border-radius: 999px; cursor: pointer; font-size: 0.9rem; }
.tab.active { background: var(--green-700); color: #fff; border-color: var(--green-700); }

.booking { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; background: #fff; }
.booking .top { display: flex; justify-content: space-between; align-items: start; gap: 12px; flex-wrap: wrap; }
.booking h4 { margin: 0; font-size: 1.05rem; }
.booking .meta { color: var(--muted); font-size: 0.85rem; margin-top: 2px; }
.booking .dates { font-weight: 600; }
.booking .msg { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 0.9rem; white-space: pre-wrap; }
.booking .actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.price-tag { font-weight: 700; font-size: 1.1rem; color: var(--green-700); white-space: nowrap; }

.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.74rem; font-weight: 600; }
.pill.pending { background: #fdf1dd; color: var(--amber); }
.pill.accepted { background: #e7f4e8; color: #1f5128; }
.pill.rejected { background: #f1efe9; color: var(--muted); }

.block-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem; }
.block-row:last-child { border-bottom: none; }

.usage {
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; box-shadow: var(--shadow);
}
.usage-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.92rem; margin-bottom: 8px; }
.usage .bar { height: 8px; background: #eceae3; border-radius: 999px; overflow: hidden; }
.usage .bar span { display: block; height: 100%; background: var(--green-600); border-radius: 999px; transition: width 0.4s ease; }
.usage.warn .bar span { background: var(--amber); }
.usage.danger .bar span { background: var(--danger); }
.usage.warn .usage-top span { color: var(--amber); }
.usage.danger .usage-top span { color: var(--danger); }
.usage-sub { color: var(--muted); font-size: 0.8rem; margin-top: 6px; }

.login-box { max-width: 360px; margin: 8vh auto; }
.empty-state { color: var(--muted); text-align: center; padding: 30px 0; }
