/* ----------------- Universal Base Styles ----------------- */

/* Basic body setup */
body {
    font-family: monospace;
    font-size: x-large;
    margin: 0px;
    background: #f4f4f4;
    color: #333;
}

/* Headings */
h1 {
    margin-bottom: 20px;
    font-size: 2em;
}

h2 {
    margin-bottom: 15px;
    font-size: 1.3em;
}

/* ----------------- Navbar -----------------*/
.navbar {
    margin: 0px;
    height: 75px;
    background-color: black;
}

.navbar ul {
    list-style-type: none;
    padding: 0px;
    margin: 0px;
    font-size: 20px;
    overflow: hidden;
}

.navbar a{
    color: white;
    text-decoration: none;
    padding: 30px;
    display: block;
    text-align: center;
}

.navbar h1{
    font-size: 40px;
    padding: 10px;
    margin-top: 1vh;
    font-family: monospace;
    font-weight: bolder;
    color: white;
}

.navbar a:hover{
    background-color: rgba(15, 15, 15, 0.5);
}

#navbar_left li {
    float: left;
}

#navbar_right {
    float: right;
}

#navbar_right li {
    float: left;
}

/* ----------------- Containers ----------------- */
.container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

/* Generic layout helper for side-by-side containers */
#layout {
    display: flex;
    gap: 30px;
    margin: 40px;
}

#layout .container {
    flex: 1;
}

/* ----------------- Tables ----------------- */
table {
    border-collapse: collapse;
    width: 100%;
}

th, td {
    padding: 8px;
    border-bottom: 1px solid #ddd;
    text-align: left;
}

th {
    background: #eee;
}

/* ----------------- Cards & Boxes ----------------- */
.device-box {
    background: white;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 0 8px rgba(0,0,0,0.1);
    text-align: center;
}

.device-name {
    font-weight: bold;
    margin-bottom: 10px;
}

.device-location {
    font-size: 0.9em;
    margin-top: 5px;
    color: #555;
}

/* ----------------- Animations ----------------- */
.online-indicator {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    border-radius: 50%;
    background: gray;
    animation: pulse 2.5s infinite;
}

.value_indicator {
    width: 200px;
    height: 200px;
    margin: 0 auto;
    border-radius: 50%;

    font-size: 50px;
    font-weight: bolder;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;
}

.online {
    background: green;
}

.offline {
    background: red;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.7; }
    50% { transform: scale(1.2); opacity: 1; }
    100% { transform: scale(1); opacity: 0.7; }
}

/* ----------------- Utility Classes ----------------- */
.text-center {
    text-align: center;
}

/* --------------- Chart Buttons ----------- */
#chart_buttons {
    display: flex;
    gap: 10px;
    background-color: white;
    height: 40px;
}

#chart_buttons li {
    float: left;
    padding: 5px;
}

#chart_buttons button {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #ddd;
    cursor: pointer;
}

#chart_buttons button:hover {
    background: #bbb;
}
