:root {
  /* MFS / Van de Pol dashboard huisstijl */
  --paper-white: #faf9f6;
  --paper-cream: #f5f2eb;
  --paper-warm: #ebe5d9;
  --ink: #1a1a1a;
  --ink-light: #4a4a4a;
  --line: #d8d0c1;
  --accent-red: #c44536;
  --accent-blue: #2a5075;
  --success: #386641;
  --warning: #8a5a18;
  --shadow-soft: rgba(0, 0, 0, 0.08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper-cream);
  font-family: Karla, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  display: grid;
  grid-template-columns: 286px 1fr;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  content: "";
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

button,
input,
select { font: inherit; }
button { cursor: pointer; }

.sidebar {
  min-height: 100svh;
  padding: 28px 22px;
  border-right: 1px solid var(--line);
  background: var(--paper-white);
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 30px;
}

.logo {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--paper-white);
  background: var(--accent-blue);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.brand strong { display: block; line-height: 1.12; }
.brand span {
  display: block;
  margin-top: 4px;
  color: var(--ink-light);
  font-size: 0.82rem;
}

nav { display: grid; gap: 8px; }

.nav {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--ink-light);
  background: transparent;
  text-align: left;
  font-weight: 750;
}

.nav:hover,
.nav.active {
  border-color: var(--line);
  color: var(--paper-white);
  background: var(--accent-blue);
}

.sidebar-note {
  margin-top: 30px;
  border: 1px solid rgba(138, 90, 24, 0.35);
  border-radius: 8px;
  padding: 14px;
  color: var(--warning);
  background: #fff8e8;
}

.sidebar-note p {
  margin: 6px 0 0;
  color: var(--warning);
  line-height: 1.45;
  font-size: 0.88rem;
}

main { padding: 34px 40px 56px; }

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent-red);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 { margin: 0; line-height: 1.12; }
h1 { font-size: clamp(2rem, 4vw, 3.5rem); letter-spacing: -0.055em; }
h2 { font-size: 1.18rem; }
h3 { font-size: 1.05rem; }

.subtitle {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--ink-light);
  font-size: 1.05rem;
  line-height: 1.5;
}

.status-card {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--paper-white);
  color: var(--ink-light);
  font-size: 0.9rem;
  font-weight: 750;
}

.dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-red);
}

.filters {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--paper-white);
  box-shadow: 0 8px 18px var(--shadow-soft);
}

label {
  display: grid;
  gap: 7px;
  color: var(--ink-light);
  font-size: 0.82rem;
  font-weight: 800;
}

select {
  min-width: 180px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fffefa;
}

select:focus {
  border-color: var(--accent-blue);
  outline: 3px solid rgba(42, 80, 117, 0.16);
}

input[type="checkbox"] {
  width: 22px;
  height: 22px;
  accent-color: var(--accent-red);
}

.grid { display: grid; gap: 18px; }
.kpis { grid-template-columns: repeat(4, minmax(170px, 1fr)); margin-bottom: 18px; }
.two-col { grid-template-columns: minmax(0, 1.55fr) minmax(340px, 0.9fr); }
.three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: var(--paper-white);
  box-shadow: 0 8px 18px var(--shadow-soft);
}

.kpi-title {
  margin: 0;
  color: var(--ink-light);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-value {
  overflow-wrap: anywhere;
  font-size: 1.72rem;
  font-weight: 850;
  letter-spacing: -0.04em;
}

.kpi-foot {
  margin-top: -6px;
  color: var(--ink-light);
  font-size: 0.88rem;
}

.good { color: var(--success); }
.warn { color: var(--warning); }
.bad { color: var(--accent-red); }
.blue { color: var(--accent-blue); }

.table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.table th,
.table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.table th {
  color: var(--ink-light);
  background: var(--paper-cream);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.table tr:last-child td { border-bottom: 0; }
.card:has(.table) { overflow: auto; }

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}
.badge.red { color: var(--accent-red); background: #f8e6e2; }
.badge.amber { color: var(--warning); background: #fff8e8; }
.badge.green { color: var(--success); background: #edf5ec; }

.progress {
  height: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper-warm);
}
.progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent-blue);
}

.steps { display: grid; gap: 10px; }
.step {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fffefa;
}
.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  color: var(--paper-white);
  background: var(--accent-blue);
  font-weight: 800;
}

.mini { color: var(--ink-light); font-size: 0.88rem; line-height: 1.45; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 10px;
  background: var(--paper-cream);
  color: var(--ink-light);
  font-size: 0.88rem;
  font-weight: 700;
}

.chart {
  height: 230px;
  display: flex;
  align-items: end;
  gap: 13px;
  padding-top: 25px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding-inline: 14px;
  background: var(--paper-cream);
}
.bar {
  position: relative;
  flex: 1;
  min-width: 26px;
  border: 1px solid rgba(42, 80, 117, 0.24);
  border-radius: 6px 6px 0 0;
  background: var(--accent-blue);
}
.bar.negative {
  border-color: rgba(196, 69, 54, 0.28);
  background: var(--accent-red);
}
.bar span {
  position: absolute;
  top: -24px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--ink-light);
  font-size: 0.78rem;
  white-space: nowrap;
}

.notice {
  border: 1px solid rgba(138, 90, 24, 0.35);
  border-radius: 8px;
  border-left: 4px solid var(--warning);
  padding: 14px;
  color: var(--warning);
  background: #fff8e8;
  line-height: 1.45;
}

@media (max-width: 1120px) {
  body { grid-template-columns: 1fr; }
  .sidebar { position: relative; height: auto; min-height: 0; }
  .kpis,
  .two-col,
  .three-col { grid-template-columns: 1fr; }
  .topbar { display: block; }
  .status-card { margin-top: 16px; }
}

@media (max-width: 640px) {
  main { padding: 22px; }
  .sidebar { padding: 22px; }
}
