/* --- RESIZABLE GRID LAYOUT --- */
.sensor-dashboard {
    display: grid;
    width: 100%;
    height: 100%;
    padding: 10px;
    box-sizing: border-box; /* CRITICAL: Prevents padding from pushing bounds */
    gap: 0;
    grid-template-columns: 250px 5px 1fr 5px 300px;
    grid-template-rows: minmax(0, 1fr); /* CRITICAL: Locks the height so it never stretches */
    grid-template-areas:
        "left resizer1 center resizer2 right";
}

.dashboard-col-left { grid-area: left; padding-right: 5px; }

/* NEW: The split bottom areas */
.dashboard-row-bottom-center { grid-area: bottom-center; }
.dashboard-row-bottom-right { grid-area: bottom-right; padding-left: 5px; }

/* --- PANELS --- */
.panel {
    background-color: #fff;
    border: 1px solid #dcdcdc;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    height: 100%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.panel-header {
    background: #2c3e50; 
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
    border-bottom: 1px solid #34495e;
    flex-shrink: 0;
}

.panel-body, .panel-body-viewer {
    flex-grow: 1;
    overflow-y: auto; 
    position: relative;
    background-color: #fff;
}

/* --- HORIZONTAL RESIZERS --- */
.resizer {
    background-color: #e0e0e0;
    cursor: col-resize;
    z-index: 10;
}
.resizer:hover { background-color: #00b300; }
#resizer-left { grid-area: resizer1; }
#resizer-right { grid-area: resizer2; }

/* --- VERTICAL PLOT RESIZER --- */
.resize-handle-top {
    height: 10px;
    width: 100%;
    background-color: #ecf0f1;
    border-top: 1px solid #dcdcdc;
    border-bottom: 1px solid #dcdcdc;
    cursor: row-resize;
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    transition: background-color 0.2s;
}

.resize-handle-top:hover {
    background-color: #3498db;
}

#plotContentArea {
    flex-grow: 1;
    overflow-y: auto; 
    padding: 15px;
    background-color: #fdfdfd;
}