/* Leasemax CRM — accentkleur hier aanpassen */
:root {
  --accent: #f59e0b;
  --accent-strong: #d97706;
  --accent-soft: rgba(245, 158, 11, .16);
  --bg: #f6f5f2;
  --card: #fff;
  --border: #e6e3dd;
  --text: #1c1917;
  --muted: #6b6760;
  --side: #1b1a18;
  --side-text: #d6d3cc;
  --red: #dc2626; --green: #15803d; --blue: #1d4ed8; --purple: #7e22ce;
  --radius: 10px;
  --side-w: 240px;
}
* { box-sizing: border-box; }
html { font-size: 15px; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif; line-height: 1.45; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 1.7rem; margin: 0; letter-spacing: -.01em; }
h2 { font-size: 1.1rem; margin: 0 0 .9rem; }
h3 { font-size: .95rem; margin: 0 0 .6rem; }
.muted { color: var(--muted); }
.ico { flex: none; vertical-align: -3px; }
.late { color: var(--red); font-weight: 600; }

/* Zijbalk */
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--side-w); background: var(--side); color: var(--side-text); padding: 14px 10px; overflow-y: auto; z-index: 40; transition: transform .2s; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark { width: 32px; height: 32px; border-radius: 8px; background: var(--accent); color: #1c1917; font-weight: 800; display: grid; place-items: center; }
.brand-name { font-weight: 700; font-size: 1.05rem; }
.nav-group { font-size: .68rem; letter-spacing: .09em; text-transform: uppercase; color: #8a867e; padding: 16px 12px 6px; }
.nav-item { display: flex; align-items: center; gap: 11px; padding: 8px 12px; margin-bottom: 2px; border-radius: 8px; color: var(--side-text); font-size: .93rem; }
.nav-item:hover { background: rgba(255,255,255,.06); text-decoration: none; color: #fff; }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-backdrop { display: none; }

/* Hoofdgebied */
.main { margin-left: var(--side-w); min-height: 100vh; }
.topbar { display: flex; align-items: center; gap: 16px; height: 60px; padding: 0 24px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.menu-btn { display: none; }
.icon-btn { background: none; border: 0; cursor: pointer; padding: 6px; color: var(--text); border-radius: 8px; }
.search { position: relative; flex: 1; max-width: 560px; display: flex; align-items: center; gap: 8px; background: #efede8; border-radius: 10px; padding: 0 12px; height: 38px; color: var(--muted); }
.search input { flex: 1; border: 0; background: none; outline: none; font: inherit; color: var(--text); min-width: 0; }
.search kbd { font: .72rem monospace; border: 1px solid var(--border); background: #fff; border-radius: 5px; padding: 1px 6px; color: var(--muted); }
.search-spacer { flex: 1; }
.search-pop { position: absolute; top: 44px; left: 0; right: 0; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 6px; max-height: 70vh; overflow: auto; color: var(--text); }
.search-pop a { display: flex; justify-content: space-between; gap: 12px; padding: 7px 10px; border-radius: 7px; color: var(--text); }
.search-pop a:hover, .search-pop a.sel { background: var(--accent-soft); text-decoration: none; }
.search-pop .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 8px 10px 2px; }
.usermenu { position: relative; margin-left: auto; }
.user-btn { display: flex; align-items: center; gap: 9px; background: none; border: 0; cursor: pointer; font: inherit; color: var(--text); font-weight: 600; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #1c1917; font-size: .75rem; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.avatar.sm { width: 22px; height: 22px; font-size: .62rem; }
.user-pop { position: absolute; right: 0; top: 44px; width: 240px; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgba(0,0,0,.12); padding: 6px; }
.user-pop-head { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; align-items: flex-start; }
.user-pop a, .user-pop .linklike { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 7px; color: var(--text); background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.user-pop a:hover, .user-pop .linklike:hover { background: #f3f1ec; text-decoration: none; }
.content { padding: 24px; max-width: 1500px; }

/* Paginakop */
.crumb { font-size: .85rem; color: var(--muted); margin-bottom: 2px; }
.crumb a { color: var(--muted); }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.title-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sub-row { display: flex; align-items: center; gap: 8px; margin-top: 6px; flex-wrap: wrap; color: var(--muted); }
.count { background: #e9e6df; color: var(--muted); border-radius: 8px; padding: 1px 9px; font-size: .85rem; font-weight: 600; }

/* Knoppen */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--text); font: inherit; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #faf9f7; text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #1c1917; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-sm { padding: 4px 10px; font-size: .82rem; }
.btn-danger { background: none; border-color: transparent; color: var(--red); }
.btn-danger:hover { background: #fef2f2; }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font: inherit; cursor: pointer; }
.btn-link.danger { color: var(--red); }
form.inline { display: inline; }

/* Kaarten */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; margin-bottom: 16px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.card-head h2 { margin: 0; }
.card.empty { text-align: center; padding: 40px 20px; }
.grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 16px; align-items: start; }
.grid-2e { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { min-width: 0; }
.kv { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; word-break: break-word; }

/* Tegels */
.tiles { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.tile { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 16px; min-width: 130px; flex: 1 1 130px; }
.tile .lbl { font-size: .78rem; color: var(--muted); }
.tile .num { font-size: 1.45rem; font-weight: 700; margin-top: 2px; }
.tile .sub { font-size: .78rem; color: var(--muted); }
.tile.bad .num { color: var(--red); }
a.tile { color: inherit; } a.tile:hover { text-decoration: none; border-color: var(--accent); }

/* Tabellen */
table.t { width: 100%; border-collapse: collapse; }
table.t th { text-align: left; font-size: .78rem; font-weight: 600; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t th a { color: var(--muted); }
table.t td { padding: 11px 14px; border-bottom: 1px solid #efede8; vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: #fcfbf9; }
table.t .num, table.t th.num { text-align: right; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.row-title { font-weight: 600; color: var(--text); }

/* Badges */
.badge { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .76rem; font-weight: 600; background: #eceae4; color: #57534e; white-space: nowrap; }
.badge-green { background: #dcfce7; color: var(--green); }
.badge-red { background: #fee2e2; color: var(--red); }
.badge-blue { background: #dbeafe; color: var(--blue); }
.badge-amber { background: #fef3c7; color: #b45309; }
.badge-purple { background: #f3e8ff; color: var(--purple); }

/* Formulieren */
.form-card { max-width: 980px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 4px; }
.req { color: var(--red); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local], input[type=url], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: 8px; background: #fff; font: inherit; color: var(--text); }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.has-error input, .has-error select, .has-error textarea { border-color: var(--red); }
.field-error { color: var(--red); font-size: .8rem; margin-top: 3px; }
.help { color: var(--muted); font-size: .78rem; margin-top: 3px; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.actionbar { position: sticky; bottom: 0; background: rgba(246,245,242,.95); backdrop-filter: blur(4px); border-top: 1px solid var(--border); padding: 12px 0; margin-top: 8px; display: flex; gap: 10px; align-items: center; z-index: 5; }
.form-section-title { font-weight: 700; margin: 0 0 12px; }

/* Filters */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filters input, .filters select { width: auto; min-width: 140px; }
.filters input[type=search] { min-width: 240px; }
.seg { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.seg a { padding: 7px 12px; color: var(--text); font-weight: 600; font-size: .88rem; }
.seg a.on { background: var(--accent); color: #1c1917; }
.seg a:hover { text-decoration: none; background: #faf9f7; } .seg a.on:hover { background: var(--accent); }
.pager { display: flex; gap: 4px; padding: 12px 14px; border-top: 1px solid var(--border); flex-wrap: wrap; align-items: center; }
.pager a, .pager span { padding: 4px 10px; border-radius: 6px; color: var(--text); }
.pager a:hover { background: #f1efe9; text-decoration: none; }
.pager a.active { background: var(--accent); font-weight: 700; }
.list-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; border-top: 1px solid var(--border); color: var(--muted); font-size: .85rem; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--text); }
.tabs a.on { color: var(--text); border-bottom-color: var(--accent); }
.tabs .n { background: #eceae4; border-radius: 6px; font-size: .72rem; padding: 0 6px; margin-left: 4px; }

/* Flash */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; border: 1px solid; }
.flash-ok { background: #f0fdf4; border-color: #bbf7d0; color: var(--green); }
.flash-err { background: #fef2f2; border-color: #fecaca; color: var(--red); }
.flash-warn { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.alert { background: #fff4e0; border-radius: var(--radius); padding: 14px 18px; color: #b45309; margin-bottom: 16px; }

/* Tijdlijn */
.tl-form textarea { margin-bottom: 8px; }
.tl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.tl-extra { display: none; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.tl-extra.on { display: grid; }
.tl-extra .full { grid-column: 1 / -1; }
.timeline { list-style: none; margin: 16px 0 0; padding: 0 0 0 16px; border-left: 2px solid #eceae4; }
.timeline li { position: relative; padding: 0 0 16px 14px; }
.timeline li::before { content: ""; position: absolute; left: -22px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.timeline li.t-system::before { background: #b8b4ab; }
.timeline li.t-call::before { background: #3b82f6; }
.timeline li.t-meeting::before { background: #8b5cf6; }
.timeline li.t-email::before { background: #14b8a6; }
.tl-meta { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: .8rem; color: var(--muted); margin-bottom: 2px; }
.tl-body { white-space: pre-wrap; word-break: break-word; }
.tl-del { margin-left: auto; background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 1rem; }
.tl-del:hover { color: var(--red); }
.chip { background: #f1efe9; border-radius: 6px; padding: 0 6px; font-size: .74rem; color: var(--muted); }

/* Kanban */
.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; -webkit-overflow-scrolling: touch; }
.kcol { flex: 0 0 280px; background: #ece9e3; border-radius: var(--radius); padding: 10px; min-height: 160px; }
.kcol.over { outline: 2px dashed var(--accent); }
.kcol-head { padding: 2px 4px 10px; }
.kcol-head strong { display: flex; align-items: center; gap: 7px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.kcol-total { display: block; font-size: .8rem; color: var(--muted); margin: 2px 0 0 16px; }
.kcard { background: #fff; border: 1px solid var(--border); border-radius: 9px; padding: 10px 12px; margin-bottom: 8px; cursor: grab; display: block; color: var(--text); }
.kcard:hover { text-decoration: none; border-color: var(--accent); }
.kcard.dragging { opacity: .4; }
.kcard .t { font-weight: 600; margin-bottom: 3px; }
.kcard .m { font-size: .82rem; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.kcard .na { font-size: .8rem; margin-top: 6px; }

/* Dashboard-balkjes */
.bar-row { display: grid; grid-template-columns: 110px 1fr 100px; gap: 10px; align-items: center; margin-bottom: 8px; font-size: .9rem; }
.bar { background: #eceae4; border-radius: 6px; height: 10px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--accent); }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid #efede8; }
.list-plain li:last-child { border-bottom: 0; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; }
.login-card .brand { color: var(--text); justify-content: center; padding-bottom: 20px; }
.snippet { background: #1c1b19; color: #f5e9d0; border-radius: 8px; padding: 12px 14px; font: .82rem/1.5 ui-monospace, Menlo, monospace; white-space: pre-wrap; word-break: break-all; position: relative; }
code { background: #f1efe9; padding: 1px 5px; border-radius: 4px; font-size: .88em; }
.token-box { background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; }
.token-box code { background: #fff; display: block; padding: 8px; margin: 6px 0; word-break: break-all; }

/* Mobiel */
@media (max-width: 960px) {
  .sidebar { transform: translateX(-100%); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sidebar-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 35; }
  .main { margin-left: 0; }
  .menu-btn { display: block; }
  .grid-2, .grid-2e { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .topbar { padding: 0 14px; }
  .user-name, .search kbd { display: none; }
}
@media (max-width: 600px) {
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 0 0; } .kv dt { margin-top: 8px; font-size: .8rem; }
  h1 { font-size: 1.4rem; }
  .kcol { flex-basis: 260px; }
}
@media print { .sidebar, .topbar, .actions, .actionbar { display: none !important; } .main { margin: 0; } }
.filters input[type=checkbox] { min-width: 0; width: auto; }
.kcard .muted { font-size: .85rem; }
.search input[type=search] { border: 0; background: none; padding: 0; outline: none; box-shadow: none; width: auto; }

/* Tags, weergaven, snelknoppen, contactacties */
.tags { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 1px 9px; border-radius: 999px; font-size: .76rem; font-weight: 600; color: #1c1917; background: color-mix(in srgb, var(--tag, #f59e0b) 22%, #fff); border: 1px solid color-mix(in srgb, var(--tag, #f59e0b) 55%, #fff); }
a.tag:hover { text-decoration: none; filter: brightness(.95); }
.tag-x { background: none; border: 0; cursor: pointer; color: var(--muted); font-size: .95rem; line-height: 1; padding: 0 2px; }
.tag-x:hover { color: var(--red); }
.saved-views { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; margin-bottom: 10px; font-size: .88rem; }
.chip.on { background: var(--accent-soft); color: #92400e; }
.chip a { color: inherit; }
.save-view summary { cursor: pointer; }
.quick-btns { display: flex; flex-wrap: wrap; gap: 6px; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.btn-wa { background: #25d366; border-color: #25d366; color: #fff; }
.btn-wa:hover { background: #1fb457; color: #fff; }

.nw-table td, .nw-table th { white-space: nowrap; }

/* Partnerportal */
body.portal { background: var(--bg, #f6f5f3); }
.portal-top { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; padding: 0 24px; min-height: 60px; background: var(--card); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.portal-top .brand { color: var(--text); padding: 0; }
.portal-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.portal-nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.portal-nav a:hover { text-decoration: none; color: var(--text); background: rgba(0,0,0,.04); }
.portal-nav a.on { color: var(--text); background: rgba(0,0,0,.06); }
.portal-user { display: flex; align-items: center; gap: 14px; }
.portal-balance { font-weight: 700; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; padding: 4px 10px; border-radius: 999px; }
.portal-balance:hover { text-decoration: none; }
.portal-content { padding: 24px; max-width: 1180px; margin: 0 auto; }
.offer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.offer { display: flex; flex-direction: column; margin: 0; }
.offer-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; margin-bottom: 8px; font-size: 1.05rem; }
.offer-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border); flex-wrap: wrap; }
@media (max-width: 760px) { .portal-top { padding: 10px 14px; } .portal-content { padding: 16px; } }
.offer .kv { margin-bottom: 14px; }
.offer-have { display: flex; flex-wrap: wrap; gap: 6px 12px; margin: 0 0 12px; font-size: .86rem; }
.have.yes { color: #047857; font-weight: 600; } .have.no { color: var(--muted); text-decoration: line-through; opacity: .7; }
details.acc { border: 1px solid var(--border); border-radius: 10px; margin: 0 0 8px; background: #fff; }
details.acc > summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; cursor: pointer; font-weight: 600; list-style: none; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::before { content: "▸"; margin-right: 8px; color: var(--muted); display: inline-block; transition: transform .15s; }
details.acc[open] > summary::before { transform: rotate(90deg); }
details.acc > summary .acc-title { flex: 1 1 auto; }
details.acc > summary .acc-meta { display: flex; gap: 10px; align-items: center; font-weight: 400; }
details.acc .acc-body { padding: 0 14px 12px; border-top: 1px solid var(--border); padding-top: 10px; }
.catpick-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.catpick-col { display: grid; gap: 6px; align-content: start; min-width: 0; }
@media (max-width: 760px) { .catpick-row { grid-template-columns: 1fr; } }
.catfilter { display: grid; gap: 8px; padding: 12px 14px; margin-bottom: 14px; }
.catfilter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.chip { display: inline-flex; gap: 8px; align-items: center; padding: 5px 12px; border: 1px solid var(--border); border-radius: 99px; background: #fff; color: var(--text); font-weight: 500; font-size: .9rem; }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip span { color: var(--muted); font-weight: 600; font-size: .8rem; }
.chip.on { background: var(--accent-soft); border-color: var(--accent); }
.masked { letter-spacing: 2px; color: var(--muted); user-select: none; filter: blur(2.5px); font-size: 1.05rem; }
.reveal { margin: -2px 0 10px; }
.combo { position: relative; }
.combo-list { position: absolute; z-index: 20; left: 0; right: 0; top: 100%; margin: 2px 0 0; padding: 4px; list-style: none; background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 260px; overflow: auto; }
.combo-list li { padding: 7px 10px; border-radius: 6px; cursor: pointer; }
.combo-list li:hover, .combo-list li.on { background: var(--accent-soft); }
.combo-list li.add { color: var(--accent-ink, #92400e); font-weight: 600; }
.combo-list li.empty { color: var(--muted); cursor: default; }
.pbox { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; background: #fff; }
.pbox-head { display: flex; gap: 6px; align-items: center; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.pbox-title { font-weight: 700; font-size: 1.05rem; margin: 2px 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pbox .kv { margin: 0; }
@media print { .portal-top, .noprint, .actionbar { display: none !important; } body.portal { background: #fff; } .portal-content { padding: 0; max-width: none; } .card { box-shadow: none; break-inside: avoid; } }
/* Chat */
.chat { padding: 0; overflow: hidden; border-color: var(--accent); }
.chat-head { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 14px 18px; background: var(--accent-soft); border-bottom: 1px solid var(--border); }
.chat-head h2 { margin: 0; font-size: 1.15rem; } .chat-sub { margin-top: 2px; }
.chat-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.chat-log { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; max-height: 440px; min-height: 140px; overflow-y: auto; background: var(--bg); }
.bubble { max-width: min(78%, 560px); padding: 9px 13px; border-radius: 14px; border: 1px solid var(--border); background: #fff; overflow-wrap: anywhere; }
.bubble.me { align-self: flex-end; background: var(--accent-soft); border-color: #fde2a4; border-bottom-right-radius: 4px; }
.bubble.them { align-self: flex-start; border-bottom-left-radius: 4px; }
.bubble-meta { font-size: .74rem; color: var(--muted); margin-top: 3px; }
.chat-empty { align-self: center; margin: auto; text-align: center; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; padding: 12px 18px; border-top: 1px solid var(--border); background: #fff; }
.chat-form textarea { flex: 1; resize: vertical; min-height: 44px; }
@media (max-width: 760px) { .bubble { max-width: 88%; } .chat-form { flex-direction: column; align-items: stretch; } }
/* Klantportaal: duidelijke acties */
.action-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 12px; margin-bottom: 20px; }
.action-card { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--border); border-radius: 12px; background: #fff; color: var(--text); }
.action-card:hover { text-decoration: none; border-color: var(--accent); box-shadow: 0 2px 10px rgba(0,0,0,.06); }
.action-card .ac-title { font-weight: 700; font-size: 1.05rem; } .action-card .ac-text { color: var(--muted); font-size: .9rem; }
.action-card.primary { background: var(--accent); border-color: var(--accent); } .action-card.primary .ac-text { color: rgba(0,0,0,.72); }
.klant-section { margin: 26px 0 8px; } .section-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; } .section-head h2 { margin: 0; }
.empty-card { text-align: center; padding: 22px; } .empty-card p { margin: 0 0 10px; color: var(--muted); }

.offer.soldout { opacity: .55; filter: grayscale(.6); background: var(--bg, #f5f4f0); }
.offer.soldout .reveal { display: none; }

.type-pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 8px; }
.type-opt { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; background: #fff; }
.type-opt span { display: flex; flex-direction: column; }
.type-opt:has(input:checked) { border-color: #f59e0b; background: #fffbeb; }

details.co-card { padding: 0; }
details.co-card > summary { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; padding: 16px 18px; cursor: pointer; list-style: none; }
details.co-card > summary::-webkit-details-marker { display: none; }
details.co-card > summary::before { content: "▸"; margin-right: 8px; color: var(--muted); transition: transform .15s; }
details.co-card[open] > summary::before { transform: rotate(90deg); }
details.co-card > summary .co-name { font-weight: 700; font-size: 1.05rem; flex: 1 1 auto; }
details.co-card[open] > summary { border-bottom: 1px solid var(--border); }
.co-body { padding: 16px 18px; }
.co-body .chat { margin: 14px 0 0; box-shadow: none; }

.cat-tree { list-style: none; margin: 4px 0 0; padding-left: 18px; }
.cat-tree li { margin: 3px 0; }
.cat-tree label { cursor: pointer; }
[data-cat-tree] > .cat-tree { padding-left: 0; max-height: 320px; overflow: auto; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px; background: #fff; }

details.tl-mail > summary { cursor: pointer; color: var(--muted); font-size: .92rem; list-style: none; }
details.tl-mail > summary::-webkit-details-marker { display: none; }
details.tl-mail[open] > summary { margin-bottom: 6px; }
