/**
 * Admin Panel Premium Styles
 * Improved stat cards, activity logs, and UI enhancements
 */

/* ==================== PREMIUM STAT CARDS ==================== */
.premium-stat-card {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.9), rgba(30, 41, 59, 0.6));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 25px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.premium-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--card-gradient, linear-gradient(90deg, #8b5cf6, #6366f1));
    border-radius: 20px 20px 0 0;
}

.premium-stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, var(--card-glow, rgba(139, 92, 246, 0.1)) 0%, transparent 70%);
    pointer-events: none;
}

.premium-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 30px var(--card-glow, rgba(139, 92, 246, 0.15));
}

.premium-stat-card .stat-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 20px;
    background: var(--icon-bg, linear-gradient(135deg, #8b5cf6, #6366f1));
    box-shadow: 0 8px 20px var(--icon-shadow, rgba(139, 92, 246, 0.3));
}

.premium-stat-card .stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--value-gradient, linear-gradient(135deg, #fff, #e0e7ff));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
    line-height: 1;
}

.premium-stat-card .stat-label {
    font-size: 0.85rem;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 600;
}

/* Stat card color variants */
.premium-stat-card.purple {
    --card-gradient: linear-gradient(90deg, #8b5cf6, #a78bfa);
    --card-glow: rgba(139, 92, 246, 0.15);
    --icon-bg: linear-gradient(135deg, #8b5cf6, #a78bfa);
    --icon-shadow: rgba(139, 92, 246, 0.4);
}

.premium-stat-card.cyan {
    --card-gradient: linear-gradient(90deg, #06b6d4, #22d3ee);
    --card-glow: rgba(6, 182, 212, 0.15);
    --icon-bg: linear-gradient(135deg, #06b6d4, #22d3ee);
    --icon-shadow: rgba(6, 182, 212, 0.4);
}

.premium-stat-card.green {
    --card-gradient: linear-gradient(90deg, #22c55e, #4ade80);
    --card-glow: rgba(34, 197, 94, 0.15);
    --icon-bg: linear-gradient(135deg, #22c55e, #4ade80);
    --icon-shadow: rgba(34, 197, 94, 0.4);
}

.premium-stat-card.orange {
    --card-gradient: linear-gradient(90deg, #f59e0b, #fbbf24);
    --card-glow: rgba(245, 158, 11, 0.15);
    --icon-bg: linear-gradient(135deg, #f59e0b, #fbbf24);
    --icon-shadow: rgba(245, 158, 11, 0.4);
}

.premium-stat-card.red {
    --card-gradient: linear-gradient(90deg, #ef4444, #f87171);
    --card-glow: rgba(239, 68, 68, 0.15);
    --icon-bg: linear-gradient(135deg, #ef4444, #f87171);
    --icon-shadow: rgba(239, 68, 68, 0.4);
}

/* Stat cards grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

/* ==================== CLEAR LOGS BUTTON ==================== */
.clear-logs-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    border: none;
    color: white;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}

.clear-logs-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4);
}

.clear-logs-btn:active {
    transform: translateY(0);
}

.clear-logs-btn i {
    font-size: 16px;
}

/* ==================== ACTIVITY TABLE ==================== */
.activity-table {
    width: 100%;
    border-collapse: collapse;
}

.activity-table th {
    text-align: left;
    padding: 15px 20px;
    background: rgba(15, 23, 42, 0.5);
    color: #94a3b8;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-table td {
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: #e2e8f0;
    font-size: 14px;
}

.activity-table tr:hover td {
    background: rgba(139, 92, 246, 0.05);
}

.activity-table .user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.activity-table .user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(139, 92, 246, 0.3);
}

.activity-table .user-name {
    font-weight: 600;
    color: #f8fafc;
}

.activity-table .user-email {
    font-size: 12px;
    color: #64748b;
}

.activity-table .action-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.activity-table .action-badge.login {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}

.activity-table .action-badge.create {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
}

.activity-table .action-badge.admin {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

.activity-table .action-badge.delete {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
}

/* ==================== MOBILE RESPONSIVE ==================== */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .premium-stat-card {
        padding: 20px;
    }

    .premium-stat-card .stat-value {
        font-size: 1.8rem;
    }

    .premium-stat-card .stat-icon {
        width: 44px;
        height: 44px;
        font-size: 1.2rem;
        margin-bottom: 15px;
    }

    .activity-table {
        font-size: 13px;
    }

    .activity-table th,
    .activity-table td {
        padding: 12px 15px;
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}