/**
 * ═══════════════════════════════════════════════════════════════════════════
 * Layer 180: Sovereign Platform Control & Governance - Styling
 * ═══════════════════════════════════════════════════════════════════════════
 * 
 * Professional styling for the Sovereign Control Dashboard and governance UI
 */

/* ═══════════════════════════════════════════════════════════════════════════
   SOVEREIGN CONTROL DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */

.sovereign-dashboard {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: 2px solid rgba(79, 172, 254, 0.3);
    border-radius: 12px;
    padding: 20px;
    min-width: 320px;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.sovereign-dashboard.minimized {
    min-width: 60px;
    max-width: 60px;
    padding: 10px;
}

.sovereign-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(79, 172, 254, 0.2);
}

.sovereign-dashboard-title {
    font-size: 16px;
    font-weight: 600;
    color: #4facfe;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sovereign-dashboard-title::before {
    content: '👑';
    font-size: 18px;
}

.sovereign-toggle-btn {
    background: none;
    border: none;
    color: #4facfe;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
    transition: transform 0.2s ease;
}

.sovereign-toggle-btn:hover {
    transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PLATFORM STATUS INDICATOR
   ═══════════════════════════════════════════════════════════════════════════ */

.platform-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 8px;
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.status-indicator.nominal {
    background: #00ff88;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.5);
}

.status-indicator.warning {
    background: #ffa500;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.5);
}

.status-indicator.critical {
    background: #ff4444;
    box-shadow: 0 0 10px rgba(255, 68, 68, 0.5);
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    text-transform: capitalize;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GOVERNANCE STATS
   ═══════════════════════════════════════════════════════════════════════════ */

.governance-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.stat-card {
    background: rgba(0, 0, 0, 0.2);
    padding: 10px;
    border-radius: 6px;
    border-left: 3px solid;
}

.stat-card.decisions {
    border-left-color: #4facfe;
}

.stat-card.escalations {
    border-left-color: #ffa500;
}

.stat-card.overrides {
    border-left-color: #ff4444;
}

.stat-card.actions {
    border-left-color: #00ff88;
}

.stat-label {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   GOVERNANCE LOG
   ═══════════════════════════════════════════════════════════════════════════ */

.governance-log {
    max-height: 200px;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 6px;
    padding: 10px;
}

.governance-log::-webkit-scrollbar {
    width: 6px;
}

.governance-log::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.governance-log::-webkit-scrollbar-thumb {
    background: rgba(79, 172, 254, 0.5);
    border-radius: 3px;
}

.governance-log::-webkit-scrollbar-thumb:hover {
    background: rgba(79, 172, 254, 0.7);
}

.log-entry {
    font-size: 12px;
    padding: 8px;
    margin-bottom: 6px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    border-left: 3px solid;
}

.log-entry.info {
    border-left-color: #4facfe;
}

.log-entry.decision {
    border-left-color: #00ff88;
}

.log-entry.escalation {
    border-left-color: #ffa500;
}

.log-entry.override {
    border-left-color: #ff4444;
}

.log-timestamp {
    color: #888;
    font-size: 10px;
    margin-bottom: 4px;
}

.log-message {
    color: #e0e0e0;
    line-height: 1.4;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {
    .sovereign-dashboard {
        bottom: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }

    .governance-stats {
        grid-template-columns: 1fr;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   DARK MODE OPTIMIZATION
   ═══════════════════════════════════════════════════════════════════════════ */

@media (prefers-color-scheme: light) {
    .sovereign-dashboard {
        background: linear-gradient(135deg, #ffffff 0%, #f5f5f5 100%);
        color: #333;
        border-color: rgba(79, 172, 254, 0.5);
    }

    .log-message {
        color: #333;
    }
}