
:root {
    --sb: #0b1424; --sb-2: #111d33; --sb-hover: rgba(148,163,184,.10); --sb-text: #aab6c8; --sb-line: rgba(148,163,184,.12);
    --accent: #22d3ee; --primary: #2563eb; --primary-dark: #1d4ed8; --grad: linear-gradient(135deg, #1e40af 0%, #2563eb 45%, #06b6d4 100%);
    --bg: #f3f6fa; --card: #ffffff; --card-line: #e6ebf2; --line: #e6ebf2; --text: #0f172a; --muted: #64748b;
    --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 2px 8px rgba(15,23,42,.04);
    --shadow-md: 0 4px 12px rgba(15,23,42,.06), 0 12px 32px rgba(15,23,42,.06);
    --sb-width: 252px; --sb-collapsed: 68px; --radius: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
       background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px;
       background-image: radial-gradient(rgba(37,99,235,.06) 1px, transparent 1px); background-size: 22px 22px; }
a { color: var(--primary); }
h2 { font-weight: 700; letter-spacing: -.015em; }
h3 { font-weight: 650; letter-spacing: -.01em; }

/* ---------- App-raster ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
    width: var(--sb-width); color: var(--sb-text);
    background: linear-gradient(180deg, var(--sb-2) 0%, var(--sb) 100%);
    display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
    transition: width .2s ease; flex-shrink: 0; overflow: hidden; position: sticky;
}
.sidebar::after { content: ""; position: absolute; inset: auto 0 0 0; height: 220px; pointer-events: none; opacity: .5;
    background: radial-gradient(circle at 20% 80%, rgba(34,211,238,.12), transparent 60%),
                radial-gradient(circle at 90% 100%, rgba(37,99,235,.18), transparent 55%); }
.sb-collapsed .sidebar { width: var(--sb-collapsed); }
.brand { display: flex; align-items: center; gap: .75rem; padding: 0 1.15rem; height: 64px; color: #fff; font-weight: 700;
         font-size: 1.1rem; white-space: nowrap; border-bottom: 1px solid var(--sb-line); text-decoration: none; }
.brand svg { flex-shrink: 0; filter: drop-shadow(0 4px 10px rgba(6,182,212,.35)); }
.wordmark { display: flex; flex-direction: column; line-height: 1.05; }
.wordmark .wm-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }
.wordmark .wm-sub { font-size: .6rem; letter-spacing: .18em; text-transform: uppercase; color: #67e8f9; font-weight: 600; margin-top: 3px; }
.wordmark.big .wm-name { font-size: 1.9rem; color: #fff; }
.wordmark.big .wm-sub { font-size: .78rem; letter-spacing: .2em; color: #a5f3fc; }
.menu { flex: 1; padding: .8rem .65rem; overflow-y: auto; overflow-x: hidden; position: relative; z-index: 1; }
.menu .item {
    display: flex; align-items: center; gap: .8rem; padding: .6rem .8rem; margin-bottom: 3px;
    border-radius: 10px; color: var(--sb-text); text-decoration: none; white-space: nowrap; font-size: .94rem;
    transition: background .15s, color .15s;
}
.menu .item:hover { background: var(--sb-hover); color: #fff; }
.menu .item.active { background: linear-gradient(90deg, rgba(37,99,235,.35), rgba(6,182,212,.12)); color: #fff;
                     box-shadow: inset 3px 0 0 var(--accent); }
.menu .item.active .ico { color: var(--accent); }
.ico { width: 20px; height: 20px; flex-shrink: 0; }
.sb-badge { margin-left: auto; background: #f59e0b; color: #111827; font-size: .7rem; font-weight: 700; border-radius: 99px;
            padding: 0 .45rem; line-height: 1.35rem; min-width: 1.35rem; text-align: center; }
.sb-collapsed .sb-badge { position: absolute; margin: 0; transform: translate(14px, -10px); font-size: .6rem; line-height: 1rem; min-width: 1rem; padding: 0 .25rem; }
.sect { margin: 1.1rem .5rem .45rem; font-size: .68rem; text-transform: uppercase; letter-spacing: .12em; color: #6b7d96;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1px; font-weight: 600; }
.sb-foot { padding: .65rem; border-top: 1px solid var(--sb-line); position: relative; z-index: 1; }
.sb-foot button {
    width: 100%; display: flex; align-items: center; gap: .8rem; background: none; color: var(--sb-text);
    border: none; padding: .6rem .8rem; border-radius: 10px; cursor: pointer; font-size: .94rem; margin: 0; white-space: nowrap; box-shadow: none;
}
.sb-foot button:hover { background: var(--sb-hover); color: #fff; }
.sb-foot .ico { transition: transform .2s ease; }
.sb-collapsed .sb-foot .ico { transform: rotate(180deg); }
.sb-collapsed .label { display: none; }
.sb-collapsed .brand { justify-content: center; padding: 0; }
.sb-collapsed .menu .item { justify-content: center; padding: .6rem 0; }
.sb-collapsed .sb-foot button { justify-content: center; padding: .6rem 0; }
.sb-collapsed .sect { margin: .9rem .7rem; font-size: 0; border-top: 1px solid var(--sb-line); }

.main-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: 64px; background: rgba(255,255,255,.82); backdrop-filter: saturate(1.6) blur(10px); -webkit-backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid var(--line); display: flex; align-items: center;
    justify-content: space-between; padding: 0 1.6rem; position: sticky; top: 0; z-index: 20; gap: 1rem;
}
.topbar-left, .topbar-right { display: flex; align-items: center; gap: 1rem; }
.topbar-mid { flex: 1 1 0; min-width: 0; display: flex; justify-content: center; align-items: center; height: 100%; }
.topbar-mid .clogo { display: flex; align-items: center; height: 44px; max-width: 240px; padding: 3px 10px; border-radius: 10px; }
.topbar-mid img { max-height: 38px; max-width: 100%; object-fit: contain; display: block; }
html[data-mode=dark] .topbar-mid .clogo { background: rgba(255,255,255,.94); }
@media (max-width: 1150px) { .topbar-mid { display: none; } }
.status-chip { display: inline-flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--muted); background: #f1f5f9;
               border: 1px solid var(--line); padding: .3rem .7rem; border-radius: 99px; white-space: nowrap; }
.status-chip .dot { width: 8px; height: 8px; border-radius: 50%; background: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }

/* ---------- ADOM-selector ---------- */
.adom { position: relative; }
.adom-btn {
    display: flex; align-items: center; gap: .6rem; background: #fff; border: 1px solid var(--line); color: var(--text);
    padding: .45rem .9rem; border-radius: 10px; cursor: pointer; font-size: .93rem; margin: 0; min-width: 260px; justify-content: flex-start;
    box-shadow: var(--shadow-sm);
}
.adom-btn:hover { background: #f8fafc; border-color: #cbd5e1; }
.adom-tag { background: var(--grad); color: #fff; font-size: .64rem; padding: .12rem .45rem; border-radius: 5px; letter-spacing: .08em; font-weight: 700; }
.adom-btn .caret { margin-left: auto; color: var(--muted); }
.adom-panel {
    position: absolute; top: calc(100% + 8px); left: 0; width: 340px; background: #fff; border: 1px solid var(--line);
    border-radius: 14px; box-shadow: var(--shadow-md); padding: .6rem; z-index: 50;
}
.adom-panel[hidden] { display: none; }
.adom-panel input { margin-bottom: .5rem; }
.adom-panel ul { list-style: none; max-height: 320px; overflow-y: auto; }
.adom-panel li a { display: block; padding: .5rem .7rem; border-radius: 8px; color: var(--text); text-decoration: none; }
.adom-panel li a:hover, .adom-panel li a.current { background: #eff6ff; color: var(--primary-dark); }
.adom-panel .empty { padding: .6rem; color: var(--muted); font-size: .9rem; }

.userbox { display: flex; align-items: center; gap: .75rem; }
.userlink { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--text); padding: .25rem .5rem .25rem .25rem;
            border-radius: 99px; transition: background .15s; }
.userlink:hover { background: #f1f5f9; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center;
          font-weight: 700; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 2px #fff, 0 0 0 3px #dbeafe; }
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar.xl { width: 112px; height: 112px; font-size: 2.6rem; box-shadow: 0 0 0 4px #fff, 0 0 0 6px #bfdbfe, var(--shadow-md); }
.userbox .who { line-height: 1.2; font-weight: 600; font-size: .92rem; }
.userbox .who small { color: var(--muted); display: block; font-size: .74rem; font-weight: 500; }
.userbox form { display: inline; }
.userbox button { background: #fff; color: var(--text); border: 1px solid var(--line); padding: .4rem .85rem; margin: 0; box-shadow: none; }
.userbox button:hover { background: #f8fafc; }

main { padding: 1.75rem 2rem 1rem; max-width: 1480px; width: 100%; }
footer { text-align: center; padding: 1.5rem 1rem 2rem; color: var(--muted); font-size: .82rem; }
footer .foot-brand { display: inline-flex; align-items: center; gap: .45rem; font-weight: 600; letter-spacing: .01em; }
footer .foot-brand svg { flex-shrink: 0; }
footer .fdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); margin: 0 .5rem 1px; }

/* ---------- Basiselementen ---------- */
.page-title { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: 1.3rem; }
.page-title h2 { font-size: 1.55rem; }
.panel { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 1.5rem;
         box-shadow: var(--shadow-sm); margin-bottom: 1.4rem; }
.panel h2, .panel h3 { margin-bottom: .8rem; }
.muted { color: var(--muted); font-size: .9rem; }
.hint { background: #f0f7ff; border: 1px solid #cfe2ff; color: #1e3a8a; padding: .85rem 1rem; border-radius: 12px; font-size: .88rem; margin: 1rem 0; }

.flash { padding: .85rem 1rem .85rem 2.6rem; border-radius: 12px; margin-bottom: 1rem; position: relative; border: 1px solid transparent; }
.flash::before { position: absolute; left: 1rem; top: .82rem; font-weight: 700; }
.flash.success { background: #ecfdf5; color: #065f46; border-color: #a7f3d0; }
.flash.success::before { content: "\2713"; }
.flash.error { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.flash.error::before { content: "!"; }
.flash.info { background: #eff6ff; color: #1e3a8a; border-color: #bfdbfe; }
.flash.info::before { content: "i"; }

label { display: block; font-weight: 600; margin: .85rem 0 .25rem; font-size: .9rem; }
label.check { display: inline-flex; align-items: center; gap: .4rem; font-weight: normal; margin: .25rem 1rem .25rem 0; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=tel], select, textarea,
input[type=date], input[type=datetime-local] {
    width: 100%; padding: .6rem .8rem; border: 1px solid #d5dde8; border-radius: 10px; font-size: .95rem; background: #fff;
    font-family: inherit; color: var(--text); transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(37,99,235,.12); }
button, .btn {
    background: var(--grad); color: #fff; border: none; padding: .58rem 1.15rem; border-radius: 10px; font-size: .92rem; font-weight: 600;
    cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; margin-top: .8rem;
    box-shadow: 0 1px 2px rgba(15,23,42,.08), 0 4px 12px rgba(37,99,235,.20); transition: filter .15s, transform .05s;
    font-family: inherit;
}
button:hover, .btn:hover { filter: brightness(1.07); }
button:active, .btn:active { transform: translateY(1px); }
button:disabled { opacity: .6; cursor: wait; }
.btn.secondary, button.secondary { background: #fff; color: var(--text); border: 1px solid #d5dde8; box-shadow: var(--shadow-sm); }
.btn.secondary:hover, button.secondary:hover { background: #f8fafc; filter: none; }
button.danger { background: #dc2626; box-shadow: 0 4px 12px rgba(220,38,38,.2); }
button.danger:hover { background: #b91c1c; }

.tabs { display: flex; gap: .3rem; margin-bottom: 1.4rem; flex-wrap: wrap; background: #e9eef5; padding: .3rem; border-radius: 12px; width: fit-content; max-width: 100%; }
.tabs a { padding: .5rem 1.05rem; border-radius: 9px; color: #475569; text-decoration: none; font-weight: 600; font-size: .9rem; }
.tabs a:hover { color: var(--text); }
.tabs a.active { background: #fff; color: var(--text); box-shadow: var(--shadow-sm); }

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .7rem .65rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: #64748b; font-weight: 650; background: #f8fafc; }
tbody tr:hover td { background: #f8fbff; }
td form { margin-bottom: .6rem; }
td input[type=password], td input[type=text] { width: 190px; padding: .4rem .6rem; }
td button { margin-top: .3rem; padding: .38rem .8rem; }
.badge { display: inline-block; background: #e0ecff; color: #1e40af; padding: .1rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge.red { background: #fee2e2; color: #991b1b; }
.badge.green { background: #dcfce7; color: #166534; }
.badge.gray { background: #eef2f6; color: #475569; }
.badge.amber { background: #fef3c7; color: #92400e; }
.badge.blue { background: #dbeafe; color: #1e40af; }
.sess-chip { display:inline-flex; align-items:center; gap:.35rem; padding:.3rem .65rem; border-radius:99px; font-size:.8rem;
    font-weight:600; color:#475569; background:#f1f5f9; border:1px solid #e2e8f0; text-decoration:none; white-space:nowrap; }
.sess-chip .ico { width:14px; height:14px; }
.sess-chip.warn { color:#9a3412; background:#ffedd5; border-color:#fdba74; }
details.rename summary { cursor: pointer; font-size: .8rem; margin-top: .25rem; }
details.rename form { display: flex; gap: .4rem; align-items: center; margin-top: .4rem; }
details.rename input { width: 200px; }
details.rename button { margin-top: 0; }

/* ---------- Inloggen ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--sb); position: relative; overflow: hidden; color: #e2e8f0; display: flex; flex-direction: column;
             justify-content: space-between; padding: 3rem; }
.login-art::before { content: ""; position: absolute; inset: 0;
    background: radial-gradient(circle at 15% 20%, rgba(37,99,235,.45), transparent 45%),
                radial-gradient(circle at 85% 75%, rgba(6,182,212,.35), transparent 45%); }
.login-art > * { position: relative; }
.login-art .net { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; }
.login-brand { display: flex; align-items: center; gap: .8rem; }
.login-art h1 { font-size: 2.1rem; line-height: 1.2; letter-spacing: -.02em; max-width: 30rem; color: #fff; }
.login-art p { color: #94a3b8; max-width: 30rem; margin-top: .8rem; }
.login-art .vendors { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.login-art .vendors span { border: 1px solid rgba(148,163,184,.3); background: rgba(15,23,42,.35); color: #cbd5e1;
                           padding: .25rem .7rem; border-radius: 99px; font-size: .78rem; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.login-box { width: 100%; max-width: 400px; }
.login-box .panel { box-shadow: var(--shadow-md); padding: 2rem; }
.login-box h2 { font-size: 1.5rem; }
@media (max-width: 900px) { .login-wrap { grid-template-columns: 1fr; } .login-art { padding: 2rem; min-height: 260px; } .login-art h1 { font-size: 1.5rem; } }

/* ---------- Globaal zoeken ---------- */
.gsearch { position: relative; display: flex; align-items: center; }
.gsearch .ico { position: absolute; left: .7rem; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.gsearch input { width: 270px; padding: .48rem 2.2rem .48rem 2.1rem; border-radius: 10px; background: #f8fafc; font-size: .88rem;
                 transition: width .15s; }
.gsearch input:focus { background: #fff; width: 340px; }
.userbox .who { white-space: nowrap; }
@media (max-width: 1500px) { .status-chip { display: none; } }
.gsearch kbd { position: absolute; right: .6rem; font-size: .7rem; color: var(--muted); border: 1px solid var(--line);
               border-radius: 5px; padding: 0 .35rem; background: #fff; font-family: inherit; }
@media (max-width: 1200px) { .gsearch input { width: 200px; } .gsearch input:focus { width: 240px; } .gsearch kbd { display: none; } }
/* Kleinere laptopschermen (861-1365px): bovenbalk paste niet; ruimte maken zonder dat er iets wegvalt dat nodig is */
@media (min-width: 861px) and (max-width: 1365px) { .userbox .who { display: none; } .topbar-right { gap: .6rem; } }
@media (min-width: 861px) and (max-width: 1180px) { .sess-chip { display: none; } .gsearch input { width: 170px; }
    .gsearch input:focus { width: 210px; } .adom-btn { min-width: 0; max-width: 210px; } }
@media (min-width: 861px) and (max-width: 1020px) { .gsearch input { width: 130px; } .gsearch input:focus { width: 170px; } }
@media (min-width: 861px) and (max-width: 940px) { .gsearch input { width: 110px; } .adom-btn { max-width: 160px; } .topbar { padding: 0 1rem; } }

/* ---------- Taalkeuze ---------- */
.langsw { display: inline-flex; background: #f1f5f9; border: 1px solid var(--line); border-radius: 99px; padding: 2px; }
.langsw button { margin: 0; padding: .22rem .6rem; border-radius: 99px; background: transparent; color: var(--muted);
                 box-shadow: none; font-size: .76rem; font-weight: 700; letter-spacing: .04em; }
.langsw button:hover { color: var(--text); filter: none; }
.langsw button.on { background: #fff; color: var(--primary); box-shadow: var(--shadow-sm); }
.login-side { position: relative; }
.login-lang { position: absolute; top: 1.2rem; right: 1.2rem; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; border-radius: 20px; padding: 1.6rem 1.8rem; margin-bottom: 1.4rem; color: #fff;
        background: linear-gradient(120deg, #0b1424 0%, #13306b 55%, #0e7490 100%); box-shadow: var(--shadow-md);
        display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.hero .net { position: absolute; right: -40px; top: -30px; height: 260px; opacity: .45; pointer-events: none; }
.hero > *:not(.net) { position: relative; }
.hero h2 { font-size: 1.6rem; color: #fff; }
.hero p { color: #bfdbfe; margin-top: .25rem; font-size: .95rem; }
.hero .hero-stats { display: flex; gap: 1.8rem; flex-wrap: wrap; }
.hero .hero-stats div { min-width: 90px; }
.hero .hero-stats strong { display: block; font-size: 1.55rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.hero .hero-stats span { color: #a5c8f5; font-size: .8rem; }
.hero .btn.secondary, .hero button.secondary { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); box-shadow: none; }
.hero .btn.secondary:hover { background: rgba(255,255,255,.2); }
.hero-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.hero-actions .btn, .hero-actions button { margin-top: 0; }

/* ---------- Dashboard / policies ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.4rem; }
.kpi { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 1.1rem 1.2rem 1.15rem;
       box-shadow: var(--shadow-sm); position: relative; overflow: hidden; transition: transform .15s, box-shadow .15s; }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--grad); }
.kpi .kpi-top { display: flex; align-items: center; gap: .65rem; margin-bottom: .6rem; min-height: 34px; }
.kpi .kpi-top .lbl { flex: 1; min-width: 0; line-height: 1.25; font-size: .8rem; overflow-wrap: break-word; hyphens: auto; }
.kpi .kico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: #eff6ff; color: var(--primary); flex-shrink: 0; }
.kpi .kico .ico { width: 18px; height: 18px; }
.kpi .num { font-size: 1.85rem; font-weight: 750; line-height: 1.1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi .lbl { color: var(--muted); font-size: .84rem; font-weight: 500; }
.kpi.red::before { background: #dc2626; } .kpi.red .kico { background: #fef2f2; color: #dc2626; }
.kpi.amber::before { background: #f59e0b; } .kpi.amber .kico { background: #fffbeb; color: #d97706; }
.kpi.green::before { background: #16a34a; } .kpi.green .kico { background: #f0fdf4; color: #16a34a; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: 1rem; }
.toolbar .btn, .toolbar button { margin-top: 0; }
.toolbar .spacer { flex: 1; }
.pills { display: flex; gap: .4rem; flex-wrap: wrap; }
.pill { padding: .36rem .9rem; border-radius: 99px; background: #fff; border: 1px solid #d5dde8; color: var(--text); text-decoration: none; font-size: .86rem; font-weight: 500; }
.pill:hover { background: #f8fafc; border-color: #b6c3d4; }
.pill.active { background: var(--sb-2); border-color: var(--sb-2); color: #fff; }
.searchform { display: flex; gap: .4rem; }
.searchform input { width: 240px; }
.searchform button { margin-top: 0; }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
.table-wrap table tr:last-child td { border-bottom: none; }
table.policies th { position: sticky; top: 0; white-space: nowrap; }
table.policies th a { color: inherit; text-decoration: none; }
table.policies th a:hover { color: var(--primary); }
table.policies td { font-size: .9rem; }
td.clip { max-width: 190px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
tr.is-unused td:first-child { box-shadow: inset 4px 0 0 #dc2626; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
.mailbox { position: relative; }
.mailbox summary { list-style: none; cursor: pointer; }
.mailbox summary::-webkit-details-marker { display: none; }
.mailform { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-md); padding: 1rem; width: 330px; z-index: 30; }
.sync-info { color: var(--muted); font-size: .88rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--muted); }
.empty-state h3 { color: var(--text); }

/* ---------- Profiel ---------- */
.profile-grid { display: grid; grid-template-columns: 320px 1fr; gap: 1.4rem; align-items: start; }
.profile-card { text-align: center; }
.profile-card .avatar.xl { margin: .5rem auto 1rem; }
.profile-card .pname { font-size: 1.2rem; font-weight: 700; }
.profile-card .facts { text-align: left; margin-top: 1.2rem; border-top: 1px solid var(--line); padding-top: 1rem; font-size: .88rem; }
.profile-card .facts div { display: flex; justify-content: space-between; gap: 1rem; padding: .3rem 0; }
.profile-card .facts span:first-child { color: var(--muted); }
.drop { border: 2px dashed #c7d4e5; border-radius: 14px; padding: 1rem; text-align: center; color: var(--muted); font-size: .86rem;
        cursor: pointer; transition: border-color .15s, background .15s; display: block; font-weight: normal; }
.drop:hover, .drop.over { border-color: var(--primary); background: #f0f7ff; }
.drop input { display: none; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
@media (max-width: 1000px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } .profile-grid > * { min-width: 0; } .form-2 { grid-template-columns: 1fr; } }


/* ---------- Donkere modus ---------- */
html[data-mode=dark] {
    color-scheme: dark;
    --bg: #0a1120; --card: #111a2c; --card-line: #1e2a40; --line: #1e2a40; --text: #e2e8f0; --muted: #94a3b8;
    --primary: #60a5fa; --primary-dark: #93c5fd;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 2px 8px rgba(0,0,0,.25);
    --shadow-md: 0 4px 12px rgba(0,0,0,.4), 0 12px 32px rgba(0,0,0,.35);
    --sb: #060b16; --sb-2: #0b1322;
}
html[data-mode=dark] body { background-image: radial-gradient(rgba(148,163,184,.07) 1px, transparent 1px); }
html[data-mode=dark] .topbar { background: rgba(10,17,32,.85); }
html[data-mode=dark] .status-chip, html[data-mode=dark] .sess-chip, html[data-mode=dark] .langsw, html[data-mode=dark] .themesw button
    { background: #131d31; border-color: var(--line); color: var(--muted); }
html[data-mode=dark] .langsw button.on { background: #1e2a40; color: #93c5fd; }
html[data-mode=dark] .sess-chip.warn { background: #3b1d0c; color: #fdba74; border-color: #9a3412; }
html[data-mode=dark] .adom-btn, html[data-mode=dark] .adom-panel, html[data-mode=dark] .userbox button,
html[data-mode=dark] .mailform, html[data-mode=dark] .pill, html[data-mode=dark] .btn.secondary, html[data-mode=dark] button.secondary,
html[data-mode=dark] .gpick-btn, html[data-mode=dark] .gpick-panel, html[data-mode=dark] .rowmenu form
    { background: #131d31; border-color: #26344d; color: var(--text); }
html[data-mode=dark] .adom-btn:hover, html[data-mode=dark] .userbox button:hover, html[data-mode=dark] .pill:hover,
html[data-mode=dark] .btn.secondary:hover, html[data-mode=dark] button.secondary:hover, html[data-mode=dark] .userlink:hover,
html[data-mode=dark] .att:hover, html[data-mode=dark] .gpick-item:hover, html[data-mode=dark] .gpick-btn:hover { background: #1a263c; }
html[data-mode=dark] .adom-panel li a:hover, html[data-mode=dark] .adom-panel li a.current { background: #1a2b4a; color: #bfdbfe; }
html[data-mode=dark] .pill.active { background: #2563eb; border-color: #2563eb; }
html[data-mode=dark] input[type=text], html[data-mode=dark] input[type=password], html[data-mode=dark] input[type=email],
html[data-mode=dark] input[type=number], html[data-mode=dark] input[type=tel], html[data-mode=dark] input[type=search],
html[data-mode=dark] input[type=date], html[data-mode=dark] select, html[data-mode=dark] textarea
    { background: #0d1626; border-color: #2a3852; color: var(--text); }
html[data-mode=dark] .gsearch input { background: #0d1626; }
html[data-mode=dark] .gsearch input:focus { background: #0f1a2e; }
html[data-mode=dark] .gsearch kbd { background: #131d31; }
html[data-mode=dark] .tabs { background: #0d1626; }
html[data-mode=dark] .tabs a { color: var(--muted); }
html[data-mode=dark] .tabs a.active { background: #1e2a40; color: var(--text); }
html[data-mode=dark] th { background: #0f1828; color: #94a3b8; }
html[data-mode=dark] tbody tr:hover td { background: #142036; }
html[data-mode=dark] .badge { background: #1b2d52; color: #bfdbfe; }
html[data-mode=dark] .badge.red { background: #3f1518; color: #fca5a5; }
html[data-mode=dark] .badge.green { background: #0f3020; color: #86efac; }
html[data-mode=dark] .badge.gray { background: #1e293b; color: #cbd5e1; }
html[data-mode=dark] .badge.amber { background: #3a2a0a; color: #fcd34d; }
html[data-mode=dark] .badge.blue { background: #1b2d52; color: #bfdbfe; }
html[data-mode=dark] .hint { background: #0f1f3a; border-color: #1e3a6b; color: #bfdbfe; }
html[data-mode=dark] .flash.success { background: #0b2a1c; color: #86efac; border-color: #14532d; }
html[data-mode=dark] .flash.error { background: #2d1114; color: #fca5a5; border-color: #7f1d1d; }
html[data-mode=dark] .flash.info { background: #0f1f3a; color: #bfdbfe; border-color: #1e3a6b; }
html[data-mode=dark] .kpi .kico { background: #14233f; }
html[data-mode=dark] .kpi.red .kico { background: #2d1114; } html[data-mode=dark] .kpi.amber .kico { background: #2e220a; }
html[data-mode=dark] .kpi.green .kico { background: #0b2a1c; }
html[data-mode=dark] .drop { border-color: #2a3852; }
html[data-mode=dark] .drop:hover, html[data-mode=dark] .drop.over { background: #0f1f3a; }
html[data-mode=dark] .avatar { box-shadow: 0 0 0 2px #0a1120, 0 0 0 3px #1e3a6b; }
html[data-mode=dark] .catrow { border-color: var(--line); }
html[data-mode=dark] .gpick-chip { background: #1e2550; color: #c7d2fe; }
html[data-mode=dark] .viz-tip { background: #e2e8f0; color: #0f172a; }
html[data-mode=dark] td[style*="background:#f3f4f6"] { background: #131d31 !important; }
html[data-mode=dark] .topo-wrap { background-color: #0d1626; }
html[data-mode=dark] .topo .tnode rect { fill: #131d31; stroke: #2a3852; }
html[data-mode=dark] .topo .tnode.inet rect { fill: #0f1f3a; stroke: #1e40af; }
html[data-mode=dark] .topo .tname { fill: #e2e8f0; } html[data-mode=dark] .topo .tsub, html[data-mode=dark] .topo .tport,
html[data-mode=dark] .topo .tsection { fill: #94a3b8; }
html[data-mode=dark] .topo .ticon { stroke: #60a5fa; } html[data-mode=dark] .topo .tclients { fill: #60a5fa; }
html[data-mode=dark] .topo .tlink { stroke: #475569; } html[data-mode=dark] .topo .tlink.isl { stroke: #14b8a6; }
html[data-mode=dark] .ov-chip { background: #0f1828; }
html[data-mode=dark] .tnode.off rect:first-of-type { stroke: #7f1d1d; }
html[data-mode=dark] img.logo-light { display: none; }

/* ---------- Thema-knop ---------- */
.themesw { display: inline-flex; }
.themesw button { margin: 0; width: 34px; height: 30px; padding: 0; justify-content: center; border-radius: 99px; background: #f1f5f9;
                  border: 1px solid var(--line); color: var(--muted); box-shadow: none; }
.themesw button:hover { color: var(--text); filter: none; }
.themesw .ico { width: 16px; height: 16px; }
.themesw .i-sun { display: none; }
html[data-mode=dark] .themesw .i-sun { display: block; } html[data-mode=dark] .themesw .i-moon { display: none; }

@media (max-width: 800px) {
    .adom-btn { min-width: 0; }
    .userbox .who, .status-chip { display: none; }
    main { padding: 1rem; }
    .topbar { padding: 0 .8rem; }
    .hero .net { display: none; }
}

/* ---------- Telefoon (alles hieronder geldt alleen op smalle schermen) ---------- */
.nav-btn, .nav-backdrop, .sb-logout, .m-lbl { display: none; }
@media (max-width: 860px) {
    html, body { overflow-x: hidden; }
    body { font-size: 14.5px; }
    .app { display: block; }
    /* Zijbalk wordt een uitschuifmenu */
    .sidebar, .sb-collapsed .sidebar { position: fixed; top: 0; left: 0; bottom: 0; height: 100%; width: min(84vw, 300px);
        z-index: 200; transform: translateX(-105%); transition: transform .22s ease; box-shadow: 0 0 40px rgba(0,0,0,.35); }
    html.nav-open .sidebar { transform: none; }
    .nav-backdrop { display: block; position: fixed; inset: 0; background: rgba(2,6,23,.5); z-index: 150; opacity: 0;
        pointer-events: none; transition: opacity .2s; }
    html.nav-open .nav-backdrop { opacity: 1; pointer-events: auto; }
    html.nav-open, html.nav-open body { overflow: hidden; }
    .sb-collapsed .label { display: inline; }
    .sb-collapsed .sect { margin: 1.1rem .5rem .45rem; font-size: .68rem; border-top: none; }
    .sb-collapsed .brand { justify-content: flex-start; padding: 0 1.15rem; }
    .sb-collapsed .menu .item { justify-content: flex-start; padding: .7rem .8rem; }
    .menu .item { padding: .7rem .8rem; }
    #sbToggle { display: none; }
    .sb-logout { display: block; }
    .sb-logout button { width: 100%; display: flex; align-items: center; gap: .8rem; background: none; color: var(--sb-text);
        border: none; padding: .7rem .8rem; border-radius: 10px; margin: 0; box-shadow: none; font-size: .94rem; }
    /* Bovenbalk: menu, klant, thema/taal, profiel; zoeken op een eigen regel */
    .topbar { height: auto; flex-wrap: wrap; padding: .55rem .75rem; gap: .5rem; }
    .topbar-left { display: contents; }
    .nav-btn { display: inline-flex; order: 0; margin: 0; width: 40px; height: 38px; padding: 0; justify-content: center;
        align-items: center; background: var(--card); color: var(--text); border: 1px solid var(--line); box-shadow: none; flex-shrink: 0; }
    .nav-btn svg { width: 20px; height: 20px; }
    .adom { order: 1; flex: 1 1 0; min-width: 0; }
    .adom-btn { width: 100%; min-width: 0; padding: .45rem .6rem; }
    .adom-btn strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
    .adom-panel { position: fixed; top: 60px; left: .75rem; right: .75rem; width: auto; }
    .topbar-right { order: 2; gap: .4rem; }
    .gsearch { display: flex; order: 3; flex: 1 1 100%; }
    .gsearch input, .gsearch input:focus { width: 100%; font-size: 16px; }
    .status-chip, .sess-chip, .userbox form, .userbox .who { display: none; }
    .userlink { padding: 0; }
    .avatar { width: 34px; height: 34px; }
    /* Inhoud */
    main { padding: .9rem .75rem .5rem; max-width: 100%; }
    .page-title { margin-bottom: .9rem; }
    .page-title h2 { font-size: 1.25rem; }
    .panel { padding: 1rem; border-radius: 14px; margin-bottom: 1rem; }
    .hero { padding: 1.1rem 1rem; border-radius: 16px; gap: 1rem; flex-direction: column; align-items: stretch; }
    .hero h2 { font-size: 1.3rem; }
    .hero p { font-size: .85rem; }
    .hero .hero-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; }
    .hero .hero-stats div { min-width: 0; }
    .hero .hero-stats strong { font-size: 1.2rem; }
    .hero-actions { display: grid; grid-template-columns: 1fr 1fr; }
    .hero-actions > *, .hero-actions form button { width: 100%; justify-content: center; }
    .kpis, .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
    .kpi { padding: .8rem .85rem; }
    .kpi .num { font-size: 1.45rem; }
    .kpi .kico { width: 28px; height: 28px; }
    .viz-grid, .viz-grid.wide2, .ov-charts { grid-template-columns: minmax(0, 1fr) !important; gap: .8rem; }
    .viz-card { padding: 1rem; }
    /* Tabellen: horizontaal scrollen in plaats van de pagina breder maken */
    main table { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    main table th, main table td { white-space: nowrap; }
    main table td.wrap, main table td .att-t { white-space: normal; }
    .table-wrap table { display: table; }
    th, td { padding: .55rem .5rem; }
    /* Werkbalken, filters en formulieren */
    .toolbar { gap: .45rem; }
    .toolbar .spacer { display: none; }
    .pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .2rem; -webkit-overflow-scrolling: touch; max-width: 100%; }
    .pill { white-space: nowrap; }
    .searchform { width: 100%; flex-wrap: wrap; }
    .searchform select { flex: 1 1 100%; width: 100%; max-width: none !important; }
    .searchform input[type=text] { flex: 1 1 0; width: auto; min-width: 0; }
    .searchform input { width: auto; flex: 1 1 0; min-width: 0; }
    .toolbar > .btn, .toolbar > form > button, .toolbar details > summary.btn { padding: .5rem .8rem; font-size: .86rem; }
    /* Inlogpagina */
    .login-art { padding: 1.4rem 1.2rem; min-height: 0; gap: 1rem; }
    .login-art h1 { font-size: 1.3rem; margin-top: .3rem; }
    .login-art .vendors, .login-art > .muted { display: none; }
    .login-side { flex-direction: column; padding: 1.2rem .9rem 2rem; }
    .login-lang { position: static; align-self: flex-end; margin-bottom: .8rem; }
    .login-box .panel { padding: 1.4rem; }
    .tabs { flex-wrap: nowrap; overflow-x: auto; width: 100%; }
    .tabs a { white-space: nowrap; }
    main input, main select, main textarea { max-width: 100%; }
    input[type=text], input[type=password], input[type=email], input[type=number], input[type=tel], input[type=search],
    input[type=date], select, textarea { font-size: 16px; }
    .form-2 { grid-template-columns: 1fr; }
    .mailform { position: fixed; left: .75rem; right: .75rem; top: 70px; width: auto; }
    .profile-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
    /* Sessies als kaartjes in plaats van een brede tabel */
    .sess-wrap { border: none; overflow: visible; }
    main table.sess-table, .sess-table tbody, .sess-table tr, .sess-table td { display: block; white-space: normal; }
    .sess-table thead { display: none; }
    .sess-table tr { border: 1px solid var(--line); border-radius: 12px; padding: .65rem .8rem; margin-bottom: .6rem;
        display: grid; grid-template-columns: 1fr auto; gap: .15rem .6rem; align-items: start; }
    .sess-table td { border: none; padding: 0; font-size: .86rem; }
    .sess-table td:last-child { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
    .sess-table tbody tr:hover td { background: none; }
    .sess-table .m-lbl { display: inline; color: var(--muted); }
    .profile-grid > * { min-width: 0; }
    .profile-card .avatar.xl { width: 88px; height: 88px; font-size: 2rem; }
    .profile-card .facts div { flex-wrap: wrap; }
    #sessie form { flex-direction: column; align-items: stretch !important; }
    #sessie form select { max-width: none !important; }
    #sessie form button, #weergave button, #wachtwoord button { width: 100%; justify-content: center; }
    footer { padding: 1rem 1rem 1.5rem; }
}
@media (max-width: 420px) {
    .hero .hero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .langsw button { padding: .22rem .45rem; }
}

.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; }
.app-card { border: 1px solid var(--line); border-radius: 12px; padding: 1rem; }
.app-card h4 { margin: 0 0 .3rem; font-size: .98rem; }
.app-card .btn, .app-card button { margin-top: .5rem; }
.app-steps { font-size: .84rem; margin: .6rem 0 0 1.1rem; line-height: 1.6; color: var(--muted); }
.app-devs { margin: .6rem 0; display: grid; gap: .4rem; }
.app-dev { display: flex; justify-content: space-between; align-items: center; gap: .6rem; border: 1px solid var(--line);
           border-radius: 10px; padding: .5rem .7rem; }

.ai-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 900; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.ai-fab { width: 56px; height: 56px; border-radius: 16px; border: 0; padding: 0; cursor: pointer; position: relative;
          background: transparent; box-shadow: 0 8px 24px rgba(15, 23, 42, .28); transition: transform .15s ease, box-shadow .15s ease; }
.ai-fab:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(15, 23, 42, .34); }
.ai-fab svg { width: 56px; height: 56px; display: block; border-radius: 16px; }
.ai-fab-x { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; border-radius: 16px;
            background: #1e3a8a; color: #fff; font-size: 30px; line-height: 1; }
.ai-wrap.open .ai-fab-x { display: flex; }
.ai-panel { width: 370px; height: min(540px, calc(100vh - 120px)); background: var(--card); color: var(--text);
            border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
            display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; animation: aiIn .16s ease-out; }
.ai-panel[hidden] { display: none; }
@keyframes aiIn { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.ai-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .8rem; color: #fff;
           background: linear-gradient(135deg, #1e3a8a, #2563eb 55%, #06b6d4); }
.ai-head > div { flex: 1; min-width: 0; line-height: 1.15; }
.ai-head small { display: block; opacity: .85; font-size: .74rem; }
.ai-x { background: rgba(255,255,255,.14); border: 0; color: #fff; width: 30px; height: 30px; border-radius: 8px; margin: 0; padding: 0;
        font-size: 18px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ai-x:hover { background: rgba(255,255,255,.26); }
.ai-log { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .55rem; background: var(--bg); }
.ai-msg { max-width: 88%; padding: .55rem .75rem; border-radius: 12px; font-size: .88rem; line-height: 1.45; overflow-wrap: anywhere; }
.ai-msg p { margin: 0 0 .45rem; } .ai-msg p:last-child { margin-bottom: 0; }
.ai-msg ul, .ai-msg ol { margin: .2rem 0 .45rem 1.1rem; padding: 0; } .ai-msg li { margin: .15rem 0; }
.ai-msg.bot { align-self: flex-start; background: var(--card); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.ai-msg.me { align-self: flex-end; background: #2563eb; color: #fff; border-bottom-right-radius: 4px; }
.ai-msg a { font-weight: 600; }
.ai-note { font-size: .78rem; color: var(--muted); font-style: italic; }
.ai-err { color: #dc2626; }
.ai-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.ai-chip { margin: 0; background: var(--card); color: var(--text); border: 1px solid var(--line); border-radius: 999px;
           padding: .35rem .7rem; font-size: .8rem; font-weight: 500; cursor: pointer; text-align: left; }
.ai-chip:hover { border-color: #2563eb; color: #2563eb; }
.ai-typing { color: var(--muted); }
.ai-typing span { display: inline-block; width: 6px; height: 6px; margin-right: 2px; border-radius: 50%; background: currentColor;
                  animation: aiDot 1s infinite ease-in-out; }
.ai-typing span:nth-child(2) { animation-delay: .15s; } .ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes aiDot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.ai-form { display: flex; gap: .45rem; padding: .6rem; border-top: 1px solid var(--line); background: var(--card); align-items: flex-end; }
.ai-form textarea { flex: 1; margin: 0; resize: none; min-height: 40px; max-height: 110px; font: inherit; font-size: .9rem;
                    padding: .55rem .7rem; border-radius: 10px; }
.ai-form button { margin: 0; width: 40px; height: 40px; padding: 0; border-radius: 10px; justify-content: center; font-size: 16px; flex: none; }
@media print { .ai-wrap { display: none; } }
@media (max-width: 640px) {
  .ai-wrap { right: 14px; bottom: 14px; }
  .ai-fab, .ai-fab svg, .ai-fab-x { width: 52px; height: 52px; }
  .ai-panel { position: fixed; left: 8px; right: 8px; bottom: 76px; width: auto; height: min(70vh, calc(100vh - 100px)); }
}

:root, .viz { --viz-text: var(--text, #0f172a); --viz-muted: var(--muted, #64748b); --viz-grid: #e8edf3; --viz-axis: #94a3b8; --viz-surface: var(--card, #fff); }
html[data-mode=dark], html[data-mode=dark] .viz { --viz-grid: #233047; --viz-axis: #475569; }
.viz-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 1.25rem; margin-bottom: 1.25rem; }
.viz-card { background: var(--card); border: 1px solid var(--card-line); border-radius: 16px; padding: 1.2rem 1.35rem 1.1rem;
            box-shadow: var(--shadow-sm); min-width: 0; display: flex; flex-direction: column; }
.viz-card .viz-head { display: flex; align-items: baseline; justify-content: space-between; gap: .6rem; }
.viz-card h3 { font-size: .98rem; margin: 0 0 .15rem; font-weight: 650; letter-spacing: -.005em; }
.viz-card .viz-sub { color: var(--viz-muted); font-size: .82rem; margin-bottom: 1rem; }
.viz-card .viz-body { flex: 1; }
.viz-card .viz-foot { margin-top: .9rem; padding-top: .7rem; border-top: 1px solid var(--viz-grid); font-size: .84rem; }
.viz-card .viz-foot a { text-decoration: none; font-weight: 600; }
.stack { display: flex; gap: 2px; height: 14px; margin: .3rem 0 .9rem; }
.stack .seg { height: 100%; min-width: 3px; transition: filter .15s; }
.stack .seg:first-child { border-radius: 4px 0 0 4px; }
.stack .seg:last-child { border-radius: 0 4px 4px 0; }
.stack .seg:only-child { border-radius: 4px; }
.stack .seg:hover, .hbar .bar:hover, .cols .col.on, .cols .col:hover { filter: brightness(1.12); }
.legend { display: flex; flex-wrap: wrap; gap: .45rem 1.2rem; font-size: .84rem; color: var(--viz-text); }
.legend .item { display: inline-flex; align-items: center; gap: .4rem; white-space: nowrap; color: inherit; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .val { color: var(--viz-muted); font-variant-numeric: tabular-nums; }
.legend a { color: inherit; text-decoration: none; }
.legend a:hover { text-decoration: underline; }
.hbar { display: grid; grid-template-columns: minmax(90px, 36%) 1fr 3.2rem; gap: .5rem .7rem; align-items: center; font-size: .86rem; }
.hbar .lbl { color: var(--viz-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .lbl a { color: inherit; text-decoration: none; }
.hbar .lbl a:hover { text-decoration: underline; color: var(--primary); }
.hbar .track { position: relative; height: 12px; }
.hbar .gl { position: absolute; top: -4px; bottom: -4px; width: 1px; background: var(--viz-grid); }
.hbar .bar { position: relative; height: 12px; border-radius: 0 4px 4px 0; min-width: 3px; transition: filter .15s; }
.hbar .num { color: var(--viz-muted); font-variant-numeric: tabular-nums; text-align: right; }
.hbar .axis { position: relative; height: 1.1rem; border-top: 1px solid var(--viz-axis); margin-top: .1rem; }
.hbar .axis span { position: absolute; top: .15rem; transform: translateX(-50%); font-size: .7rem; color: var(--viz-muted);
                   font-variant-numeric: tabular-nums; white-space: nowrap; }
.hbar .axis span:first-child { transform: none; }
.hbar .axis span:last-child { transform: translateX(-100%); }
.viz-empty { color: var(--viz-muted); font-size: .9rem; padding: 1.6rem 0; text-align: center; }
.cols { width: 100%; height: auto; display: block; overflow: visible; }
.cols text { font-size: 10px; fill: var(--viz-muted); font-variant-numeric: tabular-nums; }
.cols .cap { font-size: 9.5px; fill: var(--viz-muted); }
.cols .xh { stroke: var(--viz-axis); stroke-width: 1; opacity: 0; }
.cols .hit:hover + .xh, .cols g.slot:hover .xh { opacity: 1; }
.cols g.slot:hover .col { filter: brightness(1.12); }
.viz-tip { position: fixed; pointer-events: none; z-index: 1000; background: #0f172a; color: #fff; font-size: .8rem;
           padding: .4rem .65rem; border-radius: 8px; box-shadow: 0 8px 24px rgba(15,23,42,.25); display: none; max-width: 300px; }
.kpis.six { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.meter { height: 8px; background: var(--viz-grid); border-radius: 4px; margin-top: .55rem; overflow: hidden; }
.meter > span { display: block; height: 100%; border-radius: 4px; }
.big-meter { margin: .2rem 0 .4rem; }
.big-meter .bm-num { font-size: 2.3rem; font-weight: 750; letter-spacing: -.02em; line-height: 1; }
.big-meter .bm-num small { font-size: 1rem; color: var(--viz-muted); font-weight: 600; margin-left: .3rem; }
.big-meter .meter { height: 12px; border-radius: 6px; margin-top: .8rem; }
.big-meter .scale { display: flex; justify-content: space-between; font-size: .7rem; color: var(--viz-muted); margin-top: .25rem; }
