@import url('https://fonts.googleapis.com/css2?family=Zilla+Slab:ital,wght@0,500;0,700;1,700&display=swap');

/* =========================================================
   Kennisbank — één stylesheet voor de hele site
   ========================================================= */

:root {
    --paars: #6c1c5b;
    --paars-donker: #4e1242;
    --paars-licht: #f3e8f0;
    --tekst: #1f1a1e;
    --tekst-zacht: #6b6269;
    --rand: #e3dde1;
    --achtergrond: #f6f4f6;
    --wit: #fff;

    --groen: #1f7a3f;   --groen-bg: #e3f4e8;
    --rood: #b3261e;    --rood-bg: #fbe5e3;
    --oranje: #9a5b00;  --oranje-bg: #fdefd8;
    --blauw: #1a5c9e;   --blauw-bg: #e2eefa;
    --geel-bg: #fbf5cf;

    --radius: 10px;
    --schaduw: 0 1px 2px rgba(40, 10, 35, .06), 0 4px 16px rgba(40, 10, 35, .06);
    --kop-font: 'Zilla Slab', Georgia, serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    background: var(--achtergrond);
    color: var(--tekst);
    font: 16px/1.5 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3 { font-family: var(--kop-font); line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2rem; font-style: italic; color: var(--paars); }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }
a  { color: var(--paars); }
img { max-width: 100%; height: auto; }
hr { border: 0; border-top: 1px solid var(--rand); margin: 1rem 0; }
small, .zacht { color: var(--tekst-zacht); }

/* ---------- Kopbalk en menu ---------- */

.kop { background: var(--paars); color: #fff; position: sticky; top: 0; z-index: 10; }
.kop-binnen {
    max-width: 1200px; margin: 0 auto; padding: .5rem 1rem;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.merk { font-family: var(--kop-font); font-style: italic; font-weight: 700; font-size: 1.35rem; color: #fff; text-decoration: none; }
.menu { display: flex; gap: .25rem; flex: 1; overflow-x: auto; scrollbar-width: none; }
.menu a {
    color: #fff; text-decoration: none; padding: .45rem .75rem; border-radius: 6px;
    white-space: nowrap; opacity: .85;
}
.menu a:hover { background: rgba(255,255,255,.12); opacity: 1; }
.menu a.actief { background: rgba(255,255,255,.2); opacity: 1; font-weight: 600; }
.gebruiker { display: flex; align-items: center; gap: .6rem; font-size: .9rem; }
.gebruiker small { color: rgba(255,255,255,.7); }
.account-link { color: #fff; text-decoration: none; }
.account-link:hover { text-decoration: underline; }

@media (max-width: 760px) {
    .kop-binnen { gap: .25rem .75rem; }
    .menu { order: 3; flex-basis: 100%; margin: 0 -.5rem; }
    .gebruiker { margin-left: auto; }
    .gebruiker .account-link small { display: none; }
}

/* ---------- Pagina ---------- */

.inhoud { max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 4rem; }
.intro { color: var(--tekst-zacht); margin-top: -.25rem; }
.smal { max-width: 640px; }

.kaart {
    background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius);
    box-shadow: var(--schaduw); padding: 1.25rem; margin-bottom: 1.25rem;
}
.kaart > h2:first-child { margin-top: 0; }
.kaart-kop { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: .75rem; }
.kaart-kop h2 { margin: 0; }

.raster { display: grid; gap: 1.25rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) { .raster-2 { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }

/* ---------- Tegels (startpagina) ---------- */

.tegels { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.tegel {
    display: flex; flex-direction: column; gap: .35rem; padding: 1.25rem;
    background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius);
    box-shadow: var(--schaduw); color: var(--tekst); text-decoration: none;
    border-top: 4px solid var(--paars); transition: transform .1s, box-shadow .1s;
}
.tegel:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(40,10,35,.12); }
.tegel strong { font-family: var(--kop-font); font-size: 1.25rem; color: var(--paars); }
.tegel span { color: var(--tekst-zacht); font-size: .95rem; }

/* ---------- Formulieren ---------- */

.veld { display: block; margin-bottom: 1rem; }
.veld > span { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.veld > small { display: block; margin-top: .25rem; }
.velden-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr; }
@media (min-width: 600px) { .velden-2 { grid-template-columns: 1fr 1fr; } }

input[type=text], input[type=email], input[type=password], input[type=number], input[type=search],
input[type=date], select, textarea {
    width: 100%; font: inherit; color: inherit; background: var(--wit);
    border: 1px solid #cfc6cc; border-radius: 8px; padding: .6rem .7rem; min-height: 44px;
}
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible {
    outline: 3px solid rgba(108, 28, 91, .3); outline-offset: 1px; border-color: var(--paars);
}
input[readonly] { background: var(--achtergrond); color: var(--tekst-zacht); }
.vinkje { display: flex; align-items: center; gap: .5rem; margin-bottom: 1rem; cursor: pointer; }
.vinkje input { width: 20px; height: 20px; accent-color: var(--paars); }

.bestand {
    display: flex; align-items: center; justify-content: center; gap: .5rem; text-align: center;
    padding: 1.25rem; border: 2px dashed #cfc6cc; border-radius: var(--radius);
    background: var(--achtergrond); cursor: pointer; margin-bottom: 1rem;
}
.bestand:hover { border-color: var(--paars); }
.bestand.gekozen { border-style: solid; border-color: var(--groen); background: var(--groen-bg); color: var(--groen); }
.bestand input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* ---------- Knoppen ---------- */

.knop {
    display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
    font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
    background: var(--paars); color: #fff; border: 1px solid var(--paars);
    border-radius: 8px; padding: .6rem 1.1rem; min-height: 44px;
}
.knop:hover { background: var(--paars-donker); border-color: var(--paars-donker); }
.knop[disabled] { opacity: .6; cursor: wait; }
.knop-breed { width: 100%; }
.knop-klein { min-height: 34px; padding: .3rem .7rem; font-size: .88rem; }
.knop-licht { background: transparent; color: inherit; border-color: currentColor; }
.knop-licht:hover { background: rgba(255,255,255,.15); border-color: currentColor; }
.knop-rand { background: var(--wit); color: var(--paars); }
.knop-rand:hover { background: var(--paars-licht); color: var(--paars); }
.knop-groen { background: var(--groen); border-color: var(--groen); }
.knop-groen:hover { background: #175d30; border-color: #175d30; }
.knop-rood { background: var(--wit); color: var(--rood); border-color: var(--rood); }
.knop-rood:hover { background: var(--rood-bg); color: var(--rood); border-color: var(--rood); }
.knoppen { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* ---------- Meldingen ---------- */

.melding { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; border-left: 4px solid; }
.melding-ok   { background: var(--groen-bg); border-color: var(--groen); color: #174d2a; }
.melding-fout { background: var(--rood-bg); border-color: var(--rood); color: #7a1a14; }
.melding-info { background: var(--blauw-bg); border-color: var(--blauw); color: #143f6b; }
.melding-let  { background: var(--oranje-bg); border-color: var(--oranje); color: #6b3f00; }

/* ---------- Tabellen ---------- */

.tabel-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -1.25rem; padding: 0 1.25rem; }
table { width: 100%; border-collapse: collapse; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--rand); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--tekst-zacht); font-weight: 600; white-space: nowrap; }
th[data-sorteer] { cursor: pointer; user-select: none; }
th[data-sorteer]::after { content: ' ↕'; opacity: .35; }
th[aria-sort=ascending]::after { content: ' ↑'; opacity: 1; }
th[aria-sort=descending]::after { content: ' ↓'; opacity: 1; }
tbody tr:hover { background: #faf7f9; }
td.getal, th.getal { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.nowrap { white-space: nowrap; }
.verborgen { display: none; }

/* ---------- Labels / badges ---------- */

.label { display: inline-block; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; white-space: nowrap; }
.label-groen  { background: var(--groen-bg); color: var(--groen); }
.label-rood   { background: var(--rood-bg); color: var(--rood); }
.label-oranje { background: var(--oranje-bg); color: var(--oranje); }
.label-blauw  { background: var(--blauw-bg); color: var(--blauw); }
.label-grijs  { background: #eee9ec; color: var(--tekst-zacht); }

.zoek { max-width: 320px; }

/* ---------- Declaraties ---------- */

.decl-lijst { display: grid; gap: 1rem; }
.decl {
    display: grid; gap: .75rem 1.25rem; grid-template-columns: 1fr;
    border: 1px solid var(--rand); border-radius: var(--radius); padding: 1rem; background: var(--wit);
}
@media (min-width: 800px) { .decl { grid-template-columns: 1.3fr 1fr; } }
.decl-bedrag { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.decl dl { display: grid; grid-template-columns: auto 1fr; gap: .15rem .75rem; margin: .5rem 0 0; font-size: .92rem; }
.decl dt { color: var(--tekst-zacht); }
.decl dd { margin: 0; overflow-wrap: anywhere; }
.decl textarea { min-height: 60px; }

/* ---------- Rooster ---------- */

.legenda { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dag { background: var(--wit); border: 1px solid var(--rand); border-radius: var(--radius); margin-bottom: .5rem; overflow: hidden; }
.dag.weekstart { margin-top: 1.5rem; }
.dag > summary {
    list-style: none; cursor: pointer; display: flex; align-items: center; gap: .75rem;
    padding: .8rem 1rem; border-left: 6px solid var(--paars);
}
.dag > summary::-webkit-details-marker { display: none; }
.dag > summary::before { content: '▸'; color: var(--tekst-zacht); transition: transform .15s; }
.dag[open] > summary::before { transform: rotate(90deg); }
.dag > summary h3 { margin: 0; font-size: 1.1rem; }
.dag-info { margin-left: auto; display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.dag.feestdag > summary { border-left-color: #d4b106; background: var(--geel-bg); }
.dag.vakantie > summary { background: #f7eef9; }
.dag.vandaag > summary h3::after { content: 'vandaag'; font: 600 .72rem system-ui, sans-serif; background: var(--paars); color: #fff; border-radius: 999px; padding: .1rem .5rem; margin-left: .5rem; vertical-align: middle; }
.dag-inhoud { padding: 0 1rem 1rem; }
.filters { display: flex; gap: .35rem; flex-wrap: wrap; margin: .25rem 0 .75rem; }
.filter { font: inherit; font-size: .85rem; cursor: pointer; border: 1px solid var(--paars); background: var(--paars-licht); color: var(--paars); border-radius: 999px; padding: .2rem .7rem; }
.filter[aria-pressed=false] { background: var(--wit); color: var(--tekst-zacht); border-color: var(--rand); text-decoration: line-through; }

tr.r-open     { background: var(--oranje-bg); }
tr.r-afwezig  { background: var(--rood-bg); }
tr.r-extra    { background: var(--groen-bg); }
tr.r-afgemeld { background: var(--geel-bg); }
tr.r-aanvraag { background: var(--blauw-bg); }
tbody tr.r-open:hover, tbody tr.r-afwezig:hover, tbody tr.r-extra:hover,
tbody tr.r-afgemeld:hover, tbody tr.r-aanvraag:hover { filter: brightness(.97); }
td del { color: var(--tekst-zacht); }

.stip { display: inline-block; width: .7rem; height: .7rem; border-radius: 50%; vertical-align: middle; margin-right: .25rem; border: 1px solid rgba(0,0,0,.1); }

/* ---------- Tariefplanner ---------- */

.via-lijst .veld { margin-bottom: .5rem; }
.link-knop { background: none; border: 0; padding: .25rem 0; font: inherit; font-size: .9rem; color: var(--paars); cursor: pointer; text-decoration: underline; }
.uitkomst { border-top: 4px solid var(--paars); }
.prijzen { display: grid; gap: .75rem; grid-template-columns: 1fr 1fr; margin: 1rem 0; }
.prijs { background: var(--paars-licht); border-radius: var(--radius); padding: .9rem 1rem; }
.prijs span { display: block; font-size: .85rem; color: var(--tekst-zacht); }
.prijs strong { font-size: 1.6rem; font-variant-numeric: tabular-nums; color: var(--paars); }
.prijs s { color: var(--tekst-zacht); font-size: .95rem; margin-right: .35rem; }
.specificatie { width: 100%; }
.specificatie th { text-transform: none; letter-spacing: 0; font-size: .95rem; color: var(--tekst-zacht); font-weight: 400; white-space: normal; }
.specificatie td { text-align: right; font-weight: 600; }
.specificatie tr:hover { background: none; }
.kaart-frame { width: 100%; height: 450px; border: 0; border-radius: var(--radius); display: block; }
.voetnoot { font-size: .88rem; color: var(--tekst-zacht); }

/* ---------- Inloggen ---------- */

.login { min-height: 80vh; display: grid; place-items: center; }
.login .kaart { width: 100%; max-width: 360px; padding: 2rem 1.75rem; }
.login h1 { text-align: center; }
.login-logo { display: block; margin: 0 auto .75rem; border-radius: 16px; }

/* ---------- Print ---------- */

@media print {
    .kop, .filters, .knoppen, .link-knop, form button { display: none !important; }
    body { background: #fff; }
    .kaart, .dag { box-shadow: none; border-color: #ccc; }
}

.prijs strong { white-space: nowrap; }
@media (max-width: 480px) { .prijs strong { font-size: 1.3rem; } .prijzen { gap: .5rem; } }

/* ---------- Gebruikersbeheer ---------- */

.filterbalk { display: flex; gap: .75rem; flex-wrap: wrap; align-items: center; margin-bottom: 1rem; }
.filterbalk .filters { margin: 0; }
tr.klikbaar { cursor: pointer; }
tr.inactief td { color: var(--tekst-zacht); }
.info-lijst { display: grid; grid-template-columns: auto 1fr; gap: .3rem 1rem; margin: 0; }
.info-lijst dt { color: var(--tekst-zacht); }
.info-lijst dd { margin: 0; }
.kopieer { display: flex; gap: .5rem; }
.kopieer input { font-size: .85rem; }
.login-links { text-align: center; margin: 1rem 0 0; font-size: .92rem; }

/* ---------- Roostermaker ---------- */

table.cyclus { table-layout: fixed; min-width: 640px; }
table.cyclus th:first-child { width: 80px; }
table.cyclus td { padding: 3px; }
table.cyclus td.huidig .cel { outline: 2px solid var(--paars); }
table.cyclus td.verleden .cel { opacity: .5; }
.cel { display: flex; flex-direction: column; gap: .15rem; align-items: flex-start; min-height: 64px; padding: .45rem .55rem;
       border: 1px solid var(--rand); border-radius: 8px; text-decoration: none; color: var(--tekst); background: var(--wit); }
.cel:hover { border-color: var(--paars); background: var(--paars-licht); }
.cel span { font-size: .8rem; color: var(--tekst-zacht); }
.cel .label { font-size: .7rem; padding: .05rem .4rem; }

table.editor { min-width: 900px; }
table.editor td { padding: .3rem .25rem; vertical-align: middle; }
table.editor input { min-height: 38px; padding: .35rem .5rem; }
table.editor input[type=time] { width: 7.2rem; }
table.editor td.wie { min-width: 240px; }
table.editor td.caps { min-width: 120px; max-width: 200px; }
table.editor tbody tr:hover { background: none; }
.icoon { font: inherit; background: none; border: 1px solid var(--rand); border-radius: 6px; width: 34px; height: 34px; cursor: pointer; color: var(--tekst-zacht); }
.icoon:hover { border-color: var(--paars); color: var(--paars); }
.cap { display: inline-block; font-size: .72rem; background: var(--blauw-bg); color: var(--blauw); border-radius: 4px; padding: .05rem .35rem; margin: 1px 2px 1px 0; }
.opslaanbalk { position: sticky; bottom: 0; background: var(--wit); border-top: 1px solid var(--rand); margin: 0 -1.25rem -1.25rem;
               padding: .75rem 1.25rem; display: flex; gap: .75rem; flex-wrap: wrap; justify-content: space-between; border-radius: 0 0 var(--radius) var(--radius); }
.opslaanbalk select { width: auto; }
.naam-hover { border-bottom: 1px dotted var(--tekst-zacht); cursor: help; }
pre.voorbeeld { background: var(--achtergrond); border: 1px solid var(--rand); border-radius: 8px; padding: .75rem; overflow-x: auto; font-size: .85rem; }
.vinkjes { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 1rem; }
.vinkjes .vinkje { margin-bottom: .4rem; }
.filter.kies[aria-pressed=false] { text-decoration: none; }
.filter.kies[aria-pressed=true] { background: var(--paars); color: #fff; }
.dagkaart { display: grid; grid-template-columns: 110px 1fr; gap: .25rem 1rem; padding: .9rem 0; border-top: 1px solid var(--rand); }
.dagkaart:first-of-type { border-top: 0; }
.dagkaart .datum strong { display: block; font-size: 1.05rem; }
.dienst { display: flex; gap: .75rem; align-items: baseline; flex-wrap: wrap; }
.dienst .tijd { font-weight: 700; font-variant-numeric: tabular-nums; font-size: 1.1rem; }
.collega-lijst { margin: .35rem 0 0; font-size: .9rem; color: var(--tekst-zacht); }
@media (max-width: 560px) { .dagkaart { grid-template-columns: 1fr; } }

/* Veel menu-items: menu op een eigen regel onder merk en gebruiker. */
@media (min-width: 761px) and (max-width: 1440px) {
    .menu { order: 3; flex-basis: 100%; margin: 0 -.75rem; }
    .gebruiker { margin-left: auto; }
}
