﻿﻿
.locked-display-container {
    color: #333 !important;
}


.dark-style .locked-display-container {
    color: #ffffff !important;
}

[data-theme="dark"] .locked-display-container {
    color: #ffffff !important;
}



.dark-style ebit-label label,
.dark-style .ebit-label-text {
    color: #eceef1 !important;
}


.dark-style ebit-select select,
.dark-style ebit-select .select2-selection,
.dark-style ebit-select .form-select {
    background-color: #2b2c40 !important;
    color: #ffffff !important;
    border-color: #444564 !important;
}



.dark-style .btn-gray {
    background-color: rgba(124, 125, 141, 0.2) !important;
    color: #cbcbd2 !important;
    border-color: #444564 !important;
}


    .dark-style .btn-gray:hover {
        background-color: rgba(124, 125, 141, 0.3) !important;
        color: #ffffff !important;
        border-color: #5a5b75 !important;
    }

.dark-style ebit-calculation [data-fn] {
    color: #ffffff !important;
}

    .dark-style ebit-calculation [data-fn]:not([style*="color: rgb(255, 77, 73)"]) {
        color: #ffffff !important;
    }

.dark-style ebit-select ::placeholder {
    color: #a3a4cc !important;
    opacity: 1;
}

.dark-style ebit-number input,
.dark-style ebit-number .form-control,
.dark-style ebit-number .number-display,
.dark-style ebit-number [data-value] {
    color: #d5d5e2 !important;
    opacity: 1 !important;
}

.dark-style ebit-number ::placeholder {
    color: #d5d5e2 !important;
    opacity: 1;
}

.dark-style ebit-number span,
.dark-style ebit-number div {
    color: #ffffff !important;
}

.dark-style ebit-section.flex-grow-1 {
    color: #ffffff !important;
}

.dark-style h1.invoice-main-title,
.dark-style h2.invoice-main-title,
.dark-style h3.invoice-main-title,
.dark-style h4.invoice-main-title,
.dark-style h5.invoice-main-title,
.dark-style .invoice-main-title {
    color: #ffffff !important;
}

[data-theme="dark"] .invoice-main-title {
    color: #ffffff !important;
}

.dark-style .section-left h5 {
    color: #cfd3db !important;
}

.dark-style :host {
    background-color: #232333 !important;
}

.dark-style .header-flex-container {
    background-color: #2b2c40 !important;
    border-bottom: 1px solid #444564;
}

.dark-style .input-group {
    background-color: #232333 !important;
    border-color: #444564 !important;
}

.dark-style #universalSearch {
    color: #cbcbe2 !important;
}

.dark-style .input-group:focus-within {
    border-color: #696cff !important;
    box-shadow: 0 0 0 0.2rem rgba(105, 108, 255, 0.15) !important;
}

.dark-style .advanced-dropdown {
    background: #2b2c40 !important;
    border-color: #444564 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4) !important;
}

    .dark-style .advanced-dropdown .col {
        color: #a3a4cc !important;
    }

    .dark-style .advanced-dropdown li:hover {
        background-color: rgba(255, 255, 255, 0.05) !important;
    }

.dark-style .badge-tag[data-type="Filter"] {
    background-color: rgba(105, 108, 255, 0.16) !important;
    color: #e2e2ff !important;
    border: 1px solid rgba(105, 108, 255, 0.4) !important;
}

.dark-style .badge-tag[data-type="Group"] {
    background-color: rgba(113, 221, 55, 0.16) !important;
    color: #71dd37 !important;
    border: 1px solid rgba(113, 221, 55, 0.4) !important;
}

.dark-style .badge-tag[data-type="Filter"] .remove-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #e2e2ff !important;
    border: 1px solid rgba(105, 108, 255, 0.3) !important;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

/* --- 🌙 DARK THEME SYNC --- */
.dark-style #selected-badge {
    background-color: rgba(105, 108, 255, 0.16) !important;
    color: #cbc9ff !important;
    border: 1px solid rgba(105, 108, 255, 0.4) !important;
}

    .dark-style #selected-badge .btn-close {
        background-color: rgba(255, 255, 255, 0.1) !important;
        border: 1px solid rgba(255, 255, 255, 0.2) !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23fff'%3E%3Cpath d='M.293.293a1 1 0 011.414 0L8 6.586 14.293.293a1 1 0 111.414 1.414L9.414 8l6.293 6.293a1 1 0 01-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 01-1.414-1.414L6.586 8 .293 1.707a1 1 0 010-1.414z'/%3E%3C/svg%3E") !important;
    }

        .dark-style #selected-badge .btn-close:hover {
            background-color: rgba(255, 255, 255, 0.2) !important;
            border-color: rgba(255, 255, 255, 0.5) !important;
        }

/* --- 🟢 Group Badge Remove Button (Dark) --- */
.dark-style .badge-tag[data-type="Group"] .remove-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #71dd37 !important;
    border: 1px solid rgba(113, 221, 55, 0.3) !important;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}


.dark-style .badge-tag[data-type="Filter"] .remove-btn:hover {
    background-color: rgba(105, 108, 255, 0.4) !important;
    color: #fff !important;
}

.dark-style .badge-tag[data-type="Group"] .remove-btn:hover {
    background-color: rgba(113, 221, 55, 0.4) !important;
    color: #fff !important;
}

.dark-style .badge-tag .remove-btn {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
}

.dark-style table.dataTable tbody tr td,
.dark-style table.dataTable thead th,
.dark-style .table > :not(caption) > * > * {
    border-bottom-color: #444564 !important;
    border-top: none !important;
    box-shadow: none !important;
}

.dark-style .table-bordered,
.dark-style .table-bordered td,
.dark-style .table-bordered th {
    border: 0 !important;
}

.dark-style .table-responsive,
.dark-style table.dataTable.no-footer {
    border-color: #444564 !important;
}

.dark-style .card-footer,
.dark-style div[style*="border-top"] {
    border-top-color: #444564 !important;
}

.dark-style .filter-item.active,
.dark-style [data-filter].active {
    background-color: rgba(105, 108, 255, 0.16) !important;
    color: #8587ff !important;
}

.dark-style .group-item.active {
    background-color: rgba(113, 221, 55, 0.08) !important;
    color: #71dd37 !important;
}

.dark-style .filter-item:hover,
.dark-style .group-item:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
}

.dark-style .group-row {
    background-color: #323249 !important;
    color: #cfd3ed !important;
}

.dark-style .advanced-dropdown::-webkit-scrollbar {
    width: 6px;
}

.dark-style .advanced-dropdown::-webkit-scrollbar-thumb {
    background: #444564;
    border-radius: 10px;
}
/* ==========================================
           ✅ DATATABLES DARK MODE OVERRIDE
           ========================================== */

.dark-style .table-responsive,
.dark-style table.dataTable {
    background-color: #2b2c40 !important;
    color: #a3a4cc !important;
    border-color: #444564 !important;
}

    .dark-style table.dataTable thead th {
        background-color: #323249 !important;
        color: #cfd3ed !important;
        border-bottom: 1px solid #444564 !important;
    }

    /* ✅ Table Rows (tr) Dark Theme Fix */
    /* ==========================================
           🔥 ULTRA FORCE DARK TABLE FIX
           ========================================== */

    .dark-style .table:not(.table-dark) th,
    .dark-style .table:not(.table-dark) td,
    .dark-style table.dataTable tbody tr,
    .dark-style table.dataTable tbody tr td {
        background-color: #2b2c40 !important;
        color: #a3a4cc !important;
        border-color: #444564 !important;
    }


    .dark-style .table-striped > tbody > tr:nth-of-type(odd) > *,
    .dark-style table.dataTable.table-striped tbody tr:nth-of-type(odd) td {
        background-color: #2e2f45 !important;
        box-shadow: none !important;
    }


    .dark-style table.dataTable tbody tr:hover,
    .dark-style table.dataTable tbody tr:hover td {

        background-color: rgba(105, 108, 255, 0.12) !important;
        color: #fff !important;
    }
/* Normal DataTables par hover rahega, lekin ONLY EBIT-REPORT par hover disable ho jayega */
.dark-style table[data-ebit-report="true"].dataTable tbody tr:hover,
.dark-style table[data-ebit-report="true"].dataTable tbody tr:hover td,
[data-bs-theme="dark"] table[data-ebit-report="true"].dataTable tbody tr:hover,
[data-bs-theme="dark"] table[data-ebit-report="true"].dataTable tbody tr:hover td,
.dark-style .ebit-styled-table[data-ebit-report="true"] tbody tr:hover,
.dark-style .ebit-styled-table[data-ebit-report="true"] tbody tr:hover td {
    background-color: transparent !important;
    background: transparent !important;
    color: inherit !important;
    box-shadow: none !important;
}

.dark-style .card-footer,
.dark-style .dataTables_info,
.dark-style .total-records-class {
    background-color: #2b2c40 !important;
    color: #7c7db0 !important;
}

.dark-style .dataTables_filter input,
.dark-style .dataTables_length select {
    background-color: #232333 !important;
    border-color: #444564 !important;
    color: #dbdade !important;
}

.dark-style .dataTables_paginate .paginate_button {
    color: #a3a4cc !important;
}

.dark-style .dataTables_info {
    color: #7c7db0 !important;
}

.dark-style table.dataTable td.dataTables_empty {
    background-color: #2b2c40 !important;
    color: #7c7db0 !important;
}

#filterList, #groupByList {
    max-height: 200px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 5px;
}

    #filterList::-webkit-scrollbar,
    #groupByList::-webkit-scrollbar {
        width: 5px;
    }

    #filterList::-webkit-scrollbar-track,
    #groupByList::-webkit-scrollbar-track {
        background: transparent;
    }

    #filterList::-webkit-scrollbar-thumb,
    #groupByList::-webkit-scrollbar-thumb {
        background: #dbdade;
        border-radius: 10px;
    }

        #filterList::-webkit-scrollbar-thumb:hover,
        #groupByList::-webkit-scrollbar-thumb:hover {
            background: #696cff;
        }

    #filterList li, #groupByList li {
        margin-bottom: 2px;
        border-radius: 4px;
    }

#favoritesList {
    max-height: 100px;
    overflow-y: auto;
    padding: 5px;
}

    #favoritesList::-webkit-scrollbar {
        width: 4px;
    }

    #favoritesList::-webkit-scrollbar-thumb {
        background: #dbdade;
        border-radius: 10px;
    }
/* --- ☀️ REFINED LIGHT THEME STYLE --- */
/* --- 🌙 DARK THEME ONLY --- */

/* --- ☀️ LIGHT THEME (Default) --- */
#filterDetailModal .badge,
#filterDetailModal .filter-item-badge {
    background-color: #ffffff !important;
    color: #566a7f !important;
    border: 1px solid #d9dee3 !important;
    padding: 6px 12px;
    border-radius: 6px;
}


#modalGroupList .badge {
    background-color: #e8fadf !important;
    color: #71dd37 !important;
    border: 1px solid #c3f2ad !important;
}

/* --- 🌙 DARK THEME (Only when .dark-style is active) --- */
.dark-style #filterDetailModal .badge,
.dark-style #filterDetailModal .filter-item-badge {
    background-color: rgba(105, 108, 255, 0.16) !important;
    color: #e2e2ff !important;
    border: 1px solid rgba(105, 108, 255, 0.4) !important;
}

.dark-style #modalGroupList .badge {
    background-color: rgba(113, 221, 55, 0.16) !important;
    color: #e8fadf !important;
    border: 1px solid rgba(113, 221, 55, 0.4) !important;
}


/* --- ☀️ LIGHT THEME SAFETY --- */
.light-style #modalGroupList .badge {
    background-color: #f8f9fa !important;
    color: #566a7f !important;
    border: 1px solid #d9dee3 !important;
}
/* Modal Content Soft Look */
.light-style #filterDetailModal .modal-content {
    background-color: #ffffff;
    border-radius: 16px !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
}

.light-style #filterDetailModal .modal-header {
    background: linear-gradient(to bottom, #f9fbfd, #ffffff);
    border-bottom: 1px solid #f0f2f4 !important;
    padding: 1.2rem 1.5rem;
}

.light-style #filterDetailModal .modal-title {
    color: #435971;
    letter-spacing: -0.5px;
}

.dark-style .favorite-item {
    color: #b4bdc6 !important;
}

    .dark-style .favorite-item:hover {
        background-color: rgba(255, 255, 255, 0.05) !important;
        color: #696cff;
    }

    /* Agar item active hai */
    .dark-style .favorite-item.active {
        background-color: rgba(105, 108, 255, 0.16) !important;
        color: #696cff !important;
    }

.dark-style [data-grid] tr td,
.dark-style [data-grid] tr th {
    background-color: #2b2c40 !important;
    border-bottom-color: #444564 !important;
    color: #a3a4cc !important;
}

/* Dark mode header background */
.dark-style [data-grid] thead th {
    background-color: #323249 !important;
    border-bottom-color: #4e4f73 !important;
    color: #cfd3ed !important;
}

.dark-style [data-grid] tbody tr:hover td {
    background-color: rgba(105, 108, 255, 0.08) !important;
}

.light-style [data-grid-detail] tbody tr.table-active {
    background-color: #f0f2ff !important;
    position: relative;
    outline: none;
}

    .light-style [data-grid-detail] tbody tr.table-active td,
    .light-style [data-grid-detail] tbody tr.table-active ebit-bodycolumn {
        background-color: #f0f2ff !important;
        border-bottom: 1px solid #e0e4ff !important;
        border-top: 1px solid #e0e4ff !important;
    }

    .light-style [data-grid-detail] tbody tr.table-active td {
        box-shadow: inset 0 0 0 9999px #f0f2ff !important;
    }

        .light-style [data-grid-detail] tbody tr.table-active td[render="checkbox"],
        .light-style [data-grid-detail] tbody tr.table-active ebit-bodycolumn[render="checkbox"] {
            background-color: #f0f2ff !important;
        }

.dark-style [data-grid-detail] tbody tr.table-active {
    background-color: rgba(105, 108, 255, 0.08) !important;
}

    .dark-style [data-grid-detail] tbody tr.table-active td {
        color: #e2e2e9 !important;
        box-shadow: none !important;
    }

        .dark-style [data-grid-detail] tbody tr.table-active td:first-child {
            border-left: 1px solid #696cff !important;
        }
/* =========================================================
   DARK THEME STYLING (.dark-style) FOR VIEW SETTINGS DROPDOWN
   ========================================================= */

/* Main Dropdown Container */
:host-context(.dark-style) #viewSettingsDropdown,
.dark-style #viewSettingsDropdown,
:host-context(.dark-style) .view-settings-dropdown,
.dark-style .view-settings-dropdown {
    background-color: #2b2c40 !important;
    border-color: #444564 !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45) !important;
}

/* Default Display Text ("X Records") */
:host-context(.dark-style) #defaultLoadText,
.dark-style #defaultLoadText {
    color: #e1e1ff !important;
}

/* Input Field Styling */
:host-context(.dark-style) #newPageLengthInput,
.dark-style #newPageLengthInput {
    background-color: #32344e !important;
    color: #dbdade !important;
    border-color: #696cff !important;
}

    :host-context(.dark-style) #newPageLengthInput::placeholder,
    .dark-style #newPageLengthInput::placeholder {
        color: #8283a7 !important;
    }

:host-context(.dark-style) #viewModeLoader .text-muted,
.dark-style #viewModeLoader .text-muted {
    color: #a3a4cc !important;
}


:host-context(.dark-style) .view-settings-spinner,
.dark-style .view-settings-spinner {
    border-color: rgba(255, 255, 255, 0.2) !important;
    border-top-color: #696cff !important;
}