body{
    font-family: Arial, Helvetica, sans-serif;
    background:#f4f6f8;
    margin:0;
    text-align:center;
}

h1{
    margin:30px 0;
}

/* GRID */
.grid{
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:25px;
    padding:25px;
}

/* DEVICE CARD */
.device{
    padding:20px;
    border-radius:12px;
    box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.device h2{
    margin-top:0;
}

.datapoint{
    padding:10px;
    margin-top:8px;
    background:#f7f7f7;
    border-radius:8px;
    cursor:pointer;
    display:flex;
    justify-content:space-between;
}

.datapoint:hover{
    background:#e9eef7;
}

.value{
    font-weight:bold;
}

/* STATUS FARGER */
.device.ok{
    background:#71fb71;
    border:2px solid #005c00;
}

.device.partial{
    background:#f8e073;
    border:2px solid #615200;
}

.device.offline{
    background:#ff6363;
    border:2px solid #7a0000;
}

/* OVERLAY */
.overlay{
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:rgba(0,0,0,0.6);
    display:none;
    justify-content:center;
    align-items:center;
}

.overlay-content{
    background:white;
    width:80%;
    max-width:900px;
    padding:30px;
    border-radius:12px;
    position:relative;
}

.close-btn{
    position:absolute;
    top:10px;
    right:10px;
    border:none;
    background:#eee;
    padding:8px 12px;
    cursor:pointer;
}

.controls{
    margin-bottom:15px;
}

.controls button{
    margin:5px;
    padding:8px 14px;
    border:none;
    border-radius:6px;
    cursor:pointer;
    background:#e0e0e0;
}

.controls button:hover{
    background:#cfcfcf;
}

/* FEATURED DEVICE (D319) */

.device.featured{
    grid-column: 1 / -1;   /* full bredde */
    min-height: 300px;     /* dobbel høyde */
    font-size: 1.1em;
}

/* gjør datapoints større og fyller plassen */
.device.featured .datapoint{
    display:flex;
    flex-direction:column;
    justify-content:center;
    align-items:center;

    font-size:18px;
    padding:20px;

    height:100%;
}

/* større verdi */
.device.featured .value{
    font-size:28px;
    margin-top:10px;
}

/* større verdi */
.device.featured .value{
    font-size:28px;
    margin-top:10px;
}
