/* System Status Dashboard Styles - Exact copy of Music Upload Debugger */
.system-status-dashboard {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 600px;
    max-height: 70vh;
    background: rgba(0, 0, 0, 0.95);
    border: 2px solid #00ff9f;
    border-radius: 8px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: #00ff9f;
    z-index: 99999;
    box-shadow: 0 8px 32px rgba(0, 255, 159, 0.3);
    backdrop-filter: blur(10px);
    display: none;
}

.system-status-dashboard.visible {
    display: block;
}

.system-status-dashboard.minimized .system-dashboard-content {
    display: none;
}

.system-dashboard-header {
    background: linear-gradient(135deg, #001a0f, #003d24);
    padding: 10px 15px;
    border-bottom: 1px solid #00ff9f;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
    border-radius: 6px 6px 0 0;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    transition: background 0.2s ease;
}

.system-dashboard-header:hover {
    background: linear-gradient(135deg, #002515, #004d2b);
}

.system-dashboard-header:active {
    background: linear-gradient(135deg, #003020, #005d35);
}

.system-dashboard-header h3 {
    margin: 0;
    font-size: 14px;
    color: #00ff9f;
    text-shadow: 0 0 10px rgba(0, 255, 159, 0.5);
}

.dashboard-controls {
    display: flex;
    gap: 5px;
}

.dashboard-controls button {
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid #00ff9f;
    color: #00ff9f;
    padding: 2px 8px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.3s ease;
}

.dashboard-controls button:hover {
    background: rgba(0, 255, 159, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
}

.system-dashboard-content {
    max-height: 60vh;
    overflow-y: auto;
    padding: 0;
}

.dashboard-tabs {
    display: flex;
    background: rgba(0, 255, 159, 0.05);
    border-bottom: 1px solid #00ff9f;
}

.dashboard-tab {
    flex: 1;
    padding: 8px 15px;
    background: transparent;
    border: none;
    color: #00ff9f;
    cursor: pointer;
    font-size: 12px;
    border-right: 1px solid rgba(0, 255, 159, 0.2);
    transition: all 0.3s ease;
}

.dashboard-tab:last-child {
    border-right: none;
}

.dashboard-tab:hover {
    background: rgba(0, 255, 159, 0.1);
}

.dashboard-tab.active {
    background: rgba(0, 255, 159, 0.2);
    text-shadow: 0 0 5px rgba(0, 255, 159, 0.8);
}

.dashboard-tab-content {
    display: none;
    padding: 15px;
    max-height: 50vh;
    overflow-y: auto;
}

.dashboard-tab-content.active {
    display: block;
}

.debug-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.debug-table td {
    padding: 4px 8px;
    border: 1px solid rgba(0, 255, 159, 0.2);
    vertical-align: top;
}

.debug-table td:first-child {
    font-weight: bold;
    background: rgba(0, 255, 159, 0.05);
    width: 150px;
}

.system-info h4 {
    margin: 0 0 10px 0;
    color: #00ff9f;
    text-shadow: 0 0 5px rgba(0, 255, 159, 0.5);
    font-size: 14px;
}

.status-message-item {
    background: rgba(0, 255, 159, 0.05);
    border: 1px solid rgba(0, 255, 159, 0.2);
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
}

.status-message-item h5 {
    margin: 0 0 5px 0;
    color: #00ff9f;
    font-size: 12px;
}

.status-property {
    display: flex;
    justify-content: space-between;
    margin: 2px 0;
    font-size: 10px;
}

.status-property .label {
    color: #888;
}

.status-property .value {
    color: #00ff9f;
}

/* Scrollbar styling */
.system-dashboard-content::-webkit-scrollbar,
.dashboard-tab-content::-webkit-scrollbar {
    width: 6px;
}

.system-dashboard-content::-webkit-scrollbar-track,
.dashboard-tab-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.3);
}

.system-dashboard-content::-webkit-scrollbar-thumb,
.dashboard-tab-content::-webkit-scrollbar-thumb {
    background: rgba(0, 255, 159, 0.5);
    border-radius: 3px;
}

.system-dashboard-content::-webkit-scrollbar-thumb:hover,
.dashboard-tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 255, 159, 0.7);
}

/* Status colors */
.status-operational {
    background: rgba(40, 167, 69, 0.1);
    border-left: 3px solid #28a745;
}

.status-operational .label {
    color: #28a745;
}

.status-degraded {
    background: rgba(255, 193, 7, 0.1);
    border-left: 3px solid #ffc107;
}

.status-degraded .label {
    color: #ffc107;
}

.status-outage {
    background: rgba(220, 53, 69, 0.1);
    border-left: 3px solid #dc3545;
}

.status-outage .label {
    color: #dc3545;
}

.status-maintenance {
    background: rgba(0, 123, 255, 0.1);
    border-left: 3px solid #007bff;
}

.status-maintenance .label {
    color: #007bff;
}

/* Diagnostic Controls */
.diagnostic-controls {
    margin-top: 15px;
}

.debug-button {
    background: rgba(0, 255, 159, 0.1);
    border: 1px solid #00ff9f;
    color: #00ff9f;
    padding: 8px 15px;
    margin: 5px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.3s ease;
}

.debug-button:hover:not(:disabled) {
    background: rgba(0, 255, 159, 0.2);
    box-shadow: 0 0 10px rgba(0, 255, 159, 0.3);
}

.debug-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* System Status Messages */
.status-messages {
    margin-top: 15px;
}

.status-message {
    display: flex;
    margin-bottom: 3px;
    padding: 8px;
    border-radius: 3px;
    font-size: 11px;
    line-height: 1.4;
    word-break: break-word;
}

.status-message .timestamp {
    color: #888;
    margin-right: 8px;
    min-width: 80px;
    flex-shrink: 0;
    font-size: 10px;
}

.status-message .status-type {
    font-weight: bold;
    margin-right: 8px;
    min-width: 80px;
    flex-shrink: 0;
}

.status-message .message-text {
    flex: 1;
}

/* Library content */
.library-content {
    background: rgba(0, 255, 159, 0.05);
    border: 1px solid rgba(0, 255, 159, 0.2);
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
}

.library-item {
    background: rgba(0, 255, 159, 0.05);
    border: 1px solid rgba(0, 255, 159, 0.2);
    border-radius: 5px;
    padding: 10px;
    margin: 5px 0;
}

.library-item h5 {
    margin: 0 0 5px 0;
    color: #00ff9f;
    font-size: 12px;
}

.library-item .item-meta {
    color: #888;
    font-size: 10px;
    margin-bottom: 5px;
}

.library-item .item-description {
    font-size: 11px;
    line-height: 1.3;
}

/* Empty state */
.empty-library {
    text-align: center;
    padding: 30px;
    color: #888;
    font-style: italic;
    font-size: 11px;
}

/* System info grid for dashboard */
.system-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.system-metric {
    background: rgba(0, 255, 159, 0.05);
    border: 1px solid rgba(0, 255, 159, 0.2);
    padding: 8px;
    border-radius: 3px;
}

.system-metric-label {
    color: #888;
    font-size: 10px;
    margin-bottom: 2px;
}

.system-metric-value {
    color: #00ff9f;
    font-size: 11px;
    font-weight: bold;
}

/* Notification Badge Styles */
.notification-badge {
    position: absolute;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    z-index: 10;
    animation: pulse 2s infinite;
}

/* Pulse animation for notification badge */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 8px rgba(255, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 68, 68, 0);
    }
}

/* Status-specific notification colors */
.notification-badge.operational {
    background-color: #00ff00;
    border: 1px solid #00ff00;
    box-shadow: 0 0 10px #00ff00;
    animation-name: pulse-green;
}

.notification-badge.degraded {
    background-color: #ffaa00;
    border: 1px solid #ffaa00;
    box-shadow: 0 0 10px #ffaa00;
    animation-name: pulse-orange;
}

.notification-badge.maintenance {
    background-color: #0088ff;
    border: 1px solid #0088ff;
    box-shadow: 0 0 10px #0088ff;
    animation-name: pulse-blue;
}

.notification-badge.outage {
    background-color: #ff4444;
    border: 1px solid #ff4444;
    box-shadow: 0 0 10px #ff4444;
    animation-name: pulse-red;
}

/* Color-specific pulse animations */
@keyframes pulse-green {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(0, 255, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 0, 0); }
}

@keyframes pulse-orange {
    0% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 170, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 170, 0, 0); }
}

@keyframes pulse-blue {
    0% { box-shadow: 0 0 0 0 rgba(0, 136, 255, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(0, 136, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 136, 255, 0); }
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 8px rgba(255, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 68, 68, 0); }
}

/* Dragging States */
.system-status-dashboard.dragging {
    z-index: 100000;
    box-shadow: 0 15px 50px rgba(0, 255, 159, 0.4);
    transform: scale(1.02);
    transition: none;
}

.system-status-dashboard.dragging .system-dashboard-header {
    background: linear-gradient(135deg, #003020, #005d35);
    box-shadow: 0 0 20px rgba(0, 255, 159, 0.3);
}

.dashboard-dragging {
    cursor: move !important;
}

.dashboard-dragging * {
    cursor: move !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
}

/* Smooth transitions when not dragging */
.system-status-dashboard:not(.dragging) {
    transition: all 0.3s ease;
}

/* Prevent text selection on buttons during drag */
.dashboard-controls button {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Mobile touch improvements */
@media (max-width: 768px) {
    .system-status-dashboard {
        width: 95vw;
        max-width: 500px;
        left: 2.5vw !important;
        right: auto !important;
    }
    
    .system-dashboard-header {
        padding: 12px;
        touch-action: none;
    }
}
