/* ========== BASE STYLES ========== */
body { 
    background-color: #f8f8f8;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333333;
}

/* ========== LAYOUT & CONTAINERS ========== */
/* Main content area styles */
.main-content {
    margin-left: 275px;
    padding: 20px;
    min-height: 100vh;
    width: calc(100% - 275px);
    background-color: #f8f8f8;/* Off-white background without !important */
    transition: margin-left 0.3s ease, width 0.3s ease;
}

/* Home container styling (light mode) */
.home-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 30px;
    margin-top: 20px;
    text-align: center;
}

.home-container h1 {
    color: #333333;
    margin-bottom: 20px;
    font-weight: 500;
}

.home-container p {
    color: #333333;
    line-height: 1.6;
    font-size: 16px;
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
}

/* Module container styling */
.module-container {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 20px;
}

/* Card styling */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e5e5;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    font-weight: 500;
}

/* ========== SIDEBAR STYLES ========== */
/* Sidebar wrapper styles */
.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 275px;
    background-color: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    overflow-y: auto;
    transition: left 0.3s ease;
    border-right: 1px solid #e0e0e0;
}

/* Sidebar header styles */
.sidebar-header {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    background-color: white;
}

/* Sidebar header container for logo and toggle */
.sidebar-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

/* Sidebar toggle buttons */
.sidebar-toggle-internal {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer !important;
    background-color: white;
    border: 1px solid #e0e0e0;
    transition: all 0.2s ease;
}

.sidebar-toggle-internal i,
.sidebar-toggle-minimized i {
    font-size: 18px !important;
    color: #277FB3 !important;
}

.sidebar-toggle-internal:hover,
.sidebar-toggle-minimized:hover {
    background-color: #f0f0f0 !important;
    transform: scale(1.05);
}

/* Minimized toggle button */
.sidebar-toggle-minimized {
    position: fixed;
    top: 10px;
    left: 10px;
    z-index: 2000 !important;
    width: 40px;
    height: 40px;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer !important;
    background-color: white !important;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2) !important;
    display: none; /* Hidden by default */
}

/* Show minimized toggle only when sidebar is collapsed */
.sidebar-collapsed .sidebar-toggle-minimized {
    display: flex;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Hide old sidebar toggle button */
.sidebar-toggle-fixed {
    display: none;
}

/* Sidebar collapsed state */
.sidebar-collapsed .sidebar-wrapper {
    left: -275px;
    box-shadow: none;
}

.sidebar-collapsed .main-content {
    margin-left: 0;
    width: 100%;
}

/* Sidebar footer styles */
.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: white;
}

.sidebar-link {
  color: #333333 !important;
  font-size: 15px;
  padding: 8px 15px;
  display: flex;
  align-items: center;
  text-decoration: none;
  border-radius: 5px;
  margin: 4px 8px;
  transition: all 0.2s ease;
}

.sidebar-link i, 
.sidebar-link svg {
  margin-right: 8px;
  width: 20px;
  text-align: center;
  color: #666;
  font-size: 16px;
}

.sidebar-link:hover {
    background-color: #f0f0f0;
    color: #0675DD !important;
    text-decoration: none;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 500;
    color: #333333;
    margin-bottom: 15px;
}

/* ========== FORM ELEMENTS ========== */
.form-control {
    border-radius: 4px;
    border: 1px solid #ced4da;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    border-color: #0675DD;
    box-shadow: 0 0 0 0.2rem rgba(6, 117, 221, 0.25);
}

.form-switch .form-check-label { 
    font-weight: bold; 
    color: #333333; 
} 

.control-label { 
    font-weight: bold; 
    color: #444444; 
}

/* ========== BUTTONS ========== */
.btn {
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: #0675DD;
    border-color: #0675DD;
}

.btn-primary:hover {
    background-color: #0566c0;
    border-color: #0566c0;
}

.btn-block { 
    padding: 10px; 
    background-color: white; 
    color: black; 
    border: 1px solid black; 
}

.btn-block:hover { 
    background-color: #e6e6e6; 
    color: black; 
}

/* ========== TAB NAVIGATION ========== */
/* Improved tab navigation */
.nav-tabs {
    border-bottom: 2px solid #e5e5e5;
}

.nav-tabs .nav-item {
    margin-bottom: -2px;
}

.nav-tabs .nav-link {
    border: 1px solid transparent;
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    color: #495057;
    font-weight: 500;
}

.nav-tabs .nav-link:hover {
    border-color: #e9ecef #e9ecef #e5e5e5;
    color: #0675DD;
}

.nav-tabs .nav-link.active {
    color: #0675DD;
    background-color: #fff;
    border-color: #e5e5e5 #e5e5e5 #fff;
    border-bottom: 2px solid #0675DD;
}

/* Custom tabset styling */
.custom-tabset .nav-tabs { 
    background-color: white; 
}

.custom-tabset .nav-tabs .nav-link { 
    color: #666666; 
}

.custom-tabset .nav-tabs .nav-link.active { 
    color: #4a90e2; 
}

.custom-tabset .nav-tabs .nav-link:hover { 
    background-color: #f0f0f0; 
    color: #4a90e2; 
}

.custom-tabset .tab-content { 
    background-color: white; 
    border: 1px solid #e0e0e0; 
    padding: 15px; 
}

/* ========== DATATABLE STYLING ========== */
.dataTables_wrapper .dataTables_paginate .paginate_button { 
    color: #333333; 
}

.dataTables_wrapper .dataTables_filter input { 
    border: 1px solid #cccccc; 
    background-color: #f9f9f9; 
}

/* ========== THEME SWITCH ========== */
.theme-switch-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.moon-icon {
    color: #333;
    font-size: 1.2rem;
}

.theme-switch {
    display: inline-block;
    position: relative;
    width: 60px;
    height: 34px;
}

.theme-switch-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-path {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.switch-path:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}


.theme-switch-input:checked + .switch-path:before {
    transform: translateX(26px);
}

/* ========== LOGIN PAGE ========== */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    padding: 20px;
    position: fixed;
    top: 0;
    left: 0;
    background-color: #f8f8f8;
}

.login-container {
    background: white;
    border-radius: 24px;
    padding: 32px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin: 0;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.login-logo {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo img {
    height: 32px;
}

.login-title {
    text-align: center;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 8px;
}

.login-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 32px;
}

.form-label {
    display: block;
    font-size: 14px;
    color: #666;
    margin-bottom: 4px;
}

.form-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    margin-bottom: 16px;
}

.password-container {
    position: relative;
    margin-bottom: 16px;
}

.password-toggle {
    padding-top: 37px;
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
}

.login-button {
    width: 100%;
    padding: 12px;
    background-color: #0675DD;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
}

.forgot-password {
    text-align: center;
    margin-top: 16px;
}

.forgot-password a {
    color: #0675DD;
    text-decoration: none;
}

/* ========== NOTIFICATIONS ========== */
#shiny-notification-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    padding: 10px;
    pointer-events: none; /* Makes the panel itself non-blocking */
    z-index: 9999;
}

/* Re-enable pointer events for actual notifications */
#shiny-notification-panel .shiny-notification {
    pointer-events: auto; /* Only the notification boxes are clickable/blocking */
}
/* Custom styling for auto-fill button */
.btn-auto-fill-custom {
  background-color: transparent !important;
  color: #333333 !important;
  border: 1px solid #333333 !important;
  padding: 8px 16px;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.btn-auto-fill-custom:hover {
  background-color: rgba(0, 0, 0, 0.05) !important;
  border-color: #000000 !important;
  color: #000000 !important;
}

.btn-auto-fill-custom i,
.btn-auto-fill-custom .fa {
  color: inherit !important;
  background-color: transparent !important;
}

/* Dark mode styling */
body.dark-mode .btn-auto-fill-custom {
  color: #E0E0E0 !important;
  border-color: #E0E0E0 !important;
}

body.dark-mode .btn-auto-fill-custom:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-color: #FFFFFF !important;
  color: #FFFFFF !important;
}
/* Dark mode styling for selectInput dropdowns */
body.dark-mode .selectize-input,
body.dark-mode .selectize-dropdown {
  background-color: #333 !important;
  color: #E0E0E0 !important;
  border-color: #444 !important;
}

body.dark-mode .selectize-dropdown-content .option {
  background-color: #333 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .selectize-dropdown-content .option.active {
  background-color: #0675DD !important;
  color: #fff !important;
}

body.dark-mode .selectize-dropdown-content .option:hover {
  background-color: #404040 !important;
  color: #FFFFFF !important;
}

body.dark-mode .selectize-input.focus {
  border-color: #0675DD !important;
  box-shadow: 0 0 0 0.2rem rgba(6, 117, 221, 0.25) !important;
}

/* Fix for the selected value text in the input field */
body.dark-mode .selectize-input > input {
  color: #E0E0E0 !important;
}

body.dark-mode .selectize-input .item {
  color: #E0E0E0 !important;
  background-color: transparent !important;
}

/* Fix for standard select inputs (non-selectize) */
body.dark-mode select.form-control {
  background-color: #333 !important;
  color: #E0E0E0 !important;
  border-color: #444 !important;
}

body.dark-mode select.form-control option {
  background-color: #333 !important;
  color: #E0E0E0 !important;
}

/* Dark mode styling for bslib accordion */
body.dark-mode .accordion {
  background-color: transparent !important;
}

body.dark-mode .accordion-item {
  background-color: #2D2D2D !important;
  border-color: #444 !important;
}

body.dark-mode .accordion-button {
  background-color: #333 !important;
  color: #E0E0E0 !important;
  border-color: #444 !important;
}

body.dark-mode .accordion-button:not(.collapsed) {
  background-color: #404040 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .accordion-button:hover {
  background-color: #404040 !important;
  color: #FFFFFF !important;
}

body.dark-mode .accordion-button:focus {
  border-color: #0675DD !important;
  box-shadow: 0 0 0 0.25rem rgba(6, 117, 221, 0.25) !important;
}

body.dark-mode .accordion-body {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
  border-color: #444 !important;
}

body.dark-mode .accordion-collapse {
  background-color: #2D2D2D !important;
  border-color: #444 !important;
}

/* Fix for accordion button icon/arrow */
body.dark-mode .accordion-button::after {
  filter: invert(1);
}

/* Ensure all text inside accordion is visible */
body.dark-mode .accordion-item * {
  color: #E0E0E0 !important;
}

body.dark-mode .accordion-item label,
body.dark-mode .accordion-item .form-label {
  color: #E0E0E0 !important;
}



body.dark-mode .btn-auto-fill-custom i,
body.dark-mode .btn-auto-fill-custom .fa {
  color: inherit !important;
}

/* ========== MISC ========== */
.bold-text { 
    font-weight: bold; 
    color: #333333; 
}

/* ========== DARK MODE STYLES ========== */
body.dark-mode { 
    background-color: #1E1E1E; 
    color: #E0E0E0;
}

body.dark-mode .main-content {
    background-color: #1E1E1E !important;
}

/* Dark mode styles */
body.dark-mode .home-container {
    background-color: #2D2D2D;
}

body.dark-mode .home-container h1,
body.dark-mode .home-container p {
    color: #E0E0E0;
}

body.dark-mode .module-container {
    background-color: #2D2D2D;
    border-color: #444;
}

body.dark-mode .card {
    background-color: #2D2D2D;
    border-color: #444;
}

body.dark-mode .card-header {
    background-color: #333;
    border-color: #444;
    color: #E0E0E0;
}

body.dark-mode .sidebar-wrapper {
    background-color: #2D2D2D;
    box-shadow: 3px 0 10px rgba(0, 0, 0, 0.5);
    border-right: 1px solid #444;
}

body.dark-mode .sidebar-header,
body.dark-mode .sidebar-footer {
    background-color: #2D2D2D;
    border-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .sidebar-toggle-internal,
body.dark-mode .sidebar-toggle-minimized {
    background-color: #2D2D2D;
    color: #E0E0E0;
    border-color: #444;
}

body.dark-mode .sidebar-toggle-internal:hover,
body.dark-mode .sidebar-toggle-minimized:hover {
    background-color: #404040;
}

body.dark-mode .sidebar-link {
    color: #E0E0E0 !important;
}

body.dark-mode .sidebar-link i,
body.dark-mode .sidebar-link svg {
    color: #aaa;
}

body.dark-mode .sidebar-link:hover {
    background-color: #404040;
    color: #60b0ff !important;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4,
body.dark-mode h5,
body.dark-mode h6 {
    color: #E0E0E0;
}

body.dark-mode .form-control {
    background-color: #333;
    border-color: #444;
    color: #E0E0E0;
}

body.dark-mode .form-control:focus {
    border-color: #0675DD;
    box-shadow: 0 0 0 0.2rem rgba(6, 117, 221, 0.25);
}

body.dark-mode .btn-primary {
    background-color: #0675DD;
    border-color: #0675DD;
}

body.dark-mode .btn-primary:hover {
    background-color: #0566c0;
    border-color: #0566c0;
}

body.dark-mode .nav-tabs {
    border-bottom-color: #444;
}

body.dark-mode .nav-tabs .nav-link {
    color: #CCC;
}

body.dark-mode .nav-tabs .nav-link:hover {
    border-color: #333 #333 #444;
    color: #0675DD;
}

body.dark-mode .nav-tabs .nav-link.active {
    color: #0675DD;
    background-color: #2D2D2D;
    border-color: #444 #444 #2D2D2D;
    border-bottom: 2px solid #0675DD;
}

body.dark-mode .custom-tabset .nav-tabs { 
    background-color: #2D2D2D; 
}

body.dark-mode .custom-tabset .nav-tabs .nav-link { 
    color: #E0E0E0; 
}

body.dark-mode .custom-tabset .tab-content { 
    background-color: #2D2D2D; 
    border-color: #404040; 
}

/* Enhanced DataTable dark mode styles */
body.dark-mode .dataTables_wrapper {
  color: #E0E0E0;
}

body.dark-mode .dataTable {
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
  border-color: #444 !important;
}

body.dark-mode table.dataTable thead th,
body.dark-mode table.dataTable thead td,
body.dark-mode table.dataTable tbody th,
body.dark-mode table.dataTable tbody td {
  border-color: #444 !important;
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
}

body.dark-mode table.dataTable.stripe tbody tr.odd,
body.dark-mode table.dataTable.display tbody tr.odd {
  background-color: #333 !important;
}

body.dark-mode table.dataTable.stripe tbody tr.even,
body.dark-mode table.dataTable.display tbody tr.even {
  background-color: #2D2D2D !important;
}

body.dark-mode table.dataTable.hover tbody tr:hover,
body.dark-mode table.dataTable.display tbody tr:hover {
  background-color: #404040 !important;
}

body.dark-mode .dataTables_info, 
body.dark-mode .dataTables_length,
body.dark-mode .dataTables_filter,
body.dark-mode .dataTables_paginate {
  color: #E0E0E0 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input {
  background-color: #333 !important;
  color: #E0E0E0 !important;
  border: 1px solid #444 !important;
}

body.dark-mode .dataTables_paginate .paginate_button {
  color: #E0E0E0 !important;
  background: #333 !important;
  border-color: #444 !important;
}

body.dark-mode .dataTables_paginate .paginate_button.current,
body.dark-mode .dataTables_paginate .paginate_button.current:hover {
  color: #fff !important;
  background: #0675DD !important;
  border-color: #0675DD !important;
}

body.dark-mode .dataTables_paginate .paginate_button:hover {
  color: #fff !important;
  background: #444 !important;
  border-color: #555 !important;
}

/* Fix table borders */
body.dark-mode table.dataTable.cell-border tbody th,
body.dark-mode table.dataTable.cell-border tbody td {
  border: 1px solid #444 !important;
}

body.dark-mode table.dataTable.cell-border tbody tr th:first-child,
body.dark-mode table.dataTable.cell-border tbody tr td:first-child {
  border-left: 1px solid #444 !important;
}

body.dark-mode table.dataTable.row-border tbody th,
body.dark-mode table.dataTable.row-border tbody td {
  border-top: 1px solid #444 !important;
}

/* Table search input */
body.dark-mode .dataTables_filter input {
  background-color: #333 !important;
  color: #E0E0E0 !important;
  border: 1px solid #444 !important;
}

/* Table length select */
body.dark-mode .dataTables_length select {
  background-color: #333 !important;
  color: #E0E0E0 !important;
  border: 1px solid #444 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input { 
    border-color: #404040; 
    background-color: #2D2D2D; 
    color: #E0E0E0;
}

body.dark-mode .login-wrapper {
    background-color: #1E1E1E;
}

body.dark-mode .login-container {
    background: #2D2D2D;
    color: #E0E0E0;
}

body.dark-mode .login-subtitle {
    color: #CCCCCC;
}

body.dark-mode .form-label {
    color: #CCCCCC;
}

body.dark-mode .form-input {
    background-color: #333;
    color: #E0E0E0;
    border-color: #444;
}

body.dark-mode .login-button {
    background-color: #0675DD;
}

body.dark-mode .moon-icon {
    color: #E0E0E0;
}

body.dark-mode .sidebar-footer #logout_btn {
    color: #E0E0E0 !important;
}

body.dark-mode .sidebar-footer #logout_btn:hover {
    background-color: #404040;
    color: #60b0ff !important;
}

body.dark-mode .bold-text { 
    color: #E0E0E0; 
}

/* ========== HOMEPAGE RESPONSIVE IMAGES ========== */
/* Make homepage logo responsive */
@media (max-width: 1024px) {
  .home-container img[alt="Careculate Logo"] {
    max-width: 100%;
    height: auto !important;
    width: auto !important;
  }
}

@media (max-width: 768px) {
  .home-container img[alt="Careculate Logo"] {
    max-width: 90%;
    height: auto !important;
    width: auto !important;
  }
}

@media (max-width: 480px) {
  .home-container img[alt="Careculate Logo"] {
    max-width: 100%;
    height: auto !important;
    width: auto !important;
  }
}

/* ========== RESPONSIVE STYLES ========== */
@media (max-width: 1024px) {
  /* Verberg sidebar standaard */
  .sidebar-wrapper {
    left: -275px;
    position: fixed;
  }
  
  /* Toon altijd de hamburger knop */
  .sidebar-toggle-minimized {
    display: flex !important;
  }
  
  /* Main content neemt volle breedte */
  .main-content {
    margin-left: 0;
    width: 100%;
  }
  
  /* Wanneer sidebar wordt geopend (door hamburger te klikken) */
  body:not(.sidebar-collapsed) .sidebar-wrapper {
    left: 0;
    z-index: 2000;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.3);
  }
  
  /* Donker overlay achter sidebar - ALLEEN wanneer sidebar bestaat */
  body:has(.sidebar-wrapper):not(.sidebar-collapsed)::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1500;
    animation: fadeIn 0.3s ease;
  }
}

/* Mobiel (nog smaller) */
@media (max-width: 480px) {
  .sidebar-wrapper {
    width: 280px;
  }
}

/* Additional Dark Mode Styling for User Management */
body.dark-mode .module-select-container {
  border: 1px solid #444;
  padding: 10px;
  border-radius: 4px;
  margin-top: 5px;
  background-color: #333;
}

body.dark-mode .form-group label {
  color: #E0E0E0;
}

body.dark-mode .selectize-input {
  background-color: #333;
  color: #E0E0E0;
  border-color: #444;
}

body.dark-mode .selectize-dropdown {
  background-color: #333;
  color: #E0E0E0;
  border-color: #444;
}

body.dark-mode .selectize-dropdown-content .option {
  background-color: #333;
  color: #E0E0E0;
}

body.dark-mode .selectize-dropdown-content .option.active {
  background-color: #0675DD;
  color: #fff;
}

/* DataTable dark mode styles */
body.dark-mode .dataTable {
  color: #E0E0E0;
  background-color: #2D2D2D;
}

body.dark-mode .dataTable th,
body.dark-mode .dataTable td {
  border-color: #444;
}

body.dark-mode .dataTable th {
  background-color: #333;
}

body.dark-mode .dataTable tr.odd {
  background-color: #333;
}

body.dark-mode .dataTable tr.even {
  background-color: #3A3A3A;
}

body.dark-mode .dataTables_info,
body.dark-mode .dataTables_length,
body.dark-mode .dataTables_filter label {
  color: #E0E0E0;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button {
  color: #E0E0E0 !important;
  background-color: #333;
  border-color: #444;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current,
body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
  color: #fff !important;
  background: linear-gradient(to bottom, #0675DD 0%, #0566c0 100%);
  border-color: #0675DD;
}

body.dark-mode .dataTables_wrapper .dataTables_paginate .paginate_button:hover {
  color: #fff !important;
  background: linear-gradient(to bottom, #404040 0%, #333 100%);
  border-color: #555;
}

/* Fix checkbox styles in dark mode */
body.dark-mode input[type="checkbox"] {
  background-color: #333;
  border-color: #444;
}

body.dark-mode .checkbox span {
  color: #E0E0E0;
}

/* Standard table styling for dark mode */
body.dark-mode .table,
body.dark-mode table {
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
  border-color: #444 !important;
}

body.dark-mode .table th,
body.dark-mode .table td,
body.dark-mode table th,
body.dark-mode table td {
  border-color: #444 !important;
  background-color: transparent !important;
  color: #E0E0E0 !important;
}

body.dark-mode .table thead th,
body.dark-mode table thead th {
  background-color: #333 !important;
  border-bottom-color: #444 !important;
}

/* Striped table rows in dark mode */
body.dark-mode .table-striped tbody tr:nth-of-type(odd),
body.dark-mode table.table-striped tbody tr:nth-of-type(odd) {
  background-color: #333 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(even),
body.dark-mode table.table-striped tbody tr:nth-of-type(even) {
  background-color: #2D2D2D !important;
}

/* Hover effect in dark mode */
body.dark-mode .table-hover tbody tr:hover,
body.dark-mode table.table-hover tbody tr:hover {
  background-color: #404040 !important;
}

body.dark-mode .table tbody tr:nth-of-type(odd) {
  background-color: #333 !important;
}

body.dark-mode .table tbody tr:nth-of-type(even) {
  background-color: #2D2D2D !important;
}

body.dark-mode .table-hover tbody tr:hover {
  background-color: #404040 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background-color: #333 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(even) {
  background-color: #2D2D2D !important;
}

body.dark-mode .table-bordered {
  border-color: #444 !important;
}

body.dark-mode .table-bordered td,
body.dark-mode .table-bordered th {
  border-color: #444 !important;
}


/* Standard table styling for dark mode */
.standard-table {
  width: 100%;
  margin-bottom: 1rem;
  border-collapse: collapse;
}

/* Dark mode support for standard tables */
body.dark-mode .standard-table,
body.dark-mode table.dark-mode-compatible {
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
}

body.dark-mode .standard-table th,
body.dark-mode .standard-table td,
body.dark-mode table.dark-mode-compatible th,
body.dark-mode table.dark-mode-compatible td {
  border-color: #444 !important;
  color: #E0E0E0 !important;
  background-color: transparent !important;
}

body.dark-mode .standard-table thead th,
body.dark-mode table.dark-mode-compatible thead th {
  background-color: #333 !important;
  border-bottom-color: #444 !important;
}

body.dark-mode .standard-table-striped tbody tr:nth-of-type(odd),
body.dark-mode .standard-table.table-striped tbody tr:nth-of-type(odd),
body.dark-mode table.dark-mode-compatible.table-striped tbody tr:nth-of-type(odd) {
  background-color: #333 !important;
}

body.dark-mode .standard-table-hover tbody tr:hover,
body.dark-mode .standard-table.table-hover tbody tr:hover,
body.dark-mode table.dark-mode-compatible.table-hover tbody tr:hover {
  background-color: #404040 !important;
}

/* Apply to all tables with the 'table' class */
body.dark-mode .table {
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
  border-color: #444 !important;
}

body.dark-mode .table th,
body.dark-mode .table td {
  border-color: #444 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background-color: #333 !important;
}

body.dark-mode .table-hover tbody tr:hover {
  background-color: #404040 !important;
}

/* Dark mode styling for tables with the dark-mode-table class */
table.dark-mode-table {
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
  border-color: #444 !important;
}

table.dark-mode-table th,
table.dark-mode-table td {
  border-color: #444 !important;
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
}

table.dark-mode-table thead th {
  background-color: #333 !important;
  border-color: #444 !important;
}

table.dark-mode-table tbody tr:nth-of-type(odd) {
  background-color: #333 !important;
}

table.dark-mode-table tbody tr:nth-of-type(even) {
  background-color: #2D2D2D !important;
}

table.dark-mode-table tbody tr:hover {
  background-color: #404040 !important;
}

/* Style for help text to ensure visibility in dark mode */
.help-text {
  color: inherit;  /* Inherit color from parent */
}

body.dark-mode .help-text {
  color: #E0E0E0 !important; /* Light color for dark mode */
}

/* Make sure card text is properly colored in dark mode */
body.dark-mode .card p,
body.dark-mode .card div,
body.dark-mode .card span,
body.dark-mode .card label {
  color: #E0E0E0 !important;
}

/* Make sure headings are visible in dark mode */
body.dark-mode .card h1,
body.dark-mode .card h2,
body.dark-mode .card h3,
body.dark-mode .card h4,
body.dark-mode .card h5,
body.dark-mode .card h6 {
  color: #E0E0E0 !important;
}

/* More specific CSS selectors with !important flags */

/* Basic modal background */
body.dark-mode .modal-content {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
  border-color: #404040 !important;
}

/* Modal header */
body.dark-mode .modal-header {
  background-color: #2D2D2D !important;
  border-bottom-color: #404040 !important;
}

/* Modal footer */
body.dark-mode .modal-footer {
  background-color: #2D2D2D !important;
  border-top-color: #404040 !important;
}

/* Modal body */
body.dark-mode .modal-body {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
}

/* Modal title */
body.dark-mode .modal-title {
  color: #E0E0E0 !important;
}

/* Default button in modal */
body.dark-mode .modal-dialog .btn-default {
  background-color: #404040 !important;
  color: #E0E0E0 !important;
  border-color: #555555 !important;
}

body.dark-mode .modal-dialog .btn-default:hover {
  background-color: #505050 !important;
  color: #FFFFFF !important;
}

/* Primary button in modal */
body.dark-mode .modal-dialog .btn-primary {
  background-color: #38B6FF !important;
  color: white !important;
  border-color: #2D9DE0 !important;
}

body.dark-mode .modal-dialog .btn-primary:hover {
  background-color: #60c3ff !important;
}

/* Modal backdrop darker */
body.dark-mode .modal-backdrop {
  background-color: #000000 !important;
}

body.dark-mode .modal-backdrop.in {
  opacity: 0.7 !important;
}

/* Target the shiny modal specifically */
body.dark-mode div.modal.sbs-modal .modal-content {
  background-color: #2D2D2D !important;
}

/* Handle any other modal classes that might be used */
body.dark-mode .shiny-modal .modal-content,
body.dark-mode .shiny-modal-content {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
}

/* Make sure dialog itself has correct background */
body.dark-mode .modal-dialog {
  background-color: transparent !important;
}

/* DataTable styles - more specific selectors */
body.dark-mode .modal-content div.dataTables_wrapper {
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
}

body.dark-mode .modal-content div.dataTables_wrapper .dataTables_length,
body.dark-mode .modal-content div.dataTables_wrapper .dataTables_filter,
body.dark-mode .modal-content div.dataTables_wrapper .dataTables_info,
body.dark-mode .modal-content div.dataTables_wrapper .dataTables_processing,
body.dark-mode .modal-content div.dataTables_wrapper .dataTables_paginate {
  color: #E0E0E0 !important;
}

body.dark-mode .modal-content table.dataTable thead th,
body.dark-mode .modal-content table.dataTable thead td,
body.dark-mode .modal-content table.dataTable tbody td {
  border-color: #404040 !important;
  color: #E0E0E0 !important;
  background-color: #2D2D2D !important;
}

body.dark-mode .modal-content table.dataTable.stripe tbody tr.odd,
body.dark-mode .modal-content table.dataTable.display tbody tr.odd {
  background-color: #333333 !important;
}

body.dark-mode .modal-content table.dataTable.stripe tbody tr.even,
body.dark-mode .modal-content table.dataTable.display tbody tr.even {
  background-color: #2D2D2D !important;
}

body.dark-mode .modal-content table.dataTable.hover tbody tr:hover,
body.dark-mode .modal-content table.dataTable.display tbody tr:hover {
  background-color: #404040 !important;
}

/* Add these CSS rules to your styles.css file */

/* Info button styling for dark mode */
body.dark-mode .info-button {
  background-color: #2D2D2D !important;
  border-color: #404040 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .info-button:hover {
  background-color: #404040 !important;
  color: #60b0ff !important;
}

/* Make sure the blue styling for active info buttons works in dark mode */
body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] {
  background-color: #38B6FF !important;
  color: white !important;
  border-color: #2D9DE0 !important;
}

/* Ensure the selected info button text color remains visible */
body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] b {
  color: white !important;
}

/* Fix for info buttons in dark mode to ensure proper font color */
body.dark-mode .info-button-container .info-button {
  color: #E0E0E0 !important;
}

/* Make sure that when JavaScript applies styles to buttons, it doesn't conflict */
body.dark-mode .info-button-container .info-button:not([style*='background-color: #38B6FF']) {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
  border-color: #404040 !important;
}

/* Target the confirmation modal buttons specifically */
body.dark-mode .modal-dialog .modal-footer .btn {
  background-color: #404040 !important;
  color: #E0E0E0 !important;
  border-color: #555555 !important;
}

body.dark-mode .modal-dialog .modal-footer .btn:hover {
  background-color: #505050 !important;
}

/* For the primary confirmation button (Bevestigen) */
body.dark-mode .modal-dialog .modal-footer .btn-primary,
body.dark-mode .modal-dialog .modal-footer #confirm_navigation {
  background-color: #38B6FF !important;
  color: white !important;
  border-color: #2D9DE0 !important;
}

/* For the cancel button (Annuleren) */
body.dark-mode .modal-dialog .modal-footer .modalButton,
body.dark-mode .modal-dialog .modal-footer button:not(.btn-primary):not(#confirm_navigation) {
  background-color: #404040 !important;
  color: #E0E0E0 !important;
  border-color: #555555 !important;
}

.info-button-container .info-button[style*='background-color: #38B6FF'] {
  background: linear-gradient(to bottom, #38B6FF, #0066CC) !important;
  color: white !important;
  border-color: #0066CC !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
  transition: all 0.2s ease-in-out !important;
}

/* Hover effect for gradient buttons */
.info-button-container .info-button[style*='background-color: #38B6FF']:hover {
  background: linear-gradient(to bottom, #60c3ff, #0077e6) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Ensure text is visible and well-formatted */
.info-button-container .info-button[style*='background-color: #38B6FF'] b {
  color: white !important;
  font-weight: 600 !important;
}

/* Dark mode specific gradient */
body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] {
  background: linear-gradient(to bottom, #38B6FF, #005bb7) !important;
  border-color: #004a99 !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF']:hover {
  background: linear-gradient(to bottom, #60c3ff, #0066cc) !important;
}

/* Dark mode styles for state action buttons */
body.dark-mode .state-action-buttons .state-button,
body.dark-mode .btn.state-button,
body.dark-mode .downloadButton.state-button,
body.dark-mode button.state-button,
body.dark-mode a.state-button {
  background-color: #2D2D2D !important;
  border-color: #404040 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .state-action-buttons .state-button:hover,
body.dark-mode .btn.state-button:hover,
body.dark-mode .downloadButton.state-button:hover,
body.dark-mode button.state-button:hover,
body.dark-mode a.state-button:hover {
  background-color: #404040 !important;
  border-color: #505050 !important;
}

body.dark-mode .state-action-buttons .state-button .fa,
body.dark-mode .btn.state-button .fa,
body.dark-mode .downloadButton.state-button .fa,
body.dark-mode button.state-button .fa,
body.dark-mode a.state-button .fa {
  color: #E0E0E0 !important;
  background-color: transparent !important;
}

body.dark-mode .state-action-buttons .state-button:hover .fa,
body.dark-mode .btn.state-button:hover .fa,
body.dark-mode .downloadButton.state-button:hover .fa,
body.dark-mode button.state-button:hover .fa,
body.dark-mode a.state-button:hover .fa {
  color: #FFFFFF !important;
}

/* Fix for Shiny's downloadButton which has additional styling */
body.dark-mode .btn.shiny-download-link.state-button {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
  border-color: #404040 !important;
}

body.dark-mode .btn.shiny-download-link.state-button:hover {
  background-color: #404040 !important;
}

/* In case of any Bootstrap styling overrides */
body.dark-mode .btn.btn-default.state-button {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
  border-color: #404040 !important;
}

/* Force transparent backgrounds for icons to avoid box backgrounds */
body.dark-mode .state-button i,
body.dark-mode .state-button .glyphicon,
body.dark-mode .state-button .fa {
  background-color: transparent !important;
}

/* Basisstijl voor alle iconen */
.shiny-input-container .input-group-addon i.fa,
.shiny-input-container .input-group-addon i.fas,
.shiny-input-container .input-group-addon i.glyphicon,
.input-group-addon i {
  background-color: transparent !important;
  color: inherit !important;
}

/* Specifieke stijl voor het percentageteken */
.input-group-addon i.fa-percent,
.input-group .input-group-addon i.fa-percent {
  background-color: transparent !important;
}

/* Dark mode overrides voor alle iconen */
body.dark-mode .input-group-addon,
body.dark-mode .input-group-text {
  background-color: #333 !important;
  border-color: #444 !important;
  color: #E0E0E0 !important;
}

/* Specifieke styling voor het percentageteken in dark mode */
body.dark-mode .input-group-addon i.fa-percent,
body.dark-mode .input-group .input-group-addon i.fa-percent,
body.dark-mode .input-group-text i.fa-percent {
  color: #E0E0E0 !important;
  background-color: transparent !important;
}

/* Stijl voor euro teken */
body.dark-mode .input-group-addon i.fa-euro,
body.dark-mode .input-group .input-group-addon i.fa-euro,
body.dark-mode .input-group-text i.fa-euro {
  color: #E0E0E0 !important;
  background-color: transparent !important;
}

/* Extra stijlen voor het geval dat er Bootstrap 4+ input-group-text wordt gebruikt */
body.dark-mode .input-group-text {
  background-color: #333 !important;
  border-color: #444 !important;
  color: #E0E0E0 !important;
}

/* Zorgen dat numericInputIcon elementen in dark mode correct worden weergegeven */
body.dark-mode .form-control + .input-group-addon,
body.dark-mode .form-control + .input-group-text {
  background-color: #333 !important;
  border-color: #444 !important;
  color: #E0E0E0 !important;
}

/* Extra specifieke selector voor input-groep-addon */
body.dark-mode div.input-group span.input-group-addon,
body.dark-mode div.input-group div.input-group-append span.input-group-text {
  background-color: #333 !important;
  border-color: #444 !important;
  color: #E0E0E0 !important;
}

/* Zorgen dat de iconen binnen een input-group altijd de juiste kleur hebben in dark mode */
body.dark-mode div.input-group span.input-group-addon i,
body.dark-mode div.input-group div.input-group-append span.input-group-text i,
body.dark-mode div.input-group-addon i,
body.dark-mode div.input-group-text i {
  color: #E0E0E0 !important;
  background-color: transparent !important;
}

/* Specifieke selector voor numericInputIcon dat door Shiny gebruikt wordt */
body.dark-mode .shiny-input-container .form-group .input-group .input-group-addon {
  background-color: #333 !important;
  border-color: #444 !important;
  color: #E0E0E0 !important;
}

/* Voor hover states van input-group-addons */
body.dark-mode .input-group-addon:hover, 
body.dark-mode .input-group-text:hover {
  background-color: #404040 !important;
}

/* Dark mode overrides voor btn-block */
body.dark-mode .btn-block {
    background-color: #2D2D2D !important;
    color: #E0E0E0 !important;
    border-color: #444 !important;
}

body.dark-mode .btn-block:hover {
    background-color: #404040 !important;
    color: #FFFFFF !important;
    border-color: #555 !important;
}

/* Zorg ervoor dat iconen in knoppen de juiste kleur hebben */
body.dark-mode .btn-block i.fa, 
body.dark-mode .btn-block i.fas,
body.dark-mode .btn-block i.glyphicon {
    color: #E0E0E0 !important;
}

body.dark-mode .btn-block:hover i.fa,
body.dark-mode .btn-block:hover i.fas,
body.dark-mode .btn-block:hover i.glyphicon {
    color: #FFFFFF !important;
}

/* Extra selectors voor het geval dat er andere class combinaties worden gebruikt */
body.dark-mode button.btn.btn-block,
body.dark-mode a.btn.btn-block,
body.dark-mode input.btn.btn-block {
    background-color: #2D2D2D !important;
    color: #E0E0E0 !important;
    border-color: #444 !important;
}

body.dark-mode button.btn.btn-block:hover,
body.dark-mode a.btn.btn-block:hover,
body.dark-mode input.btn.btn-block:hover {
    background-color: #404040 !important;
    color: #FFFFFF !important;
}

/* Specifiek voor functieknoppen zoals reset en delete */
body.dark-mode #reset_table,
body.dark-mode #delete_selected,
body.dark-mode [id$="_reset_table"],
body.dark-mode [id$="_delete_selected"] {
    background-color: #2D2D2D !important;
    color: #E0E0E0 !important;
    border-color: #444 !important;
}

body.dark-mode #reset_table:hover,
body.dark-mode #delete_selected:hover,
body.dark-mode [id$="_reset_table"]:hover,
body.dark-mode [id$="_delete_selected"]:hover {
    background-color: #404040 !important;
    color: #FFFFFF !important;
}

/* Styling voor de verwijder-knop om deze visueel te onderscheiden */
body.dark-mode #delete_selected,
body.dark-mode [id$="_delete_selected"] {
    background-color: #432D2D !important; /* Donkerrood-achtige tint */
    border-color: #5A3A3A !important;
}

body.dark-mode #delete_selected:hover,
body.dark-mode [id$="_delete_selected"]:hover {
    background-color: #503030 !important;
}

/* Voor het geval dat er extra classes worden toegevoegd */
body.dark-mode .delete-button,
body.dark-mode .delete-btn,
body.dark-mode .btn-danger.btn-block {
    background-color: #432D2D !important;
    border-color: #5A3A3A !important;
    color: #E0E0E0 !important;
}

body.dark-mode .delete-button:hover,
body.dark-mode .delete-btn:hover,
body.dark-mode .btn-danger.btn-block:hover {
    background-color: #503030 !important;
    color: #FFFFFF !important;
}

/* ========== SIDEBAR COLLAPSED STATE ========== */

/* Maintain sidebar visibility but with reduced width */
body.sidebar-collapsed .sidebar-wrapper {
  left: 0;
  width: 70px; /* Increased from 60px to 70px for more space */
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

/* Adjust main content area when sidebar is collapsed */
body.sidebar-collapsed .main-content {
  margin-left: 70px; /* Adjusted to match sidebar width */
  width: calc(100% - 70px);
  transition: all 0.3s ease;
}

/* Hide text labels in sidebar links */
body.sidebar-collapsed .sidebar-link span {
  display: none;
}

/* Hide the logo in collapsed state */
body.sidebar-collapsed .sidebar-header img {
  display: none;
}

/* Center icons in collapsed sidebar */
body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 10px 5px;
}

/* Icons in collapsed state - same size as expanded */
body.sidebar-collapsed .sidebar-link i, 
body.sidebar-collapsed .sidebar-link svg {
  margin-right: 0;
  font-size: 16px;
  width: 20px;
  height: auto;
}

/* Reset padding for nested menu items */
body.sidebar-collapsed div[style*="padding-left: 20px"] {
  padding-left: 0 !important;
}

/* Center header container when collapsed */
body.sidebar-collapsed .sidebar-header-container {
  justify-content: center;
}

/* Adjust footer in collapsed state to stack items vertically */
body.sidebar-collapsed .sidebar-footer {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 15px 5px;
  gap: 15px; /* Space between dark mode and logout */
}

/* Simplify theme switch in collapsed mode - show only icon */
body.sidebar-collapsed .sidebar-footer .theme-switch-wrapper {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* Make the moon icon larger and clickable */
body.sidebar-collapsed .sidebar-footer .moon-icon {
  font-size: 22px; /* Larger icon */
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s ease;
}

body.sidebar-collapsed .sidebar-footer .moon-icon:hover {
  background-color: #f0f0f0;
}

body.dark-mode.sidebar-collapsed .sidebar-footer .moon-icon:hover {
  background-color: #404040;
}

/* Hide the actual toggle switch in collapsed mode */
body.sidebar-collapsed .sidebar-footer .theme-switch {
  display: none;
}

/* Modified logout button in collapsed mode */
body.sidebar-collapsed .sidebar-footer #logout_btn {
  padding: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  margin-top: 5px;
}

body.sidebar-collapsed .sidebar-footer #logout_btn i {
  font-size: 20px; /* Larger logout icon */
  margin: 0;
}

/* Hide logout text in collapsed state */
body.sidebar-collapsed .sidebar-footer #logout_btn span {
  display: none;
}

/* Fix for nested menu items to ensure proper spacing */
body.sidebar-collapsed .sidebar div[style*="padding-left: 20px"] .sidebar-link {
  padding: 10px;
  margin: 3px 5px;
}

/* Add tooltip support for better UX in icon-only mode */
body.sidebar-collapsed .sidebar-link {
  position: relative;
}

body.sidebar-collapsed .sidebar-link:hover::after {
  content: attr(data-title);
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.8);
  color: white;
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 12px;
  white-space: nowrap;
  z-index: 1001;
  margin-left: 10px;
}

/* Prevent overflow from tooltips and footer elements */
body.sidebar-collapsed .sidebar-wrapper {
  overflow-x: hidden !important;
  overflow-y: auto;
}

/* Remove tooltips from footer buttons to prevent scrollbar */
body.sidebar-collapsed .sidebar-footer .moon-icon,
body.sidebar-collapsed .sidebar-footer #logout_btn {
  position: relative;
}

body.sidebar-collapsed .sidebar-footer .moon-icon:hover::after,
body.sidebar-collapsed .sidebar-footer #logout_btn:hover::after {
  display: none !important;
}

/* Dark mode adaptations for the collapsed sidebar */
body.dark-mode.sidebar-collapsed .sidebar-wrapper {
  background-color: #2D2D2D;
  border-right: 1px solid #444;
}

body.dark-mode.sidebar-collapsed .sidebar-link:hover::after {
  background: rgba(45, 45, 45, 0.95);
  border: 1px solid #444;
}

body.dark-mode.sidebar-collapsed .sidebar-toggle-internal {
  background-color: #2D2D2D;
  border-color: #444;
}

/* Ensure tooltip is visible in dark mode */
body.dark-mode.sidebar-collapsed .sidebar-link:hover::after {
  color: #E0E0E0;
}


body.sidebar-collapsed .sidebar-wrapper {
  left: 0;
  width: 70px;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

body.sidebar-collapsed .main-content {
  margin-left: 60px;
  width: calc(100% - 60px);
}

body.sidebar-collapsed .sidebar-toggle-minimized {
  display: none;
}

body.sidebar-collapsed .sidebar-link span {
  display: none;
}

body.sidebar-collapsed .sidebar-header img {
  display: none;
}

body.sidebar-collapsed .sidebar-footer {
  justify-content: center;
}

body.sidebar-collapsed .sidebar-footer .theme-switch-wrapper {
  margin-right: 0;
}

body.sidebar-collapsed .sidebar-footer #logout_btn span {
  display: none;
}

/* Create a centered icon layout in minimized mode */
body.sidebar-collapsed .sidebar-link {
  justify-content: center;
  padding: 10px;
}

body.sidebar-collapsed .sidebar-link i, 
body.sidebar-collapsed .sidebar-link svg {
  margin-right: 0;
}

/* Adjust nested links */
body.sidebar-collapsed .sidebar div[style*="padding-left: 20px"] {
  padding-left: 0 !important;
}



 /* ========== INFO BUTTONS & STATE BUTTONS CONTAINER ========== */
.top-container {
  display: flex;
  gap: 15px;
  align-items: flex-start;
  margin-bottom: 20px;
  margin-left: 0;
  margin-right: 0;
  padding-left: 0;
  padding-right: 0;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}

.state-action-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
  margin-right: auto;
}

.state-action-buttons .state-button {
  width: 40px !important;
  height: 40px !important;
  min-width: 40px !important;
  min-height: 40px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: white !important;
  border: 1px solid #ddd !important;
  border-radius: 4px !important;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.state-action-buttons .state-button:hover {
  background-color: #f5f5f5 !important;
  border-color: #999 !important;
}

.state-action-buttons .state-button .fa {
  background-color: #ffffff !important;
  color: #666 !important;
  font-size: 14px !important;
  width: 14px !important;
  height: 14px !important;
  line-height: 1 !important;
}

.state-action-buttons .state-button:hover .fa {
  color: #333 !important;
}

/* Info buttons container */
.info-button-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 0 1 auto;
  min-width: 0;
  align-content: flex-start;
  justify-content: flex-end;
  margin-left: auto;
  max-width: 400px; /* Standaard max breedte voor halve scherm */
}

.info-button {
  height: 70px !important;
  min-height: 70px !important;
  max-height: 70px !important;
  min-width: calc(25% - 8px); /* Standaard 4 kolommen */
  max-width: calc(25% - 8px);
  padding: 6px 6px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  white-space: normal !important;
  word-wrap: break-word !important;
  background-color: white;
  border: 1px solid #ddd;
  color: #444444;
  font-size: 8.5px;
  font-weight: 600;
  line-height: 1.2;
  border-radius: 4px;
  transition: all 0.2s ease;
  flex: 0 1 auto;
}

.info-button:hover {
  background-color: #f5f5f5;
  border-color: #999;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.info-button b {
  display: block;
  margin-top: 2px;
  font-size: 9.5px;
}

/* ACTIVATED STYLING */
.info-button-container .info-button[style*='background-color: #38B6FF'] {
  background: linear-gradient(to bottom, #38B6FF, #0066CC) !important;
  color: white !important;
  border-color: #0066CC !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.info-button-container .info-button[style*='background-color: #38B6FF']:hover {
  background: linear-gradient(to bottom, #60c3ff, #0077e6) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15) !important;
}

.info-button-container .info-button[style*='background-color: #38B6FF'] b {
  color: white !important;
  font-weight: 600 !important;
}

/* Groot scherm - grotere buttons */
@media (min-width: 1400px) {
  .info-button-container {
    max-width: none;
  }
  
  .info-button {
    min-width: 110px;
    max-width: 110px;
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;
    font-size: 10px;
    padding: 8px 10px !important;
  }
  
  .info-button b {
    font-size: 11px;
  }
}

/* Tablet: wrap en 4 kleinere kolommen */
@media (max-width: 1024px) {
  .top-container {
    flex-wrap: wrap;
  }
  
  .state-action-buttons {
    margin-right: 0;
  }
  
  .info-button-container {
    width: 100%;
    max-width: none;
    justify-content: center;
    margin-left: 0;
  }
  
  .info-button {
    min-width: calc(25% - 8px);
    max-width: calc(25% - 8px);
    height: 55px !important;
    min-height: 55px !important;
    max-height: 55px !important;
    font-size: 8.5px;
    padding: 5px 6px !important;
  }
  
  .info-button b {
    font-size: 9.5px;
  }
}

/* Mobiel: carousel - properly constrained */
/* Mobiel: 3 kolommen grid die correct wrapt */
@media (max-width: 480px) {
  .top-container {
    flex-direction: column;
    max-width: 100vw;
    overflow: hidden;
  }
  
  .state-action-buttons {
    width: 100%;
    justify-content: center;
    margin-right: 0;
    margin-bottom: 10px;
  }
  
  .info-button-container {
    width: 100% !important;
    max-width: 100% !important;
    flex-wrap: wrap !important;
    justify-content: flex-start !important; /* Changed from space-between */
    margin-left: 0;
    overflow-x: visible !important;
    overflow-y: visible !important;
    padding-bottom: 10px;
    padding-right: 0;
    gap: 6px;
    box-sizing: border-box;
    display: flex !important;
  }
  
  /* Remove scrollbar styling since we're not scrolling anymore */
  .info-button-container::-webkit-scrollbar {
    display: none;
  }
  
  .info-button {
    /* Calculate width to fit exactly 3 per row with gap */
    width: calc((100% - 12px) / 3) !important;
    min-width: calc((100% - 12px) / 3) !important;
    max-width: calc((100% - 12px) / 3) !important;
    height: 50px !important;
    min-height: 50px !important;
    max-height: 50px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-size: 7.5px !important;
    padding: 4px 3px !important;
    line-height: 1.1 !important;
    margin: 0 !important;
  }
  
  .info-button b {
    font-size: 8.5px !important;
    margin-top: 1px;
    display: block;
  }
}

/* Extra kleine schermen (< 360px) - nog compacter */
@media (max-width: 360px) {
  .info-button {
    font-size: 7px !important;
    padding: 3px 2px !important;
    height: 45px !important;
    min-height: 45px !important;
    max-height: 45px !important;
  }
  
  .info-button b {
    font-size: 8px !important;
  }
}

/* Dark mode */
body.dark-mode .info-button-container::-webkit-scrollbar-track {
  background: #2D2D2D;
}

body.dark-mode .info-button-container::-webkit-scrollbar-thumb {
  background: #555;
}

body.dark-mode .info-button {
  background-color: #2D2D2D !important;
  border-color: #404040 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .info-button:hover {
  background-color: #404040 !important;
  color: #60b0ff !important;
}

body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] {
  background: linear-gradient(to bottom, #38B6FF, #005bb7) !important;
  border-color: #004a99 !important;
  color: white !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF']:hover {
  background: linear-gradient(to bottom, #60c3ff, #0066cc) !important;
}

body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] b {
  color: white !important;
}

body.dark-mode .state-action-buttons .state-button {
  background-color: #2D2D2D !important;
  border-color: #404040 !important;
}

body.dark-mode .state-action-buttons .state-button:hover {
  background-color: #404040 !important;
  border-color: #505050 !important;
}

body.dark-mode .state-action-buttons .state-button .fa {
  color: #E0E0E0 !important;
  background-color: transparent !important;
}

/* Dark mode voor info buttons - meer specifieke selectors */
body.dark-mode .info-button-container .info-button {
  background-color: #2D2D2D !important;
  border-color: #404040 !important;
  color: #E0E0E0 !important;
}

body.dark-mode .info-button-container .info-button:hover {
  background-color: #404040 !important;
  border-color: #505050 !important;
  color: #60b0ff !important;
}

/* Zorg dat niet-actieve info buttons de juiste achtergrond hebben */
body.dark-mode .info-button-container .info-button:not([style*='background-color: #38B6FF']) {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
  border-color: #404040 !important;
}

/* Voor de tekst binnen de buttons */
body.dark-mode .info-button-container .info-button:not([style*='background-color: #38B6FF']) b {
  color: #E0E0E0 !important;
}

/* Actieve buttons behouden hun blauwe gradient */
body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] {
  background: linear-gradient(to bottom, #38B6FF, #005bb7) !important;
  border-color: #004a99 !important;
  color: white !important;
}

body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] b {
  color: white !important;
}

/* Fix home container alignment on mobile */
@media (max-width: 768px) {
  .home-container {
    padding: 20px 15px;
    margin-top: 10px;
  }
  
  .home-container > div {
    padding: 0 !important;
  }
  
  .home-container h1 {
    font-size: 24px;
    margin-bottom: 15px;
    text-align: center !important;
  }
  
  .home-container p {
    font-size: 14px;
    padding: 0 10px;
  }
}

@media (max-width: 480px) {
  .home-container {
    padding: 15px 10px;
    margin: 10px 5px;
  }
  
  .home-container h1 {
    font-size: 20px;
  }
  
  .home-container p {
    font-size: 13px;
    padding: 0 5px;
  }
}

/* ========== RESPONSIVE TAB NAVIGATION ========== */
/* Horizontaal scrollbare tabs op kleine schermen */
@media (max-width: 768px) {
  /* Container voor tabs scrollbaar maken */
  .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-bottom: 2px solid #e5e5e5;
    scrollbar-width: thin;
    scrollbar-color: #ccc transparent;
  }
  
  /* Tabs compacter maken */
  .nav-tabs .nav-item {
    flex-shrink: 0;
    margin-bottom: -2px;
  }
  
  .nav-tabs .nav-link {
    white-space: nowrap;
    padding: 10px 15px;
    font-size: 13px;
  }
  
  /* Scroll indicator styling */
  .nav-tabs::-webkit-scrollbar {
    height: 4px;
  }
  
  .nav-tabs::-webkit-scrollbar-track {
    background: #f1f1f1;
  }
  
  .nav-tabs::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
  }
  
  /* Tab content padding aanpassen */
  .custom-tabset .tab-content,
  .tab-content {
    padding: 15px 10px;
  }
  
  /* Cards en containers compacter */
  .card,
  .module-container {
    padding: 15px 10px;
    margin-bottom: 15px;
  }
  
  .card-header {
    padding: 10px;
    font-size: 14px;
  }
  
  /* Input velden full width */
  .form-control,
  .form-select,
  input[type="text"],
  input[type="number"],
  select {
    width: 100% !important;
    max-width: 100%;
  }
  
  /* Buttons aanpassen */
  .btn-row {
    flex-direction: column;
  }
  
  .btn-row .btn {
    width: 100% !important;
    margin-bottom: 10px;
  }
}

/* Nog compacter voor zeer kleine schermen */
@media (max-width: 480px) {
  .nav-tabs .nav-link {
    padding: 8px 12px;
    font-size: 12px;
  }
  
  h1 { font-size: 22px; }
  h2 { font-size: 18px; }
  h3 { font-size: 16px; }
  h4 { font-size: 14px; }
  
  .card,
  .module-container {
    padding: 10px;
  }
}

/* Dark mode voor scrollbare tabs */
body.dark-mode .nav-tabs::-webkit-scrollbar-track {
  background: #2D2D2D;
}

body.dark-mode .nav-tabs::-webkit-scrollbar-thumb {
  background: #555;
}

/* Add margin below module titles */
.module-container h1,
.module-container h2,
.module-container h3,
.card h1,
.card h2,
.card h3,
h1:first-child,
h2:first-child,
h3:first-child {
  margin-bottom: 20px !important;
}

/* Force dark mode background for info buttons - more specific selector */
body.dark-mode .info-button-container .info-button:not([style*='background-color: #38B6FF']) {
  background-color: #2D2D2D !important;
  color: #E0E0E0 !important;
  border-color: #404040 !important;
}

/* Ensure hover state works in dark mode */
body.dark-mode .info-button-container .info-button:not([style*='background-color: #38B6FF']):hover {
  background-color: #404040 !important;
  border-color: #505050 !important;
  color: #60b0ff !important;
}

/* Active buttons keep their blue gradient in dark mode */
body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] {
  background: linear-gradient(to bottom, #38B6FF, #005bb7) !important;
  border-color: #004a99 !important;
  color: white !important;
}

body.dark-mode .info-button-container .info-button[style*='background-color: #38B6FF'] b {
  color: white !important;
}

/* Scenario badge styling */
/* Scenario badge styling */
.scenario-badge {
  display: inline-block;
  background-color: #38B6FF;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
  margin-left: 15px;
  vertical-align: middle;
  position: relative;
  top: -6px; /* Dit trekt de badge 2px omhoog */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.scenario-badge:hover {
  background-color: #0675DD;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
}

/* Dark mode support */
body.dark-mode .scenario-badge {
  background-color: #0675DD;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

body.dark-mode .scenario-badge:hover {
  background-color: #38B6FF;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.4);
}

/* Title row container */
.title-row {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.title-row h2 {
  margin: 0;
}

/* Verberg de backdrop helemaal */
.modal-backdrop {
  display: none !important;
}

/* Blur de achtergrond als modal open is */
body.modal-open .main-content,
body.modal-open .sidebar-wrapper {
  filter: blur(2px);
  transition: filter 0.15s ease;
}

/* Maak scenario laden modal breder op grote schermen */
.modal-dialog {
  max-width: 600px; /* Standaard is meestal 500px */
}

/* Op grotere schermen nog breder */
@media (min-width: 992px) {
  .modal-dialog {
    max-width: 700px;
  }
}

@media (min-width: 1200px) {
  .modal-dialog {
    max-width: 800px;
  }
}

/* Zorg dat de select input de volle breedte gebruikt */
.modal-body select {
  width: 100% !important;
  max-width: 100% !important;
}

/* Maak scenario dropdown breder in de modal */
.modal-body .form-group {
  width: 100% !important;
}

.modal-body select,
.modal-body .shiny-input-container {
  width: 100% !important;
  min-width: 100% !important;
}

/* Specifiek voor selectInput */
.modal-body select.form-control {
  width: 100% !important;
  min-width: 500px !important; /* Minimale breedte voor langere scenario namen */
  padding: 8px 12px;
  font-size: 14px;
}

/* Voor selectize indien gebruikt */
.modal-body .selectize-input {
  width: 100% !important;
  min-width: 500px !important;
}

/* Responsive: op kleinere schermen minder breed */
@media (max-width: 768px) {
  .modal-body select.form-control,
  .modal-body .selectize-input {
    min-width: 100% !important;
  }
}

/* Fix button visibility in dark mode */
body.dark-mode .btn-default,
body.dark-mode .btn.action-button {
  background-color: #404040 !important;
  color: #E0E0E0 !important;
  border-color: #666 !important;
}

body.dark-mode .btn-default:hover,
body.dark-mode .btn.action-button:hover {
  background-color: #505050 !important;
  border-color: #777 !important;
}

/* Fix voor "Bereken product formatiegroepen" button - maak het blauw maar lichter */
body.dark-mode .btn-info,
body.dark-mode .btn.btn-info {
  background-color: #0675DD !important; /* Lichtere tint blauw */
  color: white !important;
  border-color: #0675DD !important;
}

body.dark-mode .btn-info:hover,
body.dark-mode .btn.btn-info:hover {
  background-color: #1ab3cc !important;
  border-color: #1ab3cc !important;
}

/* Zorg dat primary buttons (zoals "Product formatie opslaan") hun blauwe kleur behouden */
body.dark-mode .btn-primary,
body.dark-mode .btn.btn-primary {
  background-color: #0675DD !important;
  color: white !important;
  border-color: #0675DD !important;
}

body.dark-mode .btn-primary:hover,
body.dark-mode .btn.btn-primary:hover {
  background-color: #0562b8 !important;
  border-color: #0562b8 !important;
}

/* Disabled buttons */
body.dark-mode .btn:disabled {
  background-color: #2a2a2a !important;
  color: #666 !important;
  border-color: #444 !important;
}

/* Fix placeholder text color in dark mode */
body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder,
body.dark-mode .form-control::placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

/* Voor verschillende browsers */
body.dark-mode input::-webkit-input-placeholder,
body.dark-mode textarea::-webkit-input-placeholder,
body.dark-mode .form-control::-webkit-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

body.dark-mode input::-moz-placeholder,
body.dark-mode textarea::-moz-placeholder,
body.dark-mode .form-control::-moz-placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

body.dark-mode input:-ms-input-placeholder,
body.dark-mode textarea:-ms-input-placeholder,
body.dark-mode .form-control:-ms-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

body.dark-mode input::-ms-input-placeholder,
body.dark-mode textarea::-ms-input-placeholder,
body.dark-mode .form-control::-ms-input-placeholder {
  color: #999 !important;
  opacity: 1 !important;
}

/* Focus state - maak placeholder nog lichter wanneer gebruiker typt */
body.dark-mode input:focus::placeholder,
body.dark-mode textarea:focus::placeholder,
body.dark-mode .form-control:focus::placeholder {
  color: #777 !important;
}

/* Highlight selected row */
.dataTables_wrapper table.dataTable tbody tr.selected {
  background-color: #38B6FF !important;
  color: white !important;
}

/* Dark mode support */
body.dark-mode .dataTables_wrapper table.dataTable tbody tr.selected {
  background-color: #0066CC !important;
}

/* Hover effect */
.dataTables_wrapper table.dataTable tbody tr:hover {
  background-color: #f0f0f0;
  cursor: pointer;
}

body.dark-mode .dataTables_wrapper table.dataTable tbody tr:hover {
  background-color: #3a3a3a;
}

/* Voeg deze regels toe aan je bestaande styles.css */

/* === SCENARIO SHARING STYLES === */

/* Badge container voor shared scenarios notificatie */
.shared-badge-container {
  animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Shared scenario badge styling */
.shared-badge-container .btn {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 20px;
  transition: all 0.2s ease;
}

.shared-badge-container .btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Badge number styling */
.badge-danger {
  background-color: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 12px;
  font-weight: bold;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Share button in scenario table */
.btn-sm .fa-share-alt {
  margin-right: 5px;
}

/* Share modal styling */
.share-modal-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Shared scenarios card styling */
.shared-scenario-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: white;
  transition: all 0.2s ease;
}

.shared-scenario-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #0675DD;
}

.shared-scenario-card h4 {
  color: #0675DD;
  margin-top: 0;
  margin-bottom: 10px;
}

.shared-scenario-card .card-text {
  margin-bottom: 8px;
  color: #333;
}

.shared-scenario-card .text-muted {
  color: #6c757d !important;
  font-size: 0.9em;
}

.shared-scenario-card em {
  background: #f8f9fa;
  padding: 8px;
  border-radius: 4px;
  display: block;
  margin: 10px 0;
  font-style: italic;
  color: #495057;
}

/* Accept/Decline button group */
.shared-scenario-card .btn-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Dark mode overrides */
body.dark-mode .shared-scenario-card {
  background: #2D2D2D;
  border-color: #404040;
  color: #E0E0E0;
}

body.dark-mode .shared-scenario-card:hover {
  border-color: #0675DD;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

body.dark-mode .shared-scenario-card h4 {
  color: #38B6FF;
}

body.dark-mode .shared-scenario-card .card-text {
  color: #E0E0E0;
}

body.dark-mode .shared-scenario-card em {
  background: #1a1a1a;
  color: #B0B0B0;
}

/* Alert info styling for empty state */
.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
}

body.dark-mode .alert-info {
  background-color: #1a4d5a;
  border-color: #0c3d47;
  color: #a8d5e2;
}

/* Responsive styling for mobile */
@media (max-width: 768px) {
  .shared-badge-container {
    top: 60px !important;
    right: 10px !important;
  }
  
  .shared-scenario-card {
    padding: 12px;
  }
  
  .shared-scenario-card .btn-group {
    flex-direction: column;
  }
  
  .shared-scenario-card .btn {
    width: 100%;
  }
}

/* Voeg deze regels toe aan je bestaande styles.css */

/* === SCENARIO SHARING STYLES === */

/* Badge op manage scenarios knop */
.notification-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 11px;
  font-weight: bold;
  min-width: 18px;
  text-align: center;
  animation: pulse-badge 2s infinite;
  z-index: 10;
}

@keyframes pulse-badge {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05);
  }
}

/* Sidebar badge styling */
.sidebar-badge {
  margin-left: 8px;
  background: #dc3545;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: bold;
  min-width: 16px;
  text-align: center;
  display: inline-block;
  animation: pulse-badge 2s infinite;
}

/* Share button in scenario table */
.btn-sm .fa-share-alt {
  margin-right: 5px;
}

/* Share modal styling */
.share-modal-textarea {
  resize: vertical;
  min-height: 80px;
}

/* Shared scenarios card styling */
.shared-scenario-card {
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  margin-bottom: 15px;
  background: white;
  transition: all 0.2s ease;
}

.shared-scenario-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #0675DD;
}

.shared-scenario-card h4 {
  color: #0675DD;
  margin-top: 0;
  margin-bottom: 10px;
}

.shared-scenario-card .card-text {
  margin-bottom: 8px;
  color: #333;
}

.shared-scenario-card .text-muted {
  color: #6c757d !important;
  font-size: 0.9em;
}

.shared-scenario-card em {
  background: #f8f9fa;
  padding: 8px;
  border-radius: 4px;
  display: block;
  margin: 10px 0;
  font-style: italic;
  color: #495057;
}

/* Accept/Decline button group */
.shared-scenario-card .btn-group {
  display: flex;
  gap: 10px;
  margin-top: 10px;
}

/* Dark mode overrides */
body.dark-mode .shared-scenario-card {
  background: #2D2D2D;
  border-color: #404040;
  color: #E0E0E0;
}

body.dark-mode .shared-scenario-card:hover {
  border-color: #0675DD;
  box-shadow: 0 2px 8px rgba(255, 255, 255, 0.1);
}

body.dark-mode .shared-scenario-card h4 {
  color: #38B6FF;
}

body.dark-mode .shared-scenario-card .card-text {
  color: #E0E0E0;
}

body.dark-mode .shared-scenario-card em {
  background: #1a1a1a;
  color: #B0B0B0;
}

/* Alert info styling for empty state */
.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
}

body.dark-mode .alert-info {
  background-color: #1a4d5a;
  border-color: #0c3d47;
  color: #a8d5e2;
}

/* Tab styling in manage modal */
.nav-tabs .nav-link.active {
  background-color: #0675DD !important;
  color: white !important;
  border-color: #0675DD !important;
}

body.dark-mode .nav-tabs .nav-link.active {
  background-color: #38B6FF !important;
  color: #1a1a1a !important;
}

/* Responsive styling for mobile */
@media (max-width: 768px) {
  .shared-scenario-card {
    padding: 12px;
  }
  
  .shared-scenario-card .btn-group {
    flex-direction: column;
  }
  
  .shared-scenario-card .btn {
    width: 100%;
  }
  
  .sidebar-badge {
    font-size: 9px;
    padding: 1px 4px;
  }
}

body.dark-mode .shared-scenario-card em {
  background: #1a1a1a;
  color: #B0B0B0;
}

/* Alert info styling for empty state */
.alert-info {
  background-color: #d1ecf1;
  border-color: #bee5eb;
  color: #0c5460;
  padding: 15px;
  border-radius: 4px;
  margin: 20px 0;
}

body.dark-mode .alert-info {
  background-color: #1a4d5a;
  border-color: #0c3d47;
  color: #a8d5e2;
}

/* Responsive styling for mobile */
@media (max-width: 768px) {
  .shared-badge-container {
    top: 60px !important;
    right: 10px !important;
  }
  
  .shared-scenario-card {
    padding: 12px;
  }
  
  .shared-scenario-card .btn-group {
    flex-direction: column;
  }
  
  .shared-scenario-card .btn {
    width: 100%;
  }
}

body.fte-mode #zmv_rekenmodel-zmv_info_buttons-btn_opslagen,
body.fte-mode #zmv_rekenmodel-zmv_info_buttons-btn_productformatie {
  display: none !important;
}/* ========================================
   FIX VOOR NUMERICINPUTICON OP KLEINE SCHERMEN
   ======================================== */

/* Zorg dat input-group elementen altijd op één lijn blijven */
.input-group {
  display: flex !important;
  flex-wrap: nowrap !important;
  align-items: stretch;
}

/* Zorg dat de input flex-groeit maar icons compact blijven */
.input-group .form-control {
  flex: 1 1 auto;
  min-width: 0;
}

/* Maak icons compact en altijd inline */
.input-group-text {
  display: flex !important;
  align-items: center;
  white-space: nowrap !important;
  flex-shrink: 0;
  padding: 0.375rem 0.5rem;
}

/* Specifieke fix voor shinyWidgets numericInputIcon */
.input-group > .input-group-prepend,
.input-group > .input-group-append {
  display: flex;
  flex-shrink: 0;
}

.input-group-prepend .input-group-text,
.input-group-append .input-group-text {
  border-radius: 0;
}

.input-group > .input-group-prepend:first-child .input-group-text {
  border-top-left-radius: 0.25rem;
  border-bottom-left-radius: 0.25rem;
}

.input-group > .input-group-append:last-child .input-group-text {
  border-top-right-radius: 0.25rem;
  border-bottom-right-radius: 0.25rem;
}

/* Extra responsive fixes voor mobiel */
@media (max-width: 768px) {
  /* Behoud flexbox layout ook op mobiel */
  .input-group {
    flex-wrap: nowrap !important;
  }
  
  /* Maak de input group text kleiner maar houd het inline */
  .input-group-text {
    font-size: 0.875rem;
    padding: 0.375rem 0.4rem;
  }
  
  /* Icons iets kleiner maken op mobiel */
  .input-group-text i,
  .input-group-text .fa,
  .input-group-text .fas {
    font-size: 0.875rem;
  }
  
  /* Form control iets kleiner op mobiel */
  .input-group .form-control {
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
  }
}

/* Extra kleine schermen (smartphones in portrait) */
@media (max-width: 480px) {
  .input-group-text {
    font-size: 0.8rem;
    padding: 0.375rem 0.35rem;
  }
  
  .input-group .form-control {
    font-size: 0.8rem;
    padding: 0.375rem 0.45rem;
  }
}

/* Dark mode compatibility */
body.dark-mode .input-group-text {
  background-color: #3a3a3a;
  border-color: #555555;
  color: #E0E0E0;
}

body.dark-mode .input-group .form-control {
  background-color: #2D2D2D;
  border-color: #555555;
  color: #E0E0E0;
}

/* Fix voor share comment in dark mode */
body.dark-mode .share-comment-container {
  background-color: #1a1a1a !important;
  border: 1px solid #444 !important;
  padding: 10px;
  border-radius: 4px;
  margin-top: 10px;
}

body.dark-mode .share-comment-container p {
  color: #E0E0E0 !important;
  margin: 0;
}

body.dark-mode .share-comment-container small {
  color: #6c757d !important;
}

/* ========================================
   CAO FALLBACK WAARSCHUWING POPUP - DARK MODE FIX
   ======================================== */

/* Light mode styling voor CAO waarschuwing */
.cao-fallback-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
  padding: 15px;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 14px;
  line-height: 1.6;
}

.cao-fallback-warning strong {
  font-weight: 600;
  color: #856404;
}

/* Dark mode styling voor CAO waarschuwing */
body.dark-mode .cao-fallback-warning {
  background-color: #3d3d1f !important;
  border: 1px solid #5a5a2d !important;
  color: #ffc107 !important;
}

body.dark-mode .cao-fallback-warning strong {
  color: #ffc107 !important;
  font-weight: 600;
}

/* Zorg dat de popup zichtbaar blijft boven andere elementen */
.cao-fallback-warning {
  position: relative;
  z-index: 10;
}

/* Fix voor scenario table in modal */
.modal-dialog .dataTables_wrapper table {
  table-layout: fixed;
  width: 100%;
}

.modal-dialog .dataTables_wrapper table td:first-child,
.modal-dialog .dataTables_wrapper table th:first-child {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modal-dialog .dataTables_wrapper table td:first-child:hover {
  overflow: visible;
  white-space: normal;
  word-wrap: break-word;
}