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

:root {
    --bg: #f5f7fb;
    --sidebar: #111827;
    --sidebar-hover: #1f2937;
    --card: #ffffff;

    --text: #111827;
    --muted: #6b7280;
    --border: #e5e7eb;

    --primary: #f59e0b;
    --primary-dark: #d97706;

    --green: #10b981;
    --red: #ef4444;

    --shadow:
        0 4px 20px rgba(15, 23, 42, 0.05);
}

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

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

.app {
    min-height: 100vh;
    display: flex;
}


/* =========================
   SIDEBAR
========================= */

.sidebar {
    width: 250px;
    background: var(--sidebar);
    color: white;

    display: flex;
    flex-direction: column;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    padding: 25px 16px;
}

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

    padding: 5px 10px 30px;
}

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

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

    background: rgba(245, 158, 11, 0.15);

    border-radius: 12px;

    font-size: 23px;
}

.brand h2 {
    font-size: 17px;
    font-weight: 700;
}

.brand span {
    color: #9ca3af;
    font-size: 11px;
}

.navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 13px;

    padding: 12px 14px;

    color: #9ca3af;
    text-decoration: none;

    border-radius: 9px;

    font-size: 14px;

    transition: 0.2s;
}

.nav-item:hover {
    background: var(--sidebar-hover);
    color: white;
}

.nav-item.active {
    background: rgba(245, 158, 11, 0.14);
    color: #fbbf24;
}

.nav-icon {
    width: 20px;
    text-align: center;
    font-size: 17px;
}

.sidebar-bottom {
    margin-top: auto;

    padding: 15px 12px;

    border-top: 1px solid #1f2937;
}

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

    font-size: 12px;
    margin-bottom: 6px;
}

.sidebar-bottom small {
    color: #6b7280;
    font-size: 10px;
}

.status-dot {
    width: 8px;
    height: 8px;

    background: var(--green);

    border-radius: 50%;
}


/* =========================
   MAIN
========================= */

.main {
    margin-left: 250px;
    width: calc(100% - 250px);

    padding: 32px 38px;
}


/* =========================
   TOPBAR
========================= */

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

    margin-bottom: 28px;
}

.topbar h1 {
    font-size: 27px;
    font-weight: 750;
}

.topbar p {
    color: var(--muted);
    font-size: 13px;
    margin-top: 5px;
}

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

    background: white;

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

    padding: 9px 14px;

    border-radius: 30px;

    font-size: 12px;
    color: #4b5563;
}

.connection-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.connection-dot.online {
    background: var(--green);
}

.connection-dot.offline {
    background: var(--red);
}


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

.current-section {
    display: grid;

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

    gap: 18px;
}

.card {
    background: var(--card);

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

    border-radius: 16px;

    padding: 23px;

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

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.card-label {
    display: block;

    color: #9ca3af;

    font-size: 10px;

    font-weight: 700;

    letter-spacing: 1px;

    margin-bottom: 6px;
}

.card h3 {
    font-size: 15px;
    font-weight: 650;
}

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

    border-radius: 10px;

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

    background: #f9fafb;

    font-size: 18px;

    color: #6b7280;
}

.sun-icon {
    background: #fff7ed;
    color: var(--primary);
}


/* =========================
   UVI
========================= */

.uvi-value {
    margin-top: 20px;
}

.uvi-value span {
    font-size: 55px;
    line-height: 1;

    font-weight: 750;

    letter-spacing: -2px;
}

.uvi-category {
    display: inline-block;

    margin-top: 10px;

    padding: 6px 12px;

    border-radius: 20px;

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

    background: #f3f4f6;
}

.uvi-scale {
    margin-top: 22px;
}

.scale-track {
    display: flex;
    height: 7px;

    overflow: hidden;

    border-radius: 10px;
}

.scale-track span {
    flex: 1;
}

.scale-low {
    background: #86efac;
}

.scale-moderate {
    background: #fde047;
}

.scale-high {
    background: #fb923c;
}

.scale-very-high {
    background: #f87171;
}

.scale-extreme {
    background: #c084fc;
}

.scale-labels {
    display: flex;
    justify-content: space-between;

    margin-top: 7px;

    font-size: 8px;

    color: #9ca3af;
}


/* =========================
   RAW UV
========================= */

.raw-value {
    margin-top: 25px;
}

.raw-value span {
    font-size: 43px;
    font-weight: 750;
}

.raw-unit {
    margin-top: 6px;

    color: var(--muted);

    font-size: 11px;
}

.raw-info {
    display: flex;

    gap: 40px;

    margin-top: 24px;

    padding-top: 16px;

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

.raw-info span {
    display: block;

    color: #9ca3af;

    font-size: 10px;

    margin-bottom: 4px;
}

.raw-info strong {
    font-size: 12px;
}


/* =========================
   DEVICE STATUS
========================= */

.device-status {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-top: 25px;
}

.big-status-dot {
    width: 15px;
    height: 15px;

    border-radius: 50%;
}

.big-status-dot.online {
    background: var(--green);

    box-shadow:
        0 0 0 6px rgba(16, 185, 129, 0.1);
}

.big-status-dot.offline {
    background: var(--red);

    box-shadow:
        0 0 0 6px rgba(239, 68, 68, 0.1);
}

.device-status strong {
    display: block;

    font-size: 18px;
}

.device-status span {
    display: block;

    color: var(--muted);

    font-size: 11px;

    margin-top: 3px;
}

.status-description {
    margin-top: 24px;

    padding-top: 15px;

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

    color: #9ca3af;

    font-size: 10px;

    line-height: 1.5;
}


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

.info-grid {
    display: grid;

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

    gap: 14px;

    margin-top: 18px;
}

.info-card {
    display: flex;
    align-items: center;

    gap: 12px;

    background: white;

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

    border-radius: 12px;

    padding: 15px 17px;
}

.info-icon {
    width: 34px;
    height: 34px;

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

    border-radius: 9px;

    background: #f9fafb;

    color: #6b7280;

    font-size: 15px;
}

.info-card span:not(.info-icon) {
    display: block;

    font-size: 10px;

    color: #9ca3af;

    margin-bottom: 4px;
}

.info-card strong {
    font-size: 12px;
}


/* =========================
   CHARTS
========================= */

.charts-section {
    margin-top: 32px;
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-bottom: 15px;
}

.section-heading h2 {
    font-size: 18px;
}

.section-heading p {
    color: var(--muted);

    font-size: 11px;

    margin-top: 4px;
}

.live-badge {
    padding: 6px 10px;

    border-radius: 20px;

    background: #ecfdf5;

    color: #059669;

    font-size: 9px;

    font-weight: 700;
}

.charts-grid {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 18px;
}

.chart-card {
    background: white;

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

    border-radius: 16px;

    padding: 20px;

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

.chart-header {
    margin-bottom: 10px;
}

.chart-label {
    color: #9ca3af;

    font-size: 9px;

    font-weight: 700;

    letter-spacing: 1px;
}

.chart-header h3 {
    margin-top: 5px;

    font-size: 14px;
}

.chart-container {
    height: 260px;
}


/* =========================
   SVM
========================= */

.svm-preview {
    margin-top: 25px;

    padding: 20px;

    background: white;

    border: 1px dashed #d1d5db;

    border-radius: 16px;
}

.svm-header {
    display: flex;
    align-items: center;

    gap: 12px;
}

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

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

    border-radius: 11px;

    background: #f3f4f6;

    color: #6b7280;

    font-size: 11px;

    font-weight: 800;
}

.svm-header h2 {
    font-size: 15px;
}

.svm-content {
    margin-top: 18px;

    padding: 16px;

    background: #f9fafb;

    border-radius: 10px;

    display: flex;

    justify-content: space-between;

    align-items: center;
}

.svm-content strong {
    font-size: 13px;
}

.svm-content p {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
}

.coming-soon {
    padding: 6px 10px;

    background: #f3f4f6;

    color: #6b7280;

    border-radius: 20px;

    font-size: 9px;

    font-weight: 700;
}


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

footer {
    margin-top: 35px;

    padding: 20px 0;

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

    display: flex;

    justify-content: space-between;

    color: #9ca3af;

    font-size: 10px;
}


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

@media (max-width: 1100px) {

    .current-section {
        grid-template-columns: 1fr 1fr;
    }

    .status-card {
        grid-column: span 2;
    }

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

}

@media (max-width: 800px) {

    .sidebar {
        width: 70px;
        padding: 20px 10px;
    }

    .brand div:not(.brand-icon),
    .nav-item span:not(.nav-icon),
    .sidebar-bottom {
        display: none;
    }

    .brand {
        justify-content: center;
        padding-bottom: 25px;
    }

    .nav-item {
        justify-content: center;
    }

    .main {
        margin-left: 70px;
        width: calc(100% - 70px);

        padding: 25px 20px;
    }

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

}

@media (max-width: 600px) {

    .current-section {
        grid-template-columns: 1fr;
    }

    .status-card {
        grid-column: auto;
    }

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

    .topbar {
        align-items: flex-start;
        gap: 15px;

        flex-direction: column;
    }

}

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

.filter-card {
    background: white;

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

    border-radius: 16px;

    padding: 22px;

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

.filter-title {
    display: flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 20px;
}

.filter-icon {
    width: 40px;
    height: 40px;

    display: flex;

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

    background: #f9fafb;

    border-radius: 10px;

    color: #6b7280;
}

.filter-title h2 {
    font-size: 17px;
}

.filter-title p {
    color: var(--muted);

    font-size: 12px;

    margin-top: 4px;
}

.filter-form {
    display: grid;

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

    gap: 15px;

    align-items: end;
}

.date-field label {
    display: block;

    color: #6b7280;

    font-size: 12px;

    font-weight: 600;

    margin-bottom: 7px;
}

.date-field input {
    width: 100%;

    height: 42px;

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

    border-radius: 9px;

    padding: 0 12px;

    font-family: inherit;

    font-size: 12px;

    color: #374151;

    outline: none;

    background: white;
}

.date-field input:focus {
    border-color: #f59e0b;

    box-shadow:
        0 0 0 3px
        rgba(245, 158, 11, 0.1);
}

.filter-buttons {
    display: flex;

    gap: 8px;
}

.btn {
    height: 42px;

    padding: 0 18px;

    border: none;

    border-radius: 9px;

    font-family: inherit;

    font-size: 12px;

    font-weight: 650;

    cursor: pointer;

    transition: 0.2s;
}

.btn-primary {
    background: #f59e0b;

    color: white;
}

.btn-primary:hover {
    background: #d97706;
}

.btn-secondary {
    background: #f3f4f6;

    color: #4b5563;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* =========================================================
   GLOBAL RESPONSIVE FILTER
========================================================= */

@media (max-width: 800px) {

    .filter-form {
        grid-template-columns:
            1fr 1fr;
    }

    .filter-buttons {
        grid-column:
            span 2;
    }

    .filter-buttons .btn {
        flex: 1;
    }

}


@media (max-width: 600px) {

    .filter-form {
        grid-template-columns:
            1fr;
    }

    .filter-buttons {
        grid-column:
            auto;
    }

}

/* =========================================================
   GLOBAL FONT SIZE
========================================================= */

body {
    font-size: 18px;
}

/* Judul halaman */
.topbar h1 {
    font-size: 35px;
}

/* Deskripsi di bawah judul */
.topbar p {
    font-size: 14px;
}

/* Sidebar */
.brand h2 {
    font-size: 18px;
}

.brand span {
    font-size: 16px;
}

.nav-item {
    font-size: 18px;
}

/* Judul card */
.card h3 {
    font-size: 18px;
}

/* Label kecil */
.card-label {
    font-size: 16px;
}

/* Filter */
.filter-title h2 {
    font-size: 18px;
}

.filter-title p {
    font-size: 16px;
}

.date-field label {
    font-size: 16px;
}

.date-field input {
    font-size: 16px;
}

.btn {
    font-size: 16px;
}

/* Footer */
footer {
    font-size: 14px;
}