@page {
    margin: 14mm;
    size: A4;
}

:root {
    --bg: #eef3f8;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --ink: #0f172a;
    --ink-2: #334155;
    --muted: #64748b;
    --line: #dbe3ee;
    --sidebar: #0b2942;
    --sidebar-dark: #071f34;
    --accent: #159447;
    --accent-2: #2563eb;
    --accent-soft: #e7f7ee;
    --blue-soft: #eff6ff;
    --danger: #b91c1c;
    --shadow-soft: 0 6px 18px rgba(15, 23, 42, .06);
    --radius: 18px;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    color: var(--ink);
    font-family: Arial, Helvetica, sans-serif;
    background: radial-gradient(circle at top left, rgba(37,99,235,.08), transparent 360px),
                linear-gradient(180deg, #f8fafc 0%, var(--bg) 100%);
}

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

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--sidebar), var(--sidebar-dark));
    color: white;
    padding: 20px 16px;
    position: sticky;
    top: 0;
    height: 100vh;
    box-shadow: 12px 0 28px rgba(15,23,42,.16);
}

.brand-card {
    background: white;
    border-radius: 22px;
    padding: 14px;
    min-height: 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
}

.brand-card img {
    width: 100%;
    max-width: 220px;
    max-height: 76px;
    object-fit: contain;
}

.brand-fallback {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: var(--sidebar);
    color: white;
    display: grid;
    place-items: center;
    font-weight: 900;
    font-size: 20px;
}

.side-nav { display: grid; gap: 7px; }

.side-nav a {
    color: #d8e4f2;
    text-decoration: none;
    padding: 12px 13px;
    border-radius: 14px;
    font-weight: 800;
    display: flex;
    gap: 10px;
    align-items: center;
    transition: .15s ease;
    border: 1px solid transparent;
}

.side-nav a:hover {
    background: rgba(255,255,255,.10);
    color: white;
    transform: translateX(2px);
}

.side-nav a.active {
    color: white;
    background: rgba(255,255,255,.14);
    border-color: rgba(255,255,255,.15);
    box-shadow: inset 4px 0 0 var(--accent);
}

.nav-icon { width: 22px; display: inline-grid; place-items: center; }

.side-nav a.alarm-fast-link {
    background: rgba(217, 37, 37, .14);
    border-color: rgba(255, 255, 255, .12);
}
.side-nav a.alarm-fast-link:hover,
.side-nav a.alarm-fast-link.active {
    background: rgba(217, 37, 37, .26);
    box-shadow: inset 4px 0 0 #ef4444;
}

.nav-section {
    color: #9fb3c8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 900;
    margin: 15px 10px 5px;
}

.main { flex: 1; min-width: 0; }

.topbar {
    background: rgba(255,255,255,.94);
    border-bottom: 1px solid var(--line);
    padding: 22px 30px;
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 5;
    backdrop-filter: blur(10px);
}

.breadcrumb {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 5px;
}

.topbar h1 {
    margin: 0;
    font-size: 29px;
    letter-spacing: -.5px;
}

.top-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.content {
    max-width: 1220px;
    margin: 0 auto;
    padding: 30px 20px 70px;
}

.card {
    background: rgba(255,255,255,.98);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-soft);
    padding: 24px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.card-header h2 { margin: 0; }
.card-header p { margin: 6px 0 0; color: var(--muted); }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }

.stat {
    position: relative;
    overflow: hidden;
    min-height: 136px;
    background: linear-gradient(135deg, white 0%, #fbfdff 100%);
}

.stat::after {
    content: "";
    position: absolute;
    width: 130px;
    height: 130px;
    border-radius: 50%;
    right: -38px;
    top: -38px;
    background: var(--blue-soft);
}

.stat strong {
    display: block;
    font-size: 44px;
    line-height: 1;
    margin-bottom: 10px;
    letter-spacing: -1px;
    position: relative;
    z-index: 1;
}

.stat span {
    color: var(--muted);
    font-weight: 800;
    position: relative;
    z-index: 1;
}

.quick-card {
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.icon-box {
    width: 48px;
    height: 48px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent);
    font-weight: 900;
    font-size: 22px;
    margin-bottom: 12px;
}

label {
    display: block;
    font-weight: 900;
    margin: 15px 0 7px;
    color: var(--ink-2);
    font-size: 14px;
}

input, textarea, select {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 13px;
    padding: 12px 13px;
    font-size: 15px;
    background: white;
    color: var(--ink);
    transition: .15s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent-2);
    box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}

textarea { min-height: 112px; resize: vertical; }

button, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 999px;
    padding: 11px 16px;
    background: var(--sidebar);
    color: white;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
    font-size: 14px;
    gap: 7px;
    transition: .15s ease;
    box-shadow: 0 8px 18px rgba(15,23,42,.10);
    white-space: nowrap;
}

button:hover, .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(15,23,42,.14);
}

.btn-light {
    background: white;
    color: var(--sidebar);
    border: 1px solid #cbd5e1;
    box-shadow: none;
}

.btn-pdf { background: var(--accent-2); }
.btn-danger, button.btn-danger { background: var(--danger); }

.actions, .table-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
}

.actions form, .table-actions form { margin: 0; }

.table-wrap {
    overflow-x: auto;
    border-radius: 15px;
    border: 1px solid #e5e7eb;
}

table { width: 100%; border-collapse: collapse; background: white; }

td, th {
    padding: 13px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: top;
}

th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
}

tbody tr:hover td { background: #fbfdff; }
tr:last-child td { border-bottom: 0; }

.badge {
    display: inline-flex;
    border-radius: 999px;
    padding: 6px 11px;
    background: #e2e8f0;
    color: var(--ink-2);
    font-weight: 900;
    font-size: 12px;
}

.row-3 { display: grid; grid-template-columns: 1.2fr .75fr .95fr; gap: 13px; }
.row-4 { display: grid; grid-template-columns: 1fr 1.8fr .8fr; gap: 13px; }

.section-card, .chapter, .defect, .point {
    background: #f8fafc;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 17px;
    margin-top: 14px;
}

.point {
    background: white;
    border-style: dashed;
}

.photo-inputs {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 14px;
    padding: 12px;
}

.photo-inputs input + input { margin-top: 8px; }

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
    gap: 13px;
    margin-top: 13px;
}

.photo-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #f8fafc;
    padding: 9px;
}

.photo-card img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 10px;
}

.signature-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.signature-canvas {
    width: 100%;
    height: 185px;
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    background: white;
    touch-action: none;
}

.signature-image {
    max-width: 100%;
    height: 122px;
    object-fit: contain;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: white;
    padding: 8px;
}

.notice {
    background: #ecfdf5;
    color: #166534;
    border: 1px solid #bbf7d0;
    padding: 13px;
    border-radius: 13px;
    margin-bottom: 14px;
    font-weight: 800;
}

.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
    padding: 13px;
    border-radius: 13px;
    margin-bottom: 14px;
    font-weight: 800;
}

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background: radial-gradient(circle at top left, rgba(21,148,71,.14), transparent 380px),
                linear-gradient(135deg, #0b2942 0%, #071f34 100%);
}

.login-card {
    width: min(440px, 100%);
    background: white;
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(0,0,0,.24);
}

.login-logo {
    background: white;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 12px;
    margin-bottom: 18px;
    text-align: center;
}

.login-logo img {
    max-width: 240px;
    max-height: 90px;
    object-fit: contain;
}

/* Zakelijke PDF-weergave */
.pdf-body {
    background: #f1f5f9;
    padding: 26px;
}

.pdf-shell {
    width: 210mm;
    min-height: 297mm;
    margin: 0 auto;
    background: white;
    color: #111827;
    box-shadow: 0 18px 48px rgba(15,23,42,.16);
}

.pdf-toolbar {
    max-width: 210mm;
    margin: 0 auto 14px;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.pdf-page {
    padding: 16mm;
}

.pdf-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 3px solid #0b2942;
    padding-bottom: 14px;
    margin-bottom: 18px;
}

.pdf-logo {
    max-width: 58mm;
    max-height: 22mm;
    object-fit: contain;
}

.pdf-company {
    text-align: right;
    font-size: 12px;
    color: #334155;
}

.pdf-title {
    margin: 0;
    font-size: 25px;
    letter-spacing: -.4px;
    color: #0b2942;
}

.pdf-subtitle {
    color: #475569;
    margin: 6px 0 0;
    font-size: 14px;
}

.pdf-meta {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.pdf-meta td {
    border: 1px solid #cbd5e1;
    padding: 8px 10px;
    font-size: 12px;
}

.pdf-meta td:first-child {
    background: #f8fafc;
    font-weight: 800;
    width: 34%;
}

.pdf-section {
    margin-top: 18px;
    page-break-inside: avoid;
}

.pdf-section h2 {
    font-size: 17px;
    margin: 0 0 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid #cbd5e1;
    color: #0b2942;
}

.pdf-section h3 {
    font-size: 14px;
    margin: 12px 0 6px;
}

.pdf-text {
    white-space: pre-line;
    font-size: 12px;
    line-height: 1.5;
}

.pdf-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.pdf-table th,
.pdf-table td {
    border: 1px solid #cbd5e1;
    padding: 8px;
}

.pdf-table th {
    background: #f8fafc;
    color: #0f172a;
}

.pdf-point {
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    padding: 10px;
    margin: 10px 0;
    page-break-inside: avoid;
}

.pdf-badges span {
    display: inline-block;
    background: #e2e8f0;
    border-radius: 99px;
    padding: 4px 8px;
    font-size: 11px;
    font-weight: 800;
    margin-right: 5px;
}

.pdf-photo-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 9px;
    margin-top: 8px;
}

.pdf-photo {
    width: 100%;
    height: 58mm;
    object-fit: cover;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
}

.pdf-signatures {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
    margin-top: 14px;
}

.pdf-signature-box {
    border: 1px solid #cbd5e1;
    padding: 10px;
    min-height: 45mm;
}

.pdf-signature-img {
    max-width: 100%;
    height: 28mm;
    object-fit: contain;
    display: block;
    margin-top: 8px;
}

.pdf-footer {
    margin-top: 22px;
    padding-top: 8px;
    border-top: 1px solid #cbd5e1;
    color: #64748b;
    font-size: 11px;
    display: flex;
    justify-content: space-between;
}

@media (max-width: 980px) {
    .app-shell { display: block; }
    .sidebar { position: static; width: auto; height: auto; box-shadow: none; }
    .side-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .topbar { position: static; align-items: flex-start; flex-direction: column; }
    .grid, .grid-2, .row-3, .row-4, .signature-grid { grid-template-columns: 1fr; }
    .content { padding: 20px 12px 48px; }
}

@media print {
    .no-print { display: none !important; }
    body { background: white; }
    .app-shell { display: block; }
    .content { max-width: 100%; padding: 0; }
    .card, .chapter, .defect, .point { box-shadow: none; break-inside: avoid; }
    button, .btn { display: none !important; }

    .pdf-body { padding: 0; background: white; }
    .pdf-shell { width: auto; min-height: auto; box-shadow: none; }
    .pdf-page { padding: 0; }
}

.grid-dashboard {
    grid-template-columns: repeat(5, 1fr);
}

.checklist-row-nee {
    background: #fef2f2;
}

.checklist-row-nee td {
    border-color: #fecaca;
}

.inspectie-intro {
    background: #f8fafc;
    border-left: 5px solid var(--accent);
    padding: 14px 16px;
    border-radius: 14px;
    color: var(--ink-2);
}

.action-open {
    background: #fef3c7;
    color: #92400e;
}

.action-done {
    background: #dcfce7;
    color: #166534;
}

@media (max-width: 1100px) {
    .grid-dashboard {
        grid-template-columns: repeat(2, 1fr);
    }
}

.alarm-card-box {
    border: 1px solid var(--line);
    border-radius: 18px;
    background: white;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alarm-card-box h3 {
    margin: 0;
}

.alarm-card-meta {
    color: var(--muted);
    font-size: 13px;
}

.alarm-card-preview {
    border: 1px solid #dbe3ee;
    border-radius: 14px;
    background: #f8fafc;
    padding: 10px;
}

.alarm-card-preview img {
    width: 100%;
    max-height: 260px;
    object-fit: contain;
    border-radius: 10px;
    background: white;
}

.alarm-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    padding: 13px;
    border-radius: 14px;
    font-weight: 800;
}

.mailbox-reply {
    border-left: 4px solid var(--accent);
    padding-left: 14px;
}

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    margin-left: 8px;
    border-radius: 999px;
    background: #dc2626;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 8px 18px rgba(220, 38, 38, 0.28);
}


/* V4.6.4 scrollbaar menu */
.sidebar {
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
}

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,.25);
    border-radius: 999px;
}

@media (max-height: 760px) {
    .sidebar {
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .brand-card {
        min-height: 70px;
        margin-bottom: 12px;
        padding: 10px;
    }

    .brand-card img {
        max-height: 58px;
    }

    .side-nav a {
        padding: 9px 11px;
    }

    .nav-section {
        margin-top: 9px;
        margin-bottom: 3px;
    }
}

.overview-search {
    max-width: 340px;
}

/* V4.7.1: logo op reset-/uitnodigingspagina netjes binnen kaart houden */
.login-logo {
    overflow: hidden;
}

.login-logo img {
    display: block;
    width: 100%;
    max-width: 260px;
    max-height: 90px;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}

.login-card > img.login-logo {
    display: block;
    width: auto;
    max-width: 260px;
    max-height: 90px;
    height: auto;
    margin: 0 auto 18px auto;
    object-fit: contain;
}

/* V4.7.1: Toegangsbeheer visueel onder Gebruikers plaatsen */
.side-nav a.nav-subitem {
    margin-left: 28px;
    padding: 10px 12px;
    font-size: 14px;
    background: rgba(255,255,255,.05);
}

.side-nav a.nav-subitem.active {
    box-shadow: inset 4px 0 0 var(--accent-2);
}

/* Autosave */
.autosave-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 10px 0 18px 0;
    padding: 8px 12px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #475569;
    font-size: 13px;
    font-weight: 600;
}
.autosave-status.saving,
.autosave-status.pending {
    background: #fff7ed;
    color: #9a3412;
}
.autosave-status.saved {
    background: #ecfdf5;
    color: #047857;
}
.autosave-status.error {
    background: #fef2f2;
    color: #b91c1c;
}

/* V4.9: gratis browsermeldingen */
.bouwslim-toast-notification {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9999;
    max-width: min(380px, calc(100vw - 44px));
    padding: 14px 16px;
    border-radius: 16px;
    background: #0f172a;
    color: #ffffff;
    text-decoration: none;
    box-shadow: 0 18px 40px rgba(15,23,42,.28);
    transform: translateY(20px);
    opacity: 0;
    transition: .25s ease;
    font-weight: 700;
}
.bouwslim-toast-notification.is-visible {
    transform: translateY(0);
    opacity: 1;
}
.notify-enable { white-space: nowrap; }

/* V5.0: ISO / VCA basis */
.iso-hero {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
}

.iso-hero-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 9px 13px;
    background: #dcfce7;
    color: #166534;
    font-weight: 900;
    font-size: 13px;
}

.iso-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}

.iso-tile {
    min-height: 190px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255,255,255,.98);
    box-shadow: var(--shadow-soft);
    padding: 22px;
    display: flex;
    gap: 16px;
    text-decoration: none;
    color: var(--ink);
    transition: .18s ease;
}

.iso-tile-live:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px rgba(15,23,42,.10);
    border-color: rgba(21,148,71,.35);
}

.iso-tile-disabled {
    opacity: .82;
}

.iso-tile-icon {
    width: 54px;
    height: 54px;
    border-radius: 17px;
    background: var(--accent-soft);
    display: grid;
    place-items: center;
    font-size: 27px;
    flex: 0 0 auto;
}

.iso-tile h3 {
    margin: 0 0 7px;
    font-size: 22px;
}

.iso-tile p {
    margin: 0 0 14px;
    color: var(--muted);
    line-height: 1.5;
}

.iso-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 900;
}

.iso-status.ready {
    background: #dcfce7;
    color: #166534;
}

.iso-status.soon {
    background: #f1f5f9;
    color: #475569;
}

.timeline-list {
    display: grid;
    gap: 12px;
}

.timeline-list div {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 14px 16px;
    background: #ffffff;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.timeline-list strong {
    color: var(--ink);
}

.timeline-list span {
    color: var(--muted);
    font-weight: 700;
    text-align: right;
}

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

    .iso-tile {
        min-height: auto;
    }

    .timeline-list div {
        display: block;
    }

    .timeline-list span {
        display: block;
        text-align: left;
        margin-top: 5px;
    }
}

/* V5.2: Toolboxen en LMRA */
.toolbox-list {
    display: grid;
    gap: 13px;
}

.toolbox-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: #ffffff;
}

.toolbox-row.is-done {
    background: #f0fdf4;
    border-color: #bbf7d0;
}

.toolbox-row.is-inactive {
    opacity: .65;
}

.toolbox-row h3 {
    margin: 0 0 5px 0;
}

.toolbox-meta {
    color: var(--muted);
    font-weight: 700;
    font-size: 13px;
}

.toolbox-row-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.toolbox-read-card {
    font-size: 18px;
    line-height: 1.7;
}

.toolbox-content {
    white-space: normal;
}


.toolbox-attachment {
    margin-top: 22px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.form-help {
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.toolbox-confirm-check {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 900;
    padding: 15px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid var(--line);
}

.toolbox-confirm-check input {
    width: 22px;
    height: 22px;
}

.lmra-card {
    display: grid;
    gap: 18px;
}

.lmra-alert {
    padding: 18px;
    border-radius: 20px;
    background: #b91c1c;
    color: #ffffff;
    font-size: 20px;
    font-weight: 1000;
    text-align: center;
    letter-spacing: .02em;
    box-shadow: 0 14px 26px rgba(185,28,28,.20);
}

.lmra-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.lmra-steps div {
    border-radius: 22px;
    padding: 20px;
    border: 1px solid var(--line);
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.lmra-steps strong {
    display: block;
    font-size: 19px;
    margin-bottom: 8px;
    color: var(--ink);
}

.lmra-steps span {
    display: block;
    color: var(--muted);
    line-height: 1.5;
    font-weight: 700;
}

.lmra-checklist {
    display: grid;
    gap: 10px;
}

.lmra-checklist label {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 13px 14px;
    border-radius: 15px;
    background: #f8fafc;
    border: 1px solid var(--line);
    font-weight: 800;
}

.lmra-checklist input {
    width: 22px;
    height: 22px;
    margin-top: 2px;
    flex: 0 0 auto;
}

.lmra-note {
    color: var(--muted);
    font-weight: 700;
    text-align: center;
}

@media (max-width: 800px) {
    .toolbox-row {
        display: block;
    }

    .toolbox-row-actions {
        justify-content: flex-start;
        margin-top: 12px;
    }

    .lmra-steps {
        grid-template-columns: 1fr;
    }

    .lmra-alert {
        font-size: 17px;
    }
}

/* V5.2.2: Toolbox bijlagen, archief en verwijderen */
.inline-form {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.inline-form label {
    margin: 0;
}

.inline-form select {
    min-width: 120px;
}

.inline-delete {
    margin: 0;
    display: inline-flex;
}

.toolbox-viewer {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    min-height: 650px;
}

.toolbox-viewer iframe {
    width: 100%;
    height: 75vh;
    min-height: 650px;
    border: 0;
    display: block;
}

.toolbox-image-viewer {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    overflow: hidden;
    background: #ffffff;
    padding: 12px;
}

.toolbox-image-viewer img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 12px;
}

.toolbox-file-notice {
    margin-top: 16px;
}

@media (max-width: 800px) {
    .toolbox-viewer,
    .toolbox-viewer iframe {
        min-height: 520px;
        height: 70vh;
    }
}

/* V5.2.3: Toolbox teksten + LMRA uitvoeren met iconen */
.toolbox-summary-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 13px;
    font-weight: 900;
}
.toolbox-summary-label::before { content: "📝"; }
.lmra-form-card .grid-2 { margin-bottom: 18px; }
.muted-small { color: var(--muted); font-size: 12px; font-weight: 700; }
.lmra-step-icon { display: inline-block; margin-right: 6px; }
.lmra-icon-checklist label {
    align-items: center;
    min-height: 58px;
}
.lmra-check-icon {
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: #ecfdf5;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 22px;
}
.lmra-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}
.lmra-safe-btn,
.lmra-attention-btn {
    width: 100%;
    justify-content: center;
    font-size: 17px;
    padding: 15px 18px;
    border-radius: 16px;
}
.iso-status.danger {
    background: #fee2e2;
    color: #991b1b;
}
.notice.error {
    background: #fee2e2;
    color: #991b1b;
    border-color: #fecaca;
}
@media (max-width: 800px) {
    .lmra-action-grid { grid-template-columns: 1fr; }
    .lmra-safe-btn, .lmra-attention-btn { font-size: 16px; }
}

/* V5.2.4: LMRA ja/nee flow en toolbox-archief */
.lmra-yesno-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.lmra-yesno-row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-radius: 16px;
    background: #fff;
}
.lmra-yesno-question {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
}
.lmra-yesno-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.lmra-choice {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.14);
    background: #f8fafc;
    font-weight: 800;
    cursor: pointer;
}
.lmra-choice.yes:has(input:checked) {
    background: #dcfce7;
    border-color: #16a34a;
}
.lmra-choice.no:has(input:checked) {
    background: #fee2e2;
    border-color: #dc2626;
}
.lmra-action-grid.single-action {
    grid-template-columns: 1fr;
}
@media (max-width: 720px) {
    .lmra-yesno-row {
        grid-template-columns: 1fr;
    }
    .lmra-yesno-actions {
        width: 100%;
    }
    .lmra-choice {
        flex: 1;
        justify-content: center;
    }
}

/* V5.2.5 - Schone alarmkaart */
.alarm-sheet {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 22px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    margin-bottom: 22px;
}
.alarm-sheet-header {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: stretch;
    border-bottom: 3px solid #ef4444;
    padding-bottom: 18px;
    margin-bottom: 20px;
}
.alarm-label {
    display: inline-block;
    background: #fee2e2;
    color: #991b1b;
    font-weight: 800;
    border-radius: 999px;
    padding: 6px 12px;
    margin-bottom: 8px;
    letter-spacing: .03em;
}
.alarm-sheet h2 {
    font-size: 34px;
    margin: 0 0 6px;
}
.alarm-number-box {
    min-width: 180px;
    background: #dc2626;
    color: #fff;
    border-radius: 20px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
.alarm-number-box span {
    font-weight: 700;
    opacity: .9;
}
.alarm-number-box strong {
    display: block;
    font-size: 42px;
    line-height: 1;
    margin-top: 8px;
}
.alarm-contact-grid,
.alarm-procedure-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.alarm-procedure-grid { margin-top: 16px; }
.alarm-info-block,
.alarm-procedure {
    border: 1px solid #e5e7eb;
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px;
}
.alarm-info-block h3,
.alarm-procedure h3 {
    margin: 0 0 10px;
    font-size: 18px;
}
.alarm-info-block p,
.alarm-procedure p {
    margin: 0;
    line-height: 1.55;
}
.alarm-red {
    background: #fef2f2;
    border-color: #fecaca;
}

@media (max-width: 800px) {
    .alarm-sheet-header,
    .alarm-contact-grid,
    .alarm-procedure-grid {
        grid-template-columns: 1fr;
        display: grid;
    }
    .alarm-sheet { padding: 16px; border-radius: 18px; }
    .alarm-sheet h2 { font-size: 28px; }
    .alarm-number-box { min-width: 0; }
}

@media print {
    .no-print { display: none !important; }
    .alarm-sheet {
        box-shadow: none;
        border: 0;
        padding: 0;
        margin: 0;
    }
    .alarm-contact-grid,
    .alarm-procedure-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }
    .alarm-info-block,
    .alarm-procedure {
        break-inside: avoid;
        page-break-inside: avoid;
        padding: 10px;
    }
    .alarm-sheet h2 { font-size: 26px; }
    .alarm-number-box strong { font-size: 34px; }
}
.app-copyright {
    margin: 28px 0 8px;
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
}

/* V5.2.6 - schone alarmkaart */
.alarm-clean-page {
    background: #fff;
    border: 1px solid #dfe7f1;
    border-radius: 22px;
    box-shadow: 0 16px 40px rgba(15, 35, 60, .08);
    padding: 24px;
    max-width: 1120px;
    margin: 0 auto 24px auto;
}
.alarm-clean-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: stretch;
    border-bottom: 4px solid #d92525;
    padding-bottom: 18px;
    margin-bottom: 18px;
}
.alarm-clean-titleblock {
    display: flex;
    gap: 18px;
    align-items: center;
    min-width: 0;
}
.alarm-clean-logo {
    width: 180px;
    min-width: 150px;
    min-height: 84px;
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-shadow: 0 8px 20px rgba(15, 35, 60, .06);
}
.alarm-clean-logo img {
    max-width: 100%;
    max-height: 68px;
    object-fit: contain;
}
.alarm-clean-logo-fallback {
    background: #0b2942;
    color: #fff;
    font-weight: 900;
    font-size: 24px;
}
.alarm-clean-kicker {
    font-weight: 900;
    color: #d92525;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 13px;
}
.alarm-clean-header h2 {
    font-size: 38px;
    margin: 4px 0 8px 0;
    color: #0d1b2e;
}
.alarm-clean-header p {
    margin: 0;
    color: #526279;
    font-size: 16px;
}
.alarm-clean-112 {
    min-width: 220px;
    border-radius: 18px;
    background: #d92525;
    color: white;
    padding: 18px 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.alarm-clean-112 span { font-weight: 900; letter-spacing: .1em; }
.alarm-clean-112 strong { font-size: 48px; line-height: 1; margin: 4px 0; }
.alarm-clean-112 small { font-weight: 700; }
.alarm-clean-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}
.alarm-clean-box,
.alarm-clean-procedures section {
    border: 1px solid #dfe7f1;
    border-radius: 18px;
    background: #f8fafc;
    padding: 18px;
}
.alarm-clean-box h3,
.alarm-clean-procedures h3 {
    margin: 0 0 10px 0;
    font-size: 20px;
    color: #0d1b2e;
}
.alarm-clean-box p,
.alarm-clean-procedures p {
    margin: 0;
    color: #233044;
    line-height: 1.55;
    white-space: normal;
}
.alarm-clean-red {
    background: #fff1f1;
    border-color: #ffc9c9;
}
.alarm-clean-wide { grid-column: 1 / -1; }
.alarm-phone-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 16px;
}
.alarm-clean-procedures {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
@media (max-width: 860px) {
    .alarm-clean-header,
    .alarm-clean-grid,
    .alarm-clean-procedures,
    .alarm-phone-list {
        grid-template-columns: 1fr;
        display: grid;
    }
    .alarm-clean-header { display: grid; }
    .alarm-clean-titleblock { display: grid; }
    .alarm-clean-logo { width: 100%; min-width: 0; }
    .alarm-clean-112 { min-width: 0; }
    .alarm-clean-header h2 { font-size: 30px; }
}
@media print {
    .alarm-clean-page {
        box-shadow: none;
        border: none;
        padding: 0;
        max-width: none;
    }
    .alarm-clean-header h2 { font-size: 28px; }
    .alarm-clean-112 strong { font-size: 36px; }
    .alarm-clean-box,
    .alarm-clean-procedures section {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}

/* V5.3.1: compact uitklapmenu + betere tablet/mobiel basis */
.side-nav-accordion {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-group {
    border: 1px solid rgba(255,255,255,.10);
    border-radius: 16px;
    background: rgba(255,255,255,.045);
    overflow: hidden;
}

.nav-group summary {
    list-style: none;
    cursor: pointer;
    color: #e8f1fb;
    padding: 12px 13px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    user-select: none;
}

.nav-group summary::-webkit-details-marker { display: none; }

.nav-group summary > span:first-child {
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-caret {
    transition: transform .18s ease;
    opacity: .8;
}

.nav-group[open] .nav-caret { transform: rotate(180deg); }

.nav-group-items {
    display: grid;
    gap: 6px;
    padding: 0 8px 10px;
}

.nav-group-items a {
    padding: 10px 11px;
    font-size: 14px;
    background: rgba(255,255,255,.035);
}

.side-nav-accordion a.nav-subitem {
    margin-left: 18px;
    padding: 9px 11px;
    font-size: 13px;
    opacity: .96;
}

@media (max-width: 980px) {
    .sidebar {
        position: sticky;
        top: 0;
        z-index: 20;
        border-radius: 0 0 22px 22px;
        max-height: 82vh;
    }

    .brand-card {
        min-height: 64px;
        margin-bottom: 12px;
        padding: 9px;
    }

    .brand-card img { max-height: 52px; }
    .side-nav-accordion { display: flex; grid-template-columns: none; }
    .nav-group summary, .side-nav a { min-height: 46px; }
    .top-actions, .actions { flex-wrap: wrap; }
    .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
}

@media (max-width: 640px) {
    .topbar { padding: 16px 14px; }
    .topbar h1 { font-size: 24px; }
    .card-header { align-items: flex-start; flex-direction: column; }
    .table-wrap, table { overflow-x: auto; display: block; width: 100%; }
    .grid-dashboard { grid-template-columns: 1fr; }
    input, select, textarea, button, .btn { font-size: 16px; }
}


/* V5.3.2: werkopnameformulier */
.asbestos-card {
    border: 2px solid rgba(245, 158, 11, .28);
}
.asbestos-alert {
    border-color: rgba(185, 28, 28, .45) !important;
    background: linear-gradient(135deg, rgba(254, 242, 242, .96), rgba(255,255,255,.98));
}
.asbestos-ok {
    border-color: rgba(22, 163, 74, .28) !important;
}
.asbestos-warning-box {
    margin: 14px 0;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fef2f2;
    color: #7f1d1d;
    border: 1px solid rgba(185, 28, 28, .28);
    font-weight: 700;
}
.badge-danger {
    background: #fee2e2;
    color: #991b1b;
    border-color: rgba(185,28,28,.25);
}
.checkline {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
    font-weight: 800;
}
.checkline input { width: auto; }
.attachment-row { margin-bottom: 12px; }
.attachment-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
}
.attachment-pill {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 12px;
    background: #fff;
    display: grid;
    gap: 6px;
}
.attachment-pill small { color: var(--muted); }
@media (max-width: 700px) {
    .filterbar { display: grid; grid-template-columns: 1fr; gap: 10px; }
    .work-intake-form textarea { min-height: 130px; }
}
@media print {
    .asbestos-warning-box { border: 2px solid #991b1b; }
}

/* V5.3.3 Meldingen */
.grid-4{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:16px}
.log-entry p{margin:6px 0 0}.check{display:flex;align-items:flex-start;gap:8px;margin:8px 0}.check input{margin-top:3px}.badge-danger{background:#fee2e2!important;color:#991b1b!important;border-color:#fecaca!important}
@media (max-width:900px){.grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:640px){.grid-4{grid-template-columns:1fr}.filterbar{display:grid;grid-template-columns:1fr}.table-wrap table{min-width:760px}}


/* V5.3.7 werkbonregels */
.table-responsive{width:100%;overflow-x:auto;}
.mini-table{width:100%;border-collapse:collapse;font-size:14px;}
.mini-table th,.mini-table td{border-bottom:1px solid #e5e7eb;padding:8px;text-align:left;vertical-align:top;}
.mini-table th{color:#64748b;font-weight:800;background:#f8fafc;}
.repeat-table input{width:100%;min-width:90px;border:1px solid #cbd5e1;border-radius:10px;padding:9px 10px;font:inherit;box-sizing:border-box;}
.repeat-table td:nth-child(7) input{min-width:180px;}
.repeat-table .btn-small{padding:7px 10px;border-radius:10px;min-width:auto;}
.total-hours-label{display:inline-flex;align-items:center;gap:6px;margin-left:10px;color:#0f172a;}
.photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(120px,1fr));gap:12px;margin-top:12px;}
.photo-grid a{display:block;border:1px solid #e5e7eb;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 8px 20px rgba(15,23,42,.08);}
.photo-grid img{display:block;width:100%;height:110px;object-fit:cover;}
@media (max-width: 760px){
  .repeat-table{min-width:760px;}
  .total-hours-label{margin-left:0;margin-top:8px;display:block;}
}

/* V5.3.10 - werkbonoverzicht rustiger */
.signal-cell { width: 38px; text-align: center; }
.unassigned-icon { display:inline-flex; align-items:center; justify-content:center; width:24px; height:24px; border-radius:999px; background:#fee2e2; color:#b91c1c; border:1px solid #fecaca; font-weight:800; line-height:1; }
.text-warning { color:#b45309; font-weight:700; }
.row-unassigned td { background: rgba(254, 226, 226, 0.22); }

/* V5.3.11 - veilige prullenbak werkbonnen */
.delete-link {
    border: 0;
    background: transparent;
    color: #b91c1c;
    font-weight: 800;
    font-size: 13px;
    padding: 4px 2px;
    box-shadow: none;
    cursor: pointer;
    text-decoration: none;
}
.delete-link:hover {
    text-decoration: underline;
    transform: none;
    box-shadow: none;
}
.btn-small {
    padding: 7px 11px;
    font-size: 13px;
    min-width: auto;
}
.btn-restore {
    background: #166534;
    color: #fff;
}
.ticket-row-actions {
    align-items: flex-start;
}
.trash-icon {
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:24px;
    height:24px;
    border-radius:999px;
    background:#f1f5f9;
    border:1px solid #cbd5e1;
    font-size:13px;
}
.notice-warning {
    background:#fff7ed;
    color:#9a3412;
    border-color:#fed7aa;
}
.notice-success {
    background:#ecfdf5;
    color:#166534;
    border-color:#bbf7d0;
}


/* V5.3.12 - mobiele layout + schets/foto bij werkopname */
.sketch-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:10px 0 12px}
.sketch-canvas{width:100%;max-width:100%;height:auto;border:2px dashed #cbd5e1;border-radius:16px;background:#fff;touch-action:none;display:block}
.sketch-toolbar .active{background:#0b2942;color:#fff}
.attachment-thumb{width:100%;height:150px;object-fit:cover;border-radius:12px;border:1px solid #e5e7eb;margin-bottom:8px;background:#fff}

@media (max-width: 980px){
  .app-shell{display:block;min-height:100vh}
  .sidebar{position:relative;top:auto;width:100%;height:auto;max-height:none;padding:10px 10px 12px;border-radius:0 0 18px 18px;box-shadow:0 8px 18px rgba(15,23,42,.12)}
  .brand-card{min-height:48px;margin-bottom:8px;padding:6px;border-radius:14px}
  .brand-card img{max-height:42px;width:auto;max-width:180px}
  .side-nav-accordion{display:grid;gap:6px}
  .side-nav-accordion > a:not(:first-child), .side-nav-accordion > details{margin-top:0}
  .nav-group:not([open]) .nav-group-items{display:none}
  .topbar{position:relative;top:auto;display:block;padding:14px 14px}
  .topbar h1{font-size:22px}
  .top-actions{margin-top:10px}
  .content{padding:16px 10px 55px}
  .card,.card-soft{padding:16px;border-radius:16px}
}

@media (max-width: 700px){
  .grid,.grid-2,.grid-3,.grid-4,.row-3,.row-4{grid-template-columns:1fr!important}
  .actions,.top-actions{display:grid;grid-template-columns:1fr;align-items:stretch}
  .actions .btn,.actions button,.top-actions .btn{width:100%}
  .photo-grid{grid-template-columns:repeat(2,minmax(0,1fr))}

  /* Werkbon: uren en materiaal als kaartjes i.p.v. brede tabel */
  #hourRows,#materialRows,#hourRows tbody,#materialRows tbody,#hourRows tr,#materialRows tr,#hourRows td,#materialRows td{display:block;width:100%}
  #hourRows thead,#materialRows thead{display:none}
  .table-responsive{overflow-x:visible}
  .repeat-table{min-width:0!important;border-collapse:separate;border-spacing:0 12px;background:transparent}
  .repeat-table tr{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px;margin-bottom:12px;box-shadow:0 6px 15px rgba(15,23,42,.05)}
  .repeat-table td{border:0!important;padding:5px 0!important}
  .repeat-table td:before{display:block;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.04em;margin:0 0 4px}
  #hourRows td:nth-child(1):before{content:'Datum'}
  #hourRows td:nth-child(2):before{content:'Medewerker'}
  #hourRows td:nth-child(3):before{content:'Start'}
  #hourRows td:nth-child(4):before{content:'Eind'}
  #hourRows td:nth-child(5):before{content:'Pauze min.'}
  #hourRows td:nth-child(6):before{content:'Totaal'}
  #hourRows td:nth-child(7):before{content:'Omschrijving'}
  #materialRows td:nth-child(1):before{content:'Aantal'}
  #materialRows td:nth-child(2):before{content:'Eenheid'}
  #materialRows td:nth-child(3):before{content:'Materiaal'}
  #materialRows td:nth-child(4):before{content:'Leverancier'}
  #materialRows td:nth-child(5):before{content:'Opmerking'}
  .repeat-table .row-total{font-size:18px;font-weight:900;color:#0f172a;background:#f8fafc;border-radius:12px;padding:10px!important}
  .repeat-table .btn-small{width:100%;margin-top:4px}

  /* Werkplekinspectie: checklist en actiepunten mobiel als blokken */
  .section-card .table-wrap{overflow-x:visible;border:0;border-radius:0}
  .section-card table,.section-card tbody,.section-card tr,.section-card td{display:block;width:100%}
  .section-card thead{display:none}
  .section-card tr{background:#fff;border:1px solid #e2e8f0;border-radius:16px;padding:12px;margin-bottom:12px;box-shadow:0 6px 15px rgba(15,23,42,.05)}
  .section-card td{border:0!important;padding:5px 0!important}
  .section-card td:nth-child(1):before{content:'Nr.';display:block;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;margin-bottom:4px}
  .section-card td:nth-child(2):before{content:'Onderwerp';display:block;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;margin-bottom:4px}
  .section-card td:nth-child(3):before{content:'Antwoord';display:block;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;margin-bottom:4px}
  .section-card td:nth-child(4):before{content:'Toelichting';display:block;color:#64748b;font-size:12px;font-weight:900;text-transform:uppercase;margin-bottom:4px}
  .sketch-canvas{height:auto;min-height:260px}
}

/* V5.3.13 - meerdere tekenblokken bij werkopname */
.sketch-blocks{display:grid;gap:18px;margin-top:12px}
.sketch-block{border:1px solid #e2e8f0;background:#f8fafc;border-radius:18px;padding:14px}
.sketch-block .sketch-canvas{background:#fff}
.sketch-actions{margin-top:14px}
@media (max-width:700px){
  .sketch-block{padding:12px;border-radius:16px}
  .sketch-toolbar{display:grid;grid-template-columns:1fr 1fr;gap:8px}
  .sketch-toolbar .btn,.sketch-toolbar label.btn{width:100%;text-align:center;justify-content:center}
}

/* V5.3.16 - veilige foto-/bijlage-opslag */
.bs-safe-upload-wrap input[type="file"]{display:block;margin-top:6px;}
.bs-safe-upload-list{display:grid;gap:8px;margin-top:10px;}
.bs-safe-upload-row{display:flex;justify-content:space-between;gap:12px;align-items:center;padding:9px 11px;border-radius:10px;border:1px solid #dbe3ef;background:#f8fafc;font-size:14px;}
.bs-safe-upload-name{font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.bs-safe-upload-state{font-size:13px;color:#475569;white-space:nowrap;}
.bs-safe-upload-row.is-uploading{background:#fff7ed;border-color:#fed7aa;}
.bs-safe-upload-row.is-ok{background:#ecfdf5;border-color:#bbf7d0;}
.bs-safe-upload-row.is-ok .bs-safe-upload-state{color:#166534;font-weight:700;}
.bs-safe-upload-row.is-error{background:#fef2f2;border-color:#fecaca;}
.bs-safe-upload-row.is-error .bs-safe-upload-state{color:#991b1b;font-weight:700;}
.bs-safe-upload-help{display:block;margin-top:6px;color:#64748b;font-size:13px;}

/* V5.3.17 praktijkfix: veilige foto-opslag + uitbreidbare fotovelden */
.bs-safe-upload-wrap { display: grid; gap: 10px; }
.bs-safe-upload-wrap input[type="file"].bs-safe-upload { width: 100%; }
.bs-safe-upload-wrap input[type="file"].bs-safe-upload-chosen { opacity: .72; }
.bs-safe-upload-add { justify-self: start; margin-top: 2px; }
.bs-safe-upload-list { display: grid; gap: 6px; margin-top: 4px; }
.bs-safe-upload-row { display: flex; justify-content: space-between; gap: 10px; align-items: center; border: 1px solid #e5e7eb; background: #fff; border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.bs-safe-upload-name { font-weight: 600; overflow-wrap: anywhere; }
.bs-safe-upload-state { color: #4b5563; text-align: right; }
.bs-safe-upload-row.is-ok { border-color: #bbf7d0; background: #f0fdf4; }
.bs-safe-upload-row.is-error { border-color: #fecaca; background: #fef2f2; }
.bs-safe-upload-row.is-warning { border-color: #fde68a; background: #fffbeb; }
.bs-safe-upload-row.is-uploading { border-color: #bfdbfe; background: #eff6ff; }
@media (max-width: 700px) { .bs-safe-upload-row { display: block; } .bs-safe-upload-state { display:block; text-align:left; margin-top: 4px; } }


/* V5.3.22 - kleine verwijderknop werkopnames zichtbaar voor admin/super_admin */
.delete-link-small {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    line-height: 1.1;
    color: #b91c1c;
    background: transparent;
    border: 0;
    padding: 3px 2px;
    min-width: auto;
    white-space: nowrap;
}
.work-intake-actions {
    align-items: flex-start;
}

/* V5.3.23 - prullenbakknop overal gelijk */
.table-actions .delete-link-small,
.actions .delete-link-small,
.toolbox-row-actions .delete-link-small {
    margin-top: 2px;
}
.inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

/* V5.3.23 - prullenbakknop overal gelijk */
.table-actions .delete-link-small,
.actions .delete-link-small,
.toolbox-row-actions .delete-link-small {
    margin-top: 2px;
}
.inline-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}

/* V5.3.24: duidelijk vinkje bij handmatig concept opslaan */
button.autosave-button-saved,
.btn.autosave-button-saved {
    background: #047857 !important;
    border-color: #047857 !important;
    color: #ffffff !important;
}

/* Bouwslim V5.3.27 - visuele opslagcontrole voor formulieren */
.btn.is-saving,
button.is-saving,
input[type="submit"].is-saving {
    background: #16a34a !important;
    border-color: #16a34a !important;
    color: #fff !important;
    box-shadow: 0 10px 24px rgba(22, 163, 74, .22);
    cursor: wait;
}

.btn.is-saved,
button.is-saved,
input[type="submit"].is-saved {
    background: #15803d !important;
    border-color: #15803d !important;
    color: #fff !important;
}

.btn.is-failed,
button.is-failed,
input[type="submit"].is-failed {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    color: #fff !important;
}

.bouwslim-save-feedback-status {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    margin-left: 10px;
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    vertical-align: middle;
}

.bouwslim-save-feedback-status.saving {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.bouwslim-save-feedback-status.failed {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.bouwslim-page-save-flash {
    margin: 0 0 18px 0;
    padding: 12px 16px;
    border-radius: 14px;
    font-weight: 900;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
    transition: opacity .6s ease, transform .6s ease;
}

.bouwslim-page-save-flash.saved,
.bouwslim-page-save-flash.restored {
    color: #166534;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
}

.bouwslim-page-save-flash.deleted {
    color: #7f1d1d;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.bouwslim-page-save-flash.failed {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fecaca;
}

.bouwslim-page-save-flash.fade-out {
    opacity: 0;
    transform: translateY(-6px);
}

@media (max-width: 720px) {
    .bouwslim-save-feedback-status {
        display: flex;
        width: fit-content;
        margin: 10px 0 0 0;
    }
}

/* V5.3.28 - meldingenbalk / notificaties */
.top-actions-with-notifications {
    align-items: center;
}
.notification-center {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-right: 6px;
}
.notification-bell {
    position: relative;
    border: 1px solid rgba(15, 23, 42, 0.12);
    background: #fff;
    border-radius: 999px;
    min-width: 42px;
    height: 42px;
    padding: 0 12px;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.08);
}
.notification-bell:hover {
    transform: translateY(-1px);
}
.notification-bell-icon {
    font-size: 18px;
    line-height: 1;
}
.notification-badge {
    position: absolute;
    top: -7px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #16a34a;
    color: #fff;
    font-size: 12px;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(22, 163, 74, 0.35);
}
.notification-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 40;
    width: min(380px, calc(100vw - 32px));
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 18px;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}
.notification-dropdown-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.notification-mark-read {
    border: 0;
    background: #eef2ff;
    color: #1e40af;
    border-radius: 999px;
    padding: 7px 10px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}
.notification-list {
    max-height: 360px;
    overflow: auto;
}
.notification-item {
    display: block;
    padding: 13px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
}
.notification-item:hover {
    background: #f8fafc;
}
.notification-item-title {
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}
.notification-item-body,
.notification-item-time,
.notification-empty {
    color: #64748b;
    font-size: 13px;
}
.notification-empty {
    padding: 18px 16px;
}
.bouwslim-toast-notification {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 1000;
    max-width: min(420px, calc(100vw - 44px));
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    border-radius: 16px;
    padding: 14px 16px;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .2s ease, transform .2s ease;
    font-weight: 800;
}
.bouwslim-toast-notification.is-visible {
    opacity: 1;
    transform: translateY(0);
}
@media (max-width: 760px) {
    .top-actions-with-notifications {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    .notification-dropdown {
        right: auto;
        left: 0;
    }
}

/* Bouwslim V5.3.30 - Notitieblad */
.notes-layout {
    display: grid;
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 18px;
    align-items: start;
}
.note-form-card textarea {
    min-height: 180px;
    resize: vertical;
}
.notes-list {
    display: grid;
    gap: 14px;
}
.note-card {
    border-left: 4px solid rgba(15, 118, 110, 0.18);
}
.note-card.is-pinned {
    border-left-color: #0f766e;
}
.note-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}
.note-head h3 {
    margin: 0 0 4px 0;
}
.note-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.note-actions form {
    margin: 0;
}
.note-content {
    margin-top: 14px;
    line-height: 1.55;
    white-space: normal;
}
@media (max-width: 900px) {
    .notes-layout {
        grid-template-columns: 1fr;
    }
    .note-head {
        flex-direction: column;
    }
    .note-actions {
        justify-content: flex-start;
    }
}

/* V5.3.31 - slimmere meldingen */
.notification-head-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}
.notification-head-actions a {
    color: #0f766e;
    text-decoration: none;
    font-weight: 700;
}
.notification-item {
    display: block;
    padding: 12px;
    border-bottom: 1px solid #e5e7eb;
    color: inherit;
    text-decoration: none;
    background: #fff;
}
.notification-item:hover {
    background: #f8fafc;
}
.notification-item-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.notification-item-icon {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    flex: 0 0 28px;
}
.notification-item-main {
    min-width: 0;
    flex: 1;
}
.notification-item-meta {
    font-size: 11px;
    font-weight: 800;
    color: #0f766e;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: 2px;
}
.notification-item-actions {
    margin-top: 8px;
    padding-left: 38px;
}
.notification-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: #0f766e;
    color: #fff !important;
    font-weight: 800;
    font-size: 12px;
    text-decoration: none;
}
.notification-page-head .card-header {
    align-items: flex-start;
}
.notification-summary-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.stat-card.small {
    min-width: 150px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #f8fafc;
}
.stat-card.small strong {
    display: block;
    font-size: 26px;
    line-height: 1;
    color: #0f766e;
}
.stat-card.small span {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
}
.notification-page-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.notification-page-item {
    display: flex;
    gap: 14px;
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    background: #fff;
}
.notification-page-item.is-unread {
    border-color: #99f6e4;
    background: #f0fdfa;
}
.notification-page-item.is-read {
    opacity: .82;
}
.notification-page-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ecfdf5;
    font-size: 20px;
    flex: 0 0 42px;
}
.notification-page-content {
    min-width: 0;
    flex: 1;
}
.notification-page-meta {
    color: #64748b;
    font-size: 12px;
    margin-bottom: 4px;
}
.notification-page-content h3 {
    margin: 0 0 4px;
    font-size: 16px;
}
.notification-page-content p {
    margin: 0 0 10px;
    color: #475569;
}
.notification-page-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.notification-day-heading {
    margin: 18px 0 2px;
    font-size: 15px;
    color: #0f172a;
}
.inline-form {
    display: inline-flex;
    margin: 0;
}
.btn-sm {
    padding: 7px 10px;
    font-size: 12px;
}
@media (max-width: 720px) {
    .notification-head-actions { align-items: flex-end; flex-direction: column; gap: 6px; }
    .notification-page-item { padding: 12px; gap: 10px; }
    .notification-page-icon { width: 34px; height: 34px; flex-basis: 34px; }
}

/* V5.3.39 - Werkbon medewerker terugkoppeling simpeler */
.note-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 14px;
    line-height: 1.5;
}
.simple-feedback-actions {
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* V5.3.42 - Werkbonnen ter controle duidelijker zichtbaar */
.row-review {
  background: #fff8e7;
}
.row-review td {
  border-top-color: #f5d58a;
}
.badge-review,
.badge-ter-controle {
  background: #fff0bf !important;
  color: #8a5a00 !important;
}


/* V5.3.61 - Werkbon status rustiger + foto's plakken */
.readonly-status {
    min-height: 42px;
    display: flex;
    align-items: center;
}
.ticket-feedback-block {
    border-color: #bfdbfe;
    background: #f8fbff;
}
.bs-paste-upload-zone {
    margin-top: 10px;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    cursor: pointer;
    outline: none;
    display: grid;
    gap: 3px;
}
.bs-paste-upload-zone strong {
    color: #0f172a;
}
.bs-paste-upload-zone span {
    color: #64748b;
    font-size: 13px;
}
.bs-paste-upload-zone:focus,
.bs-paste-upload-zone:hover {
    border-color: #3b82f6;
    background: #eff6ff;
}
.bs-paste-upload-zone.is-uploading {
    border-color: #f59e0b;
    background: #fffbeb;
}
.bs-paste-upload-zone.is-ok {
    border-color: #22c55e;
    background: #f0fdf4;
}
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 12px;
}
.pagination-links {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.pagination-link,
.pagination-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    padding: 7px 10px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #fff;
    text-decoration: none;
}
.pagination-current {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}


/* V5.5.6 - simpel vinkje voor delen met klant/opdrachtgever in overzichten */
.customer-share-form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.customer-share-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 12px;
    color: #475569;
    white-space: nowrap;
}
.customer-share-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2563eb;
}
.customer-share-check span {
    line-height: 1;
}


/* V5.5.10 - klantportaal premium opschoning */
.customer-clean-body {
    background:
        radial-gradient(circle at 18% 0%, rgba(21,148,71,.10), transparent 340px),
        radial-gradient(circle at 90% 0%, rgba(37,99,235,.10), transparent 360px),
        linear-gradient(180deg, #f8fafc 0%, #edf3f8 100%);
}
.customer-clean-body .content {
    max-width: 1180px;
    margin: 0 auto;
}
.customer-clean-body .topbar {
    border-bottom: 1px solid rgba(203,213,225,.72);
    background: rgba(255,255,255,.88);
}
.customer-clean-body .app-copyright,
.customer-clean-body footer:not(.pdf-footer) {
    display: none !important;
}
.customer-page-hero {
    background: linear-gradient(135deg, #08243b 0%, #0b3557 55%, #159447 125%);
    color: #fff;
    border: 0;
    border-radius: 28px;
    padding: 30px;
    margin-bottom: 22px;
    box-shadow: 0 22px 55px rgba(8,36,59,.20);
    display: flex;
    justify-content: space-between;
    gap: 22px;
    align-items: center;
    overflow: hidden;
    position: relative;
}
.customer-page-hero::after {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -90px;
    top: -105px;
    border-radius: 999px;
    background: rgba(255,255,255,.10);
}
.customer-page-hero > * { position: relative; z-index: 1; }
.customer-page-hero h1 {
    margin: 0 0 8px;
    color: #fff;
    letter-spacing: -.03em;
}
.customer-page-hero p { margin: 0; color: rgba(255,255,255,.84); font-size: 16px; }
.customer-page-hero small { color: rgba(255,255,255,.72); display: block; margin-top: 10px; }
.customer-page-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(132px, 1fr));
    gap: 12px;
}
.customer-page-stat {
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: 18px;
    padding: 14px 16px;
    backdrop-filter: blur(6px);
    color: rgba(255,255,255,.86);
}
.customer-page-stat strong {
    display: block;
    color: #fff;
    font-size: 28px;
    line-height: 1;
    margin-bottom: 6px;
}
.customer-section-card {
    border: 1px solid rgba(219,227,238,.95);
    border-radius: 26px;
    background: rgba(255,255,255,.96);
    box-shadow: 0 18px 45px rgba(15,23,42,.07);
    padding: 26px;
    margin-bottom: 22px;
}
.customer-section-card .card-header h2 {
    letter-spacing: -.02em;
}
.customer-section-card .card-header p {
    font-size: 15px;
}
.customer-document-card {
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    padding: 18px;
    background: linear-gradient(180deg, #fff 0%, #fbfdff 100%);
    box-shadow: 0 10px 28px rgba(15,23,42,.055);
    margin: 14px 0;
}
.customer-document-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.customer-document-top h3 {
    margin: 0;
    color: #123a5a;
    font-size: 20px;
    letter-spacing: -.02em;
}
.customer-document-top p {
    margin: 7px 0 0;
    color: #475569;
}
.customer-document-meta {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    margin-top: 16px;
}
.customer-document-meta div,
.customer-detail-meta div {
    background: #f7fafc;
    border: 1px solid #edf2f7;
    border-radius: 16px;
    padding: 12px 14px;
}
.customer-document-meta small,
.customer-detail-meta small {
    color: #64748b;
    font-weight: 800;
}
.customer-document-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.customer-clean-body .btn {
    border-radius: 999px;
    padding: 12px 18px;
}
.customer-clean-body .btn:not(.btn-light) {
    background: #0b2942;
    box-shadow: 0 12px 24px rgba(11,41,66,.18);
}
.customer-clean-body .btn-light {
    background: #fff;
    border: 1px solid #d7e1ee;
}
.customer-clean-body .badge {
    background: #e8eef6;
    color: #123a5a;
    border: 1px solid #dbe5f0;
    padding: 7px 13px;
}
.customer-detail-hero {
    border-radius: 28px;
    padding: 26px;
    background: linear-gradient(135deg,#ffffff 0%,#f8fbff 100%);
    border: 1px solid #dbe6f2;
    box-shadow: 0 18px 45px rgba(15,23,42,.08);
    margin-bottom: 20px;
}
.customer-detail-title {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    flex-wrap: wrap;
}
.customer-detail-title h2 {
    margin: 0;
    color: #0b2942;
    letter-spacing: -.03em;
}
.customer-detail-title p {
    margin: 7px 0 0;
    color: #64748b;
}
.customer-detail-meta {
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 12px;
    margin-top: 18px;
}
.customer-clean-body .customer-content-card {
    border-radius: 24px;
    border: 1px solid #dfe8f2;
    box-shadow: 0 14px 36px rgba(15,23,42,.06);
}
@media(max-width:900px){
    .customer-page-hero { flex-direction: column; align-items: flex-start; padding: 24px; }
    .customer-page-stats { width: 100%; }
    .customer-document-meta, .customer-detail-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media(max-width:640px){
    .customer-document-top { flex-direction: column; }
    .customer-document-meta, .customer-detail-meta, .customer-page-stats { grid-template-columns: 1fr; }
}


/* V5.5.11 - Klantenkaart */
.customer-admin-hero {
    background: linear-gradient(135deg,#0b2942 0%,#123a5a 58%,#159447 130%);
    color: white;
    border-radius: 28px;
    padding: 28px;
    margin-bottom: 22px;
    box-shadow: 0 22px 50px rgba(11,41,66,.18);
    display: flex;
    justify-content: space-between;
    gap: 20px;
    align-items: center;
}
.customer-admin-hero h2 { color: white; margin: 0 0 8px; letter-spacing: -.03em; }
.customer-admin-hero p { color: rgba(255,255,255,.80); margin: 0; }
.customer-admin-hero .btn { background: white; color: #0b2942; box-shadow: none; }
.customer-card-row {
    display: grid;
    grid-template-columns: 76px 1.4fr .9fr .7fr .8fr;
    gap: 14px;
    align-items: center;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: linear-gradient(180deg,#fff 0%,#fbfdff 100%);
    box-shadow: 0 10px 25px rgba(15,23,42,.04);
    margin-bottom: 12px;
}
.customer-logo-thumb {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    border: 1px solid #dbe6f2;
    background: #f8fafc;
    display: grid;
    place-items: center;
    overflow: hidden;
    color: #0b2942;
    font-weight: 900;
}
.customer-logo-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 6px; background: white; }
.customer-logo-large {
    width: 128px;
    height: 128px;
    border-radius: 26px;
    border: 1px solid #dbe6f2;
    background: white;
    display: grid;
    place-items: center;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15,23,42,.06);
}
.customer-logo-large img { width: 100%; height: 100%; object-fit: contain; padding: 10px; }
.customer-logo-large span { font-size: 32px; font-weight: 900; color: #0b2942; }
.customer-profile-hero {
    display: flex;
    gap: 22px;
    align-items: center;
    background: linear-gradient(135deg,#fff 0%,#f8fbff 100%);
    border: 1px solid #dfe8f2;
    border-radius: 30px;
    padding: 24px;
    box-shadow: 0 18px 45px rgba(15,23,42,.07);
    margin-bottom: 20px;
}
.customer-profile-hero h2 { margin: 0 0 8px; color: #0b2942; letter-spacing: -.03em; }
.customer-profile-hero p { margin: 4px 0; color: #475569; }
.customer-profile-actions { margin-left: auto; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.location-card {
    border: 1px solid #dfe8f2;
    border-radius: 22px;
    padding: 18px;
    background: white;
    box-shadow: 0 10px 25px rgba(15,23,42,.045);
    margin-bottom: 14px;
}
.location-card h3 { margin: 0 0 6px; color: #123a5a; }
.location-meta {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 12px;
    margin: 14px 0;
}
.location-meta div { background: #f8fafc; border: 1px solid #edf2f7; border-radius: 14px; padding: 11px 12px; }
.location-meta small { color: #64748b; font-weight: 800; }
.logo-upload-box {
    border: 1px dashed #cbd5e1;
    background: #f8fafc;
    border-radius: 18px;
    padding: 16px;
}
@media(max-width:980px){
    .customer-card-row { grid-template-columns: 64px 1fr; }
    .customer-card-row > div:nth-child(n+3) { grid-column: 2; }
    .customer-profile-hero { flex-direction: column; align-items: flex-start; }
    .customer-profile-actions { margin-left: 0; justify-content: flex-start; }
    .location-meta { grid-template-columns: 1fr; }
}


/* V5.5.18 - nette checkbox-regels klantenkaart */
.clean-check {
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 14px 0 0;
    padding: 10px 12px;
    border: 1px solid #dbe6f2;
    border-radius: 14px;
    background: #f8fafc;
    color: #0f172a;
    font-weight: 900;
    line-height: 1.2;
    cursor: pointer;
}
.clean-check input {
    width: 18px;
    height: 18px;
    margin: 0;
    flex: 0 0 auto;
    accent-color: #159447;
}
.clean-check span {
    display: inline-block;
}
.logo-upload-box + .clean-check {
    margin-top: 14px;
}
.logo-upload-box {
    margin-bottom: 2px;
}


/* V5.5.19 - klantportaal compact overzicht */
.customer-portal-toolbar {
    margin-bottom: 14px;
}
.customer-portal-search {
    display: grid;
    grid-template-columns: 1fr 170px auto auto;
    gap: 10px;
    align-items: center;
    background: rgba(255,255,255,.96);
    border: 1px solid #dbe6f2;
    border-radius: 22px;
    padding: 14px;
    box-shadow: 0 12px 30px rgba(15,23,42,.055);
}
.customer-portal-tabs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 18px;
}
.customer-portal-tabs a {
    text-decoration: none;
    border: 1px solid #dbe6f2;
    background: #fff;
    color: #0b2942;
    border-radius: 999px;
    padding: 10px 14px;
    font-weight: 900;
    box-shadow: 0 8px 20px rgba(15,23,42,.045);
}
.customer-portal-tabs a.active {
    background: #0b2942;
    color: white;
    border-color: #0b2942;
}
.customer-document-list {
    display: grid;
    gap: 10px;
}
.customer-document-head,
.customer-document-line {
    display: grid;
    grid-template-columns: minmax(260px, 1.5fr) 110px 130px 150px 180px;
    gap: 12px;
    align-items: center;
}
.customer-document-head {
    padding: 0 14px 6px;
    color: #64748b;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .06em;
    font-weight: 900;
}
.customer-document-line {
    background: linear-gradient(180deg,#fff 0%,#fbfdff 100%);
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    padding: 14px;
    box-shadow: 0 8px 22px rgba(15,23,42,.04);
}
.customer-document-line strong {
    display: block;
    color: #123a5a;
}
.customer-document-line small {
    display: block;
    color: #64748b;
    margin-top: 4px;
}
.customer-document-actions.compact {
    margin-top: 0;
    justify-content: flex-end;
}
.customer-document-actions.compact .btn {
    padding: 9px 12px;
    font-size: 13px;
}
@media(max-width:980px){
    .customer-portal-search { grid-template-columns: 1fr; }
    .customer-document-head { display:none; }
    .customer-document-line { grid-template-columns: 1fr; }
    .customer-document-actions.compact { justify-content: flex-start; }
}


/* V5.5.20 - klantportaalbeheer vanuit klantenkaart */
.customer-portal-admin-card {
    border: 1px solid #dbeafe;
    background: linear-gradient(180deg,#ffffff 0%,#f8fbff 100%);
}
.invite-link-box input {
    font-family: monospace;
    font-size: 13px;
}


/* V5.5.23 - klantwachtwoord handmatig instellen */
.customer-password-panel {
    margin-top: 16px;
    border: 1px solid #dbe6f2;
    border-radius: 18px;
    background: #f8fafc;
    padding: 14px;
}
.customer-password-panel summary {
    cursor: pointer;
    font-weight: 900;
    color: #0b2942;
}
.customer-password-panel form {
    margin-top: 14px;
}
