* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f4f6f8;
    color: #1f2937;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 40px;
    background: #111827;
    color: white;
}

.header h1 {
    margin: 0;
    font-size: 26px;
}

.header p {
    margin: 6px 0 0;
    color: #9ca3af;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.system-status.system-offline {
    color: #fca5a5;
}

.status-dot {
    width: 10px;
    height: 10px;
    background: #22c55e;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.5);
}

.status-dot.offline-dot {
    background: #ef4444;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

.dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.stream-card {
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-header h2 {
    margin: 0;
    font-size: 20px;
}

.badge {
    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.online {
    background: #dcfce7;
    color: #166534;
}

.warning {
    background: #fef3c7;
    color: #92400e;
}

.stalled {
    background: #ffedd5;
    color: #9a3412;
}

.offline {
    background: #fee2e2;
    color: #991b1b;
}

.stream-info {
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    color: #6b7280;
    font-size: 14px;
}

.stream-info p {
    margin: 0;
}

.stream-meta {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #6b7280;
    font-size: 12px;
}

.stream-meta strong {
    color: #374151;
    font-weight: 600;
}

.loading-state,
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: #6b7280;
}

footer {
    text-align: center;
    padding: 30px;
    color: #9ca3af;
}

@media (max-width: 700px) {
    .header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .dashboard {
        grid-template-columns: 1fr;
    }

    .stream-info,
    .stream-meta {
        flex-direction: column;
        gap: 8px;
    }
}
