/* ==========================================================================
   Roosterke Luxe — design system van het beheerpaneel.
   Identieke tokens aan de mobiele app (resources/css/app.css in roosterke-app):
   rustig, warm en premium. Veel witruimte, zachte diepte en één sterke
   accentkleur: die van de ORGANISATIE (white-label, gezet door TenantBrandStyle).
   Primaire acties zijn neutrale inkt, zodat elk tenant-logo er goed naast staat.

   Thema's (attribuut op <html>, gezet door js/theme.js vóór de eerste paint):
     data-theme="licht"        -> altijd licht
     data-theme="donker"       -> altijd donker
     data-theme="automatisch"  -> volgt het systeem (prefers-color-scheme)
   ========================================================================== */

/* Laagvolgorde gelijk aan tailwind.css: basis < componenten < utilities. Zo kan een
   pagina een component altijd bijsturen met een Tailwind-utility (mt-6, w-full, …).
   Tokens en lettertypes staan buiten de lagen. */
@layer theme, base, components, utilities;

/* --------------------------------------------------------------------------
   Lettertype — Plus Jakarta Sans, zelf gehost (OFL, zie fonts/PlusJakartaSans-OFL.txt).
   Eén variabel lettertype (200–800) voor alles: tekst, koppen en grote cijfers.
   Koppen en cijfers gebruiken een zwaarder gewicht met krappe letterafstand.
   -------------------------------------------------------------------------- */
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2-variations");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    font-style: normal;
    font-display: swap;
    font-weight: 200 800;
    src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2-variations");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --------------------------------------------------------------------------
   Tokens — licht
   -------------------------------------------------------------------------- */
:root {
    --canvas: #F6F4F0;
    --surface: #FFFFFF;
    --surface-2: #FBFAF7;
    --surface-sunken: #EFECE6;
    --line: #E6E2DA;
    --line-soft: #EFECE6;
    --ink: #16181D;
    --ink-2: #4B505A;
    --ink-3: #656A74;
    --ink-inverse: #FFFFFF;

    /* Merkkleur: de huisstijl van de organisatie overschrijft --accent (TenantBrandStyle). */
    --accent: #C8372D;
    --accent-ink: #FFFFFF;

    --success: #1F7A4D;
    --success-soft: #E6F2EB;
    --warning: #B7791F;
    --warning-text: #8A5A12;
    --warning-soft: #FBF1E0;
    --danger: #C0362C;
    --danger-soft: #FBE9E7;
    --info: #2F5BD3;
    --info-soft: #E8EEFB;

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 20px;
    --r-xl: 28px;
    --r-pill: 999px;

    --shadow-1: none;
    --shadow-2: 0 10px 30px -12px rgba(22, 24, 29, .18), 0 2px 6px rgba(22, 24, 29, .05);
    --shadow-3: 0 30px 60px -20px rgba(22, 24, 29, .30);

    --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    /* Koppen en grote cijfers: hetzelfde lettertype, zwaarder en krapper (geen schreef). */
    --font-display: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

    --ease: cubic-bezier(.2, .7, .2, 1);
    --overlay: rgba(14, 15, 18, .45);
    --sidebar-width: 272px;

    color-scheme: light;
}

/* Afgeleide accenttokens. Staan op elk element dat --accent zelf zet (root, het
   merkpaneel van de inlogpagina's, de telefoon-preview), zodat ze met de
   merkkleur van DAT element meerekenen. */
:root, .rk-auth, [data-accent-scope] {
    --accent-hover: color-mix(in srgb, var(--accent) 86%, #000);
    --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
    --accent-soft-strong: color-mix(in srgb, var(--accent) 22%, transparent);
    --accent-text: color-mix(in srgb, var(--accent) 92%, var(--ink));
    --focus-ring: 0 0 0 3px var(--accent-soft-strong);
}

/* --------------------------------------------------------------------------
   Tokens — donker (geforceerd, of automatisch bij een donker systeem)
   -------------------------------------------------------------------------- */
:root[data-theme="donker"] {
    --canvas: #0E0F12;
    --surface: #16181D;
    --surface-2: #1B1E24;
    --surface-sunken: #101114;
    --line: #2A2E36;
    --line-soft: #22252C;
    --ink: #F3F1EC;
    --ink-2: #B7BBC3;
    --ink-3: #8C919B;
    --ink-inverse: #16181D;
    --success: #4CB782;
    --success-soft: #12291D;
    --warning: #E0A444;
    --warning-text: #E0A444;
    --warning-soft: #2B2213;
    --danger: #EF6A5F;
    --danger-soft: #2E1614;
    --info: #7C9CF0;
    --info-soft: #141E36;
    --shadow-1: none;
    --shadow-2: 0 14px 34px -12px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .25);
    --shadow-3: 0 30px 60px -20px rgba(0, 0, 0, .75);
    --overlay: rgba(0, 0, 0, .6);
    color-scheme: dark;
}
:root[data-theme="donker"], :root[data-theme="donker"] .rk-auth, :root[data-theme="donker"] [data-accent-scope] {
    --accent-text: color-mix(in srgb, var(--accent) 62%, #fff);
    --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);
    --accent-soft-strong: color-mix(in srgb, var(--accent) 34%, transparent);
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="licht"]):not([data-theme="donker"]) {
        --canvas: #0E0F12;
        --surface: #16181D;
        --surface-2: #1B1E24;
        --surface-sunken: #101114;
        --line: #2A2E36;
        --line-soft: #22252C;
        --ink: #F3F1EC;
        --ink-2: #B7BBC3;
        --ink-3: #8C919B;
        --ink-inverse: #16181D;
        --success: #4CB782;
        --success-soft: #12291D;
        --warning: #E0A444;
        --warning-text: #E0A444;
        --warning-soft: #2B2213;
        --danger: #EF6A5F;
        --danger-soft: #2E1614;
        --info: #7C9CF0;
        --info-soft: #141E36;
        --shadow-1: none;
        --shadow-2: 0 14px 34px -12px rgba(0, 0, 0, .55), 0 2px 6px rgba(0, 0, 0, .25);
        --shadow-3: 0 30px 60px -20px rgba(0, 0, 0, .75);
        --overlay: rgba(0, 0, 0, .6);
        color-scheme: dark;
    }
    :root:not([data-theme="licht"]):not([data-theme="donker"]),
    :root:not([data-theme="licht"]):not([data-theme="donker"]) .rk-auth,
    :root:not([data-theme="licht"]):not([data-theme="donker"]) [data-accent-scope] {
        --accent-text: color-mix(in srgb, var(--accent) 62%, #fff);
        --accent-soft: color-mix(in srgb, var(--accent) 20%, transparent);
        --accent-soft-strong: color-mix(in srgb, var(--accent) 34%, transparent);
    }
}

/* --------------------------------------------------------------------------
   Oude tokens (--color-*, --sidebar-*, …) — sommige pagina's gebruiken ze nog
   inline. Ze wijzen nu naar de nieuwe tokens, zodat niets breekt en licht/donker
   vanzelf meegaat.
   -------------------------------------------------------------------------- */
:root {
    --color-canvas: var(--surface);
    --color-canvas-subtle: var(--surface-2);
    --color-canvas-inset: var(--surface-sunken);
    --color-line: var(--line);
    --color-line-muted: var(--line-soft);
    --color-line-strong: color-mix(in srgb, var(--ink-3) 45%, var(--line));
    --color-fg: var(--ink);
    --color-fg-muted: var(--ink-2);
    --color-fg-subtle: var(--ink-3);
    --color-accent: var(--accent-text);
    --color-accent-hover: var(--accent-hover);
    --color-accent-muted: color-mix(in srgb, var(--accent) 35%, transparent);
    --color-accent-subtle: var(--accent-soft);
    --color-success: var(--success);
    --color-success-emphasis: var(--success);
    --color-success-muted: color-mix(in srgb, var(--success) 28%, transparent);
    --color-success-subtle: var(--success-soft);
    --color-danger: var(--danger);
    --color-danger-emphasis: var(--danger);
    --color-danger-muted: color-mix(in srgb, var(--danger) 28%, transparent);
    --color-danger-subtle: var(--danger-soft);
    --color-attention: var(--warning-text);
    --color-attention-muted: color-mix(in srgb, var(--warning) 30%, transparent);
    --color-attention-subtle: var(--warning-soft);
    --color-done: var(--info);
    --color-done-muted: color-mix(in srgb, var(--info) 28%, transparent);
    --color-done-subtle: var(--info-soft);
    --color-brand: var(--accent);
    --color-ink: var(--ink);

    --sidebar-bg: var(--surface);
    --sidebar-border: var(--line-soft);
    --sidebar-fg: var(--ink-2);
    --sidebar-fg-strong: var(--ink);
    --sidebar-fg-muted: var(--ink-3);
    --sidebar-section: var(--ink-3);
    --sidebar-hover-bg: var(--surface-sunken);
    --topbar-bg: var(--canvas);
    --topbar-border: var(--line-soft);
    --app-bg: var(--canvas);

    --radius: var(--r-sm);
    --radius-lg: var(--r-lg);
    --schaduw-sm: none;
    --schaduw: var(--shadow-1);
    --schaduw-md: var(--shadow-2);
    --schaduw-lg: var(--shadow-3);
}

@layer base {
    /* --------------------------------------------------------------------------
       Basis
       -------------------------------------------------------------------------- */
    *, *::before, *::after { box-sizing: border-box; }

    html {
        -webkit-text-size-adjust: 100%;
        text-size-adjust: 100%;
        background: var(--canvas);
    }

    body {
        margin: 0;
        min-height: 100vh;
        background: var(--canvas);
        color: var(--ink);
        font-family: var(--font-ui);
        font-size: 15px;
        line-height: 1.5;
        /* Plus Jakarta Sans heeft van zichzelf smalle spaties; iets ruimer leest rustiger. */
        word-spacing: .06em;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        
    }

    * { -webkit-tap-highlight-color: transparent; }

    h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--ink); font-weight: 600; letter-spacing: -.006em; word-spacing: .1em; line-height: 1.25; }
    h1:focus { outline: none; }
    p { margin: 0; }
    button, input, select, textarea { font: inherit; color: inherit; }
    img, svg { vertical-align: middle; }
    img { max-width: 100%; }
    code, kbd { font-family: var(--font-mono); font-size: .92em; }
    hr { border: 0; border-top: 1px solid var(--line-soft); margin: 24px 0; }
    strong, b { font-weight: 600; }
    ::selection { background: var(--accent-soft-strong); }

    a { color: var(--accent-text); text-decoration: none; }
    a:hover { text-decoration: underline; text-underline-offset: 3px; }

    :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

    .sr-only {
        position: absolute;
        width: 1px; height: 1px;
        padding: 0; margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
    }

    /* Tabulaire cijfers voor tijden, uren en bedragen. */
    .font-mono, .tabular, .cijfer { font-variant-numeric: tabular-nums; }
    .font-mono { font-family: inherit; }

    /* Tekstkleuren (oude en nieuwe namen). */
    .text-muted, .rk-muted { color: var(--ink-2) !important; }
    .text-secondary, .text-subtle { color: var(--ink-3) !important; }
    .text-brand, .text-primary { color: var(--accent-text) !important; }
    .text-attention { color: var(--warning-text) !important; }
    .text-danger, .rk-danger { color: var(--danger) !important; }
    .rk-danger { font-weight: 600; }

    /* Typografie — schaal 12 / 13 / 15 (body) / 17 / 20 / 24 / 32 / 44. */
    .kop-hero, .kop-1, .kop-2, .kop-3, .rk-display {
        font-family: var(--font-display);
        font-weight: 750;
        color: var(--ink);
    }
    .kop-hero { font-size: 44px; line-height: 1.05; letter-spacing: -.022em; word-spacing: .1em; font-weight: 800; }
    .kop-1 { font-size: 32px; line-height: 1.12; letter-spacing: -.02em; word-spacing: .1em; font-weight: 800; }
    .kop-2 { font-size: 24px; line-height: 1.2; letter-spacing: -.015em; word-spacing: .1em; }
    .kop-3 { font-size: 20px; line-height: 1.25; letter-spacing: -.012em; word-spacing: .1em; }
    .bovenschrift, .rk-eyebrow {
        font-size: 12px;
        line-height: 1.3;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--ink-3);
    }
    .rk-lead { color: var(--ink-2); font-size: 15px; max-width: 70ch; margin: 0 0 20px; }
    .rk-label { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }
}

@layer components {
    /* ==========================================================================
       App-schil — zijbalk + topbalk. Gedeeld door het beheer (MainLayout) en het
       platform (SuperAdminLayout, met .rk-shell--platform).
       ========================================================================== */
    .rk-shell { min-height: 100vh; background: var(--canvas); }

    .rk-sidebar {
        position: fixed;
        inset: 0 auto 0 0;
        width: var(--sidebar-width);
        z-index: 50;
        display: flex;
        flex-direction: column;
        background: var(--surface);
        border-right: 1px solid var(--line-soft);
        transform: translateX(-100%);
        transition: transform .28s var(--ease), box-shadow .28s var(--ease);
        overflow: hidden;
    }
    .rk-sidebar--open { transform: translateX(0); box-shadow: var(--shadow-3); }

    .rk-overlay {
        position: fixed;
        inset: 0;
        z-index: 40;
        background: var(--overlay);
        animation: rk-fade-in .2s var(--ease) both;
    }

    .rk-sidebar__brand {
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 76px;
        padding: 18px 20px 14px;
    }
    .rk-sidebar__brand a { display: flex; align-items: center; min-width: 0; color: inherit; text-decoration: none; }
    .rk-sidebar__close {
        margin-left: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        border: 0;
        border-radius: var(--r-sm);
        background: transparent;
        color: var(--ink-2);
        cursor: pointer;
    }
    .rk-sidebar__close:hover { background: var(--surface-sunken); color: var(--ink); }

    .rk-sidebar__scroll {
        flex: 1 1 auto;
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: 4px 12px 16px;
        scrollbar-width: thin;
        scrollbar-color: var(--line) transparent;
    }
    .rk-sidebar__foot {
        padding: 12px 12px 16px;
        border-top: 1px solid var(--line-soft);
    }

    .nav-section {
        margin: 22px 0 6px;
        padding: 0 12px;
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .09em;
        text-transform: uppercase;
        color: var(--ink-3);
    }
    .nav-section:first-child { margin-top: 6px; }
    .nav-item { padding: 1px 0; }
    .nav-divider { height: 1px; background: var(--line-soft); margin: 14px 12px; }

    .rk-sidebar .nav-link {
        position: relative;
        display: flex;
        align-items: center;
        gap: 12px;
        width: 100%;
        min-height: 40px;
        padding: 0 12px;
        border-radius: var(--r-sm);
        color: var(--ink-2);
        font-size: 14px;
        font-weight: 500;
        text-decoration: none;
        transition: background-color .15s var(--ease), color .15s var(--ease);
    }
    .rk-sidebar .nav-link:hover { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
    .rk-sidebar .nav-ic {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 20px;
        flex: 0 0 auto;
        color: var(--ink-3);
        transition: color .15s var(--ease);
    }
    .rk-sidebar .nav-link:hover .nav-ic { color: var(--ink); }
    .rk-sidebar .nav-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--line); flex: 0 0 auto; margin: 0 7px; }
    .rk-sidebar .nav-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rk-sidebar .nav-link.active {
        background: var(--accent-soft);
        color: var(--accent-text);
        font-weight: 600;
    }
    .rk-sidebar .nav-link.active .nav-ic { color: var(--accent-text); }
    .rk-sidebar .nav-link.active::before {
        content: "";
        position: absolute;
        left: -12px;
        top: 10px;
        bottom: 10px;
        width: 3px;
        border-radius: 0 3px 3px 0;
        background: var(--accent);
    }

    /* Hoofdkolom */
    .rk-main { display: flex; flex-direction: column; min-height: 100vh; min-width: 0; }

    .rk-topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        display: flex;
        align-items: center;
        gap: 10px;
        min-height: 64px;
        padding: 10px 16px;
        background: var(--canvas);
        border-bottom: 1px solid transparent;
        transition: border-color .2s var(--ease);
    }
    .rk-topbar__brand { display: flex; align-items: center; min-width: 0; }
    .rk-topbar__actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
    .rk-topbar__user {
        display: none;
        flex-direction: column;
        align-items: flex-end;
        line-height: 1.2;
        margin-right: 6px;
        min-width: 0;
    }
    .rk-topbar__user strong { font-size: 14px; font-weight: 600; color: var(--ink); }
    .rk-topbar__user span { font-size: 12px; color: var(--ink-3); }

    .rk-icon-btn, .rk-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex: 0 0 auto;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        background: var(--surface);
        color: var(--ink);
        cursor: pointer;
        text-decoration: none;
        transition: background-color .15s var(--ease), border-color .15s var(--ease), transform .1s var(--ease);
    }
    .rk-icon-btn:hover, .rk-hamburger:hover { border-color: var(--ink-3); text-decoration: none; color: var(--ink); }
    .rk-icon-btn:active, .rk-hamburger:active { transform: scale(.96); }

    /* Thema-knop: toont de maan in licht, de zon in donker. */
    .rk-theme-toggle .ic-sun { display: none; }
    :root[data-theme="donker"] .rk-theme-toggle .ic-sun { display: inline-block; }
    :root[data-theme="donker"] .rk-theme-toggle .ic-moon { display: none; }
    @media (prefers-color-scheme: dark) {
        :root:not([data-theme="licht"]):not([data-theme="donker"]) .rk-theme-toggle .ic-sun { display: inline-block; }
        :root:not([data-theme="licht"]):not([data-theme="donker"]) .rk-theme-toggle .ic-moon { display: none; }
    }

    .rk-content {
        flex: 1;
        width: 100%;
        max-width: 1280px;
        margin: 0 auto;
        padding: 8px 16px 64px;
    }

    /* Knoplabels in de topbalk verbergen op smalle schermen (alleen het icoon); op een
       telefoon verhuizen hulp en organisatie naar de voet van de zijbalk. */
    .rk-hide-sm { display: none; }
    @media (max-width: 639px) {
        .rk-hide-mobile { display: none !important; }
        .rk-topbar { gap: 8px; }
        .rk-topbar__actions { gap: 6px; }
        .stat-card { min-height: 108px; padding: 18px; }
        .stat-card .stat-value { font-size: 34px; }
    }
    .rk-sidebar__foot .nav-link { font-size: 14px; }
    .rk-powered {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 6px 0 0;
        padding: 6px 12px 0;
        color: var(--ink-3);
        font-size: 12px;
        font-weight: 500;
    }
    .rk-powered__mark {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 20px;
        height: 20px;
        border-radius: 6px;
        background: #16181D;
    }
    .rk-powered__mark img { width: 72%; height: 72%; }
    @media (min-width: 640px) { .rk-sidebar__foot--mobile { display: none; } .rk-powered { margin-top: 0; padding-top: 0; } }

    @media (min-width: 640px) {
        .rk-hide-sm { display: inline; }
        .rk-topbar__user { display: flex; }
        .rk-content { padding: 12px 28px 72px; }
        .rk-topbar { padding: 12px 28px; }
    }

    @media (min-width: 1024px) {
        .rk-sidebar { transform: none; box-shadow: none; }
        .rk-sidebar__close, .rk-hamburger, .rk-overlay, .rk-topbar__brand { display: none; }
        .rk-main { margin-left: var(--sidebar-width); }
        .rk-content { padding: 16px 48px 80px; }
        .rk-topbar { padding: 14px 48px; }
    }

    /* Platform (superadmin): zelfde schil, Roosterke-merk en een kleine badge. */
    .rk-platform-badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        padding: 3px 10px;
        border-radius: var(--r-pill);
        background: var(--ink);
        color: var(--ink-inverse);
        font-size: 11px;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
    }
    .rk-platform-role {
        padding: 3px 10px;
        border-radius: var(--r-pill);
        background: var(--accent-soft);
        color: var(--accent-text);
        font-size: 12px;
        font-weight: 600;
    }

    /* ==========================================================================
       Merk (TenantBrandMark) — logo of monogram plus app-naam
       ========================================================================== */
    .rk-brand { display: inline-flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink); }
    .rk-brand__tile {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        border-radius: 12px;
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
        overflow: hidden;
    }
    .rk-brand__logo { width: 80%; height: 80%; object-fit: contain; }
    .rk-brand__logo--dark { display: none; }
    :root[data-theme="donker"] .rk-brand__tile--has-dark .rk-brand__logo--light { display: none; }
    :root[data-theme="donker"] .rk-brand__tile--has-dark .rk-brand__logo--dark { display: block; }
    @media (prefers-color-scheme: dark) {
        :root:not([data-theme="licht"]):not([data-theme="donker"]) .rk-brand__tile--has-dark .rk-brand__logo--light { display: none; }
        :root:not([data-theme="licht"]):not([data-theme="donker"]) .rk-brand__tile--has-dark .rk-brand__logo--dark { display: block; }
    }
    .rk-brand__tile--monogram {
        border: 0;
        color: #fff;
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 15px;
        letter-spacing: .01em;
    }
    .rk-brand__tile--roosterke { background: #16181D; border-color: #16181D; }
    .rk-brand__tile--roosterke img { width: 64%; height: 64%; }
    .rk-brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.15; }
    .rk-brand__name {
        font-family: var(--font-display);
        font-size: 18px;
        font-weight: 750;
        letter-spacing: -.015em; word-spacing: .1em;
        color: var(--ink);
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .rk-brand__sub { margin-top: 2px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
    .rk-brand--compact { gap: 0; }

    /* ==========================================================================
       Paginakop
       ========================================================================== */
    .rk-page-header {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-end;
        justify-content: space-between;
        gap: 16px 24px;
        margin: 8px 0 28px;
    }
    .rk-page-header__text { min-width: 0; flex: 1 1 320px; }
    .rk-page-header__title-row { display: flex; align-items: center; gap: 12px; }
    .rk-page-header__title {
        font-family: var(--font-display);
        font-size: 30px;
        line-height: 1.12;
        font-weight: 800;
        letter-spacing: -.02em; word-spacing: .1em;
        color: var(--ink);
    }
    .rk-page-header__subtitle { margin-top: 8px; color: var(--ink-2); font-size: 15px; max-width: 68ch; }
    .rk-page-header__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
    .rk-help-link {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        flex: 0 0 auto;
        border-radius: 50%;
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink-2);
        text-decoration: none;
        transition: color .15s var(--ease), border-color .15s var(--ease), background-color .15s var(--ease);
    }
    .rk-help-link:hover { color: var(--accent-text); border-color: var(--accent); background: var(--accent-soft); text-decoration: none; }
    @media (min-width: 1024px) {
        .rk-page-header__title { font-size: 32px; }
    }

    .rk-breadcrumb {
        display: flex;
        align-items: center;
        gap: 6px;
        margin: 4px 0 -12px;
        font-size: 13px;
        color: var(--ink-3);
    }
    .rk-breadcrumb a { color: var(--ink-2); font-weight: 500; }

    .rk-section-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 0 0 12px;
        font-family: var(--font-display);
        font-size: 20px;
        font-weight: 750;
    }
    .rk-day-heading {
        margin: 24px 0 10px;
        font-size: 12px;
        font-weight: 600;
        letter-spacing: .08em;
        text-transform: uppercase;
        color: var(--ink-3);
    }
    .rk-day-heading:first-child { margin-top: 0; }

    /* ==========================================================================
       Knoppen — hoogte 40, radius md. Standaard = zacht; primair = inkt;
       accent = merkkleur; gevaar = rood. Indrukken: scale(.98).
       ========================================================================== */
    .knop {
        position: relative;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        min-height: 40px;
        padding: 0 16px;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        background: var(--surface-2);
        color: var(--ink);
        font-family: var(--font-ui);
        font-size: 14px;
        font-weight: 600;
        line-height: 1.2;
        white-space: nowrap;
        text-decoration: none;
        cursor: pointer;
        -webkit-user-select: none;
        user-select: none;
        transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), transform .1s var(--ease), opacity .15s;
    }
    .knop:hover { background: var(--surface); border-color: var(--ink-3); color: var(--ink); text-decoration: none; }
    .knop:active:not(:disabled) { transform: scale(.98); }
    .knop:focus-visible { outline: none; box-shadow: var(--focus-ring); border-radius: var(--r-md); }
    .knop:disabled, .knop[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
    .knop.\!min-h-9 { min-height: 36px !important; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }

    .knop-primair, .knop-blauw {
        background: var(--ink);
        border-color: var(--ink);
        color: var(--ink-inverse);
    }
    .knop-primair:hover, .knop-blauw:hover { background: var(--ink); border-color: var(--ink); color: var(--ink-inverse); opacity: .9; }

    .knop-accent {
        background: var(--accent);
        border-color: var(--accent);
        color: var(--accent-ink);
    }
    .knop-accent:hover { background: var(--accent-hover); border-color: var(--accent-hover); color: var(--accent-ink); }

    .knop-zacht { background: var(--surface-2); border-color: var(--line); color: var(--ink); }

    .knop-groen { background: var(--success-soft); border-color: transparent; color: var(--success); }
    .knop-groen:hover { background: var(--success-soft); border-color: var(--success); color: var(--success); }

    .knop-rood { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
    .knop-rood:hover { background: var(--danger-soft); border-color: var(--danger); color: var(--danger); }

    .knop-gevaar { background: var(--danger); border-color: var(--danger); color: #fff; }
    .knop-gevaar:hover { background: var(--danger); border-color: var(--danger); color: #fff; opacity: .9; }

    .knop-stil { background: transparent; border-color: transparent; color: var(--ink-2); }
    .knop-stil:hover { background: var(--surface-sunken); border-color: transparent; color: var(--ink); }

    .knop-groot { min-height: 48px; padding: 0 22px; font-size: 15px; }
    .knop-klein { min-height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }
    .knop.w-full { width: 100%; }

    /* Spinner in de knop tijdens laden (vervangt de tekst). */
    .knop-spinner { animation: knop-draai .7s linear infinite; }
    @keyframes knop-draai { to { transform: rotate(360deg); } }

    .rk-link, .rk-link-strong {
        color: var(--accent-text);
        font-weight: 600;
        text-decoration: none;
        background: none;
        border: 0;
        padding: 0;
        cursor: pointer;
    }
    .rk-link-strong { color: var(--ink); }
    .rk-link:hover, .rk-link-strong:hover { text-decoration: underline; text-underline-offset: 3px; }
    .rk-link-strong:hover { color: var(--accent-text); }

    /* ==========================================================================
       Kaarten — kader (Card), met optionele kop. .card is een alias.
       ========================================================================== */
    .kader, .card, .rk-card {
        position: relative;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        box-shadow: var(--shadow-1);
        transition: box-shadow .2s var(--ease);
    }
    .card-body { padding: 20px; }
    .shadow-sm { box-shadow: var(--shadow-2); }
    .kader-kop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 18px 22px 0;
        font-size: 15px;
        font-weight: 600;
        color: var(--ink);
    }
    .kader-kop + div { padding-top: 12px !important; }
    .kader-body { padding: 20px 22px 22px; }
    .kader-body--flush { padding: 0; }
    .kader-regel { padding: 14px 22px; }
    .kader-regel + .kader-regel { border-top: 1px solid var(--line-soft); }
    a.kader:hover, .kader--klik:hover { box-shadow: var(--shadow-2); text-decoration: none; }

    /* ==========================================================================
       Formulieren
       ========================================================================== */
    .rk-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
    .rk-field__label { font-size: 14px; font-weight: 600; color: var(--ink); }
    .rk-field__hint { font-size: 13px; color: var(--ink-3); }

    .rk-input, .rk-select, .form-control, .form-select {
        display: block;
        width: 100%;
        min-height: 44px;
        padding: 10px 14px;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        background-color: var(--surface);
        color: var(--ink);
        font-family: var(--font-ui);
        font-size: 15px;
        line-height: 1.35;
        outline: none;
        transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
    }
    .rk-input::placeholder, .form-control::placeholder { color: var(--ink-3); }
    .rk-input:hover, .rk-select:hover { border-color: color-mix(in srgb, var(--ink-3) 55%, var(--line)); }
    .rk-input:focus, .rk-select:focus, .form-control:focus, .form-select:focus {
        border-color: var(--accent);
        box-shadow: var(--focus-ring);
        outline: none;
    }
    .rk-input:disabled, .rk-select:disabled { opacity: .6; cursor: not-allowed; background-color: var(--surface-2); }
    .form-control-sm, .form-select-sm { min-height: 36px; padding: 6px 10px; font-size: 14px; }
    textarea.rk-input, textarea.form-control { min-height: 96px; resize: vertical; }
    input[type="date"].rk-input, input[type="time"].rk-input { font-variant-numeric: tabular-nums; }
    .rk-select, .form-select, select.rk-input {
        appearance: none;
        -webkit-appearance: none;
        padding-right: 40px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16' fill='%238A8F99'%3E%3Cpath d='M4.22 6.22a.75.75 0 0 1 1.06 0L8 8.94l2.72-2.72a.75.75 0 1 1 1.06 1.06l-3.25 3.25a.75.75 0 0 1-1.06 0L4.22 7.28a.75.75 0 0 1 0-1.06Z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 14px center;
        cursor: pointer;
    }
    .form-label { font-weight: 600; color: var(--ink); }

    /* Medewerker-kiezer (typen + aanvullen). De lijst staat in de flow onder het veld i.p.v.
       zwevend: in een modal met scrollende body wordt een zwevende lijst afgeknipt. */
    .rk-kiezer { position: relative; }
    .rk-kiezer__invoer { padding-right: 40px; }
    .rk-kiezer__vink { position: absolute; top: 14px; right: 14px; color: var(--success); pointer-events: none; }
    .rk-kiezer__lijst {
        margin-top: 6px;
        max-height: 272px;
        overflow-y: auto;
        padding: 4px;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        background-color: var(--surface);
        box-shadow: var(--shadow-2);
    }
    .rk-kiezer__optie {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-height: 40px;
        padding: 8px 12px;
        border-radius: var(--r-sm);
        color: var(--ink);
        font-size: 15px;
        cursor: pointer;
    }
    .rk-kiezer__optie.is-actief { background-color: var(--accent-soft); color: var(--accent-text); }
    .rk-kiezer__optie.is-open { color: var(--ink-2); font-style: italic; }
    .rk-kiezer__optie.is-uit { color: var(--ink-3); cursor: not-allowed; }
    .rk-kiezer__optie.is-uit.is-actief { background-color: transparent; }
    .rk-kiezer__label { font-size: 13px; color: var(--ink-3); }
    .rk-kiezer__leeg { padding: 10px 12px; font-size: 14px; color: var(--ink-3); }
    .rk-kbd {
        display: inline-flex; align-items: center; justify-content: center;
        min-width: 20px; height: 20px; padding: 0 5px; margin-left: 2px;
        border: 1px solid currentColor; border-radius: 6px;
        font-family: var(--font-mono, ui-monospace, monospace); font-size: 11px; line-height: 1; opacity: .7;
    }

    /* Vinkje en rondje — eigen accent-stijl. */
    .form-check-input,
    input[type="checkbox"]:not([role="switch"]),
    input[type="radio"],
    .rk-check-inline input[type="checkbox"],
    .rk-module-pick__item input[type="checkbox"],
    .rk-checkbox {
        appearance: none;
        -webkit-appearance: none;
        flex: 0 0 auto;
        width: 20px;
        height: 20px;
        margin: 0;
        border: 1.5px solid color-mix(in srgb, var(--ink-3) 70%, var(--line));
        border-radius: 6px;
        background: var(--surface);
        cursor: pointer;
        vertical-align: middle;
        transition: background-color .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease);
    }
    .form-check-input[type="radio"], input[type="radio"] { border-radius: 50%; }
    input[type="radio"]:checked {
        background-color: var(--surface) !important;
        background-image: none !important;
        border-color: var(--accent);
        box-shadow: inset 0 0 0 5px var(--accent);
    }
    .form-check-input:checked,
    input[type="checkbox"]:not([role="switch"]):checked,
    .rk-check-inline input[type="checkbox"]:checked,
    .rk-module-pick__item input[type="checkbox"]:checked,
    .rk-checkbox:checked {
        background-color: var(--accent);
        border-color: var(--accent);
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23fff' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 8.5l3 3 6-7'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: center;
        background-size: 14px;
    }
    .form-check-input:focus-visible,
    input[type="checkbox"]:focus-visible,
    input[type="radio"]:focus-visible,
    .rk-check-inline input[type="checkbox"]:focus-visible,
    .rk-checkbox:focus-visible { outline: none; box-shadow: var(--focus-ring); }
    .form-check-input:disabled { opacity: .5; cursor: not-allowed; }

    .rk-check-inline {
        display: inline-flex;
        align-items: center;
        gap: 10px;
        min-height: 40px;
        font-size: 14px;
        color: var(--ink);
        cursor: pointer;
    }

    .valid.modified:not([type=checkbox]) { border-color: color-mix(in srgb, var(--success) 60%, var(--line)); }
    .invalid { border-color: var(--danger) !important; }
    .validation-message { margin-top: 4px; color: var(--danger); font-size: 13px; }

    /* Kleurkiezer + hex-veld naast elkaar (Huisstijl). */
    .rk-color { display: inline-flex; align-items: center; gap: 10px; }
    .rk-color input[type="color"] {
        width: 44px;
        height: 44px;
        padding: 3px;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        background: var(--surface);
        cursor: pointer;
    }
    .rk-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
    .rk-color input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 10px; }
    .rk-color input[type="color"]::-moz-color-swatch { border: 0; border-radius: 10px; }
    .rk-color .rk-input { width: 130px; font-variant-numeric: tabular-nums; text-transform: uppercase; }

    /* Schakelaar (iOS-stijl). */
    .rk-switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; vertical-align: middle; }
    .rk-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
    .rk-switch__track {
        position: relative;
        flex: 0 0 auto;
        width: 46px;
        height: 28px;
        border-radius: var(--r-pill);
        background: color-mix(in srgb, var(--ink-3) 38%, var(--surface-sunken));
        transition: background-color .22s var(--ease);
    }
    .rk-switch__thumb {
        position: absolute;
        top: 3px;
        left: 3px;
        width: 22px;
        height: 22px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 2px 6px rgba(0, 0, 0, .22), 0 0 0 .5px rgba(0, 0, 0, .04);
        transition: transform .22s var(--ease);
    }
    .rk-switch input:checked + .rk-switch__track { background: var(--success); }
    .rk-switch input:checked + .rk-switch__track .rk-switch__thumb { transform: translateX(18px); }
    .rk-switch input:focus-visible + .rk-switch__track { box-shadow: var(--focus-ring); }
    .rk-switch__label { font-size: 14px; color: var(--ink); }
    .rk-switch--disabled { cursor: not-allowed; opacity: .5; }

    /* Gesegmenteerde keuze (bv. licht/donker-voorbeeld). */
    .rk-segmented {
        display: inline-flex;
        padding: 3px;
        gap: 2px;
        border-radius: var(--r-md);
        background: var(--surface-sunken);
    }
    .rk-segmented button {
        min-height: 34px;
        padding: 0 16px;
        border: 0;
        border-radius: 11px;
        background: transparent;
        color: var(--ink-2);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color .15s var(--ease), color .15s var(--ease), box-shadow .15s var(--ease);
    }
    .rk-segmented button:hover { color: var(--ink); }
    .rk-segmented button.is-active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }

    /* Uitklapper ("Meer kleuren"). */
    .rk-details { border-top: 1px solid var(--line-soft); padding-top: 12px; }
    .rk-details > summary {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        cursor: pointer;
        list-style: none;
        font-size: 14px;
        font-weight: 600;
        color: var(--ink-2);
    }
    .rk-details > summary::-webkit-details-marker { display: none; }
    .rk-details > summary::before {
        content: "";
        width: 8px;
        height: 8px;
        border-right: 1.5px solid currentColor;
        border-bottom: 1.5px solid currentColor;
        transform: rotate(-45deg);
        transition: transform .2s var(--ease);
    }
    .rk-details[open] > summary::before { transform: rotate(45deg); }
    .rk-details > summary:hover { color: var(--ink); }

    /* Kopieerbare link (uitnodiging). */
    .rk-copy {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 6px 6px 6px 14px;
        border: 1px dashed var(--line);
        border-radius: var(--r-md);
        background: var(--surface-2);
    }
    .rk-copy code {
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 14px;
        color: var(--ink);
        padding: 8px 0;
    }

    .rk-form-actions {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        margin-top: 24px;
        padding-top: 20px;
        border-top: 1px solid var(--line-soft);
    }
    .kader .rk-form-actions { margin-left: -22px; margin-right: -22px; padding: 18px 22px 0; }
    .rk-form-grid { display: grid; gap: 20px; }
    @media (min-width: 900px) { .rk-form-grid { grid-template-columns: 1fr 1fr; align-items: start; } }

    /* ==========================================================================
       Badges, chips, bolletjes
       ========================================================================== */
    .badge {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-height: 24px;
        padding: 2px 10px;
        border-radius: var(--r-pill);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
        white-space: nowrap;
        background: var(--surface-sunken);
        color: var(--ink-2);
    }
    .badge-blauw, .badge-accent { background: var(--accent-soft); color: var(--accent-text); }
    .badge-groen { background: var(--success-soft); color: var(--success); }
    .badge-geel { background: var(--warning-soft); color: var(--warning-text); }
    .badge-rood { background: var(--danger-soft); color: var(--danger); }
    .badge-paars, .badge-info { background: var(--info-soft); color: var(--info); }
    .badge-grijs { background: var(--surface-sunken); color: var(--ink-2); }
    .badge-inkt { background: var(--ink); color: var(--ink-inverse); }

    .rk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
    .rk-chip {
        display: inline-flex;
        align-items: center;
        gap: 5px;
        min-height: 26px;
        padding: 3px 11px;
        border-radius: var(--r-pill);
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink-2);
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
        white-space: nowrap;
    }
    .rk-chip--soft { border-color: transparent; background: var(--surface-sunken); color: var(--ink-2); }
    .rk-chip--warn { border-color: transparent; background: var(--warning-soft); color: var(--warning-text); }
    .rk-chip--accent { border-color: transparent; background: var(--accent-soft); color: var(--accent-text); }
    .rk-chip--elders { border-style: dashed; background: var(--surface-2); color: var(--ink-2); }
    .rk-chip--success { border-color: transparent; background: var(--success-soft); color: var(--success); }

    .rk-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--line); vertical-align: middle; flex: 0 0 auto; }
    .rk-dot--on { background: var(--success); box-shadow: 0 0 0 3px var(--success-soft); }
    .rk-dot--mail { background: var(--info); box-shadow: 0 0 0 3px var(--info-soft); }
    .rk-dot--warn { background: var(--warning); }
    .rk-dot--off { background: var(--ink-3); }

    .rk-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; font-size: 13px; color: var(--ink-2); }
    .rk-legend > span { display: inline-flex; align-items: center; gap: 8px; }

    /* ==========================================================================
       Meldingen in de pagina (alert) en notities
       ========================================================================== */
    .rk-alert {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        margin-bottom: 20px;
        padding: 14px 16px;
        border-radius: var(--r-md);
        background: var(--surface-sunken);
        color: var(--ink);
        font-size: 14px;
        line-height: 1.5;
        animation: rk-rise .3s var(--ease) both;
    }
    .rk-alert > svg { flex: 0 0 auto; margin-top: 2px; }
    .rk-alert > div, .rk-alert > span { min-width: 0; flex: 1 1 auto; }
    .rk-alert ul { margin: 6px 0 0; padding-left: 18px; }
    .rk-alert--block { display: block; }
    .rk-alert--flush { margin-bottom: 0; }
    .rk-alert--block > div + div { margin-top: 12px; }
    .rk-alert--danger { background: var(--danger-soft); color: var(--danger); }
    .rk-alert--success { background: var(--success-soft); color: var(--success); }
    .rk-alert--warn { background: var(--warning-soft); color: var(--warning-text); }
    .rk-alert--info { background: var(--info-soft); color: var(--info); }
    .rk-alert strong { font-weight: 600; }
    .rk-auth .rk-alert, .rk-modal .rk-alert { margin-bottom: 18px; }

    .rk-note {
        display: flex;
        align-items: flex-start;
        gap: 10px;
        padding: 14px 16px;
        border-radius: var(--r-md);
        background: var(--surface-2);
        border: 1px solid var(--line);
        color: var(--ink-2);
        font-size: 14px;
    }
    .rk-note > svg { flex: 0 0 auto; margin-top: 2px; color: var(--ink-3); }
    .rk-note--block { display: block; }

    /* ==========================================================================
       Tabellen
       ========================================================================== */
    .rk-table { width: 100%; border-collapse: collapse; color: var(--ink); font-size: 14px; }
    .rk-table thead th {
        text-align: left;
        padding: 14px 18px 10px;
        color: var(--ink-3);
        font-weight: 600;
        font-size: 12px;
        letter-spacing: .06em;
        text-transform: uppercase;
        white-space: nowrap;
        background: transparent;
        border-bottom: 1px solid var(--line-soft);
    }
    .rk-table tbody td {
        padding: 14px 18px;
        vertical-align: middle;
        border-bottom: 1px solid var(--line-soft);
    }
    .rk-table tbody tr:last-child td { border-bottom: 0; }
    .rk-table tbody tr { transition: background-color .15s var(--ease); }
    .rk-table tbody tr:hover { background: var(--surface-2); }
    .rk-table .text-right { text-align: right; }
    .rk-table .text-center { text-align: center; }
    .rk-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* ==========================================================================
       Statistieken
       ========================================================================== */
    .rk-stat-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    @media (min-width: 900px) { .rk-stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

    .stat-card {
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        gap: 6px;
        min-height: 124px;
        padding: 20px 22px;
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        background: var(--surface);
        box-shadow: var(--shadow-1);
        color: inherit;
        text-decoration: none;
        transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
    }
    a.stat-card:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); text-decoration: none; color: inherit; }
    a.stat-card:active { transform: scale(.99); }
    .stat-card .stat-value {
        font-family: var(--font-display);
        font-size: 40px;
        font-weight: 750;
        line-height: 1;
        letter-spacing: -.012em; word-spacing: .1em;
        color: var(--ink);
        font-variant-numeric: tabular-nums lining-nums;
    }
    .stat-card .stat-label { color: var(--ink-2); font-size: 13px; font-weight: 500; }
    .stat-card .stat-value.text-brand,
    .stat-card .stat-value.text-primary { color: var(--accent-text) !important; }
    .stat-card .stat-value.text-attention { color: var(--warning-text) !important; }
    .stat-card__icon {
        position: absolute;
        top: 18px;
        right: 18px;
        display: grid;
        place-items: center;
        width: 32px;
        height: 32px;
        border-radius: 10px;
        background: var(--surface-sunken);
        color: var(--ink-3);
    }
    a.stat-card .stat-card__arrow {
        position: absolute;
        right: 18px;
        bottom: 18px;
        color: var(--ink-3);
        opacity: 0;
        transform: translateX(-4px);
        transition: opacity .2s var(--ease), transform .2s var(--ease);
    }
    a.stat-card:hover .stat-card__arrow { opacity: 1; transform: none; }

    /* Voortgangsbalk */
    .rk-progress {
        position: relative;
        width: 100%;
        height: 6px;
        border-radius: var(--r-pill);
        background: var(--surface-sunken);
        overflow: hidden;
    }
    .rk-progress__fill {
        height: 100%;
        border-radius: inherit;
        background: var(--accent);
        transition: width .5s var(--ease);
    }
    .rk-progress__fill--full { background: var(--success); }

    /* ==========================================================================
       Laden, leeg, fout (StateBlock) en lege pagina
       ========================================================================== */
    .rk-loading { display: flex; justify-content: center; padding: 56px 0; color: var(--ink-3); }

    .rk-empty {
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        padding: 56px 24px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
    }
    .rk-empty__icon {
        display: grid;
        place-items: center;
        width: 72px;
        height: 72px;
        margin-bottom: 8px;
        border-radius: 50%;
        background: var(--surface-sunken);
        color: var(--ink-2);
    }
    .rk-empty__title {
        font-family: var(--font-display);
        font-size: 22px;
        font-weight: 750;
        letter-spacing: -.015em; word-spacing: .1em;
        color: var(--ink);
    }
    .rk-empty__text { max-width: 46ch; color: var(--ink-2); font-size: 15px; }
    .rk-empty__list { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; color: var(--ink-2); font-size: 14px; text-align: left; }
    .rk-empty__list li { display: flex; gap: 8px; align-items: flex-start; }
    .rk-empty__list li::before { content: ""; flex: 0 0 auto; width: 6px; height: 6px; margin-top: 8px; border-radius: 50%; background: var(--accent); }
    .rk-empty__hint { margin-top: 6px; color: var(--ink-3); font-size: 13px; max-width: 48ch; }
    .rk-empty__action { margin-top: 12px; }
    .rk-empty--page { max-width: 620px; margin: 40px auto; padding: 56px 32px; }

    /* ==========================================================================
       Werkbalk, zoeken, tabs
       ========================================================================== */
    .rk-toolbar {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 10px;
        margin-bottom: 20px;
    }
    .rk-toolbar > .rk-select, .rk-toolbar > .rk-input { width: auto; min-width: 180px; flex: 0 1 auto; }
    @media (max-width: 639px) {
        .rk-toolbar > .rk-select, .rk-toolbar > .rk-input { flex: 1 1 100%; }
    }
    .rk-search { position: relative; flex: 1 1 280px; max-width: 460px; }
    .rk-search > svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
    .rk-search .rk-input { padding-left: 42px; }

    .rk-tabs {
        display: flex;
        gap: 4px;
        margin-bottom: 24px;
        border-bottom: 1px solid var(--line);
        overflow-x: auto;
        scrollbar-width: none;
    }
    .rk-tabs::-webkit-scrollbar { display: none; }
    .rk-tab {
        position: relative;
        min-height: 44px;
        padding: 0 14px;
        border: 0;
        background: transparent;
        color: var(--ink-2);
        font-size: 14px;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
        transition: color .15s var(--ease);
    }
    .rk-tab:hover { color: var(--ink); }
    .rk-tab::after {
        content: "";
        position: absolute;
        left: 10px;
        right: 10px;
        bottom: -1px;
        height: 2px;
        border-radius: 2px;
        background: transparent;
        transition: background-color .2s var(--ease);
    }
    .rk-tab--active { color: var(--ink); }
    .rk-tab--active::after { background: var(--accent); }

    /* ==========================================================================
       Lay-outhulpen
       ========================================================================== */
    .rk-stack { display: flex; flex-direction: column; gap: 14px; }
    .rk-split { display: grid; gap: 24px; align-items: start; }
    @media (min-width: 1100px) {
        .rk-split { grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; }
    }
    .rk-sticky-actions {
        position: sticky;
        bottom: 16px;
        margin-top: 16px;
        padding: 16px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-2);
    }
    @media (min-width: 1100px) { .rk-sticky-actions { top: 88px; bottom: auto; } }

    /* ==========================================================================
       Modal
       ========================================================================== */
    .rk-modal-overlay {
        position: fixed;
        inset: 0;
        z-index: 9999;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding: 24px 16px;
        overflow-y: auto;
        background: var(--overlay);
    }
    .rk-modal {
        position: relative;
        width: 100%;
        margin-top: 6vh;
        margin-bottom: auto;
        display: flex;
        flex-direction: column;
        max-height: 88vh;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--r-xl);
        box-shadow: var(--shadow-3);
        animation: rk-modal-in .28s var(--ease) both;
    }
    @keyframes rk-modal-in {
        from { opacity: 0; transform: translateY(12px) scale(.985); }
        to { opacity: 1; transform: none; }
    }
    .rk-modal--sm { max-width: 440px; }
    .rk-modal--md { max-width: 560px; }
    .rk-modal--lg { max-width: 760px; }
    .rk-modal--xl { max-width: 980px; }
    .rk-modal__kop {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 16px;
        padding: 22px 24px 8px;
    }
    .rk-modal__kop h2 {
        font-family: var(--font-display);
        font-size: 22px;
        font-weight: 750;
        letter-spacing: -.015em; word-spacing: .1em;
    }
    .rk-modal__sluit {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 36px;
        height: 36px;
        flex: 0 0 auto;
        border: 0;
        border-radius: 50%;
        background: var(--surface-sunken);
        color: var(--ink-2);
        cursor: pointer;
        transition: background-color .15s var(--ease), color .15s var(--ease);
    }
    .rk-modal__sluit:hover { color: var(--ink); background: var(--line); }
    .rk-modal__body { padding: 12px 24px 24px; overflow-y: auto; }
    .rk-modal__voet {
        display: flex;
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 10px;
        padding: 16px 24px;
        border-top: 1px solid var(--line-soft);
        background: var(--surface-2);
        border-radius: 0 0 var(--r-xl) var(--r-xl);
    }
    @media (max-width: 639px) {
        .rk-modal-overlay { align-items: flex-end; padding: 0; }
        .rk-modal { margin: 0; max-height: 92vh; border-radius: var(--r-xl) var(--r-xl) 0 0; }
        .rk-modal__voet { border-radius: 0; padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
        .rk-modal__voet .knop { flex: 1 1 auto; }
    }

    /* ==========================================================================
       Modules (superadmin) — kaarten, matrix, keuzelijst en gebruik
       ========================================================================== */
    .rk-module-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
    @media (max-width: 400px) { .rk-module-grid { grid-template-columns: 1fr; } }
    .rk-module-card {
        display: flex;
        flex-direction: column;
        gap: 16px;
        padding: 22px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
        transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
    }
    .rk-module-card:hover { box-shadow: var(--shadow-2); }
    .rk-module-card--on { border-color: color-mix(in srgb, var(--success) 35%, var(--line-soft)); }
    .rk-module-card__head { display: flex; align-items: flex-start; gap: 14px; }
    .rk-module-card__head > div { flex: 1 1 auto; min-width: 0; }
    .rk-module-card__icon, .rk-module-pick__icon, .rk-module-usage__icon {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 42px;
        height: 42px;
        border-radius: 13px;
        background: var(--surface-sunken);
        color: var(--ink-2);
    }
    .rk-module-card--on .rk-module-card__icon { background: var(--success-soft); color: var(--success); }
    .rk-module-card__title { font-family: var(--font-display); font-size: 19px; font-weight: 750; }
    .rk-module-card__tagline { margin-top: 2px; color: var(--ink-2); font-size: 13px; }
    .rk-module-card__features { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 13px; color: var(--ink-2); }
    .rk-module-card__features li { display: flex; gap: 8px; align-items: flex-start; }
    .rk-module-card__features svg { flex: 0 0 auto; margin-top: 3px; color: var(--success); }
    .rk-module-card__category { display: inline-block; margin-bottom: 2px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
    .rk-module-card__forwhom { font-size: 13px; color: var(--ink-2); }
    .rk-module-card__example { margin: 0; padding: 10px 12px; border-left: 3px solid var(--line); border-radius: 0 var(--r-sm) var(--r-sm) 0; background: var(--surface-2); font-size: 13px; color: var(--ink-2); }
    .rk-module-card__more summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); }
    .rk-module-card__more[open] summary { margin-bottom: 8px; }
    .rk-module-card__fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .rk-module-card__foot {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        margin-top: auto;
        padding-top: 14px;
        border-top: 1px solid var(--line-soft);
    }

    /* ==========================================================================
       Overzicht van alle modules (/modules): vlak, per categorie, geen verlopen
       ========================================================================== */
    .rk-modov-intro {
        display: grid;
        gap: 16px 28px;
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
        margin-bottom: 28px;
        padding: 20px 22px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        font-size: 14px;
        color: var(--ink-2);
    }
    .rk-modov-intro__title { margin-bottom: 4px; font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--ink); }
    .rk-modov-intro__count { grid-column: 1 / -1; padding-top: 12px; border-top: 1px solid var(--line-soft); font-weight: 600; color: var(--ink); }
    .rk-modov-group { margin-bottom: 32px; }
    .rk-modov-group__head { margin-bottom: 12px; }
    .rk-modov-group__title { font-family: var(--font-display); font-size: 18px; font-weight: 750; color: var(--ink); }
    .rk-modov-group__summary { margin-top: 2px; font-size: 13px; color: var(--ink-3); }
    .rk-modov-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
    @media (max-width: 400px) { .rk-modov-grid { grid-template-columns: 1fr; } }
    .rk-modov-card {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 20px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
    }
    .rk-modov-card--on { border-color: color-mix(in srgb, var(--success) 35%, var(--line-soft)); }
    .rk-modov-card__head { display: flex; align-items: flex-start; gap: 12px; }
    .rk-modov-card__head > div { flex: 1 1 auto; min-width: 0; }
    .rk-modov-card__icon {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 40px;
        height: 40px;
        border-radius: 12px;
        background: var(--surface-sunken);
        color: var(--ink-2);
    }
    .rk-modov-card--on .rk-modov-card__icon { background: var(--success-soft); color: var(--success); }
    .rk-modov-card__title { font-family: var(--font-display); font-size: 17px; font-weight: 750; color: var(--ink); }
    .rk-modov-card__tagline { margin-top: 2px; font-size: 13px; color: var(--ink-2); }
    .rk-modov-chip {
        flex: 0 0 auto;
        padding: 3px 10px;
        border-radius: var(--r-pill);
        background: var(--surface-sunken);
        color: var(--ink-2);
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
    }
    .rk-modov-chip--on { background: var(--success-soft); color: var(--success); }
    .rk-modov-card__body { display: grid; gap: 4px; margin: 0; font-size: 13px; color: var(--ink-2); }
    .rk-modov-card__body dt { margin-top: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-3); }
    .rk-modov-card__body dd { margin: 0; }
    .rk-modov-card__benefits { margin: 0; padding: 0; list-style: none; display: grid; gap: 4px; }
    .rk-modov-card__benefits li { display: flex; gap: 8px; align-items: flex-start; }
    .rk-modov-card__benefits svg { flex: 0 0 auto; margin-top: 3px; color: var(--success); }
    .rk-modov-card__example {
        margin: 0;
        padding: 10px 12px;
        border-left: 3px solid var(--line);
        border-radius: 0 var(--r-sm) var(--r-sm) 0;
        background: var(--surface-2);
        color: var(--ink-2);
    }
    .rk-modov-card__request {
        display: flex;
        gap: 8px;
        align-items: flex-start;
        margin-top: auto;
        padding-top: 12px;
        border-top: 1px solid var(--line-soft);
        font-size: 13px;
        color: var(--ink-2);
    }
    .rk-modov-card__request svg { flex: 0 0 auto; margin-top: 2px; color: var(--info); }

    .rk-matrix-wrap {
        overflow-x: auto;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
    }
    .rk-matrix { min-width: 720px; }
    .rk-matrix th:first-child, .rk-matrix td:first-child {
        position: sticky;
        left: 0;
        z-index: 1;
        background: var(--surface);
        min-width: 200px;
    }
    .rk-matrix tbody tr:hover td:first-child { background: var(--surface-2); }
    .rk-matrix thead th { vertical-align: bottom; }
    .rk-matrix__head { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; text-transform: none; letter-spacing: 0; font-size: 12px; color: var(--ink-2); white-space: normal; text-align: center; min-width: 88px; }
    .rk-matrix__head svg { color: var(--ink-3); }
    .rk-matrix__head--vertical { writing-mode: vertical-rl; transform: rotate(180deg); }
    .rk-matrix__cell { text-align: center; }

    .rk-module-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
    .rk-module-pick__item {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 14px 16px;
        border-radius: var(--r-md);
        border: 1px solid var(--line);
        background: var(--surface);
        cursor: pointer;
        transition: border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease);
    }
    .rk-module-pick__item:hover { border-color: var(--ink-3); }
    .rk-module-pick__item--on { border-color: var(--accent); background: var(--accent-soft); }
    .rk-module-pick__item--on .rk-module-pick__icon { background: var(--surface); color: var(--accent-text); }
    .rk-module-pick__item > span:last-child { display: flex; flex-direction: column; min-width: 0; }
    .rk-module-pick__item strong { font-size: 14px; }
    .rk-module-pick__item small { color: var(--ink-2); font-size: 12px; }

    .rk-module-usage { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .rk-module-usage__item {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 14px;
        border-radius: var(--r-md);
        background: var(--surface-2);
        border: 1px solid var(--line);
        color: var(--ink);
        text-decoration: none;
        transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
    }
    .rk-module-usage__item:hover { border-color: var(--line); box-shadow: var(--shadow-1); text-decoration: none; color: var(--ink); }
    .rk-module-usage__icon { width: 36px; height: 36px; border-radius: 11px; background: var(--surface); }
    .rk-module-usage__name { flex: 1 1 auto; font-size: 14px; font-weight: 500; }
    .rk-module-usage__count { font-family: var(--font-display); font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }

    /* Snelkoppelingen (platform-home) */
    .rk-quick-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .rk-quick {
        display: flex;
        flex-direction: column;
        gap: 4px;
        padding: 20px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
        color: var(--ink);
        text-decoration: none;
        transition: box-shadow .2s var(--ease), transform .2s var(--ease);
    }
    .rk-quick:hover { box-shadow: var(--shadow-2); transform: translateY(-1px); text-decoration: none; color: var(--ink); }
    .rk-quick > svg { margin-bottom: 10px; color: var(--accent-text); }
    .rk-quick > span { font-weight: 600; font-size: 15px; }
    .rk-quick > small { color: var(--ink-2); font-size: 13px; }

    /* ==========================================================================
       Tijdlijn (logboeken) en systeemcontroles
       ========================================================================== */
    .rk-timeline { position: relative; margin: 0; padding: 0; list-style: none; }
    .rk-timeline::before { content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px; background: var(--line); }
    .rk-timeline__item { position: relative; display: flex; gap: 14px; padding: 10px 0; }
    .rk-timeline__dot {
        position: relative;
        z-index: 1;
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 31px;
        height: 31px;
        border-radius: 50%;
        background: var(--surface-sunken);
        color: var(--ink-2);
        box-shadow: 0 0 0 4px var(--canvas);
    }
    .rk-timeline__dot--success { background: var(--success-soft); color: var(--success); }
    .rk-timeline__dot--danger { background: var(--danger-soft); color: var(--danger); }
    .rk-timeline__dot--neutral { background: var(--surface-sunken); color: var(--ink-2); }
    .rk-timeline__body { min-width: 0; padding-top: 4px; }
    .rk-timeline__title { font-size: 14px; font-weight: 600; color: var(--ink); }
    .rk-timeline__meta { margin-top: 2px; font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }

    /* Foutrapporten (crashes) in het gebruikersdetail. */
    .rk-crashes { display: flex; flex-direction: column; gap: 8px; }
    .rk-crash { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); overflow: hidden; }
    .rk-crash__kop { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; list-style: none; }
    .rk-crash__kop::-webkit-details-marker { display: none; }
    .rk-crash__melding { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rk-crash__body { padding: 0 14px 12px; border-top: 1px solid var(--line-soft); }
    .rk-crash__stack {
        margin: 10px 0 0;
        padding: 10px 12px;
        background: var(--surface-sunken);
        border-radius: 8px;
        font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
        font-size: 12px;
        line-height: 1.5;
        color: var(--ink-2);
        white-space: pre-wrap;
        word-break: break-word;
        max-height: 320px;
        overflow: auto;
    }

    .rk-check-list {
        display: grid;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
        overflow: hidden;
    }
    .rk-check {
        display: grid;
        grid-template-columns: auto 1fr;
        align-items: center;
        gap: 4px 14px;
        padding: 16px 20px;
    }
    .rk-check + .rk-check { border-top: 1px solid var(--line-soft); }
    .rk-check__icon { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; }
    .rk-check--ok .rk-check__icon { background: var(--success-soft); color: var(--success); }
    .rk-check--bad .rk-check__icon { background: var(--danger-soft); color: var(--danger); }
    .rk-check__name { font-weight: 600; font-size: 14px; }
    .rk-check__detail { color: var(--ink-2); font-size: 13px; }
    @media (min-width: 720px) {
        .rk-check { grid-template-columns: auto 220px 1fr; }
        .rk-check__icon { grid-row: auto; }
    }

    /* ==========================================================================
       Verzuim, automatisch plannen, meldingen-logboek
       ========================================================================== */
    .rk-absence {
        padding: 20px 22px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
        animation: rk-rise .3s var(--ease) both;
    }
    .rk-absence--attention { border-color: color-mix(in srgb, var(--danger) 35%, var(--line-soft)); box-shadow: inset 3px 0 0 var(--danger), var(--shadow-1); }
    .rk-absence--closed { background: var(--surface-2); box-shadow: none; }
    .rk-absence--closed .rk-absence__name { color: var(--ink-2); }
    .rk-absence__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
    .rk-absence__name { font-family: var(--font-display); font-size: 20px; font-weight: 750; }
    .rk-absence__head p { margin-top: 2px; }
    .rk-absence__grid { display: grid; gap: 16px; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 14px; }
    @media (min-width: 720px) { .rk-absence__grid { grid-template-columns: 1fr 1fr; } }
    .rk-absence__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }

    .rk-autoplan-controls { margin-bottom: 8px; }
    .rk-autoplan-controls__row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 16px 20px; }
    .rk-autoplan-controls__row > .rk-field { flex: 0 1 220px; }

    .rk-plan-row {
        display: grid;
        grid-template-columns: 64px minmax(0, 1fr);
        gap: 12px 16px;
        align-items: center;
        padding: 14px 16px;
        border-radius: var(--r-md);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
    }
    .rk-plan-row--open { background: var(--surface-2); box-shadow: none; border-style: dashed; border-color: var(--line); }
    .rk-plan-row__time { display: flex; flex-direction: column; font-variant-numeric: tabular-nums; line-height: 1.2; }
    .rk-plan-row__time strong { font-size: 16px; font-weight: 600; }
    .rk-plan-row__time span { font-size: 13px; color: var(--ink-3); }
    .rk-plan-row__label { font-weight: 600; font-size: 14px; }
    .rk-plan-row__reasons { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
    .rk-plan-row__why { display: flex; align-items: flex-start; gap: 6px; margin-top: 4px; color: var(--ink-2); font-size: 13px; }
    .rk-plan-row__why svg { flex: 0 0 auto; margin-top: 2px; }
    .rk-plan-row__pick { grid-column: 1 / -1; }
    @media (min-width: 720px) {
        .rk-plan-row { grid-template-columns: 64px minmax(0, 1fr) 240px; }
        .rk-plan-row__pick { grid-column: auto; justify-self: end; width: 100%; text-align: right; }
    }

    .rk-hours-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
    .rk-hours-list li { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 14px; }
    .rk-hours-list li .rk-progress { grid-column: 1 / -1; }

    .rk-batch {
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
        overflow: hidden;
        transition: box-shadow .2s var(--ease);
    }
    .rk-batch:hover { box-shadow: var(--shadow-2); }
    .rk-batch--warn { box-shadow: inset 3px 0 0 var(--warning), var(--shadow-1); }
    .rk-batch__head {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        align-items: center;
        gap: 10px 14px;
        width: 100%;
        padding: 16px 18px;
        border: 0;
        background: transparent;
        color: var(--ink);
        text-align: left;
        cursor: pointer;
    }
    .rk-batch__head > svg:last-child { color: var(--ink-3); }
    .rk-batch__icon {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: var(--accent-soft);
        color: var(--accent-text);
    }
    .rk-batch--warn .rk-batch__icon { background: var(--warning-soft); color: var(--warning-text); }
    .rk-batch__main { display: flex; flex-direction: column; min-width: 0; }
    .rk-batch__title { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rk-batch__body { color: var(--ink-2); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rk-batch__meta, .rk-batch__stats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; grid-column: 2 / -1; }
    .rk-batch__stats { font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
    .rk-batch__stats > span { display: inline-flex; align-items: center; gap: 5px; }
    .rk-batch__head > svg:last-child { grid-row: 1; grid-column: 3; }
    @media (min-width: 900px) {
        .rk-batch__head { grid-template-columns: auto minmax(0, 1fr) auto auto auto; }
        .rk-batch__meta, .rk-batch__stats { grid-column: auto; flex-wrap: nowrap; }
        .rk-batch__head > svg:last-child { grid-column: auto; grid-row: auto; }
    }
    .rk-batch__people { border-top: 1px solid var(--line-soft); background: var(--surface-2); }
    .rk-batch__people tbody tr:hover { background: var(--surface); }

    /* ==========================================================================
       Inloggen en organisatie kiezen (binnen AuthShell)
       ========================================================================== */
    .rk-auth-form { display: flex; flex-direction: column; gap: 18px; }
    .rk-auth-form__row { display: flex; justify-content: flex-end; margin-top: -6px; font-size: 14px; }
    .rk-auth-form .knop-groot { margin-top: 6px; }
    .rk-auth-field { display: flex; flex-direction: column; gap: 8px; }
    .rk-auth-field label { font-size: 14px; font-weight: 600; color: var(--ink); }
    .rk-auth-field .rk-input { min-height: 48px; font-size: 16px; padding: 12px 14px; }
    .rk-auth-field__password { position: relative; }
    .rk-auth-field__password .rk-input { padding-right: 56px; }
    .rk-auth-field__eye {
        position: absolute;
        top: 2px;
        right: 2px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 0;
        border-radius: 12px;
        background: transparent;
        color: var(--ink-2);
        cursor: pointer;
    }
    .rk-auth-field__eye:hover { background: var(--surface-sunken); color: var(--ink); }
    .rk-auth-field__hint { font-size: 13px; color: var(--ink-3); }
    .rk-auth-foot { margin-top: 28px; text-align: center; font-size: 14px; color: var(--ink-2); }

    .rk-org-choice {
        display: flex;
        align-items: center;
        gap: 14px;
        width: 100%;
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: var(--r-lg);
        background: var(--surface);
        box-shadow: var(--shadow-1);
        color: var(--ink);
        text-align: left;
        cursor: pointer;
        transition: box-shadow .2s var(--ease), border-color .2s var(--ease), transform .1s var(--ease);
    }
    .rk-org-choice:hover { box-shadow: var(--shadow-2); border-color: var(--line); }
    .rk-org-choice:active { transform: scale(.99); }
    .rk-org-choice > svg { color: var(--ink-3); }
    .rk-org-choice__mono {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 44px;
        height: 44px;
        border-radius: 13px;
        background: var(--ink);
        color: var(--ink-inverse);
        font-family: var(--font-display);
        font-size: 18px;
        font-weight: 600;
    }
    .rk-org-choice__text { display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; }
    .rk-org-choice__name { font-weight: 600; font-size: 15px; }
    .rk-org-choice__role { color: var(--ink-3); font-size: 13px; }

    /* ==========================================================================
       Aanmeldwizard (nieuw bedrijf)
       ========================================================================== */
    .onboarding-steps { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
    .onboarding-step { display: flex; align-items: center; gap: 8px; font-size: 13px; }
    .onboarding-step:not(:last-child)::after { content: ""; width: 18px; height: 1px; background: var(--line); margin-left: 2px; }
    .onboarding-step__dot {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 auto;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink-3);
        font-size: 12px;
        font-weight: 600;
        font-variant-numeric: tabular-nums;
    }
    .onboarding-step__label { color: var(--ink-3); }
    .onboarding-step--active .onboarding-step__dot { border-color: var(--ink); background: var(--ink); color: var(--ink-inverse); }
    .onboarding-step--active .onboarding-step__label { color: var(--ink); font-weight: 600; }
    .onboarding-step--done .onboarding-step__dot { border-color: transparent; background: var(--success-soft); color: var(--success); }
    .onboarding-step--done .onboarding-step__label { color: var(--ink-2); }
    @media (max-width: 639px) {
        .onboarding-step:not(.onboarding-step--active) .onboarding-step__label { display: none; }
    }

    .onboarding-option {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        width: 100%;
        padding: 14px 16px;
        border: 1px solid var(--line);
        border-radius: var(--r-md);
        background: var(--surface);
        color: var(--ink);
        text-align: left;
        cursor: pointer;
        transition: border-color .15s var(--ease), background-color .15s var(--ease);
    }
    .onboarding-option:hover { border-color: var(--ink-3); }
    .onboarding-option--selected { border-color: var(--accent); background: var(--accent-soft); }
    .onboarding-option__radio {
        position: relative;
        flex: 0 0 auto;
        width: 20px;
        height: 20px;
        margin-top: 1px;
        border-radius: 50%;
        border: 1.5px solid color-mix(in srgb, var(--ink-3) 70%, var(--line));
        background: var(--surface);
    }
    .onboarding-option--selected .onboarding-option__radio { border-color: var(--accent); }
    .onboarding-option--selected .onboarding-option__radio::after { content: ""; position: absolute; inset: 4px; border-radius: 50%; background: var(--accent); }

    .onboarding-summary { display: grid; margin: 0; }
    .onboarding-summary > div { display: grid; grid-template-columns: 9rem 1fr; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
    .onboarding-summary dt { color: var(--ink-3); font-size: 14px; }
    .onboarding-summary dd { margin: 0; min-width: 0; color: var(--ink); font-weight: 500; overflow-wrap: anywhere; }

    /* De bedrijfscode op de laatste stap van het aanmelden. */
    .onboarding-code { padding: 14px 16px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-soft); }
    .onboarding-code__label { margin: 0; color: var(--ink); font-size: 15px; }
    .onboarding-code__label strong { font-family: var(--font-mono, ui-monospace, monospace); overflow-wrap: anywhere; }
    .onboarding-code__note { margin: 4px 0 0; color: var(--ink-2); font-size: 14px; }

    /* Honeypot: buiten beeld voor mensen. */
    .onboarding-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

    /* De ALTCHA-widget in de kleuren van het paneel. De variabelen erven door naar .altcha
       en volgen licht en donker vanzelf via de thematokens. */
    .onboarding-altcha {
        min-height: 64px;
        --altcha-color-base: var(--surface);
        --altcha-color-base-content: var(--ink);
        --altcha-color-neutral: var(--line);
        --altcha-color-neutral-content: var(--ink-2);
        --altcha-color-primary: var(--accent);
        --altcha-color-primary-content: var(--accent-ink);
        --altcha-color-success: var(--success);
        --altcha-color-success-content: #fff;
        --altcha-color-error: var(--danger);
        --altcha-color-error-content: #fff;
        --altcha-border-color: var(--line);
        --altcha-border-radius: var(--r-md);
        --altcha-checkbox-border-color: var(--ink-3);
        --altcha-checkbox-outline-color: var(--accent);
        --altcha-spinner-color: var(--accent);
        --altcha-max-width: 100%;
        --altcha-shadow: none;
    }
    @media (prefers-reduced-motion: reduce) {
        .onboarding-altcha { --altcha-transition-duration: 0s; --altcha-checkbox-transition-duration: 0s; }
    }

    /* ==========================================================================
       Huisstijl — logo-vakken en telefoon-voorbeeld
       ========================================================================== */
    .rk-logo-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
    .rk-logo-slot { display: flex; flex-direction: column; gap: 10px; }
    .rk-logo-slot__preview {
        display: grid;
        place-items: center;
        height: 132px;
        padding: 18px;
        border-radius: var(--r-md);
        border: 1px dashed var(--line);
        background: var(--surface-2);
    }
    .rk-logo-slot__preview img { max-width: 100%; max-height: 92px; object-fit: contain; }
    .rk-logo-slot--dark .rk-logo-slot__preview { background: #16181D; border-color: #2A2E36; }
    .rk-logo-slot__leeg { color: var(--ink-2); }
    .rk-logo-slot--dark .rk-logo-slot__preview .rk-logo-slot__leeg { color: #A5A9B1; }
    .rk-logo-slot__label { font-size: 14px; font-weight: 600; }
    .rk-logo-slot__actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .rk-logo-slot__actions .knop { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: var(--r-sm); }

    /* CSS-telefoon die de app in de huisstijl toont. --preview-accent = de gekozen kleur. */
    .rk-phone {
        --p-bg: #F6F4F0;
        --p-surface: #FFFFFF;
        --p-ink: #16181D;
        --p-ink-2: #4B505A;
        --p-line: #EFECE6;
        position: relative;
        width: 290px;
        max-width: 100%;
        margin: 0 auto;
        aspect-ratio: 9 / 18.5;
        padding: 14px;
        border-radius: 46px;
        background: #0E0F12;
        box-shadow: var(--shadow-3), inset 0 0 0 2px #2A2E36;
    }
    .rk-phone--dark { --p-bg: #0E0F12; --p-surface: #16181D; --p-ink: #F3F1EC; --p-ink-2: #B7BBC3; --p-line: #22252C; }
    .rk-phone > * { position: relative; }
    .rk-phone::before {
        content: "";
        position: absolute;
        inset: 14px;
        border-radius: 34px;
        background: var(--p-bg);
        transition: background-color .3s var(--ease);
    }
    .rk-phone__notch {
        position: absolute;
        top: 24px;
        left: 50%;
        z-index: 2;
        width: 88px;
        height: 24px;
        border-radius: 14px;
        background: #0E0F12;
        transform: translateX(-50%);
    }
    .rk-phone__header {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 50px 18px 12px;
        color: var(--p-ink);
    }
    .rk-phone__logo {
        width: 34px;
        height: 34px;
        object-fit: contain;
        border-radius: 10px;
        background: var(--p-surface);
        padding: 3px;
    }
    .rk-phone__roosterke {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        background: #16181D;
    }
    .rk-phone__roosterke img { width: 64%; height: 64%; }
    .rk-phone__monogram {
        display: grid;
        place-items: center;
        width: 34px;
        height: 34px;
        border-radius: 10px;
        color: #fff;
        font-family: var(--font-display);
        font-size: 14px;
        font-weight: 600;
    }
    .rk-phone__name {
        min-width: 0;
        font-family: var(--font-display);
        font-size: 18px;
        font-weight: 750;
        letter-spacing: -.015em; word-spacing: .1em;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    .rk-phone__body { display: flex; flex-direction: column; gap: 10px; padding: 4px 14px; }
    .rk-phone__hero {
        display: flex;
        flex-direction: column;
        gap: 2px;
        padding: 16px;
        border-radius: 20px;
        background: var(--preview-accent, var(--accent));
        color: #fff;
    }
    .rk-phone__hero small { font-size: 11px; opacity: .8; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
    .rk-phone__hero strong { font-family: var(--font-display); font-size: 19px; font-weight: 750; line-height: 1.15; }
    .rk-phone__hero span { font-size: 12px; opacity: .85; }
    .rk-phone__button {
        min-height: 40px;
        border: 0;
        border-radius: 13px;
        background: var(--p-ink);
        color: var(--p-bg);
        font-size: 13px;
        font-weight: 600;
        cursor: default;
    }
    .rk-phone__card {
        height: 58px;
        border-radius: 16px;
        background: var(--p-surface);
        border: 1px solid var(--p-line);
        position: relative;
    }
    .rk-phone__card::before, .rk-phone__card::after {
        content: "";
        position: absolute;
        left: 14px;
        height: 8px;
        border-radius: 4px;
        background: var(--p-line);
    }
    .rk-phone__card::before { top: 16px; width: 55%; }
    .rk-phone__card::after { top: 32px; width: 35%; background: color-mix(in srgb, var(--preview-accent, var(--accent)) 30%, transparent); }
    .rk-phone__card--short { height: 44px; }
    .rk-phone__card--short::after { display: none; }
    .rk-phone__tabs {
        position: absolute;
        left: 14px;
        right: 14px;
        bottom: 14px;
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 62px;
        border-radius: 0 0 34px 34px;
        background: var(--p-surface);
        border-top: 1px solid var(--p-line);
    }
    .rk-phone__tab { width: 22px; height: 22px; border-radius: 7px; background: var(--p-line); }
    .rk-phone__tab--active { background: var(--preview-accent, var(--accent)); }

    /* Verzendresultaat (Melding versturen). */
    .send-result-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        border-bottom: 1px solid var(--line-soft);
        font-size: 14px;
    }
    .send-result-row:last-child { border-bottom: 0; }
    .send-result-row .token { font-family: var(--font-mono); color: var(--ink-3); font-size: 12px; }

    /* ==========================================================================
       Meldingen — logboek (tijdlijn per dag), composer met voorbeeld, voorkeuren
       ========================================================================== */
    .rk-log-filters { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
    .rk-log-filters .rk-search { flex: none; width: 100%; max-width: 520px; }
    .rk-chip-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
    .rk-chip-row__sep { width: 1px; height: 20px; margin: 0 6px; background: var(--line); }
    @media (max-width: 639px) {
        .rk-chip-row { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 0 16px 2px; scrollbar-width: none; }
        .rk-chip-row::-webkit-scrollbar { display: none; }
    }
    .rk-filter-chip {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        flex: 0 0 auto;
        min-height: 34px;
        padding: 0 12px;
        border-radius: var(--r-pill);
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink-2);
        font-size: 13px;
        font-weight: 600;
        white-space: nowrap;
        cursor: pointer;
        transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
    }
    .rk-filter-chip:hover { color: var(--ink); border-color: var(--ink-3); }
    .rk-filter-chip.is-active { background: var(--ink); border-color: var(--ink); color: var(--ink-inverse); }

    .rk-pill {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        min-height: 22px;
        padding: 1px 8px;
        border-radius: var(--r-pill);
        background: var(--surface-sunken);
        color: var(--ink-2);
        font-size: 12px;
        font-weight: 600;
        white-space: nowrap;
        font-variant-numeric: tabular-nums;
    }
    .rk-pill--ok { background: var(--success-soft); color: var(--success); }
    .rk-pill--bad { background: var(--danger-soft); color: var(--danger); }
    .rk-pill--warn { background: var(--warning-soft); color: var(--warning-text); }

    .rk-log__day + .rk-log__day { margin-top: 32px; }
    .rk-log__day-title { margin-bottom: 12px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; color: var(--ink); }
    .rk-log__list { position: relative; margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
    .rk-log__item { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: start; }
    .rk-log__time { padding-top: 22px; font-size: 13px; font-weight: 600; color: var(--ink-3); text-align: right; }
    @media (max-width: 639px) {
        .rk-log__item { grid-template-columns: minmax(0, 1fr); gap: 4px; }
        .rk-log__time { padding-top: 0; text-align: left; }
    }
    .rk-log-batch { border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
    .rk-log-batch--problem { border-left: 3px solid var(--danger); }
    .rk-log-batch__head {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 14px;
        align-items: start;
        width: 100%;
        padding: 16px 18px;
        border: 0;
        background: transparent;
        color: var(--ink);
        text-align: left;
        cursor: pointer;
    }
    .rk-log-batch__head:hover { background: var(--surface-2); }
    .rk-log-batch__icon {
        display: grid;
        place-items: center;
        width: 38px;
        height: 38px;
        border-radius: 12px;
        background: var(--surface-sunken);
        color: var(--ink-2);
    }
    .rk-log-batch__main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .rk-log-batch__type { font-size: 12px; font-weight: 600; color: var(--ink-3); }
    .rk-log-batch__title { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
    .rk-log-batch__body { color: var(--ink-2); font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .is-open .rk-log-batch__body { white-space: normal; }
    .rk-log-batch__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
    .rk-log-batch__chevron { padding-top: 10px; color: var(--ink-3); }
    .rk-log-people { margin: 0; padding: 4px 0; list-style: none; border-top: 1px solid var(--line-soft); background: var(--surface-2); }
    .rk-log-people__row {
        display: grid;
        grid-template-columns: minmax(140px, 1.2fr) auto auto minmax(140px, 1fr);
        gap: 8px 16px;
        align-items: center;
        padding: 10px 18px 10px 70px;
        font-size: 14px;
    }
    .rk-log-people__row + .rk-log-people__row { border-top: 1px solid var(--line-soft); }
    .rk-log-people__name { display: flex; flex-direction: column; font-weight: 600; }
    .rk-log-people__name small { font-weight: 500; color: var(--danger); font-size: 12px; }
    .rk-log-people__channel, .rk-log-people__read { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-3); font-size: 13px; }
    @media (max-width: 719px) {
        .rk-log-people__row { grid-template-columns: 1fr 1fr; padding-left: 18px; }
        .rk-log-people__name, .rk-log-people__read { grid-column: 1 / -1; }
    }

    /* Composer: stappen links, telefoonvoorbeeld rechts. */
    .rk-composer { display: grid; gap: 28px; align-items: start; }
    @media (min-width: 1100px) { .rk-composer { grid-template-columns: minmax(0, 1fr) 320px; } .rk-composer__preview { position: sticky; top: 88px; } }
    .rk-composer__title { margin-bottom: 18px; font-size: 20px; font-weight: 750; letter-spacing: -.02em; }
    .rk-composer__foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
    .rk-composer__foot > .knop-stil:first-child { margin-left: -12px; }
    .rk-steps { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 0; list-style: none; }
    .rk-steps__button {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        min-height: 36px;
        padding: 0 14px 0 6px;
        border-radius: var(--r-pill);
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink-3);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
    }
    .rk-steps__button:disabled { cursor: default; }
    .rk-steps__dot { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--surface-sunken); color: var(--ink-2); font-size: 12px; font-variant-numeric: tabular-nums; }
    .rk-steps__item.is-active .rk-steps__button { border-color: var(--ink); color: var(--ink); }
    .rk-steps__item.is-active .rk-steps__dot { background: var(--ink); color: var(--ink-inverse); }
    .rk-steps__item.is-done .rk-steps__button { color: var(--ink-2); }
    .rk-steps__item.is-done .rk-steps__dot { background: var(--success-soft); color: var(--success); }

    .rk-choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
    .rk-choice {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        padding: 16px;
        border-radius: var(--r-md);
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink);
        text-align: left;
        cursor: pointer;
        transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
    }
    .rk-choice > svg { margin-bottom: 8px; color: var(--ink-3); }
    .rk-choice strong { font-size: 15px; }
    .rk-choice small { color: var(--ink-2); font-size: 13px; }
    .rk-choice:hover { border-color: var(--ink-3); }
    .rk-choice.is-active { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
    .rk-choice.is-active > svg { color: var(--ink); }
    .rk-people-pick { max-height: 320px; margin: 12px 0 0; padding: 0; list-style: none; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--r-md); }
    .rk-people-pick li + li { border-top: 1px solid var(--line-soft); }
    .rk-people-pick__row { display: flex; align-items: center; gap: 12px; padding: 10px 14px; cursor: pointer; font-size: 14px; }
    .rk-people-pick__row:hover { background: var(--surface-2); }
    .rk-people-pick__name { flex: 1 1 auto; font-weight: 600; }
    .rk-counter { margin-top: 2px; text-align: right; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
    .rk-counter.is-near { color: var(--warning-text); font-weight: 600; }
    .rk-summary { display: grid; margin: 0; }
    .rk-summary > div { display: grid; grid-template-columns: 8rem 1fr; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
    .rk-summary dt { color: var(--ink-3); font-size: 14px; }
    .rk-summary dd { margin: 0; font-weight: 500; white-space: pre-line; }

    /* Vergrendelscherm-voorbeeld: effen, zonder verloop. */
    .rk-lock {
        position: relative;
        width: 300px;
        max-width: 100%;
        margin: 0 auto;
        aspect-ratio: 9 / 17;
        padding: 64px 14px 20px;
        border-radius: 44px;
        background: #1F2228;
        border: 10px solid #0E0F12;
        color: #fff;
    }
    .rk-lock__notch { position: absolute; top: 12px; left: 50%; width: 84px; height: 22px; border-radius: 12px; background: #0E0F12; transform: translateX(-50%); }
    .rk-lock__clock { display: flex; flex-direction: column; align-items: center; margin-bottom: 28px; }
    .rk-lock__date { font-size: 14px; font-weight: 600; color: rgba(255, 255, 255, .85); }
    .rk-lock__time { font-size: 64px; font-weight: 700; line-height: 1; letter-spacing: -.03em; }
    .rk-lock__note { padding: 12px 14px; border-radius: 20px; background: rgba(255, 255, 255, .92); color: #16181D; }
    .rk-lock__note-head { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
    .rk-lock__app-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #16181D; overflow: hidden; }
    .rk-lock__app-icon img { width: 70%; height: 70%; object-fit: contain; }
    .rk-lock__app-icon--logo { background: #fff; box-shadow: inset 0 0 0 1px #E6E2DA; }
    .rk-lock__app-icon--logo img { width: 86%; height: 86%; }
    .rk-lock__app-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: #4B505A; }
    .rk-lock__when { font-size: 12px; color: #5F646E; }
    .rk-lock__title { font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
    .rk-lock__body { margin-top: 2px; font-size: 14px; line-height: 1.35; color: #2B2E35; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

    .rk-send-done { max-width: 620px; margin: 8px auto 0; padding: 40px 32px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: center; }
    .rk-send-done__icon { display: grid; place-items: center; width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; background: var(--success-soft); color: var(--success); animation: rk-pop .5s var(--ease) both; }
    .rk-send-done__title { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
    .rk-send-done__text { margin-top: 6px; color: var(--ink-2); }
    .rk-send-done__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0 16px; }
    .rk-send-done__stats > div { padding: 14px 10px; border-radius: var(--r-md); background: var(--surface-2); border: 1px solid var(--line-soft); }
    .rk-send-done__stats dt { font-size: 12px; color: var(--ink-3); }
    .rk-send-done__stats dd { margin: 4px 0 0; font-size: 28px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
    .rk-send-done__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px; }
    @media (max-width: 519px) { .rk-send-done__stats { grid-template-columns: 1fr; } }

    /* Voorkeurenmatrix: kop en eerste kolom blijven staan tijdens scrollen. */
    .rk-pref-wrap { position: relative; max-height: 70vh; overflow: auto; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
    .rk-pref-table { width: 100%; min-width: 760px; border-collapse: separate; border-spacing: 0; font-size: 14px; }
    .rk-pref-table th, .rk-pref-table td { padding: 10px 12px; border-bottom: 1px solid var(--line-soft); background: var(--surface); text-align: center; vertical-align: middle; }
    .rk-pref-table thead th, .rk-pref-table thead td { position: sticky; z-index: 2; }
    .rk-pref-table thead tr:first-child th { top: 0; height: 88px; vertical-align: bottom; }
    .rk-pref-table__summary th, .rk-pref-table__summary td { top: 88px; background: var(--surface-2) !important; border-bottom: 1px solid var(--line); }
    .rk-pref-table__corner, .rk-pref-table__name { position: sticky; left: 0; z-index: 1; min-width: 200px; text-align: left !important; border-right: 1px solid var(--line-soft); }
    thead .rk-pref-table__corner { z-index: 3; font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
    .rk-pref-table__name { font-weight: 400; }
    .rk-pref-table__sub { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 2px; font-size: 12px; }
    .rk-pref-table tbody tr:hover > * { background: var(--surface-2); }
    .rk-pref-head { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; min-width: 76px; max-width: 110px; }
    .rk-pref-head__icon { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; background: var(--surface-sunken); color: var(--ink-2); }
    .rk-pref-head__label { font-size: 12px; font-weight: 600; line-height: 1.25; color: var(--ink-2); white-space: normal; }
    .rk-pref-sum { display: block; font-size: 14px; font-weight: 700; }
    .rk-pref-sum small { font-weight: 500; color: var(--ink-3); }
    .rk-pref-bar { display: block; height: 4px; margin: 6px auto 0; max-width: 64px; border-radius: 2px; background: var(--surface-sunken); overflow: hidden; }
    .rk-pref-bar > span { display: block; height: 100%; background: var(--success); }
    .rk-pref-cell { display: inline-flex; gap: 4px; }
    .rk-pref { position: relative; display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 7px; background: var(--surface-sunken); color: color-mix(in srgb, var(--ink-3) 70%, transparent); }
    .rk-pref--on { background: var(--success-soft); color: var(--success); }
    .rk-pref--mail.rk-pref--on { background: var(--info-soft); color: var(--info); }
    .rk-legend .rk-pref { width: 20px; height: 20px; margin-right: 2px; }
    @media (max-width: 639px) { .rk-pref-table__corner, .rk-pref-table__name { min-width: 140px; max-width: 150px; } }

    /* ==========================================================================
       Startchecklist (dashboard)
       ========================================================================== */
    .rk-checklist {
        position: relative;
        margin-bottom: 28px;
        padding: 26px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
    }

    .rk-checklist__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
    .rk-checklist__title { font-family: var(--font-display); font-size: 24px; font-weight: 750; letter-spacing: -.015em; word-spacing: .1em; }
    .rk-checklist__intro { margin-top: 6px; color: var(--ink-2); max-width: 60ch; }
    .rk-checklist__progress { display: flex; align-items: center; gap: 14px; margin: 20px 0 8px; }
    .rk-checklist__progress .rk-progress { height: 8px; }
    .rk-checklist__count { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: var(--ink-2); font-variant-numeric: tabular-nums; }
    .rk-checklist__list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
    @media (min-width: 900px) { .rk-checklist__list { grid-template-columns: 1fr 1fr; } }
    .rk-checklist__item {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 64px;
        padding: 12px 14px;
        border-radius: var(--r-md);
        border: 1px solid var(--line);
        background: var(--surface-2);
        color: var(--ink);
        text-decoration: none;
        transition: border-color .15s var(--ease), background-color .15s var(--ease), box-shadow .15s var(--ease);
    }
    a.rk-checklist__item:hover { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-1); text-decoration: none; color: var(--ink); }
    .rk-checklist__check {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        border: 1.5px dashed color-mix(in srgb, var(--ink-3) 70%, var(--line));
        color: transparent;
        transition: background-color .3s var(--ease), border-color .3s var(--ease);
    }
    .rk-checklist__item--done .rk-checklist__check { border: 0; background: var(--success); color: #fff; }
    .rk-checklist__text { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; }
    .rk-checklist__label { font-weight: 600; font-size: 14px; }
    .rk-checklist__item--done .rk-checklist__label { color: var(--ink-2); text-decoration: line-through; text-decoration-color: var(--ink-3); }
    .rk-checklist__hint { color: var(--ink-2); font-size: 13px; }
    .rk-checklist__item > svg:last-child { flex: 0 0 auto; color: var(--ink-3); }
    .rk-checklist--done { text-align: center; padding: 36px 26px; }
    .rk-checklist--done .rk-checklist__head { justify-content: center; }
    .rk-checklist__celebrate {
        display: grid;
        place-items: center;
        width: 72px;
        height: 72px;
        margin: 0 auto 14px;
        border-radius: 50%;
        background: var(--success-soft);
        color: var(--success);
        animation: rk-pop .6s var(--ease) both;
    }
    .rk-checklist__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; }
    @keyframes rk-pop {
        0% { transform: scale(.6); opacity: 0; }
        60% { transform: scale(1.06); opacity: 1; }
        100% { transform: none; }
    }

    /* ==========================================================================
       Helppagina
       ========================================================================== */
    .rk-help { display: grid; gap: 28px; align-items: start; }
    @media (min-width: 1100px) { .rk-help { grid-template-columns: 260px minmax(0, 1fr); } }
    .rk-help__nav {
        display: none;
        position: sticky;
        top: 88px;
        max-height: calc(100vh - 110px);
        overflow-y: auto;
        padding-right: 6px;
        scrollbar-width: thin;
    }
    @media (min-width: 1100px) { .rk-help__nav { display: block; } }
    .rk-help__nav h2 { margin: 18px 0 6px; font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3); }
    .rk-help__nav h2:first-child { margin-top: 0; }
    .rk-help__nav ul { margin: 0; padding: 0; list-style: none; }
    .rk-help__nav a {
        display: block;
        padding: 6px 10px;
        border-radius: 8px;
        color: var(--ink-2);
        font-size: 14px;
        text-decoration: none;
    }
    .rk-help__nav a:hover { background: var(--surface-sunken); color: var(--ink); text-decoration: none; }
    .rk-help__hero {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 16px;
        padding: 22px;
        margin-bottom: 20px;
        border-radius: var(--r-xl);
        background: var(--surface);
        color: var(--ink);
        border: 1px solid var(--line);
    }
    .rk-help__hero .rk-search { flex: 1 1 320px; max-width: none; }
    .rk-help__hero .rk-input { min-height: 48px; }
    .rk-help__hero-text { flex: 1 1 260px; }
    .rk-help__hero-text strong { display: block; font-family: var(--font-display); font-size: 20px; font-weight: 750; }
    .rk-help__hero-text span { font-size: 14px; opacity: .75; }
            .rk-help__cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
    @media (max-width: 639px) {
        .rk-help__cats { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px 24px; padding: 0 16px 4px; scrollbar-width: none; }
        .rk-help__cats::-webkit-scrollbar { display: none; }
        .rk-help__cat { flex: 0 0 auto; }
        .rk-help .rk-help-article { padding: 20px 18px; }
    }
    .rk-help__cat {
        min-height: 36px;
        padding: 0 14px;
        border-radius: var(--r-pill);
        border: 1px solid var(--line);
        background: var(--surface);
        color: var(--ink-2);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        transition: background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease);
    }
    .rk-help__cat:hover { color: var(--ink); border-color: var(--ink-3); }
    .rk-help__cat.is-active { background: var(--ink); border-color: var(--ink); color: var(--ink-inverse); }
    .rk-help__group + .rk-help__group { margin-top: 36px; }
    .rk-help__group-title { margin-bottom: 14px; font-family: var(--font-display); font-size: 22px; font-weight: 750; }
    .rk-help__list { display: grid; gap: 14px; }
    .rk-help-article {
        scroll-margin-top: 96px;
        padding: 22px 24px;
        border-radius: var(--r-lg);
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-1);
    }
    .rk-help-article:target { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), var(--shadow-2); }
    .rk-help-article__head { display: flex; align-items: flex-start; gap: 14px; }
    .rk-help-article__icon {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 42px;
        height: 42px;
        border-radius: 13px;
        background: var(--accent-soft);
        color: var(--accent-text);
    }
    .rk-help-article__title { font-family: var(--font-display); font-size: 20px; font-weight: 750; }
    .rk-help-article__title a { color: inherit; }
    .rk-help-article__intro { margin-top: 4px; color: var(--ink-2); }
    .rk-help-article__section { margin-top: 18px; }
    .rk-help-article__section h4 { margin-bottom: 8px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
    .rk-help-article__section p { color: var(--ink); }
    .rk-help-article__steps { margin: 0; padding: 0; list-style: none; counter-reset: stap; display: grid; gap: 8px; }
    .rk-help-article__steps li { position: relative; padding-left: 36px; counter-increment: stap; min-height: 24px; }
    .rk-help-article__steps li::before {
        content: counter(stap);
        position: absolute;
        left: 0;
        top: 0;
        display: grid;
        place-items: center;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background: var(--surface-sunken);
        color: var(--ink);
        font-size: 12px;
        font-weight: 600;
    }
    .rk-help-article__tips { margin: 0; padding: 14px 16px; list-style: none; display: grid; gap: 6px; border-radius: var(--r-md); background: var(--warning-soft); color: var(--ink); font-size: 14px; }
    .rk-help-article__tips li { display: flex; gap: 8px; }
    .rk-help-article__tips li svg { flex: 0 0 auto; margin-top: 3px; color: var(--warning-text); }
    .rk-help-article__foot { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }

    /* ==========================================================================
       Rondleiding (tour.js) — spotlight met een tekstballon
       ========================================================================== */
    .rk-tour { position: fixed; inset: 0; z-index: 10000; }
    .rk-tour [hidden] { display: none !important; }
    .rk-tour__spot {
        position: fixed;
        border-radius: 12px;
        box-shadow: 0 0 0 9999px rgba(14, 15, 18, .55), 0 0 0 3px var(--accent);
        transition: top .35s var(--ease), left .35s var(--ease), width .35s var(--ease), height .35s var(--ease);
        pointer-events: none;
    }
    .rk-tour__spot--none { box-shadow: 0 0 0 9999px rgba(14, 15, 18, .55); width: 0; height: 0; }
    .rk-tour__pop {
        position: fixed;
        width: min(360px, calc(100vw - 32px));
        padding: 22px;
        border-radius: var(--r-lg);
        background: var(--surface);
        color: var(--ink);
        border: 1px solid var(--line);
        box-shadow: var(--shadow-3);
        pointer-events: auto;
        transition: top .35s var(--ease), left .35s var(--ease);
        animation: rk-rise .3s var(--ease) both;
    }
    .rk-tour__pop:focus { outline: none; }
    .rk-tour__step { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent-text); }
    .rk-tour__title { margin-top: 6px; font-family: var(--font-display); font-size: 22px; font-weight: 750; letter-spacing: -.015em; word-spacing: .1em; }
    .rk-tour__text { margin-top: 6px; color: var(--ink-2); font-size: 15px; }
    .rk-tour__dots { display: flex; gap: 5px; margin-top: 16px; }
    .rk-tour__dots span { width: 6px; height: 6px; border-radius: 3px; background: var(--line); transition: width .25s var(--ease), background-color .25s var(--ease); }
    .rk-tour__dots span.is-active { width: 18px; background: var(--accent); }
    .rk-tour__actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; }
    .rk-tour__actions .rk-tour__skip { margin-right: auto; }

    /* ==========================================================================
       Planbord — rijen = dagen, per dag één tijdlijn (uren). Sleep over de uren
       om een dienst te maken; diensten zijn gekleurde blokken.
       ========================================================================== */
    .rk-planbord {
        --naam-breedte: 8rem;
        width: 100%;
        min-width: 46rem;
        border-collapse: separate;
        border-spacing: 0;
        user-select: none;
        table-layout: fixed;
    }
    .rk-planbord thead th {
        position: sticky;
        top: 0;
        z-index: 2;
        padding: 12px 8px 8px;
        background: var(--surface);
        font-size: 12px;
        font-weight: 600;
        color: var(--ink-3);
        border-bottom: 1px solid var(--line-soft);
    }
    .rk-planbord thead th.rk-hoek { width: var(--naam-breedte); text-align: left; padding-left: 16px; text-transform: uppercase; letter-spacing: .06em; }
    .rk-urenkop-rij { display: flex; }
    /* Bij meerdere afdelingen tegelijk: de afdeling klein achter de tijd in het dienstblok. */
    /* De kleur van een afdeling: de linkerrand van het dienstblok (de achtergrond houdt de statuskleur)
       en een bolletje bij het vinkje van de afdeling. */
    .rk-dienst.rk-dienst--afdelingskleur { border-left-width: 5px; border-left-color: var(--afdeling); }
    /* Ingepland (normaal groen) krijgt de afdelingskleur: een lichte tint als achtergrond en een donkere
       (in donkere modus lichte) variant als tekst. Open, gewerkt en tegen de regels houden hun statuskleur. */
    .rk-dienst.rk-dienst--toegewezen.rk-dienst--afdelingskleur {
        background: color-mix(in srgb, var(--afdeling) 16%, var(--surface));
        color: color-mix(in srgb, var(--afdeling) 62%, var(--ink));
    }
    .rk-afdelingskleur {
        display: inline-block; width: 9px; height: 9px; margin-right: 5px; border-radius: 50%;
        vertical-align: middle; flex: 0 0 auto; box-shadow: 0 0 0 1.5px var(--surface);
    }
    .rk-check-inline .rk-afdelingskleur { margin-right: -4px; }
    .rk-dienst-afdeling { margin-left: 6px; font-family: var(--font-ui); opacity: .75; white-space: nowrap; }
    .rk-urenkop-cel { flex: 1 1 0; text-align: left; font-variant-numeric: tabular-nums; }
    .rk-planbord td { border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
    .rk-planbord tbody tr:last-child td { border-bottom: 0; }
    .rk-planbord td.rk-naam {
        width: var(--naam-breedte);
        padding: 10px 12px 10px 16px;
        background: var(--surface);
        font-size: 14px;
        white-space: nowrap;
        border-right: 1px solid var(--line-soft);
    }
    .rk-planbord td.rk-vandaag-rij { box-shadow: inset 3px 0 0 var(--accent); }
    .rk-tijdlijn-cel { padding: 0; }
    .rk-tijdlijn-cel.rk-weekend { background: var(--surface-2); }
    .rk-tijdlijn { position: relative; display: flex; min-height: 3.4rem; }
    .rk-cel {
        flex: 1 1 0;
        min-width: 0;
        border-right: 1px solid var(--line-soft);
        cursor: cell;
        touch-action: manipulation;
        transition: background-color .1s ease;
    }
    .rk-cel:last-child { border-right: 0; }
    .rk-cel:hover { background: var(--accent-soft); }
    .rk-cel--kiezen, .rk-cel--kiezen:hover { background: var(--accent-soft-strong); box-shadow: inset 0 0 0 1px var(--accent); }
    .rk-cel--start, .rk-cel--start:hover { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
    .rk-sleepstrook {
        position: absolute;
        left: 0;
        right: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        margin: 0 3px;
        border: 1px dashed var(--line);
        border-radius: 8px;
        /* Geen opacity op de strook zelf: dan wordt de hint onleesbaar (contrast). De
           stippelrand is al licht genoeg om rustig te blijven. */
        pointer-events: none;
        transition: opacity .12s ease, background-color .12s ease;
    }
    .rk-tijdlijn:hover .rk-sleepstrook { background: var(--accent-soft); }
    .rk-sleepstrook-hint { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--ink-3); user-select: none; }
    .rk-dienst {
        position: absolute;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1px;
        padding: 2px 8px;
        border: 0;
        border-left: 3px solid transparent;
        border-radius: 8px;
        font-size: 12px;
        line-height: 1.15;
        text-align: left;
        cursor: pointer;
        overflow: hidden;
        transition: filter .1s ease, transform .08s ease, box-shadow .15s var(--ease);
    }
    .rk-dienst:hover { z-index: 5; box-shadow: var(--shadow-2); }
    .rk-dienst:active { transform: scale(.99); }
    .rk-dienst-tijd { font-size: 11px; font-variant-numeric: tabular-nums; }
    .rk-dienst-naam { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .rk-dienst--toegewezen { background: var(--success-soft); border-left-color: var(--success); color: var(--success); }
    .rk-dienst--open { background: var(--warning-soft); border-left-color: var(--warning); color: var(--warning-text); }
    .rk-dienst--afgerond { background: var(--info-soft); border-left-color: var(--info); color: var(--info); }
    .rk-dienst--override { background: var(--danger-soft); border-left-color: var(--danger); color: var(--danger); }
    /* Elders ingeroosterd: grijs gearceerd blok, niet aanklikbaar (sleep gaat erdoorheen). */
    .rk-elders {
        position: absolute;
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 1px;
        padding: 2px 8px;
        border-radius: 8px;
        border: 1px dashed color-mix(in srgb, var(--ink-3) 60%, transparent);
        background-color: var(--surface-2);
        background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--ink-3) 18%, transparent) 6px 7px);
        color: var(--ink-2);
        font-size: 12px;
        line-height: 1.15;
        overflow: hidden;
        pointer-events: none;
    }
    .rk-legenda.rk-elders {
        position: static;
        display: inline-block;
        padding: 0;
        width: 14px;
        height: 14px;
        border: 1px dashed color-mix(in srgb, var(--ink-3) 70%, transparent);
        border-radius: 4px;
    }
    .rk-elsewhere-note {
        display: flex;
        align-items: flex-start;
        gap: 12px;
        padding: 14px 16px;
        border-radius: var(--r-md);
        border: 1px dashed color-mix(in srgb, var(--ink-3) 60%, transparent);
        background: var(--surface-2);
        color: var(--ink);
        font-size: 14px;
    }
    .rk-elsewhere-note--blocked { border-style: solid; border-color: var(--line); }
    .rk-elsewhere-note__icon {
        display: grid;
        place-items: center;
        flex: 0 0 auto;
        width: 32px;
        height: 32px;
        border-radius: 10px;
        background: var(--surface-sunken);
        color: var(--ink-2);
    }
    .rk-legenda { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border-width: 0 0 0 3px; border-style: solid; flex: 0 0 auto; }

    @media (max-width: 640px) {
        .rk-planbord { --naam-breedte: 3.6rem; min-width: 34rem; }
        .rk-planbord thead th.rk-hoek,
        .rk-planbord td.rk-naam { position: sticky; left: 0; z-index: 3; }
        .rk-planbord td.rk-naam { padding: 8px 6px 8px 10px; font-size: 12px; line-height: 1.15; white-space: normal; box-shadow: 1px 0 0 var(--line-soft); }
        .rk-planbord td.rk-naam .font-mono { display: block; margin-left: 0; white-space: nowrap; font-size: 11px; }
        .rk-planbord thead th { font-size: 11px; padding: 8px 4px; }
        .rk-planbord thead th.rk-hoek { padding-left: 10px; }
        .rk-urenkop-cel { font-size: 11px; }
        .rk-tijdlijn { min-height: 3rem; }
        .rk-dienst { font-size: 11px; }
        .rk-dienst-tijd { font-size: 10px; }
    }

    /* ==========================================================================
       Foutgrens en Blazor-foutbalk
       ========================================================================== */
    .blazor-error-boundary {
        padding: 16px 18px;
        border-radius: var(--r-md);
        background: var(--danger-soft);
        color: var(--danger);
        font-weight: 500;
    }
    .blazor-error-boundary::after { content: "Er is een fout opgetreden. Laad de pagina opnieuw."; }

    #blazor-error-ui {
        position: fixed;
        left: 50%;
        bottom: 20px;
        z-index: 1000;
        display: none;
        align-items: center;
        gap: 14px;
        width: min(520px, calc(100vw - 32px));
        padding: 14px 18px;
        border-radius: var(--r-lg);
        background: var(--ink);
        color: var(--ink-inverse);
        box-shadow: var(--shadow-3);
        transform: translateX(-50%);
        font-size: 14px;
    }
    #blazor-error-ui .reload { color: var(--ink-inverse); font-weight: 600; text-decoration: underline; }
    #blazor-error-ui .dismiss { margin-left: auto; cursor: pointer; opacity: .7; }

    /* ==========================================================================
       Beweging
       ========================================================================== */
    @keyframes rk-fade-in { from { opacity: 0; } to { opacity: 1; } }
    @keyframes rk-rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
    .verschijn { animation: rk-rise .36s var(--ease) both; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .knop-spinner, .rk-reconnect__spinner { animation-duration: 1.4s !important; animation-iteration-count: infinite !important; }
    .knop:active:not(:disabled) { transform: none; }
}

/* Impersonatie-balk: een superadmin handelt als een organisatie. Opvallend maar rustig. */
.rk-impersonate-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    padding: 8px 16px;
    background: var(--accent-soft, #fff4e5);
    color: var(--accent-text, #7a4a00);
    border-bottom: 1px solid var(--accent, #e8a44c);
    font-size: 14px;
    font-weight: 600;
}
.rk-impersonate-bar form.inline { display: inline; margin: 0; }

/* Planbord: "alles gepubliceerd"-indicatie naast de weeknavigatie (rustig, groen). */
.rk-publicatie-ok {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    min-height: 2.25rem;
    border-radius: var(--r-md, 8px);
    color: var(--success, #2e7d32);
    font-size: 14px;
    font-weight: 600;
}
