.rl-job-application {
    --rl-job-app-primary: #6D28D9;
    --rl-job-app-primary-hover: #5b21b6;
    --rl-job-app-bg: #ffffff;
    --rl-job-app-text: #1f2937;
    --rl-job-app-text-muted: #6b7280;
    --rl-job-app-border: #e5e7eb;
    --rl-job-app-radius: 12px;
    --rl-job-app-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    max-width: 800px; /* 760px card box + 40px horizontal padding */
    margin: 0 auto;
    padding: 20px;
}

.rl-job-app-progress {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 32px;
    gap: 0;
}

.rl-job-app-progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.rl-job-app-progress-number {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--rl-job-app-border);
    color: var(--rl-job-app-text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.rl-job-app-progress-step.active .rl-job-app-progress-number {
    background: var(--rl-job-app-primary);
    color: #ffffff;
}

.rl-job-app-progress-step.completed .rl-job-app-progress-number {
    background: var(--rl-job-app-primary);
    color: #ffffff;
}

.rl-job-app-progress-label {
    font-size: 12px;
    color: var(--rl-job-app-text-muted);
    font-weight: 500;
    transition: color 0.3s ease;
}

.rl-job-app-progress-step.active .rl-job-app-progress-label {
    color: var(--rl-job-app-primary);
}

.rl-job-app-progress-line {
    flex: 1;
    height: 2px;
    background: var(--rl-job-app-border);
    margin: 0 16px;
    min-width: 60px;
    max-width: 100px;
    margin-top: -24px;
}

.rl-job-app-step {
    background: #ffffff;
    border-radius: 12px;
    padding: 40px;
    border: 1px solid #f1f5f9;
    box-shadow: 0 4px 20px -2px rgba(15, 23, 42, 0.05);
}

.rl-job-app-step-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--rl-job-app-text);
    margin: 0 0 8px 0;
}

.rl-job-app-step-description {
    font-size: 14px;
    color: var(--rl-job-app-text-muted);
    margin: 0 0 24px 0;
}

.rl-job-app-fields {
    display: flex;
    flex-direction: column;
    gap: 48px;
}

.rl-job-app-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rl-job-app-label {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    display: flex;
    align-items: center;
    gap: 6px;
}

.rl-job-app-required {
    color: #ef4444;
    font-weight: 500;
    font-size: 13px;
}

.rl-job-app-input,
.rl-job-app-select,
.rl-job-app-textarea {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid #DCE0E4 !important;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.rl-job-app-input:focus,
.rl-job-app-select:focus,
.rl-job-app-textarea:focus {
    outline: none;
    border-color: var(--rl-job-app-primary);
    box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.1);
}

.rl-job-app-input::placeholder {
    color: #94a3b8;
}

.rl-job-app-name-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.rl-job-app-file-upload {
    position: relative;
}

.rl-job-app-file-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.rl-job-app-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 32px;
    border: 2px dashed #DCE0E4;
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rl-job-app-file-label:hover {
    border-color: var(--rl-job-app-primary);
    background: rgba(109, 40, 217, 0.05);
}

.rl-job-app-file-icon {
    font-size: 24px;
}

.rl-job-app-file-text {
    font-size: 14px;
    color: var(--rl-job-app-text-muted);
}

.rl-job-app-file-input.has-file + .rl-job-app-file-label {
    border-color: var(--rl-job-app-primary);
    background: rgba(109, 40, 217, 0.1);
}

.rl-job-app-file-input.has-file + .rl-job-app-file-label .rl-job-app-file-text {
    color: var(--rl-job-app-primary);
    font-weight: 500;
}

.rl-job-app-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

.rl-job-application button.rl-job-app-btn,
.rl-job-application .rl-job-app-btn {
    padding: 12px 24px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 4px !important;
    border: none !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
}

.rl-job-application button.rl-job-app-btn-primary,
.rl-job-application .rl-job-app-btn-primary {
    background: var(--rl-job-app-primary) !important;
    background-color: var(--rl-job-app-primary) !important;
    color: #ffffff !important;
    border: none !important;
}

.rl-job-application button.rl-job-app-btn-primary:disabled,
.rl-job-application button.rl-job-app-btn-primary[disabled],
.rl-job-application .rl-job-app-btn-primary:disabled,
.rl-job-application .rl-job-app-btn-primary[disabled] {
    background: #cbd5e1 !important;
    background-color: #cbd5e1 !important;
    color: #94a3b8 !important;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.rl-job-application button.rl-job-app-btn-primary:hover,
.rl-job-application .rl-job-app-btn-primary:hover {
    background: var(--rl-job-app-primary-hover) !important;
    background-color: var(--rl-job-app-primary-hover) !important;
    color: #ffffff !important;
    transform: translateY(-1px) !important;
}

.rl-job-application button.rl-job-app-btn-secondary,
.rl-job-application .rl-job-app-btn-secondary {
    background: transparent !important;
    color: var(--rl-job-app-text-muted) !important;
    border: 1px solid var(--rl-job-app-border) !important;
}

.rl-job-application button.rl-job-app-btn-secondary:hover,
.rl-job-application .rl-job-app-btn-secondary:hover {
    background: #f9fafb !important;
    color: var(--rl-job-app-text) !important;
}

.rl-job-app-success {
    background: var(--rl-job-app-bg);
    border-radius: var(--rl-job-app-radius);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--rl-job-app-shadow);
}

.rl-job-app-success-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #10b981;
    color: #ffffff;
    font-size: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.rl-job-app-success h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--rl-job-app-text);
    margin: 0 0 8px 0;
}

.rl-job-app-success p {
    font-size: 14px;
    color: var(--rl-job-app-text-muted);
    margin: 0;
}

.rl-job-app-error {
    margin-top: 16px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

.rl-job-app-error-message {
    color: #dc2626;
    font-size: 14px;
    margin: 0;
}

@media (max-width: 640px) {
    .rl-job-application {
        padding: 16px;
    }

    .rl-job-app-step {
        padding: 24px 20px;
    }

    .rl-job-app-progress-label {
        display: none;
    }

    .rl-job-app-progress-line {
        min-width: 40px;
        max-width: 60px;
    }

    .rl-job-app-name-fields {
        grid-template-columns: 1fr;
    }

    .rl-job-app-actions {
        flex-direction: column-reverse;
    }

    .rl-job-app-btn {
        width: 100%;
    }
}

.rl-job-app-tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px 12px;
    border: 1px solid var(--rl-job-app-border);
    border-radius: 8px;
    background: #ffffff;
    min-height: 44px;
    cursor: text;
}

.rl-job-app-tags-container:focus-within {
    border-color: var(--rl-job-app-primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.rl-job-app-tag {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--rl-job-app-primary);
    border-radius: 16px;
    font-size: 14px;
    font-weight: 500;
}

.rl-job-app-tag-remove {
    cursor: pointer;
    opacity: 0.7;
    font-size: 16px;
    line-height: 1;
}

.rl-job-app-tag-remove:hover {
    opacity: 1;
}

.rl-job-app-tags-input {
    flex: 1;
    min-width: 120px;
    border: none;
    outline: none;
    padding: 4px 0;
    font-size: 16px;
    background: transparent;
}

.rl-job-app-tags-hidden {
    display: none;
}

.rl-job-app-country-select + .select2,
.rl-job-app-country-select-container .select2-container {
    width: 100% !important;
}

.rl-job-app-country-select-container .select2-selection {
    height: 44px;
    padding: 8px 12px;
    border: 1px solid var(--rl-job-app-border);
    border-radius: 8px;
}

.rl-job-app-country-select-container .select2-selection__rendered {
    line-height: 26px;
    font-size: 16px;
}

.rl-job-app-country-select-container .select2-selection__arrow {
    height: 42px;
}

.rl-job-app-confirmation {
    background: var(--rl-job-app-bg);
    border-radius: var(--rl-job-app-radius);
    padding: 48px 32px;
    text-align: center;
    box-shadow: var(--rl-job-app-shadow);
}

.rl-job-app-confirmation h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--rl-job-app-text);
    margin: 0 0 16px 0;
}

.rl-job-app-confirmation p {
    font-size: 16px;
    color: var(--rl-job-app-text-muted);
    margin: 0 0 24px 0;
}

.rl-job-app-input-error,
.rl-job-app-select.input-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.rl-job-app-field-error .rl-job-app-label {
    color: #ef4444;
}

.rl-job-app-field-error .rl-job-app-file-label,
.rl-job-app-field-error .rl-job-app-recorder-container {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.rl-job-app-recorder-container {
    border: 1px solid #DCE0E4;
    border-radius: 8px;
    padding: 32px;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    transition: border-color 0.2s ease, background-color 0.2s ease;
}

.rl-job-app-recorder-main {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%;
    justify-content: center;
}

.rl-job-app-recorder-trigger {
    width: 64px !important;
    height: 64px !important;
    border-radius: 50% !important;
    background: #ffffff;
    border: 1px solid #cbd5e1 !important;
    color: #475569 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    transition: all 0.2s ease;
}

.rl-job-app-recorder-trigger svg {
    width: 24px;
    height: 24px;
}

.rl-job-app-recorder-trigger:hover {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    transform: scale(1.05);
}

.rl-job-app-recorder-trigger.recording {
    background: #fef2f2;
    border-color: #ef4444;
    color: #ef4444;
    animation: rl-pulse-ring 1.5s infinite;
}

.rl-job-app-recorder-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rl-job-app-recorder-timer {
    font-size: 24px;
    font-weight: 700;
    font-family: monospace;
    color: #0f172a;
    line-height: 1;
}

.rl-job-app-recorder-hint {
    font-size: 13px;
    color: #64748b;
}

.rl-job-app-recorder-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    height: 24px;
    margin-top: 8px;
}

.rl-job-app-recorder-wave span {
    width: 3px;
    height: 10px;
    background: #ef4444;
    border-radius: 3px;
    animation: rl-wave-pulse 1.2s infinite ease-in-out;
}

.rl-job-app-recorder-wave span:nth-child(1) { animation-delay: -1.2s; }
.rl-job-app-recorder-wave span:nth-child(2) { animation-delay: -1.1s; }
.rl-job-app-recorder-wave span:nth-child(3) { animation-delay: -1.0s; }
.rl-job-app-recorder-wave span:nth-child(4) { animation-delay: -0.9s; }
.rl-job-app-recorder-wave span:nth-child(5) { animation-delay: -0.8s; }
.rl-job-app-recorder-wave span:nth-child(6) { animation-delay: -0.7s; }
.rl-job-app-recorder-wave span:nth-child(7) { animation-delay: -0.6s; }
.rl-job-app-recorder-wave span:nth-child(8) { animation-delay: -0.5s; }
.rl-job-app-recorder-wave span:nth-child(9) { animation-delay: -0.4s; }
.rl-job-app-recorder-wave span:nth-child(10) { animation-delay: -0.3s; }

.rl-job-app-recorder-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.rl-job-app-audio-preview {
    width: 100%;
    max-width: 320px;
}

.rl-job-app-btn-reset {
    border: 1px solid #fca5a5;
    background: #ffffff;
    color: #ef4444;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rl-job-app-btn-reset:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

@keyframes rl-pulse-ring {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes rl-wave-pulse {
    0%, 100% { transform: scaleY(1); }
    50% { transform: scaleY(2.5); }
}

/* ── Async Upload Status Indicators ── */

.rl-job-app-upload-status {
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.25s ease;
}

.rl-job-app-upload-status.uploading {
    background: #f0f4ff;
    border: 1px solid #c7d2fe;
    color: #4338ca;
}

.rl-job-app-upload-status.upload-success {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.rl-job-app-upload-status.upload-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.rl-job-app-upload-spinner {
    width: 18px;
    height: 18px;
    border: 2.5px solid #c7d2fe;
    border-top-color: #4f46e5;
    border-radius: 50%;
    animation: rl-upload-spin 0.7s linear infinite;
    flex-shrink: 0;
}

.rl-job-app-upload-check {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rl-job-app-upload-check svg {
    width: 18px;
    height: 18px;
}

.rl-job-app-upload-text {
    flex: 1;
    font-weight: 500;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rl-job-app-upload-retry {
    border: 1px solid #fca5a5;
    background: #ffffff;
    color: #dc2626;
    padding: 4px 12px;
    border-radius: 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.rl-job-app-upload-retry:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

@keyframes rl-upload-spin {
    to { transform: rotate(360deg); }
}