/* =========================================================
   Swart 2.0 Backoffice — UI kit styles
   Imports colors_and_type.css from /.
   ========================================================= */

* { box-sizing: border-box; }

body {
  font-family: var(--font-sans);
  background: var(--bg-page);
  color: var(--fg-1);
  margin: 0;
}

/* ---------- App shell layout ---------- */
.swart-app {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}
.swart-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.swart-content {
  padding: 24px 32px 48px;
  max-width: 1440px;
  width: 100%;
}

/* ---------- Sidebar ---------- */
.swart-sidebar {
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
.swart-brand {
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.swart-brand-logo { height: 26px; width: auto; }
.swart-brand-env {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--fg-3);
  font-size: 11px;
}
.swart-brand-env span {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 700;
  font-size: 10px;
}
.swart-brand-env em { font-style: normal; font-weight: 500; color: var(--fg-2); }

.swart-nav { flex:1; overflow-y:auto; padding: 10px 8px; }
.swart-nav-sec { margin-bottom: 14px; }
.swart-nav-sec-lbl {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  color: var(--fg-3);
  padding: 8px 12px 4px;
}
.swart-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  border: none;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  font: 500 13.5px/1 var(--font-sans);
  color: var(--fg-2);
  cursor: pointer;
  position: relative;
  text-align: left;
  transition: background var(--dur-fast) var(--ease-out);
}
.swart-nav-item:hover { background: var(--bg-muted); }
.swart-nav-item.is-active {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
  font-weight: 600;
}
.swart-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 3px;
  background: var(--ui-primary);
  border-radius: 0 3px 3px 0;
}
.swart-nav-item > span:nth-child(2) { flex: 1; }
.swart-nav-badge {
  background: var(--ui-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.swart-nav-foot {
  border-top: 1px solid var(--border);
  padding: 12px 14px;
}
.swart-sync {
  display: flex; align-items: center; gap: 10px;
  font-size: 12px;
}
.swart-sync-dot {
  width: 8px; height: 8px; border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22,163,74,.15);
}

/* ---------- Topbar ---------- */
.swart-topbar {
  height: 56px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 10;
}
.swart-search {
  flex: 1;
  max-width: 540px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0 10px;
  height: 36px;
  color: var(--fg-3);
}
.swart-search input {
  flex: 1;
  border: none;
  background: transparent;
  font: 400 13.5px/1 var(--font-sans);
  color: var(--fg-1);
  outline: none;
}
.swart-search input::placeholder { color: var(--fg-3); }
.swart-search kbd {
  font: 600 10.5px var(--font-sans);
  background: #fff;
  border: 1px solid var(--border);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--fg-3);
}
.swart-topbar-right { margin-left:auto; display:flex; align-items:center; gap: 10px; }
.swart-iconbtn {
  width: 36px; height: 36px;
  border: none; background: transparent;
  color: var(--fg-2);
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  transition: background var(--dur-fast) var(--ease-out);
}
.swart-iconbtn:hover { background: var(--bg-muted); }
.swart-bell-dot {
  position: absolute; top:4px; right:4px;
  background: var(--ui-accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px; height: 16px;
  border-radius: 999px;
  padding: 0 4px;
  display: inline-flex;
  align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.swart-avatar {
  width: 32px; height: 32px;
  background: linear-gradient(135deg, #0077c8, #19a0b9);
  color: #fff;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center; justify-content: center;
}

/* ---------- Page header ---------- */
.swart-pagehead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 0;
  margin-bottom: 24px;
}
.swart-pagehead h1 { font-size: 24px; font-weight: 600; margin: 2px 0 0; letter-spacing:-.01em; }
.swart-crumb {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; color: var(--fg-3); margin-bottom: 4px;
}
.swart-crumb a { color: var(--fg-3); cursor: pointer; }
.swart-crumb a:last-child { color: var(--fg-2); font-weight: 500; }
.swart-pagehead-actions { display:flex; gap:8px; align-items:center; min-height: 36px; }

/* ---------- Buttons ---------- */
.swart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 6px;
  border: 1px solid transparent;
  font: 600 13.5px/1 var(--font-sans);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast);
  white-space: nowrap;
}
.swart-btn--md { height: 36px; padding: 0 14px; }
.swart-btn--sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.swart-btn--lg { height: 44px; padding: 0 18px; font-size: 14px; }

.swart-btn--primary { background: var(--ui-primary); color: #fff; }
.swart-btn--primary:hover { background: var(--ui-primary-hover); }
.swart-btn--primary:active { background: var(--ui-primary-active); }
.swart-btn--secondary { background: transparent; color: var(--ui-primary); border-color: var(--ui-primary); }
.swart-btn--secondary:hover { background: var(--ui-primary-soft); }
.swart-btn--ghost { background: transparent; color: var(--fg-2); }
.swart-btn--ghost:hover { background: var(--bg-muted); }
.swart-btn--danger { background: #dc2626; color: #fff; }
.swart-btn--danger:hover { background: #b91c1c; }
.swart-btn:disabled, .swart-btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; }

.swart-btn--cta {
  background: var(--swart-gradient-cta);
  color: #fff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 12px, 100% 100%, 0 100%);
}

/* ---------- Status pills ---------- */
.swart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1.4;
}
.swart-pill-dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.swart-pill--success { background: var(--status-success-bg); color: var(--status-success-fg); }
.swart-pill--info    { background: var(--status-info-bg);    color: var(--status-info-fg); }
.swart-pill--warn    { background: var(--status-warn-bg);    color: var(--status-warn-fg); }
.swart-pill--danger  { background: var(--status-danger-bg);  color: var(--status-danger-fg); }
.swart-pill--neutral { background: var(--status-neutral-bg); color: var(--status-neutral-fg); }

/* ---------- Cards ---------- */
.swart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column;
  padding: 20px;
}
.swart-card-hd {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 0;
  margin-bottom: 12px;
}
.swart-card-hd:last-child { margin-bottom: 0; }
.swart-card-hd h2 { font-size: 14px; font-weight: 600; }
.swart-card-body { padding: 0; flex: 1; }
.swart-card-body--flush {
  padding: 0;
  margin: 0 -20px;
  overflow: hidden;
}
.swart-card-body--flush:first-child {
  margin-top: -20px;
  border-radius: 7px 7px 0 0;
}
.swart-card-body--flush:last-child {
  margin-bottom: -20px;
  border-radius: 0 0 7px 7px;
}
.swart-card-body--flush:first-child:last-child {
  border-radius: 7px;
}
.swart-card-hd + .swart-card-body--flush { margin-top: -12px; }
.swart-card-hd + .swart-card-body--flush:last-child { border-radius: 0 0 7px 7px; }
.swart-card-ft {
  margin: 20px -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; gap: 8px;
  font-size: 12.5px;
  border-radius: 0 0 7px 7px;
}
.swart-card > .pagination {
  margin: 0 -20px -20px;
  padding: 12px 20px;
  border-radius: 0 0 7px 7px;
}

/* ---------- Notification panel ---------- */
.swart-overlay {
  position: fixed; inset: 0;
  background: rgba(5,22,30,0.5);
  z-index: 40;
}
.swart-notif {
  position: fixed;
  top: 0; right: 0;
  width: 380px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-xl);
  z-index: 50;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--dur-slow) var(--ease-out);
}
.swart-notif.is-open { transform: translateX(0); }
.swart-notif-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.swart-notif-hd-actions { display:flex; align-items:center; gap:8px; }
.swart-notif-hd-actions a { font-size: 12px; cursor: pointer; }
.swart-notif-list { list-style: none; margin: 0; padding: 0; flex: 1; overflow-y: auto; }
.swart-notif-item {
  display: grid;
  grid-template-columns: 32px 1fr 10px;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.swart-notif-item:hover { background: var(--bg-page); }
.swart-notif-item.is-unread { background: #f8fbff; }
.swart-notif-ic {
  width: 30px; height: 30px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
}
.swart-notif-ic--info    { background: var(--status-info-bg);    color: var(--status-info-fg); }
.swart-notif-ic--warn    { background: var(--status-warn-bg);    color: var(--status-warn-fg); }
.swart-notif-ic--danger  { background: var(--status-danger-bg);  color: var(--status-danger-fg); }
.swart-notif-ic--success { background: var(--status-success-bg); color: var(--status-success-fg); }
.swart-notif-title { font-size: 13px; font-weight: 600; }
.swart-notif-body  { font-size: 12.5px; color: var(--fg-2); margin-top: 2px; line-height: 1.45; }
.swart-notif-meta  { font-size: 11px; color: var(--fg-3); margin-top: 4px; }
.swart-notif-udot  {
  width: 8px; height: 8px; border-radius: 999px;
  background: var(--ui-primary); align-self: center;
}
.swart-notif-ft { padding: 12px 16px; text-align: center; border-top: 1px solid var(--border); font-size: 12.5px; }

/* ---------- Avatars ---------- */
.swart-avi {
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 999px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.swart-avi--blue  { background: #0681c3; }
.swart-avi--teal  { background: #19a0b9; }
.swart-avi--orange{ background: #f8891a; }
.swart-avi--plum  { background: #7c3aed; }
.swart-avi--slate { background: #64748b; }

/* ---------- Tables ---------- */
.swart-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.swart-table thead th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fg-3);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-page);
  position: sticky; top: 0;
}
.swart-table tbody td {
  padding: 12px;
  border-bottom: 1px solid #f3f4f6;
  vertical-align: middle;
}
.swart-table tbody tr { cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.swart-table tbody tr:hover { background: #f9fafb; }
.swart-table tbody tr.is-selected { background: var(--ui-primary-soft); }
.swart-table .swart-primary-col {
  font-weight: 600;
  color: var(--ui-primary);
}
.swart-checkbox {
  width: 16px; height: 16px;
  border: 1.5px solid var(--border-strong);
  border-radius: 3px;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: #fff;
  background: #fff;
  cursor: pointer;
}
.swart-checkbox.is-on { background: var(--ui-primary); border-color: var(--ui-primary); }

/* ---------- Filter bar ---------- */
.swart-filterbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 14px;
}
.swart-fsearch {
  flex: 1;
  max-width: 320px;
  display: flex; align-items: center; gap: 8px;
  height: 34px;
  padding: 0 10px;
  background: var(--bg-page);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--fg-3);
  font-size: 13px;
}
.swart-fsearch input { border:none; background:transparent; outline:none; flex:1; font: 400 13px var(--font-sans); color: var(--fg-1); }
.swart-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--bg-muted);
  font-size: 12px;
  font-weight: 500;
  color: var(--fg-2);
  cursor: pointer;
}
.swart-chip.is-on { background: var(--ui-primary-soft); color: var(--ui-primary); font-weight: 600; }

/* ---------- Dashboard widgets ---------- */
.swart-dash-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.swart-dash-grid > .span-4 { grid-column: span 4; }
.swart-dash-grid > .span-6 { grid-column: span 6; }
.swart-dash-grid > .span-8 { grid-column: span 8; }
.swart-dash-grid > .span-12 { grid-column: span 12; }
@media (max-width: 1024px) {
  .swart-dash-grid > .span-4 { grid-column: span 6; }
  .swart-dash-grid > .span-8 { grid-column: span 12; }
}

/* ---------- Meter (progress bar) ---------- */
.swart-meter {
  height: 8px;
  background: var(--bg-muted);
  border-radius: 999px;
  overflow: hidden;
}
.swart-meter > span { display:block; height:100%; border-radius: 999px; background: var(--ui-primary); transition: width var(--dur-slow); }
.swart-meter--warn > span { background: var(--ui-accent); }
.swart-meter--ok   > span { background: #16a34a; }

/* ---------- Forms ---------- */
.swart-field { display: block; margin-bottom: 14px; }
.swart-field > label {
  display: block; font-size: 12.5px; font-weight: 600; color: var(--fg-1); margin-bottom: 6px;
}
.swart-field .req { color: #dc2626; }
.swart-input, .swart-select, .swart-textarea {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  font: 400 14px var(--font-sans);
  color: var(--fg-1);
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: #fff;
  outline: none;
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.swart-textarea { height: auto; min-height: 90px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.swart-input:focus, .swart-select:focus, .swart-textarea:focus {
  border-color: var(--ui-primary);
  box-shadow: 0 0 0 2px var(--ui-primary-ring);
}
.swart-input.is-error { border-color: #dc2626; }
.swart-input:disabled, .swart-input[readonly] { background: var(--bg-muted); color: var(--fg-4); }
.swart-field .help { font-size: 11.5px; color: var(--fg-3); margin-top: 5px; }
.swart-field .err { font-size: 11.5px; color: #991b1b; margin-top: 5px; display: flex; gap: 5px; align-items: center; }
.swart-field .err::before { content: "⚠"; }

.swart-fieldset {
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 18px 20px 6px;
  margin-bottom: 16px;
}
.swart-fieldset > legend {
  padding: 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--fg-1);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Toast ---------- */
.swart-toast {
  position: fixed;
  bottom: 24px; right: 24px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #05161e;
  color: #fff;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow-xl);
  z-index: 60;
}
.swart-toast--success { background: #064e3b; }
.swart-toast--danger  { background: #7f1d1d; }
.swart-toast .swart-iconbtn { color: rgba(255,255,255,0.8); }
.swart-toast .swart-iconbtn:hover { background: rgba(255,255,255,.1); }

/* ---------- Steps bar (stapsgewijs proces) ---------- */
.swart-steps {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 14px 18px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 18px;
}
.swart-step {
  display: flex; align-items: center; gap: 10px;
  flex: 1;
  color: var(--fg-3);
  font-size: 13px;
  position: relative;
}
.swart-step + .swart-step::before {
  content: "";
  position: absolute;
  left: -16px;
  top: 50%;
  width: 32px; height: 1px;
  background: var(--border);
}
.swart-step-num {
  width: 24px; height: 24px;
  border-radius: 999px;
  background: var(--bg-muted);
  color: var(--fg-3);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center; justify-content: center;
  flex-shrink: 0;
}
.swart-step.is-done .swart-step-num { background: var(--ui-primary); color: #fff; }
.swart-step.is-done { color: var(--ui-primary); }
.swart-step.is-active .swart-step-num { background: var(--ui-primary); color: #fff; }
.swart-step.is-active { color: var(--fg-1); font-weight: 600; }

/* ---------- Inspection form — finding row ---------- */
.swart-finding {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.swart-finding:last-child { border-bottom: none; }
.swart-finding-lbl { font-size: 13.5px; font-weight: 500; }
.swart-finding-sub { font-size: 12px; color: var(--fg-3); margin-top: 2px; }
.swart-segchoice {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: hidden;
}
.swart-segchoice button {
  border: none; background: #fff;
  padding: 6px 12px;
  font: 600 12.5px var(--font-sans);
  color: var(--fg-3);
  cursor: pointer;
  border-right: 1px solid var(--border);
}
.swart-segchoice button:last-child { border-right: none; }
.swart-segchoice button.is-on-ok { background: var(--status-success-bg); color: var(--status-success-fg); }
.swart-segchoice button.is-on-action { background: var(--status-warn-bg); color: var(--status-warn-fg); }
.swart-segchoice button.is-on-na { background: var(--status-neutral-bg); color: var(--status-neutral-fg); }

/* ---------- Equipment QR card ---------- */
.swart-equip {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  align-items: center;
}
.swart-equip-qr {
  width: 48px; height: 48px;
  background: var(--bg-muted);
  border-radius: 6px;
  display: inline-flex;
  align-items: center; justify-content: center;
  color: var(--fg-2);
}

/* ---------- Alerts / inline banners ---------- */
.swart-alert {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1.45;
  border: 1px solid transparent;
}
.swart-alert--danger  { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.swart-alert--warn    { background: #fffbeb; border-color: #fed7aa; color: #9a3412; }
.swart-alert--info    { background: #eff6ff; border-color: #bfdbfe; color: #1e40af; }

/* ---------- Kit-only chrome ---------- */
.kit-switcher {
  position: fixed;
  bottom: 16px; left: 50%;
  transform: translateX(-50%);
  background: #05161e;
  color: #fff;
  padding: 4px;
  border-radius: 999px;
  display: flex;
  gap: 2px;
  box-shadow: var(--shadow-xl);
  z-index: 30;
  font-size: 12.5px;
}
.kit-switcher button {
  border: none;
  background: transparent;
  color: rgba(255,255,255,.75);
  padding: 6px 14px;
  border-radius: 999px;
  font: 600 12.5px var(--font-sans);
  cursor: pointer;
}
.kit-switcher button.is-on { background: var(--ui-primary); color: #fff; }
.kit-switcher button:hover:not(.is-on) { color: #fff; }

/* ---------- Tabs (horizontale sub-navigatie) ---------- */
.swart-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.swart-tabs::-webkit-scrollbar { display: none; }
.swart-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  font: 500 13.5px/1 var(--font-sans);
  color: var(--fg-3);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--dur-fast), border-color var(--dur-fast);
  text-decoration: none;
  margin-bottom: -1px;
}
.swart-tab:hover {
  color: var(--fg-1);
  text-decoration: none;
}
.swart-tab.is-active {
  color: var(--ui-primary);
  font-weight: 600;
  border-bottom-color: var(--ui-primary);
}
.swart-tab-badge {
  background: var(--bg-muted);
  color: var(--fg-3);
  font-size: 10.5px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 16px;
  text-align: center;
}
.swart-tab.is-active .swart-tab-badge {
  background: var(--ui-primary-soft);
  color: var(--ui-primary);
}

/* Utility */
.swart-stack { display: flex; flex-direction: column; gap: 10px; }
.swart-row { display: flex; align-items: center; gap: 10px; }
.swart-spread { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.swart-muted { color: var(--fg-3); }
.swart-strong { font-weight: 600; color: var(--fg-1); }
.swart-num { font-variant-numeric: tabular-nums; }

.swart-kpi { font-size: 28px; font-weight: 700; letter-spacing:-.015em; color: var(--fg-1); }
.swart-kpi small { font-size: 14px; color: var(--fg-3); font-weight: 400; margin-left: 4px; }

/* ==================== HAMBURGER BUTTON ==================== */
.swart-hamburger {
  display: none;  /* verborgen op desktop */
  border: none;
  background: transparent;
  color: var(--fg-2);
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  align-items: center;
  justify-content: center;
  flex: none;
}
.swart-hamburger:hover { background: var(--bg-muted); }

/* ==================== PROFILE DROPDOWN ==================== */
.swart-profile-wrap {
  position: relative;
}
.swart-profile-wrap .swart-avatar {
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.swart-avatar--lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
}
.swart-profile-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-xl);
  z-index: 50;
  display: none;
  flex-direction: column;
  overflow: hidden;
}
.swart-profile-wrap.is-open .swart-profile-menu {
  display: flex;
}
.swart-profile-menu-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
}
.swart-profile-menu-user strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg-1);
}
.swart-profile-menu-user span {
  display: block;
  font-size: 12px;
  color: var(--fg-3);
  margin-top: 1px;
}
.swart-profile-menu-divider {
  height: 1px;
  background: var(--border);
}
.swart-profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--fg-2);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--dur-fast) var(--ease-out);
}
.swart-profile-menu-item:hover {
  background: var(--bg-muted);
  color: var(--fg-1);
}
.swart-profile-menu-item--danger {
  color: #dc2626;
}
.swart-profile-menu-item--danger:hover {
  background: #fef2f2;
  color: #991b1b;
}

/* ==================== RESPONSIVE: TABLET (768–1023px) ==================== */
@media (max-width: 1023px) and (min-width: 768px) {
  .swart-app {
    grid-template-columns: 64px 1fr;
  }
  .swart-content {
    padding: 20px 24px 40px;
  }
  .swart-pagehead h1 {
    font-size: 20px;
  }
  .swart-search {
    max-width: 400px;
  }
  .swart-search kbd { display: none; }
  .swart-dash-grid > .span-4 { grid-column: span 6; }
  .swart-dash-grid > .span-8 { grid-column: span 12; }
}

/* ==================== RESPONSIVE: MOBIEL (<768px) ==================== */
@media (max-width: 767px) {
  .swart-app {
    grid-template-columns: 1fr;
  }
  .swart-hamburger {
    display: inline-flex;
  }

  /* Topbar compacter op mobiel */
  .swart-topbar {
    padding: 0 10px;
    gap: 4px;
  }
  /* Icon buttons: 44px touch targets op mobiel */
  .swart-iconbtn {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
  }
  /* Zoekbalk moet krimpen zodat profiel-icoon niet buiten scherm valt */
  .swart-search {
    max-width: none;
    min-width: 0;
    flex: 1 1 0;
  }
  .swart-search kbd { display: none; }
  .swart-search input::placeholder {
    font-size: 12px;
  }
  .swart-topbar-right {
    gap: 2px;
    flex-shrink: 0;
  }

  /* Content */
  .swart-content {
    padding: 16px 16px 32px;
  }

  /* Pagehead: stack op mobiel */
  .swart-pagehead {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .swart-pagehead h1 {
    font-size: 20px;
  }
  .swart-pagehead-actions {
    width: 100%;
  }
  .swart-pagehead-actions .swart-btn {
    flex: 1;
  }

  /* Dashboard grid: alles 12 kolommen */
  .swart-dash-grid > .span-4,
  .swart-dash-grid > .span-6,
  .swart-dash-grid > .span-8 {
    grid-column: span 12;
  }

  /* Filterbar: wrappen */
  .swart-filterbar {
    flex-wrap: wrap;
  }
  .swart-fsearch {
    max-width: none;
    width: 100%;
  }

  /* Tabellen: horizontaal scrollen met visuele scroll-hint */
  .swart-table-wrap {
    position: relative;
  }
  .swart-table-wrap::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 40px;
    background: linear-gradient(to right, transparent, rgba(0,0,0,0.06) 60%, rgba(0,0,0,0.10));
    pointer-events: none;
    opacity: 1;
    transition: opacity var(--dur-fast);
    z-index: 2;
  }
  .swart-table-wrap.scrolled-end::after {
    opacity: 0;
  }
  .swart-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Tabs: scroll-indicator als er meer tabs zijn dan zichtbaar */
  .swart-tabs {
    position: relative;
  }
  .swart-tabs::after {
    content: "";
    position: sticky;
    right: 0;
    top: 0;
    bottom: 0;
    width: 40px;
    min-height: 100%;
    background: linear-gradient(to right, transparent, var(--bg-surface) 80%);
    pointer-events: none;
    flex-shrink: 0;
  }

  /* Touch targets: row-action buttons minimaal 44px */
  .row-action-btn {
    width: 44px;
    height: 44px;
  }
  /* Paginering: minimaal 44px touch target */
  .pagination-btn {
    min-width: 44px;
    min-height: 44px;
  }

  /* Formuliervelden: minimaal 44px touch target */
  .swart-input, .swart-select {
    height: 44px;
  }

  /* Drawers: full-screen overlay op mobiel */
  .drawer-overlay {
    z-index: 49;
  }
  .drawer {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh;
    height: 100dvh;
    border-left: none;
    border-radius: 0;
    overflow-x: hidden;
    overflow-y: auto;
    left: 0;
    right: auto;
    transform: translateX(100%);
  }
  .drawer.is-open {
    transform: translateX(0);
  }
  .drawer-hd {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-surface);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
  }
  /* Terug-knop in drawer header op mobiel */
  .drawer-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-left: -12px;
    margin-right: 4px;
    border: none;
    background: transparent;
    color: var(--fg-2);
    border-radius: 8px;
    cursor: pointer;
  }
  .drawer-back:active {
    background: var(--bg-muted);
  }
  .drawer-body {
    padding: 16px;
    overflow-x: hidden;
  }
  /* Drawer footer: knoppen stapelen op mobiel */
  .drawer-ft {
    padding: 12px 16px;
    overflow: hidden;
  }
  .drawer-ft-right,
  .drawer-ft > div,
  .drawer-ft {
    flex-wrap: wrap;
    gap: 8px;
  }
  .drawer-ft .swart-btn {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    text-align: center;
    justify-content: center;
  }

  /* Profiel menu breder op mobiel */
  .swart-profile-menu {
    width: calc(100vw - 32px);
    max-width: 280px;
  }

  /* Notificatiepanel volle breedte op mobiel */
  .swart-notif {
    width: 100vw;
    max-width: 100vw;
  }
}
