/* Dealerflow huisstijl: donkerblauwe navigatie, oranje accent, warm gebroken-wit.
   Dezelfde tokens staan in de registraties-app en Dealerflow beheer; houd ze gelijk. */
:root {
  --nav-bg: #1b2a44;
  --nav-bg-2: #243656;
  --nav-line: #2c3d5c;
  --nav-text: #c9d2e0;
  --nav-muted: #8391a8;

  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3f0ea;
  --text: #1b2a44;
  --text-muted: #5b6679;
  --border: #e4e0d8;
  --border-strong: #d3cdc2;

  --primary: #1b2a44;
  --primary-ink: #ffffff;
  --accent: #e8692a;
  --accent-ink: #ffffff;
  --accent-soft: #fdeee5;
  --accent-text: #b4501c;
  --brand: #1b2a44;

  --success: #2f6b16;
  --success-soft: #e6f2dd;
  --danger: #b4401b;
  --danger-soft: #fbe6dc;
  --warning: #8a5a0b;
  --warning-soft: #fcf0d6;
  --info: #1f5a9e;
  --info-soft: #e3eefa;
  --purple: #5b4bb7;
  --purple-soft: #eeecfd;

  --radius-lg: 14px;
  --radius-md: 10px;
  --radius-sm: 8px;
  --shadow-card: 0 1px 2px rgba(27, 42, 68, 0.05);
  --sidebar-width: 248px;
  --tabbar-height: 64px;
  --topbar-height: 56px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, p { margin: 0; }
a { color: inherit; }
[hidden] { display: none !important; }
.ui-icon { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Knoppen ---------- */
.p-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
  font-weight: 600; font-size: 14px; text-decoration: none; white-space: nowrap;
}
.p-btn:hover { background: var(--surface-2); }
.p-btn--primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.p-btn--primary:hover { background: #26395b; }
.p-btn--small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.p-btn--block { width: 100%; }
.p-btn:disabled { opacity: 0.55; cursor: default; }
.p-icon-btn {
  width: 36px; height: 36px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text);
}
.p-icon-btn:hover { background: var(--surface-2); }
.p-link { display: inline-block; margin-top: 14px; color: var(--accent-text); font-weight: 600; font-size: 14px; }

/* ---------- Shell ---------- */
.p-shell { min-height: 100vh; }

.p-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sidebar-width);
  display: flex; flex-direction: column;
  background: var(--nav-bg); color: var(--nav-text);
}
.p-brand { display: flex; align-items: center; gap: 10px; padding: 16px 16px 12px; color: #fff; text-decoration: none; }
.p-brand strong { display: block; font-size: 16px; line-height: 1.2; }
.p-brand small { display: block; color: var(--nav-muted); font-size: 12.5px; }
.p-logo {
  width: 34px; height: 34px; flex: none; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.02em;
}
#sideCompany { padding: 0 12px 14px; border-bottom: 1px solid var(--nav-line); }
.p-company {
  position: relative; display: flex; align-items: center; gap: 8px;
  min-height: 38px; padding: 0 10px; border-radius: var(--radius-sm);
  background: var(--nav-bg-2); color: #fff; font-size: 13.5px; font-weight: 600;
}
.p-company-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.p-company--select select {
  appearance: none; -webkit-appearance: none;
  flex: 1; min-width: 0; height: 38px; padding: 0 22px 0 0;
  border: 0; background: transparent; color: inherit; font-weight: 600; cursor: pointer;
  text-overflow: ellipsis;
}
.p-company--select select option { color: var(--text); background: var(--surface); }
.p-company--select .ui-icon { position: absolute; right: 10px; pointer-events: none; opacity: 0.8; }

.p-nav { flex: 1; overflow-y: auto; padding: 10px 0; }
.p-nav-group { padding: 14px 18px 4px; color: var(--nav-muted); font-size: 12px; font-weight: 600; }
.p-nav-item {
  display: flex; align-items: center; gap: 12px;
  margin: 2px 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--nav-text); text-decoration: none; font-weight: 600; font-size: 14.5px;
  border: 0; background: transparent; width: calc(100% - 20px); text-align: left;
}
.p-nav-item:hover { background: var(--nav-bg-2); color: #fff; }
.p-nav-item.active { background: var(--accent); color: #fff; }

.p-user { padding: 14px 16px 16px; border-top: 1px solid var(--nav-line); }
.p-user-name { color: #fff; font-weight: 700; }
.p-user-role { color: var(--nav-muted); font-size: 12.5px; }
.p-user-actions { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; }
.p-user-actions a, .p-user-actions button {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 0;
  border: 0; background: none; color: var(--nav-text); font-size: 13px; text-decoration: none;
}
.p-user-actions a:hover, .p-user-actions button:hover, .p-user-actions .active { color: #fff; }

.p-topbar { display: none; }
.p-tabbar { display: none; }

.p-main { margin-left: var(--sidebar-width); min-height: 100vh; }
.p-page { max-width: 1240px; margin: 0 auto; padding: 36px 40px 56px; animation: fade-in 0.15s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

/* Zijpaneel voor formulieren (desktop) */
.p-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 50;
  width: min(520px, 100%); overflow-y: auto;
  padding: 24px 24px 40px;
  background: var(--bg); border-left: 1px solid var(--border);
  box-shadow: -12px 0 40px rgba(27, 42, 68, 0.14);
  animation: panel-in 0.18s ease;
}
@keyframes panel-in { from { transform: translateX(24px); opacity: 0.6; } to { transform: none; opacity: 1; } }
body.panel-open::after {
  content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(27, 42, 68, 0.28);
}
.p-panel .form-header h2 { font-size: 20px; }

/* ---------- Pagina-onderdelen ---------- */
.p-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.p-title { font-size: 30px; line-height: 1.15; font-weight: 800; letter-spacing: -0.01em; }
.p-subtitle { margin-top: 6px; color: var(--text-muted); }
.p-muted { color: var(--text-muted); }

.p-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 22px 24px; box-shadow: var(--shadow-card);
}
.p-card--flush { padding: 0; overflow: hidden; }
.p-card-title { font-size: 16.5px; font-weight: 700; margin-bottom: 14px; }

.p-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.p-kpis:has(> :nth-child(3):last-child) { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.p-kpi {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px 22px; border-radius: var(--radius-lg);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-card);
  color: inherit; text-decoration: none;
}
a.p-kpi:hover { border-color: var(--border-strong); }
.p-kpi span { color: var(--text-muted); font-size: 14px; }
.p-kpi strong { font-size: 28px; line-height: 1.1; font-weight: 800; }
.p-kpi--alert { border-color: #f0c1a8; }
.p-kpi--alert span, .p-kpi--alert strong { color: var(--danger); }

.p-grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }

.p-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.p-week { display: flex; align-items: center; gap: 8px; }
#weekLabel { min-width: 0; font-weight: 700; font-size: 14.5px; padding: 0 4px; }
.p-chips { display: flex; gap: 6px; }
.p-chip {
  min-height: 34px; padding: 0 14px; border-radius: 999px;
  border: 1px solid var(--border-strong); background: var(--surface);
  font-weight: 600; font-size: 13.5px;
}
.p-chip.active { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }

.p-empty-state { text-align: center; padding: 40px 24px; }
.p-empty-state h2 { font-size: 17px; margin-bottom: 6px; }
.p-empty-state p { color: var(--text-muted); max-width: 460px; margin: 0 auto 18px; }
.p-empty-icon {
  display: inline-flex; width: 52px; height: 52px; margin-bottom: 12px;
  align-items: center; justify-content: center; border-radius: 14px;
  background: var(--accent-soft); color: var(--accent-text);
}

/* ---------- Registratieregels: tabel op desktop, kaartjes op de telefoon ---------- */
.reg-list { display: flex; flex-direction: column; }
.reg-head, .reg-row {
  display: grid;
  grid-template-columns: 34px 96px minmax(0, 1fr) 96px 112px 28px;
  align-items: center; gap: 12px;
  padding: 11px 18px;
}
.reg-head { color: var(--text-muted); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.reg-row { border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.reg-head + .reg-row, .reg-day + .reg-row { border-top: 0; }
a.reg-row:hover { background: #fcfaf6; }
a.reg-row:hover .reg-action { color: var(--accent-text); }
.reg-row--rejected { background: #fff8f4; }
.reg-kind {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-2); color: var(--text-muted);
}
.reg-kind--rit { background: var(--info-soft); color: var(--info); }
.reg-date { font-size: 13.5px; color: var(--text-muted); }
.reg-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.reg-main strong { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-main small { color: var(--text-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reg-main .reg-reason { display: flex; align-items: center; gap: 5px; color: var(--danger); white-space: normal; }
.reg-amount { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }
.reg-action { color: var(--text-muted); display: inline-flex; justify-content: center; }
.reg-row--locked .reg-action { color: #a7afbc; }
.reg-day {
  display: flex; justify-content: space-between;
  padding: 10px 18px 6px; border-top: 1px solid var(--border);
  background: var(--surface-2); color: var(--text-muted); font-size: 12.5px; font-weight: 700;
}
.reg-day span:first-child { display: inline-block; }
.reg-day span:first-child::first-letter { text-transform: uppercase; }
.reg-head + .reg-day { border-top: 0; }
.reg-list--grouped .reg-date { display: none; }
.reg-list--grouped .reg-head, .reg-list--grouped .reg-row { grid-template-columns: 34px minmax(0, 1fr) 96px 112px 28px; }
.reg-list--grouped .reg-head span:nth-child(2) { display: none; }

/* Compacte variant voor het overzicht: geen kopregel, datum onder de titel. */
.reg-list--compact { margin: 0 -24px; }
.reg-list--compact .reg-row { grid-template-columns: 32px 72px minmax(0, 1fr) auto 24px; padding: 10px 24px; }
.reg-list--compact .reg-row:first-child { border-top: 0; }
.reg-list--compact .reg-status { display: none; }

/* ---------- Formulieren in het portaal (voorkeuren) ---------- */
.p-form label { display: block; margin-bottom: 16px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.p-form input:not([type=radio]), .p-form select {
  display: block; width: 100%; margin-top: 6px; min-height: 44px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--surface);
  color: var(--text); font-size: 15px; font-weight: 500;
}
.p-form select:disabled { background: var(--surface-2); color: var(--text-muted); }
.p-form .p-card-title:not(:first-child) { margin-top: 26px; }
.p-radio-group { border: 0; padding: 0; margin: 0 0 16px; }
.p-radio-group legend { padding: 0; margin-bottom: 8px; font-size: 13px; font-weight: 700; color: var(--text-muted); }
.p-radio-group label { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--text); font-weight: 500; font-size: 15px; }
.p-radio-group input { width: 18px; height: 18px; accent-color: var(--accent); }
.p-form-actions { margin-top: 8px; }
#prefsForm { max-width: 640px; }
.p-details { max-width: 640px; margin-top: 20px; }
.p-details summary { cursor: pointer; font-weight: 700; }
.p-details[open] summary { margin-bottom: 16px; }

/* ---------- Sheets (Meer, Nieuwe registratie) ---------- */
.p-sheet {
  width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh - 48px);
  padding: 18px; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 20px 60px rgba(27, 42, 68, 0.25);
}
.p-sheet::backdrop { background: rgba(27, 42, 68, 0.45); }
.p-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.p-sheet-head h2 { font-size: 18px; }
.p-choice { display: grid; gap: 10px; }
.p-choice-item {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  border: 1px solid var(--border); border-radius: var(--radius-md);
  color: inherit; text-decoration: none;
}
.p-choice-item:hover { border-color: var(--accent); background: var(--accent-soft); }
.p-choice-item .ui-icon { color: var(--accent); }
.p-choice-item strong { display: block; font-size: 15.5px; }
.p-choice-item small { color: var(--text-muted); }
.p-sheet--menu { background: var(--nav-bg); color: var(--nav-text); }
.p-sheet--menu .p-sheet-head h2 { color: #fff; }
.p-sheet--menu .p-icon-btn { background: var(--nav-bg-2); border-color: var(--nav-line); color: #fff; }
.p-sheet--menu .p-nav-item { margin: 2px 0; width: 100%; }
.p-sheet--menu .p-nav-group { padding-left: 12px; }
.p-sheet-company { margin-bottom: 8px; }

/* ---------- Inloggen ---------- */
.p-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; background: var(--nav-bg); }
.p-auth-card { width: min(420px, 100%); padding: 32px 28px; border-radius: 18px; background: var(--surface); text-align: center; }
.p-auth-card .p-logo { width: 48px; height: 48px; font-size: 17px; border-radius: 12px; margin-bottom: 16px; }
.p-auth-card h1 { font-size: 24px; font-weight: 800; margin-bottom: 8px; }
.p-auth-card p { color: var(--text-muted); margin-bottom: 20px; }
.p-auth-card .status { text-align: left; }
.p-auth-card .p-company { background: var(--surface-2); color: var(--text); }
.loading { color: var(--text-muted); text-align: center; padding: 40px 12px; font-size: 14px; }

/* ---------- Tablet ---------- */
@media (max-width: 1100px) {
  .p-page { padding: 28px 28px 48px; }
  .p-grid-2 { grid-template-columns: 1fr; }
  .p-kpis, .p-kpis:has(> :nth-child(3):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Materiaalstromen en projecten: rijen als tabel, op de telefoon kaartjes ---------- */
.flow-list { display: flex; flex-direction: column; }
.flow-head, .flow-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) minmax(0, 260px) 84px 28px;
  align-items: center; gap: 12px;
  padding: 12px 18px;
}
.flow-head { color: var(--text-muted); font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--border); }
.flow-row { border-top: 1px solid var(--border); color: inherit; text-decoration: none; }
.flow-head + .flow-row { border-top: 0; }
a.flow-row:hover { background: #fcfaf6; }
a.flow-row:hover .flow-action { color: var(--accent-text); }
.flow-icon {
  width: 32px; height: 32px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent-text);
}
.flow-main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.flow-main strong { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-main small { color: var(--text-muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flow-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.flow-pill { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.flow-pill--supplied { background: var(--info-soft); color: var(--info); }
.flow-pill--removed { background: var(--success-soft); color: var(--success); }
.flow-pill--internal { background: var(--surface-2); color: var(--text-muted); }
.flow-trips { text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }
.flow-action { color: var(--text-muted); display: inline-flex; justify-content: center; }
.p-note { margin: -8px 0 20px; font-size: 13px; }
.p-kpi span { display: flex; align-items: center; gap: 6px; }

.flow-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.flow-table th, .flow-table td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
.flow-table thead th { color: var(--text-muted); font-size: 12.5px; font-weight: 600; }
.flow-table tbody th { font-weight: 600; }
.flow-table td { white-space: nowrap; }
.flow-table tr:last-child th, .flow-table tr:last-child td { border-bottom: 0; }

/* ---------- Zoeken, keuzevakje, terugknop en dialoog ---------- */
.p-search {
  flex: 1; min-width: 200px; max-width: 420px; height: 42px; padding: 0 12px;
  border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: 15px;
}
.p-check { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 500; color: var(--text); }
.p-check input { width: 18px; height: 18px; accent-color: var(--accent); }
.p-check--inline { white-space: nowrap; color: var(--text-muted); }
.p-form .p-check { margin-bottom: 16px; }
.p-back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 14px; color: var(--text-muted); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.p-back:hover { color: var(--accent-text); }
.p-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.p-form .picker-trigger { margin-top: 6px; min-height: 46px; }
.p-form .field-error { display: block; margin-top: 5px; color: var(--danger); font-size: 12.5px; font-weight: 600; }
.p-form .field-error:empty { display: none; }

.p-dialog {
  width: min(520px, calc(100vw - 24px)); max-height: calc(100dvh - 48px);
  padding: 20px; border: 0; border-radius: 18px;
  background: var(--surface); color: var(--text);
  box-shadow: 0 20px 60px rgba(27, 42, 68, 0.25);
}
.p-dialog::backdrop { background: rgba(27, 42, 68, 0.45); }
.p-dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.p-dialog-head h2 { font-size: 18px; }
.p-dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* ---------- Telefoon (< 900px): topbalk + onderbalk, tabellen worden kaartjes ---------- */
@media (max-width: 899px) {
  .p-sidebar { display: none; }
  .p-main { margin-left: 0; padding-bottom: calc(var(--tabbar-height) + env(safe-area-inset-bottom) + 16px); }
  .p-page { padding: 18px 16px 24px; }
  .p-hide-mobile { display: none; }

  .p-topbar {
    position: sticky; top: 0; z-index: 30;
    display: flex; align-items: center; gap: 10px;
    height: calc(var(--topbar-height) + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 12px 0 14px;
    background: var(--nav-bg); color: #fff;
  }
  .p-topbar .p-logo { width: 30px; height: 30px; font-size: 12px; }
  #topCompany { flex: 1; min-width: 0; }
  #topCompany .p-company { background: transparent; padding: 0; min-height: 0; font-size: 15px; }
  .p-avatar {
    width: 34px; height: 34px; flex: none; border-radius: 999px; border: 0;
    background: var(--nav-bg-2); color: #fff; font-weight: 700; font-size: 13px;
  }

  .p-tabbar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: end;
    height: calc(var(--tabbar-height) + env(safe-area-inset-bottom));
    padding: 0 4px env(safe-area-inset-bottom);
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .p-tab {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
    height: var(--tabbar-height); border: 0; background: none;
    color: var(--text-muted); font-size: 11px; font-weight: 600; text-decoration: none;
  }
  .p-tab.active { color: var(--accent-text); }
  .p-tab.active .ui-icon { color: var(--accent); }
  .p-tab--add span {
    width: 48px; height: 48px; border-radius: 999px; margin-top: -18px;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent); color: #fff; box-shadow: 0 6px 16px rgba(232, 105, 42, 0.35);
  }

  .p-title { font-size: 24px; }
  .p-page-head { margin-bottom: 16px; }
  .p-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 16px; }
  .p-kpi { padding: 12px 14px; border-radius: var(--radius-md); }
  .p-kpi span { font-size: 12.5px; }
  .p-kpi strong { font-size: 22px; }
  .p-card { padding: 16px; border-radius: var(--radius-md); }
  .p-toolbar { flex-direction: column; align-items: stretch; }
  .p-week { justify-content: space-between; }
  #weekLabel { flex: 1; text-align: center; font-size: 13.5px; }
  .p-chips .p-chip { flex: 1; }

  /* Kaartjes */
  .p-card--flush { padding: 0; background: transparent; border: 0; box-shadow: none; overflow: visible; }
  .reg-head { display: none; }
  .reg-list { gap: 8px; }
  .reg-row, .reg-list--grouped .reg-row, .reg-list--compact .reg-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas: "kind main amount" "kind main status";
    row-gap: 4px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  }
  .reg-head + .reg-row, .reg-day + .reg-row, .reg-list--compact .reg-row:first-child { border-top: 1px solid var(--border); }
  .reg-row--rejected { border-color: #f0c1a8; background: #fff8f4; }
  .reg-kind { grid-area: kind; align-self: start; }
  .reg-date { display: none; }
  .reg-main { grid-area: main; }
  .reg-main strong, .reg-main small { white-space: normal; }
  .reg-amount { grid-area: amount; }
  .reg-status { grid-area: status; justify-self: end; }
  .reg-list--compact .reg-status { display: block; }
  .reg-action { display: none; }
  .reg-day { background: transparent; border: 0; padding: 12px 2px 0; }
  .reg-list--compact { margin: 0; gap: 8px; }

  /* Materiaalstromen en projecten: kaartjes, zelfde recept als de registratieregels */
  .flow-head { display: none; }
  .flow-list { gap: 8px; }
  .flow-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    grid-template-areas: "icon main trips" "icon pills pills";
    row-gap: 6px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface);
  }
  .flow-head + .flow-row { border-top: 1px solid var(--border); }
  .flow-icon { grid-area: icon; align-self: start; }
  .flow-main { grid-area: main; }
  .flow-main strong, .flow-main small { white-space: normal; }
  .flow-pills { grid-area: pills; }
  .flow-trips { grid-area: trips; }
  .flow-action { display: none; }

  /* Tabel materiaal maal richting wordt per materiaal een kaartje */
  .flow-table, .flow-table tbody, .flow-table tr, .flow-table td, .flow-table th { display: block; }
  .flow-table thead { display: none; }
  .flow-table tr { border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; margin-bottom: 8px; }
  .flow-table tbody th { border: 0; padding: 0 0 6px; }
  .flow-table td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 4px 0; font-size: 13.5px; }
  .flow-table td::before { content: attr(data-label); color: var(--text-muted); }
  .flow-table td.flow-trips { text-align: right; }

  .p-toolbar .p-search { max-width: none; }
  .p-form-grid { grid-template-columns: 1fr; }
  .p-dialog { margin: auto 0 0; width: 100%; max-width: none; border-radius: 18px 18px 0 0; padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .p-dialog-actions { flex-direction: column-reverse; }
  .p-dialog-actions .p-btn { width: 100%; }

  /* Formulier op volledig scherm */
  .p-panel { width: 100%; border: 0; box-shadow: none; padding: calc(16px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom)); z-index: 60; }
  body.panel-open::after { display: none; }
  body.panel-open { overflow: hidden; }

  .p-sheet { margin: auto 0 0; width: 100%; max-width: none; border-radius: 18px 18px 0 0; padding-bottom: calc(18px + env(safe-area-inset-bottom)); }
}
