body {
    font-family: 'Roboto', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 20px;
}

h2,
h3 {
    color: #333;
}

.card {
    background-color: white;
    padding: 16px;
    margin-bottom: 20px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

label {
    display: inline-block;
    /*width: 200px;*/
    margin-bottom: 8px;
    color: #444;
}

input {
    padding: 6px;
    margin-bottom: 10px;
    border-radius: 6px;
    border: 1px solid #ccc;
    width: calc(100% - 170px);
}

button,
input[type=submit] {
    padding: 8px 16px;
    background-color: #007bff;
    border: none;
    color: white;
    border-radius: 6px;
    cursor: pointer;
}

button:hover,
input[type=submit]:hover {
    background-color: #0056b3;
}

.flex-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 600px) {
    label {
        display: block;
        width: 100%;
        margin-bottom: 4px;
    }

    input,
    button {
        width: 100%;
        margin-top: 10px;
    }
}

.status-label {
    font-weight: bold;
    padding: 4px 8px;
    border-radius: 5px;
    color: white;
}

.on {
    background-color: green;
}

.off {
    background-color: red;
}

.navbar {
    background-color: #007bff;
    padding: 10px 0;
    margin-bottom: 20px;
    border-radius: 8px;
}

.navbar ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.navbar li {
    margin: 0 15px;
}

.navbar a {
    color: white;
    text-decoration: none;
    font-weight: bold;
}

.navbar a:hover {
    text-decoration: underline;
}

label[for="data"] {
    display: block;
    margin-bottom: 4px;
    /* riduce lo spazio sotto l'etichetta */
    font-size: 16px;
}

#data {
    font-size: 30px;
    padding: 8px 12px;
    width: 200px;
    margin-top: 0;
}

canvas {
		-moz-user-select: none;
		-webkit-user-select: none;
		-ms-user-select: none;
	}

.grafico-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px auto;
    position: relative;
    touch-action: none;
}

.grafico-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.grafico-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.btn-reset {
    padding: 4px 12px;
    font-size: 14px;
    background-color: #1d73c4;
    border: 1px solid #bbb;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-reset:hover {
    background-color: #d0d0d0;
}

.success-message {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 10px;
    margin: 15px 0;
    border-radius: 5px;
    font-family: Roboto, sans-serif;
}

.btn-mode {
    font-size: 16px;      /* aumenta dimensione testo */
    padding: 12px 24px;   /* aumenta il bottone */
    font-weight: bold;
    margin-right: 10px;
    cursor: pointer;
    border-radius: 6px;
    background-color: #007bff;
    color: white;
    border: none;
    transition: background-color 0.2s;
}

.btn-mode:hover {
    background-color: #0056b3;
}

.btn-toggle {
    font-size: 20px;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    background-color: #28a745;
    color: white;
    border: none;
    transition: background-color 0.2s;
}

.btn-toggle:disabled {
    background-color: gray;
    cursor: not-allowed;
    color: #ccc;
}

.status-label {
    font-size: 20px;
    font-weight: bold;
    /*color: #007bff;*/
}