/* ==========================================================================
   Product & water (js/productkennis.js): kaart op de toestelpagina en het
   venster "Wat is normaal voor dit product?". Alles onder .pk, kleuren uit de
   tokens van ui.css. Geen gekleurde rand: urgentie = pil + tekst.
   ========================================================================== */
.pk.pk-kaart { min-width: 0; margin: 0; border: 1px solid var(--alp-outline); border-radius: var(--alp-radius-md); background: var(--alp-surface); box-shadow: var(--alp-shadow-sm); overflow: hidden; }
.pk .pk-kop { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; }
.pk .pk-kop h3 { margin: 0; color: var(--alp-text-primary); font-size: 1rem; font-weight: 600; }
.pk .pk-kop p { margin: 4px 0 0; color: var(--alp-text-secondary); font-size: 0.875rem; line-height: 1.4; }
.pk .pk-inhoud { display: flex; flex-direction: column; gap: 12px; padding: 0 24px 22px; }
.pk .pk-zacht, .pk-form .pk-zacht { margin: 0; color: var(--alp-text-secondary); font-size: 0.8125rem; line-height: 1.45; }
.pk .pk-sub { margin: 6px 0 0; color: var(--alp-text-primary); font-size: 0.875rem; font-weight: 600; }
.pk .pk-tabel { width: 100%; border-collapse: collapse; font-size: 0.875rem; }
.pk .pk-tabel th { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--alp-outline); color: var(--alp-text-secondary); font-size: 0.75rem; font-weight: 500; text-align: left; }
.pk .pk-tabel td { padding: 8px 8px 8px 0; border-bottom: 1px solid color-mix(in srgb, var(--alp-outline) 60%, transparent); color: var(--alp-text-primary); font-variant-numeric: tabular-nums; vertical-align: top; }
.pk .pk-feiten td:last-child { text-align: right; }
.pk .pk-onder { display: block; color: var(--alp-text-secondary); font-size: 0.75rem; }
.pk .pk-pil { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.pk .pk-pil.is-groen { background: var(--alp-status-klaar-bg); color: var(--alp-status-klaar-tekst); }
.pk .pk-pil.is-oranje { background: var(--alp-status-aandacht-bg); color: var(--alp-status-aandacht-tekst); }
.pk .pk-pil.is-rood { background: var(--alp-status-blokkade-bg); color: var(--alp-status-blokkade-tekst); }
.pk .pk-pil.is-grijs { background: var(--alp-surface-muted); color: var(--alp-text-secondary); }
.pk .pk-ok { color: var(--alp-status-klaar-tekst); font-weight: 700; }
.pk .pk-anders { color: var(--alp-status-aandacht-tekst); font-weight: 700; }
.pk .pk-melding { padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--alp-status-aandacht-bg) 80%, transparent); }
.pk .pk-melding strong { color: var(--alp-status-aandacht-tekst); font-size: 0.9rem; }
.pk .pk-melding p { margin: 4px 0 0; color: var(--alp-text-primary); font-size: 0.85rem; line-height: 1.45; }
.pk .pk-onder-knop { display: flex; justify-content: flex-end; }
.pk .pk-knop { width: auto; min-height: 38px; margin: 0; padding: 0 14px; border: 1px solid var(--alp-outline); border-radius: var(--alp-radius-sm); background: var(--alp-surface); box-shadow: none; color: var(--alp-text-primary); font: inherit; font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.pk .pk-knop:hover { background: var(--alp-surface-muted); }
.pk-link { display: block; width: auto; min-height: 0; margin: 2px 0 0; padding: 0; border: 0; background: none; box-shadow: none; color: var(--alp-brand-primary); font: inherit; font-size: 0.8125rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
/* Venster product */
.pk-product { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pk .pk-tegels { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.pk .pk-tegel { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 10px; background: var(--alp-surface-muted); }
.pk .pk-tegel span { color: var(--alp-text-secondary); font-size: 0.75rem; }
.pk .pk-tegel strong { color: var(--alp-text-primary); font-size: 1.2rem; font-variant-numeric: tabular-nums; }
.pk .pk-tegel em { color: var(--alp-text-secondary); font-size: 0.72rem; font-style: normal; }
.pk .pk-hist { margin: 0; }
.pk .pk-hist figcaption { margin-bottom: 6px; color: var(--alp-text-secondary); font-size: 0.75rem; }
.pk .pk-hist-vlak { display: flex; align-items: flex-end; gap: 6px; height: 120px; border-bottom: 1px solid var(--alp-outline); padding-bottom: 20px; position: relative; }
.pk .pk-hist-kol { position: relative; flex: 1; max-width: 56px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; }
.pk .pk-hist-staaf { width: 100%; border-radius: 4px 4px 0 0; background: color-mix(in srgb, var(--alp-brand-primary) 40%, var(--alp-surface)); }
.pk .pk-hist-kol.is-meest .pk-hist-staaf { background: var(--alp-brand-primary); }
.pk .pk-hist-n { font-size: 0.72rem; font-weight: 600; color: var(--alp-text-primary); margin-bottom: 2px; }
.pk .pk-hist-v { position: absolute; bottom: -20px; font-size: 0.7rem; color: var(--alp-text-secondary); white-space: nowrap; }
.pk-form { display: flex; flex-direction: column; gap: 8px; }
.pk-form .pk-rij { display: flex; gap: 8px; }
.pk-form .pk-rij input { flex: 1; }
.pk-form .pk-rij select { width: auto; }
.pk-form .pk-keuze { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 6px 0 0; padding: 0; border: 0; }
.pk-form .pk-keuze legend { width: 100%; margin-bottom: 4px; font-weight: 600; font-size: 0.875rem; }
.pk-form .pk-keuze label { display: inline-flex; align-items: center; gap: 6px; font-weight: 400; }
.pk-form .pk-keuze input { width: auto; margin: 0; }
@media (max-width: 700px) {
    .pk .pk-kop { flex-direction: column; gap: 8px; padding: 16px 16px 12px; }
    .pk .pk-inhoud { padding: 0 16px 16px; }
    .pk .pk-tabel { font-size: 0.8125rem; }
}
/* Eigen venster (<dialog>) */
.pk-dlg { width: min(680px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); margin: auto; padding: 0; border: 1px solid var(--alp-outline); border-radius: var(--alp-radius-md); background: var(--alp-surface); color: var(--alp-text-primary); box-shadow: var(--alp-shadow-lg, 0 20px 50px rgba(0, 0, 0, .25)); overflow: hidden; }
.pk-dlg[open] { display: flex; flex-direction: column; }
.pk-dlg::backdrop { background: rgba(15, 23, 42, .45); }
.pk-dlg .pk-dlg-kop { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 10px; }
.pk-dlg .pk-dlg-kop h2 { margin: 0; font-size: 1.1rem; font-weight: 600; color: var(--alp-text-primary); }
.pk-dlg .pk-dlg-x { width: 34px; min-height: 34px; margin: 0; padding: 0; border: 0; border-radius: 999px; background: transparent; box-shadow: none; color: var(--alp-text-secondary); font-size: 1rem; cursor: pointer; }
.pk-dlg .pk-dlg-x:hover { background: var(--alp-surface-muted); }
.pk-dlg .pk-dlg-inhoud { padding: 4px 22px 16px; overflow-y: auto; }
.pk-dlg .pk-dlg-voet { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 22px 18px; border-top: 1px solid var(--alp-outline); }
.pk .pk-knop.is-hoofd { border-color: var(--alp-brand-primary); background: var(--alp-brand-primary); color: #fff; }
.pk .pk-knop.is-hoofd:hover { background: color-mix(in srgb, var(--alp-brand-primary) 85%, #000); }
.pk-form input[type=text], .pk-form select { min-height: 40px; }
@media (max-width: 700px) {
    .pk-dlg .pk-dlg-kop { padding: 14px 16px 8px; }
    .pk-dlg .pk-dlg-inhoud { padding: 4px 16px 12px; }
    .pk-dlg .pk-dlg-voet { padding: 10px 16px 14px; }
}
.pk .pk-vergelijk th:nth-child(2), .pk .pk-vergelijk th:nth-child(3), .pk .pk-vergelijk td:nth-child(2), .pk .pk-vergelijk td:nth-child(3) { width: 22%; }
.pk .pk-vergelijk td:last-child { text-align: right; }
.pk .pk-vergelijk thead th { background: none; text-transform: none; letter-spacing: 0; }
.pk-form .pk-rij input { width: auto; min-width: 0; margin: 0; }
.pk-form .pk-rij select { flex: 0 0 auto; width: auto; min-width: 112px; margin: 0; }
.pk-dlg::backdrop { background: rgba(0, 0, 0, .55); }
/* style.css geeft elke th een vlak en hoofdletters (!important): hier niet */
.pk table.pk-tabel th { background: none !important; color: var(--alp-text-secondary) !important; font-size: 0.75rem !important; font-weight: 500 !important; text-transform: none; letter-spacing: 0; padding: 6px 8px 6px 0 !important; vertical-align: bottom; }
.pk .pk-afw-pil { display: block; margin-top: 4px; }
.pk .pk-afw-pil .pk-pil { white-space: normal; }
.pk .pk-afw-pil .pk-pil { border-radius: 10px; }
/* Leren per product: eigen band (js/productkennis.js) en titratie (js/titratie.js) */
.pk .pk-band { position: relative; height: 30px; margin-top: 4px; border-radius: 8px; background: var(--alp-surface-muted); }
.pk .pk-band-zone { position: absolute; top: 0; bottom: 0; border-radius: 8px; background: color-mix(in srgb, var(--alp-brand-primary) 28%, var(--alp-surface)); }
.pk .pk-band-oud { position: absolute; top: 0; bottom: 0; border: 2px dashed color-mix(in srgb, var(--alp-text-secondary) 55%, transparent); border-radius: 8px; }
.pk .pk-band-midden { position: absolute; top: 7px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--alp-brand-primary); }
.pk .pk-band-as { display: flex; justify-content: space-between; color: var(--alp-text-secondary); font-size: 0.72rem; }
.pk .pk-lessen td:nth-child(2) { width: 18%; }
.tt-product { display: flex; flex-direction: column; gap: 10px; margin-top: 6px; padding-top: 12px; border-top: 1px solid var(--alp-outline); }
.pk .tt-scroll, .pk-dlg .tt-scroll { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.pk .tt-tabel td, .pk .tt-tabel th { text-align: center; white-space: nowrap; }
.pk .tt-logboek { min-width: 640px; }
.pk .tt-logboek .pk-pil { margin-bottom: 2px; }
.tt-form textarea { width: 100%; min-height: 96px; font: inherit; font-variant-numeric: tabular-nums; }
.tt-form .tt-upload { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.tt-form .tt-bestand { display: inline-flex; align-items: center; }
.tt-form .tt-stap { display: flex; gap: 8px; align-items: center; }
.tt-form .tt-stap input { flex: 0 0 96px; width: 96px; min-height: 44px; text-align: center; font-size: 1.25rem; font-weight: 600; margin: 0; }
.tt-form .tt-stap .pk-knop { min-width: 44px; min-height: 44px; font-size: 1.2rem; }
.tt-form .tt-uitkomst { display: flex; align-items: center; gap: 8px; min-height: 26px; margin: 0; font-size: 1.05rem; }
.tt-form .tt-veld { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tt-form .tt-veld input { width: 100%; margin: 0; }
