/* InstaShadow login, sign-up, password and email pages (auth.html). Class names and data attributes are
   InstaCognito's: app.auth_vN.js is shared. */
:root{
    --grad:linear-gradient(90deg,#11D411 0%,#27DEBF 97%);
    --green:#11D411;
    --teal:#27DEBF;
    --text:#fff;
    --muted:rgba(255,255,255,.8);
    --field-bg:rgba(255,255,255,.2);
    --field-line:rgba(255,255,255,.2);
    --danger:#FF7A83;
    --danger-bg:rgba(242,109,118,.12);
    --success:#6BEA87;
    --header-h:70px;
    --content-w:1090px;
    --font:Roboto,"Helvetica Neue",Arial,sans-serif;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth;background:#000}
body{
    margin:0;
    min-width:320px;
    color:var(--text);
    background:transparent;
    font-family:var(--font);
    line-height:1.35;
    -webkit-font-smoothing:antialiased;
    text-rendering:optimizeLegibility;
}
body::before{
    content:"";
    position:fixed;
    inset:0;
    z-index:-1;
    pointer-events:none;
    background:
        radial-gradient(560px 500px at 0 0,rgba(185,255,169,.20),rgba(185,255,169,0) 70%),
        radial-gradient(1000px 980px at calc(100% + 120px) 46%,rgba(185,255,169,.15),rgba(185,255,169,0) 70%),
        radial-gradient(1000px 980px at -200px 100%,rgba(185,255,169,.11),rgba(185,255,169,0) 70%),
        #000;
}
img{max-width:100%;height:auto;display:block}
a{color:inherit}
button,input{font:inherit}
button{cursor:pointer}
button:disabled{cursor:not-allowed;opacity:.72}

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

/* ── Header ── */
.auth-header{
    height:var(--header-h);
    background:#000;
    position:relative;
    z-index:50;
    border-bottom:1px solid rgba(255,255,255,.2);
}
.auth-header__inner{
    position:relative;
    width:min(calc(100% - 48px),var(--content-w));
    height:100%;
    margin:0 auto;
    display:flex;
    align-items:center;
    justify-content:space-between;
}
.auth-brand{display:inline-flex;align-items:center;text-decoration:none}
.auth-brand img{width:146px;height:auto}
.auth-head-actions{margin-left:auto;display:flex;align-items:center}

/* ── Language menu (no JS) ── */
.lang{position:relative;color:#fff}
.lang summary{
    list-style:none;
    cursor:pointer;
    user-select:none;
    display:flex;
    align-items:center;
    gap:8px;
    padding:6px 4px;
    border-radius:10px;
    color:#fff;
    font-size:16px;
    font-weight:600;
    line-height:1;
}
.lang summary::-webkit-details-marker{display:none}
.chev{
    width:7px;
    height:7px;
    display:inline-block;
    border:1.5px solid currentColor;
    border-top:0;
    border-left:0;
    transform:rotate(45deg) translateY(-3px);
    transition:transform .15s ease;
}
.lang[open] .chev{transform:rotate(-135deg) translateY(-1px)}
.menu{
    position:absolute;
    right:0;
    top:calc(100% + 12px);
    background:#0b0f0b;
    border:1px solid rgba(17,212,17,.25);
    border-radius:18px;
    box-shadow:0 20px 48px rgba(0,0,0,.6);
    padding:12px;
    min-width:min(92vw,400px);
    max-height:calc(100vh - 96px);
    max-height:calc(100dvh - 96px);
    overflow-y:auto;
    overscroll-behavior:contain;
    z-index:9999;
}
.menu-grid{display:grid;gap:10px;grid-template-columns:repeat(2,minmax(0,1fr))}
.lang a{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
    text-decoration:none;
    color:#fff;
    padding:12px 14px;
    border-radius:12px;
    background:rgba(255,255,255,.04);
    border:1px solid rgba(255,255,255,.08);
    font-size:16px;
    font-weight:600;
    transition:border-color .15s,background .15s,transform .06s;
}
.lang a:hover{border-color:rgba(17,212,17,.5)}
.lang a:active{transform:translateY(1px)}
.lang a[aria-current="true"]{border-color:var(--green);background:rgba(17,212,17,.12)}
.flag{font-size:18px;line-height:1}
.lang[open]{isolation:isolate}

/* ── Page and card ── */
.auth-page{background:transparent}
.auth-hero{
    position:relative;
    min-height:640px;
    display:flex;
    align-items:flex-start;
    justify-content:center;
    isolation:isolate;
}
.auth-shell{
    position:relative;
    z-index:2;
    width:100%;
    display:flex;
    justify-content:center;
    padding:64px 22px 64px;
}
/* Glass card: dark, a soft light-green glow in the top left corner, a border fading from pale yellow to green */
.auth-card{
    width:min(100%,482px);
    border:1.5px solid transparent;
    border-radius:12px;
    background:
        radial-gradient(210px 150px at 0 0,rgba(214,240,150,.40),rgba(214,240,150,0) 72%) padding-box,
        linear-gradient(rgba(10,12,10,.88),rgba(10,12,10,.88)) padding-box,
        linear-gradient(150deg,#FFF7AC 0%,rgba(160,214,110,.75) 30%,rgba(17,212,17,.28) 62%,rgba(17,212,17,.18) 100%) border-box;
    -webkit-backdrop-filter:blur(20px);
    backdrop-filter:blur(20px);
    padding:34px 40px 34px;
    display:none;
}
body[data-auth-view="login"] [data-auth-card="login"],
body[data-auth-view="forgot"] [data-auth-card="forgot"],
body[data-auth-view="check-email"] [data-auth-card="check-email"],
body[data-auth-view="verification-sent"] [data-auth-card="verification-sent"],
body[data-auth-view="verify"] [data-auth-card="verify"],
body[data-auth-view="reset"] [data-auth-card="reset"],
body[data-auth-view="signup"] [data-auth-card="signup"]{display:block}

.auth-card--forgot,
.auth-card--check{padding-bottom:32px}
.auth-title{
    margin:0 auto;
    width:max-content;
    max-width:100%;
    color:var(--green);
    background:var(--grad);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    font-size:27px;
    line-height:32px;
    font-weight:800;
    text-align:center;
}
.auth-subtitle{
    margin:10px auto 28px;
    color:var(--muted);
    text-align:center;
    font-size:17px;
    line-height:22px;
    font-weight:400;
}
.auth-subtitle--narrow{max-width:360px;line-height:24px}
.auth-subtitle--message{line-height:24px;margin-top:12px;margin-bottom:26px}

.auth-form{margin:0;display:flex;flex-direction:column;align-items:stretch}
.field{position:relative;margin:0 0 14px}
.field input{
    width:100%;
    height:46px;
    border:1px solid var(--field-line);
    border-radius:5px;
    background:var(--field-bg);
    color:#fff;
    padding:0 16px;
    font-size:16px;
    outline:none;
    transition:border-color .15s ease,box-shadow .15s ease,background .15s ease;
}
.field input::placeholder{color:rgba(255,255,255,.5);opacity:1}
.field input:focus{border-color:var(--green);box-shadow:0 0 0 3px rgba(17,212,17,.18)}
.field input:-webkit-autofill{
    -webkit-text-fill-color:#fff;
    -webkit-box-shadow:0 0 0 1000px #3a3a3a inset;
    caret-color:#fff;
}
.field--password input{padding-right:48px}
.password-toggle{
    position:absolute;
    right:14px;
    top:12px;
    width:22px;
    height:22px;
    padding:0;
    border:0;
    background:transparent;
    display:grid;
    place-items:center;
    border-radius:50%;
    opacity:.9;
}
.password-toggle:hover{opacity:1}
.password-toggle:focus-visible{outline:2px solid rgba(17,212,17,.6);outline-offset:2px}
.password-toggle img{width:17px;height:17px;object-fit:contain}
.field.is-invalid input,
.terms-field.is-invalid .checkbox-ui{border-color:var(--danger);background:var(--danger-bg)}
.field.is-invalid input:focus{box-shadow:0 0 0 3px rgba(242,109,118,.2)}
.field-error{
    min-height:0;
    margin:6px 0 0;
    color:var(--danger);
    font-size:13px;
    line-height:1.25;
    font-weight:500;
    display:none;
}
.field.is-invalid .field-error,
.terms-field.is-invalid .field-error{display:block}
.form-alert{
    margin:0 0 14px;
    padding:10px 12px;
    border:1px solid rgba(242,109,118,.45);
    border-radius:8px;
    background:var(--danger-bg);
    color:var(--danger);
    font-size:14px;
    font-weight:500;
    text-align:left;
}
.form-alert.is-success{
    border-color:rgba(17,212,17,.45);
    background:rgba(17,212,17,.1);
    color:var(--success);
}

.auth-link,
.link-button{
    color:var(--green);
    background:var(--grad);
    -webkit-background-clip:text;
    background-clip:text;
    -webkit-text-fill-color:transparent;
    font-weight:600;
    font-size:15px;
    text-decoration:underline;
    text-decoration-color:var(--green);
    text-underline-offset:3px;
    text-decoration-thickness:1px;
}
.auth-link:hover,
.link-button:hover{filter:brightness(1.15)}
.auth-link--center{align-self:center;margin:4px 0 22px}
.auth-link--muted{
    color:#fff;
    background:none;
    -webkit-text-fill-color:currentColor;
    font-weight:500;
    font-size:inherit;
    text-decoration-color:currentColor;
}
.link-button{appearance:none;padding:0;border:0}

.primary-btn{
    align-self:center;
    min-width:170px;
    height:46px;
    padding:0 24px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:0;
    border-radius:5px;
    background:var(--grad);
    color:#fff;
    font-weight:600;
    font-size:17px;
    line-height:1;
    text-decoration:none;
    transition:transform .12s ease,filter .12s ease;
}
.primary-btn:hover{filter:brightness(1.06)}
.primary-btn:active{transform:translateY(1px)}
.primary-btn:focus-visible{outline:3px solid rgba(17,212,17,.45);outline-offset:3px}
.primary-btn--wide{min-width:190px;margin-top:8px}
.primary-btn--link{min-width:190px;margin:0 auto 26px}
.auth-form.is-loading .primary-btn[type="submit"]::after,
.auth-form.is-loading .link-button[type="submit"]::after{
    content:"";
    width:15px;
    height:15px;
    margin-left:10px;
    border:2px solid currentColor;
    border-top-color:transparent;
    border-radius:50%;
    animation:auth-spin .75s linear infinite;
}
@keyframes auth-spin{to{transform:rotate(1turn)}}

.auth-divider{
    display:flex;
    align-items:center;
    gap:18px;
    color:rgba(255,255,255,.5);
    font-size:16px;
    margin:24px 0 20px;
}
.auth-divider::before,
.auth-divider::after{content:"";height:1px;flex:1;background:#383838}
[data-social-auth][hidden], [data-social-provider][hidden]{display:none!important}
.social-row{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:12px}
.social-row--single{grid-template-columns:1fr}
.social-consent{margin:0 0 20px;color:rgba(255,255,255,.6);font-size:12px;line-height:1.5;text-align:center}
.social-btn{
    min-width:0;
    height:46px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:12px;
    padding:0 14px;
    border:1px solid rgba(255,255,255,.25);
    border-radius:5px;
    background:transparent;
    color:#fff;
    font-size:14px;
    font-weight:600;
    line-height:1;
    text-decoration:none;
    white-space:nowrap;
    transition:background .12s ease,border-color .12s ease,transform .12s ease;
}
.social-btn:hover{background:rgba(255,255,255,.06);border-color:rgba(17,212,17,.6)}
.social-btn:active{transform:translateY(1px)}
.social-btn:focus-visible{outline:3px solid rgba(17,212,17,.45);outline-offset:3px}
.social-btn img{width:20px;height:20px;object-fit:contain}

.auth-bottom-copy{
    margin:0;
    display:flex;
    justify-content:space-between;
    align-items:center;
    gap:14px;
    color:#fff;
    font-size:15px;
    font-weight:600;
}
.auth-bottom-copy--split{margin-top:28px}
.auth-bottom-copy--check{margin-top:0}
.auth-bottom-copy--center{justify-content:center;text-align:center;margin-top:26px}
[data-auth-form="verify"] [hidden]{display:none!important}

.terms-field{margin:0 0 16px}
.check-label{
    display:flex;
    align-items:center;
    gap:10px;
    color:#fff;
    font-size:14px;
    line-height:1.32;
    user-select:none;
}
.check-label input{position:absolute;opacity:0;pointer-events:none}
.checkbox-ui{
    flex:0 0 auto;
    width:18px;
    height:18px;
    border:1px solid rgba(255,255,255,.5);
    border-radius:4px;
    background:transparent;
    transition:border-color .15s ease,background .15s ease,box-shadow .15s ease;
}
.check-label input:checked + .checkbox-ui{
    border-color:var(--green);
    background:var(--green);
    box-shadow:inset 0 0 0 4px #000;
}
.check-label input:focus-visible + .checkbox-ui{outline:3px solid rgba(17,212,17,.35)}

.auth-turnstile{position:absolute;left:-9999px;bottom:0;width:1px;height:1px;overflow:hidden}

/* ── Footer ── */
.auth-footer{background:transparent;padding:0 20px 32px;text-align:center}
.auth-footer__inner{max-width:1120px;margin:0 auto}
.auth-footer__brand{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;margin-bottom:24px}
.auth-footer__logo{width:160px;height:auto;margin:0 auto}
.auth-footer__utility{
    display:flex;
    justify-content:center;
    align-items:center;
    flex-wrap:wrap;
    gap:10px 20px;
    margin:0 auto 26px;
    color:#fff;
    font-size:14px;
    line-height:17px;
}
.auth-footer__utility a{text-decoration:underline;text-underline-offset:2px}
.auth-footer__utility a:hover{color:var(--green)}
.auth-footer__legal{margin:0 auto;max-width:903px;color:#8B8A8A;font-size:10px;line-height:1.2}

@media (max-width:1100px){
    .auth-header__inner{width:100%;padding:0 24px}
    .lang{position:static}
    .menu{
        position:absolute;
        top:100%;
        left:0;
        right:0;
        width:100%;
        min-width:100%;
        max-width:100%;
        border-radius:0 0 18px 18px;
        padding:14px;
        max-height:70vh;
        overflow:auto;
        margin-top:0;
    }
}

@media (max-width:640px){
    :root{--header-h:54px}
    .auth-header__inner{padding:0 20px 0 17px}
    .auth-brand img{width:200px}

    .auth-hero{min-height:0}
    .auth-shell{padding:30px 20px 30px}
    .auth-card{
        width:100%;
        max-width:350px;
        padding:30px 20px 30px;
        background:
            radial-gradient(180px 140px at 0 0,rgba(214,240,150,.36),rgba(214,240,150,0) 72%) padding-box,
            linear-gradient(rgba(10,12,10,.88),rgba(10,12,10,.88)) padding-box,
            linear-gradient(150deg,#FFF7AC 0%,rgba(160,214,110,.75) 30%,rgba(17,212,17,.28) 62%,rgba(17,212,17,.18) 100%) border-box;
    }
    .auth-title{font-size:32px;line-height:38px}
    .auth-subtitle{font-size:16px;line-height:22px;margin:6px auto 20px}
    .auth-subtitle--narrow,
    .auth-subtitle--message{font-size:16px;line-height:22px;max-width:290px}

    .field{margin-bottom:10px}
    .field input{height:42px;padding:0 19px;font-size:16px}
    .field--password input{padding-right:46px}
    .password-toggle{right:14px;top:9px}
    .field-error{font-size:12px;margin-top:4px}
    .form-alert{font-size:13px;padding:9px 11px;margin-bottom:12px;border-radius:6px}

    .auth-link,
    .link-button{font-size:16px}
    .auth-link--center{margin:10px 0 20px}
    .primary-btn{min-width:146px;height:42px;font-size:16px;padding:0 20px}
    .primary-btn--wide{min-width:180px}
    .primary-btn--link{min-width:180px;margin-bottom:24px}

    .auth-divider{gap:16px;font-size:16px;margin:20px 0 20px}
    .social-row{gap:10px;margin:0 0 12px}
    .social-btn{height:42px;gap:8px;padding-inline:8px;font-size:13px}
    .social-btn img{width:18px;height:18px}
    .social-prefix{display:none}
    .auth-bottom-copy{font-size:16px;gap:10px}
    .auth-bottom-copy--split{margin-top:24px}

    .terms-field{margin:2px 0 14px}
    .check-label{font-size:14px;gap:10px}

    .auth-footer{padding:30px 20px 34px}
    .auth-footer__brand{margin-bottom:20px}
    .auth-footer__utility{gap:15px 16px;max-width:340px;margin-bottom:22px}
    .auth-footer__legal{max-width:310px}
}

@media (max-width:360px){
    .menu{padding:12px}
    .menu-grid{gap:8px}
    .lang a{padding:11px 9px;gap:8px;font-size:14px}
    .auth-header__inner{padding-left:13px;padding-right:13px}
    .auth-brand img{width:170px}
    .auth-shell{padding-left:12px;padding-right:12px}
    .auth-card{padding-left:16px;padding-right:16px}
    .social-btn{font-size:12px;padding-inline:6px}
}

@media (prefers-reduced-motion:reduce){
    *,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;scroll-behavior:auto!important;transition-duration:.01ms!important}
}
