
/* =========================================
   WATERFILL MONITORING - SCADA STYLE
   Theme: Silver Gray / White / Navy / Mustard
========================================= */

/* GLOBAL */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(135deg, #edf1f5, #e2e8ef);
    color: #263b50;
}


/* =========================================
   MAIN CONTAINER
========================================= */

.container {
    max-width: 1600px;
    min-height: 100vh;
    margin: auto;
    padding: 22px 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}


/* =========================================
   HEADER
========================================= */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    background: #ffffff;
    padding: 22px 28px;

    border: 1px solid #dce4ec;
    border-bottom: 4px solid #d8ad3b;
    border-radius: 14px;

    box-shadow: 0 5px 18px rgba(31, 55, 78, 0.07);
}

.eyebrow {
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.6px;
    color: #9aa7b4;
    margin-bottom: 7px;
}

.header h1 {
    font-size: 25px;
    color: #183d60;
    letter-spacing: 0.8px;
}

.header p {
    font-size: 10px;
    letter-spacing: 1.5px;
    color: #8998a7;
    margin-top: 7px;
}

.header-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.connection {
    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 11px;
    font-weight: bold;
    color: #718397;
}

.dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    border-radius: 50%;
}

.dot.online {
    background: #20a36a;
    box-shadow: 0 0 0 4px #e2f4eb;
}

.dot.offline {
    background: #dc4c4c;
    box-shadow: 0 0 0 4px #fbe8e8;
}

.clock {
    font-size: 20px;
    font-weight: bold;
    color: #244968;
    font-variant-numeric: tabular-nums;
}


/* =========================================
   GENERAL CARD
========================================= */

.card {
    background: #ffffff;
    border: 1px solid #dce4ec;
    border-radius: 13px;

    padding: 20px;

    box-shadow: 0 5px 17px rgba(31, 55, 78, 0.055);

    transition: 0.2s ease;
    min-width: 0;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 55, 78, 0.09);
}

.card h3 {
    text-align: center;
    font-size: 12px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #60778c;
    margin-bottom: 15px;
}


/* =========================================
   TOP SECTION
========================================= */

.top-section {
    display: grid;
    grid-template-columns: 1fr 1fr 1.35fr;
    gap: 18px;
}


/* =========================================
   GAUGE
========================================= */

.gauge {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.gauge canvas {
    width: 100% !important;
    height: 175px !important;
}

.gauge-caption {
    text-align: center;
    font-size: 11px;
    color: #91a0ad;
    margin-top: 3px;
}


/* =========================================
   EQUIPMENT STATUS
========================================= */

.status-card {
    display: flex;
    flex-direction: column;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 8px 0 16px;
}

.status-box {
    padding: 14px 7px;
    min-height: 76px;

    border-radius: 10px;

    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 9px;

    background: #eef2f5;
    color: #738496;
    text-align: center;
}

.status-box span {
    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.status-box strong {
    font-size: 13px;
}

.status-box.good {
    background: #e4f5ec;
    color: #168351;
}

.status-box.bad {
    background: #fde9e9;
    color: #c83f3f;
    animation: blink 1.2s infinite;
}

.status-box.unknown {
    background: #eef2f5;
    color: #788797;
}

@keyframes blink {
    50% {
        opacity: 0.55;
    }
}


/* =========================================
   INFORMATION ROW
========================================= */

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 12px;
    padding: 10px 2px;

    border-top: 1px solid #edf0f3;

    font-size: 11px;
    color: #8997a5;
}

.info-row strong {
    color: #35536d;
    text-align: right;
}


/* =========================================
   MIDDLE SECTION
========================================= */

.middle-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.metric-card {
    min-height: 140px;
    border-top: 3px solid #d8ad3b;
}

.metric-card h3 {
    text-align: left;
    font-size: 10px;
    color: #8493a1;
}

.metric-note {
    text-align: center;
    color: #9aa6b2;
    font-size: 10px;
    margin-top: 9px;
}


/* =========================================
   MODE
========================================= */

.mode-box {
    max-width: 190px;
    margin: 16px auto 0;

    padding: 12px 20px;

    border-radius: 22px;

    text-align: center;
    font-size: 17px;
    font-weight: bold;

    background: #edf1f5;
    color: #718096;
}

.mode-box.good {
    background: #e4f5ec;
    color: #168351;
}

.mode-box.manual {
    background: #fff3d8;
    color: #a87912;
}

.mode-box.unknown {
    background: #edf1f5;
    color: #718096;
}


/* =========================================
   FUEL AND DISTANCE
========================================= */

.metric-value {
    font-size: 36px;
    font-weight: bold;
    color: #1d466a;

    text-align: center;
    margin: 14px 0 8px;

    font-variant-numeric: tabular-nums;
}

.metric-value small {
    font-size: 12px;
    color: #8c9aa8;
    margin-left: 5px;
}


/* FUEL BAR */

.progress {
    width: 100%;
    height: 7px;

    background: #edf0f3;

    border-radius: 8px;
    overflow: hidden;
}

.progress div {
    width: 0%;
    height: 100%;

    background: #d8ad3b;
    border-radius: 8px;

    transition: width 0.4s ease;
}


/* =========================================
   COMMUNICATION SECTION
========================================= */

.communication-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.communication-card {
    padding: 17px 20px;
}

.communication-card span:first-child {
    display: block;

    font-size: 9px;
    font-weight: bold;
    letter-spacing: 0.8px;

    color: #8998a6;
}

.communication-card strong {
    display: inline-block;

    margin-top: 10px;

    font-size: 23px;
    color: #244b6c;
}

.communication-card small {
    font-size: 10px;
    color: #91a0ad;
    margin-left: 3px;
}


/* =========================================
   HISTORY SECTION
========================================= */

.history-section {
    margin-top: 5px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 15px;
    margin: 0 2px 15px;
}

.history-header h2 {
    font-size: 15px;
    letter-spacing: 0.8px;
    color: #244663;
}

.history-header p {
    font-size: 11px;
    color: #8c9aa8;
    margin-top: 5px;
}


/* =========================================
   DATE FILTER
========================================= */

.filter-area {
    display: flex;
    align-items: center;
    gap: 9px;

    font-size: 11px;
    color: #788a9a;
}

.filter-area input {
    padding: 9px 10px;

    border: 1px solid #d6e0e8;
    border-radius: 7px;

    background: #ffffff;
    color: #35536d;

    font-family: Arial, sans-serif;
}

.filter-area button {
    border: none;
    border-radius: 7px;

    padding: 10px 14px;

    background: #214b70;
    color: #ffffff;

    font-size: 10px;
    font-weight: bold;

    cursor: pointer;
    transition: 0.2s;
}

.filter-area button:hover {
    background: #163a5c;
}


/* =========================================
   BOTTOM SECTION - CHARTS
========================================= */

.bottom-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.chart {
    min-height: 310px;
}

.chart h3 {
    text-align: left;
    font-size: 12px;
    color: #526a80;
    margin-bottom: 16px;
}

.chart canvas {
    width: 100% !important;
    height: 240px !important;
}


/* =========================================
   FOOTER
========================================= */

footer {
    text-align: center;

    padding: 15px;

    color: #94a1ad;

    font-size: 9px;
    letter-spacing: 1.2px;
}

footer span {
    color: #d8ad3b;
}


/* =========================================
   RESPONSIVE TABLET
========================================= */

@media (max-width: 1050px) {

    .top-section {
        grid-template-columns: 1fr 1fr;
    }

    .status-card {
        grid-column: span 2;
    }

    .middle-section,
    .communication-section {
        grid-template-columns: repeat(2, 1fr);
    }

}


/* =========================================
   RESPONSIVE MOBILE
========================================= */

@media (max-width: 650px) {

    .container {
        padding: 12px;
        gap: 15px;
    }

    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
        padding: 18px;
    }

    .header h1 {
        font-size: 19px;
    }

    .header-right {
        align-items: flex-start;
    }

    .top-section,
    .middle-section,
    .communication-section,
    .bottom-section {
        grid-template-columns: 1fr;
    }

    .status-card {
        grid-column: auto;
    }

    .history-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .filter-area {
        flex-wrap: wrap;
    }

    .chart {
        min-height: 280px;
    }

    .chart canvas {
        height: 220px !important;
    }

}
