/**
 * SignalR Real-Time UI Styles
 */

/* Toast Notifications */
.signalr-toast {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
    min-width: 300px;
    max-width: 400px;
    animation: slideInRight 0.3s ease;
}

.signalr-toast i {
    font-size: 20px;
}

.signalr-toast.toast-success {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.signalr-toast.toast-error {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.signalr-toast.toast-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}

.signalr-toast.toast-info {
    background: linear-gradient(135deg, #a8edea 0%, #fed6e3 100%);
    color: #333;
}

/* Online Users */
.online-users-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.online-users-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.online-users-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
}

#online-users-count {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.online-user-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 8px;
    transition: background 0.2s;
}

.online-user-item:hover {
    background: #f3f4f6;
}

.user-avatar {
    position: relative;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.online-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.user-info {
    flex: 1;
}

.user-email {
    font-size: 14px;
    font-weight: 500;
    color: #111827;
}

.user-duration {
    font-size: 12px;
    color: #6b7280;
}

/* Day Status */
.day-status-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-left: 4px solid;
}

.day-status-card.status-open {
    border-left-color: #10b981;
}

.day-status-card.status-closed {
    border-left-color: #ef4444;
}

.status-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
}

.status-open .status-icon {
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    color: #f59e0b;
}

.status-closed .status-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    color: #3b82f6;
}

.status-info h5 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.status-info p {
    margin: 5px 0;
    font-size: 13px;
    color: #6b7280;
}

/* Activity Feed */
.activity-feed {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-height: 500px;
    overflow-y: auto;
}

.activity-log-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background 0.2s;
    border-left: 3px solid transparent;
}

.activity-log-item:hover {
    background: #f9fafb;
}

.log-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: white;
}

.log-icon.login {
    background: linear-gradient(135deg, #10b981, #059669);
}

.log-icon.logout {
    background: linear-gradient(135deg, #6b7280, #4b5563);
}

.log-icon.transaction {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
}

.log-icon.loan {
    background: linear-gradient(135deg, #f59e0b, #d97706);
}

.log-icon.member {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
}

.log-icon.security {
    background: linear-gradient(135deg, #ef4444, #dc2626);
}

.log-icon.system {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
}

.log-content {
    flex: 1;
}

.log-content p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: #111827;
}

.log-content small {
    font-size: 12px;
    color: #9ca3af;
}

/* Real-time Status Badge */
.realtime-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.realtime-status.connected {
    background: #d1fae5;
    color: #065f46;
}

.realtime-status.disconnected {
    background: #fee2e2;
    color: #991b1b;
}

.realtime-status.reconnecting {
    background: #fef3c7;
    color: #92400e;
}

.realtime-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
}

.connected .realtime-indicator {
    animation: pulse 2s infinite;
}

/* Pending Approvals Badge */
.badge-important {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
}

/* Animations */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fade-in {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fade-in 0.3s ease;
}

.fade-out {
    animation: fade-in 0.3s ease reverse;
}

/* Real-time Dashboard Widgets */
.realtime-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.realtime-widget:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.widget-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.widget-title {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.widget-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 20px;
}

.widget-value {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin: 10px 0;
}

.widget-change {
    font-size: 13px;
    font-weight: 500;
}

.widget-change.positive {
    color: #10b981;
}

.widget-change.negative {
    color: #ef4444;
}

/* Connection Status Indicator (Top Bar) */
.connection-status {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 10000;
    background: #10b981;
    transition: background 0.3s;
}

.connection-status.disconnected {
    background: #ef4444;
}

.connection-status.reconnecting {
    background: #f59e0b;
    animation: pulse 1s infinite;
}

/* Scrollbar for Activity Feed */
.activity-feed::-webkit-scrollbar {
    width: 6px;
}

.activity-feed::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 3px;
}

.activity-feed::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 3px;
}

/* Responsive */
@media (max-width: 768px) {
    .signalr-toast {
        right: 10px;
        min-width: 280px;
        max-width: calc(100vw - 20px);
    }

    .realtime-widget {
        padding: 15px;
    }

    .widget-value {
        font-size: 24px;
    }

    .day-status-card {
        flex-direction: column;
        text-align: center;
    }
}

