/* CLARINS Voorraad — Hotel Cosmopolite */

:root {
  --rood: #a5143a;
  --rood-donker: #82102e;
  --rood-licht: #fbeef1;
  --inkt: #2b2323;
  --grijs: #7a6f6f;
  --lijn: #e8dfe0;
  --room: #faf7f4;
  --wit: #ffffff;
  --groen: #1e7a46;
  --groen-licht: #e7f4ec;
  --oranje: #b3620b;
  --oranje-licht: #fdf1e0;
  --rood-alarm: #c22525;
  --alarm-licht: #fdeaea;
  --schaduw: 0 2px 10px rgba(60, 20, 30, .08);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;
  background: var(--room);
  color: var(--inkt);
  font-size: 15px;
}

/* ── header ─────────────────────────────── */
header {
  background: var(--wit);
  border-bottom: 3px solid var(--rood);
  padding: 14px 22px 0;
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--schaduw);
}
.kop-boven { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.merk { display: flex; align-items: center; gap: 14px; }
.gebruiker { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
#gebruiker-naam { font-weight: 600; color: var(--rood); margin-right: 4px; }
.merk-c {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--rood); color: var(--wit);
  font-family: Georgia, serif; font-size: 30px;
  display: flex; align-items: center; justify-content: center;
}
.merk h1 { margin: 0; font-size: 20px; letter-spacing: .06em; }
.merk p { margin: 2px 0 0; color: var(--grijs); font-size: 13px; }

nav#tabs { display: flex; gap: 4px; margin-top: 12px; flex-wrap: wrap; }
.tab {
  border: none; background: none; cursor: pointer;
  padding: 11px 18px; font-size: 15px; color: var(--grijs);
  border-bottom: 3px solid transparent; margin-bottom: -3px;
}
.tab:hover { color: var(--inkt); }
.tab.actief { color: var(--rood); border-bottom-color: var(--rood); font-weight: 600; }

main { padding: 18px 22px 60px; max-width: 1280px; margin: 0 auto; }

.paneel { display: none; }
.paneel.actief { display: block; }

/* ── werkbalk / chips ───────────────────── */
.werkbalk {
  display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-bottom: 16px;
}
.werkbalk input[type=search], .werkbalk input[type=date], .werkbalk select {
  padding: 10px 14px; border: 1px solid var(--lijn); border-radius: 8px;
  font-size: 15px; background: var(--wit); min-width: 160px;
}
.werkbalk input[type=search] { flex: 1 1 240px; max-width: 380px; }
.spacer { flex: 1; }
.tussen { color: var(--grijs); }
.schakel { display: flex; align-items: center; gap: 6px; color: var(--grijs); cursor: pointer; }
.schakel input { width: 17px; height: 17px; accent-color: var(--rood); }

.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--lijn); background: var(--wit); color: var(--grijs);
  border-radius: 999px; padding: 7px 14px; cursor: pointer; font-size: 13.5px;
}
.chip:hover { border-color: var(--rood); color: var(--rood); }
.chip.actief { background: var(--rood); border-color: var(--rood); color: var(--wit); }

/* ── knoppen ────────────────────────────── */
.knop {
  border-radius: 8px; padding: 10px 16px; font-size: 14.5px;
  cursor: pointer; text-decoration: none; display: inline-block;
  transition: background .12s;
}
.knop-rood { background: var(--rood); color: var(--wit); border: 1px solid var(--rood); }
.knop-rood:hover { background: var(--rood-donker); }
.knop-omlijnd { background: var(--wit); color: var(--rood); border: 1px solid var(--rood); }
.knop-omlijnd:hover { background: var(--rood-licht); }
.knop:disabled { opacity: .5; cursor: not-allowed; }

/* ── productkaarten (verkoop) ───────────── */
.product-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
}
.product-kaart {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: 12px;
  padding: 14px 16px; cursor: pointer; box-shadow: var(--schaduw);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .08s, border-color .12s;
}
.product-kaart:hover { border-color: var(--rood); transform: translateY(-1px); }
.pk-naam { font-weight: 600; line-height: 1.25; }
.pk-detail { color: var(--grijs); font-size: 13px; }
.pk-onder { display: flex; justify-content: space-between; align-items: center; margin-top: auto; }
.pk-prijs { font-size: 17px; font-weight: 700; color: var(--rood); }

.badge {
  border-radius: 999px; padding: 3px 11px; font-size: 12.5px; font-weight: 600;
}
.badge-ok    { background: var(--groen-licht); color: var(--groen); }
.badge-laag  { background: var(--oranje-licht); color: var(--oranje); }
.badge-op    { background: var(--alarm-licht); color: var(--rood-alarm); }

.leeg { color: var(--grijs); padding: 40px; text-align: center; grid-column: 1 / -1; }

.grid-kop {
  grid-column: 1 / -1; margin: 10px 0 0; font-size: 14px;
  color: var(--rood); text-transform: uppercase; letter-spacing: .08em;
  border-bottom: 1px solid var(--lijn); padding-bottom: 6px;
}
tr.cat-rij td {
  background: var(--rood-licht); color: var(--rood); font-weight: 700;
  font-size: 12.5px; text-transform: uppercase; letter-spacing: .07em; padding: 7px 14px;
}

/* ── tabellen ───────────────────────────── */
.tabel-wrap {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: 12px;
  overflow: auto; box-shadow: var(--schaduw);
}
table { border-collapse: collapse; width: 100%; }
th, td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--lijn); }
th { background: var(--room); color: var(--grijs); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: #fdfaf8; }
.num { text-align: right; }
td.num { font-variant-numeric: tabular-nums; }

tr.rij-laag td { background: var(--oranje-licht); }
tr.rij-op td { background: var(--alarm-licht); }
tr.rij-geannuleerd td { color: var(--grijs); text-decoration: line-through; }
tr.rij-geannuleerd td:last-child { text-decoration: none; }

.mini-knoppen { display: flex; gap: 6px; justify-content: flex-end; }
.mini-knop {
  border: 1px solid var(--lijn); background: var(--wit); border-radius: 7px;
  padding: 6px 10px; cursor: pointer; font-size: 13px; color: var(--inkt); white-space: nowrap;
}
.mini-knop:hover { border-color: var(--rood); color: var(--rood); }

.type-label { border-radius: 6px; padding: 3px 9px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.type-verkoop   { background: var(--rood-licht); color: var(--rood); }
.type-levering  { background: var(--groen-licht); color: var(--groen); }
.type-correctie { background: #eef0fb; color: #3949ab; }
.type-tester    { background: var(--oranje-licht); color: var(--oranje); }
.type-retour    { background: #f3e8fd; color: #7b3fa0; }
.type-annulatie { background: #eeeeee; color: var(--grijs); }

/* ── samenvattingskaartjes ──────────────── */
.kaartjes { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.kaartje {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: 12px;
  padding: 14px 20px; min-width: 170px; box-shadow: var(--schaduw); flex: 0 1 auto;
}
.kaartje .kw { font-size: 24px; font-weight: 700; color: var(--rood); }
.kaartje .kl { color: var(--grijs); font-size: 13px; margin-top: 2px; }
.kaartje.waarschuwt .kw { color: var(--oranje); }

/* ── statistieken ───────────────────────── */
.stats-kolommen, .beheer-kolommen {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (max-width: 900px) { .stats-kolommen, .beheer-kolommen { grid-template-columns: 1fr; } }
.stats-blok {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: 12px;
  padding: 18px 20px; box-shadow: var(--schaduw);
}
.stats-blok h3 { margin: 0 0 12px; font-size: 15px; color: var(--rood); }
.stats-blok h3 + .uitleg { margin-top: -6px; }
.staaf-rij { display: grid; grid-template-columns: minmax(140px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: 14px; }
.staaf-buis { background: var(--room); border-radius: 6px; height: 18px; overflow: hidden; }
.staaf-vul { background: var(--rood); height: 100%; border-radius: 6px; min-width: 2px; }
.staaf-getal { font-variant-numeric: tabular-nums; color: var(--grijs); white-space: nowrap; }

.uitleg { color: var(--grijs); font-size: 13.5px; line-height: 1.5; }

/* ── formulieren ────────────────────────── */
.formulier { display: flex; flex-direction: column; gap: 12px; }
.formulier label, .dialoog-inhoud label { display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--grijs); }
.formulier input, .formulier select,
.dialoog-inhoud input, .dialoog-inhoud select {
  padding: 10px 12px; border: 1px solid var(--lijn); border-radius: 8px; font-size: 15px; color: var(--inkt);
}
#zoek-beheer { width: 100%; padding: 10px 12px; border: 1px solid var(--lijn); border-radius: 8px; font-size: 15px; margin-bottom: 12px; }

/* ── dialogen ───────────────────────────── */
dialog {
  border: none; border-radius: 16px; padding: 0;
  box-shadow: 0 18px 60px rgba(40, 10, 18, .3); max-width: 480px; width: calc(100vw - 40px);
}
dialog::backdrop { background: rgba(43, 20, 26, .45); }
.dialoog-inhoud { padding: 22px 24px; display: flex; flex-direction: column; gap: 14px; }
.dialoog-inhoud.breed { max-width: none; }
dialog#dialoog-inventaris { max-width: 720px; }
.dialoog-inhoud h2 { margin: 0; font-size: 19px; color: var(--rood); }
.dt-product { margin: 0; font-size: 15px; }
.dt-product b { font-size: 16px; }
.dt-rij { display: flex; align-items: center; gap: 12px; }
.dt-rij > span { width: 105px; color: var(--grijs); font-size: 13.5px; flex-shrink: 0; }
.dt-rij input { flex: 1; }
.dt-totaal { margin: 0; font-size: 17px; font-weight: 700; text-align: right; color: var(--rood); min-height: 22px; }
.dialoog-knoppen { display: flex; justify-content: flex-end; gap: 10px; margin-top: 4px; }

.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--lijn); border-radius: 10px; overflow: hidden; }
.stepper button {
  width: 52px; height: 48px; border: none; background: var(--room);
  font-size: 24px; cursor: pointer; color: var(--rood);
}
.stepper button:hover { background: var(--rood-licht); }
.stepper input {
  width: 76px; height: 48px; border: none; border-left: 1px solid var(--lijn); border-right: 1px solid var(--lijn);
  text-align: center; font-size: 20px; font-weight: 600; border-radius: 0;
}
.stepper input:focus { outline: 2px solid var(--rood); outline-offset: -2px; }

.inv-wrap { max-height: 50vh; }
#inventaris-tabel input {
  width: 84px; text-align: right; padding: 8px; font-size: 15px;
  border: 1px solid var(--lijn); border-radius: 7px;
}
#inventaris-tabel input.gewijzigd { border-color: var(--rood); background: var(--rood-licht); font-weight: 700; }

/* ── meldingen ──────────────────────────── */
#melding {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 100; align-items: center;
}
.melding-item {
  background: var(--inkt); color: var(--wit); border-radius: 10px;
  padding: 12px 20px; font-size: 14.5px; box-shadow: 0 6px 24px rgba(0,0,0,.25);
  max-width: 560px; animation: melding-in .18s ease-out;
}
.melding-item.m-goed { background: var(--groen); }
.melding-item.m-waarschuwing { background: var(--oranje); }
.melding-item.m-fout { background: var(--rood-alarm); }
.melding-item { display: flex; align-items: center; gap: 14px; }
.melding-actie {
  background: rgba(255, 255, 255, .22); color: var(--wit);
  border: 1px solid rgba(255, 255, 255, .6); border-radius: 8px;
  padding: 7px 14px; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.melding-actie:hover { background: rgba(255, 255, 255, .34); }
@keyframes melding-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; } }

/* ── vandaag-balk (verkoopscherm) ───────── */
.vandaag-balk {
  background: var(--wit); border: 1px solid var(--lijn); border-left: 4px solid var(--grijs);
  border-radius: 10px; padding: 10px 16px; margin-bottom: 14px;
  font-size: 14.5px; color: var(--grijs); box-shadow: var(--schaduw);
}
.vandaag-balk.heeft-omzet { border-left-color: var(--groen); color: var(--inkt); font-weight: 600; }

/* uitverkochte productkaarten wat rustiger tonen (staan onderaan) */
.product-kaart.is-uitverkocht { opacity: .62; }
.product-kaart.is-uitverkocht:hover { opacity: 1; }

/* ── aanmeldpagina ──────────────────────── */
body.login-pagina {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; margin: 0;
}
.login-kaart {
  background: var(--wit); border: 1px solid var(--lijn); border-radius: 16px;
  box-shadow: var(--schaduw); padding: 30px 34px; width: min(400px, calc(100vw - 40px));
  display: flex; flex-direction: column; gap: 22px;
}
.login-merk { border-bottom: 3px solid var(--rood); padding-bottom: 18px; }
.login-fout { color: var(--rood-alarm); font-size: 14px; min-height: 18px; margin: 0; }
.dt-door { margin: 0; }

@media (max-width: 640px) {
  main { padding: 12px 12px 50px; }
  header { padding: 10px 12px 0; }
  th, td { padding: 8px 9px; }
  .dt-rij > span { width: 84px; }
  /* grotere raakvlakken op gsm: knoppen makkelijker aan te tikken */
  .mini-knop { min-height: 44px; padding: 10px 14px; }
  .mini-knoppen { gap: 10px; flex-direction: column; align-items: stretch; }
  .melding-actie { min-height: 40px; }
}
