:root {
    --bs-body-bg: #061d34 !important;
    --bs-body-color: #e6f1ff !important;
    --bs-tertiary-bg: #0a2a4a !important;
    --bs-secondary-bg: #0e355c !important;
    --am3-conntable-header-bg-color: #045791 !important;
    --bs-table-bg: #0a2a4a !important;
    --bs-table-striped-bg: #0d3257 !important;
    --bs-table-hover-bg: #123f6d !important;
    --bs-table-color: #f1c40f !important;
    --bs-border-color: #123e6b !important;
    --bs-primary: #f1c40f !important;
    --am3-conntable-conn-keyed-bg-color: #006400 !important;
    --am3-conntable-conn-keyed-color: #f1c40f !important;
}

body {
    background-color: #061d34 !important;
    color: #e6f1ff !important;
}

.navbar {
    background-color: #041424 !important;
    border-bottom: 2px solid #045791 !important;
}

#sidebarMenu {
    background-color: #041424 !important;
    border-right: 2px solid #00d4ff !important;
}

#sidebarMenu a, #sidebarMenu .nav-link {
    color: #cbd5e1 !important;
    background: transparent !important;
}

#sidebarMenu a:hover, #sidebarMenu .nav-link:hover {
    color: #f1c40f !important;
    background-color: #0a2a4a !important;
}

/* --- INTESTAZIONI IN ALTO IN ROSSO --- */
.table thead th {
    color: #ff4d4d !important;
}

/* --- TUTTA LA TABELLA IN GIALLO --- */
.table, .table td, .table th, .table tr {
    color: #f1c40f !important;
}

.table a, .table td a, .table th a, .table-responsive a {
    color: #f1c40f !important;
    font-weight: bold !important;
}

.table a:hover {
    color: #ffffff !important;
    text-decoration: underline !important;
}

/* --- TRASMISSIONE (KEYED): VERDE SCURO CON TESTO GIALLO --- */
.table tr.table-keyed,
.table tr.table-keyed td,
.table tr.table-keyed a,
tr[class*="keyed"],
tr[class*="keyed"] td,
tr[class*="keyed"] a,
.bg-keyed,
.table-keyed {
    background-color: #006400 !important;
    color: #f1c40f !important;
}

/* --- OROLOGIO DIGITALE --- */
#orologio-digitale {
    background-color: #041424 !important;
    border: 2px solid #00bfff !important;
    border-radius: 6px !important;
    padding: 10px !important;
    text-align: center !important;
    margin-bottom: 15px !important;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2) !important;
}

.orologio-titolo {
    color: #cbd5e1 !important;
    font-size: 11px !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    margin-bottom: 4px !important;
}

#orologio-ora {
    color: #f1c40f !important;
    font-size: 22px !important;
    font-family: 'Courier New', Courier, monospace !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
}

/* --- PULSANTI SIDEBAR PERSONALIZZATI --- */
#sidebarMenu a[href*="jimdofree"],
#sidebarMenu a[href*="ysf.iq5qd.it"],
#sidebarMenu a[href*="79.137.85.89"],
#sidebarMenu a[href*="t.me"] {
    background-color: #00bfff !important;
    color: #ffffff !important;
    border: 2px solid #33ccff !important;
    font-weight: bold !important;
    margin-bottom: 6px !important;
    border-radius: 4px !important;
    display: block !important;
    padding: 8px 16px !important;
}

#sidebarMenu a[href*="jimdofree"]:hover,
#sidebarMenu a[href*="ysf.iq5qd.it"]:hover,
#sidebarMenu a[href*="79.137.85.89"]:hover,
#sidebarMenu a[href*="t.me"]:hover {
    background-color: #33ccff !important;
    color: #ffffff !important;
}

/* --- PULSANTE LOGIN --- */
#sidebarMenu #login-out-region button,
#sidebarMenu #login-out-region .bi,
#sidebarMenu a[href*="login"] {
    color: #ff3333 !important;
    border: 2px solid #ff3333 !important;
    background-color: #041424 !important;
    font-weight: bold !important;
    border-radius: 4px !important;
    display: block !important;
    margin-top: 15px !important;
    padding: 8px 16px !important;
    text-align: center !important;
}

#sidebarMenu #login-out-region button:hover,
#sidebarMenu #login-out-region .bi:hover,
#sidebarMenu a[href*="login"]:hover {
    color: #ffffff !important;
    background-color: #ff3333 !important;
}

/* --- MODALI E FINESTRE DI COMANDO --- */
.modal-content {
    background-color: #061d34 !important;
    color: #e6f1ff !important;
    border: 1px solid #045791 !important;
}

.modal-header, .modal-footer {
    background-color: #041424 !important;
    border-color: #045791 !important;
}

.modal-title {
    color: #f1c40f !important;
}

.btn-secondary,
.modal-footer .btn-secondary,
#cmd-exec-btn {
    background-color: #0a2a4a !important;
    border: 1px solid #045791 !important;
    color: #f1c40f !important;
}

.btn-secondary:hover,
.modal-footer .btn-secondary:hover,
#cmd-exec-btn:hover {
    background-color: #045791 !important;
    border-color: #00bfff !important;
    color: #ffffff !important;
}

.modal-body .form-control,
.modal-body .form-select {
    background-color: #0a2a4a !important;
    border: 1px solid #045791 !important;
    color: #e6f1ff !important;
}

.modal-body .form-select option {
    background-color: #061d34 !important;
    color: #e6f1ff !important;
}

/* --- CORREZIONE GEOMETRICA PURA PER LE ICONE DELLA TOOLBAR --- */
.btn.node-bi,
.btn-group .btn.node-bi,
.node-line-header .btn {
    background-color: #0a2a4a !important;
    border: 1px solid #045791 !important;
    border-radius: 6px !important;
    width: 38px !important;
    height: 34px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
}

.node-line-header .btn svg,
.btn.node-bi svg {
    width: 1em !important;
    height: 1em !important;
    font-size: 1.1rem !important;
    display: inline-block !important;
    overflow: visible !important;
    fill: currentColor !important;
}

.btn.node-bi:hover,
.node-line-header .btn:hover {
    background-color: #045791 !important;
    border-color: #00bfff !important;
}

/* --- MINI SYSTEM MONITOR & COPYRIGHT (SOTTO LA TABELLA) --- */
#raspberry-monitor {
    background-color: #041424 !important;
    border: 2px solid #00bfff !important;
    border-radius: 6px !important;
    padding: 12px !important;
    margin-top: 20px !important;
    margin-bottom: 15px !important;
    box-shadow: 0 0 10px rgba(0, 191, 255, 0.2) !important;
    text-align: center !important;
}

.monitor-titolo {
    color: #cbd5e1 !important;
    font-size: 12px !important;
    font-weight: bold !important;
    letter-spacing: 1px !important;
    margin-bottom: 8px !important;
    text-transform: uppercase !important;
}

.monitor-dati {
    display: flex !important;
    justify-content: space-around !important;
    flex-wrap: wrap !important;
    gap: 10px !important;
    color: #f1c40f !important;
    font-size: 14px !important;
    font-weight: bold !important;
}

.monitor-dati span {
    background-color: #0a2a4a !important;
    border: 1px solid #045791 !important;
    padding: 6px 12px !important;
    border-radius: 4px !important;
}

/* Stile per la sezione Copyright sotto al monitor */
.footer-copyright {
    text-align: center !important;
    color: #cbd5e1 !important;
    font-size: 12px !important;
    margin-bottom: 30px !important;
}

.footer-copyright a {
    color: #00bfff !important;
    text-decoration: none !important;
}

.footer-copyright a:hover {
    text-decoration: underline !important;
}
