/* RTIndustry Site Manager - Styles */

body {
    background-color: #f8f9fa;
    font-size: 0.9rem;
}

.sidebar {
    position: sticky;
    top: 56px;
    height: calc(100vh - 56px);
    border-right: 1px solid #343a40;
}

.sidebar .nav-link {
    padding: 0.6rem 1rem;
    border-radius: 0.25rem;
    margin: 2px 0.5rem;
}

.sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar .nav-link.active {
    background-color: #0d6efd !important;
    color: white !important;
}

.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.card-header {
    background-color: #f8f9fa;
    font-weight: 600;
    font-size: 0.85rem;
}

.table th {
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #6c757d;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
    font-size: 0.85rem;
}

/* Status badges */
.badge-online { background-color: #198754; }
.badge-offline { background-color: #6c757d; }
.badge-warning { background-color: #ffc107; color: #000; }
.badge-error { background-color: #dc3545; }
.badge-deactivated { background-color: #343a40; color: #adb5bd; border: 1px dashed #6c757d; }
.badge-active { background-color: #198754; }
.badge-expired { background-color: #dc3545; }
.badge-suspended { background-color: #ffc107; color: #000; }
.badge-revoked { background-color: #6c757d; }

/* Event type badges */
.badge-license_activated { background-color: #198754; }
.badge-license_expired { background-color: #dc3545; }
.badge-license_suspended { background-color: #ffc107; color: #000; }
.badge-installation_registered { background-color: #0d6efd; }
.badge-installation_online { background-color: #198754; }
.badge-installation_offline { background-color: #6c757d; }
.badge-heartbeat_missing { background-color: #fd7e14; }
.badge-info { background-color: #0dcaf0; color: #000; }

.license-key {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    letter-spacing: 1px;
    font-size: 0.85rem;
}

.chart-placeholder {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.chart-bar {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.chart-bar-label {
    width: 100px;
    font-size: 0.8rem;
    text-transform: capitalize;
}

.chart-bar-fill {
    height: 24px;
    border-radius: 4px;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    transition: width 0.3s ease;
}

.clickable { cursor: pointer; }
.clickable:hover { background-color: #e9ecef; }

.stat-card { transition: transform 0.15s ease, box-shadow 0.15s ease; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important; }

.copy-btn {
    cursor: pointer;
    opacity: 0.5;
}
.copy-btn:hover { opacity: 1; }

/* Pagination */
.pagination-info {
    font-size: 0.85rem;
    color: #6c757d;
}

/* Role badges nella navbar */
#navRole {
    font-size: 0.7rem;
    letter-spacing: 0.5px;
}

/* Offcanvas mobile nav */
#sidebarOffcanvas .nav-link { padding: 0.75rem 1.25rem; font-size: 1rem; }
#sidebarOffcanvas .nav-link:hover { background-color: rgba(255,255,255,0.1); }
#sidebarOffcanvas .nav-link.active { background-color: #0d6efd !important; border-radius: 0.25rem; margin: 2px 0.5rem; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { display: none !important; }
    main { padding: 1rem !important; }
}
