
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    min-height: 100vh;
}

.container-fluid {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    margin: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

h1 {
    background: linear-gradient(45deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    font-size: 2.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 700;
    font-size: 1.2rem;
    padding: 1.25rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card {
    text-align: center;
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.kpi-card:hover::before {
    transform: translateX(100%);
}

.kpi-card .card-body {
    padding: 2.5rem;
    position: relative;
    z-index: 1;
}

.kpi-card h5 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.kpi-card p {
    font-size: 2.5rem;
    font-weight: 900;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.kpi-card span {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

.best-agent {
    background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    color: white;
    position: relative;
}

.best-agent::after {
    content: '🏆';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    animation: bounce 2s infinite;
}

.worst-agent {
    background: linear-gradient(135deg, #ff416c 0%, #ff4b2b 100%);
    color: white;
    position: relative;
}

.worst-agent::after {
    content: '⚠️';
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 2rem;
    animation: pulse 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chart-container {
    position: relative; 
    height: 350px;
    padding: 1rem;
}

/* Enhanced Table Styling */
.table-container {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

.table {
    margin-bottom: 0;
    font-weight: 500;
}

.table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1.25rem 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
    position: relative;
}

.table thead th:first-child {
    border-top-left-radius: 16px;
}

.table thead th:last-child {
    border-top-right-radius: 16px;
}

.table tbody tr {
    transition: all 0.3s ease;
    border: none;
    position: relative;
}

.table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.table tbody tr.top:hover {
    background: linear-gradient(90deg, rgba(17, 153, 142, 0.15) 0%, rgba(56, 239, 125, 0.08) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(17, 153, 142, 0.2);
}

.table tbody tr.bottom:hover {
    background: linear-gradient(90deg, rgba(255, 65, 108, 0.15) 0%, rgba(255, 75, 43, 0.08) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(255, 65, 108, 0.2);
}

.table tbody td {
    padding: 1.25rem 1rem;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: middle;
}

/* Top Performers Styling */
.table tbody tr.top {
    background: linear-gradient(90deg, rgba(17, 153, 142, 0.08) 0%, rgba(56, 239, 125, 0.03) 100%);
    border-left: 4px solid #11998e;
    position: relative;
    z-index: 1;
}

.table tbody tr.top::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #11998e 0%, #38ef7d 100%);
    animation: glow 2s ease-in-out infinite alternate;
    z-index: 2;
}

.table tbody tr.top td:first-child {
    position: relative;
    padding-left: 3.5rem;
}

.table tbody tr.top td:first-child::before {
    content: '🥇';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    animation: sparkle 1.5s ease-in-out infinite;
    z-index: 3;
}

.table tbody tr.top:nth-of-type(2) td:first-child::before {
    content: '🥈';
}

.table tbody tr.top:nth-of-type(3) td:first-child::before {
    content: '🥉';
}

/* Bottom Performers Styling */
.table tbody tr.bottom {
    background: linear-gradient(90deg, rgba(255, 65, 108, 0.08) 0%, rgba(255, 75, 43, 0.03) 100%);
    border-left: 4px solid #ff416c;
    position: relative;
    z-index: 1;
}

.table tbody tr.bottom::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #ff416c 0%, #ff4b2b 100%);
    animation: glow 2s ease-in-out infinite alternate;
    z-index: 2;
}

.table tbody tr.bottom td:first-child {
    position: relative;
    padding-left: 3.5rem;
}

.table tbody tr.bottom td:first-child::before {
    content: '📉';
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.3rem;
    animation: shake 1s ease-in-out infinite;
    z-index: 3;
}

/* Performance Badges */
.performance-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 0.5rem;
}

.badge-top {
    background: linear-gradient(45deg, #11998e, #38ef7d);
    color: white;
    box-shadow: 0 2px 8px rgba(17, 153, 142, 0.3);
}

.badge-bottom {
    background: linear-gradient(45deg, #ff416c, #ff4b2b);
    color: white;
    box-shadow: 0 2px 8px rgba(255, 65, 108, 0.3);
}

/* Animations */
@keyframes glow {
    from { box-shadow: 0 0 5px currentColor; }
    to { box-shadow: 0 0 20px currentColor, 0 0 30px currentColor; }
}

@keyframes sparkle {
    0%, 100% { transform: translateY(-50%) scale(1); }
    50% { transform: translateY(-50%) scale(1.2); }
}

@keyframes shake {
    0%, 100% { transform: translateY(-50%) rotate(0deg); }
    25% { transform: translateY(-50%) rotate(-5deg); }
    75% { transform: translateY(-50%) rotate(5deg); }
}

/* Call Count Styling */
.call-count {
    font-weight: 700;
    font-size: 1.1rem;
    color: #667eea;
}

.duration-display {
    font-weight: 600;
    color: #6c757d;
}

/* Direction Indicators */
.direction-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 0.5rem;
}

.inbound-indicator {
    background: #28a745;
}

.outbound-indicator {
    background: #007bff;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container-fluid {
        margin: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .table thead th,
    .table tbody td {
        padding: 0.75rem 0.5rem;
        font-size: 0.85rem;
    }
    
    .table tbody tr.top td:first-child,
    .table tbody tr.bottom td:first-child {
        padding-left: 3rem;
    }
    
    .table tbody tr.top td:first-child::before,
    .table tbody tr.bottom td:first-child::before {
        left: 1rem;
        font-size: 1.1rem;
    }
}

/* Loading Animation */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
