:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #30363d;
  --text: #c9d1d9;
  --muted: #8b949e;
  --accent: #4ade80;
  --warn: #fbbf24;
  --danger: #f87171;
  --info: #60a5fa;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 20px 80px;
}

h1 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 24px;
}

.drop {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 24px;
  text-align: center;
  margin-bottom: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  background: var(--surface);
}

.drop.over { border-color: var(--accent); background: rgba(74, 222, 128, 0.05); }
.drop.has-file { border-color: var(--accent); border-style: solid; }

.drop-lex { padding: 14px; }
.drop-belege { padding: 40px 20px; }

.drop .icon { font-size: 24px; }
.drop p { margin: 8px 0 0; font-size: 14px; }
.drop .hint { color: var(--muted); font-size: 12px; }

button#btn-analyze {
  width: 100%;
  padding: 14px;
  border-radius: 8px;
  border: none;
  background: var(--accent);
  color: var(--bg);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

button#btn-analyze:disabled {
  background: var(--surface);
  color: var(--muted);
  cursor: not-allowed;
}

.status { color: var(--muted); font-size: 14px; min-height: 22px; margin: 16px 0; }
.status.error { color: var(--danger); }

#results h2 {
  font-size: 14px;
  font-weight: 600;
  margin: 24px 0 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.cat-offen { color: var(--danger); }
.cat-unsicher { color: var(--warn); }
.cat-gebucht { color: var(--muted); cursor: pointer; }

.result-list { list-style: none; padding: 0; margin: 0; }
.result-list li {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  align-items: center;
}
.result-list li .thumb {
  width: 56px; height: 56px; object-fit: cover; border-radius: 4px; background: var(--bg);
}
.result-list li .meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.result-list li .lieferant { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-list li .detail { color: var(--muted); font-size: 12px; }
.result-list li .belegnr { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; color: var(--muted); }
.result-list li.unsicher { border-left: 3px solid var(--warn); }
.result-list li.offen { border-left: 3px solid var(--danger); }
