/* ====================================================
   TRANGCHU.CSS - CSS riêng cho trang chủ (Dashboard)
   ==================================================== */

/* --- Dashboard Container - Chia 2 cột Trái/Phải --- */
.dashboard-container {
    flex: 1;
    display: flex;
    flex-direction: row;
    gap: 15px;
    padding: 15px 20px;
    min-height: 0;
}

/* Bố cục cột trái */
.left-panel {
    flex: 7;
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 12px;
}

/* Bố cục cột phải */
.right-panel {
    flex: 3;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* --- Card 2: Biểu đồ (Ép nhỏ lại) --- */
.charts-card {
    flex: 0 0 260px;
    /* Khóa cứng chiều cao biểu đồ cho nhỏ lại */
}

.charts-wrapper {
    display: flex;
    gap: 15px;
    flex: 1;
    min-height: 0;
}

.chart-box {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.chart-title {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    margin-bottom: 5px;
    flex-shrink: 0;
}

.chart-container {
    flex: 1;
    position: relative;
    min-height: 0;
}

/* --- Card 3: Thông số (Cho to lên) --- */
.params-card {
    flex: 1;
    /* Chiếm hết khoảng trống còn lại */
    display: flex;
    flex-direction: column;
}

/* Cấu trúc Grid cân bằng hoàn hảo: Hàng 1 (3 ô Điện áp), Hàng 2 (4 ô Dòng điện) */
.params-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    flex: 1;
    padding-top: 10px;
}

.params-row-voltage {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    flex: 1;
}

.params-row-current {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    flex: 1;
}

.param-box {
    background: linear-gradient(145deg, #ffffff 0%, #f3f8f5 100%);
    border: 1px solid rgba(0, 230, 118, 0.25);
    border-radius: 12px;
    padding: 16px 12px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(13, 45, 30, 0.05);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.param-box:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 230, 118, 0.15);
    border-color: rgba(0, 230, 118, 0.6);
}

.param-label {
    font-size: 11.5px;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 0.8px;
}

.param-value {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-dark);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    font-variant-numeric: tabular-nums;
}

/* --- Card 4: Sơ đồ (Cột phải) --- */
.diagram-card {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.diagram-placeholder {
    flex: 1;
    border: 1px dashed #ccc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f9f9f9;
    color: #888;
    font-size: 14px;
    text-align: center;
    padding: 20px;
    gap: 15px;
}

.diagram-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
