:root {
  --accent: #1f3a5f;
  --muted: #6b7280;
  --line: #d8dde3;
  --bg: #f5f6f8;
  --card: #ffffff;
  --ink: #14181f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding: 12px;
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.topbar h1 { font-size: 17px; margin: 0; color: var(--accent); }
.back { color: var(--accent); font-size: 14px; text-decoration: none; }

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

.card h2 { font-size: 14px; color: var(--accent); margin: 0 0 8px; }

.field { display: block; margin-bottom: 12px; }
.field span, .field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }

input, select, textarea {
  width: 100%;
  padding: 10px;
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

input[type="file"] { padding: 8px; background: #fafbfc; }
textarea { resize: vertical; }

canvas#signature {
  width: 100%;
  height: 200px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fff;
  touch-action: none;
}

.sig-actions { margin-top: 6px; }

button {
  font: inherit;
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
}

button.ghost { background: #fff; color: var(--accent); }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 10px; }

table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.links a { margin-right: 8px; }

a { color: var(--accent); }

.flash { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: #fff4e5; border: 1px solid #f0d3ac; }
.flash li { margin: 0; list-style: none; }

.note { color: var(--muted); font-size: 13px; }
.note code { background: #eef1f4; padding: 2px 5px; border-radius: 5px; }

.media-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.media-list img { width: 100%; height: auto; border-radius: 8px; border: 1px solid var(--line); display: block; }
.media-list span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }

/* Combobox voor merk en type: filteren terwijl de technicus typt. */
.combo { position: relative; }

.combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 6px 16px rgba(20, 24, 31, 0.12);
  max-height: 220px;
  overflow-y: auto;
  z-index: 5;
}

.combo-list[hidden] { display: none; }
.combo-list.flip-up { top: auto; bottom: calc(100% + 4px); }

.combo-option { padding: 10px 12px; font-size: 14px; }
.combo-option[aria-selected="true"] { background: #eef2f7; color: var(--accent); }
.combo-empty { padding: 10px 12px; font-size: 13px; color: var(--muted); }
.combo-head {
  padding: 8px 12px 6px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
