@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {

    --teal: #087f76;
    --teal-dark: #075d58;
    --teal-light: #e5f5f2;

    --blue: #3182ce;
    --purple: #805ad5;
    --orange: #dd7a20;
    --green: #17945b;
    --red: #dc4c4c;

    --bg: #f3f7f5;
    --card: #ffffff;

    --text: #183231;
    --muted: #718482;

    --line: #dce7e3;

    --shadow:
        0 12px 35px rgba(24, 50, 49, .07);

}


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


body {

    font-family: "Inter", sans-serif;

    background:
        radial-gradient(
            circle at top right,
            rgba(8,127,118,.08),
            transparent 35%
        ),
        var(--bg);

    color: var(--text);

}


button,
select {

    font-family: inherit;

}


button {

    cursor: pointer;

}


.app {

    min-height: 100vh;

}


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

.sidebar {

    position: fixed;

    left: 0;
    top: 0;

    width: 260px;
    height: 100vh;

    background:
        linear-gradient(
            180deg,
            #123e3a,
            #092d2a
        );

    color: white;

    padding: 25px 18px;

    display: flex;
    flex-direction: column;

    z-index: 100;

}


.brand {

    display: flex;
    align-items: center;

    gap: 12px;

    padding: 5px 10px 22px;

}


.brand-logo {

    width: 46px;
    height: 46px;

    border-radius: 15px;

    display: grid;
    place-items: center;

    background:
        linear-gradient(
            135deg,
            #23b8a7,
            #087f76
        );

    font-size: 23px;

}


.brand h1 {

    font-size: 19px;

}


.brand span {

    display: block;

    margin-top: 3px;

    font-size: 9px;

    letter-spacing: 1.8px;

    opacity: .6;

}


.school-logo {

    display: flex;

    justify-content: center;

    align-items: center;

    gap: 12px;

    padding: 13px;

    margin-bottom: 15px;

    background: rgba(255,255,255,.07);

    border: 1px solid rgba(255,255,255,.1);

    border-radius: 15px;

}


.school-logo img {

    width: 42px;
    height: 42px;

    object-fit: contain;

    background: white;

    border-radius: 10px;

    padding: 4px;

}


.menu-title {

    font-size: 9px;

    letter-spacing: 1.5px;

    color: rgba(255,255,255,.4);

    margin: 18px 10px 7px;

}


.nav-item {

    width: 100%;

    border: 0;

    background: transparent;

    color: rgba(255,255,255,.7);

    display: flex;

    align-items: center;

    gap: 12px;

    padding: 12px 13px;

    margin: 3px 0;

    border-radius: 12px;

    text-align: left;

    transition: .2s;

}


.nav-item span {

    width: 22px;

    text-align: center;

}


.nav-item b {

    font-size: 12px;

    font-weight: 500;

}


.nav-item:hover {

    background: rgba(255,255,255,.08);

    color: white;

}


.nav-item.active {

    background: #087f76;

    color: white;

    box-shadow:
        0 7px 20px rgba(8,127,118,.25);

}


.sidebar-bottom {

    margin-top: auto;

}


.server-online {

    display: flex;

    align-items: center;

    gap: 10px;

    padding: 13px;

    border-radius: 13px;

    background: rgba(255,255,255,.06);

}


.server-online > span {

    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: #36d98c;

    box-shadow:
        0 0 0 5px rgba(54,217,140,.12);

}


.server-online strong {

    display: block;

    font-size: 11px;

}


.server-online small {

    color: rgba(255,255,255,.45);

    font-size: 9px;

}


#sidebarClock {

    text-align: center;

    margin-top: 12px;

    color: rgba(255,255,255,.5);

    font-size: 11px;

}


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

.main-content {

    margin-left: 260px;

    min-height: 100vh;

    padding: 0 34px 30px;

}


.topbar {

    min-height: 92px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 20px;

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

}


.top-title > span {

    font-size: 9px;

    letter-spacing: 1.8px;

    color: var(--teal);

    font-weight: 700;

}


.top-title h2 {

    margin-top: 5px;

    font-size: 21px;

}


.top-title p {

    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;

}


.top-actions {

    display: flex;

    align-items: center;

    gap: 20px;

}


.connection {

    display: flex;

    align-items: center;

    gap: 8px;

    font-size: 10px;

    font-weight: 700;

    color: var(--green);

}


.connection-dot {

    width: 8px;
    height: 8px;

    border-radius: 50%;

    background: var(--green);

}


.date-box {

    text-align: right;

}


.date-box strong {

    display: block;

    font-size: 14px;

}


.date-box span {

    color: var(--muted);

    font-size: 9px;

}


.mobile-brand {

    display: none;

}


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

.page {

    display: none;

    padding: 30px 0;

}


.page.active-page {

    display: block;

}


.section-heading {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 20px;

    margin-bottom: 22px;

}


.eyebrow {

    color: var(--teal);

    font-size: 9px;

    letter-spacing: 1.7px;

    font-weight: 800;

}


.section-heading h2 {

    font-size: 25px;

    margin-top: 5px;

}


.section-heading p {

    color: var(--muted);

    font-size: 12px;

    margin-top: 5px;

}


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

.hero {

    position: relative;

    min-height: 285px;

    overflow: hidden;

    border-radius: 25px;

    margin-bottom: 32px;

    background: #103f3b;

    box-shadow: var(--shadow);

}


.hero-image {

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            90deg,
            rgba(5,46,43,.92),
            rgba(5,46,43,.65),
            rgba(5,46,43,.15)
        ),
        url("https://images.unsplash.com/photo-1538300342682-cf57afb97285?auto=format&fit=crop&w=1600&q=80")
        center/cover;

}


.hero-content {

    position: relative;

    z-index: 2;

    padding: 45px;

    max-width: 680px;

    color: white;

}


.hero-label {

    font-size: 9px;

    letter-spacing: 2px;

    font-weight: 700;

    color: #8be2d8;

}


.hero h1 {

    font-size: clamp(30px, 4vw, 48px);

    line-height: 1.05;

    margin: 13px 0;

    letter-spacing: -1.5px;

}


.hero p {

    max-width: 520px;

    color: rgba(255,255,255,.72);

    font-size: 12px;

    line-height: 1.7;

}


.hero-actions {

    display: flex;

    align-items: center;

    gap: 15px;

    margin-top: 24px;

}


.primary-button {

    border: 0;

    background: white;

    color: var(--teal-dark);

    padding: 12px 18px;

    border-radius: 11px;

    font-weight: 700;

    font-size: 11px;

}


.live-badge {

    font-size: 9px;

    color: #9ff1dc;

}


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

.sensor-grid {

    display: grid;

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

    gap: 16px;

    margin-bottom: 20px;

}


.sensor-card {

    background: var(--card);

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

    border-radius: 19px;

    padding: 20px;

    box-shadow: var(--shadow);

}


.sensor-top {

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.sensor-top > span {

    font-size: 9px;

    font-weight: 800;

    letter-spacing: 1.1px;

    color: var(--muted);

}


.sensor-icon {

    width: 42px;
    height: 42px;

    border-radius: 13px;

    display: grid;
    place-items: center;

    font-size: 20px;

}


.sensor-icon.blue {

    background: #e7f2ff;

}


.sensor-icon.purple {

    background: #f0eaff;

}


.sensor-icon.orange {

    background: #fff0df;

}


.sensor-icon.green {

    background: #e4f7ed;

}


.sensor-value {

    display: flex;

    align-items: baseline;

    gap: 5px;

    margin: 18px 0 8px;

}


.sensor-value strong {

    font-size: 35px;

    letter-spacing: -1px;

}


.sensor-value small {

    color: var(--muted);

    font-size: 11px;

}


.sensor-card p {

    margin-top: 12px;

    color: var(--muted);

    font-size: 10px;

}


.sensor-status {

    display: inline-block;

    padding: 5px 8px;

    border-radius: 7px;

    font-size: 8px;

    font-weight: 800;

}


.sensor-status.normal {

    color: var(--green);

    background: #e8f7ef;

}


.sensor-status.danger {

    color: var(--red);

    background: #ffe9e9;

}


.quality-value {

    font-size: 32px;

    font-weight: 800;

    color: var(--green);

    margin: 19px 0 9px;

}


.quality-value.danger {

    color: var(--red);

}


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

.two-column {

    display: grid;

    grid-template-columns:
        minmax(0, 2fr)
        minmax(300px, 1fr);

    gap: 18px;

    margin-bottom: 18px;

}


.panel {

    background: var(--card);

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

    border-radius: 19px;

    padding: 22px;

    box-shadow: var(--shadow);

}


.panel-header {

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 20px;

    margin-bottom: 18px;

}


.panel-header h3 {

    font-size: 15px;

    margin-top: 4px;

}


.panel-header p {

    font-size: 10px;

    color: var(--muted);

    margin-top: 4px;

}


.live-label {

    color: var(--green);

    font-size: 9px;

    font-weight: 800;

}


.chart-container {

    position: relative;

    height: 290px;

}


.chart-panel .chart-container {

    height: 310px;

}


/* ================= ACTUATOR ================= */

.actuator-list {

    display: flex;

    flex-direction: column;

    gap: 8px;

}


.actuator-row {

    display: grid;

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

    align-items: center;

    gap: 10px;

    padding: 12px;

    background: #f7faf9;

    border-radius: 12px;

}


.actuator-icon {

    width: 36px;
    height: 36px;

    border-radius: 10px;

    display: grid;

    place-items: center;

    background: white;

}


.actuator-row strong {

    display: block;

    font-size: 11px;

}


.actuator-row small {

    display: block;

    color: var(--muted);

    font-size: 8px;

    margin-top: 3px;

}


.pill {

    padding: 6px 9px;

    border-radius: 8px;

    font-size: 8px;

    font-weight: 800;

}


.pill.open {

    color: var(--green);

    background: #e6f7ee;

}


.pill.off {

    color: #888;

    background: #edf0ef;

}


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

.info-strip {

    display: grid;

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

    background: #123e3a;

    color: white;

    border-radius: 18px;

    padding: 19px 22px;

    gap: 20px;

}


.info-strip span {

    display: block;

    color: rgba(255,255,255,.45);

    font-size: 8px;

    letter-spacing: 1px;

}


.info-strip strong {

    display: block;

    margin-top: 6px;

    font-size: 10px;

}


/* ================= DETAIL ================= */

.detail-grid {

    display: grid;

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

    gap: 18px;

    margin-bottom: 18px;

}


.detail-card {

    background: white;

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

    border-radius: 18px;

    padding: 22px;

    box-shadow: var(--shadow);

}


.detail-icon {

    width: 48px;
    height: 48px;

    display: grid;
    place-items: center;

    border-radius: 14px;

    font-size: 22px;

    margin-bottom: 17px;

}


.detail-icon.blue {
    background: #e7f2ff;
}


.detail-icon.purple {
    background: #f0eaff;
}


.detail-icon.orange {
    background: #fff0df;
}


.detail-card h3 {

    font-size: 15px;

}


.detail-card p {

    font-size: 10px;

    line-height: 1.6;

    color: var(--muted);

    margin: 7px 0 17px;

}


.detail-value {

    display: flex;

    align-items: baseline;

    gap: 6px;

}


.detail-value strong {

    font-size: 32px;

}


.detail-value span {

    color: var(--muted);

    font-size: 10px;

}


.range-box {

    display: flex;

    justify-content: space-between;

    margin: 16px 0 10px;

    font-size: 9px;

}


.range-box span {

    color: var(--muted);

}


.progress {

    height: 7px;

    background: #edf2f0;

    border-radius: 20px;

    overflow: hidden;

}


.progress-bar {

    height: 100%;

    width: 20%;

    border-radius: inherit;

}


.blue-bar {
    background: var(--blue);
}


.purple-bar {
    background: var(--purple);
}


.orange-bar {
    background: var(--orange);
}


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

.table-wrapper {

    width: 100%;

    overflow-x: auto;

}


table {

    width: 100%;

    border-collapse: collapse;

    min-width: 650px;

}


th {

    padding: 12px;

    text-align: left;

    background: #f5f8f7;

    color: var(--muted);

    font-size: 9px;

    text-transform: uppercase;

    letter-spacing: .7px;

}


td {

    padding: 13px 12px;

    border-bottom: 1px solid #edf1ef;

    font-size: 10px;

}


.table-status {

    padding: 5px 8px;

    border-radius: 7px;

    background: #e8f7ef;

    color: var(--green);

    font-size: 8px;

    font-weight: 800;

}


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

.chart-grid {

    display: grid;

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

    gap: 18px;

}


.full-chart {

    grid-column: 1 / -1;

}


/* ================= ACTUATOR PAGE ================= */

.actuator-main {

    text-align: center;

}


.big-actuator {

    width: 90px;
    height: 90px;

    margin: 5px auto 18px;

    border-radius: 28px;

    display: grid;
    place-items: center;

    font-size: 43px;

    background: var(--teal-light);

}


.actuator-main h2 {

    font-size: 21px;

}


.actuator-main p {

    max-width: 420px;

    margin: 8px auto;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.6;

}


.large-status {

    display: inline-block;

    padding: 9px 15px;

    margin: 18px 0;

    border-radius: 9px;

    background: #e8f7ef;

    color: var(--green);

    font-weight: 800;

    font-size: 10px;

}


.large-status.closed {

    background: #ffe9e9;

    color: var(--red);

}


.button-group {

    display: flex;

    justify-content: center;

    gap: 10px;

}


.control-button {

    border: 0;

    border-radius: 10px;

    padding: 11px 15px;

    font-size: 9px;

    font-weight: 800;

}


.control-button.green {

    background: var(--green);

    color: white;

}


.control-button.red {

    background: #ffe8e8;

    color: var(--red);

}


.rule {

    display: flex;

    gap: 12px;

    padding: 14px 0;

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

}


.rule > span {

    width: 30px;
    height: 30px;

    flex-shrink: 0;

    border-radius: 9px;

    display: grid;
    place-items: center;

    background: #e9f7ef;

    color: var(--green);

    font-weight: 800;

}


.rule strong {

    font-size: 11px;

}


.rule p {

    margin-top: 4px;

    color: var(--muted);

    font-size: 9px;

    line-height: 1.5;

}


.output-grid {

    display: grid;

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

    gap: 13px;

}


.output-card {

    padding: 18px;

    background: #f7faf9;

    border-radius: 14px;

}


.output-card > span {

    font-size: 24px;

}


.output-card strong {

    display: block;

    margin-top: 9px;

    font-size: 11px;

}


.output-card small {

    display: block;

    color: var(--muted);

    font-size: 8px;

    margin: 4px 0 10px;

}


.output-card b {

    color: var(--green);

    font-size: 9px;

}


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

.status-grid {

    display: grid;

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

    gap: 14px;

    margin-bottom: 18px;

}


.status-device {

    display: grid;

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

    gap: 10px;

    align-items: center;

    padding: 17px;

    background: white;

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

    border-radius: 15px;

}


.status-device > span {

    font-size: 22px;

}


.status-device strong {

    display: block;

    font-size: 10px;

}


.status-device small {

    display: block;

    color: var(--muted);

    font-size: 8px;

    margin-top: 3px;

}


.status-device b {

    color: var(--green);

    font-size: 8px;

}


.communication-flow {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: 15px;

    flex-wrap: wrap;

    margin-top: 20px;

}


.communication-flow div {

    min-width: 110px;

    text-align: center;

    padding: 15px;

    border-radius: 12px;

    background: #f5f9f7;

}


.communication-flow strong {

    display: block;

    font-size: 10px;

}


.communication-flow small {

    display: block;

    color: var(--muted);

    margin-top: 4px;

    font-size: 8px;

}


/* ================= SETTINGS ================= */

.settings-grid {

    display: grid;

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

    gap: 17px;

}


.setting-card {

    background: white;

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

    border-radius: 17px;

    padding: 20px;

    box-shadow: var(--shadow);

}


.setting-icon {

    width: 40px;
    height: 40px;

    border-radius: 12px;

    display: grid;
    place-items: center;

    background: var(--teal-light);

    margin-bottom: 13px;

}


.setting-card strong {

    font-size: 12px;

}


.setting-card p {

    color: var(--muted);

    font-size: 9px;

    margin: 5px 0 14px;

}


.setting-card select {

    width: 100%;

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

    border-radius: 9px;

    padding: 10px;

    background: #f9fbfa;

    color: var(--text);

    outline: none;

}


.settings-note {

    margin-top: 18px;

    padding: 18px;

    border-radius: 14px;

    background: var(--teal-light);

}


.settings-note strong {

    font-size: 11px;

}


.settings-note p {

    margin-top: 5px;

    font-size: 9px;

    color: var(--muted);

}


/* ================= NOTIFICATION ================= */

.notification-list {

    display: flex;

    flex-direction: column;

    gap: 10px;

}


.notification {

    display: flex;

    gap: 12px;

    padding: 15px;

    background: white;

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

    border-radius: 13px;

}


.notification strong {

    font-size: 10px;

}


.notification p {

    font-size: 9px;

    color: var(--muted);

    margin-top: 3px;

}


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

.secondary-button {

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

    background: white;

    color: var(--text);

    padding: 10px 14px;

    border-radius: 9px;

    font-size: 9px;

    font-weight: 700;

}


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

footer {

    display: flex;

    justify-content: space-between;

    gap: 15px;

    color: var(--muted);

    font-size: 9px;

    padding: 25px 3px 5px;

}


footer strong {

    color: var(--teal);

}


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

@media(max-width: 1050px) {

    .sensor-grid {

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

    }


    .detail-grid,
    .status-grid,
    .settings-grid {

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

    }

}


@media(max-width: 800px) {

    .sidebar {

        position: fixed;

        width: 100%;

        height: auto;

        bottom: 0;
        top: auto;

        left: 0;

        padding: 8px;

        background:
            rgba(12,53,49,.97);

        backdrop-filter: blur(15px);

        border-top: 1px solid rgba(255,255,255,.1);

    }


    .brand,
    .school-logo,
    .menu-title,
    .sidebar-bottom {

        display: none;

    }


    .sidebar nav {

        display: grid;

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

        gap: 4px;

    }


    .nav-item {

        justify-content: center;

        flex-direction: column;

        gap: 3px;

        padding: 7px 3px;

        border-radius: 9px;

        margin: 0;

    }


    .nav-item b {

        font-size: 7px;

    }


    .nav-item span {

        font-size: 16px;

        width: auto;

    }


    .main-content {

        margin-left: 0;

        padding: 0 15px 85px;

    }


    .topbar {

        min-height: 76px;

    }


    .top-title {

        display: none;

    }


    .mobile-brand {

        display: flex;

        align-items: center;

        gap: 9px;

    }


    .mobile-brand .brand-logo {

        width: 38px;
        height: 38px;

        border-radius: 11px;

    }


    .mobile-brand strong {

        display: block;

        font-size: 13px;

    }


    .mobile-brand small {

        display: block;

        color: var(--muted);

        font-size: 8px;

        margin-top: 2px;

    }


    .top-actions {

        gap: 9px;

    }


    .connection {

        font-size: 8px;

    }


    .date-box {

        display: none;

    }


    .page {

        padding: 20px 0;

    }


    .hero {

        min-height: 330px;

        border-radius: 20px;

    }


    .hero-content {

        padding: 28px 23px;

    }


    .hero h1 {

        font-size: 32px;

    }


    .hero-actions {

        align-items: flex-start;

        flex-direction: column;

    }


    .section-heading h2 {

        font-size: 21px;

    }


    .sensor-grid {

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

        gap: 10px;

    }


    .sensor-card {

        padding: 15px;

        border-radius: 15px;

    }


    .sensor-value strong {

        font-size: 27px;

    }


    .two-column {

        grid-template-columns: 1fr;

    }


    .chart-container {

        height: 240px;

    }


    .info-strip {

        grid-template-columns: 1fr;

        gap: 13px;

    }


    .detail-grid,
    .status-grid,
    .settings-grid {

        grid-template-columns: 1fr;

    }


    .chart-grid {

        grid-template-columns: 1fr;

    }


    .full-chart {

        grid-column: auto;

    }


    .output-grid {

        grid-template-columns: 1fr;

    }


    .communication-flow {

        flex-direction: column;

    }


    .communication-flow span {

        transform: rotate(90deg);

    }


    .section-heading {

        align-items: flex-start;

        flex-direction: column;

    }


    footer {

        flex-direction: column;

    }

}


@media(max-width: 430px) {

    .sensor-grid {

        grid-template-columns: 1fr 1fr;

    }


    .sensor-card {

        padding: 12px;

    }


    .sensor-icon {

        width: 35px;
        height: 35px;

        font-size: 16px;

    }


    .sensor-top > span {

        font-size: 8px;

    }


    .sensor-value strong {

        font-size: 24px;

    }


    .sensor-card p {

        font-size: 8px;

    }


    .hero h1 {

        font-size: 29px;

    }


    .hero p {

        font-size: 10px;

    }

}