:root {
  --bg: #14181a;
  --panel: #1c2224;
  --panel-hi: #242b2d;
  --line: #313a3d;
  --text: #e8ece9;
  --text-dim: #93a19c;
  --accent: #4fa87f;     /* Veenman-achtig groen */
  --accent-dim: #366b54;
  --warn: #d9814a;
  --done-bg: #1f3229;
  --mono: 'JetBrains Mono', 'SFMono-Regular', Consolas, monospace;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.topbar .brand {
  font-family: var(--mono);
  font-weight: 700;
  letter-spacing: 0.5px;
  font-size: 15px;
}

.topbar .brand .dot { color: var(--accent); }

.container {
  max-width: 960px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 16px;
}

h1, h2, h3 { font-weight: 700; margin-top: 0; }
h1 { font-size: 22px; }
h2 { font-size: 17px; }
h3 { font-size: 14px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.06em; }

.code {
  font-family: var(--mono);
  background: var(--panel-hi);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 6px;
  font-size: 13px;
}

input, button, select {
  font-family: var(--sans);
  font-size: 14px;
  border-radius: 7px;
  border: 1px solid var(--line);
}

input, select {
  background: var(--panel-hi);
  color: var(--text);
  padding: 9px 11px;
}

input::placeholder { color: var(--text-dim); }

button {
  background: var(--accent);
  color: #0b1210;
  border: none;
  padding: 9px 16px;
  font-weight: 600;
  cursor: pointer;
}

button.secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--line);
}

button:hover { filter: brightness(1.08); }
button:disabled { opacity: 0.5; cursor: not-allowed; }

.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.stack > * + * { margin-top: 10px; }

.error { color: var(--warn); font-size: 13.5px; margin-top: 8px; }

.prefab-list { list-style: none; margin: 0; padding: 0; }

.prefab-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 8px;
  background: var(--panel-hi);
  cursor: pointer;
  transition: background 0.15s;
}

.prefab-item:hover { background: #2a3234; }

.prefab-item.done {
  background: var(--done-bg);
  border-color: var(--accent-dim);
}

.prefab-item .checkbox {
  width: 22px; height: 22px;
  border: 2px solid var(--text-dim);
  border-radius: 6px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
}

.prefab-item.done .checkbox {
  background: var(--accent);
  border-color: var(--accent);
  color: #0b1210;
}

.prefab-item .pcode {
  font-family: var(--mono);
  font-weight: 700;
  min-width: 70px;
}

.prefab-item .meta { color: var(--text-dim); font-size: 13px; flex: 1; }

.pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-dim);
}

table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--line); }
th { color: var(--text-dim); font-weight: 600; font-size: 12px; text-transform: uppercase; }

.bar-viz {
  display: flex;
  height: 22px;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid var(--line);
  margin: 6px 0;
}
.bar-seg {
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; color: #0b1210; font-weight: 600;
  border-right: 1px solid rgba(0,0,0,0.3);
  white-space: nowrap; overflow: hidden;
}
.bar-rest { background: var(--panel); color: var(--text-dim); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tab {
  padding: 9px 14px; cursor: pointer; color: var(--text-dim);
  border-bottom: 2px solid transparent; font-size: 14px; font-weight: 600;
}
.tab.active { color: var(--text); border-color: var(--accent); }

.hidden { display: none !important; }

.pdf-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,0.7);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.pdf-modal-inner {
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  width: 100%; max-width: 1000px; height: 100%; max-height: 90vh;
  display: flex; flex-direction: column; overflow: hidden;
}
.pdf-modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--line);
  font-family: var(--mono); font-size: 13.5px;
}
.pdf-modal-inner iframe { flex: 1; border: none; background: #2a2a2a; }
