/* Huisstijl van de demo: oranje, donkerblauw en een rustig lettertype. */

:root {
  --background: #f5f5f3;
  --foreground: #101820;
  --primary: #ff7433;
  --primary-hover: #e85f20;
  --secondary: #eef1f3;
  --secondary-foreground: #06325d;
  --muted: #eef0f1;
  --muted-foreground: #657180;
  --accent: #fff1e9;
  --border: #dfe3e5;
  --input: #cfd5d8;
  --radius: .35rem;
  --sidebar: #07335f;
  --sidebar-accent: #124876;
  --sidebar-border: #28567d;

  --available: #2e7650;
  --available-bg: #dcefe3;
  --unavailable: #ac3541;
  --unavailable-bg: #f8dde0;
  --no-event: #7b8593;
  --no-event-bg: #eceff2;
  --amber: #916217;
  --amber-bg: #fbf2df;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Poppins", Arial, Helvetica, sans-serif;
  font-size: 16px;
  background: var(--background);
  color: var(--foreground);
}
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2rem; font-weight: 750; letter-spacing: -.065rem; line-height: 1.2; }
h2 { font-size: 1.1rem; font-weight: 700; }
h3 { font-size: .95rem; font-weight: 700; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; }
button:disabled { cursor: not-allowed; opacity: .5; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: 2px;
}

/* ---------- Opbouw: zijbalk + hoofddeel ---------- */
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--sidebar); color: #fff; display: flex; flex-direction: column; }
.brand { display: flex; gap: 12px; align-items: center; padding: 28px 23px 30px; }
.brand-mark {
  width: 42px; height: 44px; flex: none; border-radius: 5px; background: var(--primary);
  display: grid; place-items: center; font-weight: 800; font-size: .78rem; letter-spacing: .04em;
}
.brand-name { font-size: 1.05rem; letter-spacing: .02em; font-weight: 800; line-height: 1.08; }
.brand-name small { display: block; font-size: .68rem; letter-spacing: .2em; font-weight: 500; margin-top: 7px; color: #b9c5d6; }
.nav-label { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #9baac0; padding: 12px 20px; }
.nav { display: flex; flex-direction: column; padding: 0 10px; }
.nav-item { display: block; padding: 12px 16px; margin: 2px 0; border-radius: 6px; font-size: .9rem; color: #e8edf5; }
.nav-item:hover { background: var(--sidebar-accent); }
.nav-item[aria-current="page"] { background: var(--sidebar-accent); box-shadow: inset 3px 0 var(--primary); color: #fff; font-weight: 600; }
.back-link { margin: 18px 12px 0; padding: 10px 16px; border: 1px solid var(--sidebar-border); border-radius: 6px; font-size: .85rem; color: #fff; text-align: center; }
.back-link:hover { background: var(--sidebar-accent); }
.sidebar-end { margin-top: auto; padding: 22px; border-top: 1px solid var(--sidebar-border); font-size: .78rem; color: #aebbd0; line-height: 1.5; }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  min-height: 77px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  padding: 16px 38px; background: #fff; border-bottom: 1px solid var(--border);
}
.crumb { font-size: .875rem; color: #626d7c; }
.crumb strong { color: #263348; font-weight: 500; }
.top-right { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.top-control { display: flex; align-items: center; gap: 8px; font-size: .8rem; color: #687385; }
.top-control select, .top-control input { min-height: 36px; }
.demo-badge { background: var(--accent); color: #a8441a; }

.page-wrap { max-width: 1550px; width: 100%; margin: 0 auto; padding: 34px 38px 28px; }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.eyebrow { font-size: .75rem; letter-spacing: .1em; color: #697486; font-weight: 600; text-transform: uppercase; margin-bottom: 10px; }
.subtext { color: #626e7e; font-size: .92rem; line-height: 1.55; margin-top: 9px; max-width: 720px; }

/* ---------- Onderdelen ---------- */
.panel { border: 1px solid var(--border); border-radius: 9px; background: #fff; overflow: hidden; }
.panel + .panel { margin-top: 24px; }
.panel-head { padding: 18px 23px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.panel-body { padding: 23px; }

.action {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 43px; padding: 11px 17px;
  border-radius: 6px; background: var(--primary); border: 1px solid var(--primary); color: #fff;
  font-size: .875rem; font-weight: 650; line-height: 1.3;
}
.action:hover { background: var(--primary-hover); }
.action.secondary { background: #fff; color: #263348; border-color: #d7dee8; }
.action.secondary:hover { background: #f2f4f7; }
.action.danger { background: #fff; color: var(--unavailable); border-color: #ecb4bb; }
.action.danger:hover { background: #fff0f0; }
.action.small { min-height: 34px; padding: 7px 12px; font-size: .8rem; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 4px;
  background: #edf1f6; font-size: .75rem; color: #4d6078; font-weight: 600; white-space: nowrap;
}
.badge.green { background: #e8f5ee; color: var(--available); }
.badge.red { background: #fdeef0; color: var(--unavailable); }
.badge.amber { background: var(--amber-bg); color: var(--amber); }
.badge.navy { background: var(--secondary); color: var(--secondary-foreground); }
.badge.orange { background: var(--accent); color: #a8441a; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 20px 22px; }
.stat-head { color: #5d6979; font-size: .85rem; }
.stat-value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.06em; margin-top: 10px; line-height: 1.2; }
.stat-note { color: #697789; font-size: .78rem; margin-top: 8px; }

.field { display: flex; flex-direction: column; gap: 7px; font-size: .875rem; font-weight: 600; }
.field small { font-size: .78rem; color: #6c788b; font-weight: 400; line-height: 1.5; }
input, select, textarea {
  font-family: inherit; border: 1px solid #d5dce5; background: #fff; border-radius: 5px;
  min-height: 43px; padding: 9px 12px; font-size: .95rem; color: #1f2a3a;
}
textarea { min-height: 90px; resize: vertical; }
input:disabled, select:disabled { background: var(--muted); color: var(--muted-foreground); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.inline-form { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }

.notice-line, .error-line, .success-line {
  border-radius: 7px; padding: 13px 17px; margin-bottom: 20px; line-height: 1.5; font-size: .9rem;
}
.notice-line { background: #edf1f6; color: #3d4c60; }
.error-line { background: #fff0f0; border: 1px solid #ecb4bb; color: #9d2430; }
.success-line { background: #edf7f0; color: #3c7356; }
.warning-list { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; font-size: .8rem; }
.warning-list li.red { color: var(--unavailable); }
.muted { color: var(--muted-foreground); font-size: .85rem; }
.empty-area { padding: 30px 23px; color: var(--muted-foreground); font-size: .9rem; }

.table-wrap { border: 1px solid var(--border); border-radius: 8px; background: #fff; overflow: auto; }
table { border-collapse: collapse; width: 100%; }
th { background: #f8f9fb; font-size: .78rem; font-weight: 600; color: #657286; padding: 12px 14px; text-align: left; white-space: nowrap; }
td { padding: 12px 14px; font-size: .875rem; border-top: 1px solid #edf0f4; vertical-align: top; }

.event-card { display: flex; gap: 22px; padding: 21px 23px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid #edf0f4; }
.event-card:last-child { border-bottom: 0; }
.date-box { flex: none; min-width: 62px; border: 1px solid #e0e5ed; border-radius: 7px; text-align: center; padding: 9px 12px; background: #f7f9fb; }
.date-box strong { display: block; font-size: 1.55rem; line-height: 1.1; }
.date-box small { font-size: .72rem; text-transform: uppercase; color: #697689; }
.event-content { flex: 1; min-width: 220px; }
.event-content h3 { margin-bottom: 6px; }
.event-meta { display: flex; flex-wrap: wrap; gap: 12px; color: #697588; font-size: .84rem; line-height: 1.6; }
.event-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

dialog { border: 0; border-radius: 10px; padding: 0; width: min(640px, 94vw); max-height: 90vh; box-shadow: 0 20px 50px #0b1a2e40; }
dialog.wide { width: min(980px, 96vw); }
dialog::backdrop { background: #0b1a2e80; }
.dialog-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.dialog-body { padding: 22px 24px; overflow: auto; }
.icon-button { border: 0; background: transparent; font-size: 1.4rem; line-height: 1; color: #64738a; width: 36px; height: 36px; border-radius: 5px; }
.icon-button:hover { background: #eef1f5; }

.status-dot { display: inline-block; width: 12px; height: 12px; border-radius: 3px; vertical-align: middle; }
.status-dot.available { background: var(--available); }
.status-dot.unavailable { background: var(--unavailable); }
.status-dot.no-event { background: #c5ccd5; }
.legend { display: flex; gap: 18px; flex-wrap: wrap; font-size: .8rem; color: #5d6979; }
.legend span { display: inline-flex; align-items: center; gap: 7px; }

.month-nav { display: flex; align-items: center; gap: 10px; }
.month-nav .action { font-size: 1.1rem; min-width: 36px; }
.month-nav strong { min-width: 150px; text-align: center; text-transform: capitalize; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand { padding: 14px 18px; }
  .nav-label, .sidebar-end { display: none; }
  .back-link { margin: 0 10px 10px; padding: 8px 12px; }
  .nav { flex-direction: row; flex-wrap: wrap; padding: 0 10px 10px; }
  .topbar, .page-wrap { padding-left: 18px; padding-right: 18px; }
  .form-grid { grid-template-columns: 1fr; }
}
