
/* Modern CSS Reset for Agents Page */
.agents-page * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Enhanced Stats Cards */
.agents-page .stat-card {
    position: relative;
    background: white;
    border-radius: 24px;
    padding: 24px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.agents-page .stat-card-1 {
       background: linear-gradient(135deg, #464268 0%, #464268 100%);
}
.agents-page .stat-card-2 {
      background: linear-gradient(135deg, #8c838d 0%, #878787 100%);
}
.agents-page .stat-card-3 {
       background: linear-gradient(135deg, #003133 0%, #00bbc5 100%);
}
.agents-page .stat-card-4 {
      background: linear-gradient(135deg, #c3e4b5 0%, #7c8778 100%);
}

.agents-page .stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.agents-page .stat-icon {
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    color: white;
}

.agents-page .stat-content h2 {
    font-size: clamp(28px, 5vw, 36px);
    font-weight: 800;
    color: white;
    margin: 0;
    line-height: 1;
}

.agents-page .stat-content p {
    color: rgba(255,255,255,0.9);
    margin: 8px 0 0;
    font-size: 14px;
    font-weight: 500;
}

.agents-page .stat-glow {
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
}

.agents-page .stat-card:hover .stat-glow {
    opacity: 1;
}

/* ==================== ID CARD STYLES ==================== */

.agents-page .agent-link {
    text-decoration: none;
    display: block;
}

.agents-page .agent-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
    height: 100%;
}

.agents-page .id-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8faff 100%);
    border: 1px solid rgba(102,126,234,0.15);
    position: relative;
}

.agents-page .id-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(135deg, #464268 0%, #464268 100%);
    z-index: 0;
}

.agents-page .agent-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 45px rgba(102,126,234,0.25);
}

/* ID Card Header */
.agents-page .id-card-header {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 18px 10px;
}

.agents-page .id-type-badge {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    color: white;
    letter-spacing: 0.5px;
}

.agents-page .id-type-badge i {
    margin-right: 5px;
    font-size: 12px;
}

.agents-page .id-number {
    background: rgba(0,0,0,0.3);
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 10px;
    font-weight: 600;
    color: rgba(255,255,255,0.9);
    font-family: monospace;
    letter-spacing: 0.5px;
}

/* ID Photo Section */
.agents-page .id-photo-section {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}

.agents-page .id-photo-frame {
    position: relative;
}

.agents-page .id-photo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid white;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
    background: white;
}

.agents-page .id-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agents-page .id-photo-glow {
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(102,126,234,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.agents-page .agent-card:hover .id-photo-glow {
    opacity: 1;
}

.agents-page .id-verified-stamp {
    margin-top: 8px;
    background: #10b981;
    color: white;
    font-size: 9px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 50px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    letter-spacing: 0.5px;
}

/* ID Info */
.agents-page .id-info {
    position: relative;
    z-index: 2;
    padding: 15px 18px 12px;
    text-align: center;
}

.agents-page .agent-name-id {
    font-size: 18px;
    font-weight: 800;
    color: #1e293b;
    margin: 0 0 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.agents-page .verified-icon-id {
    color: #032a5b;
    font-size: 14px;
}

.agents-page .agent-title-id {
    font-size: 10px;
    color: #032a5b;
    font-weight: 600;
    margin-bottom: 14px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ID Details Grid */
.agents-page .id-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    background: #f1f5f9;
    border-radius: 16px;
    padding: 12px;
    margin-bottom: 15px;
}

.agents-page .id-detail-item {
    text-align: center;
}

.agents-page .detail-label {
    font-size: 9px;
    font-weight: 600;
    color: #64748b;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.agents-page .detail-value {
    font-size: 12px;
    font-weight: 700;
    color: #1e293b;
}

.agents-page .rating-value {
    color: #f59e0b;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
}

.agents-page .rating-value i {
    font-size: 10px;
}

/* ID Email */
.agents-page .id-email {
    font-size: 10px;
    color: #475569;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f8fafc;
    padding: 5px 12px;
    border-radius: 50px;
    margin-bottom: 14px;
    width: auto;
    margin-left: auto;
    margin-right: auto;
}

.agents-page .id-email i {
    font-size: 11px;
    color: #032a5b;
}

/* ID Stats */
.agents-page .id-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    background: linear-gradient(135deg, #667eea10, #764ba210);
    border-radius: 14px;
    padding: 12px 8px;
}

.agents-page .id-stat {
    text-align: center;
    flex: 1;
}

.agents-page .id-stat-num {
    font-size: 18px;
    font-weight: 800;
    color: #032a5b;
    line-height: 1;
}

.agents-page .id-stat-label {
    font-size: 9px;
    color: #64748b;
    font-weight: 500;
    margin-top: 4px;
}

.agents-page .id-stat-divider {
    width: 1px;
    height: 25px;
    background: #e2e8f0;
}

/* ID Card Footer */
.agents-page .id-card-footer {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 18px 15px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    margin-top: 5px;
}

.agents-page .id-scan-area {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 8px;
    font-weight: 700;
    color: #64748b;
    letter-spacing: 0.5px;
}

.agents-page .id-scan-area i {
    font-size: 14px;
    color: #032a5b;
}

.agents-page .id-issue-date {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 8px;
    color: #94a3b8;
}

.agents-page .id-issue-date i {
    font-size: 10px;
}

/* Overlay Actions */
.agents-page .overlay-actions {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.85), transparent);
    padding: 60px 18px 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.agents-page .agent-card:hover .overlay-actions {
    opacity: 1;
}

.agents-page .action-btn {
    width: 100%;
    padding: 12px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s;
    cursor: pointer;
    border: none;
}

.agents-page .profile-btn {
    background: linear-gradient(135deg, #032a5b, #032a5b);
    color: white;
}

.agents-page .profile-btn:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 15px rgba(102,126,234,0.4);
}

/* Empty State */
.agents-page .empty-state {
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    border-radius: 30px;
}

.agents-page .empty-state i {
    font-size: 80px;
    color: #cbd5e1;
    margin-bottom: 20px;
}

.agents-page .empty-state h3 {
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 10px;
}

.agents-page .empty-state p {
    color: #64748b;
}



/* For better control, we ensure the grid works as expected */
@media (max-width: 767px) {
    .agents-page .col-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Tablet: exactly 2 cards per row */
@media (min-width: 768px) and (max-width: 991px) {
    .agents-page .col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* Desktop: exactly 3 cards per row */
@media (min-width: 992px) {
    .agents-page .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Adjust col-xl-3 is overridden by col-lg-4 to maintain 3 per row on very large screens */
@media (min-width: 1200px) {
    .agents-page .col-xl-3 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

/* Responsive adjustments for ID card elements */
@media (max-width: 768px) {
    .agents-page .id-photo {
        width: 80px;
        height: 80px;
    }
    
    .agents-page .id-details-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .agents-page .id-stats {
        flex-wrap: wrap;
        gap: 10px;
    }
    
    .agents-page .id-card-header {
        padding: 12px 15px 8px;
    }
    
    .agents-page .id-info {
        padding: 12px 15px 10px;
    }
    
    .agents-page .id-card-footer {
        padding: 10px 15px 12px;
    }
    
    .agents-page .agent-name-id {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .agents-page .id-details-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .agents-page .id-stats {
        flex-direction: row;
    }
    
    .agents-page .id-stat {
        padding: 0 5px;
    }
    
    .agents-page .id-photo {
        width: 70px;
        height: 70px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.agents-page .col-12 {
    animation: fadeInUp 0.6s ease-out forwards;
}

.agents-page .col-12:nth-child(1) { animation-delay: 0.1s; }
.agents-page .col-12:nth-child(2) { animation-delay: 0.2s; }
.agents-page .col-12:nth-child(3) { animation-delay: 0.3s; }
.agents-page .col-12:nth-child(4) { animation-delay: 0.4s; }