.application-form-wrapper {
    margin-top: 30px;
    border-radius: 15px;
}

.description-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 25px;
    border-radius: 10px;
    margin-bottom: 30px;
    border-left: 4px solid #dda93b;
}

.description-section p {
    margin: 0;
    color: #495057;
    font-size: 16px;
    line-height: 1.6;
    font-weight: 500;
}

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

.form-header h2 {
    color: #dda93b;
    margin-bottom: 10px;
    font-size: 2rem;
}

.form-section {
    margin-bottom: 40px;
    padding: 25px;
    background: #ffffff;
    border-radius: 12px;
    position: relative;
}

.form-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #dda93b 0%, #ff8c42 100%);
    border-radius: 12px 12px 0 0;
}

.form-section h3 {
    color: #dda93b;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dda93b;
    font-size: 1.5rem;
    font-weight: 700;
    position: relative;
    display: flex;
    align-items: center;
}

.form-section h3::before {
    content: "•";
    color: #dda93b;
    font-size: 2rem;
    margin-right: 12px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(255, 113, 1, 0.3);
}

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

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required {
    color: #dc3545;
    font-weight: bold;
    font-size: 16px;
}

.form-control {
    border: 2px solid #6c757d;
    border-radius: 8px;
    padding: 15px 18px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: relative;
}

/* Ensure all input types have borders */
input[type="text"].form-control,
input[type="email"].form-control,
input[type="tel"].form-control,
input[type="date"].form-control,
input[type="number"].form-control,
input[type="password"].form-control {
    border: 2px solid #6c757d !important;
    border-radius: 8px;
    padding: 15px 18px;
    font-size: 16px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

select.form-control {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px 12px;
    padding-right: 40px;
    appearance: none;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.btn-primary {
    background: #dda93b;
    border: none;
    padding: 18px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 113, 1, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: #dda93b;
    transition: left 0.5s;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    background: #dda93b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 113, 1, 0.4);
}

.alert {
    padding: 20px;
    margin-bottom: 25px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 500;
}

.alert-success {
    color: #155724;
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-color: #c3e6cb;
    border-left: 4px solid #28a745;
}

.alert-danger {
    color: #721c24;
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-color: #f5c6cb;
    border-left: 4px solid #dc3545;
}

.alert ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.form-text {
    font-size: 13px;
    color: #6c757d;
    margin-top: 8px;
    font-style: italic;
}

/* Additional styles for validation */
.error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 8px;
    display: block;
    font-weight: 500;
}

.error-field {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15) !important;
}

.form-group.has-error label {
    color: #dc3545;
}

/* Loading state for submit button */
.btn-primary:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* File upload styling */
.file-upload-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    left: -9999px;
}

.file-upload-label {
    display: block;
    padding: 15px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #ced4da;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
    font-weight: 500;
}

.file-upload-label:hover {
    border-color: #dda93b;
    background: linear-gradient(135deg, #fff5f0 0%, #ffe8d6 100%);
    color: #dda93b;
}

/* Signature pad styling */
.signature-pad-container {
    position: relative;
    margin-bottom: 15px;
}

.signature-pad {
    border: 2px dashed #6c757d;
    border-radius: 8px;
    background-color: #fff;
    cursor: crosshair;
    display: block;
    width: 100%;
    max-width: 100%;
    height: 300px;
    margin-bottom: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.signature-pad:hover {
    border-color: #dda93b;
    box-shadow: 0 4px 8px rgba(255, 113, 1, 0.1);
}

.signature-pad:focus {
    outline: none;
    border-color: #dda93b;
    box-shadow: 0 0 0 3px rgba(255, 113, 1, 0.15);
}

.signature-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s ease;
    color: white;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(108, 117, 125, 0.3);
}

.btn-secondary i {
    font-size: 12px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .application-form-wrapper {
        padding: 20px;
    }

    .form-section {
        padding: 20px;
    }

    .form-header h2 {
        font-size: 1.5rem;
    }

    .form-section h3 {
        font-size: 1.25rem;
    }

    .btn-primary {
        width: 100%;
        padding: 15px 20px;
    }
}

/* CAPTCHA Styles */
.captcha-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #ffffff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.captcha-container:hover {
    border-color: #dda93b;
    box-shadow: 0 2px 6px rgba(255, 113, 1, 0.1);
}

.captcha-image {
    flex-shrink: 0;
    text-align: center;
}

.captcha-image img {
    border: 1px solid #e9ecef;
    border-radius: 4px;
    background: #ffffff;
    padding: 4px;
    max-width: 100%;
    height: auto;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.captcha-input-section {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.captcha-input-section .form-control {
    flex: 1;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #ffffff;
}

.captcha-input-section .form-control:focus {
    border-color: #dda93b;
    box-shadow: 0 0 0 2px rgba(255, 113, 1, 0.1);
}

.refresh-captcha {
    padding: 10px;
    font-size: 14px;
    border-radius: 6px;
    background: #dda93b;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.refresh-captcha:hover {
    background: #dda93b;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(255, 113, 1, 0.3);
}

.refresh-captcha i {
    font-size: 12px;
}

/* Responsive CAPTCHA */
@media (max-width: 768px) {
    .captcha-container {
        flex-direction: column;
        gap: 10px;
    }

    .captcha-input-section {
        width: 100%;
    }

    .refresh-captcha {
        width: 40px;
        height: 40px;
    }
}
