
/* Variables CSS */
:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --light-bg: #f8f9fa;
    --border-radius: 12px;
    --box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease;
}

/* Container principal */
.upload-container {
    min-height: calc(100vh - 100px); /* Increased available height */
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 -15px;
    position: relative;
}

.upload-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    max-width: 700px; /* Reduced max width */
    width: 100%;
    margin: 0 auto;
    min-height: 600px; /* Added minimum height */
    display: flex;
    flex-direction: column;
}

/* Header do card */
.upload-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
    padding: 1rem; /* Reduced padding */
    text-align: center;
    flex-shrink: 0;
}

    .upload-header h2 {
        margin: 0;
        font-weight: 700;
        font-size: 1.4rem; /* Reduced font size */
    }

    .upload-header p {
        margin: 0.25rem 0 0 0;
        opacity: 0.9;
        font-size: 0.85rem; /* Reduced font size */
    }

/* Progress Stepper */
.stepper-container {
    background: var(--light-bg);
    padding: 1rem; /* Reduced padding */
    border-bottom: 1px solid #e9ecef;
    flex-shrink: 0;
}

.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    margin-bottom: 0.5rem; /* Reduced margin */
}

    .stepper::before {
        content: '';
        position: absolute;
        top: 50%;
        left: 0;
        right: 0;
        height: 3px;
        background: #e9ecef;
        z-index: 1;
        transform: translateY(-50%);
    }

.stepper-progress {
    position: absolute;
    top: 50%;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--success-color));
    z-index: 2;
    transform: translateY(-50%);
    transition: width 0.5s ease;
    border-radius: 2px;
}

.step {
    position: relative;
    z-index: 3;
    background: white;
    border: 3px solid #e9ecef;
    border-radius: 50%;
    width: 45px; /* Reduced size */
    height: 45px; /* Reduced size */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    transition: var(--transition);
    cursor: pointer;
    font-size: 0.85rem; /* Reduced font size */
}

    .step.active {
        border-color: var(--primary-color);
        background: var(--primary-color);
        color: white;
        transform: scale(1.1);
        box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
    }

    .step.completed {
        border-color: var(--success-color);
        background: var(--success-color);
        color: white;
    }

.step-label {
    text-align: center;
    margin-top: 0.5rem; /* Reduced margin */
    font-size: 0.8rem; /* Reduced font size */
    font-weight: 600;
    color: #6c757d;
}

.step.active + .step-label,
.step.completed + .step-label {
    color: var(--primary-color);
}

/* Form Steps - FIX LAYOUT */
.form-content {
    padding: 1rem; /* Reduced padding */
    flex: 1; /* Changed back to flex: 1 to take available space */
    overflow-y: auto; /* Re-added controlled overflow */
    min-height: 0; /* Important for flex child with overflow */
}

.step-content {
    display: none;
}

    .step-content.active {
        display: block;
        animation: fadeIn 0.5s ease;
    }

    .step-content h4 {
        margin-bottom: 0.5rem; /* Reduced margin */
        font-size: 1.2rem; /* Reduced font size */
    }

    .step-content p {
        margin-bottom: 1rem; /* Reduced margin */
        font-size: 0.85rem; /* Reduced font size */
    }

/* Form Elements */
.form-group {
    margin-bottom: 1rem; /* Reduced margin */
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.4rem; /* Reduced margin */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem; /* Reduced font size */
}

.required {
    color: var(--danger-color);
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.5rem 0.7rem; /* Reduced padding */
    font-size: 0.85rem; /* Reduced font size */
    transition: var(--transition);
}

    .form-control:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
    }

    .form-control.is-valid {
        border-color: var(--success-color);
    }

    .form-control.is-invalid {
        border-color: var(--danger-color);
    }

/* File Upload Areas */
.file-upload-area {
    border: 2px dashed #e9ecef;
    border-radius: var(--border-radius);
    padding: 1rem; /* Reduced padding */
    text-align: center;
    transition: var(--transition);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

    .file-upload-area:hover {
        border-color: var(--primary-color);
        background: rgba(0, 123, 255, 0.05);
    }

    .file-upload-area.dragover {
        border-color: var(--primary-color);
        background: rgba(0, 123, 255, 0.1);
    }

    .file-upload-area input[type="file"] {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }

.file-upload-content {
    pointer-events: none;
}

.file-upload-icon {
    font-size: 2rem; /* Reduced size */
    color: var(--primary-color);
    margin-bottom: 0.5rem; /* Reduced margin */
}

.file-upload-area h5 {
    font-size: 1rem; /* Reduced font size */
    margin-bottom: 0.4rem; /* Reduced margin */
}

.file-upload-area p {
    margin-bottom: 0.2rem; /* Reduced margin */
    font-size: 0.85rem; /* Reduced font size */
}

.file-upload-area small {
    font-size: 0.75rem; /* Reduced font size */
}

.file-list {
    margin-top: 0.75rem; /* Reduced margin */
    max-height: 120px; /* Reduced max height */
    overflow-y: auto;
}

.file-item {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 0.4rem; /* Reduced padding */
    margin-bottom: 0.4rem; /* Reduced margin */
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-left: 4px solid var(--success-color);
    font-size: 0.8rem; /* Reduced font size */
}

/* Checkbox customizado */
.custom-checkbox {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.6rem; /* Reduced padding */
    background: var(--light-bg);
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    transition: var(--transition);
    cursor: pointer;
    margin-bottom: 0.75rem; /* Reduced margin */
}

    .custom-checkbox:hover {
        border-color: var(--primary-color);
    }

    .custom-checkbox input[type="checkbox"] {
        width: 16px; /* Reduced size */
        height: 16px; /* Reduced size */
        accent-color: var(--primary-color);
    }

    .custom-checkbox label {
        margin: 0;
        font-weight: 600;
        cursor: pointer;
        flex: 1;
        font-size: 0.85rem; /* Reduced font size */
    }

/* Buttons */
.btn-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem; /* Reduced padding */
    border-top: 1px solid #e9ecef;
    background: var(--light-bg);
    flex-shrink: 0;
}

.btn-custom {
    padding: 0.5rem 1.2rem; /* Reduced padding */
    border-radius: 8px;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem; /* Reduced font size */
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, #0056b3 100%);
    color: white;
}

    .btn-primary-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(0, 123, 255, 0.3);
    }

.btn-success-custom {
    background: linear-gradient(135deg, var(--success-color) 0%, #1e7e34 100%);
    color: white;
}

    .btn-success-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
    }

.btn-outline-custom {
    background: transparent;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

    .btn-outline-custom:hover {
        background: #e9ecef;
        border-color: #6c757d;
    }

/* Messages */
.messages-container {
    margin-top: 0.75rem; /* Reduced margin */
    border-radius: var(--border-radius);
    border: 1px solid #e9ecef;
    overflow: hidden;
    max-height: 200px; /* Reduced max height */
    overflow-y: auto;
    flex-shrink: 0;
}

.messages-header {
    background: var(--light-bg);
    padding: 0.6rem; /* Reduced padding */
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem; /* Reduced font size */
}

.messages-content {
    padding: 0.6rem; /* Reduced padding */
    background: white;
}

.message-item {
    margin-bottom: 0.4rem; /* Reduced margin */
    padding: 0.4rem; /* Reduced padding */
    border-radius: 8px;
    border-left: 4px solid;
    font-size: 0.8rem; /* Reduced font size */
}

.message-success {
    background: rgba(40, 167, 69, 0.1);
    border-color: var(--success-color);
    color: #155724;
}

.message-error {
    background: rgba(220, 53, 69, 0.1);
    border-color: var(--danger-color);
    color: #721c24;
}

.message-info {
    background: rgba(0, 123, 255, 0.1);
    border-color: var(--primary-color);
    color: #004085;
}

/* Disabled state */
.disabled-section {
    opacity: 0.6;
    pointer-events: none;
}

/* Confirmation cards */
.card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 0.75rem; /* Reduced margin */
}

.card-body {
    padding: 0.75rem; /* Reduced padding */
}

.card-title {
    font-size: 0.85rem; /* Reduced font size */
    margin-bottom: 0.5rem; /* Reduced margin */
    font-weight: 600;
}

.card-body p {
    margin-bottom: 0.4rem; /* Reduced margin */
    font-size: 0.8rem; /* Reduced font size */
}

/* Responsive */
@media (max-width: 768px) {
    .upload-container {
        padding: 0.25rem;
        min-height: calc(100vh - 100px);
        margin: 0 -15px;
    }

    .upload-card {
        max-height: calc(100vh - 120px);
        min-height: 500px; /* Adjusted minimum height for mobile */
        max-width: 100%;
    }

    .stepper-container {
        padding: 0.75rem;
    }

    .step {
        width: 35px;
        height: 35px;
        font-size: 0.75rem;
    }

    .form-content {
        padding: 0.75rem;
        flex: 1;
        overflow-y: auto;
    }

    .btn-container {
        padding: 0.75rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .file-upload-area {
        padding: 0.75rem;
    }

    .file-upload-icon {
        font-size: 1.5rem;
    }
}

/* CSS Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


footer {
    position: unset !important;
}

.btn-warning-custom {
    background: linear-gradient(135deg, var(--warning-color) 0%, #e0a800 100%);
    color: #212529;
}

    .btn-warning-custom:hover {
        transform: translateY(-2px);
        box-shadow: 0 8px 25px rgba(255, 193, 7, 0.3);
    }
