/* Stile Light Mode (predefinito) */
body {
    background-color: #f8f9fa;
    color: #212529;
    padding-right: 0px!important;
}

.img-logo-spottime{
	height: 50px;
	width: 100px;
}

.img-logo-spottime a{
    width: 100%;
    height: 100%;
	background: url("https://spottime.tenacegames.it/assets/img/logo_spottime.webp") center center no-repeat;
    background-size: contain;
    padding: 0;
    text-indent: -9999px;
}

/*------------- INIZIO MODALE -------------*/
.modal {
    top:0px;
    padding-right: 0px !important;
    z-index: 10000;
}
.modal-header {
    color: #fff;
    text-transform: uppercase;
    background: #0a2f6c;
}
.modal-header .close {
    float: right;
    color: #ffffff;
    text-shadow: none;
    opacity: 1;
}
.modal-backdrop {
    z-index: 9999;
}

@media (min-width: 576px) {
    .modal-dialog {
        max-width: 65%;
    }
}

@media (min-width: 768px) {
    .modal {
        top: 70px;
    }
    .modal-notifica {
        max-width: 75%;
    }
}
/*------------- FINE MODALE -------------*/
.footer {
    background-color: #0a2f6c;
    border-top: 3px solid #ffc107;
    color: #ffffff;
    padding: 28px 16px 24px;
}

.footer-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.footer-tagline {
    color: #a6a6a6;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.footer-links {
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.footer-links a {
    color: #ffc107;
    text-decoration: none;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.footer-sep {
    margin: 0 8px;
    color: #a6a6a6;
}

.footer-copy {
    color: #a6a6a6;
    font-size: 0.9rem;
}
.dark-mode .img-logo-spottime a{
	background: url("https://spottime.tenacegames.it/assets/img/logo_spottime_chiaro.webp") center center no-repeat;
    background-size: contain;
}

h2 {
    padding-left: 10px;
    text-transform: uppercase;
    text-align: center;
    background-color: #0a2f6c;
    color: white;
    padding: 10px;
    font-size: 1.5rem;
}

.navbar {
    background-color: #ffffff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0px;
    z-index: 9999;
}

.navbar-brand, .nav-link {
    color: #212529 ;
}

/* Stile DARK MODE */
body.dark-mode {
    background-color: #222;
    color: #e0e0e0;
}

.dark-mode h2 {
    background-color: #FFC107;
    color: #333;
}

.dark-mode li {
    background-color: #333;
    color: #fff;
}

.dark-mode .list-group-item {
    border: 1px solid rgb(251 230 65 / 52%);
}


/* MENU*/
.navbar.dark-mode {
    background-color: #343a40 !important;
}

.dark-mode .navbar-brand, .dark-mode .nav-link {
    color: #e0e0e0 !important;
}

/* Personalizzazione degli elementi in base alla modalità */
.navbar {
    transition: background-color 0.3s ease;
}

body, .navbar, .nav-link {
    transition: background-color 0.3s, color 0.3s ease;
}

.btn-info .badge {
    position: absolute;
    top: -10px;
    right: -8px;
    font-size: 12px;
}

/* Stile per i link attivi */
.nav-link.active {
    font-weight: bold;
    color: #007bff !important;
}

.container {
    max-width: 100%;
    padding: 15px;
}

/* TABELLE */

.table {
    vertical-align: middle;
    
    img {
        max-width: 178px;
    }
    td, th {
        padding: .75rem;
        vertical-align: middle;
        border-top: 1px solid #dee2e6;
        text-align: center;
    }
    td .fa {
        font-size: 2rem;
        font-weight: 600;
    }
    td .btn .fa {
        font-size: 1.4rem;
        font-weight: 400;
    }
}

.dark-mode table {
    color: #ffffff;
}

.group-header {
    background: rgba(10, 47, 108, 0.08);
    font-weight: 600;
    text-transform: uppercase;
}
.group-header-row td {
    border-bottom: 0;
}
.group-header-row {
    pointer-events: none;
}

.dark-mode .group-header {
    background: rgba(255, 193, 7, 0.15);
}

.drag-handle {
    cursor: grab;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.drag-handle:active {
    cursor: grabbing;
}

.tabelle {
    overflow: auto;
}

div.dataTables_wrapper div.dataTables_length select {
    min-width: 60px;
}

.dark-mode div.dataTables_wrapper div.dataTables_length select {
    color: #fff;
}

.dark-mode div.dataTables_wrapper div.dataTables_filter input {
    background: white;
}

table.dataTable thead th, table.dataTable thead td, table.dataTable tfoot th, table.dataTable tfoot td {
    text-align: center;
}

/* MESSAGGI ALERT */

.alert {
    position: absolute;
    left: 0px;
    right: 0px;
}

.card .alert {
    position: relative;
}

/* DASHBOARD */

.card {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    margin-bottom: 20px;
}

.dark-mode .card{
    background-color: #333;
}
.dark-mode #deviceStatusChart {
    color: #fff;
}

.card .card-title {
    font-size: 1.5rem;
    font-weight: bold;
    color: #0a2f6c !important;
}

#deviceStatusChart {
    max-width: 400px;
    max-height: 400px;
    margin: 0 auto;
}

.tot-device {
    font-size: xxx-large;
    font-weight: 800;
    padding: 15px;
    margin: 15px;
    border-radius: 10px;
}
.stato-device {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    min-width: 0;
    word-wrap: break-word;
    background-clip: border-box;
    border-radius: .25rem;
    font-weight: 700;
    border-radius: 8px;
    color: #fff;
    font-size: x-large;
    padding-bottom: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 10px;
    margin-bottom: 20px;
}
.online-color {
    background-color:#28a745;
}
.offline-color {
    background-color:#dc3545;
}
.manutenzione-color {
    background-color:#ffc107;
}
/* Mappa */
#map {
    border: 3px solid #0a2f6c;
    border-radius: 10px;
}

@media only screen and (min-width: 1600px) {
    .tot-device {
        margin: 15px 25%;
    }
}


.crm-metric-card .metric-icon, .metric-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

  .chart-300 {
    max-height: 300px;
    /*height: 300px;*/
  }

.store-menu-trigger {
    background: none;
    border: 0;
    padding: 0;
    color: #1d4ed8;
    cursor: pointer;
    font-weight: 600;
}

.store-menu-trigger:hover {
    text-decoration: underline;
}

.store-action-menu {
    position: absolute;
    min-width: 220px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    padding: 6px 0;
    z-index: 1050;
}

.store-action-menu .store-menu-item {
    display: block;
    padding: 8px 14px;
    color: #0f172a;
    text-decoration: none;
}

.store-action-menu .store-menu-item:hover {
    background: #f8fafc;
    color: #0f172a;
}

#editStoreForm small#geocode-status-message {
    color: #ff0000 !important;
    font-size: smaller;
    font-weight: 700;
}

.devices-preview {
    display: flex;
    flex-direction: column;
    gap: 6px;
    align-items: flex-start;
}

.device-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
}

.device-status-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    display: inline-block;
}

.device-status-online {
    background: #16a34a;
}

.device-status-offline {
    background: #dc2626;
}

.device-status-maintenance {
    background: #f59e0b;
}

.device-status-unknown {
    background: #9ca3af;
}

.device-license-badge {
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

.device-license-active {
    background: #dcfce7;
    color: #166534;
}

.device-license-expiring {
    background: #ffedd5;
    color: #9a3412;
}

.device-license-expired {
    background: #fee2e2;
    color: #991b1b;
}

.device-license-unknown {
    background: #e5e7eb;
    color: #374151;
}

.devices-more-trigger {
    background: none;
    border: 0;
    padding: 0;
    color: #2563eb;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.devices-more-trigger:hover {
    text-decoration: underline;
}

.devices-action-menu {
    position: absolute;
    min-width: 260px;
    max-width: 360px;
    max-height: 320px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.15);
    padding: 10px 12px;
    overflow-y: auto;
    z-index: 1050;
}

.devices-action-title {
    font-weight: 700;
    margin-bottom: 8px;
    color: #0f172a;
}

.cities-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
}

.cities-list li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.cities-list li:hover {
    background: linear-gradient(135deg, #0a2f6c 0%, #1a4d8f 100%);
    color: #ffffff;
    border-color: #0a2f6c;
    transform: translateX(2px);
}

.cities-list .city-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #0a2f6c 0%, #1a4d8f 100%);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 8px;
    padding: 0 0.5rem;
    box-shadow: 0 2px 6px rgba(10, 47, 108, 0.3);
    transition: all 0.3s ease;
}

.cities-list li:hover .city-count {
    background: #ffffff;
    color: #0a2f6c;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cities-list .city-name {
    flex: 1;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    transition: color 0.3s ease;
}

.cities-list li:hover .city-name {
    color: #ffffff;
}
