/* Once Tuinen — brand identity */
:root {
  /* Hoofd brand-kleuren */
  --once-groen-donker: #3B5223;     /* primary — sidebar, headers */
  --once-groen: #4D6A2D;             /* knoppen, hover */
  --once-groen-licht: #6B8E3D;       /* accent, voortgang */
  --once-cream: #E5E1D0;             /* tekst op donker, achtergrond op licht */
  --once-cream-licht: #F2EFE2;       /* zachte achtergrond */
  --once-zwart: #1A1A1A;
  --once-aarde: #6B4423;             /* secundair accent */

  /* Aliassen voor bestaande variabelen (achterwaartse compat) */
  --groen-donker: var(--once-groen-donker);
  --groen: var(--once-groen);
  --groen-licht: var(--once-groen-licht);
  --groen-bg: #EDEDD8;
  --aarde: var(--once-aarde);
  --zand: var(--once-cream-licht);
  --grijs-1: #F8F7F2;
  --grijs-2: #E0DDD3;
  --grijs-3: #9A9486;
  --grijs-4: #4A4A42;
  --tekst: #1F1F1A;
  --wit: #ffffff;
  --rood: #C04A3B;
  --oranje: #D88A20;
  --blauw: #3F6FA8;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  background: var(--grijs-1);
  color: var(--tekst);
  display: flex;
  height: 100vh;            /* vaste hoogte: alleen .content scrollt */
  overflow: hidden;          /* geen scroll op body-niveau */
  font-size: 14px;
}

/* Sidebar — Once branding */
.sidebar {
  width: 240px;
  background: var(--once-groen-donker);
  color: var(--once-cream);
  padding: 0;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
  padding-bottom: 20px;
}
.logo {
  padding: 26px 20px 22px;
  border-bottom: 1px solid rgba(229, 225, 208, 0.12);
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.logo img {
  max-width: 150px;
  max-height: 70px;
  height: auto;
  display: block;
}
.logo-text {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--once-cream);
  line-height: 1;
  text-transform: lowercase;
}
.logo-tagline {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 4px;
  color: rgba(229, 225, 208, 0.6);
  text-transform: uppercase;
  margin-top: 2px;
}
.nav-item {
  padding: 11px 20px;
  color: rgba(229, 225, 208, 0.85);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 11px;
  border-left: 3px solid transparent;
  transition: all 0.15s;
  user-select: none;
  font-size: 13px;
}
.nav-item:hover { background: rgba(229, 225, 208, 0.06); color: var(--once-cream); }
.nav-item.active {
  background: rgba(229, 225, 208, 0.10);
  border-left-color: var(--once-cream);
  color: var(--once-cream);
  font-weight: 600;
}
.nav-icon { font-size: 17px; width: 22px; text-align: center; }
.nav-section {
  text-transform: uppercase;
  font-size: 10px;
  color: rgba(229, 225, 208, 0.45);
  padding: 18px 20px 6px;
  letter-spacing: 0.8px;
  font-weight: 700;
}

/* Main */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
  background: white;
  padding: 14px 28px;
  border-bottom: 1px solid var(--grijs-2);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.topbar h1 { font-size: 20px; font-weight: 700; color: var(--once-groen-donker); }
.search {
  background: var(--grijs-1);
  border: 1px solid var(--grijs-2);
  border-radius: 6px;
  padding: 7px 12px;
  width: 280px;
  font-size: 13px;
}
.search:focus { outline: none; border-color: var(--once-groen); }
.content { padding: 24px 28px; overflow-y: auto; flex: 1; }

/* Buttons */
.btn {
  background: var(--once-groen);
  color: white;
  border: none;
  border-radius: 6px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  letter-spacing: 0.1px;
}
.btn:hover { background: var(--once-groen-donker); }
.btn-secondary { background: white; color: var(--grijs-4); border: 1px solid var(--grijs-2); font-weight: 500; }
.btn-secondary:hover { background: var(--grijs-1); }
.btn-danger { background: var(--rood); }

/* Cards & tables */
.card {
  background: white;
  border: 1px solid var(--grijs-2);
  border-radius: 8px;
  padding: 18px;
  margin-bottom: 16px;
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; padding: 11px 12px; background: var(--grijs-1);
  border-bottom: 1px solid var(--grijs-2);
  font-weight: 700; color: var(--grijs-4); font-size: 11px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
td { padding: 12px; border-bottom: 1px solid var(--grijs-2); vertical-align: middle; }
tr:hover td { background: var(--grijs-1); cursor: pointer; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 4px;
  font-size: 11px; font-weight: 600;
}
.badge-success { background: #DBE7C9; color: #2A4015; }
.badge-warn { background: #F8E5BB; color: #6A4C0F; }
.badge-info { background: #D2DEEC; color: #1F3A5F; }
.badge-danger { background: #F5C9C3; color: #5F1F18; }

.section-title {
  font-size: 16px; font-weight: 700; margin-bottom: 14px;
  display: flex; justify-content: space-between; align-items: center;
  color: var(--once-groen-donker);
}

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
.form-group label {
  font-size: 11px; font-weight: 700; color: var(--grijs-4);
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-group input, .form-group select, .form-group textarea {
  padding: 8px 11px; border: 1px solid var(--grijs-2); border-radius: 6px;
  font-size: 13px; font-family: inherit;
  background: white;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--once-groen);
}

/* Tabs */
.tabs { display: flex; border-bottom: 1px solid var(--grijs-2); margin-bottom: 18px; gap: 4px; flex-wrap: wrap; }
.tab { padding: 10px 16px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--grijs-3); font-weight: 600; font-size: 13px; }
.tab.active { color: var(--once-groen-donker); border-bottom-color: var(--once-groen); }

/* Modal */
.modal-back {
  position: fixed; inset: 0; background: rgba(26,26,26,0.55);
  display: flex; align-items: center; justify-content: center; z-index: 100;
}
.modal {
  background: white; border-radius: 10px; width: min(720px, 92vw);
  max-height: 90vh; overflow-y: auto; padding: 24px;
}
.modal.modal-wide  { width: min(1100px, 95vw); }
.modal.modal-xwide { width: min(1400px, 96vw); }
.modal-head { display: flex; justify-content: space-between; margin-bottom: 16px; }
.modal h2 { font-size: 18px; color: var(--once-groen-donker); }
.close { background: none; border: none; font-size: 22px; cursor: pointer; color: var(--grijs-3); }

/* Toast */
.toast {
  position: fixed; bottom: 20px; right: 20px; background: var(--once-groen-donker);
  color: var(--once-cream); padding: 12px 18px; border-radius: 6px;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18); z-index: 200;
  animation: slidein 0.2s; font-weight: 500;
}
.toast.error { background: var(--rood); color: white; }
@keyframes slidein { from { transform: translateY(20px); opacity: 0; } to { transform: none; opacity: 1; } }

.empty { text-align: center; padding: 40px; color: var(--grijs-3); }

/* KPI */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.kpi-label { color: var(--grijs-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; font-weight: 700; }
.kpi-value { font-size: 26px; font-weight: 800; color: var(--once-groen-donker); }

/* Mobiel */
@media (max-width: 768px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; flex-direction: row; overflow-x: auto; padding: 4px; }
  .logo { padding: 6px 12px; border-bottom: none; margin-bottom: 0; }
  .logo img, .logo svg { max-height: 32px; }
  .logo-text { font-size: 18px; }
  .nav-section { display: none; }
  .nav-item { padding: 8px 12px; border-left: none; border-bottom: 3px solid transparent; white-space: nowrap; }
  .nav-item.active { border-left: none; border-bottom-color: var(--once-cream); }
  .search { width: 100%; }
  .topbar { flex-direction: column; gap: 10px; padding: 12px; }
  .form-row { grid-template-columns: 1fr; }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
  th, td { padding: 8px; font-size: 12px; }
  .hide-mobile { display: none; }
}
