/* =====================================================================
   Super-admin shell — donker-paarse zijbalk + topbar + content-grid.
   Vervangt de oude shell (cockpit-redesign 2026-05-28).
   ===================================================================== */

/* ---------- Globaal ---------- */
.admin-main { max-width: none !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
.admin-body {
  background: #F9FAFB;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: #111827;
}

.bo-shell { display: flex; align-items: stretch; min-height: 100vh; }

/* =====================================================================
   ZIJBALK
   ===================================================================== */
.bo-sidebar {
  width: 248px;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  box-sizing: border-box;
  background: #1E1B4B;
  color: #E0E7FF;
  display: flex;
  flex-direction: column;
  padding: 18px 14px;
}

/* ----- Workspace switcher bovenaan ----- */
.sa-workspace {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 14px;
}
.sa-ws-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #4F46E5 0%, #10B981 100%);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(79,70,229,.35);
  flex-shrink: 0;
}
.sa-ws-text { line-height: 1.2; min-width: 0; }
.sa-ws-label { font-size: 10px; color: #A5B4FC; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.sa-ws-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ----- Sectie-kop ----- */
.sa-nav-section {
  font-size: 10px;
  color: #818CF8;
  text-transform: uppercase;
  letter-spacing: .1em;
  font-weight: 600;
  padding: 14px 12px 6px;
}

/* ----- Nav-items ----- */
.bo-nav { display: flex; flex-direction: column; gap: 2px; }
.bo-nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  color: #C7D2FE;
  font-size: 13.5px;
  font-weight: 500;
  font-family: inherit;
  transition: background .15s, color .15s;
  position: relative;
}
.bo-nav-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.bo-nav-item.active {
  background: rgba(79,70,229,.32);
  color: #fff;
  font-weight: 600;
}
.bo-nav-ico {
  font-size: 16px;
  width: 18px;
  text-align: center;
  flex-shrink: 0;
}
.sa-nav-badge {
  margin-left: auto;
  background: #312E81;
  color: #C7D2FE;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}
.bo-nav-item.active .sa-nav-badge { background: #4F46E5; color: #fff; }

/* ----- AI-budget-balk ----- */
.sa-budget {
  margin-top: auto;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.sa-budget-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 6px;
}
.sa-budget-label { font-size: 11px; color: #A5B4FC; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.sa-budget-pct { font-size: 11px; color: #C7D2FE; font-weight: 600; }
.sa-budget-amount { font-size: 12px; color: #E0E7FF; margin-bottom: 8px; }
.sa-budget-bar {
  background: rgba(255,255,255,.08);
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}
.sa-budget-fill {
  height: 100%;
  background: linear-gradient(90deg, #4F46E5, #10B981);
  border-radius: 3px;
  transition: width .4s;
}
.sa-budget-fill.over { background: linear-gradient(90deg, #F59E0B, #EF4444); }

/* ----- User-card onderaan ----- */
.sa-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 8px;
  border-top: 1px solid rgba(255,255,255,.08);
  position: relative;
}
.sa-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4F46E5, #7C3AED);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
}
.sa-user-info { line-height: 1.2; min-width: 0; flex: 1; }
.sa-user-name { font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-user-role { font-size: 11px; color: #A5B4FC; }
.sa-user-menu {
  background: transparent;
  border: none;
  color: #A5B4FC;
  cursor: pointer;
  padding: 4px;
  font-size: 18px;
  line-height: 1;
}
.sa-user-menu:hover { color: #fff; }

/* =====================================================================
   TOPBAR
   ===================================================================== */
.sa-topbar {
  height: 60px;
  background: #FFFFFF;
  border-bottom: 1px solid #E5E7EB;
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.sa-breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #6B7280; }
.sa-breadcrumb-cur { color: #111827; font-weight: 600; }
.sa-breadcrumb-sep { color: #D1D5DB; }
.sa-date-filter {
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 5px 10px 5px 12px;
  font-size: 13px;
  font-family: inherit;
  color: #374151;
  cursor: pointer;
}

.sa-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}
.sa-search input {
  width: 100%;
  background: #F3F4F6;
  border: 1px solid #E5E7EB;
  border-radius: 10px;
  padding: 8px 12px 8px 36px;
  font-size: 13px;
  font-family: inherit;
  color: #111827;
  transition: border-color .15s, background .15s;
}
.sa-search input:focus { outline: none; border-color: #818CF8; background: #fff; }
.sa-search-ico {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  color: #9CA3AF;
  font-size: 14px;
  pointer-events: none;
}
.sa-search-kbd {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 11px;
  color: #6B7280;
  font-family: ui-monospace, monospace;
  pointer-events: none;
}

.sa-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #ECFDF5;
  color: #047857;
  border: 1px solid #A7F3D0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}
.sa-status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: #10B981; }
.sa-status-pill.warn { background: #FFFBEB; color: #B45309; border-color: #FDE68A; }
.sa-status-pill.warn .dot { background: #F59E0B; }
.sa-status-pill.err { background: #FEF2F2; color: #B91C1C; border-color: #FECACA; }
.sa-status-pill.err .dot { background: #EF4444; }

.sa-topbar-actions { display: flex; align-items: center; gap: 8px; }
.sa-icon-btn {
  background: transparent;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  width: 34px;
  height: 34px;
  padding: 0;
  cursor: pointer;
  color: #6B7280;
  font-size: 14px;
  display: grid;
  place-items: center;
}
.sa-icon-btn:hover { background: #F9FAFB; color: #111827; }
.sa-btn-export {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 600;
  color: #374151;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sa-btn-export:hover { background: #F9FAFB; }

/* =====================================================================
   CONTENT-GEBIED (binnen bo-main)
   ===================================================================== */
.bo-main {
  flex: 1;
  min-width: 0;
  background: #F9FAFB;
  display: flex;
  flex-direction: column;
}
.bo-content {
  padding: 24px 28px 40px;
  flex: 1;
}

.bo-panel { animation: bo-fade .18s ease; }
.bo-panel[hidden] { display: none; }
@keyframes bo-fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ---------- Header (groet + acties) ---------- */
.sa-page-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  gap: 16px;
  flex-wrap: wrap;
}
.sa-page-head-left { min-width: 0; }
.sa-page-meta { font-size: 12px; color: #9CA3AF; margin-bottom: 4px; }
.sa-page-title {
  font-family: 'Outfit', sans-serif;
  font-size: 30px;
  font-weight: 700;
  color: #111827;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}
.sa-page-sub { font-size: 14px; color: #6B7280; }
.sa-page-head-right { display: flex; gap: 8px; flex-shrink: 0; }
.sa-btn-primary {
  background: #4F46E5;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .15s;
}
.sa-btn-primary:hover { background: #4338CA; }
.sa-btn-secondary {
  background: #fff;
  color: #374151;
  border: 1px solid #E5E7EB;
  border-radius: 8px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.sa-btn-secondary:hover { background: #F9FAFB; }

/* ---------- KPI-tegels (4 op rij) ---------- */
.sa-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.sa-kpi {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 18px 18px 16px;
  position: relative;
}
.sa-kpi-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.sa-kpi-label {
  font-size: 12px;
  color: #6B7280;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 6px;
}
.sa-kpi-ico {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: grid;
  place-items: center;
  font-size: 11px;
}
.sa-kpi-delta {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
}
.sa-kpi-delta.up { background: #ECFDF5; color: #047857; }
.sa-kpi-delta.down { background: #FEF2F2; color: #B91C1C; }
.sa-kpi-value {
  font-family: 'Outfit', sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #111827;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin-bottom: 4px;
}
.sa-kpi-sub { font-size: 12px; color: #6B7280; }
.sa-kpi-spark { height: 28px; margin-top: 6px; }

/* Iconenkleur per KPI */
.sa-kpi.kp-customers .sa-kpi-ico { background: #EEF2FF; color: #4F46E5; }
.sa-kpi.kp-live      .sa-kpi-ico { background: #ECFDF5; color: #059669; }
.sa-kpi.kp-mrr       .sa-kpi-ico { background: #FEF3C7; color: #B45309; }
.sa-kpi.kp-ai        .sa-kpi-ico { background: #F5F3FF; color: #7C3AED; }

/* ---------- AI Insights ---------- */
.sa-insights {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 24px;
}
.sa-insights-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.sa-insights-title {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
  color: #111827;
}
.sa-insights-meta { font-size: 12px; color: #6B7280; }
.sa-insights-link { font-size: 12px; color: #4F46E5; font-weight: 600; text-decoration: none; }
.sa-insights-link:hover { text-decoration: underline; }

.sa-insights-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.sa-insight {
  border-radius: 10px;
  padding: 14px;
  border: 1px solid;
}
.sa-insight.cat-churn   { background: #FEF2F2; border-color: #FECACA; }
.sa-insight.cat-upgrade { background: #ECFDF5; border-color: #A7F3D0; }
.sa-insight.cat-cost    { background: #FFFBEB; border-color: #FDE68A; }
.sa-insight.cat-generic { background: #EEF2FF; border-color: #C7D2FE; }
.sa-insight-cat {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.sa-insight.cat-churn   .sa-insight-cat { color: #B91C1C; }
.sa-insight.cat-upgrade .sa-insight-cat { color: #047857; }
.sa-insight.cat-cost    .sa-insight-cat { color: #B45309; }
.sa-insight.cat-generic .sa-insight-cat { color: #4338CA; }
.sa-insight-title {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 6px;
  line-height: 1.35;
}
.sa-insight-body { font-size: 12.5px; color: #4B5563; line-height: 1.5; margin-bottom: 10px; }
.sa-insight-action {
  display: inline-block;
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  text-decoration: none;
}
.sa-insight-action:hover { background: #F9FAFB; }

/* ---------- Twee-koloms-rij (grafiek + donut) ---------- */
.sa-two-col {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
  margin-bottom: 24px;
}
.sa-card {
  background: #fff;
  border: 1px solid #E5E7EB;
  border-radius: 14px;
  padding: 18px;
}
.sa-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.sa-card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #111827;
}
.sa-card-sub { font-size: 12px; color: #6B7280; }
.sa-tabs {
  display: inline-flex;
  background: #F3F4F6;
  border-radius: 7px;
  padding: 2px;
}
.sa-tab {
  background: transparent;
  border: none;
  padding: 4px 10px;
  font-size: 12px;
  font-family: inherit;
  font-weight: 500;
  color: #6B7280;
  cursor: pointer;
  border-radius: 5px;
}
.sa-tab.active { background: #fff; color: #111827; box-shadow: 0 1px 2px rgba(0,0,0,.06); }

.sa-chart-wrap { height: 240px; position: relative; }
.sa-sub-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid #F3F4F6;
}
.sa-sub-metric { }
.sa-sub-label { font-size: 11px; color: #9CA3AF; text-transform: uppercase; letter-spacing: .05em; font-weight: 600; margin-bottom: 4px; }
.sa-sub-value {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: #111827;
  margin-bottom: 2px;
}
.sa-sub-delta { font-size: 11px; color: #6B7280; }
.sa-sub-delta.up { color: #047857; }
.sa-sub-delta.down { color: #B91C1C; }

.sa-donut-wrap { display: flex; align-items: center; gap: 16px; }
.sa-donut { width: 130px; height: 130px; position: relative; flex-shrink: 0; }
.sa-donut-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  text-align: center;
  pointer-events: none;
}
.sa-donut-center .lbl { font-size: 10px; color: #9CA3AF; text-transform: uppercase; letter-spacing: .05em; }
.sa-donut-center .val { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: #111827; }
.sa-donut-legend { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.sa-donut-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: #374151; }
.sa-donut-swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.sa-donut-pct { margin-left: auto; font-weight: 600; color: #111827; }

/* ---------- Twee-koloms-rij (tabel + activity) ---------- */
.sa-two-col-2 {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 16px;
}

.sa-table { width: 100%; border-collapse: collapse; }
.sa-table th {
  text-align: left;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #9CA3AF;
  font-weight: 600;
  padding: 8px 10px;
  border-bottom: 1px solid #F3F4F6;
}
.sa-table td {
  padding: 11px 10px;
  border-bottom: 1px solid #F3F4F6;
  font-size: 13px;
  color: #374151;
  vertical-align: middle;
}
.sa-table tr:last-child td { border-bottom: none; }
.sa-table tr:hover td { background: #F9FAFB; }
.sa-table-client { display: flex; align-items: center; gap: 10px; }
.sa-table-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: #EEF2FF;
  color: #4F46E5;
  font-size: 12px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.sa-table-client-name { font-weight: 600; color: #111827; line-height: 1.2; }
.sa-table-client-domain { font-size: 11px; color: #9CA3AF; }
.sa-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}
.sa-badge.plan-enterprise { background: #F5F3FF; color: #6D28D9; }
.sa-badge.plan-pro { background: #EEF2FF; color: #4338CA; }
.sa-badge.plan-trial { background: #FFFBEB; color: #B45309; }
.sa-badge.status-active { background: #ECFDF5; color: #047857; }
.sa-badge.status-trial { background: #FFFBEB; color: #B45309; }
.sa-badge.status-paused { background: #F3F4F6; color: #6B7280; }
.sa-table-sparkline { width: 80px; height: 24px; }

/* ---------- Activity feed ---------- */
.sa-activity-list { display: flex; flex-direction: column; gap: 2px; }
.sa-activity-item {
  display: flex;
  gap: 10px;
  padding: 10px 4px;
  border-bottom: 1px solid #F3F4F6;
}
.sa-activity-item:last-child { border-bottom: none; }
.sa-activity-ico {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 13px;
  flex-shrink: 0;
}
.sa-activity-ico.ev-interview { background: #EEF2FF; color: #4F46E5; }
.sa-activity-ico.ev-ai        { background: #F5F3FF; color: #7C3AED; }
.sa-activity-ico.ev-user      { background: #ECFDF5; color: #059669; }
.sa-activity-ico.ev-plan      { background: #FEF3C7; color: #B45309; }
.sa-activity-ico.ev-invoice   { background: #FEF3C7; color: #B45309; }
.sa-activity-ico.ev-export    { background: #EEF2FF; color: #4338CA; }
.sa-activity-ico.ev-system    { background: #F3F4F6; color: #6B7280; }
.sa-activity-body { flex: 1; min-width: 0; }
.sa-activity-title { font-size: 13px; font-weight: 600; color: #111827; line-height: 1.2; }
.sa-activity-sub { font-size: 12px; color: #6B7280; margin-top: 2px; }
.sa-activity-time { font-size: 11px; color: #9CA3AF; white-space: nowrap; }

.sa-realtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ECFDF5;
  color: #047857;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
}
.sa-realtime-pill .dot {
  width: 6px; height: 6px; border-radius: 50%; background: #10B981;
  animation: sa-pulse 1.4s infinite ease-in-out;
}
@keyframes sa-pulse { 0%,100% { opacity: 1; } 50% { opacity: .4; } }

/* ---------- Placeholder-panelen voor 6 "binnenkort" ---------- */
.sa-placeholder {
  background: #fff;
  border: 1px dashed #D1D5DB;
  border-radius: 14px;
  padding: 60px 24px;
  text-align: center;
  color: #6B7280;
}
.sa-placeholder-ico { font-size: 32px; margin-bottom: 12px; opacity: .5; }
.sa-placeholder-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: #374151; margin-bottom: 6px; }
.sa-placeholder-body { font-size: 13px; max-width: 380px; margin: 0 auto; line-height: 1.5; }

/* ---------- Empty-state binnen widgets ---------- */
.sa-empty {
  padding: 24px;
  text-align: center;
  color: #9CA3AF;
  font-size: 13px;
}

/* ---------- Cmd+K modal ---------- */
.sa-cmdk-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.5);
  z-index: 1000;
  display: grid;
  place-items: start center;
  padding-top: 14vh;
}
.sa-cmdk-backdrop[hidden] { display: none; }
.sa-cmdk-modal {
  width: 560px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 25px 80px rgba(0,0,0,.3);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: 60vh;
}
.sa-cmdk-input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid #F3F4F6;
}
.sa-cmdk-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  background: transparent;
}
.sa-cmdk-list { overflow-y: auto; padding: 8px 0; }
.sa-cmdk-group-head {
  font-size: 10px;
  color: #9CA3AF;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 600;
  padding: 10px 18px 4px;
}
.sa-cmdk-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  cursor: pointer;
  font-size: 13.5px;
  color: #111827;
}
.sa-cmdk-item:hover, .sa-cmdk-item.focused { background: #EEF2FF; }
.sa-cmdk-item-sub { font-size: 11px; color: #6B7280; margin-left: auto; }

/* =====================================================================
   AI-rapportage paneel (modal-overlay)
   ===================================================================== */
.sa-report-backdrop {
  position: fixed; inset: 0;
  background: rgba(17,24,39,.5);
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
}
.sa-report-backdrop[hidden] { display: none; }
.sa-report-modal {
  width: 720px;
  max-width: 100%;
  max-height: 85vh;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 25px 80px rgba(0,0,0,.3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.sa-report-head {
  padding: 18px 22px;
  border-bottom: 1px solid #F3F4F6;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.sa-report-title { font-family: 'Outfit', sans-serif; font-size: 18px; font-weight: 700; color: #111827; }
.sa-report-body { padding: 22px; overflow-y: auto; line-height: 1.6; color: #374151; font-size: 14px; }
.sa-report-body h2 { font-family: 'Outfit', sans-serif; font-size: 16px; font-weight: 700; color: #111827; margin: 18px 0 6px; }
.sa-report-body h3 { font-size: 14px; font-weight: 700; color: #111827; margin: 14px 0 4px; }
.sa-report-body p { margin-bottom: 10px; }
.sa-report-body ul, .sa-report-body ol { margin: 6px 0 12px 22px; }
.sa-report-body li { margin-bottom: 4px; }

/* =====================================================================
   Responsive — kleine schermen
   ===================================================================== */
@media (max-width: 1100px) {
  .sa-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .sa-insights-grid { grid-template-columns: 1fr; }
  .sa-two-col, .sa-two-col-2 { grid-template-columns: 1fr; }
  .sa-sub-metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px) {
  .bo-shell { flex-direction: column; }
  .bo-sidebar { width: 100%; height: auto; position: static; }
  .sa-topbar { padding: 0 12px; gap: 8px; }
  .sa-search { display: none; }
  .bo-content { padding: 16px; }
  .sa-page-title { font-size: 22px; }
}

/* =====================================================================
   Facturatie-paneel (facturatie.js) — bouwt op het sa- design-systeem
   ===================================================================== */
.fac { display: flex; flex-direction: column; gap: 18px; }

/* Kop-bediening: maandkiezer + demo-schakelaar */
.fac-controls { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.fac-month { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #E5E7EB; border-radius: 10px; padding: 2px; }
.fac-arrow { width: 28px; height: 28px; border: none; background: transparent; border-radius: 7px; cursor: pointer; font-size: 18px; color: #4B5563; line-height: 1; }
.fac-arrow:hover:not(:disabled) { background: #F3F4F6; }
.fac-arrow:disabled { opacity: .35; cursor: default; }
.fac-month-lbl { min-width: 96px; text-align: center; font-weight: 600; font-size: 13px; color: #111827; }
.fac-demo { display: inline-flex; align-items: center; gap: 7px; background: #fff; border: 1px solid #E5E7EB; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12px; font-weight: 600; color: #6B7280; }
.fac-demo-dot { width: 8px; height: 8px; border-radius: 50%; background: #D1D5DB; }
.fac-demo.on { color: #4338CA; border-color: #C7D2FE; background: #EEF2FF; }
.fac-demo.on .fac-demo-dot { background: #6366F1; }

/* KPI-icoonkleuren (alleen binnen .fac, zodat het Overzicht ongemoeid blijft) */
.fac .sa-kpi.kp-mrr  .sa-kpi-ico { background: #ECFDF5; color: #059669; }
.fac .sa-kpi.kp-arr  .sa-kpi-ico { background: #F5F3FF; color: #7C3AED; }
.fac .sa-kpi.kp-open .sa-kpi-ico { background: #FEF3C7; color: #B45309; }
.fac .sa-kpi.kp-late .sa-kpi-ico { background: #FEF2F2; color: #DC2626; }
.sa-kpi-delta.up { color: #047857; }
.sa-kpi-delta.down { color: #B91C1C; }

/* Twee kolommen: grafiek + plan-verdeling */
.fac-two { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }
.fac-chart-wrap { height: 260px; padding: 8px 4px 0; }

/* Verdeling op plan */
.fac-plan { display: flex; flex-direction: column; gap: 16px; padding: 4px 2px; }
.fac-plan-row { display: flex; flex-direction: column; gap: 5px; }
.fac-plan-top { display: flex; justify-content: space-between; align-items: baseline; }
.fac-plan-name { font-weight: 600; color: #111827; font-size: 14px; }
.fac-plan-count { font-size: 12px; color: #6B7280; }
.fac-plan-bar { height: 7px; background: #F3F4F6; border-radius: 4px; overflow: hidden; }
.fac-plan-fill { height: 100%; border-radius: 4px; }
.fac-plan-meta { font-size: 12px; color: #6B7280; }

/* Facturenlijst */
.fac-table th, .fac-table td { font-size: 13px; }
.fac-mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: #4B5563; }
.fac-amount { font-weight: 600; color: #111827; white-space: nowrap; }
.fac-demo-tag { font-size: 10px; font-weight: 600; color: #9CA3AF; border: 1px solid #E5E7EB; border-radius: 4px; padding: 0 4px; margin-left: 4px; vertical-align: middle; }
.fac-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; }
.fac-badge.ok    { background: #ECFDF5; color: #047857; }
.fac-badge.open  { background: #EFF6FF; color: #1D4ED8; }
.fac-badge.late  { background: #FEF2F2; color: #B91C1C; }
.fac-badge.draft { background: #F3F4F6; color: #6B7280; }

/* Rij-acties + menu */
.fac-row-act { text-align: right; }
.fac-dots { border: none; background: transparent; cursor: pointer; font-size: 18px; color: #9CA3AF; line-height: 1; padding: 2px 8px; border-radius: 6px; }
.fac-dots:hover { background: #F3F4F6; color: #4B5563; }
.fac-menu { position: absolute; z-index: 1000; width: 184px; background: #fff; border: 1px solid #E5E7EB; border-radius: 10px; box-shadow: 0 8px 24px rgba(17,24,39,.12); padding: 5px; display: flex; flex-direction: column; }
.fac-menu button { text-align: left; border: none; background: transparent; padding: 8px 10px; border-radius: 7px; cursor: pointer; font-size: 13px; color: #374151; }
.fac-menu button:hover { background: #F3F4F6; }

.fac .sa-btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.fac .sa-btn-primary:disabled:hover { background: #4F46E5; }
.fac-empty { text-align: center; color: #9CA3AF; padding: 22px; font-size: 13px; }

/* Sparklines in de KPI-kaarten */
.sa-kpi-spark svg { width: 100%; height: 100%; display: block; }

/* Bevestiging (eigen modal i.p.v. native confirm) */
.fac-confirm-back { position: fixed; inset: 0; background: rgba(17,24,39,.35); display: flex; align-items: center; justify-content: center; z-index: 3000; }
.fac-confirm { background: #fff; border-radius: 14px; padding: 22px 22px 18px; width: 340px; max-width: 90vw; box-shadow: 0 20px 50px rgba(17,24,39,.25); }
.fac-confirm-msg { font-size: 14px; color: #111827; margin-bottom: 18px; }
.fac-confirm-btns { display: flex; justify-content: flex-end; gap: 8px; }
.fac-confirm-btns button { padding: 8px 16px; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid #E5E7EB; }
.fac-c-no { background: #fff; color: #374151; }
.fac-c-no:hover { background: #F9FAFB; }
.fac-c-yes { background: #4F46E5; color: #fff; border-color: #4F46E5; }
.fac-c-yes:hover { background: #4338CA; }

/* Toast-melding na een rij-actie */
.fac-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(17,24,39,.2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 3000; }
.fac-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.fac-toast.ok { background: #065F46; }
.fac-toast.err { background: #991B1B; }

@media (max-width: 1100px) {
  .fac-two { grid-template-columns: 1fr; }
}

/* =====================================================================
   Supporttickets-paneel (supporttickets.js)
   ===================================================================== */
.st { display: flex; flex-direction: column; gap: 18px; }
.st .sa-kpi.kp-open .sa-kpi-ico { background: #EFF6FF; color: #1D4ED8; }
.st .sa-kpi.kp-prog .sa-kpi-ico { background: #FEF3C7; color: #B45309; }
.st .sa-kpi.kp-done .sa-kpi-ico { background: #ECFDF5; color: #059669; }
.st .sa-kpi.kp-high .sa-kpi-ico { background: #FEF2F2; color: #DC2626; }

/* Toolbar: filtertabs + zoek */
.st-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.st-tabs { display: flex; gap: 4px; background: #F3F4F6; padding: 3px; border-radius: 10px; }
.st-tab { border: none; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: #6B7280; cursor: pointer; }
.st-tab:hover { color: #111827; }
.st-tab.active { background: #fff; color: #4338CA; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.st-tab-n { color: #9CA3AF; font-weight: 600; margin-left: 2px; }
.st-tab.active .st-tab-n { color: #818CF8; }
.st-search-wrap { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #E5E7EB; border-radius: 9px; padding: 6px 10px; color: #9CA3AF; }
.st-search-wrap input { border: none; outline: none; font-size: 13px; width: 230px; max-width: 46vw; background: transparent; color: #111827; }

/* Lijst */
.st-table th, .st-table td { font-size: 13px; vertical-align: middle; }
.st-table tbody tr { cursor: pointer; }
.st-subj { max-width: 360px; }
.st-subj-title { display: block; font-weight: 600; color: #111827; }
.st-subj-rep { display: block; font-size: 12px; color: #9CA3AF; }
.st-when { color: #6B7280; white-space: nowrap; }
.st-badge { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.st-badge.open { background: #EFF6FF; color: #1D4ED8; }
.st-badge.prog { background: #FEF3C7; color: #B45309; }
.st-badge.done { background: #ECFDF5; color: #047857; }
.st-badge.prio.low    { background: #F9FAFB; color: #9CA3AF; border: 1px solid #F1F3F5; }
.st-badge.prio.normal { background: #F3F4F6; color: #4B5563; }
.st-badge.prio.high   { background: #FEF2F2; color: #B91C1C; }
.st-empty { text-align: center; color: #9CA3AF; padding: 22px; font-size: 13px; }
.st-muted { color: #9CA3AF; }

/* Detail-paneel (rechts inschuivend) */
.st-overlay { position: fixed; inset: 0; background: rgba(17,24,39,.35); display: flex; justify-content: flex-end; z-index: 3000; }
.st-panel { width: 480px; max-width: 94vw; height: 100%; background: #fff; display: flex; flex-direction: column; box-shadow: -8px 0 30px rgba(17,24,39,.18); }
.st-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 14px; border-bottom: 1px solid #F1F3F5; }
.st-panel-title { font-size: 17px; font-weight: 700; color: #111827; }
.st-panel-sub { font-size: 12px; color: #6B7280; margin-top: 3px; }
.st-close { border: none; background: transparent; font-size: 22px; line-height: 1; color: #9CA3AF; cursor: pointer; padding: 0 4px; }
.st-close:hover { color: #4B5563; }
.st-panel-body { padding: 16px 22px; overflow-y: auto; flex: 1; }
.st-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-bottom: 16px; }
.st-meta-grid .st-k { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: #9CA3AF; }
.st-meta-grid .st-v { display: block; font-size: 13px; color: #111827; margin-top: 2px; }
.st-section-lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: #9CA3AF; margin: 14px 0 6px; }
.st-body { font-size: 14px; color: #374151; line-height: 1.5; white-space: pre-wrap; }
.st-edit { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 6px; }
.st-edit label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: #6B7280; }
.st-edit label:nth-child(3) { grid-column: 1 / -1; }
.st-edit select { padding: 8px 10px; border: 1px solid #E5E7EB; border-radius: 8px; font-size: 13px; color: #111827; background: #fff; }
.st-note { width: 100%; min-height: 72px; padding: 10px; border: 1px solid #E5E7EB; border-radius: 8px; font-size: 13px; color: #111827; resize: vertical; font-family: inherit; }
.st-panel-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 22px; border-top: 1px solid #F1F3F5; }
.st-btn-ghost { padding: 8px 16px; border: 1px solid #E5E7EB; background: #fff; color: #374151; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.st-btn-ghost:hover { background: #F9FAFB; }
.st-btn-primary { padding: 8px 18px; border: none; background: #4F46E5; color: #fff; border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer; }
.st-btn-primary:hover { background: #4338CA; }
.st-btn-primary:disabled { opacity: .6; cursor: default; }

/* Toast */
.st-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(17,24,39,.2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 3200; }
.st-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.st-toast.ok { background: #065F46; }
.st-toast.err { background: #991B1B; }

@media (max-width: 700px) {
  .st-edit, .st-meta-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Audit log-paneel (auditlog.js)
   ===================================================================== */
.al { display: flex; flex-direction: column; gap: 18px; }
.al-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.al-filters { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.al-select { padding: 7px 10px; border: 1px solid #E5E7EB; border-radius: 9px; font-size: 13px; color: #111827; background: #fff; }
.al-tabs { display: flex; gap: 4px; background: #F3F4F6; padding: 3px; border-radius: 10px; }
.al-tab { border: none; background: transparent; padding: 6px 12px; border-radius: 7px; font-size: 13px; font-weight: 600; color: #6B7280; cursor: pointer; }
.al-tab:hover { color: #111827; }
.al-tab.active { background: #fff; color: #4338CA; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.al-search-wrap { display: flex; align-items: center; gap: 6px; background: #fff; border: 1px solid #E5E7EB; border-radius: 9px; padding: 6px 10px; color: #9CA3AF; }
.al-search-wrap input { border: none; outline: none; font-size: 13px; width: 200px; max-width: 42vw; background: transparent; color: #111827; }

.al-table th, .al-table td { font-size: 13px; vertical-align: middle; }
.al-time { color: #6B7280; white-space: nowrap; font-size: 12px; }
.al-ev { display: inline-flex; align-items: center; font-size: 13px; font-weight: 600; color: #374151; white-space: nowrap; }
.al-ico { width: 24px; height: 24px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; margin-right: 8px; flex-shrink: 0; }
.al-ico.interview { background: #EEF2FF; color: #4F46E5; }
.al-ico.ai        { background: #F5F3FF; color: #7C3AED; }
.al-ico.user      { background: #ECFEFF; color: #0E7490; }
.al-ico.plan      { background: #ECFDF5; color: #059669; }
.al-ico.invoice   { background: #FEF3C7; color: #B45309; }
.al-ico.ok        { background: #ECFDF5; color: #047857; }
.al-ico.bad       { background: #FEF2F2; color: #B91C1C; }
.al-ico.export    { background: #EFF6FF; color: #1D4ED8; }
.al-ico.system    { background: #F3F4F6; color: #6B7280; }
.al-what .al-title { display: block; color: #111827; }
.al-what .al-sub { display: block; font-size: 12px; color: #9CA3AF; }
.al-who { color: #4B5563; }

.al-more-wrap { text-align: center; padding: 12px 0 2px; }
.al-more { border: 1px solid #E5E7EB; background: #fff; color: #4338CA; font-weight: 600; font-size: 13px; padding: 8px 18px; border-radius: 9px; cursor: pointer; }
.al-more:hover { background: #F9FAFB; }
.al-empty { text-align: center; color: #9CA3AF; padding: 22px; font-size: 13px; }

.al-toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #111827; color: #fff; padding: 11px 18px; border-radius: 10px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(17,24,39,.2); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 3200; }
.al-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.al-toast.ok { background: #065F46; }
.al-toast.err { background: #991B1B; }
