.form-title {
    color: #333;
    font-size: 1.4rem;
    margin: 0.5rem 0 0 0;
    text-align: center;
    font-weight: normal;
}

.application-form {
    max-width: 420px;
    width: 90%;
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    margin: 0 auto;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 1;
    transform: scale(1);
}

.application-form.fade-out {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
}

.application-form.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0.5;
        transform: scale(0.98);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    padding-left: 20px;
    color: #6b7280;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 14px;
}

.form-group input:not([type="file"]),
.form-group select {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) border-box;
    border-radius: 9999px;
    padding: 14px 20px;
    color: #1f2937;
    font-size: 16px;
    transition: all 0.3s ease;
}

.form-group input:not([type="file"]):focus,
.form-group select:focus {
    outline: none;
}

.form-group input:not([type="file"]).valid,
.form-group select.valid {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #15803D 0%, #065F46 100%) border-box;
}

.form-group input[type="file"] {
    width: 100%;
    padding: 12px 20px;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) border-box;
    border-radius: 9999px;
    cursor: default;
    font-size: 14px;
    color: #1f2937;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.form-group input[type="file"].valid {
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #15803D 0%, #065F46 100%) border-box;
}

.form-group input[type="file"]::file-selector-button {
    padding: 8px 16px;
    border: none;
    background: linear-gradient(135deg, #15803D 0%, #065F46 100%);
    background-clip: padding-box;
    color: white;
    border-radius: 9999px;
    cursor: pointer;
    margin-left: -8px;
    margin-right: 12px;
    font-weight: 500;
    pointer-events: all;
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group input:disabled,
.form-group select:disabled {
    background: #f3f4f6;
    border-color: #e5e7eb;
    color: #9ca3af;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-group select {
    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 16px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 44px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.form-buttons {
    margin-top: 2rem;
}

.submit-btn {
    background: linear-gradient(135deg, #15803D 0%, #065F46 100%);
    background-clip: padding-box;
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 9999px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    min-height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.2);
}

.submit-btn:disabled {
    background: #e5e7eb;
    cursor: not-allowed;
    box-shadow: none;
    opacity: 0.6;
}


.submit-message {
    margin-top: 1.5rem;
    padding: 16px 24px;
    border-radius: 9999px;
    text-align: center;
    font-weight: 500;
    font-size: 15px;
    letter-spacing: 0.2px;
    transition: opacity 0.3s ease;
}

.submit-message.success {
    background: #ecfdf5;
    color: #065f46;
    border: 2px solid transparent;
    background: linear-gradient(#ecfdf5, #ecfdf5) padding-box,
                linear-gradient(135deg, #10b981 0%, #059669 100%) border-box;
}

.submit-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 2px solid transparent;
    background: linear-gradient(#fef2f2, #fef2f2) padding-box,
                linear-gradient(135deg, #ef4444 0%, #dc2626 100%) border-box;
}

.success-centered {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90%;
    width: auto;
    padding: 2rem 3rem;
    background: #ecfdf5;
    color: #065f46;
    border: 2px solid transparent;
    background: linear-gradient(#ecfdf5, #ecfdf5) padding-box,
                linear-gradient(135deg, #10b981 0%, #059669 100%) border-box;
    border-radius: 24px;
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.2);
    animation: fadeInScale 0.5s ease;
    z-index: 1000;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

.form-row .form-group {
    flex: 1;
}

@media (max-width: 768px) {
    .application-form {
        max-width: 95%;
        padding: 1.5rem;
    }

    .form-title {
        font-size: 1.2rem;
    }

    .form-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.8rem;
    }

    .submit-btn,
    .back-btn {
        width: 100%;
        max-width: 280px;
        padding: 1rem 1.5rem;
    }

    .logo {
        width: 200px;
    }

    .section.top {
        margin-bottom: 1rem;
        gap: 1rem;
    }

    .tagline {
        font-size: 1.3rem;
    }

    .disclaimer {
        font-size: 0.8rem;
        margin: -0.3rem auto 0;
    }

    .success-centered {
        padding: 1.5rem 2rem;
        font-size: 1rem;
        max-width: 85%;
    }
}

@media (max-width: 480px) {
    .application-form {
        padding: 1rem;
        max-width: 98%;
    }

    .form-group {
        margin-bottom: 0.6rem;
    }

    .section.top {
        margin-bottom: 0.75rem;
        gap: 0.75rem;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .disclaimer {
        font-size: 0.75rem;
        margin: -0.2rem auto 0;
    }

    .success-centered {
        padding: 1.25rem 1.5rem;
        font-size: 0.95rem;
        max-width: 90%;
    }

    .logo {
        width: 180px;
    }
}

body {
    height: auto;
    min-height: 100vh;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 0;
}

.container {
    min-height: auto;
    height: auto;
    padding: 1rem;
    max-width: 100%;
    justify-content: center;
}

.section.top {
    flex: none;
    margin-bottom: 1rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
}

.section.middle {
    flex: none;
    width: 100%;
    display: flex;
    justify-content: center;
}

.section.bottom {
    flex: none;
    height: 1rem;
}


.logo {
    width: 240px;
    height: auto;
    margin: 0;
}

.tagline {
    margin: 0;
    color: #4b5563;
    font-size: 1.5rem;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    display: block;
    letter-spacing: 0.5px;
}

.disclaimer {
    margin: -0.5rem auto 0;
    max-width: 420px;
    color: #6b7280;
    font-size: 0.875rem;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.4;
    padding: 0 1rem;
}

.field-error {
    display: none;
}

.form-group input.error,
.form-group select.error {
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #dc2626 0%, #991b1b 100%) border-box;
}

.form-group input.error:focus,
.form-group select.error:focus {
    outline: none;
}

.roles-container {
    display: flex;
    gap: 1rem;
}

.role-column {
    flex: 1;
    min-width: 0;
}

.role-column h4 {
    display: none;
}

.role-option {
    background: white;
    border: 2px solid transparent;
    background: linear-gradient(white, white) padding-box,
                linear-gradient(135deg, #e5e7eb 0%, #d1d5db 100%) border-box;
    border-radius: 9999px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
    cursor: pointer;
}

.role-option span {
    color: #4b5563;
    font-weight: 500;
    font-size: 14px;
}

.role-option.selected {
    background: linear-gradient(135deg, #15803D 0%, #065F46 100%);
    background-clip: padding-box;
    border: none;
    box-shadow: 0 2px 8px rgba(21, 128, 61, 0.25);
}

.role-option.selected span {
    color: #ffffff;
}

#selectedRolesInputs {
    display: none;
}

.roles-container.error .role-option:not(.selected) {
    background: linear-gradient(#fef2f2, #fef2f2) padding-box,
                linear-gradient(135deg, #fca5a5 0%, #dc2626 100%) border-box;
}

@media (max-width: 600px) {
    .roles-container {
        flex-direction: column;
        gap: 0;
    }

    .role-column {
        width: 100%;
    }
}


