/* Dark Theme Override - Black Palette */
/* bg = 07090F, section = 111520, cards = 181D2B */

/* Main background color overrides */
[data-theme="dark"],
[data-theme="dark"] .dark-mode-switching,
[data-theme="dark"] .rtl-mode-switching,
[data-theme="dark"] body,
[data-theme="dark"] body #preloader,
[data-theme="dark"] body .preview-iframe-wrapper .preview-hero-area,
[data-theme="dark"] body .demo-header-wrapper {
  background-color: #07090f !important;
}

/* Section background color overrides */
[data-theme="dark"] body .sidenav-nav li a:hover,
[data-theme="dark"] body .sidenav-nav li a:focus,
[data-theme="dark"] body .sidenav-nav li .night-mode-nav:hover,
[data-theme="dark"] body .sidenav-nav li ul,
[data-theme="dark"] body .nav-url.dd-open,
[data-theme="dark"] body .header-content.header-style-two .search-trigger-btn,
[data-theme="dark"] body .header-content.header-style-two .navbar--toggler,
[data-theme="dark"] body .header-content.header-style-three .navbar--toggler,
[data-theme="dark"] body .toast-header,
[data-theme="dark"] body .affan-page-item:hover,
[data-theme="dark"] body .affan-page-item:focus,
[data-theme="dark"] body .form-control,
[data-theme="dark"] body .form-select,
[data-theme="dark"] body .input-group-text {
  background-color: #111520 !important;
}

/* Card background color overrides */
[data-theme="dark"] body .card,
[data-theme="dark"] body .dropdown-menu,
[data-theme="dark"] body .sidenav-wrapper,
[data-theme="dark"] body .offcanvas,
[data-theme="dark"] body .toast,
[data-theme="dark"] body .preview-iframe-wrapper .features-area,
[data-theme="dark"]
  body
  .preview-iframe-wrapper
  .preview-hero-area
  .version-number,
[data-theme="dark"] body .preview-iframe-wrapper .qr-code-wrapper img,
[data-theme="dark"] body .modal-content {
  background-color: #181d2b !important;
}

[data-theme="dark"] body .header-area,
[data-theme="dark"] body .header-demo-bg {
  background-color: #111520 !important;
}
/* Border color adjustments */
[data-theme="dark"] body .border,
[data-theme="dark"] body .border-top,
[data-theme="dark"] body .border-bottom,
[data-theme="dark"] body .border-start,
[data-theme="dark"] body .border-end {
  border-color: #111520 !important;
}

/* Footer adjustments */
[data-theme="dark"] body .footer-nav-area {
  background-color: #111520 !important;
  border-top-color: #181d2b !important;
}

[data-theme="dark"] body .footer-nav {
  background-color: #111520 !important;
}

[data-theme="dark"] body .footer-nav.footer-style-two li.active a {
  background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"] body .footer-nav.footer-style-three ul li a {
  background-color: #181d2b !important;
}

[data-theme="dark"] body .footer-nav.footer-style-three ul li.active a,
[data-theme="dark"] body .footer-nav.footer-style-three ul li a:hover,
[data-theme="dark"] body .footer-nav.footer-style-three ul li a:focus {
  background-color: #07090f !important;
}

/* Input field adjustments */
[data-theme="dark"] body .form-control:focus,
[data-theme="dark"] body .form-select:focus {
  border-color: #181d2b !important;
  background-color: #111520 !important;
}

/* Table adjustments */
[data-theme="dark"] body .table {
  background-color: #181d2b !important;
}

[data-theme="dark"] body .table th {
  background-color: #111520 !important;
}

/* Accordion styling */
[data-theme="dark"] body .accordion-button {
  background-color: #111520 !important;
}

[data-theme="dark"] body .accordion-item {
  background-color: #181d2b !important;
}

/* Simple active footer styling - just color text and icons */
[data-theme="dark"] body .footer-nav ul li.active a {
  color: var(--primary-light) !important;
}

[data-theme="dark"] body .footer-nav ul li.active a i,
[data-theme="dark"] body .footer-nav ul li.active a svg {
  color: var(--primary-light) !important;
}

[data-theme="dark"] body .footer-nav ul li.active a span {
  color: var(--primary-light) !important;
}

/* Active (clicked) button effect for dark mode */
[data-theme="dark"] body .title-button:active,
[data-theme="dark"] body .title-button.active {
  background: #495057 !important;
  color: #fff !important;
  border-color: #495057 !important;
}

/* Outline button fixes for dark mode */
[data-theme="dark"] body .btn-outline-success {
  color: var(--accent-success) !important;
  border-color: var(--accent-success) !important;
}

[data-theme="dark"] body .btn-outline-success:hover {
  color: #fff !important;
  background-color: var(--accent-success) !important;
}

[data-theme="dark"] body .btn-outline-primary {
  color: var(--primary-light) !important;
  border-color: var(--primary-light) !important;
}

[data-theme="dark"] body .btn-outline-primary:hover {
  color: #fff !important;
  background-color: var(--primary-light) !important;
}

[data-theme="dark"] body .btn-outline-danger {
  color: var(--accent-danger) !important;
  border-color: var(--accent-danger) !important;
}

[data-theme="dark"] body .btn-outline-danger:hover {
  color: #fff !important;
  background-color: var(--accent-danger) !important;
}

/* Customer log modal fixes for dark mode */
[data-theme="dark"] body .category-title {
  color: #e0e0e0 !important;
}

[data-theme="dark"] body .category-header {
  background-color: #111520 !important;
  border-right-color: #333 !important;
}

[data-theme="dark"] body .category-header:hover {
  background-color: #181d2b !important;
}

/* Log item text color fix */
[data-theme="dark"] body .card-body p {
  color: #e0e0e0 !important;
}

/* Log item selection indicator */
[data-theme="dark"] body .selected-log {
  background-color: #181d2b !important;
  box-shadow:
    0 0 0 2px var(--primary-light),
    0 4px 8px rgba(0, 0, 0, 0.3) !important;
}

/* Tab navigation styling for dark mode */
[data-theme="dark"] body .nav {
  background-color: #111520 !important;
}

[data-theme="dark"] body .tab-content {
  background-color: #181d2b !important;
}

[data-theme="dark"] body .nav .btn {
  color: #e0e0e0 !important;
}

[data-theme="dark"] body .nav .btn.active {
  background: linear-gradient(135deg, #6c5b7b, #d53f8c) !important;
  color: white !important;
}

/* Select2 fixes for dark mode */
[data-theme="dark"]
  body
  .select2-container--default
  .select2-selection--multiple {
  background-color: #111520 !important;
  border-color: #333 !important;
}

[data-theme="dark"]
  body
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice {
  background-color: #181d2b !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"]
  body
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove {
  color: #e0e0e0 !important;
}

[data-theme="dark"]
  body
  .select2-container--default
  .select2-selection--multiple
  .select2-selection__choice__remove:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1) !important;
}

[data-theme="dark"]
  body
  .select2-container--default
  .select2-search--inline
  .select2-search__field {
  color: #e0e0e0 !important;
}

[data-theme="dark"] body .select2-container--default .select2-results__option {
  background-color: #111520 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"]
  body
  .select2-container--default
  .select2-results__option--highlighted[aria-selected] {
  background-color: #181d2b !important;
  color: #fff !important;
}

[data-theme="dark"]
  body
  .select2-container--default
  .select2-results__option[aria-selected="true"] {
  background-color: var(--primary-dark) !important;
}

/* SweetAlert fixes for dark mode */
[data-theme="dark"] body .swal2-popup,
[data-theme="dark"] body .swal-modal {
  background-color: #181d2b !important;
  border-color: #333 !important;
}

[data-theme="dark"] body .swal2-title,
[data-theme="dark"] body .swal-title,
[data-theme="dark"] body .swal2-popup h2,
[data-theme="dark"] body .swal-modal h2 {
  color: #e0e0e0 !important;
}

[data-theme="dark"] body .swal2-content,
[data-theme="dark"] body .swal-text,
[data-theme="dark"] body .swal2-html-container {
  color: #e0e0e0 !important;
}

[data-theme="dark"] body .swal2-input,
[data-theme="dark"] body .swal-input {
  background-color: #111520 !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

/* Table fixes for dark mode */
[data-theme="dark"] body table,
[data-theme="dark"] body .table {
  color: #e0e0e0 !important;
  background-color: #181d2b !important;
  border-color: #333 !important;
}

[data-theme="dark"] body th,
[data-theme="dark"] body .table th {
  background-color: #111520 !important;
  color: #ffffff !important;
  border-color: #333 !important;
}

[data-theme="dark"] body .table thead th {
  background-color: #1f0757 !important;
  color: #ffffff !important;
  border-color: #333 !important;
}

[data-theme="dark"] body td,
[data-theme="dark"] body .table td {
  background-color: #111520 !important;
  border-color: #333 !important;
}

[data-theme="dark"] body .table-striped tbody tr:nth-of-type(odd) {
  background-color: #121824 !important;
}

[data-theme="dark"] body .table-striped tbody tr:nth-of-type(odd) td {
  background-color: #121824 !important;
}

[data-theme="dark"] body .table-hover tbody tr:hover,
[data-theme="dark"] body .table-hover tbody tr:hover td {
  background-color: rgba(255, 255, 255, 0.075) !important;
}

/* Jalali date picker fixes for dark mode */
[data-theme="dark"] jdp-container {
  background-color: #111520 !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5) !important;
}
[data-theme="dark"] .jdp-month {
  background: #181d2b;
}
[data-theme="dark"] .jdp-year {
  background: #181d2b;
}

[data-theme="dark"] .jdp-years,
[data-theme="dark"] .jdp-months {
  background-color: #111520 !important;
  border-color: #333 !important;
}

[data-theme="dark"] .jdp-years select,
[data-theme="dark"] .jdp-months select {
  background-color: #181d2b !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

[data-theme="dark"] .jdp-icon-plus svg path,
[data-theme="dark"] .jdp-icon-minus svg path {
  fill: #e0e0e0 !important;
}

[data-theme="dark"] .jdp-days {
  background-color: #111520 !important;
}

[data-theme="dark"] .jdp-day-name {
  background-color: #181d2b !important;
  color: #ffffff !important;
}

[data-theme="dark"] .jdp-day {
  background-color: #181d2b !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

[data-theme="dark"] .jdp-day:hover {
  background-color: #252a38 !important;
}

[data-theme="dark"] .jdp-day.selected {
  background-color: var(--primary-color) !important;
  color: #ffffff !important;
}

[data-theme="dark"] .jdp-day.today {
  color: #ffffff !important;
  border: 1px solid var(--primary-light) !important;
}

[data-theme="dark"] .jdp-day.not-in-month {
  color: #666 !important;
  background-color: #111520 !important;
}

[data-theme="dark"] .jdp-day.holly-day {
  color: var(--accent-danger) !important;
}

[data-theme="dark"] .jdp-day.disabled-day {
  color: #555 !important;
  opacity: 0.6 !important;
}

[data-theme="dark"] .jdp-footer {
  background-color: #111520 !important;
  border-color: #333 !important;
}

[data-theme="dark"] .jdp-btn-today,
[data-theme="dark"] .jdp-btn-empty {
  background-color: #252a38 !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

[data-theme="dark"] .jdp-btn-today:hover,
[data-theme="dark"] .jdp-btn-empty:hover {
  background-color: #303642 !important;
}

/* Time container styles */
[data-theme="dark"] .jdp-time-container {
  background-color: #111520 !important;
  border-color: #333 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .jdp-time {
  background-color: #111520 !important;
  border-color: #333 !important;
}

[data-theme="dark"] .jdp-time select {
  background-color: #181d2b !important;
  color: #e0e0e0 !important;
  border-color: #333 !important;
}

/* Index page styles for dark mode */
[data-theme="dark"] .status-card {
  background-color: #181d2b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="dark"] .status-card .ticket-count {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .status-card .ticket-label {
  color: #bbb !important;
}

[data-theme="dark"] .welcome-card {
  background-color: #181d2b !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
}

[data-theme="dark"] .welcome-card .welcome-text {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .welcome-card .user-name {
  color: #bbb !important;
}

[data-theme="dark"] .welcome-card .user-avatar {
  background-color: #111520 !important;
}

[data-theme="dark"] .attendance-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25) !important;
}

/* Don't override attendance card gradients as they have their own colors */

[data-theme="dark"] .feature-button.coming-soon {
  background-color: #111520 !important;
  color: #999 !important;
}

[data-theme="dark"] .feature-button.coming-soon i:after {
  border-color: rgba(136, 154, 173, 0.15) !important;
}

[data-theme="dark"] #overlay {
  background: rgba(0, 0, 0, 0.85) !important;
}

/* Category background colors in dark mode */
[data-theme="dark"] body .category-header.blue-category {
  border-right-color: #0d6efd !important;
  background-color: rgba(13, 110, 253, 0.2) !important;
}

[data-theme="dark"] body .category-header.yellow-category {
  border-right-color: #ffc107 !important;
  background-color: rgba(255, 193, 7, 0.2) !important;
}

[data-theme="dark"] body .category-header.green-category {
  border-right-color: #198754 !important;
  background-color: rgba(25, 135, 84, 0.2) !important;
}

[data-theme="dark"] body .category-header.purple-category {
  border-right-color: #6f42c1 !important;
  background-color: rgba(111, 66, 193, 0.2) !important;
}

[data-theme="dark"] body .category-header.red-category {
  border-right-color: #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.2) !important;
}

[data-theme="dark"] body .category-header.brown-category {
  border-right-color: #795548 !important;
  background-color: rgba(121, 85, 72, 0.2) !important;
}

/* Log item category colors in dark mode */
[data-theme="dark"] body .log-item[data-category*="🟦"] .card-body {
  background-color: rgba(13, 110, 253, 0.15) !important;
  border-right-color: #0d6efd !important;
}

[data-theme="dark"] body .log-item[data-category*="🟩"] .card-body {
  background-color: rgba(25, 135, 84, 0.15) !important;
  border-right-color: #198754 !important;
}

[data-theme="dark"] body .log-item[data-category*="🟨"] .card-body {
  background-color: rgba(255, 193, 7, 0.15) !important;
  border-right-color: #ffc107 !important;
}

[data-theme="dark"] body .log-item[data-category*="🟪"] .card-body {
  background-color: rgba(111, 66, 193, 0.15) !important;
  border-right-color: #6f42c1 !important;
}

[data-theme="dark"] body .log-item[data-category*="🟥"] .card-body {
  background-color: rgba(220, 53, 69, 0.15) !important;
  border-right-color: #dc3545 !important;
}

[data-theme="dark"] body .log-item[data-category*="🟫"] .card-body {
  background-color: rgba(121, 85, 72, 0.15) !important;
  border-right-color: #795548 !important;
}

/* Notification list styling for dark mode */
[data-theme="dark"] .custom-alert-3 {
  background-color: #181d2b !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .custom-alert-3 .alert-text h6 {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .custom-alert-3 .alert-text span {
  color: #bbb;
}

/* Fix ticket tab backgrounds in dark mode */
[data-theme="dark"] #tickets.tab-pane {
  background-color: #111520 !important;
}

[data-theme="dark"] #tickets.tab-pane .card {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] #tickets.tab-pane .card-body {
  background-color: #181d2b !important;
}

[data-theme="dark"] #tickets.tab-pane .card-title,
[data-theme="dark"] #tickets.tab-pane h6 {
  color: #e0e0e0 !important;
}

[data-theme="dark"] #tickets.tab-pane .text-muted {
  color: #adb5bd !important;
}

/* Fix payments tab backgrounds in dark mode */
[data-theme="dark"] #payments.tab-pane {
  background-color: #111520 !important;
}

[data-theme="dark"] #payments.tab-pane .card {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] #payments.tab-pane .card-body {
  background-color: #181d2b !important;
}

[data-theme="dark"] #payments.tab-pane .card-title,
[data-theme="dark"] #payments.tab-pane h6 {
  color: #e0e0e0 !important;
}

[data-theme="dark"] #payments.tab-pane .text-muted {
  color: #adb5bd !important;
}

/* Fix packages tab backgrounds in dark mode */
[data-theme="dark"] #packages.tab-pane {
  background-color: #111520 !important;
}

[data-theme="dark"] #packages.tab-pane .card {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] #packages.tab-pane .card-body {
  background-color: #181d2b !important;
}

[data-theme="dark"] #packages.tab-pane .card-title,
[data-theme="dark"] #packages.tab-pane h6 {
  color: #e0e0e0 !important;
}

/* Fix store tab backgrounds in dark mode */
[data-theme="dark"] #store.tab-pane {
  background-color: #111520 !important;
}

[data-theme="dark"] #store.tab-pane .card {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] #store.tab-pane .card-body {
  background-color: #181d2b !important;
}

[data-theme="dark"] #store.tab-pane .card-title,
[data-theme="dark"] #store.tab-pane h6 {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .compact-letter {
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
}

[data-theme="dark"] .time-badge {
  color: #999 !important;
}

[data-theme="dark"] .letter-title {
  color: #e0e0e0 !important;
}

/* Fix tabs navigation in dark mode */
[data-theme="dark"] .nav-item .btn {
  color: #adb5bd !important;
  background-color: transparent !important;
}

[data-theme="dark"] .nav-item .btn:hover {
  color: #e0e0e0 !important;
  background-color: rgba(255, 255, 255, 0.05) !important;
}

[data-theme="dark"] .nav-item .btn.active {
  color: #ffffff !important;
}

/* General tab styling in dark mode */
[data-theme="dark"] .tab-content {
  background-color: #111520 !important;
}

[data-theme="dark"] .tab-pane {
  background-color: #181d2b !important;
}

[data-theme="dark"] .tab-pane .card {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .tab-pane .card:hover {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15) !important;
  background-color: #202735 !important;
}

[data-theme="dark"] .tab-pane .card-body {
  background-color: #181d2b !important;
}

[data-theme="dark"] .tab-pane .card-title,
[data-theme="dark"] .tab-pane h6 {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .tab-pane p {
  color: #adb5bd !important;
}

[data-theme="dark"] .tab-pane .text-muted {
  color: #8891a0 !important;
}

/* Footer complete dark mode fix */
[data-theme="dark"] footer,
[data-theme="dark"] .footer,
[data-theme="dark"] .footer-nav,
[data-theme="dark"] .footer-nav-area,
[data-theme="dark"] .page-footer {
  background-color: #111520 !important;
  color: #e0e0e0 !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] .footer-nav a,
[data-theme="dark"] .footer-nav span,
[data-theme="dark"] .footer a,
[data-theme="dark"] .footer span,
[data-theme="dark"] .page-footer a,
[data-theme="dark"] .page-footer span {
  color: #adb5bd !important;
}

[data-theme="dark"] .footer-nav ul,
[data-theme="dark"] .footer-nav li {
  background-color: #111520 !important;
}

/* Ticket list info dark mode fix */
[data-theme="dark"] .chat-user-list,
[data-theme="dark"] .ticket-list {
  background-color: #111520 !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] .chat-user-list li,
[data-theme="dark"] .ticket-list li,
[data-theme="dark"] .ticket-item {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] .chat-user-list a,
[data-theme="dark"] .ticket-list a {
  background-color: #181d2b !important;
}

[data-theme="dark"] .chat-user-list li:hover,
[data-theme="dark"] .ticket-list li:hover,
[data-theme="dark"] .ticket-item:hover {
  background-color: #202735 !important;
}

[data-theme="dark"] .chat-user-list h6,
[data-theme="dark"] .ticket-list h6,
[data-theme="dark"] .ticket-title {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .chat-user-list p,
[data-theme="dark"] .ticket-list p,
[data-theme="dark"] .ticket-description {
  color: #adb5bd !important;
}

[data-theme="dark"] .chat-user-info h6,
[data-theme="dark"] .chat-user-info p,
[data-theme="dark"] .ticket-info h6,
[data-theme="dark"] .ticket-info p {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .chat-user-list .last-chat p,
[data-theme="dark"] .ticket-list .ticket-details p {
  color: #adb5bd !important;
}

/* Ticket detail view dark mode fixes */
[data-theme="dark"] .ticket-detail-container,
[data-theme="dark"] .ticket-header,
[data-theme="dark"] .ticket-body,
[data-theme="dark"] .ticket-footer {
  background-color: #111520 !important;
  color: #e0e0e0 !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] .ticket-info-card,
[data-theme="dark"] .ticket-message-card,
[data-theme="dark"] .ticket-reply-card {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .ticket-status-badge {
  border-color: #252a38 !important;
}

[data-theme="dark"] .ticket-message,
[data-theme="dark"] .ticket-reply {
  background-color: #202735 !important;
  border-color: #252a38 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .message-time,
[data-theme="dark"] .reply-time {
  color: #8891a0 !important;
}

/* Chat and conversation list fixes */
[data-theme="dark"] .chat-header,
[data-theme="dark"] .chat-footer {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
}

[data-theme="dark"] .chat-user-list {
  background-color: #07090f !important;
}

[data-theme="dark"] .chat-user-list li {
  background-color: #181d2b !important;
  border-bottom: 1px solid #252a38 !important;
}

[data-theme="dark"] .chat-user-list li.chat-unread {
  background-color: #181d2b !important;
}

[data-theme="dark"] .chat-user-list li:hover {
  background-color: #202735 !important;
}

/* Fix ticket info text colors in dark mode */
[data-theme="dark"] .ticket-info label,
[data-theme="dark"] .ticket-info-label,
[data-theme="dark"] .ticket-detail label,
[data-theme="dark"] .ticket-meta label {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .ticket-info span,
[data-theme="dark"] .ticket-info p,
[data-theme="dark"] .ticket-info div,
[data-theme="dark"] .ticket-detail span,
[data-theme="dark"] .ticket-detail p,
[data-theme="dark"] .ticket-detail div,
[data-theme="dark"] .ticket-meta span,
[data-theme="dark"] .ticket-meta p,
[data-theme="dark"] .ticket-meta div {
  color: #e0e0e0 !important;
}

/* More specific ticket detail text fixes */
[data-theme="dark"] .ticket-container .ticket-header *,
[data-theme="dark"] .ticket-container .ticket-body *,
[data-theme="dark"] .ticket-container .ticket-footer *,
[data-theme="dark"] .ticket-info-card *,
[data-theme="dark"] .ticket-message-card *,
[data-theme="dark"] .ticket-reply-card * {
  color: #e0e0e0 !important;
}

/* Info value specific fixes */
[data-theme="dark"] .ticket-detail .info-value,
[data-theme="dark"] .ticket-detail .detail-value,
[data-theme="dark"] .ticket-info .info-value,
[data-theme="dark"] .ticket-meta .meta-value,
[data-theme="dark"] .ticket-detail-row strong,
[data-theme="dark"] .ticket-detail-item .value {
  color: #ffffff !important;
}

/* Ensure all text in ticket containers is visible */
[data-theme="dark"] .ticket-container * {
  color: #e0e0e0 !important;
}

/* Preserve colors for status badges and buttons */
[data-theme="dark"] .badge {
  color: #ffffff !important;
}

[data-theme="dark"] .badge.bg-light {
  color: #212529 !important;
}

[data-theme="dark"] .bg-light {
  background-color: #07090f !important;
}

/* Fix text content in forms, description sections and detail views */
[data-theme="dark"] .form-control-plaintext,
[data-theme="dark"] .description-text,
[data-theme="dark"] .detail-text,
[data-theme="dark"] .info-text {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .ticket-list-item * {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .ticket-details * {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .ticket-content * {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .card-body label,
[data-theme="dark"] .card-body span,
[data-theme="dark"] .card-body p,
[data-theme="dark"] .card-body h1,
[data-theme="dark"] .card-body h2,
[data-theme="dark"] .card-body h3,
[data-theme="dark"] .card-body h4,
[data-theme="dark"] .card-body h5,
[data-theme="dark"] .card-body h6 {
  color: #e0e0e0 !important;
}

/* Exception for colored elements - preserve their colors */
[data-theme="dark"] .text-primary,
[data-theme="dark"] .text-success,
[data-theme="dark"] .text-danger,
[data-theme="dark"] .text-warning,
[data-theme="dark"] .text-info {
  color: inherit !important;
}

[data-theme="dark"] .badge,
[data-theme="dark"] .btn {
  color: inherit;
}

/* Button success dark mode gradient */
[data-theme="dark"] .btn-success {
  background: linear-gradient(135deg, #0f3b2c, #0b9965) !important;
  border-color: #0b9965 !important;
}

[data-theme="dark"] .btn-success:hover {
  background: linear-gradient(135deg, #0d3526, #098559) !important;
  box-shadow: 0 4px 8px rgba(9, 133, 89, 0.3) !important;
}

/* Button primary dark mode gradient */
[data-theme="dark"] .btn-primary {
  background: linear-gradient(135deg, #44337a, #d53f8c) !important;
  border-color: #97266d !important;
}

[data-theme="dark"] .btn-primary:hover {
  background: linear-gradient(135deg, #382b65, #b83578) !important;
  box-shadow: 0 4px 8px rgba(213, 63, 140, 0.3) !important;
}

/* Button secondary dark mode gradient */
[data-theme="dark"] .btn-secondary {
  background: linear-gradient(135deg, #97266d, #b83578) !important;
  border-color: #97266d !important;
}

[data-theme="dark"] .btn-secondary:hover {
  background: linear-gradient(135deg, #7d2059, #a12e68) !important;
  box-shadow: 0 4px 8px rgba(151, 38, 109, 0.3) !important;
}

/* Button danger dark mode gradient */
[data-theme="dark"] .btn-danger {
  background: linear-gradient(135deg, #9b1c1c, #e53e3e) !important;
  border-color: #9b1c1c !important;
}

[data-theme="dark"] .btn-danger:hover {
  background: linear-gradient(135deg, #881a1a, #c53030) !important;
  box-shadow: 0 4px 8px rgba(229, 62, 62, 0.3) !important;
}

/* Button warning dark mode gradient */
[data-theme="dark"] .btn-warning {
  background: linear-gradient(135deg, #974a0c, #ed8936) !important;
  border-color: #974a0c !important;
}

[data-theme="dark"] .btn-warning:hover {
  background: linear-gradient(135deg, #7b3d0a, #dd6b20) !important;
  box-shadow: 0 4px 8px rgba(237, 137, 54, 0.3) !important;
}

/* Button info dark mode gradient */
[data-theme="dark"] .btn-info {
  background: linear-gradient(135deg, #2a4365, #4299e1) !important;
  border-color: #2a4365 !important;
}

[data-theme="dark"] .btn-info:hover {
  background: linear-gradient(135deg, #1a365d, #3182ce) !important;
  box-shadow: 0 4px 8px rgba(66, 153, 225, 0.3) !important;
}

/* Button light dark mode gradient */
[data-theme="dark"] .btn-light {
  background: linear-gradient(135deg, #252a38, #444a58) !important;
  border-color: #252a38 !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .btn-light:hover {
  background: linear-gradient(135deg, #1f232f, #383d48) !important;
  box-shadow: 0 4px 8px rgba(57, 62, 76, 0.3) !important;
}

/* Button dark mode gradient */
[data-theme="dark"] .btn-dark {
  background: linear-gradient(135deg, #07090f, #111520) !important;
  border-color: #111520 !important;
  color: #ffffff !important;
}

[data-theme="dark"] .btn-dark:hover {
  background: linear-gradient(135deg, #050709, #0d1018) !important;
  box-shadow: 0 4px 8px rgba(17, 21, 32, 0.3) !important;
}

/* Ticket list item background colors in dark mode */
[data-theme="dark"] .chat-user-list li.bg-info-light {
  background-color: rgba(69, 130, 236, 0.15) !important;
  border-right: 5px solid #4582ec !important;
}

[data-theme="dark"] .chat-user-list li.bg-info-light a {
  background-color: transparent !important;
}

[data-theme="dark"] .chat-user-list li.bg-warning-light {
  background-color: rgba(247, 151, 30, 0.15) !important;
  border-right: 5px solid #f7971e !important;
}

[data-theme="dark"] .chat-user-list li.bg-warning-light a {
  background-color: transparent !important;
}

[data-theme="dark"] .ticket-list li.bg-info-light {
  background-color: rgba(69, 130, 236, 0.15) !important;
  border-right: 5px solid #4582ec !important;
}

[data-theme="dark"] .ticket-list li.bg-info-light a {
  background-color: transparent !important;
}

[data-theme="dark"] .ticket-list li.bg-warning-light {
  background-color: rgba(247, 151, 30, 0.15) !important;
  border-right: 5px solid #f7971e !important;
}

[data-theme="dark"] .ticket-list li.bg-warning-light a {
  background-color: transparent !important;
}

/* Fix hover effects for special background tickets */
[data-theme="dark"] .chat-user-list li.bg-info-light:hover,
[data-theme="dark"] .ticket-list li.bg-info-light:hover {
  background-color: rgba(69, 130, 236, 0.25) !important;
}

[data-theme="dark"] .chat-user-list li.bg-warning-light:hover,
[data-theme="dark"] .ticket-list li.bg-warning-light:hover {
  background-color: rgba(247, 151, 30, 0.25) !important;
}

/* Fix review card in ticket detail */
[data-theme="dark"] .review-card,
[data-theme="dark"] .ticket-review-card,
[data-theme="dark"] .ticket-detail .review-card,
[data-theme="dark"] .ticket-container .review-card {
  background-color: #181d2b !important;
  border-color: #252a38 !important;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

[data-theme="dark"] .review-card .card-body,
[data-theme="dark"] .ticket-review-card .card-body {
  background-color: #181d2b !important;
}

[data-theme="dark"] .review-header,
[data-theme="dark"] .review-body,
[data-theme="dark"] .review-footer,
[data-theme="dark"] .review-content {
  background-color: #181d2b !important;
  color: #e0e0e0 !important;
}

[data-theme="dark"] .review-title,
[data-theme="dark"] .review-rating,
[data-theme="dark"] .review-text,
[data-theme="dark"] .review-meta,
[data-theme="dark"] .review-author {
  color: #e0e0e0 !important;
}

/* More specific review text color fixes */
[data-theme="dark"] .review-card *,
[data-theme="dark"] .ticket-review-card *,
[data-theme="dark"] .review-info *,
[data-theme="dark"] .review-details * {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .review-info label,
[data-theme="dark"] .review-info .label,
[data-theme="dark"] .review-label,
[data-theme="dark"] .review-info-label {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .review-info span,
[data-theme="dark"] .review-info p,
[data-theme="dark"] .review-info div,
[data-theme="dark"] .review-value,
[data-theme="dark"] .review-info-value {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Target any elements within review sections */
[data-theme="dark"] .review-section label,
[data-theme="dark"] .review-section span,
[data-theme="dark"] .review-section p,
[data-theme="dark"] .review-section div {
  color: #e0e0e0 !important;
}

[data-theme="dark"] .review-section strong,
[data-theme="dark"] .review-section .value,
[data-theme="dark"] .review-section .info-value {
  color: #ffffff !important;
  font-weight: 500 !important;
}

/* Alert messages in dark mode */
[data-theme="dark"] .alert,
[data-theme="dark"] .message {
  color: #e0e0e0 !important;
}

/* Success alert */
[data-theme="dark"] .alert-success {
  background-color: rgba(0, 255, 170, 0.3);
  border-left: 4px solid #0b9965 !important;
  color: #e0e0e0 !important;
}

/* Danger/error alert */
[data-theme="dark"] .alert-danger,
[data-theme="dark"] .alert-error {
  background-color: rgba(255, 0, 0, 0.3);
  border-left: 4px solid #e53e3e !important;
  color: #e0e0e0 !important;
}

/* Warning alert */
[data-theme="dark"] .alert-warning {
  background-color: rgba(255, 115, 0, 0.3);
  border-left: 4px solid #ed8936 !important;
  color: #e0e0e0 !important;
}

/* Info alert */
[data-theme="dark"] .alert-info {
  background-color: rgba(0, 106, 255, 0.3);
  border-left: 4px solid #4299e1;
  color: #e0e0e0 !important;
}
