/* Barcoder – donker, vlak, rustig. Geen schaduwen of verlopen. */
:root {
  --bg: #0b0d10;
  --surface: #14171c;
  --surface-2: #1c2027;
  --surface-3: #252a33;
  --line: #232831;
  --text: #e8eaed;
  --muted: #8a93a2;
  --faint: #5d6573;
  --accent: #3ddc97;
  --accent-ink: #03140c;
  --accent-soft: rgba(61, 220, 151, 0.12);
  --warn: #f5b545;
  --err: #f0616d;
  --err-soft: rgba(240, 97, 109, 0.12);
  --radius: 12px;
  --radius-sm: 9px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }

/* iconen */
svg.i { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.lg svg.i, svg.i.lg { width: 22px; height: 22px; }

/* knoppen: vlak, zonder rand */
button, .btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-weight: 550; color: var(--text);
  background: var(--surface-2); border: 0; border-radius: var(--radius-sm);
  padding: 10px 14px; min-height: 40px; cursor: pointer; text-decoration: none;
  touch-action: manipulation; transition: background .12s, color .12s; white-space: nowrap;
}
button:hover, .btn:hover { background: var(--surface-3); text-decoration: none; }
button:active { opacity: .85; }
button:disabled { opacity: .4; cursor: default; }
button.primary, .btn.primary { background: var(--accent); color: var(--accent-ink); }
button.primary:hover, .btn.primary:hover { background: #5be6a9; }
button.ghost { background: transparent; color: var(--muted); }
button.ghost:hover { background: var(--surface-2); color: var(--text); }
button.danger { background: transparent; color: var(--err); }
button.danger:hover { background: var(--err-soft); }
button.icon { padding: 0; width: 40px; min-width: 40px; }
/* knoppen in een panel op een al lichtere ondergrond */
.panel .panel button:not(.primary):not(.danger):not(.ghost), .sheet .panel button:not(.primary):not(.danger):not(.ghost) { background: var(--surface-3); }
.placeholder { color: var(--faint); }
button.block, .btn.block { width: 100%; }

input, select, textarea { font: inherit; color: var(--text); }
input[type="text"], input[type="url"], input[type="number"], input:not([type]), select {
  background: var(--surface-2); border: 1px solid transparent; border-radius: var(--radius-sm);
  padding: 9px 12px; min-height: 40px; outline: none; width: 100%;
}
input:focus, select:focus { border-color: var(--accent); }
input::placeholder { color: var(--faint); }

/* schakelaar (checkbox) */
input.toggle { appearance: none; width: 40px; height: 24px; border-radius: 12px; background: var(--surface-3); position: relative; cursor: pointer; flex: none; margin: 0; transition: background .15s; }
input.toggle::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #c9ced6; transition: transform .15s, background .15s; }
input.toggle:checked { background: var(--accent); }
input.toggle:checked::after { transform: translateX(16px); background: var(--accent-ink); }

.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace; }
.row { display: flex; gap: 8px; align-items: center; }
.col { display: flex; flex-direction: column; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.panel { background: var(--surface); border-radius: var(--radius); padding: 18px; }
.label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.divider { height: 1px; background: var(--line); margin: 4px 0; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--err); display: inline-block; flex: none; }
.dot.on { background: var(--accent); }
.dot.wait { background: var(--warn); }
.err { color: var(--err); font-size: 13px; }
.err:empty { display: none; }

.setting { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 40px; }
.setting select, .setting input[type="number"], .setting input[type="text"] { width: auto; min-width: 0; }

.code-big { font: 700 40px/1 ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .08em; text-align: center; }
.qr { display: block; width: 180px; height: 180px; background: #fff; border-radius: var(--radius-sm); padding: 8px; margin: 0 auto; image-rendering: pixelated; }

.code-boxes { display: flex; gap: 8px; justify-content: center; }
.code-boxes input { width: 46px; height: 56px; text-align: center; font: 600 26px ui-monospace, Menlo, Consolas, monospace; padding: 0; }

.toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--surface-3); color: var(--text); border-radius: 999px; padding: 10px 18px; z-index: 60;
  max-width: calc(100% - 32px); text-align: center; font-weight: 550;
}

.badge { font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.badge.ok { background: var(--accent-soft); color: var(--accent); }

/* lijsten */
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; align-items: center; gap: 12px; padding: 10px 4px; border-top: 1px solid var(--line); }
.list li:first-child { border-top: 0; }
.list .val { flex: 1; min-width: 0; overflow-wrap: anywhere; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 15px; }
.list .meta { font-size: 12px; color: var(--muted); }
.list .status { display: inline-flex; color: var(--faint); }
.list .status.ok { color: var(--accent); }
.list li.fresh { animation: fresh 1.2s ease-out; }
.list li button { min-height: 34px; }
.list li button.icon { width: 34px; min-width: 34px; }
@keyframes fresh { from { background: var(--accent-soft); } to { background: transparent; } }
.empty { text-align: center; color: var(--faint); padding: 32px 0; }
