:root {
  --wbmz-primary: #1a1f2e;
  --wbmz-accent: #3d7ef6;
  --wbmz-accent-light: #e8f0fe;
  --wbmz-success: #10b981;
  --wbmz-warning: #f59e0b;
  --wbmz-danger: #ef4444;
  --wbmz-surface: #ffffff;
  --wbmz-bg: #f4f6fb;
  --wbmz-border: #e2e8f0;
  --wbmz-text: #1e293b;
  --wbmz-muted: #94a3b8;
  --wbmz-card-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
}

* { box-sizing: border-box; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--wbmz-bg);
  color: var(--wbmz-text);
  font-size: 14px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.wbmz-navbar {
  background: var(--wbmz-primary);
  padding: .75rem 0;
  box-shadow: 0 2px 12px rgba(0,0,0,.15);
}

.wbmz-brand-name {
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  letter-spacing: -.01em;
}

.wbmz-logo { border-radius: 6px; }

.wbmz-logo-placeholder {
  width: 32px; height: 32px;
  background: var(--wbmz-accent);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1rem;
}

.wbmz-nav-link {
  color: rgba(255,255,255,.7) !important;
  border-radius: 8px;
  padding: .45rem .85rem !important;
  font-size: .85rem;
  font-weight: 500;
  transition: all .15s;
  display: flex; align-items: center; gap: .4rem;
}

.wbmz-nav-link:hover,
.wbmz-nav-link.active {
  background: rgba(255,255,255,.12);
  color: #fff !important;
}

.wbmz-footer {
  background: transparent;
  padding: 1.5rem 0 1rem;
  margin-top: auto;
  border-top: 1px solid var(--wbmz-border);
}

.wbmz-card {
  background: var(--wbmz-surface);
  border-radius: 12px;
  border: 1px solid var(--wbmz-border);
  box-shadow: var(--wbmz-card-shadow);
  padding: 1.5rem;
}

.wbmz-stat-card {
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--wbmz-border);
  background: var(--wbmz-surface);
  box-shadow: var(--wbmz-card-shadow);
  transition: transform .15s, box-shadow .15s;
}

.wbmz-stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 24px rgba(0,0,0,.08); }

.wbmz-stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem;
}

.wbmz-stat-icon.blue { background: var(--wbmz-accent-light); color: var(--wbmz-accent); }
.wbmz-stat-icon.green { background: #d1fae5; color: var(--wbmz-success); }
.wbmz-stat-icon.orange { background: #fef3c7; color: var(--wbmz-warning); }
.wbmz-stat-icon.red { background: #fee2e2; color: var(--wbmz-danger); }

.wbmz-stat-value {
  font-size: 1.6rem;
  font-weight: 600;
  color: var(--wbmz-text);
  font-family: 'DM Mono', monospace;
  line-height: 1.2;
}

.wbmz-stat-label {
  font-size: .8rem;
  color: var(--wbmz-muted);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-top: .25rem;
}

.wbmz-page-title {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--wbmz-text);
  margin: 0;
}

.wbmz-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.wbmz-table th {
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--wbmz-muted);
  padding: .75rem 1rem;
  border-bottom: 2px solid var(--wbmz-border);
  white-space: nowrap;
  background: #f8fafc;
}

.wbmz-table th:first-child { border-radius: 8px 0 0 0; }
.wbmz-table th:last-child { border-radius: 0 8px 0 0; }

.wbmz-table td {
  padding: .7rem 1rem;
  border-bottom: 1px solid var(--wbmz-border);
  vertical-align: middle;
}

.wbmz-table tr:last-child td { border-bottom: none; }
.wbmz-table tr:hover td { background: #f8fafc; }

.wbmz-table tr.betaald td { opacity: .6; }

.wbmz-badge-betaald {
  background: #d1fae5; color: #065f46;
  font-size: .7rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 20px;
  white-space: nowrap;
}

.wbmz-badge-open {
  background: #fef3c7; color: #92400e;
  font-size: .7rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 20px;
  white-space: nowrap;
}

.wbmz-badge-concept {
  background: #e0e7ff; color: #3730a3;
  font-size: .7rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 20px;
}

.wbmz-badge-definitief {
  background: #d1fae5; color: #065f46;
  font-size: .7rem; font-weight: 600;
  padding: .2rem .6rem; border-radius: 20px;
}

.wbmz-btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem;
  border-radius: 8px;
  font-size: .85rem;
  font-weight: 500;
  border: none;
  cursor: pointer;
  transition: all .15s;
  text-decoration: none;
}

.wbmz-btn-primary { background: var(--wbmz-accent); color: #fff; }
.wbmz-btn-primary:hover { background: #2d6ef0; color: #fff; }
.wbmz-btn-success { background: var(--wbmz-success); color: #fff; }
.wbmz-btn-success:hover { background: #059669; color: #fff; }
.wbmz-btn-outline { background: transparent; color: var(--wbmz-text); border: 1px solid var(--wbmz-border); }
.wbmz-btn-outline:hover { background: var(--wbmz-bg); color: var(--wbmz-text); }
.wbmz-btn-danger { background: var(--wbmz-danger); color: #fff; }
.wbmz-btn-danger:hover { background: #dc2626; color: #fff; }
.wbmz-btn-sm { padding: .3rem .7rem; font-size: .8rem; }

.wbmz-form-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--wbmz-text);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .35rem;
}

.wbmz-form-control {
  border: 1px solid var(--wbmz-border);
  border-radius: 8px;
  padding: .55rem .85rem;
  font-size: .875rem;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  background: var(--wbmz-surface);
  color: var(--wbmz-text);
}

.wbmz-form-control:focus {
  outline: none;
  border-color: var(--wbmz-accent);
  box-shadow: 0 0 0 3px rgba(61,126,246,.12);
}

.wbmz-form-select {
  border: 1px solid var(--wbmz-border);
  border-radius: 8px;
  padding: .55rem .85rem;
  font-size: .875rem;
  font-family: 'DM Sans', sans-serif;
  width: 100%;
  background: var(--wbmz-surface);
  color: var(--wbmz-text);
  cursor: pointer;
}

.wbmz-form-select:focus { outline: none; border-color: var(--wbmz-accent); box-shadow: 0 0 0 3px rgba(61,126,246,.12); }

.wbmz-alert {
  border-radius: 10px;
  border: none;
  font-size: .875rem;
  padding: .75rem 1rem;
  display: flex; align-items: center; gap: .5rem;
}

.wbmz-divider {
  height: 1px;
  background: var(--wbmz-border);
  border: none;
  margin: 1.5rem 0;
}

.wbmz-section-title {
  font-size: .9rem;
  font-weight: 600;
  color: var(--wbmz-text);
  margin-bottom: 1rem;
}

.wbmz-km-value {
  font-family: 'DM Mono', monospace;
  font-size: .875rem;
  font-weight: 500;
}

.wbmz-eur-value {
  font-family: 'DM Mono', monospace;
  font-size: .875rem;
  font-weight: 600;
  color: var(--wbmz-accent);
}

.wbmz-eur-value.paid { color: var(--wbmz-success); }

.wbmz-progress-bar-wrap {
  background: var(--wbmz-border);
  border-radius: 99px;
  height: 8px;
  overflow: hidden;
}

.wbmz-progress-bar {
  height: 100%;
  border-radius: 99px;
  background: var(--wbmz-accent);
  transition: width .4s ease;
}

.wbmz-progress-bar.danger { background: var(--wbmz-danger); }
.wbmz-progress-bar.warning { background: var(--wbmz-warning); }

.wbmz-checkbox-row { cursor: pointer; }
.wbmz-checkbox-row:hover td { background: var(--wbmz-accent-light) !important; }

.table-actions { display: flex; gap: .4rem; }

.wbmz-month-nav a {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .7rem;
  border-radius: 6px;
  font-size: .8rem;
  color: var(--wbmz-muted);
  text-decoration: none;
  border: 1px solid var(--wbmz-border);
  transition: all .15s;
}

.wbmz-month-nav a:hover { border-color: var(--wbmz-accent); color: var(--wbmz-accent); }

.soort-badge-enkel { background: #ede9fe; color: #5b21b6; font-size: .7rem; padding: .2rem .55rem; border-radius: 20px; font-weight: 600; }
.soort-badge-retour { background: #dbeafe; color: #1e40af; font-size: .7rem; padding: .2rem .55rem; border-radius: 20px; font-weight: 600; }

@media (max-width: 768px) {
  .wbmz-stat-value { font-size: 1.2rem; }
  .wbmz-table th, .wbmz-table td { padding: .5rem .75rem; }
  .wbmz-card { padding: 1rem; }
}

@media print {
  .wbmz-navbar, .wbmz-footer, .wbmz-btn, .table-actions { display: none !important; }
}

/* ===== DARK MODE ===== */
[data-theme="dark"] {
  --wbmz-primary: #0f1117;
  --wbmz-accent: #4f8ef7;
  --wbmz-accent-light: #1a2744;
  --wbmz-success: #10b981;
  --wbmz-warning: #f59e0b;
  --wbmz-danger: #ef4444;
  --wbmz-surface: #1a1f2e;
  --wbmz-bg: #0f1117;
  --wbmz-border: #2d3748;
  --wbmz-text: #e2e8f0;
  --wbmz-muted: #64748b;
  --wbmz-card-shadow: 0 1px 3px rgba(0,0,0,.3), 0 4px 16px rgba(0,0,0,.2);
}

[data-theme="dark"] .wbmz-table th { background: #1e2636; }
[data-theme="dark"] .wbmz-table tr:hover td { background: #1e2636; }
[data-theme="dark"] .wbmz-form-control,
[data-theme="dark"] .wbmz-form-select { background: #1e2636; color: var(--wbmz-text); border-color: var(--wbmz-border); }
[data-theme="dark"] .wbmz-stat-icon.blue { background: #1a2744; }
[data-theme="dark"] .wbmz-stat-icon.green { background: #064e3b; }
[data-theme="dark"] .wbmz-stat-icon.orange { background: #451a03; }
[data-theme="dark"] .wbmz-stat-icon.red { background: #450a0a; }
[data-theme="dark"] .badge.bg-light { background: #2d3748 !important; color: var(--wbmz-text) !important; }
[data-theme="dark"] .modal-content { background: var(--wbmz-surface); color: var(--wbmz-text); }
[data-theme="dark"] .btn-close { filter: invert(1); }

/* ===== UNDO TOAST ===== */
.wbmz-undo-toast {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  background: #1a1f2e;
  color: #fff;
  padding: .75rem 1.25rem;
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 1rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  z-index: 9999;
  animation: wbmz-slide-up .25s ease;
  font-size: .875rem;
  white-space: nowrap;
}
.wbmz-undo-toast .wbmz-btn {
  color: #fff !important;
  border-color: rgba(255,255,255,.35) !important;
  background: rgba(255,255,255,.12) !important;
  flex-shrink: 0;
}
.wbmz-undo-toast .wbmz-btn:hover {
  background: rgba(255,255,255,.22) !important;
  border-color: rgba(255,255,255,.6) !important;
}

@keyframes wbmz-slide-up {
  from { opacity: 0; transform: translateX(-50%) translateY(1rem); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ===== MODAL ===== */
.wbmz-modal { background: var(--wbmz-surface); border-radius: 16px; border: 1px solid var(--wbmz-border); }
.wbmz-modal kbd { background: var(--wbmz-bg); border: 1px solid var(--wbmz-border); border-radius: 4px; padding: 1px 6px; font-size: .75rem; display: inline-block; min-width: 28px; text-align: center; margin-right: .5rem; }
.wbmz-modal td { padding: .35rem 0; }

/* ===== TEMPLATE CARDS ===== */
.wbmz-template-card {
  border: 1px solid var(--wbmz-border);
  border-radius: 10px;
  padding: 1rem;
  background: var(--wbmz-surface);
  transition: all .15s;
  cursor: pointer;
  position: relative;
}
.wbmz-template-card:hover { border-color: var(--wbmz-accent); box-shadow: 0 0 0 3px var(--wbmz-accent-light); }
.wbmz-template-card.gepind { border-color: var(--wbmz-accent); background: var(--wbmz-accent-light); }
.wbmz-template-pin { position: absolute; top: .75rem; right: .75rem; font-size: .75rem; }

/* ===== QUICK ENTRY (snel.php) ===== */
.wbmz-snel-card { max-width: 480px; margin: 2rem auto; }

/* ===== PROGNOSE ===== */
.wbmz-prognose { font-size: .8rem; color: var(--wbmz-muted); display: flex; align-items: center; gap: .4rem; }
.wbmz-prognose strong { color: var(--wbmz-text); }

/* ===== STAT DELTA ===== */
.wbmz-delta { font-size: .75rem; font-weight: 600; margin-top: .2rem; }
.wbmz-delta.up { color: var(--wbmz-success); }
.wbmz-delta.down { color: var(--wbmz-danger); }
.wbmz-delta.neu { color: var(--wbmz-muted); }

/* ===== AUDIT LOG ===== */
.wbmz-audit-actie { font-size: .7rem; font-weight: 600; padding: .15rem .55rem; border-radius: 20px; }
.audit-login { background: #d1fae5; color: #065f46; }
.audit-aanmaken { background: #dbeafe; color: #1e40af; }
.audit-bewerken { background: #fef3c7; color: #92400e; }
.audit-verwijderen { background: #fee2e2; color: #991b1b; }
.audit-betaald { background: #d1fae5; color: #065f46; }
.audit-overig { background: #f1f5f9; color: #475569; }

/* ===== JAAROVERZICHT PDF BARS ===== */
.pdf-bar-wrap { display: flex; align-items: center; gap: 8px; }
.pdf-bar { height: 12px; background: #1a1f2e; border-radius: 3px; min-width: 2px; }

/* ===== ORS AFSTAND BADGE ===== */
.wbmz-ors-badge { font-size: .75rem; background: #e0f2fe; color: #0369a1; padding: .2rem .6rem; border-radius: 20px; display: inline-flex; align-items: center; gap: .3rem; cursor: pointer; }
.wbmz-ors-badge:hover { background: #bae6fd; }

/* ===== OFFLINE INDICATOR ===== */
.wbmz-offline-banner { background: var(--wbmz-warning); color: #fff; text-align: center; font-size: .8rem; padding: .35rem; display: none; }
body.offline .wbmz-offline-banner { display: block; }

/* ===== iCAL IMPORT ===== */
.ical-event-row { padding: .5rem 0; border-bottom: 1px solid var(--wbmz-border); }
.ical-event-row:last-child { border-bottom: none; }

/* ===== WKR LIMIET WARNING ===== */
.wkr-limiet-warn { background: #fef3c7; border: 1px solid #fbbf24; border-radius: 8px; padding: .5rem .75rem; font-size: .8rem; color: #92400e; }
.wkr-limiet-over { background: #fee2e2; border: 1px solid #fca5a5; border-radius: 8px; padding: .5rem .75rem; font-size: .8rem; color: #991b1b; }

/* ===== RESPONSIVE FIXES ===== */
@media (max-width: 768px) {
  .wbmz-undo-toast { left: 1rem; right: 1rem; transform: none; white-space: normal; flex-wrap: wrap; }
  .wbmz-snel-card { margin: 1rem; max-width: 100%; }
}

@media print {
  .wbmz-navbar, .wbmz-footer, .wbmz-btn, .table-actions, .wbmz-undo-toast { display: none !important; }
}
