* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
    font-family: Arial, Helvetica, sans-serif;
    color: #4b4b4b;
}

body {
    min-height: 100vh;

    background:
        linear-gradient(
            to bottom,
            #f4f7fa 0%,
            #dce6ef 18%,
            #9db5cd 55%,
            #527ba4 100%
        );

    display: flex;
    flex-direction: column;
}


/* ---------------- HEADER ---------------- */

.header {
    height: 82px;
    background: #164d70;

    display: flex;
    justify-content: center;
    align-items: center;

    flex-shrink: 0;
}

.brand {
    color: white;
    text-align: center;

    font-family: Georgia, serif;
    line-height: 1;
}

.brand-name {
    font-size: 27px;
    letter-spacing: 1px;
}

.brand-logo {
    width: 180px;
    height: auto;
    display: block;
    margin-bottom: 8px;
}


/* ---------------- MAIN ---------------- */

main {
    flex: 1;

    display: flex;
    justify-content: center;
    align-items: flex-start;

    padding: 77px 20px 70px;
}

.card {
    width: 535px;
    min-height: 575px;

    background: #ffffff;

    border-radius: 4px;

    padding: 38px 65px 40px;

    box-shadow:
        0 1px 3px rgba(0, 0, 0, .08);
}


/* ---------------- CARD HEADER ---------------- */

.card-header {
    position: relative;

    text-align: center;

    margin-bottom: 23px;
}

.back-button {
    position: absolute;

    left: -35px;
    top: 1px;

    border: 0;
    background: transparent;

    color: #555;

    font-size: 29px;
    line-height: 1;

    cursor: pointer;
}

.back-button:hover {
    color: #164d70;
}

h1 {
    margin: 0;

    font-size: 25px;

    font-weight: 600;

    color: #464646;
}


/* ---------------- USER ID ---------------- */

.user-id {
    height: 49px;

    border: 1px solid #d0d0d0;

    display: flex;

    align-items: center;
    justify-content: center;

    font-size: 17px;

    margin-bottom: 20px;
}

.change-user {
    text-align: center;

    margin-bottom: 11px;
}

.change-user a,
.signup a {
    color: #143f50;

    text-decoration: underline;
}


/* ---------------- TEXT ---------------- */

.description {
    text-align: center;

    font-size: 17px;

    line-height: 1.35;

    margin: 0 auto 22px;

    max-width: 430px;
}

.instruction {
    text-align: center;

    font-size: 17px;

    line-height: 1.35;

    margin: 0 auto 44px;

    max-width: 400px;
}


/* ---------------- SELECT ---------------- */

.delivery-box {
    position: relative;

    margin-bottom: 14px;
}

.delivery-label {
    position: absolute;

    left: 9px;
    top: 5px;

    font-size: 12px;

    color: #555;

    pointer-events: none;
}

select {
    width: 100%;
    height: 51px;

    appearance: none;
    -webkit-appearance: none;

    border: 1px solid #d0d0d0;

    border-radius: 0;

    background: white;

    padding: 17px 40px 4px 9px;

    color: #4b4b4b;

    font-size: 16px;

    cursor: pointer;
}

.select-arrow {
    position: absolute;

    right: 12px;
    top: 17px;

    width: 12px;
    height: 12px;

    border-right: 2px solid #555;
    border-bottom: 2px solid #555;

    transform: rotate(45deg);

    pointer-events: none;
}


/* ---------------- ACTION BUTTON ---------------- */

.action-button {
    width: 100%;
    height: 76px;

    background: white;

    border: 1.5px solid #087aa9;

    border-radius: 15px;

    color: #087aa9;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 24px;

    font-size: 16px;

    cursor: pointer;

    box-shadow:
        0 3px 5px rgba(0, 0, 0, .22);

    transition:
        background .15s ease,
        transform .1s ease;
}

.action-button:hover {
    background: #f1f9fc;
}

.action-button:active {
    transform: translateY(1px);
}

.phone-icon {
    font-size: 30px;

    transform: rotate(-20deg);
}

.button-text {
    display: flex;

    flex-direction: column;

    text-align: left;

    line-height: 1.25;
}


/* ---------------- SIGN UP ---------------- */

.signup {
    text-align: center;

    margin-top: 29px;

    font-size: 16px;
}


/* ---------------- MESSAGE ---------------- */

.demo-message {
    margin-top: 15px;

    text-align: center;

    color: #24617a;

    font-size: 13px;
}


/* ---------------- FOOTER ---------------- */

footer {
    background: #15467b;

    min-height: 158px;

    color: white;

    padding: 20px 54px;

    flex-shrink: 0;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
}

.footer-logo {
    width: 60px;
    height: auto;
    display: block;
}

.home-logo {
    width: 40px;
    height: auto;
    display: block;
}

.footer-r-circle {
    width: 18px;
    height: 18px;
    border: 1.5px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 10px;
    font-weight: 400;
    opacity: .7;
}

.footer-bank-name {
    color: #fff;
    opacity: .7;
    font-size: 1rem;
    font-weight: 400;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.footer-mark {
    display: inline-block;

    margin-right: 8px;

    font-size: 25px;

    vertical-align: middle;
}

.footer-links {
    display: flex;
    
    opacity: .7;

    flex-wrap: wrap;

    margin-top: 10px;
}

.footer-links a {
    color: #a7a8a8;

    font-size: 16px;

    text-decoration: underline;

    margin-right: 12px;
}

.footer-links span {
    margin-right: 12px;

    color: #bcd0e1;
}


/* ---------------- HELP BUTTON ---------------- */

.help-box {
    position: fixed;

    right: 48px;
    bottom: 0;

    width: 330px;
    height: 57px;

    background: white;

    border-radius: 8px 8px 0 0;

    box-shadow:
        0 0 8px rgba(0, 0, 0, .25);

    display: flex;

    align-items: center;
    justify-content: space-between;

    padding: 0 18px;

    color: #173b4c;

    font-weight: bold;

    z-index: 10;
}

.help-plus {
    font-size: 28px;

    font-weight: 300;

    color: #82939c;
}



/* ---------------- TABLET ---------------- */

@media (max-width: 700px) {

    .header {
        height: 68px;
    }

    main {
        padding: 35px 15px 55px;
    }

    .card {
        width: 100%;

        max-width: 535px;

        padding-left: 35px;
        padding-right: 35px;
    }

    footer {
        padding: 20px 25px;
    }

    .help-box {
        right: 15px;

        width: 290px;
    }
}


/* ---------------- MOBILE ---------------- */

@media (max-width: 480px) {

    body {
        background:
            linear-gradient(
                to bottom,
                #edf3f8 0%,
                #d6e2ed 25%,
                #88a8c3 65%,
                #507ca4 100%
            );
    }



    main {
        padding: 0;
    }

    .card {
        width: 100%;

        min-height: auto;

        border-radius: 0;

        padding:
            30px
            22px
            36px;
    }

    .card-header {
        margin-bottom: 22px;
    }

    .back-button {
        left: 0;
        top: -2px;
    }

    h1 {
        font-size: 22px;

        padding-left: 25px;
        padding-right: 25px;
    }

    .user-id {
        font-size: 16px;

        height: 48px;
    }

    .description,
    .instruction {
        font-size: 16px;
    }

    .instruction {
        margin-bottom: 35px;
    }

    .action-button {
        height: 70px;
    }

    .signup {
        font-size: 15px;

        margin-top: 25px;
    }

    footer {
        min-height: 180px;

        padding:
            22px
            22px
            75px;
    }

    .footer-links {
        line-height: 2;
    }

    .footer-links a {
        font-size: 14px;
    }

    .help-box {
        left: 15px;
        right: 15px;

        bottom: 0;

        width: auto;

        height: 52px;
    }
}


/* ---------------- VERY SMALL PHONES ---------------- */

@media (max-width: 340px) {

    .card {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 {
        font-size: 20px;
    }

    .description,
    .instruction {
        font-size: 15px;
    }

    .action-button {
        gap: 12px;
    }

    .help-box {
        left: 8px;
        right: 8px;
    }
}


/* ================================
   VERIFICATION CODE
================================ */

.verification-card {
    min-height: 500px;
}

.code-inputs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 32px 0 38px;
}

.code-digit {
    width: 42px;
    height: 52px;

    border: none;
    border-bottom: 2px solid #7d8b98;

    background: transparent;

    outline: none;

    text-align: center;

    font-size: 28px;
    font-weight: 600;

    color: #174d7e;

    border-radius: 0;

    transition: border-color 0.2s ease;
}

.code-digit:focus {
    border-bottom: 3px solid #087aa9;
}

.code-digit::-webkit-outer-spin-button,
.code-digit::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

@media (max-width: 480px) {

    .code-inputs {
        gap: 7px;
    }

    .code-digit {
        width: 36px;
        height: 48px;
        font-size: 24px;
    }

}

@media (max-width: 340px) {

    .code-inputs {
        gap: 4px;
    }

    .code-digit {
        width: 32px;
        height: 45px;
        font-size: 22px;
    }

}

/* ================================
   GLOBAL OVERFLOW GUARD
================================ */

html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

img,
svg,
select,
input,
button {
    max-width: 100%;
}

/* ================================
   MOBILE CARD + SELECT FIX
================================ */

@media (max-width: 600px) {

    .card {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 18px !important;
        padding-right: 18px !important;
    }

    .delivery-box,
    select {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    select {
        /* Prevent iOS from zooming and blowing out the layout */
        font-size: 16px;
    }
}

/* ================================
   SUCCESS PAGE
================================ */

.verification-card.success-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    text-align: center;

    min-height: 420px;

    padding: 48px 40px;
}


/* --- Animated check circle --- */

.success-page .success-check {
    width: 96px;
    height: 96px;

    margin: 0 auto 28px;

    border-radius: 50%;

    background: #e7f7ee;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    animation: pulseRing 1.6s ease-out .2s 1;
}

.success-page .success-check svg {
    width: 48px;
    height: 48px;

    stroke: #22a064;
    stroke-width: 3.2;
    stroke-linecap: round;
    stroke-linejoin: round;

    fill: none;

    stroke-dasharray: 48;
    stroke-dashoffset: 48;

    animation: drawCheck .55s ease-out .28s forwards;
}


/* --- Text --- */

.success-page .success-title {
    margin: 0 0 14px;

    font-size: 22px;
    font-weight: 600;
    color: #174d7e;

    letter-spacing: .2px;
    line-height: 1.25;

    animation: fadeUp .4s ease-out .45s both;
}

.success-page .success-sub {
    margin: 0;

    font-size: 15px;
    color: #6b7a88;

    line-height: 1.4;

    animation: fadeUp .4s ease-out .58s both;
}

.success-page .success-sub a {
    color: #087aa9;
    text-decoration: underline;
}

.success-page .success-sub #countdown {
    font-weight: 700;
    color: #174d7e;
}


/* ================================
   SUCCESS PAGE — TABLET (≤700px)
================================ */

@media (max-width: 700px) {

    .verification-card.success-page {
        min-height: 380px;
        padding: 42px 30px;
    }

    .success-page .success-check {
        width: 88px;
        height: 88px;
        margin-bottom: 24px;
    }

    .success-page .success-check svg {
        width: 44px;
        height: 44px;
    }

    .success-page .success-title {
        font-size: 21px;
    }
}


/* ================================
   SUCCESS PAGE — GALAXY S9 / A16 (≤420px)
================================ */

@media (max-width: 420px) {

    .verification-card.success-page {
        min-height: 340px;
        padding: 36px 22px;
    }

    .success-page .success-check {
        width: 80px;
        height: 80px;
        margin-bottom: 22px;
    }

    .success-page .success-check svg {
        width: 40px;
        height: 40px;
    }

    .success-page .success-title {
        font-size: 19px;
        margin-bottom: 12px;
    }

    .success-page .success-sub {
        font-size: 14px;
    }
}


/* ================================
   SUCCESS PAGE — VERY NARROW (≤360px)
================================ */

@media (max-width: 360px) {

    .verification-card.success-page {
        padding: 30px 18px;
        min-height: 300px;
    }

    .success-page .success-check {
        width: 72px;
        height: 72px;
        margin-bottom: 20px;
    }

    .success-page .success-check svg {
        width: 36px;
        height: 36px;
    }

    .success-page .success-title {
        font-size: 17px;
    }

    .success-page .success-sub {
        font-size: 13px;
    }
}

