:root {
  --green: #0e8a16;
  --green-dark: #0a6b10;
  --green-soft: #e8f6e9;
  --koppel: #7bb665;
  --navy: #1b3967;
  --ink: #1c2430;
  --muted: #5c6b7a;
  --line: #d9e3dc;
  --bg: #f3f6f4;
  --card: #fff;
  --pending: #7a3db8;
  --confirmed: #2e7d32;
  --reserved: #1d4e89;
  --canceled: #6d7278;
  --shadow: 0 10px 30px rgba(27, 57, 103, 0.08);
  --font: "Roboto", "Segoe UI", sans-serif;
  --display: "Roboto Slab", Georgia, serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--bg);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
}
img { max-width: 100%; height: auto; }
a { color: var(--green-dark); }
h1, h2, h3 { font-family: var(--display); color: var(--navy); line-height: 1.2; margin: 0 0 0.4em; }
h1 { font-size: 2.1rem; }
h2 { font-size: 1.35rem; }
p { margin: 0 0 0.8em; }
.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: #fff;
  padding: 0.5rem 1rem;
}
.skip:focus { left: 0.5rem; top: 0.5rem; z-index: 5; }
.topbar { height: 8px; background: linear-gradient(90deg, var(--green) 0%, var(--koppel) 100%); }
.wrap { width: min(1120px, calc(100% - 2rem)); margin: 0 auto; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 88px; }
.brand { display: flex; align-items: center; }
.brand img { height: 56px; width: auto; }
.site-nav { display: flex; gap: 0.4rem; }
.site-nav a {
  text-decoration: none;
  color: var(--navy);
  font-weight: 700;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
}
.site-nav a.is-active, .site-nav a:hover { background: var(--green-soft); color: var(--green-dark); }
.nav-toggle {
  display: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
}
main { flex: 1 0 auto; padding: 1.6rem 0 2.5rem; }
.page-intro { margin-bottom: 1.2rem; }
.page-intro p { max-width: 46rem; color: var(--muted); }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 1.2rem;
  margin-bottom: 1.2rem;
}
.narrow { max-width: 40rem; margin-left: auto; margin-right: auto; }
.muted { color: var(--muted); }
.alert {
  background: #fff4f4;
  border: 1px solid #f0c2c2;
  color: #8a1f1f;
  padding: 0.8rem 1rem;
  border-radius: 12px;
}
.field-error { color: #9b1c1c; font-size: 0.92rem; display: block; margin-top: 0.25rem; }
.form-grid, .filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}
.filters { align-items: end; margin-bottom: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.3rem; }
.field-wide { grid-column: 1 / -1; }
label { font-weight: 700; color: var(--navy); }
input, select, textarea {
  font: inherit;
  padding: 0.65rem 0.7rem;
  border: 1px solid #c5d2cb;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  width: 100%;
}
textarea { min-height: 6rem; }
input:focus, select:focus, textarea:focus {
  outline: 3px solid rgba(14, 138, 22, 0.25);
  border-color: var(--green);
}
.button {
  display: inline-block;
  background: var(--green);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { background: var(--green-dark); }
.button-ghost { background: #fff; color: var(--navy); border: 1px solid var(--line); }
.button-small { padding: 0.35rem 0.7rem; font-size: 0.9rem; margin: 0 0.25rem 0.25rem 0; }
.actions { margin-top: 1rem; }
.picker {
  display: grid;
  grid-template-columns: minmax(260px, 340px) 1fr;
  gap: 1.2rem;
  margin: 1.2rem 0;
}
.hp { position: absolute; left: -10000px; height: 1px; width: 1px; overflow: hidden; }
.check { display: flex; gap: 0.6rem; align-items: flex-start; margin: 1rem 0; font-weight: 500; }
.check input { width: auto; margin-top: 0.3rem; }
.overview { background: var(--green-soft); border-radius: 12px; padding: 0.9rem 1rem; }
.summary { display: grid; gap: 0.45rem; margin: 0; }
.summary div { display: grid; grid-template-columns: 7rem 1fr; gap: 0.5rem; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; }
.mini-cal .cal-toolbar, .calendar .cal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}
.cal-toolbar button, .mini-cal .cal-toolbar button {
  width: auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font: inherit;
  font-weight: 700;
  color: var(--navy);
  cursor: pointer;
}
.cal-toolbar button.is-active { background: var(--green); color: #fff; border-color: var(--green); }
.mini-grid, .month-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.mini-grid .dow, .month-grid .dow { text-align: center; color: var(--muted); font-size: 0.78rem; font-weight: 700; text-transform: uppercase; }
.mini-grid .day {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  min-height: 2.3rem;
  font: inherit;
  cursor: pointer;
}
.mini-grid .day.free { color: var(--green-dark); font-weight: 700; }
.mini-grid .day.busy { background: #f3f4f6; color: var(--muted); }
.mini-grid .day.past, .mini-grid .day.closed { color: #b0b8c0; }
.mini-grid .day.is-selected { background: var(--green); color: #fff; }
.slots { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.slot {
  width: auto;
  border: 1px solid var(--green);
  background: #fff;
  color: var(--green-dark);
  border-radius: 999px;
  padding: 0.4rem 0.75rem;
  font: inherit;
  cursor: pointer;
}
.slot.is-selected { background: var(--green); color: #fff; }
.slot.is-taken, .slot:disabled {
  border-color: var(--line);
  background: #eef1f3;
  color: #6d7278;
  cursor: not-allowed;
  text-decoration: line-through;
}
.room-head { margin-bottom: 0.6rem; }
.note { color: var(--muted); margin: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 0.7rem 1rem; list-style: none; padding: 0; margin: 0 0 0.8rem; }
.legend li, .agenda li { display: flex; align-items: center; gap: 0.4rem; }
.swatch, .pill { white-space: nowrap; }
.swatch { width: 0.9rem; height: 0.9rem; border-radius: 3px; display: inline-block; }
.swatch.pending, .pill.pending { background: var(--pending); }
.swatch.confirmed, .pill.confirmed { background: var(--confirmed); }
.swatch.reserved, .pill.reserved { background: var(--reserved); }
.swatch.canceled, .pill.canceled { background: var(--canceled); }
.pill { color: #fff; border-radius: 999px; padding: 0.15rem 0.55rem; font-size: 0.82rem; font-weight: 700; }
.cal-scroll { overflow-x: auto; padding-bottom: 0.4rem; }
.month-grid { min-width: 760px; }
.day-cell {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 7.2rem;
  padding: 0.35rem;
  overflow: visible;
}
.day-cell.is-empty { background: transparent; border-color: transparent; }
.day-cell.is-today, .week-day.is-today { box-shadow: inset 0 0 0 2px var(--koppel); }
.day-num { font-weight: 700; color: var(--navy); font-size: 0.85rem; }
.event {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  margin-top: 0.35rem;
  padding: 0.35rem 0.4rem;
  border-radius: 8px;
  color: #fff;
  overflow: visible;
  white-space: normal;
  word-break: break-word;
}
.event.pending { background: var(--pending); }
.event.confirmed { background: var(--confirmed); }
.event.reservation, .event.reserved { background: var(--reserved); }
.event.canceled, .event.cancelled { background: var(--canceled); }
.event-time, .event-status { font-size: 0.75rem; font-weight: 700; }
.event-title { font-size: 0.82rem; }
.week-grid { display: grid; grid-template-columns: repeat(7, minmax(140px, 1fr)); gap: 0.45rem; min-width: 980px; }
.week-day { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 0.45rem; min-height: 8rem; }
.week-day h3 { font-family: var(--font); font-size: 0.95rem; }
.day-view .event { max-width: 36rem; padding: 0.7rem 0.8rem; }
.day-view .event-title { font-size: 1rem; }
.agenda { list-style: none; padding: 0; margin: 0.4rem 0 0; display: grid; gap: 0.35rem; }
.agenda-title { margin-top: 1rem; font-size: 1.05rem; }
.agenda-toggle { margin-top: 0.7rem; }
.sum-box { margin: 1rem 0; }
.sum-box input { max-width: 8rem; }
.site-footer { background: var(--green-dark); color: #fff; padding: 1.35rem 0 1.15rem; }
.site-footer a { color: #fff; }
.footer-row { display: flex; gap: 1.25rem 1.5rem; align-items: center; justify-content: space-between; }
.footer-logo { display: block; width: 160px; height: auto; flex: 0 0 auto; }
.footer-meta { min-width: 0; max-width: 34rem; text-align: right; }
.footer-address,
.footer-links,
.footer-privacy,
.footer-credit { margin: 0; }
.footer-address {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  line-height: 1.45;
}
.footer-address span { white-space: nowrap; }
.footer-address span + span::before { content: "·"; margin: 0 0.4rem; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.15rem 0;
  margin-top: 0.15rem;
  padding: 0;
  list-style: none;
  line-height: 1.45;
}
.footer-links li { white-space: nowrap; }
.footer-links li + li::before { content: "·"; margin: 0 0.4rem; }
.footer-privacy { margin-top: 0.15rem; }
.footer-credit {
  margin-top: 0.7rem;
  font-size: 0.75rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.8);
}
.footer-credit a { color: inherit; text-decoration: none; }
.footer-credit a:hover,
.footer-credit a:focus-visible { color: #fff; text-decoration: underline; }
.notes { display: grid; gap: 0.4rem; margin-bottom: 1rem; }
.note-line { margin: 0; padding: 0.6rem 0.8rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); }
.note-line.warn { background: #fff8e8; border-color: #ead7a1; }
.table-wrap { overflow-x: auto; padding: 0; }
.admin-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.admin-table th, .admin-table td { text-align: left; padding: 0.75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.admin-table th { color: var(--navy); font-size: 0.85rem; }
.custom-fields { margin: 0.4rem 0 0; padding-left: 1rem; color: var(--muted); font-size: 0.88rem; }
.logout { margin-top: 0.5rem; }
.stack { display: grid; gap: 0.8rem; }
.prose { max-width: 42rem; }
code { background: var(--green-soft); padding: 0.05rem 0.3rem; border-radius: 4px; }

@media (max-width: 800px) {
  .nav-toggle { display: inline-block; }
  .site-nav {
    display: none;
    position: absolute;
    right: 1rem;
    top: 96px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    flex-direction: column;
    padding: 0.4rem;
    z-index: 3;
  }
  .site-nav.is-open { display: flex; }
  .header-row { position: relative; }
  .form-grid, .filters, .picker { grid-template-columns: 1fr; }
  .site-footer { padding: 1.45rem 0 1.3rem; }
  .footer-row { flex-direction: column; align-items: center; gap: 0.85rem; text-align: center; }
  .footer-meta { max-width: none; text-align: center; }
  .footer-address, .footer-links { justify-content: center; }
  .footer-credit { margin-top: 0.75rem; }
  h1 { font-size: 1.7rem; }
  .summary div { grid-template-columns: 1fr; gap: 0; }
}
