:root {
  --bg: #14161a;
  --panel: #1c1f25;
  --panel-2: #23272f;
  --line: #2f343d;
  --text: #e8eaed;
  --muted: #9aa3b0;
  --accent: #ff5c35;
  --accent-soft: #3a2119;
  --ok: #3fbf7f;
  --warn: #e5a23c;
  --err: #e55a5a;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font: 15px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

.layout { display: flex; min-height: 100vh; }

/* ---- navigatie ---- */
.side {
  width: 232px;
  flex: 0 0 232px;
  background: var(--panel);
  border-right: 1px solid var(--line);
  padding: 20px 14px;
}
.brand {
  font-size: 17px; font-weight: 600; letter-spacing: .02em;
  padding: 0 8px 18px; color: var(--text);
}
.brand span { color: var(--accent); }
.nav { list-style: none; margin: 0; padding: 0; }
.nav li { margin-bottom: 2px; }
.nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px;
  color: var(--muted); font-size: 14px;
}
.nav a:hover { background: var(--panel-2); color: var(--text); text-decoration: none; }
.nav a.on { background: var(--accent-soft); color: var(--accent); }
.nav-sep {
  margin: 16px 10px 8px; font-size: 11px; text-transform: uppercase;
  letter-spacing: .09em; color: #626b78;
}

.main { flex: 1; padding: 26px 30px 60px; max-width: 1080px; }

h1 { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
h2 { font-size: 16px; font-weight: 600; margin: 26px 0 10px; }
h3 { font-size: 14px; font-weight: 600; margin: 0 0 8px; }
.sub { color: var(--muted); font-size: 14px; margin: 0 0 22px; }

/* ---- panelen ---- */
.card {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px; margin-bottom: 16px;
}
.card.tight { padding: 12px 14px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > * { flex: 1 1 240px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.metric { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.metric .k { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.metric .v { font-size: 22px; font-weight: 600; }

/* ---- formulieren ---- */
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; padding: 8px 10px; background: var(--panel-2);
  border: 1px solid var(--line); border-radius: 8px; color: var(--text);
  font: inherit;
}
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
.field { margin-bottom: 14px; }
.hint { font-size: 12px; color: #7c8593; margin-top: 5px; }
input[type=range] { width: 100%; accent-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--text); }
.check input { width: auto; }

button, .btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; font: inherit; font-size: 14px;
  background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; cursor: pointer;
}
button:hover, .btn:hover { border-color: #444b57; text-decoration: none; }
button.primary, .btn.primary { background: var(--accent); border-color: var(--accent); color: #16110f; font-weight: 500; }
button.primary:hover { filter: brightness(1.07); }
button.ghost { background: transparent; }
button.mini { padding: 4px 8px; font-size: 12px; }
button.danger { color: var(--err); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ---- tabellen en lijsten ---- */
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px;
     text-transform: uppercase; letter-spacing: .06em; padding: 0 8px 8px; }
td { padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: top; }

/* ---- rundown ---- */
.rundown { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.rd-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px;
           border-top: 1px solid var(--line); background: var(--panel); }
.rd-item:first-child { border-top: 0; }
.rd-item.pres { background: var(--accent-soft); }
.rd-pos { width: 30px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 14px; }
.rd-body { flex: 1; min-width: 0; }
.rd-title { font-size: 14px; }
.rd-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.rd-tools { display: flex; align-items: center; gap: 6px; }
.rd-tools select { width: auto; padding: 4px 6px; font-size: 12px; }
.gap { padding: 3px 14px 3px 56px; border-top: 1px dashed var(--line); background: #191c21; }
.gap button { padding: 2px 8px; font-size: 12px; color: var(--muted); background: transparent; border-color: transparent; }
.gap button:hover { color: var(--accent); border-color: var(--line); }

/* ---- meldingen ---- */
.flash { padding: 10px 14px; border-radius: 8px; margin-bottom: 18px; font-size: 14px;
         border: 1px solid var(--line); background: var(--panel); }
.flash.ok { border-color: #2b5c45; }
.flash.error { border-color: #6d3535; }

.pill { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: 12px;
        background: var(--panel-2); color: var(--muted); border: 1px solid var(--line); }
.pill.ok { color: var(--ok); border-color: #2b5c45; }
.pill.warn { color: var(--warn); border-color: #5c4a2b; }
.pill.err { color: var(--err); border-color: #6d3535; }

.job { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px;
       background: var(--panel-2); margin-bottom: 16px; font-size: 14px; }
.bar { height: 5px; background: #2b3038; border-radius: 3px; overflow: hidden; margin: 8px 0 6px; }
.bar > i { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.job pre { margin: 8px 0 0; font-size: 12px; color: var(--muted); max-height: 150px;
           overflow: auto; white-space: pre-wrap; font-family: ui-monospace, monospace; }

audio { height: 30px; vertical-align: middle; }
.muted { color: var(--muted); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.err-line { color: var(--err); font-size: 12px; margin-top: 4px; }

/* ---- login ---- */
.login-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 20px; }
.login-wrap .card { width: 340px; }

@media (max-width: 760px) {
  .layout { flex-direction: column; }
  .side { width: auto; flex: none; }
  .main { padding: 20px 16px 50px; }
}
