/* --- RESET & BASICS --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}
html, body {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    text-size-adjust: 100%;
    background-color: #f4f4f4;
}

/* --- SIDEBAR & OVERLAY --- */
.sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    width: 280px;
    height: 100%;
    background: #ffffff;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}
.sidebar.open {
    left: 0;
}
.sidebar-header {
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
}
.logo {
    font-weight: 700;
    color: #2ecc71;
    font-size: 1.2rem;
}
.close-btn {
    font-size: 2rem;
    border: none;
    background: none;
    cursor: pointer;
    color: #cccccc;
}
.sidebar-menu {
    padding: 20px;
    flex-grow: 1;
}
.menu-item {
    display: block;
    padding: 12px 15px;
    text-decoration: none;
    color: #555555;
    border-radius: 8px;
    margin-bottom: 5px;
    font-weight: 500;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
    font-size: 0.9rem;
    font-family: inherit;
}
.menu-item:hover,
.menu-item.active {
    background: #e8f5e9;
    color: #2e7d32;
}
.dropdown-container {
    display: none;
    padding-left: 20px;
    background: #fafafa;
}
.dropdown-container.show {
    display: block;
}
.dropdown-container a {
    display: block;
    padding: 10px;
    text-decoration: none;
    color: #777777;
    font-size: 0.9rem;
}
.dropdown-container a:hover {
    background: #e8f5e9;
    color: #2e7d32;
}
.dropdown-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.arrow {
    font-size: 0.9rem;
}
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #eeeeee;
}
.logout {
    color: #e74c3c !important;
}
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.3);
    display: none;
    z-index: 900;
}
.overlay.show {
    display: block;
}

/* --- SECTION HERO (BANNER) --- */
.section-hero {
    height: 350px;
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), 
                url('img/tren-banner.jpg') center / cover;
    padding: 20px 40px;
    display: flex;
    flex-direction: column;
}
.top-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.hamburger {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.hamburger span {
    width: 18px;
    height: 1.5px;
    background: #ffffff;
    border-radius: 2px;
}
.user-info-top {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #ffffff;
}
.avatar-top {
    width: 35px;
    height: 35px;
    background: #eeeeee;
    border-radius: 50%;
    border: 2px solid #ffffff;
}
.hero-content {
    flex-grow: 1;
    justify-content: left;
    padding-top: 60px;
    color: #ffffff;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}
.hero-content h1 {
    font-size: 2rem;
    font-weight: bold;
    font-family: Helvetica, sans-serif;
}

/* --- SECTION DATA & TAB CONTAINER --- */
.section-data {
    margin-top: -80px;
    position: relative;
    z-index: 10;
    background: transparent;
}
.tab-content {
    background: #f1f1f1;
    margin: 0 auto;
    border-radius: 40px 40px 0 0;
    padding: 40px 40px;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.05);
    position: relative;
}
.judul-halaman {
    text-align: center;
    color: #333333;
    margin-bottom: 30px;
}
.status-display { 
    text-align: center; 
    padding: 25px;
    margin-bottom: 20px;
    background: #063B00; 
    border-radius: 20px;
}
.label { 
    color: #fff; 
    font-size: 1.1rem; 
    font-weight: 600;
    text-align: left;
    margin-bottom: 10px;
}
.list { 
    color: #fff; 
    font-size: 0.8rem; 
    text-align: left;
    padding-left: 20px;
}

/* --- GRID & KARTU GRAFIK --- */
.grid-grafik {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}
.kartu-grafik {
    background: #ffffff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid #eeeeee;
}
.kartu-grafik h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    color: #444444;
    text-align: center;
}

/* --- PANEL METRIK (TERKINI, BAWAH, ATAS) --- */
.info-metrik {
    display: flex;
    justify-content: space-between;
    background: #f8f9fa;
    padding: 10px;
    border-radius: 6px;
    font-size: 12px;
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
}
.info-metrik div {
    text-align: center;
    width: 33%;
    border-right: 1px solid #dee2e6;
    color: #6c757d;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.info-metrik div:last-child {
    border-right: none;
}
.info-metrik b {
    display: block;
    font-size: 15px;
    color: #212529;
    margin-top: 4px;
}

/* Style Latar Belakang Status Terkini Dinamis */
.terkini-box {
    border-radius: 6px;
    padding: 4px;
}
.terkini-ideal {
    background-color: #d1e7dd !important;
    color: #0f5132 !important;
}
.terkini-ideal b {
    color: #0f5132 !important;
}
.terkini-kritis {
    background-color: #f8d7da !important;
    color: #842029 !important;
}
.terkini-kritis b {
    color: #842029 !important;
}

/* Indikator Panah Tren */
.naik {
    color: #198754;
    font-size: 12px;
    margin-left: 2px;
}
.turun {
    color: #dc3545;
    font-size: 12px;
    margin-left: 2px;
}
.tetap {
    color: #adb5bd;
    font-size: 12px;
    margin-left: 2px;
}
.kanvas-wadah {
    height: 250px;
    position: relative;
}

/* --- FOOTER --- */
.footer-foot {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    color: #ffffff;
    text-align: center;
    height: 50px;
    width: 100%;
    background-color: #063B00;
    font-size: 0.6rem;
    padding: 18px;
    text-decoration: none;
}
.footer-foot a {
    text-decoration: none;
    color: #cccccc;
}

/* --- RESPONSIVITAS SMARTPHONE --- */
@media screen and (max-width: 765px) {
    .tab-content {
        padding: 40px 20px 30px;
    }
    .grid-grafik {
        grid-template-columns: 1fr;
    }
}