/* ============================================================
   REAL-TIME MONITORING STYLES
============================================================ */

/* Time Display */
.time-display {
    font-family: 'Courier New', monospace;
}

.time-display .time {
    font-size: 2.5rem;
    font-weight: bold;
    line-height: 1;
    color: var(--bs-primary);
}

.time-display .date {
    font-size: 1rem;
    color: var(--bs-secondary);
    margin-top: 0.25rem;
}

/* Stat Cards */
.stat-card {
    border-radius: 12px;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.stat-card .stat-icon {
    opacity: 0.8;
}

/* Attendance Stream */
.attendance-stream {
    height: 600px;
    overflow-y: auto;
    background: var(--bs-body-bg);
    border-radius: 8px;
}

.stream-item {
    padding: 12px 16px;
    border-bottom: 1px solid var(--bs-border-color);
    animation: slideIn 0.3s ease;
    transition: background-color 0.2s ease;
}

.stream-item:hover {
    background-color: rgba(0,0,0,0.02);
}

.stream-item.new {
    background-color: rgba(25, 135, 84, 0.05);
    border-left: 4px solid var(--bs-success);
}

.stream-item.late {
    background-color: rgba(255, 193, 7, 0.05);
    border-left: 4px solid var(--bs-warning);
}

.stream-item.unknown {
    background-color: rgba(108, 117, 125, 0.05);
    border-left: 4px solid var(--bs-secondary);
}

.stream-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bs-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.stream-content {
    flex: 1;
}

.stream-time {
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    color: var(--bs-secondary);
}

.stream-placeholder {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--bs-secondary);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 200px;
}

/* Activity List */
.activity-list {
    max-height: 300px;
    overflow-y: auto;
}

.activity-item {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid var(--bs-border-color);
    align-items: center;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    margin-right: 12px;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-text {
    font-size: 0.9rem;
    margin-bottom: 2px;
}

.activity-time {
    font-size: 0.75rem;
    color: var(--bs-secondary);
}

/* WebSocket Status */
.websocket-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgba(0,0,0,0.8);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 1000;
    backdrop-filter: blur(10px);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--bs-warning);
    animation: pulse 2s infinite;
}

.status-dot.connected {
    background: var(--bs-success);
    animation: none;
}

.status-dot.disconnected {
    background: var(--bs-danger);
    animation: none;
}

/* Animations */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes highlight {
    0% {
        background-color: rgba(25, 135, 84, 0.2);
    }
    100% {
        background-color: transparent;
    }
}

.highlight {
    animation: highlight 2s ease;
}

/* Dark Mode Adjustments */
html.dark .stat-card {
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

html.dark .stream-item:hover {
    background-color: rgba(255,255,255,0.05);
}

html.dark .websocket-status {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

/* Responsive */
@media (max-width: 768px) {
    .time-display .time {
        font-size: 2rem;
    }
    
    .attendance-stream {
        height: 300px;
    }
    
    .websocket-status {
        bottom: 10px;
        right: 10px;
        left: 10px;
        justify-content: center;
    }
}