/* Strategic Logistics - Client Portal CSS */
@import url('https://fonts.googleapis.com/css2?family=Contrail+One&family=Montserrat:wght@300;400;500;600;700&display=swap');

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

:root {
    --red: #DC0C00;
    --red-hover: #F55C4D;
    --dark: #1F1E1E;
    --dark-2: #2a2929;
    --dark-3: #333;
    --white: #FFFFFF;
    --bg: #f4f5f7;
    --gray-light: #f5f5f5;
    --gray-text: #666;
    --text: #333;
    --border: #e0e0e0;
    --sidebar-width: 260px;
    --header-height: 60px;
    /* Carrier kleuren */
    --maersk: #00a1de;
    --msc: #d4a843;
    --hapag: #ff6600;
    --cma: #003da5;
    /* Status kleuren */
    --green: #28a745;
    --yellow: #ffc107;
    --orange: #fd7e14;
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: var(--text);
    line-height: 1.6;
    background-color: var(--bg);
}
h1, h2, h3, h4, h5 { font-family: 'Contrail One', cursive; font-weight: 400; line-height: 1.3; }
a { text-decoration: none; color: inherit; transition: color 0.3s; }

/* ============ LAYOUT ============ */
.portal-layout {
    display: flex;
    min-height: 100vh;
}

/* ============ SIDEBAR ============ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--dark);
    color: var(--white);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s;
}

.sidebar-brand {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow: hidden;
}

.sidebar-brand img {
    max-width: 100%;
    height: 28px;
    object-fit: contain;
    object-position: left;
}

.sidebar-brand-sub {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255,255,255,0.35);
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
    overflow-y: auto;
}

.sidebar-nav-label {
    padding: 10px 24px 5px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255,255,255,0.4);
    font-weight: 600;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 24px;
    color: rgba(255,255,255,0.7);
    font-weight: 500;
    font-size: 13.5px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    color: var(--white);
    background: rgba(255,255,255,0.05);
}

.sidebar-nav a.active {
    color: var(--white);
    background: rgba(220,12,0,0.15);
    border-left-color: var(--red);
}

.sidebar-nav a i {
    font-size: 18px;
    width: 22px;
    text-align: center;
}

.sidebar-nav .nav-badge {
    margin-left: auto;
    background: var(--red);
    color: white;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 100px;
    font-weight: 600;
}

.sidebar-user {
    padding: 15px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--red);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-user-name {
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
}

.sidebar-back {
    display: block;
    padding: 12px 24px;
    color: rgba(255,255,255,0.5);
    font-size: 12px;
    border-top: 1px solid rgba(255,255,255,0.1);
    transition: color 0.2s;
}

.sidebar-back:hover {
    color: var(--white);
}

/* ============ MAIN CONTENT ============ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    min-width: 0;
    width: calc(100vw - var(--sidebar-width));
    max-width: calc(100vw - var(--sidebar-width));
    overflow-x: hidden;
}

/* Top header bar */
.portal-header {
    background: var(--white);
    padding: 0 30px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.portal-header h1 {
    font-size: 1.4rem;
    color: var(--dark);
}

.portal-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.menu-toggle-portal {
    display: none;
    background: none;
    border: none;
    color: var(--dark);
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
}

/* Page content wrapper */
.page-content {
    padding: 30px;
}

/* ============ CARDS ============ */
.card {
    background: var(--white);
    border-radius: 12px;
    border: none;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.card-header-dark {
    background: var(--dark);
    color: var(--white);
    padding: 16px 24px;
    border-radius: 12px 12px 0 0;
    font-family: 'Contrail One', cursive;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-body {
    padding: 24px;
}

/* ============ STAT CARDS (dashboard) ============ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--red);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card .stat-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 12px;
}

.stat-card .stat-icon.red { background: rgba(220,12,0,0.1); color: var(--red); }
.stat-card .stat-icon.blue { background: rgba(0,161,222,0.1); color: var(--maersk); }
.stat-card .stat-icon.green { background: rgba(40,167,69,0.1); color: var(--green); }
.stat-card .stat-icon.orange { background: rgba(253,126,20,0.1); color: var(--orange); }

.stat-number {
    font-family: 'Contrail One', cursive;
    font-size: 2rem;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-label {
    font-size: 12px;
    color: var(--gray-text);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ============ DATA TABLE ============ */
.table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead th {
    background: var(--dark);
    color: var(--white);
    font-weight: 600;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 14px;
    border: none;
    white-space: nowrap;
    position: sticky;
    top: 0;
    text-align: left;
}

.data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

.data-table tbody tr:hover {
    background: rgba(220,12,0,0.03);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ============ STATUS BADGES ============ */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-carrier { color: white; }
.badge-maersk { background: var(--maersk); }
.badge-msc { background: var(--msc); color: #1a1a1a; }
.badge-hapag { background: var(--hapag); }
.badge-cma { background: var(--cma); }
.badge-evergreen { background: #00954b; }
.badge-one { background: #d1006f; }
.badge-oocl { background: #003c71; }
.badge-marfret { background: #0067b1; }
.badge-nvo { background: #6b7280; }
.badge-fps { background: var(--red); }
.badge-other { background: #9ca3af; color: #1a1a1a; }
.badge-nobooking { background: #fee2e2; color: #b91c1c; font-weight: 700; }

.badge-status { }
.badge-pending { background: #fff3cd; color: #856404; }
.badge-confirmed { background: #d4edda; color: #155724; }
.badge-in_transit { background: #cce5ff; color: #004085; }
.badge-delivered { background: #d4edda; color: #155724; }
.badge-cancelled { background: #f8d7da; color: #721c24; }
.badge-active { background: #cce5ff; color: #004085; }

/* ============ BUTTONS ============ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 100px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s;
    border: 2px solid transparent;
    cursor: pointer;
    white-space: nowrap;
}

.btn-red { background: var(--red); color: var(--white); border-color: var(--red); }
.btn-red:hover { background: var(--red-hover); border-color: var(--red-hover); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(220,12,0,0.3); }

.btn-outline { background: transparent; color: var(--dark); border-color: var(--border); }
.btn-outline:hover { border-color: var(--dark); }

.btn-outline-red { background: transparent; color: var(--red); border-color: var(--red); }
.btn-outline-red:hover { background: var(--red); color: white; }

.btn-sm { padding: 6px 16px; font-size: 11px; }
.btn-block { width: 100%; justify-content: center; }

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--gray-text);
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ============ FORMS ============ */
.form-group { margin-bottom: 20px; }
.form-label {
    display: block;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    transition: border-color 0.2s, box-shadow 0.2s;
    background: var(--white);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220,12,0,0.1);
}

.form-textarea { height: 120px; resize: vertical; }

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.form-grid-3.compact { gap: 12px; }
.form-grid-3.compact .form-group { margin-bottom: 0; }

/* Rollen checkbox grid */
.role-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.role-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.role-check:hover {
    background: rgba(0,0,0,0.02);
    border-color: #ccc;
}

.role-check input[type="checkbox"] {
    accent-color: var(--red);
    width: 16px;
    height: 16px;
}

.role-check input[type="checkbox"]:checked + span {
    color: var(--red);
    font-weight: 600;
}

.role-check span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.role-check i {
    font-size: 14px;
}

.form-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    margin-bottom: 20px;
}

.form-checkbox input { accent-color: var(--red); }

/* ============ ROUND CHECKBOXES (table selection) ============ */
input[type="checkbox"].row-checkbox,
input[type="checkbox"]#selectAll {
    appearance: none;
    -webkit-appearance: none;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    border: 2px solid #ccc;
    background: white;
    cursor: pointer;
    position: relative;
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
    vertical-align: middle;
}
input[type="checkbox"].row-checkbox:hover,
input[type="checkbox"]#selectAll:hover {
    border-color: var(--red);
}
input[type="checkbox"].row-checkbox:checked,
input[type="checkbox"]#selectAll:checked {
    background: var(--red);
    border-color: var(--red);
}
input[type="checkbox"].row-checkbox:checked::after,
input[type="checkbox"]#selectAll:checked::after {
    content: '';
    display: block;
    width: 4px;
    height: 8px;
    border: 2px solid white;
    border-top: none;
    border-left: none;
    position: absolute;
    top: 1px;
    left: 5px;
    transform: rotate(45deg);
}
input[type="checkbox"]#selectAll:indeterminate {
    background: var(--red);
    border-color: var(--red);
}
input[type="checkbox"]#selectAll:indeterminate::after {
    content: '';
    display: block;
    width: 8px;
    height: 2px;
    background: white;
    position: absolute;
    top: 5px;
    left: 2px;
}

/* ============ FILTER BAR ============ */
.filter-bar {
    background: var(--white);
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.10);
    display: flex;
    gap: 15px;
    align-items: end;
    flex-wrap: wrap;
    position: sticky;
    top: var(--header-height);
    z-index: 40;
}

.filter-bar .form-group {
    margin-bottom: 0;
    flex: 1;
    min-width: 180px;
}

/* ============ EMPTY STATE ============ */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-text);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.4;
}

.empty-state p {
    margin-bottom: 20px;
}

/* ============ NOTIFICATION DOT ============ */
.notification-item {
    display: flex;
    gap: 12px;
    padding: 15px;
    border-bottom: 1px solid var(--border);
    transition: background 0.2s;
}

.notification-item:hover { background: var(--gray-light); }

.notification-item.unread {
    background: rgba(220,12,0,0.03);
    border-left: 3px solid var(--red);
}

.notification-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--red);
    flex-shrink: 0;
    margin-top: 6px;
}

/* ============ TIMELINE (booking detail) ============ */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 25px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -25px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
    border: 2px solid var(--white);
}

.timeline-item.active::before {
    background: var(--red);
}

.timeline-item .timeline-date {
    font-size: 11px;
    color: var(--gray-text);
    margin-bottom: 4px;
}

/* ============ DETAIL GRID ============ */
.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 20px;
}

.detail-item {
    padding: 12px 0;
}

.detail-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--gray-text);
    font-weight: 600;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 600;
    color: var(--dark);
}

.detail-value.highlight {
    color: var(--red);
    font-size: 1.2em;
}

/* ============ ETA STATUS ============ */
.eta-changed {
    background: #fff3cd;
    font-weight: 700;
}

.eta-delayed {
    background: #f8d7da;
    font-weight: 700;
}

/* ============ COMMENTS ============ */
.comment {
    padding: 15px;
    border-bottom: 1px solid var(--border);
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
}

.comment-author {
    font-weight: 600;
    font-size: 13px;
}

.comment-date {
    font-size: 11px;
    color: var(--gray-text);
}

.comment-text {
    font-size: 13px;
    line-height: 1.6;
}

/* ============ SECTION GRID (dashboard) ============ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .detail-grid { grid-template-columns: 1fr 1fr; }
    .form-grid-3 { grid-template-columns: 1fr 1fr; }
    .role-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
    }

    .menu-toggle-portal {
        display: block;
    }

    .page-content {
        padding: 20px 15px;
    }

    .portal-header {
        padding: 0 15px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-card {
        padding: 16px;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .form-grid, .form-grid-3 {
        grid-template-columns: 1fr;
    }

    .role-grid {
        grid-template-columns: 1fr;
    }

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

    .filter-bar {
        flex-direction: column;
    }

    .filter-bar .form-group {
        min-width: 100%;
    }
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
}

.sidebar-overlay.active {
    display: block;
}

/* ============ DOSSIER & RELATIE BADGES ============ */
.badge-open { background: #cce5ff; color: #004085; }
.badge-in_transit { background: #fff3cd; color: #856404; }
.badge-arrived { background: #d4edda; color: #155724; }
.badge-closed { background: #e2e3e5; color: #383d41; }
.badge-afgehandeld { background: #d4edda; color: #155724; }

.badge-customer { background: #d4edda; color: #155724; }
.badge-supplier { background: #cce5ff; color: #004085; }
.badge-both { background: #e2d4f0; color: #5a2d82; }

/* Transport mode icons */
.mode-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    font-size: 14px;
}
.mode-sea { background: rgba(0,161,222,0.12); color: var(--maersk); }
.mode-air { background: rgba(253,126,20,0.12); color: var(--orange); }
.mode-road { background: rgba(40,167,69,0.12); color: var(--green); }
.mode-rail { background: rgba(102,16,242,0.12); color: #6610f2; }

/* Incoterm badge */
.badge-incoterm {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    background: rgba(255,255,255,0.2);
    color: white;
    letter-spacing: 0.5px;
}

/* Document type badges */
.badge-doc {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}
.badge-doc-bl { background: #fce4ec; color: #c62828; }
.badge-doc-commercial_invoice { background: #e8f5e9; color: #2e7d32; }
.badge-doc-packing_list { background: #e3f2fd; color: #1565c0; }
.badge-doc-certificate_of_origin { background: #fff3e0; color: #e65100; }
.badge-doc-customs_doc { background: #f3e5f5; color: #6a1b9a; }
.badge-doc-other { background: #eceff1; color: #546e7a; }

/* Inline add form (containers) */
.inline-add-form {
    display: none;
    padding: 15px;
    background: var(--bg);
    border-radius: 8px;
    border: 1px dashed var(--border);
}
.inline-add-form.visible {
    display: block;
}

/* File size styling */
.file-size {
    font-size: 12px;
    color: var(--gray-text);
    white-space: nowrap;
}

/* Section title (for detail pages) */
.section-title {
    font-family: 'Contrail One', cursive;
    font-size: 1.1rem;
    color: var(--dark);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============ DOSSIER DENSE HEADER (Professional) ============ */
.dossier-dense-header {
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07), 0 0 0 1px rgba(0,0,0,0.04);
    margin-bottom: 0;
    overflow: visible;
    border-top: 3px solid var(--red);
    position: relative;
    z-index: 10;
}

.dossier-dense-header .card-header-dark {
    padding: 16px 28px;
    font-size: 1.1rem;
    border-radius: 0;
    background: linear-gradient(135deg, var(--dark) 0%, #2a2929 100%);
    letter-spacing: 0.3px;
}

.dense-body {
    padding: 0;
}

/* Section dividers within dense body */
.dense-section {
    padding: 18px 28px;
    border-bottom: 1px solid #eaedf0;
}

.dense-section:nth-child(odd) {
    background: #f8f9fb;
}

.dense-section:nth-child(even) {
    background: var(--white);
}

.dense-section:last-child { border-bottom: none; }

.dense-section-label {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--red);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.dense-section-label::before {
    content: '';
    width: 3px;
    height: 13px;
    background: var(--red);
    border-radius: 2px;
    display: inline-block;
}

.dense-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 28px;
    align-items: flex-end;
}

/* Stacked field: label boven waarde */
.dense-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    flex: 1;
    min-width: 120px;
}

/* Size variants for fields */
.dense-field.field-xs { flex: 0 0 auto; min-width: 70px; max-width: 90px; }
.dense-field.field-sm { flex: 0 0 auto; min-width: 100px; max-width: 140px; }
.dense-field.field-md { flex: 1; min-width: 140px; max-width: 220px; }
.dense-field.field-lg { flex: 2; min-width: 180px; }

.dense-field label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #8a8f98;
    white-space: nowrap;
    line-height: 1;
}

.dense-field .dense-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    padding: 7px 0;
}

.dense-field .dense-value a {
    color: var(--red);
    font-weight: 700;
}

.dense-field .dense-input {
    padding: 7px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    background: var(--white);
    width: 100%;
    min-width: 0;
    transition: border-color 0.2s, box-shadow 0.2s;
    line-height: 1.4;
    color: var(--dark);
    box-sizing: border-box;
}

.dense-field .dense-input:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220,12,0,0.08);
}

.dense-field .dense-select {
    padding: 7px 12px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    background: var(--white);
    width: 100%;
    min-width: 0;
    transition: border-color 0.2s;
    line-height: 1.4;
    cursor: pointer;
    color: var(--dark);
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23666' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 32px;
}

.dense-field .dense-select:focus {
    outline: none;
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(220,12,0,0.08);
}

.dense-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #8a8f98;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding-top: 18px;
    cursor: pointer;
    flex: 0 0 auto;
    min-width: auto;
}

.dense-checkbox input { accent-color: var(--red); width: 17px; height: 17px; cursor: pointer; }
.dense-checkbox.checked-on { color: var(--green); }

/* ============ QUICK-NAV BAR ============ */
.dossier-quicknav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 24px;
    background: var(--white);
    border-radius: 10px 10px 0 0;
    border-bottom: 1px solid var(--border);
    font-size: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dossier-quicknav a {
    color: var(--gray-text);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 6px;
    transition: all 0.15s;
    border: 1px solid transparent;
}

.dossier-quicknav a:hover {
    color: var(--red);
    background: rgba(220,12,0,0.04);
    border-color: rgba(220,12,0,0.15);
}

.dossier-quicknav .quicknav-search {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dossier-quicknav .quicknav-search input {
    padding: 3px 10px;
    border: 1px solid var(--border);
    border-radius: 4px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    width: 160px;
    background: var(--white);
}

.dossier-quicknav .quicknav-search input:focus {
    outline: none;
    border-color: var(--red);
}

/* ============ AUTOCOMPLETE DROPDOWN ============ */
.autocomplete-wrapper {
    position: relative;
    width: 100%;
}

.autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 280px;
    background: var(--white);
    border: 1px solid #d0d5dd;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    z-index: 200;
    max-height: 260px;
    overflow-y: auto;
    display: none;
}

.autocomplete-dropdown.visible {
    display: block;
}

.autocomplete-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background 0.1s;
    border-bottom: 1px solid #f5f5f5;
}

.autocomplete-item:last-child { border-bottom: none; }

.autocomplete-item:hover,
.autocomplete-item.highlighted {
    background: rgba(220,12,0,0.05);
}

.autocomplete-item .ac-code {
    font-weight: 700;
    color: var(--dark);
    font-size: 11.5px;
    min-width: 55px;
    font-family: monospace;
}

.autocomplete-item .ac-name {
    color: var(--text);
    font-weight: 500;
}

.autocomplete-item .ac-country {
    color: #999;
    font-size: 11px;
    margin-left: auto;
}

.autocomplete-item .ac-flag {
    font-size: 14px;
}

.autocomplete-loading {
    padding: 12px;
    text-align: center;
    color: var(--gray-text);
    font-size: 11px;
}

.autocomplete-empty {
    padding: 12px;
    text-align: center;
    color: var(--gray-text);
    font-size: 11px;
    font-style: italic;
}

/* ============ DOSSIER TABS (ERN-SPED style) ============ */
.dossier-tabs {
    display: flex;
    background: var(--white);
    border-bottom: 2px solid #e0e0e0;
    padding: 0 20px;
    gap: 0;
    overflow-x: auto;
    margin-top: 12px;
    border-radius: 10px 10px 0 0;
}

.dossier-tab {
    padding: 14px 22px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-text);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 7px;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: 'Montserrat', sans-serif;
}

.dossier-tab:hover {
    color: var(--dark);
    background: rgba(0,0,0,0.02);
}

.dossier-tab.active {
    color: var(--red);
    border-bottom-color: var(--red);
    background: rgba(220,12,0,0.02);
}

.dossier-tab .tab-count {
    background: #eee;
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
    color: var(--gray-text);
}

.dossier-tab.active .tab-count {
    background: rgba(220,12,0,0.12);
    color: var(--red);
}

.tab-panel {
    display: none;
    background: var(--white);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    min-height: 200px;
}

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

.tab-panel-body {
    padding: 20px;
}

/* Placeholder tab content */
.placeholder-tab {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-text);
}

.placeholder-tab i {
    font-size: 2.5rem;
    opacity: 0.25;
    margin-bottom: 12px;
}

.placeholder-tab p {
    font-size: 13px;
    margin-bottom: 5px;
}

/* ============ DOSSIER FOOTER BAR ============ */
.dossier-footer-bar {
    position: sticky;
    bottom: 0;
    background: linear-gradient(135deg, var(--dark) 0%, #2a2929 100%);
    color: var(--white);
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    border-radius: 10px;
    margin-top: 12px;
    box-shadow: 0 -2px 16px rgba(0,0,0,0.2);
    z-index: 30;
}

.footer-stats {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.footer-stat-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255,255,255,0.5);
    font-weight: 600;
}

.footer-stat-value {
    font-family: 'Contrail One', cursive;
    font-size: 1.1rem;
    color: var(--white);
}

/* ============ DENSE DATA TABLE ============ */
.data-table-dense thead th {
    padding: 8px 10px;
    font-size: 10.5px;
}

.data-table-dense tbody td {
    padding: 6px 10px;
    font-size: 12.5px;
}

/* ============ RECORD COUNT ============ */
.record-count {
    font-size: 12px;
    color: var(--gray-text);
    font-weight: 600;
    padding: 8px 0;
}

/* ============ FLATPICKR OVERRIDES ============ */
.flatpickr-calendar {
    border-radius: 8px !important;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    border: 1px solid #ddd !important;
}

.flatpickr-months {
    background: var(--dark) !important;
    border-radius: 8px 8px 0 0 !important;
    padding: 4px 0 !important;
}

.flatpickr-months .flatpickr-month,
.flatpickr-months .flatpickr-prev-month,
.flatpickr-months .flatpickr-next-month {
    color: white !important;
    fill: white !important;
}

.flatpickr-current-month .flatpickr-monthDropdown-months {
    background: var(--dark) !important;
    color: white !important;
}

.flatpickr-current-month input.cur-year {
    color: white !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: var(--red) !important;
    border-color: var(--red) !important;
}

.flatpickr-day.today {
    border-color: var(--red) !important;
}

.flatpickr-day:hover {
    background: rgba(220,12,0,0.1) !important;
}

/* ============ OPERATIONS PAGE TABS ============ */
.ops-tabs {
    display: flex;
    gap: 0;
    background: var(--white);
    border-radius: 10px 10px 0 0;
    border-bottom: 2px solid #e0e0e0;
    padding: 0;
    margin-bottom: 0;
}

.ops-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 16px 28px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-text);
    text-decoration: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: all 0.15s;
    white-space: nowrap;
}

.ops-tab:hover {
    color: var(--dark);
    background: rgba(0,0,0,0.02);
}

.ops-tab.active {
    color: var(--red);
    border-bottom-color: var(--red);
    background: rgba(220,12,0,0.02);
}

.ops-tab i {
    font-size: 15px;
}

.ops-tab .ops-count {
    background: #eee;
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 10px;
    font-weight: 800;
}

.ops-tab.active .ops-count {
    background: rgba(220,12,0,0.12);
    color: var(--red);
}

.ops-content {
    background: var(--white);
    border-radius: 0 0 10px 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    padding: 0;
}

.ops-content .filter-bar {
    border-radius: 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border);
}

/* Sub-tabs (binnen Stamgegevens) */
.sub-tabs {
    display: flex;
    gap: 0;
    padding: 0 20px;
    background: #f8f8f8;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.sub-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 12px 18px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-text);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: all 0.15s;
    white-space: nowrap;
}

.sub-tab:hover {
    color: var(--dark);
    background: rgba(0,0,0,0.02);
}

.sub-tab.active {
    color: var(--red);
    border-bottom-color: var(--red);
    background: var(--white);
}

.sub-tab i {
    font-size: 13px;
}

.sub-count {
    background: #e8e8e8;
    padding: 1px 7px;
    border-radius: 100px;
    font-size: 9px;
    font-weight: 800;
    color: var(--gray-text);
}

.sub-tab.active .sub-count {
    background: rgba(220,12,0,0.10);
    color: var(--red);
}

/* BTW badge kleuren */
.badge-sm {
    font-size: 10px;
    padding: 2px 8px;
}

.badge-vat-high {
    background: rgba(220,12,0,0.10);
    color: var(--red);
    font-weight: 700;
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 4px;
}

.badge-vat-zero {
    background: #f0f0f0;
    color: var(--gray-text);
    font-size: 11px;
    padding: 2px 10px;
    border-radius: 4px;
}

/* ============ RESPONSIVE: Dense header ============ */
@media (max-width: 1200px) {
    .dense-row { gap: 8px 16px; }
    .dense-section { padding: 14px 20px; }
    .dense-field.field-lg { min-width: 150px; }
    .dense-field.field-md { min-width: 120px; }
}

@media (max-width: 768px) {
    .dense-row { flex-direction: column; gap: 8px; }
    .dense-section { padding: 12px 16px; }
    .dense-field, .dense-field.field-xs, .dense-field.field-sm,
    .dense-field.field-md, .dense-field.field-lg { flex: 1 1 100%; max-width: 100%; min-width: 0; }
    .dossier-quicknav { flex-wrap: wrap; gap: 6px; }
    .dossier-tabs { gap: 0; }
    .dossier-tab { padding: 10px 14px; font-size: 11px; }
    .footer-stats { gap: 12px; }
    .dossier-footer-bar { flex-direction: column; text-align: center; }
    .autocomplete-dropdown { max-height: 180px; min-width: 100%; }
    .ops-tabs { overflow-x: auto; }
    .ops-tab { padding: 12px 18px; font-size: 11.5px; }
    .sub-tabs { padding: 0 12px; }
    .sub-tab { padding: 10px 12px; font-size: 11px; }
}

/* ============ KOSTENREGELS / TARIEVEN TAB ============ */
.cost-section { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.cost-section-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 10px 16px; background: var(--dark); color: var(--white);
    font-size: 12px; font-weight: 600;
}
.cost-section-header .btn { color: #fff; border-color: rgba(255,255,255,0.4); }
.cost-section-header .btn:hover { border-color: #fff; color: #fff; background: rgba(255,255,255,0.1); }
.cost-section-count { opacity: 0.5; margin-left: 8px; font-weight: 400; }
.cost-table-wrap { overflow-x: auto; }
.cost-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.cost-table thead th {
    background: #f8f8f8; padding: 6px 8px; font-size: 10px; text-transform: uppercase;
    letter-spacing: 0.3px; color: var(--gray-text); font-weight: 700;
    border-bottom: 1px solid var(--border); white-space: nowrap;
}
.cost-table tbody td {
    padding: 5px 8px; border-bottom: 1px solid #f0f0f0; vertical-align: middle;
}
.cost-table tbody tr:hover { background: #fafafa; }
.cost-table .text-right { text-align: right; }
.cost-table .text-center { text-align: center; }
.cost-table .text-truncate { max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cost-table .cost-amount { font-weight: 700; font-family: 'Montserrat', sans-serif; }
.cost-total-row td {
    padding: 8px 8px; background: #f5f5f5; border-top: 2px solid var(--border);
    font-size: 12px;
}
.cost-code-badge {
    display: inline-block; background: var(--dark); color: var(--white);
    font-size: 10px; padding: 1px 6px; border-radius: 3px; font-weight: 700;
    letter-spacing: 0.5px;
}
.vat-badge {
    display: inline-block; background: #f0f0f0; color: var(--gray-text);
    font-size: 10px; padding: 1px 5px; border-radius: 3px; font-weight: 600;
}
.status-dot {
    display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle;
}
.status-dot.status-open { background: #FFC107; }
.status-dot.status-invoiced { background: #2196F3; }
.status-dot.status-paid { background: #4CAF50; }

.btn-icon {
    background: none; border: none; cursor: pointer; padding: 2px 4px;
    color: var(--gray-text); font-size: 13px; transition: color 0.15s;
}
.btn-icon:hover { color: var(--dark); }
.btn-icon-danger:hover { color: var(--red); }

/* Task Checklist */
.task-checklist { padding: 0; }
.task-item {
    display: flex; align-items: center; padding: 10px 16px;
    border-bottom: 1px solid var(--border); gap: 12px; transition: background 0.15s;
}
.task-item:hover { background: var(--gray-light); }
.task-item.task-done { opacity: 0.55; }
.task-item.task-done .task-title { text-decoration: line-through; }
.task-checkbox { cursor: pointer; font-size: 20px; color: var(--gray-text); transition: color 0.15s; }
.task-checkbox:hover { color: var(--red); }
.task-done .task-checkbox { color: #4CAF50; }
.task-content { flex: 1; display: flex; flex-direction: column; }
.task-title { font-size: 13px; font-weight: 600; }
.task-meta { font-size: 11px; color: var(--gray-text); margin-top: 2px; }
.task-progress-bar { height: 4px; background: #eee; }
.task-progress-fill { height: 100%; background: #4CAF50; transition: width 0.3s; border-radius: 2px; }

/* Autocomplete wrapper & z-index fix */
.autocomplete-wrapper { position: relative; z-index: 1; }
.dense-field:has(.autocomplete-dropdown.visible) { z-index: 9999; position: relative; }
.dense-section:has(.autocomplete-dropdown.visible) { z-index: 9999; position: relative; }
.dense-row:has(.autocomplete-dropdown.visible) { z-index: 9999; position: relative; }
.autocomplete-dropdown { z-index: 9999; }
.dense-section { overflow: visible; }
.dense-row { overflow: visible; }

/* Marge balk */
.cost-margin-bar {
    display: flex; align-items: center; gap: 24px; margin-top: 12px;
    padding: 12px 16px; background: var(--dark); color: var(--white);
    border-radius: 8px; font-size: 13px;
}
.cost-margin-item { display: flex; flex-direction: column; gap: 2px; }
.cost-margin-item span { font-size: 10px; opacity: 0.5; text-transform: uppercase; letter-spacing: 0.5px; }
.cost-margin-item strong { font-family: 'Contrail One', cursive; font-size: 1.2rem; }
.cost-margin-item small { font-size: 10px; opacity: 0.6; }
.cost-margin-saldo.positive strong { color: #4CAF50; }
.cost-margin-saldo.negative strong { color: #FF5252; }

/* Footer divider & financial colors */
.footer-divider { width: 1px; height: 24px; background: rgba(255,255,255,0.2); margin: 0 4px; }
.text-positive { color: #4CAF50 !important; }
.text-negative { color: #FF5252 !important; }

/* Update knop naast booking ref */
.btn-update-carrier {
    background: var(--dark);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 12px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: all 0.2s;
    height: 28px;
}
.btn-update-carrier:hover { background: var(--red); }
.btn-update-carrier:disabled { opacity: 0.5; cursor: wait; }
.btn-update-carrier i { font-size: 12px; }

/* ============ OPDRACHTEN TAB (Transport Orders v3) ============ */

/* Grid layout: formulier links, preview rechts */
.to-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 420px;
}
.to-col {
    overflow: visible;
}
.to-col:first-child {
    border-right: 1px solid #eaedf0;
}

/* Dense section title (met actieknop rechts) */
.dense-section-title {
    font-size: 10.5px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.8px;
    color: var(--red);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.to-link-btn {
    font-size: 10px;
    font-weight: 600;
    color: var(--red);
    background: none;
    border: 1px solid var(--red);
    border-radius: 4px;
    padding: 3px 10px;
    cursor: pointer;
    transition: all 0.15s;
    text-transform: none;
    letter-spacing: 0;
}
.to-link-btn:hover { background: var(--red); color: #fff; }

/* Dense grid utilities */
.dense-grid { display: grid; gap: 8px 16px; }
.dense-grid-1 { grid-template-columns: 1fr; }
.dense-grid-2 { grid-template-columns: 1fr 1fr; }
.dense-grid-3 { grid-template-columns: 1fr 1fr 1fr; }

/* Toggle switch voor IMO */
.to-toggle {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    cursor: pointer;
}
.to-toggle input { opacity: 0; width: 0; height: 0; }
.to-toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 20px;
    transition: 0.2s;
}
.to-toggle-slider::before {
    content: '';
    position: absolute;
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.2s;
}
.to-toggle input:checked + .to-toggle-slider { background: var(--red); }
.to-toggle input:checked + .to-toggle-slider::before { transform: translateX(18px); }

/* --- Preview card (rechterkolom) --- */
.to-preview-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #f8f9fb;
}
.to-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--dark);
    color: #fff;
}
.to-preview-title {
    font-family: 'Contrail One', cursive;
    font-size: 14px;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.to-preview-title i { color: var(--red); font-size: 16px; }
.to-preview-meta {
    font-size: 11px;
    opacity: 0.6;
    font-family: 'Montserrat', sans-serif;
}
.to-preview-body {
    flex: 1;
    padding: 20px;
    font-size: 13px;
    color: var(--dark);
    line-height: 1.6;
    overflow-y: auto;
    background: #fff;
    margin: 16px;
    border-radius: 6px;
    border: 1px solid #eaedf0;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.to-preview-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-top: 1px solid #eaedf0;
    background: #fff;
}

/* Document content elements (inside preview body) */
.to-doc-instruction {
    font-size: 14px;
    padding: 12px 16px;
    background: #fff8f8;
    border-left: 3px solid var(--red);
    border-radius: 0 6px 6px 0;
    margin-bottom: 16px;
}
.to-doc-block {
    margin-bottom: 14px;
}
.to-doc-block-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #999;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}
.to-doc-block-value {
    font-size: 13px;
    line-height: 1.5;
}
.to-doc-tag {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 3px;
    letter-spacing: 0.5px;
    vertical-align: middle;
}
.to-doc-tag-orange {
    background: #FFF3E0;
    color: #E65100;
    border: 1px solid #FFB74D;
}
.to-doc-muted { color: #aaa; font-style: italic; }

/* Terminal tabel */
.to-doc-table {
    margin: 14px 0;
    border: 1px solid #eaedf0;
    border-radius: 6px;
    overflow: hidden;
}
.to-doc-table-row {
    display: flex;
    border-bottom: 1px solid #eaedf0;
}
.to-doc-table-row:last-child { border-bottom: none; }
.to-doc-table-sep { height: 0; border-bottom: 2px solid #eaedf0; }
.to-doc-table-cell {
    padding: 8px 12px;
    font-size: 12.5px;
    flex: 1;
}
.to-doc-table-label {
    flex: 0 0 120px;
    font-weight: 700;
    color: #666;
    background: #f8f9fb;
    font-size: 11px;
}

/* Deadlines */
.to-doc-deadlines {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid #eaedf0;
}
.to-doc-deadline-grid {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}
.to-doc-deadline {
    flex: 1;
    padding: 10px 14px;
    background: #FFF8E1;
    border: 1px solid #FFE082;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.to-doc-deadline span {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #999;
}
.to-doc-deadline strong {
    font-size: 13px;
    color: #E65100;
}

@media (max-width: 900px) {
    .to-grid { grid-template-columns: 1fr; }
    .to-col:first-child { border-right: none; border-bottom: 1px solid #eaedf0; }
    .dense-grid-2, .dense-grid-3 { grid-template-columns: 1fr; }
}

/* E-docs drag & drop zones */
.edoc-zone {
    border: 2px dashed #ddd; border-radius: 8px; padding: 10px;
    cursor: pointer; transition: all 0.2s; min-height: 80px;
    display: flex; flex-direction: column; background: #fff;
}
.edoc-zone:hover { border-color: #aaa; background: #fafafa; }
.edoc-zone-hover { border-color: var(--red) !important; background: #fff5f5 !important; transform: scale(1.02); }
.edoc-zone-filled { border-style: solid; border-color: #4CAF50; background: #f8fdf8; }
.edoc-zone-header {
    display: flex; align-items: center; gap: 6px; font-size: 11px;
    font-weight: 600; color: var(--dark); padding-bottom: 6px;
    border-bottom: 1px solid #eee; margin-bottom: 6px;
}
.edoc-zone-header i { font-size: 14px; color: var(--red); }
.edoc-zone-filled .edoc-zone-header i { color: #4CAF50; }
.edoc-count {
    background: #4CAF50; color: #fff; font-size: 9px; font-weight: 700;
    padding: 1px 5px; border-radius: 8px; margin-left: auto;
}
.edoc-zone-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; color: #bbb; gap: 2px;
}
.edoc-zone-empty i { font-size: 20px; }
.edoc-zone-empty span { font-size: 10px; }
.edoc-files { display: flex; flex-direction: column; gap: 3px; }
.edoc-file {
    display: flex; align-items: center; justify-content: space-between;
    padding: 2px 4px; border-radius: 4px; font-size: 11px;
}
.edoc-file:hover { background: rgba(0,0,0,0.04); }
.edoc-filename {
    color: var(--dark); text-decoration: none; display: flex;
    align-items: center; gap: 4px; overflow: hidden;
}
.edoc-filename:hover { color: var(--red); }
.edoc-filename i { font-size: 12px; color: #999; }
.edoc-delete {
    background: none; border: none; color: #ccc; cursor: pointer;
    padding: 2px; font-size: 14px; line-height: 1; flex-shrink: 0;
}
.edoc-delete:hover { color: var(--red); }
.edoc-uploading { opacity: 0.5; pointer-events: none; }

/* Modal overlay */
.modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(3px);
    display: flex; justify-content: center; align-items: center;
}
.modal-content {
    background: var(--white); border-radius: 12px;
    max-width: 90vw; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.modal-header h3 {
    margin: 0; font-family: 'Contrail One', cursive; font-size: 16px; color: var(--dark);
}
.modal-close {
    background: none; border: none; font-size: 22px; cursor: pointer;
    color: #999; padding: 4px 8px;
}
.modal-close:hover { color: var(--dark); }
.modal-body { padding: 16px 20px; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px;
    padding: 12px 20px; border-top: 1px solid var(--border);
}

/* ============ DOSSIER HISTORY TIMELINE ============ */
.history-timeline { padding: 4px 0; }
.history-item {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 10px 0; border-bottom: 1px solid #f2f2f2;
    position: relative;
}
.history-item:last-child { border-bottom: none; }
.history-icon {
    width: 30px; height: 30px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; flex-shrink: 0;
}
.hi-created { background: #E8F5E9; color: #2E7D32; }
.hi-updated { background: #E3F2FD; color: #1565C0; }
.hi-carrier { background: #FFF3E0; color: #E65100; }
.hi-doc { background: #F3E5F5; color: #7B1FA2; }
.hi-container { background: #E0F2F1; color: #00695C; }
.hi-email { background: #FCE4EC; color: #C62828; }
.hi-finance { background: #FFF8E1; color: #F57F17; }
.hi-cost { background: #FFF8E1; color: #F57F17; }
.hi-task { background: #E8EAF6; color: #283593; }
.hi-default { background: #F5F5F5; color: #616161; }
.history-content { flex: 1; min-width: 0; }
.history-desc {
    font-size: 12px; color: var(--dark); font-weight: 500;
    line-height: 1.4; word-break: break-word;
}
.history-meta {
    display: flex; gap: 12px; align-items: center;
    margin-top: 3px; font-size: 11px; color: #999;
}
.history-time { font-variant-numeric: tabular-nums; }
.history-user { display: flex; align-items: center; gap: 3px; }

/* ============ FETCH RESULT MODAL ============ */
.fetch-modal-overlay {
    position: fixed; inset: 0; z-index: 10000;
    background: rgba(31,30,30,0.55); backdrop-filter: blur(4px);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: opacity 0.2s ease;
}
.fetch-modal-overlay.visible { opacity: 1; }
.fetch-modal {
    background: #fff; border-radius: 10px; width: 420px; max-width: 92vw;
    box-shadow: 0 16px 48px rgba(0,0,0,0.25);
    transform: translateY(12px); transition: transform 0.25s ease;
}
.fetch-modal-overlay.visible .fetch-modal { transform: translateY(0); }
.fetch-modal-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px; border-bottom: 1px solid var(--border);
}
.fetch-modal-icon {
    width: 36px; height: 36px; border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; flex-shrink: 0;
}
.fetch-modal-icon.success { background: #E8F5E9; color: #2E7D32; }
.fetch-modal-icon.warning { background: #FFF3E0; color: #E65100; }
.fetch-modal-icon.error { background: #FFEBEE; color: #C62828; }
.fetch-modal-header h3 {
    margin: 0; font-family: 'Contrail One', cursive; font-size: 15px;
    color: var(--dark); font-weight: 400;
}
.fetch-modal-body { padding: 16px 20px; }
.fetch-result-list { list-style: none; padding: 0; margin: 0; }
.fetch-result-item {
    display: flex; align-items: center; gap: 10px;
    padding: 7px 0; border-bottom: 1px solid #f2f2f2; font-size: 12px;
}
.fetch-result-item:last-child { border-bottom: none; }
.fetch-result-item i {
    width: 18px; text-align: center; font-size: 11px; flex-shrink: 0;
}
.fetch-result-item i.bi-check-circle-fill { color: #2E7D32; }
.fetch-result-item i.bi-info-circle-fill { color: #1565C0; }
.fetch-result-item i.bi-exclamation-triangle-fill { color: #E65100; }
.fetch-result-label { color: #888; min-width: 90px; font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: 0.3px; }
.fetch-result-value { color: var(--dark); font-weight: 500; }
.fetch-msg-list { margin: 10px 0 0; padding: 0; list-style: none; }
.fetch-msg-item {
    padding: 5px 0; font-size: 11px; color: #666;
    display: flex; gap: 6px; align-items: flex-start;
}
.fetch-msg-item i { flex-shrink: 0; margin-top: 1px; }
.fetch-modal-footer {
    padding: 12px 20px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end;
}
.fetch-modal-close {
    background: var(--dark); color: #fff; border: none; border-radius: 6px;
    padding: 7px 22px; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: background 0.15s;
}
.fetch-modal-close:hover { background: var(--red); }

/* ============ INVOICE BADGES ============ */
.badge { display: inline-block; padding: 2px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.badge-warning { background: #FFF3CD; color: #856404; }
.badge-info { background: #D1ECF1; color: #0C5460; }
.badge-success { background: #D4EDDA; color: #155724; }

/* ============ TARIFF INLINE EDIT ============ */
.tariff-edit {
    border: 1px solid transparent; background: transparent; padding: 2px 4px;
    font-size: 12px; font-family: inherit; border-radius: 3px; color: var(--dark);
}
.tariff-edit:hover { border-color: #ddd; background: #fafafa; }
.tariff-edit:focus { border-color: var(--red); background: #fff; outline: none; box-shadow: 0 0 0 2px rgba(220,12,0,0.1); }
select.tariff-edit { cursor: pointer; -webkit-appearance: none; padding-right: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4'%3E%3Cpath d='M0 0l4 4 4-4z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center; }
.tariff-group-body.collapsed { display: none; }
.tariff-group-body.collapsed + .tariff-group-body { display: none; }

/* Carrier picker display (inline tariff row) */
.tariff-carrier-display {
    padding: 2px 4px; font-size: 12px; border: 1px solid transparent;
    border-radius: 3px; cursor: pointer; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis; max-width: 136px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='4'%3E%3Cpath d='M0 0l4 4 4-4z' fill='%23999'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 4px center;
    padding-right: 16px;
}
.tariff-carrier-display:hover { border-color: #ddd; background-color: #fafafa; }

/* Shared carrier picker popup */
#carrierPickerPopup {
    display: none; position: absolute; z-index: 9999;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12); width: 240px;
}
#carrierPickerSearch {
    width: 100%; border: none; border-bottom: 1px solid var(--border);
    padding: 8px 10px; font-size: 12px; outline: none;
    border-radius: 6px 6px 0 0; box-sizing: border-box;
}
#carrierPickerSearch:focus { background: #fafafa; }
#carrierPickerResults { max-height: 220px; overflow-y: auto; }
.carrier-pick-option {
    padding: 6px 10px; font-size: 12px; cursor: pointer;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.carrier-pick-option:hover, .carrier-pick-option.carrier-pick-highlight { background: #f0f0f0; }
.carrier-pick-option.carrier-pick-selected { background: rgba(220,12,0,0.06); color: var(--red); font-weight: 600; }

/* Location autocomplete dropdown */
.location-ac-dropdown {
    display: none; position: absolute; z-index: 9999; top: 100%; left: 0; right: 0;
    background: #fff; border: 1px solid var(--border); border-radius: 6px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12); margin-top: 2px; max-height: 220px; overflow-y: auto;
}
.location-ac-option {
    padding: 8px 10px; font-size: 12px; cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
}
.location-ac-option:last-child { border-bottom: none; }
.location-ac-option:hover, .location-ac-option.location-ac-highlight { background: #f0f0f0; }

/* === Invoice Review Page === */
.review-input {
    border: 1px solid transparent;
    background: transparent;
    padding: 3px 5px;
    font-size: 11px;
    font-family: 'Montserrat', sans-serif;
    border-radius: 4px;
    transition: border-color 0.15s, background 0.15s;
}
.review-input:hover {
    border-color: var(--border);
    background: #fafafa;
}
.review-input:focus {
    border-color: var(--red);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 2px rgba(220,12,0,0.1);
}
.parsed-line td { padding: 4px 3px !important; vertical-align: middle; }

/* ============ PLANNING / KANBAN BOARD ============ */
.kanban-board {
    display: grid;
    gap: 14px;
    padding: 16px 0;
    min-height: calc(100vh - 180px);
    align-items: start;
}
.kanban-column {
    background: #f5f5f5;
    border-radius: 10px;
    min-height: 200px;
    display: flex;
    flex-direction: column;
}
.kanban-column-header {
    padding: 12px 14px;
    font-weight: 700;
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--dark);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border-radius: 10px 10px 0 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
}
.kanban-column-header i { font-size: 13px; }
.kanban-phase-hint {
    padding: 4px 14px;
    font-size: 9.5px;
    color: #aaa;
    background: #fafafa;
    border-bottom: 1px solid #f0f0f0;
    font-style: italic;
}
.kanban-count {
    background: var(--dark);
    color: #fff;
    padding: 2px 9px;
    border-radius: 100px;
    font-size: 10.5px;
    font-weight: 800;
}
.kanban-cards {
    padding: 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow-y: auto;
    max-height: calc(100vh - 250px);
}
.kanban-cards::-webkit-scrollbar { width: 4px; }
.kanban-cards::-webkit-scrollbar-thumb { background: #ccc; border-radius: 4px; }

/* Card */
.kanban-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.15s;
    border-left: 3px solid transparent;
}
.kanban-card:hover {
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}
.kanban-card-header {
    padding: 9px 11px 4px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.kanban-dossier-link {
    font-family: 'Contrail One', cursive;
    font-size: 15px;
    color: var(--dark);
    text-decoration: none;
}
.kanban-dossier-link:hover { color: var(--red); }
.kanban-badges { display: flex; gap: 3px; flex-shrink: 0; }
.kanban-badge {
    font-size: 9px;
    padding: 1px 6px;
    border-radius: 3px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}
.kb-fcl { background: #e3f2fd; color: #1565c0; }
.kb-lcl { background: #fff3e0; color: #e65100; }
.kb-other { background: #f5f5f5; color: #666; }
.kb-maersk { background: #e0f4ff; color: #0079bf; }
.kb-msc { background: #e8eaf6; color: #002b5c; }
.kb-hapag { background: #fff3e0; color: #ff6600; }
.kb-cma { background: #e3f2fd; color: #003da5; }
.kb-carrier { background: #f5f5f5; color: #555; }

/* Card body */
.kanban-card-body { padding: 2px 11px 6px; }
.kanban-field {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #666;
    padding: 1px 0;
    line-height: 1.3;
}
.kanban-field i { font-size: 11px; width: 13px; text-align: center; color: #aaa; flex-shrink: 0; }
.kanban-field-bold span { font-weight: 700; color: var(--dark); }
.kanban-customer { font-weight: 600; color: var(--dark); }

/* Alert badges */
.kanban-alert-badge {
    margin: 2px 11px 4px;
    padding: 3px 8px;
    background: rgba(220,12,0,0.08);
    color: #c62828;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.kanban-waiver-badge {
    margin: 2px 11px 6px;
    padding: 3px 8px;
    background: rgba(253,126,20,0.1);
    color: #e65100;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

/* Closings */
.kanban-closings {
    padding: 5px 11px;
    background: rgba(0,0,0,0.015);
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.closing-item {
    font-size: 10px;
    color: #777;
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #eee;
}
.closing-item strong { color: #555; margin-right: 2px; }

/* Tasks */
.kanban-tasks {
    padding: 6px 11px 8px;
    border-top: 1px solid #f0f0f0;
}
.kanban-task {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    padding: 1.5px 0;
    color: var(--dark);
}
.kanban-task i {
    cursor: pointer;
    font-size: 15px;
    color: #bbb;
    transition: color 0.15s;
}
.kanban-task i:hover { color: var(--red); }
.kanban-task.done { opacity: 0.45; }
.kanban-task.done span { text-decoration: line-through; }
.kanban-task.done i { color: #4CAF50; }

/* Key dates section */
.kanban-dates {
    padding: 5px 11px;
    background: rgba(0,0,0,0.02);
    border-top: 1px solid #f0f0f0;
}
.kanban-date-item {
    font-size: 10.5px;
    color: #555;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 1.5px 0;
}
.kanban-date-item i { font-size: 11px; width: 13px; text-align: center; color: #999; }
.kanban-date-item strong { color: var(--dark); font-size: 10px; min-width: 28px; }

/* Done history (taken uit eerdere fases) */
.kanban-done-history {
    padding: 5px 11px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.kanban-done-tag {
    font-size: 9.5px;
    color: #388e3c;
    background: rgba(76,175,80,0.08);
    padding: 2px 7px;
    border-radius: 3px;
    display: inline-flex;
    align-items: center;
    gap: 2px;
    white-space: nowrap;
}
.kanban-done-tag i { font-size: 10px; }

/* Operative badge */
.kanban-operative {
    padding: 4px 11px 6px;
    font-size: 10px;
    color: #999;
    border-top: 1px solid #f0f0f0;
}
.kanban-operative i { font-size: 10px; margin-right: 2px; }

/* Empty state */
.kanban-empty {
    text-align: center;
    padding: 40px 10px;
    color: #ccc;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

/* Planning Alle tab - tabelweergave */
.planning-all-list { padding: 16px 0; }
.planning-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
}
.planning-table thead th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--gray-text);
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.planning-table tbody td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}
.planning-table tbody tr:hover { background: #fafafa; }
.planning-row-alert { background: #fff5f5 !important; }
.planning-row-alert:hover { background: #ffecec !important; }
.planning-row-changed { position: relative; }
.planning-row-changed td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #1565c0;
}

/* Closing alert badge (kanban cards) */
.kanban-closing-changed {
    margin: 2px 11px 4px;
    padding: 6px 8px;
    background: rgba(21,101,192,0.08);
    color: #1565c0;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 700;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.closing-alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.closing-alert-header > span {
    display: flex;
    align-items: center;
    gap: 4px;
}
.closing-manage-btn {
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 3px;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    transition: background 0.15s;
}
.closing-manage-btn:hover {
    background: #0d47a1;
}
.closing-change-details {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-weight: 400;
    font-size: 10px;
}
.closing-change-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.closing-change-item small {
    color: #666;
    font-size: 9px;
}

/* Closing alert knop (tabelweergave) */
.table-closing-changed {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(21,101,192,0.12);
    color: #1565c0;
    font-size: 12px;
    cursor: pointer;
    border: none;
    transition: background 0.15s, transform 0.15s;
}
.table-closing-changed:hover {
    background: rgba(21,101,192,0.25);
    transform: scale(1.1);
}

/* Closing Alert Modal */
.closing-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.45);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.15s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.closing-modal {
    background: #fff;
    border-radius: 12px;
    width: 420px;
    max-width: 92vw;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    overflow: hidden;
    animation: slideUp 0.2s ease;
}
@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.closing-modal-header {
    background: var(--dark, #1F1E1E);
    color: #fff;
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 700;
}
.closing-modal-header i:first-child { font-size: 16px; color: #64b5f6; }
.closing-modal-close {
    margin-left: auto;
    background: none;
    border: none;
    color: #888;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.closing-modal-close:hover { color: #fff; }
.closing-modal-body {
    padding: 18px;
}
.closing-modal-dossier {
    font-size: 15px;
    margin-bottom: 14px;
    color: var(--dark, #1F1E1E);
}
.closing-modal-dossier i { color: #1565c0; margin-right: 4px; }
.closing-modal-changes {
    background: #f5f8ff;
    border: 1px solid #e0e8f5;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
}
.closing-modal-change-row {
    padding: 4px 0;
    font-size: 12.5px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 4px;
}
.closing-modal-change-row + .closing-modal-change-row {
    border-top: 1px solid #e8edf5;
}
.closing-modal-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.closing-modal-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 13px;
    color: #333;
    padding: 8px 12px;
    background: #f0faf0;
    border: 1px solid #c8e6c9;
    border-radius: 8px;
    transition: background 0.15s;
}
.closing-modal-option:hover { background: #e0f2e0; }
.closing-modal-option input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #2e7d32;
}
.closing-modal-option span {
    display: flex;
    align-items: center;
    gap: 6px;
}
.closing-modal-option i { color: #2e7d32; }
.closing-modal-notes input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12.5px;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s;
}
.closing-modal-notes input:focus { border-color: #1565c0; }
.closing-modal-footer {
    padding: 12px 18px;
    background: #fafafa;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}
.closing-modal-btn-cancel {
    padding: 8px 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 12.5px;
    cursor: pointer;
    font-family: inherit;
    color: #666;
    transition: background 0.15s;
}
.closing-modal-btn-cancel:hover { background: #f5f5f5; }
.closing-modal-btn-confirm {
    padding: 8px 20px;
    background: #1565c0;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: background 0.15s;
}
.closing-modal-btn-confirm:hover { background: #0d47a1; }
.closing-modal-btn-confirm.disabled {
    background: #b0bec5;
    cursor: not-allowed;
    opacity: 0.7;
}
.closing-modal-btn-confirm.disabled:hover { background: #b0bec5; }
.closing-modal-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #856404;
    margin-top: 10px;
}
.closing-modal-warning i { margin-right: 4px; }
.planning-phase-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 10.5px;
    font-weight: 600;
    white-space: nowrap;
}
.phase-nieuw { background: #e3f2fd; color: #1565c0; }
.phase-laden { background: #fff3e0; color: #e65100; }
.phase-documenten, .phase-docs_terminal { background: #fff8e1; color: #f57f17; }
.phase-verscheept, .phase-docs_verscheept { background: #fce4ec; color: #c62828; }

/* Deadline kleuring op kaarten */
.kanban-card-urgent { border-left: 4px solid #dc0c00 !important; background: #fff5f5; }
.kanban-card-warning { border-left: 4px solid #ff9800 !important; background: #fffbf0; }
.kb-deadline-urgent { background: #dc0c00 !important; color: #fff !important; animation: pulse-urgent 1.5s infinite; }
.kb-deadline-warning { background: #ff9800 !important; color: #fff !important; }
@keyframes pulse-urgent { 0%, 100% { opacity: 1; } 50% { opacity: 0.7; } }
.closing-urgent { background: #fce4ec !important; color: #c62828 !important; font-weight: 700; }
.planning-row-urgent { background: #ffebee !important; }
.planning-row-urgent:hover { background: #ffcdd2 !important; }
.planning-row-warning { background: #fff8e1 !important; }
.planning-row-warning:hover { background: #fff3c4 !important; }

/* Planning categorie tabs */
.planning-cat-tabs {
    display: flex;
    gap: 0;
    background: var(--white);
    border-bottom: 2px solid #eee;
    margin-bottom: 0;
}
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 14px 24px;
    font-size: 13px;
    font-weight: 700;
    color: var(--gray-text);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 3px solid transparent;
    transition: all 0.15s;
}
.cat-tab:hover { color: var(--dark); background: #fafafa; }
.cat-tab.active {
    color: var(--red);
    border-bottom-color: var(--red);
}
.cat-count {
    background: var(--red);
    color: #fff;
    font-size: 10px;
    padding: 1px 7px;
    border-radius: 10px;
    font-weight: 700;
}

/* Klant selectie chips */
.planning-customer-bar {
    display: flex;
    gap: 6px;
    padding: 10px 0 6px;
    flex-wrap: wrap;
    align-items: center;
}
.customer-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-text);
    background: #f0f0f0;
    text-decoration: none;
    transition: all 0.15s;
    white-space: nowrap;
}
.customer-chip:hover { background: #e0e0e0; color: var(--dark); }
.customer-chip.active {
    background: var(--dark);
    color: #fff;
}

/* Gestapelde customer boards */
.customer-board-section {
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}
.customer-board-section:last-child {
    border-bottom: none;
}
.kanban-board-stacked {
    min-height: 0 !important;
    padding: 8px 0 !important;
    gap: 10px !important;
}
.kanban-board-stacked .kanban-column {
    min-height: 0 !important;
}
.kanban-board-stacked .kanban-column-header {
    padding: 6px 10px !important;
    font-size: 11px !important;
}
.kanban-board-stacked .kanban-card {
    padding: 8px 10px !important;
    font-size: 12px;
}
.kanban-board-stacked .kanban-cards {
    gap: 6px !important;
    padding: 6px !important;
    flex: 0 !important;
}
.kanban-board-stacked .kanban-cards:empty {
    padding: 0 !important;
}
.customer-board-header {
    margin-bottom: 8px;
}
.customer-board-header h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 15px;
    font-weight: 700;
    color: var(--dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}
.customer-board-header h3 a {
    color: var(--dark);
    text-decoration: none;
}
.customer-board-header h3 a:hover {
    color: var(--red);
}
.customer-board-count {
    background: #e8e8e8;
    color: var(--gray-text);
    font-size: 11px;
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 700;
}

/* Week filter knoppen */
.planning-week-filters {
    display: flex;
    gap: 8px;
    padding: 12px 0 4px;
}
.week-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--gray-text);
    background: #f5f5f5;
    text-decoration: none;
    transition: all 0.15s;
}
.week-btn:hover { background: #e8e8e8; color: var(--dark); }
.week-btn.active { background: var(--dark); color: #fff; }

/* Kalenderweergave */
.planning-calendar { padding: 16px 0; }
.cal-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 16px;
}
.cal-title { font-size: 18px; font-weight: 700; min-width: 180px; text-align: center; }
.cal-nav {
    background: #f5f5f5;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 16px;
    cursor: pointer;
    font-weight: 700;
}
.cal-nav:hover { background: #e0e0e0; }
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
}
.cal-day-header {
    background: #f5f5f5;
    padding: 8px;
    text-align: center;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--gray-text);
}
.cal-cell {
    background: #fff;
    min-height: 90px;
    padding: 6px;
    vertical-align: top;
}
.cal-empty { background: #fafafa; }
.cal-today { background: #f0f7ff; }
.cal-today .cal-day-num { color: #1565c0; font-weight: 700; }
.cal-has-events { }
.cal-day-num { font-size: 12px; color: #888; margin-bottom: 4px; }
.cal-event {
    display: block;
    padding: 2px 5px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
    margin-bottom: 2px;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.cal-event:hover { opacity: 0.8; }
.cal-event-load { background: #e3f2fd; color: #1565c0; }
.cal-event-etd { background: #fff3e0; color: #e65100; }

/* ============ STATUS BADGES ============ */
.status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
    line-height: 1.4;
}

/* ============ QUOTE REQUEST DETAIL ============ */
.quote-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 8px rgba(0,0,0,0.06);
    overflow: hidden;
    margin-bottom: 20px;
}
.quote-card-header {
    padding: 14px 20px;
    font-weight: 700;
    font-size: 13px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
    color: var(--dark);
}
.quote-card-header i { color: var(--red); margin-right: 6px; }
.quote-card-body {
    padding: 20px;
}

/* ============ TABS (quote status filter) ============ */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e8e8e8;
}
.tab {
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray-text);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tab:hover { color: var(--dark); }
.tab.active { color: var(--red); border-bottom-color: var(--red); }
.tab .tab-count {
    background: #eee;
    padding: 1px 7px;
    border-radius: 10px;
    font-size: 11px;
}
.tab.active .tab-count { background: var(--red); color: white; }

/* Responsive kanban */
@media (max-width: 1400px) {
    .kanban-board { grid-template-columns: repeat(2, 1fr) !important; }
}
@media (max-width: 900px) {
    .kanban-board { grid-template-columns: 1fr !important; }
    .cal-grid { font-size: 10px; }
    .cal-cell { min-height: 60px; padding: 3px; }
}
