/* ── Auth Layout ── */
.auth-body{
    min-height:100vh;
    background:#050507;
    display:flex;align-items:center;justify-content:center;
    padding:24px;
    position:relative;
    overflow:auto;
}
/* Animated gradient background */
.auth-body::before{
    content:'';
    position:fixed;inset:0;
    background:
        radial-gradient(ellipse 80% 60% at 20% 20%,rgba(229,9,20,.22),transparent 55%),
        radial-gradient(ellipse 60% 80% at 80% 80%,rgba(120,0,200,.14),transparent 50%),
        #050507;
    animation:authBg 8s ease-in-out infinite alternate;
    z-index:0;
}
@keyframes authBg{
    from{transform:scale(1) translate(0,0)}
    to{transform:scale(1.08) translate(-2%,-2%)}
}
.auth-layout{
    width:min(1180px,100%);
    display:grid;
    grid-template-columns:1.1fr .9fr;
    gap:36px;
    align-items:center;
    position:relative;z-index:1;
}
/* Left copy */
.auth-copy{padding:34px}
.auth-copy .brand{
    display:inline-flex;align-items:center;gap:12px;
    text-decoration:none;color:#fff;font-weight:900;font-size:20px;
    margin-bottom:32px;
}
.auth-copy .brand img{width:40px;height:40px;border-radius:10px;object-fit:cover}
.auth-copy .eyebrow{
    display:inline-flex;align-items:center;gap:8px;
    font-size:11px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;
    color:var(--accent,#e50914);margin-bottom:16px;
}
.auth-copy .eyebrow::before{content:'';width:6px;height:6px;background:var(--accent,#e50914);border-radius:50%;animation:pulse 1.8s infinite}
@keyframes pulse{0%,100%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.8)}}
.auth-copy h1{
    font-size:clamp(28px,4.5vw,58px);
    font-weight:900;line-height:1.06;
    letter-spacing:-.02em;
    margin:0 0 16px;
    color:#fff;
}
.auth-copy h1 span{
    background:linear-gradient(90deg,var(--accent,#e50914),#ff6b35);
    -webkit-background-clip:text;-webkit-text-fill-color:transparent;
}
.auth-copy p{
    font-size:16px;line-height:1.7;
    color:rgba(255,255,255,.6);
    max-width:480px;margin:0;
}
/* Feature pills */
.auth-features{
    display:flex;flex-wrap:wrap;gap:8px;margin-top:24px;
}
.auth-feature{
    display:flex;align-items:center;gap:6px;
    padding:7px 14px;border-radius:999px;
    background:rgba(255,255,255,.06);
    border:1px solid rgba(255,255,255,.1);
    font-size:12px;font-weight:600;color:rgba(255,255,255,.75);
}
/* Login box */
.login-box{
    padding:32px 30px;
    background:rgba(12,10,20,.9);
    border:1px solid rgba(255,255,255,.1);
    border-radius:24px;
    backdrop-filter:blur(24px);
    box-shadow:0 32px 80px rgba(0,0,0,.5);
}
/* Mobile: logo above card */
.auth-mobile-logo{
    display:none;
    text-align:center;
    margin-bottom:20px;
}
.auth-mobile-logo img{width:52px;height:52px;border-radius:14px;object-fit:cover;margin:0 auto 8px}
.auth-mobile-logo span{display:block;font-weight:900;font-size:18px;color:#fff}
.login-box h2{margin:0 0 8px;font-size:24px;font-weight:800;color:#fff}
.login-box .login-sub{font-size:13px;color:rgba(255,255,255,.45);margin-bottom:22px}
.login-box form{display:grid;gap:14px}
.login-box label{
    font-size:11px;font-weight:800;
    letter-spacing:.1em;text-transform:uppercase;
    color:rgba(255,255,255,.5);
    margin-bottom:2px;display:block;
}
.login-box input[type=text],
.login-box input[type=password]{
    width:100%;padding:13px 16px;
    border-radius:12px;
    border:1px solid rgba(255,255,255,.1);
    background:rgba(255,255,255,.06);
    color:#fff;font-size:15px;
    font-family:inherit;
    transition:.16s;outline:none;
}
.login-box input:focus{
    border-color:var(--accent,#e50914);
    background:rgba(255,255,255,.09);
    box-shadow:0 0 0 3px rgba(229,9,20,.12);
}
.auth-links{
    display:flex;justify-content:space-between;gap:10px;
    margin-top:18px;font-size:13px;
}
.auth-links a{text-decoration:none;color:rgba(255,255,255,.5);transition:.14s}
.auth-links a:hover{color:#fff}
.auth-layout--premium .login-box{max-width:440px;justify-self:end;width:100%}
/* Loading overlay */
.loader{
    position:fixed;inset:0;background:rgba(0,0,0,.9);
    display:flex;flex-direction:column;align-items:center;justify-content:center;
    gap:16px;z-index:9999;color:#fff;font-size:15px;font-weight:700;
}
.spinner{
    width:40px;height:40px;
    border:3px solid rgba(255,255,255,.15);
    border-top-color:var(--accent,#e50914);
    border-radius:50%;animation:spin .7s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}

/* ── MOBILE ─────────────────────────────────────── */
@media(max-width:860px){
    .auth-body{
        padding:16px;
        align-items:center;
        justify-content:center;
        min-height:100vh;
        min-height:100dvh; /* Dynamic viewport - shrinks when keyboard opens */
        overflow-y:auto;
        padding-top:env(safe-area-inset-top,16px);
        padding-bottom:env(safe-area-inset-bottom,16px);
    }
    .auth-layout{
        grid-template-columns:1fr;
        gap:0;
        width:100%;
        max-width:420px;
        margin:auto;
    }
    /* Hide left copy on mobile */
    .auth-copy{display:none}
    /* Show logo above card */
    .auth-mobile-logo{display:block}
    .auth-layout--premium .login-box{
        justify-self:stretch;
        max-width:none;
        border-radius:20px;
        padding:28px 22px;
        width:100%;
    }
    .login-box h2{font-size:22px}
    /* Remove overflow:hidden so card stays visible when keyboard opens */
    .auth-body.keyboard-open{
        align-items:flex-start;
        padding-top:16px;
    }
}
@media(max-width:480px){
    .auth-body{padding:12px}
    .login-box{padding:24px 18px;border-radius:18px}
}
