/* ================================================================
   HubBits & MorDocs — Customer Login: Warded Gateway v1
   Page-scoped presentation only. Existing login/security logic,
   global header/footer, and arcane submit-button system are preserved.
   ================================================================ */

.auth-page--login{
    --gateway-violet:#a772ff;
    --gateway-violet-soft:#d8c1ff;
    --gateway-indigo:#7d79ee;
    --gateway-gold:#d8bc78;
    --gateway-ivory:#f2edf5;
}

/* A slightly deeper portal atmosphere for this entrance only. */
.auth-page--login::before{
    border-color:rgba(216,188,120,.055);
    box-shadow:
        0 0 0 88px rgba(167,114,255,.018),
        0 0 0 176px rgba(216,188,120,.010),
        0 0 90px rgba(105,54,194,.055);
}

.auth-page--login .auth-shell{
    padding-top:64px !important;
    padding-bottom:82px !important;
}

/* ----------------------------------------------------------------
   Warded Gateway panel
   ---------------------------------------------------------------- */

.auth-page--login .auth-warded-gateway{
    isolation:isolate;
    width:min(100%, 630px);
    max-width:630px;
    padding:50px 52px 43px;
    border-color:rgba(216,188,120,.21);
    background:
        radial-gradient(circle at 86% 12%, rgba(147,91,238,.15), transparent 31%),
        radial-gradient(circle at 10% 100%, rgba(216,188,120,.055), transparent 28%),
        linear-gradient(145deg, rgba(255,255,255,.046), rgba(255,255,255,.010)),
        rgba(14,11,20,.965);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.055),
        inset 0 0 0 1px rgba(216,188,120,.018),
        0 30px 90px rgba(0,0,0,.46),
        0 0 58px rgba(109,51,211,.08);
}

.auth-page--login .auth-warded-gateway::before{
    right:10%;
    left:10%;
    background:linear-gradient(
        90deg,
        transparent,
        rgba(167,114,255,.24),
        rgba(232,207,151,.68),
        rgba(167,114,255,.24),
        transparent
    );
    box-shadow:
        0 0 9px rgba(216,188,120,.06),
        0 0 14px rgba(167,114,255,.05);
}

/* Engraved inner ward. Uses a child-free pseudo layer distinct from
   the panel's inherited top-line ornament. */
.auth-page--login .auth-warded-gateway::after{
    content:"";
    position:absolute;
    z-index:0;
    inset:10px;
    pointer-events:none;
    border:1px solid rgba(216,188,120,.052);
    border-radius:calc(var(--hb-radius-lg) - 7px);
    background:
        linear-gradient(135deg,rgba(216,188,120,.18) 0 1px,transparent 1px) top left / 18px 18px no-repeat,
        linear-gradient(225deg,rgba(216,188,120,.18) 0 1px,transparent 1px) top right / 18px 18px no-repeat,
        linear-gradient(45deg,rgba(216,188,120,.10) 0 1px,transparent 1px) bottom left / 18px 18px no-repeat,
        linear-gradient(315deg,rgba(216,188,120,.10) 0 1px,transparent 1px) bottom right / 18px 18px no-repeat;
    opacity:.72;
}

.auth-page--login .auth-warded-gateway > *{
    position:relative;
    z-index:2;
}

.auth-page--login .auth-warded-gateway h1{
    color:#f4eef7;
    text-shadow:
        0 0 22px rgba(167,114,255,.05),
        0 1px 0 rgba(255,255,255,.025);
}

.auth-page--login .auth-warded-gateway .form-intro{
    margin-bottom:22px;
    color:#aaa1b2;
}

/* ----------------------------------------------------------------
   Portal/key sigil
   ---------------------------------------------------------------- */

.auth-page--login .gateway-sigil{
    position:relative;
    width:66px;
    height:66px;
    margin-bottom:24px;
    border-color:rgba(216,188,120,.48);
    border-radius:50%;
    background:
        radial-gradient(circle at 50% 44%, rgba(167,114,255,.24), transparent 61%),
        #0c0912;
    box-shadow:
        inset 0 0 0 5px rgba(255,255,255,.012),
        0 0 0 6px rgba(167,114,255,.035),
        0 0 30px rgba(167,114,255,.13);
    color:#e2ceff;
    transform:none;
    animation:hbGatewaySigilArrival 1.45s cubic-bezier(.18,.72,.22,1) .12s both;
}

.auth-page--login .gateway-sigil svg{
    width:36px;
    height:36px;
    overflow:visible;
    fill:none;
    stroke:currentColor;
    stroke-width:1.5;
    stroke-linecap:round;
    stroke-linejoin:round;
    filter:
        drop-shadow(0 0 7px rgba(167,114,255,.32))
        drop-shadow(0 0 3px rgba(216,188,120,.10));
}

.auth-page--login .gateway-sigil__ring{
    position:absolute;
    inset:-8px;
    border:1px solid rgba(216,188,120,.22);
    border-radius:50%;
    background:
        linear-gradient(
            45deg,
            transparent 48%,
            rgba(167,114,255,.17) 49% 51%,
            transparent 52%
        );
    opacity:.72;
    transform:rotate(45deg);
    transition:
        opacity .34s ease,
        transform .58s cubic-bezier(.2,.74,.2,1),
        box-shadow .36s ease;
}

.auth-page--login .gateway-sigil::after{
    content:"";
    position:absolute;
    right:-5px;
    bottom:-5px;
    width:9px;
    height:9px;
    border:1px solid rgba(232,207,151,.54);
    background:#7446b8;
    box-shadow:0 0 12px rgba(167,114,255,.25);
    transform:rotate(45deg);
}

/* ----------------------------------------------------------------
   Background ward geometry
   ---------------------------------------------------------------- */

.auth-page--login .gateway-ward-field{
    position:absolute;
    z-index:0 !important;
    right:-58px;
    top:50%;
    width:275px;
    height:275px;
    pointer-events:none;
    opacity:.46;
    transform:translateY(-50%);
}

.auth-page--login .gateway-ward-field > span{
    position:absolute;
    inset:0;
    border:1px solid rgba(167,114,255,.075);
    border-radius:50%;
}

.auth-page--login .gateway-ward-field > span:nth-child(1){
    background:
        repeating-conic-gradient(
            from 0deg,
            rgba(167,114,255,.075) 0 1deg,
            transparent 1deg 18deg
        );
    -webkit-mask:radial-gradient(circle,transparent 0 42%,#000 43% 44%,transparent 45%);
    mask:radial-gradient(circle,transparent 0 42%,#000 43% 44%,transparent 45%);
}

.auth-page--login .gateway-ward-field > span:nth-child(2){
    inset:45px;
    border-color:rgba(216,188,120,.075);
    box-shadow:
        0 0 0 18px rgba(167,114,255,.009),
        0 0 22px rgba(167,114,255,.025);
}

.auth-page--login .gateway-ward-field > span:nth-child(3){
    inset:91px;
    border-color:rgba(167,114,255,.10);
    box-shadow:inset 0 0 18px rgba(167,114,255,.025);
}

/* ----------------------------------------------------------------
   Secure-passage status strip
   ---------------------------------------------------------------- */

.auth-page--login .gateway-status{
    display:flex;
    align-items:center;
    gap:11px;
    margin:0 0 22px;
    padding:10px 12px;
    border:1px solid rgba(216,188,120,.105);
    border-radius:11px;
    background:
        radial-gradient(circle at 8% 0%, rgba(167,114,255,.075), transparent 44%),
        rgba(8,6,11,.24);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.018),
        0 8px 18px rgba(0,0,0,.10);
}

.auth-page--login .gateway-status__mark{
    display:grid;
    place-items:center;
    width:31px;
    height:31px;
    flex:0 0 31px;
    border:1px solid rgba(216,188,120,.24);
    border-radius:50%;
    background:rgba(167,114,255,.055);
    color:#d8bc78;
    box-shadow:0 0 13px rgba(167,114,255,.06);
}

.auth-page--login .gateway-status small,
.auth-page--login .gateway-status strong{
    display:block;
}

.auth-page--login .gateway-status small{
    color:#77707f;
    font-size:8px;
    font-weight:800;
    letter-spacing:.16em;
    text-transform:uppercase;
}

.auth-page--login .gateway-status strong{
    margin-top:2px;
    color:#bdb4c5;
    font-size:11.5px;
}

/* ----------------------------------------------------------------
   Form refinement — the field looks warded while active.
   ---------------------------------------------------------------- */

.auth-page--login .auth-form{
    gap:19px;
}

.auth-page--login .auth-form .form-field{
    position:relative;
}

.auth-page--login .auth-form input{
    border-color:rgba(211,196,226,.18);
    background:
        linear-gradient(90deg, rgba(167,114,255,.018), transparent 34%),
        rgba(5,4,8,.62);
}

.auth-page--login .auth-form input:focus-visible{
    border-color:rgba(190,151,250,.72);
    box-shadow:
        0 0 0 3px rgba(156,108,255,.13),
        0 0 25px rgba(114,56,218,.10),
        inset 0 0 18px rgba(167,114,255,.025);
}

.auth-page--login .form-label-row a{
    color:#b995ef;
}

.auth-page--login .form-label-row a:hover,
.auth-page--login .form-label-row a:focus-visible{
    color:#e1d1ff;
}

/* Let the whole portal quietly acknowledge keyboard/form engagement. */
.auth-page--login .auth-warded-gateway:focus-within{
    border-color:rgba(216,188,120,.27);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.060),
        inset 0 0 0 1px rgba(216,188,120,.022),
        0 30px 90px rgba(0,0,0,.46),
        0 0 64px rgba(109,51,211,.10);
}

.auth-page--login .auth-warded-gateway:focus-within .gateway-sigil{
    border-color:rgba(204,169,255,.68);
    color:#fff1ff;
    box-shadow:
        inset 0 0 0 5px rgba(167,114,255,.045),
        0 0 0 6px rgba(167,114,255,.045),
        0 0 32px rgba(167,114,255,.22);
}

.auth-page--login .auth-warded-gateway:focus-within .gateway-sigil__ring{
    opacity:.94;
    transform:rotate(135deg);
    box-shadow:0 0 18px rgba(167,114,255,.11);
}

/* The existing .form-submit remains governed by the global arcane
   button system. We only harmonize its base face with the gateway. */
.auth-page--login .form-submit{
    margin-top:4px;
    border-color:rgba(201,169,107,.34);
    background:
        radial-gradient(circle at 16% 0%, rgba(170,111,255,.18), transparent 44%),
        linear-gradient(135deg,#1b1126,#291637 56%,#18101f);
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.11),
        inset 0 -1px 0 rgba(216,188,120,.09),
        0 12px 28px rgba(51,21,91,.22);
    color:#f8edff;
}

.auth-page--login .auth-alternate{
    margin-top:27px;
    border-top-color:rgba(216,188,120,.085);
}

/* ----------------------------------------------------------------
   Arrival / ward awakening
   ---------------------------------------------------------------- */

@keyframes hbGatewaySigilArrival{
    0%{
        opacity:.45;
        transform:scale(.92);
        box-shadow:
            inset 0 0 0 5px rgba(255,255,255,.008),
            0 0 0 4px rgba(167,114,255,.025),
            0 0 12px rgba(167,114,255,.04);
    }
    42%{
        opacity:1;
        transform:scale(1.045);
        box-shadow:
            inset 0 0 0 5px rgba(167,114,255,.035),
            0 0 0 7px rgba(167,114,255,.050),
            0 0 34px rgba(167,114,255,.21);
    }
    100%{
        opacity:1;
        transform:scale(1);
    }
}

.auth-page--login .gateway-ward-field > span:nth-child(1){
    animation:hbGatewayWardDrift 18s linear infinite;
}

.auth-page--login .gateway-ward-field > span:nth-child(2){
    animation:hbGatewayWardDriftReverse 24s linear infinite;
}

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

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

/* ----------------------------------------------------------------
   Responsive / accessibility
   ---------------------------------------------------------------- */

@media(max-width:680px){
    .auth-page--login .auth-shell{
        padding-top:44px !important;
        padding-bottom:62px !important;
    }

    .auth-page--login .auth-warded-gateway{
        padding:39px 24px 35px;
    }

    .auth-page--login .gateway-ward-field{
        right:-108px;
        width:240px;
        height:240px;
        opacity:.34;
    }

    .auth-page--login .gateway-sigil{
        width:61px;
        height:61px;
    }

    .auth-page--login .gateway-sigil svg{
        width:33px;
        height:33px;
    }

    .auth-page--login .gateway-status{
        padding:9px 10px;
    }
}

@media(max-width:420px){
    .auth-page--login .auth-warded-gateway{
        padding:34px 20px 32px;
    }

    .auth-page--login .form-label-row{
        gap:10px;
    }

    .auth-page--login .form-label-row a{
        font-size:11px;
    }
}

@media(prefers-reduced-motion:reduce){
    .auth-page--login .gateway-sigil,
    .auth-page--login .gateway-sigil__ring,
    .auth-page--login .gateway-ward-field > span{
        animation:none !important;
        transition:none !important;
    }
}
