/* Dark Mode Support for WHIMS */

/* Sidebar Dark Mode */
.dark .fi-sidebar {
    background-color: #1f2937 !important;
    border-right: 1px solid #374151 !important;
}

.dark .fi-sidebar-item-button {
    color: #d1d5db !important;
}

.dark .fi-sidebar-item-button:hover {
    background-color: #374151 !important;
    color: #f3f4f6 !important;
}

.dark .fi-sidebar-item-active .fi-sidebar-item-button {
    background-color: #3b82f6 !important;
    color: #ffffff !important;
}

.dark .fi-sidebar-item-icon {
    color: #9ca3af !important;
}

.dark .fi-sidebar-item-active .fi-sidebar-item-icon {
    color: #ffffff !important;
}

.dark .fi-sidebar-group-button {
    color: #d1d5db !important;
}

.dark .fi-sidebar-group-button:hover {
    background-color: #374151 !important;
}

.dark .fi-sidebar-header {
    border-bottom: 1px solid #374151 !important;
}

/* Table Dark Mode */
.dark .fi-ta-table thead {
    background: linear-gradient(to bottom, #374151, #1f2937) !important;
}

.dark .fi-ta-header-cell {
    color: #d1d5db !important;
    border-bottom: 2px solid #4b5563 !important;
}

.dark .fi-ta-cell {
    border-bottom: 1px solid #374151 !important;
}

.dark .fi-ta-row:hover {
    background-color: #374151 !important;
}

.dark .fi-ta-table tbody tr:nth-child(even) {
    background-color: #1f2937 !important;
}

.dark .fi-ta-row.fi-ta-row-selected {
    background-color: #1e3a8a !important;
}

/* Filters Dark Mode */
.dark .fi-ta-filters {
    background: linear-gradient(to bottom, #1f2937, #111827) !important;
    border-bottom: 1px solid #374151 !important;
}

.dark .fi-ta-filters label {
    color: #9ca3af !important;
}

/* Table Container Dark Mode */
.dark .fi-ta-content {
    border: 1px solid #374151 !important;
    background-color: #111827 !important;
}

.dark .fi-ta-ctn {
    background-color: #111827 !important;
}

/* Pagination Dark Mode */
.dark .fi-ta-pagination {
    background-color: #1f2937 !important;
    border-top: 1px solid #374151 !important;
}

/* Header Dark Mode */
.dark .fi-ta-header {
    background-color: #111827 !important;
    border-bottom: 1px solid #374151 !important;
}

.dark .fi-ta-header-heading {
    color: #f3f4f6 !important;
}

/* Empty State Dark Mode */
.dark .fi-ta-empty-state {
    background-color: #111827 !important;
}

/* Cards and Sections Dark Mode */
.dark .fi-section {
    background-color: #1f2937 !important;
}

.dark .fi-card {
    background-color: #1f2937 !important;
}

/* Stats Widgets Dark Mode */
.dark .fi-stats-card {
    background-color: #1f2937 !important;
}

/* Modal Dark Mode */
.dark .fi-modal {
    background-color: #1f2937 !important;
}

.dark .fi-modal-window {
    background-color: #1f2937 !important;
}

/* Filters Panel Dark Mode */
.dark .fi-filters {
    background-color: #1f2937 !important;
}

/* Dropdown Dark Mode */
.dark .fi-dropdown-list {
    background-color: #1f2937 !important;
}

.dark .fi-dropdown-list-item {
    color: #d1d5db !important;
}

.dark .fi-dropdown-list-item:hover {
    background-color: #374151 !important;
}

/* Input Fields Dark Mode */
.dark .fi-input {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

.dark .fi-select-input {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

.dark .fi-input:focus,
.dark .fi-select-input:focus {
    border-color: #3b82f6 !important;
    box-shadow: 0 0 0 1px #3b82f6 !important;
}

/* Text Colors Dark Mode */
.dark .fi-ta-text {
    color: #e5e7eb !important;
}

.dark .fi-ta-text-item {
    color: #e5e7eb !important;
}

/* Badge Colors Dark Mode */
.dark .fi-ta-cell .fi-badge {
    opacity: 0.9 !important;
}

/* Breadcrumb Dark Mode */
.dark .fi-breadcrumbs {
    color: #9ca3af !important;
}

/* Main Content Dark Mode */
.dark .fi-main {
    background-color: #0f172a !important;
}

/* Page Dark Mode */
.dark .fi-page {
    background-color: transparent !important;
}

.dark .fi-page-header {
    border-bottom-color: #374151 !important;
}

.dark .fi-page-heading {
    color: #f3f4f6 !important;
}

/* Topbar Dark Mode */
.dark .fi-topbar {
    background-color: #111827 !important;
    border-bottom: 1px solid #374151 !important;
}

/* Global Search Dark Mode */
.dark .fi-global-search-input {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

/* Notification Panel Dark Mode */
.dark .fi-notifications {
    background-color: #1f2937 !important;
}

/* Tabs Dark Mode */
.dark .fi-tabs-tab {
    color: #9ca3af !important;
}

.dark .fi-tabs-tab:hover {
    color: #d1d5db !important;
}

.dark .fi-tabs-tab-active {
    color: #f3f4f6 !important;
}

/* Info Lists Dark Mode */
.dark .fi-in-item {
    border-bottom-color: #374151 !important;
}

/* Fix filter inputs specifically in dark mode */
.dark .fi-ta-filters .fi-input {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

.dark .fi-ta-filters .fi-select-input {
    background-color: #1f2937 !important;
    border-color: #374151 !important;
    color: #f3f4f6 !important;
}

/* Fix placeholder text in dark mode */
.dark .fi-input::placeholder {
    color: #6b7280 !important;
}

.dark .fi-select-input::placeholder {
    color: #6b7280 !important;
}

/* Fix data text visibility in dark mode */
.dark .fi-ta-cell {
    color: #e5e7eb !important;
}

/* Icon colors in dark mode */
.dark .fi-icon {
    color: #9ca3af !important;
}

/* Fix toggle button in dark mode */
.dark .fi-toggle-button {
    background-color: #374151 !important;
}

.dark .fi-toggle-button[aria-checked="true"] {
    background-color: #3b82f6 !important;
}