/* enVisual CRM design system. Tokens eerst, daarna basis, componenten, layout, utilities. */
:root {
  --ev-orange: #FE5F00;        /* signaal-oranje uit het logo */
  --ev-orange-2: #FF832F;
  --ev-orange-3: #FFA366;
  --ev-orange-4: #FFC298;
  --ev-logo-grey: #565656;
  --ev-orange-dark: #C24600;   /* leesbaar oranje voor tekst en links */
  --ev-orange-display: #E85600;
  --ev-orange-soft: #FFE5E0;   /* blush, sectietint */
  --ev-blush-2: #FFF3F0;
  --ev-hand: "Caveat", "Segoe Script", cursive;
  --ev-ink: #171B26;
  --ev-ink-soft: #3A3F4B;
  --ev-muted: #6B6F7A;
  --ev-faint: #9A9EA8;
  --ev-bg: #F8F6F3;            /* warm wit */
  --ev-surface: #FFFFFF;
  --ev-surface-2: #FAF9F7;
  --ev-border: #E6E3DF;
  --ev-border-strong: #D2CEC8;
  --ev-green: #1F8A4C;  --ev-green-soft: #E7F5EC;
  --ev-red: #C8311E;    --ev-red-soft: #FBEAE7;
  --ev-amber: #B8700A;  --ev-amber-soft: #FDF3E1;
  --ev-blue: #2457A8;   --ev-blue-soft: #E8EFFA;
  --ev-radius: 8px;
  --ev-radius-lg: 14px;
  --ev-shadow: 0 1px 2px rgba(23,27,38,.06), 0 1px 1px rgba(23,27,38,.04);
  --ev-shadow-lg: 0 12px 32px rgba(23,27,38,.14);
  --ev-font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ev-font-head: "Manrope", var(--ev-font);
  --ev-font-mono: ui-monospace, Menlo, Consolas, monospace;
  --ev-sidebar-w: 248px;
  --ev-topbar-h: 56px;
  --ev-focus: 0 0 0 3px rgba(254,95,0,.28);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ev-bg); color: var(--ev-ink);
  font-family: var(--ev-font); font-size: 14.5px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--ev-font-head); letter-spacing: -0.015em; margin: 0; color: var(--ev-ink); }
h1 { font-size: 22px; font-weight: 700; }
h2 { font-size: 17px; font-weight: 700; }
h3 { font-size: 15px; font-weight: 600; }
p { margin: 0 0 .75rem; }
a { color: var(--ev-orange-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .muted { color: var(--ev-muted); }
code, .mono { font-family: var(--ev-font-mono); font-size: .92em; }
:focus-visible { outline: none; box-shadow: var(--ev-focus); border-radius: var(--ev-radius); }
[x-cloak] { display: none !important; }
hr { border: 0; border-top: 1px solid var(--ev-border); margin: 1rem 0; }

/* ---------- Knoppen ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  height: 36px; padding: 0 14px; border-radius: var(--ev-radius);
  border: 1px solid var(--ev-border-strong); background: var(--ev-surface); color: var(--ev-ink);
  font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--ev-surface-2); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--ev-orange); border-color: var(--ev-orange); color: #fff; }
.btn-primary:hover { background: var(--ev-orange-display); border-color: var(--ev-orange-display); }
.btn-dark { background: var(--ev-ink); border-color: var(--ev-ink); color: #fff; }
.btn-dark:hover { background: #262b38; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--ev-ink-soft); }
.btn-ghost:hover { background: rgba(23,27,38,.06); }
.btn-danger { color: var(--ev-red); border-color: #E9B7AF; }
.btn-danger:hover { background: var(--ev-red-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn-lg { height: 44px; padding: 0 20px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Formulieren ---------- */
.field { margin-bottom: 1rem; }
.label { display: block; font-weight: 600; font-size: 13px; margin-bottom: .35rem; color: var(--ev-ink-soft); }
.input, .select, .textarea {
  width: 100%; height: 38px; padding: 0 11px; font: inherit; font-size: 14.5px; color: var(--ev-ink);
  background: var(--ev-surface); border: 1px solid var(--ev-border-strong); border-radius: var(--ev-radius);
  transition: border-color .12s, box-shadow .12s;
}
.textarea { height: auto; min-height: 96px; padding: 9px 11px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--ev-orange); box-shadow: var(--ev-focus); outline: none; }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--ev-red); }
.input-code { font-family: var(--ev-font-mono); font-size: 28px; letter-spacing: .4em; text-align: center; height: 56px; }
.help { font-size: 12.5px; color: var(--ev-muted); margin-top: .35rem; }
.error { font-size: 12.5px; color: var(--ev-red); margin-top: .35rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--ev-orange); margin: 0; }
.switch { -webkit-appearance: none; appearance: none; position: relative; display: inline-block; box-sizing: border-box; width: 44px; height: 24px; padding: 0; margin: 0; border: 0; border-radius: 999px; background: #D9D4CE; cursor: pointer; flex: none; transition: background .18s ease; box-shadow: inset 0 1px 2px rgba(23,27,38,.12); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(23,27,38,.25); transition: transform .18s ease; }
.switch:hover { background: #CCC6BF; }
.switch.on { background: var(--ev-orange); box-shadow: none; }
.switch.on:hover { background: var(--ev-orange-display); }
.switch.on::after { transform: translateX(20px); }
.switch:focus-visible { outline: none; box-shadow: var(--ev-focus); }
.switch:disabled { opacity: .5; cursor: not-allowed; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: auto; } }

/* ---------- Oppervlakken ---------- */
.card { background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); box-shadow: var(--ev-shadow); }
.card-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 14px 18px; border-bottom: 1px solid var(--ev-border); }
.card-body { padding: 18px; }
.card-footer { padding: 12px 18px; border-top: 1px solid var(--ev-border); background: var(--ev-surface-2); border-radius: 0 0 var(--ev-radius-lg) var(--ev-radius-lg); }
.section-title { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-header .sub { color: var(--ev-muted); margin-top: 2px; }
.actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }

/* ---------- Badges en alerts ---------- */
.badge { display: inline-flex; align-items: center; gap: .3rem; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--ev-surface-2); border: 1px solid var(--ev-border); color: var(--ev-ink-soft); white-space: nowrap; }
.badge-orange { background: var(--ev-orange-soft); border-color: var(--ev-orange-4); color: var(--ev-orange-dark); }
.badge-green { background: var(--ev-green-soft); border-color: #BFE3CC; color: var(--ev-green); }
.badge-red { background: var(--ev-red-soft); border-color: #EFC2BB; color: var(--ev-red); }
.badge-amber { background: var(--ev-amber-soft); border-color: #F1D9A8; color: var(--ev-amber); }
.badge-blue { background: var(--ev-blue-soft); border-color: #C3D4F2; color: var(--ev-blue); }
.badge-dark { background: var(--ev-ink); border-color: var(--ev-ink); color: #fff; }
.alert { padding: 11px 14px; border-radius: var(--ev-radius); border: 1px solid var(--ev-border); background: var(--ev-surface-2); margin-bottom: 1rem; font-size: 14px; }
.alert-success { background: var(--ev-green-soft); border-color: #BFE3CC; color: #14532D; }
.alert-error { background: var(--ev-red-soft); border-color: #EFC2BB; color: #7F1D1D; }
.alert-info { background: var(--ev-blue-soft); border-color: #C3D4F2; color: #1E3A8A; }
.alert-warning { background: var(--ev-amber-soft); border-color: #F1D9A8; color: #713F12; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--ev-muted); font-weight: 600; padding: 10px 12px; border-bottom: 1px solid var(--ev-border); background: var(--ev-surface-2); white-space: nowrap; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--ev-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: var(--ev-surface-2); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 40px 20px; text-align: center; color: var(--ev-muted); }
.empty strong { display: block; color: var(--ev-ink); margin-bottom: 4px; font-family: var(--ev-font-head); }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--ev-sidebar-w); flex: none; background: var(--ev-ink); color: #C9CCD3;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 20px 12px; color: #fff; }
.brand img { height: 46px; width: auto; display: block; }
.brand .crm { font-family: var(--ev-font-head); font-weight: 600; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: #8E93A0; margin-left: 2px; align-self: flex-end; padding-bottom: 4px; }
.nav { padding: 6px 12px 20px; flex: 1; }
.nav-group { margin-top: 14px; }
.nav-group-title { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #7C818E; padding: 0 10px 6px; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--ev-radius); color: #C9CCD3; font-weight: 500; font-size: 14px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; text-decoration: none; }
.nav a.active { background: var(--ev-orange); color: #fff; font-weight: 600; }
.nav a.active svg { color: #fff; opacity: 1; }
.nav a svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.nav a .cnt { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.12); border-radius: 999px; padding: 1px 7px; }
.nav a.soon { opacity: .45; cursor: default; }
.sidebar-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 12px; color: #7C818E; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar { height: var(--ev-topbar-h); display: flex; align-items: center; gap: 12px; padding: 0 20px; background: var(--ev-surface); border-bottom: 1px solid var(--ev-border); position: sticky; top: 0; z-index: 20; }
.topbar .search-btn { flex: 1; max-width: 420px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: var(--ev-bg); border: 1px solid var(--ev-border); border-radius: var(--ev-radius); color: var(--ev-muted); font: inherit; cursor: text; text-align: left; }
.topbar .search-btn kbd { margin-left: auto; font-family: var(--ev-font); font-size: 11px; color: var(--ev-faint); border: 1px solid var(--ev-border); border-radius: 4px; padding: 1px 5px; background: #fff; }
.topbar .spacer { flex: 1; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ev-orange-soft); color: var(--ev-orange-dark); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; }
.avatar-lg { width: 48px; height: 48px; font-size: 16px; }
.content { padding: 24px 24px 96px; width: 100%; max-width: none; }
@media (min-width: 1600px) { .content { padding: 28px 40px 96px; } }
.content.narrow { max-width: 760px; }
.icon-btn { position: relative; width: 36px; height: 36px; border-radius: var(--ev-radius); border: 1px solid transparent; background: transparent; display: grid; place-items: center; color: var(--ev-ink-soft); cursor: pointer; }
.icon-btn:hover { background: var(--ev-bg); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn .dot { position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--ev-orange); border: 2px solid #fff; }

.mobile-nav { display: none; }
.mobile-header { display: none; }

@media (max-width: 960px) {
  .sidebar { display: none; }
  .topbar { padding: 0 14px; }
  .content { padding: 16px 14px 96px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--ev-surface); border-top: 1px solid var(--ev-border); padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  }
  .mobile-nav a, .mobile-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10.5px; color: var(--ev-muted); font-weight: 600; text-decoration: none; background: none; border: 0; font-family: inherit; padding: 4px 0; }
  .mobile-nav a.active { color: var(--ev-orange-dark); }
  .mobile-nav svg { width: 22px; height: 22px; }
  .mobile-nav .plus { width: 48px; height: 48px; margin-top: -22px; border-radius: 50%; background: var(--ev-orange); color: #fff; display: grid; place-items: center; box-shadow: var(--ev-shadow-lg); }
  .mobile-nav .plus svg { width: 24px; height: 24px; }
}

/* Mobiel menu (overlay) */
.drawer { position: fixed; inset: 0; z-index: 40; display: flex; }
.drawer .backdrop { flex: 1; background: rgba(23,27,38,.5); }
.drawer .panel { width: min(320px, 85vw); background: var(--ev-ink); color: #C9CCD3; overflow-y: auto; display: flex; flex-direction: column; }

/* ---------- Dashboard ---------- */
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 640px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }
.action-tile { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); color: var(--ev-ink); text-decoration: none; transition: border-color .12s, box-shadow .12s; }
.action-tile:hover { border-color: var(--ev-border-strong); box-shadow: var(--ev-shadow); text-decoration: none; }
.action-tile .n { font-family: var(--ev-font-head); font-size: 26px; font-weight: 700; min-width: 40px; color: var(--ev-orange-dark); line-height: 1; }
.action-tile .t { font-weight: 600; }
.action-tile .s { font-size: 12.5px; color: var(--ev-muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--ev-border); }
.list li:last-child { border-bottom: 0; }
.list .when { margin-left: auto; font-size: 12px; color: var(--ev-faint); white-space: nowrap; }

/* ---------- Modals, dropdowns, toasts ---------- */
.modal-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; background: rgba(23,27,38,.45); overflow-y: auto; }
.modal { width: 100%; max-width: 560px; background: var(--ev-surface); border-radius: var(--ev-radius-lg); box-shadow: var(--ev-shadow-lg); }
.modal-lg { max-width: 800px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--ev-border); }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem; padding: 14px 20px; border-top: 1px solid var(--ev-border); background: var(--ev-surface-2); border-radius: 0 0 var(--ev-radius-lg) var(--ev-radius-lg); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); min-width: 220px; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); box-shadow: var(--ev-shadow-lg); padding: 6px; z-index: 30; }
.dropdown a, .dropdown button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--ev-radius); color: var(--ev-ink); font: inherit; background: none; border: 0; cursor: pointer; text-align: left; }
.dropdown a:hover, .dropdown button:hover { background: var(--ev-bg); text-decoration: none; }
.dropdown .sep { height: 1px; background: var(--ev-border); margin: 6px 0; }
.dropdown .head { padding: 8px 10px 4px; font-size: 12px; color: var(--ev-muted); }
.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ev-ink); color: #fff; padding: 10px 14px; border-radius: var(--ev-radius); box-shadow: var(--ev-shadow-lg); font-size: 14px; }
@media (max-width: 960px) { .toasts { bottom: 80px; left: 16px; } }

/* Palette (CMD+K) */
.palette { width: 100%; max-width: 640px; background: var(--ev-surface); border-radius: var(--ev-radius-lg); box-shadow: var(--ev-shadow-lg); overflow: hidden; }
.palette input { width: 100%; height: 52px; border: 0; border-bottom: 1px solid var(--ev-border); padding: 0 18px; font: inherit; font-size: 16px; outline: none; }
.palette .results { max-height: 60vh; overflow-y: auto; padding: 6px; }
.palette .group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ev-muted); padding: 8px 12px 4px; font-weight: 600; }
.palette a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: var(--ev-radius); color: var(--ev-ink); }
.palette a:hover, .palette a.active { background: var(--ev-bg); text-decoration: none; }
.palette a .sub { color: var(--ev-muted); font-size: 12.5px; }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: var(--ev-bg); }
.auth-card { width: 100%; max-width: 420px; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); box-shadow: var(--ev-shadow); padding: 32px 32px 28px; }
.auth-brand { display: flex; justify-content: center; margin: 0 0 22px; }
.auth-brand img { height: 96px; width: auto; }
.brand-inline { display: inline-flex; align-items: center; gap: 8px; }
.brand-inline img { height: 34px; width: auto; }
.auth h1 { font-size: 20px; margin-bottom: 6px; }
.auth .intro { color: var(--ev-muted); margin-bottom: 20px; }
.auth-foot { margin-top: 18px; font-size: 13px; color: var(--ev-muted); text-align: center; }

/* ---------- Utilities ---------- */
.flex { display: flex; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; } .mb-2 { margin-bottom: .5rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.text-sm { font-size: 13px; } .text-xs { font-size: 12px; } .font-semibold { font-weight: 600; } .text-right { text-align: right; } .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full { width: 100%; } .hidden { display: none !important; }
.stack > * + * { margin-top: 1rem; }
.pagination { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.pagination a, .pagination span { min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; padding: 0 8px; border-radius: var(--ev-radius); border: 1px solid var(--ev-border); background: #fff; color: var(--ev-ink); font-size: 13px; }
.pagination .active span { background: var(--ev-ink); color: #fff; border-color: var(--ev-ink); }
.pagination .disabled span { opacity: .45; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--ev-border); margin-bottom: 1.25rem; overflow-x: auto; }
.tabs a { padding: 10px 14px; font-weight: 600; color: var(--ev-muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ev-ink); text-decoration: none; }
.tabs a.active { color: var(--ev-ink); border-bottom-color: var(--ev-orange); }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--ev-muted); } .kv dd { margin: 0; }
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; gap: 2px; } .kv dd { margin-bottom: 8px; } }

/* ---------- Kanban ---------- */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kanban-col { flex: 0 0 260px; background: var(--ev-surface-2); border: 1px solid var(--ev-border); border-radius: var(--ev-radius-lg); min-height: 200px; }
.kanban-col.over { border-color: var(--ev-orange); background: var(--ev-orange-soft); }
.kanban-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--ev-border); }
.kanban-body { padding: 8px; display: flex; flex-direction: column; gap: 8px; }
.kanban-card { background: #fff; border: 1px solid var(--ev-border); border-radius: var(--ev-radius); padding: 10px 12px; cursor: grab; box-shadow: var(--ev-shadow); }
.kanban-card:hover { border-color: var(--ev-border-strong); }
.kanban-card.dragging { opacity: .5; }
.badge-grey { }

/* ---------- Kalender en voortgang ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ev-border); }
.cal-head { padding: 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ev-muted); font-weight: 600; border-bottom: 1px solid var(--ev-border); background: var(--ev-surface-2); }
.cal-day { min-height: 96px; padding: 6px; border-right: 1px solid var(--ev-border); border-bottom: 1px solid var(--ev-border); font-size: 12px; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.other { background: var(--ev-surface-2); color: var(--ev-faint); }
.cal-day.today .cal-num { background: var(--ev-orange); color: #fff; }
.cal-num { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 600; margin-bottom: 4px; }
.cal-ev { display: block; padding: 2px 6px; border-radius: 4px; margin-bottom: 3px; font-size: 11.5px; color: var(--ev-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; background: var(--ev-surface-2); }
.cal-ev:hover { text-decoration: none; filter: brightness(.97); }
.cal-ev.done { opacity: .5; text-decoration: line-through; }
.cal-orange { border-color: var(--ev-orange); background: var(--ev-orange-soft); }
.cal-blue { border-color: var(--ev-blue); background: var(--ev-blue-soft); }
.cal-green { border-color: var(--ev-green); background: var(--ev-green-soft); }
.cal-amber { border-color: var(--ev-amber); background: var(--ev-amber-soft); }
.cal-grey { border-color: var(--ev-border-strong); }
.cal-red { border-color: var(--ev-red); background: var(--ev-red-soft); }
/* Kalender vult de resterende hoogte van het venster; weekrijen groeien mee. */
.cal-card { display: flex; flex-direction: column; min-height: calc(100dvh - var(--ev-topbar-h) - 150px); }
.cal-card .cal { flex: 1; grid-template-rows: auto; grid-auto-rows: minmax(96px, 1fr); }
@media (max-width: 720px) { .cal-card { min-height: 0; } .cal-card .cal { grid-auto-rows: minmax(64px, auto); } .cal-day { min-height: 64px; padding: 4px; } .cal-ev { font-size: 10px; padding: 1px 4px; } }
.progress { height: 8px; background: var(--ev-border); border-radius: 999px; overflow: hidden; min-width: 80px; }
.progress span { display: block; height: 100%; background: var(--ev-orange); border-radius: 999px; }

/* ---------- Voertuigen ---------- */
.plate { display: inline-block; font-family: var(--ev-font-mono); font-weight: 700; letter-spacing: .06em; background: #F9D648; color: #171B26; border: 2px solid #171B26; border-radius: 4px; padding: 1px 8px; font-size: 13px; white-space: nowrap; }
.plate-lg { font-size: 20px; padding: 3px 12px; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo { position: relative; padding: 0; border: 1px solid var(--ev-border); border-radius: var(--ev-radius); overflow: hidden; background: var(--ev-surface-2); cursor: pointer; aspect-ratio: 4/3; }
.photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo .badge { position: absolute; left: 6px; bottom: 6px; }
@media (max-width: 960px) { .grid[style*="2fr 1fr"] { grid-template-columns: 1fr !important; } .grid[style*="1fr 300px"] { grid-template-columns: 1fr !important; } .grid[style*="240px 1fr"] { grid-template-columns: 1fr !important; } .grid[style*="220px 1fr"] { grid-template-columns: 1fr !important; } .grid[style*="320px 1fr"] { grid-template-columns: 1fr !important; } }

/* ---------- Kennisbank (prose) ---------- */
.prose { line-height: 1.65; max-width: 72ch; }
.prose h1, .prose h2, .prose h3 { margin: 1.4em 0 .5em; }
.prose h1 { font-size: 20px; } .prose h2 { font-size: 17px; } .prose h3 { font-size: 15px; }
.prose h1:first-child, .prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 .9em; }
.prose ul, .prose ol { margin: 0 0 .9em 1.4em; padding: 0; }
.prose li { margin-bottom: .3em; }
.prose code { background: var(--ev-surface-2); border: 1px solid var(--ev-border); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--ev-ink); color: #eee; padding: 12px 14px; border-radius: 6px; overflow-x: auto; }
.prose pre code { background: none; border: 0; color: inherit; }
.prose blockquote { border-left: 3px solid var(--ev-orange); margin: 0 0 .9em; padding: 4px 14px; color: var(--ev-muted); }
.prose table { border-collapse: collapse; margin-bottom: .9em; } .prose th, .prose td { border: 1px solid var(--ev-border); padding: 6px 10px; }
.prose img { max-width: 100%; border-radius: 6px; }

/* ---------- enVisual huisstijl-laag ---------- */
h1 { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
h2 { font-weight: 700; }
.page-header { margin-bottom: 1.5rem; }
.page-header h1 { position: relative; padding-bottom: 10px; }
.page-header h1::after { content: ""; position: absolute; left: 0; bottom: 0; width: 34px; height: 4px; border-radius: 2px; background: var(--ev-orange); }
.page-header .sub { margin-top: 6px; }
.hand { font-family: var(--ev-hand); font-weight: 600; color: var(--ev-orange-display); letter-spacing: 0; }
.hand-greeting { font-size: 20px; line-height: 1; margin-bottom: 2px; display: block; }
.btn { border-radius: var(--ev-radius); }
.btn-primary { box-shadow: 0 2px 6px rgba(254,95,0,.25); }
.btn-primary:hover { box-shadow: 0 4px 12px rgba(254,95,0,.3); }
.card { border-color: #ECE7E2; box-shadow: 0 1px 2px rgba(23,27,38,.04), 0 6px 18px rgba(23,27,38,.04); }
.card-header h2 { font-size: 16px; }
.table th { background: var(--ev-blush-2); color: var(--ev-ink-soft); border-bottom-color: #F3D8D0; }
.table tr.row-link:hover td, .table tbody tr[data-row-href]:hover td { background: var(--ev-blush-2); }
.topbar .search-btn { border-radius: 999px; }
.brand { border-bottom: 1px solid rgba(255,255,255,.06); margin-bottom: 4px; }
.nav-group-title { color: var(--ev-orange-3); letter-spacing: .1em; }
.nav a { border-radius: var(--ev-radius); }
.action-tile { border-radius: var(--ev-radius-lg); border-color: #ECE7E2; }
.action-tile:hover { border-color: var(--ev-orange-4); box-shadow: 0 6px 18px rgba(254,95,0,.10); transform: translateY(-1px); }
.action-tile .n { color: var(--ev-orange); font-weight: 800; }
.empty { padding: 48px 20px; }
.empty strong { font-size: 17px; }
.empty::before { content: "✎"; display: block; font-family: var(--ev-hand); font-size: 30px; color: var(--ev-orange-3); margin-bottom: 4px; }
.badge { font-weight: 600; }
.badge-orange { background: var(--ev-orange-soft); border-color: #FFC9B8; }
.avatar { background: var(--ev-orange-soft); color: var(--ev-orange-dark); }
.progress span { background: linear-gradient(90deg, var(--ev-orange), var(--ev-orange-2)); }
.auth { background: radial-gradient(1200px 600px at 80% -10%, #FFE5E0 0%, transparent 60%), radial-gradient(800px 500px at -10% 110%, #FFF3F0 0%, transparent 60%), var(--ev-bg); }
.auth-card { border-radius: 18px; padding: 36px 36px 30px; border-color: #F3D8D0; box-shadow: 0 16px 40px rgba(23,27,38,.10); }
.auth h1 { font-size: 24px; }
.auth h1::before { content: "Welkom terug"; display: block; font-family: var(--ev-hand); font-weight: 600; font-size: 22px; color: var(--ev-orange-display); margin-bottom: 2px; letter-spacing: 0; }
.modal { border-radius: 16px; }
.modal-head h2, .modal h2 { font-weight: 800; }
.cal-day.today .cal-num { background: var(--ev-orange); }
.cal-orange { background: var(--ev-orange-soft); }
.tabs a.active { color: var(--ev-orange-dark); border-bottom-color: var(--ev-orange); }
.pipeline-col h3, .kanban-col h3 { font-weight: 800; }

/* ---------- Paginering ---------- */
.pager { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 12px 18px; border-top: 1px solid var(--ev-border); flex-wrap: wrap; }
.pager-info { font-size: 13px; color: var(--ev-muted); }
.pager-links { display: flex; align-items: center; gap: 4px; }
.pager-btn { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--ev-radius); border: 1px solid var(--ev-border); background: var(--ev-surface); color: var(--ev-ink-soft); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pager-btn:hover { border-color: var(--ev-orange-4); background: var(--ev-blush-2); color: var(--ev-ink); }
.pager-btn.is-active { background: var(--ev-orange); border-color: var(--ev-orange); color: #fff; cursor: default; }
.pager-btn.is-disabled { opacity: .4; cursor: default; pointer-events: none; }
.pager-dots { padding: 0 4px; color: var(--ev-faint); }
@media (max-width: 640px) { .pager { justify-content: center; } .pager-info { width: 100%; text-align: center; } }
.card-footer .pager { padding: 0; border-top: 0; }

/* ---------- Segmentschakelaar (bijv. Lijst | Pipeline) ---------- */
.seg { display: inline-flex; background: var(--ev-surface-2); border: 1px solid var(--ev-border); border-radius: 999px; padding: 3px; }
.seg-item { padding: 6px 14px; border-radius: 999px; font-size: 13.5px; font-weight: 600; color: var(--ev-muted); text-decoration: none; }
.seg-item:hover { color: var(--ev-ink); text-decoration: none; }
.seg-item.is-active { background: var(--ev-surface); color: var(--ev-ink); box-shadow: var(--ev-shadow); }

/* ---------- Veilige zones (iPhone-notch, PWA met doorzichtige statusbalk) ---------- */
.topbar { padding-top: env(safe-area-inset-top); height: calc(var(--ev-topbar-h) + env(safe-area-inset-top)); }
.sidebar { padding-top: env(safe-area-inset-top); }
.auth { padding-top: calc(24px + env(safe-area-inset-top)); }
.modal-backdrop, .palette-backdrop { padding-top: env(safe-area-inset-top); }
@media (max-width: 960px) { .content { padding-left: calc(14px + env(safe-area-inset-left)); padding-right: calc(14px + env(safe-area-inset-right)); } }

/* ---------- Chips (categoriekeuze bij opnames) ---------- */
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--ev-border-strong); background: var(--ev-surface); font: inherit; font-size: 13.5px; font-weight: 600; color: var(--ev-ink-soft); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.chip.is-active { background: var(--ev-orange); border-color: var(--ev-orange); color: #fff; }
.chip .cnt { font-size: 11px; background: rgba(0,0,0,.12); border-radius: 999px; padding: 1px 6px; }
.chip.is-active .cnt { background: rgba(255,255,255,.25); }
.survey-capture { border-color: var(--ev-orange-4); }

/* ---------- Maatpijlen op foto's ---------- */
.dims-stage { position: relative; border-radius: 8px; overflow: hidden; background: #111; }
.dims-stage img { display: block; width: 100%; height: auto; user-select: none; -webkit-user-select: none; }
.dims-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.dims-svg { touch-action: none; }
.dims-stage.is-drawing .dims-svg { cursor: crosshair; }
.dims-stage.is-drawing::after { content: "Tekenmodus"; position: absolute; top: 8px; left: 8px; background: #FFD400; color: #171B26; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; pointer-events: none; }
.dims-edit { background: var(--ev-blush-2); border: 1px solid #FFC9B8; border-radius: var(--ev-radius); padding: 12px; }

.dims-inline { position: absolute; transform: translate(-50%, -50%); display: flex; align-items: center; gap: 4px; background: #171B26; border: 2px solid #FFD400; border-radius: 10px; padding: 5px 6px; box-shadow: 0 6px 18px rgba(0,0,0,.35); z-index: 2; }
.dims-inline input { width: 68px; height: 32px; border: 0; border-radius: 6px; background: #fff; color: #171B26; font: inherit; font-weight: 700; font-size: 15px; text-align: right; padding: 0 8px; }
.dims-inline select { height: 32px; border: 0; border-radius: 6px; background: #2A2F3D; color: #FFD400; font: inherit; font-weight: 700; font-size: 13px; padding: 0 4px; }
.dims-inline button { width: 32px; height: 32px; border: 0; border-radius: 6px; font-size: 15px; font-weight: 700; cursor: pointer; }
.dims-inline .ok { background: #FFD400; color: #171B26; }
.dims-inline .del { background: transparent; color: #FF9B8A; }

/* ---------- Dropzone (transfer) ---------- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 36px 20px; border: 2px dashed var(--ev-border-strong); border-radius: 14px; background: var(--ev-surface-2); text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--ev-orange); background: var(--ev-blush-2); }
.dropzone-icon { width: 48px; height: 48px; border-radius: 50%; background: var(--ev-orange); color: #fff; display: grid; place-items: center; margin-bottom: 4px; }
.dropzone-icon svg { width: 22px; height: 22px; }
@media (max-width: 960px) { .grid[style*="1.2fr 1fr"] { grid-template-columns: 1fr !important; } }

/* ---------- Transferpakketten in de bibliotheek ---------- */
.package { padding: 10px 4px; border-bottom: 1px solid var(--ev-border); }
.package:last-child { border-bottom: 0; }
.package-icon { width: 40px; height: 40px; border-radius: 10px; background: var(--ev-blush-2); display: grid; place-items: center; font-size: 20px; flex: none; }

/* ---------- Opname: stappen en categoriekaarten ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.step { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--ev-border); background: var(--ev-surface); font: inherit; text-align: left; cursor: pointer; color: var(--ev-ink); }
.step .step-n { width: 22px; height: 22px; border-radius: 50%; background: var(--ev-surface-2); border: 1px solid var(--ev-border-strong); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--ev-muted); }
.step .step-l { font-weight: 700; font-size: 13.5px; }
.step .step-s { font-size: 12px; color: var(--ev-muted); }
.step.is-done .step-n { background: var(--ev-green); border-color: var(--ev-green); color: #fff; }
.step.is-active { border-color: var(--ev-orange); background: var(--ev-blush-2); }
.step.is-active .step-n { background: var(--ev-orange); border-color: var(--ev-orange); color: #fff; }
.step-title { font-size: 14.5px; color: var(--ev-ink-soft); margin-bottom: 12px; }
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.cat { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 8px; border-radius: 12px; border: 1px solid var(--ev-border-strong); background: var(--ev-surface); font: inherit; cursor: pointer; color: var(--ev-ink); }
.cat:hover, .cat.is-active { border-color: var(--ev-orange); background: var(--ev-blush-2); }
.cat-icon { width: 40px; height: 40px; border-radius: 50%; background: var(--ev-orange); color: #fff; display: grid; place-items: center; }
.cat-icon svg { width: 20px; height: 20px; }
.cat-l { font-weight: 700; font-size: 13.5px; text-align: center; }
.cat-c { position: absolute; top: 8px; right: 8px; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--ev-ink); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
@media (max-width: 640px) { .steps { gap: 4px; } .step { padding: 8px 8px; } .step .step-l { font-size: 12.5px; } .cat-grid { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Gespreksnotitie (notitieblok) ---------- */
.title-input { font: inherit; font-size: 24px; font-weight: 800; letter-spacing: -0.02em; border: 0; background: transparent; padding: 0; width: 100%; min-width: 240px; color: var(--ev-ink); outline: none; }
.title-input:focus { box-shadow: none; border-bottom: 2px solid var(--ev-orange); }
/* Quill (WYSIWYG) in huisstijl */
.editor-card { overflow: hidden; }
.editor-card .ql-toolbar.ql-snow { border: 0; border-bottom: 1px solid var(--ev-border); background: var(--ev-surface-2); padding: 8px 10px; }
.editor-card .ql-container.ql-snow { border: 0; font-family: var(--ev-font); }
.editor-card .ql-editor { padding: 20px 24px; line-height: 1.6; color: var(--ev-ink); }
.editor-card .ql-editor h1 { font-size: 22px; } .editor-card .ql-editor h2 { font-size: 18px; } .editor-card .ql-editor h3 { font-size: 16px; }
.editor-card .ql-editor.ql-blank::before { color: var(--ev-faint); font-style: normal; left: 24px; }
.editor-card .ql-snow .ql-stroke { stroke: var(--ev-ink-soft); } .editor-card .ql-snow .ql-fill { fill: var(--ev-ink-soft); }
.editor-card .ql-snow.ql-toolbar button:hover .ql-stroke, .editor-card .ql-snow.ql-toolbar button.ql-active .ql-stroke { stroke: var(--ev-orange); }
.editor-card .ql-snow.ql-toolbar button.ql-active .ql-fill { fill: var(--ev-orange); }
.prose-note { line-height: 1.6; }
@media (max-width: 960px) { .grid[style*="1.6fr 1fr"] { grid-template-columns: 1fr !important; } }

/* ---------- Kengetallen (klantoverzicht): responsive in plaats van vaste 6 kolommen ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.stat-grid .action-tile { min-width: 0; }
.stat-grid .action-tile .t { white-space: normal; overflow-wrap: anywhere; line-height: 1.25; }
@media (max-width: 1280px) { .stat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-grid .action-tile { padding: 10px 12px; gap: 10px; }
  .stat-grid .action-tile .n { font-size: 22px; min-width: 26px; }
  .stat-grid .action-tile .t { font-size: 13px; }
}

/* ---------- Mobiel: koppen en tabbladen ---------- */
@media (max-width: 640px) {
  h1 { font-size: 23px; }
  .page-header { gap: .75rem; }
  .page-header .actions { width: 100%; }
  .page-header .actions > .btn, .page-header .actions > a.btn { flex: 1; }
  .tabs { margin-left: -14px; margin-right: -14px; padding: 0 14px; scrollbar-width: none; -webkit-mask-image: linear-gradient(90deg, #000 85%, transparent); mask-image: linear-gradient(90deg, #000 85%, transparent); }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 10px 12px; font-size: 14px; white-space: nowrap; }
  .kv { grid-template-columns: 1fr; }
}

/* ---------- Meekijken in het klantportaal ---------- */
.preview-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--ev-ink); color: #fff; padding: 10px 20px; font-size: 13.5px; }
.preview-bar strong { color: var(--ev-orange-3); }
.preview-bar .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.preview-bar .btn:hover { background: rgba(255,255,255,.2); }
.preview-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ev-orange); box-shadow: 0 0 0 4px rgba(254,95,0,.25); flex: none; }
@media (max-width: 640px) { .preview-bar { padding: 8px 14px; font-size: 12.5px; } }

/* ---------- Huisstijl (logo's en kleuren) ---------- */
.logo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.logo-card { border: 1px solid var(--ev-border); border-radius: 12px; overflow: hidden; background: var(--ev-surface); }
.logo-preview { height: 150px; display: grid; place-items: center; padding: 10px; background: #FFFFFF; border-bottom: 1px solid var(--ev-border); }
.logo-preview.is-dark { background: #171B26; }
.logo-preview img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.logo-preview .ext { font-weight: 800; color: var(--ev-muted); letter-spacing: .05em; }
.logo-meta { padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.swatch { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--ev-border-strong); flex: none; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.color-card { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--ev-border); border-radius: 12px; background: var(--ev-surface); }
.color-chip { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--ev-border-strong); flex: none; }
@media (max-width: 640px) { .logo-grid { grid-template-columns: repeat(2, 1fr); } .logo-preview { height: 120px; } }

/* ---------- Portaal: actieregels ---------- */
.action-icon { width: 34px; height: 34px; border-radius: 10px; background: var(--ev-orange-soft); color: var(--ev-orange-dark); display: grid; place-items: center; flex: none; }
.action-icon svg { width: 17px; height: 17px; }

/* ---------- Klantportaal ---------- */
.app.portal { background: var(--ev-bg); }
.app.portal .sidebar { background: var(--ev-surface); color: var(--ev-ink); border-right: 1px solid var(--ev-border); width: 262px; }
.app.portal .brand-portal { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px 20px 22px; text-decoration: none; }
.app.portal .brand-portal img { height: 46px; width: auto; }
.app.portal .brand-portal span { font-family: var(--ev-font-head); font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: var(--ev-muted); }
.app.portal .nav { padding: 4px 14px 16px; }
.app.portal .nav a { position: relative; gap: 12px; padding: 11px 14px; margin-bottom: 4px; border-radius: 12px; color: var(--ev-ink-soft); font-size: 15px; font-weight: 600; }
.app.portal .nav a:hover { background: var(--ev-surface-2); color: var(--ev-ink); }
.app.portal .nav a.active { background: var(--ev-orange-soft); color: var(--ev-orange-dark); }
.app.portal .nav a.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--ev-orange); }
.app.portal .nav a svg { width: 20px; height: 20px; opacity: 1; }
.app.portal .nav a .ico { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--ev-surface-2); color: var(--ev-muted); flex: none; }
.app.portal .nav a:hover .ico { color: var(--ev-ink); }
.app.portal .nav a.active .ico { background: var(--ev-orange); color: #fff; }
.app.portal .sidebar-foot { border-top: 0; padding: 14px 24px 22px; color: var(--ev-faint); }
.app.portal .sidebar-foot strong { display: block; color: var(--ev-ink); font-size: 13px; font-weight: 700; }
.app.portal .topbar { height: 72px; background: transparent; border-bottom: 0; padding: 0 28px; }
.app.portal .content { max-width: 1240px; padding: 4px 28px 110px; }

.pt-help { margin: auto 16px 8px; padding: 16px; border-radius: 16px; background: var(--ev-surface-2); border: 1px solid var(--ev-border); }
.pt-help .top { display: flex; gap: 10px; align-items: flex-start; }
.pt-help .ico { width: 34px; height: 34px; border-radius: 50%; background: var(--ev-surface); border: 1px solid var(--ev-border); display: grid; place-items: center; color: var(--ev-ink-soft); flex: none; }
.pt-help .ico svg { width: 18px; height: 18px; }
.pt-help strong { font-size: 13.5px; display: block; }
.pt-help p { margin: 2px 0 12px; font-size: 12.5px; color: var(--ev-muted); line-height: 1.45; }
.pt-help .btn { width: 100%; justify-content: center; }

.pt-searchbox { position: relative; flex: 1; max-width: 480px; }
.pt-searchbox .fld { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: 999px; box-shadow: var(--ev-shadow); }
.pt-searchbox .fld svg { width: 17px; height: 17px; color: var(--ev-faint); flex: none; }
.pt-searchbox input { flex: 1; border: 0; background: transparent; font: inherit; font-size: 14px; color: var(--ev-ink); outline: none; }
.pt-searchbox input::placeholder { color: var(--ev-faint); }
.pt-results { position: absolute; top: 52px; left: 0; right: 0; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: 16px; box-shadow: var(--ev-shadow-lg); overflow: hidden; z-index: 30; max-height: 70vh; overflow-y: auto; }
.pt-results .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ev-faint); font-weight: 700; padding: 12px 16px 4px; }
.pt-results a { display: flex; align-items: center; gap: 10px; padding: 9px 16px; color: var(--ev-ink); text-decoration: none; font-size: 14px; }
.pt-results a:hover { background: var(--ev-surface-2); }
.pt-results a svg { width: 17px; height: 17px; color: var(--ev-muted); flex: none; }
.pt-results .sub { color: var(--ev-muted); font-size: 12.5px; }
.pt-results .none { padding: 18px 16px; color: var(--ev-muted); font-size: 14px; }

.pt-user { display: flex; align-items: center; gap: 10px; background: transparent; border: 0; font: inherit; cursor: pointer; padding: 4px 6px; border-radius: 999px; color: var(--ev-ink); }
.pt-user:hover { background: var(--ev-surface); }
.pt-user .nm { font-weight: 700; font-size: 14px; }
.pt-user svg { width: 16px; height: 16px; color: var(--ev-muted); }

.pt-hero { padding: 26px 0 22px; }
.pt-hero .eyebrow { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--ev-muted); font-weight: 700; }
.pt-hero h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; margin: 12px 0 10px; letter-spacing: -.02em; }
.pt-hero p { color: var(--ev-muted); max-width: 520px; font-size: 15.5px; line-height: 1.5; margin: 0; }

.pt-quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.pt-quick a { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: 16px; text-decoration: none; color: var(--ev-ink); box-shadow: var(--ev-shadow); transition: transform .12s ease, box-shadow .12s ease; }
.pt-quick a:hover { transform: translateY(-2px); box-shadow: var(--ev-shadow-lg); }
.pt-quick .ico { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--ev-orange-soft); color: var(--ev-orange-dark); flex: none; }
.pt-quick .ico svg { width: 20px; height: 20px; }
.pt-quick strong { display: block; font-size: 15px; }
.pt-quick .sub { font-size: 12.5px; color: var(--ev-muted); line-height: 1.35; }
.pt-quick .go { margin-left: auto; width: 30px; height: 30px; border-radius: 50%; background: var(--ev-surface-2); color: var(--ev-muted); display: grid; place-items: center; flex: none; }
.pt-quick a:hover .go { background: var(--ev-orange); color: #fff; }
.pt-quick .go svg { width: 15px; height: 15px; }

.pt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 20px; align-items: start; }
.pt-card { background: var(--ev-surface); border: 1px solid var(--ev-border); border-radius: 18px; box-shadow: var(--ev-shadow); overflow: hidden; }
.pt-card > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 12px; }
.pt-card > header h2 { font-size: 17px; margin: 0; }
.pt-card > header a { font-size: 13.5px; font-weight: 700; color: var(--ev-orange-dark); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.pt-card > header a svg { width: 14px; height: 14px; }
.pt-card .bd { padding: 0 20px 18px; }
.pt-card .bd.tight { padding-bottom: 8px; }

.pt-status { display: flex; align-items: center; gap: 16px; padding: 22px; border-radius: 18px; background: var(--ev-green-soft); border: 1px solid #CFE9D9; margin-bottom: 20px; }
.pt-status.needs { background: var(--ev-blush-2); border-color: var(--ev-orange-4); }
.pt-status .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--ev-green); color: #fff; display: grid; place-items: center; flex: none; }
.pt-status.needs .ico { background: var(--ev-orange); }
.pt-status .ico svg { width: 24px; height: 24px; }
.pt-status strong { font-family: var(--ev-font-head); font-size: 20px; display: block; }
.pt-status .sub { color: var(--ev-ink-soft); font-size: 14px; }

.pt-rows { list-style: none; margin: 0; padding: 0; }
.pt-rows li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ev-border); }
.pt-rows li:last-child { border-bottom: 0; }
.pt-rows .thumb { width: 44px; height: 44px; border-radius: 12px; background: var(--ev-surface-2); border: 1px solid var(--ev-border); display: grid; place-items: center; overflow: hidden; flex: none; color: var(--ev-faint); }
.pt-rows .thumb img { width: 100%; height: 100%; object-fit: cover; }
.pt-rows .thumb svg { width: 18px; height: 18px; }
.pt-rows .txt { flex: 1; min-width: 0; }
.pt-rows .txt strong { display: block; font-size: 14.5px; }
.pt-rows .txt .sub { font-size: 12.5px; color: var(--ev-muted); }
.pt-rows .when { font-size: 12px; color: var(--ev-faint); white-space: nowrap; }
.pt-rows .go { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--ev-muted); flex: none; }
.pt-rows .go:hover { background: var(--ev-orange-soft); color: var(--ev-orange-dark); }
.pt-rows .bar { width: 96px; height: 6px; border-radius: 999px; background: var(--ev-border); overflow: hidden; flex: none; }
.pt-rows .bar span { display: block; height: 100%; border-radius: 999px; background: var(--ev-orange); }
.pt-rows .bar.done span { background: var(--ev-green); }
.pt-rows .send { width: 30px; height: 30px; border-radius: 50%; background: var(--ev-surface-2); color: var(--ev-muted); display: grid; place-items: center; flex: none; }
.pt-rows .send svg { width: 15px; height: 15px; }

.pt-empty { text-align: center; padding: 26px 10px 22px; }
.pt-empty .ico { width: 48px; height: 48px; border-radius: 50%; background: var(--ev-surface-2); color: var(--ev-faint); display: grid; place-items: center; margin: 0 auto 10px; }
.pt-empty strong { display: block; font-size: 15px; }
.pt-empty p { color: var(--ev-muted); font-size: 13.5px; margin: 4px 0 14px; }

@media (max-width: 1180px) { .pt-quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 960px) {
  .app.portal .topbar { height: 64px; padding: 0 14px; background: var(--ev-surface); border-bottom: 1px solid var(--ev-border); }
  .app.portal .content { padding: 4px 16px 100px; }
  .app.portal .drawer .panel { background: var(--ev-surface); color: var(--ev-ink); }
  .pt-grid { grid-template-columns: minmax(0, 1fr); }
  .pt-hero { padding: 18px 0 16px; }
  .pt-user .nm { display: none; }
}
@media (max-width: 560px) { .pt-quick { grid-template-columns: minmax(0, 1fr); } }

/* Portaal: de bestaande pagina-onderdelen in dezelfde rondere stijl */
.app.portal .page-header { align-items: flex-start; padding: 22px 0 18px; }
.app.portal .page-header h1 { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; }
.app.portal .page-header .sub { font-size: 14.5px; }
.app.portal .card { border-radius: 18px; box-shadow: var(--ev-shadow); }
.app.portal .card-header { padding: 18px 20px 12px; }
.app.portal .card-header h2 { font-size: 17px; }
.app.portal .card-body { padding: 0 20px 18px; }
.app.portal .tabs { border-bottom: 1px solid var(--ev-border); gap: 4px; }
.app.portal .tabs a { border-radius: 10px 10px 0 0; font-weight: 600; }
.app.portal .btn { border-radius: 999px; font-weight: 700; }
.app.portal .input, .app.portal select, .app.portal textarea { border-radius: 12px; }
.app.portal .list li { padding: 12px 0; }
.app.portal .table th { background: var(--ev-surface-2); }
.app.portal .empty { border-radius: 16px; }
.app.portal .logo-card { border-radius: 16px; }
.app.portal .alert { border-radius: 14px; }
@media (max-width: 1240px) { .pt-rows .bar { display: none; } }
.pt-rows .txt strong { overflow-wrap: anywhere; }
.app.portal .drawer .panel { overflow-x: hidden; }

/* Klikbare rijen: elke rij met een gewone link opent dat item. */
.table tbody tr[data-row-href], .table tbody tr:has(a[href]:not(.btn):not([download])) { cursor: pointer; }
.table tbody tr[data-row-href]:hover td, .table tbody tr:has(a[href]:not(.btn):not([download])):hover td { background: var(--ev-surface-2); }
.app.portal .table tbody tr[data-row-href]:hover td, .app.portal .table tbody tr:has(a[href]:not(.btn):not([download])):hover td { background: var(--ev-blush-2); }
.side-link { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 6px; color: var(--ev-ink); }
.side-link:hover { background: var(--ev-bg); text-decoration: none; }

/* Offerteregels: staffelprijzen en regelopties */
input.switch:checked { background: var(--ev-orange); box-shadow: none; }
input.switch:checked::after { transform: translateX(20px); }
.table tr.line-options td { border-bottom: 1px solid var(--ev-border); padding-top: 0; background: var(--ev-surface-2); }
.table tr.line-options .tiers { display: flex; flex-direction: column; gap: 6px; }
.table tr.line-options .tier { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.table tr.line-options .tier .input { width: 110px; }
.tier-list { display: flex; flex-direction: column; gap: 2px; margin-top: 4px; font-size: 12.5px; color: var(--ev-muted); }
.check input.switch { width: 44px; height: 24px; accent-color: auto; }
.btn-link-sm { background: none; border: 0; padding: 2px 0; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--ev-orange-dark); cursor: pointer; }
.btn-link-sm:hover { text-decoration: underline; }
.btn-link-sm:disabled { color: var(--ev-faint); cursor: not-allowed; }

/* Staffelprijzen bij een offerteregel */
table.staffel { width: 100%; margin: 8px 0 2px; border-collapse: collapse; font-size: 13px; color: var(--ev-ink-soft); }
table.staffel th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ev-muted); font-weight: 700; padding: 6px 4px; background: transparent; border-bottom: 1px solid var(--ev-border); white-space: nowrap; }
table.staffel td { padding: 6px 4px; border-bottom: 1px solid var(--ev-border); white-space: nowrap; }
table.staffel tr:last-child td { border-bottom: 0; }
table.staffel .num { text-align: right; font-variant-numeric: tabular-nums; }
.tier-list { display: none; }

/* Balk met bulkacties boven een lijst */
.bulkbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 18px; background: var(--ev-blush-2); border-top: 1px solid var(--ev-orange-4); border-bottom: 1px solid var(--ev-orange-4); font-size: 14px; font-weight: 600; color: var(--ev-ink); }
.bulkbar span { flex: 1; }

/* Profielfoto's: dezelfde ronde vorm als de initialen */
.avatar.has-photo { padding: 0; overflow: hidden; background: var(--ev-surface-2); }
.avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-upload { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-upload .hint { font-size: 12.5px; color: var(--ev-muted); }
.avatar-button { background: none; border: 0; padding: 0; cursor: pointer; display: block; border-radius: 50%; }
.avatar-button:hover .avatar { box-shadow: 0 0 0 3px var(--ev-orange-soft); }

/* Voorstel van de AI bij een tekstveld */
.ai-suggestion { margin-top: 10px; padding: 12px 14px; border: 1px solid var(--ev-orange-4); border-radius: 12px; background: var(--ev-blush-2); }
.ai-suggestion .kop { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ev-orange-dark); margin-bottom: 6px; }
.ai-suggestion .tekst { font-size: 14px; line-height: 1.55; color: var(--ev-ink); }

/* Downloadpagina: bestanden worden klaargezet */
.prep-ring { width: 84px; height: 84px; margin: 0 auto; display: grid; place-items: center; border-radius: 50%; background: var(--ev-blush-2); color: var(--ev-orange); }
.prep-ring svg { width: 48px; height: 48px; }
.prep-ring .baan { fill: none; stroke: var(--ev-orange-4); stroke-width: 4; }
.prep-ring .loop { fill: none; stroke: var(--ev-orange); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 36 90; transform-origin: 50% 50%; animation: prep-draai 1.1s linear infinite; }
.prep-ring.is-done { background: var(--ev-green-soft); color: var(--ev-green); }
.prep-ring.is-done svg { width: 40px; height: 40px; stroke-width: 2.4; }
@keyframes prep-draai { to { transform: rotate(360deg); } }
.prep-balk { height: 6px; border-radius: 999px; background: var(--ev-border); overflow: hidden; max-width: 420px; margin-left: auto; margin-right: auto; }
.prep-balk span { display: block; height: 100%; width: 40%; border-radius: 999px; background: var(--ev-orange); animation: prep-schuif 1.6s ease-in-out infinite; }
@keyframes prep-schuif { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
@media (prefers-reduced-motion: reduce) { .prep-ring .loop, .prep-balk span { animation: none; } }
