/* Ikona Atelier — stijl A (licht, editorial) als basis, stijl B (donker, messing) als donker thema. */
:root {
  --bg: #FBFAF7; --panel: #FFFFFF; --ink: #171512; --muted: #746E64; --line: #E6E2DA; --soft: #F1EEE7; --soft2: #E9E4D9;
  --accent: #7A2E2B; --accent-ink: #FFFFFF; --brass: #A8823A; --ok: #2F6B4F; --warn: #9A6B12; --danger: #8C2D2D; --info: #3E5A7A;
  --chip-marge-bg: #F3E4E3; --chip-ok-bg: #E3EFE8; --chip-warn-bg: #F6EBD3; --chip-info-bg: #E4EAF1; --chip-danger-bg: #F3DBDB; --chip-brass-bg: #EFE6D2;
  --shadow: 0 1px 2px rgba(23,21,18,.06), 0 8px 24px -16px rgba(23,21,18,.25);
  --display: "Bodoni Moda", Georgia, "Times New Roman", serif;
  --body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", Menlo, monospace;
  --radius: 10px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141816; --panel: #1C221E; --ink: #EFE9DC; --muted: #9BA39A; --line: #2B332D; --soft: #232A25; --soft2: #2B332D;
    --accent: #C9A45C; --accent-ink: #141816; --brass: #C9A45C; --ok: #6FBF8F; --warn: #E0B354; --danger: #E07A72; --info: #8FB0D6;
    --chip-marge-bg: #3A2320; --chip-ok-bg: #1E3A2B; --chip-warn-bg: #3A2F14; --chip-info-bg: #1F2D3A; --chip-danger-bg: #3F2222; --chip-brass-bg: #2E2A1E;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -16px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141816; --panel: #1C221E; --ink: #EFE9DC; --muted: #9BA39A; --line: #2B332D; --soft: #232A25; --soft2: #2B332D;
  --accent: #C9A45C; --accent-ink: #141816; --brass: #C9A45C; --ok: #6FBF8F; --warn: #E0B354; --danger: #E07A72; --info: #8FB0D6;
  --chip-marge-bg: #3A2320; --chip-ok-bg: #1E3A2B; --chip-warn-bg: #3A2F14; --chip-info-bg: #1F2D3A; --chip-danger-bg: #3F2222; --chip-brass-bg: #2E2A1E;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -16px rgba(0,0,0,.6);
  color-scheme: dark;
}
:root[data-theme="dark"] .chip.marge, :root:not([data-theme="light"]) .chip.marge { color: #E9A39D; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 500; line-height: 1.12; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(28px, 4vw, 38px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 8px 0; }
.mono, code { font-family: var(--mono); font-size: .93em; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tabular { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Layout */
.top { position: sticky; top: 0; z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); }
.top .inner { max-width: 1240px; margin: 0 auto; padding: 10px 20px; display: flex; align-items: center; gap: 18px; }
.brand { font-family: var(--display); font-size: 22px; letter-spacing: .01em; color: var(--ink); display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.brand small { font-family: var(--body); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.brand:hover { text-decoration: none; }
nav.main { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; }
nav.main::-webkit-scrollbar { display: none; }
nav.main a { color: var(--muted); padding: 6px 10px; border-radius: 8px; font-weight: 500; white-space: nowrap; }
nav.main a:hover { text-decoration: none; background: var(--soft); color: var(--ink); }
nav.main a.on { color: var(--ink); box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.top .tools { display: flex; align-items: center; gap: 8px; }
.wrap { max-width: 1240px; margin: 0 auto; padding: 22px 20px 80px; min-width: 0; }
.side > *, .grid2 > *, .grid3 > * { min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 18px; margin-bottom: 18px; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
footer.foot { max-width: 1240px; margin: 0 auto; padding: 14px 20px 30px; color: var(--muted); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; }

/* Knoppen */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { text-decoration: none; background: var(--soft); }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); border-color: var(--danger); background: transparent; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.btn .spin { display: none; }
.btn.busy .spin { display: inline-block; }
.linkbtn { background: none; border: 0; color: var(--accent); font: inherit; cursor: pointer; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* Chips en vlaggen */
.chip { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.6; background: var(--soft); color: var(--muted); }
.chip.marge { background: var(--chip-marge-bg); color: var(--accent); }
.chip.ok { background: var(--chip-ok-bg); color: var(--ok); }
.chip.warn { background: var(--chip-warn-bg); color: var(--warn); }
.chip.danger { background: var(--chip-danger-bg); color: var(--danger); }
.chip.info { background: var(--chip-info-bg); color: var(--info); }
.chip.brass { background: var(--chip-brass-bg); color: var(--warn); }
.chip.ink { background: var(--ink); color: var(--bg); }
.chip.muted { background: var(--soft); color: var(--muted); }
.flags { display: flex; flex-wrap: wrap; gap: 6px; }

/* Tegels */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 6px 0 18px; }
.tile { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.tile .l { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.tile .v { font-family: var(--display); font-size: 28px; line-height: 1.1; margin-top: 4px; font-variant-numeric: tabular-nums; }
.tile.acc .v { color: var(--accent); }
.tile .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* Kaarten en secties */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card + .card { margin-top: 14px; }
.card h2, .card h3 { margin-bottom: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; align-items: start; }
.side { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
@media (max-width: 900px) { .grid2, .grid3, .side { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 14px; }
.kv { display: grid; grid-template-columns: minmax(120px, 170px) 1fr; gap: 5px 14px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.empty { color: var(--muted); padding: 22px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Tabellen */
.tbl { overflow-x: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
th { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 600; white-space: nowrap; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
tr.row-link { cursor: pointer; }
tr.row-link:hover td { background: var(--soft); }
.thumb { width: 44px; height: 44px; border-radius: 8px; object-fit: cover; background: var(--soft); display: inline-grid; place-items: center; color: var(--muted); font-family: var(--mono); font-size: 11px; }
.no { font-family: var(--mono); color: var(--muted); white-space: nowrap; }
.prog { display: inline-block; width: 60px; height: 6px; border-radius: 3px; background: var(--soft); vertical-align: middle; overflow: hidden; margin-right: 6px; }
.prog i { display: block; height: 100%; background: var(--brass); }

/* Formulieren */
.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.form .full { grid-column: 1 / -1; }
.field label, .field .lbl { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.field .help { font-size: 12px; color: var(--muted); margin-top: 3px; }
input[type=text], input[type=number], input[type=date], input[type=email], input[type=tel], input[type=url], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 15px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 16px; }
.inline-form { display: inline; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.filters select, .filters input { width: auto; min-width: 140px; }
.filters .search { flex: 1; min-width: 200px; }
.pill-row { display: flex; flex-wrap: wrap; gap: 6px; }
.pill { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--ink); font-size: 13px; }
.pill.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.pill:hover { text-decoration: none; }

/* Tabbladen */
.tabs { display: flex; gap: 2px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 14px 0 16px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { padding: 8px 12px; color: var(--muted); white-space: nowrap; font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a:hover { text-decoration: none; color: var(--ink); }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab-panel[hidden] { display: none; }

/* Flash */
.flash { position: sticky; top: 56px; z-index: 15; display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.flash div { padding: 10px 14px; border-radius: 9px; background: var(--chip-ok-bg); color: var(--ok); border: 1px solid transparent; box-shadow: var(--shadow); font-weight: 500; }
.flash div.warn { background: var(--chip-warn-bg); color: var(--warn); }
.note { border-left: 3px solid var(--warn); background: var(--soft); padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 14px; }
.note.danger { border-color: var(--danger); }
.note.ok { border-color: var(--ok); }
.note.info { border-color: var(--info); }

/* Foto's */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.photo { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.photo img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--soft); }
.photo .bar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; align-items: center; }
.photo .bar form { display: inline; }
.photo.main { outline: 2px solid var(--brass); }
.hero-photo { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: var(--radius); background: var(--soft); display: block; }
.hero-empty { aspect-ratio: 1 / 1; border-radius: var(--radius); background: linear-gradient(145deg, var(--soft), var(--soft2)); display: grid; place-items: center; color: var(--muted); text-align: center; padding: 14px; font-size: 13px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 18px; text-align: center; color: var(--muted); }
.drop input { display: block; margin: 8px auto 0; }
.upload-progress { height: 6px; background: var(--soft); border-radius: 3px; overflow: hidden; margin-top: 8px; display: none; }
.upload-progress i { display: block; height: 100%; width: 0; background: var(--brass); transition: width .2s; }

/* Checklist en logboek */
.steps { list-style: none; margin: 0; padding: 0; }
.steps li { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.steps li:last-child { border-bottom: 0; }
.steps .dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line); display: grid; place-items: center; font-size: 13px; color: var(--ok); flex: 0 0 auto; }
.steps li.done .dot { border-color: var(--ok); background: var(--chip-ok-bg); }
.steps .when { margin-left: auto; color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; font-size: 14px; }
.timeline li:last-child { border-bottom: 0; }
.timeline .d { color: var(--muted); font-variant-numeric: tabular-nums; }

/* Dashboard */
.attn { list-style: none; margin: 0; padding: 0; }
.attn li { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.attn li:last-child { border-bottom: 0; }
.attn .who { font-family: var(--mono); color: var(--muted); white-space: nowrap; }

/* Login */
.centered { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.centered .card { width: min(440px, 100%); }
.brand-big { font-family: var(--display); font-size: 40px; line-height: 1; }
.brand-big small { display: block; font-family: var(--body); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 8px; font-weight: 600; }

/* Shop */
.shop-soon { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }

/* Mobiel */
@media (max-width: 760px) {
  body { font-size: 15px; }
  .top .inner { padding: 8px 14px; gap: 10px; }
  .wrap { padding: 14px 14px 90px; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tile .v { font-size: 24px; }
  table.responsive thead { display: none; }
  table.responsive tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 4px; }
  table.responsive td { display: flex; justify-content: space-between; gap: 12px; border: 0; padding: 3px 6px; text-align: left; }
  table.responsive td.num { text-align: right; }
  table.responsive td::before { content: attr(data-l); color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; flex: 0 0 auto; }
  table.responsive td.nolabel::before { content: none; }
  .timeline li { grid-template-columns: 1fr; gap: 2px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
