/* ==========================================
   ODL Financial Corporation - Form Styles
   ========================================== */

:root {
    --primary: #0f172a;
    --primary-light: #1e3a8a;
    --accent: #1e3a8a;
    --accent-hover: #0f172a;
    --success: #16a34a;
    --bg: #f8fafc;
    --card-bg: #ffffff;
    --text: #1e293b;
    --text-light: #64748b;
    --border: #e2e8f0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

body {
    background-color: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
}

/* Top Bar */
.top-bar {
    width: 100%;
    max-width: 680px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-bottom: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.top-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 13px;
    color: var(--text-light);
}

.secure-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--success);
    font-weight: 500;
}

/* Pill Language Switcher */
.lang-switch-container {
    display: flex;
    background: #e2e8f0;
    border-radius: 20px;
    padding: 2px;
    cursor: pointer;
    user-select: none;
    font-size: 12px;
    font-weight: 700;
}

.lang-option {
    padding: 4px 10px;
    border-radius: 16px;
    color: var(--text-light);
    transition: all 0.2s ease;
}

.lang-option.active {
    background: #ffffff;
    color: var(--primary);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

/* Main Container */
.container {
    width: 100%;
    max-width: 680px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border);
    padding: 40px;
    margin-bottom: 40px;
}

/* Stepper progress */
.stepper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 35px;
    position: relative;
}

.stepper::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 25px;
    right: 25px;
    height: 2px;
    background: #e2e8f0;
    transform: translateY(-50%);
    z-index: 1;
}

.step {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    background: var(--card-bg);
    padding: 0 6px;
    position: relative;
    z-index: 2;
}

.step.active {
    color: var(--primary);
    font-weight: 600;
}

.step-number {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid #e2e8f0;
}

.step.active .step-number {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.step.completed .step-number {
    background: var(--success);
    color: white;
    border-color: var(--success);
}

/* Form Titles */
.title-area {
    margin-bottom: 28px;
}

.section-title {
    font-size: 23px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 6px;
}

.section-desc {
    font-size: 15px;
    color: var(--text-light);
}

.group-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 12px;
}

/* Form Controls */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group.full {
    grid-column: span 2;
}

label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #334155;
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    background: #fff;
    color: var(--text);
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.08);
}

.input-helper {
    font-size: 13px;
    color: var(--text-light);
    margin-top: 5px;
}

.input-group-prefix {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
    width: 100%;
}

.input-group-prefix span {
    padding: 0 14px;
    color: var(--text-light);
    font-weight: 500;
    background-color: #f8fafc;
    border-right: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
}

.input-group-prefix .form-control {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 11px 14px;
    background: transparent;
}

/* Loan Card Layout */
.loan-cards-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 8px;
    margin-bottom: 24px;
}

.loan-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.loan-card:hover {
    border-color: #94a3b8;
}

.loan-card input[type="radio"] {
    margin: 0;
    accent-color: var(--primary);
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.loan-card-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.loan-card-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    line-height: 1.35;
}

.loan-card-desc {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.45;
}

.loan-card.selected {
    border-color: var(--primary);
    background-color: #f8fafc;
    box-shadow: 0 0 0 1px var(--primary);
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}

.btn {
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
}

.btn-secondary:hover {
    background: #e2e8f0;
}

.btn-primary {
    background: #1E293B !important;
    color: white;
}

.btn-primary:hover {
    background: var(--accent-hover);
}

.page-footer {
    font-size: 13px;
    color: var(--text-light);
    text-align: center;
    margin-top: 10px;
}

/* Radio Pill Styles */
.radio-group-options {
    display: flex;
    gap: 12px;
    margin-top: 6px;
}

.radio-pill {
    flex: 1;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 11px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    background: #fff;
    transition: all 0.2s;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    position: relative;
}

.radio-pill:hover {
    border-color: #94a3b8;
}

.radio-pill input[type="radio"] {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.radio-pill.selected {
    border-color: var(--primary);
    background-color: #f8fafc;
    box-shadow: 0 0 0 1px var(--primary);
}

.radio-pill.selected::after {
    content: '✓';
    color: var(--primary);
    font-weight: 700;
    font-size: 14px;
    margin-left: auto;
}

/* Financial Commitments */
.commitment-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    position: relative;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    animation: fadeIn 0.3s ease-in-out;
}

.commitment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
}

.btn-remove-card {
    background: transparent;
    border: none;
    color: var(--text-light);
    font-size: 13px;
    cursor: pointer;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 4px;
    transition: color 0.2s;
}

.btn-remove-card:hover {
    color: #dc2626;
}

.btn-add-more {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
}

.btn-add-more:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

/* Document Cards */
.doc-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.01);
    transition: all 0.2s ease;
}

.doc-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.doc-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 4px;
}

.doc-desc {
    font-size: 14px;
    color: var(--text-light);
}

.doc-status-badge {
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
}

.doc-status-badge.pending {
    background: #f1f5f9;
    color: #475569;
}

.doc-status-badge.received {
    background: #dcfce7;
    color: #16a34a;
}

.hidden-file-input {
    display: none;
}

.btn-upload {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background 0.2s;
}

.btn-upload:hover {
    background: var(--accent-hover);
}

.uploaded-files-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 14px;
}

.uploaded-file-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--text);
}

.file-action-link {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.file-action-link:hover {
    color: var(--primary-light);
}

.btn-add-another-doc {
    background: #ffffff;
    color: var(--text);
    border: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    transition: background 0.2s;
}

.btn-add-another-doc:hover {
    background: #f1f5f9;
}

/* Review Cards */
.review-card {
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px 6px 24px;
}

.review-card-title {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.btn-edit-section {
    background: none;
    border: none;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.btn-edit-section:hover {
    color: var(--primary);
}

.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 24px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}

.review-card .review-row:last-child {
    border-bottom: none;
}

.review-label {
    color: var(--text-light);
    font-weight: 400;
}

.review-value {
    color: var(--text);
    font-weight: 600;
    text-align: right;
}

#pep-description-container, 
#other-repayment-container, 
#other-income-fields {
    animation: fadeIn 0.3s ease-in-out;
}



/* ==========================================
   Eye-Catching Application Processing Loader
   ========================================== */
#loadingOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
    display: none; /* Controlled via JavaScript */
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeInOverlay 0.3s ease-in-out;
    padding-top:25px;
}

.processing-card {
    background: var(--card-bg, #ffffff);
    border: 1px solid var(--border-color, #e2e8f0);
    border-radius: 20px;
    padding: 40px 32px;
    width: 90%;
    max-width: 380px;
    box-shadow: 0 25px 50px -12px rgba(30, 58, 138, 0.25);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: scaleUpCard 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Glowing Top Brand Accent Line */
.processing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary, #1e3a8a), #3b82f6);
}

/* Modern Smooth Spinner */
.processing-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid #f1f5f9;
    border-top: 4px solid var(--primary, #1e3a8a);
    border-radius: 50%;
    animation: spinLoader 0.9s cubic-bezier(0.68, -0.55, 0.27, 1.55) infinite;
    margin-bottom: 20px;
}

.processing-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-main, #1e293b);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
}

.processing-note {
    font-size: 14px;
    color: var(--text-muted, #64748b);
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Keyframe Animations */
@keyframes spinLoader {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInOverlay {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes scaleUpCard {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}