* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f0f0f0;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    color: #222;
    -webkit-font-smoothing: antialiased;
}

.page-wrapper {
    max-width: 500px;
    margin: 0 auto;
    padding: 70px 16px 20px;
    background: url('../img/bg.jpg') center top / cover no-repeat fixed;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.main-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ===== Progress Bar ===== */
.progress-section {
    padding: 20px 24px 16px;
}

/* ===== Content Section ===== */
.content-section {
    padding: 0 24px 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.btn-primary {
    background-color: #d82027;
    border: none;
}

.btn-success {
    background-color: #019267;
    border: none;
}

.form-control {
    border-radius: 8px;
}

#loanApplicationForm {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.step {
    text-align: center;
}

.preview-container {
    max-width: 90%;
    margin: auto;
}

img#previewSelfieIdCard {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

img#previewIdCard {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    object-fit: cover;
}

.consent-options {
    display: flex;
    gap: 20px;
    align-items: center;
    justify-content: center;
}

video {
    aspect-ratio: 3 / 4;
    object-fit: cover;
    width: 100%;
    height: auto;
}

video.mirror {
    transform: scaleX(-1);
}

img.mirror {
    transform: scaleX(-1);
}

.camera-wrapper-idcard {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 4;
    background: black;
    overflow: hidden;
    border-radius: 12px;
}

.video-feed {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: rotate(0deg);
}

.overlay-idcard-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

.frame-instruction {
    position: absolute;
    bottom: 10px;
    width: 100%;
    font-size: 1rem;
    color: white;
    text-align: center;
    text-shadow: 0 0 5px #000;
}

.captured-image {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 11;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
}

.overlay-frame {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 5;
}

.scrollable-box {
    max-height: 500px;
    overflow-y: auto;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #ccc;
    font-size: 15px;
    line-height: 1.7;
}

/* ===== Shared Consent Box (all steps) ===== */
.consent-scrollable-box {
    max-height: none;
    overflow-y: visible;
    padding: 14px;
    font-size: 13px;
    line-height: 1.6;
    background: #ebeff2;
    border-radius: 10px;
    border: 1px solid #ccc;
    color: #000;
}

.consent-scrollable-box p {
    margin-bottom: 6px;
}

.consent-scrollable-box ol,
.consent-scrollable-box ul {
    margin-bottom: 4px;
    padding-left: 20px;
}

.consent-scrollable-box ol li,
.consent-scrollable-box ul li {
    margin-bottom: 2px;
}

.consent-scrollable-box strong {
    color: #222;
}

.consent-scrollable-box a {
    color: #d82027;
}

.consent-page-heading {
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 8px;
}

.consent-options {
    display: flex;
    gap: 40px;
    align-items: center;
    justify-content: center;
    padding: 12px 0;
    font-size: 1.5rem;
}

.consent-options label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    cursor: pointer;
}

.consent-options input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #999;
    border-radius: 50%;
    margin: 0;
    cursor: pointer;
    position: relative;
}

.consent-options input[type="radio"]:checked {
    border-color: #333;
}

.consent-options input[type="radio"]:checked::after {
    content: '';
    width: 10px;
    height: 10px;
    background: #cc0c13;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

#actionText {
    position: absolute;
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    font-size: clamp(14px, 4vw, 20px);
    font-weight: bold;
    color: white;
    text-align: center;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7);
    max-width: 90vw;
    white-space: normal;
    word-wrap: break-word;
}

.swal-text-custom {
    text-align: left;
    font-size: 14px;
    line-height: 1.5;
}

.swal2-popup.fullscreen-popup {
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    margin: 0;
    top: 0;
    left: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

@keyframes bounceArrow {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(6px);
    }
}

/* ===== Loan Application Header ===== */
.loan-progress-active {
    height: 8px;
    background: #cc0c13;
    border-radius: 10px;
    transition: flex 0.4s ease;
}

.loan-progress-empty {
    height: 8px;
    background: #f0f0f0;
    border-radius: 10px;
    transition: flex 0.4s ease;
}

