/* === DARK MODE & DATATABLES DARK MODE === */
body.dark-mode {
  background-color: #181a1b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .navbar {
  background-color: #23272b !important;
}
body.dark-mode .dropdown-menu {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .card, body.dark-mode .modal-content {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .table {
  color: #e0e0e0 !important;
}
body.dark-mode .btn-outline-light {
  color: #e0e0e0;
  border-color: #e0e0e0;
}
body.dark-mode .btn-outline-light:hover {
  background: #444;
  color: #fff;
}
/* DataTables Filters & SearchPanes Dark Mode */
body.dark-mode .dataTables_wrapper,
body.dark-mode .dt-search-panes,
body.dark-mode .dtsp-searchPanes,
body.dark-mode .dtsp-searchPane,
body.dark-mode .filter-container {
  background-color: #3a3f47 !important;
  border: 1px solid #6f42c1 !important;
  color: #e9ecef !important;
  border-radius: 5px !important;
}

body.dark-mode .dataTables_filter,
body.dark-mode .dataTables_length,
body.dark-mode .dataTables_info,
body.dark-mode .dataTables_paginate {
  border: 1px solid #6f42c1 !important;
  background-color: #3a3f47 !important;
  color: #e9ecef !important;
  border-radius: 5px !important;
  padding: 5px !important;
}

/* Filter container layout */
.filter-container {
  position: relative !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 5px !important;
  padding: 25px 10px 10px 10px !important;
  margin-bottom: 15px !important;
  background-color: #f8f9fa !important;
  min-height: 60px !important;
}

/* Active filters counter - top left */
.filter-counter {
  position: absolute !important;
  top: 8px !important;
  left: 12px !important;
  background-color: #6f42c1 !important;
  color: white !important;
  border-radius: 12px !important;
  padding: 3px 10px !important;
  font-size: 0.75rem !important;
  font-weight: bold !important;
  z-index: 10 !important;
  display: none !important;
}

/* Export buttons container - top right */
.filter-buttons {
  position: absolute !important;
  top: 8px !important;
  right: 12px !important;
  z-index: 10 !important;
}

.filter-buttons .dt-buttons {
  margin: 0 !important;
  display: inline-flex !important;
  gap: 5px !important;
}

.filter-buttons .dt-button {
  margin: 0 !important;
  padding: 3px 8px !important;
  font-size: 0.75rem !important;
  border-radius: 3px !important;
}

/* Dark mode filter container */
body.dark-mode .filter-container {
  border: 1px solid #6f42c1 !important;
  background-color: #3a3f47 !important;
}

body.dark-mode .filter-counter {
  background-color: #6f42c1 !important;
  color: white !important;
}
body.dark-mode .dtsp-header-bar,
body.dark-mode .searchpanes-header-controls {
  background: linear-gradient(135deg, #222 0%, #333 100%) !important;
  color: #e0e0e0 !important;
}
body.dark-mode .dtsp-searchPane .dtsp-topRow,
body.dark-mode .dtsp-searchPane .dtsp-search,
body.dark-mode .dtsp-searchPane .dtsp-searchButton {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .dtsp-searchPane input,
body.dark-mode .dtsp-searchPane select,
body.dark-mode .dataTables_wrapper input,
body.dark-mode .dataTables_wrapper select {
  background-color: #181a1b !important;
  color: #e0e0e0 !important;
  border: 1px solid #444 !important;
}
body.dark-mode .dtsp-row.dtsp-selected {
  background-color: #444 !important;
  color: #fff !important;
}
body.dark-mode .dtsp-row {
  background-color: #23272b !important;
  color: #e0e0e0 !important;
}
body.dark-mode .dataTables_filter label,
body.dark-mode .dataTables_length label,
body.dark-mode .dataTables_info,
body.dark-mode .dataTables_paginate {
  color: #e0e0e0 !important;
}
body.dark-mode .paginate_button {
  background: #23272b !important;
  color: #e0e0e0 !important;
  border: 1px solid #444 !important;
}
body.dark-mode .paginate_button.current,
body.dark-mode .paginate_button:hover {
  background: #444 !important;
  color: #fff !important;
}
body {
  padding-top: 4.5rem;
}

/* DataTables Export Button Styles */
.dt-buttons .dt-button.btn-secondary {
    background-color: #6c757d !important;
    color: white !important;
    border: none !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    margin-bottom: 10px !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

.dt-buttons .dt-button.btn-secondary:hover {
    background-color: #5a6268 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

.dt-buttons .dt-button.btn-secondary:focus {
    background-color: #5a6268 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

.dt-buttons .dt-button.btn-secondary:active {
    background-color: #5a6268 !important;
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

/* Remove borders from all DataTables buttons */
.dt-buttons .dt-button,
.dt-button,
.buttons-excel,
.buttons-csv,
.buttons-pdf,
.buttons-print,
.buttons-copy,
.buttons-collection,
.dt-button.buttons-collection.btn.btn-secondary.btn-sm,
.buttons-collection.btn.btn-secondary.btn-sm,
button.dt-button.buttons-collection.btn.btn-secondary.btn-sm {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

.dt-buttons .dt-button:focus,
.dt-button:focus,
.buttons-excel:focus,
.buttons-csv:focus,
.buttons-pdf:focus,
.buttons-print:focus,
.buttons-copy:focus,
.buttons-collection:focus,
.dt-button.buttons-collection.btn.btn-secondary.btn-sm:focus,
.buttons-collection.btn.btn-secondary.btn-sm:focus,
button.dt-button.buttons-collection.btn.btn-secondary.btn-sm:focus,
.dt-buttons .dt-button:hover,
.dt-button:hover,
.buttons-excel:hover,
.buttons-csv:hover,
.buttons-pdf:hover,
.buttons-print:hover,
.buttons-copy:hover,
.buttons-collection:hover,
.dt-button.buttons-collection.btn.btn-secondary.btn-sm:hover,
.buttons-collection.btn.btn-secondary.btn-sm:hover,
button.dt-button.buttons-collection.btn.btn-secondary.btn-sm:hover,
.dt-buttons .dt-button:active,
.dt-button:active,
.buttons-excel:active,
.buttons-csv:active,
.buttons-pdf:active,
.buttons-print:active,
.buttons-copy:active,
.buttons-collection:active,
.dt-button.buttons-collection.btn.btn-secondary.btn-sm:active,
.buttons-collection.btn.btn-secondary.btn-sm:active,
button.dt-button.buttons-collection.btn.btn-secondary.btn-sm:active {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

/* Override Bootstrap button classes */
.btn,
.btn-secondary,
.btn-sm,
.btn.btn-secondary,
.btn.btn-sm,
.btn.btn-secondary.btn-sm {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

.btn:hover,
.btn-secondary:hover,
.btn-sm:hover,
.btn.btn-secondary:hover,
.btn.btn-sm:hover,
.btn.btn-secondary.btn-sm:hover,
.btn:focus,
.btn-secondary:focus,
.btn-sm:focus,
.btn.btn-secondary:focus,
.btn.btn-sm:focus,
.btn.btn-secondary.btn-sm:focus,
.btn:active,
.btn-secondary:active,
.btn-sm:active,
.btn.btn-secondary:active,
.btn.btn-sm:active,
.btn.btn-secondary.btn-sm:active {
    border: none !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

/* Export Dropdown Styles */
.dt-button-collection {
    background-color: white !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    z-index: 1050 !important;
}

.dt-button-collection .dt-button {
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    padding: 8px 16px !important;
    font-size: 14px !important;
    border: none !important;
    background: none !important;
    color: #212529 !important;
}

.dt-button-collection .dt-button:hover {
    background-color: #f8f9fa !important;
    color: #495057 !important;
}

/* Disable screen overlay */
.dt-button-background {
    display: none !important;
}

/* Advanced Filter Panes */
.dt-search-panes, .filter-container {
    border: 2px solid #dee2e6 !important;
    border-radius: 8px !important;
    padding: 15px !important;
    margin-bottom: 15px !important;
    background-color: #f8f9fa !important;
}

.dt-search-panes .dt-panes {
    margin: 0 !important;
}

.filter-title {
    font-weight: bold !important;
    margin-bottom: 10px !important;
    color: #495057 !important;
    border-bottom: 1px solid #dee2e6 !important;
    padding-bottom: 5px !important;
}

/* Filter Input Fields with Frames - Enhanced */
.dataTables_wrapper .dataTables_filter input,
input[type="search"] {
    border: 2px solid #dee2e6 !important;
    border-radius: 6px !important;
    padding: 8px 12px !important;
    background-color: white !important;
    margin-left: 8px !important;
}

.dataTables_wrapper .dataTables_filter input:focus,
input[type="search"]:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    outline: none !important;
}

.dataTables_wrapper .dataTables_length select,
select.form-control {
    border: 2px solid #dee2e6 !important;
    border-radius: 6px !important;
    padding: 6px 10px !important;
    background-color: white !important;
    margin: 0 8px !important;
}

.dataTables_wrapper .dataTables_length select:focus,
select.form-control:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    outline: none !important;
}

/* Footer Filter Inputs - Enhanced */
tfoot input,
.dataTables_scrollFoot input {
    border: 2px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 6px 8px !important;
    width: 100% !important;
    background-color: white !important;
    font-size: 12px !important;
}

tfoot input:focus,
.dataTables_scrollFoot input:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    outline: none !important;
}

/* SearchPanes Filter Inputs - Enhanced */
.dt-search-panes input,
.dtsp-searchPane input {
    border: 2px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 6px 8px !important;
    background-color: white !important;
}

.dt-search-panes input:focus,
.dtsp-searchPane input:focus {
    border-color: #007bff !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25) !important;
    outline: none !important;
}

/* SearchPanes Container - Simple et propre */
.dt-search-panes,
.dtsp-searchPanes {
    border: 1px solid #dee2e6 !important;
    border-radius: 4px !important;
    padding: 10px !important;
    margin-bottom: 15px !important;
    background-color: #f8f9fa !important;
}

/* SearchPanes Content Area */
.dt-search-panes .dtsp-searchPanes-container,
.dtsp-searchPanes .dtsp-searchPanes-container {
    padding: 15px !important;
}

/* Individual Pane Styling */
.dtsp-searchPane {
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    margin-bottom: 10px !important;
    background: white !important;
}

.dtsp-searchPane.dtsp-selected {
    border-color: #007bff !important;
    box-shadow: 0 0 0 1px rgba(0, 123, 255, 0.25) !important;
}

/* Pane Headers */
.dtsp-searchPane .dtsp-topRow {
    background: #f8f9fa !important;
    border-bottom: 1px solid #dee2e6 !important;
    padding: 8px 12px !important;
}

.dtsp-searchPane .dtsp-topRow button {
    font-weight: 600 !important;
    color: #495057 !important;
}

/* General Control Container Frames */
.dataTables_wrapper .dataTables_filter {
    float: right !important;
    text-align: right !important;
    margin-bottom: 10px !important;
    padding: 10px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
}

.dataTables_wrapper .dataTables_length {
    float: left !important;
    margin-bottom: 10px !important;
    padding: 10px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
}

.dataTables_wrapper .dataTables_info {
    padding: 8px 12px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
    margin-top: 10px !important;
}

.dataTables_wrapper .dataTables_paginate {
    padding: 8px 12px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
    margin-top: 10px !important;
}

.dt-buttons {
    padding: 8px 12px !important;
    border: none !important;
    border-radius: 6px !important;
    background-color: #f8f9fa !important;
    margin-bottom: 10px !important;
    display: inline-block !important;
    box-shadow: none !important;
    outline: none !important;
    border-width: 0 !important;
    border-style: none !important;
    border-color: transparent !important;
}

.alert-pre {
  word-wrap: break-word;
  word-break: break-all;
  white-space: pre-wrap;
}

.external-link {
  padding-top: 6px;
}

.avatar-link {
  padding-top: 4px;
  padding-bottom: 4px;
}

.widget-author {
  margin-bottom: 58px;
}
.author-card {
  position: relative;
  padding-bottom: 48px;
}
.author-card .author-card-cover {
  position: relative;
  width: 128px;
  height: 128px;
  max-width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  align-items: center;
}
.author-card .author-card-cover::after {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  content: '';
  opacity: 0.5;
}
.author-card .author-card-cover > .btn {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 0 10px;
}
.author-card .author-card-profile {
  display: table;
  position: relative;
  margin-top: -22px;
  padding-right: 15px;
  padding-bottom: 16px;
  padding-left: 20px;
  z-index: 5;
}
.author-card .author-card-profile .author-card-avatar, .author-card .author-card-profile .author-card-details {
  display: table-cell;
  vertical-align: middle;
}
.author-card .author-card-profile .author-card-avatar {
  width: 85px;
  border-radius: 50%;
  box-shadow: 0 8px 20px 0 rgba(0, 0, 0, .15);
  overflow: hidden;
}
.author-card .author-card-profile .author-card-avatar > img {
  display: block;
  width: 100%;
}
.author-card .author-card-profile .author-card-details {
  padding-top: 20px;
  padding-left: 15px;
}
.author-card .author-card-profile .author-card-name {
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: bold;
}
.author-card .author-card-profile .author-card-position {
  display: block;
  color: #8c8c8c;
  font-size: 12px;
  font-weight: 600;
}
.author-card .author-card-info {
  margin-bottom: 0;
  padding: 0 25px;
  font-size: 13px;
}
.author-card .author-card-social-bar-wrap {
  position: absolute;
  bottom: -18px;
  left: 0;
  width: 100%;
}
.author-card .author-card-social-bar-wrap .author-card-social-bar {
  display: table;
  margin: auto;
  background-color: #fff;
  box-shadow: 0 12px 20px 1px rgba(64, 64, 64, .11);
}
.btn-style-1.btn-white {
    background-color: #fff;
}
.list-group-item i {
    display: inline-block;
    margin-top: -1px;
    margin-right: 8px;
    font-size: 1.2em;
    vertical-align: middle;
}
.mr-1, .mx-1 {
    margin-right: .25rem !important;
}

.list-group-item.active:not(.disabled) {
    border-color: #e7e7e7;
    background: #fff;
    color: #ac32e4;
    cursor: default;
    pointer-events: none;
}
.list-group-flush:last-child .list-group-item:last-child {
    border-bottom: 0;
}

.list-group-flush .list-group-item {
    border-right: 0 !important;
    border-left: 0 !important;
}

.list-group-flush .list-group-item {
    border-right: 0;
    border-left: 0;
    border-radius: 0;
}
.list-group-item.active {
    z-index: 2;
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}
.list-group-item:last-child {
    margin-bottom: 0;
    border-bottom-right-radius: .25rem;
    border-bottom-left-radius: .25rem;
}
a.list-group-item, .list-group-item-action {
    color: #404040;
    font-weight: 600;
}
.list-group-item {
    padding-top: 16px;
    padding-bottom: 16px;
    -webkit-transition: all .3s;
    transition: all .3s;
    border: 1px solid #e7e7e7 !important;
    border-radius: 0 !important;
    color: #404040;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    text-decoration: none;
}
.list-group-item {
    position: relative;
    display: block;
    padding: .75rem 1.25rem;
    margin-bottom: -1px;
    background-color: #fff;
    border: 1px solid rgba(0,0,0,0.125);
}
.list-group-item.active:not(.disabled)::before {
    background-color: #ac32e4;
}

.list-group-item::before {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 100%;
    background-color: transparent;
    content: '';
}

/* reduce size of tables */

td {
    font-size: 12px;
}

.custom-toast {
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  border-left: 4px solid #007bff;
  z-index: 10000;
  transform: translateX(100%);
  opacity: 0;
  transition: all 0.3s ease;
  max-width: 350px;
  min-width: 250px;
}

.custom-toast.toast-show {
  transform: translateX(0);
  opacity: 1;
}

.custom-toast.toast-warning {
  border-left-color: #ffc107;
}

.custom-toast.toast-info {
  border-left-color: #17a2b8;
}

.toast-content {
  display: flex;
  align-items: center;
  padding: 12px 16px;
}

.toast-icon {
  margin-right: 10px;
  font-size: 18px;
}

.toast-message {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

#nprogress .bar {
  background: #3498db !important;
  height: 3px !important;
}

#nprogress .peg {
  box-shadow: 0 0 10px #3498db, 0 0 5px #3498db !important;
}

#nprogress .spinner-icon {
  border-top-color: #3498db !important;
  border-left-color: #3498db !important;
}

      /* Disabled buttons */
button:disabled, input:disabled {
  cursor: not-allowed !important;
}

[style*="pointer-events: none"] {
  cursor: not-allowed !important;
}

.navbar-nav .nav-link.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #fff !important;
}

.navbar-nav .dropdown .dropdown-toggle.active {
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  color: #fff !important;
}

.dropdown-menu .dropdown-item.active {
  background-color: #007bff;
  color: #fff;
}

.dropdown-menu .dropdown-item.active:hover {
  background-color: #0056b3;
  color: #fff;
}

.list-group-horizontal .list-group-item.active {
  background-color: #007bff;
  border-color: #007bff;
  color: #fff;
  font-weight: bold;
}

.list-group-horizontal .list-group-item:hover {
  background-color: rgba(0, 123, 255, 0.1);
}

.nav-breadcrumb {
  background-color: rgba(0, 0, 0, 0.05);
  padding: 8px 15px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 14px;
}

.nav-breadcrumb .breadcrumb-item {
  color: #6c757d;
}

.nav-breadcrumb .breadcrumb-item.active {
  color: #007bff;
  font-weight: bold;
}

/* Dark mode toggle button in navbar */
#darkModeToggle {
  background: none !important;
  border: none !important;
  color: rgba(255,255,255,.5) !important;
  padding: 8px 12px !important;
  border-radius: 5px !important;
  transition: all 0.2s ease !important;
}

#darkModeToggle:hover {
  background-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,.8) !important;
}

[data-theme="dark"] #darkModeToggle {
  color: rgba(255,255,255,.5) !important;
}

[data-theme="dark"] #darkModeToggle:hover {
  background-color: rgba(255,255,255,0.1) !important;
  color: rgba(255,255,255,.8) !important;
}

