* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow-x: hidden;
}

.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 50%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(138, 92, 246, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
    animation: gradientShift 15s ease infinite;
    z-index: -1;
}

@keyframes gradientShift {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.8; }
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.98);
    border-radius: 24px;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

/* Header */
header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 50px 40px;
    position: relative;
    overflow: hidden;
}

header::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.header-content {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.header-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
}

.header-text h1 {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 8px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.header-text p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Controls */
.controls {
    padding: 35px 40px;
    background: linear-gradient(to bottom, #f8f9fa, #ffffff);
    border-bottom: 1px solid #e9ecef;
}

.search-container {
    margin-bottom: 25px;
}

.search-box {
    position: relative;
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 16px;
    padding: 8px 20px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.search-box:focus-within {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.search-box i.fa-search {
    color: #667eea;
    font-size: 1.2rem;
    margin-right: 15px;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 1rem;
    padding: 10px 0;
    font-family: 'Poppins', sans-serif;
}

.clear-btn {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

.clear-btn.active {
    opacity: 1;
    visibility: visible;
}

.clear-btn:hover {
    background: rgba(220, 53, 69, 0.1);
    transform: rotate(90deg);
}

/* Stats */
.stats-container {
    display: flex;
    gap: 20px;
    justify-content: center;
}

.stat-card {
    flex: 1;
    max-width: 250px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 20px 25px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.stat-icon {
    width: 55px;
    height: 55px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    font-weight: 400;
}

.stat-value {
    color: white;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1;
}

/* Contacts Wrapper */
.contacts-wrapper {
    padding: 40px;
}

/* Department Section */
.department-section {
    margin-bottom: 35px;
    animation: fadeInUp 0.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.department-header {
    background: linear-gradient(135deg, #667eea, #764ba2);
    padding: 20px 30px;
    border-radius: 16px 16px 0 0;
    display: flex;
    align-items: center;
    gap: 15px;
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.department-header i {
    font-size: 1.8rem;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.department-header span {
    font-size: 1.4rem;
    font-weight: 600;
}

/* Table Header - UPDATED GRID */
.table-header {
    display: grid;
    grid-template-columns: 3fr 1fr 1.4fr 1.4fr;
    gap: 15px;
    padding: 18px 30px;
    background: linear-gradient(to right, #f8f9fa, #e9ecef);
    font-weight: 600;
    font-size: 0.9rem;
    color: #495057;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-left: 4px solid #667eea;
}

/* Contact Row - UPDATED GRID */
.contact-row {
    display: grid;
    grid-template-columns: 3fr 1fr 1.4fr 1.4fr;
    gap: 15px;
    padding: 20px 30px;
    background: white;
    border-left: 4px solid transparent;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    align-items: center;
}

.contact-row:hover {
    background: linear-gradient(to right, #f8f9ff, #ffffff);
    border-left-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateX(5px);
}

.contact-row:last-child {
    border-radius: 0 0 16px 16px;
    border-bottom: none;
}

.contact-name {
    font-weight: 600;
    font-size: 1.05rem;
    color: #212529;
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-name i {
    color: #667eea;
    font-size: 1.2rem;
}

.contact-phone {
    font-family: 'Roboto Mono', 'Courier New', monospace;
    color: #495057;
    font-size: 1rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.5px;
}

.contact-phone i {
    color: #667eea;
    font-size: 0.9rem;
}

.phone-label {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 100px 20px;
    color: #6c757d;
}

.no-results-icon {
    font-size: 5rem;
    color: #dee2e6;
    margin-bottom: 25px;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.no-results h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #495057;
}

.no-results p {
    font-size: 1.1rem;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .container {
        border-radius: 20px;
    }

    header {
        padding: 35px 25px;
    }

    .header-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
    }

    .header-text h1 {
        font-size: 2rem;
    }

    .header-text p {
        font-size: 0.95rem;
    }

    .controls {
        padding: 25px 20px;
    }

    .stats-container {
        flex-direction: column;
    }

    .stat-card {
        max-width: 100%;
    }

    .contacts-wrapper {
        padding: 20px;
    }

    .table-header {
        display: none;
    }

    .contact-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 20px;
    }

    .contact-name {
        font-size: 1.1rem;
        padding-bottom: 10px;
        border-bottom: 2px solid #667eea;
    }

    .contact-phone {
        padding-left: 10px;
    }
}
