:root {
  --ink: #19382f;
  --muted: #50665b;
  --green: #245b48;
  --mint: #e2eee2;
  --line: #d8e3d8;
  --paper: #f5f5ed;
  --tan: #f3e5ce;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.5 system-ui, sans-serif; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
:focus-visible { outline: 3px solid #9f5c2e; outline-offset: 2px; }
header { background: var(--green); color: white; }
.wrap { max-width: 1160px; margin: auto; padding-inline: 22px; }
.brand { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-block: 15px; }
.brand strong, h1, h2 { font-family: Georgia, serif; }
.brand strong { font-size: 24px; }
.brand span { background: var(--tan); color: #61462a; border-radius: 999px; padding: 3px 10px; font-size: .77rem; font-weight: 750; }
nav { display: flex; flex-wrap: wrap; gap: 5px; padding-bottom: 9px; }
nav a, nav button { display: block; background: transparent; color: white; border: 0; border-radius: 8px; padding: 9px 12px; }
nav a { text-decoration: none; }
nav a:hover, nav button:hover { text-decoration: underline; }
nav a[aria-current] { background: white; color: var(--green); font-weight: 800; }
nav form { margin: 0 0 0 auto; }
main { padding-block: 28px; }
h1 { font-size: clamp(2.05rem, 6vw, 3.25rem); font-weight: 500; line-height: 1.07; margin: .13em 0 .22em; }
h2 { font-size: 1.55rem; font-weight: 500; margin: 0 0 8px; }
.lead, .muted { color: var(--muted); }
.lead { margin: 0 0 18px; }
.grid, .metrics, .fields { display: grid; gap: 12px; }
.grid { grid-template-columns: 1fr 1fr; }
.metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-block: 14px; }
.fields { grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); margin-bottom: 12px; }
.panel, .metric, .feedback { border: 1px solid var(--line); border-radius: 14px; background: white; padding: 16px; }
.panel { margin-bottom: 14px; }
.metric, .feedback { background: var(--mint); }
.metric span, .metric strong { display: block; }
.metric strong { font-size: 1.3rem; }
.workshop-finance-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.workshop-finance-metrics small { display: block; color: var(--muted); margin-top: 5px; font-size: .8rem; }
.workshop-finance-open { background: #fff3d3; }
.workshop-finance-advance { background: #e8eff8; }
.workshop-finance-time { position: relative; }
.workshop-finance-time > span:first-of-type { padding-right: 36px; }
.time-direction-icon { width: 40px; height: 40px; object-fit: contain; position: absolute; top: 8px; right: 8px; pointer-events: none; }
.workshop-finance-row { display: flex; flex-wrap: wrap; gap: 6px 20px; width: 100%; font-size: .85rem; }
@media (max-width: 900px) { .workshop-finance-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feedback.error { background: #fae8df; color: #853d20; }
.action { border: 1px solid var(--line); border-radius: 9px; background: var(--mint); color: var(--ink); min-height: 44px; padding: 7px 12px; font-weight: 700; }
.action:hover { border-color: var(--green); }
.row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.row:last-child { border: 0; }
.field { display: grid; gap: 4px; }
.field input, .field select, .field textarea { padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: white; color: var(--ink); width: 100%; }
.field textarea { resize: vertical; min-height: 90px; }
details { padding: 9px 0; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
details details, details form { margin-left: 12px; }
.workshop, .participant { margin-top: 8px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 8px; }
.workshop-empty, .order-pending { background: #fff3cf; }
.workshop-available, .participant-booked, .order-received { background: #e3f2df; }
.workshop-regular, .participant-cancelled { background: #f9e1df; }
.participant-unbooked { background: #fff3cf; }
.workshop-reserve { background: #eee3f8; }
.workshop-past, .participant-attended { background: #e9e9e9; }
.participant-status { margin-left: 8px; color: var(--muted); font-size: .85rem; font-weight: 500; }
.participant-icons { display: inline-flex; align-items: center; gap: 5px; position: absolute; right: 0; top: 50%; transform: translateY(-50%); }
.participant-icons img { display: block; width: 18px; height: 18px; object-fit: contain; }
:is(summary, .booking-cancelled, .planning-unplanned):has(> .participant-icons) { position: relative; padding-right: 3.3em; }
:is(summary, .booking-cancelled, .planning-unplanned):has(> .participant-icons > :nth-child(3)) { padding-right: 70px; }
summary:has(> .participant-icons > :nth-child(4)) { padding-right: 93px; }
summary:has(> .participant-icons > :nth-child(5)) { padding-right: 116px; }
.planning-unplanned { padding: 7px 9px; border-bottom: 1px solid var(--line); }
summary[class^="participant-"] { padding: 7px 9px; border-radius: 6px; }
.booking-paid { margin-block: 4px; padding-inline: 8px; border-radius: 6px; background: #cfe7c8; }
.booking-cancelled { margin: 4px 0 4px 12px; padding: 7px 8px; border-radius: 6px; background: #f9e1df; }
summary { font-weight: 750; }
summary + form, form > .field { margin-block: 10px; }
.order-line { border-top: 1px solid var(--line); padding-top: 12px; }
@media (max-width: 700px) {
  .wrap { padding-inline: 13px; }
  .grid, .metrics { grid-template-columns: 1fr; }
  nav form { margin-left: 0; }
}
.previous-bookings option { color: #666; }
.article-stock { padding: 7px 9px; border-radius: 6px; }
.article-sufficient { background: #e3f2df; }
.article-low { background: #f9e1df; }
.article-unspecified { background: #e9e9e9; }

.inventory-overview, .inventory-grid { display: grid; gap: 20px; }
.inventory-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-bottom: 24px; }
.inventory-overview > div { padding: 16px 18px; border-radius: 8px; }
.inventory-overview strong { display: block; font-size: 1.65rem; }
.inventory-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); align-items: start; }
.inventory-card { padding: clamp(14px, 2vw, 22px); border-radius: 10px; border: 1px solid var(--line); overflow-wrap: anywhere; }
.inventory-card .inventory-heading { background: transparent; color: inherit; display: grid; gap: 10px; }
.inventory-name { font-size: 1.1rem; font-weight: 700; }
.inventory-status { width: fit-content; padding: 2px 8px; border-radius: 12px; background: white; font-size: .8rem; }
.inventory-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 18px 0; }
.inventory-facts > div { background: white; padding: 12px; border-radius: 6px; }
.inventory-facts span, .inventory-facts small { display: block; font-size: .8rem; }
.inventory-facts strong { display: block; margin: 4px 0; font-size: 1.05rem; }
.inventory-facts progress { display: block; width: 100%; height: 8px; margin-top: 5px; accent-color: #357449; }
.article-low progress { accent-color: #a83f34; }
@media (max-width: 420px) {
    .inventory-overview, .inventory-facts { gap: 8px; }
    .inventory-overview > div, .inventory-facts > div { padding: 8px; }
}

.workshop-weekday {
    clip-path: circle(36% at 49.5% 50.5%);
    vertical-align: middle;
}
summary:has(> .participant-icons > :nth-child(6)) { padding-right: 139px; }

.workshop-summary { padding-block: 8px; }
.workshop-overview { display: inline-grid; width: calc(100% - 24px); vertical-align: middle; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); align-items: center; gap: 16px; }
.workshop-identity { display: flex; align-items: center; gap: 8px; }
.workshop-identity img { flex: none; }
.workshop-overview small { display: block; font-weight: 400; }
.workshop-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.workshop-metrics > span { padding: 6px 8px; border-radius: 7px; background: #ffffff97; }
.workshop-metrics strong { font-variant-numeric: tabular-nums; }
.workshop-costs-linked { border-inline-start: 4px solid #4b8755; }
.workshop-costs-pending { border-inline-start: 4px solid #b88422; }
.workshop-costs-linked .workshop-cost-metric { background: #e5f4e3; box-shadow: inset 0 0 0 1px #a8cba5; }
.workshop-costs-pending .workshop-cost-metric { background: #fff3d3; box-shadow: inset 0 0 0 1px #e0c27c; }
.workshop-overview .workshop-cost-status { font-size: .75rem; font-weight: 750; line-height: 1.35; margin: 7px 0 4px; }
.workshop-costs-linked .workshop-cost-status { color: #286036; }
.workshop-costs-pending .workshop-cost-status { color: #78500a; }
.workshop-cost-metric .amount-positive, .workshop-cost-metric .amount-negative { white-space: nowrap; }
.workshop-settings { margin-block: 14px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; background: #ffffff70; }
.workshop-settings h3, .workshop-people-heading { margin: 0 0 8px; }
.workshop .workshop-booking { margin-bottom: 5px; padding-inline: 8px; border-radius: 7px; }
@media (max-width: 760px) {
    .workshop-overview { grid-template-columns: minmax(0, 1fr); gap: 8px; }
}
@media (max-width: 470px) {
    .workshop-metrics { grid-template-columns: 1fr; }
}
summary:has(> .participant-icons > :nth-child(7)) { padding-right: 162px; }

.cancelled-entry { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 8px; }
.cancelled-entry-label { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 30px; overflow-wrap: anywhere; }
.cancelled-entry-label .participant-icons { position: static; transform: none; margin-inline-start: auto; }
.cancelled-entry-remove { margin: 0; padding: 0; border: 0; }
.cancelled-entry-remove summary { display: flex; justify-content: flex-end; padding: 4px; }
.cancelled-entry-remove summary::-webkit-details-marker { display: none; }
.cancelled-entry:has(.cancelled-entry-remove[open]) .cancelled-entry-remove { grid-column: 1 / -1; }

.participant-remove-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 6px;
    background: #f9e1df;
    color: #76251e;
    font-weight: 600;
    text-decoration: none;
}
.participant-remove-link:hover { background: #f5d1ce; }
.participant-remove-link img { flex: none; }

.request-line { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block: 12px; overflow-wrap: anywhere; }
.request-line .request-remove { margin: 0; padding: 0; border: 0; }
.request-remove > summary { display: flex; padding: 4px; }
.request-remove > summary::-webkit-details-marker { display: none; }

.inventory-photo { display: block; width: 100%; height: clamp(120px, 22vw, 200px); object-fit: contain; background: #fff; border-radius: 8px; margin-bottom: 14px; }

.inventory-facts strong .amount-positive, .inventory-facts strong .amount-negative { font-size: inherit; }

.workshop-years { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.workshop-years a { padding: 6px 14px; border: 1px solid var(--line); border-radius: 7px; color: inherit; font-weight: 700; text-decoration: none; }
.workshop-years a[aria-current="page"] { background: #225643; color: white; }

.order-summary { padding: 8px; border-radius: 6px; }

.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.dashboard-card { margin: 0; border-top: 5px solid #bda05a; }
.dashboard-green { border-top-color: #54805b; }
.dashboard-red { border-top-color: #ab6057; }
.dashboard-card h2 { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.dashboard-count { padding: 4px 10px; border-radius: 20px; background: #f6eed8; font: 700 1rem system-ui, sans-serif; }
.dashboard-green .dashboard-count { background: #e3f2df; }
.dashboard-red .dashboard-count { background: #f9e1df; }
.dashboard-card ul { list-style: none; padding: 0; margin: 0; }
.dashboard-card li + li { border-top: 1px solid var(--line); }
.dashboard-card a { display: block; padding: 10px 3px; color: inherit; text-decoration: none; overflow-wrap: anywhere; }
.dashboard-card a:hover strong { text-decoration: underline; }
.dashboard-card small { display: block; margin-top: 3px; }
.dashboard-card .dashboard-action-future, .dashboard-card .dashboard-action-past { border: 1px solid var(--line); border-radius: 9px; margin-top: 8px; }
.dashboard-card .dashboard-action-future { background: #fff3d3; border-color: #ead59c; }
.dashboard-card .dashboard-action-past { background: #e8eff8; border-color: #c9d8ec; }
.dashboard-card .dashboard-action-future > a, .dashboard-card .dashboard-action-past > a { position: relative; padding: 12px 54px 12px 12px; }
.dashboard-card .dashboard-action-urgent > a { padding-right: 96px; }
.dashboard-action-icons { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; }
.dashboard-action-icons .time-direction-icon { position: static; }
.dashboard-action-icons > img { object-fit: contain; }
summary:has(> .participant-icons > :nth-child(8)) { padding-right: 185px; }
summary:has(> .participant-icons > :nth-child(9)) { padding-right: 208px; }
summary:has(> .participant-icons > :nth-child(10)) { padding-right: 231px; }
:is(.workshop, .inventory-card, details[id^="bestelling-"]):target { outline: 2px solid #225643; outline-offset: 2px; }
@media (max-width: 680px) { .dashboard-grid { grid-template-columns: 1fr; } }

.finance-forms { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.finance-forms .panel { margin: 0; }
.finance-forms .fields { grid-template-columns: repeat(2,minmax(0,1fr)); }
.finance-forms + details { margin-top: 16px; }
@media (max-width: 720px) { .finance-forms { grid-template-columns: 1fr; } }

.amount-positive { color: #008030; }
.amount-negative { color: #bb2525; }

.finance-visuals { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; margin-bottom: 14px; }
.finance-visuals > .panel { margin: 0; min-width: 0; border-top: 4px solid #50805e; }
.finance-chart-intro { margin: 4px 0 16px; color: var(--muted); }
.finance-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: .8rem; margin-bottom: 10px; }
.finance-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.finance-legend i { width: 12px; height: 12px; border-radius: 3px; }
.finance-income { background: #008030; }
.finance-expenses { background: repeating-linear-gradient(135deg, #a65b32, #a65b32 4px, #cb8b65 4px, #cb8b65 7px); }
.finance-month { padding: 0; }
.finance-month summary { display: grid; grid-template-columns: 38px minmax(0, 1fr) 110px; align-items: center; gap: 10px; padding: 8px 0; font-size: .85rem; list-style: none; }
.finance-month summary::-webkit-details-marker { display: none; }
.finance-month summary > span:first-child::before { content: '+'; display: inline-block; width: 12px; color: var(--muted); }
.finance-month[open] summary > span:first-child::before { content: '−'; }
.finance-month summary:hover { background: #f5f8f3; }
.finance-bars { display: grid; gap: 3px; background: #f1f4ee; border-radius: 3px; overflow: hidden; }
.finance-bars > span { display: block; height: 9px; border-radius: 0 3px 3px 0; }
.finance-month-result { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.finance-month-empty summary { color: var(--muted); font-weight: 400; }
.finance-month-values { display: flex; flex-wrap: wrap; gap: 8px 20px; padding: 4px 0 12px 12px; font-size: .8rem; }
.finance-month-values strong { display: block; }
.finance-chart-note { color: var(--muted); font-size: .8rem; margin: 16px 0 0; }
.finance-source { margin: 22px 0; }
.finance-source > div:first-child { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 5px 12px; }
.finance-source strong { font-variant-numeric: tabular-nums; }
.finance-source-track { margin: 8px 0 4px; height: 10px; background: #edf2e9; border-radius: 8px; overflow: hidden; }
.finance-source-track > span { display: block; height: 100%; background: #008030; border-radius: inherit; }
.finance-source small { color: var(--muted); }
.invoice-booking { grid-column: 1 / -1; border-top: 4px solid #a65b32; scroll-margin-top: 20px; }
.invoice-booking [data-invoice-status] { padding: 10px 12px; border-radius: 8px; background: var(--tan); font-size: .9rem; }
.invoice-booking input[type="file"] { padding: 12px; }
.invoice-allocation { border: 1px solid var(--line); border-radius: 10px; margin: 16px 0; padding: 12px; min-width: 0; }
.invoice-allocation legend { font-weight: 750; }
.invoice-allocation p { font-size: .85rem; color: var(--muted); margin-top: 0; }
.invoice-allocation-row { grid-template-columns: minmax(0, 2fr) minmax(100px, 1fr) auto; align-items: end; }
.invoice-allocation-row .action { font-size: .8rem; }
.workshop-cost-panel { border: 1px solid var(--line); background: #fffaf1; border-radius: 9px; margin: 12px 0; padding: 12px; }
[id^="factuur-"]:target { outline: 2px solid #a65b32; outline-offset: 5px; scroll-margin-top: 20px; }
@media (max-width: 760px) {
  .finance-visuals { grid-template-columns: 1fr; }
  .finance-month summary { grid-template-columns: 38px minmax(0, 1fr) 95px; gap: 6px; }
  .invoice-allocation-row { grid-template-columns: 1fr; }
}
