/* Success popup styles */
.success-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    z-index: 3000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.success-popup.active {
    display: flex;
}

.success-content {
    background: white;
    border-radius: 10px;
    max-width: 600px;
    width: 100%;
    padding: 40px;
    text-align: center;
    animation: fadeInUp 0.3s ease;
}

.success-icon {
    font-size: 80px;
    color: var(--primary-green, #4a9d5f);
    margin-bottom: 20px;
}

.success-content h2 {
    color: var(--dark-green, #2d5f3f);
    margin-bottom: 15px;
}

.success-content p {
    color: var(--text-light, #666);
    margin-bottom: 30px;
    line-height: 1.7;
}

.success-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Details Modal */
.details-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.details-modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 10px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: fadeInUp 0.3s ease;
}

.modal-header {
    background: linear-gradient(135deg, #2d5f3f 0%, #4a9d5f 100%);
    color: white;
    padding: 30px;
    border-radius: 10px 10px 0 0;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 28px;
    color: white !important;
}

.modal-header h3,
.modal-header h4 {
    margin: 0;
    color: white !important;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    font-size: 30px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg);
}

.modal-body {
    padding: 30px;
}

.form-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 2px solid #e8f5ec;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section-title {
    color: #2d5f3f;
    font-size: 22px;
    margin-bottom: 20px;
    padding-left: 15px;
    border-left: 4px solid #4a9d5f;
}

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

.worker-section {
    background: #e8f5ec;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.worker-section h4 {
    color: #2d5f3f;
    margin-bottom: 15px;
    font-size: 18px;
}

.add-more-btn {
    background: #e8f5ec;
    color: #2d5f3f;
    border: 2px dashed #4a9d5f;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    display: inline-block;
    margin-top: 10px;
}

.add-more-btn:hover {
    background: #4a9d5f;
    color: white;
    border-style: solid;
}

.remove-btn {
    background: #fee;
    color: #c33;
    border: 1px solid #c33;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
    margin-top: 10px;
}

.remove-btn:hover {
    background: #c33;
    color: white;
}

#detailsFormMessage {
    display: none;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        margin: 0;
    }
    
    .success-buttons {
        flex-direction: column;
    }
}

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