
:root{
    --be-bg:#071c25;
    --be-bg-2:#0a2530;
    --be-card:#ffffff;
    --be-card-soft:#fbfdff;
    --be-text:#101828;
    --be-muted:#667085;
    --be-line:#e6ebf2;
    --be-input:#eef4ff;
    --be-input-border:#e4ebf5;
    --be-blue:#1687ef;
    --be-blue-2:#0875df;
    --be-green:#16a34a;
    --be-danger:#c81e3a;
    --be-shadow:0 28px 80px rgba(0,0,0,.30);
}

*{
    box-sizing:border-box;
}

html,
body{
    width:100%;
    min-height:100%;
}

body{
    margin:0;
    min-height:100vh;
    overflow-x:hidden;
    font-family:Inter,Segoe UI,Arial,sans-serif;
    color:var(--be-text);
    background:
        radial-gradient(circle at 12% 18%,rgba(14,165,233,.10),transparent 28%),
        radial-gradient(circle at 85% 75%,rgba(59,130,246,.08),transparent 28%),
        linear-gradient(135deg,var(--be-bg) 0%,#09232d 50%,#061820 100%);
}

.login-page{
    position:relative;
    width:100%;
    min-height:100vh;
    min-height:100svh;
    min-height:100dvh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px 20px;
    isolation:isolate;
}

#networkCanvas{
    position:fixed;
    inset:0;
    width:100%;
    height:100%;
    z-index:-3;
    pointer-events:none;
}

.login-page::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-2;
    pointer-events:none;
    background:
        linear-gradient(180deg,rgba(4,16,22,.10),rgba(4,16,22,.26)),
        radial-gradient(circle at center,rgba(255,255,255,.02),transparent 60%);
}

.login-page::after{
    content:"";
    position:fixed;
    left:-10%;
    right:-10%;
    bottom:-18vh;
    height:42vh;
    z-index:-1;
    pointer-events:none;
    opacity:.32;
    transform:perspective(420px) rotateX(64deg);
    transform-origin:center bottom;
    background-image:
        linear-gradient(rgba(14,165,233,.22) 1px,transparent 1px),
        linear-gradient(90deg,rgba(14,165,233,.22) 1px,transparent 1px);
    background-size:28px 28px;
    mask-image:linear-gradient(to top,#000 30%,transparent 92%);
}

.login-shell{
    width:min(760px,calc(100vw - 24px));
    min-height:420px;
    display:grid;
    grid-template-columns:1fr 1fr;
    overflow:hidden;
    border:1px solid rgba(255,255,255,.72);
    border-radius:16px;
    background:rgba(255,255,255,.985);
    box-shadow:var(--be-shadow);
    backdrop-filter:blur(12px);
}

.brand-side{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px 30px;
    overflow:hidden;
    background:
        radial-gradient(circle at 30% 45%,rgba(22,135,239,.055),transparent 30%),
        linear-gradient(145deg,#ffffff 0%,#fbfdff 100%);
}

.brand-side::after{
    content:"";
    position:absolute;
    width:260px;
    height:260px;
    left:-100px;
    bottom:-110px;
    border-radius:50%;
    opacity:.33;
    background:
        radial-gradient(circle,rgba(22,135,239,.18) 1.2px,transparent 1.6px);
    background-size:10px 10px;
}

.brand-inner{
    position:relative;
    z-index:1;
    width:100%;
    text-align:center;
}

.logo-stage{
    position:relative;
    width:168px;
    height:168px;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:center;
    border-radius:50%;
    isolation:isolate;
    cursor:pointer;
}

.logo-stage::before,
.logo-stage::after{
    content:"";
    position:absolute;
    inset:-7px;
    border-radius:50%;
    pointer-events:none;
    opacity:.55;
    transition:transform .35s ease,opacity .35s ease,box-shadow .35s ease;
}

.logo-stage::before{
    border:1px solid rgba(22,135,239,.26);
    box-shadow:0 0 0 7px rgba(22,135,239,.04);
}

.logo-stage::after{
    inset:-14px;
    border:1px dashed rgba(22,163,74,.18);
    opacity:.28;
}

.logo-img,
.logo-fallback{
    width:150px;
    height:150px;
    margin:0;
    border-radius:50%;
    border:1px solid rgba(218,227,238,.95);
    background:#fff;
    box-shadow:
        0 18px 40px rgba(15,23,42,.14),
        inset 0 1px 0 rgba(255,255,255,.96);
    transition:
        transform .38s cubic-bezier(.2,.8,.2,1),
        box-shadow .38s ease,
        filter .38s ease;
}

.logo-img{
    object-fit:contain;
    padding:10px;
    filter:drop-shadow(0 8px 16px rgba(15,23,42,.05));
}

.logo-fallback{
    display:flex;
    align-items:center;
    justify-content:center;
    background:linear-gradient(145deg,#ffffff,#eef5fb);
    color:#111827;
    font-size:48px;
    font-weight:950;
    letter-spacing:-4px;
}

.logo-fallback span:first-child{
    color:#e21d2f;
}

.logo-stage:hover::before{
    transform:scale(1.08);
    opacity:1;
    box-shadow:
        0 0 0 8px rgba(22,135,239,.055),
        0 0 30px rgba(22,135,239,.16);
}

.logo-stage:hover::after{
    transform:rotate(24deg) scale(1.04);
    opacity:.72;
}

.logo-stage:hover .logo-img,
.logo-stage:hover .logo-fallback{
    transform:translateY(-6px) rotate(-2deg) scale(1.045);
    box-shadow:
        0 24px 46px rgba(15,23,42,.18),
        0 0 0 5px rgba(22,135,239,.07),
        inset 0 1px 0 rgba(255,255,255,.98);
    filter:saturate(1.05) brightness(1.015);
}

.logo-stage:active .logo-img,
.logo-stage:active .logo-fallback{
    transform:translateY(-2px) scale(1.015);
}

.login-side{
    position:relative;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:30px 38px;
    background:
        linear-gradient(180deg,#ffffff 0%,#fdfefe 100%);
}

.login-side::before{
    content:"";
    position:absolute;
    left:0;
    top:14%;
    bottom:14%;
    width:1px;
    background:linear-gradient(to bottom,transparent,#dde5ed 16%,#dde5ed 84%,transparent);
}

.login-box{
    width:100%;
    max-width:300px;
}

.login-title{
    margin:0 0 22px;
    text-align:center;
    color:#172033;
    font-size:24px;
    line-height:1.1;
    font-weight:900;
    letter-spacing:-.03em;
}

.alert{
    margin:0 0 15px;
    padding:10px 12px;
    border-radius:10px;
    font-size:12px;
    line-height:1.45;
    font-weight:650;
}

.alert-error{
    border:1px solid #fecdd3;
    background:#fff3f5;
    color:#b4233c;
}

.alert-info{
    border:1px solid #bfdbfe;
    background:#eff6ff;
    color:#1d4ed8;
}

.setup{
    padding:13px;
    border:1px solid #fed7aa;
    border-radius:11px;
    background:#fff7ed;
    color:#9a3412;
    font-size:12px;
    line-height:1.5;
}

.field{
    margin-bottom:12px;
}

.sr-only{
    position:absolute;
    width:1px;
    height:1px;
    padding:0;
    margin:-1px;
    overflow:hidden;
    clip:rect(0,0,0,0);
    white-space:nowrap;
    border:0;
}

.input-wrap{
    position:relative;
}

.input-icon{
    position:absolute;
    left:15px;
    top:50%;
    width:17px;
    height:17px;
    transform:translateY(-50%);
    color:#5f6b7a;
    pointer-events:none;
}

.login-input{
    width:100%;
    height:44px;
    border:1px solid var(--be-input-border);
    border-radius:999px;
    outline:none;
    background:linear-gradient(180deg,#eef4ff 0%,#eaf2ff 100%);
    color:#172033;
    padding:0 16px 0 43px;
    font-family:inherit;
    font-size:13px;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.login-input::placeholder{
    color:#7d8998;
}

.login-input:focus{
    border-color:#9ecfff;
    background:#f5f9ff;
    box-shadow:0 0 0 4px rgba(22,135,239,.10);
}

.options{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:14px;
    margin:12px 2px 17px;
}

.check{
    display:inline-flex;
    align-items:center;
    gap:7px;
    color:#243042;
    font-size:12px;
    font-weight:600;
    cursor:pointer;
    user-select:none;
    white-space:nowrap;
}

.check input{
    width:15px;
    height:15px;
    margin:0;
    accent-color:var(--be-blue);
    cursor:pointer;
}

.login-btn{
    width:100%;
    height:44px;
    border:0;
    border-radius:999px;
    background:linear-gradient(135deg,var(--be-blue) 0%,var(--be-blue-2) 100%);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-family:inherit;
    font-size:13px;
    font-weight:900;
    text-transform:uppercase;
    letter-spacing:.02em;
    cursor:pointer;
    box-shadow:0 10px 22px rgba(22,135,239,.22);
    transition:
        transform .16s ease,
        box-shadow .16s ease,
        filter .16s ease;
}

.login-btn:hover{
    transform:translateY(-1px);
    box-shadow:0 12px 26px rgba(22,135,239,.28);
    filter:saturate(1.03);
}

.login-btn:active{
    transform:translateY(0);
}

.login-btn:focus-visible{
    outline:3px solid rgba(22,135,239,.24);
    outline-offset:3px;
}


.camera-gate-status{
    display:none;
    margin:0 0 14px;
    padding:10px 12px;
    border:1px solid #fde68a;
    border-radius:10px;
    background:#fffbeb;
    color:#92400e;
    font-size:11px;
    line-height:1.45;
    font-weight:700;
}
.camera-gate-status.show{display:block}
.login-btn.camera-hidden{opacity:.55;cursor:not-allowed;pointer-events:none;filter:saturate(.65)}
.camera-modal{
    position:fixed;
    inset:0;
    z-index:99999;
    display:none;
    align-items:center;
    justify-content:center;
    padding:18px;
    background:rgba(4,16,24,.64);
    backdrop-filter:blur(5px);
}
.camera-modal.show{display:flex}
.camera-card{
    width:min(420px,100%);
    border:1px solid rgba(255,255,255,.72);
    border-radius:18px;
    overflow:hidden;
    background:#fff;
    box-shadow:0 28px 80px rgba(0,0,0,.34);
}
.camera-card-head{
    padding:16px 18px 11px;
    border-bottom:1px solid #e9eef5;
}
.camera-card-head strong{display:block;color:#172033;font-size:17px;font-weight:900}
.camera-card-head span{display:block;margin-top:5px;color:#667085;font-size:11px;line-height:1.5}
.camera-card-body{padding:16px 18px 18px}
.camera-preview-wrap{
    display:none;
    width:100%;
    aspect-ratio:4/3;
    margin-bottom:12px;
    overflow:hidden;
    border:1px solid #dbe5ef;
    border-radius:12px;
    background:#071c25;
}
.camera-preview-wrap.show{display:block}
.camera-preview{width:100%;height:100%;object-fit:cover;transform:scaleX(-1)}
.camera-help{margin:0 0 12px;color:#475467;font-size:11px;line-height:1.55}
.camera-error{display:none;margin:0 0 12px;padding:9px 10px;border-radius:9px;background:#fff1f2;color:#b4233c;font-size:10.5px;font-weight:700}
.camera-error.show{display:block}
.camera-permission-help{display:none;margin:0 0 12px;padding:10px 11px;border:1px solid #f6d58a;border-radius:10px;background:#fffbeb;color:#7c5b12;font-size:10.5px;line-height:1.55;font-weight:700}
.camera-permission-help.show{display:block}
.camera-permission-help strong{display:block;margin-bottom:4px;color:#7a4d00;font-size:11px}
.mobile-camera-help{display:none}
@media(max-width:767px){.desktop-camera-help{display:none}.mobile-camera-help{display:inline}}
.camera-allow-btn{
    width:100%;height:42px;border:0;border-radius:999px;background:linear-gradient(135deg,#1687ef,#0875df);color:#fff;font:inherit;font-size:12px;font-weight:900;cursor:pointer;box-shadow:0 8px 18px rgba(22,135,239,.22)
}
.camera-allow-btn:disabled{opacity:.6;cursor:wait}
.camera-verified{
    display:none;margin-bottom:12px;padding:9px 10px;border:1px solid #bbf7d0;border-radius:9px;background:#f0fdf4;color:#15803d;font-size:10.5px;font-weight:800
}
.camera-verified.show{display:block}


.quick-links{
    margin-top:15px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    flex-wrap:wrap;
}

.quick-link{
    min-width:92px;
    height:32px;
    padding:0 14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:7px;
    border:1px solid #dde7f2;
    border-radius:999px;
    background:#fff;
    color:#43516a;
    text-decoration:none;
    font-size:10px;
    font-weight:850;
    letter-spacing:.02em;
    box-shadow:0 6px 14px rgba(15,23,42,.045);
    transition:transform .16s ease,border-color .16s ease,color .16s ease,box-shadow .16s ease,background .16s ease;
}

.quick-link svg{
    width:13px;
    height:13px;
}

.quick-link:hover{
    transform:translateY(-2px);
    border-color:#b9d9fb;
    color:#0875df;
    background:#f7fbff;
    box-shadow:0 9px 20px rgba(22,135,239,.10);
}

.quick-link.paybill:hover{
    border-color:#bbebca;
    color:#15803d;
    background:#f6fff8;
    box-shadow:0 9px 20px rgba(22,163,74,.09);
}

.quick-link:focus-visible{
    outline:3px solid rgba(22,135,239,.18);
    outline-offset:2px;
}

.login-footer{
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #edf1f5;
    text-align:center;
}

.copyright{
    color:#667085;
    font-size:10px;
    line-height:1.6;
}

.copyright strong{
    color:#1579df;
    font-weight:850;
}


@media (max-width:760px){
    .login-page{
        min-height:100vh;
        min-height:100svh;
        min-height:100dvh;
        padding:12px;
        align-items:center;
        justify-content:center;
    }

    .login-shell{
        width:min(430px,100%);
        min-height:0;
        grid-template-columns:1fr;
        border-radius:16px;
    }

    .brand-side{
        min-height:170px;
        padding:20px 20px 16px;
    }

    .logo-stage{
        width:112px;
        height:112px;
    }

    .logo-img,
    .logo-fallback{
        width:100px;
        height:100px;
    }

    .logo-img{
        padding:7px;
    }

    .logo-fallback{
        font-size:31px;
    }

    .login-side{
        padding:22px 22px 24px;
    }

    .login-side::before{
        left:9%;
        right:9%;
        top:0;
        bottom:auto;
        width:auto;
        height:1px;
        background:linear-gradient(to right,transparent,#dde5ed 14%,#dde5ed 86%,transparent);
    }

    .login-box{
        max-width:360px;
    }

    .login-title{
        margin-bottom:18px;
        font-size:24px;
    }
}

@media (max-width:420px){
    .login-page{
        min-height:100vh;
        min-height:100svh;
        min-height:100dvh;
        padding:8px;
        align-items:center;
        justify-content:center;
    }

    .login-shell{
        border-radius:13px;
    }

    .brand-side{
        min-height:145px;
        padding:17px 16px 13px;
    }

    .logo-stage{
        width:96px;
        height:96px;
    }

    .logo-img,
    .logo-fallback{
        width:86px;
        height:86px;
    }

    .logo-img{
        padding:6px;
    }

    .login-side{
        padding:19px 17px 21px;
    }

    .login-title{
        font-size:22px;
        margin-bottom:20px;
    }

    .login-input{
        height:47px;
        font-size:12px;
    }

    .options{
        margin:13px 1px 18px;
        gap:8px;
    }

    .check{
        font-size:11px;
    }

    .login-btn{
        height:47px;
        font-size:12px;
    }

}


@media (max-width:760px) and (max-height:560px){
    .login-page{
        min-height:100dvh;
        padding-top:10px;
        padding-bottom:10px;
    }

    .login-shell{
        margin:auto 0;
    }
}

@media (prefers-reduced-motion:reduce){
    *,
    *::before,
    *::after{
        scroll-behavior:auto !important;
        transition:none !important;
        animation:none !important;
    }

    #networkCanvas{
        display:none;
    }
}


/* V9: brand artwork must not gain an extra white disc from the login shell. */
.logo-img{
    background:transparent !important;
    border:0 !important;
    padding:0 !important;
    box-shadow:none !important;
    filter:drop-shadow(0 10px 20px rgba(15,23,42,.12));
}
.logo-stage:hover .logo-img{
    box-shadow:none !important;
}
