/* Holio CRM — basisstijl */
:root {
  /* Holio-huisstijl (zie holiosystems.com styles.css) */
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #1e293b;
  --text-2: #475569;
  --text-3: #64748b;
  --side: #0f172a;           /* navy */
  --side-text: #94a3b8;
  --side-active: #1e293b;    /* navy-mid */
  --accent: #d97706;         /* Holio amber */
  --accent-hover: #b45309;
  --accent-light: #f59e0b;
  --accent-soft: #fffbeb;
  --accent-gradient: linear-gradient(135deg, #fbbf24 0%, #f59e0b 50%, #d97706 100%);
  --accent-gradient-hover: linear-gradient(135deg, #f59e0b 0%, #d97706 50%, #b45309 100%);
  --ok: #15803d;   --ok-soft: #dcfce7;
  --warn: #c2410c; --warn-soft: #fff7ed;
  --danger: #b91c1c; --danger-soft: #fef2f2;
  --info: #1d4ed8; --info-soft: #eff6ff;
  --purple: #6d28d9; --purple-soft: #f5f3ff;
  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow-lg: 0 20px 48px rgba(0,0,0,.14);
  --focus: 0 0 0 3px rgba(217,119,6,.15);
  --transition: .2s ease;
  --font: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -.02em; color: var(--text); }
h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
.muted { color: var(--text-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.sidebar { background: var(--side); color: var(--side-text); padding: 18px 12px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 12px 22px; color: #fff; font-weight: 700; font-size: 17px; }
.brand-icon { width: 28px; height: 28px; border-radius: 7px; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
.brand-mark { width: 10px; height: 10px; border-radius: 50%; background: var(--accent-light); box-shadow: 0 0 0 4px rgba(245,158,11,.18); }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.03em; line-height: 1; }
.brand small { display: inline-block; margin-left: 6px; font-weight: 600; font-size: 11px; color: var(--accent-light); letter-spacing: .08em; text-transform: uppercase; vertical-align: middle; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 999px; color: var(--side-text); font-weight: 500; transition: var(--transition); }
.nav a:hover { background: var(--side-active); color: #fff; text-decoration: none; }
.nav a.active { background: rgba(245,158,11,.14); color: #fff; }
.nav a.active svg { color: var(--accent-light); opacity: 1; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav .count { margin-left: auto; background: var(--accent); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 10px; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: #64748b; padding: 18px 12px 6px; font-weight: 600; }
.sidebar-foot { margin-top: auto; padding: 12px; font-size: 12px; color: #64748b; border-top: 1px solid rgba(255,255,255,.08); }

.main { min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px 28px; background: rgba(255,255,255,.85); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 5; }
.topbar .search { flex: 1; max-width: 460px; position: relative; }
.topbar .search input { width: 100%; padding-left: 36px; border-radius: 999px; background: var(--bg); }
.topbar .search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; color: var(--text-3); }
.topbar .user { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--text-2); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 650; font-size: 12px; flex: none; }
.avatar.xs { width: 22px; height: 22px; font-size: 10px; }
.user-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; white-space: nowrap; }
.user-menu { margin-left: auto; position: relative; }
.user-menu .user { margin-left: 0; border: 0; background: transparent; font: inherit; cursor: pointer; padding: 4px 6px; border-radius: 8px; }
.user-menu .user:hover { background: var(--surface-2); }
.user-menu .user svg { width: 14px; height: 14px; color: var(--text-3); }
.dropdown { position: absolute; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); min-width: 240px; padding: 6px; z-index: 20; }
.dd-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.dropdown button { display: flex; align-items: center; gap: 8px; width: 100%; border: 0; background: transparent; font: inherit; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--text); text-align: left; }
.dropdown button:hover { background: var(--surface-2); }
.dropdown button svg { width: 16px; height: 16px; color: var(--text-3); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 400px; }
.role-pick { display: grid; gap: 8px; }
.role-pick label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border-strong); border-radius: 8px; padding: 10px 12px; cursor: pointer; font-weight: 500; color: var(--text); margin: 0; }
.role-pick label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.role-pick input { width: auto; margin-top: 3px; accent-color: var(--accent); }
.avatar.lg { width: 44px; height: 44px; font-size: 15px; }
.content { padding: 24px 28px 48px; max-width: 1400px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head p { margin: 4px 0 0; color: var(--text-2); }
.breadcrumb { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.card-body { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-main { grid-template-columns: 300px minmax(0,1fr) 300px; align-items: start; }
.grid-contact { grid-template-columns: 340px minmax(0,1fr); align-items: start; }
.grid > *, .stack > * { min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.spacer { flex: 1; }

.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surface); color: var(--text); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; transition: var(--transition); }
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn:disabled { opacity: .55; cursor: default; transform: none !important; box-shadow: none !important; }
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent-gradient); border-color: transparent; color: #fff; }
.btn-primary:hover { background: var(--accent-gradient-hover); color: #fff; border-color: transparent; transform: translateY(-1px); box-shadow: 0 6px 20px rgba(251,191,36,.4); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--accent-soft); border-color: transparent; }
.btn-sm { padding: 5px 10px; font-size: 13px; }
.btn-danger { color: var(--danger); }
.icon-btn { border: 0; background: transparent; padding: 4px; border-radius: 6px; cursor: pointer; color: var(--text-3); display: inline-grid; place-items: center; }
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }

input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1.5px solid var(--border); border-radius: var(--radius-sm); padding: 8px 11px; width: 100%; transition: var(--transition); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--focus); }
textarea { resize: vertical; min-height: 80px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 5px; }
.field { margin-bottom: 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-hint { font-size: 12px; color: var(--text-3); margin-top: 4px; }

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--surface-2); color: var(--text-2); border: 1px solid var(--border); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.plain::before { display: none; }
.st-nieuw { background: #f1efec; color: #6b645b; border-color: #e4e0da; }
.st-mql { background: var(--info-soft); color: var(--info); border-color: #cbdcf2; }
.st-sql { background: var(--purple-soft); color: var(--purple); border-color: #d9cdf0; }
.st-sales { background: var(--ok-soft); color: var(--ok); border-color: #c3e4d1; }
.st-verloren { background: var(--danger-soft); color: var(--danger); border-color: #f0c9c4; }
.heat { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 550; color: var(--text-2); white-space: nowrap; }
.heat svg { width: 14px; height: 14px; }
.heat-airco svg { color: var(--info); }
.heat-verwarming svg { color: var(--accent); }
.heat-airco_verwarming svg { color: var(--purple); }
.heat-onbekend { color: var(--text-3); }

/* Segmented control */
.segmented { display: inline-flex; background: #f1f5f9; border: 1px solid var(--border); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented button { border: 0; background: transparent; padding: 6px 12px; border-radius: 999px; font: inherit; font-size: 13px; font-weight: 550; color: var(--text-2); cursor: pointer; }
.segmented button.on { background: var(--surface); color: var(--accent-hover); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.segmented.full { display: flex; flex-wrap: nowrap; }
.segmented.full button { flex: 1; padding: 6px 4px; font-size: 12.5px; white-space: nowrap; }

/* Table */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: .04em; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface-2); white-space: nowrap; cursor: default; }
.table th.sortable { cursor: pointer; }
.table th.sortable:hover { color: var(--text); }
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:hover { background: var(--surface-2); cursor: pointer; }
.table tr:last-child td { border-bottom: 0; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 12px; color: var(--text-3); }
.table input[type=checkbox] { width: auto; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border); }
.filters select, .filters input { width: auto; min-width: 150px; padding: 7px 10px; }
.pager { display: flex; align-items: center; gap: 10px; justify-content: flex-end; padding: 10px 14px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-2); }

/* Stats */
.stat { padding: 16px 18px; }
.stat .label { font-size: 12px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat .value { font-size: 30px; font-weight: 800; margin-top: 4px; letter-spacing: -.03em; }
.stat .sub { font-size: 12px; color: var(--text-2); margin-top: 2px; }

/* Pipeline (funnel bars) */
.pipeline { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; }
.pipeline-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.pipe { border-radius: var(--radius); padding: 14px; border: 1px solid var(--border); background: var(--surface-2); transition: var(--transition); }
.pipe:hover { border-color: var(--accent); background: var(--accent-soft); }
.pipe .n { font-size: 22px; font-weight: 700; }
.pipe .bar { height: 4px; border-radius: 2px; background: currentColor; margin-top: 10px; opacity: .7; }

/* Properties list */
.props { display: grid; grid-template-columns: 120px 1fr; gap: 9px 12px; font-size: 13px; }
.props dt { color: var(--text-3); }
.props dd { margin: 0; word-break: break-word; }

/* Timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.tl-item { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.tl-item:last-child { border-bottom: 0; }
.tl-icon { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); }
.tl-icon svg { width: 16px; height: 16px; }
.tl-icon.telefoon { color: var(--ok); background: var(--ok-soft); border-color: #c3e4d1; }
.tl-icon.email { color: var(--info); background: var(--info-soft); border-color: #cbdcf2; }
.tl-icon.meeting { color: var(--purple); background: var(--purple-soft); border-color: #d9cdf0; }
.tl-icon.linkedin { color: #0a66c2; background: #e5f0fb; border-color: #c8ddf3; }
.tl-icon.status { color: var(--accent); background: var(--accent-soft); border-color: #fde68a; }
.tl-head { display: flex; gap: 8px; align-items: center; }
.tl-head strong { flex: 1; min-width: 0; }
.tl-head strong { font-weight: 600; }
.tl-body { margin-top: 4px; color: var(--text-2); white-space: pre-wrap; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); padding: 0 14px; overflow-x: auto; }
.tabs button { border: 0; background: transparent; padding: 12px 12px; font: inherit; font-weight: 550; color: var(--text-3); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--accent-hover); border-bottom-color: var(--accent); }

/* Tasks */
.task { display: flex; gap: 10px; align-items: flex-start; padding: 11px 0; border-bottom: 1px solid var(--border); }
.task:last-child { border-bottom: 0; }
.task input[type=checkbox] { width: 17px; height: 17px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.task.done .task-title { text-decoration: line-through; color: var(--text-3); }
.task-title { font-weight: 550; }
.due { font-size: 12px; font-weight: 600; }
.due.overdue { color: var(--danger); }
.due.today { color: var(--warn); }
.due.later { color: var(--text-3); }

/* Afspraken */
.meeting { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--border); }
.meeting:last-child { border-bottom: 0; }
.meeting.done { opacity: .6; }
.m-date { width: 42px; flex: none; text-align: center; border: 1px solid var(--border); border-radius: 8px; padding: 3px 0; background: var(--surface-2); }
.m-date .d { font-weight: 700; font-size: 16px; line-height: 1.1; }
.m-date .mo { font-size: 10px; text-transform: uppercase; color: var(--accent); font-weight: 700; letter-spacing: .04em; }
.m-title { font-weight: 600; }
.m-meta { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.m-meta svg { width: 13px; height: 13px; }
.m-actions { display: flex; align-items: center; gap: 4px; flex: none; }
.day-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 18px 0 2px; }
.day-head.today { color: var(--accent); }
.gw-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--border); }
.gw-row:last-of-type { border-bottom: 0; }
.gw-icon { width: 34px; height: 34px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border); flex: none; }
.gw-icon svg { width: 18px; height: 18px; }

/* Contact mini card */
.person { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--border); }
.person:last-child { border-bottom: 0; }
.person .meta { min-width: 0; flex: 1; }
.person .name { font-weight: 600; }
.li-link { display: inline-flex; align-items: center; gap: 4px; color: #0a66c2; font-size: 12px; font-weight: 600; }
.li-link svg { width: 14px; height: 14px; }

/* Deal / sales box */
.price-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; font-size: 13px; }
.price-table th { text-align: left; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 0 6px 6px 0; }
.price-table td { padding: 4px 6px 4px 0; }
.price-table td:first-child { font-weight: 550; white-space: nowrap; padding-right: 10px; }
.price-table input { padding: 6px 8px; }
.deal { border: 1px solid #c3e4d1; background: linear-gradient(180deg, var(--ok-soft), #fff 60%); }
.deal-total { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.price-wrap { overflow-x: auto; margin: 0 -4px 14px; padding: 0 4px; }
.price-wrap .price-table { margin-bottom: 0; min-width: 440px; }
.price-table th { font-size: 11px; line-height: 1.25; vertical-align: bottom; }
.price-table td.pct input { width: 52px; }
.price-table input[type=number] { min-width: 52px; padding: 6px 6px; }
.price-table td:first-child { white-space: normal; }
.row-tot { font-size: 11.5px; font-weight: 500; color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.row-tot .k { color: var(--ok); }
.price-table td:first-child .link-btn { display: block; }
.link-btn { border: 0; background: transparent; padding: 0; margin-top: 2px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--accent); cursor: pointer; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }
.deal-section { margin-top: 18px; padding-top: 16px; border-top: 1px solid #c3e4d1; }
.quote-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: #fff; margin-top: 8px; }
.quote-pdf { flex: 1; min-width: 0; display: flex; gap: 8px; align-items: flex-start; border: 0; background: transparent; padding: 0; font: inherit; text-align: left; cursor: pointer; color: var(--text); }
.quote-pdf svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--accent); }
.quote-pdf:hover strong { color: var(--accent); text-decoration: underline; }
.quote-st { width: auto; padding: 4px 8px; font-size: 12px; font-weight: 600; border-radius: 999px; }
.quote-st.st-nieuw, .quote-st.st-mql, .quote-st.st-sales, .quote-st.st-verloren { border-width: 1px; }
.mail-att { display: flex; gap: 6px; align-items: center; }
.mail-att svg { width: 16px; height: 16px; flex: none; color: var(--accent); }
.tl-icon.offerte { color: var(--accent); background: var(--accent-soft); border-color: #fde68a; }
.logo-prev { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 8px; background: var(--surface-2); }
.logo-prev img { max-height: 48px; max-width: 180px; }
.file-drop { border: 1.5px dashed var(--border-strong); border-radius: 8px; padding: 18px; text-align: center; color: var(--text-3); cursor: pointer; background: var(--surface-2); }
.file-drop:hover, .file-drop.drag { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.file-item svg { width: 16px; height: 16px; flex: none; color: var(--text-3); }
.file-item a { word-break: break-all; }
.file-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px; margin-top: 8px; background: #fff; font-size: 13px; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,23,42,.5); display: none; align-items: flex-start; justify-content: center; padding: 8vh 16px; z-index: 50; overflow-y: auto; }
.modal-backdrop.open { display: flex; }
.modal { background: var(--surface); border-radius: 20px; width: 100%; max-width: 520px; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 20px 20px; }

/* Toast */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--side); color: #fff; padding: 11px 18px; border-radius: 999px; box-shadow: var(--shadow); z-index: 60; opacity: 0; transform: translateY(10px); transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: none; }

.empty { text-align: center; padding: 36px 16px; color: var(--text-3); }
.notice { padding: 12px 14px; border-radius: 8px; background: var(--warn-soft); color: #7a5312; font-size: 13px; border: 1px solid #f0dcb5; }
.notice.info { background: var(--info-soft); color: #1f4d82; border-color: #cbdcf2; }

/* Import mapping */
.steps { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.step { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-weight: 550; }
.step .num { width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; }
.step.on { color: var(--text); }
.step.on .num { background: var(--accent-gradient); border-color: transparent; color: #fff; }
.step + .step::before { content: ""; width: 28px; height: 1px; background: var(--border-strong); }
.map-row { display: grid; grid-template-columns: 1fr 24px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--border); }

@media (max-width: 1200px) {
  .grid-main { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .grid-main > :last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: minmax(0,1fr); overflow-x: clip; }
  /* Menu als één horizontaal scrollende balk */
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: nowrap; align-items: center; padding: 10px 12px; gap: 2px; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  .brand { padding: 0 8px 0 4px; flex: none; }
  .brand small { display: none; }
  .sidebar .nav-label, .sidebar-foot { display: none; }
  .nav { display: flex; flex-wrap: nowrap; gap: 2px; flex: none; }
  .nav a { white-space: nowrap; padding: 7px 11px; flex: none; }
  .grid-4 { grid-template-columns: minmax(0,1fr) minmax(0,1fr); }
  .grid-2, .grid-main, .grid-contact { grid-template-columns: minmax(0,1fr); }
  .grid-main > :last-child { grid-column: auto; }
  .pipeline { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content { padding: 16px 12px 40px; }
  .topbar { padding: 10px 12px; gap: 8px; }
  .topbar .user > span:not(.avatar), .user-menu .user .user-name { display: none; }
  .field-row { grid-template-columns: minmax(0,1fr); }
  .card-head { flex-wrap: wrap; padding: 12px 14px; }
  .card-body { padding: 14px; }
  .page-head { align-items: flex-start; }
  .page-head .row { width: 100%; }
  h1 { font-size: 22px; word-break: break-word; }
  .filters .spacer { display: none; }
  .filters .segmented { width: 100%; }
  .filters select, .filters input { min-width: 0; flex: 1 1 140px; }
  .props { grid-template-columns: 100px minmax(0,1fr); }
  .table td:first-child { min-width: 150px; }
  .table td, .table th { padding-left: 10px; padding-right: 10px; }
  .stat .value { font-size: 24px; }
  .modal-backdrop { padding: 12px 8px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 14px; padding-right: 14px; }
  .modal-foot { flex-wrap: wrap; }
  .toast { left: 12px; right: 12px; bottom: 12px; text-align: center; border-radius: 12px; }
  .price-table td:first-child { white-space: normal; }
  .lk-row { grid-template-columns: minmax(0,1fr) auto; }
  .lk-row > :nth-child(2) { display: none; }
  .map-row { grid-template-columns: minmax(0,1fr); gap: 4px; }
  .map-row > :nth-child(2) { display: none; }
  .dv-gw-card { margin: 4px 10px 12px; }
  .dv-gw-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding-left: 14px; padding-right: 14px; }
  .dv-wrap { max-height: 70vh; }
  #dv-q { width: 100% !important; }
  .m-actions { flex-wrap: wrap; }
  .quote-row { flex-wrap: wrap; }
  .quote-pdf { flex-basis: 100%; }
  .quote-row .quote-st { margin-left: 24px; }
  input, select, textarea { font-size: 16px; }   /* voorkomt inzoomen op iPhone */
}
img, svg, video { max-width: 100%; }

/* Radiatoroverzicht */
.dv-wrap { max-height: 620px; overflow: auto; }
.dv-table th { position: sticky; top: 0; z-index: 1; }
.dv-table td { padding: 3px 4px; }
.dv-table tbody tr:hover { cursor: default; }
.dv-table input { border-color: transparent; background: transparent; padding: 6px 8px; font-size: 13px; border-radius: 6px; }
.dv-table input:hover { border-color: var(--border); background: #fff; }
.dv-table input:focus { background: #fff; }
.dv-table input.mono, td.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; letter-spacing: -.01em; }
.dv-table input.saving { border-color: var(--accent-light); }
.dv-table input.saved { border-color: var(--ok); background: var(--ok-soft); }
.dv-gw { border-bottom: 1px solid var(--border); }
.dv-gw summary { padding: 12px 18px; cursor: pointer; list-style: revert; }
.dv-gw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 0 12px; padding: 4px 18px 0; }
.dv-gw-card { margin: 4px 18px 12px; padding: 12px 14px 4px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, #fafafa); }
/* Keuzelijsten */
.lk-row { display: grid; grid-template-columns: minmax(0,1fr) 90px 190px; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--border); }
.lk-row:last-child { border-bottom: 0; }
.lk-row input { padding: 6px 9px; }
