/* ===== followup.css v1.0 — PENTOR CASH PLUS ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: #f0f0f0;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    color: #222;
    -webkit-font-smoothing: antialiased;
}

/* ===== Layout ===== */
.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;
}

.result-page .main-card {
    flex: 0 0 auto;
}

.result-page .content-section {
    flex: 0 0 auto;
}

/* ===== Content Section ===== */
.content-section {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.content-section h4 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 20px;
}

/* ===== Form Controls ===== */
.form-control {
    border-radius: 8px;
    font-family: 'Prompt', 'Sarabun', sans-serif;
}

/* ===== OTP Section (match main app) ===== */
.otp-illustration {
    text-align: center;
    margin-top: 30px;
    margin-bottom: 25px;
}

.otp-illustration img {
    width: 55%;
    max-width: 200px;
    height: auto;
    rotate: 5deg;
}

.otp-label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 12px;
    font-size: 1rem;
    text-align: left;
}

.input-with-button,
.input-full {
    border: 4px solid #c0c0c0;
    border-radius: 20px;
    padding: 4px 6px 4px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s;
}

.input-with-button:focus-within,
.input-full:focus-within {
    border-color: #d32f2f;
}

.input-with-button input,
.input-full input {
    border: none;
    outline: none;
    padding: 12px 0;
    width: 100%;
    font-size: 1rem;
    color: #333;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    background: transparent;
}

.input-with-button input::placeholder,
.input-full input::placeholder {
    color: #aaa;
}

.btn-otp {
    background: linear-gradient(to bottom, #ff5252, #b71c1c);
    color: white;
    border: none;
    padding: 5px 20px;
    border-radius: 15px;
    cursor: pointer;
    white-space: nowrap;
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    transition: opacity 0.2s, transform 0.1s;
    flex-shrink: 0;
}

.btn-otp:hover {
    opacity: 0.9;
}

.btn-otp:active {
    transform: scale(0.96);
}

.btn-otp:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.otp-footer {
    padding-top: 24px;
    text-align: center;
}

.btn-submit {
    width: 80%;
    display: block;
    margin: 0 auto 10px;
    background: linear-gradient(to bottom, #ff5252, #b71c1c);
    color: white;
    border: none;
    padding: 14px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.3);
    transition: opacity 0.2s, transform 0.1s;
}

.btn-submit:hover {
    opacity: 0.92;
}

.btn-submit:active {
    transform: scale(0.97);
}

.btn-submit:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

#otpTimer {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 8px;
}

/* ===== Input with border wrapper (legacy) ===== */
.input-wrapper {
    border: 3px solid #c0c0c0;
    border-radius: 20px;
    padding: 4px 6px 4px 16px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    transition: border-color 0.2s;
}

.input-wrapper:focus-within {
    border-color: #d32f2f;
}

.input-wrapper input {
    border: none;
    outline: none;
    padding: 12px 0;
    width: 100%;
    font-size: 1rem;
    color: #333;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    background: transparent;
}

.input-wrapper input::placeholder {
    color: #aaa;
}

/* ===== Buttons ===== */
.btn-primary-custom {
    width: 100%;
    display: block;
    background: linear-gradient(to bottom, #ff5252, #b71c1c);
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    box-shadow: 0 4px 12px rgba(183, 28, 28, 0.3);
    transition: opacity 0.2s, transform 0.1s;
}

.btn-primary-custom:hover {
    opacity: 0.92;
}

.btn-primary-custom:active {
    transform: scale(0.97);
}

.btn-primary-custom:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-success-custom {
    width: 100%;
    display: block;
    background: linear-gradient(to bottom, #4caf50, #2e7d32);
    color: #fff;
    border: none;
    padding: 14px;
    font-size: 1.05rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    transition: opacity 0.2s, transform 0.1s;
}

.btn-success-custom:hover {
    opacity: 0.92;
}

.btn-success-custom:active {
    transform: scale(0.97);
}

.btn-success-custom:disabled {
    background: #ccc;
    box-shadow: none;
    cursor: not-allowed;
}

.btn-accept {
    background: linear-gradient(to bottom, #4caf50, #2e7d32);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.3);
    transition: opacity 0.2s, transform 0.1s;
}

.btn-accept:hover {
    opacity: 0.92;
    color: #fff;
}

.btn-reject {
    background: linear-gradient(to bottom, #9e9e9e, #616161);
    color: #fff;
    border: none;
    padding: 12px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s, transform 0.1s;
}

.btn-reject:hover {
    opacity: 0.92;
    color: #fff;
}

.btn-link-custom {
    background: none;
    border: none;
    color: #d32f2f;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    transition: opacity 0.2s;
}

.btn-link-custom:hover {
    opacity: 0.7;
    text-decoration: underline;
}

.btn-link-custom:disabled {
    color: #aaa;
    cursor: not-allowed;
}

/* ===== Status Result Section ===== */
.status-result {
    padding: 20px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.6;
}

.status-pending {
    color: #d82027;
    text-align: center;
}

.status-approved {
    color: #019267;
}

.status-rejected {
    color: #6c757d;
    text-align: center;
}

.status-progress {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    position: relative;
    margin: 0 0 22px;
    padding: 4px 0 0;
}

.status-progress::before {
    content: "";
    position: absolute;
    left: 12.5%;
    right: 12.5%;
    top: 18px;
    height: 2px;
    background: #e5e7eb;
    z-index: 0;
}

.progress-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
}

.progress-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #d7dce2;
    background: #fff;
    color: #8a94a3;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
}

.progress-label {
    color: #7b8490;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.25;
    margin-top: 6px;
    word-break: keep-all;
}

.progress-step.is-complete .progress-dot {
    background: #1f9d55;
    border-color: #1f9d55;
    color: #fff;
}

.progress-step.is-complete .progress-label {
    color: #1f7a43;
}

.progress-step.is-active .progress-dot {
    background: #d82027;
    border-color: #d82027;
    color: #fff;
    box-shadow: 0 0 0 4px rgba(216, 32, 39, 0.12);
}

.progress-step.is-active .progress-label {
    color: #d82027;
}

.progress-step.is-problem .progress-dot {
    background: #ffb020;
    border-color: #ffb020;
    color: #3a2a00;
    box-shadow: 0 0 0 4px rgba(255, 176, 32, 0.18);
}

.progress-step.is-problem .progress-label {
    color: #9a6500;
}

.followup-status-card {
    background: #fff7f7;
    border: 1px solid #f3c4c7;
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}

.followup-status-title {
    color: #d82027;
    font-size: 1.08rem;
    font-weight: 800;
    margin-bottom: 6px;
}

.followup-status-message {
    color: #666;
    font-size: 0.92rem;
    font-weight: 500;
    line-height: 1.55;
}

.status-missing-docs {
    color: #333;
    text-align: left;
}

.missing-docs-title {
    color: #d82027;
    font-size: 1.08rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.missing-docs-message {
    color: #666;
    font-size: 0.92rem;
    font-weight: 500;
    text-align: center;
    margin-bottom: 14px;
}

.missing-doc-deadline {
    background: #fff4e5;
    border: 1px solid #f0c36d;
    border-radius: 8px;
    color: #8a4b00;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.45;
    margin: 0 0 14px;
    padding: 9px 12px;
    text-align: center;
}

.missing-doc-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px;
}

.missing-doc-list li {
    background: #fff7f7;
    border: 1px solid #f1c7c9;
    border-radius: 10px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.missing-doc-label {
    color: #222;
    font-size: 0.95rem;
    font-weight: 700;
}

.missing-doc-note {
    color: #6c757d;
    font-size: 0.84rem;
    font-weight: 400;
    margin-top: 4px;
}

.missing-doc-badge {
    display: inline-block;
    background: #d82027;
    color: #fff;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 0.72rem;
    font-weight: 600;
    margin-left: 6px;
    vertical-align: middle;
}

.missing-doc-upload-btn {
    text-decoration: none;
    text-align: center;
    margin-top: 8px;
}

.missing-doc-upload-btn:hover {
    color: #fff;
}

/* ===== PIN Input ===== */
.pin-input,
.confirm-pin-input,
.login-pin-input {
    width: 3rem;
    height: 3.2rem;
    font-size: 1.5rem;
    padding: 0;
    text-align: center;
    border: 3px solid #c0c0c0;
    border-radius: 12px;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    transition: border-color 0.2s;
}

.pin-input:focus,
.confirm-pin-input:focus,
.login-pin-input:focus {
    border-color: #d32f2f;
    outline: none;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15);
}

/* ===== OTP Input (result page) ===== */
.otp-input {
    width: 44px;
    height: 50px;
    font-size: 1.4rem;
    text-align: center;
    border: 3px solid #c0c0c0;
    border-radius: 12px;
    margin: 0 3px;
    font-family: 'Prompt', 'Sarabun', sans-serif;
    transition: border-color 0.2s;
}

.otp-input:focus {
    border-color: #d32f2f;
    outline: none;
    box-shadow: 0 0 0 2px rgba(211, 47, 47, 0.15);
}

/* ===== Timer / Countdown ===== */
.timer-text {
    font-size: 0.85rem;
    color: #888;
    margin-top: 8px;
}

/* ===== Section Labels ===== */
.section-label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    font-size: 1rem;
}

/* ===== Scrollable Contract Box ===== */
.scrollable-box {
    max-height: 400px;
    overflow-y: auto;
    padding: 16px;
    background-color: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
    font-size: 14px;
    line-height: 1.7;
    text-align: left;
}

/* ===== Modal Overrides ===== */
.modal-header.modal-header-success {
    background: linear-gradient(to right, #4caf50, #2e7d32);
    color: #fff;
    border-bottom: none;
}

.modal-header.modal-header-primary {
    background: linear-gradient(to right, #e53935, #b71c1c);
    color: #fff;
    border-bottom: none;
}

.modal-content {
    border-radius: 16px;
    overflow: hidden;
    border: none;
}

/* ===== Approval Details ===== */
.approval-card {
    background: #f9f9f9;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.approval-card .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: 0.95rem;
    border-bottom: 1px solid #eee;
}

.approval-card .detail-row:last-child {
    border-bottom: none;
}

.approval-card .detail-label {
    color: #666;
    font-weight: 500;
}

.approval-card .detail-value {
    color: #222;
    font-weight: 600;
}

/* ===== Divider ===== */
.divider {
    height: 1px;
    background: #eee;
    margin: 16px 0;
}

/* ===== Footer Disclaimer ===== */
.footer-disclaimer {
    text-align: center;
    padding: 16px 24px 20px;
    color: #d82027;
    font-size: 0.82rem;
    font-weight: 600;
}

/* ===== Responsive ===== */
@media (max-width: 360px) {
    .content-section {
        padding: 18px;
    }

    .pin-input,
    .confirm-pin-input,
    .login-pin-input {
        width: 2.5rem;
        height: 2.8rem;
        font-size: 1.3rem;
    }

    .otp-input {
        width: 38px;
        height: 44px;
        font-size: 1.2rem;
    }

    .progress-dot {
        width: 26px;
        height: 26px;
        font-size: 0.72rem;
    }

    .progress-label {
        font-size: 0.66rem;
    }
}

/* ===== Animation ===== */
.page-wrapper {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
