/* =============================================================================
   BALANCE DAY AHEAD DK GRAPHS
   ============================================================================= */

.dashboard-container-balance-day-ahead-dk {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    padding: 0.5rem;
    max-width: none;
}

.graph-container-balance-day-ahead-dk {
    flex: 0 0 calc(25% - 0.5rem); 
    min-width: 250px;
    background: linear-gradient(135deg, #161b22 0%, #21262d 100%);
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 0.25rem;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
    position: relative;
}

.graph-container-balance-day-ahead-dk canvas {
    width: 100% !important;
    height: 400px !important;
}

@media (max-width: 1200px) {
    .graph-container-balance-day-ahead-dk {
        flex: 0 0 calc(33.333% - 0.5rem); 
    }
}

@media (max-width: 900px) {
    .graph-container-balance-day-ahead-dk {
        flex: 0 0 calc(50% - 0.5rem);
    }
}

@media (max-width: 600px) {
    .graph-container-balance-day-ahead-dk {
        flex: 0 0 100%;
    }
}

/* Table Styles */
.fundamentals-table-balance-day-ahead-dk,
.capacity-minus-flow-balance-day-ahead-dk,
.auction-results-table-balance-day-ahead-dk {
    margin: 5px 0;
    padding: 20px;
    background: rgba(22, 27, 34, 0.8);
    border-radius: 8px;
    border: 1px solid #30363d;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

.table-header h3 {
    color: #c9d1d9;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.table-timestamp {
    color: #8b949e;
    font-size: 12px;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.fundamentals-table,
.capacity-flow-table,
.auction-results-table {
    width: 100%;
    border-collapse: collapse;
    color: #c9d1d9;
    font-size: 13px;
}

.fundamentals-table th,
.capacity-flow-table th,
.auction-results-table th {
    background: #21262d;
    color: #f0f6fc;
    padding: 12px 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #30363d;
    position: sticky;
    top: 0;
    z-index: 10;
    font-size: 16px;
}

.fundamentals-table td,
.capacity-flow-table td,
.auction-results-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #21262d;
    font-size: 16px;
}

.table-row:hover {
    background: rgba(56, 139, 253, 0.1);
}

.table-row.surplus {
    border-left: 3px solid #238636;
}

.table-row.deficit {
    border-left: 3px solid #da3633;
}

.net-balance.surplus {
    color: #238636;
    font-weight: 600;
}

.net-balance.deficit {
    color: #da3633;
    font-weight: 600;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.surplus {
    background: rgba(35, 134, 54, 0.2);
    color: #238636;
    border: 1px solid #238636;
}

.status-badge.deficit {
    background: rgba(218, 54, 51, 0.2);
    color: #da3633;
    border: 1px solid #da3633;
}

.flow-value.export {
    color: #238636;
}

.flow-value.import {
    color: #da3633;
}

.utilization.high {
    color: #da3633;
    font-weight: 600;
}

.utilization.medium {
    color: #d29922;
    font-weight: 600;
}

.utilization.low {
    color: #238636;
    font-weight: 600;
}

.table-error {
    color: #f85149;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

/* Responsive design for tables */
@media (max-width: 1200px) {
    .fundamentals-table,
    .capacity-flow-table,
    .auction-results-table {
        font-size: 12px;
    }
    
    .fundamentals-table th,
    .capacity-flow-table th,
    .auction-results-table th,
    .fundamentals-table td,
    .capacity-flow-table td,
    .auction-results-table td {
        padding: 8px 6px;
    }
}

.tables-section-balance-day-ahead-dk {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.table-row-balance-day-ahead-dk {
    width: 100%;
}

/* Additional table styling that matches your existing theme */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #30363d;
}

.table-header h3 {
    color: #c9d1d9;
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.table-timestamp {
    color: #8b949e;
    font-size: 12px;
}

.table-wrapper {
    overflow-x: auto;
    max-height: 400px;
    overflow-y: auto;
}

.table-error {
    color: #f85149;
    text-align: center;
    padding: 20px;
    font-style: italic;
}

.bg-red { 
    background-color: #ff4d4f; 
    color: black; 
}

.bg-yellow { 
    background-color: #ffd666; 
    color: black; 
}

.bg-green {
    background-color: #73d13d; 
    color: black; 
}

/* Fullscreen mode styling */
.graph-container-balance-day-ahead-dk.fullscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999;
    background: #0d1117;
    border-radius: 0;
    padding: 20px;
    flex: none !important;
    min-width: unset !important;
    max-width: unset !important;
    min-height: unset !important;
    max-height: unset !important;
    box-sizing: border-box;
}

.graph-container-balance-day-ahead-dk.fullscreen canvas {
    width: calc(100vw - 40px) !important;
    height: calc(100vh - 80px) !important;
    min-height: calc(100vh - 80px) !important;
    max-height: calc(100vh - 80px) !important;
    max-width: calc(100vw - 40px) !important;
}

.graph-container-balance-day-ahead-dk.fullscreen .fullscreen-btn {
    top: 25px;
    right: 25px;
    width: 32px;
    height: 32px;
    font-size: 16px;
    z-index: 10000;
    background: rgba(255, 255, 255, 0.15);
}

.graph-container-balance-day-ahead-dk{
    position: relative;
    width: 100%;
    height: 400px; 
}




