body {
    background-color: #f8f9fa;
    color: #212529;
}

.container {
    max-width: 1000px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

h1 {
    color: #0d6efd;
    font-size: 2rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e9ecef;
}

.upload-section {
    margin-bottom: 2rem;
    background-color: #fff;
    border-radius: 8px;
    padding: 1.5rem;
    border: 2px dashed #dee2e6;
    transition: all 0.3s ease;
}

.upload-section:hover {
    border-color: #0d6efd;
    background-color: #f8f9fa;
}

.upload-section .form-label {
    color: #0d6efd;
    font-size: 1.1rem;
}

/* Form sections styling */
fieldset {
    background-color: #fff;
    border-radius: 8px;
    border: 1px solid #dee2e6 !important;
    padding: 1.5rem !important;
    margin-bottom: 1.5rem !important;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

fieldset::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background-color: #0d6efd;
    opacity: 0;
    transition: opacity 0.3s ease;
}

fieldset:hover::before {
    opacity: 1;
}

fieldset:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

fieldset legend {
    color: #0d6efd;
    font-weight: 500;
    font-size: 1.1rem;
    padding: 0 0.5rem;
    margin-bottom: 1rem;
    float: none;
    width: auto;
}

/* Form controls styling */
.form-control, .form-select {
    border-radius: 6px;
    border-color: #dee2e6;
    padding: 0.5rem 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.15);
}

.form-label {
    font-weight: 500;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Required field styling */
.required::after {
    content: "*";
    color: #dc3545;
    margin-left: 4px;
}

/* Multiple select styling */
select[multiple] {
    height: auto;
    min-height: 100px;
}

/* Textarea styling */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Button styling */
.btn {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn i {
    font-size: 1.1em;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    margin-top: 1rem;
}

.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
    transform: translateY(-1px);
}

.btn-danger {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Affected entities styling */
.affected-entity {
    position: relative;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dee2e6 !important;
    padding: 1.5rem !important;
    margin-bottom: 1rem !important;
    transition: all 0.3s ease;
}

.affected-entity:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.affected-entity .remove-entity {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
}

/* File upload styling */
.file-upload-success {
    animation: fadeInGreen 0.5s ease-in-out;
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
}

@keyframes fadeInGreen {
    from { background-color: #fff; }
    to { background-color: #d4edda; }
}

/* Form validation styling */
.was-validated .form-control:invalid,
.was-validated .form-select:invalid {
    border-color: #dc3545;
    background-image: none;
}

.was-validated .form-control:valid,
.was-validated .form-select:valid {
    border-color: #198754;
    background-image: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
        margin-top: 1rem;
        margin-bottom: 1rem;
    }

    fieldset {
        padding: 1rem !important;
    }

    h1 {
        font-size: 1.5rem;
    }
}
