/* Credit-check 3-step AI prescreen flow */
#creditCheckModal .modal-content {
    border: 0;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(15, 23, 42, .32);
    font-family: inherit;
}

#creditCheckModal .cc-head {
    background: linear-gradient(135deg, #0b1220 0%, #14233f 55%, #0f2a4a 100%);
    color: #fff;
    padding: 18px 22px;
    position: relative;
}

#creditCheckModal .cc-head .cc-title {
    font-weight: 800;
    font-size: 1.02rem;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding-left: 44px;
}

#creditCheckModal .cc-head .cc-sub {
    font-size: .74rem;
    color: #93c5fd;
    margin-top: 3px;
    padding-left: 44px;
}

#creditCheckModal .cc-head .btn-close {
    position: absolute;
    left: 16px;
    right: auto;
    top: 16px;
    margin: 0;
    z-index: 3;
}

#creditCheckModal .cc-grip { display: none; }

#creditCheckModal .modal-body {
    padding: 18px 20px 20px;
}

#creditCheckModal .cc-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
    font-size: .72rem;
    font-weight: 700;
    color: #94a3b8;
}

#creditCheckModal .cc-step-pill {
    padding: 5px 10px;
    border-radius: 999px;
    background: #f1f5f9;
    transition: all .2s;
}

#creditCheckModal .cc-step-pill.active {
    background: #dbeafe;
    color: #1d4ed8;
}

#creditCheckModal .cc-step-pill.done {
    background: #dcfce7;
    color: #15803d;
}

#creditCheckModal .cc-step-sep {
    width: 18px;
    height: 2px;
    background: #e2e8f0;
    border-radius: 2px;
}

#creditCheckModal .cc-loan-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f8fafc;
    border: 1px solid #e9eef5;
    border-radius: 14px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

#creditCheckModal .cc-loan-strip .cc-loan-name {
    font-weight: 800;
    font-size: .9rem;
    color: #0f172a;
}

#creditCheckModal .cc-loan-strip .cc-bank-chip {
    font-size: .72rem;
    font-weight: 700;
    color: #1d4ed8;
    background: #e0ecff;
    padding: 4px 10px;
    border-radius: 999px;
    white-space: nowrap;
    flex: 0 0 auto;
}

#creditCheckModal .cc-step-panel { display: none; }
#creditCheckModal .cc-step-panel.active { display: block; }

#creditCheckModal .cc-step-title {
    font-weight: 800;
    font-size: 1rem;
    color: #0f172a;
    margin-bottom: 4px;
}

#creditCheckModal .cc-step-sub {
    font-size: .78rem;
    color: #64748b;
    margin-bottom: 14px;
    line-height: 1.7;
}

#creditCheckModal .form-label {
    font-size: .76rem;
    color: #64748b;
    margin-bottom: 3px;
    font-weight: 600;
}

#creditCheckModal .form-control,
#creditCheckModal .form-select {
    border-radius: 10px;
    border-color: #e2e8f0;
    font-size: .86rem;
    padding: .5rem .7rem;
}

#creditCheckModal .form-control:focus,
#creditCheckModal .form-select:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, .18);
}

#creditCheckModal .cc-toggle-group {
    display: flex;
    gap: 8px;
}

#creditCheckModal .cc-toggle-btn {
    flex: 1;
    border: 1px solid #e2e8f0;
    background: #fff;
    border-radius: 10px;
    padding: .45rem .5rem;
    font-size: .82rem;
    font-weight: 700;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
}

#creditCheckModal .cc-toggle-btn.active {
    border-color: #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
}

#creditCheckModal .cc-primary-btn {
    width: 100%;
    margin-top: 14px;
    padding: .82rem;
    border: 0;
    border-radius: 12px;
    font-weight: 800;
    font-size: .95rem;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    box-shadow: 0 10px 24px rgba(37, 99, 235, .28);
    transition: all .2s;
}

#creditCheckModal .cc-primary-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

#creditCheckModal .cc-primary-btn:not(:disabled):hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

#creditCheckModal .cc-pay-btn {
    width: 100%;
    margin-top: 14px;
    padding: .88rem 1rem;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    font-size: .95rem;
    color: #fff;
    background: #008966;
    box-shadow: 0 8px 22px rgba(0, 137, 102, .28);
    transition: all .2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

#creditCheckModal .cc-pay-btn:disabled {
    background: #cbd5e1;
    box-shadow: none;
    cursor: not-allowed;
}

#creditCheckModal .cc-pay-btn:not(:disabled):hover {
    background: #007a5c;
    transform: translateY(-1px);
}

#creditCheckModal .cc-surface-card {
    background: #fff;
    border: 1px solid #e8edf5;
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .04);
}

/* Step 2 — AI analysis */
#creditCheckModal .cc-ai-status-card {
    text-align: center;
    padding: 18px 16px 16px;
}

#creditCheckModal .cc-ai-ring {
    width: 108px;
    height: 108px;
    margin: 0 auto 12px;
    position: relative;
}

#creditCheckModal .cc-ai-ring svg {
    width: 100%;
    height: 100%;
}

#creditCheckModal .cc-ai-lottie {
    position: absolute;
    inset: 18px;
    display: grid;
    place-items: center;
}

#creditCheckModal .cc-ai-loading {
    text-align: center;
    font-weight: 800;
    font-size: .92rem;
    color: #0f172a;
}

#creditCheckModal .cc-ai-wait {
    text-align: center;
    font-size: .76rem;
    color: #94a3b8;
    margin-top: 4px;
}

#creditCheckModal .cc-checklist {
    padding: 8px 14px;
}

#creditCheckModal .cc-check-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    font-size: .82rem;
    color: #334155;
    border-bottom: 1px dashed #e8edf5;
}

#creditCheckModal .cc-check-item:last-child { border-bottom: 0; }

#creditCheckModal .cc-check-icon {
    width: 24px;
    height: 24px;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

#creditCheckModal .cc-check-done {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #22c55e;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: .72rem;
    font-weight: 800;
}

#creditCheckModal .cc-check-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #dbeafe;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: ccSpin .8s linear infinite;
}

@keyframes ccSpin { to { transform: rotate(360deg); } }

#creditCheckModal .cc-info-box {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: #f5f8ff;
    border-color: #dbeafe;
    padding: 12px 14px;
}

#creditCheckModal .cc-info-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: #dbeafe;
    color: #2563eb;
    display: grid;
    place-items: center;
    font-size: 1rem;
    flex: 0 0 auto;
}

#creditCheckModal .cc-info-title {
    font-size: .8rem;
    font-weight: 800;
    color: #1e40af;
    margin-bottom: 2px;
}

#creditCheckModal .cc-info-desc {
    font-size: .74rem;
    color: #64748b;
    line-height: 1.7;
}

/* Step 3 — result (emerald theme) */
#creditCheckModal .cc-surface-card.cc-result-card.approved {
    background: #f1f8f1;
    border-color: #d1e7d1;
    text-align: center;
    padding: 20px 16px 16px;
}

#creditCheckModal .cc-result-card.approved {
    text-align: center;
    padding: 20px 16px 16px;
}

#creditCheckModal .cc-rejected-card {
    background: linear-gradient(180deg, #fff5f5, #fff1f2);
    border: 1px solid #fecdd3;
    border-radius: 16px;
    padding: 22px 18px 18px;
    text-align: center;
    margin-bottom: 12px;
}

#creditCheckModal .cc-rejected-icon-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #fee2e2;
    display: grid;
    place-items: center;
    margin: 0 auto 14px;
}

#creditCheckModal .cc-rejected-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 1.25rem;
    font-weight: 800;
}

#creditCheckModal .cc-rejected-title {
    font-weight: 800;
    font-size: .92rem;
    color: #b91c1c;
    line-height: 1.6;
    margin-bottom: 8px;
}

#creditCheckModal .cc-rejected-reason {
    font-size: .8rem;
    color: #64748b;
    line-height: 1.8;
}

#creditCheckModal .cc-rejected-highlight {
    color: #dc2626;
    font-weight: 800;
}

#creditCheckModal .cc-rejected-divider {
    border: 0;
    border-top: 1px solid #fecdd3;
    margin: 14px 0 12px;
    opacity: .7;
}

#creditCheckModal .cc-rejected-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: right;
    font-size: .74rem;
    color: #78716c;
    line-height: 1.75;
}

#creditCheckModal .cc-rejected-tip i {
    color: #f59e0b;
    font-size: .95rem;
    flex: 0 0 auto;
    margin-top: 2px;
}

#creditCheckModal .cc-retry-btn {
    width: 100%;
    margin-bottom: 8px;
    padding: .82rem 1rem;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    font-size: .92rem;
    color: #fff;
    background: #2563eb;
    box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all .2s;
}

#creditCheckModal .cc-retry-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

#creditCheckModal .cc-close-rejected-btn {
    width: 100%;
    padding: .78rem 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-weight: 700;
    font-size: .88rem;
    color: #64748b;
    background: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: all .2s;
}

#creditCheckModal .cc-close-rejected-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

#creditCheckModal .cc-result-card.rejected {
    background: linear-gradient(180deg, #fef2f2, #fff1f2);
    border: 1px solid #fecaca;
    text-align: center;
    padding: 20px 16px;
}

#creditCheckModal .cc-result-lottie {
    width: 80px;
    height: 80px;
    margin: 0 auto 10px;
}

#creditCheckModal .cc-result-title {
    font-weight: 800;
    font-size: .95rem;
    color: #008b5e;
    line-height: 1.6;
}

#creditCheckModal .cc-result-summary {
    font-size: .78rem;
    color: #757575;
    margin-top: 6px;
    line-height: 1.8;
}

#creditCheckModal .cc-result-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-size: 1.5rem;
    margin: 0 auto 10px;
}

#creditCheckModal .cc-result-card.rejected .cc-result-icon {
    background: #ef4444;
    color: #fff;
}

#creditCheckModal .cc-prob-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 12px auto 0;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: .74rem;
    font-weight: 800;
    background: #e8f5e9;
    border: 1px solid #c8e6d4;
    color: #008966;
}

#creditCheckModal .cc-prob-badge i {
    font-size: .82rem;
}

#creditCheckModal .cc-detail-card {
    padding: 16px 18px;
}

#creditCheckModal .cc-detail-card h6 {
    font-weight: 800;
    font-size: .9rem;
    color: #0f172a;
    margin-bottom: 4px;
}

#creditCheckModal .cc-detail-sub {
    font-size: .74rem;
    color: #757575;
    line-height: 1.75;
    margin-bottom: 14px;
}

#creditCheckModal .cc-detail-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px dashed #e8edf5;
}

#creditCheckModal .cc-detail-item:last-child { border-bottom: 0; }

#creditCheckModal .cc-detail-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(0, 137, 102, .1);
    color: #008966;
    display: grid;
    place-items: center;
    font-size: 1.12rem;
    flex: 0 0 auto;
}

#creditCheckModal .cc-detail-copy {
    flex: 1;
    min-width: 0;
    padding-top: 1px;
}

#creditCheckModal .cc-detail-title {
    font-weight: 800;
    font-size: .84rem;
    color: #0f172a;
    line-height: 1.5;
}

#creditCheckModal .cc-detail-desc {
    font-size: .73rem;
    color: #757575;
    line-height: 1.75;
    margin-top: 3px;
}

#creditCheckModal .cc-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
}

#creditCheckModal .cc-price-side--label {
    display: flex;
    align-items: center;
    gap: 12px;
}

#creditCheckModal .cc-price-side--amt {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 3px;
    text-align: left;
    flex-shrink: 0;
}

#creditCheckModal .cc-price-icon-wrap {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: rgba(0, 137, 102, .1);
    color: #008966;
    display: grid;
    place-items: center;
    font-size: 1.12rem;
    flex: 0 0 auto;
}

#creditCheckModal .cc-price-label {
    font-weight: 800;
    font-size: .86rem;
    color: #0f172a;
}

#creditCheckModal .cc-price-amt {
    font-weight: 800;
    font-size: 1.15rem;
    color: #008966;
    white-space: nowrap;
    letter-spacing: -.01em;
}

#creditCheckModal .cc-price-sub {
    font-size: .7rem;
    color: #757575;
    line-height: 1.55;
}

#creditCheckModal .cc-invoice-collapsed {
    display: none !important;
}

#creditCheckModal .cc-result-footer {
    margin-top: 10px;
    background: transparent;
    border-radius: 0;
    padding: 6px 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: .72rem;
    color: #757575;
    line-height: 1.6;
}

#creditCheckModal .cc-result-footer i {
    color: #94a3b8;
    font-size: .9rem;
    flex: 0 0 auto;
}

#creditCheckModal .cc-invoice {
    border: 1px solid #e6ecf5;
    border-radius: 16px;
    padding: 6px 16px 14px;
    background: #fff;
    margin-bottom: 12px;
}

#creditCheckModal .cc-invoice .cc-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 0;
    font-size: .86rem;
    border-bottom: 1px dashed #eef1f6;
}

#creditCheckModal .cc-invoice .cc-row:last-of-type { border-bottom: 0; }
#creditCheckModal .cc-invoice .cc-row.cc-free { color: #008966; font-weight: 700; }

#creditCheckModal .cc-invoice .cc-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 10px;
    padding-top: 12px;
    border-top: 2px solid #eef1f6;
}

#creditCheckModal .cc-invoice .cc-total .cc-amt {
    font-weight: 800;
    font-size: 1.15rem;
    color: #008966;
}

#creditCheckModal .cc-contract {
    margin-top: 10px;
    margin-bottom: 0;
    border: 1.5px solid #008966;
    border-radius: 16px;
    background: #fff;
    padding: 16px 18px 14px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 137, 102, .06);
}

#creditCheckModal .cc-contract-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

#creditCheckModal .cc-contract-copy {
    flex: 1;
    min-width: 0;
}

#creditCheckModal .cc-contract-title {
    display: block;
    font-weight: 800;
    font-size: .84rem;
    color: #0f172a;
    line-height: 1.55;
    margin-bottom: 6px;
    cursor: pointer;
}

#creditCheckModal .cc-contract-hint {
    font-size: .73rem;
    color: #757575;
    line-height: 1.8;
    margin: 0;
}

#creditCheckModal .cc-contract-check-wrap {
    position: relative;
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    border: 0;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

#creditCheckModal .cc-contract-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

#creditCheckModal .cc-contract-check-ui {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #fff;
    border: 1.5px solid #008966;
    display: grid;
    place-items: center;
    color: transparent;
    font-size: 1.2rem;
    font-weight: 800;
    transition: background .15s, color .15s, border-color .15s;
}

#creditCheckModal .cc-contract-input:checked + .cc-contract-check-ui {
    background: #008966;
    border-color: #008966;
    color: #fff;
}

#creditCheckModal .cc-contract .cc-contract-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: none;
    border: 0;
    color: #2563eb;
    font-size: .74rem;
    font-weight: 700;
    padding: 12px 0 0;
    margin-inline-end: auto;
    cursor: pointer;
}

#creditCheckModal .cc-contract .cc-contract-toggle i {
    font-size: .68rem;
}

#creditCheckModal .cc-contract .cc-contract-text {
    display: none;
    margin-top: 10px;
    max-height: 130px;
    overflow: auto;
    white-space: pre-wrap;
    line-height: 1.9;
    font-size: .78rem;
    color: #475569;
    border-top: 1px dashed #e8edf5;
    padding-top: 10px;
}

#creditCheckModal .cc-contract.open .cc-contract-text { display: block; }

#creditCheckModal .cc-guest-hint {
    margin-top: 10px;
    font-size: .74rem;
    color: #64748b;
    line-height: 1.8;
    text-align: center;
}

#creditCheckModal .cc-guest-hint a {
    color: #2563eb;
    font-weight: 700;
}

@media (max-width: 575.98px) {
    #creditCheckModal .modal-dialog {
        margin: 0 !important;
        position: fixed !important;
        inset: auto 0 0 0 !important;
        top: auto !important;
        max-width: 100% !important;
        width: 100% !important;
        min-height: 0 !important;
        height: auto !important;
        display: block !important;
    }

    #creditCheckModal.fade .modal-dialog {
        transform: translateY(100%);
        transition: transform .34s cubic-bezier(.22, .61, .36, 1);
    }

    #creditCheckModal.show .modal-dialog { transform: translateY(0); }

    #creditCheckModal .modal-content {
        border-radius: 22px 22px 0 0;
        max-height: 90vh;
        height: auto;
        display: flex;
        flex-direction: column;
    }

    #creditCheckModal .modal-body {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 14px 16px calc(16px + env(safe-area-inset-bottom, 0px));
    }

    #creditCheckModal .cc-grip {
        display: block;
        width: 42px;
        height: 5px;
        border-radius: 999px;
        background: rgba(255, 255, 255, .45);
        margin: -4px auto 10px;
        position: relative;
        z-index: 2;
    }

    #creditCheckModal .cc-head { padding: 14px 18px 16px; }

    #creditCheckModal .cc-loan-strip {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 6px;
    }
}
