/* ============================================================
   tailr OS — prototype stylesheet (standalone)
   Eigen tokens (zelfde merk als tailr.nl), app-layout.
   ============================================================ */
:root {
  --inkt: #0F0F0F; --cremesoir: #DC785C; --cremesoir-700: #C25D42; --cremesoir-100: #F6DDD3;
  --oker: #C4A07E; --oker-100: #EFE3D6; --papier: #FFFFFF; --linnen: #FCF9F5; --grafiet: #6B6B6B;
  --rand: #ECE5DA; --rand-2: #F4EEE6; --bos: #2D5A3D; --bos-100: #DCE7DE; --wit: #FFFFFF;
  --blauw: #3A6EA5; --blauw-100: #DEE8F2;
  --font-sans: 'General Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Clash Grotesk', var(--font-sans);
  --font-mono: 'SFMono-Regular', 'SF Mono', ui-monospace, monospace;
  --r-sm: 7px; --r-md: 11px; --r-lg: 16px; --r-pill: 999px;
  --sh-sm: 0 1px 3px rgba(31,24,16,.06), 0 1px 2px rgba(31,24,16,.04);
  --sh-md: 0 4px 16px rgba(31,24,16,.08), 0 1px 3px rgba(31,24,16,.05);
  --sh-lg: 0 14px 44px rgba(31,24,16,.13), 0 2px 8px rgba(31,24,16,.06);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font-sans); background: var(--linnen); color: var(--inkt); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--cremesoir-100); }

/* ---- App shell ---- */
.app { display: grid; grid-template-columns: 240px 1fr; grid-template-rows: 58px 1fr; min-height: 100vh; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 16px; padding: 0 20px; background: var(--papier); border-bottom: 1px solid var(--rand); position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 2px; font-family: var(--font-sans); font-weight: 600; font-size: 19px; letter-spacing: -.04em; }
.brand i { width: 5px; height: 5px; border-radius: 999px; background: var(--cremesoir); display: inline-block; margin-left: 1px; margin-top: 7px; }
.brand small { font-weight: 500; font-size: 12px; color: var(--grafiet); margin-left: 8px; letter-spacing: 0; }
.topbar__spacer { flex: 1; }
.roleswitch { display: inline-flex; background: var(--linnen); border: 1px solid var(--rand); border-radius: var(--r-pill); padding: 3px; }
.roleswitch button { border: 0; background: transparent; color: var(--grafiet); font-weight: 600; font-size: 12.5px; padding: 5px 13px; border-radius: var(--r-pill); }
.roleswitch button.on[data-role="tailr"] { background: var(--inkt); color: #fff; }
.roleswitch button.on[data-role="klant"] { background: var(--cremesoir); color: #fff; }
.topuser { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--grafiet); }

/* ---- Sidebar ---- */
.sidebar { background: var(--papier); border-right: 1px solid var(--rand); padding: 16px 12px; overflow-y: auto; }
.navgroup { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; color: var(--grafiet); margin: 14px 10px 6px; }
.navitem { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: var(--r-sm); color: var(--grafiet); font-weight: 500; font-size: 14px; margin-bottom: 2px; }
.navitem:hover { background: var(--rand-2); color: var(--inkt); }
.navitem.on { background: var(--inkt); color: #fff; }
.navitem.on .ic { opacity: 1; }
.navitem .ic { width: 18px; text-align: center; opacity: .7; }
.navitem .badge { margin-left: auto; }

/* ---- Main ---- */
.main { padding: 26px 30px 60px; overflow-y: auto; max-width: 1180px; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-h h1 { font-family: var(--font-display); font-weight: 600; font-size: 27px; letter-spacing: -.02em; margin: 0 0 3px; }
.page-h p { margin: 0; color: var(--grafiet); font-size: 14px; }
.crumb { font-size: 13px; color: var(--grafiet); margin-bottom: 6px; }
.crumb a { color: var(--cremesoir-700); font-weight: 600; }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; font-size: 14px; padding: 9px 15px; border-radius: var(--r-sm); border: 1.5px solid transparent; }
.btn--p { background: var(--inkt); color: #fff; }
.btn--a { background: var(--cremesoir); color: #fff; }
.btn--a:hover { background: var(--cremesoir-700); }
.btn--g { background: transparent; color: var(--inkt); border-color: var(--rand); }
.btn--g:hover { border-color: var(--inkt); }
.btn--sm { padding: 6px 11px; font-size: 13px; }

/* ---- Cards & grid ---- */
.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, 1fr); }
.g-3 { grid-template-columns: repeat(3, 1fr); }
.g-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r-lg); padding: 18px; box-shadow: var(--sh-sm); }
.card h3 { font-family: var(--font-display); font-weight: 600; font-size: 16px; letter-spacing: -.01em; margin: 0 0 12px; }
.kpi__label { font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--grafiet); }
.kpi__val { font-family: var(--font-display); font-weight: 600; font-size: 30px; letter-spacing: -.02em; line-height: 1.1; margin-top: 4px; }
.kpi__sub { font-size: 12px; color: var(--grafiet); margin-top: 3px; }

/* ---- Badges / pills ---- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.badge--ok { background: var(--bos-100); color: var(--bos); }
.badge--accent { background: var(--cremesoir-100); color: var(--cremesoir-700); }
.badge--oker { background: var(--oker-100); color: #8a6a48; }
.badge--blue { background: var(--blauw-100); color: var(--blauw); }
.badge--muted { background: var(--rand-2); color: var(--grafiet); }
.dot { width: 7px; height: 7px; border-radius: 999px; display: inline-block; }

/* ---- Kanban ---- */
.kanban { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; align-items: start; }
.kcol { background: var(--rand-2); border-radius: var(--r-md); padding: 10px; min-height: 120px; }
.kcol__h { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--grafiet); margin-bottom: 9px; padding: 0 2px; }
.kcard { background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r-sm); padding: 11px; margin-bottom: 8px; box-shadow: var(--sh-sm); }
.kcard:hover { border-color: var(--cremesoir); box-shadow: var(--sh-md); }
.kcard b { display: block; font-size: 13px; font-weight: 600; }
.kcard span { font-size: 11.5px; color: var(--grafiet); }

/* ---- Co-pilot ---- */
.copilot { background: linear-gradient(180deg, var(--papier), #fff); border: 1px solid var(--cremesoir-100); border-radius: var(--r-lg); padding: 16px 18px; }
.copilot__h { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 14px; margin-bottom: 12px; }
.copilot__h .spark { width: 22px; height: 22px; border-radius: 999px; background: var(--cremesoir); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.cpitem { display: flex; align-items: center; gap: 11px; padding: 10px 0; border-top: 1px solid var(--rand); }
.cpitem:first-of-type { border-top: 0; }
.cpitem p { margin: 0; font-size: 13px; flex: 1; }
.cpitem p small { display: block; color: var(--grafiet); font-size: 11.5px; }

/* ---- Tables ---- */
.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: left; font-family: var(--font-mono); font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--grafiet); padding: 8px 12px; border-bottom: 1px solid var(--rand); font-weight: 600; }
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--rand-2); }
.tbl tr:hover td { background: var(--rand-2); }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Lijst-tabel (portal, ruimer) ---- */
.tbl--lg th { padding: 11px 18px; }
.tbl--lg td { padding: 17px 18px; font-size: 14px; }
.tbl--lg td:first-child b { font-size: 14.5px; }
.tbl--lg td.go { color: var(--grafiet); width: 40px; }
.tbl--lg tr { transition: background .1s; }
.tbl--lg tr:hover td { background: var(--rand-2); }
.tbl--lg tr:hover td.go { color: var(--cremesoir-700); }

/* ---- Tabs ---- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rand); margin-bottom: 22px; flex-wrap: wrap; }
.tab { padding: 9px 13px; font-weight: 600; font-size: 13.5px; color: var(--grafiet); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--inkt); }
.tab.on { color: var(--inkt); border-bottom-color: var(--cremesoir); }

/* ---- Timeline / lifecycle ---- */
.life { display: flex; gap: 0; flex-wrap: wrap; margin-bottom: 4px; }
.life__step { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--grafiet); }
.life__step .num { width: 22px; height: 22px; border-radius: 999px; background: var(--rand); color: var(--grafiet); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; }
.life__step.done .num { background: var(--bos); color: #fff; }
.life__step.now .num { background: var(--cremesoir); color: #fff; }
.life__step.now { color: var(--inkt); font-weight: 600; }
.life__line { width: 28px; height: 2px; background: var(--rand); margin: 0 4px; }

/* ---- Rows ---- */
.row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-top: 1px solid var(--rand-2); }
.row:first-child { border-top: 0; }
.ic-circle { width: 26px; height: 26px; border-radius: 999px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.lined { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--rand-2); font-size: 13.5px; }
.bar { height: 9px; border-radius: 999px; background: var(--rand-2); overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 999px; }
.avatar { width: 30px; height: 30px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12px; color: #fff; flex: 0 0 auto; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }

/* ---- Fields / forms ---- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: 12.5px; font-weight: 600; }
.field input, .field textarea, .field select { font-family: inherit; font-size: 14px; padding: 10px 12px; border: 1.5px solid var(--rand); border-radius: var(--r-sm); background: var(--wit); outline: none; box-sizing: border-box; color: var(--inkt); }
/* select: zelfde hoogte/uitstraling als de invoervelden + eigen nette chevron */
.field select { -webkit-appearance: none; -moz-appearance: none; appearance: none; height: 44px; line-height: 1.2; padding-right: 38px; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%236b6b6b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.field input, .field textarea { min-height: 44px; }
.field textarea { min-height: 64px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--cremesoir); box-shadow: 0 0 0 3px var(--cremesoir-100); }
.terms { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; background: var(--linnen); border: 1px solid var(--rand); border-radius: var(--r-sm); margin: 14px 0; }
.checkbox { width: 20px; height: 20px; border-radius: 5px; border: 1.5px solid var(--rand); flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; cursor: pointer; }
.checkbox.on { background: var(--cremesoir); border-color: var(--cremesoir); }
.stamp { display: inline-flex; align-items: center; gap: 8px; border: 2px solid var(--bos); color: var(--bos); border-radius: var(--r-sm); padding: 8px 14px; font-weight: 700; font-size: 13px; transform: rotate(-2deg); }

/* ---- Bubbles ---- */
.bubble { border-radius: 14px; padding: 10px 13px; font-size: 13.5px; max-width: 80%; margin-bottom: 8px; line-height: 1.45; }
.bubble--me { background: var(--cremesoir); color: #fff; border-radius: 14px 14px 4px 14px; margin-left: auto; }
.bubble--them { background: var(--rand-2); border-radius: 14px 14px 14px 4px; }

/* ---- Login ---- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background:
  radial-gradient(120% 80% at 80% -10%, var(--cremesoir-100), transparent 55%), var(--linnen); }
.login { background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 32px; width: 100%; max-width: 420px; }
.login h1 { font-family: var(--font-display); font-weight: 600; font-size: 24px; margin: 14px 0 6px; }
.login p { color: var(--grafiet); font-size: 14px; margin: 0 0 22px; }
.codebox { display: flex; gap: 9px; justify-content: center; margin: 8px 0 18px; }
.codebox span { width: 44px; height: 52px; border: 1.5px solid var(--rand); border-radius: var(--r-sm); display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 600; font-size: 22px; }
.codebox span.fill { border-color: var(--cremesoir); box-shadow: 0 0 0 2px var(--cremesoir-100); }
.codein { width: 44px; height: 52px; border: 1.5px solid var(--rand); border-radius: var(--r-sm); text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--inkt); outline: none; }
.codein:focus { border-color: var(--cremesoir); box-shadow: 0 0 0 2px var(--cremesoir-100); }
.login__split { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 8px; }

/* ---- Portaal accent ---- */
.portal .sidebar .navitem.on { background: var(--cremesoir); }
.next-step { background: var(--inkt); color: #fff; border-radius: var(--r-lg); padding: 22px 24px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; }
.next-step h2 { font-family: var(--font-display); font-weight: 600; font-size: 20px; margin: 0 0 4px; }
.next-step p { margin: 0; color: #c8c2b8; font-size: 14px; }

/* ---- Line icons & brand elements (van tailr.nl) ---- */
.ic svg { width: 18px; height: 18px; }
.ic-soft { background: var(--linnen); color: var(--inkt); border: 1px solid var(--rand); }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--cremesoir-700); display: block; margin-bottom: 7px; }
.btn svg:last-child { transition: transform .12s ease; }
.btn:hover svg:last-child { transform: translateX(3px); }
.copilot__h .spark svg { width: 14px; height: 14px; }
.motif { position: absolute; pointer-events: none; }
.login-wrap { position: relative; overflow: hidden; }
.login-wrap .motif { top: -34px; right: -34px; opacity: .1; }

/* ---- Floating assistent (klantportaal) ---- */
.fab { position: fixed; right: 22px; bottom: 22px; z-index: 90; display: inline-flex; align-items: center; gap: 8px; background: var(--cremesoir); color: #fff; border: 0; border-radius: 999px; padding: 12px 18px; font-family: inherit; font-weight: 600; font-size: 13.5px; box-shadow: var(--sh-lg); cursor: pointer; transition: transform .12s, background .12s; }
.fab:hover { background: var(--cremesoir-700); transform: translateY(-2px); }
.chatpanel { position: fixed; right: 22px; bottom: 80px; z-index: 95; width: 372px; max-width: calc(100vw - 32px); background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r-lg); box-shadow: var(--sh-lg); display: flex; flex-direction: column; overflow: hidden; animation: modal-in .2s ease; }
.chatpanel__h { display: flex; align-items: center; gap: 9px; padding: 11px 14px; border-bottom: 1px solid var(--rand); background: var(--linnen); }
.chatpanel__t { padding: 14px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 320px; min-height: 150px; }
.chatpanel__q { display: flex; gap: 6px; flex-wrap: wrap; padding: 0 14px 10px; }
.chatpanel__f { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--rand); }
.chatpanel__f input { flex: 1; font-family: inherit; font-size: 13.5px; padding: 9px 11px; border: 1.5px solid var(--rand); border-radius: var(--r-sm); outline: none; }
.chatpanel__f input:focus { border-color: var(--cremesoir); box-shadow: 0 0 0 2px var(--cremesoir-100); }
@media (max-width: 560px) { .chatpanel { right: 8px; left: 8px; width: auto; bottom: 76px; } .fab span { display: none; } .fab { padding: 14px; } }

/* ---- Drag & drop (taken) ---- */
.kcard[draggable="true"] { cursor: grab; }
.kcard[draggable="true"]:active { cursor: grabbing; }
.dropping { outline: 2px dashed var(--cremesoir); outline-offset: -2px; background: var(--cremesoir-100) !important; }

/* ---- Macro-fasen: pills (één regel per project) + accordeon ---- */
.mf { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px; background: var(--rand-2); color: var(--grafiet); white-space: nowrap; }
.mf--done { background: var(--bos-100); color: var(--bos); }
.mf--act { background: var(--inkt); color: #fff; }
.mf--act.mf--jij { background: var(--cremesoir); }
.mf__sep { width: 10px; height: 2px; background: var(--rand); border-radius: 2px; flex: 0 0 auto; }
.macrorow { border: 1px solid var(--rand); border-radius: var(--r-md); margin-bottom: 8px; overflow: hidden; background: var(--wit); }
.macrorow__h { display: flex; align-items: center; gap: 11px; padding: 13px 15px; cursor: pointer; }
.macrorow__h:hover { background: var(--rand-2); }
.macrorow__b { border-top: 1px solid var(--rand-2); padding: 14px 15px; background: var(--linnen); }

/* ---- Stadia-tijdlijn (project) ---- */
.mline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 0; }
.mstep { display: flex; align-items: center; gap: 9px; }
.mstep__dot { width: 26px; height: 26px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
.mstep__line { width: 34px; height: 2px; background: var(--rand); margin: 0 12px; flex: 0 0 auto; }
@media (max-width: 700px) { .mstep__line { width: 14px; margin: 0 6px; } }

/* ---- Bijlagen bij oplevering ---- */
.att { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--rand); background: var(--linnen); border-radius: var(--r-sm); padding: 9px 13px; font-family: inherit; font-size: 12.5px; font-weight: 600; color: var(--inkt); cursor: pointer; transition: border-color .12s; }
.att:hover { border-color: var(--cremesoir); }
.att--img { flex-direction: column; align-items: stretch; padding: 6px; gap: 6px; width: 152px; }
.att__thumb { display: block; background: var(--wit); border: 1px solid var(--rand); border-radius: 5px; height: 86px; position: relative; overflow: hidden; }
.att__name { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--grafiet); font-weight: 600; padding: 0 3px 2px; }
.shot { position: absolute; inset: 11px; display: flex; flex-direction: column; gap: 7px; }
.shot span { display: block; height: 9px; border-radius: 3px; background: var(--rand-2); }
.shot span:first-child { background: var(--cremesoir-100); }
.shot--lg { height: 250px; position: relative; background: var(--wit); border: 1px solid var(--rand); border-radius: var(--r-md); overflow: hidden; }
.shot--lg .shot { inset: 20px; gap: 13px; }
.shot--lg .shot span { height: 14px; }

/* ---- Project chips ---- */
.chip { display: inline-flex; align-items: center; gap: 6px; font-family: inherit; font-weight: 600; font-size: 12.5px; padding: 7px 14px; border-radius: 999px; border: 1.5px solid var(--rand); background: var(--wit); color: var(--grafiet); cursor: pointer; transition: border-color .12s, background .12s; }
.chip:hover { border-color: var(--inkt); color: var(--inkt); }
.chip.on { border-color: var(--cremesoir); background: var(--cremesoir-100); color: var(--cremesoir-700); }
.chip--arch { border-style: dashed; color: var(--grafiet); }
.chip--arch.on { border-color: var(--grafiet); background: var(--rand-2); color: var(--inkt); }

/* ---- View toggle (bord/lijst) ---- */
.viewtoggle { display: inline-flex; background: var(--linnen); border: 1px solid var(--rand); border-radius: var(--r-pill); padding: 3px; gap: 2px; }
.viewtoggle button { border: 0; background: transparent; color: var(--grafiet); font-weight: 600; font-size: 12.5px; padding: 5px 13px; border-radius: var(--r-pill); cursor: pointer; }
.viewtoggle button.on { background: var(--inkt); color: #fff; }

/* ---- Switch toggle ---- */
.switch { width: 38px; height: 22px; border-radius: 999px; background: var(--rand); position: relative; cursor: pointer; border: 0; padding: 0; flex: 0 0 auto; transition: background .15s; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: var(--sh-sm); transition: left .15s; }
.switch.on { background: var(--cremesoir); }
.switch.on::after { left: 19px; }
.topuser[data-nav] { cursor: pointer; border-radius: var(--r-sm); padding: 4px 8px; transition: background .12s; }
.topuser[data-nav]:hover { background: var(--rand-2); }

/* ---- Focus-visible (a11y) ---- */
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .navitem:focus-visible, [data-open]:focus-visible { outline: 2px solid var(--cremesoir); outline-offset: 2px; border-radius: var(--r-sm); }

.mut { color: var(--grafiet); }
.mb0 { margin-bottom: 0; } .mt16 { margin-top: 16px; } .mt22 { margin-top: 22px; }
.flex { display: flex; gap: 12px; align-items: center; } .between { justify-content: space-between; } .wrap { flex-wrap: wrap; }

/* ---- Topbar search + iconbtn + notif ---- */
.search { display: flex; align-items: center; gap: 8px; background: var(--linnen); border: 1px solid var(--rand); border-radius: var(--r-pill); padding: 6px 13px; color: var(--grafiet); }
.search input { border: 0; background: transparent; outline: none; font-family: inherit; font-size: 13.5px; width: 160px; color: var(--inkt); }
.iconbtn { width: 36px; height: 36px; border-radius: var(--r-sm); border: 1px solid var(--rand); background: var(--papier); color: var(--grafiet); display: inline-flex; align-items: center; justify-content: center; position: relative; }
.iconbtn:hover { color: var(--inkt); border-color: var(--inkt); }
.iconbtn .ndot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 999px; background: var(--cremesoir); border: 1.5px solid var(--papier); }
.searchres { position: absolute; top: 50px; left: 180px; width: 320px; z-index: 45; background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r-md); box-shadow: var(--sh-lg); overflow: hidden; }
.searchres a, .notif a { display: block; padding: 10px 14px; border-bottom: 1px solid var(--rand-2); }
.searchres a:hover, .notif a:hover { background: var(--rand-2); }
.notif { position: absolute; top: 52px; right: 18px; width: 330px; z-index: 45; background: var(--papier); border: 1px solid var(--rand); border-radius: var(--r-md); box-shadow: var(--sh-lg); overflow: hidden; }
.notif h4 { margin: 0; padding: 12px 14px; font-size: 12.5px; border-bottom: 1px solid var(--rand); }
.notif .cpitem { padding: 11px 14px; border-top: 0; border-bottom: 1px solid var(--rand-2); }

/* ---- Modal ---- */
.modal-ov { position: fixed; inset: 0; background: rgba(15,15,15,.42); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100; animation: fade .15s ease; }
.modal { background: var(--papier); border-radius: var(--r-lg); box-shadow: var(--sh-lg); width: 100%; max-width: 460px; padding: 26px; animation: modal-in .2s ease; max-height: 90vh; overflow-y: auto; }
.modal--lg { max-width: 560px; }
.modal h2 { font-family: var(--font-display); font-weight: 600; font-size: 19px; margin: 0 0 4px; }
.modal .sub { color: var(--grafiet); font-size: 13.5px; margin: 0 0 18px; }
.modal__x { position: absolute; top: 16px; right: 16px; background: 0; border: 0; color: var(--grafiet); cursor: pointer; }
.modal__foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---- Toasts ---- */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--inkt); color: #fff; border-radius: var(--r-md); padding: 12px 16px; box-shadow: var(--sh-lg); font-size: 13.5px; display: flex; align-items: center; gap: 10px; animation: toast-in .25s ease; max-width: 340px; }
.toast svg { flex: 0 0 auto; }
.toast.out { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateX(20px); } }

/* ---- Skeleton ---- */
.sk { background: linear-gradient(90deg, var(--rand-2) 25%, var(--rand) 37%, var(--rand-2) 63%); background-size: 400% 100%; animation: sk 1.2s ease infinite; border-radius: var(--r-sm); }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }
.sk-line { height: 13px; margin-bottom: 11px; }
.sk-card { height: 96px; border-radius: var(--r-lg); }

/* ---- Empty state ---- */
.empty { position: relative; overflow: hidden; text-align: center; padding: 46px 24px; }
.empty .motif { top: 50%; left: 50%; transform: translate(-50%,-50%); opacity: .07; }
.empty p { position: relative; color: var(--grafiet); margin: 0 0 16px; }

/* ---- Dark chart card ---- */
.chartcard { background: var(--inkt); color: var(--papier); border-radius: var(--r-lg); padding: 18px; }
.chartcard .kpi__label { color: #9a9a9a; }
.chartcard .ttl { font-family: var(--font-display); font-weight: 600; font-size: 16px; }
.chartbars { display: flex; align-items: flex-end; gap: 8px; height: 96px; margin-top: 14px; }
.chartbars > span { flex: 1; border-radius: 3px 3px 1px 1px; }
.chartx { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 9.5px; color: #8a8a8a; margin-top: 7px; }

/* ---- Mail list / preview ---- */
.mailrow { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-bottom: 1px solid var(--rand-2); cursor: pointer; }
.mailrow:hover { background: var(--rand-2); }
.mailrow .who { width: 30px; height: 30px; border-radius: 999px; background: var(--linnen); border: 1px solid var(--rand); display: inline-flex; align-items: center; justify-content: center; color: var(--cremesoir-700); flex: 0 0 auto; }
.mailrow b { font-size: 13.5px; }
.mailprev { border: 1px solid var(--rand); border-radius: var(--r-md); overflow: hidden; }
.mailprev__h { background: var(--linnen); border-bottom: 1px solid var(--rand); padding: 14px 18px; font-size: 12.5px; color: var(--grafiet); }
.mailprev__b { padding: 22px; font-size: 14px; line-height: 1.6; }
.mailprev__b .logo { font-family: var(--font-sans); font-weight: 600; letter-spacing: -.04em; font-size: 20px; margin-bottom: 16px; display: inline-block; }

/* ---- Notif center + bell badge ---- */
.iconbtn .count { position: absolute; top: -6px; right: -6px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: var(--cremesoir); color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; border: 1.5px solid var(--papier); }
.notif__row { display: flex; gap: 10px; padding: 11px 14px; border-bottom: 1px solid var(--rand-2); cursor: pointer; }
.notif__row:hover { background: var(--rand-2); }
.notif__row.unread { background: #fff8f4; }
.notif__row .udot { width: 7px; height: 7px; border-radius: 999px; background: var(--cremesoir); margin-top: 5px; flex: 0 0 auto; }
.notif__row.read .udot { background: var(--rand); }
.notif__row b { font-size: 12.5px; }
.notif__foot { padding: 9px 14px; text-align: center; }
.notif__foot button { background: 0; border: 0; color: var(--cremesoir-700); font-weight: 600; font-size: 12.5px; cursor: pointer; }

/* ---- Report funnel ---- */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel__row { display: flex; align-items: center; gap: 12px; }
.funnel__lbl { width: 96px; flex: 0 0 96px; font-size: 12.5px; color: var(--grafiet); }
.funnel__track { flex: 1; }
.funnel__bar { height: 32px; border-radius: var(--r-sm); display: flex; align-items: center; padding: 0 12px; color: #fff; font-weight: 600; font-size: 12.5px; min-width: 40px; }

/* ---- Documentenkluis ---- */
.vault { display: flex; align-items: center; gap: 11px; padding: 12px 13px; border: 1px solid var(--rand); border-radius: var(--r-sm); margin-bottom: 8px; }
.vault .lock { color: var(--bos); flex: 0 0 auto; }
.vault b { font-size: 13px; }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; }
  .topbar { flex-wrap: wrap; height: auto; padding: 10px 14px; gap: 10px; }
  .search, #searchres { display: none !important; }
  .sidebar { display: flex; gap: 4px; overflow-x: auto; border-right: 0; border-bottom: 1px solid var(--rand); padding: 8px 12px; }
  .navgroup { display: none; }
  .navitem { white-space: nowrap; margin-bottom: 0; padding: 8px 10px; }
  .navitem .badge { display: none; }
  .main { padding: 18px 16px 60px; }
  .g-4, .g-3, .g-2 { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: 1fr; }
  .tbl { font-size: 12.5px; }
  .card { overflow-x: auto; }
  .kanban { grid-template-columns: 1fr !important; }
  .modal-ov { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: var(--r-lg) var(--r-lg) 0 0; }
  .notif { right: 8px; left: 8px; width: auto; }
  .topuser span:not(.avatar) { display: none; }
  .funnel__lbl { width: 74px; flex: 0 0 74px; }
}
@media (min-width: 481px) and (max-width: 860px) { .g-4, .g-3, .g-2 { grid-template-columns: repeat(2, 1fr); } }
