/* PolisPulse — gedeelde opmaak voor alle schermen.
   Kleuren, maten en onderdelen volgen design/DESIGN.md. Afwijking: de site
   werkt ook op een telefoon (zie BOUWBESLUITEN.md); de regels daarvoor staan
   onderaan. */

:root {
  --indigo: #5347ce;
  --indigo-hover: #463bbd;
  --lavender: #887cfd;
  --blue: #4896fe;
  --teal: #16c8c7;
  --text: #1b1d29;
  --text-soft: #6b7280;
  --text-muted: #9aa0ab;
  --line: #eceef2;
  --line-input: #e3e5ea;
  --rand-paars: #cdc6fb;   /* invoervelden en keuzelijsten (eigenaar, 11-10-2026) */
  --bg: #f5f6f8;
  --surface: #ffffff;
  --table-head: #f8f9fb;
  --pagina-x: 28px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 13px/1.45 -apple-system, "SF Pro Display", "SF Pro Text", system-ui, "Segoe UI", sans-serif;
}
a { color: var(--indigo); }
a:hover { color: #3f34b0; }
button { font-family: inherit; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.verborgen { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- bovenbalk ---------- */
.bovenbalk { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.bovenbalk .rij { min-height: 60px; padding: 0 var(--pagina-x); display: flex; align-items: center; gap: 8px 32px; flex-wrap: wrap; }
.logo-blok { display: flex; align-items: center; gap: 9px; text-decoration: none; }
.logo-blok span { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; color: var(--indigo); }
.tnav { display: flex; gap: 4px; }
.tnav a { display: flex; align-items: center; gap: 8px; padding: 0 12px; height: 60px; color: var(--text-soft); text-decoration: none; font-weight: 500; font-size: 13.5px; border-bottom: 2px solid transparent; }
.tnav a:hover { color: var(--text); }
.tnav a.aan { color: var(--indigo); border-bottom-color: var(--indigo); font-weight: 600; }
.tnav a:focus-visible { outline: 2px solid var(--indigo); outline-offset: -4px; }
.balk-rechts { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.balk-rechts .pill { height: 26px; padding: 0 10px; }

.paneelbalk { display: flex; align-items: center; gap: 2px; padding: 0 22px; border-top: 1px solid #f1f2f5; min-height: 42px; overflow-x: auto; scrollbar-width: none; }
.paneelbalk::-webkit-scrollbar { display: none; }
.paneelbalk a { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border-radius: 7px; color: #4b5160; text-decoration: none; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.paneelbalk a:hover { background: var(--bg); color: var(--text); }
section[id] { scroll-margin-top: 120px; }

/* ---------- pagina ---------- */
main { padding: 24px var(--pagina-x) 36px; display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.titelregel { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.titelregel h1 { margin: 0; font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.titelregel .rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- kaarten ---------- */
.kaart { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; min-width: 0; }
.kaartkop { display: flex; align-items: center; gap: 9px; padding: 16px 18px 12px; flex-wrap: wrap; }
.ic { width: 28px; height: 28px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; color: #4b5160; flex: none; }
.ct { font-size: 13.5px; font-weight: 500; color: var(--text); }
.ps { color: #7b8190; font-size: 12px; }
.lbl { font-size: 12px; color: var(--text-soft); }

.kerncijfers { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); gap: 16px; }
.kerncijfer { padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; }
.kerncijfer .kop { display: flex; align-items: center; gap: 9px; }
.kerncijfer .waarde { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 30px; }
/* Elk kerncijfer een eigen accent (eigenaar, 11-10-2026): gekleurde streep
   bovenaan, zachte tint naar wit en het icoon in een gevuld vlakje. Zelfde
   volgorde op zoeken en statistieken: indigo, teal, roze, blauw. */
.kerncijfer { --acc: var(--indigo); --tint: #efedff; --rand: #dedaff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--tint) 0%, var(--surface) 62%); border-color: var(--rand);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04); }
.kerncijfer::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--acc); }
.kerncijfer .ic { background: var(--acc); border-color: var(--acc); color: #fff; box-shadow: 0 2px 6px -2px var(--acc); }
.kerncijfer .ct { font-weight: 600; }
.kerncijfers > .kerncijfer:nth-child(2) { --acc: var(--teal); --tint: #e3f8f7; --rand: #c5efed; }
.kerncijfers > .kerncijfer:nth-child(3) { --acc: #e8546b; --tint: #fdecef; --rand: #f9d4da; }
.kerncijfers > .kerncijfer:nth-child(4) { --acc: var(--blue); --tint: #e7f1ff; --rand: #cfe3ff; }
.kv { font-size: 26px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.kv small { font-size: 16px; color: var(--text-muted); font-weight: 500; }

/* ---------- invoer en knoppen ---------- */
.inp { height: 38px; border: 1px solid var(--rand-paars); border-radius: 8px; background: #fcfbff; box-shadow: 0 1px 2px rgba(83, 71, 206, .06); padding: 0 11px; font: inherit; font-size: 13px; color: var(--text); width: 100%; }
.inp:hover { border-color: var(--lavender); }
.inp:focus { outline: 3px solid #e4e1ff; border-color: var(--indigo); background: #fff; }
.btn { height: 38px; padding: 0 18px; border-radius: 8px; border: 0; background: var(--indigo); color: #fff; font: 600 13px -apple-system, system-ui, "Segoe UI", sans-serif; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap; box-shadow: 0 1px 2px rgba(83,71,206,.3); }
.btn:hover { background: var(--indigo-hover); }
.btn[disabled] { background: #e6e8ed; color: var(--text-muted); box-shadow: none; cursor: not-allowed; }
.ob { height: 34px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-input); background: #fff; color: #374151; font: 500 12.5px -apple-system, system-ui, "Segoe UI", sans-serif; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; text-decoration: none; }
.ob:hover { border-color: #c9ccd5; color: var(--text); }
.ob[disabled] { cursor: progress; color: var(--text-muted); }
.btn:focus-visible, .ob:focus-visible, .seg button:focus-visible, .sub button:focus-visible, .chip:focus-visible, .meer:focus-visible { outline: 2px solid var(--indigo); outline-offset: 1px; }

.seg { display: inline-flex; background: #f6f4ff; border: 1px solid var(--rand-paars); border-radius: 9px; padding: 3px; gap: 2px; flex-wrap: wrap; box-shadow: 0 1px 2px rgba(83, 71, 206, .06); }
.seg button { all: unset; box-sizing: border-box; height: 28px; padding: 0 11px; border-radius: 6px; font-size: 12.5px; color: var(--text-soft); cursor: pointer; display: flex; align-items: center; white-space: nowrap; }
.seg button:hover { color: var(--indigo); }
.seg button.aan { background: #fff; color: #4338b8; font-weight: 600; box-shadow: 0 1px 2px rgba(83,71,206,.15), 0 0 0 1px var(--rand-paars); }

.sub { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.sub button { all: unset; box-sizing: border-box; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--rand-paars); font-size: 12.5px; color: #4b5160; cursor: pointer; display: flex; align-items: center; white-space: nowrap; background: #fcfbff; }
.sub button:hover { border-color: var(--lavender); color: var(--indigo); }
.sub button.aan { background: #e9e5ff; border-color: var(--indigo); color: #4338b8; font-weight: 600; }
.sub button[disabled] { opacity: .45; cursor: default; }

.chip { all: unset; box-sizing: border-box; height: 30px; padding: 0 11px; border-radius: 8px; border: 1px solid var(--rand-paars); font-size: 12.5px; color: #4b5160; cursor: pointer; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; background: #fff; }
.chip:hover { border-color: var(--lavender); color: var(--indigo); }
.chip.aan { background: var(--indigo); border-color: var(--indigo); color: #fff; }
.chip .n { font-size: 11px; opacity: .7; }
.sel { height: 30px; border: 1px solid var(--rand-paars); border-radius: 8px; background: #fcfbff; font: inherit; font-size: 12.5px; padding: 0 8px; color: var(--text); max-width: 100%; }
.meer { all: unset; cursor: pointer; color: var(--indigo); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.meer:hover { text-decoration: underline; }

/* ---------- labels ---------- */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 7px; border-radius: 6px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.p-teal { background: #e6f8f7; color: #0b7f7e; border-color: #c5efed; }
.p-rose { background: #fdeef0; color: #c2364a; border-color: #f9d4da; }
.p-lav { background: #efedff; color: #4338b8; border-color: #dedaff; }
.p-grey { background: #f3f4f7; color: var(--text-soft); border-color: #e6e8ed; }
.p-ind { background: var(--indigo); color: #fff; }

/* ---------- meldingen ---------- */
.melding { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: 13px; border: 1px solid transparent; }
.melding svg { flex: none; margin-top: 1px; }
.m-fout { background: #fdeef0; color: #b02e42; border-color: #f9d4da; }
.m-info { background: #efedff; color: #4338b8; border-color: #dedaff; }
.m-slot { background: #f3f4f7; color: #374151; border-color: #e6e8ed; }

/* ---------- laden ---------- */
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pp-spin .7s linear infinite; display: inline-block; flex: none; }
@keyframes pp-spin { to { transform: rotate(360deg); } }
@keyframes pp-bar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- tabellen ---------- */
.tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.tbl th { font-size: 10.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #7b8190; text-align: right; padding: 9px 10px; background: var(--table-head); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:first-child { text-align: left; border-radius: 8px 0 0 8px; }
.tbl th:last-child { border-radius: 0 8px 8px 0; }
.tbl td { padding: 0 10px; height: 36px; border-bottom: 1px solid #f1f2f5; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl td:first-child { text-align: left; }
.tbl tr.dim td { color: #a3a8b3; }
.tbl .links { text-align: left !important; }
.tbl-rol { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.sw { display: inline-block; width: 8px; height: 8px; border-radius: 2px; vertical-align: 1px; margin-right: 8px; flex: none; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; min-width: 0; }

.leeg-vak { padding: 36px 18px; text-align: center; color: #7b8190; display: flex; flex-direction: column; gap: 6px; align-items: center; }
.leeg-vak b { color: var(--text); font-weight: 600; }

/* ---------- arcering: niet gemeten ---------- */
.hatch { background: repeating-linear-gradient(135deg, #e6e8ed 0 1.5px, transparent 1.5px 6px); }

/* ======================================================================
   Telefoon en smal scherm
   ====================================================================== */
@media (max-width: 900px) {
  :root { --pagina-x: 18px; }
  .bovenbalk .rij { gap: 6px 18px; }
  .balk-rechts .fase { display: none; }
}

@media (max-width: 640px) {
  :root { --pagina-x: 14px; }
  body { font-size: 13.5px; }
  .bovenbalk .rij { min-height: 52px; gap: 0 10px; flex-wrap: nowrap; }
  .logo-blok span { font-size: 17px; }
  .tnav { gap: 0; }
  .tnav a { height: 52px; padding: 0 8px; font-size: 13px; }
  .tnav a svg { display: none; }
  .balk-rechts { gap: 6px; }
  .balk-rechts .jaar { display: none; }
  .balk-rechts .ob .tekst { display: none; }
  .balk-rechts .ob { padding: 0 9px; }
  .paneelbalk { padding: 0 8px; }
  main { padding: 16px var(--pagina-x) 28px; gap: 12px; }
  .titelregel h1 { font-size: 20px; }
  .kerncijfers { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kerncijfer { padding: 12px 13px; gap: 6px; }
  .kv { font-size: 22px; }
  .kaartkop { padding: 14px 14px 10px; }
  .inp, .sel { font-size: 16px; }   /* anders zoomt iOS in bij aantikken */
  section[id] { scroll-margin-top: 104px; }
}
