/* Layout styling matching alert_testing */
.dashboard-container-nlumm {
    display: flex;
    flex-direction: column;
    width: 100vw;
    min-height: 80vh;
    box-sizing: border-box;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

/* Filter Container Styling */
#filter-container-nlumm {
    background: linear-gradient(135deg, #202020 0%, #3f3f3f 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 20px 24px;
    margin: 10px 10px 20px 10px;
    color: #ffffff;
}

.filter-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.filter-header h2 {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 600;
    color: #ffffff;
}

#clear-filters-btn {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

#clear-filters-btn:hover {
    background: linear-gradient(135deg, #c0392b 0%, #a93226 100%);
    box-shadow: 0 4px 12px rgba(231, 76, 60, 0.3);
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filter-item label {
    font-size: 0.9rem;
    font-weight: 500;
    color: #e0e0e0;
}

.filter-select,
.filter-input {
    background: linear-gradient(135deg, #2d2d2d 0%, #3a3a3a 100%);
    color: #ffffff;
    border: 1px solid #555;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.filter-select:hover,
.filter-input:hover {
    border-color: #777;
}

.filter-select option {
    background: #2d2d2d;
    color: #ffffff;
}

#tables-container-nlumm {
    width: 100%;
    padding: 10px 10px 10px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    gap: 15px;
}

.region-table-container-nlumm {
    background: linear-gradient(135deg, #202020 0%, #3f3f3f 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 18px 24px;
    margin-bottom: 0;
    color: #ffffff;
}

.region-table-container-nlumm h3 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: 0.02em;
}

.region-table-container-nlumm table {
    width: 100%;
    border-collapse: collapse;
    background: linear-gradient(135deg, #202020 0%, #3f3f3f 100%);
    color: #ffffff;
    font-size: 0.75rem;
    table-layout: auto;
}

.region-table-container-nlumm th, 
.region-table-container-nlumm td {
    padding: 5px 8px;
    border-bottom: 1px solid #000000;
    text-align: left;
    min-height: 32px;
    height: 32px;
    vertical-align: middle;
    box-sizing: border-box;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}

.region-table-container-nlumm th {
    background: #000000;
    font-weight: 500;
    color: #ffffff;
}

.region-table-container-nlumm td {
    border-bottom: #f1f3f6 1px solid;
    border-right: #f1f3f6 1px solid;
}

.region-table-container-nlumm tr:last-child td {
    border-bottom: none;
}

.region-table-container-nlumm td.loading,
.region-table-container-nlumm td.error {
    text-align: center;
    color: #888;
    font-style: italic;
}

.region-table-container-nlumm tr:hover {
    background: #4d4d4d;
}

.region-table-container-nlumm td {
    transition: background 0.2s;
}

.region-table-container-nlumm td[style*="opacity: 1"] {
    color: #ffffff !important;
}

/* Expand/Collapse styling */
.expand-cell.nl-planned,
.expand-cell.nl-unplanned {
    background: rgba(52, 152, 219, 0.2) !important;
    font-weight: bold;
    user-select: none;
}

.expand-cell:hover {
    background: rgba(52, 152, 219, 0.35) !important;
}

.expand-icon {
    display: inline-block;
    transition: transform 0.2s;
    color: #3498db;
    font-size: 1rem;
    font-weight: bold;
}

/* Older version rows styling - must override planned/unplanned colors */
.grouped-row-older {
    background: rgba(74, 166, 203, 0.7) !important;
    opacity: 1;
}

.grouped-row-older:hover {
    background: rgba(74, 166, 203, 0.8) !important;
    opacity: 1;
}

.grouped-row-older.nl-planned,
.grouped-row-older.nl-unplanned {
    background: rgba(74, 166, 203, 0.7) !important;
}

.grouped-row-older.nl-planned:hover,
.grouped-row-older.nl-unplanned:hover {
    background: rgba(74, 166, 203, 0.8) !important;
}

.older-version td {
    font-style: italic;
    color: #ffffff !important;
}

.nl-planned {
    background: #3c3835 !important;
    color: #fff !important;
    transition: background 0.2s;
}

.nl-planned:hover {
    background: #44403e !important;
}

.nl-unplanned {
    background: #e8463eff !important;
    color: #fff !important;
    transition: background 0.2s;
}

.nl-unplanned:hover {
    background: #b22c22 !important;
}

.table-scroll {
    height: 370px;
    overflow-y: auto;
    border-radius: 8px;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.table-scroll::-webkit-scrollbar {
    width: 10px;
    background: #232323;
}

.table-scroll::-webkit-scrollbar-thumb {
    background: #6e6e6e;
    border-radius: 8px;
    border: 2px solid #232323;
}

.table-scroll::-webkit-scrollbar-thumb:hover {
    background: #666;
}

.table-scroll {
    scrollbar-color: #6c6c6c #232323;
    scrollbar-width: thin;
}

.cell-preview-popup {
    position: fixed;
    z-index: 9999;
    max-width: 600px;
    min-width: 220px;
    padding: 18px 24px;
    background: #222;
    color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.25);
    font-size: 1.08rem;
    line-height: 1.5;
    pointer-events: none;
    white-space: pre-line;
    word-break: break-word;
    opacity: 0.98;
    transition: opacity 0.15s;
}

@media (max-width: 900px) {
    #tables-container-nlumm {
        max-width: 100vw;
        padding: 8px;
    }
    .dashboard-container-nlumm {
        flex-direction: column;
    }
}

.dashboard-container-nlumm::after {
    display: none !important;
    content: none !important;
}

/* Graphs Container Styling */
.graph-section-nlumm {
    background: linear-gradient(135deg, #202020 0%, #3f3f3f 100%);
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    padding: 18px 24px;
    margin: 10px 10px 20px 10px;
    color: #ffffff;
}

.graph-section-nlumm h2 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 15px 0;
    padding-left: 0;
}

#unit-graphs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.graph-container-deltas-day {
    background: linear-gradient(135deg, #161b22 0%, #21262d 100%);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: transform 0.2s, box-shadow 0.2s;
}

.graph-container-deltas-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}

.graph-container-deltas-day canvas {
    width: 100% !important;
    height: 400px !important;
    max-height: 400px !important;
}

@media (max-width: 1200px) {
    #unit-graphs-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    #unit-graphs-grid {
        grid-template-columns: 1fr;
    }
    
    .graph-container-deltas-day canvas {
        height: 300px !important;
        max-height: 300px !important;
    }
}