:root {
  --cream: #fff4d6;
  --paper: #fffdf6;
  --ink: #1b1030;
  --pink: #ff4fa3;
  --orange: #ff8a1f;
  --teal: #14c8b8;
  --yellow: #ffd93b;
  --purple: #7b4dff;
  --red: #e5243b;
  --border: 3px solid var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-sm: 3px 3px 0 var(--ink);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --display: "Bagel Fat One", "Arial Rounded MT Bold", system-ui, sans-serif;
  --body: "DM Sans", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background-color: var(--cream);
  background-image: radial-gradient(circle, rgba(27, 16, 48, 0.12) 1.5px, transparent 1.6px);
  background-size: 22px 22px;
  color: var(--ink);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
h1, h2, h3 { font-family: var(--display); font-weight: 400; margin: 0; line-height: 1.05; letter-spacing: 0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3.2rem); }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.15rem; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--purple); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  background: var(--yellow); border: var(--border); border-radius: 999px;
  padding: 0.55rem 1.1rem; font-weight: 700; cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out), background-color 160ms ease;
  text-decoration: none; min-height: 44px;
}
.btn:active { transform: translate(2px, 2px) scale(0.97); box-shadow: 1px 1px 0 var(--ink); }
.btn.pink { background: var(--pink); }
.btn.teal { background: var(--teal); }
.btn.ghost { background: var(--paper); }
.btn.danger { background: var(--paper); color: var(--red); border-color: var(--red); box-shadow: 3px 3px 0 var(--red); }
.btn.small { padding: 0.25rem 0.8rem; min-height: 36px; font-size: 0.9rem; }
.btn[disabled] { opacity: 0.6; pointer-events: none; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
  .btn:active { transform: translate(2px, 2px) scale(0.97); }
}

/* ---------- fields ---------- */
label.field { display: grid; gap: 0.3rem; font-weight: 700; font-size: 0.9rem; }
label.field > span { letter-spacing: 0.02em; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number],
input[type=date], input[type=time], input[type=datetime-local], input[type=search], select, textarea {
  width: 100%; background: var(--paper); border: var(--border); border-radius: 12px;
  padding: 0.6rem 0.75rem; font-weight: 500; min-height: 44px;
  font-size: 16px; /* keeps iOS from zooming */
  transition: box-shadow 160ms var(--ease-out), background-color 160ms ease;
}
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 4px 4px 0 var(--purple); }
.check { display: flex; align-items: center; gap: 0.6rem; font-weight: 700; cursor: pointer; min-height: 44px; }
.check input { width: 22px; height: 22px; accent-color: var(--pink); }

/* ---------- login ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; }
.auth-card {
  width: min(440px, 100%); background: var(--paper); border: var(--border); border-radius: 28px;
  box-shadow: 8px 8px 0 var(--ink); padding: 2rem 1.5rem; display: grid; gap: 1rem; position: relative;
  animation: pop 320ms var(--ease-out) both;
}
.auth-card .sticker { position: absolute; top: -18px; right: -10px; transform: rotate(8deg); }
.auth-card h1 { font-size: clamp(2rem, 8vw, 2.8rem); }
.auth-card h1 em { font-style: normal; color: var(--pink); display: block; }
.muted { opacity: 0.7; }
.error-text { color: var(--red); font-weight: 700; min-height: 1.4em; margin: 0; }

.sticker {
  display: inline-block; background: var(--orange); border: var(--border); border-radius: 999px;
  padding: 0.25rem 0.8rem; font-family: var(--display); box-shadow: var(--shadow-sm); font-size: 0.95rem;
}

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100dvh; }
.side {
  background: var(--ink); color: var(--cream); padding: 1.25rem 1rem; display: flex; flex-direction: column; gap: 1.25rem; overflow-y: auto;
  position: sticky; top: 0; height: 100dvh;
}
.brand { font-family: var(--display); font-size: 1.5rem; line-height: 1; }
.brand small { display: block; font-family: var(--body); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--yellow); margin-top: 0.4rem; }
.nav { display: grid; gap: 0.35rem; }
.nav a {
  display: flex; align-items: center; gap: 0.7rem; padding: 0.65rem 0.8rem; border-radius: 14px;
  text-decoration: none; font-weight: 700; border: 3px solid transparent; min-height: 44px;
  transition: background-color 160ms ease, transform 160ms var(--ease-out), color 160ms ease;
}
.nav a:active { transform: scale(0.97); }
.nav a[aria-current=page] { background: var(--pink); color: var(--ink); border-color: var(--cream); }
@media (hover: hover) and (pointer: fine) {
  .nav a:not([aria-current=page]):hover { background: rgba(255, 244, 214, 0.12); }
}
.side-foot { margin-top: auto; display: grid; gap: 0.6rem; font-size: 0.9rem; }
.side-foot .btn { box-shadow: none; border-color: var(--cream); background: transparent; color: var(--cream); }

main { padding: clamp(1rem, 3vw, 2.2rem); min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.page-head p { margin: 0.4rem 0 0; }
.view { animation: rise 260ms var(--ease-out) both; }

/* ---------- cards & stats ---------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat {
  background: var(--c, var(--paper)); border: var(--border); border-radius: 20px; padding: 1rem 1.1rem;
  box-shadow: var(--shadow); animation: rise 300ms var(--ease-out) both; animation-delay: calc(var(--i, 0) * 50ms);
}
.stat:nth-child(odd) { transform: rotate(-0.6deg); }
.stat:nth-child(even) { transform: rotate(0.6deg); }
.stat b { display: block; font-family: var(--display); font-size: 2.4rem; line-height: 1; font-weight: 400; }
.stat span { font-weight: 700; font-size: 0.85rem; }
.card { background: var(--paper); border: var(--border); border-radius: 20px; padding: 1.1rem; box-shadow: var(--shadow); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; align-items: start; }
.todo { list-style: none; margin: 0.8rem 0 0; padding: 0; display: grid; gap: 0.4rem; }
.todo li { display: flex; justify-content: space-between; gap: 0.6rem; align-items: center; padding: 0.4rem 0; border-bottom: 2px dashed rgba(27, 16, 48, 0.25); }
.todo li:last-child { border-bottom: 0; }
.todo button { background: none; border: 0; padding: 0; font-weight: 700; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.empty { text-align: center; padding: 2rem 1rem; }
.empty .big { font-size: 3rem; }

/* ---------- toolbar & table ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 1rem; }
.toolbar input[type=search] { flex: 1 1 220px; }
.toolbar select { flex: 0 1 190px; }
.table-wrap { background: var(--paper); border: var(--border); border-radius: 20px; box-shadow: var(--shadow); overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th { text-align: left; font-family: var(--display); font-weight: 400; font-size: 0.95rem; padding: 0.8rem 0.9rem; background: var(--yellow); border-bottom: var(--border); white-space: nowrap; }
td { padding: 0.75rem 0.9rem; border-bottom: 2px dashed rgba(27, 16, 48, 0.2); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
tbody tr { cursor: pointer; transition: background-color 120ms ease; animation: rise 260ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 12) * 30ms); }
@media (hover: hover) and (pointer: fine) { tbody tr:hover { background: rgba(255, 79, 163, 0.1); } }
td .name { font-weight: 700; font-size: 1.02rem; }
td small { display: block; opacity: 0.7; }

.pill { display: inline-block; font-size: 0.78rem; font-weight: 700; border: 2px solid var(--ink); border-radius: 999px; padding: 0.1rem 0.6rem; background: var(--paper); white-space: nowrap; }
.pill.s-Idee { background: #e9e2ff; }
.pill.s-Aangevraagd { background: var(--yellow); }
.pill.s-Onderhandeling { background: var(--orange); }
.pill.s-Bevestigd { background: var(--teal); }
.pill.s-Geannuleerd { background: #d9d4df; text-decoration: line-through; }
.pill.warn { background: #ffd5d9; border-color: var(--red); color: var(--red); }
.pill.ok { background: #c5f5ef; }

/* ---------- schedule ---------- */
.day { margin-bottom: 2rem; }
.day > h2 { margin-bottom: 0.8rem; display: inline-block; background: var(--pink); border: var(--border); border-radius: 14px; padding: 0.3rem 0.9rem; box-shadow: var(--shadow-sm); transform: rotate(-1deg); }
.stages { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin-top: 0.8rem; }
.stage { background: var(--paper); border: var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 0.9rem; }
.stage h3 { margin-bottom: 0.6rem; }
.slot {
  display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; width: 100%; text-align: left; cursor: pointer;
  background: var(--c, var(--cream)); border: 2px solid var(--ink); border-radius: 14px; padding: 0.55rem 0.7rem; margin-bottom: 0.5rem;
  transition: transform 160ms var(--ease-out);
}
.slot:active { transform: scale(0.98); }
.slot.clash { background: #ffd5d9; border-color: var(--red); }
.slot time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.slot b { display: block; }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; background: rgba(27, 16, 48, 0.55); opacity: 0; transition: opacity 200ms ease; z-index: 20; }
.scrim.open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--cream); z-index: 21;
  border-left: var(--border); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform 300ms var(--ease-drawer);
}
.drawer.open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1rem 1.25rem; border-bottom: var(--border); background: var(--pink); }
.drawer-body { overflow-y: auto; padding: 1.25rem; display: grid; gap: 1.5rem; flex: 1; overscroll-behavior: contain; }
.drawer-foot { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.9rem 1.25rem calc(0.9rem + env(safe-area-inset-bottom)); border-top: var(--border); background: var(--paper); }
fieldset { border: var(--border); border-radius: 18px; background: var(--paper); padding: 1rem; margin: 0; display: grid; gap: 0.9rem; min-width: 0; }
legend { font-family: var(--display); font-size: 1.05rem; padding: 0 0.5rem; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 0.9rem; }

/* ---------- toast ---------- */
#toast {
  position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); z-index: 40;
  background: var(--ink); color: var(--cream); border: 3px solid var(--cream); border-radius: 999px; padding: 0.6rem 1.2rem; font-weight: 700;
  transform: translate(-50%, 12px); opacity: 0; pointer-events: none;
  transition: transform 220ms var(--ease-out), opacity 220ms ease;
}
#toast.show { transform: translate(-50%, 0); opacity: 1; }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@keyframes pop { from { opacity: 0; transform: scale(0.95) translateY(6px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-delay: 0ms !important; }
  .drawer { transition: opacity 150ms ease; transform: none; opacity: 0; pointer-events: none; }
  .drawer.open { opacity: 1; pointer-events: auto; }
  .btn, .slot, .nav a { transition-property: background-color, opacity; }
}

/* ---------- mobile ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; padding-bottom: 76px; }
  .side {
    position: fixed; z-index: 10; top: auto; bottom: 0; left: 0; right: 0; height: auto; flex-direction: row;
    padding: 0.4rem 0.4rem calc(0.4rem + env(safe-area-inset-bottom)); border-top: var(--border);
  }
  .brand, .side-foot { display: none; }
  .nav { grid-template-columns: repeat(7, minmax(0, 1fr)); width: 100%; }
  .nav a { flex-direction: column; gap: 0.1rem; padding: 0.4rem 0; font-size: 0.6rem; min-width: 0; text-align: center; justify-content: center; }
  .nav .ico { font-size: 1.25rem; }
  .mobile-out { display: inline-flex !important; }
  main { padding: 1rem; }
}
.mobile-out { display: none; }

/* ---------- drawer tabs, files, invoices ---------- */
.tabs { display: flex; gap: 0.4rem; padding: 0.7rem 1.25rem; overflow-x: auto; border-bottom: var(--border); background: var(--paper); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; cursor: pointer; background: transparent; border: 2px solid transparent; border-radius: 999px; padding: 0.35rem 0.9rem; font-weight: 700; min-height: 40px; transition: background-color 160ms ease, transform 160ms var(--ease-out); }
.tabs button:active { transform: scale(0.97); }
.tabs button[aria-selected=true] { background: var(--yellow); border-color: var(--ink); }
@media (hover: hover) and (pointer: fine) { .tabs button[aria-selected=false]:hover { background: rgba(27, 16, 48, 0.08); } }
.panel { display: grid; gap: 1.5rem; animation: rise 200ms var(--ease-out) both; }
.files { list-style: none; margin: 0 0 0.5rem; padding: 0; display: grid; gap: 0.3rem; }
.file { display: flex; align-items: center; gap: 0.6rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 12px; padding: 0.3rem 0.4rem 0.3rem 0.7rem; }
.file a { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.x { width: 32px; height: 32px; flex: none; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); cursor: pointer; font-weight: 700; line-height: 1; transition: transform 160ms var(--ease-out); }
.x:active { transform: scale(0.92); }
.inv-list { display: grid; gap: 0.7rem; margin-bottom: 0.5rem; }
.inv { display: grid; gap: 0.4rem; background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 0.7rem; }
.inv-top { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; }
.inv-top select { width: auto; min-height: 36px; padding: 0.2rem 0.5rem; margin-left: auto; }
.inv .btn { justify-self: start; }
.inv-new { display: grid; gap: 0.8rem; border-top: 2px dashed rgba(27, 16, 48, 0.3); padding-top: 0.9rem; margin-top: 0.4rem; }
.inv-new .btn { justify-self: start; }

/* ---------- stages ---------- */
.stage-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.25rem; align-items: start; }
.stage-card { background: var(--paper); border: var(--border); border-radius: 20px; box-shadow: var(--shadow); padding: 0 1rem 1rem; overflow: hidden; animation: rise 300ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 8) * 50ms); }
.stage-card > header { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; background: var(--c); border-bottom: var(--border); margin: 0 -1rem 0.8rem; padding: 0.8rem 1rem; }
.sc-day h3 { font-size: 0.95rem; margin: 0.5rem 0 0.3rem; }
.sc-row { display: flex; gap: 0.4rem; align-items: center; margin-bottom: 0.35rem; }
.sc-open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 0.5rem; text-align: left; cursor: pointer; background: var(--cream); border: 2px solid var(--ink); border-radius: 12px; padding: 0.4rem 0.6rem; transition: transform 160ms var(--ease-out); }
.sc-open:active { transform: scale(0.98); }
.sc-open time { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sc-open b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sc-actions { display: flex; gap: 0.5rem; margin-top: 0.9rem; }

/* ---------- modal ---------- */
.modal { position: fixed; z-index: 31; left: 50%; top: 50%; width: min(520px, calc(100% - 2rem)); max-height: calc(100dvh - 2rem); overflow-y: auto; background: var(--paper); border: var(--border); border-radius: 24px; box-shadow: 8px 8px 0 var(--ink); padding: 1.3rem; display: grid; gap: 1rem; opacity: 0; transform: translate(-50%, -50%) scale(0.96); transition: opacity 180ms ease, transform 180ms var(--ease-out); }
.modal.open { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.modal-scrim { z-index: 30; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; flex-wrap: wrap; }
fieldset.plain { border: 0; padding: 0; background: none; }
fieldset.plain legend { border: 0; background: none; padding: 0; font-family: var(--body); font-weight: 700; font-size: 0.9rem; margin-bottom: 0.4rem; }
.swatches { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.swatches label { cursor: pointer; }
.swatches input { position: absolute; opacity: 0; pointer-events: none; }
.swatches i { display: block; width: 38px; height: 38px; border-radius: 50%; border: var(--border); transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); }
.swatches input:checked + i { box-shadow: 0 0 0 3px var(--paper), 0 0 0 6px var(--ink); transform: scale(1.05); }
.swatches input:focus-visible + i { outline: 3px solid var(--purple); outline-offset: 4px; }

/* ---------- timetable ---------- */
.day-tabs { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.2rem 0.2rem 0.8rem; scrollbar-width: none; }
.day-tabs button { flex: none; cursor: pointer; background: var(--paper); border: var(--border); border-radius: 999px; padding: 0.4rem 1rem; font-weight: 700; min-height: 44px; display: inline-flex; gap: 0.5rem; align-items: center; box-shadow: var(--shadow-sm); transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.day-tabs button:active { transform: scale(0.97); }
.day-tabs button[aria-selected=true] { background: var(--pink); }
.day-tabs small { background: var(--ink); color: var(--cream); border-radius: 999px; padding: 0 0.5rem; font-size: 0.75rem; }
.tt-wrap { overflow: auto; background: var(--paper); border: var(--border); border-radius: 20px; box-shadow: var(--shadow); max-height: calc(100dvh - 15rem); min-height: 280px; }
.tt { display: grid; grid-template-columns: 56px repeat(var(--cols), minmax(190px, 1fr)); min-width: min-content; }
.tt-head { position: sticky; top: 0; z-index: 3; background: var(--c); border-bottom: var(--border); border-left: 2px solid var(--ink); padding: 0.7rem 0.8rem; font-family: var(--display); font-size: 1.05rem; text-align: center; }
.tt-corner { position: sticky; top: 0; left: 0; z-index: 4; background: var(--yellow); border-bottom: var(--border); }
.tt-axis { position: sticky; left: 0; z-index: 2; background: var(--paper); border-right: 2px solid var(--ink); }
.tt-axis span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 0.75rem; font-weight: 700; font-variant-numeric: tabular-nums; background: var(--paper); padding: 0 2px; }
.tt-axis span:first-child { transform: translateY(2px); }
.tt-col { position: relative; border-left: 2px solid var(--ink); background-image: repeating-linear-gradient(to bottom, transparent 0, transparent 71px, rgba(27, 16, 48, 0.18) 71px, rgba(27, 16, 48, 0.18) 72px); }
.tt-block { position: absolute; overflow: hidden; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 0.1rem; padding: 0.35rem 0.5rem; border: 2px solid var(--ink); border-radius: 12px; background: color-mix(in srgb, var(--c) 60%, white); box-shadow: 2px 2px 0 var(--ink); transition: transform 160ms var(--ease-out), box-shadow 160ms var(--ease-out); animation: pop 260ms var(--ease-out) both; }
.tt-block:active { transform: scale(0.98); }
.tt-block time { font-size: 0.72rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.tt-block b { font-size: 0.95rem; line-height: 1.15; }
.tt-block small { font-size: 0.7rem; font-weight: 700; opacity: 0.75; }
.tt-block.option { border-style: dashed; background: color-mix(in srgb, var(--c) 25%, white); box-shadow: none; }
.tt-block.clash { border-color: var(--red); box-shadow: 2px 2px 0 var(--red); }
.tt-block.clash::after { content: "⚠️"; position: absolute; top: 2px; right: 4px; font-size: 0.8rem; }
@media (hover: hover) and (pointer: fine) { .tt-block:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--ink); z-index: 2; } }
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.6rem; }
.chip { cursor: pointer; background: color-mix(in srgb, var(--c) 45%, white); border: 2px solid var(--ink); border-radius: 999px; padding: 0.3rem 0.8rem; font-weight: 700; transition: transform 160ms var(--ease-out); }
.chip:active { transform: scale(0.97); }

@media print {
  .side, .page-head .btn, .page-head .check, .day-tabs, #toast { display: none !important; }
  .shell { display: block; padding: 0; }
  body { background: #fff; }
  .tt-wrap { max-height: none; overflow: visible; box-shadow: none; }
}

/* ---------- budget ---------- */
.budget { margin: 0.2rem 0 0.8rem; }
.budget .bar { height: 14px; border: 2px solid var(--ink); border-radius: 999px; background: var(--cream); overflow: hidden; }
.budget .bar i { display: block; height: 100%; background: var(--teal); border-right: 2px solid var(--ink); transform-origin: left; animation: grow 420ms var(--ease-out) both; }
.budget.near .bar i { background: var(--orange); }
.budget.over .bar i { background: var(--red); border-right: 0; }
.budget .b-row { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin-top: 0.35rem; font-size: 0.9rem; font-weight: 700; }
@keyframes grow { from { transform: scaleX(0.02); } }
.nav-badge { margin-left: auto; background: var(--red); color: #fff; border-radius: 999px; font-size: 0.72rem; line-height: 1; padding: 0.2rem 0.45rem; }
.lnk { font-weight: 700; text-underline-offset: 3px; }
@media (max-width: 860px) { .nav-badge { position: absolute; top: 2px; right: 8px; margin: 0; } .nav a { position: relative; } }

.pill.s-Gecontracteerd { background: #9ff0e6; }
.chip.option { border-style: dashed; }
.notice { border: var(--border); border-radius: 14px; padding: 0.6rem 0.9rem; margin-bottom: 1rem; font-weight: 700; background: #fff0a8; }
.notice.warn { background: #ffe0bd; }
.lnk-btn { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.import-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; min-width: 0; }
.import-table th { font-size: 0.8rem; padding: 0.4rem 0.5rem; }
.import-table td { padding: 0.35rem 0.5rem; }
.import-scroll { max-height: 40dvh; overflow: auto; border: 2px solid var(--ink); border-radius: 12px; }
.modal.wide { width: min(760px, calc(100% - 2rem)); }

/* ---------- documenten & guesttickets ---------- */
.filter-chips { display: flex; gap: 0.5rem; overflow-x: auto; padding: 0.2rem 0.2rem 0.9rem; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.filter-chips button { flex: none; cursor: pointer; background: var(--paper); border: var(--border); border-radius: 999px; padding: 0.4rem 1rem; font-weight: 700; min-height: 44px; display: inline-flex; gap: 0.5rem; align-items: center; box-shadow: var(--shadow-sm); transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.filter-chips button:active { transform: scale(0.97); }
.filter-chips button[aria-selected=true] { background: var(--pink); }
.filter-chips small { background: var(--ink); color: var(--cream); border-radius: 999px; padding: 0 0.5rem; font-size: 0.75rem; }
.doclink { font-weight: 700; word-break: break-word; }
[data-docrow], [data-gt] { cursor: default; }
.pill.k-contract { background: #9ff0e6; }
.pill.k-rider { background: #ffe0bd; }
.pill.k-factuur { background: #fff0a8; }
.pill.k-presskit { background: #e9e2ff; }
input.num { width: 84px; min-height: 40px; text-align: center; padding: 0.3rem; font-variant-numeric: tabular-nums; }
@media (max-width: 860px) {
  .nav { grid-template-columns: none !important; grid-auto-flow: column; grid-auto-columns: minmax(66px, 1fr); overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
}
@media print { .toolbar, .filter-chips { display: none !important; } input.num { border: 0; background: none; width: auto; } }

.check.sent { min-height: 40px; gap: 0.5rem; }
.check.sent .muted { font-weight: 500; font-size: 0.85rem; }

.reason { max-width: 320px; white-space: pre-wrap; }
#tk-rows tr { cursor: pointer; }

/* ============================================================
   Huisstijl van kampingkitschclub.be
   geel #ffec00 · hot pink #ff0068 · paars #6702e9 / #8b00f9
   oranje #f87246 · periwinkle #5e73ff · cyaan · groot, breed lettertype in hoofdletters
   ============================================================ */
:root {
  --page: #ffec00;
  --sun: #ffec00;
  --violet: #6702e9;
  --glow: #5e73ff;
  --ink: #14002f;
  --pink: #ff0068;
  --orange: #f87246;
  --teal: #00e5ff;
  --yellow: #ffec00;
  --purple: #8b00f9;
  --cream: #fff9c9;
  --display: "Unbounded", "Arial Black", system-ui, sans-serif;
}
body { background-color: var(--page); background-image: radial-gradient(circle, rgba(103, 2, 233, 0.16) 1.5px, transparent 1.6px); }
h1, h2, h3, .brand, th, legend, .sticker, .btn, .nav a, .tabs button, .filter-chips button, .day-tabs button { text-transform: uppercase; letter-spacing: 0.02em; }
h1 { font-size: clamp(1.5rem, 4.2vw, 2.5rem); font-weight: 900; line-height: 1.08; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 0.95rem; font-weight: 700; }
h1, h2, h3, .brand, th, legend, .sticker, .stat b { font-family: var(--display); }
.stat b { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 900; }
.btn { font-family: var(--display); font-size: 0.78rem; font-weight: 700; }
.btn.small { font-size: 0.72rem; }

/* primaire knoppen: paars met gele tekst en gloed, zoals de ticketknop op de site */
.btn.pink { background: radial-gradient(120% 140% at 50% 50%, var(--violet) 55%, var(--glow) 130%); color: var(--sun); box-shadow: var(--shadow-sm), inset 0 0 16px rgba(94, 115, 255, 0.9); text-shadow: 0 0 8px rgba(255, 255, 255, 0.35); }
.btn.teal { background: #0f0; }
@media (hover: hover) and (pointer: fine) { .btn.pink:hover { box-shadow: 4px 4px 0 var(--ink), inset 0 0 22px var(--glow); } }

/* zijbalk: paars met gele tekst */
.side { background: var(--violet); color: var(--sun); border-right: var(--border); }
.brand { font-size: 1.15rem; line-height: 1.1; text-shadow: 0 0 12px rgba(255, 255, 255, 0.45); }
.brand small { color: #fff; font-family: var(--body); }
.nav a { font-family: var(--display); font-size: 0.72rem; }
.nav a[aria-current=page] { background: var(--pink); color: #fff; border-color: var(--sun); box-shadow: inset 0 0 14px rgba(255, 255, 255, 0.35); }
@media (hover: hover) and (pointer: fine) { .nav a:not([aria-current=page]):hover { background: rgba(255, 236, 0, 0.16); } }
.side-foot .btn { border-color: var(--sun); color: var(--sun); }
.nav-badge { background: var(--sun); color: var(--ink); }

/* tabellen en kaarten */
th { background: var(--violet); color: var(--sun); font-size: 0.75rem; letter-spacing: 0.04em; }
.tt-corner { background: var(--violet); }
.tt-head { font-size: 0.85rem; }
legend { background: var(--pink); color: #fff; font-size: 0.8rem; }
.sticker { background: var(--orange); }
.stat:nth-child(odd) { transform: rotate(-0.5deg); }
.drawer-head { background: var(--pink); color: #fff; }
.drawer-head .btn { color: var(--ink); }
.tabs button[aria-selected=true], .filter-chips button[aria-selected=true], .day-tabs button[aria-selected=true] { background: var(--violet); color: var(--sun); }
.filter-chips small, .day-tabs small { background: var(--sun); color: var(--ink); }
.filter-chips button, .tabs button { font-size: 0.72rem; font-family: var(--display); }
.pill.s-Bevestigd { background: #00e5ff; }
.pill.s-Gecontracteerd { background: #0f0; }
.pill.s-Aangevraagd { background: var(--sun); }
.pill.s-Onderhandeling { background: var(--orange); }
.pill.s-Idee { background: #ba6dff; }
.pill.ok { background: #b6ffb6; }
.pill.warn { background: #ffd0e0; color: #b0003f; border-color: #b0003f; }
.budget .bar i { background: #0f0; }
.budget.near .bar i { background: var(--orange); }
.budget.over .bar i { background: var(--pink); }
.stat { border-width: 3px; }

/* login: paars-roze verloop met glanzende kaart */
.auth { background: linear-gradient(180deg, var(--pink) 0%, #fff 32%, var(--violet) 68%, var(--pink) 100%); }
.auth-card h1 em { color: var(--pink); }
.auth-card { box-shadow: 8px 8px 0 var(--ink), 0 0 0 4px var(--sun); }

/* mobiele navigatie als zwarte chroom-pil, zoals het menu op de site */
@media (max-width: 860px) {
  .side { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); border: 3px solid #ba6dff; border-radius: 26px; background: linear-gradient(180deg, #4a4a4a 0%, #000 55%, #1c1c1c 100%); padding: 0.35rem; box-shadow: 0 0 18px rgba(255, 0, 104, 0.55); }
  .shell { padding-bottom: 92px; }
  .nav a { font-size: 0.55rem; }
  .nav a[aria-current=page] { border-radius: 18px; }
}
@media print { th { background: #eee; color: #000; } body { background: #fff; } }
@media (max-width: 860px) {
  .nav { grid-auto-columns: 88px !important; }
  .nav a { font-size: 0.56rem; letter-spacing: 0; padding: 0.4rem 0; }
}

.stage-card > header h2 { color: var(--on, var(--ink)); }

/* ---------- stage-kiezer en detailweergave ---------- */
.stage-picker { display: flex; gap: 0.6rem; overflow-x: auto; padding: 0.2rem 0.2rem 1rem; scrollbar-width: none; }
.stage-picker::-webkit-scrollbar { display: none; }
.stage-picker button { flex: none; display: inline-flex; align-items: center; gap: 0.5rem; cursor: pointer; background: var(--paper); border: var(--border); border-radius: 999px; padding: 0.4rem 1rem 0.4rem 0.7rem; min-height: 46px; font-family: var(--display); font-size: 0.72rem; font-weight: 700; text-transform: uppercase; box-shadow: var(--shadow-sm); transition: transform 160ms var(--ease-out), background-color 160ms ease; }
.stage-picker button:active { transform: scale(0.97); }
.stage-picker i { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--ink); background: var(--c, var(--paper)); }
.stage-picker small { background: var(--ink); color: #fff; border-radius: 999px; padding: 0 0.5rem; font-size: 0.72rem; }
.stage-picker button[aria-selected=true] { background: var(--c, var(--violet)); color: var(--on, #fff); box-shadow: 4px 4px 0 var(--ink); }
.stage-picker button[aria-selected=true] small { background: var(--on, #fff); color: var(--c, var(--ink)); }
.stage-picker .all-chip[aria-selected=true] { background: var(--violet); color: var(--sun); }
.stage-detail { background: var(--paper); border: var(--border); border-radius: 22px; box-shadow: var(--shadow); overflow: hidden; animation: rise 260ms var(--ease-out) both; }
.stage-detail > header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.8rem; padding: 1.1rem 1.25rem; background: var(--c); color: var(--on); border-bottom: var(--border); }
.stage-detail > header h2 { font-size: clamp(1.3rem, 3.4vw, 2rem); color: var(--on); }
.muted-on { font-weight: 700; opacity: 0.85; }
.sd-body { padding: 1.1rem 1.25rem 1.3rem; }
.sd-list { display: grid; gap: 0.5rem; }
.sd-row { display: flex; gap: 0.5rem; align-items: center; animation: rise 240ms var(--ease-out) both; animation-delay: calc(min(var(--i, 0), 10) * 30ms); }
.sd-open { flex: 1; min-width: 0; display: grid; grid-template-columns: 7.2rem 1fr auto auto; gap: 0.8rem; align-items: center; text-align: left; cursor: pointer; background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; padding: 0.65rem 0.9rem; transition: transform 160ms var(--ease-out); }
.sd-open:active { transform: scale(0.99); }
.sd-open time { font-weight: 700; font-variant-numeric: tabular-nums; }
.sd-name { font-weight: 700; font-size: 1.05rem; overflow-wrap: anywhere; }
.sd-name small { display: block; font-weight: 500; opacity: 0.7; font-size: 0.8rem; }
.sd-fee { font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; min-width: 5.5rem; }
.sc-open b { white-space: normal; overflow-wrap: anywhere; }
@media (hover: hover) and (pointer: fine) { .sd-open:hover, .sc-open:hover { background: #fff; } }
@media (max-width: 640px) { .sd-open { grid-template-columns: 1fr auto; } .sd-open time { grid-column: 1; } .sd-name { grid-column: 1 / -1; grid-row: 2; } .sd-fee { grid-column: 2; grid-row: 1; } .sd-open .pill { grid-column: 1; grid-row: 3; justify-self: start; } }

.stage-detail > header .btn.ghost, .stage-card > header .btn { color: var(--ink); }

.stage-stack { display: grid; gap: 1.5rem; }

/* ---------- timetable: grotere, leesbare blokken ---------- */
.tt { grid-template-columns: 64px repeat(var(--cols), minmax(240px, 1fr)); }
.tt-col { background-image: repeating-linear-gradient(to bottom, transparent 0, transparent calc(var(--hh) - 1px), rgba(20, 0, 47, 0.2) calc(var(--hh) - 1px), rgba(20, 0, 47, 0.2) var(--hh)); }
.tt-axis span { font-size: 0.9rem; }
.tt-block { padding: 0.4rem 0.6rem; border-radius: 12px; gap: 0.15rem; justify-content: flex-start; }
.tt-block time { font-size: 0.82rem; }
.tt-block b { font-size: 1.1rem; line-height: 1.15; overflow-wrap: anywhere; }
.tt-block small { font-size: 0.78rem; }
.tt-block.short { flex-direction: row; align-items: center; gap: 0.6rem; padding-block: 0.15rem; }
.tt-block.short time { flex: none; }
.tt-block.short b { font-size: 1rem; line-height: 1.1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tt-block.short small { display: none; }
.zoom { display: inline-flex; gap: 0.35rem; }
.zoom .btn[aria-pressed=true] { background: var(--violet); color: var(--sun); }
@media (max-width: 640px) { .tt { grid-template-columns: 52px repeat(var(--cols), minmax(210px, 1fr)); } }

.tt-block.pushed { border-left-width: 6px; }

/* ---------- rollen ---------- */
.role-tag { display: inline-block; margin-top: 0.15rem; padding: 0 0.55rem; border: 2px solid var(--sun); border-radius: 999px; font-family: var(--display); font-size: 0.6rem; text-transform: uppercase; letter-spacing: 0.04em; }
.nav-logout { display: none !important; }
@media (max-width: 860px) { .nav-logout { display: flex !important; } }
.team-row { align-items: center; gap: 0.8rem; flex-wrap: wrap; }
.team-actions { display: inline-flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.team-actions select { width: auto; min-height: 38px; padding: 0.2rem 0.5rem; }
.matrix td:first-child { white-space: nowrap; vertical-align: top; }
.ro-note { font-weight: 700; align-self: center; }
input:disabled, select:disabled, textarea:disabled { opacity: 1; background: #f3efe0; border-color: rgba(20, 0, 47, 0.45); color: var(--ink); cursor: default; }
.check input:disabled { opacity: 0.7; }

/* ---------- wekelijkse mail ---------- */
.report-note { margin: 0 0 1rem; padding: .7rem .9rem; border-radius: 12px; border: 2px solid var(--ink, #1a1033); font-size: .92rem; line-height: 1.45; }
.report-note.warn { background: #fff1c2; }
.report-note.ok { background: #d9fbff; }
.report-actions { display: flex; flex-wrap: wrap; gap: .6rem; }
.report-actions .btn[disabled] { opacity: .45; cursor: not-allowed; }
.report-preview { margin-top: 1.1rem; }
.report-preview summary { cursor: pointer; font-weight: 700; }
.report-mail { border-radius: 14px; overflow: hidden; max-height: 520px; overflow-y: auto; }
