/* FindraCapital — Loan Application UX */

.application-page {
    background: linear-gradient(160deg, #f0f4ff 0%, #f8fafc 45%, #eef2ff 100%);
    min-height: calc(100vh - 72px);
    padding: 1.5rem 0 7rem;
}

.application-wrap {
    max-width: 900px;
    margin: 0 auto;
}

.app-trust-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    justify-content: center;
    margin-bottom: 1.25rem;
    font-size: 0.8rem;
    color: #475569;
}

.app-trust-bar span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.25);
    border-radius: 999px;
    padding: 0.35rem 0.85rem;
    backdrop-filter: blur(8px);
}

.app-progress-card {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    backdrop-filter: blur(12px);
}

.app-progress-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.app-progress-header h6 {
    margin: 0;
    font-weight: 700;
    color: #0f172a;
}

.app-progress-pct {
    font-weight: 700;
    color: #4f46e5;
}

.app-time-left {
    font-size: 0.8rem;
    color: #64748b;
}

.app-progress-track {
    height: 10px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
}

.app-progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6, #06b6d4);
    background-size: 200% 100%;
    animation: appProgressShine 2.5s ease infinite;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes appProgressShine {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.app-glass-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.95);
    border-radius: 24px;
    box-shadow:
        0 4px 6px -1px rgba(15, 23, 42, 0.06),
        0 20px 50px -12px rgba(79, 70, 229, 0.18);
    overflow: hidden;
}

.app-card-body {
    padding: 1.75rem 1.5rem 1rem;
}

@media (min-width: 768px) {
    .app-card-body {
        padding: 2rem 2.25rem 1rem;
    }
}

.app-stage-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 0.35rem;
}

.app-stage-sub {
    color: #64748b;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.app-field-grid {
    display: grid;
    gap: 1rem;
}

@media (min-width: 768px) {
    .app-field-grid.two-col {
        grid-template-columns: 1fr 1fr;
    }
    .app-field-grid .span-full {
        grid-column: 1 / -1;
    }
}

.fc-field-wrap {
    position: relative;
}

.fc-field-wrap .form-floating > .form-control,
.fc-field-wrap .form-floating > .form-select {
    border-radius: 12px;
    border-color: #cbd5e1;
    min-height: 3.25rem;
    padding-left: 2.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.fc-field-wrap .form-floating > .form-control:focus,
.fc-field-wrap .form-floating > .form-select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.fc-field-wrap.is-valid .form-control,
.fc-field-wrap.is-valid .form-select {
    border-color: #22c55e;
}

.fc-field-wrap.is-invalid .form-control,
.fc-field-wrap.is-invalid .form-select {
    border-color: #ef4444;
}

.fc-field-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 4;
    color: #94a3b8;
    pointer-events: none;
    font-size: 1rem;
}

.fc-field-wrap .form-floating > label {
    padding-left: 2.75rem;
    color: #64748b;
}

.fc-valid-mark {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #22c55e;
    opacity: 0;
    transition: opacity 0.2s;
    z-index: 4;
}

.fc-field-wrap.is-valid .fc-valid-mark {
    opacity: 1;
}

.fc-check-row {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1rem 1.1rem;
}

.fc-check-row .form-check-label {
    font-size: 0.88rem;
    line-height: 1.45;
    color: #334155;
}

.app-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    background: rgba(255, 255, 255, 0.95);
    border-top: 1px solid #e2e8f0;
    backdrop-filter: blur(12px);
    padding: 0.85rem 0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.06);
}

.app-sticky-footer .application-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.app-sticky-footer .btn {
    border-radius: 12px;
    padding: 0.65rem 1.5rem;
    font-weight: 600;
}

.app-autosave-status {
    font-size: 0.75rem;
    color: #94a3b8;
    text-align: center;
    margin-top: 0.5rem;
    min-height: 1.1rem;
}

.app-autosave-status.is-saving { color: #6366f1; }
.app-autosave-status.is-saved { color: #22c55e; }

/* Eligibility result */
.eligibility-hero {
    text-align: center;
    padding: 1rem 0 1.5rem;
}

.eligibility-hero .celebration-icon {
    font-size: 3.5rem;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.eligibility-stats {
    display: grid;
    gap: 0.75rem;
    margin: 1.5rem 0;
}

@media (min-width: 576px) {
    .eligibility-stats {
        grid-template-columns: repeat(3, 1fr);
    }
}

.eligibility-stat {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem;
    text-align: center;
}

.eligibility-stat .label {
    font-size: 0.75rem;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.eligibility-stat .value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin-top: 0.25rem;
}

/* Document checklist */
.doc-checklist {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.doc-item {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    padding: 1rem 1.1rem;
    transition: border-color 0.2s, background 0.2s;
}

.doc-item.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.doc-item.is-active {
    border-color: #a5b4fc;
    background: #fafaff;
}

.doc-item-header {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-weight: 600;
    color: #0f172a;
}

.doc-item-header .status-icon {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.doc-item.is-done .status-icon {
    background: #22c55e;
    color: #fff;
}

.doc-item:not(.is-done) .status-icon {
    background: #e2e8f0;
    color: #64748b;
}

.doc-dropzone {
    margin-top: 0.75rem;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

.doc-dropzone:hover,
.doc-dropzone.is-dragover {
    border-color: #6366f1;
    background: #f5f3ff;
}

.doc-dropzone input[type="file"] {
    display: none;
}

.doc-upload-progress {
    height: 4px;
    background: #e2e8f0;
    border-radius: 999px;
    margin-top: 0.5rem;
    overflow: hidden;
    display: none;
}

.doc-upload-progress .bar {
    height: 100%;
    background: #6366f1;
    width: 0%;
    transition: width 0.3s;
}

/* Review cards */
.review-grid {
    display: grid;
    gap: 1rem;
}

.review-card {
    border: 1px solid #e2e8f0;
    border-radius: 16px;
    overflow: hidden;
}

.review-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.review-card-header h6 {
    margin: 0;
    font-weight: 700;
}

.review-card-body {
    padding: 0.85rem 1.1rem;
}

.review-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.35rem 0;
    font-size: 0.88rem;
    border-bottom: 1px solid #f1f5f9;
}

.review-row:last-child {
    border-bottom: none;
}

.review-row .key {
    color: #64748b;
    flex-shrink: 0;
}

.review-row .val {
    text-align: right;
    color: #0f172a;
    font-weight: 500;
}

/* Success screen */
.success-page {
    background: linear-gradient(160deg, #f0fdf4 0%, #f8fafc 50%, #eef2ff 100%);
    min-height: calc(100vh - 72px);
    padding: 3rem 0;
}

.success-card {
    max-width: 560px;
    margin: 0 auto;
    background: #fff;
    border-radius: 24px;
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: 0 20px 50px -12px rgba(34, 197, 94, 0.2);
}

.success-ref {
    background: linear-gradient(135deg, #eef2ff, #f0fdf4);
    border-radius: 16px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.success-ref .ref-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #4f46e5;
    letter-spacing: 0.05em;
}

.success-meta {
    display: grid;
    gap: 0.75rem;
    text-align: left;
    margin: 1.25rem 0;
}

.success-meta-item {
    display: flex;
    justify-content: space-between;
    padding: 0.65rem 0.85rem;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 0.9rem;
}

.app-fade-in {
    animation: appFadeIn 0.4s ease;
}

@keyframes appFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
