/**
 * iPay flow — reference UI (login head, OTP art, partner purple)
 * Primary: #6354f3 · Login surface: #282828 · App shell: #1a1a1a
 */

:root {
    --ipp-primary: #6354f3;
    --ipp-primary-deep: #5247e0;
    --ipp-primary-light: #7b6ef5;
    --ipp-shadow: rgb(99 84 243 / 0.42);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.ipp-body {
    margin: 0 auto;
    padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
    min-height: 100dvh;
    max-width: 430px;
    width: 100%;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        'Segoe UI',
        Roboto,
        Oxygen,
        Ubuntu,
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #1a1a1a;
    color: #212121;
}

.ipp-body--login {
    background: #282828;
}

.ipp-body--otp {
    background: var(--ipp-primary);
}

/* ----- Card step splash (bank.blade + index #splash) ----- */
.ipp-bank-splash {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 160px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.ipp-bank-splash__gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, #a8b5e8 0%, #8b9ad6 30%, #6b7bc9 60%, var(--ipp-primary) 100%);
}

.ipp-bank-splash__logo {
    position: relative;
    z-index: 1;
    width: min(180px, 70vw);
    height: auto;
}

.ipp-bank-intro {
    text-align: center;
    margin-bottom: 1.25rem;
}

.ipp-bank-intro__title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--np-ink, #1e3a5f);
}

.ipp-bank-intro__sub {
    margin: 0.35rem 0 0;
    font-size: 0.875rem;
    color: var(--np-muted, #5c6778);
}

/* ----- Login (#login) ----- */
.ipp-login {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.ipp-login-header {
    flex: 0 0 auto;
    width: 100%;
    max-height: 50vh;
    overflow: hidden;
}

.ipp-login-header img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    object-position: center top;
}

.ipp-login-card {
    flex: 1;
    background: #fff;
    border-radius: 40px 40px 0 0;
    margin-top: -28px;
    padding: 2.25rem 1.5rem 3rem;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 3;
}

.ipp-login-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: #212121;
    margin: 0 0 1.5rem;
    text-align: left;
}

.ipp-login-form .ipp-field {
    margin-bottom: 1.25rem;
}

.ipp-field label {
    display: block;
    font-size: 0.9rem;
    font-weight: 500;
    color: #5c5c5c;
    margin-bottom: 0.5rem;
}

.ipp-input-row {
    display: flex;
    gap: 8px;
}

.ipp-country-code {
    flex: 0 0 110px;
    padding: 12px 28px 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f0f0f0;
    color: #333;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M2 5l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
}

.ipp-input {
    flex: 1;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 0.95rem;
    background: #f0f0f0;
    width: 100%;
}

.ipp-input--pw {
    padding-right: 2.75rem;
}

.ipp-input::placeholder {
    color: #999;
}

.ipp-input-wrap {
    position: relative;
}

.ipp-toggle-pw {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
}

.ipp-form-actions {
    display: flex;
    align-items: center;
    gap: 2.5rem;
    margin: 1.5rem 0 1rem;
}

.ipp-btn-login {
    flex: 0 0 auto;
    min-width: 140px;
    padding: 16px 36px;
    background: linear-gradient(90deg, var(--ipp-primary-deep) 0%, var(--ipp-primary) 45%, var(--ipp-primary-light) 100%);
    border: none;
    border-radius: 28px;
    color: #fff;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 16px var(--ipp-shadow);
    font-family: inherit;
}

.ipp-btn-login:active {
    transform: scale(0.98);
}

.ipp-link-forgot {
    color: #4285f4;
    font-size: 1rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
    margin-left: auto;
}

.ipp-link-forgot:hover {
    text-decoration: underline;
}

.ipp-register-prompt {
    font-size: 0.9rem;
    color: #212121;
    margin: 0;
}

.ipp-link-register {
    color: #4285f4;
    font-weight: 600;
    text-decoration: none;
}

.ipp-link-register:hover {
    text-decoration: underline;
}

.ipp-error {
    display: block;
    font-size: 0.85rem;
    color: #c62828;
    margin-top: 0.35rem;
}

/* ----- OTP (#otp) ----- */
.ipp-otp-root {
    display: flex;
    flex-direction: column;
    min-height: 100dvh;
}

.ipp-otp-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    position: relative;
    z-index: 2;
}

.ipp-otp-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 18px;
    background: rgba(255, 255, 255, 0.3);
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    font-family: inherit;
}

.ipp-otp-illustration {
    flex: 0 0 auto;
    padding: 0.5rem 1rem 1rem;
    max-height: 38vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ipp-otp-illustration img {
    max-width: 100%;
    max-height: 38vh;
    object-fit: contain;
}

.ipp-otp-card {
    flex: 1;
    background: #fff;
    border-radius: 40px 40px 0 0;
    margin-top: 0;
    padding: 2.5rem 1.5rem 3.5rem;
    box-shadow: 0 -4px 28px rgba(0, 0, 0, 0.12);
}

.ipp-otp-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0 0 0.75rem;
}

.ipp-otp-instruction {
    font-size: 0.9rem;
    color: #555;
    margin: 0 0 1.75rem;
    line-height: 1.5;
}

/* matches .otp-inputs / .otp-input */
.ipp-otp-inputs {
    display: flex;
    gap: 14px;
    justify-content: center;
    margin-bottom: 1.25rem;
}

.ipp-otp-digit {
    width: 54px;
    height: 54px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: #1a1a1a;
    background: #fff;
    font-family: inherit;
}

.ipp-otp-digit:focus {
    outline: none;
    border-color: var(--ipp-primary);
}

.ipp-otp-resend {
    font-size: 0.9rem;
    color: #555;
    margin-bottom: 1.5rem;
}

.ipp-otp-resend .link-resend {
    color: #4285f4;
    font-weight: 500;
    text-decoration: underline;
    background: none;
    border: none;
    cursor: pointer;
    font: inherit;
    padding: 0;
}

.ipp-otp-resend .link-resend:hover {
    color: #3367d6;
}

.ipp-btn-verify {
    width: 100%;
    padding: 17px 24px;
    background: linear-gradient(180deg, var(--ipp-primary-light) 0%, var(--ipp-primary) 55%, var(--ipp-primary-deep) 100%);
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 16px var(--ipp-shadow);
    font-family: inherit;
}

.ipp-btn-verify:active {
    transform: scale(0.98);
}

.ipp-otp-sent {
    font-size: 0.85rem;
    color: #666;
    margin: 0;
}

.ipp-phone-masked {
    color: #4285f4;
    font-weight: 700;
}
