:root {
  --navy: #073889;
  --navy-dark: #052763;
  --navy-soft: #e8eef9;
  --orange: #f46015;
  --orange-dark: #d84e0a;
  --sky: #009cdc;
  --sky-soft: #e6f5fc;
  --ink: #0e1a32;
  --muted: #5b6478;
  --line: #e6eaf3;
  --line-soft: #eef1f7;
  --bg: #f5f7fc;
  --card: #ffffff;
  --success: #0e8a5f;
  --danger: #b42318;
  --warn: #b54708;
  --shadow-sm: 0 2px 6px rgba(7, 56, 137, 0.05);
  --shadow-md: 0 8px 22px rgba(7, 56, 137, 0.09);
  --shadow-lg: 0 16px 38px rgba(7, 56, 137, 0.14);
  --gradient-hero: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  --gradient-orange-soft: linear-gradient(135deg, rgba(244, 96, 21, 0.10) 0%, rgba(244, 96, 21, 0.02) 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: 'Exo', sans-serif; color: var(--navy); margin: 0 0 12px; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: 30px; }
h2 { font-size: 22px; }
h3 { font-size: 17px; }
p { margin: 0 0 10px; }
a { color: var(--navy); }

/* Boot spinner */
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--navy-soft);
  border-top-color: var(--navy);
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Login */
.login-wrap {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 700px at 15% 10%, #0a4cb1 0%, rgba(10,76,177,0) 60%),
              radial-gradient(900px 600px at 90% 90%, #0bb0ef 0%, rgba(11,176,239,0) 55%),
              linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%);
  padding: 24px;
  overflow: hidden;
}
.login-bg { position: absolute; inset: 0; pointer-events: none; }
.login-bg .blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float 14s ease-in-out infinite;
}
.login-bg .blob-1 {
  width: 380px; height: 380px;
  background: var(--orange);
  top: -120px; left: -100px;
  animation-delay: 0s;
}
.login-bg .blob-2 {
  width: 460px; height: 460px;
  background: var(--sky);
  bottom: -160px; right: -120px;
  animation-delay: -4s;
}
.login-bg .blob-3 {
  width: 280px; height: 280px;
  background: #ffb27a;
  top: 40%; right: 8%;
  opacity: 0.35;
  animation-delay: -8s;
}
@keyframes float {
  0%,100% { transform: translate(0,0) scale(1); }
  50% { transform: translate(20px,-25px) scale(1.06); }
}
.login-bg .spark {
  position: absolute;
  color: #fff;
  font-size: 22px;
  opacity: 0.7;
  animation: twinkle 3s ease-in-out infinite;
  text-shadow: 0 0 12px rgba(255,255,255,0.5);
}
.login-bg .spark-1 { top: 18%; left: 22%; animation-delay: 0s; }
.login-bg .spark-2 { top: 70%; left: 14%; font-size: 16px; animation-delay: -1s; }
.login-bg .spark-3 { top: 28%; right: 18%; font-size: 18px; animation-delay: -2s; }
@keyframes twinkle {
  0%,100% { opacity: 0.3; transform: scale(0.9); }
  50% { opacity: 0.9; transform: scale(1.15); }
}

/* Rondvliegende euro-tekens */
.login-bg .euro {
  position: absolute;
  font-family: 'Exo', sans-serif;
  font-weight: 800;
  color: #fff;
  opacity: 0.18;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.35);
  user-select: none;
  will-change: transform;
  animation-name: floatEuro;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
.login-bg .euro { color: var(--orange); text-shadow: 0 0 18px rgba(244, 96, 21, 0.55); }
.login-bg .euro-1 { top: 12%; left: 8%;  font-size: 42px; animation-duration: 11s; animation-delay: 0s;  opacity: 0.85; }
.login-bg .euro-2 { top: 22%; left: 82%; font-size: 58px; animation-duration: 13s; animation-delay: -2s; opacity: 0.75; }
.login-bg .euro-3 { top: 68%; left: 10%; font-size: 36px; animation-duration: 9s;  animation-delay: -4s; opacity: 0.70; }
.login-bg .euro-4 { top: 78%; left: 72%; font-size: 68px; animation-duration: 15s; animation-delay: -6s; opacity: 0.80; }
.login-bg .euro-5 { top: 45%; left: 5%;  font-size: 28px; animation-duration: 8s;  animation-delay: -1s; opacity: 0.90; }
.login-bg .euro-6 { top: 8%;  left: 48%; font-size: 32px; animation-duration: 12s; animation-delay: -3s; opacity: 0.75; }
.login-bg .euro-7 { top: 88%; left: 38%; font-size: 46px; animation-duration: 14s; animation-delay: -5s; opacity: 0.70; }
.login-bg .euro-8 { top: 55%; left: 90%; font-size: 38px; animation-duration: 10s; animation-delay: -7s; opacity: 0.80; }

@keyframes floatEuro {
  0%   { transform: translate(0, 0) rotate(-8deg); }
  25%  { transform: translate(28px, -22px) rotate(6deg); }
  50%  { transform: translate(-18px, -40px) rotate(-4deg); }
  75%  { transform: translate(-32px, -14px) rotate(10deg); }
  100% { transform: translate(0, 0) rotate(-8deg); }
}

@media (prefers-reduced-motion: reduce) {
  .login-bg .euro, .login-bg .blob, .login-bg .spark { animation: none; }
}

.login-card {
  position: relative;
  background: #fff;
  padding: 48px 44px 40px;
  border-radius: 24px;
  width: 100%;
  max-width: 460px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(5, 22, 58, 0.35), 0 2px 0 rgba(255,255,255,0.6) inset;
  animation: popIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1.2);
}
@keyframes popIn {
  from { opacity: 0; transform: translateY(20px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-hero {
  width: 104px;
  height: 104px;
  margin: -92px auto 18px;
  border-radius: 28px;
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 30px rgba(7, 56, 137, 0.35), 0 0 0 6px #fff;
  transform: rotate(-4deg);
  transition: transform 0.4s ease;
}
.login-hero:hover { transform: rotate(0deg) scale(1.04); }
.login-hero .hero-logo {
  width: 68px;
  height: auto;
  filter: brightness(0) invert(1);
}
.bonus-title {
  font-family: 'Exo', sans-serif;
  font-weight: 800;
  font-size: clamp(36px, 6vw, 44px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0 0 10px;
}
.login-lead { color: var(--muted); margin: 0 0 26px; font-size: 15.5px; }
.login-card p { color: var(--muted); }
.ms-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--orange) 0%, #ff7a33 100%);
  color: #fff;
  font-size: 16px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  font-family: inherit;
  letter-spacing: 0.01em;
  box-shadow: 0 10px 22px rgba(244, 96, 21, 0.35);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}
.ms-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 28px rgba(244, 96, 21, 0.45); filter: brightness(1.03); }
.ms-btn:active { transform: translateY(0); }
.ms-btn svg { width: 20px; height: 20px; background: #fff; padding: 2px; border-radius: 4px; }
.login-note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 18px;
  background: var(--navy-soft);
  border-radius: 10px;
  padding: 10px 14px;
}
.login-note strong { color: var(--navy); font-weight: 700; }
.error-box { background: #fde8e8; color: var(--danger); border-radius: 10px; padding: 10px 14px; font-size: 14px; margin-bottom: 16px; text-align: left; }

@media (max-width: 480px) {
  .login-card { padding: 40px 24px 28px; border-radius: 20px; }
  .login-hero { width: 88px; height: 88px; margin-top: -72px; }
  .login-hero .hero-logo { width: 56px; }
}

/* App shell */
.app {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--navy);
  color: #fff;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
}
.sidebar .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
  padding: 0 8px;
}
.sidebar .brand img { height: 44px; }
.sidebar .brand-text { font-family: 'Exo', sans-serif; font-weight: 700; font-size: 22px; letter-spacing: 0.05em; }
.sidebar .section-label {
  color: rgba(255,255,255,0.55);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin: 16px 8px 6px;
}
.sidebar a {
  display: block;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
}
.sidebar a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar a.active { background: rgba(255,255,255,0.16); color: #fff; }
.sidebar a { display: flex; align-items: center; gap: 8px; justify-content: space-between; }
.sidebar a .nav-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-badge {
  background: var(--orange);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 3px rgba(244, 96, 21, 0.18);
  flex-shrink: 0;
}
.sidebar .user-chip {
  margin-top: auto;
  padding: 14px;
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  font-size: 13px;
}
.sidebar .user-chip .pill {
  background: rgba(255,255,255,0.14);
  color: #fff;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.sidebar .user-chip .name { font-weight: 600; }
.sidebar .user-chip .email { color: rgba(255,255,255,0.6); font-size: 12px; }
.sidebar .logout {
  background: transparent;
  color: rgba(255,255,255,0.8);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 10px;
  font-size: 13px;
  cursor: pointer;
  width: 100%;
  font-family: inherit;
}
.sidebar .logout:hover { background: rgba(255,255,255,0.1); }

.main {
  padding: 32px 40px 48px;
  max-width: 1400px;
  width: 100%;
}
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 22px;
  gap: 16px;
  flex-wrap: wrap;
}
.page-head h1 { margin-bottom: 4px; }
.page-head .sub { color: var(--muted); font-size: 14.5px; margin-top: 0; }

/* Cards & grids */
.card {
  background: var(--card);
  border-radius: 16px;
  padding: 22px 24px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  transition: box-shadow 0.18s ease, border-color 0.18s ease;
}
.card + .card { margin-top: 16px; }
.card.interactive { cursor: pointer; }
.card.interactive:hover { box-shadow: var(--shadow-md); border-color: #c8d4ee; }
.grid-2 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.stat {
  background: var(--card);
  border-radius: 16px;
  padding: 20px 22px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}
.stat:hover { box-shadow: var(--shadow-md); }
.stat .label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.stat .value { font-family: 'Exo', sans-serif; font-size: 30px; color: var(--navy); font-weight: 700; margin-top: 6px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.stat.accent {
  background: var(--gradient-hero);
  color: #fff;
  border: 0;
  padding: 22px 24px;
  box-shadow: 0 12px 28px rgba(7, 56, 137, 0.20);
}
.stat.accent:hover { box-shadow: 0 16px 36px rgba(7, 56, 137, 0.28); }
.stat.accent .label, .stat.accent .hint { color: rgba(255,255,255,0.88); }
.stat.accent .value { color: #fff; font-size: 34px; font-weight: 800; }
.stat.accent-orange {
  background: linear-gradient(135deg, #f46015 0%, #ff8a3d 100%);
  color: #fff;
  border: 0;
  padding: 22px 24px;
  box-shadow: 0 12px 28px rgba(244, 96, 21, 0.22);
}
.stat.accent-orange:hover { box-shadow: 0 16px 36px rgba(244, 96, 21, 0.32); }
.stat.accent-orange .label, .stat.accent-orange .hint { color: rgba(255,255,255,0.92); }
.stat.accent-orange .value { color: #fff; font-size: 34px; font-weight: 800; }

.stat .live-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: liveDotPulse 1.6s ease-out infinite;
}
@keyframes liveDotPulse {
  0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

/* Tables */
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th, table.data td {
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
}
table.data th { color: var(--muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; background: #f7f9fc; border-bottom-color: var(--line); }
table.data tbody tr { transition: background 0.12s ease; }
table.data tbody tr:hover { background: #f6f8fc; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tfoot tr td {
  background: #f4f7fc;
  border-top: 2px solid #d7def0;
  border-bottom: 0;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}
table.data td .tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }
.tag.ok { background: #e4f5ed; color: var(--success); }
.tag.excl { background: #fde8e8; color: var(--danger); }
.tag.warn { background: #fff1e0; color: var(--warn); }
.tag.info { background: var(--sky-soft); color: var(--sky); }
.tag.muted { background: #eef0f5; color: var(--muted); }

/* Buttons */
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 10px 18px;
  border-radius: 12px;
  border: 0;
  cursor: pointer;
  background: var(--navy);
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: background 0.15s ease, box-shadow 0.18s ease, transform 0.12s ease;
  box-shadow: 0 4px 12px rgba(7, 56, 137, 0.16);
}
.btn:hover { background: var(--navy-dark); box-shadow: 0 8px 18px rgba(7, 56, 137, 0.22); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); box-shadow: none; }
.btn.ghost:hover { background: var(--navy-soft); border-color: #c8d4ee; box-shadow: none; transform: none; }
.btn.ghost.danger { color: var(--danger); border-color: rgba(180, 35, 24, 0.25); background: transparent; }
.btn.ghost.danger:hover { background: rgba(180, 35, 24, 0.08); border-color: rgba(180, 35, 24, 0.5); }
.btn.orange { background: linear-gradient(135deg, var(--orange) 0%, #ff7a33 100%); box-shadow: 0 8px 18px rgba(244, 96, 21, 0.28); }
.btn.orange:hover { background: linear-gradient(135deg, var(--orange-dark) 0%, var(--orange) 100%); box-shadow: 0 12px 26px rgba(244, 96, 21, 0.36); }
.btn.danger { background: var(--danger); box-shadow: 0 6px 16px rgba(180, 35, 24, 0.22); }
.btn.danger:hover { background: #951c11; box-shadow: 0 10px 22px rgba(180, 35, 24, 0.30); }
.btn:disabled { opacity: .5; cursor: not-allowed; box-shadow: none; transform: none; }
.btn.small { font-size: 12px; padding: 6px 12px; border-radius: 8px; box-shadow: none; }
.btn.small:hover { transform: none; box-shadow: 0 2px 6px rgba(7, 56, 137, 0.12); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* Forms */
label { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.05em; }
input[type=text], input[type=date], input[type=number], input[type=email], select, textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--sky); box-shadow: 0 0 0 3px rgba(0, 156, 220, 0.18); }
.form-row { margin-bottom: 14px; }
.form-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(7, 26, 50, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal {
  background: #fff;
  border-radius: 18px;
  padding: 28px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
.modal h2 { margin-top: 0; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Banner */
.banner {
  background: var(--sky-soft);
  border-left: 4px solid var(--sky);
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 14px;
}
.banner.warn { background: #fff7ea; border-left-color: var(--warn); color: var(--warn); }
.banner.error { background: #fde8e8; border-left-color: var(--danger); color: var(--danger); }

/* Markdown render */
.markdown { font-size: 15px; line-height: 1.65; }
.markdown h1 { font-size: 26px; margin: 24px 0 12px; }
.markdown h2 { font-size: 22px; margin: 22px 0 10px; border-bottom: 1px solid var(--line); padding-bottom: 4px; }
.markdown h3 { font-size: 18px; margin: 18px 0 8px; }
.markdown code { background: #f1f3f8; padding: 2px 6px; border-radius: 4px; font-size: 0.9em; font-family: 'SF Mono', Menlo, monospace; }
.markdown pre { background: #0e1a32; color: #e8edf7; padding: 16px; border-radius: 10px; overflow-x: auto; font-size: 13px; }
.markdown pre code { background: transparent; color: inherit; padding: 0; }
.markdown table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 14px; }
.markdown table th, .markdown table td { padding: 8px 12px; border: 1px solid var(--line); }
.markdown table th { background: #fafbfd; }
.markdown ul, .markdown ol { padding-left: 22px; }
.markdown blockquote { border-left: 4px solid var(--sky); padding: 8px 14px; color: var(--muted); margin: 14px 0; background: var(--sky-soft); }

/* Responsive */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .main { padding: 20px; }
}

/* Utility */
.muted { color: var(--muted); }
.mono { font-family: 'SF Mono', Menlo, monospace; font-size: 13px; }
.right { text-align: right; }
.small { font-size: 13px; }
.mt-2 { margin-top: 16px; }
.mb-2 { margin-bottom: 16px; }
.nowrap { white-space: nowrap; }
.hidden { display: none; }
.flex { display: flex; }
.flex-wrap { flex-wrap: wrap; }
.gap { gap: 12px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 99px;
  background: var(--navy-soft);
  color: var(--navy);
  font-weight: 600;
  font-size: 12px;
}
.pill.log-role { background: rgba(244,96,21,0.10); color: var(--orange-dark); }
.pill.log-team { background: rgba(0,156,220,0.12); color: #0078ae; }
.pill.log-user { background: #eef2f7; color: #4b5563; }

/* Empty state */
.empty { text-align: center; padding: 56px 24px; color: var(--muted); }
.empty .icon { font-size: 38px; margin-bottom: 10px; }

/* Pill — universele chip-stijl, geïnspireerd op het bonus-overzicht */
.chip {
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--navy-soft);
  min-width: 80px;
}
.chip-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.chip-val {
  font-family: 'Exo', sans-serif;
  font-size: 14px;
  color: var(--navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Teams overzicht */
.team-group { margin-bottom: 28px; }
.team-group h2 { margin-bottom: 12px; }
.team-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}
.team-card { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.team-card + .team-card { margin-top: 0; }
.team-card:hover { box-shadow: var(--shadow-md); border-color: #c8d4ee; }
.team-card.open { box-shadow: var(--shadow-md); border-color: #c8d4ee; }
.team-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  cursor: pointer;
  user-select: none;
}
.team-card-head > .team-card-title { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.team-card-head .chevron {
  display: inline-block;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.15s ease;
  transform: rotate(-90deg);
}
.team-card.open .team-card-head .chevron { transform: rotate(0deg); }
.team-card-body { display: none; }
.team-card.open .team-card-body { display: block; }
.team-card.drop-target {
  outline: 2px dashed var(--orange);
  outline-offset: -2px;
  background: #fff6ef;
}
.team-members {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 13.5px;
}
.team-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  border-radius: 6px;
}
.team-member:hover { background: #f9fafc; }
.team-member.dragging { opacity: 0.4; }
.team-member .drag-handle {
  color: var(--muted);
  cursor: grab;
  font-size: 12px;
  letter-spacing: -2px;
  user-select: none;
  opacity: 0.4;
  padding: 0 2px;
}
.team-member:hover .drag-handle { opacity: 1; }
.team-member .drag-handle:active { cursor: grabbing; }
.team-member .member-name { flex-shrink: 0; }
.team-member .member-email {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.team-member .member-move {
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.12s ease;
}
.team-member:hover .member-move,
.team-member:focus-within .member-move { opacity: 1; }
.btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}
.btn-icon svg { width: 15px; height: 15px; }
.btn-icon:hover { background: var(--navy-soft); border-color: var(--navy); }
.team-card-head .team-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.team-card-head .team-delete {
  color: var(--muted);
  opacity: 0.55;
  transition: opacity 0.12s ease, color 0.12s ease, background 0.12s ease, border-color 0.12s ease;
}
.team-card-head:hover .team-delete,
.team-card.open .team-delete { opacity: 1; }
.team-card-head .team-delete:hover {
  background: #fdecec;
  border-color: #e4a8a8;
  color: #b23a3a;
}

/* Tabs in modals */
.tab-btn.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

/* Databricks-match lampje */
.match-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}
.match-dot.green { background: var(--success); box-shadow: 0 0 0 3px rgba(14, 138, 95, 0.15); }
.match-dot.orange { background: var(--orange); box-shadow: 0 0 0 3px rgba(244, 96, 21, 0.18); }

.legend-card { display: flex; align-items: center; gap: 6px; padding: 12px 18px; border-radius: 14px; }

/* Nieuwe collega's te beoordelen */
.pending-card {
  background: var(--gradient-orange-soft);
  border-color: rgba(244, 96, 21, 0.22);
}
.pending-card h3 { color: var(--orange-dark); }
.pending-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.pending-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pending-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(244, 96, 21, 0.18);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(7, 56, 137, 0.04);
  transition: box-shadow 0.15s ease, transform 0.12s ease;
}
.pending-row:hover { box-shadow: var(--shadow-sm); }
.pending-row .btn { padding: 7px 14px; font-size: 13px; }
.pending-row .pending-info { flex: 1; min-width: 200px; }
.pending-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  cursor: pointer;
}
.pending-check input,
.pending-selectall input {
  width: 18px;
  height: 18px;
  accent-color: var(--orange, #f46015);
  cursor: pointer;
  margin: 0;
}
.pending-bulkbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  margin-bottom: 10px;
  background: #fff;
  border: 1px solid rgba(244, 96, 21, 0.18);
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(7, 56, 137, 0.04);
}
.pending-selectall {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy, #073889);
  cursor: pointer;
}
.pending-selection-count { margin-right: auto; }
.pending-bulkbar .btn { padding: 7px 14px; font-size: 13px; }
.pending-row.is-selected {
  border-color: rgba(244, 96, 21, 0.5);
  background: rgba(244, 96, 21, 0.04);
}

/* Inlog-toegang schakelaar */
.switch {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.switch-slider {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  background: #cfd4e0;
  border-radius: 99px;
  transition: background 0.18s ease;
  flex-shrink: 0;
}
.switch-slider::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  transition: transform 0.18s ease;
}
.switch input:checked + .switch-slider { background: var(--success); }
.switch input:checked + .switch-slider::before { transform: translateX(16px); }
.switch-label { font-size: 13px; color: var(--muted); font-weight: 600; }
.switch input:checked ~ .switch-label { color: var(--success); }
.switch.disabled { cursor: not-allowed; opacity: 0.55; }
.switch.disabled .switch-slider { background: #dde0e8; }

/* Inline e-mail cel */
.email-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
}
.email-pill span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}
.btn-link {
  background: none;
  border: 0;
  color: var(--navy);
  cursor: pointer;
  padding: 0;
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.btn-link:hover { color: var(--orange); }

/* Toasts — vriendelijke in-app meldingen */
.toast-stack {
  position: fixed;
  top: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 2000;
  pointer-events: none;
  max-width: min(420px, calc(100vw - 32px));
}
.toast {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  color: var(--ink);
  padding: 14px 16px 14px 16px;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(7, 26, 50, 0.18), 0 2px 6px rgba(7, 26, 50, 0.06);
  border: 1px solid var(--line);
  border-left: 4px solid var(--navy);
  font-size: 14px;
  line-height: 1.35;
  pointer-events: auto;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity .28s ease, transform .28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  overflow: hidden;
  min-width: 280px;
}
.toast.show { opacity: 1; transform: translateX(0); }
.toast-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--navy-soft);
  color: var(--navy);
  flex-shrink: 0;
}
.toast-body { min-width: 0; }
.toast-title {
  font-family: 'Exo', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--navy);
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}
.toast-msg {
  color: var(--ink);
  word-wrap: break-word;
  overflow-wrap: anywhere;
}
.toast-close {
  background: transparent;
  border: 0;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
  margin-top: -2px;
  transition: color .15s ease;
}
.toast-close:hover { color: var(--ink); }
.toast-bar {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 100%;
  background: currentColor;
  opacity: 0.35;
  transform: scaleX(1);
  transform-origin: left center;
  pointer-events: none;
}

.toast-success { border-left-color: var(--success); color: var(--success); }
.toast-success .toast-icon { background: rgba(14, 138, 95, 0.12); color: var(--success); }
.toast-success .toast-title { color: var(--success); }
.toast-success .toast-msg { color: var(--ink); }

.toast-error { border-left-color: var(--danger); color: var(--danger); }
.toast-error .toast-icon { background: rgba(180, 35, 24, 0.12); color: var(--danger); }
.toast-error .toast-title { color: var(--danger); }
.toast-error .toast-msg { color: var(--ink); }

.toast-warn { border-left-color: var(--warn); color: var(--warn); }
.toast-warn .toast-icon { background: rgba(181, 71, 8, 0.12); color: var(--warn); }
.toast-warn .toast-title { color: var(--warn); }
.toast-warn .toast-msg { color: var(--ink); }

.toast-info { border-left-color: var(--sky); color: var(--sky); }
.toast-info .toast-icon { background: var(--sky-soft); color: var(--sky); }
.toast-info .toast-title { color: var(--navy); }
.toast-info .toast-msg { color: var(--ink); }

@media (max-width: 640px) {
  .toast-stack { top: auto; bottom: 16px; right: 16px; left: 16px; max-width: none; }
  .toast { min-width: 0; }
}

/* Nette bevestigingsdialoog (vervangt de browser-popup) */
.confirm-backdrop { z-index: 2100; animation: confirmFadeIn .18s ease; }
.confirm-backdrop.closing { animation: confirmFadeOut .14s ease forwards; }
@keyframes confirmFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes confirmFadeOut { to { opacity: 0; } }

.confirm-modal { max-width: 460px; padding: 26px 28px 22px; }
.confirm-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.confirm-head h2 { margin: 0; font-size: 20px; }
.confirm-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}
.confirm-tone-default .confirm-icon { background: var(--sky-soft); color: var(--sky); }
.confirm-tone-danger .confirm-icon { background: rgba(180, 35, 24, 0.12); color: var(--danger); }
.confirm-tone-danger.confirm-modal h2 { color: var(--danger); }
.confirm-body p {
  margin: 0 0 8px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
}
.confirm-body p:last-child { margin-bottom: 0; }
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

/* Klanten / AM — uitklapbare lopende plaatsingen */
table.data tr.placements-row > td.placements-cell {
  background: #fafbfd;
  padding: 14px 16px;
  border-top: 0;
}
table.data tr.placements-row > td.placements-cell table.data {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
table.data tr.placements-row > td.placements-cell table.data th {
  background: #f4f6fa;
}
.placement-am-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.placement-am-row select { min-width: 180px; }
.placement-bulkbar {
  margin: 4px 0 10px;
}
.placement-bulkbar select {
  font-family: inherit;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  min-width: 180px;
}
.placement-check-cell {
  width: 32px;
  padding-right: 0 !important;
  text-align: center;
}
.placement-row-check {
  width: 16px;
  height: 16px;
  accent-color: var(--orange, #f46015);
  cursor: pointer;
  margin: 0;
}
table.data tr.is-selected {
  background: rgba(244, 96, 21, 0.06);
}

/* ================= Bonus-overzicht ================= */
.ov-controls { display: flex; gap: 8px; }
.ov-select {
  font-family: inherit;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  cursor: pointer;
  min-width: 130px;
}
.ov-select:focus { outline: 2px solid var(--sky); outline-offset: 1px; }

.ov-summary {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) 2fr;
  gap: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
  background: #fff;
  border: 1px solid var(--line);
}
.ov-summary-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--sky) 100%);
  color: #fff;
  padding: 22px 26px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
}
.ov-summary-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.85;
  font-weight: 600;
}
.ov-summary-value {
  font-family: 'Exo', sans-serif;
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.ov-summary-hint { font-size: 13px; opacity: 0.85; text-transform: capitalize; }
.ov-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  padding: 8px;
}
.ov-summary-grid > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
}
.ov-summary-k {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 600;
}
.ov-summary-grid strong {
  font-family: 'Exo', sans-serif;
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
@media (max-width: 720px) {
  .ov-summary { grid-template-columns: 1fr; }
}

.ov-list { display: flex; flex-direction: column; gap: 14px; }

.ov-card {
  padding: 0;
  overflow: hidden;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.ov-card:hover { box-shadow: var(--shadow-md); }
.ov-card.open { box-shadow: var(--shadow-md); border-color: #c8d4ee; }

.ov-head {
  display: grid;
  grid-template-columns: minmax(200px, auto) 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  cursor: pointer;
  user-select: none;
}
.ov-head:hover { background: #fafbfe; }
.ov-head:focus-visible { outline: 2px solid var(--sky); outline-offset: -2px; border-radius: 14px; }

.ov-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.ov-head .chevron {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--muted);
  transition: transform 0.2s ease;
  transform: rotate(-90deg);
}
.ov-card.open .ov-head .chevron { transform: rotate(0deg); color: var(--navy); }

.ov-title h3 {
  margin: 0;
  font-family: 'Exo', sans-serif;
  font-size: 18px;
  color: var(--navy);
  font-weight: 700;
}
.ov-sub { margin-top: 2px; }

.ov-head-right {
  display: flex;
  align-items: center;
  gap: 18px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ov-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ov-chip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--navy-soft);
  min-width: 80px;
}
.ov-chip-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}
.ov-chip-val {
  font-family: 'Exo', sans-serif;
  font-size: 14px;
  color: var(--navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Teambonus — niet maandelijks uitbetaald, dus visueel afwijkend */
.ov-chip--team {
  background: #f1f3f6;
  border: 1px dashed #c7cdd6;
}
.ov-chip--team .ov-chip-label { color: #6b7280; }
.ov-chip--team .ov-chip-val { color: #4b5563; }

.ov-summary-grid > div.team-cell {
  background: #f7f8fa;
  border-left: 1px dashed #c7cdd6;
}
.ov-summary-grid > div.team-cell .ov-summary-k { color: #6b7280; }
.ov-summary-grid > div.team-cell strong { color: #4b5563; }

.ov-table td.team-col,
.ov-table th.team-col,
.data td.team-col,
.data th.team-col {
  color: #6b7280;
  background: #f7f8fa;
}
.ov-table td.team-col strong,
.data td.team-col strong { color: #4b5563; }

.ov-total {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  padding: 8px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(244, 96, 21, 0.08) 0%, rgba(244, 96, 21, 0.02) 100%);
  border: 1px solid rgba(244, 96, 21, 0.18);
}
.ov-total-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--orange-dark);
  font-weight: 700;
}
.ov-total-val {
  font-family: 'Exo', sans-serif;
  font-size: 20px;
  color: var(--orange-dark);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.ov-body { display: none; }
.ov-card.open .ov-body { display: block; border-top: 1px solid var(--line); }
.ov-table-wrap { overflow-x: auto; }
.ov-table { margin: 0; }
.ov-table thead th { background: #fafbfd; }
.ov-table tfoot .ov-foot td {
  background: #f4f7fc;
  border-top: 2px solid #d7def0;
  border-bottom: 0;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 900px) {
  .ov-head { grid-template-columns: 1fr; }
  .ov-head-right { justify-content: flex-start; }
}

/* ===== Klikbare collega-naam ===== */
.user-link {
  color: var(--navy);
  text-decoration: none;
  border-bottom: 1px dashed transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.user-link:hover {
  color: var(--orange-dark);
  border-bottom-color: var(--orange-dark);
}

/* ===== Persoonlijke dashboard tijdlijn ===== */
.timeline {
  list-style: none;
  margin: 0;
  padding: 6px 0 6px 10px;
  position: relative;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(to bottom, rgba(7,56,137,0.12), rgba(7,56,137,0.04));
  border-radius: 2px;
}
.tl-item {
  position: relative;
  padding: 10px 0 10px 38px;
}
.tl-item + .tl-item { border-top: 1px solid rgba(7,56,137,0.06); }
.tl-dot {
  position: absolute;
  left: 10px;
  top: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--navy);
  box-shadow: 0 0 0 3px rgba(7,56,137,0.08);
}
.tl-item.log-role .tl-dot { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(244,96,21,0.12); }
.tl-item.log-team .tl-dot { border-color: var(--sky); box-shadow: 0 0 0 3px rgba(0,156,220,0.15); }
.tl-item.log-alias .tl-dot { border-color: #8b5cf6; box-shadow: 0 0 0 3px rgba(139,92,246,0.15); }
.tl-item.log-user .tl-dot { border-color: #6b7280; box-shadow: 0 0 0 3px rgba(107,114,128,0.15); }
.tl-top {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}
.tl-kind {
  display: inline-block;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: var(--navy);
  background: rgba(7,56,137,0.07);
  padding: 2px 8px;
  border-radius: 999px;
}
.tl-item.log-role .tl-kind { color: var(--orange-dark); background: rgba(244,96,21,0.10); }
.tl-item.log-team .tl-kind { color: #0078ae; background: rgba(0,156,220,0.12); }
.tl-item.log-alias .tl-kind { color: #6d28d9; background: rgba(139,92,246,0.12); }
.tl-title { color: #1f2937; font-size: 14.5px; }
.tl-meta { margin-top: 4px; }
.tl-reason {
  margin-top: 4px;
  font-style: italic;
}

/* "Bekijk als" — admins kunnen via deze bar meekijken met een collega */
.view-as-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-left: 4px solid var(--line);
  background: #fafbff;
}
.view-as-bar.active {
  border-left-color: var(--orange);
  background: linear-gradient(90deg, rgba(244,96,21,0.07), rgba(244,96,21,0) 60%);
}
.view-as-bar .view-as-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 240px;
}
.view-as-bar .view-as-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.view-as-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  white-space: nowrap;
}
.view-as-select {
  flex: 1 1 auto;
  min-width: 220px;
  max-width: 420px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
}
.view-as-select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(7,56,137,0.12);
}
.view-as-note {
  font-size: 13px;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.view-as-note.muted { color: var(--muted); }
.view-as-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(244,96,21,0.18);
  display: inline-block;
}

/* "Bekijk als" — admins kunnen via deze bar meekijken met een collega */
.view-as-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 14px 18px;
  border-left: 4px solid var(--line);
  background: #fafbff;
}
.view-as-bar.active {
  border-left-color: var(--orange);
  background: linear-gradient(90deg, rgba(244,96,21,0.07), rgba(244,96,21,0) 60%);
}
.view-as-bar .view-as-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 260px;
  min-width: 240px;
}
.view-as-bar .view-as-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.view-as-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  white-space: nowrap;
}
.view-as-select {
  flex: 1 1 auto;
  min-width: 220px;
  max-width: 420px;
  padding: 8px 12px;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
}
.view-as-select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(7,56,137,0.12);
}
.view-as-note {
  font-size: 13px;
  color: #1f2937;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.view-as-note.muted { color: var(--muted); }
.view-as-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--orange);
  box-shadow: 0 0 0 3px rgba(244,96,21,0.18);
  display: inline-block;
}

/* Portefeuillebonus per maand (AM-detail onder bonus-opbouw) */
.portfolio-section { margin-top: 28px; }
.portfolio-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.portfolio-controls {
  display: flex;
  align-items: center;
  gap: 8px;
}
.portfolio-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}
.portfolio-stat {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.portfolio-stat.highlight {
  background: linear-gradient(135deg, rgba(7,56,137,0.06), rgba(0,156,220,0.08));
  border-color: rgba(7,56,137,0.18);
}
.portfolio-stat-val {
  font-family: 'Exo', sans-serif;
  font-size: 22px;
  color: var(--navy);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.portfolio-stat .cap-warn { color: var(--orange); font-weight: 600; }
.portfolio-table tbody tr.portfolio-client-row { transition: background 120ms ease; }
.portfolio-table tbody tr.portfolio-client-row:hover { background: #f6f8fc; }
.portfolio-table tbody tr.portfolio-client-row.open { background: #eef3fb; }
.portfolio-toggle {
  background: none;
  border: 0;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font: inherit;
  color: var(--navy);
  cursor: pointer;
  text-align: left;
}
.portfolio-toggle:hover { color: var(--orange); }
.portfolio-chevron {
  display: inline-block;
  transition: transform 160ms ease;
  font-size: 18px;
  line-height: 1;
  color: #6b7280;
}
.portfolio-client-row.open .portfolio-chevron { transform: rotate(90deg); color: var(--navy); }
.portfolio-detail-row td {
  background: #fafbfd;
  padding: 0 18px 14px;
}
.portfolio-detail {
  border-left: 3px solid var(--sky);
  background: #fff;
  border-radius: 10px;
  padding: 12px 16px;
  box-shadow: inset 0 0 0 1px var(--line);
  margin-top: 4px;
}
.portfolio-detail-head {
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 8px;
}
.portfolio-detail-table {
  width: 100%;
  border-collapse: collapse;
}
.portfolio-detail-table th {
  font-size: 11px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
.portfolio-detail-table th.num { text-align: right; }
.portfolio-detail-table td {
  padding: 8px;
  border-bottom: 1px solid #eef0f4;
  vertical-align: top;
}
.portfolio-detail-table tfoot td { border-bottom: 0; padding-top: 10px; }
