
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Red */
    /*    --main: #C0001D;
    --main-dark: #8B0014;
    --main-mid: #A80019;
    --main-light: #E8001F;*/


    /* Blue */
    /*    --main: #043E6D;
    --main-dark: #022B4C;
    --main-mid: #03365E;
    --main-light: #055394;*/


    /* Green */
    --main: #026429;
    --main-dark: #01471D;
    --main-mid: #025724;
    --main-light: #038A39;



    --gold: #D4A847;
    --white: #ffffff;
    --off-white: #F9F7F5;
    --text-muted: #6B7280;
    --text-dark: #1A1A2E;
    --border: #E5E7EB;
    --input-bg: #FAFAFA;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 20px 60px rgba(0,0,0,0.18);
}

html, body {
    height: 100%;
    min-height: 100%;
    background: #f5f7fb;
}

/* Bootstrap 3.3.2 is what this layout ships with — it has no BS4/5
   spacing/flex utilities, so polyfill the handful used across the
   login-family views (scoped here, never loaded outside this layout). */
.me-1 {
    margin-right: 6px;
}

.mt-3 {
    margin-top: 16px;
}

.text-center {
    text-align: center;
}

body {
    overflow-x: hidden;
}

/* ── LAYOUT ─────────────────────────────────── */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ── LEFT PANEL ─────────────────────────────── */
.left-panel {
    width: 35%;
    flex-shrink: 0;
    background: linear-gradient(to bottom, var(--main) 0%, var(--main-dark) 100%);
    color: #fff;
    position: relative;
    padding: clamp(32px, 5vw, 70px) clamp(28px, 4vw, 60px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.left-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.10), transparent 40%);
    pointer-events: none;
}

.brand-area {
    position: relative;
    z-index: 2;
}

.bank-logo {
    width: clamp(160px, 20vw, 260px);
    margin-bottom: clamp(40px, 8vw, 120px);
}

    .bank-logo img {
        width: 100%;
        height: auto;
        display: block;
    }

.welcome-text h4 {
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 300;
    margin-bottom: 4px;
}

.welcome-text h1 {
    font-size: clamp(26px, 4vw, 56px);
    line-height: 1.1;
    margin-bottom: 16px;
    font-weight: 700;
}

.welcome-text p {
    font-size: clamp(14px, 1.5vw, 18px);
    letter-spacing:0.5px;
    line-height: 1.7;
    color: rgba(255,255,255,0.92);
}

.smartdoc {
    position: relative;
    z-index: 2;
    background: #ffffff;
    border: 2px solid rgba(255,255,255,0.4);
    padding: 14px;
    border-radius: 12px;
    width: clamp(160px, 18vw, 260px);
    margin-top: 24px;
}

    .smartdoc img {
        width: 100%;
        height: auto;
        display: block;
    }

/* ── RIGHT PANEL ────────────────────────────── */
.right-panel {
    flex: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 40px clamp(16px, 5vw, 60px) 80px;
}

.login-content {
    width: 100%;
    max-width: 470px;
}

/* ── ALERTS ─────────────────────────────────── */
.errorHandler {
    margin-bottom: 16px;
}

/* ── LOGO CENTER ────────────────────────────── */
.center-logo {
    text-align: center;
    margin-bottom: 16px;
}

    .center-logo img {
        height: 70px;
        width: auto;
    }

/* ── TITLE ──────────────────────────────────── */
.login-title {
    text-align: center;
    margin-bottom: 32px;
}

    .login-title h2 {
        font-size: 24px;
        color: #202020;
        margin-bottom: 8px;
        font-weight: 700;
    }

    .login-title p {
        color: #707070;
        font-size: 16px;
        line-height: 1.6;
    }

/* ── FORM FIELDS ────────────────────────────── */
.form-group {
    margin-bottom: clamp(16px, 2.5vw, 24px);
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: clamp(13px, 1.2vw, 15px);
    font-weight: 500;
    color: #444;
}

.input-box {
    height: 42px;
    border: 1px solid #d8dee8;
    border-radius: 16px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    background: #fff;
    transition: all 0.25s ease;
}

    .input-box input {
        background: transparent !important;
    }

        .input-box input:focus,
        .input-box input:active,
        .input-box input:not(:placeholder-shown) {
            background: transparent !important;
            box-shadow: none !important;
        }

        .input-box input:-webkit-autofill,
        .input-box input:-webkit-autofill:hover,
        .input-box input:-webkit-autofill:focus,
        .input-box input:-webkit-autofill:active {
            -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
            -webkit-text-fill-color: #000 !important;
            background: transparent !important;
            transition: background-color 9999s ease-in-out 0s;
        }

    .input-box input:focus {
        background: transparent !important;
        box-shadow: none;
    }

    .input-box:focus-within {
        border-color: #d4001a;
        box-shadow: 0 0 0 4px rgba(212, 0, 26, 0.08);
    }

    .input-box i {
        color: var(--main);
        font-size: 18px;
        width: 24px;
        flex-shrink: 0;
    }

    .input-box input {
        flex: 1;
        border: none !important;
        outline: none !important;
        height: 100%;
        padding: 0 12px;
        font-size: 16px;
        background: transparent !important;
        color: #222;
        min-width: 0;
    }

        .input-box input::placeholder {
            color: #a0a0a0;
        }

    .input-box select {
        flex: 1;
        border: none !important;
        outline: none !important;
        height: 100%;
        padding: 0 12px;
        font-size: 16px;
        background: transparent !important;
        color: #222;
        min-width: 0;
        appearance: auto;
    }

.password-toggle {
    color: #999 !important;
    cursor: pointer;
    flex-shrink: 0;
}

/* ── RESULT / MESSAGE PAGES (confirmation, failure, unauthorized) ── */
.result-panel {
    text-align: center;
}

.result-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

    .result-icon.success {
        background: rgba(2, 100, 41, 0.1);
        color: var(--main);
    }

    .result-icon.danger {
        background: rgba(212, 0, 26, 0.1);
        color: #d4001a;
    }

.result-panel p {
    color: #707070;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* ── QR / MANUAL-KEY BOX ────────────────────── */
.qr-box {
    text-align: center;
    margin-bottom: 20px;
}

    .qr-box img {
        max-width: 190px;
        width: 100%;
        border: 1px solid var(--border);
        border-radius: 12px;
        padding: 10px;
        background: #fff;
    }

.key-box {
    word-break: break-all;
    font-family: monospace;
    font-size: 13px;
    background: var(--off-white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #444;
}

    .key-box strong {
        color: var(--text-dark);
        display: block;
        margin-bottom: 4px;
        font-family: inherit;
    }

/* ── OPTIONS ROW ────────────────────────────── */
.extra-options {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-top: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    gap: 8px;
}

.remember {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #555;
    font-size: 12px!important;
}

    .remember input {
        width: 17px;
        height: 17px;
        accent-color: var(--main);
        flex-shrink: 0;
    }

.forgot {
    text-decoration: none;
    color: var(--main)!important;
    font-size: 12px !important;
    font-weight: 600;
    position: relative !important;
}

/* ── BUTTON ─────────────────────────────────── */
.login-btn {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: 16px;
    background: var(--main);
    color: #fff;
    font-size: clamp(14px, 1.8vw, 18px);
    font-weight: 500;
    cursor: pointer;
    transition: 0.25s ease;
    box-shadow: var(--main-light);
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    text-decoration: none;
}

    .login-btn:hover,
    .login-btn:focus,
    .login-btn:active {
        color: #fff;
        text-decoration: none;
    }

    .login-btn:hover {
        transform: translateY(-2px);
        box-shadow: var(--main-light);
    }

    .login-btn:active {
        transform: translateY(0);
    }

/* ── FOOTER ─────────────────────────────────── */
.footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: #7a7a7a;
    font-size: clamp(11px, 1.1vw, 14px);
    line-height: 1.8;
    white-space: nowrap;
    width: max-content;
    max-width: 90%;
    white-space: normal;
}

/* ═══════════════════════════════════════════
       RESPONSIVE BREAKPOINTS
    ═══════════════════════════════════════════ */

/* ── Tablet landscape (≤1024px) ─────────────── */
@media (max-width: 1024px) {
    .left-panel {
        width: 36%;
    }
}

/* ── Tablet portrait (≤768px): stack vertically */
@media (max-width: 768px) {
    html, body {
        overflow-y: auto;
        height: auto;
    }

    .login-wrapper {
        flex-direction: column;
        min-height: 100vh;
    }

    .left-panel {
        width: 100%;
        padding: 28px 24px 32px;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 20px;
    }

    .left-overlay {
        background: radial-gradient(circle at top left, rgba(255,255,255,0.10), transparent 60%);
    }

    .brand-area {
        display: flex;
        align-items: center;
        gap: 20px;
        width: 100%;
    }

    .bank-logo {
        width: clamp(100px, 28vw, 160px);
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .welcome-text h4 {
        font-size: 12px;
        margin-bottom: 4px;
    }

    .welcome-text h1 {
        font-size: clamp(12px, 4vw, 18px);
        margin-bottom: 4px;
    }

    .welcome-text p {
        font-size: clamp(12px, 2.5vw, 15px);
        line-height: 1.5;
    }

    .smartdoc {
        display: none;
    }

    .right-panel {
        flex: 1;
        padding: 36px 24px 72px;
        align-items: flex-start;
        justify-content: center;
    }

    .footer {
        bottom: 14px;
        font-size: 11px;
    }
}

/* ── Mobile (≤480px): tighten further ───────── */
@media (max-width: 480px) {
    .left-panel {
        padding: 20px 18px 24px;
        gap: 14px;
    }

    .brand-area {
        gap: 14px;
    }

    .bank-logo {
        width: 90px;
    }

    .welcome-text h4 {
        display: none;
    }

    .welcome-text h1 {
        font-size: 18px;
        margin-bottom: 2px;
    }

    .welcome-text p {
        font-size: 12px;
    }

    .right-panel {
        padding: 28px 18px 68px;
    }

    .input-box {
        border-radius: 12px;
        height: 52px;
    }

    .login-btn {
        border-radius: 12px;
        height: 52px;
        font-size: 16px;
    }

    .login-title h2 {
        font-size: 20px;
    }

    .login-title p {
        font-size: 14px;
    }

    .footer {
        font-size: 10.5px;
        bottom: 10px;
    }
}

/* ── Very small (≤360px) ─────────────────────── */
@media (max-width: 360px) {
    .left-panel {
        padding: 16px 14px;
    }

    .bank-logo {
        width: 78px;
    }

    .right-panel {
        padding: 24px 14px 64px;
    }
}

