:root {
  --bg: #fdf6f0;
  --card: #ffffff;
  --tekst: #2e2a26;
  --tekst-zwak: #8a8078;
  --accent: #ff6f91;
  --accent-zacht: #ffe1ea;
  --blauw: #5b8def;
  --groen: #4caf7d;
  --rood: #e15b5b;
  --rand: #eee0d6;
  --radius: 16px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--tekst);
  padding-bottom: 90px;
}

a { color: inherit; text-decoration: none; }

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: var(--card);
  border-bottom: 1px solid var(--rand);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand { font-weight: 700; font-size: 1.1rem; color: var(--accent); }

.topnav { display: flex; gap: 14px; font-size: 0.85rem; }
.topnav a.actief { color: var(--accent); font-weight: 600; }

.content { padding: 16px; max-width: 720px; margin: 0 auto; }

h1 { font-size: 1.4rem; margin: 8px 0 12px; }
h2 { font-size: 1.05rem; color: var(--tekst-zwak); margin: 4px 0 12px; }

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}
.filters input, .filters select {
  flex: 1 1 45%;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--rand);
  background: var(--card);
  font-size: 0.95rem;
}

.item-lijst { display: flex; flex-direction: column; gap: 12px; }

.item-kaart {
  display: flex;
  gap: 12px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}

.item-thumb {
  width: 84px;
  height: 84px;
  border-radius: 12px;
  object-fit: cover;
  background: var(--accent-zacht);
  flex-shrink: 0;
}
.item-thumb-leeg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--tekst-zwak);
  text-align: center;
}

.item-info { flex: 1; min-width: 0; }
.item-titel { font-weight: 600; }
.item-sub { color: var(--tekst-zwak); font-size: 0.85rem; }
.item-prijzen { display: flex; gap: 10px; font-size: 0.85rem; margin-top: 4px; }
.item-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 6px; font-size: 0.75rem; }

.badge {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--rand);
}
.badge-voorraad { background: #ffe9c7; color: #9a6a00; }
.badge-op_vinted { background: #d7e6ff; color: #2a5bb8; }
.badge-op_marktplaats { background: #fff0c2; color: #8a6300; }
.badge-op_ebay { background: #fce4d6; color: #b8460e; }
.badge-verkocht { background: #d8f0e0; color: #237a4c; }

.dagen { color: var(--tekst-zwak); }

.leeg { color: var(--tekst-zwak); text-align: center; margin-top: 40px; }

.fab {
  position: fixed;
  bottom: 18px;
  left: 16px;
  right: 16px;
  max-width: 688px;
  margin: 0 auto;
  background: var(--accent);
  color: white;
  text-align: center;
  padding: 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 4px 14px rgba(255,111,145,0.4);
  z-index: 20;
}

.item-form { display: flex; flex-direction: column; gap: 14px; }
.item-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.item-form input, .item-form select, .item-form textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--rand);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
}

.btn {
  display: inline-block;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--rand);
  background: var(--card);
  font-weight: 600;
  font-size: 0.9rem;
  font-family: inherit;
  color: inherit;
  cursor: pointer;
  text-align: center;
  -webkit-appearance: none;
  appearance: none;
}
.btn-groot { padding: 16px; font-size: 1.05rem; width: 100%; background: var(--accent); color: white; border: none; }
.btn-gevaar { background: var(--rood); color: white; border: none; width: 100%; padding: 14px; border-radius: 999px; font-weight: 600; }
.btn-gevaar-klein { background: var(--rood); color: white; border: none; border-radius: 8px; padding: 6px 10px; }
.btn-klein { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--rand); background: var(--card); font-size: 0.8rem; cursor: pointer; text-decoration: none; color: inherit; }
.btn-klein.ok { background: #d8f0e0; border-color: #237a4c; color: #237a4c; }

.item-acties { display: flex; flex-direction: column; gap: 10px; margin-top: 20px; }

.foto-grid { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.foto-item { position: relative; width: 100px; }
.foto-item img { width: 100px; height: 100px; object-fit: cover; border-radius: 10px; }
.foto-acties { display: flex; gap: 4px; margin-top: 4px; justify-content: center; }
.foto-acties form.inline { display: inline; }
.foto-acties button { border: 1px solid var(--rand); background: var(--card); border-radius: 8px; padding: 4px 8px; cursor: pointer; }
.foto-acties button.btn-gevaar-klein { border: none; background: var(--rood); color: white; }

.melding { background: #d8f0e0; color: #237a4c; padding: 10px 14px; border-radius: 12px; margin-bottom: 12px; }
.ai-status { font-size: 0.85rem; color: var(--tekst-zwak); margin: 6px 0 16px; min-height: 1.2em; }
.ai-steekwoorden-paneel { display: flex; flex-direction: column; gap: 8px; background: var(--bg); border-radius: var(--radius); padding: 12px; margin-top: 8px; }
.ai-steekwoorden-paneel textarea { padding: 10px; border-radius: 10px; border: 1px solid var(--rand); font-family: inherit; font-size: 0.95rem; resize: vertical; }
.melding-fout { background: #fbe0e0; color: #a33; padding: 10px 14px; border-radius: 12px; }

.checklist { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; margin-bottom: 20px; }
.checklist li { padding: 10px 14px; border-radius: 12px; font-weight: 600; }
.checklist li.ok { background: #d8f0e0; color: #237a4c; }
.checklist li.nok { background: #fbe0e0; color: #a33; }

.handmatig-tab { background: var(--card); border-radius: var(--radius); padding: 16px; margin-bottom: 20px; }
.handmatig-tab label { display: block; margin-bottom: 10px; }

.bevestig-form { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.bevestig-form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.bevestig-form input, .bevestig-form select, .bevestig-form textarea {
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--rand);
  font-size: 1rem;
  font-family: inherit;
  background: var(--card);
}

.categorie-uitleg { font-size: 0.85rem; color: var(--tekst-zwak); margin-bottom: 16px; }
.categorie-nieuw-form { display: flex; gap: 8px; margin-bottom: 20px; }
.categorie-nieuw-form input {
  flex: 1;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--rand);
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--card);
}
.categorie-groep-titel { font-size: 0.8rem; color: var(--tekst-zwak); text-transform: uppercase; letter-spacing: 0.03em; margin: 20px 0 8px; }
.zoek-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; margin-bottom: 4px; }
.checkbox-label { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; }
.checkbox-label input { width: auto !important; }
.zoek-veld { width: 100%; box-sizing: border-box; padding: 12px; border-radius: 12px; border: 1px solid var(--rand); font-size: 1rem; font-family: inherit; background: var(--card); }
.ebay-categorie-resultaten { margin: 12px 0; display: flex; flex-direction: column; gap: 4px; max-height: 340px; overflow-y: auto; }
.ebay-categorie-optie { display: block; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--rand); cursor: pointer; font-size: 0.9rem; }
.ebay-categorie-optie:has(input:checked) { background: #d8f0e0; border-color: #237a4c; }
.ebay-categorie-pad { color: var(--tekst-zwak); font-size: 0.8rem; }
.categorie-rij { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.categorie-bewerk-form { display: flex; gap: 8px; flex: 1; }
.categorie-bewerk-form input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--rand);
  font-size: 0.9rem;
  font-family: inherit;
  background: var(--card);
}

.stappen-wizard { background: var(--bg); border-radius: var(--radius); padding: 16px; margin-bottom: 16px; }
.stap-teller { font-size: 0.85rem; color: var(--tekst-zwak); margin: 0 0 12px; }
.stap-inhoud { display: flex; flex-direction: column; gap: 10px; }
.kopieerblok-groot { font-size: 1.1rem; padding: 16px; min-height: 2.5em; }
.stap-subtitel { font-size: 0.8rem; color: var(--tekst-zwak); text-transform: uppercase; letter-spacing: 0.03em; margin: 4px 0 10px; }
.kopieerblok { display: flex; align-items: center; gap: 8px; background: var(--bg); border-radius: 10px; padding: 10px; }
.kopieerblok span { flex: 1; white-space: pre-wrap; }

.winst-preview { font-size: 1.1rem; }
.winst-positief { color: var(--groen); }
.winst-negatief { color: var(--rood); }

.stat-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 20px; }
.stat-tile { background: var(--card); border-radius: var(--radius); padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.stat-label { font-size: 0.78rem; color: var(--tekst-zwak); text-transform: capitalize; }
.stat-waarde { font-size: 1.25rem; font-weight: 700; margin-top: 4px; }
.stat-sub { font-size: 0.7rem; color: var(--tekst-zwak); margin-top: 2px; }

.top-lijsten { display: flex; flex-direction: column; gap: 20px; margin-top: 20px; }
.top-lijsten ol { padding-left: 20px; }

canvas { background: var(--card); border-radius: var(--radius); padding: 10px; }

.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  margin: 0;
}
.login-card {
  background: var(--card);
  padding: 28px;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 90%;
  max-width: 360px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.login-card h1 { text-align: center; color: var(--accent); margin-bottom: 0; }
.login-sub { text-align: center; color: var(--tekst-zwak); margin-top: 0; font-size: 0.85rem; }
.login-card label { display: flex; flex-direction: column; gap: 6px; font-size: 0.9rem; font-weight: 600; }
.login-card input { padding: 12px; border-radius: 12px; border: 1px solid var(--rand); font-size: 1rem; }
.fout { color: var(--rood); font-size: 0.85rem; text-align: center; }

@media (min-width: 640px) {
  .stat-grid { grid-template-columns: repeat(4, 1fr); }
  .top-lijsten { flex-direction: row; }
  .top-lijsten > div { flex: 1; }
  .fab { left: auto; right: 24px; width: 220px; }
}
