/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Header Styles */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.header-content h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-content h1 i {
    color: #667eea;
    font-size: 2.2rem;
}

.header-content p {
    font-size: 1.1rem;
    color: #718096;
    font-weight: 400;
}

.deadline-banner {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.deadline-banner.warning {
    background: linear-gradient(135deg, #ffa726, #ff7043);
}

.deadline-banner.expired {
    background: linear-gradient(135deg, #ef5350, #e53935);
}

/* Main Content */
.main-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Tab Navigation */
.tab-navigation {
    display: flex;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.tab-btn {
    flex: 1;
    padding: 20px 25px;
    background: none;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: #64748b;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.tab-btn:hover {
    background: #e2e8f0;
    color: #475569;
}

.tab-btn.active {
    background: white;
    color: #667eea;
    border-bottom: 3px solid #667eea;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 3px;
    background: #667eea;
}

/* Tab Content */
.tab-content {
    display: none;
    padding: 40px;
}

.tab-content.active {
    display: block;
}

/* Form Sections */
.form-section {
    max-width: 900px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.section-header h2 i {
    color: #667eea;
}

.section-header p {
    color: #718096;
    font-size: 1.1rem;
}

/* Week Selector */
.week-selector {
    background: #f8fafc;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
    transition: border-color 0.3s ease;
}

.week-selector:focus-within {
    border-color: #667eea;
}

.week-selector label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.week-selector input[type="date"] {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.week-selector input[type="date"]:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Agents Section */
.agents-section {
    margin-bottom: 40px;
}

.section-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title h3 i {
    color: #667eea;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    min-height: 48px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #e2e8f0;
    border-color: #cbd5e0;
}

.btn-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
}

.btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

/* Agent Cards */
.agents-list {
    display: grid;
    gap: 20px;
    margin-bottom: 30px;
}

.agent-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
    position: relative;
}

.agent-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
}

.agent-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.agent-info h4 {
    font-size: 1.3rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 5px;
}

.agent-info p {
    color: #718096;
    font-size: 0.95rem;
}

.agent-actions {
    display: flex;
    gap: 10px;
}

.package-selection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

.package-option {
    position: relative;
}

.package-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.package-option label {
    display: block;
    padding: 15px;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.package-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.package-option label:hover {
    border-color: #667eea;
    background: #e2e8f0;
}

.package-option input[type="radio"]:checked + label:hover {
    background: linear-gradient(135deg, #5a67d8, #6b46c1);
}

.cancel-option {
    grid-column: 1 / -1;
}

.cancel-option label {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.cancel-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-color: #ff6b6b;
}

/* Package Summary */
.package-summary {
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
    border: 2px solid #e2e8f0;
}

.package-summary h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.package-summary h3 i {
    color: #667eea;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.summary-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
}

.summary-item .label {
    font-weight: 500;
    color: #475569;
}

.summary-item .value {
    font-weight: 700;
    font-size: 1.2rem;
    color: #667eea;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
    animation: slideUp 0.3s ease;
}

.modal-header {
    padding: 30px 30px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2d3748;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f8fafc;
    color: #475569;
}

.modal-form {
    padding: 30px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    font-weight: 500;
    color: #2d3748;
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
}

/* Loading Overlay */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(5px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: #667eea;
}

.loading-spinner i {
    font-size: 3rem;
    margin-bottom: 15px;
}

.loading-spinner p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 3000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    background: white;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 4px solid #667eea;
    min-width: 300px;
    animation: slideInRight 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.toast.success {
    border-left-color: #10b981;
}

.toast.error {
    border-left-color: #ef4444;
}

.toast.warning {
    border-left-color: #f59e0b;
}

.toast i {
    font-size: 1.2rem;
}

.toast.success i {
    color: #10b981;
}

.toast.error i {
    color: #ef4444;
}

.toast.warning i {
    color: #f59e0b;
}

/* Packages Display */
.packages-display {
    display: grid;
    gap: 20px;
}

.package-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.package-card:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.1);
}

/* Statistics Display */
.stats-display {
    display: grid;
    gap: 30px;
}

.stats-card {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 30px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-item {
    background: #f8fafc;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #e2e8f0;
}

.stat-item .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

.stat-item .stat-label {
    color: #718096;
    font-weight: 500;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 15px;
    }
    
    .header {
        padding: 20px;
    }
    
    .header-content h1 {
        font-size: 2rem;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .tab-content {
        padding: 20px;
    }
    
    .section-title {
        flex-direction: column;
        align-items: stretch;
    }
    
    .agent-card-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .agent-actions {
        justify-content: flex-end;
    }
    
    .package-selection {
        grid-template-columns: 1fr 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10px;
    }
    
    .toast {
        min-width: auto;
        width: calc(100vw - 40px);
    }
    
    .toast-container {
        left: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .package-selection {
        grid-template-columns: 1fr;
    }
    
    .summary-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

