/* =========================================================================
   1. GLOBAL & LAYOUT
   ========================================================================= */
#main-content {
    min-height: 100vh;
    padding: 0 !important;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.content {
    padding: 20px;
}

/* Sidebar Styling */
.sidebar {
    height: 100vh;
    min-width: 250px;
    max-width: 250px;
    background-color: #161b22;
    border-right: 1px solid #30363d;
    padding-top: 20px;
    z-index: 1000;
}

.sidebar .nav-link {
    color: #f8f9fa;
}

.sidebar .nav-link.active {
    background-color: #007bff;
    color: white;
}

/* Form Controls Dark Mode Fix */
.form-control {
    background-color: #0d1117 !important;
    border-color: #30363d !important;
    color: #f0f6fc !important;
}

.form-control:focus {
    background-color: #0d1117 !important;
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.3) !important;
}

/* =========================================================================
   2. THEMES (Dashboard vs Management)
   ========================================================================= */
/* Dashboard Theme: Pitch Black */
.theme-dashboard {
    background-color: #0d1117 !important;
    color: #ffffff !important;
}

/* Management Theme: Dark Slate */
.theme-management {
    background-color: #1a1d21 !important;
    color: #e6edf3 !important;
}

/* Management Table Refinements */
.theme-management .table thead.thead-light th {
    background-color: #161b22 !important;
    color: #8b949e !important;
    border-bottom: 1px solid #30363d !important;
    border-top: none;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.theme-management .table td {
    border-color: #30363d !important;
    color: #c9d1d9;
}

.theme-management .table-hover tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.03) !important;
    color: #fff;
}

/* Management List Group Styling */
.theme-management .list-group-item {
    background-color: transparent !important;
    color: #c9d1d9 !important;
    border-color: #30363d !important;
}

.theme-management .list-group-item-action:hover {
    background-color: rgba(255, 255, 255, 0.05) !important;
    color: #fff !important;
}

.theme-management .list-group-item.active {
    background-color: #1f6feb !important;
    border-color: #388bfd !important;
    color: #ffffff !important;
}

.theme-management .badge-secondary {
    background-color: #30363d !important;
    color: #8b949e !important;
}

/* =========================================================================
   3. COMPONENTS (Health, Events, Assets)
   ========================================================================= */
/* Health Timeline & Bits */
.health-timeline {
    display: flex;
    gap: 3px;
    align-items: center;
    min-height: 20px;
}

.health-bit {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

.bit-blue   { background-color: #0084ff; box-shadow: 0 0 3px rgba(0,132,255,0.5); }
.bit-yellow { background-color: #ffcc00; }
.bit-black  { background-color: #000000; border: 1px solid #444; }

/* Status Indicators (Glows) */
.status-glow {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.glow-online  { background-color: #2ea043; box-shadow: 0 0 8px #2ea043; }
.glow-offline { background-color: #da3633; box-shadow: 0 0 8px #da3633; }

/* Asset Library Cards */
.asset-card {
    background-color: #21262d;
    border: 1px solid #30363d;
    border-radius: 6px;
    transition: transform 0.2s, border-color 0.2s;
    color: #e6edf3;
}
.asset-card:hover {
    border-color: #8b949e;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5);
}
.asset-card .card-footer {
    background-color: #161b22;
    border-top: 1px solid #30363d;
}
.asset-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #c9d1d9;
}

/* Event Logs */
.event-log-container { padding: 10px; }
.event-row {
    display: flex;
    justify-content: space-between;
    padding: 10px;
    border-bottom: 1px solid #333;
    transition: background 0.2s;
}
.event-row:hover { background: #222; }
.event-label {
    font-weight: bold;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
}
.event-label i { margin-right: 8px; width: 16px; text-align: center; }

/* Modal Adjustments */
#assetTransferModal .modal-body { background-color: #0d1117; }
#assetTransferModal .list-group-item {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}
#assetTransferModal .list-group-item:hover { background-color: #1f6feb22 !important; }
#assetTransferModal .modal-footer {
    background-color: #161b22 !important;
    border-top: 1px solid #30363d;
}

/* Sortable/Drag Handles */
.handle { padding: 5px; color: #484f58; cursor: grab; }
.handle:hover { color: #58a6ff; }
#sortable-playlist-items .list-group-item { cursor: grab; }

/* =========================================================================
   4. UTILITIES & ANIMATIONS
   ========================================================================= */
@keyframes pulse-opacity {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
.pulse-animation { animation: pulse-opacity 2s infinite ease-in-out; }

/* Text Visibility */
.text-primary { color: #00a2ff !important; }
.text-warning { color: #ffcc00 !important; }
.text-danger  { color: #ff4444 !important; }

.status-text-blue   { color: #00a2ff; }
.status-text-yellow { color: #ffcc00; }
.status-text-black  { color: #ff4444; }

/* Pulsing effect for the active status dot */
.pulse-blue {
    animation: pulse-blue-glow 2s infinite;
    text-shadow: 0 0 5px rgba(23, 162, 184, 0.5);
}

@keyframes pulse-blue-glow {
    0% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.85); }
    100% { opacity: 1; transform: scale(1); }
}
.extra-small {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}