/* =====================================================================
   Bregman Vastgoedbeheer CRM - stylesheet
   Merkidentiteit: exact Bregman Vastgoed websitepalet: navy / zand / koper.
   Fraunces (titels) / Inter (interface) / IBM Plex Mono (cijfers, codes)
   ===================================================================== */

:root {
    --color-burgundy: #0F3D5C; /* website navy */
    --color-burgundy-dark: #0A2C42; /* website navy-deep */
    --color-burgundy-light: #F5A623; /* website brass accent */
    --color-ivory: #FAF8F3; /* website paper */
    --color-ivory-dark: #EDE6D6; /* website sand */
    --color-surface: #ffffff;
    --color-border: #D8CFBB; /* website line */
    --color-border-strong: #C8BDA6;
    --color-text: #1E2A30; /* website ink */
    --color-text-muted: #5C6B73; /* website slate */
    --color-text-faint: #8C989E;

    --color-green-bg: #e7f0e6;   --color-green-fg: #35673f;
    --color-amber-bg: #f8ecd8;   --color-amber-fg: #96601a;
    --color-red-bg: #f7e3df;     --color-red-fg: #a13a2c;
    --color-blue-bg: #e4ecf1;    --color-blue-fg: #2f5872;
    --color-gray-bg: #ece7dd;    --color-gray-fg: #756b5c;

    --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

    --radius-sm: 2px;
    --radius-md: 2px;
    --radius-lg: 2px;
    --shadow-sm: 0 1px 2px rgba(10,44,66,.05), 0 1px 1px rgba(10,44,66,.04);
    --shadow-md: 0 8px 24px -8px rgba(10,44,66,.16);
    --sidebar-width: 248px;

    /* Exacte Bregman Vastgoed websitepalet */
    --website-navy: #0F3D5C;
    --website-navy-deep: #0A2C42;
    --website-sand: #EDE6D6;
    --website-paper: #FAF8F3;
    --website-ink: #1E2A30;
    --website-slate: #5C6B73;
    --website-brass: #F5A623;
    --website-brass-light: #F8C374;
    --website-line: #D8CFBB;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--color-ivory);
    color: var(--color-text);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.5;
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; margin: 0 0 4px; color: var(--color-text); }
h1 { font-size: 26px; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }
p { margin: 0 0 8px; }
a { color: var(--color-burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: var(--font-mono); }

/* ---------------------------------------------------------------------
   App shell
   --------------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    background: #0A2C42;
    color: #DCE6EB;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-brand {
    padding: 22px 20px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}
.sidebar-brand .brand-name {
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 600;
    color: #fff;
    line-height: 1.25;
}
.sidebar-brand .brand-tag {
    font-size: 11px;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #F8C374;
    margin-top: 2px;
}

.sidebar-nav { list-style: none; margin: 12px 0; padding: 0 10px; flex: 1; }
.sidebar-nav li { margin-bottom: 2px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius-sm);
    color: #DCE6EB;
    font-size: 13.5px;
    font-weight: 500;
    text-decoration: none;
    transition: background .12s ease;
}
.sidebar-nav a .num {
    font-family: var(--font-mono);
    font-size: 11px;
    color: #F8C374;
    width: 16px;
}
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); }
.sidebar-nav li.active a { background: rgba(255,255,255,0.16); color: #ffffff; }

.sidebar-footer {
    padding: 14px 20px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 12px;
    color: #B7C4CA;
}
.sidebar-footer a { color: #DCE6EB; }

/* ---------------------------------------------------------------------
   Main area
   --------------------------------------------------------------------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: 10px 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    position: sticky;
    top: 0;
    z-index: 20;
}
.topbar-search { flex: 1; max-width: 420px; position: relative; }
.topbar-search input {
    width: 100%;
    padding: 8px 12px 8px 34px;
    border: 1px solid var(--color-border-strong);
    border-radius: 20px;
    background: var(--color-ivory-dark);
    font-size: 13px;
    font-family: var(--font-sans);
}
.topbar-search .icon { position: absolute; left: 12px; top: 9px; opacity: .5; font-size: 13px; }
.topbar-search-results {
    position: absolute; top: 38px; left: 0; right: 0;
    background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md);
    box-shadow: var(--shadow-md); max-height: 420px; overflow-y: auto; display: none; z-index: 30;
}
.topbar-search-results.show { display: block; }
.topbar-search-group { padding: 6px 12px; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-faint); background: var(--color-ivory-dark); }
.topbar-search-item { display: block; padding: 8px 12px; font-size: 13px; color: var(--color-text); border-bottom: 1px solid var(--color-border); }
.topbar-search-item:hover { background: var(--color-ivory-dark); text-decoration: none; }
.topbar-search-item small { display: block; color: var(--color-text-muted); font-size: 11px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.topbar-user { font-size: 13px; color: var(--color-text-muted); }
.topbar-user strong { color: var(--color-text); }
.btn-logout { font-size: 12px; color: var(--color-text-muted); }

.content { padding: 26px 28px 60px; max-width: 1440px; width: 100%; }

/* ---------------------------------------------------------------------
   Page header
   --------------------------------------------------------------------- */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; gap: 16px; flex-wrap: wrap; }
.page-header .titles p.subtitle { color: var(--color-text-muted); margin-top: 2px; font-size: 13.5px; }
.page-header .actions { display: flex; gap: 10px; flex-wrap: wrap; }

.breadcrumb { font-size: 12.5px; color: var(--color-text-muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--color-text-muted); }

/* ---------------------------------------------------------------------
   Buttons
   --------------------------------------------------------------------- */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-sm);
    font-size: 13px; font-weight: 600; font-family: var(--font-sans);
    border: 1px solid transparent; cursor: pointer; text-decoration: none;
    line-height: 1.3;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: #0A2C42; color: #fff; border-color:#0A2C42; }
.btn-primary:hover { background: #0F3D5C; color: #fff; }
.btn-secondary { background: var(--color-surface); color: var(--color-text); border-color: var(--color-border-strong); }
.btn-secondary:hover { background: var(--color-ivory-dark); }
.btn-danger { background: #C0392B; color: #fff; }
.btn-danger:hover { opacity: .9; }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-ghost { background: transparent; color: var(--color-burgundy); border: none; padding: 4px 6px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------------------------------------------------------------------
   Cards / grids
   --------------------------------------------------------------------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 18px 20px;
    box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 16px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-header h3 { margin: 0; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr);} }
@media (max-width: 640px) { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 16px 18px;
    box-shadow: var(--shadow-sm);
    display: block;
    color: inherit;
}
.stat-card:hover { border-color: #F5A623; box-shadow: var(--shadow-md); text-decoration: none; }
.stat-card .stat-label { font-size: 12px; color: var(--color-text-muted); text-transform: uppercase; letter-spacing: .04em; }
.stat-card .stat-value { font-family: var(--font-display); font-size: 26px; margin-top: 6px; font-weight: 600; }
.stat-card .stat-value.mono { font-family: var(--font-mono); font-size: 22px; }
.stat-card .stat-sub { font-size: 12px; color: var(--color-text-faint); margin-top: 4px; }
.stat-card.accent-red .stat-value { color: var(--color-red-fg); }
.stat-card.accent-amber .stat-value { color: var(--color-amber-fg); }
.stat-card.accent-green .stat-value { color: var(--color-green-fg); }

/* ---------------------------------------------------------------------
   Tables
   --------------------------------------------------------------------- */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
    text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--color-text-muted); font-weight: 600; padding: 9px 12px;
    border-bottom: 1px solid var(--color-border-strong); white-space: nowrap;
    background: var(--color-ivory-dark);
}
table.data-table th a { color: var(--color-text-muted); }
table.data-table td { padding: 10px 12px; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
table.data-table tbody tr:hover { background: var(--color-ivory-dark); }
table.data-table td.num, table.data-table th.num { text-align: right; font-family: var(--font-mono); }
table.data-table .mono { font-family: var(--font-mono); font-size: 12.5px; }
table.data-table a.row-link { color: var(--color-text); font-weight: 600; }
table.data-table a.row-link:hover { color: var(--color-burgundy); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--color-text-muted); }
.empty-state .icon { font-size: 32px; margin-bottom: 10px; }

/* ---------------------------------------------------------------------
   Badges
   --------------------------------------------------------------------- */
.badge {
    display: inline-block; padding: 3px 9px; border-radius: 20px;
    font-size: 11px; font-weight: 600; font-family: var(--font-sans);
    white-space: nowrap;
}
.badge-green { background: var(--color-green-bg); color: var(--color-green-fg); }
.badge-amber { background: var(--color-amber-bg); color: var(--color-amber-fg); }
.badge-red { background: var(--color-red-bg); color: var(--color-red-fg); }
.badge-blue { background: var(--color-blue-bg); color: var(--color-blue-fg); }
.badge-gray { background: var(--color-gray-bg); color: var(--color-gray-fg); }

/* ---------------------------------------------------------------------
   Forms
   --------------------------------------------------------------------- */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 20px; }
.form-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 780px) { .form-grid, .form-grid.cols-3 { grid-template-columns: 1fr; } }

.field label { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--color-text); }
.field .hint { font-size: 11.5px; color: var(--color-text-faint); margin-top: 3px; }
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=password], input[type=search], select, textarea {
    width: 100%; padding: 8px 10px; border: 1px solid var(--color-border-strong);
    border-radius: var(--radius-sm); font-family: var(--font-sans); font-size: 13.5px;
    background: #fff; color: var(--color-text);
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--color-burgundy); box-shadow: 0 0 0 3px rgba(245,166,35,0.18); }
.checkbox-row { display: flex; align-items: center; gap: 8px; }
.checkbox-row input { width: auto; }
fieldset { border: none; padding: 0; margin: 0 0 22px; }
fieldset legend {
    font-family: var(--font-display); font-size: 16px; font-weight: 600;
    padding: 0 0 8px; margin-bottom: 12px; border-bottom: 1px solid var(--color-border); width: 100%;
}
.form-actions { display: flex; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--color-border); }

/* ---------------------------------------------------------------------
   Filters bar
   --------------------------------------------------------------------- */
.filters-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters-bar select, .filters-bar input[type=text], .filters-bar input[type=search] { width: auto; min-width: 150px; }
.filters-bar .search-box { position: relative; min-width: 220px; }

/* ---------------------------------------------------------------------
   Tabs
   --------------------------------------------------------------------- */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--color-border-strong); margin-bottom: 20px; overflow-x: auto; }
.tabs a {
    padding: 10px 16px; font-size: 13px; font-weight: 600; color: var(--color-text-muted);
    border-bottom: 2px solid transparent; white-space: nowrap;
}
.tabs a:hover { text-decoration: none; color: var(--color-text); }
.tabs a.active { color: var(--color-burgundy); border-bottom-color: var(--color-burgundy); }

/* ---------------------------------------------------------------------
   Detail rows / description lists
   --------------------------------------------------------------------- */
.detail-list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px 24px; }
.detail-list .dl-item { padding: 6px 0; border-bottom: 1px dashed var(--color-border); }
.detail-list .dl-item .dt { font-size: 11px; text-transform: uppercase; letter-spacing: .03em; color: var(--color-text-faint); margin-bottom: 2px; }
.detail-list .dl-item .dd { font-size: 13.5px; color: var(--color-text); font-weight: 500; }
@media (max-width: 700px) { .detail-list { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------
   Timeline
   --------------------------------------------------------------------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 18px 22px; border-left: 2px solid var(--color-border); }
.timeline li:last-child { border-color: transparent; padding-bottom: 0; }
.timeline li::before { content: ''; position: absolute; left: -6px; top: 2px; width: 10px; height: 10px; border-radius: 50%; background: var(--color-burgundy); }
.timeline .tl-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--color-text-faint); }
.timeline .tl-text { font-size: 13.5px; margin-top: 2px; }

/* ---------------------------------------------------------------------
   Flash messages
   --------------------------------------------------------------------- */
.flash { padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 16px; font-size: 13.5px; font-weight: 500; }
.flash-success { background: var(--color-green-bg); color: var(--color-green-fg); }
.flash-error { background: var(--color-red-bg); color: var(--color-red-fg); }
.flash-info { background: var(--color-blue-bg); color: var(--color-blue-fg); }

/* ---------------------------------------------------------------------
   Login page
   --------------------------------------------------------------------- */
.login-shell { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #0A2C42, #0F3D5C 68%, #EDE6D6); }
.login-card { background: var(--color-surface); border-radius: var(--radius-lg); padding: 40px 36px; width: 380px; box-shadow: var(--shadow-md); }
.login-card h1 { font-size: 22px; margin-bottom: 2px; }
.login-card p.tag { color: var(--color-text-muted); font-size: 13px; margin-bottom: 24px; }
.login-card .field { margin-bottom: 16px; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px; }

/* ---------------------------------------------------------------------
   Misc
   --------------------------------------------------------------------- */
.text-muted { color: var(--color-text-muted); }
.text-faint { color: var(--color-text-faint); }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.diff-short { color: var(--color-red-fg); font-family: var(--font-mono); font-weight: 600; }
.diff-over { color: var(--color-amber-fg); font-family: var(--font-mono); font-weight: 600; }
.diff-ok { color: var(--color-green-fg); font-family: var(--font-mono); font-weight: 600; }
.section-title { font-family: var(--font-display); font-size: 18px; margin: 26px 0 12px; }
.section-title:first-child { margin-top: 0; }
.inline-form { display: inline; }
.pill-list { display: flex; flex-wrap: wrap; gap: 6px; }
.avatar-circle {
    width: 30px; height: 30px; border-radius: 50%; background: var(--color-burgundy);
    color: #fff; display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; font-family: var(--font-sans);
}
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc-list li { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--color-border); }
.doc-list li:last-child { border-bottom: none; }
.kv-inline { font-size: 12.5px; color: var(--color-text-muted); }
.tag-chip { display: inline-block; background: var(--color-ivory-dark); border: 1px solid var(--color-border-strong); border-radius: 20px; padding: 3px 10px; font-size: 11.5px; margin: 2px 4px 2px 0; }
.pagination { display: flex; gap: 6px; margin-top: 16px; }
.pagination a, .pagination span { padding: 6px 11px; border: 1px solid var(--color-border-strong); border-radius: var(--radius-sm); font-size: 12.5px; }
.pagination .current { background: var(--color-burgundy); color: #fff; border-color: var(--color-burgundy); }
input.editable-amount { width: 90px; font-family: var(--font-mono); text-align: right; }
input.editable-date { width: 130px; font-family: var(--font-mono); }

/* V2 - procesgerichte navigatie en Excel-achtige beheerworkflow */
.sidebar-nav .nav-section{list-style:none;margin:18px 18px 6px;padding:0 8px;color:rgba(255,255,255,.48);font-family:'IBM Plex Mono',monospace;font-size:10px;letter-spacing:.12em;text-transform:uppercase}
.actions-cell{white-space:nowrap}.actions-cell form{display:inline}.btn[disabled]{opacity:.45;cursor:not-allowed}
.form-span-2{grid-column:1/-1}.statement-ready{border-left:4px solid #F5A623}.statement-generated{border-left:4px solid #0F3D5C}
.data-table td .text-muted{margin-top:3px;font-size:12px}.month-progress{height:7px;background:#EDE6D6;border-radius:8px;overflow:hidden}.month-progress>span{display:block;height:100%;background:#0F3D5C}

/* V2.4 - consistente beheeracties */
.row-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.row-actions form{margin:0}.btn-danger{background:#8b2e2e;color:#fff;border-color:#8b2e2e}.btn-danger:hover{background:#6f2323;border-color:#6f2323}.actions-col{min-width:245px;text-align:right}

/* =====================================================================
   V2.8.18 - Woningdossier navigatie & onderhoudshistorie
   ===================================================================== */
.property-nav {
    margin: 2px 0 22px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background: var(--color-surface);
    overflow: hidden;
}
.property-nav-main {
    display: flex;
    gap: 4px;
    align-items: center;
    padding: 6px;
    background: var(--color-paper, #FAF8F3);
    border-bottom: 1px solid var(--color-border);
    overflow-x: auto;
}
.property-nav-main a {
    flex: 0 0 auto;
    padding: 9px 13px;
    border-radius: 7px;
    color: var(--color-text-muted);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}
.property-nav-main a:hover { text-decoration: none; color: var(--color-text); background: #fff; }
.property-nav-main a.active {
    background: var(--color-navy, #0F3D5C);
    color: #fff;
    box-shadow: 0 1px 2px rgba(10,44,66,.12);
}
.property-nav-sub {
    display: flex;
    gap: 4px;
    padding: 8px 10px;
    overflow-x: auto;
    background: #fff;
}
.property-nav-sub a {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12.5px;
    color: var(--color-text-muted);
    white-space: nowrap;
}
.property-nav-sub a:hover { text-decoration: none; color: var(--color-text); background: var(--color-paper, #FAF8F3); }
.property-nav-sub a.active { color: var(--color-navy, #0F3D5C); background: #F1F5F7; font-weight: 700; }

.property-section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 14px;
}
.property-section-head h2 { margin: 0 0 4px; font-size: 20px; }
.property-section-head p { margin: 0; color: var(--color-text-muted); font-size: 13px; }
.property-section-head .actions { display: flex; flex-wrap: wrap; gap: 8px; }

.maintenance-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0,1fr));
    gap: 10px;
    margin-bottom: 12px;
}
.maintenance-summary-item {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
}
.maintenance-summary-item span { font-size: 12px; color: var(--color-text-muted); }
.maintenance-summary-item strong { font-family: var(--font-mono); font-size: 18px; color: var(--color-navy, #0F3D5C); }

.property-filter-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.property-filter-pills a {
    padding: 6px 10px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    background: #fff;
    color: var(--color-text-muted);
    font-size: 12px;
    font-weight: 600;
}
.property-filter-pills a:hover { text-decoration: none; border-color: var(--color-border-strong); color: var(--color-text); }
.property-filter-pills a.active { background: #F1F5F7; border-color: #C9D8DF; color: var(--color-navy, #0F3D5C); }

.maintenance-kind {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 750;
    line-height: 1.35;
    white-space: nowrap;
    letter-spacing: .015em;
}
.maintenance-kind-melding { background: #EEF4F7; color: #31566A; }
.maintenance-kind-onderhoud { background: #FFF3DA; color: #795216; }
.maintenance-kind-herstel { background: #EAF4ED; color: #2E6441; }

.property-history-card { padding: 0; overflow: hidden; }
.property-history-list { display: block; }
.property-history-row {
    display: grid;
    grid-template-columns: 105px minmax(260px,1fr) auto 105px 20px;
    gap: 14px;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid var(--color-border);
    color: inherit;
}
.property-history-row:last-child { border-bottom: 0; }
.property-history-row:hover { text-decoration: none; background: #FCFBF8; }
.property-history-date { font-family: var(--font-mono); font-size: 11.5px; color: var(--color-text-faint); }
.property-history-main { min-width: 0; }
.property-history-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.property-history-title strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13.5px; }
.property-history-meta { display: flex; flex-wrap: wrap; gap: 7px 12px; margin-top: 4px; color: var(--color-text-faint); font-size: 11.5px; }
.property-history-meta span + span::before { content: '·'; margin-right: 8px; color: var(--color-border-strong); }
.property-history-status { justify-self: end; }
.property-history-cost { text-align: right; min-width: 90px; }
.property-history-cost strong { display: block; font-family: var(--font-mono); font-size: 12.5px; }
.property-history-cost small { color: var(--color-text-faint); font-size: 10px; }
.property-history-arrow { color: var(--color-text-faint); font-size: 16px; }
.field-help { margin-top: 5px; color: var(--color-text-faint); font-size: 11px; line-height: 1.4; }
.empty-state.compact { padding: 28px 18px; }

@media (max-width: 900px) {
    .maintenance-summary { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .property-history-row { grid-template-columns: 90px minmax(180px,1fr) auto 18px; }
    .property-history-cost { display: none; }
}
@media (max-width: 650px) {
    .property-section-head { flex-direction: column; }
    .property-history-row { grid-template-columns: 1fr auto; gap: 8px; }
    .property-history-date { grid-column: 1; }
    .property-history-main { grid-column: 1 / -1; }
    .property-history-status { grid-column: 1; justify-self: start; }
    .property-history-arrow { grid-column: 2; grid-row: 1 / span 3; align-self: center; }
}

/* =============================================================
   V2.8.19 - herstel compacte, inklapbare CRM-navigatie
   Behoudt de nieuwe woningkaart-styling uit V2.8.18.
   ============================================================= */
.sidebar-menu {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 8px 10px 18px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,.18) transparent;
}
.sidebar-menu::-webkit-scrollbar { width: 6px; }
.sidebar-menu::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 999px; }
.sidebar-menu::-webkit-scrollbar-track { background: transparent; }

.nav-group-label {
    margin: 8px 10px 7px;
    color: rgba(255,255,255,.48);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 10px;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.sidebar-nav.sidebar-nav-daily,
.sidebar-nav.nav-group-items {
    margin: 0;
    padding: 0;
}

.nav-daily {
    padding-bottom: 12px;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255,255,255,.10);
}

.nav-collapsible {
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.nav-group-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 12px;
    border: 0;
    background: transparent;
    color: rgba(255,255,255,.78);
    font: 600 12px/1.2 'Inter', sans-serif;
    letter-spacing: .02em;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    transition: background .15s ease, color .15s ease;
}

.nav-group-toggle:hover,
.nav-collapsible.has-active > .nav-group-toggle {
    background: rgba(255,255,255,.07);
    color: #fff;
}

.nav-chevron {
    font-size: 15px;
    line-height: 1;
    color: rgba(255,255,255,.5);
    transition: transform .18s ease;
}
.nav-collapsible.is-open .nav-chevron { transform: rotate(180deg); }

.nav-group-items {
    display: none;
    padding: 2px 0 8px 10px !important;
}
.nav-collapsible.is-open .nav-group-items { display: block; }

.nav-group-items li { margin-bottom: 1px; }
.nav-group-items a {
    min-height: 34px;
    padding: 8px 10px 8px 14px;
    font-size: 12px;
    color: rgba(255,255,255,.67);
    border-left: 2px solid rgba(255,255,255,.08);
    border-radius: 0 7px 7px 0;
}
.nav-group-items a:hover {
    color: #fff;
    border-left-color: rgba(245,166,35,.55);
}
.nav-group-items li.active a {
    color: #fff;
    background: rgba(255,255,255,.12);
    border-left-color: #F5A623;
}

.sidebar-nav-daily a {
    min-height: 38px;
}

@media (max-width: 900px) {
    .sidebar-menu { overflow: visible; }
}

/* =============================================================
   V2.8.20 - herstel dashboardstyling naast dropdownnavigatie
   ============================================================= */
.dashboard-clean{max-width:1480px;margin:0 auto;padding:4px 0 38px}
.dashboard-clean-head{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-bottom:18px}
.dashboard-clean-head h1{margin:0;color:var(--website-navy-deep);font-size:30px;line-height:1.1}
.dashboard-clean-sub{margin-top:5px;color:var(--website-slate);font-size:12.5px}
.dashboard-clean-month{display:flex;align-items:center;height:40px;border:1px solid var(--website-line);background:#fff;border-radius:8px;overflow:hidden}
.dashboard-clean-month a{width:40px;height:40px;display:grid;place-items:center;text-decoration:none;color:var(--website-navy);font-size:16px}
.dashboard-clean-month a:hover{background:var(--website-paper)}
.dashboard-clean-month strong{min-width:150px;padding:0 14px;text-align:center;font-size:12.5px;color:var(--website-ink);font-weight:650;border-left:1px solid var(--website-line);border-right:1px solid var(--website-line)}

.dashboard-clean-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:16px}
.dashboard-clean-kpi{display:block;text-decoration:none!important;background:#fff;border:1px solid var(--website-line);border-radius:10px;padding:17px 19px;box-shadow:0 2px 8px rgba(15,61,92,.04)}
.dashboard-clean-kpi:hover{border-color:#c7bda9;box-shadow:0 4px 12px rgba(15,61,92,.07)}
.dashboard-clean-kpi>span{display:block;font-size:11px;color:var(--website-slate);font-weight:700;text-transform:uppercase;letter-spacing:.045em}
.dashboard-clean-kpi>strong{display:block;margin:7px 0 5px;color:var(--website-navy-deep);font-family:var(--font-mono);font-size:25px;line-height:1.15}
.dashboard-clean-kpi>small{display:block;color:var(--website-slate);font-size:11.5px}
.dashboard-clean-kpi.has-alert{border-left:3px solid #a13a2c;padding-left:17px}
.dashboard-clean-kpi.is-ok{border-left:3px solid #4f7a58;padding-left:17px}

.dashboard-clean-attention{background:#fff;border:1px solid var(--website-line);border-radius:10px;margin-bottom:16px;overflow:hidden}
.dashboard-clean-title,.dashboard-clean-panel-head{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:13px 16px;border-bottom:1px solid #ece7dc}
.dashboard-clean-title h2,.dashboard-clean-panel-head h2{margin:0;color:var(--website-navy-deep);font-size:15px;line-height:1.2}
.dashboard-clean-title>span{min-width:23px;height:23px;display:grid;place-items:center;border-radius:12px;background:#f3eee5;color:var(--website-navy);font-family:var(--font-mono);font-size:10.5px;font-weight:700}
.dashboard-clean-panel-head a{font-size:11.5px;color:var(--website-navy);font-weight:650;text-decoration:none}
.dashboard-clean-panel-head a:hover{text-decoration:underline}
.dashboard-clean-attention-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
.dashboard-clean-attention-row{display:grid;grid-template-columns:8px minmax(0,1fr) auto 16px;align-items:center;gap:11px;padding:12px 15px;min-height:58px;text-decoration:none!important;color:inherit;border-bottom:1px solid #f0ece4}
.dashboard-clean-attention-row:nth-child(odd){border-right:1px solid #f0ece4}
.dashboard-clean-attention-row:hover{background:#fcfaf6}
.dashboard-clean-attention-row .attention-mark{width:7px;height:7px;border-radius:50%;background:#c6944f}
.dashboard-clean-attention-row.tone-danger .attention-mark{background:#a13a2c}
.dashboard-clean-attention-row.tone-warning .attention-mark{background:#c9822d}
.dashboard-clean-attention-row.tone-info .attention-mark{background:#4a738b}
.dashboard-clean-attention-row div strong{display:block;color:var(--website-ink);font-size:12.5px;line-height:1.25}
.dashboard-clean-attention-row div small{display:block;color:var(--website-slate);font-size:10.8px;margin-top:2px}
.dashboard-clean-attention-row>b{font-family:var(--font-mono);font-size:12px;color:var(--website-navy-deep);white-space:nowrap}
.attention-arrow{color:var(--website-brass);font-size:14px}

.dashboard-clean-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.dashboard-clean-panel{background:#fff;border:1px solid var(--website-line);border-radius:10px;overflow:hidden;min-width:0}
.dashboard-clean-row{display:flex;align-items:center;gap:11px;padding:10px 14px;min-height:59px;border-bottom:1px solid #f0ece4;text-decoration:none!important;color:inherit}
.dashboard-clean-row:last-child{border-bottom:none}
.dashboard-clean-row:hover{background:#fcfaf6}
.clean-date{width:40px;min-width:40px;text-align:center;padding-right:10px;border-right:1px solid #e5ded1}
.clean-date strong{display:block;font-family:var(--font-mono);font-size:14px;line-height:1;color:var(--website-navy-deep)}
.clean-date span{display:block;margin-top:3px;font-family:var(--font-mono);font-size:8.5px;letter-spacing:.06em;color:var(--website-slate)}
.clean-main{min-width:0;flex:1}
.clean-main strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:12.4px;color:var(--website-ink)}
.clean-main span{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;margin-top:3px;font-size:10.8px;color:var(--website-slate)}
.clean-pill{font-family:var(--font-mono);font-size:9.8px;padding:4px 7px;border-radius:10px;background:#edf3f6;color:#365e75;white-space:nowrap}
.clean-pill.danger{background:#f7e8e5;color:#8c3025}
.clean-priority{width:3px;height:30px;border-radius:2px;background:#c7c1b7;flex:0 0 3px}
.clean-priority.priority-urgent{background:#a13a2c}.clean-priority.priority-hoog{background:#c9822d}.clean-priority.priority-normaal{background:#4a738b}.clean-priority.priority-laag{background:#8a948d}
.clean-status{display:flex;flex-direction:column;align-items:flex-end;gap:3px;white-space:nowrap}
.clean-status small{font-family:var(--font-mono);font-size:9.5px;color:var(--website-slate)}
.clean-status small.late{color:#8c3025;font-weight:700}
.dashboard-clean-empty{padding:21px 16px;color:var(--website-slate);font-size:11.8px}

@media(max-width:1050px){.dashboard-clean-attention-list,.dashboard-clean-grid{grid-template-columns:1fr}.dashboard-clean-attention-row:nth-child(odd){border-right:none}}
@media(max-width:720px){.dashboard-clean-head{align-items:flex-start;flex-direction:column}.dashboard-clean-month{width:100%}.dashboard-clean-month strong{flex:1}.dashboard-clean-kpis{grid-template-columns:1fr}.dashboard-clean-attention-row{grid-template-columns:8px minmax(0,1fr) 16px}.dashboard-clean-attention-row>b{grid-column:2}.dashboard-clean-row{padding:10px 11px}.dashboard-clean-panel-head a{display:none}}


/* V2.8.47 - zoekbare dropdowns */
.searchable-select {
    position: relative;
    width: 100%;
}
.searchable-select-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    opacity: 0.001 !important;
    overflow: hidden !important;
    pointer-events: none !important;
    left: 0;
    bottom: 0;
}
.searchable-select-input {
    width: 100%;
    box-sizing: border-box;
    padding-right: 36px;
    background-image: linear-gradient(45deg, transparent 50%, #65747e 50%), linear-gradient(135deg, #65747e 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}
.searchable-select:focus-within .searchable-select-input {
    background-image: linear-gradient(135deg, transparent 50%, #004a6d 50%), linear-gradient(45deg, #004a6d 50%, transparent 50%);
}
.searchable-select-list {
    position: absolute;
    z-index: 1000;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    max-height: 280px;
    overflow-y: auto;
    padding: 5px;
    background: #fff;
    border: 1px solid #d6dee3;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(15, 42, 58, .16);
}
.searchable-select-option {
    display: block;
    width: 100%;
    padding: 9px 10px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}
.searchable-select-option:hover,
.searchable-select-option:focus,
.searchable-select-option.is-active {
    background: #eef4f7;
    outline: none;
}
.searchable-select-option.is-selected {
    font-weight: 600;
    color: #004a6d;
}
.searchable-select-empty {
    padding: 10px;
    color: #6b7780;
    font-size: .92rem;
}
.filters-bar .searchable-select {
    width: auto;
    min-width: 160px;
}
.filters-bar .searchable-select-input {
    min-width: 160px;
}

/* =====================================================================
   V2.8.60 - Overzichten altijd binnen schermbreedte
   ===================================================================== */
/* Gebruik de volledige beschikbare werkruimte in plaats van een harde 1440px-limiet. */
.content {
    max-width: none;
    min-width: 0;
    box-sizing: border-box;
}

/* Overzichtskaarten en tabelcontainers mogen nooit de pagina verbreden. */
.card,
.table-wrap {
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.table-wrap {
    overflow-x: hidden;
}

/* Alle standaard CRM-overzichten passen zich aan de beschikbare breedte aan. */
table.data-table {
    width: 100%;
    max-width: 100%;
    table-layout: fixed;
}

table.data-table th,
table.data-table td {
    min-width: 0;
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
}

table.data-table th {
    padding-left: 8px;
    padding-right: 8px;
}

table.data-table td {
    padding-left: 8px;
    padding-right: 8px;
}

/* Bedragen/data blijven compact, maar mogen de tabel niet oprekken. */
table.data-table td.num,
table.data-table th.num,
table.data-table .mono,
table.data-table .badge {
    overflow-wrap: normal;
    word-break: normal;
}

/* Formulieren, zoekvelden en knoppen in tabellen blijven binnen hun cel. */
table.data-table input,
table.data-table select,
table.data-table textarea,
table.data-table .searchable-select,
table.data-table .searchable-select-wrap {
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box;
}

table.data-table .row-actions,
table.data-table .actions-cell,
table.data-table .actions-col {
    min-width: 0 !important;
    max-width: 100%;
    white-space: normal;
}

table.data-table .row-actions {
    justify-content: flex-start;
    gap: 4px;
}

table.data-table .btn {
    max-width: 100%;
    white-space: normal;
    text-align: center;
    justify-content: center;
}

/* Filters boven overzichten mogen naar de volgende regel in plaats van de pagina te verbreden. */
.filters-bar {
    max-width: 100%;
    flex-wrap: wrap;
}
.filters-bar > * {
    min-width: 0;
    max-width: 100%;
}

/* Iets compacter bij smallere laptops/tablets, zonder horizontaal scrollen. */
@media (max-width: 1200px) {
    table.data-table { font-size: 12px; }
    table.data-table th { font-size: 10px; padding: 7px 6px; }
    table.data-table td { padding: 8px 6px; }
    table.data-table .btn { padding: 5px 7px; font-size: 11px; }
    table.data-table .badge { padding: 2px 6px; font-size: 10px; }
}

@media (max-width: 760px) {
    .content { padding-left: 14px; padding-right: 14px; }
    .card { padding-left: 12px; padding-right: 12px; }
    table.data-table { font-size: 11px; }
    table.data-table th { font-size: 9px; padding: 6px 4px; }
    table.data-table td { padding: 7px 4px; }
}


/* =====================================================================
   V2.8.67 - Compacte overzichtstabellen in hele CRM
   Zelfde compacte beheeruitstraling als Huurbetalingen.
   ===================================================================== */
.table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:auto;
}
table.data-table{
    width:100%;
    max-width:100%;
    table-layout:auto;
    font-size:12.5px;
}
table.data-table th{
    padding:7px 8px;
    line-height:1.2;
    white-space:normal;
}
table.data-table td{
    padding:7px 8px;
    line-height:1.25;
    overflow-wrap:anywhere;
}
table.data-table td.num,
table.data-table th.num{
    white-space:nowrap;
}
table.data-table .badge{
    white-space:nowrap;
}

/* Acties compact: geen brede vaste kolom en geen hoge verticale knoppenlijst. */
table.data-table .actions-col{
    min-width:0 !important;
    width:1%;
    max-width:190px;
    text-align:right;
    white-space:normal;
}
table.data-table .row-actions{
    display:flex;
    flex-direction:row;
    flex-wrap:wrap;
    justify-content:flex-end;
    align-items:center;
    gap:4px;
    margin:0;
}
table.data-table .row-actions form,
table.data-table .actions-col > form{
    margin:0;
    display:inline-flex;
}
table.data-table .actions-col > a,
table.data-table .actions-col > form{
    vertical-align:middle;
    margin:1px 0 1px 3px;
}
table.data-table .actions-col .btn,
table.data-table .row-actions .btn{
    min-height:26px;
    padding:4px 7px;
    font-size:11.5px;
    line-height:1.1;
    white-space:nowrap;
}

/* Formuliervelden in overzichten mogen een tabelregel niet onnodig hoog maken. */
table.data-table input,
table.data-table select{
    min-height:30px;
    padding-top:4px;
    padding-bottom:4px;
    max-width:100%;
}
table.data-table textarea{
    min-height:52px;
    max-width:100%;
}

/* Bovenbalken/filters compact en responsief zoals Huurbetalingen. */
.filters-bar,.filter-bar{
    display:flex;
    flex-wrap:wrap;
    align-items:flex-end;
    gap:8px;
}
.page-header .actions{
    display:flex;
    flex-wrap:wrap;
    gap:6px;
}

@media (max-width: 1280px){
    table.data-table{font-size:12px}
    table.data-table th,table.data-table td{padding:6px 6px}
    table.data-table .actions-col{max-width:165px}
    table.data-table .actions-col .btn,
    table.data-table .row-actions .btn{padding:3px 6px;font-size:11px;min-height:24px}
}


/* V2.8.68 - Facturen & offertes: compacte, leesbare actiegroep */
table.data-table .financial-doc-actions{
    width:210px;
    max-width:210px;
    white-space:normal;
}
.financial-actions{
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    gap:5px;
}
.financial-actions-row{
    display:flex;
    flex-wrap:nowrap;
    align-items:center;
    justify-content:flex-end;
    gap:5px;
    width:100%;
}
.financial-actions-row form{margin:0;display:inline-flex;}
.financial-actions-row .btn{
    min-height:25px;
    padding:4px 7px;
    font-size:11px;
    line-height:1.1;
    white-space:nowrap;
}
.financial-actions-crud{
    padding-top:4px;
    border-top:1px solid var(--color-border);
}
.financial-actions-crud .row-actions{
    display:flex;
    flex-wrap:nowrap;
    gap:5px;
    justify-content:flex-end;
    width:100%;
}
@media (max-width:1250px){
    table.data-table .financial-doc-actions{width:185px;max-width:185px;}
    .financial-actions-row .btn{padding:3px 5px;font-size:10.5px;}
}

/* V2.9.8 onboarding dashboard attention. */
.data-table tr.row-overdue td{background:#fff1ef;}
.data-table tr.row-overdue td:first-child{box-shadow:inset 3px 0 0 #C0392B;}

/* =====================================================================
   V2.9.9.5 - Mobielvriendelijke beheeromgeving
   Off-canvas navigatie, touchvriendelijke acties en bruikbare tabellen.
   ===================================================================== */
.admin-mobile-menu,
.admin-nav-overlay{display:none;}

@media (max-width: 900px){
    html,body{max-width:100%;overflow-x:hidden;}
    .app-shell{display:block;min-height:100dvh;}
    .sidebar{
        position:fixed;z-index:1000;left:0;top:0;bottom:0;
        width:min(86vw,320px);height:100dvh;
        transform:translateX(-105%);transition:transform .22s ease;
        box-shadow:0 0 32px rgba(10,44,66,.28);overflow:hidden;
    }
    body.admin-nav-open{overflow:hidden;}
    body.admin-nav-open .sidebar{transform:translateX(0);}
    .sidebar-menu{overflow-y:auto!important;-webkit-overflow-scrolling:touch;}
    .admin-nav-overlay{
        display:block;position:fixed;z-index:990;inset:0;border:0;padding:0;
        background:rgba(10,44,66,.48);opacity:0;pointer-events:none;
        transition:opacity .2s ease;
    }
    body.admin-nav-open .admin-nav-overlay{opacity:1;pointer-events:auto;}
    .main{width:100%;min-width:0;}
    .topbar{padding:9px 12px;gap:9px;min-height:56px;flex-wrap:nowrap;}
    .admin-mobile-menu{
        display:inline-flex;width:42px;height:42px;flex:0 0 42px;
        align-items:center;justify-content:center;flex-direction:column;gap:4px;
        border:1px solid var(--color-border);background:#fff;color:var(--color-burgundy-dark);
        border-radius:4px;cursor:pointer;
    }
    .admin-mobile-menu span{display:block;width:19px;height:2px;background:currentColor;border-radius:2px;}
    .topbar-search{max-width:none;min-width:0;flex:1;}
    .topbar-search input{height:42px;padding-left:32px;background:#fff;border-radius:4px;}
    .topbar-search .icon{top:12px;}
    .topbar-search-results{position:fixed;left:10px;right:10px;top:58px;max-height:62vh;}
    .topbar-right{gap:8px;flex:0 0 auto;}
    .topbar-user{display:none;}
    .btn-logout{font-size:11px!important;min-height:38px;padding:0 4px!important;}
    .content{padding:16px 12px 44px!important;width:100%;max-width:100%;min-width:0;}
    .page-header{gap:12px;margin-bottom:16px;}
    .page-header .titles{min-width:0;width:100%;}
    .page-header h1{font-size:23px;line-height:1.15;overflow-wrap:anywhere;}
    .page-header .actions{width:100%;gap:7px;}
    .page-header .actions>.btn,.page-header .actions>form>.btn{min-height:40px;}
    .card{padding:14px 12px;max-width:100%;overflow:visible;}
    .card-header{gap:10px;align-items:flex-start;flex-wrap:wrap;}
    .filters-bar,.filter-bar{display:grid!important;grid-template-columns:1fr!important;gap:10px!important;align-items:stretch!important;}
    .filters-bar>* ,.filter-bar>*{width:100%;max-width:100%!important;min-width:0!important;}
    .filters-bar .field,.filter-bar .field{margin:0;}
    .filters-bar input,.filters-bar select,.filter-bar input,.filter-bar select,
    .filters-bar .searchable-select,.filter-bar .searchable-select{width:100%!important;max-width:100%!important;}
    .form-grid,.form-grid.cols-3{grid-template-columns:1fr!important;}
    .field input,.field select,.field textarea,.searchable-select,.searchable-select-input{max-width:100%;width:100%;}
    .btn{min-height:38px;align-items:center;justify-content:center;}
    .btn-sm{min-height:34px;}
    .tabs,.property-nav{overflow-x:auto;-webkit-overflow-scrolling:touch;scrollbar-width:thin;}
    .tabs a,.property-nav a{white-space:nowrap;flex:0 0 auto;}
    .mobile-auto-table-wrap,.table-wrap{width:100%;max-width:100%;overflow-x:auto!important;-webkit-overflow-scrolling:touch;overscroll-behavior-inline:contain;}
    .mobile-auto-table-wrap{margin:0;}
    table.data-table{min-width:680px!important;width:100%!important;table-layout:auto!important;font-size:12px!important;}
    table.data-table th,table.data-table td{padding:7px 7px!important;white-space:normal;}
    table.data-table .actions-col{min-width:140px!important;max-width:180px;}
    table.data-table .row-actions{justify-content:flex-start;}
    .pagination{overflow-x:auto;-webkit-overflow-scrolling:touch;padding-bottom:3px;}
    .doc-list li{align-items:flex-start;gap:10px;flex-wrap:wrap;}
    .detail-list{grid-template-columns:1fr!important;}
    .flash{max-width:100%;overflow-wrap:anywhere;}
}

@media (max-width: 520px){
    .topbar{padding:7px 8px;}
    .admin-mobile-menu{width:40px;height:40px;flex-basis:40px;}
    .topbar-search input{height:40px;font-size:12px;}
    .btn-logout{font-size:0!important;width:34px;overflow:hidden;position:relative;}
    .btn-logout::after{content:'↪';font-size:20px;position:absolute;inset:0;display:grid;place-items:center;color:var(--color-burgundy-dark);}
    .content{padding:14px 9px 40px!important;}
    .card{padding:12px 10px;}
    .page-header h1{font-size:21px;}
    table.data-table{min-width:620px!important;}
    .dashboard-clean{padding-bottom:24px;}
    .dashboard-clean-head h1{font-size:24px;}
}


/* ================================================================
   Bregman Vastgoed CRM - Verhuur UI additions (migrated from VVM)
   ================================================================ */
/* VVM V1.0 */
.brand-logo-wrap { background:#fff; border-radius:4px; padding:8px 10px; margin:-7px -8px 8px; }
.brand-logo-wrap img { display:block; width:100%; height:auto; max-height:58px; object-fit:contain; }
.kpi-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:14px 0 20px; }
.kpi { background:#fff; border:1px solid var(--color-border); padding:16px; box-shadow:var(--shadow-sm); }
.kpi .value { font-family:var(--font-display); font-size:28px; color:var(--color-burgundy); line-height:1.1; }
.kpi .label { color:var(--color-text-muted); margin-top:4px; font-size:12px; text-transform:uppercase; letter-spacing:.04em; }
.pipeline { display:flex; gap:6px; overflow-x:auto; padding:4px 0 12px; }
.pipeline-step { min-width:140px; background:#fff; border:1px solid var(--color-border); padding:12px; }
.pipeline-step strong { display:block; font-size:20px; color:var(--color-burgundy); }
.pipeline-step span { color:var(--color-text-muted); font-size:12px; }
.badge-koops { background:#fff0d5; color:#9a5a00; border:1px solid #f4c777; }
.badge-blue { background:#e4ecf1; color:#2f5872; }
.badge-orange { background:#fff0d5; color:#9a5a00; }
.market-alert { border-left:4px solid var(--website-brass); }
.feedback-chip { display:inline-block; padding:3px 7px; background:#f1eee7; margin:2px; font-size:12px; }
.split-grid { display:grid; grid-template-columns:minmax(0,2fr) minmax(300px,1fr); gap:18px; }
.stage-actions { display:flex; flex-wrap:wrap; gap:8px; }
.metric-positive { color:#35673f; font-weight:600; }
.metric-warning { color:#96601a; font-weight:600; }
.metric-danger { color:#a13a2c; font-weight:600; }
@media(max-width:1050px){ .kpi-grid{grid-template-columns:repeat(2,1fr)} .split-grid{grid-template-columns:1fr} }
@media(max-width:650px){ .kpi-grid{grid-template-columns:1fr} }


/* VVM V1.1 - beheer-CRM consistentie en markt/lead UI */
.vvm-dashboard-kpis{grid-template-columns:repeat(4,minmax(0,1fr));}
.vvm-table{border:1px solid var(--website-line);border-radius:8px;overflow:hidden;background:#fff;}
.vvm-table thead th{background:#f3eee5;color:var(--website-slate);border-bottom:1px solid #d9cfbc;}
.vvm-table tbody tr:nth-child(even){background:#fdfcf9;}
.vvm-table tbody tr:hover{background:#f4f0e8;}
.vvm-table td{height:48px;}
.vvm-truncate{max-width:320px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.score-pill{display:inline-flex;min-width:54px;justify-content:center;padding:3px 7px;border-radius:12px;background:#ece7dd;color:#756b5c;font-family:var(--font-mono);font-size:11px;font-weight:700;}
.score-pill.is-mid{background:var(--color-amber-bg);color:var(--color-amber-fg);}
.score-pill.is-good{background:var(--color-green-bg);color:var(--color-green-fg);}
.city-autocomplete{position:relative;}
.city-autocomplete-list{position:absolute;z-index:50;top:100%;left:0;right:0;margin-top:3px;background:#fff;border:1px solid var(--website-line);border-radius:6px;box-shadow:0 10px 24px rgba(15,61,92,.12);max-height:240px;overflow-y:auto;}
.city-autocomplete-item{display:block;width:100%;padding:8px 10px;border:0;border-bottom:1px solid #eee8dd;background:#fff;text-align:left;font:inherit;color:var(--website-ink);cursor:pointer;}
.city-autocomplete-item:hover,.city-autocomplete-item.is-active{background:var(--website-paper);color:var(--website-navy-deep);}
@media(max-width:1100px){.vvm-dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:650px){.vvm-dashboard-kpis{grid-template-columns:1fr;}}

/* v1.4.2 compact uitgebreid woningprofiel */
.property-profile-fieldset{padding:16px 18px 18px}.profile-section{border:1px solid var(--border,#dbe3ea);border-radius:10px;background:#fff;margin:9px 0;overflow:hidden}.profile-section>summary{cursor:pointer;list-style:none;padding:12px 14px;display:flex;justify-content:space-between;gap:14px;align-items:center;font-weight:700;background:#f8fafc}.profile-section>summary::-webkit-details-marker{display:none}.profile-section>summary:after{content:'＋';font-size:18px;line-height:1;color:#6b7280}.profile-section[open]>summary:after{content:'−'}.profile-section>summary small{font-size:12px;font-weight:400;color:#6b7280;margin-left:auto}.profile-section-body{padding:13px 14px 15px}.profile-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px 12px}.profile-grid .field label{font-size:12px}.profile-grid input,.profile-grid select{min-height:38px}.profile-subtitle{display:block;font-size:12px;font-weight:700;margin:13px 0 7px;color:#374151}.feature-chip-grid{display:flex;flex-wrap:wrap;gap:6px}.feature-chip{display:inline-flex;align-items:center;gap:5px;border:1px solid #d8e0e7;border-radius:999px;padding:5px 9px;background:#fff;font-size:12px;cursor:pointer;user-select:none}.feature-chip:has(input:checked){border-color:#004A6D;background:#eef7fb}.feature-chip input{width:auto;margin:0}.checkbox-inline{display:flex;flex-wrap:wrap;gap:8px 16px;margin:8px 0}.checkbox-inline label{display:inline-flex;align-items:center;gap:6px;font-size:12px}.checkbox-inline input{width:auto}.compact-note{margin-top:12px}.property-profile-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}.property-profile-card{border:1px solid #e1e7ec;border-radius:10px;padding:13px;background:#fff}.property-profile-card h4{margin:0 0 9px}.profile-tags{display:flex;flex-wrap:wrap;gap:5px}.profile-tag{display:inline-block;border-radius:999px;background:#eef3f6;padding:4px 8px;font-size:12px}.portal-profile-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.portal-profile-card{border:1px solid rgba(0,0,0,.10);border-radius:12px;padding:14px;background:#fff}.portal-profile-card h3{font-size:16px;margin:0 0 10px}.portal-detail-list{display:grid;grid-template-columns:1fr 1fr;gap:7px 14px}.portal-detail-list div{font-size:13px}.portal-detail-list strong{display:block;color:#4b5563;font-size:11px;text-transform:uppercase;letter-spacing:.03em;margin-bottom:2px}@media(max-width:1050px){.profile-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media(max-width:780px){.profile-grid,.property-profile-summary,.portal-profile-grid,.portal-detail-list{grid-template-columns:1fr}.profile-section>summary small{display:none}}
