/* assets/css/style.css - Complete stylesheet met iPhone optimalisaties */

/* ===== RESET & BASE ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: 'Segoe UI', Arial, sans-serif; line-height: 1.6; padding: 20px; transition: background 0.3s, color 0.3s; }

/* ===== THEMES ===== */
body.light { background: #f0f2f5; color: #333; }
body.dark { background: #1a1a2e; color: #e0e0e0; }

/* ===== CONTAINERS ===== */
.container { max-width: 1400px; margin: 0 auto; padding: 20px; border-radius: 12px; transition: background 0.3s; }
body.light .container { background: #fff; box-shadow: 0 2px 20px rgba(0,0,0,0.08); }
body.dark .container { background: #16213e; box-shadow: 0 2px 20px rgba(0,0,0,0.3); }

/* ============================================ */
/* ===== NAVIGATIE MENU MET LOGO ===== */
/* ============================================ */
.nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 25px;
    gap: 10px;
    min-height: 60px;
}
body.light .nav {
    background: #2c3e50;
}
body.dark .nav {
    background: #0f3460;
}

/* Brand / Logo */
.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.nav-logo {
    display: block;
    text-decoration: none;
    line-height: 0;
}
.nav-logo-img {
    max-height: 40px !important;
    width: auto !important;
    display: block;
    border-radius: 4px;
    object-fit: contain;
}
.nav-brand-text {
    color: #ecf0f1;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
    padding: 5px 10px;
}
.nav-brand-text:hover {
    color: #3498db;
}

/* Menu links */
.nav-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
    flex: 1;
    justify-content: center;
}
.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: background 0.2s;
    font-size: 0.95em;
}
.nav-links a:hover {
    background: rgba(255,255,255,0.15);
}
.nav-links a.active {
    background: #3498db;
}

/* User info rechts */
.nav-user {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    color: #bdc3c7;
    font-size: 0.85em;
    flex-shrink: 0;
}
.nav-user span {
    color: #bdc3c7;
}
.nav-user a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s;
}
.nav-user a:hover {
    background: rgba(255,255,255,0.15);
}

/* ============================================ */
/* ===== LOGIN PAGE ===== */
/* ============================================ */
.login-box { max-width: 400px; margin: 80px auto; padding: 40px; border-radius: 12px; text-align: center; }
body.light .login-box { background: #fff; box-shadow: 0 4px 30px rgba(0,0,0,0.1); }
body.dark .login-box { background: #16213e; box-shadow: 0 4px 30px rgba(0,0,0,0.4); }
.login-box h1 { text-align: center; margin-bottom: 25px; }
.login-box .form-group { margin-bottom: 18px; text-align: left; }
.login-box .btn { width: 100%; padding: 12px; font-size: 1.1em; }

/* Login Logo */
.login-logo { margin-bottom: 20px; }
.login-logo img { max-height: 80px; width: auto; display: inline-block; }
.login-logo .company-name { font-size: 1.4em; font-weight: 600; color: #2c3e50; margin-top: 10px; }
body.dark .login-logo .company-name { color: #ecf0f1; }
.login-subtitle { color: #7f8c8d; font-size: 0.9em; margin-bottom: 20px; }
body.dark .login-subtitle { color: #95a5a6; }

/* 2FA Code Input */
.code-input { font-size: 1.5em; letter-spacing: 8px; text-align: center; font-weight: bold; }
.resend-link { display: inline-block; margin-top: 15px; color: #3498db; text-decoration: none; }
.resend-link:hover { text-decoration: underline; }
.info-text { color: #7f8c8d; font-size: 0.95em; margin-bottom: 20px; }
body.dark .info-text { color: #95a5a6; }

/* ============================================ */
/* ===== KNOPS ===== */
/* ============================================ */
.btn { 
    display: inline-block; 
    padding: 8px 18px; 
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    text-decoration: none; 
    font-size: 0.9em; 
    transition: all 0.2s;
    min-height: 36px;
    min-width: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-success { background: #2ecc71; color: #fff; }
.btn-success:hover { background: #27ae60; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-danger:hover { background: #c0392b; }
.btn-warning { background: #f39c12; color: #fff; }
.btn-warning:hover { background: #d68910; }
.btn-info { background: #1abc9c; color: #fff; }
.btn-info:hover { background: #16a085; }
.btn-secondary { background: #95a5a6; color: #fff; }
.btn-secondary:hover { background: #7f8c8d; }
.btn-outline { background: transparent; border: 2px solid #95a5a6; color: #95a5a6; }
.btn-outline:hover { background: #95a5a6; color: #fff; }
.btn-sm { padding: 4px 12px; font-size: 0.8em; min-height: 30px; min-width: 30px; }

/* Speciale knoppen */
.btn-print { background: #6c757d; color: #fff; }
.btn-print:hover { background: #5a6268; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(108,117,125,0.3); }
.btn-delete { background: #dc3545; color: #fff; }
.btn-delete:hover { background: #c82333; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,53,69,0.3); }
.delete-btn-disabled { opacity: 0.5; cursor: not-allowed; }
.delete-btn-disabled:hover { transform: none !important; box-shadow: none !important; }

/* ============================================ */
/* ===== FORMULIEREN ===== */
/* ============================================ */
.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 5px; font-size: 0.95em; }
.form-group input, .form-group select, .form-group textarea { 
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ddd; 
    border-radius: 6px; 
    font-size: 1em; 
    transition: border 0.2s;
    min-height: 44px;
}
body.dark .form-group input, 
body.dark .form-group select, 
body.dark .form-group textarea { background: #1a1a2e; color: #e0e0e0; border-color: #444; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #3498db; outline: none; }
.form-group textarea { min-height: 100px; resize: vertical; }
.form-group-full { margin-bottom: 20px; }
.form-group-full label { display: block; font-weight: 600; margin-bottom: 8px; font-size: 0.95em; }

/* ============================================ */
/* ===== TABELLEN ===== */
/* ============================================ */
.table-responsive { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 12px 15px; text-align: left; border-bottom: 1px solid #ddd; }
body.dark th, body.dark td { border-color: #444; }
th { font-weight: 600; font-size: 0.85em; }
body.light th { background: #f8f9fa; }
body.dark th { background: #1a1a2e; }
tr:hover { background: rgba(52, 152, 219, 0.05); }

/* Work Order acties */
.wo-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.wo-actions .btn { font-size: 0.8em; padding: 4px 10px; }

/* ============================================ */
/* ===== STATUS BADGES ===== */
/* ============================================ */
.status-badge { display: inline-block; padding: 4px 14px; border-radius: 20px; font-size: 0.8em; font-weight: 600; }
.status-priority { background: #ff6b6b; color: #fff; }
.status-open { background: #4ecdc4; color: #fff; }
.status-progress { background: #ffe66d; color: #333; }
.status-parts { background: #ff9f43; color: #fff; }
.status-closed { background: #2ed573; color: #fff; }
.status-picked { background: #1e90ff; color: #fff; }
.status-badge-sm { display: inline-block; padding: 2px 10px; border-radius: 12px; font-size: 0.75em; font-weight: 600; }
.status-active { background: #2ecc71; color: #fff; }
.status-blocked { background: #e74c3c; color: #fff; }

/* ============================================ */
/* ===== FILTERS & SEARCH ===== */
/* ============================================ */
.filter-bar { display: flex; flex-wrap: wrap; gap: 8px; margin: 15px 0; }
.search-bar { display: flex; flex-wrap: wrap; gap: 10px; margin: 15px 0; }
.search-bar input[type="text"] { flex: 1; min-width: 200px; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-size: 1em; min-height: 44px; }
body.dark .search-bar input[type="text"] { background: #1a1a2e; color: #e0e0e0; border-color: #444; }

/* ============================================ */
/* ===== PAGINERING ===== */
/* ============================================ */
.pagination { display: flex; flex-wrap: wrap; gap: 5px; justify-content: center; margin-top: 20px; }
.pagination .btn { min-width: 36px; text-align: center; min-height: 36px; }

/* ============================================ */
/* ===== MESSAGES ===== */
/* ============================================ */
.alert { padding: 12px 18px; border-radius: 6px; margin-bottom: 15px; font-size: 0.95em; }
.alert-error { background: #fee; color: #c0392b; border: 1px solid #fcc; }
body.dark .alert-error { background: #2c1a1a; color: #ff6b6b; border-color: #442222; }
.alert-success { background: #efe; color: #27ae60; border: 1px solid #cfc; }
body.dark .alert-success { background: #1a2c1a; color: #2ecc71; border-color: #224422; }

/* ============================================ */
/* ===== WORK ORDER DETAILS ===== */
/* ============================================ */
.wo-header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; padding-bottom: 15px; border-bottom: 2px solid #3498db; margin-bottom: 20px; }
.wo-header h2 { font-size: 1.4em; }
.wo-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; margin: 15px 0; }
.wo-grid .label { font-weight: 600; color: #7f8c8d; display: block; font-size: 0.85em; text-transform: uppercase; }
body.dark .wo-grid .label { color: #95a5a6; }
.section { margin-top: 25px; padding-top: 20px; border-top: 1px solid #ddd; }
body.dark .section { border-color: #444; }
.section h4 { margin-bottom: 10px; font-size: 1.1em; }

/* ============================================ */
/* ===== WORK ORDER TEXTAREAS ===== */
/* ============================================ */
.wo-textarea {
    width: 100% !important;
    min-height: 120px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
    font-family: inherit;
    resize: vertical;
    box-sizing: border-box;
}
body.dark .wo-textarea {
    background: #1a1a2e;
    color: #e0e0e0;
    border-color: #444;
}
.wo-textarea:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
}

/* ============================================ */
/* ===== NOTE ITEMS ===== */
/* ============================================ */
.note-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    border-left: 4px solid #3498db;
}
body.dark .note-item {
    background: #1a1a2e;
    border-left-color: #3498db;
}
.note-item .note-meta {
    font-size: 0.85em;
    color: #7f8c8d;
    margin-bottom: 5px;
}
body.dark .note-item .note-meta {
    color: #95a5a6;
}
.note-item .note-text {
    margin: 5px 0 0 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* ============================================ */
/* ===== RESOLUTION TEXT ===== */
/* ============================================ */
.resolution-text {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 10px 0;
    white-space: pre-wrap;
    word-wrap: break-word;
    border-left: 4px solid #2ecc71;
}
body.dark .resolution-text {
    background: #1a1a2e;
    border-left-color: #2ecc71;
}

/* ============================================ */
/* ===== ACTION BUTTONS ===== */
/* ============================================ */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}
.action-buttons form {
    display: inline-block;
}

/* ============================================ */
/* ===== BOTTOM ACTIONS ===== */
/* ============================================ */
.bottom-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #ddd;
}
body.dark .bottom-actions {
    border-color: #444;
}

/* ============================================ */
/* ===== ATTACHMENTS ===== */
/* ============================================ */
.attachment-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    transition: all 0.2s;
}
body.dark .attachment-item {
    background: #1a1a2e;
    border-color: #333;
}
.attachment-item:hover {
    border-color: #3498db;
    box-shadow: 0 2px 8px rgba(52, 152, 219, 0.15);
}

.attachment-thumbnail {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    border-radius: 4px;
    overflow: hidden;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dee2e6;
}
body.dark .attachment-thumbnail {
    background: #2d2d2d;
    border-color: #444;
}
.attachment-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.attachment-thumbnail .file-icon {
    font-size: 28px;
    color: #6c757d;
}
body.dark .attachment-thumbnail .file-icon {
    color: #95a5a6;
}

.attachment-info {
    flex: 1;
    min-width: 0;
}
.attachment-info .filename {
    font-weight: 500;
    color: #3498db;
    text-decoration: none;
    word-break: break-all;
}
.attachment-info .filename:hover {
    text-decoration: underline;
}
.attachment-info .filesize {
    color: #6c757d;
    font-size: 0.85em;
    margin-left: 8px;
}
body.dark .attachment-info .filesize {
    color: #95a5a6;
}
.attachment-info .file-meta {
    display: block;
    font-size: 0.8em;
    color: #999;
    margin-top: 2px;
}

.attachment-actions {
    flex-shrink: 0;
    display: flex;
    gap: 5px;
}
.attachment-list {
    margin: 10px 0;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
}
body.dark .attachment-list {
    background: #1a1a2e;
    border-color: #444;
}

/* ============================================ */
/* ===== UPLOAD BOX ===== */
/* ============================================ */
.upload-box {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #ddd;
}
body.dark .upload-box {
    background: #1a1a2e;
    border-color: #444;
}
.upload-box input[type="file"] {
    width: 100%;
    padding: 12px;
    border: 1px dashed #ddd;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    min-height: 44px;
}
body.dark .upload-box input[type="file"] {
    background: #1a1a2e;
    border-color: #444;
    color: #e0e0e0;
}
.upload-box input[type="file"]:hover {
    border-color: #3498db;
}
.upload-box small {
    display: block;
    margin-top: 5px;
    color: #999;
    font-size: 0.8em;
}
body.dark .upload-box small {
    color: #666;
}

/* ============================================ */
/* ===== ACTIVITY LOG ===== */
/* ============================================ */
.log-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
}
body.dark .log-item {
    border-color: #2a2a2a;
}
.log-item .log-content {
    flex: 1;
}
.log-item .log-content strong {
    color: #2c3e50;
}
body.dark .log-item .log-content strong {
    color: #bdc3c7;
}
.log-item .log-content .log-details {
    display: block;
    color: #666;
    font-size: 0.9em;
    margin-top: 2px;
}
body.dark .log-item .log-content .log-details {
    color: #95a5a6;
}
.log-item .log-time {
    color: #999;
    font-size: 0.85em;
    white-space: nowrap;
    margin-left: 15px;
    flex-shrink: 0;
}
body.dark .log-item .log-time {
    color: #666;
}

/* ===== ACTIVITY LOG TOGGLE ===== */
.log-header {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}
.log-header h4 {
    margin: 0;
}
.log-toggle {
    font-size: 1.2em;
    transition: transform 0.3s ease;
    display: inline-block;
}
.log-toggle.collapsed {
    transform: rotate(-90deg);
}
.log-body {
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    max-height: 0;
    opacity: 0;
}
.log-body.open {
    max-height: 5000px;
    opacity: 1;
}

/* ============================================ */
/* ===== EMPTY STATE ===== */
/* ============================================ */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state h3 { font-size: 1.5em; margin-bottom: 10px; }
body.light .empty-state { color: #999; }
body.dark .empty-state { color: #666; }

/* ============================================ */
/* ===== CUSTOMER SPECIFIC ===== */
/* ============================================ */
.customer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.customer-actions .btn {
    font-size: 0.8em;
    padding: 4px 10px;
}
.wo-count {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    background: #3498db;
    color: #fff;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}
.wo-count:hover {
    background: #2980b9;
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(52,152,219,0.3);
}
.wo-count.zero {
    background: #95a5a6;
    cursor: default;
}
.wo-count.zero:hover {
    background: #95a5a6;
    transform: none;
    box-shadow: none;
}
.wo-count .count-number { font-weight: 700; }
.wo-count .count-label { font-weight: 400; font-size: 0.8em; opacity: 0.8; }

/* ============================================ */
/* ===== MODAL ===== */
/* ============================================ */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}
.modal-content {
    background-color: #fff;
    margin: 10% auto;
    padding: 30px;
    border-radius: 8px;
    max-width: 500px;
    position: relative;
    animation: modalFadeIn 0.3s ease;
}
body.dark .modal-content {
    background-color: #2d2d2d;
    color: #eee;
}
.modal-close {
    position: absolute;
    right: 20px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.2s;
}
.modal-close:hover {
    color: #333;
}
body.dark .modal-close:hover {
    color: #fff;
}
.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}
.modal-actions .btn {
    padding: 10px 25px;
    min-width: 100px;
    text-align: center;
}
@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================ */
/* ===== RESPONSIVE - TABLETS (max 1024px) ===== */
/* ============================================ */
@media (max-width: 1024px) {
    body { padding: 15px; }
    .container { padding: 15px; }
    th, td { padding: 10px 12px; font-size: 0.9em; }
    .wo-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
    .attachment-thumbnail { width: 50px; height: 50px; }
}

/* ============================================ */
/* ===== RESPONSIVE - iPads (max 820px) ===== */
/* ============================================ */
@media (max-width: 820px) {
    .nav-links a { padding: 6px 12px; font-size: 0.85em; }
    .nav-user { font-size: 0.75em; }
    .wo-grid { grid-template-columns: 1fr 1fr; }
}

/* ============================================ */
/* ===== RESPONSIVE - iPHONE (max 768px) ===== */
/* ============================================ */
@media (max-width: 768px) {
    body { padding: 10px; }
    .container { padding: 12px; border-radius: 8px; }
    
    /* ===== NAVIGATIE ===== */
    .nav {
        flex-direction: column;
        align-items: stretch;
        padding: 10px;
        gap: 8px;
        border-radius: 6px;
        min-height: auto;
    }
    .nav-brand {
        justify-content: center;
        padding: 5px 0;
    }
    .nav-logo-img {
        max-height: 30px !important;
    }
    .nav-brand-text { font-size: 0.95em; }
    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
        order: 2;
        gap: 3px;
    }
    .nav-links a {
        padding: 6px 12px;
        font-size: 0.8em;
        flex: 0 1 auto;
        min-height: 36px;
    }
    .nav-user {
        justify-content: center;
        order: 3;
        font-size: 0.7em;
        margin-top: 5px;
        flex-wrap: wrap;
        gap: 4px;
    }
    .nav-user span {
        display: none; /* Verberg "Ingelogd als" op mobiel */
    }
    .nav-user a {
        padding: 4px 8px;
        min-height: 32px;
        min-width: 32px;
    }
    
    /* ===== LOGIN & 2FA ===== */
    .login-box {
        margin: 30px 15px;
        padding: 25px;
    }
    .login-logo img { max-height: 60px; }
    .login-logo .company-name { font-size: 1.2em; }
    .code-input { font-size: 1.3em; letter-spacing: 6px; }
    
    /* ===== TABELLEN - Mobiel vriendelijk ===== */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -5px;
        padding: 0 5px;
    }
    table { 
        font-size: 0.75em; 
        min-width: 600px; /* Forceer horizontaal scrollen */ 
    }
    th, td { 
        padding: 8px 10px; 
        font-size: 0.75em;
        white-space: nowrap;
    }
    th { font-size: 0.7em; }
    
    /* ===== FILTERS & SEARCH ===== */
    .filter-bar {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 4px;
    }
    .filter-bar .btn {
        flex: 0 1 auto;
        padding: 6px 12px;
        font-size: 0.7em;
        min-height: 32px;
    }
    .search-bar {
        flex-direction: column;
        gap: 8px;
    }
    .search-bar input[type="text"] {
        min-width: auto;
        padding: 10px;
        font-size: 0.9em;
        min-height: 40px;
    }
    .search-bar .btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        font-size: 0.85em;
        min-height: 40px;
    }
    
    /* ===== KNOPS ===== */
    .btn { 
        font-size: 0.8em; 
        padding: 8px 14px;
        min-height: 38px;
        min-width: 38px;
    }
    .btn-sm { 
        font-size: 0.7em; 
        padding: 4px 8px;
        min-height: 30px;
        min-width: 30px;
    }
    
    /* ===== WORK ORDER DETAILS ===== */
    .wo-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .wo-header h2 { font-size: 1.1em; }
    .wo-header .status-badge {
        font-size: 0.8em !important;
        padding: 4px 12px;
    }
    .wo-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        font-size: 0.85em;
    }
    .wo-grid .label { font-size: 0.65em; }
    .section { margin-top: 15px; padding-top: 12px; }
    .section h4 { font-size: 0.95em; }
    .section p { font-size: 0.85em; }
    
    /* ===== TEXTAREAS ===== */
    .wo-textarea {
        min-height: 80px;
        padding: 10px;
        font-size: 0.9em;
    }
    
    /* ===== ATTACHMENTS ===== */
    .attachment-item {
        flex-wrap: wrap;
        gap: 10px;
        padding: 10px;
    }
    .attachment-thumbnail {
        width: 50px;
        height: 50px;
    }
    .attachment-thumbnail .file-icon { font-size: 24px; }
    .attachment-info .filename { font-size: 0.85em; }
    .attachment-info .filesize { font-size: 0.7em; }
    .attachment-info .file-meta { font-size: 0.65em; }
    .attachment-actions {
        width: 100%;
        justify-content: flex-end;
        gap: 8px;
    }
    .attachment-actions .btn-sm {
        font-size: 0.75em;
        padding: 6px 12px;
        min-height: 36px;
        min-width: 36px;
    }
    
    /* ===== UPLOAD BOX ===== */
    .upload-box {
        padding: 12px;
    }
    .upload-box input[type="file"] {
        padding: 10px;
        font-size: 0.85em;
        min-height: 40px;
    }
    .upload-box small { font-size: 0.7em; }
    .upload-box .btn {
        width: 100%;
        padding: 10px;
        font-size: 0.85em;
        min-height: 44px;
        justify-content: center;
    }
    
    /* ===== ACTION BUTTONS ===== */
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    .action-buttons .btn {
        width: 100%;
        text-align: center;
        padding: 10px;
        min-height: 44px;
        justify-content: center;
    }
    .action-buttons form {
        width: 100%;
    }
    .action-buttons select {
        width: 100%;
        margin-bottom: 5px;
        min-height: 44px;
        padding: 10px;
        font-size: 0.9em;
    }
    
    /* ===== BOTTOM ACTIONS ===== */
    .bottom-actions {
        flex-direction: column;
        gap: 8px;
        margin-top: 20px;
        padding-top: 15px;
    }
    .bottom-actions .btn {
        width: 100%;
        text-align: center;
        padding: 12px;
        min-height: 44px;
        justify-content: center;
        font-size: 0.85em;
    }
    
    /* ===== ACTIVITY LOG ===== */
    .log-item {
        flex-direction: column;
        gap: 3px;
        padding: 8px 0;
    }
    .log-item .log-time {
        margin-left: 0;
        font-size: 0.7em;
        align-self: flex-start;
    }
    .log-item .log-content {
        font-size: 0.8em;
    }
    .log-item .log-content .log-details {
        font-size: 0.75em;
    }
    .log-header h4 { font-size: 0.95em; }
    .log-toggle { font-size: 1em; }
    
    /* ===== MODAL ===== */
    .modal-content {
        margin: 15% 15px;
        padding: 20px;
    }
    .modal-actions {
        flex-direction: column;
    }
    .modal-actions .btn {
        width: 100%;
        min-height: 44px;
        justify-content: center;
    }
    .modal-content h3 { font-size: 1.1em; }
    .modal-close { font-size: 24px; right: 12px; top: 10px; }
    
    /* ===== PAGINERING ===== */
    .pagination .btn {
        padding: 6px 10px;
        font-size: 0.75em;
        min-width: 32px;
        min-height: 32px;
    }
    
    /* ===== EMPTY STATE ===== */
    .empty-state { padding: 30px 15px; }
    .empty-state h3 { font-size: 1.1em; }
    .empty-state p { font-size: 0.85em; }
    
    /* ===== STATUS BADGES ===== */
    .status-badge { 
        padding: 3px 10px; 
        font-size: 0.7em;
        border-radius: 12px;
    }
    .status-badge-sm { 
        padding: 2px 8px; 
        font-size: 0.65em;
        border-radius: 10px;
    }
    
    /* ===== WORK ORDER ACTIES ===== */
    .wo-actions { gap: 4px; }
    .wo-actions .btn {
        font-size: 0.65em;
        padding: 4px 8px;
        min-height: 30px;
        min-width: 30px;
    }
    
    /* ===== FORMULIEREN ===== */
    .form-group input, 
    .form-group select, 
    .form-group textarea {
        font-size: 16px !important; /* Voorkomt zoom op iOS */
        min-height: 44px;
        padding: 10px;
    }
    .form-group label { font-size: 0.85em; }
    
    /* ===== CUSTOMERS ===== */
    .customer-actions .btn {
        font-size: 0.7em;
        padding: 4px 8px;
        min-height: 30px;
        min-width: 30px;
    }
    .wo-count {
        font-size: 0.75em;
        padding: 2px 10px;
    }
}

/* ============================================ */
/* ===== RESPONSIVE - iPHONE SE (max 480px) ===== */
/* ============================================ */
@media (max-width: 480px) {
    body { padding: 5px; }
    .container { padding: 8px; border-radius: 4px; }
    
    /* ===== NAVIGATIE ===== */
    .nav {
        padding: 6px;
        gap: 4px;
    }
    .nav-brand-text { font-size: 0.8em; padding: 4px 6px; }
    .nav-logo-img { max-height: 25px !important; }
    .nav-links { gap: 2px; }
    .nav-links a {
        padding: 4px 8px;
        font-size: 0.7em;
        border-radius: 4px;
        min-height: 28px;
    }
    .nav-user {
        font-size: 0.6em;
        gap: 3px;
    }
    .nav-user a {
        padding: 2px 6px;
        min-height: 26px;
        min-width: 26px;
    }
    
    /* ===== LOGIN & 2FA ===== */
    .login-box {
        margin: 15px 10px;
        padding: 15px;
    }
    .login-box h1 { font-size: 1.2em; margin-bottom: 15px; }
    .login-logo img { max-height: 45px; }
    .login-logo .company-name { font-size: 1em; }
    .login-subtitle { font-size: 0.75em; margin-bottom: 15px; }
    .login-box .form-group { margin-bottom: 12px; }
    .login-box .form-group label { font-size: 0.8em; }
    .login-box .form-group input { padding: 8px; font-size: 16px !important; }
    .login-box .btn { padding: 10px; font-size: 0.9em; min-height: 44px; }
    .code-input { font-size: 1.1em; letter-spacing: 4px; padding: 8px; }
    .info-text { font-size: 0.8em; }
    
    /* ===== KNOPS ===== */
    .btn { 
        font-size: 0.75em; 
        padding: 6px 12px;
        min-height: 36px;
        min-width: 36px;
        border-radius: 4px;
    }
    .btn-sm { 
        font-size: 0.6em; 
        padding: 3px 6px;
        min-height: 26px;
        min-width: 26px;
        border-radius: 3px;
    }
    
    /* ===== TABELLEN ===== */
    table { font-size: 0.65em; min-width: 500px; }
    th, td { padding: 5px 6px; font-size: 0.65em; }
    th { font-size: 0.6em; }
    
    /* ===== FILTERS ===== */
    .filter-bar .btn {
        font-size: 0.65em;
        padding: 4px 8px;
        min-height: 28px;
    }
    .search-bar input[type="text"] {
        padding: 8px;
        font-size: 0.85em;
        min-height: 36px;
    }
    .search-bar .btn {
        font-size: 0.75em;
        padding: 8px;
        min-height: 36px;
    }
    
    /* ===== WORK ORDER DETAILS ===== */
    .wo-header h2 { font-size: 0.95em; }
    .wo-header .status-badge { font-size: 0.65em !important; padding: 2px 8px; }
    .wo-grid {
        grid-template-columns: 1fr;
        gap: 6px;
        font-size: 0.8em;
    }
    .wo-grid .label { font-size: 0.6em; }
    .section { margin-top: 12px; padding-top: 10px; }
    .section h4 { font-size: 0.85em; }
    .section p { font-size: 0.8em; }
    
    /* ===== TEXTAREAS ===== */
    .wo-textarea {
        min-height: 60px;
        padding: 8px;
        font-size: 0.85em;
    }
    
    /* ===== ATTACHMENTS ===== */
    .attachment-item {
        padding: 6px;
        gap: 6px;
        border-radius: 4px;
    }
    .attachment-thumbnail {
        width: 40px;
        height: 40px;
    }
    .attachment-thumbnail .file-icon { font-size: 18px; }
    .attachment-info .filename { font-size: 0.75em; }
    .attachment-info .filesize { font-size: 0.6em; }
    .attachment-info .file-meta { font-size: 0.55em; }
    .attachment-actions .btn-sm {
        font-size: 0.6em;
        padding: 3px 6px;
        min-height: 28px;
        min-width: 28px;
    }
    
    /* ===== UPLOAD BOX ===== */
    .upload-box {
        padding: 8px;
        margin-top: 8px;
    }
    .upload-box input[type="file"] {
        padding: 6px;
        font-size: 0.75em;
        min-height: 36px;
    }
    .upload-box small { font-size: 0.6em; }
    .upload-box .btn {
        font-size: 0.75em;
        padding: 8px;
        min-height: 38px;
    }
    
    /* ===== NOTES ===== */
    .note-item {
        padding: 6px 10px;
        border-left-width: 3px;
    }
    .note-item .note-meta { font-size: 0.65em; }
    .note-item .note-text { font-size: 0.75em; }
    
    /* ===== ACTIVITY LOG ===== */
    .log-item { padding: 4px 0; }
    .log-item .log-content { font-size: 0.7em; }
    .log-item .log-content .log-details { font-size: 0.65em; }
    .log-item .log-time { font-size: 0.6em; }
    
    /* ===== PAGINERING ===== */
    .pagination { gap: 2px; }
    .pagination .btn {
        padding: 3px 6px;
        font-size: 0.65em;
        min-width: 26px;
        min-height: 26px;
        border-radius: 3px;
    }
    
    /* ===== MODAL ===== */
    .modal-content {
        margin: 10% 10px;
        padding: 15px;
    }
    .modal-content h3 { font-size: 0.95em; }
    .modal-close { font-size: 20px; right: 10px; top: 8px; }
    .modal-actions .btn { 
        font-size: 0.75em; 
        padding: 8px 15px; 
        min-height: 38px;
    }
    
    /* ===== EMPTY STATE ===== */
    .empty-state { padding: 15px 10px; }
    .empty-state h3 { font-size: 0.95em; }
    .empty-state p { font-size: 0.75em; }
    
    /* ===== STATUS BADGES ===== */
    .status-badge { 
        padding: 2px 8px; 
        font-size: 0.6em;
        border-radius: 10px;
    }
    .status-badge-sm { 
        padding: 1px 6px; 
        font-size: 0.55em;
        border-radius: 8px;
    }
    
    /* ===== WORK ORDER ACTIES ===== */
    .wo-actions .btn {
        font-size: 0.55em;
        padding: 2px 6px;
        min-height: 24px;
        min-width: 24px;
    }
    
    /* ===== BOTTOM ACTIONS ===== */
    .bottom-actions .btn {
        font-size: 0.75em;
        padding: 10px;
        min-height: 40px;
    }
    
    /* ===== CUSTOMERS ===== */
    .customer-actions .btn {
        font-size: 0.6em;
        padding: 3px 6px;
        min-height: 26px;
        min-width: 26px;
    }
    .wo-count {
        font-size: 0.65em;
        padding: 2px 8px;
    }
    .wo-count .count-label { font-size: 0.7em; }
}

/* ============================================ */
/* ===== TOUCH OPTIMALISATIES ===== */
/* ============================================ */
@media (hover: none) and (pointer: coarse) {
    /* Grotere touch targets voor mobiele apparaten */
    .btn, 
    .nav-links a, 
    .nav-user a,
    .filter-bar .btn,
    .search-bar .btn,
    .pagination .btn,
    .wo-actions .btn,
    .bottom-actions .btn,
    .attachment-actions .btn,
    .modal-actions .btn,
    .customer-actions .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    .btn-sm {
        min-height: 36px;
        min-width: 36px;
    }
    
    /* Vergroot touch targets voor formulier elementen */
    input, select, textarea {
        font-size: 16px !important;
        min-height: 44px;
    }
    
    /* Voorkom hover states op touch devices */
    .btn:hover, .nav-links a:hover {
        transform: none;
    }
    
    /* Vergroot upload box touch area */
    .upload-box input[type="file"] {
        min-height: 50px;
        padding: 15px;
    }
    
    /* Vergroot filter knoppen */
    .filter-bar .btn {
        min-height: 38px;
        padding: 8px 16px;
    }
}
