/* --- Layout Overrides --- */
@media (min-width: 900px) {
    .module-layout {
        grid-template-columns: 280px 1fr !important; 
        gap: 2rem !important;
    }
}

/* --- Canvas Container --- */
.canvas-container {
    position: relative;
    width: 100%;
    height: 550px; 
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.02);
    overflow: hidden;
    cursor: default; 
}

canvas {
    display: block;
    width: 100%;
    height: 100%;
}

/* --- Sidebar Styling --- */
.data-sidebar {
    height: 550px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
    padding-top: 2rem;
    gap: 1.5rem;
    background: transparent !important;
    backdrop-filter: none !important;
    border: none !important;
    box-shadow: none !important;
}

.data-card {
    background: rgba(255,255,255,0.92);
    padding: 1rem 1.2rem; 
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.8);
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    backdrop-filter: blur(8px);
}

.data-card h3 {
    margin: 0 0 0.8rem 0;
    font-size: 1rem; 
    color: var(--primary);
    border-bottom: 2px solid rgba(59, 89, 152, 0.1);
    padding-bottom: 0.4rem;
}

/* Stacked Data Row Style */
.data-stack {
    display: flex;
    flex-direction: column;
    margin-bottom: 0.5rem; /* Reduced margin to fit gauge */
}

.data-label {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 2px;
}

.data-val {
    align-self: flex-end; 
    font-family: 'Roboto Mono', monospace;
    font-weight: 600;
    color: var(--text-main);
    font-size: 1.1rem; 
}

/* Gauge Bar */
.bar-track {
    width: 100%;
    height: 8px;
    background: rgba(0,0,0,0.05);
    border-radius: 99px;
    overflow: hidden;
    margin-top: 4px;
}

.bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    background: #ffa502;
    transition: width 0.1s linear;
}

/* --- Controls --- */
.ui-layer {
    position: absolute;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 10;
    pointer-events: none;
}

.panel-bottom {
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    
    box-shadow: 0 -4px 15px rgba(0,0,0,0.05);
    border-top: 1px solid rgba(255,255,255,0.8);
    
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.control-column {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.4rem;
}

.slider-col { flex-grow: 1; }

.slider-header {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 500;
}

.val-display {
    font-family: 'Roboto Mono', monospace;
    color: var(--text-main);
    font-size: 0.85rem;
}

.panel-divider {
    width: 1px;
    height: 45px;
    background: rgba(0,0,0,0.1);
}

input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    appearance: none;
    height: 6px; 
    background: #cbd5e0;
    border-radius: 3px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15); 
    transition: transform 0.1s;
}

input[type=range]::-webkit-slider-thumb:hover { transform: scale(1.15); }