
:root{--navy:#0b1f42;--blue:#c81a46;--text:#0b2544;--muted:#6b7f99;--line:#d8e5f5;--bg:#eef4fb}
*{box-sizing:border-box}
body{margin:0;min-height:100vh;font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:radial-gradient(circle at 20% 10%,#f9fbff 0,#eef4fb 45%,#fdf1f4 100%)}
a{color:inherit;text-decoration:none}input,select,textarea,button{font:inherit}
.login-page{min-height:100vh;display:grid;grid-template-columns:minmax(320px,460px) minmax(0,1fr);background:linear-gradient(135deg,#071936 0,#0d2a63 45%,#f4f8ff 45%,#eef4fb 100%)}
.login-brand{display:flex;flex-direction:column;justify-content:space-between;padding:48px;color:white}
.login-brand-top{display:flex;align-items:center;gap:18px}.brand-mark,.login-mark{width:64px;height:64px;border-radius:20px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#fbe7ed,#7db4ff);color:#071936;font-weight:950}
.login-brand h1{font-size:44px;line-height:1;margin:0;letter-spacing:-.04em}.login-brand p{color:#b9c8df;margin:8px 0 0}
.login-panel{display:flex;align-items:center;justify-content:center;padding:32px}.login-card{width:min(460px,100%);padding:34px;border-radius:32px;border:1px solid rgba(216,229,245,.95);background:rgba(255,255,255,.94);box-shadow:0 30px 75px rgba(15,39,78,.16)}
.login-card h2{font-size:34px;margin:0 0 8px;letter-spacing:-.04em}.login-card p{margin:0 0 24px;color:var(--muted)}
.form-group{margin-bottom:16px}.form-group label{display:block;margin-bottom:8px;font-weight:900;color:#123150}.form-group input,.form-group select,.form-group textarea{width:100%;min-height:50px;border-radius:16px;border:1px solid var(--line);background:#f8fbff;padding:0 14px;color:var(--text)}
.btn,.btn-primary,button[type=submit]{min-height:48px;border:0;border-radius:16px;padding:0 18px;background:linear-gradient(135deg,#c81a46,#e13a67);color:#fff;font-weight:950;cursor:pointer;box-shadow:0 14px 26px rgba(37,99,235,.24)}.login-card button{width:100%;margin-top:4px}
.alert{padding:13px 15px;border-radius:16px;margin-bottom:16px;font-weight:800}.alert-danger,.error{background:#ffe4e6;color:#be123c}.alert-success,.success{background:#dcfce7;color:#166534}
.shell{display:grid;grid-template-columns:290px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;background:linear-gradient(180deg,#071936,#0d2a63);color:white;padding:24px 20px;overflow:auto}
.brand{display:flex;align-items:center;gap:14px;padding:8px 6px 24px;border-bottom:1px solid rgba(255,255,255,.12);margin-bottom:22px}.brand-title{font-weight:950;font-size:25px;letter-spacing:-.04em}.brand-subtitle{color:#9fb1cc;margin-top:3px}
.menu-section{margin:22px 6px 10px;color:#9fb1cc;text-transform:uppercase;letter-spacing:.14em;font-size:12px;font-weight:900}.menu-item{display:flex;align-items:center;min-height:46px;border-radius:16px;padding:0 14px;margin:4px 0;color:#fff;font-weight:850}.menu-item.active{background:rgba(92,129,255,.26);box-shadow:inset 0 0 0 1px rgba(145,170,255,.28)}.menu-item.logout{background:rgba(190,18,60,.18);color:#ffe4e6}
.sidebar-user{margin-top:30px}.user-card{display:flex;gap:12px;align-items:center;border-radius:18px;background:rgba(255,255,255,.1);padding:12px;margin-bottom:10px}.user-avatar{width:42px;height:42px;border-radius:15px;background:#fbe7ed;color:#123150;display:flex;align-items:center;justify-content:center;font-weight:950}.user-card span{display:block;color:#9fb1cc;font-size:13px;margin-top:2px}
.main-wrap{min-width:0}.topbar{height:76px;display:flex;align-items:center;justify-content:space-between;padding:0 28px;border-bottom:1px solid var(--line);background:rgba(255,255,255,.72);backdrop-filter:blur(12px)}.topbar h1{font-size:26px;margin:0;letter-spacing:-.03em}.content{padding:28px}.card{border:1px solid var(--line);background:rgba(255,255,255,.92);border-radius:28px;box-shadow:0 24px 55px rgba(15,39,78,.09);padding:22px}
.grid,.grid-2,.dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.table{width:100%;border-collapse:separate;border-spacing:0 10px}.table th{text-align:left;color:#71849d;font-size:12px;text-transform:uppercase;letter-spacing:.08em;padding:8px}.table td{background:#f8fbff;border-top:1px solid #dce8f7;border-bottom:1px solid #dce8f7;padding:12px}.table td:first-child{border-left:1px solid #dce8f7;border-radius:14px 0 0 14px}.table td:last-child{border-right:1px solid #dce8f7;border-radius:0 14px 14px 0}
@media(max-width:900px){.login-page{grid-template-columns:1fr;background:#eef4fb}.login-brand{display:none}.shell{grid-template-columns:1fr}.sidebar{position:relative;height:auto}}


/* =========================================================
   ICB RRN sidebar sticky fix
   Zorgt dat het linkermenu op desktop altijd doorloopt en zichtbaar blijft.
   ========================================================= */
@media (min-width:1025px){
    html,
    body{
        min-height:100%;
    }

    .shell{
        align-items:start;
        min-height:100dvh;
    }

    .sidebar{
        position:sticky !important;
        top:0 !important;
        align-self:start !important;
        height:100dvh !important;
        min-height:100dvh !important;
        max-height:100dvh !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        scrollbar-gutter:stable;
        overscroll-behavior:contain;
    }

    .sidebar::-webkit-scrollbar{
        width:8px;
    }

    .sidebar::-webkit-scrollbar-thumb{
        background:rgba(148,163,184,.45);
        border-radius:999px;
    }

    .sidebar::-webkit-scrollbar-track{
        background:transparent;
    }

    .main-wrap,
    .content{
        min-width:0;
    }
}

/* In print nooit sticky/fixed sidebar gebruiken. */
@media print{
    .sidebar{
        position:static !important;
        height:auto !important;
        max-height:none !important;
        overflow:visible !important;
    }
}


/* =========================================================
   ICB RRN sidebar fixed full-height fix
   Het menu blijft op desktop altijd van boven tot onder zichtbaar.
   ========================================================= */
@media (min-width:1025px){
    :root{
        --icb-sidebar-width:290px;
    }

    html,
    body{
        min-height:100%;
    }

    body{
        overflow-x:hidden;
    }

    .shell{
        display:block !important;
        min-height:100dvh !important;
    }

    .sidebar{
        position:fixed !important;
        left:0 !important;
        top:0 !important;
        bottom:0 !important;
        width:var(--icb-sidebar-width) !important;
        height:100dvh !important;
        min-height:100dvh !important;
        max-height:100dvh !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        z-index:1200 !important;
        scrollbar-gutter:stable;
        overscroll-behavior:contain;
    }

    .main-wrap{
        margin-left:var(--icb-sidebar-width) !important;
        width:calc(100% - var(--icb-sidebar-width)) !important;
        min-width:0 !important;
        min-height:100dvh !important;
    }

    .topbar{
        left:0;
        right:0;
    }

    .content{
        min-width:0;
    }
}

@media (min-width:1025px) and (max-width:1280px){
    :root{
        --icb-sidebar-width:270px;
    }

    .sidebar{
        padding-left:18px !important;
        padding-right:18px !important;
    }
}

@media print{
    .sidebar{
        position:static !important;
        height:auto !important;
        max-height:none !important;
        overflow:visible !important;
    }

    .main-wrap{
        margin-left:0 !important;
        width:100% !important;
    }
}


/* =========================================================
   ICB RRN adaptief menu - desktop/tablet volledig zichtbaar,
   mobiel als dropdown.
   ========================================================= */

/* Tablet + desktop: menu past zich aan aan schermhoogte en heeft geen eigen scroll nodig. */
@media (min-width:768px){
    :root{
        --icb-sidebar-width:clamp(230px,17vw,290px);
    }

    html,
    body{
        min-height:100%;
        overflow-x:hidden;
    }

    .shell{
        display:block !important;
        min-height:100dvh !important;
    }

    .sidebar{
        position:fixed !important;
        inset:0 auto 0 0 !important;
        width:var(--icb-sidebar-width) !important;
        height:100dvh !important;
        min-height:100dvh !important;
        max-height:100dvh !important;
        overflow:hidden !important;
        z-index:1200 !important;
        display:flex !important;
        flex-direction:column !important;
        padding:clamp(10px,1.45vh,22px) clamp(12px,1.2vw,20px) !important;
        gap:clamp(4px,.7vh,12px) !important;
    }

    .main-wrap{
        margin-left:var(--icb-sidebar-width) !important;
        width:calc(100% - var(--icb-sidebar-width)) !important;
        min-width:0 !important;
        min-height:100dvh !important;
    }

    .brand{
        flex:0 0 auto !important;
        gap:clamp(8px,1vh,14px) !important;
        padding:clamp(4px,.8vh,8px) clamp(3px,.4vw,6px) clamp(7px,1.2vh,18px) !important;
        margin-bottom:clamp(4px,.9vh,14px) !important;
    }

    .brand-mark,
    .brand-icon{
        width:clamp(36px,5.2vh,58px) !important;
        height:clamp(36px,5.2vh,58px) !important;
        border-radius:clamp(12px,1.9vh,20px) !important;
        font-size:clamp(12px,1.6vh,16px) !important;
    }

    .brand-title{
        font-size:clamp(18px,2.5vh,28px) !important;
        line-height:1 !important;
    }

    .brand-subtitle,
    .brand-sub{
        font-size:clamp(10px,1.35vh,14px) !important;
        margin-top:clamp(1px,.25vh,3px) !important;
    }

    .menu{
        flex:1 1 auto !important;
        min-height:0 !important;
        display:flex !important;
        flex-direction:column !important;
        gap:clamp(0px,.18vh,4px) !important;
    }

    .menu-section{
        flex:0 0 auto !important;
        margin:clamp(5px,.88vh,16px) clamp(3px,.4vw,6px) clamp(2px,.35vh,8px) !important;
        font-size:clamp(8px,1.18vh,12px) !important;
        line-height:1 !important;
        letter-spacing:.14em !important;
    }

    .menu-item,
    .menu-link{
        flex:0 0 auto !important;
        min-height:clamp(25px,3.45vh,44px) !important;
        height:clamp(25px,3.45vh,44px) !important;
        border-radius:clamp(10px,1.65vh,18px) !important;
        padding:0 clamp(9px,1vw,16px) !important;
        margin:clamp(0px,.15vh,3px) 0 !important;
        font-size:clamp(11px,1.55vh,16px) !important;
        line-height:1.05 !important;
        white-space:nowrap !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
    }

    .sidebar-user,
    .sidebar-bottom{
        flex:0 0 auto !important;
        margin-top:clamp(5px,.85vh,16px) !important;
        display:flex !important;
        flex-direction:column !important;
        gap:clamp(4px,.55vh,10px) !important;
    }

    .user-card,
    .profile-card{
        min-height:clamp(34px,5vh,58px) !important;
        padding:clamp(5px,.85vh,12px) !important;
        border-radius:clamp(12px,1.9vh,22px) !important;
        gap:clamp(6px,.8vh,12px) !important;
        margin-bottom:0 !important;
    }

    .user-avatar,
    .avatar{
        width:clamp(28px,4.2vh,42px) !important;
        height:clamp(28px,4.2vh,42px) !important;
        border-radius:clamp(10px,1.5vh,15px) !important;
        font-size:clamp(11px,1.45vh,15px) !important;
    }

    .user-card strong,
    .profile-name{
        display:block !important;
        font-size:clamp(11px,1.5vh,15px) !important;
        line-height:1.05 !important;
        white-space:nowrap !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
        max-width:calc(var(--icb-sidebar-width) - 88px) !important;
    }

    .user-card span,
    .profile-role{
        font-size:clamp(9px,1.25vh,13px) !important;
        line-height:1 !important;
    }

    .mobile-menu-btn{
        display:none !important;
    }
}

/* Compactere variant bij lage schermhoogte. */
@media (min-width:768px) and (max-height:760px){
    .sidebar{
        padding-top:8px !important;
        padding-bottom:8px !important;
    }

    .brand{
        padding-bottom:7px !important;
        margin-bottom:4px !important;
    }

    .brand-subtitle,
    .brand-sub{
        display:none !important;
    }

    .menu-section{
        margin-top:5px !important;
        margin-bottom:2px !important;
        font-size:9px !important;
    }

    .menu-item,
    .menu-link{
        min-height:26px !important;
        height:26px !important;
        border-radius:11px !important;
        font-size:12px !important;
    }

    .sidebar-user,
    .sidebar-bottom{
        margin-top:5px !important;
        gap:4px !important;
    }

    .user-card,
    .profile-card{
        min-height:34px !important;
        padding:5px !important;
    }

    .user-card span,
    .profile-role{
        display:none !important;
    }
}

/* Zeer lage schermen: nog compacter zodat alles zichtbaar blijft. */
@media (min-width:768px) and (max-height:650px){
    :root{
        --icb-sidebar-width:250px;
    }

    .brand-mark,
    .brand-icon{
        width:32px !important;
        height:32px !important;
        border-radius:11px !important;
        font-size:11px !important;
    }

    .brand-title{
        font-size:18px !important;
    }

    .menu-section{
        font-size:8px !important;
        margin-top:4px !important;
    }

    .menu-item,
    .menu-link{
        min-height:23px !important;
        height:23px !important;
        font-size:11px !important;
        border-radius:9px !important;
        padding-left:8px !important;
        padding-right:8px !important;
    }

    .user-card,
    .profile-card{
        min-height:30px !important;
    }

    .user-avatar,
    .avatar{
        width:26px !important;
        height:26px !important;
    }
}

/* Mobiel: menu als dropdown onder de topbar. */
@media (max-width:767px){
    :root{
        --icb-mobile-topbar:64px;
    }

    .shell{
        display:block !important;
        min-height:100dvh !important;
    }

    .main-wrap{
        margin-left:0 !important;
        width:100% !important;
        min-width:0 !important;
    }

    .topbar{
        position:sticky !important;
        top:0 !important;
        z-index:1300 !important;
        height:var(--icb-mobile-topbar) !important;
        padding:0 12px !important;
    }

    .mobile-menu-btn{
        display:inline-flex !important;
        align-items:center !important;
        justify-content:center !important;
        width:44px !important;
        height:44px !important;
        border:1px solid #d8e5f5 !important;
        border-radius:14px !important;
        background:#fff1f4 !important;
        color:#0b2544 !important;
        font-weight:950 !important;
        box-shadow:none !important;
        flex:0 0 auto !important;
    }

    .topbar-title{
        min-width:0 !important;
        overflow:hidden !important;
        text-overflow:ellipsis !important;
        white-space:nowrap !important;
        font-size:19px !important;
    }

    .topbar-user{
        display:none !important;
    }

    .sidebar{
        position:fixed !important;
        top:calc(var(--icb-mobile-topbar) + 8px) !important;
        left:12px !important;
        right:12px !important;
        bottom:auto !important;
        width:auto !important;
        height:auto !important;
        max-height:calc(100dvh - var(--icb-mobile-topbar) - 20px) !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        z-index:1250 !important;
        border-radius:24px !important;
        padding:14px !important;
        box-shadow:0 28px 80px rgba(4,14,32,.34) !important;
        transform:translateY(-16px) scale(.98) !important;
        opacity:0 !important;
        pointer-events:none !important;
        transition:transform .18s ease, opacity .18s ease !important;
    }

    .sidebar.open{
        transform:translateY(0) scale(1) !important;
        opacity:1 !important;
        pointer-events:auto !important;
    }

    body.sidebar-open::after{
        content:"";
        position:fixed;
        inset:0;
        z-index:1200;
        background:rgba(4,14,32,.38);
        backdrop-filter:blur(2px);
    }

    body.sidebar-open{
        overflow:hidden !important;
    }

    .sidebar .brand{
        padding:4px 4px 12px !important;
        margin-bottom:10px !important;
    }

    .sidebar .brand-mark,
    .sidebar .brand-icon{
        width:42px !important;
        height:42px !important;
        border-radius:14px !important;
    }

    .sidebar .brand-title{
        font-size:22px !important;
    }

    .sidebar .brand-subtitle,
    .sidebar .brand-sub{
        font-size:12px !important;
    }

    .sidebar .menu-section{
        margin:12px 4px 6px !important;
        font-size:10px !important;
    }

    .sidebar .menu-item,
    .sidebar .menu-link{
        min-height:42px !important;
        height:auto !important;
        border-radius:14px !important;
        margin:3px 0 !important;
        padding:0 13px !important;
        font-size:15px !important;
    }

    .sidebar-user,
    .sidebar-bottom{
        margin-top:12px !important;
    }

    .content{
        padding:14px !important;
    }
}

/* Print reset */
@media print{
    .sidebar{
        position:static !important;
        height:auto !important;
        max-height:none !important;
        overflow:visible !important;
    }

    .main-wrap{
        margin-left:0 !important;
        width:100% !important;
    }
}


/* SpoorKM labels op Leaflet-kaarten */
.icb-rail-km-div-icon{
    background:transparent !important;
    border:0 !important;
}
.leaflet-control-layers label{
    font-weight:800;
    color:#102b4d;
}


/* =========================================================
   ICB RRN notificatiebel
   ========================================================= */
.topbar-right{
    display:flex;
    align-items:center;
    gap:12px;
    min-width:0;
}

.notify-menu{
    position:relative;
    z-index:2200;
}

.notify-menu summary{
    list-style:none;
}

.notify-menu summary::-webkit-details-marker{
    display:none;
}

.notify-bell{
    width:44px;
    height:44px;
    border-radius:16px;
    border:1px solid var(--line);
    background:#f8fbff;
    color:#102b4d;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    position:relative;
    box-shadow:0 12px 24px rgba(15,39,78,.08);
    transition:transform .16s ease, background .16s ease, border-color .16s ease;
}

.notify-bell:hover{
    transform:translateY(-1px);
    background:#fff1f4;
}

.notify-bell-icon{
    font-size:18px;
    line-height:1;
}

.notify-badge{
    position:absolute;
    top:-6px;
    right:-6px;
    min-width:22px;
    height:22px;
    padding:0 6px;
    border-radius:999px;
    background:#c81a46;
    color:#fff;
    border:2px solid #fff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:11px;
    font-weight:950;
    box-shadow:0 10px 20px rgba(37,99,235,.25);
}

.notify-menu.has-attention .notify-bell{
    border-color:#fb923c;
    background:#fff7ed;
    animation:icbNotifyPulse 1.35s infinite;
}

.notify-menu.has-attention .notify-badge{
    background:#f97316;
    box-shadow:0 0 0 0 rgba(249,115,22,.42);
    animation:icbNotifyBadge 1.35s infinite;
}

.notify-menu.has-info:not(.has-attention) .notify-badge{
    background:#c81a46;
}

@keyframes icbNotifyPulse{
    0%{box-shadow:0 0 0 0 rgba(249,115,22,.38),0 12px 24px rgba(15,39,78,.08)}
    70%{box-shadow:0 0 0 12px rgba(249,115,22,0),0 12px 24px rgba(15,39,78,.08)}
    100%{box-shadow:0 0 0 0 rgba(249,115,22,0),0 12px 24px rgba(15,39,78,.08)}
}

@keyframes icbNotifyBadge{
    0%{transform:scale(1)}
    50%{transform:scale(1.08)}
    100%{transform:scale(1)}
}

.notify-panel{
    position:absolute;
    top:54px;
    right:0;
    width:min(410px,calc(100vw - 24px));
    background:#fff;
    border:1px solid var(--line);
    border-radius:24px;
    box-shadow:0 26px 70px rgba(15,39,78,.20);
    overflow:hidden;
    z-index:2300;
}

.notify-panel-head{
    display:flex;
    justify-content:space-between;
    gap:12px;
    align-items:center;
    padding:16px 18px;
    background:linear-gradient(135deg,#fff,#f4f8ff);
    border-bottom:1px solid var(--line);
}

.notify-panel-head strong{
    color:#09213d;
    font-size:18px;
}

.notify-panel-head span{
    border-radius:999px;
    background:#fff1f4;
    color:#a9163d;
    padding:6px 9px;
    font-size:12px;
    font-weight:950;
    white-space:nowrap;
}

.notify-list{
    display:grid;
    gap:8px;
    padding:12px;
    max-height:min(420px,60vh);
    overflow:auto;
}

.notify-item{
    display:flex;
    gap:10px;
    align-items:flex-start;
    border:1px solid #d8e5f5;
    border-radius:18px;
    background:#f8fbff;
    padding:12px;
    text-decoration:none;
}

.notify-item:hover{
    background:#fff1f4;
}

.notify-dot{
    width:12px;
    height:12px;
    border-radius:50%;
    background:#c81a46;
    margin-top:3px;
    flex:0 0 auto;
    box-shadow:0 0 0 5px rgba(37,99,235,.10);
}

.notify-item.warning .notify-dot{background:#f97316;box-shadow:0 0 0 5px rgba(249,115,22,.12)}
.notify-item.danger .notify-dot{background:#dc2626;box-shadow:0 0 0 5px rgba(220,38,38,.12)}
.notify-item.success .notify-dot{background:#16a34a;box-shadow:0 0 0 5px rgba(22,163,74,.12)}

.notify-copy{
    display:block;
    min-width:0;
}

.notify-copy strong{
    display:block;
    color:#09213d;
    font-size:14px;
    line-height:1.2;
}

.notify-copy small{
    display:block;
    color:#647895;
    font-size:12px;
    font-weight:750;
    line-height:1.35;
    margin-top:4px;
}

.notify-copy em{
    display:inline-flex;
    margin-top:8px;
    color:#a9163d;
    font-style:normal;
    font-weight:950;
    font-size:12px;
}

.notify-panel-foot{
    padding:12px 14px;
    border-top:1px solid var(--line);
    background:#f8fbff;
    text-align:center;
}

.notify-panel-foot a{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    height:34px;
    border-radius:12px;
    padding:0 13px;
    background:#fff1f4;
    color:#102b4d;
    font-weight:950;
    text-decoration:none;
}

@media(max-width:767px){
    .topbar-right{
        gap:8px;
    }

    .notify-bell{
        width:40px;
        height:40px;
        border-radius:14px;
    }

    .notify-panel{
        position:fixed;
        top:72px;
        right:10px;
        left:10px;
        width:auto;
    }

    .topbar-user{
        max-width:38vw;
        overflow:hidden;
        text-overflow:ellipsis;
        white-space:nowrap;
    }
}


/* =========================================================
   ICB RRN typografie verfijning
   Duidelijker lettertype en minder zware vetgedrukte teksten.
   ========================================================= */
:root{
    --icb-font-main:"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
    --icb-weight-normal:400;
    --icb-weight-medium:500;
    --icb-weight-semibold:600;
    --icb-weight-bold:700;
    --icb-weight-heavy:800;
}

html,
body,
input,
select,
textarea,
button{
    font-family:var(--icb-font-main) !important;
    font-weight:var(--icb-weight-normal) !important;
    -webkit-font-smoothing:antialiased;
    -moz-osx-font-smoothing:grayscale;
    text-rendering:optimizeLegibility;
}

/* Koppen blijven duidelijk, maar minder zwaar dan voorheen. */
h1,
h2,
h3,
h4,
h5,
h6,
.page-title,
.topbar-title,
.dash-head h1,
.dash-card h2,
.dash-card h3,
.dash-hero-title,
.card h1,
.card h2,
.card h3,
.brand-title{
    font-family:var(--icb-font-main) !important;
    font-weight:var(--icb-weight-bold) !important;
    letter-spacing:-.025em !important;
}

/* Grote paginatitels iets rustiger. */
.dash-head h1,
.content h1,
.page h1,
h1{
    font-weight:var(--icb-weight-bold) !important;
}

/* Navigatie en labels minder dik, maar nog goed leesbaar. */
.menu-item,
.menu-section,
.btn,
.btn-primary,
button[type=submit],
.dash-btn,
.dash-pill,
.dash-role-tag,
.notify-copy strong,
.notify-panel-head strong,
.notify-badge,
.form-group label,
.table th,
.badge,
.label,
.status-badge,
.pick-count,
.dash-stat span,
.dash-shift-row span,
.dash-subtle-note,
.dash-empty,
.dash-global-item strong,
.dash-news-item strong,
.dash-duty-date,
.dash-action strong,
.dash-row strong,
.service-card-title,
.card-title{
    font-weight:var(--icb-weight-semibold) !important;
}

/* Belangrijke waarden mogen iets sterker blijven. */
strong,
b,
.dash-stat strong,
.dash-kpi strong,
.dash-mini-stat strong,
.dash-role-badge,
.brand-mark,
.login-mark{
    font-weight:var(--icb-weight-bold) !important;
}

/* Extreem zware weights uit eerdere styling normaliseren. */
*[style*="font-weight:950"],
*[style*="font-weight: 950"],
*[style*="font-weight:900"],
*[style*="font-weight: 900"],
.fw-900,
.fw-950{
    font-weight:var(--icb-weight-bold) !important;
}

/* Bodytekst iets helderder en rustiger. */
p,
small,
td,
li,
.dash-muted,
.dash-hero-sub,
.dash-action p,
.dash-row small,
.dash-global-item div,
.notify-copy small,
.brand-subtitle,
.topbar-user{
    font-weight:var(--icb-weight-normal) !important;
}

/* Dashboard: compacte, lichtere look. */
.dash-card,
.dash-global-card,
.dash-panel,
.dash-action,
.dash-row,
.dash-shift-row,
.dash-empty{
    font-weight:var(--icb-weight-normal) !important;
}

.dash-card h2,
.dash-global-card h2,
.dash-section-title h2,
.dash-panel summary{
    font-weight:var(--icb-weight-bold) !important;
}

/* Buttons niet zo zwaar als eerst, maar wel duidelijk klikbaar. */
.btn,
.btn-primary,
button[type=submit],
.dash-btn,
.notify-panel-foot a,
.menu-item{
    font-weight:var(--icb-weight-semibold) !important;
}

/* Formulier- en kaartlabels subtieler. */
label,
.form-label,
.table th,
.menu-section,
.dash-stat span,
.dash-subtle-note{
    font-weight:var(--icb-weight-medium) !important;
    letter-spacing:.03em !important;
}

/* Kleine tekst beter leesbaar door iets minder condensatie. */
small,
.dash-row small,
.notify-copy small,
.dash-duty-meta{
    letter-spacing:0 !important;
}


/* =========================================================
   ICB RRN sidebar menu-overlap fix
   Beheer-menu is langer geworden door Reset testdata.
   Het hoofdmenu krijgt daarom zijn eigen scrollruimte, zodat
   profiel/uitloggen nooit over menu-items heen vallen.
   ========================================================= */
@media (min-width:768px){
    .sidebar{
        display:flex !important;
        flex-direction:column !important;
        overflow:hidden !important;
    }

    .sidebar .brand{
        flex:0 0 auto !important;
    }

    .sidebar .menu{
        flex:1 1 auto !important;
        min-height:0 !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        padding-right:4px !important;
        padding-bottom:10px !important;
        scrollbar-gutter:stable;
        overscroll-behavior:contain;
    }

    .sidebar .menu::-webkit-scrollbar{
        width:7px;
    }

    .sidebar .menu::-webkit-scrollbar-thumb{
        background:rgba(148,163,184,.45);
        border-radius:999px;
    }

    .sidebar .menu::-webkit-scrollbar-track{
        background:transparent;
    }

    .sidebar-user,
    .sidebar-bottom{
        flex:0 0 auto !important;
        position:relative !important;
        z-index:2 !important;
        margin-top:8px !important;
        padding-top:10px !important;
        border-top:1px solid rgba(255,255,255,.12) !important;
        background:linear-gradient(180deg,rgba(13,42,99,.96),rgba(13,42,99,1)) !important;
    }
}

@media (max-width:767px){
    .sidebar{
        overflow-y:auto !important;
    }

    .sidebar .menu{
        overflow:visible !important;
        padding-bottom:0 !important;
    }

    .sidebar-user,
    .sidebar-bottom{
        border-top:1px solid rgba(255,255,255,.12) !important;
        padding-top:12px !important;
    }
}


/* =========================================================
   ICB RRN sidebar compact zonder scrollbar
   Menu-items zijn compacter gemaakt zodat het volledige menu,
   inclusief profiel en uitloggen, zichtbaar blijft zonder scrollbar.
   ========================================================= */
@media (min-width:768px){
    .sidebar{
        overflow:hidden !important;
        padding-top:clamp(8px,1.05vh,18px) !important;
        padding-bottom:clamp(8px,1.05vh,18px) !important;
    }

    .sidebar .brand{
        gap:9px !important;
        padding-top:4px !important;
        padding-bottom:clamp(8px,1vh,13px) !important;
        margin-bottom:clamp(4px,.6vh,8px) !important;
    }

    .sidebar .brand-mark,
    .sidebar .brand-icon{
        width:clamp(40px,4.7vh,52px) !important;
        height:clamp(40px,4.7vh,52px) !important;
        border-radius:16px !important;
        font-size:13px !important;
    }

    .sidebar .brand-title{
        font-size:clamp(19px,2.05vh,25px) !important;
        line-height:1 !important;
    }

    .sidebar .brand-subtitle,
    .sidebar .brand-sub{
        font-size:clamp(10px,1.05vh,12px) !important;
    }

    .sidebar .menu{
        overflow:visible !important;
        padding-right:0 !important;
        padding-bottom:0 !important;
        gap:0 !important;
    }

    .sidebar .menu::-webkit-scrollbar{
        display:none !important;
        width:0 !important;
    }

    .sidebar .menu-section{
        margin:clamp(7px,.82vh,11px) 5px clamp(3px,.35vh,5px) !important;
        font-size:clamp(9px,1.02vh,11px) !important;
        line-height:1 !important;
    }

    .sidebar .menu-item,
    .sidebar .menu-link{
        min-height:clamp(31px,3.05vh,38px) !important;
        height:clamp(31px,3.05vh,38px) !important;
        border-radius:14px !important;
        padding-left:clamp(10px,.95vw,14px) !important;
        padding-right:clamp(10px,.95vw,14px) !important;
        margin:1px 0 !important;
        font-size:clamp(12px,1.34vh,15px) !important;
        line-height:1 !important;
    }

    .sidebar-user,
    .sidebar-bottom{
        margin-top:clamp(6px,.75vh,10px) !important;
        padding-top:clamp(7px,.85vh,10px) !important;
        gap:clamp(4px,.5vh,7px) !important;
        border-top:1px solid rgba(255,255,255,.12) !important;
        background:transparent !important;
    }

    .sidebar-user .user-card,
    .sidebar-bottom .profile-card{
        min-height:clamp(38px,4.6vh,52px) !important;
        padding:clamp(6px,.75vh,9px) !important;
        border-radius:16px !important;
        gap:8px !important;
    }

    .sidebar-user .user-avatar,
    .sidebar-bottom .avatar{
        width:clamp(30px,3.7vh,38px) !important;
        height:clamp(30px,3.7vh,38px) !important;
        border-radius:12px !important;
        font-size:12px !important;
    }

    .sidebar-user .user-card strong,
    .sidebar-bottom .profile-name{
        font-size:clamp(11px,1.25vh,14px) !important;
        line-height:1 !important;
    }

    .sidebar-user .user-card span,
    .sidebar-bottom .profile-role{
        font-size:clamp(9px,1.05vh,12px) !important;
        line-height:1 !important;
    }
}

/* Lage schermen: nog compacter, maar zonder scrollbar. */
@media (min-width:768px) and (max-height:760px){
    .sidebar{
        padding-top:7px !important;
        padding-bottom:7px !important;
    }

    .sidebar .brand{
        padding-bottom:6px !important;
        margin-bottom:3px !important;
    }

    .sidebar .brand-mark,
    .sidebar .brand-icon{
        width:34px !important;
        height:34px !important;
        border-radius:12px !important;
    }

    .sidebar .brand-title{
        font-size:18px !important;
    }

    .sidebar .brand-subtitle,
    .sidebar .brand-sub,
    .sidebar-user .user-card span,
    .sidebar-bottom .profile-role{
        display:none !important;
    }

    .sidebar .menu-section{
        margin-top:4px !important;
        margin-bottom:2px !important;
        font-size:8px !important;
    }

    .sidebar .menu-item,
    .sidebar .menu-link{
        min-height:24px !important;
        height:24px !important;
        font-size:10.5px !important;
        border-radius:10px !important;
        margin:0 !important;
        padding-left:8px !important;
        padding-right:8px !important;
    }

    .sidebar-user,
    .sidebar-bottom{
        margin-top:4px !important;
        padding-top:5px !important;
        gap:3px !important;
    }

    .sidebar-user .user-card,
    .sidebar-bottom .profile-card{
        min-height:30px !important;
        padding:4px !important;
    }

    .sidebar-user .user-avatar,
    .sidebar-bottom .avatar{
        width:24px !important;
        height:24px !important;
        border-radius:9px !important;
    }
}



/* =========================================================
   Sidebar v7.9 - rustiger beheer-menu
   Het menu scrollt zelfstandig; profiel en uitloggen blijven
   altijd netjes onderaan staan. Dit overschrijft oudere compacte
   no-scroll regels die op langere beheermenu's te krap werden.
   ========================================================= */
@media (min-width:768px){
    .sidebar{
        display:flex !important;
        flex-direction:column !important;
        height:100vh !important;
        padding:14px 14px 12px !important;
        overflow:hidden !important;
        gap:8px !important;
    }
    .sidebar .brand{
        flex:0 0 auto !important;
        margin:0 0 4px !important;
        padding:4px 4px 12px !important;
        gap:10px !important;
        border-bottom:1px solid rgba(255,255,255,.12) !important;
    }
    .sidebar .brand-mark,
    .sidebar .brand-icon{
        width:42px !important;
        height:42px !important;
        border-radius:14px !important;
        font-size:12px !important;
        flex:0 0 42px !important;
    }
    .sidebar .brand-title{
        font-size:20px !important;
        line-height:1.05 !important;
    }
    .sidebar .brand-subtitle,
    .sidebar .brand-sub{
        display:block !important;
        font-size:10px !important;
        line-height:1.2 !important;
    }
    .sidebar .menu{
        flex:1 1 auto !important;
        min-height:0 !important;
        overflow-y:auto !important;
        overflow-x:hidden !important;
        padding:0 4px 8px 0 !important;
        scrollbar-gutter:stable !important;
        overscroll-behavior:contain !important;
    }
    .sidebar .menu::-webkit-scrollbar{width:6px !important;display:block !important}
    .sidebar .menu::-webkit-scrollbar-track{background:transparent !important}
    .sidebar .menu::-webkit-scrollbar-thumb{background:rgba(148,163,184,.42) !important;border-radius:999px !important}
    .sidebar .menu-section{
        margin:12px 6px 5px !important;
        font-size:9px !important;
        line-height:1.15 !important;
        letter-spacing:.10em !important;
    }
    .sidebar .menu-item,
    .sidebar .menu-link{
        min-height:34px !important;
        height:auto !important;
        margin:1px 0 !important;
        padding:8px 10px !important;
        border-radius:12px !important;
        font-size:12px !important;
        line-height:1.2 !important;
        white-space:normal !important;
    }
    .sidebar-user,
    .sidebar-bottom{
        flex:0 0 auto !important;
        margin:0 !important;
        padding:10px 0 0 !important;
        gap:5px !important;
        border-top:1px solid rgba(255,255,255,.12) !important;
        background:linear-gradient(180deg,rgba(13,42,99,.02),rgba(13,42,99,.32)) !important;
        position:relative !important;
        z-index:3 !important;
    }
    .sidebar-user .user-card,
    .sidebar-bottom .profile-card{
        min-height:46px !important;
        padding:7px 8px !important;
        border-radius:14px !important;
        gap:8px !important;
        margin-bottom:3px !important;
    }
    .sidebar-user .user-avatar,
    .sidebar-bottom .avatar{
        width:32px !important;
        height:32px !important;
        border-radius:11px !important;
        flex:0 0 32px !important;
    }
    .sidebar-user .user-card strong,
    .sidebar-bottom .profile-name{
        font-size:11px !important;
        line-height:1.15 !important;
    }
    .sidebar-user .user-card span,
    .sidebar-bottom .profile-role{
        display:block !important;
        font-size:9px !important;
        line-height:1.15 !important;
    }
}
