﻿/* ====================================================
   TABLE STRUCTURE & BASE FIXES
   ==================================================== */
thead {
    display: table-header-group;
}

tbody {
    display: table-row-group;
}

.dt-buttons {
    display: none;
}

thead, tbody, tfoot, tr, td, th {
    border-top: solid;
    border-color: inherit;
    border-width: 0;
}

ebit-reportgroup {
    display: flex !important;
    flex-direction: column !important;
    gap: 15px;
    width: 100%;
}

ebit-dialog, #PropertyTab, ebit-report, ebit-footer {
    display: block !important;
    position: relative;
}

#PropertyTab {
    padding-top: 35px !important;
}

.tab-content > .tab-pane {
    display: none;
}

.tab-content > .active {
    display: block !important;
}

/* ====================================================
   PREMIUM GRID & ALIGNMENT STYLES (LIGHT MODE DEFAULT)
   ==================================================== */
.ebit-styled-table,
table.ebit-premium-grid {
    border-collapse: collapse !important;
    width: 100% !important;
    max-width: 100% !important;
    table-layout: fixed !important;
}

    .ebit-styled-table th,
    .ebit-styled-table td,
    table.ebit-premium-grid th,
    table.ebit-premium-grid td {
        box-sizing: border-box !important;
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        padding-right: 12px !important;
        padding-left: 12px !important;
        white-space: nowrap !important;
        overflow: visible !important;
    }

    .ebit-styled-table tr,
    table.ebit-premium-grid tbody tr {
        border-bottom: 1px solid #dee2e6 !important;
    }

        .ebit-styled-table tr.group-row,
        .ebit-styled-table tr.group-footer,
        .ebit-styled-table tr.data-row {
            background-clip: padding-box !important;
            border-bottom: 1px solid #dee2e6 !important;
        }

    .ebit-styled-table th:first-child,
    .ebit-styled-table td:first-child {
        border-left: 1px solid #dee2e6 !important;
    }

    /* Light Mode Header */
    thead th,
    .ebit-styled-table thead th,
    table.ebit-premium-grid thead th,
    .ebit-table-area thead th,
    .dataTables_scrollHead th {
        background-color: #f8f9fa !important;
        color: #334155 !important;
        font-weight: 600 !important;
        border-bottom: 2px solid #e2e8f0 !important;
    }

/* Filter Menu Styles */
.ebit-filter-menu .dropdown-menu {
    position: relative !important;
    top: 0 !important;
    left: 0 !important;
    float: none !important;
    width: 100% !important;
    box-shadow: none !important;
    border: none !important;
    margin-top: 10px !important;
}

.ebit-filter-dropdown-content {
    height: auto !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
}

/* Footer & Dynamic Row Styles */
.ebit-table-footer,
tr.group-footer {
    background-color: #f8f9fa;
    color: #334155;
    font-weight: 600;
}

    .ebit-table-footer td,
    tr.group-footer td {
        border-top: 1px solid #dee2e6 !important;
    }

    .ebit-table-footer .dataTables_sizing,
    .ebit-table-footer tr[style*="height: 0px"],
    .ebit-table-footer tr[style*="height: 0"] {
        display: none !important;
        height: 0 !important;
        overflow: hidden !important;
        padding: 0 !important;
        margin: 0 !important;
    }

.footer-dynamic-row {
    display: table-row !important;
}

    .footer-dynamic-row ebit-bodycolumn {
        display: table-cell !important;
    }

/* ====================================================
   DARK MODE OVERRIDES (FULL COMPREHENSIVE FIX)
   ==================================================== */
.dark-style .ebit-main-card-wrapper {
    background: transparent !important;
}

.dark-style .ebit-main-card,
.dark-style .ebit-table-area {
    background: #2b2c40 !important;
    color: #b6bee3 !important;
    border-color: #444564 !important;
}

.dark-style .ebit-table-scroll-container {
    border-color: #444564 !important;
}

.dark-style .ebit-header-cell,
.dark-style .ebit-styled-table,
.dark-style .ebit-styled-table th,
.dark-style .ebit-styled-table td,
.dark-style table.ebit-premium-grid th,
.dark-style table.ebit-premium-grid td {
    border-color: #444564 !important;
    color: #b6bee3 !important;
}

.dark-style .ebit-header-cell,
.dark-style .ebit-table-area thead th,
.dark-style table.ebit-premium-grid thead th,
.dark-style thead th {
    background-color: #232333 !important;
    color: #cfd3db !important;
    border-bottom: 2px solid #444564 !important;
}

.dark-style .ebit-styled-table tr,
.dark-style .ebit-styled-table tr.data-row,
.dark-style .ebit-styled-table tr.group-row {
    background-color: #2b2c40 !important;
    border-bottom: 1px solid #444564 !important;
    color: #cfd3db !important;
}

    /* Dark Mode Footer & Grand Total Fix */
    .dark-style .ebit-table-footer,
    .dark-style tr.group-footer,
    .dark-style tfoot tr,
    .dark-style .ebit-styled-table tr.group-footer {
        background-color: #232333 !important;
        color: #cfd3db !important;
        font-weight: 700 !important;
        border-top: 1px solid #444564 !important;
        border-bottom: 1px solid #444564 !important;
    }

        .dark-style .ebit-table-footer td,
        .dark-style tr.group-footer td,
        .dark-style tfoot td {
            color: #cbcbe2 !important;
            border-color: #444564 !important;
        }

/* Dark Mode Empty State Fix */
.dark-style .ebit-premium-empty-state {
    background: #2b2c40 !important;
}

.dark-style .ebit-empty-title {
    color: #e0e6ed !important;
}

.dark-style .ebit-empty-subtitle {
    color: #a3a4cc !important;
}

.dark-style .ebit-empty-illustration.no-data {
    background: linear-gradient(135deg, #32344f, #232333) !important;
    color: #94a3b8 !important;
}

/* Hover Effect Disable */
.table.no-hover-effect tbody tr:hover,
.ebit-styled-table tbody tr:hover,
table.ebit-premium-grid tbody tr:hover {
    background: transparent !important;
}

/* ====================================================
   CLEAN SINGLE SCROLLBAR CONTROLLER
   ==================================================== */
.ebit-table-area,
.dataTables_scrollHead,
.dataTables_scrollBody,
.dataTables_scrollFoot {
    overflow: visible !important;
    width: 100% !important;
    max-width: 100% !important;
}

.dataTables_scroll {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    width: 100% !important;
    max-width: 100% !important;
    display: block !important;
}

.dataTables_scrollHeadInner,
.dataTables_scrollFootInner,
.dataTables_scrollHeadInner table,
.dataTables_scrollBody table,
.dataTables_scrollFootInner table {
    width: 100% !important;
    max-width: 100% !important;
    table-layout: auto !important;
}

.dataTables_scrollBody thead,
.dataTables_scrollBody thead tr,
.dataTables_scrollBody thead th,
.dataTables_scrollBody thead td,
.dataTables_scrollBody tfoot,
.dataTables_scrollBody tfoot tr,
.dataTables_scrollBody tfoot td,
.dataTables_scrollBody .dataTables_sizing {
    display: none !important;
    visibility: collapse !important;
    height: 0 !important;
    padding: 0 !important;
    border: none !important;
    opacity: 0 !important;
    line-height: 0 !important;
}

.ebit-table-scroll-container {
    border-top: 1px solid #dee2e6 !important;
    border-right: 1px solid #dee2e6 !important;
    border-radius: 4px;
    overflow: hidden;
}

@media (min-width: 769px) {
    .dataTables_scroll {
        overflow-x: hidden !important;
    }

    .dataTables_scrollHeadInner,
    .dataTables_scrollBody table,
    .dataTables_scrollFootInner table {
        width: 100% !important;
        min-width: 100% !important;
    }
}

@media (max-width:768px) {
    .dataTables_scroll {
        overflow-x: auto !important;
    }

    .dataTables_scrollHead,
    .dataTables_scrollBody,
    .dataTables_scrollFoot {
        width: 100% !important;
    }

    .dataTables_scrollHeadInner,
    .dataTables_scrollFootInner {
        width: auto !important;
        min-width: 100% !important;
    }

        .dataTables_scrollHeadInner table,
        .dataTables_scrollBody table,
        .dataTables_scrollFootInner table {
            width: 100% !important;
            table-layout: auto !important;
        }
}

ebit-report th::after,
ebit-report th::before {
    display: none !important;
}

tr.group-row td,
tr.group-footer td {
    border-right: none !important;
}

/* PROFESSIONAL EMPTY STATE */
.ebit-premium-empty-state {
    background: #fff !important;
    padding: 80px 20px !important;
    text-align: center !important;
    vertical-align: middle !important;
}

.ebit-empty-center-card {
    max-width: 500px;
    margin: 0 auto;
}

.ebit-empty-illustration {
    width: 90px;
    height: 90px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    box-shadow: 0 10px 30px rgba(0,0,0,.08);
    transition: all .3s ease;
}

    .ebit-empty-illustration.no-data {
        background: linear-gradient(135deg,#f8fafc,#e2e8f0);
        color: #64748b;
    }

    .ebit-empty-illustration.search-failed {
        background: linear-gradient(135deg,#fef2f2,#fee2e2);
        color: #ef4444;
    }

    .ebit-empty-illustration.filter-empty {
        background: #f3f3ff;
        color: #696cff;
    }

.ebit-empty-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 10px;
}

.ebit-empty-subtitle {
    font-size: 14px;
    color: #64748b;
    line-height: 1.6;
    margin: 0;
}

.ebit-search-keyword-pill {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    background: #fef2f2;
    color: #dc2626;
    font-weight: 600;
}

/* Table Layout Strict Width Mode */
.ebit-premium-grid,
.dataTables_scrollHeadInner table,
table.dataTable,
table.ebit-premium-grid {
    table-layout: fixed !important;
    width: 100% !important;
}

    table.dataTable thead tr th:first-child,
    table thead tr th:first-child {
        padding-left: 25px !important;
    }

    table.dataTable thead th,
    table.dataTable tbody td {
        box-sizing: border-box !important;
    }

        table.dataTable thead th.text-end,
        table.dataTable tbody td.text-end {
            text-align: right !important;
        }

.ebit-grouped-hidden-col {
    display: none !important;
    width: 0px !important;
    padding: 0px !important;
    margin: 0px !important;
    border: none !important;
}

tr.data-row {
    display: table-row !important;
}

    tr.data-row td {
        display: table-cell !important;
        box-sizing: border-box !important;
    }

        tr.data-row td > div,
        tr.data-row td > span,
        tr.data-row td > ebit-bodycolumn {
            display: block !important;
            width: 100% !important;
            box-sizing: border-box !important;
            overflow: hidden !important;
            text-overflow: ellipsis !important;
        }
