/*
 * Dipanox Backoffice – Admin CSS
 *
 * KLEUREN AANPASSEN? Verander alleen de variabelen hieronder.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Manrope:wght@600;700;800&display=swap');

:root {
  /* ── Dipanox huisstijl ── */
  --primary:     #1A1A1B;   /* Charcoal – sidebar, primaire tekst */
  --primary-2:   #252526;   /* Charcoal lichter */
  --primary-3:   #2E2E30;   /* Charcoal medium */
  --dx-red:      #E30613;   /* Dipanox rood – logo, CTA */
  --dx-red-dk:   #A01824;   /* Donker rood – gradients */
  --dx-red-muted:#8B1020;   /* Gedempt rood – badges */
  --accent:      #E30613;
  --accent-hover:#C00510;

  /* ── Neutrale kleuren ── */
  --bg:          #F5F5F6;
  --surface:     #FFFFFF;
  --border:      #E4E4E7;
  --border-2:    #D0D0D4;

  /* ── Tekst ── */
  --text:        #1A1A1B;
  --text-2:      #6B6B70;
  --text-muted:  #94949C;
  --text-light:  #FFFFFF;

  /* ── Status kleuren ── */
  --green:       #16A34A;
  --green-bg:    #DCFCE7;
  --red:         #DC2626;
  --red-bg:      #FEE2E2;
  --yellow:      #D97706;
  --yellow-bg:   #FEF3C7;
  --blue:        #1D4ED8;
  --blue-bg:     #DBEAFE;
  --orange:      #C2410C;
  --orange-bg:   #FFEDD5;

  /* ── Layout ── */
  --sidebar-width:    250px;
  --topbar-height:    64px;
  --border-radius:    10px;
  --border-radius-lg: 16px;

  /* ── Schaduwen ── */
  --shadow-sm:   0 1px 3px rgba(26, 26, 27, 0.08);
  --shadow:      0 4px 16px rgba(26, 26, 27, 0.1);
  --shadow-lg:   0 8px 32px rgba(26, 26, 27, 0.14);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; }

/* ── Layout Shell ────────────────────────────────────────── */
.admin-shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  background: var(--primary);
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: transform .3s ease;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 0;
}

.nav-group {
  margin-bottom: 4px;
}
.nav-group-label {
  font-size: 10px; font-weight: 700; color: rgba(255,255,255,.3);
  text-transform: uppercase; letter-spacing: .8px;
  padding: 12px 20px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.6);
  font-size: 13.5px; font-weight: 600;
  border-left: 3px solid transparent;
  transition: all .15s;
  position: relative;
}
.nav-item:hover {
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.95);
}
.nav-item.active {
  background: rgba(227, 6, 19, 0.14);
  color: white;
  border-left-color: var(--accent);
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 1px 7px; border-radius: 99px;
}
.nav-badge.green { background: var(--green); }

.sidebar-footer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 16px 20px;
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
}
.user-avatar {
  width: 34px; height: 34px;
  background: linear-gradient(135deg, rgba(227, 6, 19, 0.25), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(227, 6, 19, 0.35);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: white;
  flex-shrink: 0;
}
.user-info .name { font-size: 13px; font-weight: 700; color: white; }
.user-info .role { font-size: 11px; color: rgba(255,255,255,.4); }
.logout-btn {
  margin-left: auto;
  background: none; border: none;
  color: rgba(255,255,255,.4);
  padding: 6px;
  border-radius: 6px;
  transition: color .15s;
}
.logout-btn:hover { color: var(--accent); }
.logout-btn svg { width: 16px; height: 16px; }

/* ── Main content ────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ── Topbar ──────────────────────────────────────────────── */
.topbar {
  height: var(--topbar-height);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky; top: 0; z-index: 100;
  box-shadow: var(--shadow-sm);
}
.topbar-breadcrumb {
  flex: 1;
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
}
.topbar-breadcrumb .current { color: var(--text); font-weight: 600; }
.topbar-breadcrumb svg { width: 14px; height: 14px; }
.topbar-right {
  display: flex; align-items: center; gap: 10px;
}
.topbar-btn {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 7px 14px;
  font-size: 13px; font-weight: 600;
  color: var(--text);
  display: flex; align-items: center; gap: 6px;
  transition: all .15s;
}
.topbar-btn:hover { border-color: var(--accent); color: var(--accent); }
.topbar-btn svg { width: 15px; height: 15px; }
.topbar-btn-primary {
  background: var(--accent);
  color: white; border-color: var(--accent);
}
.topbar-btn-primary:hover {
  background: var(--accent-hover); border-color: var(--accent-hover);
  color: white;
}

/* ── Page content ────────────────────────────────────────── */
.page-content {
  flex: 1;
  width: 100%;
  max-width: 1680px;
  margin: 0 auto;
  padding: 28px 32px 64px;
}
.page-header {
  margin-bottom: 24px;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.page-header h1 {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-size: 24px; font-weight: 800; color: var(--text); letter-spacing: -.5px;
}
.page-header p {
  font-size: 13.5px; color: var(--text-2); margin-top: 3px;
}
.page-actions { display: flex; gap: 8px; flex-shrink: 0; }

/* ── Cards ───────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.card + .card { margin-top: 20px; }
.card-header, .card-head {
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title, .card-head h2 {
  font-size: 15px; font-weight: 700; color: var(--text);
}
.card-head .hint { font-size: 12px; color: var(--text-muted); }
.card-body { padding: 22px; }
.card-footer {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--bg);
  border-radius: 0 0 var(--border-radius-lg) var(--border-radius-lg);
}

/* ── KPI Widgets ─────────────────────────────────────────── */
.kpi-section {
  margin-bottom: 28px;
}
.kpi-section-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin: 0 0 12px;
}
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  padding: 20px 22px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s;
}
.kpi-section .kpi-card {
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  min-height: 118px;
}
.kpi-card:hover { box-shadow: var(--shadow); }
.kpi-card-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.kpi-card-content {
  flex: 1;
  min-width: 0;
}
.kpi-card-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding-left: 64px;
  min-height: 0;
}
.kpi-icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kpi-icon svg { width: 22px; height: 22px; }
.kpi-icon.blue   { background: var(--blue-bg);   color: var(--blue); }
.kpi-icon.green  { background: var(--green-bg);  color: var(--green); }
.kpi-icon.orange { background: var(--orange-bg); color: var(--orange); }
.kpi-icon.red    { background: var(--red-bg);    color: var(--red); }
.kpi-icon.teal   { background: rgba(13, 148, 136, 0.12); color: #0d9488; }
.kpi-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-value {
  font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -.5px;
  line-height: 1.1;
}
.kpi-value-money {
  font-size: 22px;
}
.kpi-label { font-size: 12.5px; color: var(--text-muted); margin-top: 4px; }
.kpi-trend {
  font-size: 12px; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
  white-space: nowrap;
}
.kpi-trend.up   { background: var(--green-bg); color: var(--green); }
.kpi-trend.down { background: var(--red-bg);   color: var(--red); }
.kpi-sub {
  font-size: 11.5px;
  color: var(--text-muted);
}
.kpi-link {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}
.kpi-link:hover { text-decoration: underline; }
.kpi-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}
.kpi-card-link:hover {
  border-color: rgba(227, 6, 19, 0.25);
}
.kpi-card-active {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(227, 6, 19, 0.12);
}

.chart-card .card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.chart-legend-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
}
.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
}
.chart-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}
.chart-dot.b2c { background: #1b3e9b; }
.chart-dot.b2b { background: var(--accent); }
.chart-dot.huur { background: #0d9488; }
.chart-dot.shipping { background: #64748b; }
.chart-wrap {
  position: relative;
  height: 320px;
}

@media (max-width: 1200px) {
  .kpi-grid, .kpi-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .kpi-grid, .kpi-grid-3 { grid-template-columns: 1fr; }
  .kpi-card-footer { padding-left: 0; }
  .grid-2 { grid-template-columns: 1fr; }
}

/* ── Tabellen ────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%; border-collapse: collapse;
  font-size: 13.5px;
}
thead th {
  text-align: left;
  padding: 10px 20px;
  font-size: 11.5px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .05em;
  background: #FAFAFB;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
tbody td {
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #FAFAFB; }
th.num, td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td strong { font-weight: 700; }
td small, .sub { display: block; margin-top: 2px; font-size: 11.5px; color: var(--text-muted); line-height: 1.3; }

/* ── Badges / Status ─────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700;
  padding: 3px 10px; border-radius: 99px;
}
.badge-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
}
.badge.green  { background: var(--green-bg);  color: var(--green); }
.badge.red    { background: var(--red-bg);    color: var(--red); }
.badge.yellow { background: var(--yellow-bg); color: var(--yellow); }
.badge.blue   { background: var(--blue-bg);   color: var(--blue); }
.badge.gray   { background: var(--bg);        color: var(--text-2); border: 1px solid var(--border); }
.badge.orange { background: var(--orange-bg); color: var(--orange); }
.order-actions-card { margin-bottom: 20px; border: 1px solid var(--border); box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04); }
.order-actions-body { display: grid; gap: 18px; }
.order-actions-group { display: grid; gap: 10px; }
.order-actions-group + .order-actions-group { padding-top: 18px; border-top: 1px solid var(--border); }
.order-actions-group-title { font-size: 11px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; color: var(--text-muted); }
.order-actions-buttons { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.order-actions-ship { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; width: 100%; }
.order-actions-note { width: 100%; font-size: 13px; color: #9a3412; background: #fff7ed; border: 1px solid #fdba74; border-radius: 8px; padding: 10px 14px; }
.order-open-badge { font-variant-numeric: tabular-nums; white-space: nowrap; }
.orders-table .order-number-cell { min-width: 130px; }
.order-number-link { font-weight: 700; color: var(--text); text-decoration: none; }
.order-number-link:hover { color: var(--accent); }
.order-number-meta { margin-top: 6px; }
.order-customer-cell { min-width: 240px; max-width: 320px; }
.order-customer-main { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.order-customer-name { font-weight: 700; color: var(--text); text-decoration: none; }
.order-customer-name:hover { color: var(--accent); }
.order-customer-sub { margin-top: 4px; font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
.order-customer-sub a { color: var(--text-muted); text-decoration: none; }
.order-customer-sub a:hover { color: var(--accent); }
tr.order-row-aging { background: rgba(245, 158, 11, 0.06); }
tr.order-row-stale { background: rgba(239, 68, 68, 0.07); }
tr.order-row-aging:hover,
tr.order-row-stale:hover { background: rgba(148, 163, 184, 0.12); }

/* ── Formulieren ─────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 13px; font-weight: 600; color: var(--text);
  margin-bottom: 6px;
}
.form-label .required { color: var(--accent); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 9px 14px;
  border: 1.5px solid var(--border-2);
  border-radius: var(--border-radius);
  font-size: 14px; font-family: inherit;
  color: var(--text);
  background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(227, 6, 19, .12);
}
.form-control::placeholder { color: var(--text-muted); }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.form-row { display: grid; gap: 18px; }
.form-row.cols-2 { grid-template-columns: 1fr 1fr; }
.form-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }

/* ── Knoppen ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--border-radius);
  font-size: 13.5px; font-weight: 700;
  border: 1.5px solid transparent;
  cursor: pointer; transition: all .15s;
  font-family: inherit;
  text-decoration: none;
}
.btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.btn-primary   { background: var(--accent); color: white; border-color: var(--accent); box-shadow: 0 6px 14px -8px rgba(227, 6, 19, .6); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-secondary { background: var(--primary); color: white; border-color: var(--primary); }
.btn-secondary:hover { background: var(--primary-2); }
.btn-outline   { background: var(--surface); color: var(--text); border-color: var(--border-2); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-danger    { background: var(--red); color: white; border-color: var(--red); }
.btn-danger:hover { background: #B91C1C; }
.btn-sm        { padding: 6px 12px; font-size: 12.5px; }
.btn-lg        { padding: 12px 26px; font-size: 15px; }

/* ── AI Veld ─────────────────────────────────────────────── */
.ai-field-wrap {
  border: 2px dashed var(--border-2);
  border-radius: var(--border-radius-lg);
  padding: 20px;
  background: linear-gradient(135deg, rgba(26, 26, 27, 0.02), rgba(227, 6, 19, 0.03));
  transition: border-color .2s;
}
.ai-field-wrap:focus-within {
  border-color: var(--accent);
  background: rgba(227, 6, 19, 0.04);
}
.ai-field-label {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 700; color: var(--primary);
  margin-bottom: 12px;
}
.ai-field-label .ai-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .4; }
}
.ai-result {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius);
  padding: 20px;
  font-size: 14px; line-height: 1.7;
  white-space: pre-wrap;
  min-height: 200px;
}
.ai-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--text-muted); font-size: 13.5px; padding: 40px 0;
  justify-content: center;
}
.ai-spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Upload Zone ─────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border-2);
  border-radius: var(--border-radius-lg);
  padding: 40px 20px;
  text-align: center;
  cursor: pointer;
  transition: all .2s;
  background: var(--bg);
}
.upload-zone:hover, .upload-zone.dragover {
  border-color: var(--accent);
  background: rgba(227, 6, 19, 0.04);
}
.upload-zone svg { width: 36px; height: 36px; color: var(--text-muted); margin-bottom: 10px; }
.upload-zone p { font-size: 13.5px; color: var(--text-2); }
.upload-zone small { font-size: 12px; color: var(--text-muted); }

/* ── Flash berichten ─────────────────────────────────────── */
.flash {
  padding: 12px 18px;
  border-radius: var(--border-radius);
  font-size: 13.5px; font-weight: 600;
  margin-bottom: 20px;
  display: flex; align-items: center; gap: 9px;
}
.flash svg { width: 16px; height: 16px; flex-shrink: 0; }
.flash.success { background: var(--green-bg); color: var(--green); }
.flash.error   { background: var(--red-bg);   color: var(--red); }
.flash.warning { background: var(--yellow-bg); color: var(--yellow); }
.flash.info    { background: var(--blue-bg);  color: var(--blue); }

/* ── Lege staat ──────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state svg { width: 48px; height: 48px; margin-bottom: 14px; opacity: .4; }
.empty-state h3 { font-size: 16px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.empty-state p  { font-size: 13.5px; max-width: 300px; margin: 0 auto 18px; }

/* ── Hulpklassen ─────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.product-form-spacer { display: none; }
@media (min-width: 721px) {
  .product-form-spacer { display: block; }
}
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.flex   { display: flex; }
.flex-center  { display: flex; align-items: center; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }
.ml-auto { margin-left: auto; }
.mt-4   { margin-top: 4px; }
.mt-8   { margin-top: 8px; }
.mt-16  { margin-top: 16px; }
.mt-24  { margin-top: 24px; }
.mb-8   { margin-bottom: 8px; }
.mb-16  { margin-bottom: 16px; }
.mb-24  { margin-bottom: 24px; }
.text-muted  { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-sm     { font-size: 12.5px; }
.font-bold   { font-weight: 700; }

/* ── Paginering ──────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; gap: 6px;
  padding-top: 16px;
}
.page-link {
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px; font-weight: 600;
  color: var(--text-2);
  background: var(--surface);
  transition: all .15s;
}
.page-link:hover { border-color: var(--accent); color: var(--accent); }
.page-link.active { background: var(--accent); color: white; border-color: var(--accent); }
.page-link.disabled { opacity: .4; pointer-events: none; }

/* ── Zoekbalk in topbar ──────────────────────────────────── */
.search-bar {
  display: flex; align-items: center;
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 99px;
  padding: 6px 14px; gap: 8px;
  transition: border-color .15s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar svg { width: 15px; height: 15px; color: var(--text-muted); flex-shrink: 0; }
.search-bar input {
  border: none; background: transparent; outline: none;
  font-size: 13.5px; font-family: inherit; color: var(--text);
  width: 200px;
}
.search-bar input::placeholder { color: var(--text-muted); }

/* ── Login pagina ────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, var(--primary) 0%, var(--dx-red-dk) 55%, var(--dx-red) 100%);
  padding: 20px;
}
.login-card {
  background: white;
  border-radius: 20px;
  padding: 44px 40px;
  width: 100%; max-width: 420px;
  box-shadow: 0 24px 80px rgba(0,0,0,.3);
}
.login-logo {
  display: flex; align-items: center;
  margin-bottom: 32px;
}
.login-card h1 { font-size: 22px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.login-card p  { font-size: 13.5px; color: var(--text-2); margin-bottom: 28px; }

/* ── Login (Furnit-stijl, Dipanox-huisstijl) ─────────────────── */
.login-scherm {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
}

.login-links {
  background: linear-gradient(150deg, var(--primary) 0%, var(--dx-red-dk) 55%, var(--dx-red) 100%);
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.login-links::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .1) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(115deg, #000 15%, transparent 65%);
  mask-image: linear-gradient(115deg, #000 15%, transparent 65%);
}

.login-links h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1.15;
  margin-bottom: 14px;
  position: relative;
}

.login-links p {
  color: rgba(255, 255, 255, .72);
  line-height: 1.7;
  max-width: 420px;
  position: relative;
}

.login-punt {
  display: flex;
  gap: 13px;
  align-items: center;
  margin-top: 18px;
  position: relative;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .82);
}

.login-punt b { color: #fff; }

.login-punt .vink {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .14);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 13px;
}

.login-links-footer {
  position: relative;
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
}

.login-rechts {
  display: grid;
  place-items: center;
  padding: 48px;
  background: #fff;
}

.login-kaart { width: 100%; max-width: 400px; }

.login-kaart h2 {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -.5px;
  margin-bottom: 6px;
}

.login-kaart .sub {
  color: var(--text-2);
  font-size: 13.5px;
  margin-bottom: 26px;
}

.formveld { margin-bottom: 15px; }

.formveld label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 6px;
}

.formveld input {
  width: 100%;
  border: 1.5px solid var(--border-2);
  border-radius: 11px;
  padding: 12px 14px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: .15s;
  background: #fff;
}

.formveld input:focus { border-color: var(--accent); }

.formfout {
  background: #FEE2E2;
  color: #B91C1C;
  border-radius: 11px;
  padding: 11px 15px;
  font-size: 13px;
  margin-bottom: 14px;
  display: none;
}

.knop {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  border: 0;
  font-family: inherit;
  transition: .2s;
}

.knop.merk {
  background: linear-gradient(120deg, var(--accent), var(--accent-hover));
  color: #fff;
  box-shadow: 0 10px 22px -8px rgba(227, 6, 19, .5);
}

.knop.merk:hover { transform: translateY(-1px); }
.knop:disabled { opacity: .6; cursor: default; transform: none; }

.login-terug {
  margin-top: 18px;
  font-size: 13px;
  text-align: center;
}

.login-terug a { color: var(--accent); font-weight: 600; }
.login-terug a:hover { text-decoration: underline; }

.login-hulp {
  font-size: 12.5px;
  color: var(--text-2);
  margin-top: 20px;
  line-height: 1.6;
}

.login-hulp a { color: var(--accent); font-weight: 600; }

.login-credit {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.login-credit a { color: inherit; }

@media (max-width: 900px) {
  .login-scherm { grid-template-columns: 1fr; }
  .login-links { display: none; }
}

/* ══════════════════════════════════════════════════════════════
   FURNIT-LAAG — zelfde uitstraling als de Furnit-backoffice,
   in Dipanox-huisstijl (charcoal zijmenu, rood accent).
   ══════════════════════════════════════════════════════════════ */

h1, h2, h3, .kop-titel { font-family: 'Manrope', 'Inter', sans-serif; }

/* ── Sidebar: submenu's, tellers, inklapbare groep ───────────── */
.nav-item.sub {
  padding: 6px 20px 6px 47px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255,255,255,.5);
}
.nav-item.sub.active { font-weight: 700; }
.nav-item.is-groep {
  width: 100%;
  margin: 0;
  background: none;
  border-top: 0; border-right: 0; border-bottom: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.nav-item .nav-group-chevron {
  margin-left: auto;
  width: 14px; height: 14px;
  flex-shrink: 0;
  opacity: .45;
  transition: transform .15s;
}
.nav-item .nav-group-chevron.is-open { transform: rotate(180deg); }
.nav-badge { min-width: 20px; text-align: center; line-height: 16px; }
.nav-badge.rood { background: var(--accent); }
.nav-badge.grijs { background: rgba(255,255,255,.14); color: rgba(255,255,255,.85); }
.nav-badge.geel { background: #D97706; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); border-radius: 99px; }

/* ── Topbalk: zoekbalk, titel, systeemstatus, klok ───────────── */
.topbar { justify-content: space-between; }
.topbar-links { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.topbar-titel { font-size: 13px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }
.topbar-user { display: flex; align-items: center; gap: 14px; font-size: 13px; color: var(--text-2); }

.zoekbalk { position: relative; display: flex; align-items: center; width: min(440px, 100%); }
.zoekbalk-icoon { position: absolute; left: 12px; display: inline-flex; color: var(--text-muted); pointer-events: none; }
.zoekbalk input {
  width: 100%;
  height: 38px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 52px 0 36px;
  font-size: 13.5px;
  font-family: inherit;
  background: #F7F8FA;
  color: var(--text);
  outline: none;
  transition: all .15s;
}
.zoekbalk input::placeholder { color: var(--text-muted); }
.zoekbalk input::-webkit-search-cancel-button { -webkit-appearance: none; }
.zoekbalk input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 6, 19, .12); }
.zoekbalk-kbd {
  position: absolute;
  right: 10px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  pointer-events: none;
}
.zoekbalk input:focus ~ .zoekbalk-kbd { display: none; }
.zoekbalk-lijst {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  width: min(580px, calc(100vw - 48px));
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(10, 15, 40, .16);
  padding: 6px;
  z-index: 300;
}
.zoekbalk-leeg { padding: 12px 12px; font-size: 13px; color: var(--text-muted); }
.zoekbalk-rij {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 0;
  border-radius: 9px;
  background: none;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  color: var(--text);
}
.zoekbalk-rij.actief { background: rgba(227, 6, 19, .06); }
.zoekbalk-soort {
  flex-shrink: 0;
  width: 84px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.zoekbalk-nr { flex-shrink: 0; min-width: 96px; font-size: 12.5px; font-weight: 800; color: var(--accent); font-variant-numeric: tabular-nums; }
.zoekbalk-mid { flex: 1; min-width: 0; }
.zoekbalk-mid b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.zoekbalk-mid small { display: block; font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 0; }
.zoekbalk-rij .badge { flex-shrink: 0; }
.zoekbalk-voet { display: flex; justify-content: space-between; gap: 12px; padding: 8px 10px 4px; font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); margin-top: 4px; }

.sys-status {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: default;
  padding: 6px 4px;
  white-space: nowrap;
}
.sys-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, .18);
  flex-shrink: 0;
}
.sys-dot.uit { background: #94949C; box-shadow: 0 0 0 3px rgba(148,148,156,.18); }
.sys-status > .sys-dot { position: relative; animation: sys-hartslag 2.2s ease-in-out infinite; }
.sys-status > .sys-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid rgba(34, 197, 94, .55);
  animation: sys-ring 2.2s ease-out infinite;
}
@keyframes sys-hartslag {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, .18); }
  50%      { box-shadow: 0 0 0 5px rgba(34, 197, 94, .28); }
}
@keyframes sys-ring {
  0%   { transform: scale(.7); opacity: .9; }
  70%  { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .sys-status > .sys-dot, .sys-status > .sys-dot::after { animation: none; }
}
.sys-panel {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 400;
  width: 280px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  cursor: default;
}
.sys-status:hover .sys-panel { display: block; }
.sys-panel-kop { font-size: 12px; font-weight: 800; margin-bottom: 8px; }
.sys-rij { display: flex; align-items: center; gap: 8px; padding: 5px 0; font-size: 12.5px; }
.sys-naam { font-weight: 600; color: var(--text); }
.sys-detail { margin-left: auto; color: var(--text-muted); font-weight: 500; }
.sys-voet { font-size: 11px; color: var(--text-muted); border-top: 1px solid var(--border); padding-top: 8px; margin-top: 6px; }

.klok { text-align: right; line-height: 1.2; padding-left: 14px; border-left: 1px solid var(--border); }
.klok-tijd { font-size: 15px; font-weight: 800; color: var(--text); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.klok-datum { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

@media (max-width: 1100px) {
  .topbar-titel { display: none; }
  .zoekbalk-kbd { display: none; }
  .sys-status { display: none; }
}

/* ── Paginakop ──────────────────────────────────────────────── */
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.2; }
.page-head p  { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.page-head .btn, .page-header .btn { white-space: nowrap; }
.kopknoppen { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.kopknoppen form { margin: 0; }

/* ── Stat-tegels (snelfilters boven lijsten) ─────────────────── */
.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.stats.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.stats.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.stats.stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 14px 18px 13px;
  min-width: 0;
  color: inherit;
  position: relative;
  transition: border-color .15s, box-shadow .15s;
}
a.stat:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.stat.actief { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.stat-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-waarde { font-family: 'Manrope', 'Inter', sans-serif; font-size: 24px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-waarde small { font-size: 13px; font-weight: 600; color: var(--text-muted); letter-spacing: 0; }
.stat-sub { font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat.let-op .stat-waarde { color: #B45309; }
.stat.rood .stat-waarde { color: #B91C1C; }
.stat.groen .stat-waarde { color: #15803D; }
.stat.blauw .stat-waarde { color: #1D4ED8; }
.stat.accent .stat-waarde { color: var(--accent); }
.stat-balk { display: block; height: 6px; border-radius: 99px; background: #EEF0F3; overflow: hidden; margin-top: 8px; }
.stat-balk span { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .3s; }
.stat-icoon {
  position: absolute; top: 12px; right: 14px;
  width: 30px; height: 30px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #F4F5F8; color: var(--text-muted);
}
.stat-icoon svg { width: 15px; height: 15px; }
.stat.accent .stat-icoon { background: rgba(227,6,19,.08); color: var(--accent); }
.stat.groen .stat-icoon { background: var(--green-bg); color: #15803D; }
.stat.blauw .stat-icoon { background: #DBEAFE; color: #1D4ED8; }
.stat.let-op .stat-icoon { background: var(--yellow-bg); color: #B45309; }
.stat.rood .stat-icoon { background: var(--red-bg); color: #B91C1C; }

@media (max-width: 1300px) {
  .stats.stats-5, .stats.stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1000px) {
  .stats, .stats.stats-3, .stats.stats-5, .stats.stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .stats, .stats.stats-3, .stats.stats-5, .stats.stats-6 { grid-template-columns: 1fr; }
}

/* ── Lijstscherm: werkbalk met zoekveld + chips, tabel eronder ── */
.lijst-scherm {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  margin-bottom: 20px;
}
.werkbalk {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border);
  background: #FAFAFB;
}
.werkbalk form { display: contents; }
.werkbalk-rechts { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.zoekveld {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 280px;
  max-width: 440px;
  min-width: 0;
  padding: 0 12px;
  height: 36px;
  background: var(--surface);
  border: 1.5px solid var(--border-2);
  border-radius: var(--border-radius);
  color: var(--text-muted);
  transition: border-color .15s, box-shadow .15s;
}
.zoekveld:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 6, 19, .12); }
.zoekveld svg { width: 15px; height: 15px; flex-shrink: 0; }
.zoekveld input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  color: var(--text);
}
.zoekveld input::placeholder { color: var(--text-muted); }
.zoekveld input::-webkit-search-cancel-button { cursor: pointer; }
.zoekveld-wis {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: #EEF0F3; color: var(--text-2);
  font-size: 12px; font-weight: 800; text-decoration: none;
}
.zoekveld-wis:hover { background: var(--border-2); color: var(--text); }
.werkbalk select.form-control { width: auto; height: 36px; padding: 0 32px 0 12px; font-size: 13px; font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border: 1.5px solid var(--border-2);
  border-radius: 99px;
  background: var(--surface);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: all .15s;
}
.chip em {
  font-style: normal;
  font-size: 11px;
  font-weight: 800;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 99px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #EEF0F3;
  color: var(--text-2);
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip.actief { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip.actief em { background: rgba(255,255,255,.22); color: #fff; }
.chip.is-rood:not(.actief) em { background: #FEE2E2; color: #B91C1C; }
.chip.is-blauw:not(.actief) em { background: #DBEAFE; color: #1D4ED8; }
.chip.is-groen:not(.actief) em { background: var(--green-bg); color: #15803D; }
.chip.is-geel:not(.actief) em { background: var(--yellow-bg); color: #B45309; }
.tabel-wrap { overflow-x: auto; }
table.klikbaar tbody tr { cursor: pointer; transition: background .1s; }
table.klikbaar tbody tr:hover { background: #FAFAFB; }
.tel {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px; height: 24px;
  padding: 0 8px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  background: #EEF0F3; color: var(--text-2);
}
.tel.is-geel   { color: #B45309; background: var(--yellow-bg); }
.tel.is-blauw  { color: #1D4ED8; background: #DBEAFE; }
.tel.is-groen  { color: #15803D; background: var(--green-bg); }
.tel.is-rood   { color: #B91C1C; background: var(--red-bg); }
.tel.is-accent { color: #fff; background: var(--accent); }
.rij-acties { display: flex; gap: 6px; justify-content: flex-end; white-space: nowrap; }
.rij-acties form { display: inline; }
td.rij-acties-cel { text-align: right; width: 1%; white-space: nowrap; }
.miniatuur { width: 44px; height: 44px; object-fit: contain; border-radius: 8px; border: 1px solid var(--border); background: #fff; display: block; }
.miniatuur.geen-foto { background: #F4F5F8; }
.leeg { padding: 44px 20px 48px; text-align: center; }
.leeg-icoon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green-bg);
  color: #15803D;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 10px;
}
.leeg-icoon.grijs { background: #EEF0F3; color: var(--text-2); }
.leeg b { display: block; font-size: 15px; }
.leeg p { margin: 6px auto 0; max-width: 460px; font-size: 13px; color: var(--text-2); line-height: 1.5; }
.leeg .btn { margin-top: 16px; }
.lijst-voet { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 20px; border-top: 1px solid var(--border); background: #FAFAFB; font-size: 12.5px; color: var(--text-muted); }
.lijst-voet .pagination { padding-top: 0; }
.lijst-scherm > .card-footer { background: #FAFAFB; }

/* ── Tabbladen in een scherm ─────────────────────────────────── */
.tabs {
  display: flex;
  flex-wrap: wrap;
  background: #F4F5F8;
  border-bottom: 1px solid var(--border);
}
.tab {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px 10px;
  border-right: 1px solid var(--border);
  font-weight: 800;
  font-size: 13.5px;
  color: var(--text-2);
  transition: background .15s, color .15s;
  min-width: 0;
  text-decoration: none;
}
.tab:hover { color: var(--text); background: #ECEEF2; }
.tab.actief, .tab.actief:hover {
  background: var(--surface);
  color: var(--accent);
  box-shadow: inset 0 3px 0 var(--accent);
}
.tab em { font-style: normal; font-size: 11px; font-weight: 800; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; display: inline-flex; align-items: center; justify-content: center; background: #E4E4E7; color: var(--text-2); }
.tab.actief em { background: rgba(227,6,19,.1); color: var(--accent); }

/* ── Kopkaart op detailpagina's ──────────────────────────────── */
.kopkaart {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "links acties"
    "onder onder";
  gap: 18px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--border-radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 20px 22px 0;
  margin-bottom: 22px;
  overflow: hidden;
}
.kopkaart::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 5px;
  background: linear-gradient(180deg, var(--accent), rgba(227, 6, 19, .45));
}
.kopkaart.kop-grijs::before { background: linear-gradient(180deg, #6B6B70, #B4B4BA); }
.kopkaart.kop-groen::before { background: linear-gradient(180deg, #16A34A, #86EFAC); }
.kopkaart.kop-blauw::before { background: linear-gradient(180deg, #1D4ED8, #93C5FD); }
.kopkaart.kop-geel::before { background: linear-gradient(180deg, #D97706, #FCD34D); }
.kopkaart.zonder-onder { padding-bottom: 20px; }
.kopkaart-links { grid-area: links; min-width: 0; }
.kopkaart-acties { grid-area: acties; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; align-content: flex-start; }
.kopkaart-acties form { margin: 0; }
.kopkaart-rij { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.kop-id {
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: .04em;
  color: var(--accent);
  background: rgba(227, 6, 19, .08);
  border-radius: 8px;
  padding: 3px 9px;
  font-variant-numeric: tabular-nums;
}
.kop-chip {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  background: #F0F1F4;
  border-radius: 99px;
  padding: 3px 11px;
  text-decoration: none;
  transition: background .15s, color .15s;
}
a.kop-chip:hover { background: var(--primary); color: #fff; }
.kopkaart h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1.15; overflow-wrap: anywhere; }
.kop-adres { margin-top: 4px; font-size: 14.5px; color: var(--text-2); }
.kop-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 12px; font-size: 13px; color: var(--text-2); }
.kop-meta strong { color: var(--text); font-weight: 700; }
.kop-meta a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 3px; }
.kop-meta a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* voortgangsstappen onderin de kopkaart */
.stappen {
  grid-area: onder;
  list-style: none;
  margin: 0 -22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  border-top: 1px solid var(--border);
  background: #FAFAFB;
}
.stap { display: flex; align-items: center; gap: 11px; padding: 12px 18px; min-width: 0; position: relative; }
.stap + .stap::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 0; height: 0;
  transform: translateY(-50%);
  border-left: 9px solid var(--border);
  border-top: 22px solid transparent;
  border-bottom: 22px solid transparent;
}
.stap i {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-muted);
  background: #fff;
  border: 1.5px solid var(--border-2);
}
.stap > div { min-width: 0; }
.stap b { display: block; font-size: 13px; font-weight: 700; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stap small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stap.klaar i { background: var(--green); border-color: var(--green); color: #fff; }
.stap.klaar b { color: var(--text); }
.stap.klaar small { color: var(--text-2); }
.stap.actief { background: #fff; }
.stap.actief i { border-color: var(--accent); color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 6, 19, .14); }
.stap.actief b { color: var(--accent); }
.stap.geannuleerd i { background: #FEE2E2; border-color: #FCA5A5; color: #B91C1C; }
.stap.geannuleerd b { color: #B91C1C; }

/* cijferstrook onderin de kopkaart */
.cijfers {
  grid-area: onder;
  list-style: none;
  margin: 0 -22px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  background: #F7F8FC;
  border-top: 1px solid var(--border);
}
.cijfers li { padding: 12px 22px; border-right: 1px solid var(--border); min-width: 0; }
.cijfers li:last-child { border-right: 0; }
.cijfers b { display: block; font-family: 'Manrope', 'Inter', sans-serif; font-size: 18px; font-weight: 800; letter-spacing: -.3px; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.cijfers span { display: block; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cijfers li.is-blauw b { color: #1D4ED8; }
.cijfers li.is-groen b { color: #15803D; }
.cijfers li.is-rood b { color: #B91C1C; }
.cijfers li.is-geel b { color: #B45309; }
.cijfers li.is-accent b { color: var(--accent); }

@media (max-width: 900px) {
  .kopkaart { grid-template-columns: 1fr; grid-template-areas: "links" "acties" "onder"; }
  .kopkaart-acties { justify-content: flex-start; }
  .cijfers li { border-bottom: 1px solid var(--border); }
}

/* ── Detail-indeling en feitenlijsten ────────────────────────── */
.detail-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); gap: 18px; align-items: start; margin-bottom: 20px; }
.detail-grid.gelijk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.detail-kolom { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.detail-grid .card, .detail-kolom .card { margin: 0; }
@media (max-width: 1000px) { .detail-grid, .detail-grid.gelijk { grid-template-columns: 1fr; } }

.feiten { margin: 0; }
.feiten > div {
  display: grid;
  grid-template-columns: 140px minmax(0, 1fr);
  gap: 12px;
  padding: 9px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
  align-items: baseline;
}
.feiten > div:last-child { border-bottom: none; }
.feiten dt { color: var(--text-2); font-weight: 600; }
.feiten dd { margin: 0; color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.feiten dd .badge { vertical-align: middle; }
.feiten dd a { color: var(--text); text-decoration: underline; text-decoration-color: var(--border-2); text-underline-offset: 3px; }
.feiten dd a:hover { color: var(--accent); text-decoration-color: var(--accent); }
.feiten dd.stil { color: var(--text-muted); font-weight: 500; }
.notitie-kader {
  margin: 0;
  padding: 14px 18px;
  background: #FAFAFB;
  border-left: 5px solid var(--primary);
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-wrap;
}
.notitie-kader.rood { border-left-color: var(--accent); background: #FFF5F5; }
.kaart-tekst { padding: 14px 20px; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.kaart-formulier { padding: 16px 20px 18px; }
.kaart-formulier .form-group:last-child { margin-bottom: 0; }

/* acties-kaart: groepjes knoppen met titel */
.acties-groep { padding: 14px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.acties-groep + .acties-groep { border-top: 1px solid var(--border); }
.acties-groep-titel { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); min-width: 110px; }
.acties-groep form { margin: 0; }
.acties-groep .stil { font-size: 13px; color: var(--text-muted); }

/* totalen onder een regeltabel */
.totalen {
  display: flex;
  justify-content: flex-end;
  gap: 32px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #FAFAFB;
  font-size: 13.5px;
  flex-wrap: wrap;
}
.totalen > div { text-align: right; }
.totalen span { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.totalen b { display: block; font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 2px; }
.totalen .groot b { font-family: 'Manrope', 'Inter', sans-serif; font-size: 20px; color: var(--text); }

/* ── Formulieren ─────────────────────────────────────────────── */
.form-blok { display: flex; flex-direction: column; gap: 4px; }
.form-blok + .form-blok { margin-top: 18px; padding-top: 18px; border-top: 1px dashed var(--border); }
.form-blok-kop { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 8px; }
.form-acties {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px 18px;
  border-top: 1px solid var(--border);
  background: #FAFAFB;
}
.form-acties .rechts { margin-left: auto; }
.form-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: var(--text); cursor: pointer; }
.form-check input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--accent); }
.form-check-lijst { display: flex; flex-direction: column; gap: 10px; }
.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border: 1.5px solid var(--border-2);
  border-radius: 999px;
  background: var(--surface);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
}
.check-chip:has(input:checked) { border-color: var(--accent); background: rgba(227,6,19,.06); color: var(--accent); }
.check-chip input { width: 14px; height: 14px; accent-color: var(--accent); }
.form-plak-balk {
  position: sticky; bottom: 0; z-index: 50;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px;
  margin-top: 20px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.form-plak-balk .hint { margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
.form-control { background: #fff; }
.form-control:hover { border-color: #B8B8BE; }
.form-control:focus:hover { border-color: var(--accent); }
select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236B6B70' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 34px;
}

/* ── Flash in Furnit-stijl ───────────────────────────────────── */
.flash-ok, .flash-fout {
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 13.5px;
  margin-bottom: 20px;
}
.flash-ok { background: var(--green-bg); color: #166534; }
.flash-fout { background: #FEF2F2; color: #B91C1C; }
.flash-wrap { padding: 0 32px; max-width: 1680px; margin: 16px auto 0; width: 100%; }
.flash-wrap .flash { margin-bottom: 0; }

/* ── Dashboard ───────────────────────────────────────────────── */
.dash-groet { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.dash-groet h1 { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.dash-groet p { font-size: 13.5px; color: var(--text-2); margin-top: 3px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; margin-bottom: 20px; align-items: start; }
.dash-grid .card { margin: 0; }
@media (max-width: 1100px) { .dash-grid { grid-template-columns: 1fr; } }
.omzet-staaf { display: flex; align-items: flex-end; gap: 14px; height: 220px; padding: 20px 20px 10px; }
.os-kolom { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; gap: 6px; min-width: 0; }
.os-kolom b { font-size: 11.5px; font-weight: 700; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.os-staaf { width: 100%; max-width: 54px; display: flex; flex-direction: column-reverse; border-radius: 8px 8px 4px 4px; overflow: hidden; background: #F4F5F8; min-height: 4px; }
.os-staaf span { display: block; width: 100%; }
.os-staaf .b2c { background: #1F2A60; }
.os-staaf .b2b { background: var(--accent); }
.os-staaf .huur { background: #0D9488; }
.os-kolom small { font-size: 11px; color: var(--text-muted); font-weight: 600; }
.os-kolom.huidig small { color: var(--text); font-weight: 800; }
.legenda { display: flex; flex-wrap: wrap; gap: 14px; }
.legenda span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.legenda i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legenda i.b2c { background: #1F2A60; }
.legenda i.b2b { background: var(--accent); }
.legenda i.huur { background: #0D9488; }
.snel-lijst { list-style: none; margin: 0; padding: 6px 0; }
.snel-lijst li a { display: flex; align-items: center; gap: 12px; padding: 10px 20px; color: inherit; text-decoration: none; transition: background .1s; }
.snel-lijst li a:hover { background: #FAFAFB; }
.snel-lijst li + li a { border-top: 1px solid var(--border); }
.snel-lijst .tel { margin-left: auto; }
.snel-lijst b { font-size: 13.5px; }
.snel-lijst small { display: block; margin-top: 1px; font-size: 11.5px; color: var(--text-muted); }
.snel-icoon { width: 32px; height: 32px; border-radius: 9px; display: inline-flex; align-items: center; justify-content: center; background: #F4F5F8; color: var(--text-2); flex-shrink: 0; }
.snel-icoon svg { width: 16px; height: 16px; }
.snel-icoon.accent { background: rgba(227,6,19,.08); color: var(--accent); }
.snel-icoon.groen { background: var(--green-bg); color: #15803D; }
.snel-icoon.geel { background: var(--yellow-bg); color: #B45309; }
.snel-icoon.blauw { background: #DBEAFE; color: #1D4ED8; }

/* ── Instellingen: statusstrip + kaartengrid ─────────────────── */
.koppeling-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.koppeling { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--border-radius-lg); padding: 14px 16px; box-shadow: var(--shadow-sm); color: inherit; text-decoration: none; }
.koppeling:hover { border-color: var(--accent); }
.koppeling .sys-dot { animation: none; }
.koppeling b { display: block; font-size: 13.5px; }
.koppeling small { display: block; font-size: 11.5px; color: var(--text-muted); margin-top: 1px; }
.instel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; align-items: start; }
.instel-grid .card { margin: 0; scroll-margin-top: 80px; }
.instel-grid .breed { grid-column: 1 / -1; }
@media (max-width: 1000px) { .instel-grid, .koppeling-strip { grid-template-columns: 1fr; } }

/* ── Pakbon / print ──────────────────────────────────────────── */
@media print {
  .sidebar, .topbar, .page-head, .page-header, .flash-wrap { display: none !important; }
  .main-content { margin-left: 0; }
  .page-content { padding: 0; max-width: none; }
}

/* ── Formulierpagina's (product, klant, ruimte, …) ───────────── */
.form-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.form-grid.gelijk { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid > form { display: contents; }
.form-kolom { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.form-kolom .card { margin: 0; }
.form-smal { max-width: 760px; }
@media (max-width: 1000px) { .form-grid, .form-grid.gelijk { grid-template-columns: 1fr; } }
.kaart-formulier .form-row:last-child .form-group,
.kaart-formulier > .form-group:last-child { margin-bottom: 0; }
.form-row + .form-row { margin-top: 0; }
.form-group { margin-bottom: 16px; }
.form-label { font-size: 12.5px; }
.form-hint { line-height: 1.45; }
.form-control[type="file"] { padding: 7px 10px; font-size: 13px; }
.form-control[type="file"]::file-selector-button {
  font: inherit; font-size: 12.5px; font-weight: 700;
  padding: 5px 11px; margin-right: 10px;
  border: 1.5px solid var(--border-2); border-radius: 8px;
  background: var(--surface); color: var(--text); cursor: pointer;
}
.form-control[type="file"]::file-selector-button:hover { border-color: var(--accent); color: var(--accent); }
.form-plak-balk .btn-primary { padding: 10px 22px; }
.form-plak-balk .stil { font-size: 12.5px; color: var(--text-muted); }
.form-plak-balk .rechts { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* check-chips in een raster (zichtbaarheid, categorieën) */
.chip-raster { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-groepen { display: flex; flex-direction: column; gap: 12px; max-height: 360px; overflow-y: auto; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; background: #FAFAFB; }
.cat-groep-kop { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 800; color: var(--text); cursor: pointer; }
.cat-groep-kop input { width: 15px; height: 15px; accent-color: var(--accent); }
.cat-groep .chip-raster { margin-top: 8px; padding-left: 4px; }
.check-chip.klein { padding: 5px 10px; font-size: 12.5px; }

/* foto-raster in het productformulier */
.foto-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin-bottom: 14px; }
.foto-vak { display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; }
.foto-vak.hoofd::before { content: "hoofdfoto"; position: absolute; top: 6px; left: 6px; z-index: 1; font-size: 9.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #fff; background: var(--accent); border-radius: 6px; padding: 2px 6px; }
.foto-vak button { width: 100%; }
.foto-vak img { width: 100% !important; height: 96px !important; }
.foto-wis { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; color: var(--text-muted); cursor: pointer; }
.foto-wis input { width: 14px; height: 14px; accent-color: #B91C1C; }
.foto-wis:has(input:checked) { color: #B91C1C; }
.upload-vak {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 2px dashed var(--border-2); border-radius: 12px;
  background: #FAFAFB;
  transition: border-color .15s, background .15s;
}
.upload-vak:hover, .upload-vak:focus-within { border-color: var(--accent); background: #FFF7F7; }
.upload-vak .upload-icoon { width: 40px; height: 40px; border-radius: 10px; background: #fff; border: 1px solid var(--border); display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); flex-shrink: 0; }
.upload-vak .upload-icoon svg { width: 18px; height: 18px; }
.upload-vak > div { flex: 1; min-width: 0; }
.upload-vak b { display: block; font-size: 13.5px; }
.upload-vak small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.upload-vak input[type="file"] { margin-top: 8px; }

/* documentenlijst bij een product */
.doc-lijst { display: flex; flex-direction: column; }
.doc-rij { display: flex; align-items: center; gap: 12px; padding: 10px 20px; border-bottom: 1px solid var(--border); }
.doc-rij:last-child { border-bottom: 0; }
.doc-icoon { width: 36px; height: 36px; border-radius: 9px; background: #FEE2E2; color: #B91C1C; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-icoon.grijs { background: #EEF0F3; color: var(--text-2); }
.doc-icoon svg { width: 17px; height: 17px; }
.doc-rij > div { flex: 1; min-width: 0; }
.doc-rij b { display: block; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-rij small { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.doc-rij .rij-acties { flex-shrink: 0; }

/* regeltabellen in bestelling/factuur/inkoop-formulieren */
.regel-tabel .form-control { padding: 7px 10px; font-size: 13px; height: 36px; }
.regel-tabel td { padding: 8px 12px; vertical-align: middle; }
.regel-tabel th { padding: 9px 12px; }
.regel-tabel td:first-child, .regel-tabel th:first-child { padding-left: 20px; }
.regel-tabel td:last-child, .regel-tabel th:last-child { padding-right: 20px; }
.regel-tabel .num .form-control { text-align: right; }
.regel-tabel .regel-totaal { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.regel-tabel .btn-wis { width: 32px; height: 32px; padding: 0; justify-content: center; border-color: transparent; color: var(--text-muted); background: transparent; box-shadow: none; }
.regel-tabel .btn-wis:hover { color: #B91C1C; background: #FEE2E2; border-color: transparent; }
.regel-voet { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 20px; border-top: 1px solid var(--border); background: #FAFAFB; }
.samenvatting-kaart .cijfers { margin: 0; border-top: 0; border-radius: 0; }

/* kopkaart voor formulieren: miniatuur naast de titel */
.kop-foto { display: flex; gap: 18px; align-items: flex-start; }
.kop-foto .miniatuur { width: 96px; height: 96px; border-radius: 12px; flex-shrink: 0; }
.kop-foto > div { min-width: 0; }
.kopkaart.kop-form { padding-bottom: 0; }

/* pakbon als document */
.pakbon { max-width: 900px; margin: 0 auto 20px; background: #fff; border: 1px solid var(--border); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; page-break-after: always; }
.pakbon-kop { display: flex; justify-content: space-between; gap: 24px; padding: 24px 28px 20px; border-bottom: 1px solid var(--border); }
.pakbon-kop h1 { font-size: 22px; font-weight: 800; letter-spacing: -.4px; }
.pakbon-kop .pakbon-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.pakbon-merk { font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.pakbon-adres { text-align: right; font-size: 13.5px; line-height: 1.55; }
.pakbon-adres b { display: block; font-size: 15px; }
.pakbon-strook { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: #F7F8FC; border-bottom: 1px solid var(--border); }
.pakbon-strook div { padding: 10px 28px; border-right: 1px solid var(--border); }
.pakbon-strook div:last-child { border-right: 0; }
.pakbon-strook span { display: block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); }
.pakbon-strook b { display: block; font-size: 14px; margin-top: 1px; }
.pakbon table th:first-child, .pakbon table td:first-child { padding-left: 28px; }
.pakbon table th:last-child, .pakbon table td:last-child { padding-right: 28px; }
.pakbon .aantal { font-size: 17px; font-weight: 800; white-space: nowrap; }
.pakbon .vink { width: 22px; height: 22px; border: 1.5px solid var(--border-2); border-radius: 6px; display: inline-block; }
.pakbon-voet { padding: 14px 28px 18px; font-size: 12.5px; color: var(--text-muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 16px; }
@media print {
  body { background: #fff; }
  .pakbon { border: 0; box-shadow: none; max-width: none; border-radius: 0; }
  .form-plak-balk { display: none !important; }
}

/* ── Laden: voortgangsbalk + skelet (loading.tsx) ─────────────── */
.nav-balk {
  position: fixed;
  top: 0; left: var(--sidebar-width); right: 0;
  height: 3px;
  z-index: 500;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
}
.nav-balk::before {
  content: "";
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, var(--accent), #FF6B6B);
  box-shadow: 0 0 8px rgba(227, 6, 19, .5);
}
.nav-balk.aan { opacity: 1; }
.nav-balk.aan::before { animation: nav-balk-groei 12s cubic-bezier(.1, .7, .3, 1) forwards; }
@keyframes nav-balk-groei {
  0% { width: 0; }
  15% { width: 40%; }
  50% { width: 75%; }
  100% { width: 96%; }
}
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid var(--border-2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin .7s linear infinite;
  flex-shrink: 0;
}
.laad-scherm { animation: laad-in .25s ease-out; }
@keyframes laad-in { from { opacity: 0; } to { opacity: 1; } }
.laad-kop { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin-bottom: 22px; height: 34px; }
.skelet-lijn {
  display: inline-block;
  height: 12px;
  width: 60%;
  border-radius: 6px;
  background: linear-gradient(90deg, #EEF0F3 25%, #F7F8FA 50%, #EEF0F3 75%);
  background-size: 200% 100%;
  animation: skelet-glans 1.4s ease-in-out infinite;
}
.skelet-lijn.kort { width: 40%; height: 10px; }
.skelet-lijn.groot { width: 30%; height: 22px; border-radius: 8px; }
.skelet-chip { display: inline-block; width: 84px; height: 30px; border-radius: 99px; background: #EEF0F3; animation: skelet-glans 1.4s ease-in-out infinite; }
@keyframes skelet-glans { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skelet-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.skelet-stat { display: flex; flex-direction: column; gap: 9px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--border-radius-lg); padding: 16px 18px; min-height: 88px; }
.skelet-kaart { background: var(--surface); border: 1px solid var(--border); border-radius: var(--border-radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.skelet-werkbalk { display: flex; align-items: center; gap: 10px; padding: 14px 20px; background: #FAFAFB; border-bottom: 1px solid var(--border); }
.skelet-werkbalk .skelet-lijn { height: 36px; border-radius: 10px; }
.skelet-rij { display: flex; align-items: center; gap: 24px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.skelet-rij:last-child { border-bottom: 0; }
@media (max-width: 1000px) { .skelet-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (prefers-reduced-motion: reduce) { .skelet-lijn, .skelet-chip, .nav-balk.aan::before { animation: none; } }

/* productfoto in lijsten: nette placeholder als er geen (werkende) foto is */
.foto-cel { width: 64px; }
.miniatuur { overflow: hidden; flex-shrink: 0; }
.miniatuur.geen-foto {
  display: flex; align-items: center; justify-content: center;
  background: #F4F5F8; color: #B8B8BE;
  border-style: dashed;
}
.miniatuur.geen-foto svg { width: 18px; height: 18px; }
.kop-foto .miniatuur.geen-foto svg { width: 32px; height: 32px; }

/* ═══ Klantwijzigingen sept 2026: artikelkiezer, specificaties, locaties, tekstregels ═══ */

/* Zoekbare artikelkiezer (order-, factuur- en inkoopregels) */
.product-kiezer { position: relative; }
.product-kiezer .form-control { width: 100%; text-overflow: ellipsis; }
.product-kiezer.heeft-keuze .form-control { padding-right: 30px; font-weight: 600; }
.product-kiezer-wis {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent;
  color: var(--text-muted); cursor: pointer; font-size: 12px; line-height: 1;
}
.product-kiezer-wis:hover { background: #FEE2E2; color: #B91C1C; }
.product-kiezer-lijst {
  position: fixed; z-index: 1000; max-height: 340px; overflow-y: auto;
  background: #fff; border: 1px solid var(--border-2); border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg); padding: 4px;
}
.product-kiezer-optie {
  display: flex; align-items: baseline; gap: 10px; width: 100%; text-align: left;
  padding: 7px 10px; border: 0; border-radius: 7px; background: transparent; cursor: pointer;
  font: inherit; font-size: 13px; color: inherit;
}
.product-kiezer-optie .sku { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.product-kiezer-optie .naam { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.product-kiezer-optie.actief { background: #F4F5F8; }
.product-kiezer-optie.actief .naam { color: inherit; }
.product-kiezer-optie.gekozen .sku { color: var(--accent); }
.product-kiezer-leeg, .product-kiezer-meer { padding: 9px 10px; font-size: 12.5px; color: var(--text-muted); }
.product-kiezer-meer { border-top: 1px solid var(--border); margin-top: 4px; }

/* Tekstregel onder een bestelregel */
.regel-tabel tr.regel-met-tekst td { vertical-align: top; }
.regel-tabel tr.regel-met-tekst .regel-totaal { padding-top: 17px; }
.regel-tabel tr.regel-met-tekst td.text-muted { padding-top: 17px; }
.regel-tabel .form-control.regel-tekst { margin-top: 6px; height: 30px; font-size: 12.5px; background: #FAFAFB; font-style: italic; }
.regel-tabel .form-control.regel-tekst:focus, .regel-tabel .form-control.regel-tekst:not(:placeholder-shown) { background: #fff; font-style: normal; }
.regel-tabel .btn-wis:disabled { opacity: .3; cursor: not-allowed; }
small.regel-notitie { display: block; margin-top: 3px; padding-left: 8px; border-left: 2px solid var(--border-2); color: var(--text); font-style: italic; white-space: pre-wrap; }

/* Specificaties (naam → waarde) en magazijnlocaties in het productformulier */
.specs-velden, .locatie-velden { display: grid; gap: 6px; }
.specs-kop, .specs-rij { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) 32px; gap: 8px; align-items: center; }
.locatie-kop, .locatie-rij { display: grid; grid-template-columns: 128px minmax(0, 1.2fr) 76px minmax(0, 1.6fr) 32px; gap: 8px; align-items: center; }
.specs-kop, .locatie-kop { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); }
.specs-rij .form-control, .locatie-rij .form-control { height: 36px; padding: 7px 10px; font-size: 13px; }
.locatie-rij input[name="locQty"] { text-align: right; }
.specs-rij .btn-wis, .locatie-rij .btn-wis { width: 32px; height: 32px; padding: 0; justify-content: center; border-color: transparent; color: var(--text-muted); background: transparent; box-shadow: none; }
.specs-rij .btn-wis:hover, .locatie-rij .btn-wis:hover { color: #B91C1C; background: #FEE2E2; }
.specs-velden > .btn { justify-self: start; margin-top: 4px; }
.locatie-voet { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.locatie-som { margin-left: auto; font-size: 12.5px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.locatie-som.wijkt-af { color: #B45309; font-weight: 600; }
@media (max-width: 720px) {
  .locatie-kop { display: none; }
  .locatie-rij { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 64px 32px; }
  .locatie-rij input[name="locNote"] { grid-column: 1 / -1; order: 5; }
}

.text-rood { color: #B91C1C; }
