:root { --bg:#f6f7f9; --fg:#1c1f24; --muted:#667; --card:#fff; --line:#dde1e6; --accent:#0a66c2; --ok:#1a7f37; --warn:#b35900; --err:#c62828; }
@media (prefers-color-scheme: dark) { :root { --bg:#14171b; --fg:#e6e8eb; --muted:#9aa3ad; --card:#1d2126; --line:#2e343b; --accent:#5aa9ff; --ok:#4cc26b; --warn:#f0a040; --err:#ff6b6b; } }
* { box-sizing:border-box; }
body { margin:0; font:15px/1.45 system-ui,-apple-system,Segoe UI,Roboto,sans-serif; background:var(--bg); color:var(--fg); }
a { color:var(--accent); }
.card { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:16px; }
.login { min-height:100vh; display:grid; place-items:center; padding:16px; }
.login form { width:100%; max-width:340px; display:grid; gap:10px; }
.login h1 { margin:0 0 6px; font-size:22px; }
input, select, button { font:inherit; padding:8px 10px; border-radius:6px; border:1px solid var(--line); background:var(--card); color:var(--fg); }
button { background:var(--accent); color:#fff; border:0; cursor:pointer; }
button.secondary { background:transparent; color:var(--accent); border:1px solid var(--line); }
.error { color:var(--err); margin:0; }

/* ---- Layout (mobile first) ---- */
.top { position:sticky; top:0; z-index:10; display:flex; align-items:center; justify-content:space-between; gap:8px;
       padding:8px 16px; background:var(--card); border-bottom:1px solid var(--line); }
.brand { font-weight:700; text-decoration:none; color:var(--fg); }
.top nav { display:flex; gap:2px; overflow-x:auto; }
.top nav a { padding:10px 8px; min-height:44px; display:flex; align-items:center; text-decoration:none; color:var(--muted); border-radius:6px; white-space:nowrap; }
.top nav a.on { color:var(--accent); font-weight:600; background:color-mix(in srgb, var(--accent) 10%, transparent); }
.wrap { padding:12px 16px 40px; max-width:1200px; margin:0 auto; }
.layout { display:grid; gap:12px; }
@media (min-width: 900px) {
  .layout { grid-template-columns: 300px 1fr; align-items:start; }
  .filters { position:sticky; top:68px; max-height:calc(100vh - 80px); overflow:auto; }
}
h1 { font-size:20px; margin:4px 0 8px; } h2 { font-size:17px; margin:0 0 8px; } h3 { font-size:15px; margin:8px 0 4px; }
section.card, article.card, details.card { margin-bottom:12px; }

/* ---- Controls ---- */
button, .button { min-height:44px; padding:10px 14px; display:inline-flex; align-items:center; justify-content:center; text-decoration:none; border-radius:8px; }
button:disabled { opacity:.5; cursor:default; }
.button.secondary, button.secondary { background:transparent; color:var(--accent); border:1px solid var(--line); }
button.icon { min-height:36px; padding:4px 10px; background:transparent; color:inherit; border:0; font-size:18px; }
input, select { min-height:44px; width:100%; }
input[type=checkbox] { min-height:auto; width:auto; }
label { display:grid; gap:4px; font-size:14px; }
label.inline { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
label.inline select, label.inline input { width:auto; }
small, .note, .meta { color:var(--muted); font-size:13px; }
.flash { background:color-mix(in srgb, var(--ok) 15%, transparent); padding:10px 12px; border-radius:8px; }
.stack { display:grid; gap:14px; max-width:520px; }
.logout { margin-top:16px; }

/* ---- Filter ---- */
.filters { background:var(--card); border:1px solid var(--line); border-radius:10px; padding:0; }
.filters > summary { padding:12px 16px; min-height:44px; cursor:pointer; font-weight:600; list-style:none; display:flex; align-items:center; gap:8px; }
.filters > summary::after { content:"▾"; margin-left:auto; color:var(--muted); }
.filters[open] > summary::after { content:"▴"; }
.filters form { display:grid; gap:12px; padding:0 16px 16px; }
.count { background:var(--accent); color:#fff; border-radius:10px; padding:0 7px; font-size:12px; }
.row2 { display:grid; grid-template-columns:1fr 1fr; gap:8px; }
fieldset { border:0; padding:0; margin:0; }
legend { font-weight:600; font-size:13px; margin-bottom:6px; color:var(--muted); text-transform:uppercase; letter-spacing:.03em; }
.chips { display:flex; flex-wrap:wrap; gap:6px; }
.chip { display:inline-flex; position:relative; }
.chip input { position:absolute; opacity:0; inset:0; margin:0; cursor:pointer; }
.chip span { display:inline-flex; align-items:center; min-height:36px; padding:6px 12px; border:1px solid var(--line); border-radius:18px; font-size:14px; }
.chip input:checked + span { background:var(--accent); border-color:var(--accent); color:#fff; }
.chip input:focus-visible + span { outline:2px solid var(--accent); outline-offset:2px; }
.toggle { display:flex; align-items:center; gap:10px; min-height:36px; }
.actions { display:flex; gap:8px; }
.bulk { display:grid; gap:8px; padding:12px 16px 16px; border-top:1px solid var(--line); }

/* ---- Ergebnisse ---- */
.cards { list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.item { display:grid; grid-template-columns:72px 1fr; gap:10px 12px; padding:12px; }
.thumb { width:72px; height:72px; border-radius:8px; overflow:hidden; background:var(--bg); display:grid; place-items:center; color:var(--muted); }
.thumb img { width:100%; height:100%; object-fit:contain; background:#fff; }
.title { font-weight:600; color:var(--fg); text-decoration:none; display:block; line-height:1.3; }
.sub { display:flex; flex-wrap:wrap; gap:6px; margin-top:4px; font-size:13px; color:var(--muted); }
.shop { font-weight:600; }
.shop.haendler::after { content:" · Händler"; font-weight:400; }
.shop.hersteller::after { content:" · Hersteller"; font-weight:400; }
.na { color:var(--err); } .pending { color:var(--warn); }
.tags { display:flex; flex-wrap:wrap; gap:4px; margin-top:6px; }
.tag { font-size:12px; padding:2px 8px; border-radius:10px; background:var(--bg); border:1px solid var(--line); }
.tag.art { border-color:var(--accent); color:var(--accent); }
.price { grid-column:1 / -1; display:flex; flex-wrap:wrap; align-items:baseline; gap:4px 10px; border-top:1px dashed var(--line); padding-top:8px; }
.price strong { font-size:18px; }
.price s { color:var(--muted); }
.deal { background:var(--ok); color:#fff; border-radius:6px; padding:1px 6px; font-size:13px; font-weight:600; }
.deal.erkannt { background:var(--warn); }
.deliv { color:var(--muted); font-size:13px; }
.shoplink { margin-left:auto; min-height:36px; display:inline-flex; align-items:center; }
.empty { padding:24px; text-align:center; color:var(--muted); }
@media (min-width: 640px) {
  .item { grid-template-columns:96px 1fr 200px; }
  .thumb { width:96px; height:96px; }
  .price { grid-column:auto; flex-direction:column; align-items:flex-end; border-top:0; padding-top:0; text-align:right; }
  .shoplink { margin-left:0; }
}

/* ---- Banner ---- */
.banner { display:flex; gap:8px; align-items:flex-start; padding:10px 16px; border-bottom:1px solid var(--line); }
.banner.warn { background:color-mix(in srgb, var(--warn) 18%, var(--card)); }
.banner ul { margin:0; padding-left:18px; flex:1; font-size:14px; }

/* ---- Detail / Quellen ---- */
.detail .hero { max-width:100%; max-height:260px; object-fit:contain; display:block; margin:0 auto 8px; background:#fff; border-radius:8px; }
.specs { display:grid; grid-template-columns:1fr; gap:4px 12px; margin:0 0 12px; }
.specs dt { font-weight:600; font-size:13px; color:var(--muted); margin-top:6px; }
.specs dd { margin:0; display:flex; flex-wrap:wrap; gap:4px; }
@media (min-width: 640px) { .specs { grid-template-columns:140px 1fr; } .specs dt { margin-top:0; } }
.tri { font-size:12px; padding:2px 8px; border-radius:10px; border:1px solid var(--line); }
.tri.ja { background:color-mix(in srgb, var(--ok) 18%, transparent); border-color:var(--ok); }
.tri.nein { opacity:.45; text-decoration:line-through; }
.tri.unbekannt { border-style:dashed; color:var(--muted); }
.hist { width:100%; max-width:480px; height:90px; color:var(--accent); background:var(--bg); border-radius:8px; }
.variant + .variant { border-top:1px solid var(--line); margin-top:8px; }
.inline-form { display:flex; flex-wrap:wrap; gap:8px; align-items:center; }
.desc { white-space:pre-line; font-size:14px; }
.source { display:flex; gap:12px; align-items:center; justify-content:space-between; }
.status { margin-left:6px; font-size:12px; padding:2px 8px; border-radius:10px; border:1px solid var(--line); }
.status.ok { color:var(--ok); border-color:var(--ok); }
.status.blocked, .status.error { color:var(--err); border-color:var(--err); }

@media (max-width: 420px) { .brand { display:none; } .top { justify-content:center; } }
