/* =========================================================
   AIR QUALITY MONITORING - GLOBAL STYLE
   SDN PURWAKARTA KOTA CILEGON
========================================================= */

:root {
    --navy: #061b3a;
    --navy-light: #0b2b55;

    --blue: #1769ff;
    --blue-dark: #0e56db;
    --blue-soft: #eef5ff;

    --green: #0aa84f;
    --green-soft: #eefaf3;

    --orange: #ff7600;
    --orange-soft: #fff6eb;

    --red: #ef2626;
    --red-soft: #fff1f1;

    --purple: #6236ff;
    --purple-soft: #f5f1ff;

    --text: #0b1f3a;
    --text-soft: #60708a;

    --background: #f7f9fc;
    --white: #ffffff;
    --border: #e6eaf0;

    --shadow:
        0 10px 35px rgba(11, 31, 58, 0.08);

    --radius: 18px;
}


/* =========================================================
   RESET
========================================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family:
        Inter,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);

    line-height: 1.6;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

button,
input,
select {
    font: inherit;
}


/* =========================================================
   CONTAINER
========================================================= */

.container {
    width: min(1180px, 92%);
    margin-inline: auto;
}


/* =========================================================
   NAVBAR
========================================================= */

.navbar {
    background:
        linear-gradient(90deg,
            #04152e 0%,
            #071e41 50%,
            #04152e 100%);

    color: white;

    position: sticky;
    top: 0;
    z-index: 1000;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.12);
}

.navbar-container {
    min-height: 76px;

    width: min(1450px, 94%);
    margin-inline: auto;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;

    font-weight: 750;
    font-size: 21px;

    white-space: nowrap;
}

.brand-icon {
    width: 38px;
    height: 38px;

    border-radius: 12px;

    display: grid;
    place-items: center;

    background:
        rgba(10, 168, 79, 0.14);

    font-size: 22px;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-link {
    padding: 11px 17px;

    border-radius: 9px;

    font-size: 15px;
    font-weight: 550;

    transition: 0.2s ease;
}

.nav-link:hover {
    background:
        rgba(255, 255, 255, 0.08);
}

.nav-link.active {
    background:
        linear-gradient(135deg,
            #1769ff,
            #0e56db);

    box-shadow:
        0 6px 18px rgba(23, 105, 255, 0.32);
}

.system-online {
    display: flex;
    align-items: center;
    gap: 8px;

    font-size: 14px;
    font-weight: 600;

    color: #29e879;

    white-space: nowrap;
}

.online-dot {
    width: 10px;
    height: 10px;

    display: inline-block;

    border-radius: 50%;

    background: #14cf61;

    box-shadow:
        0 0 0 4px rgba(20, 207, 97, 0.13);
}


/* =========================================================
   HERO
========================================================= */

.hero {
    padding:
        80px 0 70px;

    background:
        radial-gradient(circle at 85% 20%,
            rgba(23, 105, 255, 0.13),
            transparent 30%),
        radial-gradient(circle at 10% 80%,
            rgba(10, 168, 79, 0.09),
            transparent 30%),
        linear-gradient(180deg,
            #ffffff 0%,
            #f7faff 100%);

    border-bottom:
        1px solid var(--border);
}

.hero-content {
    display: grid;

    grid-template-columns:
        1.35fr 0.65fr;

    align-items: center;

    gap: 60px;
}

.hero-badge {
    display: inline-flex;

    padding: 8px 13px;

    border-radius: 999px;

    color: var(--blue);
    background: var(--blue-soft);

    font-weight: 700;
    font-size: 13px;

    margin-bottom: 18px;
}

.hero h1 {
    font-size:
        clamp(38px, 5vw, 62px);

    line-height: 1.12;

    letter-spacing: -1.5px;

    margin-bottom: 20px;

    max-width: 760px;
}

.hero h1 span {
    display: block;

    color: var(--blue);

    margin-top: 8px;
}

.hero-text>p {
    max-width: 720px;

    color: var(--text-soft);

    font-size: 17px;
}

.hero-actions {
    margin-top: 30px;

    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}


/* =========================================================
   BUTTON
========================================================= */

.btn {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 13px 22px;

    min-height: 48px;

    border-radius: 11px;

    font-weight: 700;
    font-size: 14px;

    cursor: pointer;

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    color: white;

    background:
        linear-gradient(135deg,
            var(--blue),
            var(--blue-dark));

    box-shadow:
        0 10px 24px rgba(23, 105, 255, 0.23);
}

.btn-secondary {
    background: white;

    border:
        1px solid var(--border);

    color: var(--text);

    box-shadow:
        0 6px 16px rgba(0, 0, 0, 0.04);
}


/* =========================================================
   HERO STATUS CARD
========================================================= */

.hero-status-card {
    background:
        rgba(255, 255, 255, 0.95);

    border:
        1px solid var(--border);

    border-radius:
        22px;

    padding:
        28px;

    box-shadow:
        var(--shadow);
}

.status-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-bottom: 18px;
}

.small-label {
    color: var(--text-soft);

    font-size: 12px;
    font-weight: 750;

    letter-spacing: 0.6px;
}

.status-card-header h2 {
    margin-top: 5px;

    font-size: 34px;

    color: var(--green);
}

.status-icon {
    width: 68px;
    height: 68px;

    border-radius: 50%;

    display: grid;
    place-items: center;

    font-size: 34px;
    font-weight: 900;
}

.status-good {
    background: var(--green-soft);
    color: var(--green);
}

.status-description {
    color: var(--text-soft);

    margin-bottom: 25px;
}

.last-update {
    display: flex;
    flex-direction: column;

    gap: 5px;

    padding-top: 18px;

    border-top:
        1px solid var(--border);

    font-size: 13px;
}

.last-update span {
    color: var(--text-soft);
}


/* =========================================================
   GENERAL SECTION
========================================================= */

.section {
    padding: 75px 0;
}

.section-light {
    background: white;

    border-top:
        1px solid var(--border);

    border-bottom:
        1px solid var(--border);
}

.section-heading {
    display: flex;

    justify-content: space-between;
    align-items: flex-end;

    gap: 30px;

    margin-bottom: 35px;
}

.section-heading.center {
    justify-content: center;
    text-align: center;
}

.section-heading h2 {
    margin-top: 5px;

    font-size:
        clamp(28px, 4vw, 38px);

    letter-spacing: -0.6px;
}

.section-heading>p {
    max-width: 500px;

    color: var(--text-soft);
}

.section-label {
    color: var(--blue);

    font-size: 12px;
    font-weight: 800;

    letter-spacing: 1px;
}


/* =========================================================
   PARAMETER CARDS
========================================================= */

.parameter-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 18px;
}

.parameter-card {
    min-height: 210px;

    background: white;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    padding:
        24px;

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.parameter-card:hover {
    transform:
        translateY(-4px);

    box-shadow:
        var(--shadow);
}

.parameter-icon {
    width: 52px;
    height: 52px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    margin-bottom: 20px;

    font-size: 28px;
}

.parameter-name {
    display: block;

    font-size: 13px;

    color: var(--text-soft);

    margin-bottom: 2px;
}

.parameter-info strong {
    display: block;

    font-size: 20px;

    margin-bottom: 10px;
}

.parameter-info p {
    color: var(--text-soft);

    font-size: 14px;
}

.co2-card .parameter-icon {
    background: var(--green-soft);
    color: var(--green);
}

.pm-card .parameter-icon {
    background: var(--purple-soft);
    color: var(--purple);
}

.temperature-card .parameter-icon {
    background: var(--orange-soft);
    color: var(--orange);
}

.humidity-card .parameter-icon {
    background: var(--blue-soft);
    color: var(--blue);
}


/* =========================================================
   STATUS CATEGORY
========================================================= */

.status-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}

.category-card {
    padding: 28px;

    border-radius:
        var(--radius);

    background: white;

    border:
        1px solid var(--border);

    text-align: center;

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.category-symbol {
    width: 60px;
    height: 60px;

    border-radius: 50%;

    margin:
        0 auto 15px;

    display: grid;
    place-items: center;

    font-size: 30px;
    font-weight: 900;
}

.category-card h3 {
    margin-bottom: 8px;

    font-size: 21px;
}

.category-card p {
    color: var(--text-soft);

    font-size: 14px;
}

.category-good {
    border-color:
        rgba(10, 168, 79, 0.25);
}

.category-good .category-symbol {
    background: var(--green-soft);
    color: var(--green);
}

.category-good h3 {
    color: var(--green);
}

.category-warning {
    border-color:
        rgba(255, 118, 0, 0.25);
}

.category-warning .category-symbol {
    background: var(--orange-soft);
    color: var(--orange);
}

.category-warning h3 {
    color: var(--orange);
}

.category-danger {
    border-color:
        rgba(239, 38, 38, 0.25);
}

.category-danger .category-symbol {
    background: var(--red-soft);
    color: var(--red);
}

.category-danger h3 {
    color: var(--red);
}


/* =========================================================
   WORKFLOW
========================================================= */

.workflow {
    display: grid;

    grid-template-columns:
        1fr auto 1fr auto 1fr auto 1fr;

    align-items: stretch;

    gap: 15px;
}

.workflow-item {
    padding: 25px 20px;

    background: white;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    text-align: center;
}

.workflow-number {
    width: 42px;
    height: 42px;

    margin:
        0 auto 14px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    color: white;

    background:
        linear-gradient(135deg,
            var(--blue),
            var(--blue-dark));

    font-weight: 850;
}

.workflow-item h3 {
    margin-bottom: 8px;
}

.workflow-item p {
    color: var(--text-soft);

    font-size: 14px;
}

.workflow-arrow {
    align-self: center;

    color: var(--blue);

    font-size: 28px;
    font-weight: 800;
}


/* =========================================================
   INFO PANEL
========================================================= */

.info-panel {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 40px;

    padding:
        35px;

    border-radius:
        22px;

    background:
        linear-gradient(135deg,
            #f2f7ff,
            #f7fff9);

    border:
        1px solid #dfe9f7;
}

.info-panel-content {
    max-width: 750px;
}

.info-panel h2 {
    margin:
        6px 0 12px;

    font-size:
        clamp(27px, 4vw, 37px);
}

.info-panel p {
    color: var(--text-soft);
}


/* =========================================================
   FOOTER
========================================================= */

.footer {
    background:
        var(--navy);

    color: white;

    padding:
        32px 0;
}

.footer-content {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 25px;
}

.footer strong {
    font-size: 17px;
}

.footer p {
    color:
        rgba(255, 255, 255, 0.62);

    font-size: 13px;
    margin-top: 4px;
}

.footer-system {
    display: flex;
    align-items: center;

    gap: 10px;

    color:
        rgba(255, 255, 255, 0.75);

    font-size: 13px;
}


/* =========================================================
   RESPONSIVE TABLET
========================================================= */

@media (max-width: 1050px) {

    .navbar-container {
        flex-wrap: wrap;

        padding:
            15px 0;
    }

    .nav-menu {
        order: 3;

        width: 100%;

        justify-content: center;

        overflow-x: auto;

        padding-bottom: 2px;
    }

    .hero-content {
        grid-template-columns:
            1fr;
    }

    .parameter-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .workflow {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .workflow-arrow {
        display: none;
    }
}


/* =========================================================
   RESPONSIVE MOBILE
========================================================= */

@media (max-width: 700px) {

    .navbar-container {
        justify-content: center;
    }

    .brand {
        width: 100%;

        justify-content: center;
    }

    .system-online {
        width: 100%;

        justify-content: center;
    }

    .nav-menu {
        justify-content: flex-start;
    }

    .nav-link {
        padding:
            9px 12px;

        white-space: nowrap;
    }

    .hero {
        padding:
            55px 0;
    }

    .hero-content {
        gap: 35px;
    }

    .hero h1 {
        font-size: 37px;
    }

    .section {
        padding:
            55px 0;
    }

    .section-heading {
        flex-direction: column;

        align-items: flex-start;
    }

    .parameter-grid,
    .status-grid,
    .workflow {
        grid-template-columns:
            1fr;
    }

    .info-panel {
        flex-direction: column;

        align-items: flex-start;
    }

    .footer-content {
        flex-direction: column;

        align-items: flex-start;
    }
}


/* =========================================================
   VERY SMALL MOBILE
========================================================= */

@media (max-width: 430px) {

    .container {
        width: 90%;
    }

    .hero h1 {
        font-size: 31px;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-status-card {
        padding: 22px;
    }
}

/* =========================================================
   DASHBOARD PAGE
========================================================= */

.dashboard-page {
    padding: 55px 0 70px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 30px;
    margin-bottom: 32px;
}

.dashboard-header h1 {
    margin-top: 5px;
    font-size: clamp(30px, 4vw, 42px);
}

.dashboard-header p {
    margin-top: 8px;
    color: var(--text-soft);
}

.dashboard-header-info {
    display: flex;
    align-items: center;
    gap: 18px;
}

.time-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    text-align: right;
}

.time-info span {
    font-size: 12px;
    color: var(--text-soft);
}

.time-info strong {
    font-size: 15px;
}


/* =========================================================
   SENSOR CARDS
========================================================= */

.sensor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 24px;
}

.sensor-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: 0 7px 24px rgba(11, 31, 58, 0.05);
}

.sensor-card-top {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sensor-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 25px;
}

.sensor-title {
    display: block;
    font-weight: 800;
    font-size: 17px;
}

.sensor-card small {
    color: var(--text-soft);
}

.sensor-value {
    display: flex;
    align-items: baseline;
    gap: 7px;
    margin: 28px 0 18px;
}

.sensor-value strong {
    font-size: 42px;
    line-height: 1;
}

.sensor-value span {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-soft);
}

.sensor-status {
    padding: 9px 12px;
    border-radius: 9px;
    text-align: center;
    font-size: 14px;
    font-weight: 750;
}

.sensor-range {
    margin-top: 14px;
    text-align: center;
    color: var(--text-soft);
    font-size: 12px;
}

.status-loading {
    background: #f3f5f8;
    color: #6d7888;
}

.status-good {
    background: var(--green-soft);
    color: var(--green);
}

.status-warning {
    background: var(--orange-soft);
    color: var(--orange);
}

.status-danger {
    background: var(--red-soft);
    color: var(--red);
}


/* COLOR PER SENSOR */

.sensor-co2 {
    border-top: 3px solid var(--green);
}

.sensor-co2 .sensor-icon {
    background: var(--green-soft);
    color: var(--green);
}

.sensor-co2 .sensor-value strong {
    color: var(--green);
}

.sensor-pm25 {
    border-top: 3px solid var(--purple);
}

.sensor-pm25 .sensor-icon {
    background: var(--purple-soft);
    color: var(--purple);
}

.sensor-pm25 .sensor-value strong {
    color: var(--purple);
}

.sensor-temperature {
    border-top: 3px solid var(--orange);
}

.sensor-temperature .sensor-icon {
    background: var(--orange-soft);
    color: var(--orange);
}

.sensor-temperature .sensor-value strong {
    color: var(--orange);
}

.sensor-humidity {
    border-top: 3px solid var(--blue);
}

.sensor-humidity .sensor-icon {
    background: var(--blue-soft);
    color: var(--blue);
}

.sensor-humidity .sensor-value strong {
    color: var(--blue);
}


/* =========================================================
   DASHBOARD PANELS
========================================================= */

.dashboard-bottom-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
}

.dashboard-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: 0 7px 24px rgba(11, 31, 58, 0.05);
}

.panel-header {
    margin-bottom: 22px;
}

.panel-header h2 {
    margin-top: 4px;
    font-size: 23px;
}

.overall-status-wrapper {
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 20px;
    border-radius: 14px;
    background: #f8fafc;
}

.overall-status-icon {
    width: 72px;
    height: 72px;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #edf1f5;
    font-size: 34px;
    font-weight: 900;
    color: var(--text-soft);
}

.overall-status-wrapper h3 {
    margin: 4px 0;
    font-size: 27px;
}

.overall-status-wrapper p {
    color: var(--text-soft);
    font-size: 14px;
}

.status-category-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 20px;
}

.mini-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.mini-status strong,
.mini-status small {
    display: block;
}

.mini-status small {
    margin-top: 2px;
    color: var(--text-soft);
    font-size: 11px;
}

.mini-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mini-good .mini-dot {
    background: var(--green);
}

.mini-warning .mini-dot {
    background: var(--orange);
}

.mini-danger .mini-dot {
    background: var(--red);
}


/* =========================================================
   SYSTEM DETAILS
========================================================= */

.system-detail-list {
    display: flex;
    flex-direction: column;
}

.system-detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}

.system-detail-row:last-child {
    border-bottom: none;
}

.system-detail-row span {
    color: var(--text-soft);
    font-size: 13px;
}

.system-detail-row strong {
    max-width: 58%;
    text-align: right;
    font-size: 13px;
}


/* =========================================================
   UPDATE INFO
========================================================= */

.dashboard-update-info {
    margin-top: 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 25px;

    padding: 18px 22px;

    border: 1px solid #dce8ff;
    border-radius: 14px;

    background: var(--blue-soft);
}

.dashboard-update-info strong {
    color: var(--blue);
}

.dashboard-update-info p {
    margin-top: 3px;
    color: var(--text-soft);
    font-size: 13px;
}

.update-badge {
    display: flex;
    align-items: center;
    gap: 9px;

    white-space: nowrap;

    font-size: 13px;
    font-weight: 700;
    color: var(--green);
}


/* =========================================================
   DASHBOARD RESPONSIVE
========================================================= */

@media (max-width: 1050px) {

    .sensor-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-bottom-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {

    .dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header-info {
        width: 100%;
        justify-content: space-between;
    }

    .time-info {
        text-align: left;
    }

    .sensor-grid {
        grid-template-columns: 1fr;
    }

    .status-category-row {
        grid-template-columns: 1fr;
    }

    .dashboard-update-info {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (max-width: 430px) {

    .dashboard-header-info {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-header-info .btn {
        width: 100%;
    }

    .sensor-value strong {
        font-size: 36px;
    }

    .overall-status-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* =========================================================
   GRAFIK PAGE
========================================================= */

.chart-period {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.chart-period label {
    font-size: 12px;
    color: var(--text-soft);
    font-weight: 700;
}

.chart-period select {
    min-width: 150px;

    padding: 11px 14px;

    border: 1px solid var(--border);
    border-radius: 10px;

    background: white;
    color: var(--text);

    outline: none;
    cursor: pointer;
}

.chart-period select:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(23, 105, 255, 0.10);
}


/* =========================================================
   SUMMARY GRAFIK
========================================================= */

.chart-summary-grid {
    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 16px;

    margin-bottom: 24px;
}

.chart-summary-card {
    background: white;

    border:
        1px solid var(--border);

    border-radius:
        14px;

    padding:
        19px 20px;

    box-shadow:
        0 6px 20px rgba(11, 31, 58, 0.04);
}

.chart-summary-card span {
    display: block;

    color: var(--text-soft);

    font-size: 12px;

    margin-bottom: 6px;
}

.chart-summary-card strong {
    display: block;

    font-size: 16px;

    word-break: break-word;
}


/* =========================================================
   CHART CARD
========================================================= */

.chart-card {
    margin-bottom: 22px;

    background: white;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    padding:
        25px;

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.chart-card-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.chart-card-header h2 {
    margin-top: 4px;

    font-size: 23px;
}

.chart-card-header>strong {
    padding: 7px 11px;

    border-radius: 8px;

    background: var(--blue-soft);

    color: var(--blue);

    font-size: 12px;
}


/* =========================================================
   CHART CONTAINER
========================================================= */

.chart-container {
    position: relative;

    width: 100%;
    height: 330px;

    padding-top: 8px;
}


/* =========================================================
   WARNA IDENTITAS PER GRAFIK
========================================================= */

.chart-card:has(#co2-chart) {
    border-top:
        3px solid var(--green);
}

.chart-card:has(#pm25-chart) {
    border-top:
        3px solid var(--purple);
}

.chart-card:has(#temperature-chart) {
    border-top:
        3px solid var(--orange);
}

.chart-card:has(#humidity-chart) {
    border-top:
        3px solid var(--blue);
}


/* =========================================================
   RESPONSIVE GRAFIK
========================================================= */

@media (max-width: 1050px) {

    .chart-summary-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

    .chart-container {
        height: 300px;
    }
}

@media (max-width: 700px) {

    .chart-period {
        width: 100%;
    }

    .chart-period select {
        width: 100%;
    }

    .chart-summary-grid {
        grid-template-columns:
            1fr;
    }

    .chart-container {
        height: 270px;
    }

    .chart-card {
        padding: 18px;
    }

    .chart-card-header {
        align-items: flex-start;
    }
}

/* =========================================================
   RIWAYAT PAGE
========================================================= */

.history-filter-panel {
    display: flex;
    align-items: flex-end;
    gap: 18px;
    flex-wrap: wrap;

    margin-bottom: 22px;

    padding: 22px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}


/* =========================================================
   FILTER
========================================================= */

.history-filter-group {
    display: flex;
    flex-direction: column;
    gap: 7px;

    min-width: 190px;
}

.history-filter-group label {
    font-size: 12px;
    font-weight: 700;
    color: var(--text-soft);
}

.history-filter-group input,
.history-filter-group select {
    height: 45px;

    padding: 0 13px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    background: white;

    color: var(--text);

    outline: none;
}

.history-filter-group input:focus,
.history-filter-group select:focus {
    border-color:
        var(--blue);

    box-shadow:
        0 0 0 3px rgba(23, 105, 255, 0.10);
}

.history-filter-actions {
    margin-left: auto;

    display: flex;
    gap: 10px;
}


/* =========================================================
   TABLE PANEL
========================================================= */

.history-table-panel {
    background: white;

    border:
        1px solid var(--border);

    border-radius:
        var(--radius);

    padding: 22px;

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}


/* =========================================================
   TABLE HEADER
========================================================= */

.history-table-header {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 18px;
}

.history-table-header strong {
    font-size: 15px;
}

.history-search input {
    width: 260px;
    height: 42px;

    padding: 0 14px;

    border:
        1px solid var(--border);

    border-radius: 10px;

    outline: none;
}

.history-search input:focus {
    border-color:
        var(--blue);

    box-shadow:
        0 0 0 3px rgba(23, 105, 255, 0.10);
}


/* =========================================================
   RESPONSIVE TABLE CONTAINER
========================================================= */

.table-responsive {
    width: 100%;

    overflow-x: auto;

    border:
        1px solid var(--border);

    border-radius: 12px;
}


/* =========================================================
   TABLE
========================================================= */

.history-table {
    width: 100%;

    min-width: 1000px;

    border-collapse: collapse;

    background: white;
}

.history-table thead {
    background:
        #f7f9fc;
}

.history-table th {
    padding:
        13px 14px;

    text-align: left;

    font-size: 12px;
    font-weight: 800;

    color: var(--text);

    border-bottom:
        1px solid var(--border);

    white-space: nowrap;
}

.history-table th small {
    display: block;

    margin-top: 2px;

    color:
        var(--text-soft);

    font-size: 10px;
    font-weight: 500;
}

.history-table td {
    padding:
        13px 14px;

    font-size: 12px;

    border-bottom:
        1px solid var(--border);

    white-space: nowrap;
}

.history-table tbody tr:last-child td {
    border-bottom: none;
}

.history-table tbody tr:hover {
    background:
        #fafcff;
}

.history-time {
    color:
        var(--text-soft);
}


/* =========================================================
   STATUS BADGE
========================================================= */

.history-status-badge {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    min-width: 78px;

    padding:
        5px 9px;

    border-radius:
        999px;

    font-size: 11px;
    font-weight: 750;
}

.history-status-good {
    background:
        var(--green-soft);

    color:
        var(--green);
}

.history-status-warning {
    background:
        var(--orange-soft);

    color:
        var(--orange);
}

.history-status-danger {
    background:
        var(--red-soft);

    color:
        var(--red);
}


/* =========================================================
   BUZZER STATUS
========================================================= */

.buzzer-active {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    color:
        var(--red);

    font-weight: 700;
}

.buzzer-inactive {
    display: inline-flex;
    align-items: center;

    gap: 5px;

    color:
        var(--green);

    font-weight: 700;
}


/* =========================================================
   EMPTY DATA
========================================================= */

.history-empty {
    padding: 35px !important;

    text-align: center !important;

    color:
        var(--text-soft);
}


/* =========================================================
   PAGINATION
========================================================= */

.history-pagination {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    margin-top: 18px;

    color:
        var(--text-soft);

    font-size: 12px;
}

.pagination-controls {
    display: flex;

    align-items: center;

    gap: 8px;
}

.pagination-controls button {
    width: 38px;
    height: 38px;

    display: grid;
    place-items: center;

    border:
        1px solid var(--border);

    border-radius: 9px;

    background: white;

    color:
        var(--text);

    cursor: pointer;

    font-size: 20px;
}

.pagination-controls button:hover:not(:disabled) {
    border-color:
        var(--blue);

    color:
        var(--blue);
}

.pagination-controls button:disabled {
    opacity: 0.4;

    cursor:
        not-allowed;
}

#page-number {
    min-width: 65px;

    padding:
        8px 12px;

    border-radius: 9px;

    background:
        var(--blue-soft);

    color:
        var(--blue);

    text-align: center;

    font-weight: 750;
}


/* =========================================================
   RIWAYAT RESPONSIVE
========================================================= */

@media (max-width: 800px) {

    .history-filter-panel {
        align-items:
            stretch;
    }

    .history-filter-group {
        width: 100%;
    }

    .history-filter-actions {
        width: 100%;

        margin-left: 0;
    }

    .history-filter-actions .btn {
        flex: 1;
    }

    .history-table-header {
        flex-direction: column;

        align-items: stretch;
    }

    .history-search input {
        width: 100%;
    }

    .history-pagination {
        flex-direction: column;

        align-items: flex-start;
    }
}

/* =========================================================
   STATUS PAGE
========================================================= */

.status-page-time {
    display: flex;
    flex-direction: column;
    gap: 5px;

    text-align: right;
}

.status-page-time span {
    color: var(--text-soft);
    font-size: 12px;
}

.status-page-time strong {
    font-size: 13px;
}


/* =========================================================
   STATUS SENSOR GRID
========================================================= */

.status-sensor-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;

    margin-bottom: 22px;
}

.status-sensor-card {
    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    padding: 22px;

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.status-sensor-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.status-sensor-heading strong {
    display: block;
    font-size: 16px;
}

.status-sensor-heading span {
    display: block;

    margin-top: 3px;

    color: var(--text-soft);
    font-size: 11px;
}

.status-sensor-icon {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    border-radius: 13px;

    font-size: 23px;
}

.status-sensor-value {
    display: flex;
    align-items: baseline;
    gap: 7px;

    margin: 24px 0 17px;
}

.status-sensor-value strong {
    font-size: 37px;
    line-height: 1;
}

.status-sensor-value span {
    color: var(--text-soft);

    font-size: 13px;
    font-weight: 700;
}


/* CO2 */

.status-co2-card {
    border-top: 3px solid var(--green);
}

.status-co2-card .status-sensor-icon {
    background: var(--green-soft);
    color: var(--green);
}

.status-co2-card .status-sensor-value strong {
    color: var(--green);
}


/* PM2.5 */

.status-pm25-card {
    border-top: 3px solid var(--purple);
}

.status-pm25-card .status-sensor-icon {
    background: var(--purple-soft);
    color: var(--purple);
}

.status-pm25-card .status-sensor-value strong {
    color: var(--purple);
}


/* SUHU */

.status-temperature-card {
    border-top: 3px solid var(--orange);
}

.status-temperature-card .status-sensor-icon {
    background: var(--orange-soft);
    color: var(--orange);
}

.status-temperature-card .status-sensor-value strong {
    color: var(--orange);
}


/* KELEMBAPAN */

.status-humidity-card {
    border-top: 3px solid var(--blue);
}

.status-humidity-card .status-sensor-icon {
    background: var(--blue-soft);
    color: var(--blue);
}

.status-humidity-card .status-sensor-value strong {
    color: var(--blue);
}


/* =========================================================
   STATUS KESELURUHAN
========================================================= */

.status-overall-panel {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;

    gap: 22px;

    padding: 25px;

    margin-bottom: 22px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.status-overall-icon {
    width: 76px;
    height: 76px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: #f0f3f7;

    color: var(--text-soft);

    font-size: 34px;
    font-weight: 900;
}

.status-overall-content span {
    color: var(--text-soft);

    font-size: 11px;
    font-weight: 700;
}

.status-overall-content h2 {
    margin: 5px 0;

    font-size: 28px;
}

.status-overall-content p {
    color: var(--text-soft);

    font-size: 13px;
}

.status-buzzer-box {
    min-width: 170px;

    padding: 16px 18px;

    border-radius: 12px;

    background: #f8fafc;

    text-align: center;
}

.status-buzzer-box span {
    display: block;

    margin-bottom: 5px;

    color: var(--text-soft);

    font-size: 11px;
}

.status-buzzer-box strong {
    font-size: 14px;
}


/* =========================================================
   THRESHOLD CARD
========================================================= */

.threshold-card {
    margin-bottom: 20px;

    padding: 24px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.threshold-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 20px;
}

.threshold-header h2 {
    margin-top: 4px;

    font-size: 22px;
}

.threshold-header>strong {
    padding: 7px 11px;

    border-radius: 8px;

    background: var(--blue-soft);

    color: var(--blue);

    font-size: 12px;
}

.threshold-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 14px;
}

.threshold-item {
    display: flex;
    align-items: center;

    gap: 13px;

    padding: 17px;

    border-radius: 12px;
    border: 1px solid var(--border);
}

.threshold-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 50%;

    font-size: 20px;
    font-weight: 900;
}

.threshold-item strong {
    display: block;

    margin-bottom: 3px;
}

.threshold-item p {
    font-size: 13px;
}


/* BAIK */

.threshold-good {
    background: var(--green-soft);
    border-color: #ccefd9;
}

.threshold-good .threshold-icon {
    background: white;
    color: var(--green);
}

.threshold-good strong,
.threshold-good p {
    color: var(--green);
}


/* WASPADA */

.threshold-warning {
    background: var(--orange-soft);
    border-color: #ffe0be;
}

.threshold-warning .threshold-icon {
    background: white;
    color: var(--orange);
}

.threshold-warning strong,
.threshold-warning p {
    color: var(--orange);
}


/* BAHAYA */

.threshold-danger {
    background: var(--red-soft);
    border-color: #ffd0d0;
}

.threshold-danger .threshold-icon {
    background: white;
    color: var(--red);
}

.threshold-danger strong,
.threshold-danger p {
    color: var(--red);
}


/* =========================================================
   RESPONSIVE STATUS
========================================================= */

@media (max-width: 1050px) {

    .status-sensor-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 750px) {

    .status-page-time {
        text-align: left;
    }

    .status-overall-panel {
        grid-template-columns: 1fr;
    }

    .status-buzzer-box {
        text-align: left;
    }

    .threshold-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 550px) {

    .status-sensor-grid {
        grid-template-columns: 1fr;
    }

    .status-sensor-value strong {
        font-size: 33px;
    }
}

/* =========================================================
   TENTANG PAGE
========================================================= */

.about-intro-panel {
    display: flex;
    align-items: flex-start;
    gap: 22px;

    margin-bottom: 22px;

    padding: 26px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.about-intro-icon {
    width: 58px;
    height: 58px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 16px;

    background: var(--blue-soft);
    color: var(--blue);

    font-size: 27px;
    font-weight: 900;
}

.about-intro-panel h2 {
    margin-bottom: 10px;

    font-size: 24px;
}

.about-intro-panel p {
    margin-bottom: 8px;

    color: var(--text-soft);

    font-size: 14px;
    line-height: 1.7;
}


/* =========================================================
   ABOUT GRID
========================================================= */

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);

    gap: 18px;

    margin-bottom: 22px;
}

.about-card {
    padding: 24px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.about-card-icon {
    width: 49px;
    height: 49px;

    display: grid;
    place-items: center;

    margin-bottom: 16px;

    border-radius: 13px;

    background: var(--blue-soft);

    font-size: 23px;
}

.about-card h3 {
    margin-bottom: 7px;

    font-size: 18px;
}

.about-card>p {
    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.6;
}

.about-list {
    margin-top: 17px;

    padding-left: 20px;
}

.about-list li {
    margin: 8px 0;

    color: var(--text-soft);

    font-size: 13px;
}


/* =========================================================
   ABOUT SECTION PANEL
========================================================= */

.about-section-panel {
    margin-bottom: 22px;

    padding: 25px;

    background: white;

    border: 1px solid var(--border);
    border-radius: var(--radius);

    box-shadow:
        0 7px 24px rgba(11, 31, 58, 0.05);
}

.about-section-header {
    margin-bottom: 20px;
}

.about-section-header h2 {
    margin-top: 4px;

    font-size: 23px;
}


/* =========================================================
   SYSTEM FLOW
========================================================= */

.system-flow {
    display: flex;
    align-items: stretch;
    justify-content: center;

    gap: 12px;
}

.flow-box {
    min-width: 135px;
    flex: 1;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 5px;

    padding: 18px;

    text-align: center;

    background: #f8fafc;

    border: 1px solid var(--border);
    border-radius: 12px;
}

.flow-box strong {
    color: var(--blue);

    font-size: 14px;
}

.flow-box span {
    color: var(--text-soft);

    font-size: 11px;
}

.flow-arrow {
    display: grid;
    place-items: center;

    color: var(--blue);

    font-size: 25px;
    font-weight: 800;
}


/* =========================================================
   PURPOSE
========================================================= */

.about-purpose-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    gap: 15px;
}

.purpose-item {
    display: flex;
    align-items: flex-start;

    gap: 14px;

    padding: 18px;

    background: #f8fafc;

    border: 1px solid var(--border);
    border-radius: 12px;
}

.purpose-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: grid;
    place-items: center;

    border-radius: 11px;

    background: var(--blue-soft);

    font-size: 20px;
}

.purpose-item strong {
    display: block;

    margin-bottom: 5px;
}

.purpose-item p {
    color: var(--text-soft);

    font-size: 12px;
    line-height: 1.6;
}


/* =========================================================
   TECHNICAL INFORMATION
========================================================= */

.about-technical-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);

    column-gap: 35px;
}

.technical-row {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 13px 0;

    border-bottom: 1px solid var(--border);
}

.technical-row span {
    color: var(--text-soft);

    font-size: 12px;
}

.technical-row strong {
    text-align: right;

    font-size: 12px;
}


/* =========================================================
   FEATURE GRID
========================================================= */

.about-feature-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);

    gap: 12px;
}

.about-feature {
    padding: 15px;

    border-radius: 10px;

    background: var(--green-soft);

    color: var(--green);

    font-size: 12px;
    font-weight: 700;
}


/* =========================================================
   RESPONSIVE TENTANG
========================================================= */

@media (max-width: 1050px) {

    .about-grid {
        grid-template-columns: 1fr;
    }

    .system-flow {
        flex-direction: column;
    }

    .flow-arrow {
        transform: rotate(90deg);
    }

    .about-feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


@media (max-width: 700px) {

    .about-intro-panel {
        flex-direction: column;
    }

    .about-purpose-grid {
        grid-template-columns: 1fr;
    }

    .about-technical-grid {
        grid-template-columns: 1fr;
    }

    .about-feature-grid {
        grid-template-columns: 1fr;
    }
}