/* =====================================================================
   Auth pages (login, forgot, reset, 2FA) — brand panel + logo.
   The company logo moves to the white form panel (universal: any logo colour reads on white);
   the blue panel becomes a calm brand area: label chip, headline, glass feature rows, soft light.
   Loaded after login.css / forgot-password.css / reset-password.css and theme-modern.css.
   ===================================================================== */

body[data-ess-auth] :is(.login-left, .forgot-left, .reset-left) {
    padding: 2.75rem 2.5rem;
    justify-content: center;
    gap: 0;
    background:
        radial-gradient(120% 90% at 0% 0%, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 55%),
        radial-gradient(90% 70% at 100% 100%, rgba(96, 165, 250, .45) 0%, rgba(96, 165, 250, 0) 60%),
        linear-gradient(150deg, #1e3a8a 0%, #1d4ed8 55%, #2563eb 100%);
    isolation: isolate;
}

/* fine dot grid, fading out towards the bottom */
body[data-ess-auth] :is(.login-left, .forgot-left, .reset-left)::before {
    width: auto;
    height: auto;
    inset: 0;
    top: 0;
    right: 0;
    border-radius: 0;
    background: radial-gradient(rgba(255, 255, 255, .22) 1px, transparent 1.4px) 0 0 / 18px 18px;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 80%);
    mask-image: linear-gradient(180deg, #000 0%, rgba(0, 0, 0, .35) 45%, transparent 80%);
    z-index: -1;
}

/* one large soft ring, bottom right */
body[data-ess-auth] :is(.login-left, .forgot-left, .reset-left)::after {
    width: 340px;
    height: 340px;
    left: auto;
    right: -140px;
    bottom: -150px;
    background: none;
    border: 1px solid rgba(255, 255, 255, .22);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, .04), 0 0 0 80px rgba(255, 255, 255, .03);
    z-index: -1;
}

/* label chip (replaces the logo on the blue panel) */
body[data-ess-auth] .logo-section {
    margin-bottom: 1.75rem;
}

body[data-ess-auth] .brand-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    padding: .45rem .9rem .45rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .24);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

body[data-ess-auth] .brand-chip__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #86efac;
    box-shadow: 0 0 0 3px rgba(134, 239, 172, .25);
}

body[data-ess-auth] .welcome-text {
    margin-bottom: 2rem;
}

body[data-ess-auth] .welcome-text h2 {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.18;
    letter-spacing: -.02em;
    margin-bottom: .9rem;
    color: #fff;
}

body[data-ess-auth] .welcome-text p {
    max-width: 34ch;
    font-size: .95rem;
    line-height: 1.65;
    color: rgba(255, 255, 255, .85);
    opacity: 1;
}

/* features as glass rows */
body[data-ess-auth] .features {
    display: grid;
    gap: .6rem;
    max-width: 320px;
}

body[data-ess-auth] .feature-item {
    margin: 0;
    padding: .6rem .8rem;
    gap: .8rem;
    border-radius: 14px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .16);
    font-weight: 600;
    color: #fff;
}

body[data-ess-auth] .feature-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .18);
    font-size: 1.05rem;
    color: #fff;
}

/* ---------- white panel: company logo on top ---------- */
body[data-ess-auth] .brand-logo {
    display: flex;
    align-items: center;
    min-height: 44px;
    margin-bottom: 1.75rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--ess-border, #e2e8f0);
}

body[data-ess-auth] .brand-logo img {
    display: block;
    max-width: 190px;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

body[data-ess-auth] :is(.login-right, .forgot-right, .reset-right) {
    padding: 2.5rem 2.75rem;
}

/* ---------- small screens: compact brand band above the form ---------- */
@media (max-width: 768px) {
    body[data-ess-auth] :is(.login-left, .forgot-left, .reset-left) {
        padding: 1.75rem 1.5rem;
    }

    body[data-ess-auth] .logo-section { margin-bottom: 1rem; }
    body[data-ess-auth] .welcome-text { margin-bottom: 0; }
    body[data-ess-auth] .welcome-text h2 { font-size: 1.45rem; margin-bottom: .5rem; }
    body[data-ess-auth] .welcome-text p { font-size: .88rem; }
    body[data-ess-auth] .features { display: none; }

    body[data-ess-auth] :is(.login-right, .forgot-right, .reset-right) {
        padding: 1.75rem 1.5rem;
    }

    body[data-ess-auth] .brand-logo {
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
    }
}

/* Language switch on the sign-in pages (EN | ID), top-right corner */
.auth-lang {
    position: fixed;
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    z-index: 20;
}

.auth-lang .lang-switch__seg {
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 2px 10px rgba(15, 23, 42, .12);
}

.auth-lang .lang-switch__btn.is-active {
    background: var(--ess-600, #2563eb);
    color: #fff;
}

/* small screens: the switch takes its own row above the card instead of covering it */
@media (max-width: 640px) {
    body[data-ess-auth] {
        flex-direction: column;
    }

    .auth-lang {
        position: static;
        align-self: flex-end;
        margin: 0 0 10px;
    }
}
