@import url('https://fonts.googleapis.com/css2?family=Syne:wght@400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

/* Basisstijl voor de Gezondheid-app: lettertypen, reset en globale variabelen. */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --zwart:       #0a0a0a;
  --zwart-2:     #111111;
  --zwart-3:     #1a1a1a;
  --rand:        #2a2a2a;
  --rand-licht:  #e8e8e8;
  --wit:         #ffffff;
  --grijs:       #a0a0a0;
  --grijs-2:     #f5f5f5;
  --accent:      #e8ff47;
  --blauw:       #0ea5e9;
  --paars:       #7c3aed;
  --radius-sm:   6px;
  --radius:      12px;
  --radius-lg:   20px;
  --font-hoofd:  'Syne', sans-serif;
  --font-tekst:  'DM Sans', sans-serif;
}

html { font-size: 100%; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
  font-family: var(--font-tekst);
  background: var(--grijs-2);
  color: var(--zwart);
  font-size: 15px;
  line-height: 1.6;
}

/* HEADER */
header {
  background: var(--zwart);
  color: var(--wit);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--rand);
}

h1 {
  font-family: var(--font-hoofd);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--wit);
}

#lang-toggle {
  background: transparent;
  border: 1px solid var(--rand);
  color: var(--grijs);
  padding: 5px 14px;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--font-tekst);
  font-size: .8rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  transition: border-color .2s, color .2s;
}
#lang-toggle:hover { border-color: var(--accent); color: var(--accent); }

nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 0 16px 14px;
}

.nav-link {
  color: var(--grijs);
  text-decoration: none;
  padding: 12px 16px;
  font-family: var(--font-tekst);
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .04em;
  text-transform: uppercase;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
  flex: 1 1 auto;
  text-align: center;
  min-width: 110px;
}
.nav-link:hover  { color: var(--wit); }
.nav-link.active { color: var(--accent); border-bottom-color: var(--accent); }

/* MAIN */
main { max-width: min(100%, 720px); width: 100%; margin: 0 auto; padding: 24px 16px; flex: 1; }

.page { display: none; }
.page.active { display: block; }

h2 {
  font-family: var(--font-hoofd);
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.01em;
  margin-bottom: 24px;
}

h3 {
  font-family: var(--font-hoofd);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--grijs);
  margin-bottom: 16px;
}

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card {
  background: var(--zwart);
  border-radius: var(--radius);
  padding: 20px 18px 16px;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent);
}
.stat-card:nth-child(3)::before { background: var(--paars); }
.stat-card:nth-child(4)::before { background: var(--blauw); }

.stat-icon {
  display: block;
  margin-bottom: 10px;
  opacity: .8;
}

.stat-label {
  font-size: .72rem;
  color: var(--grijs);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 500;
  margin-bottom: 6px;
  line-height: 1.3;
}

.stat-value {
  font-family: var(--font-hoofd);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--wit);
  line-height: 1;
}

/* GRAFIEK */
.chart-container {
  background: var(--wit);
  border-radius: var(--radius);
  padding: 20px;
  border: 1px solid var(--rand-licht);
  margin-top: 10px;
}
.chart-container canvas {
  width: 100%;
  display: block;
}
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 14px;
}
.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--grijs);
  font-size: .82rem;
}
.legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  display: inline-block;
}

/* FORMULIER */
form {
  background: var(--wit);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--rand-licht);
}

.form-group { margin-bottom: 18px; }

label {
  display: block;
  font-size: .72rem;
  font-weight: 700;
  color: var(--zwart);
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: .07em;
  font-family: var(--font-hoofd);
}

input, select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: var(--radius-sm);
  font-size: .95rem;
  font-family: var(--font-tekst);
  background: var(--grijs-2);
  color: var(--zwart);
  transition: border-color .2s, background .2s;
}
input:focus, select:focus {
  outline: none;
  border-color: var(--zwart);
  background: var(--wit);
}

.extra-velden {
  background: var(--grijs-2);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
  border: 1.5px solid #e8e8e8;
}

.hidden { display: none !important; }

.btn-primary {
  width: 100%;
  padding: 15px;
  background: var(--zwart);
  color: var(--accent);
  border: none;
  border-radius: var(--radius-sm);
  font-size: .85rem;
  font-weight: 700;
  font-family: var(--font-hoofd);
  letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background .2s;
}
.btn-primary:hover { background: var(--zwart-3); }

.fout-tekst {
  color: #ef4444;
  font-size: .82rem;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: #fef2f2;
  border-radius: var(--radius-sm);
  border-left: 3px solid #ef4444;
}

/* FILTER BAR */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin-bottom: 20px;
  background: var(--wit);
  padding: 6px;
  border-radius: 100px;
  border: 1px solid var(--rand-licht);
  width: 100%;
}

.filter-btn {
  padding: 7px 20px;
  border: none;
  border-radius: 100px;
  background: transparent;
  font-size: .8rem;
  font-weight: 500;
  font-family: var(--font-tekst);
  color: var(--grijs);
  cursor: pointer;
  transition: all .2s;
}
.filter-btn.active {
  background: var(--zwart);
  color: var(--accent);
  font-weight: 600;
}

/* ITEMS */
.items-lijst {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-kaart {
  background: var(--wit);
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--rand-licht);
  transition: border-color .2s;
  position: relative;
  overflow: hidden;
}
.item-kaart::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--blauw);
}
.item-kaart.slaap::before { background: var(--paars); }
.item-kaart:hover { border-color: #c8c8c8; }

.item-info { flex: 1; padding-left: 12px; }

.item-datum {
  font-size: .72rem;
  color: var(--grijs);
  letter-spacing: .04em;
  text-transform: uppercase;
  font-weight: 500;
}

.item-naam {
  font-family: var(--font-hoofd);
  font-weight: 700;
  font-size: .95rem;
  margin: 3px 0 4px;
}

.item-waarde {
  font-size: .82rem;
  color: var(--grijs);
}

.btn-verwijder {
  background: none;
  border: 1px solid transparent;
  color: #c8c8c8;
  font-size: .8rem;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: all .2s;
  font-family: var(--font-tekst);
}
.btn-verwijder:hover {
  color: #ef4444;
  border-color: #fee2e2;
  background: #fef2f2;
}

.leeg-melding {
  color: var(--grijs);
  text-align: center;
  padding: 60px 0;
  font-size: .9rem;
  background: var(--wit);
  border-radius: var(--radius);
  border: 1.5px dashed var(--rand-licht);
}

/* FOOTER */
footer {
  background: var(--zwart);
  color: var(--grijs);
  text-align: center;
  padding: 20px;
  font-size: .78rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  font-family: var(--font-hoofd);
  margin-top: 60px;
}

@media (min-width: 480px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

/* DESKTOP */
@media (min-width: 600px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
  .header-inner { padding: 20px 32px 16px; }
  nav { padding: 0 32px; }
  main { padding: 40px 32px 100px; }
  form { padding: 36px; }
}
