/* Portal-laag bovenop het gevendorde design system (design-system.css).
   Houd thema-instellingen hier centraal als CSS custom properties: één plek
   om kleuren/accent te wijzigen, en per module een accent via [data-module]. */
:root{
  --portal-gap: 1rem;
  --portal-radius: 14px;
  --portal-accent: #1b8a3b;            /* FC-groen (pas hier centraal aan) */
  --portal-tile-bg: rgba(255,255,255,.04);
  --portal-tile-border: rgba(255,255,255,.10);
}
body[data-module="wkpool"]   { --portal-accent: #c8102e; }
body[data-module="training"] { --portal-accent: #1b8a3b; }

.portal-wrap{ max-width: 1100px; margin: 0 auto; padding: 2rem 1.25rem; }
.portal-header{ margin-bottom: 1.5rem; }
.portal-header h1{ margin: 0 0 .25rem; }
.portal-header p{ opacity:.75; margin:0; }

.tile-grid{
  display:grid; gap: var(--portal-gap);
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}
.tile{
  display:block; padding:1.25rem 1.25rem 1.1rem; border-radius: var(--portal-radius);
  background: var(--portal-tile-bg); border:1px solid var(--portal-tile-border);
  text-decoration:none; color:inherit; transition: transform .12s ease, border-color .12s ease;
}
.tile:hover{ transform: translateY(-2px); border-color: var(--portal-accent); }
.tile .tile-icon{ font-size:1.6rem; line-height:1; margin-bottom:.5rem; }
.tile .tile-title{ font-weight:700; font-size:1.05rem; }
.tile .tile-desc{ opacity:.72; font-size:.9rem; margin-top:.25rem; }
.tile .tile-links{ margin-top:.6rem; display:flex; flex-wrap:wrap; gap:.4rem; }
.tile .tile-links a{ font-size:.8rem; padding:.15rem .5rem; border-radius:999px;
  border:1px solid var(--portal-tile-border); text-decoration:none; color:inherit; }

.empty-state{ opacity:.7; padding:2rem 0; }

/* Kruimelpad — volle-breedte balk direct onder de kop, uitgelijnd met de kop. */
.breadcrumbs{ background:var(--paper,#f6faff); border-bottom:1px solid var(--line,#cfdcef); }
.breadcrumbs-inner{
  max-width:1120px; margin:0 auto; padding:10px 24px;
  display:flex; flex-wrap:wrap; align-items:center; gap:.45rem; font-size:.85rem;
}
.breadcrumbs a{ color:var(--blue,#2f7ed8); text-decoration:none; }
.breadcrumbs a:hover{ text-decoration:underline; }
.breadcrumbs .crumb-sep{ opacity:.4; }
.breadcrumbs .crumb-current{ color:var(--muted,#5b6b85); font-weight:600; }
@media (max-width:720px){ .breadcrumbs-inner{ padding:10px 16px; } }

/* Eenvoudige beheer-tabel */
.admin-table{ width:100%; border-collapse:collapse; font-size:.92rem; }
.admin-table th, .admin-table td{ text-align:left; padding:.55rem .6rem; border-bottom:1px solid var(--portal-tile-border); }
.admin-table th{ opacity:.7; font-weight:600; }
.badge{ display:inline-block; padding:.1rem .5rem; border-radius:999px; font-size:.75rem;
  border:1px solid var(--portal-tile-border); }
.badge.on{ background: rgba(27,138,59,.18); border-color: rgba(27,138,59,.5); }
.badge.off{ opacity:.6; }
.inline-form{ display:inline; }

/* Beheer: formuliervelden, kaarten en knoppen */
.input{
  width:100%; padding:.5rem .65rem; border-radius:10px;
  border:1px solid var(--portal-tile-border); background:var(--portal-tile-bg);
  color:inherit; font:inherit;
}
.input:focus{ outline:none; border-color:var(--portal-accent); }
.admin-card{
  background:var(--portal-tile-bg); border:1px solid var(--portal-tile-border);
  border-radius:var(--portal-radius); padding:1.1rem 1.25rem;
}
.module-card{ margin-bottom:1rem; }
.module-card-head{ display:flex; justify-content:space-between; align-items:center;
  gap:1rem; margin-bottom:.85rem; flex-wrap:wrap; }
.module-card-head code{ font-size:.95rem; }
.module-card-toggles{ display:flex; align-items:center; gap:.5rem; margin-top:.35rem; flex-wrap:wrap; }
.toggle-label{ font-size:.75rem; opacity:.7; }
.module-edit-form{
  display:grid; gap:.75rem; align-items:end;
  grid-template-columns:1.3fr 1.6fr 1.6fr auto auto;
}
.module-edit-form label{ display:flex; flex-direction:column; gap:.25rem; }
.module-edit-form label small{ opacity:.7; font-size:.75rem; }
.module-edit-preview{ display:flex; flex-direction:column; gap:.25rem; }
.module-edit-preview small{ opacity:.7; font-size:.75rem; }
.icon-preview{
  width:52px; height:52px; border-radius:10px; display:grid; place-items:center;
  border:1px solid var(--portal-tile-border); background:var(--portal-tile-bg);
  font-size:1.9rem; overflow:hidden;
}
.icon-preview img{ width:100%; height:100%; object-fit:contain; }
@media (max-width:820px){
  .module-edit-form{ grid-template-columns:1fr 1fr; }
}

/* Rechten-matrix */
.matrix-actions{ display:flex; align-items:center; justify-content:space-between;
  gap:1rem; margin:.75rem 0; flex-wrap:wrap; }
.matrix-hint{ font-size:.85rem; opacity:.7; }
.matrix-scroll{ overflow-x:auto; }
.admin-table.matrix{ min-width:520px; }
.admin-table.matrix th.matrix-col, .admin-table.matrix td.matrix-col{
  text-align:center; width:8.5rem; }
.admin-table.matrix .matrix-rowhead{ text-align:left; }
.admin-table.matrix tr.matrix-module th{
  background:var(--portal-tile-bg); font-weight:700; opacity:1;
  border-top:2px solid var(--portal-accent); padding-top:.7rem;
}
.admin-table.matrix tr.matrix-module code{ opacity:.55; font-weight:400; margin-left:.35rem; }
.admin-table.matrix input[type=checkbox]{ width:18px; height:18px; accent-color:var(--portal-accent); cursor:pointer; }

/* ===================== PORTAL-CHROME (gedeeld, alle pagina's) ===================== */
/* Donkere kop (logo, zoekveld op de startpagina, account) en voet; zie base.html. */
.env-banner { background:#b04646; color:#fff; text-align:center; font-size:12.5px; font-weight:600; padding:5px 12px; letter-spacing:.04em; }
.visually-hidden { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }

.site-head { background:var(--ink); color:#fff; }
.site-head-inner { max-width:1120px; margin:0 auto; padding:14px 24px; display:flex; flex-wrap:wrap; align-items:center; gap:14px 28px; }
.site-brand { display:flex; align-items:center; gap:12px; color:#fff; }
.site-brand img { width:40px; height:40px; object-fit:contain; }
.site-brand-text { display:flex; flex-direction:column; gap:2px; }
.site-brand-name { font-family:'Bebas Neue',Impact,sans-serif; font-size:24px; line-height:1; letter-spacing:.04em; }
.site-brand-sub { font-family:'JetBrains Mono',ui-monospace,monospace; font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:#9fb3d3; }
.site-search { position:relative; flex:0 1 300px; min-width:0; order:1; margin:0; }
.site-search svg { position:absolute; left:14px; top:50%; transform:translateY(-50%); color:#9fb3d3; pointer-events:none; }
.site-search input { width:100%; height:44px; padding:0 14px 0 42px; border-radius:10px; border:1px solid rgba(255,255,255,.18);
  background:rgba(255,255,255,.08); color:#fff; font:500 14px Inter,system-ui,sans-serif; }
.site-search input::placeholder { color:#9fb3d3; }
.site-search input:focus { outline:2px solid var(--blue); outline-offset:1px; background:rgba(255,255,255,.12); }
.site-account { margin-left:auto; order:2; display:flex; align-items:center; gap:20px; font-size:14px; font-weight:500; }
.site-account a { color:#cfe1f7; }
.site-account a:hover { color:#fff; }
.site-user { display:flex; align-items:center; gap:10px; color:#fff; }
.site-avatar { width:34px; height:34px; border-radius:50%; background:var(--ink-2); border:1px solid rgba(255,255,255,.25);
  display:grid; place-items:center; font-size:13px; font-weight:600; color:#fff; flex:none; }
.site-login { display:inline-flex; align-items:center; min-height:40px; padding:0 16px; border-radius:999px;
  border:1px solid rgba(255,255,255,.3); }
.site-login:hover { border-color:#fff; }
@media (max-width:640px) {
  .site-head-inner { padding:12px 16px; }
  .site-user-name { display:none; }
  .site-account { gap:14px; }
  .site-search { order:3; flex-basis:100%; }
}

.site-foot { background:var(--ink); color:#9fb3d3; margin-top:40px; }
.site-foot-inner { max-width:1120px; margin:0 auto; padding:22px 24px; display:flex; flex-wrap:wrap; justify-content:space-between;
  gap:8px 24px; font-family:'JetBrains Mono',ui-monospace,monospace; font-size:11px; letter-spacing:.08em; text-transform:uppercase; }
@media (max-width:640px) { .site-foot-inner { padding:20px 16px; } }

/* ===================== STARTPAGINA (public/index.html, js/home.js) ===================== */
.home-inner { max-width:1120px; margin:0 auto; padding:0 24px; }
.home-hero { background:var(--paper); border-bottom:1px solid var(--line); }
.home-hero .home-inner { padding-top:44px; padding-bottom:40px; display:flex; flex-direction:column; gap:10px; }
.home-kicker { font-family:'JetBrains Mono',ui-monospace,monospace; font-size:12px; font-weight:600; letter-spacing:.14em;
  text-transform:uppercase; color:var(--blue-deep); }
.home-hero h1 { margin:0; font-family:'Bebas Neue',Impact,sans-serif; font-weight:400; font-size:clamp(44px, 8vw, 60px);
  line-height:.95; letter-spacing:.01em; color:var(--ink); }
.home-hero p { margin:4px 0 0; max-width:560px; font-size:17px; line-height:1.55; color:var(--muted); }
.home-hero p a { color:var(--blue-deep); text-decoration:underline; }
.home-main { padding-top:36px; padding-bottom:24px; display:flex; flex-direction:column; gap:44px; }
.home-section { display:flex; flex-direction:column; gap:16px; }
.home-section[hidden], .home-group[hidden], .module-row[hidden], .home-empty[hidden], .module-placeholder[hidden] { display:none; }
.home-section-head, .home-section-title { display:flex; align-items:baseline; gap:12px; }
.home-section-head-wrap { flex-wrap:wrap; align-items:center; justify-content:space-between; gap:14px; }
.home-section h2 { margin:0; font-size:18px; font-weight:600; color:var(--ink); }
.home-count { font-family:'JetBrains Mono',ui-monospace,monospace; font-size:12px; color:var(--muted); }
.home-group { display:flex; flex-direction:column; gap:10px; }
.home-group-title { margin:6px 0 0; font-family:'JetBrains Mono',ui-monospace,monospace; font-size:11px; font-weight:600;
  letter-spacing:.14em; text-transform:uppercase; color:var(--muted); }
.home-chips { display:flex; flex-wrap:wrap; gap:8px; }
.home-chip { min-height:36px; padding:0 14px; border-radius:999px; border:1px solid var(--line); background:#fff; color:var(--ink-2);
  font:600 13px Inter,system-ui,sans-serif; display:inline-flex; align-items:center; gap:6px; }
.home-chip span { opacity:.7; font-weight:500; }
.home-chip:hover { border-color:var(--blue); }
.home-chip[aria-current="true"] { background:var(--ink); border-color:var(--ink); color:#fff; }

.module-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap:12px; }
.pin-grid { display:grid; grid-template-columns:repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap:16px; }
.module-row, .pin-card { position:relative; border:1px solid var(--line); border-radius:12px;
  transition:border-color .15s ease, box-shadow .15s ease, transform .15s ease; }
.module-row:hover, .pin-card:hover { border-color:var(--blue); box-shadow:0 14px 28px -20px rgba(10,31,68,.55); transform:translateY(-1px); }
.module-row:focus-within, .pin-card:focus-within { outline:2px solid var(--blue); outline-offset:2px; }
.module-row { display:flex; align-items:center; gap:14px; padding:14px 10px 14px 16px; background:#fff; min-height:80px; }
.pin-card { display:flex; flex-direction:column; gap:14px; padding:20px; background:var(--blue-pale); min-height:172px; }
.pin-card-top { display:flex; align-items:flex-start; justify-content:space-between; }
.pin-card-top .pin-btn { margin:-8px -8px 0 0; }
.pin-card-text { display:flex; flex-direction:column; gap:4px; flex:1; }
.pin-card .module-link { font-size:17px; }
.pin-card .module-desc { font-size:14px; line-height:1.45; -webkit-line-clamp:unset; }
.pin-card-open { font-size:13px; font-weight:600; color:var(--blue-deep); }
.module-icon { width:44px; height:44px; flex:none; border-radius:10px; background:var(--blue-pale); display:grid; place-items:center; }
.module-icon-lg { width:48px; height:48px; background:#fff; }
.module-icon .app-icon-text { font-size:22px; line-height:1; }
.module-text { flex:1; min-width:0; display:flex; flex-direction:column; gap:2px; }
.module-link { font-size:15px; font-weight:600; color:var(--ink); }
/* The whole row/card is the link; the pin button sits above it. */
.module-link::after { content:""; position:absolute; inset:0; border-radius:12px; }
.module-link:focus-visible { outline:none; }
.module-desc { font-size:13px; line-height:1.4; color:var(--muted); display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.pin-btn { position:relative; z-index:1; width:44px; height:44px; flex:none; border:0; border-radius:10px; background:transparent;
  display:grid; place-items:center; cursor:pointer; transition:background .15s ease; }
.pin-btn[hidden] { display:none; }
.pin-btn:hover { background:var(--blue-pale); }
.pin-card .pin-btn:hover { background:#fff; }
.pin-btn svg { fill:none; stroke:#7d8ca6; }
.pin-btn[aria-pressed="true"] svg { fill:#a8801f; stroke:#a8801f; }
.module-placeholder { display:flex; align-items:center; gap:14px; padding:14px 16px; border:1px dashed var(--line); border-radius:12px;
  min-height:80px; color:var(--muted); font-size:13px; line-height:1.45; }
.module-placeholder .module-icon { background:transparent; border:1px dashed var(--line); font-size:20px; color:#7d8ca6; }
.home-empty { padding:40px 24px; border:1px dashed var(--line); border-radius:12px; text-align:center; display:flex; flex-direction:column;
  align-items:center; gap:10px; font-size:14px; color:var(--muted); }
.home-empty-title { font-size:15px; font-weight:600; color:var(--ink); }
.home-reset { margin-top:6px; min-height:44px; padding:0 18px; border-radius:999px; border:1px solid var(--line); background:#fff;
  color:var(--ink); font:600 13px Inter,system-ui,sans-serif; display:inline-flex; align-items:center; }
.home-reset:hover { border-color:var(--blue); }
@media (max-width:640px) {
  .home-inner { padding:0 16px; }
  .home-hero .home-inner { padding-top:32px; padding-bottom:28px; }
  .home-main { padding-top:28px; padding-bottom:16px; gap:36px; }
}

/* ===================== RASTER (gedeeld: training, veldplanning) ===================== */
/* Velddelen verticaal, tijd horizontaal; overgenomen uit de FCE-zomertraining-look. */
.raster-wrap { background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-l,14px); box-shadow:var(--shadow); overflow:hidden; }
.raster-header { padding:14px 20px; border-bottom:1px solid var(--line); background:var(--blue-pale); display:flex; align-items:center; justify-content:space-between; gap:12px; }
.raster-header h3 { font-family:'Bebas Neue',sans-serif; font-size:20px; letter-spacing:.04em; color:var(--ink); margin:0; }
.raster-header .kicker { font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.12em; text-transform:uppercase; color:var(--muted); margin-bottom:2px; }
.raster-body { padding:16px; overflow-x:auto; }
/* Columns: field | field part | the page's own columns (--raster-cols, set inline). On a phone
   the field column collapses: the field part's name already says which field it is.
   --raster-min (inline) = the sum of the minimum widths of the page's columns: the grid is at
   least that wide, so a narrow screen scrolls it (in .raster-body) instead of clipping the last
   column (the grid itself clips, for its rounded corners). overflow:clip (not hidden) so the
   grid is no scroll container: the sticky field-part column (phone) then sticks to .raster-body;
   older browsers fall back to hidden (no sticky). */
.raster-grid { display:grid; border:1px solid var(--line); border-radius:10px; overflow:hidden; overflow:clip; font-size:12.5px;
  min-width:max(520px, calc(var(--veld-col,104px) + var(--deel-col,92px) + var(--raster-min,0px) + 2px));
  grid-template-columns:var(--veld-col,104px) var(--deel-col,92px) var(--raster-cols); }

.rc { padding:10px 11px; border-right:1px solid var(--line); border-bottom:1px solid var(--line); display:flex; align-items:center; min-height:50px; }
.rc-head { background:var(--ink); color:var(--white); font-family:'Bebas Neue',sans-serif; font-size:13px; letter-spacing:.06em; text-transform:uppercase; justify-content:center; text-align:center; }
/* Veld-groep (verticaal, spant zijn velddeel-rijen). */
.rc-veld { background:var(--blue-pale); color:var(--ink); font-weight:600; font-size:12px; justify-content:center; text-align:center; }
/* Velddeel-rijkop. */
.rc-velddeel { background:var(--blue-pale); color:var(--ink-2); font-family:'JetBrains Mono',monospace; font-size:10.5px; letter-spacing:.04em; }
.rc-end { border-bottom:none; }

.slot-badge { color:#fff; border-radius:7px; padding:4px 8px; font-size:11px; font-weight:600; line-height:1.3; width:100%; height:100%; background:var(--blue); display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; text-align:center; min-height:30px; }
.slot-badge .sbn { color:#fff; font-weight:700; font-size:11.5px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:100%; }
.legend-card {
  background:var(--paper); border:1px solid var(--line); border-radius:var(--radius-l,14px);
  padding:12px 16px; margin-top:0;
}

.raster-legend { display:flex; gap:14px; flex-wrap:wrap; font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.06em; text-transform:uppercase; color:var(--muted); margin-top:12px; }
.rl-dot { width:10px; height:10px; border-radius:3px; display:inline-block; margin-right:5px; }

/* ---- Paginakop met actieknop rechtsboven ---- */
.page-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.page-head-text { min-width: 0; }
.page-head-text h1, .page-head-text p { margin: 0; }
.page-head-text p { opacity: .75; }

/* Adminknop: donker + expliciet 'admin'-label, duidelijk anders dan een gewone link. */
.btn.btn-admin {
  display: inline-flex; align-items: center; gap: .5rem;
  background: var(--ink); color: var(--white); border-color: var(--ink);
}
.btn.btn-admin:hover { background: var(--ink-2); color: var(--white); }
.btn-admin-icon { font-size: 1.05em; line-height: 1; }
.btn-admin-tag {
  font-family: 'JetBrains Mono', monospace; font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; padding: .15rem .4rem; border-radius: 5px;
  background: var(--gold); color: var(--ink);
}


/* ===================== PLANBORD (gedeeld: training, veldplanning; js/planbord.js) ===================== */
.pb-edit-btn { white-space:nowrap; }
/* [hidden] must win over the display of .rc / .pb-bar / .pb-deleted. */
.pb-bar[hidden], .pb-deleted[hidden], [data-pb-id][hidden] { display:none !important; }
.pb-editing .pb-edit-btn { display:none; }
.pb-editing [data-pb-id] { cursor:grab; touch-action:none; user-select:none; -webkit-user-select:none; }
.pb-editing [data-pb-id]:hover .slot-badge { box-shadow:0 0 0 2px var(--gold); }
.pb-editing .pb-fixed { cursor:not-allowed; opacity:.75; }
.pb-dragging { opacity:.3; }
/* !important: the ghost is a clone of an item whose own class (e.g. .vp-block) sets position. */
.pb-ghost { position:fixed !important; z-index:1000; pointer-events:none; margin:0 !important; opacity:.92;
  box-shadow:0 12px 28px -8px rgba(0,0,0,.45); border-radius:8px; }
.pb-ghost .pb-del { display:none; }
.pb-ghost.pb-ghost-bad { outline:3px solid #c83232; }
/* Doelvlak tijdens het slepen: groen = mag, rood = bezet/niet boekbaar. */
.pb-preview { z-index:3; pointer-events:none; border:2px dashed #2e8b57; background:rgba(46,139,87,.16);
  border-radius:7px; margin:2px; }
.pb-preview.pb-bad { border-color:#c83232; background:rgba(200,50,50,.14); }
/* Verwijderknop op een item, alleen in bewerkmodus. */
[data-pb-id] { position:relative; }
.pb-del { display:none; position:absolute; top:2px; right:2px; z-index:4; width:18px; height:18px;
  padding:0; border:none; border-radius:50%; background:rgba(0,0,0,.55); color:#fff; font-size:13px;
  line-height:18px; text-align:center; cursor:pointer; }
.pb-del:hover { background:#c83232; }
.pb-editing [data-pb-id] .pb-del { display:block; }

/* Balk onderaan (plakt aan de onderkant van het scherm): parkeerplaats + acties. */
.pb-bar { position:sticky; bottom:0; z-index:20; margin-top:14px; padding:10px 12px;
  display:flex; flex-direction:column; gap:8px; background:var(--paper); border:1px solid var(--line);
  border-radius:12px; box-shadow:0 -8px 24px -12px rgba(0,0,0,.3); }
.pb-parking { display:flex; align-items:center; gap:10px; min-height:52px; padding:6px 10px;
  border:2px dashed var(--line); border-radius:10px; background:var(--blue-pale); transition:border-color .15s, background .15s; }
.pb-parking.pb-over { border-color:#2e8b57; background:rgba(46,139,87,.12); }
.pb-parking.pb-has-items { border-color:var(--gold); }
.pb-parking-label { font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.1em;
  text-transform:uppercase; color:var(--muted); white-space:nowrap; }
.pb-parking-items { display:flex; flex-wrap:wrap; gap:6px; align-items:center; flex:1; }
.pb-parking-empty { font-size:12px; color:var(--muted); }
.pb-has-items .pb-parking-empty { display:none; }
.pb-parked { width:150px !important; height:40px; margin:0 !important; padding:0 !important; border:none !important;
  background:transparent !important; display:flex; }
.pb-parked .slot-badge { min-height:0; }
.pb-deleted { display:flex; flex-wrap:wrap; gap:6px; align-items:center; font-size:12px; }
.pb-deleted-label { color:var(--muted); }
.pb-chip { border:1px solid var(--line); background:#fff; border-radius:999px; padding:2px 10px;
  font-size:12px; cursor:pointer; text-decoration:line-through; }
.pb-chip:hover { text-decoration:none; border-color:var(--ink); }
.pb-actions { display:flex; align-items:center; justify-content:flex-end; gap:8px; flex-wrap:wrap; }
.pb-status { margin-right:auto; font-size:13px; color:var(--muted); }
.pb-status.pb-error { color:#c83232; font-weight:600; }

/* Light accents per field: the field parts of every other field get a slightly darker band, so
   the fields stay apart, also when the field column is hidden (phone). */
.rc.rc-velddeel.rc-grp-1 { background:#dbe7f6; }
.rc.rc-grp-1:not(.rc-velddeel) { background:rgba(47,126,216,.05); }

/* ===================== PLANNING ON A PHONE ===================== */
@media (max-width:640px) {
  .raster-body { padding:8px; }
  .raster-header { padding:12px 14px; }
  .raster-grid { --veld-col:0px; --deel-col:84px; min-width:calc(var(--deel-col) + var(--raster-min,0px) + 2px); }
  .raster-grid > .rc-veld { display:none; }
  .rc-corner-veld { display:none; }
  .rc { padding:6px 7px; min-height:40px; }
  .rc-velddeel { font-size:10px; letter-spacing:0; white-space:nowrap; padding-left:6px; padding-right:4px; }
  /* The field part stays in view while the grid scrolls sideways. */
  .raster-grid > .rc-velddeel, .raster-grid > .rc-corner { position:sticky; left:0; z-index:5; }
  .raster-grid > .rc-velddeel { box-shadow:1px 0 0 var(--line); }
  .slot-badge { padding:3px 5px; }
}

/* ===================== POPUP (js/planinfo.js) ===================== */
[data-info] { cursor:pointer; }
[data-info]:focus-visible { outline:2px solid var(--gold); outline-offset:1px; }
dialog.pi-dialog { border:none; padding:0; width:min(380px, 92vw); border-radius:14px; background:var(--paper);
  color:var(--ink); box-shadow:0 24px 60px -16px rgba(0,0,0,.45); }
dialog.pi-dialog::backdrop { background:rgba(10,31,68,.45); }
.pi-box { border-top:5px solid var(--blue); border-radius:14px; }
.pi-match .pi-box { border-top-color:var(--gold); }
.pi-extra .pi-box { border-top-color:#2e8b57; }
.pi-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; padding:14px 16px 6px; }
.pi-kind { font-family:'JetBrains Mono',monospace; font-size:10px; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.pi-title { margin:2px 0 0; font-size:1.15rem; line-height:1.25; }
.pi-close { flex:none; width:34px; height:34px; border:1px solid var(--line); border-radius:50%; background:#fff;
  font-size:20px; line-height:1; cursor:pointer; color:var(--ink); }
.pi-rows { display:grid; grid-template-columns:auto 1fr; gap:6px 14px; margin:0; padding:8px 16px 18px; font-size:.95rem; }
.pi-rows dt { color:var(--muted); }
.pi-rows dd { margin:0; font-weight:600; }
@media (max-width:640px) {
  /* Bottom sheet: full width, from the bottom of the screen. */
  dialog.pi-dialog { width:100%; max-width:100%; margin:auto 0 0; border-radius:16px 16px 0 0; }
  .pi-box { border-radius:16px 16px 0 0; padding-bottom:env(safe-area-inset-bottom); }
  .pi-rows { font-size:1rem; }
}

/* ---- Modal (native <dialog>), shared by the apps ---- */
dialog.modal {
  border: 1px solid var(--line, #ddd); border-radius: 12px; padding: 0;
  width: min(560px, 92vw); box-shadow: 0 24px 60px -16px rgba(0,0,0,.4);
  color: inherit; background: var(--paper, #fff);
}
dialog.modal::backdrop { background: rgba(0,0,0,.45); }
dialog.modal .modal-body { padding: 1.25rem 1.4rem; }
dialog.modal h3 { margin: 0 0 1rem; }
dialog.modal label { display: block; margin: .6rem 0; font-size: .95rem; }
dialog.modal .modal-grid { display: grid; gap: .75rem; }
dialog.modal .modal-grid.cols-2 { grid-template-columns: 1fr 1fr; }
dialog.modal .modal-grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
dialog.modal .weekday-row { display: flex; gap: .75rem; flex-wrap: wrap; margin: .5rem 0; }
dialog.modal .weekday-row label { display: inline-flex; align-items: center; gap: .3rem; margin: 0; }
dialog.modal menu {
  display: flex; gap: .5rem; justify-content: flex-end; margin: 1.25rem 0 0; padding: 0;
}
@media (max-width: 560px) {
  dialog.modal .modal-grid.cols-2, dialog.modal .modal-grid.cols-3 { grid-template-columns: 1fr; }
}
dialog.modal [hidden] { display:none !important; }   /* wins over .modal-grid etc. */
dialog.modal .modal-error { margin:.75rem 0 0; color:#b04646; font-weight:600; }
dialog.modal .modal-error:empty { display:none; }
dialog.modal.modal-wide { width:min(760px, 94vw); }

/* ---- Planbord: new items (not stored yet) ---- */
.pb-new .slot-badge { outline:2px dashed #2e8b57; outline-offset:1px; }
.pb-new-btn { white-space:nowrap; }
