:root {
  --pov-orange: #c86b02;
  --pov-orange-dark: #a35701;
  --pov-grey-dark: #565555;
  --green: #1e8a3c;
  --green-bg: #e5f6e9;
  --red: #b3261e;
  --red-bg: #fbe9e7;
  --border: #d9d6d3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "MetaPro-Normal", "Aptos", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  background: #f7f6f5;
  color: var(--pov-grey-dark);
}

/* MetaPro-Normal is een apart lettertypebestand zonder eigen vette snit
   (net als op oost-vlaanderen.be zelf): font-weight heeft er geen effect
   op. Vet gedrukte tekst gebruikt daarom expliciet MetaPro-Bold. */
h1, h2, h3,
.site-logo,
.field label,
.confirmation,
.room-name,
.badge,
.reserve-btn,
.info-btn,
.agenda-btn,
.agenda-week-label,
.agenda-day-label,
.reserve-actions button {
  font-family: "MetaPro-Bold", "Aptos", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 24px 32px;
}

.site-logo {
  display: inline-block;
  margin-bottom: 8px;
  color: var(--pov-orange);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
}

.site-logo:hover {
  text-decoration: underline;
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  color: var(--pov-grey-dark);
}

.header-logo {
  height: 72px;
  width: auto;
  flex-shrink: 0;
}

.subtitle {
  margin: 4px 0 0;
  opacity: 0.85;
  font-size: 0.9rem;
  color: var(--pov-grey-dark);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 24px 16px 64px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  align-items: end;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
}

.field label {
  font-weight: 600;
  color: #444;
}

.field input[type="date"],
.field input[type="time"],
.field input[type="text"],
.field input[type="number"],
.field select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  height: 37px;
  font-family: inherit;
  background: white;
}

.checkbox-field label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 400;
}

.status {
  min-height: 1.2em;
  color: #555;
  font-size: 0.9rem;
}

.confirmation {
  color: var(--green);
  font-weight: 600;
  font-size: 0.9rem;
  margin: 0;
}

.confirmation:empty {
  display: none;
}

.confirmation.notice {
  color: var(--pov-orange-dark);
}

.rooms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.room-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: white;
}

.room-card.free {
  border-left: 5px solid var(--green);
}

.room-card.busy {
  border-left: 5px solid var(--red);
}

.room-name {
  font-weight: 600;
  margin: 0 0 4px;
}

.room-code {
  color: #777;
  font-size: 0.8rem;
  margin: 0 0 10px;
}

.badge {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

.badge.free {
  background: var(--green-bg);
  color: var(--green);
}

.badge.busy {
  background: var(--red-bg);
  color: var(--red);
}

.busy-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  font-size: 0.8rem;
  color: #555;
}

.busy-list li {
  padding: 2px 0;
}

.empty {
  color: #777;
  padding: 24px 0;
}

.room-actions {
  margin-top: auto;
  align-self: flex-start;
  display: flex;
  gap: 8px;
}

.reserve-btn,
.info-btn,
.agenda-btn {
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.reserve-btn {
  border: none;
  background: var(--pov-orange);
  color: white;
}

.reserve-btn:hover {
  background: var(--pov-orange-dark);
}

.info-btn,
.agenda-btn {
  border: 1px solid var(--pov-orange);
  background: white;
  color: var(--pov-orange);
}

.info-btn:hover,
.agenda-btn:hover {
  background: #fdf2e6;
}

dialog#agendaDialog {
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  border: none;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

dialog#agendaDialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.agenda-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 4px 0 12px;
}

.agenda-nav button {
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: white;
  font-size: 0.85rem;
  cursor: pointer;
}

.agenda-nav button:hover {
  background: #f7f6f5;
}

.agenda-week-label {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--pov-grey-dark);
}

.agenda-scale {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: #888;
  padding: 0 0 4px;
  margin-left: 70px;
}

.agenda-days {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.agenda-day {
  display: grid;
  grid-template-columns: 62px 1fr;
  align-items: center;
  gap: 10px;
}

.agenda-day-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--pov-grey-dark);
  text-transform: capitalize;
}

.agenda-bar {
  position: relative;
  height: 26px;
  background: var(--green-bg);
  border: 1px solid var(--border);
  border-radius: 5px;
  grid-column: 2;
}

.agenda-busy-segment {
  position: absolute;
  top: 0;
  bottom: 0;
  background: var(--red);
  opacity: 0.85;
  border-radius: 3px;
}

.agenda-day-summary {
  grid-column: 2;
  font-size: 0.78rem;
  color: #666;
  margin-top: 2px;
}

.agenda-day.closed {
  opacity: 0.6;
}

.agenda-closed-label {
  grid-column: 2;
  font-size: 0.8rem;
  font-style: italic;
  color: #888;
}

dialog#photoDialog {
  width: min(640px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  border: none;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

dialog#photoDialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.photo-title {
  margin: 0 0 12px;
  color: var(--pov-orange);
  font-size: 1.15rem;
  padding-right: 24px;
}

.photo-image {
  width: 100%;
  height: auto;
  border-radius: 6px;
  display: block;
}

.photo-close {
  position: absolute;
  top: 12px;
  right: 14px;
  border: none;
  background: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--pov-grey-dark);
  cursor: pointer;
}

dialog#reserveDialog {
  width: min(560px, 92vw);
  max-height: 88vh;
  overflow-y: auto;
  border: none;
  border-radius: 10px;
  padding: 24px 28px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

dialog#reserveDialog::backdrop {
  background: rgba(0, 0, 0, 0.4);
}

.reserve-form h2 {
  margin: 0 0 4px;
  color: var(--pov-orange);
  font-size: 1.25rem;
}

.reserve-form h3 {
  margin: 20px 0 8px;
  font-size: 0.95rem;
  color: var(--pov-orange);
  border-bottom: 1px solid var(--border);
  padding-bottom: 4px;
}

.reserve-summary {
  color: #555;
  font-size: 0.9rem;
  margin: 0 0 8px;
}

.reserve-form .field {
  margin-bottom: 10px;
}

.reserve-form .field-row {
  display: flex;
  gap: 10px;
}

.reserve-form .field-row .field {
  flex: 1;
}

.reserve-form input[type="text"],
.reserve-form input[type="email"],
.reserve-form input[type="tel"],
.reserve-form input[type="number"],
.reserve-form select,
.reserve-form textarea {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: inherit;
}

.reserve-form textarea {
  resize: vertical;
}

.reserve-error {
  color: var(--red);
  font-size: 0.85rem;
  min-height: 1.2em;
}

.reserve-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 16px;
}

.reserve-actions button {
  padding: 9px 18px;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border);
  background: white;
}

.reserve-actions button#reserveSubmit {
  background: var(--pov-orange);
  border-color: var(--pov-orange);
  color: white;
}

.reserve-actions button#reserveSubmit:hover:not(:disabled) {
  background: var(--pov-orange-dark);
  border-color: var(--pov-orange-dark);
}

.reserve-actions button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
