/* ==========================================================================
   HomeWork - Frontend Styles
   ========================================================================== */

:root {
    --wo-primary: #2563eb;
    --wo-primary-dark: #1d4ed8;
    --wo-primary-light: #dbeafe;
    --wo-success: #16a34a;
    --wo-success-light: #dcfce7;
    --wo-warning: #d97706;
    --wo-warning-light: #fef3c7;
    --wo-danger: #dc2626;
    --wo-danger-light: #fee2e2;
    --wo-gray-50: #f9fafb;
    --wo-gray-100: #f3f4f6;
    --wo-gray-200: #e5e7eb;
    --wo-gray-300: #d1d5db;
    --wo-gray-500: #6b7280;
    --wo-gray-700: #374151;
    --wo-gray-900: #111827;
    --wo-radius: 8px;
    --wo-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --wo-shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
}

/* Dashboard Layout */
.wo-dashboard {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--wo-gray-900);
}

/* Navigation */
/* Navigation Tiles */
.wo-nav-tiles {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    background: transparent;
    padding: 0;
    margin-bottom: 24px;
}

.wo-nav-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 20px 12px;
    border: 1px solid var(--wo-gray-200, #e2e8f0);
    background: #fff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: var(--wo-gray-500, #64748b);
}

.wo-nav-tile:hover {
    border-color: var(--wo-primary, #2563eb);
    color: var(--wo-primary, #2563eb);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.1);
}

.wo-nav-tile.active {
    background: var(--wo-primary, #2563eb);
    border-color: var(--wo-primary, #2563eb);
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.wo-nav-tile-icon.dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

.wo-nav-tile-label {
    font-size: 12px;
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.wo-nav-tile-logout {
    border-style: dashed;
    color: var(--wo-gray-400, #94a3b8);
}
.wo-nav-tile-logout:hover {
    border-color: #dc2626;
    color: #dc2626;
    background: #fef2f2;
    box-shadow: none;
}

/* Back to tiles button */
.wo-nav-back {
    display: none;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-bottom: 16px;
    border: none;
    background: var(--wo-gray-100, #f1f5f9);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: var(--wo-primary, #2563eb);
    transition: all 0.2s;
}
.wo-nav-back:hover {
    background: var(--wo-gray-200, #e2e8f0);
}
.wo-nav-back .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Tabs */
.wo-tab {
    display: none;
}

.wo-tab.active {
    display: block;
}

.wo-tab h2 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--wo-gray-900);
}

.wo-subtitle {
    color: var(--wo-gray-500);
    margin-bottom: 20px;
}

/* Stats Row */
.wo-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.wo-stat-card {
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--wo-shadow);
}

.wo-stat-icon {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--wo-primary);
    margin-bottom: 8px;
}

.wo-stat-number {
    font-size: 32px;
    font-weight: 700;
    color: var(--wo-gray-900);
    line-height: 1;
}

.wo-stat-label {
    font-size: 13px;
    color: var(--wo-gray-500);
    margin-top: 4px;
}

/* Cards Grid (Woningen) */
.wo-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 16px;
}

.wo-woning-card {
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    padding: 20px;
    box-shadow: var(--wo-shadow);
    cursor: pointer;
    transition: all 0.2s;
}

.wo-woning-card:hover {
    box-shadow: var(--wo-shadow-md);
    border-color: var(--wo-primary);
}

.wo-woning-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 4px 0;
    color: var(--wo-gray-900);
}

.wo-woning-card .wo-woning-meta {
    font-size: 13px;
    color: var(--wo-gray-500);
    margin-bottom: 12px;
}

.wo-woning-card .wo-woning-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.wo-woning-card .wo-woning-stats span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.wo-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.wo-badge-success { background: var(--wo-success-light); color: var(--wo-success); }
.wo-badge-warning { background: var(--wo-warning-light); color: var(--wo-warning); }
.wo-badge-danger { background: var(--wo-danger-light); color: var(--wo-danger); }

/* Woning Detail */
.wo-woning-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
}

.wo-woning-header h2 {
    margin: 0;
}

.wo-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 13px;
    color: var(--wo-gray-500);
    cursor: pointer;
    border: 1px solid var(--wo-gray-300);
    border-radius: 6px;
    background: #fff;
}

.wo-back-btn:hover {
    color: var(--wo-gray-700);
    border-color: var(--wo-gray-500);
}

.wo-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
    background: var(--wo-gray-50);
    padding: 16px;
    border-radius: var(--wo-radius);
}

.wo-detail-item label {
    display: block;
    font-size: 12px;
    color: var(--wo-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.wo-detail-item span {
    font-size: 15px;
    font-weight: 500;
    color: var(--wo-gray-900);
}

/* Componenten tabel */
.wo-componenten-section {
    margin-top: 24px;
}

.wo-componenten-section h3 {
    font-size: 18px;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wo-comp-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    overflow: hidden;
}

.wo-comp-table th {
    background: var(--wo-gray-50);
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--wo-gray-500);
    text-align: left;
    border-bottom: 1px solid var(--wo-gray-200);
}

.wo-comp-table td {
    padding: 12px 14px;
    font-size: 14px;
    border-bottom: 1px solid var(--wo-gray-100);
}

.wo-comp-table tr:last-child td {
    border-bottom: none;
}

.wo-comp-status {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: 6px;
}

.wo-comp-status-goed { background: var(--wo-success); }
.wo-comp-status-gepland { background: #22d3ee; }
.wo-comp-status-binnenkort { background: var(--wo-warning); }
.wo-comp-status-achterstallig { background: var(--wo-danger); }
.wo-comp-status-onbekend { background: var(--wo-gray-300); }

/* Componenten Form - Tabbed Layout */
.wo-comp-overview {
    margin-bottom: 16px;
}
.wo-comp-overview-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--wo-gray-50);
    padding: 10px 16px;
    border-radius: var(--wo-radius);
    border: 1px solid var(--wo-gray-200);
}
.wo-comp-overview-label {
    color: var(--wo-gray-500);
    font-size: 14px;
}
.wo-comp-overview-count {
    font-size: 14px;
    color: var(--wo-gray-700);
}
.wo-comp-overview-count strong {
    font-size: 18px;
    color: var(--wo-primary);
}

/* Category Tabs */
.wo-comp-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
}
.wo-comp-tabs::-webkit-scrollbar { display: none; }

.wo-comp-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 10px 14px;
    background: #fff;
    border: 2px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    cursor: pointer;
    transition: all 0.2s;
    min-width: 90px;
    flex: 1;
    font-family: inherit;
}
.wo-comp-tab:hover {
    border-color: var(--wo-primary);
    background: var(--wo-primary-light);
}
.wo-comp-tab.active {
    border-color: var(--wo-primary);
    background: var(--wo-primary-light);
    box-shadow: 0 0 0 1px var(--wo-primary);
}
.wo-comp-tab-icon {
    font-size: 20px;
    line-height: 1;
}
.wo-comp-tab-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--wo-gray-700);
    white-space: nowrap;
}
.wo-comp-tab-count {
    font-size: 11px;
    color: var(--wo-gray-500);
    background: var(--wo-gray-100);
    padding: 1px 6px;
    border-radius: 10px;
}
.wo-comp-tab.active .wo-comp-tab-count {
    background: var(--wo-primary);
    color: #fff;
}

/* Category Panels */
.wo-comp-panel {
    animation: wo-fadeIn 0.15s ease;
}
@keyframes wo-fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}
.wo-comp-panel-header {
    display: flex;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--wo-gray-100);
}
.wo-comp-panel-header h4 {
    margin: 0;
    font-size: 16px;
    color: var(--wo-gray-900);
}
.wo-comp-panel-hint {
    font-size: 13px;
    color: var(--wo-gray-500);
}

/* Legacy accordion (kept for backward compat) */
.wo-comp-category { margin-bottom: 16px; }
.wo-comp-category-header { display: none; }
.wo-comp-category-body { display: block; padding-top: 10px; }

.wo-comp-item {
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    margin-bottom: 10px;
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wo-comp-item.wo-comp-active {
    border-color: var(--wo-primary);
    box-shadow: 0 0 0 2px var(--wo-primary-light);
}

.wo-comp-item-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    cursor: pointer;
    gap: 12px;
    -webkit-tap-highlight-color: transparent;
    min-height: 52px;
}

.wo-comp-item-header label {
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    flex: 1;
    line-height: 1.3;
}

.wo-comp-item-header small {
    display: none;
}

/* Toggle switch i.p.v. checkbox */
.wo-comp-toggle {
    position: relative;
    width: 52px;
    height: 30px;
    flex-shrink: 0;
}

.wo-comp-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.wo-comp-toggle-track {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--wo-gray-200);
    border-radius: 15px;
    transition: background 0.2s;
    cursor: pointer;
}

.wo-comp-toggle-track::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 24px;
    height: 24px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
    transition: transform 0.2s;
}

.wo-comp-toggle input:checked + .wo-comp-toggle-track {
    background: var(--wo-primary);
}

.wo-comp-toggle input:checked + .wo-comp-toggle-track::after {
    transform: translateX(22px);
}

/* Staat knoppen i.p.v. dropdown */
.wo-staat-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wo-staat-btn {
    flex: 1;
    min-width: 0;
    padding: 10px 6px;
    border: 2px solid var(--wo-gray-200);
    border-radius: 6px;
    background: #fff;
    text-align: center;
    font-family: inherit;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    -webkit-tap-highlight-color: transparent;
    color: var(--wo-gray-700);
}

.wo-staat-btn:active {
    transform: scale(0.96);
}

.wo-staat-btn.active {
    color: #fff;
    border-color: transparent;
}

.wo-staat-btn[data-staat="goed"].active {
    background: var(--wo-success);
}

.wo-staat-btn[data-staat="redelijk"].active {
    background: #22c55e;
}

.wo-staat-btn[data-staat="matig"].active {
    background: var(--wo-warning);
}

.wo-staat-btn[data-staat="slecht"].active {
    background: var(--wo-danger);
}

.wo-staat-btn[data-staat="onbekend"].active {
    background: var(--wo-gray-500);
}

/* Hidden select dat de waarde bijhoudt */
.comp-staat-hidden {
    display: none;
}

/* Fields panel */
.wo-comp-item-fields {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid var(--wo-gray-100);
}

.wo-comp-item-fields.active {
    display: block;
}

.wo-comp-item-fields .wo-form-row {
    margin-top: 12px;
}

/* Tablet-specifieke comp layout */
@media (min-width: 600px) and (max-width: 1024px) {
    .wo-comp-item-fields .wo-form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .wo-comp-item-fields .wo-form-group {
        flex: unset;
    }

    .wo-comp-item-fields .wo-form-group.wo-col-4 {
        flex: unset;
    }

    /* Staat knoppen rij: altijd volledige breedte */
    .wo-comp-item-fields .wo-staat-row {
        grid-column: 1 / -1;
    }
}

/* Sticky opslaan balk */
.wo-comp-sticky-bar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--wo-gray-200);
    padding: 14px 20px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
    display: flex;
    gap: 10px;
    align-items: center;
    z-index: 100;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.08);
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

.wo-comp-sticky-bar .wo-btn {
    flex: 1;
    justify-content: center;
    padding: 14px 20px;
    font-size: 16px;
}

.wo-comp-sticky-bar .wo-comp-counter {
    font-size: 14px;
    color: var(--wo-gray-500);
    white-space: nowrap;
}

/* Grotere touch targets voor alle comp inputs */
.wo-comp-item-fields input,
.wo-comp-item-fields select,
.wo-comp-item-fields textarea {
    min-height: 44px;
    font-size: 15px;
    touch-action: manipulation;
}

/* iOS touch optimalisatie */
.wo-staat-btn,
.wo-btn,
.wo-comp-toggle-track,
.wo-comp-checkbox {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* VVE verantwoordelijkheid knoppen */
.wo-verantw-buttons {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.wo-verantw-btn {
    padding: 6px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #fff;
    color: #64748b;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.15s;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.wo-verantw-btn:hover {
    border-color: #94a3b8;
}

.wo-verantw-btn.active {
    font-weight: 600;
}

.wo-verantw-btn.active.wo-verantw-eigenaar {
    background: #dbeafe;
    border-color: #93c5fd;
    color: #1e40af;
}

.wo-verantw-btn.active.wo-verantw-vve {
    background: #ffedd5;
    border-color: #fdba74;
    color: #c2410c;
}

.wo-verantw-btn.active.wo-verantw-gedeeld {
    background: #fef3c7;
    border-color: #fcd34d;
    color: #92400e;
}

/* Component foto's */
.wo-comp-fotos {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--wo-gray-200);
}

.wo-comp-fotos > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wo-gray-700);
    margin-bottom: 8px;
}

.wo-foto-grid {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wo-foto-thumb {
    position: relative;
    width: 90px;
    height: 90px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--wo-gray-200);
    flex-shrink: 0;
}

.wo-foto-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wo-foto-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(0,0,0,0.6);
    color: #fff;
    border: none;
    font-size: 14px;
    line-height: 24px;
    text-align: center;
    cursor: pointer;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

.wo-foto-remove:active {
    background: var(--wo-danger);
}

.wo-foto-add {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border: 2px dashed var(--wo-gray-300);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    -webkit-tap-highlight-color: transparent;
    flex-shrink: 0;
    color: var(--wo-gray-500);
    gap: 2px;
}

.wo-foto-add:active {
    border-color: var(--wo-primary);
    background: var(--wo-primary-light);
}

.wo-foto-add-icon {
    font-size: 28px;
    line-height: 1;
}

.wo-foto-add span:last-child {
    font-size: 11px;
    font-weight: 500;
}

.wo-foto-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wo-gray-50);
}

.wo-foto-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--wo-gray-200);
    border-top-color: var(--wo-primary);
    border-radius: 50%;
    animation: wo-spin 0.6s linear infinite;
}

@keyframes wo-spin {
    to { transform: rotate(360deg); }
}

/* Tablet: grotere foto thumbnails */
@media (min-width: 600px) and (max-width: 1024px) {
    .wo-foto-thumb,
    .wo-foto-add {
        width: 110px;
        height: 110px;
    }
}

/* Forms */
.wo-form-section {
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    padding: 20px;
    margin-bottom: 16px;
}

.wo-form-section h3 {
    font-size: 16px;
    font-weight: 600;
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--wo-gray-100);
}

.wo-form-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.wo-form-group {
    margin-bottom: 16px;
    flex: 1;
}

.wo-col-4 { flex: 0 0 calc(33.333% - 8px); }
.wo-col-6 { flex: 0 0 calc(50% - 6px); }
.wo-col-8 { flex: 0 0 calc(66.666% - 4px); }
.wo-col-12 { flex: 0 0 100%; }

.wo-form-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wo-gray-700);
    margin-bottom: 5px;
}

.wo-form-group input,
.wo-form-group select,
.wo-form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--wo-gray-300);
    border-radius: 6px;
    font-family: inherit;
    font-size: 15px;
    line-height: 1.5;
    color: var(--wo-gray-900);
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.wo-form-group input::placeholder,
.wo-form-group textarea::placeholder {
    color: var(--wo-gray-300);
}

.wo-form-group input:focus,
.wo-form-group select:focus,
.wo-form-group textarea:focus {
    outline: none;
    border-color: var(--wo-primary);
    box-shadow: 0 0 0 3px var(--wo-primary-light);
}

.wo-help-text {
    font-size: 12px;
    color: var(--wo-gray-500);
    margin-top: 2px;
}

/* Buttons */
.wo-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1.5;
}

.wo-btn-primary {
    background: var(--wo-primary);
    color: #fff;
}

.wo-btn-primary:hover {
    background: var(--wo-primary-dark);
}

.wo-btn-secondary {
    background: var(--wo-gray-100);
    color: var(--wo-gray-700);
    border: 1px solid var(--wo-gray-300);
}

.wo-btn-secondary:hover {
    background: var(--wo-gray-200);
}

.wo-btn-full {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 15px;
}

.wo-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wo-form-actions {
    margin-top: 16px;
}

/* Messages */
.wo-message {
    padding: 12px 16px;
    border-radius: var(--wo-radius);
    margin-top: 16px;
    font-size: 14px;
}

.wo-message-success {
    background: var(--wo-success-light);
    color: var(--wo-success);
    border: 1px solid var(--wo-success);
}

.wo-message-error {
    background: var(--wo-danger-light);
    color: var(--wo-danger);
    border: 1px solid var(--wo-danger);
}

.wo-notice {
    padding: 16px;
    border-radius: var(--wo-radius);
    margin: 16px 0;
}

.wo-notice-info {
    background: var(--wo-primary-light);
    color: var(--wo-primary-dark);
}

/* Auth Container */
.wo-auth-container {
    max-width: 480px;
    margin: 40px auto;
}

/* Preset mode: register-only, geen tabs, fullwidth binnen parent */
.wo-auth-container.wo-auth-preset {
    max-width: 100%;
    margin: 0;
}

.wo-auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 0;
}

.wo-auth-tab {
    flex: 1;
    padding: 12px;
    border: 1px solid var(--wo-gray-200);
    background: var(--wo-gray-50);
    cursor: pointer;
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--wo-gray-500);
    text-align: center;
    transition: all 0.2s;
}

.wo-auth-tab:first-child {
    border-radius: var(--wo-radius) 0 0 0;
}

.wo-auth-tab:last-child {
    border-radius: 0 var(--wo-radius) 0 0;
}

.wo-auth-tab.active {
    background: #fff;
    color: var(--wo-primary);
    border-bottom-color: #fff;
}

.wo-auth-panel {
    display: none;
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-top: none;
    border-radius: 0 0 var(--wo-radius) var(--wo-radius);
    padding: 28px;
}

.wo-auth-panel.active {
    display: block;
}

/* Preset mode: panel krijgt volledige border + radius */
.wo-auth-preset .wo-auth-panel.active {
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Role Selector */
.wo-role-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wo-role-option {
    flex: 1;
    min-width: 130px;
}

.wo-role-option input {
    display: none;
}

.wo-role-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 16px 12px;
    border: 2px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.wo-role-option input:checked + .wo-role-card {
    border-color: var(--wo-primary);
    background: var(--wo-primary-light);
}

.wo-role-card:hover {
    border-color: var(--wo-primary);
}

.wo-role-icon {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: var(--wo-gray-500);
}

.wo-role-option input:checked + .wo-role-card .wo-role-icon {
    color: var(--wo-primary);
}

.wo-role-label {
    font-size: 13px;
    font-weight: 500;
}

/* Loading */
.wo-loading {
    text-align: center;
    padding: 40px;
    color: var(--wo-gray-500);
}

/* Auth links */
.wo-auth-link {
    text-align: center;
    margin-top: 16px;
    font-size: 13px;
}

.wo-auth-link a {
    color: var(--wo-primary);
    text-decoration: none;
}

.wo-auth-link a:hover {
    text-decoration: underline;
}

.wo-auth-intro {
    font-size: 14px;
    color: var(--wo-gray-500);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Logout button in nav */
.wo-logout-btn {
    color: var(--wo-gray-500) !important;
    text-decoration: none;
}

.wo-logout-btn:hover {
    color: var(--wo-danger) !important;
}

/* Responsive */
/* ==========================================================================
   Tablet Optimalisatie (600px - 1024px)
   ========================================================================== */

@media (max-width: 1024px) {

    /* --- Tile Navigation responsive --- */
    .wo-nav-tiles {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .wo-nav-tile {
        padding: 16px 10px;
    }

    /* Dashboard padding */
    .wo-dashboard {
        padding: 16px 12px 24px;
    }

    /* --- Stats Cards --- */
    .wo-stats-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .wo-stat-card {
        padding: 14px 12px;
    }

    .wo-stat-number {
        font-size: 26px;
    }

    .wo-stat-label {
        font-size: 12px;
    }

    /* --- Woning Cards --- */
    .wo-cards-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .wo-woning-card {
        padding: 16px;
    }

    .wo-woning-card:active {
        background: var(--wo-gray-50);
    }

    /* --- Formulieren 2-kolom --- */
    .wo-form-row {
        flex-wrap: wrap;
    }

    .wo-col-4 {
        flex: 0 0 calc(50% - 6px);
    }

    .wo-col-8 {
        flex: 0 0 100%;
    }

    /* Grotere form inputs */
    .wo-form-group input,
    .wo-form-group select,
    .wo-form-group textarea {
        min-height: 44px;
        font-size: 16px; /* Voorkomt zoom op iOS */
    }

    /* --- Tabellen scrollbaar --- */
    .wo-comp-table,
    .wo-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .wo-comp-table th,
    .wo-comp-table td,
    .wo-table th,
    .wo-table td {
        white-space: nowrap;
        padding: 10px 12px;
    }

    /* --- Buttons grotere touch targets --- */
    .wo-btn {
        padding: 12px 20px;
        font-size: 15px;
        min-height: 44px;
    }

    .wo-back-btn {
        padding: 10px 16px;
        font-size: 14px;
        min-height: 44px;
    }

    /* --- Badges --- */
    .wo-badge {
        padding: 4px 10px;
        font-size: 12px;
    }

    /* --- Woning Detail --- */
    .wo-woning-header {
        flex-direction: column;
        gap: 12px;
    }

    .wo-woning-header .wo-back-btn {
        align-self: flex-start;
    }

    .wo-detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .wo-componenten-section h3 {
        flex-wrap: wrap;
        gap: 8px;
    }

    .wo-componenten-section h3 .wo-btn {
        font-size: 13px;
        padding: 8px 14px;
    }

    /* --- Melding Cards --- */
    .wo-melding-card {
        padding: 14px 16px;
    }

    .wo-melding-header {
        flex-direction: column;
        gap: 6px;
    }

    .wo-melding-meta {
        flex-wrap: wrap;
        gap: 8px;
    }

    /* --- Sub-tabs (VVE) --- */
    .wo-sub-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

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

    .wo-sub-tab {
        flex: 0 0 auto;
        padding: 12px 18px;
        font-size: 14px;
        min-height: 44px;
        white-space: nowrap;
    }

    /* --- Tab headers --- */
    .wo-tab-header {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }

    .wo-tab h2 {
        font-size: 20px;
    }

    /* --- Planning items --- */
    .wo-planning-item {
        padding: 14px;
    }

    /* --- Isolatie quiz --- */
    .wo-quiz-optie {
        padding: 12px 14px;
        min-height: 44px;
    }

    /* --- Sticky bar padding --- */
    .wo-comp-sticky-bar {
        bottom: 0;
        padding-bottom: calc(14px + env(safe-area-inset-bottom, 0px));
        position: -webkit-sticky;
        position: sticky;
    }

    /* Component tabs mobile */
    .wo-comp-tabs {
        gap: 4px;
    }
    .wo-comp-tab {
        min-width: 70px;
        padding: 8px 10px;
    }
    .wo-comp-tab-icon { font-size: 18px; }
    .wo-comp-tab-label { font-size: 11px; }
    .wo-comp-panel-header {
        flex-direction: column;
        gap: 4px;
    }

    /* --- Aannemer checkbox grid --- */
    .wo-checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ==========================================================================
   Extra small / Phone (< 600px)
   ========================================================================== */

@media (max-width: 599px) {
    .wo-nav-tiles {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .wo-nav-tile {
        padding: 14px 8px;
    }
    .wo-nav-tile-icon.dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
    .wo-nav-tile-label {
        font-size: 11px;
    }

    .wo-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .wo-col-4,
    .wo-col-6,
    .wo-col-8 {
        flex: 0 0 100%;
    }

    .wo-detail-grid {
        grid-template-columns: 1fr;
    }

    .wo-role-selector {
        flex-direction: column;
    }

    .wo-auth-panel {
        padding: 20px 16px;
    }

    .wo-auth-container {
        margin: 24px auto;
    }

    .wo-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Fase 2: Planning, Meldingen, Onderhoud Log
   ========================================================================== */

/* Tab header with button */
.wo-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.wo-tab-header h2 {
    margin: 0;
}

/* Planning groups */
.wo-planning-group {
    margin-bottom: 24px;
}

/* Meldingen lijst */
.wo-meldingen-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wo-melding-card {
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-left: 4px solid var(--wo-gray-300);
    border-radius: var(--wo-radius);
    padding: 16px 20px;
    box-shadow: var(--wo-shadow);
}

.wo-melding-card.wo-prio-spoed { border-left-color: #dc2626; }
.wo-melding-card.wo-prio-hoog { border-left-color: #d97706; }
.wo-melding-card.wo-prio-normaal { border-left-color: #2563eb; }
.wo-melding-card.wo-prio-laag { border-left-color: #16a34a; }

.wo-melding-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 8px;
}

.wo-melding-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

.wo-melding-badges {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.wo-melding-desc {
    font-size: 14px;
    color: var(--wo-gray-500);
    margin: 0 0 10px 0;
    line-height: 1.5;
}

.wo-melding-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--wo-gray-500);
}

.wo-melding-reactie {
    margin-top: 10px;
    padding: 10px 14px;
    background: var(--wo-gray-50);
    border-radius: 6px;
    font-size: 13px;
}

/* Priority badges */
.wo-badge-prio-spoed { background: #fee2e2; color: #dc2626; }
.wo-badge-prio-hoog { background: #fef3c7; color: #d97706; }
.wo-badge-prio-normaal { background: #dbeafe; color: #2563eb; }
.wo-badge-prio-laag { background: #dcfce7; color: #16a34a; }

/* Status badges */
.wo-badge-status-nieuw { background: #dbeafe; color: #2563eb; }
.wo-badge-status-in_behandeling { background: #fef3c7; color: #d97706; }
.wo-badge-status-toegewezen { background: #e0e7ff; color: #4f46e5; }
.wo-badge-status-afgerond { background: #dcfce7; color: #16a34a; }

/* Melding foto's */
.wo-melding-fotos {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.wo-melding-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--wo-gray-200);
    cursor: pointer;
}

/* Foto upload area */
.wo-foto-upload-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.wo-foto-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.wo-foto-item {
    position: relative;
    width: 80px;
    height: 80px;
}

.wo-foto-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid var(--wo-gray-200);
}

.wo-foto-uploading,
.wo-foto-remove {
    position: absolute;
    top: 2px;
    right: 2px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
}

.wo-foto-remove:hover {
    background: #dc2626;
}

/* Onderhoud log delete link */
.wo-delete-log {
    color: var(--wo-gray-300);
    text-decoration: none;
    font-size: 18px;
    font-weight: bold;
}

.wo-delete-log:hover {
    color: var(--wo-danger);
}

/* ==========================================================================
   Isolatie Quiz
   ========================================================================== */

.wo-quiz-category {
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    padding: 20px 24px;
    margin-bottom: 16px;
}

.wo-quiz-category h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 8px 0;
    font-size: 16px;
}

.wo-quiz-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--wo-primary);
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

.wo-quiz-toelichting {
    color: var(--wo-gray-500);
    font-size: 13px;
    margin: 0 0 16px 0;
}

.wo-quiz-vraag {
    margin-bottom: 16px;
}

.wo-quiz-label {
    display: block;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}

.wo-quiz-opties {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wo-quiz-optie {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: var(--wo-gray-50);
    border: 1px solid var(--wo-gray-200);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
}

.wo-quiz-optie:hover {
    background: #eff6ff;
    border-color: var(--wo-primary);
}

.wo-quiz-optie input[type="radio"] {
    accent-color: var(--wo-primary);
}

/* Isolatie resultaat */
.wo-iso-score-hero {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 24px;
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    margin-bottom: 20px;
}

.wo-iso-label {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    flex-shrink: 0;
}

.wo-iso-label-letter {
    color: #fff;
    font-size: 32px;
    font-weight: 800;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.wo-iso-score-number {
    font-size: 36px;
    font-weight: 700;
    color: var(--wo-gray-900);
    line-height: 1;
}

.wo-iso-score-number small {
    font-size: 18px;
    font-weight: 400;
    color: var(--wo-gray-500);
}

.wo-iso-score-tekst {
    font-size: 14px;
    color: var(--wo-gray-500);
    margin-top: 4px;
}

.wo-iso-beoordeling {
    padding: 14px 18px;
    background: #f0f9ff;
    border-left: 4px solid var(--wo-primary);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.wo-iso-categorien {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.wo-iso-cat-item {
    padding: 12px 16px;
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: 6px;
}

.wo-iso-cat-header {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 6px;
}

.wo-iso-bar-bg {
    height: 8px;
    background: var(--wo-gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.wo-iso-bar {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
}

.wo-iso-resultaat {
    margin-top: 24px;
}

.wo-iso-adviezen {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.wo-iso-advies {
    padding: 14px 18px;
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
}

.wo-iso-advies-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.wo-iso-advies p {
    font-size: 13px;
    color: var(--wo-gray-500);
    margin: 0 0 6px 0;
    line-height: 1.5;
}

.wo-iso-besparing {
    font-size: 13px;
    font-weight: 600;
    color: var(--wo-success);
}

/* Isolatie foto sectie per categorie */
.wo-iso-fotos {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px dashed var(--wo-gray-200);
}

.wo-iso-fotos > label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--wo-gray-500);
    margin-bottom: 8px;
}

/* Foto's in resultaat weergave */
.wo-iso-cat-fotos {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.wo-iso-cat-foto-thumb {
    width: 64px;
    height: 64px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--wo-gray-200);
    display: block;
    flex-shrink: 0;
    transition: transform 0.15s;
}

.wo-iso-cat-foto-thumb:active {
    transform: scale(0.95);
}

.wo-iso-cat-foto-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ==========================================================================
   MJOP Rapport
   ========================================================================== */

.wo-rapport-samenvatting {
    padding: 16px 20px;
    background: #f0f9ff;
    border-left: 4px solid var(--wo-primary);
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.wo-rapport-bars {
    margin: 12px 0 24px 0;
}

.wo-rapport-bar-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.wo-rapport-bar-label {
    width: 50px;
    font-size: 13px;
    font-weight: 600;
    text-align: right;
    flex-shrink: 0;
}

.wo-rapport-bar-track {
    flex: 1;
    height: 22px;
    background: var(--wo-gray-100);
    border-radius: 4px;
    overflow: hidden;
}

.wo-rapport-bar-fill {
    height: 100%;
    background: var(--wo-primary);
    border-radius: 4px;
    transition: width 0.5s ease;
}

.wo-rapport-bar-value {
    width: 80px;
    font-size: 13px;
    text-align: right;
    flex-shrink: 0;
}

/* ================================================================
   Fase 3: Offertes + Aannemer
   ================================================================ */

/* Offerte & Klus cards */
.wo-offerte-card,
.wo-klus-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #fff;
}

.wo-card-header {
    padding: 14px 18px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 14px;
}

.wo-card-body {
    padding: 16px 18px;
}

.wo-card p {
    margin: 4px 0;
}

/* Danger button */
.wo-btn-danger {
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}
.wo-btn-danger:hover {
    background: #b91c1c;
}

/* Checkbox grid (vakgebieden) */
.wo-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 8px;
}

.wo-checkbox-label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 12px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.2s;
}

.wo-checkbox-label:hover {
    border-color: #2563eb;
}

.wo-checkbox-label input:checked + * {
    font-weight: 500;
}

.wo-checkbox-label input[type="checkbox"] {
    accent-color: #2563eb;
    width: 16px;
    height: 16px;
}

/* Notice success */
.wo-notice-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Notice error */
.wo-notice-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 12px 16px;
    border-radius: 8px;
}

/* Form section spacing */
.wo-form-section + .wo-form-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

/* Responsive: stack cards on mobile */
@media (max-width: 600px) {
    .wo-checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   Fase 4: VVE Module
   ================================================================ */

/* VVE card */
.wo-vve-card {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    overflow: hidden;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wo-vve-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

/* Sub-tabs */
.wo-sub-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 0;
}

.wo-sub-tab {
    padding: 8px 18px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s, border-color 0.2s;
}

.wo-sub-tab:hover {
    color: #2563eb;
}

.wo-sub-tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}

/* Simple table */
.wo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    margin-top: 12px;
}

.wo-table th,
.wo-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid #e5e7eb;
}

.wo-table th {
    background: #f9fafb;
    font-weight: 600;
    font-size: 13px;
    color: #374151;
}

.wo-table tr:hover td {
    background: #f9fafb;
}

/* ==========================================================================
   PWA Standalone modus (dashboard)
   ========================================================================== */

/* Standalone: dashboard gebruikt volledige hoogte */
.hw-pwa-standalone .wo-dashboard {
    min-height: 100vh;
    padding-top: 12px;
}

@supports (padding: env(safe-area-inset-bottom)) {
    .hw-pwa-standalone .wo-dashboard {
        padding-top: calc(12px + env(safe-area-inset-top));
    }
}

/* =========================================
   Abonnement / Pricing cards
   ========================================= */
.wo-pricing-cards {
    display: flex;
    gap: 24px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 16px;
}

.wo-pricing-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    padding: 32px 28px;
    flex: 0 1 320px;
    text-align: center;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.wo-pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

.wo-pricing-popular {
    border-color: #2563eb;
    box-shadow: 0 4px 20px rgba(37,99,235,0.15);
}

.wo-pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #2563eb;
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 16px;
    border-radius: 20px;
    white-space: nowrap;
}

.wo-pricing-card h4 {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
}

.wo-pricing-amount {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    margin-bottom: 8px;
}

.wo-pricing-currency {
    font-size: 22px;
    font-weight: 700;
    color: #64748b;
}

.wo-pricing-value {
    font-size: 48px;
    font-weight: 800;
    color: #1e293b;
    line-height: 1;
}

.wo-pricing-period {
    font-size: 15px;
    color: #94a3b8;
    font-weight: 500;
}

.wo-pricing-save {
    background: #ecfdf5;
    color: #059669;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 16px;
}

.wo-pricing-features {
    list-style: none;
    padding: 0;
    margin: 20px 0;
    text-align: left;
}

.wo-pricing-features li {
    padding: 6px 0;
    font-size: 14px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
}

.wo-pricing-features li:last-child {
    border-bottom: none;
}

.wo-btn-full {
    width: 100%;
}

.wo-btn-danger {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.wo-btn-danger:hover {
    background: #dc2626;
}

.wo-abo-banner {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wo-abo-banner-proef {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.wo-abo-banner-actief {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.wo-abo-banner-verlopen {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.wo-abo-banner-opgezegd {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.wo-abo-banner-early {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
}

.wo-text-muted {
    color: #64748b;
    font-size: 14px;
}

.wo-text-center {
    text-align: center;
}

@media (max-width: 600px) {
    .wo-pricing-cards {
        flex-direction: column;
        align-items: center;
    }
    .wo-pricing-card {
        max-width: 360px;
        width: 100%;
    }
}

/* ==========================================================================
   Feature: Dashboard Sections (Urgente items, Kalender, Vergelijking)
   ========================================================================== */

.wo-stat-clickable {
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}
.wo-stat-clickable:hover {
    transform: translateY(-2px);
    box-shadow: var(--wo-shadow-md);
}

.wo-dash-section {
    margin-top: 24px;
    background: #fff;
    border: 1px solid var(--wo-gray-200);
    border-radius: var(--wo-radius);
    padding: 16px 20px;
}
.wo-dash-section h3 {
    margin: 0 0 14px;
    font-size: 16px;
    color: var(--wo-gray-900);
}

/* Urgente items */
.wo-urgente-lijst {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.wo-urgente-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    background: var(--wo-gray-50);
    border-radius: 6px;
    border-left: 4px solid var(--wo-warning);
    cursor: pointer;
    transition: background 0.15s;
}
.wo-urgente-item:hover {
    background: var(--wo-warning-light);
}
.wo-urgente-info {
    flex: 1;
    min-width: 0;
}
.wo-urgente-info strong {
    display: block;
    font-size: 14px;
}
.wo-urgente-woning {
    display: block;
    font-size: 12px;
    color: var(--wo-gray-500);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wo-urgente-status {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.wo-urgente-datum {
    font-size: 12px;
    color: var(--wo-gray-500);
}

/* Kalender Timeline */
.wo-kalender-timeline {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
}
.wo-kalender-maand {
    min-width: 160px;
    flex: 0 0 auto;
    background: var(--wo-gray-50);
    border-radius: var(--wo-radius);
    overflow: hidden;
}
.wo-kalender-maand-label {
    background: var(--wo-primary);
    color: #fff;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
}
.wo-kalender-maand-items {
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.wo-kalender-event {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 6px;
    background: #fff;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid var(--wo-gray-200);
}
.wo-kalender-dag {
    background: var(--wo-primary-light);
    color: var(--wo-primary);
    font-weight: 700;
    font-size: 11px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}
.wo-kalender-comp {
    font-weight: 600;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.wo-kalender-vervanging {
    border-color: var(--wo-danger-light);
    background: #fff5f5;
}
.wo-kalender-vervanging .wo-kalender-dag {
    background: var(--wo-danger-light);
    color: var(--wo-danger);
}
.wo-kalender-woning {
    font-size: 11px;
    color: var(--wo-gray-500);
    display: none;
}

/* Vergelijking Tabel */
.wo-vergelijk-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.wo-vergelijk-tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.wo-vergelijk-tabel th {
    background: var(--wo-primary);
    color: #fff;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}
.wo-vergelijk-tabel td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--wo-gray-200);
    vertical-align: middle;
}
.wo-vergelijk-row {
    cursor: pointer;
    transition: background 0.15s;
}
.wo-vergelijk-row:hover {
    background: var(--wo-primary-light);
}
.wo-vergelijk-totaal {
    background: var(--wo-gray-50);
    border-top: 2px solid var(--wo-gray-300);
}
.wo-vergelijk-totaal td {
    font-weight: 600;
}

/* ==========================================================================
   Feature: Foto Lightbox
   ========================================================================== */
.wo-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.9);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: wo-fadeIn 0.2s ease;
}
.wo-lightbox-img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 4px;
}
.wo-lightbox-close {
    position: absolute;
    top: 16px; right: 20px;
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    z-index: 10;
    width: 44px; height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.wo-lightbox-prev,
.wo-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    border: none;
    color: #fff;
    font-size: 36px;
    cursor: pointer;
    width: 48px; height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}
.wo-lightbox-prev:hover,
.wo-lightbox-next:hover {
    background: rgba(255,255,255,0.3);
}
.wo-lightbox-prev { left: 16px; }
.wo-lightbox-next { right: 16px; }
.wo-lightbox-counter {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 14px;
    background: rgba(0,0,0,0.5);
    padding: 4px 14px;
    border-radius: 20px;
}

/* Foto thumbnails clickable */
.wo-foto-thumb {
    cursor: pointer;
}
.wo-foto-thumb img {
    transition: transform 0.15s;
}
.wo-foto-thumb:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   Responsive: Dashboard features
   ========================================================================== */
@media (max-width: 599px) {
    .wo-dash-section {
        padding: 12px 14px;
    }
    .wo-kalender-maand {
        min-width: 140px;
    }
    .wo-vergelijk-tabel {
        font-size: 12px;
    }
    .wo-vergelijk-tabel th,
    .wo-vergelijk-tabel td {
        padding: 6px 8px;
    }
    .wo-urgente-item {
        flex-wrap: wrap;
        gap: 8px;
    }
    .wo-lightbox-prev,
    .wo-lightbox-next {
        width: 36px; height: 36px;
        font-size: 28px;
    }
}

/* Einde CSS */

/* =============================================
   Fallback save button - alleen op touch devices
   ============================================= */
.wo-comp-fallback-save {
    padding: 20px 0;
    text-align: center;
    display: none; /* standaard verborgen */
}
/* Toon alleen op touch devices (geen hover) */
@media (hover: none) and (pointer: coarse) {
    .wo-comp-fallback-save {
        display: block;
    }
}

/* =============================================
   Edit Woning Form - Strakke layout v2.0.1
   ============================================= */
#wo-edit-woning-form {
    max-width: 640px;
}
#wo-edit-woning-form .wo-form-section {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 16px;
}
#wo-edit-woning-form .wo-form-section h3 {
    margin: 0 0 16px;
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}
#wo-edit-woning-form .wo-edit-grid {
    display: grid;
    gap: 14px;
}
#wo-edit-woning-form .wo-edit-grid.cols-2 {
    grid-template-columns: 1fr 1fr;
}
#wo-edit-woning-form .wo-edit-grid.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
}
#wo-edit-woning-form .wo-edit-grid.cols-1-2 {
    grid-template-columns: 1fr 2fr;
}
@media (max-width: 600px) {
    #wo-edit-woning-form .wo-edit-grid.cols-2,
    #wo-edit-woning-form .wo-edit-grid.cols-3,
    #wo-edit-woning-form .wo-edit-grid.cols-1-2 {
        grid-template-columns: 1fr;
    }
}
#wo-edit-woning-form .wo-edit-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
#wo-edit-woning-form .wo-edit-field label {
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    margin: 0;
}
#wo-edit-woning-form .wo-edit-field input,
#wo-edit-woning-form .wo-edit-field select,
#wo-edit-woning-form .wo-edit-field textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    color: #1e293b;
    background: #fff;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}
#wo-edit-woning-form .wo-edit-field input:focus,
#wo-edit-woning-form .wo-edit-field select:focus,
#wo-edit-woning-form .wo-edit-field textarea:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
    outline: none;
}
#wo-edit-woning-form .wo-edit-field textarea {
    resize: vertical;
    min-height: 70px;
}
#wo-edit-woning-form .wo-edit-actions {
    display: flex;
    gap: 10px;
    margin-top: 8px;
}
#wo-edit-woning-form .wo-edit-vve-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #334155;
    padding: 4px 0;
}
#wo-edit-woning-form .wo-edit-vve-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

/* ==========================================================================
   v2.0.3 — MJOP Offerte Button + Aannemer Matching
   ========================================================================== */

/* MJOP Offerte knop in componenttabel */
.wo-mjop-offerte-btn {
    font-size: 12px !important;
    padding: 4px 10px !important;
    background: #2563eb !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    white-space: nowrap;
    transition: background 0.2s;
}
.wo-mjop-offerte-btn:hover {
    background: #1d4ed8 !important;
}

/* Aannemer matching cards */
.wo-match-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.wo-match-card:hover {
    border-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37,99,235,0.1);
}
.wo-match-card.wo-match-top {
    border-left: 4px solid #16a34a;
}
.wo-match-info {
    flex: 1;
}
.wo-match-naam {
    font-weight: 700;
    font-size: 15px;
    color: #111827;
    margin-bottom: 4px;
}
.wo-match-details {
    font-size: 13px;
    color: #6b7280;
}
.wo-match-redenen {
    font-size: 12px;
    color: #64748b;
    margin-top: 4px;
}
.wo-match-score {
    text-align: center;
    min-width: 60px;
    margin-left: 16px;
}
.wo-match-score-num {
    display: block;
    font-size: 22px;
    font-weight: 800;
    line-height: 1;
}
.wo-match-score-label {
    font-size: 11px;
    color: #94a3b8;
}
.wo-match-btn {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    background: #2563eb;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.wo-match-btn:hover {
    background: #1d4ed8;
}

/* ---- Onderhoudshistorie tijdlijn ---- */
.wo-historie-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 16px;
}
.wo-historie-stat {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.wo-historie-stat-num {
    font-size: 20px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
}
.wo-historie-stat-label {
    font-size: 12px;
    color: #64748b;
}
.wo-historie-filters {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}
.wo-jaar-filter {
    padding: 5px 14px;
    border: 1px solid #cbd5e1;
    border-radius: 20px;
    background: #fff;
    color: #475569;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.15s;
}
.wo-jaar-filter:hover,
.wo-jaar-filter.active {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
}

/* Tijdlijn */
.wo-timeline {
    position: relative;
    padding-left: 12px;
}
.wo-timeline::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e2e8f0;
}
.wo-timeline-jaar {
    position: relative;
    font-size: 12px;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .08em;
    margin: 24px 0 12px 48px;
}
.wo-timeline-jaar:first-child { margin-top: 4px; }

.wo-timeline-item {
    position: relative;
    display: flex;
    gap: 14px;
    margin-bottom: 16px;
    align-items: flex-start;
}
.wo-timeline-dot {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 1;
    box-shadow: 0 0 0 3px #fff;
}
.wo-timeline-content {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    min-width: 0;
}
.wo-timeline-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.wo-timeline-datum {
    font-size: 13px;
    font-weight: 600;
    color: #475569;
}
.wo-badge-type {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 20px;
    font-weight: 600;
}
.wo-timeline-component {
    font-size: 12px;
    color: #64748b;
}
.wo-timeline-omschrijving {
    font-size: 14px;
    color: #1e293b;
    margin-bottom: 6px;
    line-height: 1.5;
}
.wo-timeline-meta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: #64748b;
}
.wo-timeline-kosten {
    font-weight: 600;
    color: #16a34a;
}
.wo-timeline-delete {
    flex-shrink: 0;
    background: none;
    border: none;
    color: #cbd5e1;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    line-height: 1;
    align-self: center;
    transition: color 0.15s;
}
.wo-timeline-delete:hover { color: #ef4444; }

/* Documenten in tijdlijn */
.wo-timeline-docs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #f1f5f9;
}
.wo-doc-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #2563eb;
    text-decoration: none;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    padding: 3px 8px;
    transition: background 0.15s;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.wo-doc-link:hover { background: #dbeafe; }

/* Document upload in formulier */
.wo-doc-upload-area {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.wo-doc-preview-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: 8px;
}
.wo-doc-item {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 13px;
}
.wo-doc-icon { font-size: 18px; flex-shrink: 0; }
.wo-doc-naam { flex: 1; color: #1e293b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wo-doc-status { flex-shrink: 0; font-size: 12px; }
.wo-doc-remove {
    background: none;
    border: none;
    color: #94a3b8;
    font-size: 16px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    flex-shrink: 0;
}
.wo-doc-remove:hover { color: #ef4444; }

/* ---- Tijdlijn: uitklap detail + bewerken ---- */
.wo-timeline-expand-hint {
    margin-left: auto;
    font-size: 11px;
    color: #94a3b8;
    transition: color 0.15s;
}
.wo-timeline-view:hover .wo-timeline-expand-hint {
    color: #2563eb;
}
.wo-timeline-detail {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e2e8f0;
}
.wo-timeline-detail-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.wo-btn-sm {
    padding: 5px 12px;
    font-size: 12px;
    border-radius: 6px;
}
.wo-edit-form-inner {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}
.wo-edit-form-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.wo-timeline-item.is-open > .wo-timeline-content > .wo-timeline-view .wo-timeline-expand-hint {
    color: #2563eb;
}
