/* Sous — LNC-thema: taupe, charcoal, deep blue. Inter + Libre Baskerville. */

:root {
  --taupe:      #A49F92;
  --taupe-soft: #C9C5BC;
  --taupe-pale: #EFEDE8;
  --charcoal:   #34393C;
  --deep-blue:  #313343;
  --paper:      #FBFAF8;
  --white:      #FFFFFF;
  --line:       #E2DFD8;
  --ink:        #34393C;
  --ink-soft:   #6E7276;
  --crit:       #B4504A;
  --warn:       #A86A14;   /* dieper dan taupe, anders lopen ze in elkaar over */
  --ok:         #3F7355;   /* dieper dan de oker, zelfde reden */

  --radius: 6px;
  --shadow: 0 1px 2px rgba(52, 57, 60, .06), 0 4px 16px rgba(52, 57, 60, .06);
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --serif: "Libre Baskerville", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--deep-blue); }
a:hover { color: var(--charcoal); }

/* ── Kop ─────────────────────────────────────────────────────────────────── */

.topbar {
  background: var(--charcoal);
  color: var(--paper);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 22px;
  height: 56px;
  position: sticky;
  top: 0;
  z-index: 20;
}
.brand {
  font-family: var(--serif);
  font-size: 20px;
  letter-spacing: .01em;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: baseline;
  gap: 9px;
}
.brand small {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--taupe);
}
.topbar nav { display: flex; gap: 18px; margin-left: auto; align-items: center; }
.topbar nav a {
  color: var(--taupe-soft);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.topbar nav a:hover { color: var(--white); }
.topbar nav a.on { color: var(--white); border-bottom-color: var(--taupe); }

/* ── Raamwerk ────────────────────────────────────────────────────────────── */

.wrap { max-width: 1060px; margin: 0 auto; padding: 28px 20px 80px; }
.wrap.narrow { max-width: 760px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
h1 {
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}
h2 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-soft);
  margin: 0 0 12px;
}
.lede { color: var(--ink-soft); margin: 0; font-size: 14px; }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 18px;
}

/* ── Formulier ───────────────────────────────────────────────────────────── */

.field { margin-bottom: 18px; }
.field > label,
.field-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.req { color: var(--crit); font-weight: 700; }
.hint { font-size: 12.5px; color: var(--ink-soft); margin-top: 5px; }

input[type=text], input[type=url], input[type=number], input[type=password],
select, textarea {
  width: 100%;
  font-family: inherit;
  font-size: 14.5px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--taupe-soft);
  border-radius: var(--radius);
  padding: 9px 11px;
}
input:focus, select:focus, textarea:focus, trix-editor:focus {
  outline: none;
  border-color: var(--taupe);
  box-shadow: 0 0 0 3px rgba(164, 159, 146, .22);
}
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--ink-soft) 50%), linear-gradient(135deg, var(--ink-soft) 50%, transparent 50%); background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 32px; }

.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { flex: 1 1 180px; margin-bottom: 18px; }

.invalid input, .invalid select, .invalid trix-editor, .invalid .dropzone {
  border-color: var(--crit);
}
.err {
  display: none;
  font-size: 12.5px;
  color: var(--crit);
  margin-top: 5px;
  font-weight: 500;
}
.invalid .err { display: block; }

/* ── Knoppen ─────────────────────────────────────────────────────────────── */

button, .btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--charcoal);
  background: var(--charcoal);
  color: var(--white);
  padding: 9px 17px;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
}
button:hover, .btn:hover { background: var(--deep-blue); border-color: var(--deep-blue); color: var(--white); }
button:disabled { opacity: .55; cursor: default; }
.btn-ghost, button.ghost {
  background: transparent;
  color: var(--charcoal);
  border-color: var(--taupe-soft);
}
.btn-ghost:hover, button.ghost:hover { background: var(--taupe-pale); color: var(--charcoal); border-color: var(--taupe); }
.btn-small { font-size: 12.5px; padding: 5px 11px; }

/* ── Systeem-keuze (multi) ───────────────────────────────────────────────── */

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--taupe-soft);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13.5px;
  cursor: pointer;
  background: var(--white);
  user-select: none;
}
.chip:hover { border-color: var(--taupe); }
.chip.on { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }

/* ── Dropzone & screenshots ──────────────────────────────────────────────── */

.dropzone {
  border: 1.5px dashed var(--taupe-soft);
  border-radius: var(--radius);
  background: var(--taupe-pale);
  padding: 18px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 13.5px;
  cursor: pointer;
}
.dropzone:hover, .dropzone.over { border-color: var(--taupe); background: #E8E5DE; color: var(--charcoal); }
.dropzone strong { color: var(--charcoal); font-weight: 600; }

.shots { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.shot {
  position: relative;
  width: 116px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.shot img { width: 100%; height: 78px; object-fit: cover; display: block; }
.shot .name {
  font-size: 10.5px;
  color: var(--ink-soft);
  padding: 4px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shot .x {
  position: absolute; top: 4px; right: 4px;
  width: 20px; height: 20px; line-height: 18px;
  border-radius: 50%; border: none;
  background: rgba(52,57,60,.82); color: #fff;
  font-size: 13px; padding: 0; cursor: pointer;
}

.gallery { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.gallery a { display: block; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.gallery img { display: block; max-height: 150px; }

/* ── Badges ──────────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .03em;
  padding: 2px 9px;
  border-radius: 999px;
  border: 1px solid var(--taupe-soft);
  color: var(--ink-soft);
  background: var(--white);
  white-space: nowrap;
}
.badge.sys { background: var(--taupe-pale); border-color: transparent; color: var(--charcoal); }
.badge.st-nieuw { background: var(--deep-blue); border-color: var(--deep-blue); color: #fff; }
.badge.st-in_behandeling { background: var(--taupe); border-color: var(--taupe); color: #fff; }
.badge.st-wacht_op_info { background: var(--warn); border-color: var(--warn); color: #fff; }
.badge.st-opgelost { background: var(--ok); border-color: var(--ok); color: #fff; }
.badge.st-gesloten { background: var(--taupe-soft); border-color: var(--taupe-soft); color: var(--charcoal); }
.badge.st-afgewezen { background: var(--crit); border-color: var(--crit); color: #fff; }
.badge.pr-hoog { color: var(--warn); border-color: var(--warn); }
.badge.pr-urgent { background: var(--crit); border-color: var(--crit); color: #fff; }

/* ── Ticketlijst ─────────────────────────────────────────────────────────── */

.tickets { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); overflow: hidden; box-shadow: var(--shadow); }
.trow {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  gap: 14px;
  align-items: baseline;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}
.trow:last-child { border-bottom: none; }
.trow:hover { background: var(--taupe-pale); }
.trow .ref { font-size: 12px; font-weight: 600; color: var(--taupe); letter-spacing: .04em; }
.trow .ttl { font-weight: 500; }
.trow .meta { font-size: 12.5px; color: var(--ink-soft); margin-top: 3px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.trow .right { display: flex; gap: 6px; align-items: center; }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-soft); }
.empty p { margin: 0 0 16px; }

/* ── Detailpagina ────────────────────────────────────────────────────────── */

.detail { display: grid; grid-template-columns: 1fr 268px; gap: 20px; align-items: start; }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } }

.prose { font-size: 15px; }
.prose p { margin: 0 0 11px; }
.prose ul, .prose ol { margin: 0 0 11px; padding-left: 22px; }
.prose blockquote { margin: 0 0 11px; padding-left: 14px; border-left: 3px solid var(--taupe-soft); color: var(--ink-soft); }
.prose pre { background: var(--taupe-pale); padding: 10px 12px; border-radius: var(--radius); overflow-x: auto; }

.urlbox {
  display: flex; align-items: center; gap: 9px;
  background: var(--taupe-pale);
  border-radius: var(--radius);
  padding: 9px 13px;
  margin: 14px 0 0;
  font-size: 13.5px;
  word-break: break-all;
}
.urlbox { align-items: flex-start; }
.urllist { display: flex; flex-direction: column; gap: 4px; }
.urlbox .lbl { font-weight: 600; color: var(--ink-soft); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }

.side .card { padding: 16px 18px; }
.side .field { margin-bottom: 13px; }
.side .field > label { margin-bottom: 4px; }
.saved { font-size: 12.5px; color: var(--ok); font-weight: 500; height: 16px; }

.comment { border-top: 1px solid var(--line); padding: 16px 0 4px; }
.comment:first-of-type { border-top: none; }
.comment.note { background: #FBF7EC; margin: 0 -22px; padding: 16px 22px 4px; border-left: 3px solid var(--warn); }
.comment .who { font-size: 12.5px; color: var(--ink-soft); margin-bottom: 7px; display: flex; gap: 9px; align-items: center; }
.comment .who b { color: var(--ink); font-weight: 600; font-size: 13.5px; }

.tabs { display: flex; gap: 6px; margin-bottom: 12px; }
.tab {
  font-size: 13px; padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--taupe-soft); background: var(--white);
  color: var(--ink-soft); cursor: pointer;
}
.tab.on { background: var(--charcoal); border-color: var(--charcoal); color: var(--white); }

/* ── Admin ───────────────────────────────────────────────────────────────── */

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
  text-align: left; font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .06em; color: var(--ink-soft); font-weight: 600;
  padding: 0 10px 8px; border-bottom: 1px solid var(--line);
}
td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.off td { color: var(--ink-soft); }
tr.off td:first-child { text-decoration: line-through; }
.addrow { display: flex; gap: 9px; margin-top: 16px; }
.addrow input { flex: 1 1 auto; }

/* ── Inloggen ────────────────────────────────────────────────────────────── */

.gate { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.gate .card { width: 100%; max-width: 348px; }
.gate h1 { text-align: center; margin-bottom: 4px; }
.gate .lede { text-align: center; margin-bottom: 22px; }
.gate button { width: 100%; margin-top: 6px; }
.gate .bad { color: var(--crit); font-size: 13px; text-align: center; margin: 0 0 12px; }

/* ── Trix bijschaven ─────────────────────────────────────────────────────── */

trix-editor {
  border: 1px solid var(--taupe-soft);
  border-radius: var(--radius);
  background: var(--white);
  min-height: 120px;
  padding: 10px 12px;
  font-size: 14.5px;
}
trix-editor.small { min-height: 80px; }
trix-toolbar .trix-button-group { border-color: var(--taupe-soft); margin-bottom: 7px; }
trix-toolbar .trix-button { border-color: var(--taupe-soft); }
trix-toolbar .trix-button--icon-attach,
trix-toolbar .trix-button-group--file-tools { display: none; }  /* bijlagen lopen via de dropzone */

/* ── Meerdere URL's ──────────────────────────────────────────────────────── */

.urlrow { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.urlrow input { flex: 1 1 auto; }
.urlrow .x { flex: 0 0 auto; line-height: 1; padding: 7px 10px; }

.field-label .sub {
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--taupe);
  font-size: 12px;
  margin-left: 6px;
}
.field-label .sub::before { content: "· "; }

label.check {
  display: flex;
  gap: 7px;
  align-items: center;
  margin-top: 10px;
  font-size: 13.5px;
  color: var(--ink-soft);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  cursor: pointer;
}
label.check input { width: auto; }

/* "Anders" krijgt een streepjesrand: het is een vangnet, geen gewoon systeem. */
.chip-other { border-style: dashed; }
.chip-other.on { border-style: solid; }

/* ── Suggesties in beheer ────────────────────────────────────────────────── */

.suggestie {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.suggestie:last-child { border-bottom: none; }
.suggestie .n { color: var(--ink-soft); font-size: 12.5px; }
.suggestie button { margin-left: auto; }

/* ── Filterbalk ──────────────────────────────────────────────────────────── */

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.filters select {
  width: auto;
  flex: 0 1 auto;
  font-size: 13.5px;
  padding: 7px 30px 7px 10px;
  background-position: calc(100% - 15px) 15px, calc(100% - 10px) 15px;
}
.filters .zoek {
  flex: 1 1 260px;
  min-width: 200px;
  font-size: 14px;
  padding: 7px 11px;
}
.wis {
  margin-left: 8px;
  font-size: 12.5px;
  color: var(--taupe);
  text-decoration: underline;
}
.wis:hover { color: var(--charcoal); }

/* ── Cijfers ─────────────────────────────────────────────────────────────── */
/* De balklengte draagt de grootte, niet de kleur: alle balken één tint, en
   alleen status en prioriteit krijgen hun eigen (altijd gelabelde) kleur. */

.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.kpi {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
a.kpi:hover { border-color: var(--taupe); background: var(--taupe-pale); }
.kpi .getal {
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1.15;
  color: var(--charcoal);
}
.kpi .getal small { font-size: 16px; color: var(--ink-soft); margin-left: 1px; }
.kpi .wat { font-size: 12.5px; color: var(--ink-soft); }
.kpi .klein { font-size: 11.5px; color: var(--taupe); }
.kpi.let-op .getal { color: var(--warn); }
.kpi.urgent .getal { color: var(--crit); }
.kpi.stil { background: var(--taupe-pale); border-color: transparent; box-shadow: none; }

.tweeluik { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .tweeluik { grid-template-columns: 1fr; } }
.tweeluik .card { margin-bottom: 0; }

table.balken { border-collapse: separate; border-spacing: 0 6px; }
table.balken th {
  text-align: left;
  font-size: 13.5px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--ink);
  border: none;
  padding: 0 12px 0 0;
  white-space: nowrap;
  width: 1%;
}
table.balken th a { color: inherit; text-decoration: none; }
table.balken th a:hover { text-decoration: underline; }
table.balken td { border: none; padding: 0; }
table.balken .baan { width: 100%; padding-right: 10px; }
table.balken .n {
  text-align: right;
  font-variant-numeric: tabular-nums;
  color: var(--ink-soft);
  font-size: 13px;
  width: 1%;
  padding-left: 4px;
}
table.balken tr.nul th, table.balken tr.nul .n { color: var(--taupe-soft); }
.balk {
  display: block;
  height: 10px;
  min-width: 3px;
  border-radius: 0 4px 4px 0;      /* afgeronde kop, vlak op de nullijn */
  background: var(--deep-blue);
}
/* Let op: geen '.detail' — die naam is van de ticketdetailpagina. */
.balk-toelichting {
  display: block;
  font-size: 11.5px;
  color: var(--taupe);
  white-space: normal;
  max-width: 190px;
}

/* Status en prioriteit dragen hun eigen betekenis — altijd naast het label. */
.balk.st-nieuw { background: var(--deep-blue); }
.balk.st-in_behandeling { background: var(--taupe); }
.balk.st-wacht_op_info { background: var(--warn); }
.balk.st-opgelost { background: var(--ok); }
.balk.st-gesloten { background: var(--taupe-soft); }
.balk.st-afgewezen { background: var(--crit); }
.balk.pr-laag { background: var(--taupe-soft); }
.balk.pr-normaal { background: var(--taupe); }
.balk.pr-hoog { background: var(--warn); }
.balk.pr-urgent { background: var(--crit); }

/* Per week: twee staven naast elkaar, met 2px lucht ertussen. */
.legenda { display: flex; gap: 16px; font-size: 12.5px; color: var(--ink-soft); margin-bottom: 14px; }
.legenda .vlak { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; }
.vlak.nieuw, .staaf.nieuw { background: var(--deep-blue); }
.vlak.opgelost, .staaf.opgelost { background: var(--ok); }

.weken { display: flex; gap: 6px; align-items: flex-end; max-width: 620px; }
.week { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.week .staven {
  display: flex; gap: 2px; align-items: flex-end; justify-content: center;
  height: 110px; width: 100%;
  border-bottom: 1px solid var(--line);   /* nullijn, zodat lege weken kloppen */
}
.staaf { width: 26px; max-width: 42%; border-radius: 4px 4px 0 0; display: block; }
.wklabel { font-size: 11.5px; color: var(--ink-soft); }
.wkgetal { font-size: 11.5px; color: var(--taupe); font-variant-numeric: tabular-nums; }
.wkgetal .scheiding { color: var(--taupe-soft); margin: 0 1px; }
