
/* ==========================================
   AIRGUARD UMRI
   COMPLETE DASHBOARD DESIGN
========================================== */

:root {
    --green: #16A765;
    --green-dark: #087443;
    --green-light: #B8F28B;
    --mint: #E9FAF0;
    --blue: #55B9F3;
    --yellow: #FFD75E;
    --white: #FFFFFF;
    --text: #26352B;
    --muted: #718078;
    --background: #F4FBF6;
    --border: #E3F2E8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.6;
    min-width: 320px;
}

[hidden] {
    display: none !important;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ==========================================
   LOGIN PAGE
========================================== */

.login-screen {
    min-height: 100vh;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 25px;

    background:
        radial-gradient(
            circle at top left,
            #D8F6E3,
            transparent 40%
        ),
        var(--background);
}

.login-card {
    width: 100%;
    max-width: 390px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 35px 30px;

    box-shadow:
        0 12px 35px rgba(8, 116, 67, 0.10);
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.login-logo img {
    width: 65px;
    height: 65px;
    object-fit: contain;
}

.login-label {
    text-align: center;
    color: var(--green);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
}

.login-card h1 {
    text-align: center;
    font-size: 24px;
    color: var(--green-dark);
    margin-top: 5px;
}

.login-subtitle {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 8px 0 25px;
}

.login-input {
    margin-bottom: 17px;
}

.login-input label {
    display: block;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 7px;
    color: var(--text);
}

.input-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;

    border: 1px solid var(--border);
    background: #FAFDFA;
    border-radius: 9px;
    padding: 0 12px;
}

.input-wrapper:focus-within {
    border-color: var(--green);
}

.input-wrapper i {
    color: var(--green);
    font-size: 14px;
}

.input-wrapper input {
    width: 100%;
    min-width: 0;
    border: none;
    outline: none;
    background: transparent;
    padding: 13px 0;
    font-size: 13px;
    color: var(--text);
}

.login-button {
    width: 100%;
    border: none;
    border-radius: 9px;
    padding: 13px;
    margin-top: 8px;

    background: var(--green-dark);
    color: white;

    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: 0.2s;
}

.login-button:hover {
    background: var(--green);
}

.login-button i {
    margin-left: 8px;
}

.login-message {
    min-height: 18px;
    text-align: center;
    font-size: 11px;
    margin-top: 12px;
    color: #D93636;
}

.login-footer {
    border-top: 1px solid var(--border);
    margin-top: 20px;
    padding-top: 15px;
    text-align: center;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.8;
}


/* ==========================================
   DASHBOARD LAYOUT
========================================== */

.dashboard {
    display: flex;
    min-height: 100vh;
    width: 100%;
}


/* ==========================================
   SIDEBAR
========================================== */

.sidebar {
    width: 235px;
    min-width: 235px;
    min-height: 100vh;

    background: var(--white);
    border-right: 1px solid var(--border);

    padding: 22px 15px;

    display: flex;
    flex-direction: column;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 7px 25px;
}

.sidebar-brand img {
    width: 43px;
    height: 43px;
    object-fit: contain;
}

.sidebar-brand h2 {
    color: var(--green-dark);
    font-size: 19px;
    line-height: 1.3;
}

.sidebar-brand p {
    color: var(--muted);
    font-size: 10px;
}

.menu-title {
    color: #A0ADA4;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1px;
    padding: 10px 12px;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.menu-link {
    display: flex;
    align-items: center;
    gap: 12px;

    padding: 11px 12px;
    border-radius: 9px;

    color: var(--muted);
    font-size: 13px;

    transition: 0.2s;
}

.menu-link i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

.menu-link:hover,
.menu-link.active {
    background: var(--mint);
    color: var(--green-dark);
    font-weight: bold;
}

.sidebar-footer {
    margin-top: auto;
    padding: 18px 7px 5px;

    border-top: 1px solid var(--border);

    display: flex;
    align-items: center;
    gap: 9px;
}

.sidebar-footer img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    flex-shrink: 0;
}

.sidebar-footer strong {
    display: block;
    font-size: 10px;
    line-height: 1.4;
}

.sidebar-footer small {
    color: var(--muted);
    font-size: 10px;
}


/* ==========================================
   MAIN CONTENT
========================================== */

.main-content {
    flex: 1;
    min-width: 0;
    padding: 25px 30px;
    overflow: hidden;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.topbar h2 {
    font-size: 21px;
    color: var(--green-dark);
}

.topbar p {
    font-size: 12px;
    color: var(--muted);
}

.topbar-status {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 13px;
    border-radius: 20px;

    background: var(--white);
    border: 1px solid var(--border);

    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.status-dot {
    width: 8px;
    height: 8px;
    background: var(--yellow);
    border-radius: 50%;
}


/* ==========================================
   WELCOME SECTION
========================================== */

.welcome-section {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 22px;

    background: linear-gradient(
        120deg,
        #E9FAF0,
        #F7FFF9
    );

    border: 1px solid var(--border);
    border-radius: 15px;

    padding: 22px;
    margin-bottom: 23px;
}

.welcome-label {
    color: var(--green);
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 1.5px;
}

.welcome-text h1 {
    font-size: 24px;
    color: var(--green-dark);
    line-height: 1.3;
    margin: 7px 0 10px;
}

.welcome-text p {
    color: var(--muted);
    font-size: 12px;
    max-width: 440px;
}

.campus-address {
    margin-top: 14px;
    color: var(--green-dark);
    font-size: 11px;
}

.campus-address i {
    margin-right: 5px;
}

.campus-image {
    width: 100%;
    height: 145px;
    overflow: hidden;
    border-radius: 11px;
}

.campus-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ==========================================
   CONTENT SECTIONS
========================================== */

.content-section {
    background: var(--white);
    padding: 21px;
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 22px;

    box-shadow:
        0 3px 13px rgba(36, 100, 62, 0.04);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
}

.section-heading h2 {
    color: var(--green-dark);
    font-size: 17px;
}

.section-heading p {
    color: var(--muted);
    font-size: 11px;
}

.data-label {
    background: var(--mint);
    color: var(--green-dark);
    font-size: 9px;
    font-weight: bold;
    padding: 6px 10px;
    border-radius: 20px;
    white-space: nowrap;
}


/* ==========================================
   SENSOR CARDS
========================================== */

.sensor-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 13px;
}

.sensor-card {
    min-width: 0;
    padding: 16px 13px;

    border-radius: 12px;
    background: var(--mint);
    border: 1px solid #E1F2E7;
}

.sensor-icon {
    width: 34px;
    height: 34px;
    border-radius: 9px;

    background: white;

    display: flex;
    justify-content: center;
    align-items: center;

    color: var(--green);
    margin-bottom: 12px;
}

.sensor-card p {
    color: var(--muted);
    font-size: 11px;
}

.sensor-card h3 {
    color: var(--green-dark);
    font-size: 23px;
    margin-top: 4px;
    line-height: 1.3;
}

.sensor-card > span {
    color: var(--muted);
    font-size: 10px;
}

.pm25 {
    border-top: 3px solid var(--green);
}

.pm10 {
    border-top: 3px solid var(--blue);
}

.temperature {
    border-top: 3px solid #F2A34A;
}

.humidity {
    border-top: 3px solid #55B9F3;
}

.pressure {
    border-top: 3px solid #B7A1E8;
}


/* ==========================================
   CHART PLACEHOLDER
========================================== */

.chart-placeholder {
    min-height: 190px;

    background: #F8FCF9;
    border: 1px dashed #C9E6D2;
    border-radius: 12px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;
    padding: 25px;
}

.chart-placeholder i {
    font-size: 30px;
    color: var(--green);
    margin-bottom: 12px;
}

.chart-placeholder h3 {
    font-size: 15px;
    color: var(--green-dark);
}

.chart-placeholder p {
    max-width: 400px;
    font-size: 11px;
    color: var(--muted);
    margin-top: 6px;
}


/* ==========================================
   LOCATION
========================================== */

.location-info {
    display: flex;
    align-items: center;
    gap: 12px;

    background: var(--mint);
    padding: 13px;
    border-radius: 10px;

    margin-bottom: 14px;
}

.location-icon {
    width: 38px;
    height: 38px;
    flex-shrink: 0;

    background: white;
    color: var(--green);

    border-radius: 10px;

    display: flex;
    align-items: center;
    justify-content: center;
}

.location-info h3 {
    font-size: 12px;
    color: var(--green-dark);
}

.location-info p {
    font-size: 11px;
    color: var(--muted);
}

.location-info small {
    color: #A17B32;
    font-size: 10px;
}

.map-container {
    width: 100%;
    height: 280px;
    overflow: hidden;

    border-radius: 11px;
    border: 1px solid var(--border);
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

.map-note {
    color: var(--muted);
    font-size: 10px;
    margin-top: 9px;
}


/* ==========================================
   ABOUT
========================================== */

.about-section > p {
    color: var(--muted);
    font-size: 12px;
    margin-bottom: 10px;
}


/* ==========================================
   FOOTER
========================================== */

.main-footer {
    text-align: center;
    padding: 15px 5px;
    color: var(--muted);
    font-size: 10px;
}

.main-footer span {
    display: block;
    margin-top: 3px;
}


/* ==========================================
   TABLET
========================================== */

@media (max-width: 1100px) {

    .main-content {
        padding: 22px 20px;
    }

    .sensor-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .sidebar {
        width: 210px;
        min-width: 210px;
    }

}


/* ==========================================
   MOBILE
========================================== */

@media (max-width: 760px) {

    .dashboard {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        min-width: 0;
        min-height: auto;

        padding: 12px;

        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-brand {
        padding: 4px 5px 12px;
    }

    .sidebar-brand img {
        width: 38px;
        height: 38px;
    }

    .sidebar-menu {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 5px;
    }

    .menu-title,
    .sidebar-footer {
        display: none;
    }

    .menu-link {
        padding: 8px 10px;
        font-size: 11px;
    }

    .main-content {
        padding: 17px 13px;
    }

    .welcome-section {
        grid-template-columns: 1fr;
    }

    .campus-image {
        height: 160px;
    }

    .sensor-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

}


/* ==========================================
   SMALL MOBILE
========================================== */

@media (max-width: 430px) {

    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .welcome-text h1 {
        font-size: 21px;
    }

    .content-section {
        padding: 15px;
    }

    .section-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .sensor-grid {
        grid-template-columns: 1fr 1fr;
        gap: 9px;
    }

    .sensor-card {
        padding: 12px 10px;
    }

    .sensor-card h3 {
        font-size: 20px;
    }

}
