@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css');

#moduleContent .filter-cell[data-field="room_defulte1"], .sigma-fullscreen-module-overlay .filter-cell[data-field="room_defulte1"] {
    direction: ltr !important;
    text-align: left !important;
}

/* أعمدة عربية: الحالة، حالة العمل، نوع العمل */
#moduleContent .view-all-container .view-all-table thead tr th[data-col-field="ss_state"],
#moduleContent .view-all-container .view-all-table thead tr th[data-col-field="workstate"],
#moduleContent .view-all-container .view-all-table thead tr th[data-col-field="name"],
#moduleContent .view-all-container .view-all-table tbody tr td[data-col-field="ss_state"],
#moduleContent .view-all-container .view-all-table tbody tr td[data-col-field="workstate"],
#moduleContent .view-all-container .view-all-table tbody tr td[data-col-field="name"],
#moduleContent .view-all-container .view-all-table thead tr.filter-row th.filter-cell[data-field="ss_state"],
#moduleContent .view-all-container .view-all-table thead tr.filter-row th.filter-cell[data-field="workstate"],
#moduleContent .view-all-container .view-all-table thead tr.filter-row th.filter-cell[data-field="name"],
#moduleContent .sector-stations-list-all #dataTable thead th[data-col-field="ss_state"],
#moduleContent .sector-stations-list-all #dataTable thead th[data-col-field="workstate"],
#moduleContent .sector-stations-list-all #dataTable thead th[data-col-field="name"],
#moduleContent .sector-stations-list-all #dataTable tbody td[data-col-field="ss_state"],
#moduleContent .sector-stations-list-all #dataTable tbody td[data-col-field="workstate"],
#moduleContent .sector-stations-list-all #dataTable tbody td[data-col-field="name"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table thead tr th[data-col-field="ss_state"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table thead tr th[data-col-field="workstate"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table thead tr th[data-col-field="name"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table tbody tr td[data-col-field="ss_state"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table tbody tr td[data-col-field="workstate"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table tbody tr td[data-col-field="name"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table thead tr.filter-row th.filter-cell[data-field="ss_state"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table thead tr.filter-row th.filter-cell[data-field="workstate"],
.sigma-fullscreen-module-overlay .view-all-container .view-all-table thead tr.filter-row th.filter-cell[data-field="name"] {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: plaintext;
}

/* --- custom override for buttons and table row height --- */

/* أزرار العمليات العلوية */
#moduleContent .view-all-actions, .sigma-fullscreen-module-overlay .view-all-actions {
    position: relative;
    z-index: 2000;
    /* قيمة أعلى من رأس الجدول لضمان ظهور القوائم فوقه */
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 10px 20px;
    background-color: var(--header-bg, #f7fafc);
    border-bottom: 1px solid var(--border-color, #edf2f7);
    color: var(--text-primary, #1a202c);
}

#moduleContent .view-all-actions .filter-dropdown, .sigma-fullscreen-module-overlay .view-all-actions .filter-dropdown {
    position: absolute;
    background: var(--card-bg, #fff);
    color: var(--text-primary, #1a202c);
    border: 1px solid var(--border-color, #cbd5e0);
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    padding: 6px;
    z-index: 2001;
    /* Ensure it's above actions container */
    text-align: right;
}

/*
.view-all-actions button {
    font-size: 14px !important;
    padding: 6px 32px !important;
    min-width: 100px !important;
    min-height: 24px !important;
    border-radius: 16px !important;
    font-weight: bold !important;
    letter-spacing: 2px !important;
    margin-left: 18px !important;
    margin-right: 18px !important;
}
*/

/* Table Row Padding */
/*
#moduleContent .view-all-table tbody td, .sigma-fullscreen-module-overlay .view-all-table tbody td {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
}
*/

#moduleContent .view-all-container, .sigma-fullscreen-module-overlay .view-all-container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--card-bg, #fff);
    color: var(--text-primary, #1a202c);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding: 0 0 10px;
}

#moduleContent .view-all-header, .sigma-fullscreen-module-overlay .view-all-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    text-align: center;
}

#moduleContent .view-all-header h1, .sigma-fullscreen-module-overlay .view-all-header h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

#moduleContent .view-all-table-wrapper, .sigma-fullscreen-module-overlay .view-all-table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    padding: 0 20px 20px;
    width: 100%;
    border-bottom: 1px solid #e2e8f0;
    min-height: 0;
}

#moduleContent .view-all-table, .sigma-fullscreen-module-overlay .view-all-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    min-width: 0;
    table-layout: fixed;
}

#moduleContent .view-all-table thead, .sigma-fullscreen-module-overlay .view-all-table thead {
    background-color: #4a5568;
}

/* ضمان أن خلايا الرأس لها خلفية أيضاً */
#moduleContent .view-all-table thead th, .sigma-fullscreen-module-overlay .view-all-table thead th {
    background-color: #4a5568;
    color: white;
}

#moduleContent .view-all-table thead .filter-row th, .sigma-fullscreen-module-overlay .view-all-table thead .filter-row th {
    margin: 10px;
    background-color: #5a647a;
    height: 28px;
}

#moduleContent .view-all-table thead th, .sigma-fullscreen-module-overlay .view-all-table thead th {
    padding: 6px 4px;
    text-align: center;
    font-weight: 600;
    border: 1px solid #2d3748;
    white-space: nowrap;
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

#moduleContent .view-all-table thead .filter-row th, .sigma-fullscreen-module-overlay .view-all-table thead .filter-row th {
    padding: 2px 3px;
    background-color: #5a647a;
    overflow: visible !important;
}

#moduleContent .filter-menu, .sigma-fullscreen-module-overlay .filter-menu {
    position: relative;
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

#moduleContent .filter-toggle, .sigma-fullscreen-module-overlay .filter-toggle {
    width: 100%;
    padding: 3px 4px;
    font-size: 9px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
    transition: transform 0.1s ease, box-shadow 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    box-sizing: border-box;
}

#moduleContent .filter-toggle:hover, .sigma-fullscreen-module-overlay .filter-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#moduleContent .filter-menu .filter-dropdown, .sigma-fullscreen-module-overlay .filter-menu .filter-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--card-bg, #fff);
    color: var(--text-primary, #1a202c);
    border: 1px solid var(--border-color, #cbd5e0);
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    width: 180px;
    padding: 6px;
    z-index: 1000;
    display: none;
    text-align: right;
}

#moduleContent .filter-menu.open .filter-dropdown, .sigma-fullscreen-module-overlay .filter-menu.open .filter-dropdown {
    display: block;
}

#moduleContent .filter-search, .sigma-fullscreen-module-overlay .filter-search {
    width: 100%;
    padding: 6px 8px;
    font-size: 12px;
    border: 1px solid var(--border-color, #cbd5e0);
    border-radius: 4px;
    background-color: var(--input-bg, #fff);
    color: var(--text-primary, #1a202c);
}

#moduleContent .filter-select-all-wrap, .sigma-fullscreen-module-overlay .filter-select-all-wrap {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 4px 0;
    color: var(--text-primary, #1a202c);
}

#moduleContent .filter-options, .sigma-fullscreen-module-overlay .filter-options {
    margin: 6px 0;
    max-height: 120px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Custom Scrollbar for filter options */
#moduleContent .filter-options::-webkit-scrollbar, .sigma-fullscreen-module-overlay .filter-options::-webkit-scrollbar {
    width: 6px;
}

#moduleContent .filter-options::-webkit-scrollbar-track, .sigma-fullscreen-module-overlay .filter-options::-webkit-scrollbar-track {
    background: #f1f1f1;
}

#moduleContent .filter-options::-webkit-scrollbar-thumb, .sigma-fullscreen-module-overlay .filter-options::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#moduleContent .filter-options::-webkit-scrollbar-thumb:hover, .sigma-fullscreen-module-overlay .filter-options::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

#moduleContent .filter-option label, .sigma-fullscreen-module-overlay .filter-option label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    padding: 2px 2px;
    cursor: pointer;
    white-space: normal;
    line-height: 1.3;
    color: var(--text-primary, #1a202c);
}

#moduleContent .filter-actions, .sigma-fullscreen-module-overlay .filter-actions {
    display: flex;
    gap: 6px;
}

#moduleContent .filter-actions button, .sigma-fullscreen-module-overlay .filter-actions button {
    flex: 1;
    padding: 6px 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

#moduleContent .filter-actions .apply-filter, .sigma-fullscreen-module-overlay .filter-actions .apply-filter {
    background: #4299e1;
    color: #fff;
}

#moduleContent .filter-actions .clear-filter, .sigma-fullscreen-module-overlay .filter-actions .clear-filter {
    background: #f56565;
    color: #fff;
}

#moduleContent .view-all-table tbody tr, .sigma-fullscreen-module-overlay .view-all-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    transition: background-color 0.2s;
}

#moduleContent .view-all-table tbody tr:hover, .sigma-fullscreen-module-overlay .view-all-table tbody tr:hover {
    background-color: var(--sidebar-hover, #f7fafc);
}

#moduleContent .view-all-table tbody tr:nth-child(even), .sigma-fullscreen-module-overlay .view-all-table tbody tr:nth-child(even) {
    background-color: color-mix(in srgb, var(--card-bg, #fff) 92%, var(--text-primary, #000));
}

#moduleContent .view-all-table tbody td, .sigma-fullscreen-module-overlay .view-all-table tbody td {
    padding: 4px 3px;
    text-align: center;
    border: 1px solid var(--border-color, #e2e8f0);
    color: var(--text-primary, #1a202c);
    background-color: var(--card-bg, #fff);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#moduleContent .view-all-table th,
#moduleContent .view-all-table td, .sigma-fullscreen-module-overlay .view-all-table th,
#moduleContent .view-all-table td {
    width: auto;
    min-width: auto;
}

#moduleContent .view-all-table thead tr th:nth-child(1),
#moduleContent .view-all-table tbody tr td:nth-child(1), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(1),
#moduleContent .view-all-table tbody tr td:nth-child(1) {
    width: 50px;
    min-width: 50px;
}

#moduleContent .view-all-table thead tr th:nth-child(2),
#moduleContent .view-all-table tbody tr td:nth-child(2), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(2),
#moduleContent .view-all-table tbody tr td:nth-child(2) {
    width: 0px;
}

#moduleContent .view-all-table thead tr th:nth-child(3),
#moduleContent .view-all-table tbody tr td:nth-child(3), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(3),
#moduleContent .view-all-table tbody tr td:nth-child(3) {
    width: 150px !important;
    min-width: 150px !important;
    display: table-cell !important;
    text-align: left !important;
    direction: ltr !important;
}

#moduleContent .view-all-table thead tr th:nth-child(4),
#moduleContent .view-all-table tbody tr td:nth-child(4), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(4),
#moduleContent .view-all-table tbody tr td:nth-child(4) {
    width: 100px;
    min-width: 100px;
}

#moduleContent .view-all-table thead tr th:nth-child(5),
#moduleContent .view-all-table tbody tr td:nth-child(5), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(5),
#moduleContent .view-all-table tbody tr td:nth-child(5) {
    width: 80px;
    min-width: 80px;
}

#moduleContent .view-all-table thead tr th:nth-child(6),
#moduleContent .view-all-table tbody tr td:nth-child(6), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(6),
#moduleContent .view-all-table tbody tr td:nth-child(6) {
    width: 80px;
    min-width: 80px;
}

#moduleContent .view-all-table thead tr th:nth-child(7),
#moduleContent .view-all-table tbody tr td:nth-child(7), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(7),
#moduleContent .view-all-table tbody tr td:nth-child(7) {
    width: 90px;
    min-width: 90px;
}

#moduleContent .view-all-table thead tr th:nth-child(8),
#moduleContent .view-all-table tbody tr td:nth-child(8), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(8),
#moduleContent .view-all-table tbody tr td:nth-child(8) {
    width: 120px;
    min-width: 120px;
}

#moduleContent .view-all-table thead tr th:nth-child(9),
#moduleContent .view-all-table tbody tr td:nth-child(9), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(9),
#moduleContent .view-all-table tbody tr td:nth-child(9) {
    width: 0px;
}

#moduleContent .view-all-table thead tr th:nth-child(10),
#moduleContent .view-all-table tbody tr td:nth-child(10), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(10),
#moduleContent .view-all-table tbody tr td:nth-child(10) {
    width: 120px;
    min-width: 120px;
}

#moduleContent .view-all-table thead tr th:nth-child(11),
#moduleContent .view-all-table tbody tr td:nth-child(11), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(11),
#moduleContent .view-all-table tbody tr td:nth-child(11) {
    width: 80px;
    min-width: 80px;
}

#moduleContent .view-all-table thead tr th:nth-child(12),
#moduleContent .view-all-table tbody tr td:nth-child(12), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(12),
#moduleContent .view-all-table tbody tr td:nth-child(12) {
    width: 80px;
    min-width: 80px;
}

#moduleContent .view-all-table thead tr th:nth-child(13),
#moduleContent .view-all-table tbody tr td:nth-child(13), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(13),
#moduleContent .view-all-table tbody tr td:nth-child(13) {
    width: 0px;
}

#moduleContent .view-all-table thead tr th:nth-child(14),
#moduleContent .view-all-table tbody tr td:nth-child(14), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(14),
#moduleContent .view-all-table tbody tr td:nth-child(14) {
    width: 80px;
    min-width: 80px;
}

#moduleContent .view-all-table thead tr th:nth-child(15),
#moduleContent .view-all-table tbody tr td:nth-child(15), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(15),
#moduleContent .view-all-table tbody tr td:nth-child(15) {
    width: 0px;
}

#moduleContent .view-all-table thead tr th:nth-child(16),
#moduleContent .view-all-table tbody tr td:nth-child(16), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(16),
#moduleContent .view-all-table tbody tr td:nth-child(16) {
    width: 110px;
    min-width: 110px;
}

#moduleContent .view-all-table thead tr th:nth-child(17),
#moduleContent .view-all-table tbody tr td:nth-child(17), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(17),
#moduleContent .view-all-table tbody tr td:nth-child(17) {
    width: 90px;
    min-width: 90px;
}

#moduleContent .view-all-table thead tr th:nth-child(18),
#moduleContent .view-all-table tbody tr td:nth-child(18), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(18),
#moduleContent .view-all-table tbody tr td:nth-child(18) {
    width: 0px;
}

#moduleContent .view-all-table thead tr th:nth-child(19),
#moduleContent .view-all-table tbody tr td:nth-child(19), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(19),
#moduleContent .view-all-table tbody tr td:nth-child(19) {
    width: 0px;
}

#moduleContent .view-all-table thead tr th:nth-child(20),
#moduleContent .view-all-table tbody tr td:nth-child(20), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(20),
#moduleContent .view-all-table tbody tr td:nth-child(20) {
    width: 0px;
}

#moduleContent .view-all-table thead tr th:nth-child(21),
#moduleContent .view-all-table tbody tr td:nth-child(21), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(21),
#moduleContent .view-all-table tbody tr td:nth-child(21) {
    width: 60px;
    min-width: 60px;
}

#moduleContent .view-all-table thead tr th:nth-child(22),
#moduleContent .view-all-table tbody tr td:nth-child(22), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(22),
#moduleContent .view-all-table tbody tr td:nth-child(22) {
    width: 80px;
    min-width: 80px;
}

#moduleContent .view-all-table thead tr th:nth-child(23),
#moduleContent .view-all-table tbody tr td:nth-child(23), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(23),
#moduleContent .view-all-table tbody tr td:nth-child(23) {
    width: 60px;
    min-width: 60px;
}

#moduleContent .view-all-table thead tr th:nth-child(24),
#moduleContent .view-all-table tbody tr td:nth-child(24), .sigma-fullscreen-module-overlay .view-all-table thead tr th:nth-child(24),
#moduleContent .view-all-table tbody tr td:nth-child(24) {
    width: 60px;
    min-width: 60px;
}

#moduleContent .view-all-table .col-hidden, .sigma-fullscreen-module-overlay .view-all-table .col-hidden {
    display: none !important;
}

#moduleContent .user-hidden, .sigma-fullscreen-module-overlay .user-hidden {
    display: none !important;
}

#moduleContent .view-all-actions, .sigma-fullscreen-module-overlay .view-all-actions {
    padding: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    /* لضمان ظهور القوائم المنسدلة فوق الجدول */
    z-index: 2000;
}

#moduleContent .view-all-btn, .sigma-fullscreen-module-overlay .view-all-btn {
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s;
    margin: 5px;
}

#moduleContent .view-all-btn-primary, .sigma-fullscreen-module-overlay .view-all-btn-primary {
    background-color: #4299e1;
    color: white;
}

#moduleContent .view-all-btn-primary:hover, .sigma-fullscreen-module-overlay .view-all-btn-primary:hover {
    background-color: #3182ce;
}

#moduleContent .view-all-btn-success, .sigma-fullscreen-module-overlay .view-all-btn-success {
    background-color: #48bb78;
    color: white;
}

#moduleContent .view-all-btn-success:hover, .sigma-fullscreen-module-overlay .view-all-btn-success:hover {
    background-color: #38a169;
}

#moduleContent .view-all-btn-danger, .sigma-fullscreen-module-overlay .view-all-btn-danger {
    background-color: #f56565;
    color: white;
}

#moduleContent .view-all-btn-danger:hover, .sigma-fullscreen-module-overlay .view-all-btn-danger:hover {
    background-color: #e53e3e;
}

#moduleContent .status-badge, .sigma-fullscreen-module-overlay .status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

#moduleContent .status-completed, .sigma-fullscreen-module-overlay .status-completed {
    background-color: var(--sigma-chip-success-bg, #c6f6d5);
    color: var(--sigma-chip-success-fg, #22543d) !important;
}

@media (max-width: 1400px) {
    #moduleContent .view-all-table, .sigma-fullscreen-module-overlay .view-all-table {
        min-width: auto;
        font-size: 13px;
    }

    #moduleContent .view-all-table thead th,
    #moduleContent .view-all-table tbody td, .sigma-fullscreen-module-overlay .view-all-table thead th,
    #moduleContent .view-all-table tbody td {
        padding: 8px 6px;
    }
}

@media (max-width: 1024px) {
    #moduleContent .view-all-container, .sigma-fullscreen-module-overlay .view-all-container {
        padding: 0 0 10px;
    }

    #moduleContent .view-all-header, .sigma-fullscreen-module-overlay .view-all-header {
        padding: 15px;
    }

    #moduleContent .view-all-header h1, .sigma-fullscreen-module-overlay .view-all-header h1 {
        font-size: 20px;
        margin-bottom: 8px;
    }

    #moduleContent .view-all-table-wrapper, .sigma-fullscreen-module-overlay .view-all-table-wrapper {
        padding: 15px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    #moduleContent .view-all-table, .sigma-fullscreen-module-overlay .view-all-table {
        min-width: auto;
        font-size: 12px;
    }

    #moduleContent .view-all-table thead th,
    #moduleContent .view-all-table tbody td, .sigma-fullscreen-module-overlay .view-all-table thead th,
    #moduleContent .view-all-table tbody td {
        padding: 6px 4px;
    }

    #moduleContent .view-all-btn, .sigma-fullscreen-module-overlay .view-all-btn {
        padding: 6px 12px;
        font-size: 12px;
    }
}

@media (max-width: 768px) {
    #moduleContent .view-all-container, .sigma-fullscreen-module-overlay .view-all-container {
        border-radius: 4px;
    }

    #moduleContent .view-all-header, .sigma-fullscreen-module-overlay .view-all-header {
        padding: 12px;
    }

    #moduleContent .view-all-header h1, .sigma-fullscreen-module-overlay .view-all-header h1 {
        font-size: 18px;
        margin-bottom: 5px;
    }

    #moduleContent .view-all-table-wrapper, .sigma-fullscreen-module-overlay .view-all-table-wrapper {
        padding: 10px;
    }

    #moduleContent .view-all-table, .sigma-fullscreen-module-overlay .view-all-table {
        min-width: auto;
        font-size: 11px;
    }

    #moduleContent .view-all-table thead th,
    #moduleContent .view-all-table tbody td, .sigma-fullscreen-module-overlay .view-all-table thead th,
    #moduleContent .view-all-table tbody td {
        padding: 5px 3px;
        border: 0.5px solid #e2e8f0;
    }

    #moduleContent .view-all-table thead th, .sigma-fullscreen-module-overlay .view-all-table thead th {
        white-space: normal;
        word-break: break-word;
    }

    #moduleContent .view-all-actions, .sigma-fullscreen-module-overlay .view-all-actions {
        padding: 10px;
        flex-direction: column;
        gap: 8px;
    }

    #moduleContent .view-all-btn, .sigma-fullscreen-module-overlay .view-all-btn {
        width: 100%;
        padding: 8px 12px;
        font-size: 11px;
    }

    #moduleContent .action-btn, .sigma-fullscreen-module-overlay .action-btn {
        padding: 4px 6px;
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    #moduleContent .view-all-container, .sigma-fullscreen-module-overlay .view-all-container {
        box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    }

    #moduleContent .view-all-header, .sigma-fullscreen-module-overlay .view-all-header {
        padding: 10px;
    }

    #moduleContent .view-all-header h1, .sigma-fullscreen-module-overlay .view-all-header h1 {
        font-size: 16px;
        margin-bottom: 5px;
    }

    #moduleContent .view-all-table-wrapper, .sigma-fullscreen-module-overlay .view-all-table-wrapper {
        padding: 8px;
    }

    #moduleContent .view-all-table, .sigma-fullscreen-module-overlay .view-all-table {
        min-width: auto;
        font-size: 10px;
    }

    #moduleContent .view-all-table thead th,
    #moduleContent .view-all-table tbody td, .sigma-fullscreen-module-overlay .view-all-table thead th,
    #moduleContent .view-all-table tbody td {
        padding: 4px 2px;
    }

    #moduleContent .view-all-btn, .sigma-fullscreen-module-overlay .view-all-btn {
        width: 100%;
        padding: 6px 10px;
        font-size: 10px;
        margin: 3px 0;
    }

    #moduleContent .action-btn, .sigma-fullscreen-module-overlay .action-btn {
        padding: 2px 4px;
        font-size: 9px;
    }

    #moduleContent .status-badge, .sigma-fullscreen-module-overlay .status-badge {
        padding: 2px 8px;
        font-size: 9px;
    }
}

#moduleContent .status-pending, .sigma-fullscreen-module-overlay .status-pending {
    background-color: var(--sigma-chip-warning-bg, #feebc8);
    color: var(--sigma-chip-warning-fg, #7c2d12) !important;
}

#moduleContent .status-cancelled, .sigma-fullscreen-module-overlay .status-cancelled {
    background-color: var(--sigma-chip-cancel-bg, #fed7d7);
    color: var(--sigma-chip-cancel-fg, #742a2a) !important;
}

#moduleContent .action-btn, .sigma-fullscreen-module-overlay .action-btn {
    padding: 3px 6px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 10px;
    font-weight: 600;
    transition: all 0.3s;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

#moduleContent .action-btn:hover, .sigma-fullscreen-module-overlay .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.4);
}

#moduleContent .loading, .sigma-fullscreen-module-overlay .loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

@media print {

    /* Hide Global UI */
    .sidebar,
    .header,
    #dashboardContent,
    .menu-toggle,
    .theme-toggle {
        display: none !important;
    }

    /* Reset Main Content Layout */
    .main-content {
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        height: auto !important;
    }

    #mainContent {
        padding: 0 !important;
        margin: 0 !important;
    }

    #moduleContent {
        display: block !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Hide View Specific UI */
    .view-all-header,
    .view-all-actions,
    .filter-menu,
    .filter-row {
        display: none !important;
    }

    /* Hide Action Column (1st column) */
    #moduleContent .view-all-table th:nth-child(1),
    #moduleContent .view-all-table td:nth-child(1), .sigma-fullscreen-module-overlay .view-all-table th:nth-child(1),
    #moduleContent .view-all-table td:nth-child(1) {
        display: none !important;
    }

    /* Table Adjustments for Print */
    .view-all-container {
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
    }

    .view-all-table-wrapper {
        overflow: visible !important;
    }

    .view-all-table {
        width: 100% !important;
        border-collapse: collapse !important;
    }

    .view-all-table th,
    .view-all-table td {
        border: 1px solid #000 !important;
        /* Better contrast for print */
        color: #000 !important;
        font-size: 10px !important;
        /* Smaller font to fit more columns */
        white-space: normal !important;
        /* Wrap text if needed */
        overflow: visible !important;
    }

    /* Ensure page breaks don't cut rows awkwardly */
    tr {
        page-break-inside: avoid;
    }

    /*
     * قائمة قطاع المحطات (22 عموداً): view_all يضبط عروضاً لجدول 24 عموداً فيُصفر أعمدة
     * بأرقام مختلفة عن هذا الجدول؛ فيُقصّ الميجر ونوع المحطة. إلغاء العرض الثابت للطباعة فقط.
     */
    #moduleContent .sector-stations-list-all #dataTable.view-all-table,
    #moduleContent .sector-stations-list-all #dataTable, .sigma-fullscreen-module-overlay .sector-stations-list-all #dataTable.view-all-table,
    #moduleContent .sector-stations-list-all #dataTable {
        table-layout: auto !important;
        width: 100% !important;
        max-width: none !important;
    }

    #moduleContent .sector-stations-list-all #dataTable.view-all-table thead tr th,
    #moduleContent .sector-stations-list-all #dataTable.view-all-table tbody tr td, .sigma-fullscreen-module-overlay .sector-stations-list-all #dataTable.view-all-table thead tr th,
    #moduleContent .sector-stations-list-all #dataTable.view-all-table tbody tr td {
        font-size: 9px !important;
        padding: 0 !important;
        line-height: 1 !important;
        width: auto !important;
        min-width: 0 !important;
        max-width: none !important;
        overflow: visible !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    #moduleContent .sector-stations-list-all #dataTable.view-all-table thead tr th:nth-child(21),
    #moduleContent .sector-stations-list-all #dataTable.view-all-table tbody tr td:nth-child(21), .sigma-fullscreen-module-overlay .sector-stations-list-all #dataTable.view-all-table thead tr th:nth-child(21),
    #moduleContent .sector-stations-list-all #dataTable.view-all-table tbody tr td:nth-child(21) {
        min-width: 11px !important;
        width: auto !important;
        display: table-cell !important;
        visibility: visible !important;
    }

    #moduleContent .sector-stations-list-all #dataTable.view-all-table thead tr th:nth-child(22),
    #moduleContent .sector-stations-list-all #dataTable.view-all-table tbody tr td:nth-child(22), .sigma-fullscreen-module-overlay .sector-stations-list-all #dataTable.view-all-table thead tr th:nth-child(22),
    #moduleContent .sector-stations-list-all #dataTable.view-all-table tbody tr td:nth-child(22) {
        width: 3.45% !important;
        min-width: 0 !important;
        max-width: 5% !important;
        font-size: 9px !important;
        display: table-cell !important;
        visibility: visible !important;
    }

    #moduleContent .sector-stations-list-all .view-all-table-wrapper, .sigma-fullscreen-module-overlay .sector-stations-list-all .view-all-table-wrapper {
        overflow: visible !important;
        max-width: none !important;
        zoom: 0.8 !important;
    }

    #moduleContent .sector-stations-list-all, .sigma-fullscreen-module-overlay .sector-stations-list-all {
        overflow: visible !important;
        max-width: none !important;
    }
}

/* --- Dark Mode Support --- */
html.dark-mode #moduleContent .view-all-container,
html.dark-mode .sigma-fullscreen-module-overlay .view-all-container,
body.dark-mode #moduleContent .view-all-container, .sigma-fullscreen-module-overlay .view-all-container {
    background-color: var(--card-bg, #1a202c);
    color: var(--text-primary, #e2e8f0);
}

html.dark-mode #moduleContent .view-all-actions,
html.dark-mode .sigma-fullscreen-module-overlay .view-all-actions,
body.dark-mode #moduleContent .view-all-actions, .sigma-fullscreen-module-overlay .view-all-actions {
    background-color: var(--header-bg, #1a202c);
    border-bottom-color: var(--border-color, #2d3748);
    color: var(--text-primary, #e2e8f0);
}

html.dark-mode #moduleContent .view-all-table,
html.dark-mode .sigma-fullscreen-module-overlay .view-all-table,
body.dark-mode #moduleContent .view-all-table, .sigma-fullscreen-module-overlay .view-all-table {
    color: var(--text-primary, #e2e8f0);
}

html.dark-mode #moduleContent .view-all-table tbody tr,
html.dark-mode .sigma-fullscreen-module-overlay .view-all-table tbody tr,
body.dark-mode #moduleContent .view-all-table tbody tr, .sigma-fullscreen-module-overlay .view-all-table tbody tr {
    background-color: var(--card-bg, #1a202c);
    color: var(--text-primary, #e2e8f0);
}

html.dark-mode #moduleContent .view-all-table tbody tr:hover,
html.dark-mode .sigma-fullscreen-module-overlay .view-all-table tbody tr:hover,
body.dark-mode #moduleContent .view-all-table tbody tr:hover, .sigma-fullscreen-module-overlay .view-all-table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

html.dark-mode #moduleContent .view-all-table td,
html.dark-mode .sigma-fullscreen-module-overlay .view-all-table td,
body.dark-mode #moduleContent .view-all-table td, .sigma-fullscreen-module-overlay .view-all-table td {
    border-color: var(--border-color, #2d3748);
    color: var(--text-primary, #e2e8f0);
    background-color: var(--card-bg, #1a202c);
}

html.dark-mode #moduleContent .filter-dropdown,
html.dark-mode .sigma-fullscreen-module-overlay .filter-dropdown,
body.dark-mode #moduleContent .filter-dropdown, .sigma-fullscreen-module-overlay .filter-dropdown {
    background-color: var(--card-bg, #1a202c);
    color: var(--text-primary, #e2e8f0);
    border-color: var(--border-color, #2d3748);
}

html.dark-mode #moduleContent .filter-search,
html.dark-mode .sigma-fullscreen-module-overlay .filter-search,
body.dark-mode #moduleContent .filter-search, .sigma-fullscreen-module-overlay .filter-search {
    background-color: var(--input-bg, #2d3748);
    color: var(--text-primary, #e2e8f0);
    border-color: var(--border-color, #4a5568);
}

html.dark-mode #moduleContent .filter-option label,
html.dark-mode .sigma-fullscreen-module-overlay .filter-option label,
html.dark-mode #moduleContent .filter-select-all-wrap,
html.dark-mode .sigma-fullscreen-module-overlay .filter-select-all-wrap,
body.dark-mode #moduleContent .filter-option label,
body.dark-mode .sigma-fullscreen-module-overlay .filter-option label,
body.dark-mode #moduleContent .filter-select-all-wrap,
body.dark-mode .sigma-fullscreen-module-overlay .filter-select-all-wrap {
    color: var(--text-primary, #e2e8f0);
}

html.dark-mode #moduleContent .view-all-table-wrapper,
html.dark-mode .sigma-fullscreen-module-overlay .view-all-table-wrapper,
body.dark-mode #moduleContent .view-all-table-wrapper, .sigma-fullscreen-module-overlay .view-all-table-wrapper {
    border-bottom-color: var(--border-color, #2d3748);
}

/* ── تغيير عرض الأعمدة بالماوس (عام) ── */
#moduleContent table thead th:not(.col-hidden),
.sigma-fullscreen-module-overlay table thead th:not(.col-hidden),
.activate-device-screen table thead th:not(.col-hidden) {
    position: relative;
}

.sigma-col-resize-handle {
    position: absolute;
    top: 0;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    z-index: 6;
    touch-action: none;
}

.sigma-col-resize-handle:hover,
body.sigma-table-col-resizing .sigma-col-resize-handle {
    background: rgba(37, 99, 235, 0.22);
}

body.sigma-table-col-resizing {
    cursor: col-resize !important;
    user-select: none !important;
}