/* =================================================================
   MODERN.CSS — Modern design layer (loaded AFTER wrapped.css)
   -----------------------------------------------------------------
   This file is intentionally kept OUTSIDE the LESS wrap pipeline
   (it lives in css/modern/ which the wrapper does not scan), so it
   is served as-is and may use modern CSS safely. It is a non-
   destructive overlay: it restyles existing components and adds
   responsive behaviour without changing markup classes or JS hooks.
   ================================================================= */

/* -----------------------------------------------------------------
   1. Design tokens
   ----------------------------------------------------------------- */
:root {
    /* Brand (kept in sync with the app's config colours where used) */
    --brand:            #1578c6;
    --brand-600:        #1166ad;
    --brand-accent:     #f06467;

    /* Neutrals / surfaces */
    --color-bg:         #f4f6fa;
    --color-surface:    #ffffff;
    --color-surface-2:  #f7f9fc;
    --color-text:       #1f2733;
    --color-muted:      #5b6675;
    --color-border:     #e4e9f0;
    --color-border-str: #cdd5e0;

    /* Status */
    --success:          #1f7a3d;
    --success-bg:       #e9f7ee;
    --error:            #c0362c;
    --error-bg:         #fdecea;

    /* Focus ring (accessibility) */
    --focus-ring:       #1578c6;

    /* Spacing scale (8pt) */
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 24px;
    --space-6: 32px;
    --space-7: 48px;
    --space-8: 64px;

    /* Radius */
    --radius-sm: 8px;
    --radius:    12px;
    --radius-lg: 18px;
    --radius-pill: 999px;

    /* Shadows (soft, layered) */
    --shadow-xs: 0 1px 2px rgba(16, 24, 40, .06);
    --shadow-sm: 0 1px 3px rgba(16, 24, 40, .08), 0 1px 2px rgba(16, 24, 40, .04);
    --shadow-md: 0 6px 16px -4px rgba(16, 24, 40, .10), 0 2px 6px -2px rgba(16, 24, 40, .06);
    --shadow-lg: 0 18px 40px -12px rgba(16, 24, 40, .22);

    /* Motion */
    --ease: cubic-bezier(.4, 0, .2, 1);
    --t-fast: .15s var(--ease);
    --t: .25s var(--ease);

    /* Typography — Nunito, a friendly, highly readable dashboard typeface */
    --font: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* -----------------------------------------------------------------
   2. Base
   ----------------------------------------------------------------- */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    background: var(--color-bg) !important;
    color: var(--color-text);
    font-family: var(--font) !important;
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Apply Inter consistently to headings and all form controls
   (these otherwise fall back to the legacy Raleway/Work Sans or the
   browser default for inputs). */
h1, .h1, h2, .h2, h3, .h3, h4, .h4, h5, h6,
.btn, .btn2, button,
input, select, textarea, optgroup {
    font-family: var(--font) !important;
}

h1, .h1, h2, .h2, h3, .h3, h4, .h4 { font-weight: 600; letter-spacing: -.01em; }
label { font-weight: 500; }

/* Never allow sideways scrolling on small screens */
html, body { overflow-x: hidden; max-width: 100%; }

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

::selection { background: rgba(21, 120, 198, .18); text-shadow: none; }

/* Restore visible keyboard focus (the legacy reset kills all outlines) */
*:focus-visible,
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--focus-ring) !important;
    outline-offset: 2px !important;
    border-radius: var(--radius-sm);
}

/* -----------------------------------------------------------------
   3. Typography
   ----------------------------------------------------------------- */
h1, .h1 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.05rem); line-height: 1.15; letter-spacing: -.01em; }
h2, .h2 { font-size: clamp(1.25rem, 1.05rem + .9vw, 1.55rem); line-height: 1.25; }
h3, .h3 { font-size: clamp(1.05rem, .98rem + .4vw, 1.2rem); line-height: 1.35; }
p { line-height: 1.65; }
a { transition: color var(--t-fast); }

/* -----------------------------------------------------------------
   4. Layout containers
   ----------------------------------------------------------------- */
.container { padding-left: clamp(16px, 4vw, 25px); padding-right: clamp(16px, 4vw, 25px); }

/* -----------------------------------------------------------------
   5. Buttons
   The legacy inline <style> forces button/.btn background via
   !important, so we shape, space and animate instead of recolouring.
   ----------------------------------------------------------------- */
.btn, .btn2, .btn3, .btn4, .btn5,
button,
input[type="submit"],
input[type="button"] {
    border-radius: var(--radius-sm) !important;
    box-shadow: var(--shadow-xs);
    font-weight: 600;
    letter-spacing: .01em;
    transition: transform var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
    -webkit-appearance: none;
    appearance: none;
}

.btn, .btn2, .btn3, .btn4, .btn5 {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    min-height: 44px;            /* comfortable tap target */
    padding: 10px 20px !important;
    line-height: 1.2 !important;
    text-decoration: none !important;
}

.btn:hover, .btn2:hover, .btn3:hover, .btn4:hover, .btn5:hover,
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
    filter: brightness(1.06);
    box-shadow: var(--shadow-sm);
    transform: translateY(-1px);
    text-decoration: none !important;
}

.btn:active, .btn2:active, .btn3:active, .btn4:active, .btn5:active,
button:active,
input[type="submit"]:active { transform: translateY(0); filter: brightness(.96); box-shadow: var(--shadow-xs); }

.btn[disabled], button[disabled] { opacity: .55; cursor: not-allowed; transform: none; filter: none; }

/* -----------------------------------------------------------------
   6. Forms
   ----------------------------------------------------------------- */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="date"],
textarea,
select {
    font-size: 16px;                 /* prevents iOS zoom on focus */
    border: 1px solid var(--color-border-str) !important;
    border-radius: var(--radius-sm) !important;
    background: var(--color-surface);
    padding: 11px 14px !important;
    min-height: 44px;
    transition: border-color var(--t-fast), box-shadow var(--t-fast);
    box-shadow: var(--shadow-xs);
}
textarea { min-height: 110px; line-height: 1.5; }

input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
textarea:hover,
select:hover { border-color: var(--brand) !important; }

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
input[type="search"]:focus,
textarea:focus,
select:focus {
    border-color: var(--brand) !important;
    box-shadow: 0 0 0 3px rgba(21, 120, 198, .18);
    outline: none;
}

::placeholder { color: #9aa4b2; }

label { font-weight: 600; color: var(--color-text); }

/* -----------------------------------------------------------------
   7. Cards & panels
   ----------------------------------------------------------------- */
.call2action {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius) !important;
    box-shadow: var(--shadow-sm);
    padding: clamp(20px, 3vw, 30px) !important;
}
.call2action h3 { margin-top: 0; }

/* -----------------------------------------------------------------
   8. Status messages
   ----------------------------------------------------------------- */
.mislukt, .gelukt, .message {
    border-radius: var(--radius-sm) !important;
    line-height: 1.5 !important;
    padding: 12px 16px !important;
    box-shadow: var(--shadow-xs);
    display: flex;
    align-items: center;
    gap: 10px;
}
.mislukt { border: 1px solid var(--error) !important; background: var(--error-bg) !important; color: var(--error) !important; }
.gelukt  { border: 1px solid var(--success) !important; background: var(--success-bg) !important; color: var(--success) !important; }

/* -----------------------------------------------------------------
   9. Tables (modern, with mobile horizontal scroll)
   ----------------------------------------------------------------- */
.content table:not(.no-modern),
table.table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}
.content table:not(.no-modern) th {
    text-align: left;
    font-weight: 600;
    color: var(--color-muted);
    border-bottom: 2px solid var(--color-border);
    padding: 12px 14px;
}
.content table:not(.no-modern) td {
    border-bottom: 1px solid var(--color-border);
    padding: 11px 14px;
}
.content table:not(.no-modern) tbody tr { transition: background var(--t-fast); }
.content table:not(.no-modern) tbody tr:hover { background: var(--color-surface-2); }

/* Allow wide tables to scroll instead of breaking the layout */
.table-wrap, .cms_table_holder, .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* -----------------------------------------------------------------
   10. Header
   ----------------------------------------------------------------- */
header {
    box-shadow: var(--shadow-xs);
    border-bottom: 1px solid var(--color-border);
    background: var(--color-surface);
}
header a.logo img { transition: transform var(--t); }
header a.logo:hover img { transform: scale(1.02); }

/* -----------------------------------------------------------------
   11. Primary navigation + mobile hamburger
   ----------------------------------------------------------------- */
.nav-toggle { display: none; }                 /* hidden on desktop */

nav.main-menu ul li a {
    transition: background var(--t-fast), color var(--t-fast);
    position: relative;
}
nav.main-menu ul li a:hover,
nav.main-menu ul li a.selected { text-decoration: none; }

@media (max-width: 870px) {
    /* Hamburger button injected in header.php */
    .nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        width: 100%;
        min-height: 48px;
        border: none;
        cursor: pointer;
        color: #fff;
        font-weight: 600;
        font-size: 15px;
        background: transparent;
    }
    .nav-toggle .nav-toggle__bars {
        width: 20px; height: 2px; background: #fff; position: relative; display: inline-block;
        transition: background var(--t-fast);
    }
    .nav-toggle .nav-toggle__bars::before,
    .nav-toggle .nav-toggle__bars::after {
        content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: #fff;
        transition: transform var(--t-fast), top var(--t-fast);
    }
    .nav-toggle .nav-toggle__bars::before { top: -6px; }
    .nav-toggle .nav-toggle__bars::after  { top: 6px; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { top: 0; transform: rotate(45deg); }
    .nav-toggle[aria-expanded="true"] .nav-toggle__bars::after  { top: 0; transform: rotate(-45deg); }

    /* Collapse the menu by default on mobile; reveal when toggled */
    nav.main-menu ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height var(--t);
    }
    nav.main-menu.is-open ul { max-height: 80vh; overflow-y: auto; }

    nav.main-menu ul li,
    nav.main-menu ul li a { float: none !important; width: 100% !important; }
    nav.main-menu ul li a { min-height: 48px; display: flex !important; align-items: center; }
}

/* -----------------------------------------------------------------
   12a. Dashboard hero (#theme on the logged-in home — NOT auth)
   ----------------------------------------------------------------- */
#theme {
    min-height: clamp(220px, 34vw, 380px) !important;
    display: flex;
    align-items: center;
    background-position: center center !important;  /* show the middle of kinderdijk.jpg */
}
#theme .container { padding-top: clamp(40px, 6vw, 80px) !important; padding-bottom: clamp(32px, 5vw, 56px) !important; }
/* Keep hero copy white — the global `h1 { color: mainColor !important }`
   from the inline <style> would otherwise turn "Welkom ..." dark. */
#theme h1 { font-size: clamp(1.6rem, 1.1rem + 2.4vw, 2.6rem) !important; margin-bottom: 14px; color: #fff !important; }
#theme p { font-size: clamp(1rem, .9rem + .6vw, 1.2rem) !important; color: #fff !important; }
#theme .overlay {
    background: linear-gradient(120deg, rgba(17, 24, 39, .62), rgba(21, 120, 198, .42)) !important;
    opacity: 1 !important;
}

/* -----------------------------------------------------------------
   12b. Auth pages (login / password reset / verify / 2fa)
   Full-bleed photo background with floating glass cards.
   #loginpage > #theme (intro) + #main > .container.units-row
   ----------------------------------------------------------------- */
#loginpage {
    position: relative;
    min-height: 100vh;
    background: #16304a url('/_webblocks/images/kinderdijk.jpg') center / cover no-repeat fixed;
}
#loginpage::before {                       /* readability scrim over the photo */
    content: "";
    position: absolute;                    /* covers ONLY #loginpage, never the header bar above it */
    inset: 0;
    background: linear-gradient(125deg, rgba(11, 22, 38, .82) 0%, rgba(13, 52, 84, .60) 45%, rgba(21, 120, 198, .46) 100%);
    z-index: 0;
    pointer-events: none;
}
#loginpage > * { position: relative; z-index: 1; }

/* Flatten the old hero strip: the photo now spans the whole page */
#loginpage #theme {
    background: transparent !important;
    min-height: 0 !important;
    display: block;
    overflow: visible !important;
}
#loginpage #theme .overlay { display: none !important; }
#loginpage #theme .container {
    padding-top: clamp(40px, 7vw, 88px) !important;
    padding-bottom: clamp(16px, 3vw, 32px) !important;
}
#loginpage #theme h1,
#loginpage #theme p { overflow-wrap: anywhere; }
#loginpage #theme h1 {
    color: #fff !important;
    font-size: clamp(1.7rem, 1.1rem + 2.6vw, 2.7rem) !important;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .45);
    margin-bottom: 12px;
}
#loginpage #theme p {
    color: rgba(255, 255, 255, .92) !important;
    text-shadow: 0 1px 10px rgba(0, 0, 0, .5) !important;
    max-width: none;          /* full container width */
}

#loginpage #main { padding-top: 0 !important; background: transparent !important; }
/* Flex row so the 40/30/30 columns can never overflow the content */
#loginpage #main .container.units-row {
    display: flex;
    flex-wrap: wrap;
    gap: clamp(16px, 2vw, 28px);
    align-items: stretch;          /* cards match each other's height */
    margin-top: clamp(8px, 2vw, 24px);
    padding-bottom: clamp(32px, 6vw, 64px);
}
#loginpage #main .units-row > [class*="unit-"] {
    float: none !important;
    margin-left: 0 !important;
    width: auto !important;
    flex: 1 1 280px;
    min-width: 0;
}
#loginpage #main .units-row > .unit-40 { flex: 1.4 1 320px; }   /* form gets more room */

/* Auth panels become elevated glass cards */
#loginpage #main .units-row > .unit-50,
#loginpage #main .units-row > .unit-40,
#loginpage #main .units-row > .unit-33,
#loginpage #main .units-row > .unit-30 {
    background: #fff !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg) !important;
    box-shadow: var(--shadow-lg);
    padding: clamp(22px, 3vw, 34px) !important;
}
/* First heading in any auth card sits flush with the top (matches .call2action) */
#loginpage #main .units-row > [class*="unit-"] > h1:first-child,
#loginpage #main .units-row > [class*="unit-"] > h2:first-child,
#loginpage #main .units-row > [class*="unit-"] > h3:first-child {
    margin-top: 0;
    margin-bottom: 10px;
}

/* Login form: full-width fields, full-width submit, forgot-password as a link */
#loginpage #main .units-row form { display: block; }
#loginpage #main .units-row form label {
    display: block;
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}
#loginpage #main .units-row form input[type="text"],
#loginpage #main .units-row form input[type="password"],
#loginpage #main .units-row form input[type="email"] {
    width: 100%;
    display: block;
    height: auto !important;
    line-height: normal !important;
    border-radius: var(--radius-sm) !important;
    margin: 0 0 var(--space-4) !important;
}
#loginpage #main .units-row form input[type="submit"],
#loginpage #main .units-row form .btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    margin: 0 !important;
    float: none !important;
}
#loginpage #main .units-row form .btn2 {
    float: none !important;
    display: inline-block;
    width: auto;
    min-height: 0;
    margin: var(--space-3) 0 0 !important;
    padding: 6px 2px !important;
    background: transparent !important;
    color: var(--brand) !important;
    box-shadow: none !important;
    font-weight: 600;
}
#loginpage #main .units-row form .btn2:hover {
    background: transparent !important;
    color: var(--brand-600) !important;
    text-decoration: underline !important;
    transform: none;
    filter: none;
}

/* "Nog geen account?" — already sits inside a card, so don't double it up */
#loginpage .call2action {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

/* Third card (no title): the Advieskeuze score, centered inside the card */
#loginpage .advieskeuze-card {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(16px, 2vw, 24px) !important;
}
#loginpage .advieskeuze-card .advieskeuze {
    width: 234px;
    max-width: 100%;
    height: 240px;
    border: 0;
    display: block;
}

/* Slogan centered in the page footer (over the photo) */
#loginpage .login-footer {
    text-align: center;
    padding: clamp(20px, 4vw, 44px) 20px clamp(32px, 6vw, 56px);
}
#loginpage .login-slogan {
    color: #fff;
    font-size: clamp(1.05rem, .9rem + .8vw, 1.5rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: .01em;
    margin: 0 auto;
    max-width: 760px;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .5);
}

/* Styled contact list inside "Nog geen account?" */
.contact-list {
    list-style: none;
    margin: var(--space-4) 0 0;
    padding: 0;
    display: grid;
    gap: var(--space-2);
}
.contact-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: var(--color-surface-2);
    transition: background var(--t-fast), border-color var(--t-fast), transform var(--t-fast);
}
.contact-list li:hover {
    background: #fff;
    border-color: var(--brand);
    transform: translateX(2px);
}
.contact-list li i {
    color: var(--brand);
    width: 18px;
    flex: 0 0 auto;
    text-align: center;
    font-size: 15px;
}
.contact-list a {
    text-decoration: none !important;
    color: var(--color-text);
    font-weight: 600;
    word-break: break-word;
}
.contact-list a:hover { color: var(--brand); }

/* Dashboard sidebar: contact card */
.contact-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(16px, 2vw, 22px) clamp(14px, 1.4vw, 18px);
}
.contact-card h3 { margin-top: 0 !important; margin-bottom: 14px; }
.contact-address {
    font-style: normal;
    color: var(--color-muted);
    line-height: 1.6;
    margin: 0;
}
.contact-address strong { color: var(--color-text); font-weight: 600; }
.contact-advies {
    margin-top: var(--space-5);
    padding-top: var(--space-5);
    border-top: 1px solid var(--color-border);
    text-align: center;
}
.contact-advies iframe { border: 0; max-width: 100%; }

/* -----------------------------------------------------------------
   13. Footer — sticky to the bottom on short pages
   ----------------------------------------------------------------- */
html, body { min-height: 100%; }
#wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
#wrapper > .content { flex: 1 0 auto; }   /* grow to push the footer down on short pages */

.site-footer {
    margin-top: 30px;
    padding: var(--space-6) 0;
    border-top: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-muted);
    font-size: 14px;
}
.site-footer a { color: var(--color-muted); }
.site-footer a:hover { color: var(--brand); }

/* -----------------------------------------------------------------
   14. Responsive grid — stack float columns on small screens
   ----------------------------------------------------------------- */
@media (max-width: 900px) {
    .units-row > [class*="unit-"],
    .units-row > [class*="width-"],
    .units-row-end > [class*="unit-"] {
        width: 100% !important;
        float: none !important;
        margin-left: 0 !important;
        margin-bottom: var(--space-4);
    }
    .units-row .width-50.left { width: 100% !important; float: none !important; }

    /* fixed backgrounds are janky / zoomed on iOS — use scroll on small screens */
    #loginpage { background-attachment: scroll; }

    /* Auth cards stack with comfortable spacing */
    #loginpage #main .container.units-row { display: flex; flex-direction: column; gap: var(--space-4); }
    #loginpage #main .units-row .unit-50,
    #loginpage #main .units-row .unit-40,
    #loginpage #main .units-row .unit-30 { margin-bottom: 0; }

    /* Header welcome block aligns left on mobile */
    header .number_wrap .number { text-align: left !important; }
}

/* Tablet portrait niceties */
@media (min-width: 901px) and (max-width: 1024px) {
    .container { max-width: 100%; }
}

/* Full-width submit buttons on phones for easier tapping */
@media (max-width: 560px) {
    form input[type="submit"],
    form .btn,
    form .btn2 { width: 100%; justify-content: center; margin-bottom: var(--space-3); text-align: center; }
    #loginpage #main .units-row form input[type="submit"],
    #loginpage #main .units-row form .btn { float: none !important; }
}

/* -----------------------------------------------------------------
   15. Data tables (.datagegevensTbl) — zebra striped, card-like
   Used on the dashboard / "Aanvrager 1 & 2" data overviews.
   ----------------------------------------------------------------- */
.datagegevensTbl {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-xs);
    margin-top: var(--space-2);
}
.datagegevensTbl td {
    padding: 9px 14px !important;
    border: 0 !important;
    line-height: 1.5;
    vertical-align: top;
}
.datagegevensTbl td:first-child {
    color: var(--color-muted);
    font-weight: 600;
    width: 42%;
    white-space: nowrap;
}
/* Zebra striping */
.datagegevensTbl tr:nth-child(even) td { background: var(--color-surface-2); }
.datagegevensTbl tr:hover td { background: rgba(21, 120, 198, .07); }

/* Two "Aanvrager" columns: give them breathing room and stack on mobile */
@media (max-width: 900px) {
    #main .units-row > div[style*="width:50%"],
    #main .units-row > div[style*="width: 50%"] { width: 100% !important; float: none !important; }
}

/* -----------------------------------------------------------------
   16. Notice / alert component (replaces ad-hoc inline-styled boxes)
   ----------------------------------------------------------------- */
.notice {
    display: block;
    padding: 14px 18px;
    margin: 0 0 var(--space-5);
    border: 1px solid var(--color-border);
    border-left-width: 4px;
    border-radius: var(--radius);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
    line-height: 1.6;
}
.notice a.btn,
.notice a.btn5 { margin-top: var(--space-3); }
.notice--info    { border-color: #9ecbea; border-left-color: #0c7bbf; background: #eef6fd; color: #0b3a5e; }
.notice--info strong    { color: #0c7bbf; }
.notice--success { border-color: #a9dcb8; border-left-color: #1f7a3d; background: #ecf8f1; color: #1b5e2a; }
.notice--success strong { color: #1f7a3d; }
.notice--warning { border-color: #f0d49a; border-left-color: #c07f12; background: #fdf6e8; color: #7a5410; }
.notice--warning strong { color: #b07512; }

/* -----------------------------------------------------------------
   18. User dropdown (header, logged in)
   ----------------------------------------------------------------- */
.user-menu { position: relative; display: inline-block; text-align: left; }
.user-menu__trigger {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 0;
    padding: 7px 12px !important;
    background: transparent !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill) !important;
    box-shadow: none !important;
    color: var(--color-text);
    cursor: pointer;
    transition: background var(--t-fast), border-color var(--t-fast);
}
.user-menu__trigger:hover {
    background: var(--color-surface-2) !important;
    border-color: var(--color-border-str);
    transform: none;
    filter: none;
}
.user-menu__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
}
.user-menu__avatar--img {
    background-size: cover;
    background-position: center;
    color: transparent;
}
.user-menu__text { display: flex; flex-direction: column; line-height: 1.15; }
.user-menu__hi { font-size: 11px; color: var(--color-muted); font-weight: 400; }
.user-menu__name { font-weight: 600; font-size: 14px; }
.user-menu__caret { font-size: 11px; color: var(--color-muted); transition: transform var(--t-fast); }
.user-menu__trigger[aria-expanded="true"] .user-menu__caret { transform: rotate(180deg); }
.user-menu__dropdown {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 50;
    display: none;
}
.user-menu.is-open .user-menu__dropdown { display: block; }
.user-menu__dropdown li a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--color-text);
    font-weight: 500;
    transition: background var(--t-fast), color var(--t-fast);
}
.user-menu__dropdown li a span { width: 16px; text-align: center; color: var(--color-muted); }
.user-menu__dropdown li a:hover { background: var(--color-surface-2); color: var(--brand); }
.user-menu__dropdown li a:hover span { color: var(--brand); }

@media (max-width: 640px) {
    .user-menu__text { display: none; }     /* compact: avatar + caret only on phones */
}

/* -----------------------------------------------------------------
   19. Admin data tables (.cms_table) — headers, search, pagination
   ----------------------------------------------------------------- */
/* Uppercase table headers */
.cms_table thead td,
.cms_table thead th,
.content table:not(.no-modern) thead th {
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 12px;
}

/* Readable cell text — the legacy @darkColor renders too light to read */
.cms_table tbody td,
.cms_table tbody td a {
    color: var(--color-text) !important;
}
.cms_table thead td,
.cms_table thead th {
    color: var(--color-muted) !important;
}

/* Search box: vertically-centered magnifier, room for the text */
.cms_table_search_box,
input.cms_table_search_box {
    background-image: url('/_webblocks/images/search.png') !important;
    background-repeat: no-repeat !important;
    background-position: 14px center !important;
    padding-left: 40px !important;
    padding-right: 16px !important;
}

/* Pagination buttons */
.table-topbar .cms_table_page_nav {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 34px !important;
    width: auto !important;
    height: 34px !important;
    padding: 0 10px !important;
    margin: 4px 4px !important;
    line-height: 1 !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-sm) !important;
    background: #fff !important;
    color: var(--color-text) !important;
    font-weight: 600;
    box-shadow: var(--shadow-xs);
    transition: background var(--t-fast), border-color var(--t-fast), color var(--t-fast);
}
.table-topbar .cms_table_page_nav:hover {
    background: var(--color-surface-2) !important;
    border-color: var(--brand) !important;
    color: var(--brand) !important;
}
.table-topbar .cms_table_page_nav_selected,
.table-topbar .cms_table_page_nav_selected:hover {
    background: var(--brand) !important;
    border-color: var(--brand) !important;
    color: #fff !important;
    text-shadow: none !important;
    cursor: default;
}

/* -----------------------------------------------------------------
   20. Admin form layout (e.g. /gegevens/wijzigen/)
   ----------------------------------------------------------------- */
#framework_tabcontent #tabcontent {
    background: #fff !important;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(20px, 3vw, 40px) !important;
}
#tabcontent .mb10 { margin-bottom: var(--space-4); }
/* Labels above the fields instead of floated beside them */
#tabcontent .mb10 label.left {
    display: block;
    float: none;
    width: auto;
    margin: 0 0 6px;
    font-weight: 600;
    font-size: 14px;
    color: var(--color-text);
}
/* Full-width fields (inline widths like the address/house-number still win) */
#tabcontent .mb10 input[type="text"],
#tabcontent .mb10 input[type="password"],
#tabcontent .mb10 input[type="date"],
#tabcontent .mb10 select {
    width: 100%;
}
#tabcontent hr {
    border: 0;
    border-top: 1px solid var(--color-border);
    margin: var(--space-5) 0;
}

/* -----------------------------------------------------------------
   18. Primary navigation height (legacy is a chunky 75px)
   ----------------------------------------------------------------- */
@media (min-width: 861px) {
    nav.main-menu ul li { height: 52px !important; }
    nav.main-menu ul li a { line-height: 52px !important; padding: 0 18px !important; }
    nav.main-menu ul li a i,
    nav.main-menu ul li a .fa-light { font-size: 16px; line-height: 16px; }
}

/* -----------------------------------------------------------------
   19. Chosen dropdowns — round the square corners
   ----------------------------------------------------------------- */
.chosen-container-single .chosen-single {
    border-radius: var(--radius-sm) !important;
    height: 40px;
    line-height: 38px;
}
.chosen-container-active.chosen-with-drop .chosen-single {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
}
.chosen-container .chosen-drop {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm) !important;
    border-color: var(--color-border-str) !important;
    box-shadow: var(--shadow-md);
}
.chosen-container-single .chosen-search input[type="text"] {
    border-radius: var(--radius-sm) !important;
}
.chosen-container-multi .chosen-choices {
    border-radius: var(--radius-sm) !important;
}
.chosen-container-active .chosen-single,
.chosen-container-active .chosen-choices {
    border-color: var(--brand) !important;
}

/* -----------------------------------------------------------------
   20. Tabs — rounded, connected to the content panel
   ----------------------------------------------------------------- */
.tabs > ul { display: flex; flex-wrap: wrap; gap: 6px; }
.tabs > ul > li { margin-left: 0 !important; }
.tabs > ul > li > div {
    border-radius: var(--radius-sm) var(--radius-sm) 0 0 !important;
    background: var(--color-surface-2) !important;
    color: var(--color-muted) !important;
    font-family: var(--font) !important;
    font-weight: 600;
    border: 1px solid var(--color-border) !important;
    border-bottom: none !important;
    transition: background var(--t-fast), color var(--t-fast);
}
.tabs > ul > li > div:hover {
    background: #fff !important;
    color: var(--color-text) !important;
}
.tabs > ul > li > div.selected {
    background: #fff !important;
    color: var(--brand) !important;
    box-shadow: inset 0 -3px 0 var(--brand);
}

/* -----------------------------------------------------------------
   22. Required-field marker — red asterisk
   ----------------------------------------------------------------- */
.required,
label .required,
.line label sup,
abbr[title="required"] {
    color: var(--error) !important;
    margin-left: 3px;
    font-weight: 700;
    text-decoration: none;
}

/* -----------------------------------------------------------------
   23. Fieldset & legend — card-like grouping
   ----------------------------------------------------------------- */
fieldset {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: var(--space-4) var(--space-5) var(--space-5);
    margin: 0 0 var(--space-5);
    background: var(--color-surface);
    box-shadow: var(--shadow-xs);
}
legend {
    padding: 4px 12px;
    margin-left: 4px;
    font-family: var(--font);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: .01em;
    color: var(--brand-600);
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
}

/* -----------------------------------------------------------------
   27. Admin page titles — "Section - Page" two-tone formatting
   ----------------------------------------------------------------- */
.page-title { font-weight: 400; }
.page-title__section { color: var(--color-muted); font-weight: 500; }
.page-title__sep { color: var(--color-border-str); margin: 0 8px; font-weight: 300; }
.page-title__name { color: var(--color-text); font-weight: 700; }

/* -----------------------------------------------------------------
   26. Avatar uploader (/gegevens/wijzigen/)
   ----------------------------------------------------------------- */
.avatar-upload {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.avatar-upload__preview {
    flex: 0 0 auto;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    background: var(--color-surface-2);
    display: flex;
    align-items: center;
    justify-content: center;
}
.avatar-upload__preview img { width: 100%; height: 100%; object-fit: cover; }
.avatar-upload__placeholder { font-size: 42px; color: var(--color-muted); }
.avatar-upload__field { flex: 1 1 220px; }
.avatar-upload__field label { display: block; font-weight: 600; margin-bottom: 8px; }
.avatar-upload__field input[type="file"] {
    font-size: 14px;
    border: 1px dashed var(--color-border-str);
    border-radius: var(--radius-sm);
    padding: 10px;
    width: 100%;
    background: var(--color-surface-2);
    cursor: pointer;
}
.avatar-upload__hint { color: var(--color-muted); font-size: 13px; margin: 8px 0 0; }

/* -----------------------------------------------------------------
   25. Sidebar avatar (hypotheekaanvraag pages)
   ----------------------------------------------------------------- */
#sidebar > img {
    display: block;
    width: 132px;
    height: 132px;
    margin: 0 auto 4px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fff;
    box-shadow: var(--shadow-md);
    background: var(--color-surface-2);
}

/* -----------------------------------------------------------------
   24. Status stepper (/hypotheekaanvraag/status/)
   ----------------------------------------------------------------- */
.status ul.blocks-6 { position: relative; margin-top: 12px; }
.status ul.blocks-6 > li {
    position: relative;
    text-align: center;
    padding-top: 66px;
}
/* Neutralise the legacy FontAwesome-3 arrow connector */
.status ul.blocks-6 > li::after {
    content: '' !important;
    font-family: inherit !important;
    display: none !important;
}
/* Connecting progress line between badges */
.status ul.blocks-6 > li::before {
    content: '';
    position: absolute;
    top: 23px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: var(--color-border);
    z-index: 0;
}
.status ul.blocks-6 > li:first-child::before { display: none; }
.status ul.blocks-6 > li.done::before { background: var(--success); }
/* Numbered circular badge */
.status ul.blocks-6 > li span.large {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 50px;
    line-height: 50px !important;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--color-border);
    color: var(--color-muted);
    font-size: 18px !important;
    font-weight: 700;
    z-index: 1;
    box-shadow: var(--shadow-xs);
}
.status ul.blocks-6 > li.done span.large {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.status ul.blocks-6 > li .matchHeight {
    font-weight: 600;
    color: var(--color-text);
    font-size: 13px;
    line-height: 1.35;
    margin-bottom: 6px;
}
.status ul.blocks-6 > li.done .matchHeight { color: var(--success); }
.status ul.blocks-6 > li svg { max-height: 52px; opacity: .9; margin-top: 6px !important; }

/* Overall progress bar under the stepper */
.tools-progress {
    position: relative;
    height: 10px;
    margin-top: 18px;
    border-radius: var(--radius-pill);
    background: var(--color-border);
    overflow: hidden;
}
.tools-progress > span {
    display: block;
    height: 100%;
    border-radius: var(--radius-pill);
    background: linear-gradient(90deg, var(--brand), var(--success));
}

/* -----------------------------------------------------------------
   21. Chatbox — modern chat bubbles
   ----------------------------------------------------------------- */
.chatbox {
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    background: var(--color-surface);
}
.chatbox .chatbox-title {
    font-family: var(--font) !important;
    font-weight: 700;
    font-size: 15px;
    height: auto;
    line-height: 1.3;
    padding: 16px 20px;
    background: var(--brand) !important;  /* huisstijl blauw */
    color: #fff !important;
}
.chatbox .chatbox-message-scroll {
    max-height: 460px;
    background: var(--color-surface);
    padding: 16px;
    overflow-y: auto;
}
.chatbox .chatbox-message-scroll > div { display: flex; flex-direction: column; gap: 14px; }

.chatbox .chatbox-message {
    max-width: 82%;
    align-self: flex-start;
    margin: 0;
    padding: 12px 14px;
    border-radius: 4px 14px 14px 14px;
    background: var(--color-surface-2);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    opacity: 1;
}
.chatbox .chatbox-message.me {
    align-self: flex-end;
    background: rgba(21, 120, 198, .10);
    border-color: rgba(21, 120, 198, .28);
    border-radius: 14px 4px 14px 14px;
}
.chatbox .chatbox-message .chatbox-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
    color: var(--color-text);
}
.chatbox .chatbox-message.me .chatbox-heading { flex-direction: row-reverse; }
.chatbox .chatbox-message .chatbox-heading img {
    width: 30px; height: 30px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 !important;
}
.chatbox .chatbox-message .date {
    text-align: right;
    font-size: 11px;
    color: var(--color-muted);
    margin-top: 8px;
}
.chatbox .chatbox-messagebox {
    padding: 12px;
    background: var(--color-surface-2);
    border-top: 1px solid var(--color-border);
}
.chatbox .chatbox-messagebox form textarea {
    border: 1px solid var(--color-border-str) !important;
    border-radius: var(--radius-sm) !important;
    height: 84px;
    font-family: var(--font);
    font-size: 14px;
}
.chatbox .chatbox-messagebox form button {
    border-radius: var(--radius-sm) !important;
    font-family: var(--font);
    font-weight: 600;
    height: 42px;
}

/* -----------------------------------------------------------------
   17. Reduced motion
   ----------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }
}