/* Global Styles */
body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 2rem 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Page Title */
.page-title {
    color: white;
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    font-weight: 700;
    font-size: 2.5rem;
}

.page-title i {
    margin-right: 1rem;
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    padding: 2.5rem;
    margin-bottom: 2rem;
}

/* Required Note Banner */
.required-note {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}

.required-note i {
    font-size: 1.2rem;
}

/* Section Headers */
.section-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    margin: 2rem 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.section-header:first-of-type {
    margin-top: 0;
}

.section-header h4 {
    margin: 0;
    font-weight: 600;
    font-size: 1.25rem;
}

.section-header i {
    font-size: 1.5rem;
}

/* Form Controls */
.form-control {
    border-radius: 8px;
    border: 2px solid #e2e8f0;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

.form-control.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='8' height='8' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(0.375em + 0.1875rem) center;
    background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
    padding-right: calc(1.5em + 0.75rem);
}

.form-control.is-invalid {
    border-color: #dc3545;
    padding-right: calc(1.5em + 0.75rem);
}

/* Labels */
label {
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 0.5rem;
    display: block;
}

label .text-danger {
    font-size: 1.1em;
}

/* Helper Text */
small.form-text {
    display: block;
    margin-bottom: 0.5rem;
    color: #718096;
    font-size: 0.85rem;
    line-height: 1.3;
}

/* Currency Input Styles */
.formatted-input {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #2d3748;
    letter-spacing: 0.5px;
}

.field-wrapper {
    position: relative;
}

.currency-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #718096;
    font-weight: 600;
    pointer-events: none;
    z-index: 10;
    font-size: 1rem;
}

.input-with-prefix {
    padding-left: 28px !important;
}

/* Error Messages */
.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.25rem;
    font-weight: 500;
}

/* Submit Button */
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    padding: 0.75rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 8px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #7e8ee8 0%, #8959a8 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-primary i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* Form Row Spacing */
.row {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

/* Select Dropdown */
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

select.form-control:focus {
    cursor: pointer;
}

/* Responsive Design */
@media (max-width: 768px) {
    .form-container {
        padding: 1.5rem;
    }

    .page-title {
        font-size: 1.75rem;
    }

    .section-header {
        padding: 0.75rem 1rem;
    }

    .section-header h4 {
        font-size: 1.1rem;
    }

    .btn-primary {
        width: 100%;
        margin-top: 1rem;
    }
}

/* Loading State for Submit Button */
#submitBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Accessibility */
.form-control:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Animation for Section Headers */
@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.section-header {
    animation: slideInFromLeft 0.4s ease-out;
}
