body {
	font-size: 14px;
	font-weight: 400;
	color: #333;
	background-image: url("/assets/img/achtergrond.jpg");
	background-position: center;
	background-size: cover;
	background-repeat: no-repeat;
	background-attachment: fixed;
	height: 100%;
}

/* DataTables consistent row height */
.dataTable tbody tr {
    height: 40px !important;
    max-height: 40px !important;
}

.dataTable tbody td {
    vertical-align: middle !important;
    padding: 4px 8px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    max-width: 300px;
}

/* Allow text wrap for specific columns like comments */
.dataTable tbody td.text-wrap {
    white-space: normal !important;
    max-width: 400px;
}

/* Tooltip for truncated text */
.dataTable tbody td[title] {
    cursor: help;
}

/* DataTables processing indicator styling */
.dataTables_processing {
    position: absolute !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    background: rgba(255, 255, 255, 0.95) !important;
    padding: 20px 40px !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
    z-index: 100 !important;
    font-size: 14px !important;
    color: #333 !important;
}

.dataTables_processing .spinner-border {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 10px;
    vertical-align: middle;
}

/* CSS for inline editing functionality */



a,
.btn-link,
.page-link {
	color: #AA1D32;
	text-decoration: none;
}

@media (min-width: 1200px) {
  .modal-xl {
    --bs-modal-width: 1440px;
  }
}

#editMarketCustomerModal {
	z-index: 9999;
}

.btn-action {
	font-size: 12px;
}

a:hover,
.btn-link:hover {
	color: #EBD577;
}

.toolbar-item {
	color: #000;
}

#invoiceLinesTable input[type="number"] {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
}

#invoiceLinesTable textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    min-height: 60px;
    resize: vertical;
}

#invoiceLinesTable select {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
}

.invoice-line-row {
    background-color: #f8f9fa;
}

.invoice-line-row:hover {
    background-color: #e9ecef;
}

#invoiceLinesTable .btn-sm {
    padding: 2px 6px;
    font-size: 12px;
}

.table-responsive {
    max-height: 400px;
    overflow-y: auto;
}

table.table.dataTable > tbody > tr.selected > * {
  box-shadow: inset 0 0 0 9999px Orange !important;
}

.toolbar-item.active, .toolbar-item:hover {
	color: #fff;
}

.btn {
	border-radius: 20px;
	padding: 10px 30px;
}

.alert {
	border-radius: 10px;
}

.show-date-modal {
	color: #000;
}

#simpleInvoiceModal {
	z-index: 9999999 !important;
	height: 100%;
}

.h1,
h1 {
	font-size: 1.2rem;
	color: #000;
}

h2,
.h2 {
	color: #000;
}

.nav-tabs .nav-link {
	color: #F3BA09;
}

.modal strong {
	color: #000;
}

ul.ui-autocomplete {
	z-index: 1100;
}

.dropdown-item.active,
.dropdown-item:active {
	background-color: #ed9c28;
}

.table-grey {
	border-collapse: separate;
	border-spacing: 0px 10px;
	padding-left: 0px;
	padding-right: 0px;
}

.stick {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	width: 100%;
	background-color: #AA1D32;
	z-index: 9999;
	padding: 10px 20px 10px 20px;
}

.form-check .form-check-input {
	float: none;
}

textarea:hover,
input:hover,
textarea:active,
input:active,
textarea:focus,
input:focus,
button:focus,
button:active,
button:hover,
label:focus,
.btn:active,
.btn.active {
	outline: 0px !important;
}

.form-control {
	border-color: rgba(0, 0, 0, 0.1);
	box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1) !important;
}

.active>.page-link,
.page-link.active {
	background-color: #970303;
	border: 0 none;
	padding: 7px 10px;
}

.lead {
	font-size: 1rem;
}

.hero {
	background-color: #970303;
	border-radius: 20px;
}

hr {
	background-color: #CCCCCC;
	border: medium none;
	height: 1px;
	margin: 20px 0;
}

.no-border-radius {
	border-radius: 0px;
}

.btn-primary {
	color: #FFFFFF;
	background-color: #970303;
	border: 0 none;
}

.btn-primary:hover {
	color: #FFFFFF;
	background-color: #000;
	border: 0 none;
}

.btn-secondary:hover {
	background-color: #fff;
	color: #ed9c28;
	border-color: #ed9c28;
}

.btn-form {
	height: 70px;
}

.btn-secondary,
.btn-form:hover {
	color: #FFFFFF;
	background-color: #ed9c28;
	border: 0 none;
	border-radius: 20px;
}

.btn.active,
.btn.active:hover {
	background-color: green;
}

td.red {
	color: red;
}

td.green {
	color: green;
}

div.dataTables_wrapper div.dataTables_length select {
	margin: 0px 10px;
}

table.datatable td {
	word-break: break-all;
}

/* DROPDOWN
-------------------------------------------------- */
.dropdown-item {
	text-transform: none;
}

/* CONTENT
-------------------------------------------------- */
.content {
	background-color: #fff;
	border-radius: 20px;
}

div.content {
	/*min-height: 80vh;*/

}

/* BUTTONS
-------------------------------------------------- */
.nav-pills .nav-link {
	color: #000;
}

.nav-pills .nav-link.active,
.nav-pills .show>.nav-link,
.nav-pills .nav-link:hover {
	color: #fff;
	background-color: #000;
	border-radius: 20px;
}

.toolbar {
	background-color: #fff;
	border-radius: 20px;
	padding: 15px 15px;
	display: flex;
	gap: 10px;
	flex-wrap: nowrap;
	overflow-x: auto;
	overflow-y: hidden;
	-webkit-overflow-scrolling: touch;
	/* white-space: nowrap;  <-- weg */
}

.toolbar-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #fff;
	border: 1px solid #ccc;
	padding: 15px 12px;
	cursor: pointer;
	font-size: 11px;
	border-radius: 10px;
	min-width: 120px;
	text-align: center;
	transition: background-color 0.2s;
	flex: 0 0 auto;
	white-space: normal;           /* tekst mag wrappen */
	word-wrap: break-word;         /* lange woorden breken */
	overflow-wrap: break-word;
}




.toolbar-item:hover {
	background: #970303;
	color: #fff;
	border-color: #970303;
}

.toolbar-item i {
	font-size: 32px;
	margin-bottom: 4px;
	color: #000;
}

.toolbar-item.active {
	background: #970303;
	color: white;
	border-color: #970303;
}

.toolbar-item.active i,
.toolbar-item:hover i {
	color: white;
}

.btn:hover {
	background-color: #000;
	color: #fff;
}

.toolbar-text {
	line-height: 1.2;
	max-width: 120px;
	word-wrap: break-word;
	font-weight: bold;
}

.main-content {
	padding: 10px;
}

.org-header {
	background-color: #fff;
	border: 1px solid #ccc;
	padding: 10px;
	margin-bottom: 15px;
	border-radius: 3px;
}

.filter-section {
	background-color: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1) !important;
	padding: 10px;
	margin-bottom: 15px;
	border-radius: 3px;
}

.client-table-container {
	background-color: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.1) !important;
	border-radius: 3px;
	padding: 15px;
	margin-bottom: 15px;
}

.client-table {
	font-size: 11px !important;
}

.client-table thead th {
	background-color: #f8f9fa;
	border-bottom: 2px solid #dee2e6;
	font-weight: 600;
	font-size: 13px;
	padding: 8px;
	white-space: nowrap;
	vertical-align: middle;
}

.client-table tbody td {
	padding: 6px 8px;
	font-size: 13px;
	vertical-align: middle;
}

.markets-section {
	background-color: #fff;
	border: 1px solid #ccc;
	padding: 10px;
	margin-top: 15px;
	border-radius: 3px;
}

.form-control,
.form-select {
	font-size: 14px;
	padding: 8px;
	height: auto;
}

.btn-sm {
	font-size: 14px;
	padding: 8px 20px;
	border-radius: 10px;
}

.form-select-sm {
	padding-left: 20px;
	padding-right: 30px;
}

.dt-search {
	display: none;
}

.excel-btn {
	background-color: #217346;
	color: white;
	border: none;
}

.reset-btn {
	background-color: #dc3545;
	color: white;
	border: none;
}

/* DataTables customization */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_paginate {
	font-size: 11px;
}

.dataTables_wrapper .dataTables_filter input {
	font-size: 11px;
	padding: 4px 8px;
}

.dataTables_wrapper .dataTables_length select {
	font-size: 11px;
	padding: 4px 8px;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
	font-size: 11px;
	padding: 4px 8px;
}

table.dataTable tbody tr {
	background-color: white;
}

table.dataTable tbody tr:hover {
	background-color: #f8f9fa !important;
}

.status-bar {
	background-color: #e9ecef;
	border-top: 1px solid #dee2e6;
	padding: 5px 15px;
	font-size: 11px;
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 1000;
}

/* Custom filter styling */
.custom-filter {
	margin-bottom: 10px;
}

.filter-controls {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-bottom: 15px;
}

/* CSS for inline editing functionality */

/* Editable field styling */
.editable-field {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 60px;
    min-height: 20px;
}

.editable-field:hover {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.editable-field.editing {
    cursor: default;
    background-color: transparent;
    border: none;
    padding: 0;
}

/* Success animation for updated fields */
.editable-field.field-updated {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    animation: updatePulse 0.5s ease-in-out;
}

@keyframes updatePulse {
    0% {
        background-color: #d1e7dd;
        transform: scale(1);
    }
    50% {
        background-color: #a3cfbb;
        transform: scale(1.02);
    }
    100% {
        background-color: #d1e7dd;
        transform: scale(1);
    }
}

/* Inline edit input styling */
.inline-edit-input {
    width: 100%;
    min-width: 80px;
    font-size: 0.875rem;
    border: 2px solid #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.inline-edit-input:focus {
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.4) !important;
}

/* Checkbox styling for inline editing */
.inline-edit-checkbox {
    transform: scale(1.2);
    cursor: pointer;
}

/* Date picker styling for native HTML5 input */
input[type="date"].inline-edit-input {
    border: 2px solid #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    padding: 4px 8px;
}

input[type="date"].inline-edit-input:focus {
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.4) !important;
}

/* Style the calendar icon for native date input */
input[type="date"].inline-edit-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
}

input[type="date"].inline-edit-input::-webkit-calendar-picker-indicator:hover {
    background-color: #e9ecef;
}

/* Table cell adjustments for better inline editing */
#klantFactuurTable tbody tr td {
    position: relative;
}

#klantFactuurTable .editable-field {
    width: 100%;
    text-align: left;
}

/* Prevent text selection on table headers during editing */
#klantFactuurTable thead th {
    user-select: none;
}

/* Loading indicator for saving */
.editable-field.saving {
    opacity: 0.6;
    pointer-events: none;
}

.editable-field.saving::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Error state styling */
.editable-field.error {
    background-color: #f8d7da;
    border: 1px solid #dc3545;
    color: #721c24;
}

/* Tooltip styling for edit hints */
.editable-field[title] {
    position: relative;
}

.editable-field::before {
    content: "Klik om te bewerken";
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.editable-field:hover::before {
    opacity: 0.9;
}

.editable-field.editing::before {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .inline-edit-input {
        font-size: 0.75rem;
        min-width: 60px;
    }
    
    .editable-field {
        min-width: 40px;
        font-size: 0.75rem;
    }
}

/* Add to your existing CSS file */

/* Additional CSS for the Invoice Manager */

/* Tab styling */
.nav-tabs .nav-link {
    border-radius: 0.375rem 0.375rem 0 0;
}

.nav-tabs .nav-link.active {
    background-color: #fff;
    border-color: #dee2e6 #dee2e6 #fff;
}

/* Badge styling in tabs */
.nav-tabs .badge {
    font-size: 0.65em;
}

/* Table container styling */
.client-table-container {
    background: #fff;
    border-radius: 0.375rem;
    box-shadow: 0 0 0 1px rgba(0,0,0,.1);
    padding: 1rem;
}

/* Filter section styling */
.filter-section {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Date range input group */
.input-group input[type="date"] {
    border-right: none;
}

.input-group input[type="date"]:last-child {
    border-right: 1px solid #ced4da;
}

/* Total amount styling */
.text-muted {
    font-size: 0.9em;
    font-weight: 500;
}

/* Editable field styling */
.editable-field {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 60px;
    min-height: 20px;
}

.editable-field:hover {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
}

.editable-field.editing {
    cursor: default;
    background-color: transparent;
    border: none;
    padding: 0;
}

/* Success animation for updated fields */
.editable-field.field-updated {
    background-color: #d1e7dd;
    border: 1px solid #badbcc;
    animation: updatePulse 0.6s ease-in-out;
}

@keyframes updatePulse {
    0% {
        background-color: #d1e7dd;
        transform: scale(1);
    }
    50% {
        background-color: #a3cfbb;
        transform: scale(1.02);
    }
    100% {
        background-color: #d1e7dd;
        transform: scale(1);
    }
}

/* Loading state for saving */
.editable-field.saving {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.editable-field.saving::after {
    content: "";
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border: 2px solid #ccc;
    border-top-color: #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

/* Inline edit input styling */
.inline-edit-input {
    width: 100%;
    min-width: 80px;
    font-size: 0.875rem;
    border: 2px solid #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
}

.inline-edit-input:focus {
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.4) !important;
}

/* Date picker styling for native HTML5 input */
input[type="date"].inline-edit-input {
    border: 2px solid #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    padding: 4px 8px;
}

input[type="date"].inline-edit-input:focus {
    border-color: #0056b3 !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.4) !important;
}

/* Style the calendar icon for native date input */
input[type="date"].inline-edit-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    padding: 2px;
    border-radius: 2px;
}

input[type="date"].inline-edit-input::-webkit-calendar-picker-indicator:hover {
    background-color: #e9ecef;
}

/* Checkbox styling for inline editing */
.inline-edit-checkbox {
    transform: scale(1.2);
    cursor: pointer;
}

/* Success message positioning */
.alert.position-fixed {
    z-index: 9999;
}

/* Table cell adjustments for better inline editing */
.client-table tbody tr td {
    position: relative;
}

.client-table .editable-field {
    width: 100%;
    text-align: left;
}

/* Prevent text selection on table headers during editing */
.client-table thead th {
    user-select: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .inline-edit-input {
        font-size: 0.75rem;
        min-width: 60px;
    }
    
    .editable-field {
        min-width: 40px;
        font-size: 0.75rem;
    }
    
    .filter-section .col-md-3 {
        margin-bottom: 1rem;
    }
}

.form-container {
    max-height: 70vh;
    overflow-y: auto;
}

.table-container {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

.client-table {
    font-size: 0.875rem;
    margin-bottom: 0;
}

.client-table th {
    background-color: #f8f9fa;
    position: sticky;
    top: 0;
    z-index: 1;
}

.remove-row-btn:hover {
    background-color: #dc3545 !important;
    color: white !important;
}

.mail-stats {
    border-left: 4px solid #0dcaf0;
}

.progress-container .progress {
    height: 20px;
}

.plaats-row, .land-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.plaats-row .btn, .land-row .btn {
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .modal-xl {
        max-width: 95%;
    }
    
    .d-flex.flex-wrap.gap-2 {
        gap: 0.25rem !important;
    }
    
    .btn-sm {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Checkbox container styling */
.checkbox-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #f08200;
    pointer-events: auto !important;
}

.checkbox-container label {
    cursor: pointer;
    margin-bottom: 0;
}

/* Home pagina: #clientTable en #marketTable gelijke hoogte */
#clientTable_wrapper .dataTables_scrollBody {
    min-height: 380px !important;
    max-height: 380px !important;
}

#marketTable_wrapper .dataTables_scrollBody {
    min-height: 300px !important;
    max-height: 300px !important;
}

/* Containers om tabellen gelijke hoogte te geven */
.home-table-container {
    display: flex;
    flex-direction: column;
}

.home-table-container .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Home pagina: client-table-container gelijke hoogte in dezelfde row */
.row > .col-md-7 > .client-table-container {
    min-height: 460px;
}

.row > .col-md-5 > .client-table-container {
    min-height: 380px;
}

/* Markt modal: tabellen hoogte */
#addMarketModal .tab-content {
    min-height: 550px;
}

#addMarketModal .table-responsive {
    max-height: 600px;
}

/* Markt modal: kolommen onafhankelijke hoogte */
#addMarketModal .modal-body > .row:first-child {
    display: flex;
    align-items: flex-start;
}

/* Modal body scrollbaar */
#addMarketModal .modal-body {
    overflow-y: auto;
    max-height: 85vh;
}

/* Textarea's zonder limiet */
textarea {
    max-length: none !important;
}