/* ─── Variabelen ─────────────────────────────────────────── */
:root {
    --sidebar-bg:    #162e29;
    --topbar-bg:     #1e3a35;
    --content-bg:    #243f3a;
    --sidebar-w:     224px;
    --topbar-h:      60px;

    --text:          #e4eeec;
    --text-muted:    #7fa89e;
    --accent:        #3eb48a;
    --accent-hover:  #4ecfa0;

    --nav-hover:     rgba(255,255,255,0.07);
    --nav-active-bg: rgba(62,180,138,0.18);
    --nav-active-fg: #3eb48a;

    --border:        rgba(255,255,255,0.07);
    --shadow:        0 2px 12px rgba(0,0,0,0.35);

    --radius:        8px;
    --font:          -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ─── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--content-bg);
    color: var(--text);
    height: 100vh;
    overflow: hidden;
}

a { text-decoration: none; color: inherit; }

/* ─── Layout ─────────────────────────────────────────────── */
.app-wrapper {
    display: flex;
    height: 100vh;
}

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    min-width: var(--sidebar-w);
    height: 100vh;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 16px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: var(--text);
    flex-shrink: 0;
}

.sidebar-logo .ti {
    font-size: 22px;
    color: var(--accent);
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.sidebar-bottom {
    padding: 8px 8px 12px;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex-shrink: 0;
}

/* ─── Nav item ───────────────────────────────────────────── */
.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 6px;
    font-size: 13.5px;
    color: var(--text-muted);
    transition: background 0.12s, color 0.12s;
    white-space: nowrap;
    border-left: 2px solid transparent;
}

.nav-item .ti {
    font-size: 17px;
    flex-shrink: 0;
}

.nav-item:hover {
    background: var(--nav-hover);
    color: var(--text);
}

.nav-item.active {
    background: var(--nav-active-bg);
    color: var(--nav-active-fg);
    border-left-color: var(--accent);
    font-weight: 600;
}

.nav-item--logout:hover {
    background: rgba(220,53,69,0.12);
    color: #f87171;
}

/* ─── Rechterkolom ───────────────────────────────────────── */
.main-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

/* ─── Topbar ─────────────────────────────────────────────── */
.topbar {
    height: var(--topbar-h);
    min-height: var(--topbar-h);
    background: var(--topbar-bg);
    display: flex;
    align-items: center;
    padding: 0 24px;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    gap: 16px;
    flex-shrink: 0;
}

.topbar-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-shrink: 0;
}

/* Pandkiezer */
.pandkiezer-form {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255,255,255,0.07);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 5px 10px;
    transition: border-color 0.15s;
}

.pandkiezer-form:focus-within {
    border-color: var(--accent);
}

.pandkiezer-icon {
    font-size: 15px;
    color: var(--text-muted);
}

.pandkiezer-select {
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 13px;
    outline: none;
    cursor: pointer;
    min-width: 140px;
}

.pandkiezer-select option {
    background: var(--sidebar-bg);
    color: var(--text);
}

/* Ingelogde gebruiker */
.topbar-user {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    color: var(--text-muted);
}

.topbar-user .ti {
    font-size: 18px;
}

/* ─── Content ────────────────────────────────────────────── */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* ─── Dashboard ───────────────────────────────────────────── */
.dash-waarschuwing {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(245,158,11,0.12);
    border: 1px solid rgba(245,158,11,0.35);
    color: #f59e0b;
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 13.5px;
    margin-bottom: 20px;
}
.dash-waarschuwing .ti { font-size: 18px; flex-shrink: 0; }

.dash-sectie { margin-bottom: 28px; }

.dash-sectie-titel {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    gap: 7px;
}
.dash-sectie-titel .ti { font-size: 15px; color: var(--accent); }

.dash-panden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.dash-pand-kaart {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.dash-pand-kaart:hover {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent);
}

.dash-pand-kop {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
}

.dash-pand-naam {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    line-height: 1.3;
}

.dash-status { font-size: 16px; flex-shrink: 0; }

.dash-pand-adres {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
}

.dash-pand-huurder {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-top: 2px;
}
.dash-pand-huurder--leeg { font-style: italic; opacity: 0.6; }

.dash-pand-prijs {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-top: 4px;
}

.dash-twee-kolommen {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 28px;
}
@media (max-width: 860px) { .dash-twee-kolommen { grid-template-columns: 1fr; } }

.dash-lijst { display: flex; flex-direction: column; gap: 2px; }

.dash-lijst-rij {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--surface);
    border: 1px solid var(--border);
}
.dash-lijst-rij--link {
    text-decoration: none;
    color: var(--text);
    transition: border-color 0.15s;
}
.dash-lijst-rij--link:hover { border-color: var(--accent); }

.dash-lijst-datum {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 34px;
    flex-shrink: 0;
}
.dash-datum-dag {
    font-size: 18px;
    font-weight: 700;
    line-height: 1;
    color: var(--accent);
}
.dash-datum-mnd {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.05em;
}

.dash-lijst-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.dash-lijst-naam {
    font-size: 13.5px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.dash-lijst-sub {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dash-leeg {
    color: var(--text-muted);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 12px 0;
}

.dash-fin-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
@media (max-width: 640px) { .dash-fin-grid { grid-template-columns: 1fr; } }

.dash-fin-kaart {
    border-radius: 10px;
    padding: 16px 18px;
    border: 1px solid var(--border);
}
.dash-fin-kaart--inkomst { background: rgba(62,180,138,0.08); border-color: rgba(62,180,138,0.25); }
.dash-fin-kaart--uitgave { background: rgba(248,113,113,0.08); border-color: rgba(248,113,113,0.25); }
.dash-fin-kaart--positief { background: rgba(62,180,138,0.12); border-color: rgba(62,180,138,0.35); }
.dash-fin-kaart--negatief { background: rgba(248,113,113,0.12); border-color: rgba(248,113,113,0.35); }

.dash-fin-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.dash-fin-bedrag {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
}
.dash-fin-kaart--inkomst .dash-fin-bedrag { color: #3eb48a; }
.dash-fin-kaart--uitgave .dash-fin-bedrag { color: #f87171; }
.dash-fin-kaart--positief .dash-fin-bedrag { color: #3eb48a; }
.dash-fin-kaart--negatief .dash-fin-bedrag { color: #f87171; }

/* Onderhoud status badge */
.status-badge--gepland { background: rgba(62,180,138,0.15); color: var(--accent); }
.status-badge--neutraal { background: rgba(245,158,11,0.15); color: #f59e0b; }

/* Onderhoud lijst rij klikbaar */
.lijst-rij--klikbaar { cursor: pointer; }
.lijst-rij--klikbaar:hover { border-color: var(--accent); }

/* Gevaar knop */
.btn--gevaar {
    background: transparent;
    border: 1px solid rgba(248,113,113,0.4);
    color: #f87171;
    padding: 0 14px;
    height: 36px;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.15s;
}
.btn--gevaar:hover { background: rgba(248,113,113,0.12); }

/* Dashboard placeholder (legacy) */
.dashboard-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.placeholder-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    color: var(--text-muted);
    opacity: 0.55;
}
.placeholder-icon { font-size: 56px; }
.placeholder-inner p { font-size: 15px; font-weight: 500; }

/* ═══════════════════════════════════════════════════════════
   LOGIN
═══════════════════════════════════════════════════════════ */
.login-body {
    background: var(--content-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    overflow: auto;
}

.login-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 24px;
}

.login-card {
    background: var(--sidebar-bg);
    border-radius: var(--radius);
    padding: 40px 36px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: rgba(62,180,138,0.15);
    border-radius: 16px;
    margin-bottom: 16px;
}

.login-logo-icon .ti {
    font-size: 34px;
    color: var(--accent);
}

.login-logo h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.login-logo p {
    font-size: 13px;
    color: var(--text-muted);
}

.login-error {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(220,53,69,0.12);
    border: 1px solid rgba(220,53,69,0.28);
    color: #f87171;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

.login-error .ti { font-size: 16px; flex-shrink: 0; }

.login-info {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(62,180,138,0.12);
    border: 1px solid rgba(62,180,138,0.30);
    color: var(--accent);
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-bottom: 20px;
}

.login-info .ti { font-size: 16px; flex-shrink: 0; }

.login-form { display: flex; flex-direction: column; gap: 18px; }

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-icon {
    position: absolute;
    left: 11px;
    font-size: 16px;
    color: var(--text-muted);
    pointer-events: none;
}

.form-input {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

/* login form: inputs hebben een icoon links */
.input-wrapper .form-input { padding-left: 36px; }

.form-input::placeholder { color: var(--text-muted); opacity: 0.6; }

.form-input:focus {
    border-color: var(--accent);
    background: rgba(62,180,138,0.06);
}

.btn-login {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 11px 16px;
    border-radius: 6px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    margin-top: 4px;
    transition: background 0.15s, transform 0.1s;
}

.btn-login:hover  { background: var(--accent-hover); }
.btn-login:active { transform: scale(0.98); }
.btn-login .ti    { font-size: 17px; }

/* ═══════════════════════════════════════════════════════════
   GEDEELDE FORMULIER-ELEMENTEN
═══════════════════════════════════════════════════════════ */

.form-select,
.form-textarea {
    width: 100%;
    background: rgba(255,255,255,0.06);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: var(--font);
    outline: none;
    transition: border-color 0.15s, background 0.15s;
}

.form-select option  { background: var(--sidebar-bg); color: var(--text); }
.form-textarea       { resize: vertical; min-height: 72px; }

.form-select:focus,
.form-textarea:focus,
.form-input:focus {
    border-color: var(--accent);
    background: rgba(62,180,138,0.06);
}

.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); opacity: 0.6; }

.form-rij-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.form-sectie-label {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2px;
}

.verplicht { color: var(--accent); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 16px;
    border-radius: 6px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: var(--font);
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.1s;
    white-space: nowrap;
    text-decoration: none;
}

.btn:active { transform: scale(0.97); }

.btn--primair {
    background: var(--accent);
    color: #fff;
}
.btn--primair:hover { background: var(--accent-hover); }

.btn--neutraal {
    background: rgba(255,255,255,0.08);
    color: var(--text);
    border: 1px solid var(--border);
}
.btn--neutraal:hover { background: rgba(255,255,255,0.13); }

.btn--blok { width: 100%; justify-content: center; }

/* Pagina-actiebalk */
.pagina-actiebalk {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

/* ═══════════════════════════════════════════════════════════
   STATUS BADGES & CHIPS
═══════════════════════════════════════════════════════════ */

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.status-badge--actief  { background: rgba(62,180,138,0.25); color: #3eb48a; }
.status-badge--inactief { background: rgba(255,255,255,0.08); color: var(--text-muted); }

.chip {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.chip--md { padding: 4px 12px; font-size: 13px; }

.chip--type {
    background: rgba(255,255,255,0.08);
    color: var(--text-muted);
}

/* Energielabels (EU-kleuren) */
.el { color: #fff; }
.el--A { background: #00a050; }
.el--B { background: #51a720; }
.el--C { background: #b5cf1e; color: #222; }
.el--D { background: #f9d200; color: #222; }
.el--E { background: #f7a731; }
.el--F { background: #e8601c; }
.el--G { background: #e02020; }

/* ═══════════════════════════════════════════════════════════
   PANDEN GRID & KAARTEN
═══════════════════════════════════════════════════════════ */

.panden-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 20px;
}

.pand-kaart {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.15s, box-shadow 0.15s;
}

.pand-kaart:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

.pand-kaart--inactief { opacity: 0.55; }

/* Foto */
.pand-foto-wrapper {
    position: relative;
    aspect-ratio: 16/9;
    background: var(--topbar-bg);
    overflow: hidden;
    flex-shrink: 0;
}

.pand-foto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pand-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 52px;
    opacity: 0.35;
}

.pand-foto-wrapper .status-badge {
    position: absolute;
    top: 10px;
    right: 10px;
}

/* Kaart body */
.pand-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}

.pand-naam {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
}

.pand-adres {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.55;
}

.pand-chips {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.pand-prijs {
    font-size: 19px;
    font-weight: 700;
    color: var(--text);
    margin-top: auto;
}

.prijs-suffix {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-muted);
}

.btn-kaart-detail {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(62,180,138,0.12);
    color: var(--accent);
    border: 1px solid rgba(62,180,138,0.22);
    padding: 8px 14px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.btn-kaart-detail:hover {
    background: rgba(62,180,138,0.22);
    color: var(--accent-hover);
}

/* Lege staat */
.leeg-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    min-height: 320px;
    color: var(--text-muted);
    opacity: 0.6;
}

.leeg-state .ti { font-size: 60px; }
.leeg-state p   { font-size: 15px; }

/* ═══════════════════════════════════════════════════════════
   DRAWER (slide-in paneel)
═══════════════════════════════════════════════════════════ */

.drawer-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s;
}

.drawer-overlay.open {
    opacity: 1;
    pointer-events: all;
}

.drawer {
    position: fixed;
    top: 0;
    right: -520px;
    width: 480px;
    max-width: 100vw;
    height: 100vh;
    background: var(--sidebar-bg);
    border-left: 1px solid var(--border);
    z-index: 201;
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -8px 0 32px rgba(0,0,0,0.4);
}

.drawer.open { right: 0; }

.drawer-kop {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.drawer-kop h2 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.drawer-kop h2 .ti { color: var(--accent); font-size: 18px; }

.drawer-sluit-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 20px;
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: color 0.12s, background 0.12s;
}

.drawer-sluit-btn:hover {
    color: var(--text);
    background: var(--nav-hover);
}

.drawer-form {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.drawer-voet {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* Foto upload zone */
.foto-upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    overflow: hidden;
    transition: border-color 0.15s;
    position: relative;
}

.foto-upload-zone:hover { border-color: var(--accent); }

.foto-upload-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-height: 180px;
    border-radius: 6px;
}

.foto-upload-hint {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    padding: 16px;
}

.foto-upload-hint .ti { font-size: 28px; }
.foto-upload-hint span { font-size: 13px; font-weight: 500; }
.foto-upload-hint small { font-size: 12px; opacity: 0.7; }

.verborgen { display: none !important; }

/* ═══════════════════════════════════════════════════════════
   PAND DETAIL
═══════════════════════════════════════════════════════════ */

.detail-kop {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.detail-kop-titel {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.detail-kop-titel h2 {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-terug {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.05);
    transition: color 0.12s, background 0.12s;
    flex-shrink: 0;
}

.btn-terug:hover {
    color: var(--text);
    background: rgba(255,255,255,0.1);
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    margin-bottom: 28px;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 2px;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 16px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    font-family: var(--font);
    cursor: pointer;
    white-space: nowrap;
    transition: color 0.12s, border-color 0.12s;
}

.tab-btn .ti { font-size: 15px; }

.tab-btn:hover { color: var(--text); }

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
    font-weight: 700;
}

.tab-inhoud        { display: none; }
.tab-inhoud.active { display: block; }

/* Tab placeholder */
.tab-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 260px;
    color: var(--text-muted);
    opacity: 0.5;
}

.tab-placeholder .ti { font-size: 52px; }
.tab-placeholder p   { font-size: 14px; }

/* Detail form layout */
.detail-form-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 36px;
    align-items: start;
}

@media (max-width: 820px) {
    .detail-form-layout { grid-template-columns: 1fr; }
}

/* Foto kolom */
.detail-foto-kolom {
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    top: 0;
}

.detail-foto-container {
    border-radius: 10px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: var(--topbar-bg);
    border: 1px solid var(--border);
}

.detail-foto-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-foto-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 56px;
    opacity: 0.3;
}

/* Velden kolom */
.detail-velden-kolom {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.form-acties {
    padding-top: 8px;
    display: flex;
    justify-content: flex-end;
}

/* ═══════════════════════════════════════════════════════════
   LIJST-OVERZICHT  (huurders, contracten)
═══════════════════════════════════════════════════════════ */

.overzicht-lijst {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.overzicht-lijst--compact .lijst-rij {
    padding: 10px 14px;
}

.lijst-rij {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 14px 18px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background 0.12s, transform 0.1s;
    cursor: pointer;
}

.lijst-rij:hover {
    background: rgba(255,255,255,0.04);
    transform: translateX(2px);
}

/* Cellen */
.lijst-cel {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.lijst-cel--avatar   { flex-shrink: 0; }
.lijst-cel--hoofd    { flex: 2; min-width: 0; }
.lijst-cel--pand     { flex: 2; min-width: 0; }
.lijst-cel--datum    { flex: 1; min-width: 80px; }
.lijst-cel--bedrag   { flex: 1; min-width: 80px; }
.lijst-cel--badge    { flex-shrink: 0; flex-direction: row; align-items: center; gap: 8px; }
.lijst-cel--geen-avatar { padding-left: 54px; } /* compensate for missing avatar */

.lijst-naam  { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lijst-sub   { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lijst-val   { font-size: 14px; font-weight: 600; color: var(--text); }
.lijst-leeg  { font-size: 13px; color: var(--text-muted); opacity: 0.5; }
.lijst-sub .ti { font-size: 12px; }

.lijst-chevron { font-size: 16px; color: var(--text-muted); opacity: 0.4; flex-shrink: 0; }

/* Avatar */
.avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(62,180,138,0.18);
    border: 1px solid rgba(62,180,138,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    flex-shrink: 0;
    letter-spacing: 0.5px;
}

.avatar--lg {
    width: 48px;
    height: 48px;
    font-size: 16px;
}

/* Status badge neutraal */
.status-badge--neutraal {
    background: rgba(255,255,255,0.07);
    color: var(--text-muted);
}

/* Verloop-waarschuwing */
.badge-warning-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(247,167,49,0.15);
    border: 1px solid rgba(247,167,49,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #f7a731;
    font-size: 16px;
    flex-shrink: 0;
}

.badge-warning {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: 20px;
    background: rgba(247,167,49,0.12);
    border: 1px solid rgba(247,167,49,0.28);
    color: #f7a731;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-warning .ti { font-size: 13px; }

/* Tab teller-badge */
.tab-teller {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    background: rgba(62,180,138,0.2);
    color: var(--accent);
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════
   DETAIL FORM: secties
═══════════════════════════════════════════════════════════ */

.detail-secties {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 760px;
}

.detail-sectie {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.detail-sectie:last-child { border-bottom: none; }

.detail-sectie--indexering .form-sectie-label .ti {
    font-size: 13px;
    color: var(--accent);
}

.contract-detail-form { max-width: 760px; }

/* ═══════════════════════════════════════════════════════════
   PAND DETAIL – Huurder tab
═══════════════════════════════════════════════════════════ */

.huurder-kaarten {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 760px;
}

.huurder-kaart {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.huurder-kaart-sectie {
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.huurder-kaart-sectie--persoon {
    border-bottom: 1px solid var(--border);
}

.huurder-kaart-sectie--contract {
    flex-direction: column;
    gap: 16px;
}

/* Key-value grid binnen contract-sectie */
.contract-kv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 14px;
}

.contract-kv {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.kv-label  { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.kv-waarde { font-size: 14px; font-weight: 600; color: var(--text); }
.kv-waarde small { font-size: 12px; font-weight: 400; color: var(--text-muted); }

/* ═══════════════════════════════════════════════════════════
   HUURDER DETAIL – Form layout
═══════════════════════════════════════════════════════════ */

.detail-secties .detail-sectie .form-sectie-label {
    margin-bottom: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   HUIDIG WOONADRES  (huurder detail – boven het formulier)
═══════════════════════════════════════════════════════════ */

.woonadres-blok {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 16px 18px;
    background: rgba(62,180,138,0.06);
    border: 1px solid rgba(62,180,138,0.2);
    border-radius: 10px;
    margin-bottom: 24px;
    max-width: 760px;
}

.woonadres-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--accent);
    white-space: nowrap;
    padding-top: 1px;
}

.woonadres-label .ti { font-size: 14px; }

.woonadres-inhoud {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.woonadres-pand {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.woonadres-regel {
    font-size: 13px;
    color: var(--text-muted);
}

.woonadres-leeg {
    font-size: 13px;
    color: var(--text-muted);
    opacity: 0.6;
    font-style: italic;
}

/* ═══════════════════════════════════════════════════════════
   PAGINA TOOLBAR  (jaar-nav + actieknoppen)
═══════════════════════════════════════════════════════════ */

.pagina-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.jaar-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 4px 6px;
}

.jaar-nav-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 14px;
    transition: background 0.12s, color 0.12s;
}

.jaar-nav-btn:hover {
    background: rgba(255,255,255,0.07);
    color: var(--text);
}

.jaar-label {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    padding: 0 10px;
    min-width: 52px;
    text-align: center;
}

/* ═══════════════════════════════════════════════════════════
   BETALING MATRIX
═══════════════════════════════════════════════════════════ */

.betaling-matrix-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 20px;
}

.betaling-matrix {
    border-collapse: collapse;
    width: 100%;
    min-width: 760px;
}

.betaling-matrix thead tr {
    background: var(--sidebar-bg);
}

.betaling-matrix th {
    padding: 10px 8px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: center;
    border-right: 1px solid var(--border);
    white-space: nowrap;
}

.betaling-matrix th:last-child { border-right: none; }

.th-pand {
    text-align: left !important;
    padding-left: 16px !important;
    min-width: 160px;
    width: 180px;
}

.betaling-matrix tbody tr {
    border-top: 1px solid var(--border);
    transition: background 0.1s;
}

.betaling-matrix tbody tr:hover {
    background: rgba(255,255,255,0.025);
}

.td-pand {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

/* Matrix cellen */
.matrix-cel {
    text-align: center;
    padding: 8px 4px;
    border-right: 1px solid var(--border);
    transition: background 0.1s;
    min-width: 48px;
}

.matrix-cel:last-child { border-right: none; }

.matrix-cel[onclick] { cursor: pointer; }

.cel-icoon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 800;
}

/* Status kleuren */
.matrix-cel--betaald { background: rgba(62,180,138,0.08); }
.matrix-cel--betaald .cel-icoon {
    background: rgba(62,180,138,0.18);
    color: #3eb48a;
}
.matrix-cel--betaald:hover { background: rgba(62,180,138,0.14); }

.matrix-cel--openstaand { background: rgba(247,167,49,0.07); }
.matrix-cel--openstaand .cel-icoon {
    background: rgba(247,167,49,0.18);
    color: #f7a731;
}
.matrix-cel--openstaand:hover { background: rgba(247,167,49,0.13); }

.matrix-cel--te_laat { background: rgba(230,80,60,0.07); }
.matrix-cel--te_laat .cel-icoon {
    background: rgba(230,80,60,0.18);
    color: #e6503c;
}
.matrix-cel--te_laat:hover { background: rgba(230,80,60,0.13); }

.matrix-cel--achterstallig { background: rgba(230,80,60,0.1); }
.matrix-cel--achterstallig .cel-icoon {
    background: rgba(230,80,60,0.22);
    color: #e6503c;
    font-weight: 900;
}
.matrix-cel--achterstallig:hover { background: rgba(230,80,60,0.17); }

.matrix-cel--toekomst .cel-icoon,
.matrix-cel--geen .cel-icoon {
    color: rgba(255,255,255,0.18);
    font-size: 12px;
    font-weight: 400;
}

/* Legenda */
.matrix-legenda {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 24px;
    padding: 0 2px;
}

.legenda-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
}

.legenda-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
    flex-shrink: 0;
}

.legenda-dot--betaald      { background: #3eb48a; }
.legenda-dot--openstaand   { background: #f7a731; }
.legenda-dot--te_laat      { background: #e6503c; }
.legenda-dot--achterstallig{ background: #e6503c; border: 1px dashed rgba(230,80,60,0.6); }
.legenda-dot--geen         { background: rgba(255,255,255,0.12); border: 1px solid var(--border); }

/* ═══════════════════════════════════════════════════════════
   BETALING SAMENVATTING
═══════════════════════════════════════════════════════════ */

.betaling-samenvatting {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.samenvatting-kaart {
    flex: 1;
    min-width: 160px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sam-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sam-label .ti { font-size: 13px; }

.sam-bedrag {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.02em;
}

.samenvatting-kaart--ontvangen .sam-bedrag { color: #3eb48a; }
.samenvatting-kaart--openstaand .sam-bedrag { color: #f7a731; }

/* ═══════════════════════════════════════════════════════════
   BETALING DETAIL MODAL
═══════════════════════════════════════════════════════════ */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 400;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
}

.modal-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.modal-kaart {
    background: var(--topbar-bg);
    border: 1px solid var(--border);
    border-radius: 14px;
    width: 440px;
    max-width: calc(100vw - 32px);
    box-shadow: 0 8px 40px rgba(0,0,0,0.5);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(12px);
    transition: transform 0.18s;
}

.modal-overlay.open .modal-kaart { transform: translateY(0); }

.modal-kop {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px 14px;
    border-bottom: 1px solid var(--border);
}

.modal-titel {
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}

.modal-subtitel {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
}

.modal-sluit-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    padding: 2px;
    flex-shrink: 0;
    transition: color 0.12s;
}

.modal-sluit-btn:hover { color: var(--text); }

.modal-inhoud { padding: 18px 20px; }

.modal-kv-grid {
    display: grid;
    grid-template-columns: 140px 1fr;
    gap: 10px 12px;
    align-items: center;
}

.modal-voet {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
}

/* ═══════════════════════════════════════════════════════════
   PAND DETAIL – Betalingen tab tabel
═══════════════════════════════════════════════════════════ */

.pand-betalingen-tabel-wrapper {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 8px;
    max-width: 760px;
}

.pand-betalingen-tabel {
    border-collapse: collapse;
    width: 100%;
    min-width: 540px;
}

.pand-betalingen-tabel th {
    background: var(--sidebar-bg);
    padding: 9px 14px;
    font-size: 11.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.pand-betalingen-tabel td {
    padding: 10px 14px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.pand-betalingen-tabel tbody tr:last-child td { border-bottom: none; }

.pand-betalingen-tabel tbody tr:hover {
    background: rgba(255,255,255,0.03);
}

/* ═══════════════════════════════════════════════════════════
   FILTER BALK
═══════════════════════════════════════════════════════════ */

.filter-balk {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.filter-select {
    width: auto;
    min-width: 140px;
    padding: 8px 12px;
}

/* ═══════════════════════════════════════════════════════════
   COMMUNICATIE
═══════════════════════════════════════════════════════════ */

.comm-badge--in {
    background: rgba(62,180,138,0.15);
    color: #3eb48a;
}

.comm-badge--uit {
    background: rgba(99,130,225,0.15);
    color: #7b9ee8;
}

.comm-detail-layout {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 28px;
    align-items: start;
    max-width: 980px;
}

@media (max-width: 820px) {
    .comm-detail-layout { grid-template-columns: 1fr; }
}

.comm-meta-kaart {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.comm-inhoud-kaart {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
}

.comm-inhoud-tekst {
    font-size: 14px;
    line-height: 1.8;
    color: var(--text);
    margin-top: 12px;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ═══════════════════════════════════════════════════════════
   DOCUMENTEN
═══════════════════════════════════════════════════════════ */

.doc-lijst {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-rij {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
}

.doc-rij--binnenkort {
    border-color: rgba(247,167,49,0.35);
    background: rgba(247,167,49,0.04);
}

.doc-rij--verlopen {
    border-color: rgba(230,80,60,0.35);
    background: rgba(230,80,60,0.04);
}

.doc-icoon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.doc-acties {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-direction: row;
}

.btn--sm {
    padding: 6px 10px;
    font-size: 12.5px;
}

.btn--gevaar {
    background: rgba(220,53,69,0.12);
    color: #f87171;
    border: 1px solid rgba(220,53,69,0.25);
}

.btn--gevaar:hover {
    background: rgba(220,53,69,0.22);
}

.doc-upload-zone {
    border: 2px dashed var(--border);
    border-radius: 8px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    padding: 16px;
    transition: border-color 0.15s;
}

.doc-upload-zone:hover { border-color: var(--accent); }

.checkbox-lijst {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 4px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text);
    cursor: pointer;
}

.checkbox-item input[type="checkbox"] {
    width: 15px;
    height: 15px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* ═══════════════════════════════════════════════════════════
   FINANCIËN
═══════════════════════════════════════════════════════════ */

.fin-tegels {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 28px;
}

@media (max-width: 760px) {
    .fin-tegels { grid-template-columns: 1fr; }
}

.fin-tegel {
    background: var(--sidebar-bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.fin-tegel-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.fin-tegel-bedrag {
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.fin-tegel-sub {
    font-size: 11.5px;
    color: var(--text-muted);
    line-height: 1.5;
}

.fin-tegel--inkomsten .fin-tegel-bedrag { color: #3eb48a; }
.fin-tegel--uitgaven  .fin-tegel-bedrag { color: #e6503c; }
.fin-tegel--positief  .fin-tegel-bedrag { color: #3eb48a; }
.fin-tegel--negatief  .fin-tegel-bedrag { color: #e6503c; }

.fin-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 900px) {
    .fin-grid { grid-template-columns: 1fr; }
}

.fin-sectie {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fin-maand-tabel-wrapper {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.fin-maand-tabel {
    border-collapse: collapse;
    width: 100%;
}

.fin-maand-tabel th {
    background: rgba(255,255,255,0.04);
    padding: 8px 14px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.fin-maand-tabel td {
    padding: 9px 14px;
    font-size: 13px;
    color: var(--text);
    border-bottom: 1px solid var(--border);
}

.fin-maand-tabel tbody tr:last-child td { border-bottom: none; }
.fin-maand-tabel tbody tr:hover { background: rgba(255,255,255,0.02); }
.tal { text-align: right; }

/* Staafdiagram */
.fin-diagram {
    display: flex;
    align-items: flex-end;
    gap: 4px;
    height: 120px;
    padding: 0 4px;
    background: rgba(255,255,255,0.02);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 8px 0;
}

.fin-diagram-groep {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: 100%;
}

.fin-diagram-staven {
    flex: 1;
    width: 100%;
    display: flex;
    align-items: flex-end;
    gap: 2px;
}

.fin-staaf {
    flex: 1;
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    transition: opacity 0.15s;
}

.fin-staaf:hover { opacity: 0.8; }
.fin-staaf--ink { background: #3eb48a; }
.fin-staaf--uit { background: #e6503c; }

.fin-diagram-label {
    font-size: 9px;
    color: var(--text-muted);
    text-align: center;
    padding-bottom: 4px;
    flex-shrink: 0;
}

.fin-diagram-legenda {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding: 0 4px;
}

/* Print stijl voor PDF export */
@media print {
    .sidebar, .topbar, .pagina-toolbar .btn,
    .drawer, .drawer-overlay, .btn--gevaar { display: none !important; }
    .main-column { margin: 0; }
    .content { padding: 0; overflow: visible; }
    body { overflow: auto; }
}
