:root {
  color-scheme: light;
  --bg: #f4f1eb;
  --surface: #fffdfa;
  --surface-strong: #ffffff;
  --surface-soft: #ece7de;
  --ink: #171714;
  --muted: #716d65;
  --line: #dcd6cc;
  --line-strong: #c9c1b5;
  --accent: #1e211d;
  --accent-2: #3d4439;
  --positive: #2f7358;
  --warning: #956b27;
  --danger: #a64d45;
  --info: #526b76;
  --shadow: 0 18px 54px rgba(28,24,18,.08);
  --shadow-soft: 0 8px 28px rgba(28,24,18,.055);
  --r-sm: 10px;
  --r: 16px;
  --r-lg: 24px;
  --nav-w: 264px;
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
button,input,select,textarea { font: inherit; }
a { color: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--nav-w) minmax(0,1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 22px 16px; border-right: 1px solid var(--line); background: rgba(255,253,250,.84); backdrop-filter: blur(18px); display:flex; flex-direction:column; gap:18px; }
.brand { display:flex; align-items:center; gap:11px; padding:4px 8px 12px; }
.product-mark { width:38px; height:38px; border-radius:13px; display:grid; place-items:center; background:var(--ink); color:#fff; box-shadow: var(--shadow-soft); }
.product-mark svg { width:22px; height:22px; }
.brand-copy strong { display:block; font-size:15px; letter-spacing:-.02em; }
.brand-copy span { display:block; color:var(--muted); font-size:13px; margin-top:2px; }
.env-chip { display:inline-flex; align-items:center; gap:7px; border:1px solid var(--line); background:var(--surface); border-radius:999px; padding:7px 10px; font-size:12px; font-weight:700; width:max-content; }
.env-chip::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--warning); }
.nav { display:flex; flex-direction:column; gap:4px; }
.nav button { border:0; background:transparent; color:var(--muted); min-height:43px; padding:0 11px; border-radius:12px; display:flex; align-items:center; gap:11px; text-align:left; font-weight:620; }
.nav button svg { width:19px; height:19px; stroke-width:1.8; }
.nav button:hover { background:var(--surface-soft); color:var(--ink); }
.nav button.active { background:var(--ink); color:#fff; }
.sidebar-bottom { margin-top:auto; display:grid; gap:10px; }
.identity-card { padding:12px; border:1px solid var(--line); background:var(--surface); border-radius:14px; }
.identity-card strong,.identity-card span { display:block; }
.identity-card strong { font-size:13px; }
.identity-card span { color:var(--muted); font-size:12px; margin-top:3px; }
.main { min-width:0; }
.topbar { height:68px; display:flex; align-items:center; justify-content:space-between; padding:0 32px; border-bottom:1px solid rgba(220,214,204,.8); background:rgba(244,241,235,.82); backdrop-filter:blur(16px); position:sticky; top:0; z-index:20; }
.breadcrumb { color:var(--muted); font-size:13px; }
.top-actions { display:flex; align-items:center; gap:8px; }
.icon-btn,.secondary-btn,.primary-btn,.danger-btn { border:1px solid var(--line); min-height:42px; border-radius:999px; padding:0 16px; background:var(--surface); color:var(--ink); font-weight:680; }
.icon-btn { width:42px; padding:0; display:grid; place-items:center; }
.icon-btn svg { width:18px; height:18px; }
.primary-btn { background:var(--ink); border-color:var(--ink); color:#fff; }
.danger-btn { background:var(--danger); color:#fff; border-color:var(--danger); }
.secondary-btn:hover,.icon-btn:hover { border-color:var(--line-strong); background:#fff; }
.content { width:min(1240px,100%); margin:0 auto; padding:36px 34px 70px; }
.page-head { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; margin-bottom:26px; }
.eyebrow { margin:0 0 8px; text-transform:uppercase; letter-spacing:.11em; font-size:11px; font-weight:800; color:var(--muted); }
h1,h2,h3,p { margin-top:0; }
h1 { font-size:clamp(28px,3vw,42px); line-height:1.05; letter-spacing:-.045em; margin-bottom:9px; font-weight:760; }
h2 { font-size:20px; letter-spacing:-.025em; margin-bottom:6px; }
h3 { font-size:15px; letter-spacing:-.015em; margin-bottom:5px; }
.lead { margin:0; color:var(--muted); max-width:700px; line-height:1.55; }
.grid { display:grid; gap:16px; }
.grid.cols-4 { grid-template-columns:repeat(4,minmax(0,1fr)); }
.grid.cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
.grid.cols-2 { grid-template-columns:repeat(2,minmax(0,1fr)); }
.card { border:1px solid var(--line); background:var(--surface); border-radius:var(--r); box-shadow:var(--shadow-soft); padding:20px; }
.card.flat { box-shadow:none; }
.stat-card { min-height:132px; display:flex; flex-direction:column; justify-content:space-between; }
.stat-card .value { font-size:30px; font-weight:760; letter-spacing:-.04em; }
.stat-card .label { color:var(--muted); font-size:13px; line-height:1.4; }
.section { margin-top:26px; }
.section-head { display:flex; justify-content:space-between; align-items:center; gap:16px; margin-bottom:12px; }
.section-head p { margin:0; color:var(--muted); font-size:13px; }
.list { border:1px solid var(--line); border-radius:var(--r); overflow:hidden; background:var(--surface); }
.list-row { width:100%; border:0; border-bottom:1px solid var(--line); background:transparent; padding:16px 18px; display:grid; grid-template-columns:minmax(0,1.5fr) minmax(110px,.7fr) minmax(100px,.6fr) minmax(120px,.7fr); gap:14px; align-items:center; text-align:left; color:var(--ink); }
.list-row:last-child { border-bottom:0; }
.list-row:hover { background:#fff; }
.row-title strong { display:block; font-size:14px; }
.row-title span,.cell-muted { display:block; color:var(--muted); font-size:12px; margin-top:4px; }
.pill { display:inline-flex; align-items:center; gap:6px; width:max-content; border-radius:999px; padding:6px 9px; font-size:11px; font-weight:760; background:var(--surface-soft); }
.pill::before { content:""; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.8; }
.pill.new,.pill.in_progress,.pill.investigating { color:var(--info); background:#e8eef0; }
.pill.waiting_user,.pill.identified,.pill.monitoring { color:var(--warning); background:#f4eddf; }
.pill.resolved,.pill.healthy { color:var(--positive); background:#e4efe9; }
.pill.closed { color:var(--muted); }
.pill.critical,.pill.unhealthy { color:var(--danger); background:#f6e7e5; }
.notice { display:flex; gap:14px; border:1px solid var(--line); background:var(--surface); padding:16px 17px; border-radius:var(--r); align-items:flex-start; }
.notice .notice-icon { width:34px; height:34px; border-radius:11px; background:var(--surface-soft); display:grid; place-items:center; flex:0 0 auto; }
.notice strong { display:block; font-size:14px; }
.notice span { color:var(--muted); display:block; font-size:13px; margin-top:3px; line-height:1.45; }
.quick-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; }
.quick-card { border:1px solid var(--line); border-radius:14px; background:var(--surface); padding:16px; text-align:left; }
.quick-card:hover { border-color:var(--line-strong); transform:translateY(-1px); }
.quick-card svg { width:22px; height:22px; margin-bottom:18px; }
.quick-card strong { display:block; font-size:14px; }
.quick-card span { display:block; color:var(--muted); font-size:12px; line-height:1.45; margin-top:4px; }
.toolbar { display:flex; gap:8px; flex-wrap:wrap; margin-bottom:14px; }
.search { flex:1 1 260px; position:relative; }
.search input, input, select, textarea { width:100%; border:1px solid var(--line); background:var(--surface); color:var(--ink); border-radius:12px; min-height:44px; padding:10px 12px; outline:none; }
textarea { min-height:130px; resize:vertical; }
input:focus,select:focus,textarea:focus { border-color:var(--accent-2); box-shadow:0 0 0 3px rgba(61,68,57,.10); }
select { width:auto; min-width:150px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.field { display:grid; gap:7px; }
.field.full { grid-column:1/-1; }
.field label { font-size:12px; font-weight:750; color:var(--muted); }
.dialog-backdrop { position:fixed; inset:0; z-index:100; background:rgba(19,18,15,.38); backdrop-filter:blur(5px); padding:24px; display:grid; place-items:center; }
.dialog { width:min(640px,100%); max-height:calc(100vh - 48px); overflow:auto; background:var(--surface-strong); border:1px solid var(--line); border-radius:22px; box-shadow:var(--shadow); padding:22px; }
.dialog-head { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.dialog-actions { display:flex; justify-content:flex-end; gap:8px; margin-top:18px; }
.timeline { display:grid; gap:12px; }
.timeline-item { display:grid; grid-template-columns:28px minmax(0,1fr); gap:10px; }
.timeline-dot { width:9px; height:9px; margin:7px auto 0; border-radius:50%; background:var(--line-strong); box-shadow:0 0 0 5px var(--surface-soft); }
.timeline-body { border:1px solid var(--line); border-radius:13px; padding:13px 14px; background:var(--surface); }
.timeline-body.internal { background:#f4efe5; }
.timeline-meta { color:var(--muted); font-size:11px; margin-bottom:7px; }
.detail-grid { display:grid; grid-template-columns:minmax(0,1.7fr) minmax(280px,.75fr); gap:18px; }
.kv { display:grid; gap:10px; }
.kv-row { display:flex; justify-content:space-between; gap:20px; border-bottom:1px solid var(--line); padding-bottom:10px; }
.kv-row:last-child { border-bottom:0; padding-bottom:0; }
.kv-row span:first-child { color:var(--muted); font-size:12px; }
.kv-row span:last-child { font-size:12px; font-weight:700; text-align:right; }
.platform-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.service-card { border:1px solid var(--line); background:var(--surface); border-radius:var(--r); padding:18px; display:grid; gap:15px; }
.service-top { display:flex; justify-content:space-between; gap:16px; align-items:flex-start; }
.service-title { display:flex; gap:12px; align-items:flex-start; }
.service-icon { width:38px; height:38px; border-radius:12px; background:var(--surface-soft); display:grid; place-items:center; }
.service-icon svg { width:20px; height:20px; }
.service-title p { color:var(--muted); font-size:12px; line-height:1.45; margin:4px 0 0; }
.metric-strip { display:grid; grid-template-columns:repeat(3,1fr); border-top:1px solid var(--line); padding-top:13px; gap:10px; }
.metric strong { display:block; font-size:13px; }
.metric span { display:block; color:var(--muted); font-size:10px; margin-top:3px; }
.code { font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace; font-size:11px; background:#ebe6dd; border-radius:7px; padding:2px 6px; }
.login-shell { min-height:100vh; display:grid; grid-template-columns:minmax(0,1.2fr) minmax(420px,.8fr); }
.login-brand { padding:42px; background:var(--ink); color:#fff; display:flex; flex-direction:column; justify-content:space-between; overflow:hidden; position:relative; }
.login-brand::after { content:""; position:absolute; width:480px; height:480px; border:1px solid rgba(255,255,255,.14); border-radius:50%; right:-170px; bottom:-180px; box-shadow:0 0 0 70px rgba(255,255,255,.025),0 0 0 140px rgba(255,255,255,.018); }
.login-brand .brand-copy span { color:rgba(255,255,255,.62); }
.login-brand h1 { max-width:620px; font-size:clamp(38px,5vw,66px); letter-spacing:-.055em; z-index:1; }
.login-brand p { max-width:560px; color:rgba(255,255,255,.62); line-height:1.6; z-index:1; }
.login-panel { display:grid; place-items:center; padding:34px; }
.login-card { width:min(440px,100%); }
.qr-box { width:220px; height:220px; background:#fff; border:1px solid var(--line); border-radius:18px; display:grid; place-items:center; padding:13px; margin:18px 0; }
.qr-box img { width:100%; height:100%; }
.login-steps { display:grid; gap:10px; margin-top:20px; }
.login-step { display:grid; grid-template-columns:28px 1fr; gap:10px; align-items:start; color:var(--muted); font-size:13px; line-height:1.45; }
.step-no { width:26px; height:26px; border-radius:50%; background:var(--surface-soft); display:grid; place-items:center; color:var(--ink); font-weight:800; font-size:11px; }
.empty { border:1px dashed var(--line-strong); border-radius:var(--r); padding:30px; color:var(--muted); text-align:center; }
.toast { position:fixed; z-index:200; right:22px; bottom:22px; background:var(--ink); color:#fff; border-radius:13px; padding:12px 15px; box-shadow:var(--shadow); font-size:13px; max-width:360px; }
.mobile-brand { display:none; }
@media (max-width: 1020px) {
  .grid.cols-4 { grid-template-columns:repeat(2,1fr); }
  .grid.cols-3,.quick-grid { grid-template-columns:repeat(2,1fr); }
  .detail-grid { grid-template-columns:1fr; }
  .platform-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  .app-shell { display:block; }
  .sidebar { position:fixed; z-index:60; left:0; right:0; top:auto; bottom:0; width:100%; height:67px; padding:7px 8px calc(7px + env(safe-area-inset-bottom)); border-right:0; border-top:1px solid var(--line); display:block; }
  .sidebar .brand,.sidebar .env-chip,.sidebar-bottom { display:none; }
  .nav { height:100%; display:flex; flex-direction:row; justify-content:space-around; gap:2px; overflow-x:auto; }
  .nav button { min-width:64px; height:52px; min-height:52px; padding:5px 7px; display:flex; flex-direction:column; justify-content:center; gap:4px; border-radius:11px; font-size:10px; white-space:nowrap; }
  .nav button svg { width:20px; height:20px; }
  .nav button.active { background:var(--surface-soft); color:var(--ink); }
  .topbar { height:60px; padding:0 17px; }
  .breadcrumb { display:none; }
  .mobile-brand { display:flex; align-items:center; gap:9px; font-size:13px; font-weight:760; }
  .mobile-brand .product-mark { width:31px; height:31px; border-radius:10px; }
  .mobile-brand .product-mark svg { width:18px; height:18px; }
  .content { padding:26px 16px 100px; }
  .page-head { align-items:flex-start; flex-direction:column; gap:14px; }
  h1 { font-size:30px; }
  .grid.cols-4,.grid.cols-3,.grid.cols-2,.quick-grid,.form-grid { grid-template-columns:1fr; }
  .field.full { grid-column:auto; }
  .list-row { grid-template-columns:1fr auto; }
  .list-row > *:nth-child(2),.list-row > *:nth-child(3) { display:none; }
  .login-shell { display:block; }
  .login-brand { min-height:260px; padding:28px 22px; }
  .login-brand h1 { font-size:38px; margin-top:34px; }
  .login-brand p { display:none; }
  .login-panel { padding:28px 18px 60px; }
  .qr-box { width:200px; height:200px; }
  .metric-strip { grid-template-columns:1fr 1fr; }
}

/* 2.2.3 - rolkeuze uitsluitend na Identity-herkenning */
.identity-role-grid{display:grid;gap:10px;margin-top:20px}
.identity-role-card{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"title action" "copy action";gap:3px 14px;align-items:center;padding:16px 17px;border:1px solid var(--line,#ded8d0);border-radius:16px;background:var(--surface,#fffdf9);color:var(--ink,#202426);text-align:left;cursor:pointer;box-shadow:0 2px 8px rgba(26,24,21,.025);transition:border-color .16s ease,transform .16s ease,box-shadow .16s ease}
.identity-role-card:hover,.identity-role-card:focus-visible{border-color:#bca98f;transform:translateY(-1px);box-shadow:0 8px 22px rgba(26,24,21,.06);outline:none}
.identity-role-card strong{grid-area:title;font-size:.96rem;letter-spacing:-.01em}
.identity-role-card span{grid-area:copy;color:var(--muted,#6f716f);font-size:.76rem;line-height:1.45}
.identity-role-card em{grid-area:action;color:#704b30;font-style:normal;font-size:.76rem;font-weight:750;white-space:nowrap}
@media(max-width:520px){.identity-role-card{padding:15px;grid-template-columns:1fr;grid-template-areas:"title" "copy" "action"}.identity-role-card em{margin-top:5px}}
