body {
    min-height: 100vh;

    background:
        linear-gradient(
            rgba(5, 8, 16, 0.76),
            rgba(5, 8, 16, 0.90)
        ),
        url("../sprites/sensor_bkg.png");

    background-size: cover;
    background-position: center;
    background-attachment: fixed;

    color: white;
}


.iot-layout {
    min-height: 100vh;

    padding:
        100px
        110px
        80px
        110px;
}


.iot-header {
    text-align: center;

    margin-bottom: 50px;
}


.iot-header h1 {
    margin: 0;

    font-size: 48px;

    color: #8ecbff;

    text-shadow:
        0 0 18px rgba(100, 180, 255, 0.35);
}


.iot-header p {
    margin-top: 10px;

    color: rgba(255, 255, 255, 0.65);
}


.device-grid {
    width: min(1200px, 100%);

    margin: auto;

    display: grid;

    grid-template-columns:
        repeat(
            auto-fit,
            minmax(320px, 1fr)
        );

    gap: 28px;
}


.device-card {
    background:
        rgba(15, 20, 32, 0.86);

    border:
        1px solid
        rgba(120, 180, 255, 0.24);

    border-radius: 20px;

    padding: 24px;

    backdrop-filter: blur(12px);

    box-shadow:
        0 0 25px
        rgba(0, 0, 0, 0.4);
}


.device-header {
    display: flex;

    justify-content: space-between;
    align-items: flex-start;

    gap: 20px;
}


.device-header h2 {
    margin: 0;

    color: #8ecbff;
}


.device-type {
    display: block;

    margin-top: 6px;

    color:
        rgba(255, 255, 255, 0.55);

    font-size: 14px;
}


.device-status {
    padding: 6px 10px;

    border-radius: 10px;

    font-size: 12px;
    font-weight: bold;
}


.device-status.online {
    color: #00ff88;

    background:
        rgba(0, 255, 136, 0.10);

    border:
        1px solid
        rgba(0, 255, 136, 0.30);
}


.device-status.offline {
    color: #ff6666;

    background:
        rgba(255, 80, 80, 0.10);

    border:
        1px solid
        rgba(255, 80, 80, 0.30);
}


.private-label {
    display: inline-block;

    margin-top: 16px;

    padding: 5px 9px;

    border-radius: 8px;

    background:
        rgba(255, 180, 70, 0.12);

    border:
        1px solid
        rgba(255, 180, 70, 0.30);

    color: #ffc46b;

    font-size: 12px;
}


.device-values {
    margin-top: 25px;

    display: flex;
    flex-direction: column;

    gap: 10px;
}


.sensor-value {
    display: flex;

    justify-content: space-between;
    align-items: center;

    padding: 12px 14px;

    border-radius: 12px;

    background:
        rgba(0, 0, 0, 0.22);
}


.sensor-name {
    color:
        rgba(255, 255, 255, 0.68);
}


.sensor-value strong {
    color: white;
}


.no-sensors {
    color:
        rgba(255, 255, 255, 0.45);

    text-align: center;
}


.device-footer {
    margin-top: 25px;

    padding-top: 18px;

    border-top:
        1px solid
        rgba(255, 255, 255, 0.08);

    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 15px;
}


.device-footer span {
    color:
        rgba(255, 255, 255, 0.45);

    font-size: 12px;
}


.device-open-button {
    text-decoration: none;

    padding: 9px 14px;

    border-radius: 10px;

    color: black;

    background: #8ecbff;

    font-weight: bold;

    transition: 0.2s;
}


.device-open-button:hover {
    transform: translateY(-2px);

    box-shadow:
        0 0 14px
        rgba(120, 190, 255, 0.30);
}


.iot-empty {
    width: min(600px, 90%);

    margin: auto;

    padding: 40px;

    text-align: center;

    background:
        rgba(15, 20, 32, 0.82);

    border:
        1px solid
        rgba(120, 180, 255, 0.20);

    border-radius: 20px;
}


@media (max-width: 800px) {

    .iot-layout {
        padding:
            100px
            20px
            60px
            80px;
    }


    .iot-header h1 {
        font-size: 34px;
    }


    .device-footer {
        flex-direction: column;
        align-items: stretch;
    }


    .device-open-button {
        text-align: center;
    }
}