/* ======================================================================
   't Dorpshuys — DEFINITIEVE STIJL v1.0 — 27 oktober 2026
   Buurtwinkel · Beleidsmap · Genogram · medewerkersportaal
   Gebruik: <body class="dh dh-app">. Laad deze CSS lokaal.
   Alle componenten vallen binnen .dh; geen externe verzoeken.
   Zie STIJLGIDS.html voor afspraken, gebruik en overdracht.
   ====================================================================== */
.dh {
  --dh-blue: #193e5b;
  --dh-blue-hover: #12304a;
  --dh-blue-soft: #eaf1f6;
  --dh-support: #4e6072;
  --dh-support-bg: #f0f3f7;
  --dh-support-border: #ced8e2;
  --dh-white: #ffffff;
  --dh-text: #263440;
  --dh-muted: #52616d;
  --dh-border: #bdcad5;
  --dh-error: #a32938;
  --dh-error-bg: #fff3f4;
  --dh-success: #246040;
  --dh-success-bg: #edf7f0;
  --dh-card-radius: 10px;
  --dh-control-radius: 6px;
  --dh-shadow: 0 4px 14px rgb(35 75 104 / 11%);
  --dh-space-1: 4px;
  --dh-space-2: 8px;
  --dh-space-3: 12px;
  --dh-space-4: 16px;
  --dh-space-6: 24px;
  --dh-space-8: 32px;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--dh-text);
  background: var(--dh-white);
  color-scheme: light;
}
.dh *, .dh *::before, .dh *::after { box-sizing: border-box; }
.dh [hidden] { display: none !important; }
.dh h1, .dh h2, .dh h3 { color: var(--dh-blue); line-height: 1.3; margin: 0 0 12px; overflow-wrap: anywhere; }
.dh h1 { font-size: 1.95em; line-height: 1.2; letter-spacing: -.7px; }
.dh h2 { font-size: 1.4em; }
.dh h3 { font-size: 1.24em; letter-spacing: -.3px; }
.dh p { margin: 0 0 20px; }
.dh a { color: var(--dh-blue); text-underline-offset: 3px; }
.dh :where(button, a, input, select, textarea, summary):focus-visible { outline: 3px solid var(--dh-blue); outline-offset: 3px; }
.dh .dh-header { padding: 20px 24px; border-top: 5px solid var(--dh-blue); border-bottom: 1px solid var(--dh-border); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dh .dh-brand { font-size: 1.35em; letter-spacing: -.4px; font-weight: 700; color: var(--dh-blue); }
.dh .dh-subtitle, .dh .dh-help { font-size: .88em; color: var(--dh-muted); }
.dh .dh-main { max-width: 1200px; margin-inline: auto; padding: 28px 24px; }
.dh .dh-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 24px; }
.dh .dh-card { padding: 24px; background: var(--dh-white); border: 1px solid #c4d1db; border-radius: var(--dh-card-radius); box-shadow: var(--dh-shadow); min-width: 0; }
.dh .dh-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dh .dh-button { font: inherit; font-size: .94em; font-weight: 600; line-height: 1.4; min-height: 44px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--dh-blue); border-radius: var(--dh-control-radius); background: var(--dh-blue); color: var(--dh-white); text-decoration: none; cursor: pointer; max-width: 100%; overflow-wrap: anywhere; }
.dh .dh-button:hover { background: var(--dh-blue-hover); }
.dh .dh-button-secondary { background: var(--dh-white); color: var(--dh-blue); border-width: 2px; padding: 10px 15px; }
.dh .dh-button-secondary:hover { background: var(--dh-blue-soft); }
.dh .dh-button-danger { background: var(--dh-error); border-color: var(--dh-error); }
.dh .dh-button-danger:hover { background: #87202d; }
.dh .dh-button:disabled { background: #e5eaee; border-color: #c7d1d9; color: #53616d; cursor: not-allowed; }
.dh .dh-icon { width: 20px; height: 20px; flex: 0 0 20px; color: currentColor; }
.dh .dh-field { margin-bottom: 24px; }
.dh .dh-label { display: block; font-weight: 600; margin-bottom: 8px; }
.dh :where(.dh-input, .dh-select, .dh-textarea) { width: 100%; min-height: 48px; font: inherit; padding: 10px 12px; background: var(--dh-white); color: var(--dh-text); border: 1px solid var(--dh-border); border-radius: var(--dh-control-radius); }
.dh .dh-textarea { min-height: 120px; resize: vertical; }
.dh .dh-input::placeholder { color: var(--dh-muted); }
.dh [aria-invalid="true"] { border: 2px solid var(--dh-error); }
.dh .dh-error { color: var(--dh-error); font-size: .94em; margin-top: 8px; }
.dh .dh-help { margin-top: 8px; }
.dh .dh-info { display: inline-flex; justify-content: center; align-items: center; min-width: 44px; min-height: 44px; border: 0; border-radius: 6px; color: var(--dh-blue); background: transparent; font: inherit; cursor: pointer; }
.dh .dh-info:hover { background: var(--dh-blue-soft); }
.dh .dh-notice { border-left: 4px solid var(--dh-support); background: var(--dh-support-bg); color: var(--dh-support); padding: 16px; border-radius: 6px; }
.dh .dh-notice-success { border-color: var(--dh-success); background: var(--dh-success-bg); color: var(--dh-success); }
.dh .dh-notice-error { border-color: var(--dh-error); background: var(--dh-error-bg); color: var(--dh-error); }
.dh .dh-nav { background: var(--dh-white); border-top: 1px solid var(--dh-border); display: flex; gap: 4px; justify-content: center; padding: 8px; }
.dh .dh-nav-item { font: inherit; font-size: .82em; color: var(--dh-blue); text-decoration: none; border: 0; background: transparent; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 54px; flex: 1 1 0; max-width: 160px; padding: 8px 4px; text-align: center; overflow-wrap: anywhere; cursor: pointer; }
.dh .dh-nav-item[aria-current="page"], .dh .dh-nav-item[aria-pressed="true"] { background: var(--dh-blue-soft); font-weight: 700; }
.dh .dh-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 24px; }
.dh .dh-canvas { background: var(--dh-white); border: 1px solid var(--dh-border); border-radius: 10px; padding: 16px; min-width: 0; }
.dh .dh-table { width: 100%; border-collapse: collapse; }
.dh .dh-table th, .dh .dh-table td { text-align: left; vertical-align: top; border-bottom: 1px solid var(--dh-border); padding: 12px; }
.dh .dh-table th { color: var(--dh-blue); }
.dh .dh-sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 640px) {
  .dh .dh-header { padding: 16px; }
  .dh .dh-main { padding: 24px 16px; }
  .dh .dh-grid { grid-template-columns: 1fr; gap: 20px; }
  .dh .dh-card { padding: 20px; }
  .dh.dh-app { padding-bottom: calc(86px + env(safe-area-inset-bottom, 0px)); }
  .dh.dh-app .dh-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 100; padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)); }
}
@media (prefers-reduced-motion: reduce) { .dh *, .dh *::before, .dh *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
@media print { .dh .dh-nav, .dh .dh-toolbar, .dh .dh-info { display: none; } .dh.dh-app { padding-bottom: 0; } .dh .dh-card { box-shadow: none; break-inside: avoid; } }

/* Gekozen krachtige kopbalk, gecombineerd met ruimere koppen. */
.dh .dh-header { background: var(--dh-blue); border-color: var(--dh-blue); color: var(--dh-white); }
.dh .dh-header .dh-brand { color: var(--dh-white); }
.dh .dh-header .dh-subtitle { color: #e0e9f0; }
@media print { .dh .dh-header { background: #fff; color: #263440; border-color: #bdcad5; } .dh .dh-header .dh-brand { color: #193e5b; } .dh .dh-header .dh-subtitle { color: #52616d; } }

/* Lucide: stevig lijnwerk. Grotere pictogrammen voor de appkeuze. */
.dh .dh-icon { stroke-width: 2.5; }
.dh .dh-app-icon { width: 84px; height: 84px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; border-radius: 17px; background: var(--dh-blue); color: var(--dh-white); }
.dh .dh-app-icon svg { width: 61.37px !important; height: 61.37px !important; max-width: none !important; max-height: none !important; flex: none; stroke-width: 2.5; }
@media (max-width: 640px) { .dh .dh-app-icon { width: 64px; height: 64px; border-radius: 14px; } .dh .dh-app-icon svg { width: 46.835px !important; height: 46.835px !important; } }

/* ======================================================================
   AANVULLENDE COMPONENTEN EN DEFINITIEVE TOEPASSINGSREGELS
   De hieronder benoemde varianten bouwen voort op de basis hierboven.
   ====================================================================== */

/* 01 — Aanvullende tokens en basis. */
.dh {
  --dh-input-border: #8194a3;
  --dh-card-border: #c4d1db;
  --dh-header-muted: #e0e9f0;
  --dh-disabled-bg: #e5eaee;
  --dh-disabled-text: #53616d;
  --dh-content-width: 1200px;
  --dh-nav-reserve: 100px;
  --dh-icon-stroke: 2.5;
  --dh-space-5: 20px;
  --dh-space-7: 28px;
  -webkit-text-size-adjust: 100%;
}
body.dh { margin: 0; }
.dh img { max-width: 100%; height: auto; }
.dh h4 { color: var(--dh-blue); font-size: 1em; margin: 0 0 12px; }
.dh ul, .dh ol { padding-inline-start: 24px; margin: 0 0 20px; }
.dh li + li { margin-top: 6px; }
.dh a:hover { text-decoration-thickness: 2px; }
.dh .dh-lead { font-size: 1em; line-height: 1.6; max-width: 65ch; }
.dh .dh-muted { color: var(--dh-muted); }
.dh .dh-small { font-size: .88em; }
.dh .dh-prose { max-width: 70ch; }
.dh .dh-number { font-variant-numeric: tabular-nums; }
.dh .dh-main { max-width: var(--dh-content-width); min-width: 0; }
.dh .dh-section + .dh-section { margin-top: 32px; }
.dh .dh-stack > * + * { margin-top: 24px; }
.dh .dh-card > :last-child { margin-bottom: 0; }
.dh hr { margin: 24px 0; border: 0; border-top: 1px solid var(--dh-border); }

/* 02 — Focus en contrast. Witte focusring binnen de blauwe kopbalk. */
.dh :where(button, a, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 3px solid var(--dh-blue); outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--dh-white);
}
.dh .dh-header :focus-visible { outline-color: var(--dh-white); box-shadow: 0 0 0 2px var(--dh-blue); }
.dh .dh-header a { color: var(--dh-white); }
.dh .dh-brand { line-height: 1.3; }
.dh .dh-skip-link { position: absolute; top: 8px; left: 8px; z-index: 400; transform: translateY(-180%); }
.dh .dh-skip-link:focus { transform: translateY(0); }

/* 03 — Kaarten waarmee een app wordt geopend.
   Alleen het pictogram heeft een blauw vlak; de kaart zelf blijft wit. */
.dh .dh-app-card { display: flex; flex-direction: column; align-items: center; gap: 16px; text-align: center; text-decoration: none; }
.dh .dh-app-card:hover { border-color: var(--dh-blue); }
.dh .dh-app-card:active { background: var(--dh-support-bg); }
.dh .dh-app-card h2, .dh .dh-app-card h3 { margin: 0; }
.dh .dh-app-icon svg { display: block; stroke-width: var(--dh-icon-stroke); }
.dh .dh-icon { display: inline-block; vertical-align: middle; stroke-width: var(--dh-icon-stroke); }

/* 04 — Knopvarianten en toestanden.
   aria-disabled vraagt ook gedragsmatige blokkering in de applicatie. */
.dh .dh-button { font-weight: 700; }
.dh .dh-button:hover { text-decoration: none; }
.dh .dh-button:active { background: var(--dh-blue-hover); }
.dh .dh-button-secondary:active { background: var(--dh-blue-soft); }
.dh .dh-button-quiet { background: transparent; color: var(--dh-blue); border-color: transparent; }
.dh .dh-button-quiet:hover { background: var(--dh-blue-soft); }
.dh .dh-button[aria-disabled="true"] { background: var(--dh-disabled-bg); border-color: var(--dh-border); color: var(--dh-disabled-text); cursor: not-allowed; }
.dh .dh-button-block { width: 100%; }
.dh .dh-button-icon { min-width: 44px; padding: 10px; }

/* 05 — Formulieren. Altijd zichtbare labels; hulp onder het veld.
   De veldrand is sterker dan een decoratieve kaartrand. */
.dh .dh-form { max-width: 720px; }
.dh .dh-field-heading { display: flex; gap: 8px; align-items: center; }
.dh .dh-field-heading .dh-label { margin: 0; }
.dh :where(.dh-input, .dh-select, .dh-textarea) { border-color: var(--dh-input-border); line-height: 1.5; scroll-margin-block: 24px; }
.dh :where(.dh-input, .dh-select, .dh-textarea):hover { border-color: var(--dh-blue); }
.dh :where(.dh-input, .dh-select, .dh-textarea):disabled { background: var(--dh-disabled-bg); color: var(--dh-disabled-text); cursor: not-allowed; }
.dh :where(.dh-input, .dh-textarea)[readonly] { background: var(--dh-support-bg); }
.dh .dh-input::placeholder, .dh .dh-textarea::placeholder { color: var(--dh-muted); opacity: 1; }
.dh .dh-label { font-weight: 700; }
.dh .dh-choice { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; padding-block: 8px; cursor: pointer; }
.dh .dh-choice input { width: 20px; height: 20px; flex: 0 0 20px; margin: 4px 0 0; accent-color: var(--dh-blue); }
.dh fieldset { border: 1px solid var(--dh-input-border); border-radius: 6px; padding: 20px; margin: 0 0 24px; min-width: 0; }
.dh legend { color: var(--dh-blue); font-weight: 700; padding-inline: 6px; }
.dh .dh-details { margin-top: 8px; }
.dh .dh-details summary { color: var(--dh-blue); cursor: pointer; min-height: 44px; padding: 8px 0; }
.dh .dh-details[open] { padding-bottom: 12px; }
.dh [aria-invalid="true"], .dh [aria-invalid="true"]:hover { border: 2px solid var(--dh-error); }

/* 06 — Status en terugkoppeling. Kleur gaat altijd samen met tekst. */
.dh .dh-notice > :last-child { margin-bottom: 0; }
.dh .dh-status { display: inline-flex; align-items: center; gap: 6px; font-size: .88em; padding: 4px 8px; border-radius: 4px; background: var(--dh-support-bg); color: var(--dh-support); }
.dh .dh-status-success { color: var(--dh-success); background: var(--dh-success-bg); }
.dh .dh-status-error { color: var(--dh-error); background: var(--dh-error-bg); }
.dh .dh-empty { padding: 28px 0; max-width: 65ch; }
.dh .dh-loading { color: var(--dh-muted); }

/* 07 — Navigatie. Maximaal 3–5 korte hoofdbestemmingen op mobiel. */
.dh .dh-nav-item { line-height: 1.4; min-width: 0; }
.dh .dh-nav-item:hover { background: var(--dh-support-bg); text-decoration: none; }
.dh .dh-nav-item[aria-current="page"], .dh .dh-nav-item[aria-pressed="true"] { background: var(--dh-blue-soft); font-weight: 700; }
.dh .dh-breadcrumb { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: .88em; margin-bottom: 20px; }
.dh .dh-tabs { display: flex; flex-wrap: wrap; gap: 8px; border-bottom: 1px solid var(--dh-border); margin-bottom: 24px; }
.dh .dh-tab { font: inherit; color: var(--dh-blue); background: var(--dh-white); border: 0; border-bottom: 3px solid transparent; min-height: 44px; padding: 10px 12px; cursor: pointer; }
.dh .dh-tab[aria-selected="true"] { border-bottom-color: var(--dh-blue); background: var(--dh-blue-soft); font-weight: 700; }

/* 08 — Tabellen en bestellingen. Alleen tabellen mogen lokaal scrollen. */
.dh .dh-table-scroll { overflow-x: auto; max-width: 100%; }
.dh .dh-table caption { text-align: left; font-weight: 700; color: var(--dh-blue); padding-bottom: 12px; }
.dh .dh-table .dh-align-end { text-align: right; font-variant-numeric: tabular-nums; }
.dh .dh-list { list-style: none; padding: 0; margin: 0; }
.dh .dh-list > li { border-bottom: 1px solid var(--dh-border); padding-block: 16px; margin: 0; }
.dh .dh-order-line { display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; padding-block: 16px; border-bottom: 1px solid var(--dh-border); }
.dh .dh-quantity { display: inline-flex; align-items: center; gap: 8px; }
.dh .dh-quantity .dh-input { width: 76px; text-align: center; }

/* 09 — Genogram. Betekenisvolle symbolen/relatiekleuren blijven behouden. */
.dh .dh-workspace { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 320px); gap: 24px; }
.dh .dh-workspace > * { min-width: 0; }

/* 10 — Native dialoog. showModal()/close() zijn applicatiegedrag. */
.dh .dh-dialog { width: min(560px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow: auto; padding: 28px; border: 1px solid var(--dh-border); border-radius: 10px; background: var(--dh-white); color: var(--dh-text); font: inherit; }
.dh .dh-dialog::backdrop { background: rgb(14 31 45 / 45%); }

/* 11 — Responsief en afdruk. Reserveer voldoende ruimte voor de onderbalk. */
@media (max-width: 900px) { .dh .dh-workspace { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .dh.dh-app { padding-bottom: calc(var(--dh-nav-reserve) + env(safe-area-inset-bottom, 0px)); }
  .dh .dh-form { max-width: none; }
}
@media print {
  .dh .dh-no-print, .dh .dh-skip-link { display: none !important; }
  .dh .dh-workspace { display: block; }
  .dh .dh-main { max-width: none; padding: 16px 0; }
  .dh .dh-table-scroll { overflow: visible; }
  .dh .dh-header a { color: var(--dh-muted); }
}
