﻿body {
    background: #f4f7fb;
    font-family: "Segoe UI", Arial, sans-serif;
    color: #263238;
}

.dashboard-container {
    padding: 20px;
}

/* =========================
        HEADER
        ========================= */

.dashboard-header {
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    background: linear-gradient(135deg, #0d47a1, #1976d2);
    border-radius: 12px;
    padding: 20px 24px;
    color: white;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,.08);
}

    .dashboard-header h3 {
        margin: 0;
        font-weight: 600;
    }

    .dashboard-header .subtitle {
        margin-top: 5px;
        opacity: .85;
        font-size: 13px;
    }

.monitor-time {
    text-align: right;
    font-size: 13px;
}


/* =========================
        SECTION
        ========================= */

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e3f2fd;
    color: #1976d2;
}

.section-title h5 {
    margin: 0;
    font-weight: 600;
    color: #263238;
}



.metric-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}


.metric-card {
    background: #fff;
    border-radius: 10px;
    padding: 12px 11px;
    min-width: 0;
    height: 145px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e7ebf0;
    box-shadow: 0 2px 8px rgba(0,0,0,.04);
    transition: all .2s ease;
}


    .metric-card:before {
        content: "";
        position: absolute;
        left: 0;
        top: 0;
        width: 4px;
        height: 100%;
        background: var(--metric-color);
    }


    .metric-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(0,0,0,.08);
    }


/* TOP */

.metric-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
}


.metric-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--metric-color);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


.metric-icon {
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 8px;
    background: var(--metric-bg);
    color: var(--metric-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
}


/* VALUE */

.metric-value {
    font-size: 23px;
    line-height: 1;
    font-weight: 700;
    margin-top: 18px;
    color: #263238;
    white-space: nowrap;
}


.metric-unit {
    display: block;
    font-size: 10px;
    color: #78909c;
    margin-top: 5px;
}


/* STATUS */

.metric-status {
    position: absolute;
    bottom: 12px;
    left: 11px;
}


.status-good {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


    .status-good i {
        font-size: 6px;
    }

.status-mid {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #f3f1a5;
    color: #f4b400;
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


    .status-mid i {
        font-size: 6px;
    }


.status-bad {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #875656;
    color: #ff0000;
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


    .status-bad i {
        font-size: 6px;
    }

.status-running {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 20px;
    padding: 3px 8px;
    font-size: 10px;
    font-weight: 600;
    white-space: nowrap;
}


    .status-running i {
        font-size: 6px;
    }

/* =========================
        FLOW CARD
        ========================= */

.flow-value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 15px;
}

.flow-arrow {
    font-size: 18px;
}


/* =========================
        STATUS LEGEND
        ========================= */

.status-legend {
    background: #fff;
    padding: 12px 15px;
    border-radius: 10px;
    border: 1px solid #e7ebf0;
    margin-top: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 12px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.legend-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
}

.dot-green {
    background: #2e9d50;
}

.dot-yellow {
    background: #f4b400;
}

.dot-red {
    background: #e53935;
}

.dot-gray {
    background: #78909c;
}

.dot-blue {
    background: #1976d2;
}


/* =========================
        CHART CARD
        ========================= */

.chart-card {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,.03);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.chart-title {
    font-size: 14px;
    font-weight: 700;
    color: #37474f;
}

.chart-label {
    font-size: 11px;
    color: #90a4ae;
}

.chart-container {
    height: 190px;
}


/* =========================
        TIME FILTER
        ========================= */

.time-filter {
    display: flex;
    gap: 5px;
}

    .time-filter button {
        border: 1px solid #dce3ea;
        background: white;
        color: #607d8b;
        border-radius: 6px;
        padding: 6px 12px;
        font-size: 11px;
    }

        .time-filter button.active {
            background: #1976d2;
            color: white;
            border-color: #1976d2;
        }


/* =========================
        DOCUMENT CARD
        ========================= */

.document-card {
    background: #fff;
    border: 1px solid #e7ebf0;
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,.03);
}

.document-header {
    padding: 15px 17px;
    border-bottom: 1px solid #edf0f3;
    display: flex;
    align-items: center;
    gap: 10px;
}

.document-header-icon {
    width: 35px;
    height: 35px;
    border-radius: 9px;
    background: #fff3e0;
    color: #ef6c00;
    display: flex;
    justify-content: center;
    align-items: center;
}

.document-header h6 {
    margin: 0;
    font-weight: 600;
    font-size: 14px;
}

.document-table {
    width: 100%;
    margin: 0;
    font-size: 12px;
}

    .document-table thead th {
        background: #f8fafc;
        color: #607d8b;
        font-weight: 600;
        border-bottom: 1px solid #e7ebf0;
        padding: 10px;
        white-space: nowrap;
    }

    .document-table tbody td {
        padding: 10px;
        border-top: 1px solid #f0f2f5;
        vertical-align: middle;
    }

    .document-table tbody tr:hover {
        background: #f8fbff;
    }

.pdf-button {
    border: none;
    background: #ffebee;
    color: #d32f2f;
    border-radius: 6px;
    padding: 5px 8px;
    cursor: pointer;
}

    .pdf-button:hover {
        background: #ffcdd2;
    }

.view-more {
    padding: 10px 15px;
    border-top: 1px solid #edf0f3;
    text-align: center;
}

    .view-more a {
        font-size: 12px;
        color: #1976d2;
        font-weight: 600;
    }


/* =========================
    RESPONSIVE
    ========================= */

@media (max-width: 1400px) {

    .metric-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}


@media (max-width: 992px) {

    .metric-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


@media (max-width: 768px) {

    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


@media (max-width: 480px) {

    .metric-grid {
        grid-template-columns: 1fr;
    }
}
