/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #4361ee;
    --secondary-color: #3a0ca3;
    --accent-color: #f72585;
    --success-color: #4cc9f0;
    --warning-color: #f8961e;
    --danger-color: #ef233c;
    --light-color: #f8f9fa;
    --dark-color: #212529;
    --gray-color: #6c757d;
    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(255, 255, 255, 0.3);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    color: var(--dark-color);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Animated Background */
.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 50%;
    animation: float 6s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    background: rgba(67, 97, 238, 0.1);
    top: 10%;
    left: 5%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    background: rgba(248, 37, 133, 0.1);
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape-3 {
    width: 150px;
    height: 150px;
    background: rgba(76, 201, 240, 0.1);
    bottom: 10%;
    left: 20%;
    animation-delay: 4s;
}

.shape-4 {
    width: 250px;
    height: 250px;
    background: rgba(58, 12, 163, 0.1);
    top: 20%;
    right: 20%;
    animation-delay: 1s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(180deg);
    }
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header h1 {
    color: var(--primary-color);
    font-size: 2.8rem;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.header p {
    color: var(--gray-color);
    font-size: 1.2rem;
}

/* Customers Section */
.customers-section {
    margin-bottom: 40px;
}

.customers-section h2 {
    color: var(--secondary-color);
    margin-bottom: 25px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.customers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

/* Customer Card */
.customer-card {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    border: 2px solid transparent;
}

.customer-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(67, 97, 238, 0.15);
    border-color: var(--primary-color);
}

.customer-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin-bottom: 20px;
    border: 5px solid var(--light-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.customer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.customer-info h3 {
    color: var(--dark-color);
    font-size: 1.5rem;
    margin-bottom: 10px;
}

.customer-info p {
    color: var(--gray-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.view-ads-btn {
    background: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
}

.view-ads-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 15px rgba(67, 97, 238, 0.4);
}

/* Ads Section */
.ads-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.back-btn {
    background: var(--gray-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
}

.back-btn:hover {
    background: var(--dark-color);
}

.ads-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.ads-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 6px solid var(--primary-color);
    animation: slideInUp 0.6s backwards;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ads-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
    border-left-width: 10px;
}

.ads-card.active {
    border-left-color: var(--success-color);
}

.ads-card.paused {
    border-left-color: var(--warning-color);
}

.ads-card.completed {
    border-left-color: var(--gray-color);
}

.ads-card h3 {
    color: var(--secondary-color);
    margin-bottom: 15px;
    font-size: 1.4rem;
}

.ads-card p {
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
}

.ads-card .label {
    font-weight: 600;
    color: var(--dark-color);
}

.ads-card .value {
    color: var(--gray-color);
}

.budget-bar {
    height: 10px;
    background: #e9ecef;
    border-radius: 5px;
    margin: 15px 0;
    overflow: hidden;
}

.budget-progress {
    height: 100%;
    border-radius: 5px;
    background: linear-gradient(to right, var(--success-color), var(--primary-color));
    transition: width 1s ease;
}

.status-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 10px;
}

.status-active {
    background: rgba(76, 201, 240, 0.2);
    color: var(--success-color);
}

.status-paused {
    background: rgba(248, 150, 30, 0.2);
    color: var(--warning-color);
}

.status-completed {
    background: rgba(108, 117, 125, 0.2);
    color: var(--gray-color);
}

.payment-badge {
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
    vertical-align: middle;
}

.payment-done {
    background: rgba(40, 167, 69, 0.15);
    color: #28a745;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.payment-due {
    background: rgba(220, 53, 69, 0.15);
    color: #dc3545;
    border: 1px solid rgba(220, 53, 69, 0.2);
}

/* Budget Summary */
.budget-summary {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.budget-summary h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    text-align: center;
    padding: 20px;
    border-radius: 10px;
    background: rgba(248, 249, 250, 0.8);
}

.summary-item h4 {
    color: var(--gray-color);
    font-size: 1rem;
    margin-bottom: 10px;
}

.summary-item .amount {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
}

/* Footer */
.footer {
    text-align: center;
    padding: 25px;
    color: var(--gray-color);
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    box-shadow: var(--shadow);
}

.footer p {
    margin-bottom: 10px;
}

/* No Data Messages */
.no-customers,
.no-ads {
    text-align: center;
    padding: 50px;
    background: white;
    border-radius: 15px;
    grid-column: 1 / -1;
    color: var(--gray-color);
    font-size: 1.2rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .customers-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }

    .ads-container {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 20px;
    }

    .header h1 {
        font-size: 1.8rem;
        flex-direction: column;
        gap: 10px;
    }

    .customer-card {
        padding: 20px;
    }

    .ads-section {
        padding: 20px;
    }
}

/* Warning Message Animation */
@keyframes pulse-warning {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 35, 60, 0.7);
    }

    70% {
        transform: scale(1.02);
        box-shadow: 0 0 0 10px rgba(239, 35, 60, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(239, 35, 60, 0);
    }
}

.warning-message {
    background: linear-gradient(135deg, #FFEEEE 0%, #FFD6D6 100%);
    color: #D8000C;
    border: 1px solid #FFBABA;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.95rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    animation: pulse-warning 2s infinite;
    text-align: center;
}

.warning-message i {
    font-size: 1.2rem;
    color: #D8000C;
}