* { box-sizing: border-box; }
body { font-family: Arial, sans-serif; padding: 10px; background-color: #eef2f5; margin: 0; touch-action: manipulation; }
.container { max-width: 600px; margin: auto; background: white; padding: 15px; border-radius: 12px; box-shadow: 0px 4px 15px rgba(0,0,0,0.1); }
.login-box { padding: 20px 10px; text-align: center; }
.login-select { width: 100%; padding: 15px; font-size: 18px; font-weight: bold; border-radius: 8px; margin-bottom: 20px; border: 2px solid #ccd0d5; background: #fff; }
.login-input { width: 100%; padding: 15px; font-size: 24px; font-weight: bold; text-align: center; letter-spacing: 10px; border-radius: 8px; border: 2px solid #ccd0d5; margin-bottom: 20px; }
.alarm-banner { display: none; background-color: #fff3cd; color: #856404; border: 2px solid #ffeeba; padding: 15px; border-radius: 8px; font-weight: bold; margin-bottom: 15px; font-size: 15px; }
.alarm-item { margin-top: 5px; padding-left: 15px; color: #c23616; font-size: 16px; }
.macro-nav { display: none; width: 100%; margin-bottom: 15px; border-collapse: separate; border-spacing: 5px; }
.macro-btn { display: table-cell; text-align: center; padding: 14px; font-weight: bold; background: #dcdde1; border-radius: 8px; cursor: pointer; color: #2f3640; font-size: 13px; border: 1px solid #b2bec3; }
.macro-btn.active { background: #0097e6; color: white; border-color: #0086cc; }
h2 { text-align: center; margin: 10px 0; color: #2f3640; font-size: 22px; }
.panel { display: none; } .panel.active { display: block; }
.tab-sub { display: table; width: 100%; margin-bottom: 15px; border-collapse: separate; border-spacing: 5px; }
.tab-sub-cell { display: table-cell; text-align: center; padding: 15px 3px; font-size: 13px; font-weight: bold; border-radius: 8px; cursor: pointer; background: #f5f6fa; border: 2px solid #dcdde1; color: #2f3640; vertical-align: middle; }
.tab-sub-cell.active { background: #2f3640; color: white; border-color: #2f3640; }
table.TAB-REALE { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; background: white; }
table.TAB-REALE th { background: #2f3640; color: white; padding: 10px 4px; text-align: left; }
table.TAB-REALE td { padding: 12px 4px; border-bottom: 1px solid #dcdde1; font-weight: bold; line-height: 1.4; }
.badge { padding: 4px 6px; border-radius: 4px; color: white; display: inline-block; font-size: 11px; }
.b-pulito { background: #44bd32; } .b-uso { background: #e1b12c; } .b-sporco { background: #c23616; } .b-reso { background: #9c88ff; }
.item-row { display: table; width: 100%; padding: 12px 0; border-bottom: 2px solid #f5f6fa; }
.col-text { display: table-cell; width: 35%; font-size: 17px; font-weight: bold; color: #2f3640; vertical-align: middle; }
.col-ctrl { display: table-cell; width: 65%; text-align: right; vertical-align: middle; white-space: nowrap; }
button.btn-action { width: 46px; height: 46px; font-size: 24px; font-weight: bold; border: none; border-radius: 8px; cursor: pointer; color: white; vertical-align: middle; }
button.btn-speed { width: 48px; height: 46px; font-size: 14px; font-weight: bold; border: none; border-radius: 8px; cursor: pointer; color: white; vertical-align: middle; }
.btn-down { background-color: #c23616; } .btn-down-light { background-color: #e74c3c; opacity: 0.85; margin-right: 4px; }
.btn-up { background-color: #44bd32; } .btn-up-light { background-color: #2ecc71; opacity: 0.85; margin-left: 4px; }
.num-display { display: inline-block; font-size: 26px; font-weight: 900; width: 40px; text-align: center; vertical-align: middle; }
.btn-submit { width: 100%; padding: 20px; font-size: 20px; font-weight: bold; background-color: #0097e6; color: white; border: none; border-radius: 10px; margin-top: 20px; cursor: pointer; }
.box-input-utente { background: #f5f6fa; padding: 15px; border-radius: 8px; margin-top: 15px; border: 1px solid #ccd0d5; text-align: left; }
.box-input-utente label { display: block; font-weight: bold; margin-bottom: 5px; color: #2f3640; }
.box-input-utente input[type="text"] { width: 100%; padding: 10px; font-size: 16px; border-radius: 6px; border: 1px solid #ccc; margin-bottom: 12px; }
.check-permesso { display: block; margin-bottom: 8px; font-size: 14px; font-weight: bold; cursor: pointer; }
.overlay-message { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(68, 189, 50, 0.95); color: white; text-align: center; padding-top: 40%; z-index: 9999; }

/* Animazione per il Loader di rete */
.spinner {
    border: 8px solid #f3f3f3;
    border-top: 8px solid #0097e6; /* Richiama il blu dei tuoi bottoni */
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin: 20px auto; /* Centra lo spinner nel suo contenitore */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}