* { box-sizing: border-box; }

:root {
  --navy: #00811F;
  --accent: #00811F;
  --accent-light: #E3F5E7;
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --border: #E4E8EE;
  --text: #101828;
  --text-sec: #64748B;
  --text-muted: #98A2B3;
  --success: #059669;
  --success-bg: #DCFCE7;
  --warning: #B45309;
  --warning-bg: #FEF3C7;
  --danger: #DC2626;
  --danger-bg: #FEE2E2;
  --purple: #7C3AED;
  --purple-bg: #EDE9FE;
  --gray: #475569;
  --gray-bg: #F1F5F9;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
}

html, body {
  height: 100%;
  margin: 0;
  background: var(--bg);
  font-family: "roboto", sans-serif;
  color: var(--text);
}

h1, h2, h3, .h1, .h2, .h3 { font-family: "bahnschrift", sans-serif; color: var(--text); margin: 0; }
.h1 { font-size: 26px; font-weight: 600; }
.h2 { font-size: 19px; font-weight: 600; }
.h3 { font-size: 15px; font-weight: 600; }

.body-text { font-size: 14px; color: var(--text); }
.body-sm { font-size: 13px; color: var(--text-sec); }
.label-sm { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.caption { font-size: 12px; color: var(--text-muted); }

a { color: var(--accent); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 16px; border-radius: 8px; font-size: 13.5px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; white-space: nowrap; font-family: "roboto", sans-serif;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { filter: brightness(0.94); }
.btn-secondary { background: #fff; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { background: var(--gray-bg); }
.btn:disabled { opacity: .6; cursor: not-allowed; }

.field-label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; }
.input {
  width: 100%; border: 1.5px solid var(--border); border-radius: 10px;
  padding: 11px 14px; font-size: 13.5px; color: var(--text); font-family: "roboto", sans-serif;
}
.input:focus { outline: none; border-color: var(--accent); }
.validation-message { color: var(--danger); font-size: 12.5px; margin-top: 4px; display: block; }

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
}
.dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.badge-new { background: var(--gray-bg); color: var(--gray); }
.badge-progress { background: var(--warning-bg); color: var(--warning); }
.badge-resolved { background: var(--success-bg); color: var(--success); }
.badge-unclear { background: var(--purple-bg); color: var(--purple); }
.badge-urgent { background: var(--danger-bg); color: var(--danger); }
.badge-normal { background: var(--gray-bg); color: var(--gray); }

/* Notificatie-teller in de navigatie */
.nav-item .notif-badge { margin-left: auto; background: #fff; color: var(--accent); font-size: 11px; font-weight: 700; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }

.link-btn { background: none; border: none; color: var(--accent); font-size: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* Uploadknop met voortgangsbalk */
.upload-knop { display: inline-flex; flex-direction: column; gap: 6px; }
.upload-disabled { opacity: .6; pointer-events: none; }
.upload-status { min-width: 200px; }
.upload-balk { height: 6px; background: var(--gray-bg); border-radius: 999px; overflow: hidden; }
.upload-balk-vul { height: 100%; background: var(--accent); border-radius: 999px; transition: width .15s ease; }
.upload-tekst { font-size: 12px; color: var(--text-sec); margin-top: 3px; }

/* Handtekening-pad */
.handtekening { display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.handtekening-canvas { border: 1px dashed var(--border); border-radius: 8px; background: #fff; touch-action: none; max-width: 100%; cursor: crosshair; }

/* Inspectie-checklist */
.punt-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px; margin-bottom: 12px; box-shadow: var(--shadow); }
.punt-kop { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.punt-naam { font-weight: 600; font-size: 15px; }
.bevinding-rij { display: flex; gap: 8px; flex-wrap: wrap; }
.bevinding-knop { padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text-sec); font-size: 13.5px; font-weight: 600; cursor: pointer; }
.bevinding-knop:hover:not(:disabled) { border-color: var(--text-muted); }
.bevinding-knop:disabled { cursor: default; opacity: .7; }
.bevinding-knop.goed.actief { background: var(--success-bg); border-color: var(--success); color: var(--success); }
.bevinding-knop.aandacht.actief { background: var(--warning-bg); border-color: var(--warning); color: var(--warning); }
.bevinding-knop.defect.actief { background: var(--danger-bg); border-color: var(--danger); color: var(--danger); }
.foto-thumb-wrap { position: relative; display: inline-block; }
.foto-verwijder { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--danger); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; }
.foto-verwijder .icon { width: 13px; height: 13px; }

/* Lightbox / media-overlay (foto's en documenten) */
.lightbox { position: fixed; inset: 0; z-index: 1000; background: rgba(16, 24, 40, .82); display: flex; align-items: center; justify-content: center; padding: 32px; outline: none; }
.lightbox-img { max-width: 92vw; max-height: 92vh; object-fit: contain; border-radius: 8px; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); cursor: default; }
.lightbox-close { position: absolute; top: 18px; right: 20px; width: 42px; height: 42px; border: none; border-radius: 50%; background: rgba(255, 255, 255, .14); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lightbox-close:hover { background: rgba(255, 255, 255, .28); }
.lightbox-close .icon { width: 22px; height: 22px; }

.doc-viewer { width: min(1000px, 94vw); height: 92vh; background: var(--surface); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 12px 40px rgba(0, 0, 0, .5); cursor: default; }
.doc-viewer-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.doc-viewer-titel { font-weight: 600; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.doc-viewer-acties { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.doc-viewer-frame { flex: 1; width: 100%; border: none; background: var(--gray-bg); }

/* Notificatie-melding op het dashboard */
.notif-banner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 20px; background: var(--accent-light); border: 1px solid #B6E2C0; border-radius: 12px; color: var(--text); text-decoration: none; transition: background .15s; }
.notif-banner:hover { background: #D6EFDC; }
.notif-banner-icon { width: 38px; height: 38px; flex-shrink: 0; border-radius: 9px; background: #fff; display: flex; align-items: center; justify-content: center; }
.notif-banner-icon .icon { width: 20px; height: 20px; color: var(--accent); }
.notif-banner-text { flex: 1; font-size: 14.5px; }
.notif-banner-cta { font-weight: 600; color: var(--accent); font-size: 14px; white-space: nowrap; }

/* Notificatielijst */
.notif-lijst { display: flex; flex-direction: column; }
.notif-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); cursor: pointer; }
.notif-row:last-child { border-bottom: none; }
.notif-row:hover { background: var(--gray-bg); }
.notif-row.ongelezen { background: var(--accent-light); }
.notif-icon { width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; background: var(--accent-light); display: flex; align-items: center; justify-content: center; }
.notif-icon .icon { width: 18px; height: 18px; color: var(--accent); }
.notif-main { flex: 1; min-width: 0; }
.notif-tekst { font-size: 14px; color: var(--text); }
.notif-meta { font-size: 12px; color: var(--text-sec); margin-top: 2px; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }

.panel { background: #fff; border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow); }

.validation-message { display: block; }

#blazor-error-ui {
  background: var(--danger-bg);
  color: var(--danger);
  bottom: 0;
  box-shadow: 0 -1px 6px rgba(0,0,0,.1);
  display: none;
  left: 0;
  padding: 12px 20px;
  position: fixed;
  width: 100%;
  z-index: 1000;
  font-size: 13.5px;
}
#blazor-error-ui .dismiss { cursor: pointer; float: right; }

.blazor-error-boundary {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  border-radius: 8px;
  padding: 1rem;
  color: var(--danger);
}
.blazor-error-boundary::after { content: "Er is een fout opgetreden."; }

/* ---------- Loginpagina (gebrande split met huisfoto) ---------- */
.login-page { display: flex; min-height: 100vh; background: var(--bg); }

.login-brand {
  position: relative; flex: 1 1 0; background: var(--navy); color: #fff;
  overflow: hidden; display: flex; flex-direction: column;
}
.login-brand-top { position: relative; z-index: 2; padding: 56px 56px 0; }
.login-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 40px; }
.login-logo svg { width: 30px; height: 30px; stroke: #fff; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }
.login-logo span { font-family: "bahnschrift", sans-serif; font-weight: 600; font-size: 20px; letter-spacing: .01em; }
.login-tagline { font-family: "bahnschrift", sans-serif; font-weight: 700; font-size: 40px; line-height: 1.15; max-width: 12ch; margin: 0 0 16px; color: #fff; }
/* Geen zichtbaar focus-kader om de kop die bij het laden automatisch focus krijgt. */
.login-tagline:focus, .login-tagline:focus-visible { outline: none; }
.login-subtagline { font-size: 15px; line-height: 1.55; color: rgba(255, 255, 255, .82); max-width: 34ch; margin: 0; }

/* Huisfoto onderin, met groene gradient die 'm laat overlopen in het paneel. */
.login-photo {
  position: absolute; inset: 0; z-index: 1;
  background-image:
    linear-gradient(180deg, var(--navy) 26%, rgba(0, 129, 31, .5) 52%, rgba(0, 129, 31, .15) 100%),
    url('/img/huis.jpg');
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center, center bottom;
}

.login-form-side { flex: 0 0 480px; display: flex; align-items: center; justify-content: center; padding: 32px; background: var(--surface); }
.login-card { width: 100%; max-width: 360px; }
.login-fout { background: var(--danger-bg); color: var(--danger); border-radius: 8px; padding: 10px 12px; font-size: 13px; margin-bottom: 16px; }
.login-footer { text-align: center; font-size: 12.5px; color: var(--text-muted); margin-top: 28px; line-height: 1.6; }
.login-footer span { color: var(--accent); font-weight: 600; }

@media (max-width: 860px) {
  .login-page { flex-direction: column; }
  .login-brand { flex: 0 0 auto; min-height: 240px; }
  .login-brand-top { padding: 32px 32px 0; }
  .login-tagline { font-size: 28px; max-width: none; }
  .login-subtagline { display: none; }
  .login-photo {
    background-image:
      linear-gradient(180deg, var(--navy) 20%, rgba(0, 129, 31, .55) 60%, rgba(0, 129, 31, .2) 100%),
      url('/img/huis.jpg');
  }
  .login-form-side { flex: 1 1 auto; flex-direction: column; align-items: stretch; padding: 32px 24px 48px; }
  .login-card { margin: 0 auto; }
}

/* ---------- Gedeelde layout & componenten ---------- */
.content { padding: 26px 32px; }

.icon {
  width: 18px; height: 18px; stroke: currentColor; fill: none;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0;
}

.topbar {
  height: 72px; min-height: 72px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--border);
}
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-sec); margin-bottom: 4px; }
.breadcrumb .icon { width: 13px; height: 13px; color: var(--text-muted); }
.topbar-actions { display: flex; align-items: center; gap: 14px; }

.searchbox {
  display: flex; align-items: center; gap: 8px; background: var(--gray-bg);
  border: 1px solid var(--border); border-radius: 8px; padding: 9px 14px; width: 260px;
}
.searchbox .icon { width: 16px; height: 16px; color: var(--text-muted); }
.searchbox input {
  border: none; background: transparent; outline: none; width: 100%;
  font-size: 13px; color: var(--text); font-family: "roboto", sans-serif;
}
.searchbox input::placeholder { color: var(--text-muted); }

.btn .icon { width: 15px; height: 15px; }

.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.link-more { font-size: 12.5px; color: var(--accent); font-weight: 600; }

table.table { width: 100%; border-collapse: collapse; }
table.table th { text-align: left; padding: 10px 20px; font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); border-bottom: 1px solid var(--border); }
table.table td { padding: 13px 20px; font-size: 13.5px; color: var(--text); border-bottom: 1px solid var(--border); vertical-align: middle; }
table.table tbody tr:last-child td { border-bottom: none; }
table.table tbody tr.clickable { cursor: pointer; }
table.table tbody tr.clickable:hover { background: var(--gray-bg); }
.addr-primary { font-weight: 600; font-size: 13.5px; color: var(--text); }
.addr-sub { font-size: 12px; color: var(--text-muted); }

.cat-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-sec); font-weight: 500; }
.cat-chip .icon { width: 14px; height: 14px; }

.avatar {
  width: 34px; height: 34px; border-radius: 999px; background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff; flex-shrink: 0;
}

.tenant-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--gray-bg); padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--text); }
.tenant-chip .avatar { width: 20px; height: 20px; font-size: 10px; }

.tag { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-sec); }
.tag .icon { width: 14px; height: 14px; color: var(--text-muted); }

.tabs { display: flex; gap: 4px; padding: 0 32px; background: var(--surface); border-bottom: 1px solid var(--border); }
.tab { padding: 14px 6px; font-size: 13.5px; font-weight: 600; color: var(--text-muted); border-bottom: 2px solid transparent; margin-right: 26px; background: none; border-top: none; border-left: none; border-right: none; cursor: pointer; font-family: "roboto", sans-serif; }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.woning-hero { display: flex; gap: 20px; padding: 24px 32px; background: var(--surface); border-bottom: 1px solid var(--border); }
.woning-photo { width: 180px; height: 120px; border-radius: 10px; flex-shrink: 0; overflow: hidden; background: linear-gradient(135deg, #DCF0E1, #BFE4C9); display: flex; align-items: center; justify-content: center; }
.woning-photo .icon { width: 36px; height: 36px; color: #4E9B63; }
.woning-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.woning-meta { display: flex; flex-direction: column; gap: 8px; justify-content: center; }
.woning-tags { display: flex; gap: 8px; align-items: center; }

.onderdeel-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); }
.onderdeel-icon { width: 38px; height: 38px; border-radius: 9px; background: var(--accent-light); display: flex; align-items: center; justify-content: center; }
.onderdeel-icon .icon { color: var(--accent); width: 19px; height: 19px; }
.onderdeel-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.onderdeel-note { font-size: 12px; color: var(--text-muted); }

.icon-btn { width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.icon-btn .icon { color: var(--text-sec); }

/* Modal / dialoog */
.modal-overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal { background: var(--surface); border-radius: 14px; box-shadow: 0 20px 50px rgba(16,24,40,.25); width: 460px; max-width: 100%; max-height: 90vh; overflow-y: auto; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px 24px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); }
.form-row { margin-bottom: 16px; }

.empty-state { text-align: center; padding: 48px 24px; color: var(--text-muted); }
.empty-state .icon { width: 40px; height: 40px; margin: 0 auto 12px; color: var(--text-muted); }

/* ---------- Meldingen split-view ---------- */
.filters-row { display: flex; align-items: center; gap: 10px; padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--surface); flex-wrap: wrap; }
.filter-pill { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px; font-size: 12.5px; font-weight: 600; color: var(--text-sec); background: var(--surface); cursor: pointer; }
.filter-pill.active-filter { background: var(--accent-light); border-color: #B6E2C0; color: var(--accent); }

.split { display: flex; min-height: calc(100vh - 72px - 65px); }
.split-list { width: 60%; border-right: 1px solid var(--border); background: var(--surface); overflow-y: auto; }
.split-detail { width: 40%; padding: 22px 24px; overflow-y: auto; }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 24px; border-bottom: 1px solid var(--border); cursor: pointer; }
.list-row:hover { background: var(--gray-bg); }
.list-row.selected { background: var(--accent-light); }
.list-row-main { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.list-row-title { font-size: 13.5px; font-weight: 600; color: var(--text); }
.list-row-sub { font-size: 12px; color: var(--text-muted); }

.stepper { display: flex; align-items: center; margin: 18px 0 20px; }
.step { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1; position: relative; }
.step-circle { width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; background: var(--gray-bg); color: var(--text-muted); z-index: 1; font-size: 12px; font-weight: 700; }
.step.done .step-circle { background: var(--success); color: #fff; }
.step.now .step-circle { background: var(--accent); color: #fff; }
.step-circle .icon { width: 13px; height: 13px; }
.step-label { font-size: 11px; font-weight: 600; color: var(--text-muted); text-align: center; }
.step.done .step-label, .step.now .step-label { color: var(--text); }
.step-line { position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: var(--gray-bg); z-index: 0; }
.step.done .step-line { background: var(--success); }
.step:first-child .step-line { display: none; }

.tip-box { display: flex; gap: 10px; background: var(--accent-light); border: 1px solid #B6E2C0; border-radius: 10px; padding: 14px; }
.tip-box .icon { color: var(--accent); width: 18px; height: 18px; flex-shrink: 0; }
.tip-box .body-sm { color: #0F4A1E; }

.note-internal { display: flex; gap: 8px; background: #FFF7ED; border: 1px solid #FDE4BB; border-radius: 8px; padding: 10px 12px; }
.note-internal .icon { width: 14px; height: 14px; color: var(--warning); flex-shrink: 0; margin-top: 1px; }

.foto-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.foto-thumb { width: 72px; height: 72px; border-radius: 8px; object-fit: cover; border: 1px solid var(--border); }

/* categorie-tegels (melding aanmaken) */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.cat-option { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 8px; border: 1.5px solid var(--border); border-radius: 10px; background: var(--surface); cursor: pointer; }
.cat-option.selected { border-color: var(--accent); background: var(--accent-light); }
.cat-option .icon { width: 20px; height: 20px; color: var(--text-sec); }
.cat-option.selected .icon { color: var(--accent); }
.cat-option span { font-size: 12px; font-weight: 600; color: var(--text); }

.prio-toggle { display: flex; gap: 10px; }
.prio-option { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px; border: 1.5px solid var(--border); border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--text-sec); cursor: pointer; background: var(--surface); }
.prio-option.urgent-selected { border-color: var(--danger); background: var(--danger-bg); color: var(--danger); }
.prio-option.normal-selected { border-color: var(--accent); background: var(--accent-light); color: var(--accent); }
.prio-option .icon { width: 14px; height: 14px; }

/* ---------- Documenten ---------- */
.doc-row { display: flex; align-items: center; gap: 14px; padding: 14px 20px; border-bottom: 1px solid var(--border); }
.doc-row:last-child { border-bottom: none; }
.doc-icon { width: 38px; height: 38px; border-radius: 9px; background: var(--gray-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-icon .icon { width: 18px; height: 18px; color: var(--text-sec); }
.doc-main { flex: 1; min-width: 0; }
.doc-name { font-size: 13.5px; font-weight: 600; color: var(--text); }
.doc-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.doc-actions { display: flex; align-items: center; gap: 8px; }
.checkbox-list { display: flex; flex-direction: column; gap: 8px; max-height: 180px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.toggle-row { display: flex; align-items: center; gap: 8px; font-size: 13px; }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 22px; }
.stat-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon { width: 36px; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; }
.stat-icon .icon { width: 18px; height: 18px; }
.stat-value { font-family: "bahnschrift", sans-serif; font-size: 26px; font-weight: 600; color: var(--text); }
.stat-label { font-size: 12.5px; color: var(--text-sec); font-weight: 500; }

/* ---------- Tijdlijn ---------- */
.timeline { padding: 18px 20px; display: flex; flex-direction: column; }
.tl-item { display: flex; gap: 12px; padding-bottom: 20px; position: relative; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 5px; top: 14px; bottom: 0; width: 1px; background: var(--border); }
.tl-dot { width: 11px; height: 11px; border-radius: 999px; background: var(--accent); margin-top: 3px; flex-shrink: 0; border: 2px solid var(--accent-light); }
.tl-dot-intern { background: var(--warning); border-color: var(--warning-bg); }
.tl-text { font-size: 13px; color: var(--text); line-height: 1.45; }
.tl-time { font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Communicatie / berichten ---------- */
.bericht-lijst { display: flex; flex-direction: column; gap: 12px; padding: 18px 20px; }
.bericht { display: flex; gap: 10px; }
.bericht-body { flex: 1; }
.bericht-bubble { background: var(--gray-bg); border-radius: 10px; padding: 10px 12px; font-size: 13.5px; color: var(--text); white-space: pre-wrap; }
.bericht.intern .bericht-bubble { background: #FFF7ED; border: 1px solid #FDE4BB; }
.bericht-meta { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.bericht-intern-label { font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--warning); }

/* ---------- Herbruikbare 2-koloms content-layout ---------- */
.content-grid-2 { display: grid; grid-template-columns: 1.5fr 1fr; gap: 18px; }

/* ================= MOBIEL / RESPONSIEF ================= */
@media (max-width: 768px) {
  /* Content-marges compacter */
  .content { padding: 16px; }

  /* Alle 2-koloms layouts onder elkaar */
  .content-grid-2 { grid-template-columns: 1fr; }

  /* Dashboard-tegels: 2 op een rij i.p.v. 4 */
  .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-value { font-size: 22px; }

  /* Topbar: laat 'm afbreken en de zoekbalk meeschalen */
  .topbar { height: auto; min-height: 0; padding: 14px 16px; flex-wrap: wrap; gap: 10px; }
  .topbar-actions { flex-wrap: wrap; gap: 8px; width: 100%; }
  .searchbox { width: 100%; }
  .h1 { font-size: 22px; }

  /* Brede tabellen horizontaal scrollbaar binnen hun paneel */
  .panel { overflow-x: auto; }
  table.table th, table.table td { padding-left: 14px; padding-right: 14px; white-space: nowrap; }

  /* Meldingen split-view: lijst en detail onder elkaar */
  .split { flex-direction: column; min-height: 0; }
  .split-list { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
  .split-detail { width: 100%; }

  /* Woningdetail: onderdelen 1 kolom, hero stapelt */
  .woning-hero { flex-direction: column; padding: 20px 16px; }
  .woning-photo { width: 100%; height: 150px; }
  .tabs { padding: 0 16px; overflow-x: auto; }

  /* Categorie-tegels bij melding aanmaken: 2 op een rij */
  .cat-grid { grid-template-columns: repeat(2, 1fr); }

  /* Modals passend op smalle schermen */
  .modal { width: 100%; }
}
