:root {
    --ifs-navy: #071a3d;
    --ifs-navy-2: #0b2756;
    --ifs-ink: #172033;
    --ifs-muted: #6d788b;
    --ifs-line: #dfe5ed;
    --ifs-soft: #f5f7fa;
    --ifs-orange: #ed6a2c;
    --ifs-orange-dark: #d9571f;
    --ifs-green: #17835f;
    --ifs-danger: #c9434c;
    --ifs-blue: #1c5e9a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
    margin: 0;
    background: #eef2f7;
    color: var(--ifs-ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { outline: none !important; }

.ifs-login-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(420px, 48%) minmax(480px, 52%);
    background: #fff;
}

.ifs-brand-panel {
    position: relative;
    min-height: 100vh;
    padding: 44px 58px 36px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 86% 10%, rgba(68, 132, 202, .25), transparent 30%),
        linear-gradient(145deg, #06162f 0%, #09254e 58%, #0a315e 100%);
}

.ifs-brand-panel:before {
    content: "";
    position: absolute;
    width: 380px;
    height: 380px;
    right: -190px;
    bottom: 8%;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 50%;
    box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 120px rgba(255,255,255,.018);
}

.ifs-brand-top,
.ifs-brand-copy,
.ifs-brand-footer { position: relative; z-index: 1; }

.ifs-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.ifs-logo-plate {
    min-width: 185px;
    min-height: 76px;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid rgba(255,255,255,.6);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0,0,0,.18);
}

.ifs-brand-logo { max-width: 190px; max-height: 58px; width: auto; height: auto; }

.ifs-brand-badge {
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(255,255,255,.16);
    border-radius: 999px;
    background: rgba(255,255,255,.08);
    color: #dce8f8;
    font-size: 12px;
    font-weight: 600;
}

.ifs-brand-copy {
    max-width: 590px;
    margin: auto 0;
    padding: 70px 0 55px;
}

.ifs-brand-kicker,
.ifs-kicker {
    color: #75b2e7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
}

.ifs-brand-copy h1 {
    max-width: 540px;
    margin: 14px 0 18px;
    color: #fff;
    font-size: clamp(36px, 4vw, 54px);
    line-height: 1.08;
    letter-spacing: -1.8px;
    font-weight: 700;
}

.ifs-brand-copy > p {
    max-width: 520px;
    margin: 0;
    color: #b9c9df;
    font-size: 16px;
    line-height: 1.7;
}

.ifs-trust-list { margin-top: 38px; display: grid; gap: 15px; }
.ifs-trust-item {
    max-width: 525px;
    display: grid;
    grid-template-columns: 42px 1fr;
    gap: 14px;
    align-items: center;
}
.ifs-trust-item > span {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(255,255,255,.09);
    border: 1px solid rgba(255,255,255,.12);
    color: #f2a077;
}
.ifs-trust-item strong { display: block; margin-bottom: 3px; color: #f8fbff; font-size: 13px; font-weight: 650; }
.ifs-trust-item small { color: #9fb2cb; font-size: 12px; line-height: 1.5; }

.ifs-brand-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #7f96b4;
    font-size: 11px;
}
.ifs-brand-dot { width: 4px; height: 4px; border-radius: 50%; background: #ed6a2c; }

.ifs-access-panel {
    min-height: 100vh;
    padding: 36px 28px 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
}

.ifs-mobile-brand { display: none; }

.ifs-login-card {
    width: min(100%, 500px);
    padding: 42px 44px 36px;
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 22px;
    box-shadow: 0 24px 65px rgba(25, 49, 82, .10);
}

.ifs-step-heading { margin-bottom: 29px; }
.ifs-step h2,
.ifs-step-heading h2 {
    margin: 7px 0 8px;
    color: #142039;
    font-size: 30px;
    line-height: 1.18;
    letter-spacing: -.65px;
    font-weight: 700;
}
.ifs-step-heading p,
.ifs-step-copy {
    margin: 0 0 24px;
    color: var(--ifs-muted);
    font-size: 13px;
    line-height: 1.65;
}
.ifs-step-heading p { margin-bottom: 0; }

.ifs-form-group { margin-bottom: 19px; }
.ifs-form-group label,
.ifs-label-row label {
    display: block;
    margin: 0 0 7px;
    color: #354158;
    font-size: 12px;
    font-weight: 700;
}
.ifs-label-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ifs-label-row a { margin-bottom: 7px; color: var(--ifs-blue); font-size: 11px; font-weight: 650; text-decoration: none; }
.ifs-label-row a:hover { text-decoration: underline; }

.ifs-input-wrap {
    height: 52px;
    display: flex;
    align-items: center;
    border: 1px solid var(--ifs-line);
    border-radius: 12px;
    background: #fff;
    transition: border-color .18s ease, box-shadow .18s ease;
}
.ifs-input-wrap:focus-within { border-color: #7ea7cf; box-shadow: 0 0 0 4px rgba(40, 103, 164, .10); }
.ifs-input-wrap.has-error { border-color: #d8666d; }
.ifs-input-icon { width: 48px; display: flex; align-items: center; justify-content: center; color: #8390a3; border-right: 1px solid #edf0f4; }
.ifs-input-wrap input { flex: 1; width: 100%; height: 100%; padding: 0 14px; border: 0; outline: 0; background: transparent; color: #1c273a; font-size: 13px; }
.ifs-input-wrap input::placeholder { color: #a7b0bd; }
.ifs-password-toggle { width: 44px; height: 48px; border: 0; background: transparent; color: #8b96a6; cursor: pointer; }
.ifs-error { margin-top: 6px; color: var(--ifs-danger); font-size: 11px; }

.ifs-primary-btn {
    width: 100%;
    min-height: 52px;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--ifs-orange), #df5b21);
    color: #fff;
    font-size: 13px;
    font-weight: 750;
    box-shadow: 0 11px 23px rgba(220, 89, 31, .21);
    cursor: pointer;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}
.ifs-primary-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 15px 28px rgba(220, 89, 31, .26); }
.ifs-primary-btn:disabled { cursor: not-allowed; opacity: .72; transform: none; box-shadow: none; }
.ifs-primary-btn:disabled:before {
    content: "";
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,.45);
    border-top-color: #fff;
    border-radius: 50%;
    animation: ifsSpin .72s linear infinite;
}

.ifs-security-note {
    margin-top: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: #8792a2;
    font-size: 10px;
    text-align: center;
}
.ifs-security-note i { color: var(--ifs-green); }

.ifs-state-icon {
    width: 50px;
    height: 50px;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #eaf2fb;
    color: #1b5f9d;
    font-size: 19px;
}
.ifs-state-icon.soft { background: #f1f4f8; color: #53627a; }

.ifs-otp-input,
.ifs-code-input {
    display: flex;
    justify-content: center;
}
.ifs-otp-input input,
.ifs-code-input input {
    width: 100%;
    height: 56px;
    border: 1px solid var(--ifs-line);
    border-radius: 12px;
    outline: none;
    color: #18253d;
    background: #fbfcfe;
    text-align: center;
    transition: .18s ease;
}
.ifs-otp-input input { font-size: 24px; font-weight: 750; letter-spacing: 10px; padding-left: 10px; }
.ifs-code-input input { font-size: 17px; font-weight: 700; letter-spacing: 3px; }
.ifs-otp-input input:focus,
.ifs-code-input input:focus { border-color: #7ea7cf; box-shadow: 0 0 0 4px rgba(40, 103, 164, .10); background: #fff; }

.ifs-link-stack { margin-top: 18px; padding-top: 5px; border-top: 1px solid #edf0f4; }
.ifs-text-btn {
    width: 100%;
    padding: 9px 5px;
    border: 0;
    background: transparent;
    color: #275f96;
    font-size: 11.5px;
    font-weight: 650;
    text-align: center;
    cursor: pointer;
}
.ifs-text-btn i { margin-right: 5px; }
.ifs-text-btn:hover { color: #173f69; text-decoration: underline; }
.ifs-text-btn.muted { color: #7a8798; font-weight: 550; }
.ifs-full-text-btn { margin-top: 7px; }

.ifs-info-box,
.ifs-warning-box {
    margin: -6px 0 20px;
    padding: 12px 13px;
    display: flex;
    gap: 9px;
    border-radius: 11px;
    font-size: 11px;
    line-height: 1.55;
}
.ifs-info-box { background: #eff6fc; border: 1px solid #d9e8f6; color: #47637e; }
.ifs-info-box i { color: #2b6da7; margin-top: 2px; }
.ifs-warning-box { background: #fff8ec; border: 1px solid #f4dfba; color: #715a31; }
.ifs-warning-box i { color: #bf7a17; margin-top: 2px; }

.ifs-center-state { padding: 44px 0; text-align: center; }
.ifs-center-state .ifs-kicker { margin-top: 22px; }
.ifs-page-spinner {
    width: 52px;
    height: 52px;
    margin: 0 auto;
    border: 4px solid #e4eaf1;
    border-top-color: var(--ifs-orange);
    border-radius: 50%;
    animation: ifsSpin .8s linear infinite;
}

.ifs-step-progress { margin: 0 0 25px; display: flex; align-items: center; justify-content: center; }
.ifs-step-progress span {
    width: 29px;
    height: 29px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #eef2f6;
    color: #7f8998;
    font-size: 11px;
    font-weight: 800;
}
.ifs-step-progress span.active { background: var(--ifs-navy-2); color: #fff; box-shadow: 0 0 0 5px #e8eef6; }
.ifs-step-progress span.done { background: #e6f4ef; color: var(--ifs-green); }
.ifs-step-progress > i { width: 70px; height: 1px; background: #dde3ea; }
.ifs-step-progress > i.done { background: #a7d1c1; }

.ifs-qr-focus {
    margin: 0 auto 22px;
    padding: 18px 18px 14px;
    text-align: center;
    background: #f8fafc;
    border: 1px solid #e3e8ef;
    border-radius: 16px;
}
.ifs-qr-frame {
    width: 216px;
    height: 216px;
    margin: 0 auto 11px;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid #e1e6ec;
    border-radius: 13px;
    box-shadow: 0 8px 24px rgba(31, 54, 83, .08);
}
.ifs-qr-frame img { width: 100%; height: 100%; object-fit: contain; }
.ifs-qr-focus small { color: #7c8899; font-size: 10.5px; }
.ifs-qr-focus small i { margin-right: 4px; color: #52647a; }

.ifs-recovery-grid {
    margin: 17px 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.ifs-recovery-code {
    padding: 10px 8px;
    border: 1px solid #e1e6ed;
    border-radius: 9px;
    background: #f8fafc;
    color: #26344a;
    text-align: center;
    font-family: Consolas, Monaco, monospace;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .7px;
}
.ifs-recovery-actions { display: flex; gap: 8px; }
.ifs-recovery-actions button {
    flex: 1;
    min-height: 38px;
    border: 1px solid #dbe2ea;
    border-radius: 9px;
    background: #fff;
    color: #45556c;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
}
.ifs-recovery-actions button:hover { background: #f7f9fb; }
.ifs-recovery-actions i { margin-right: 5px; }

.ifs-confirm-check {
    margin: 18px 0;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    color: #546176;
    font-size: 11.5px;
    line-height: 1.5;
    cursor: pointer;
}
.ifs-confirm-check input { margin-top: 2px; accent-color: var(--ifs-blue); }

.ifs-powered-by {
    margin-top: 18px;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #8b95a4;
    font-size: 10px;
}
.ifs-powered-by img { max-width: 92px; max-height: 30px; padding: 3px 7px; border: 1px solid #e1e6ec; border-radius: 6px; background: #fff; }

@keyframes ifsSpin { to { transform: rotate(360deg); } }

@media (max-width: 1050px) {
    .ifs-login-shell { grid-template-columns: 42% 58%; }
    .ifs-brand-panel { padding: 35px 34px 30px; }
    .ifs-brand-badge { display: none; }
    .ifs-brand-copy h1 { font-size: 38px; }
}

@media (max-width: 820px) {
    .ifs-login-shell { display: block; min-height: 100vh; background: #f5f8fb; }
    .ifs-brand-panel { display: none; }
    .ifs-access-panel { min-height: 100vh; padding: 22px 18px; justify-content: flex-start; }
    .ifs-mobile-brand {
        width: min(100%, 500px);
        margin: 0 auto 18px;
        padding: 10px 14px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .ifs-mobile-brand img { max-width: 145px; max-height: 58px; }
    .ifs-mobile-brand span { color: #516078; font-size: 10px; font-weight: 700; }
    .ifs-mobile-brand span i { color: var(--ifs-green); margin-right: 4px; }
}

@media (max-width: 560px) {
    .ifs-access-panel { padding: 12px; }
    .ifs-mobile-brand { margin-bottom: 10px; padding: 8px 6px; }
    .ifs-login-card { padding: 29px 22px 26px; border-radius: 18px; box-shadow: 0 15px 40px rgba(28, 51, 82, .08); }
    .ifs-step h2, .ifs-step-heading h2 { font-size: 26px; }
    .ifs-recovery-grid { grid-template-columns: 1fr; }
    .ifs-qr-frame { width: 190px; height: 190px; }
    .ifs-otp-input input { letter-spacing: 8px; }
    .ifs-powered-by { margin-bottom: 10px; }
}
