:root{
    --aq-bg:#eef1f7;
    --aq-surface:#ffffff;
    --aq-subtle:#f7f9fc;
    --aq-field:#f1f4f9;
    --aq-ink:#0a1a30;
    --aq-muted:#62718a;
    --aq-faint:#8493a8;
    --aq-line:rgba(10,26,48,.12);
    --aq-navy:#0a1526;
    --aq-navy-soft:#0f2340;
    --aq-cyan:#10c4e3;
    --aq-cyan-light:#5fe6fb;
    --aq-cyan-ink:#04252c;
    --aq-cyan-text:#0a7f96;
    --aq-gold:#f2b019;
    --aq-success:#17a34a;
    --aq-danger:#c0343a;
    --aq-telegram:#17212b;
    --aq-telegram-link:#6ab3f3;
    --aq-control-radius:13px;
    --aq-card-radius:20px;
}

*{
    box-sizing:border-box;
    margin:0;
    padding:0;
}

html,
body{
    min-width:320px;
    min-height:100%;
    background:var(--aq-bg);
}

body{
    min-height:100vh;
    min-height:100dvh;
    overflow-x:hidden;
    color:var(--aq-ink);
    font-family:"Manrope",-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
    -webkit-font-smoothing:antialiased;
}

button,
input{
    font:inherit;
}

a{
    color:var(--aq-cyan-text);
    text-decoration-thickness:1px;
    text-underline-offset:3px;
}

[hidden]{
    display:none !important;
}

.auth-split{
    min-height:100vh;
    min-height:100dvh;
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(480px,560px);
}

.auth-story{
    position:relative;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    min-width:0;
    padding:44px 48px;
    background:
        radial-gradient(900px 420px at 20% -10%,rgba(16,196,227,.26),transparent 62%),
        radial-gradient(700px 380px at 100% 110%,rgba(242,176,25,.14),transparent 58%),
        linear-gradient(180deg,var(--aq-navy-soft),#081326);
    color:#fff;
}

.auth-brand{
    display:inline-flex;
    align-items:center;
    gap:11px;
    width:max-content;
    min-height:44px;
    color:#fff;
    text-decoration:none;
}

.auth-brand-mark{
    width:38px;
    height:38px;
    border:1px solid rgba(16,196,227,.5);
    border-radius:11px;
    display:grid;
    place-items:center;
    background:rgba(16,196,227,.12);
    color:var(--aq-cyan);
    font-family:"Sora","Manrope",sans-serif;
    font-size:22px;
    font-weight:800;
}

.auth-brand-name{
    font-family:"Sora","Manrope",sans-serif;
    font-size:20px;
    font-weight:800;
}

.auth-brand-name em{
    color:var(--aq-gold);
    font-style:normal;
}

.auth-story-content{
    max-width:540px;
    margin-top:auto;
}

.auth-eyebrow{
    color:var(--aq-cyan-light);
    font-size:12px;
    font-weight:800;
    letter-spacing:.14em;
    text-transform:uppercase;
}

.auth-story-title{
    max-width:520px;
    margin-top:14px;
    font-family:"Sora","Manrope",sans-serif;
    font-size:40px;
    font-weight:800;
    line-height:1.1;
    letter-spacing:-.02em;
    text-wrap:balance;
}

.auth-story-copy{
    max-width:480px;
    margin-top:16px;
    color:rgba(255,255,255,.72);
    font-size:14px;
    line-height:1.65;
    text-wrap:pretty;
}

.auth-path{
    display:flex;
    align-items:center;
    gap:10px;
    margin-top:30px;
}

.auth-path-line{
    height:2px;
    flex:1;
    background:linear-gradient(90deg,var(--aq-success),var(--aq-cyan),rgba(255,255,255,.2));
}

.auth-path-node{
    width:40px;
    height:40px;
    border-radius:999px;
    display:grid;
    place-items:center;
    flex:0 0 auto;
    background:var(--aq-cyan);
    color:var(--aq-cyan-ink);
    font-family:"Sora","Manrope",sans-serif;
    font-size:13px;
    font-weight:800;
    animation:aq-auth-glow 2.6s ease-in-out infinite;
}

.auth-facts{
    display:grid;
    grid-template-columns:repeat(3,minmax(0,1fr));
    gap:10px;
    margin-top:28px;
}

.auth-fact{
    min-height:82px;
    padding:13px;
    border:1px solid rgba(255,255,255,.12);
    border-radius:14px;
    background:rgba(255,255,255,.06);
}

.auth-fact strong,
.auth-fact span{
    display:block;
}

.auth-fact strong{
    font-size:12.5px;
    line-height:1.35;
}

.auth-fact span{
    margin-top:5px;
    color:rgba(255,255,255,.65);
    font-size:12px;
    line-height:1.4;
}

.auth-workspace{
    min-width:0;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:40px 48px;
    background:var(--aq-bg);
}

.auth-card{
    width:min(100%,448px);
}

.auth-back{
    min-height:44px;
    display:inline-flex;
    align-items:center;
    margin-bottom:18px;
    color:var(--aq-muted);
    font-size:13px;
    font-weight:700;
    text-decoration:none;
}

.auth-title{
    font-family:"Sora","Manrope",sans-serif;
    font-size:26px;
    font-weight:800;
    line-height:1.15;
    letter-spacing:-.02em;
    text-wrap:balance;
}

.auth-subtitle{
    margin-top:9px;
    color:var(--aq-muted);
    font-size:13.5px;
    line-height:1.6;
    text-wrap:pretty;
}

.auth-form{
    display:grid;
    gap:14px;
    margin-top:24px;
}

.auth-field{
    display:grid;
    gap:7px;
}

.auth-field-label{
    color:var(--aq-muted);
    font-size:12.5px;
    font-weight:700;
}

.auth-input-wrap{
    position:relative;
}

.auth-input{
    width:100%;
    height:52px;
    border:1px solid var(--aq-line);
    border-radius:var(--aq-control-radius);
    background:var(--aq-surface);
    color:var(--aq-ink);
    padding:0 14px;
    font-size:14px;
    font-weight:600;
    outline:none;
    transition:border-color .18s ease,box-shadow .18s ease;
}

.auth-input.has-toggle{
    padding-right:94px;
}

.auth-input:focus{
    border-color:var(--aq-cyan-text);
    box-shadow:0 0 0 3px rgba(16,196,227,.18);
}

.auth-input[aria-invalid="true"]{
    border-color:var(--aq-danger);
}

.auth-input-toggle{
    position:absolute;
    top:4px;
    right:5px;
    min-width:82px;
    min-height:44px;
    border:0;
    border-radius:10px;
    background:transparent;
    color:var(--aq-cyan-text);
    font-size:12.5px;
    font-weight:800;
    cursor:pointer;
}

.auth-field-help{
    color:var(--aq-muted);
    font-size:12px;
    line-height:1.45;
}

.auth-alert{
    display:flex;
    gap:11px;
    padding:13px 14px;
    border:1px solid rgba(229,72,77,.28);
    border-radius:13px;
    background:rgba(229,72,77,.06);
    color:var(--aq-danger);
    font-size:12.5px;
    font-weight:700;
    line-height:1.5;
}

.auth-alert::before{
    content:"!";
    width:22px;
    height:22px;
    border-radius:999px;
    display:grid;
    place-items:center;
    flex:0 0 22px;
    background:rgba(229,72,77,.14);
    font-family:"Sora","Manrope",sans-serif;
    font-size:12px;
    font-weight:800;
}

.auth-alert:empty{
    display:none;
}

.auth-alert:not(.is-error){
    border-color:var(--aq-line);
    background:var(--aq-subtle);
    color:var(--aq-muted);
}

.auth-alert:not(.is-error)::before{
    content:"i";
    background:rgba(16,196,227,.16);
    color:var(--aq-cyan-text);
}

.auth-primary,
.auth-secondary,
.auth-telegram-button{
    width:100%;
    min-height:54px;
    border-radius:14px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:10px;
    padding:0 18px;
    font-size:14px;
    font-weight:800;
    text-align:center;
    text-decoration:none;
    cursor:pointer;
}

.auth-primary{
    border:0;
    background:linear-gradient(135deg,var(--aq-cyan),#0a9fbb);
    color:var(--aq-cyan-ink);
}

.auth-secondary{
    border:1px solid var(--aq-line);
    background:var(--aq-surface);
    color:var(--aq-ink);
}

.auth-telegram-button{
    border:0;
    background:var(--aq-telegram);
    color:#fff;
}

.auth-primary:disabled,
.auth-secondary:disabled,
.auth-telegram-button:disabled{
    cursor:wait;
    opacity:.62;
}

.auth-primary:focus-visible,
.auth-secondary:focus-visible,
.auth-telegram-button:focus-visible,
.auth-input-toggle:focus-visible,
.auth-back:focus-visible,
.auth-link:focus-visible{
    outline:3px solid rgba(16,196,227,.42);
    outline-offset:2px;
}

.auth-divider{
    display:flex;
    align-items:center;
    gap:12px;
    color:var(--aq-faint);
    font-size:12px;
    font-weight:700;
}

.auth-divider::before,
.auth-divider::after{
    content:"";
    height:1px;
    flex:1;
    background:var(--aq-line);
}

.auth-switch{
    color:var(--aq-muted);
    font-size:13px;
    font-weight:700;
    line-height:1.5;
    text-align:center;
}

.auth-switch a{
    min-height:44px;
    display:inline-flex;
    align-items:center;
    padding:0 4px;
    font-weight:800;
}

.auth-consent{
    display:grid;
    grid-template-columns:24px 1fr;
    align-items:start;
    gap:10px;
    min-height:44px;
    padding:10px 12px;
    border:1px solid rgba(10,26,48,.1);
    border-radius:13px;
    background:var(--aq-surface);
    color:var(--aq-muted);
    font-size:12px;
    line-height:1.55;
}

.auth-consent input{
    width:22px;
    height:22px;
    margin-top:1px;
    accent-color:var(--aq-cyan);
}

.auth-consent a{
    min-height:44px;
    display:inline-flex;
    align-items:center;
}

.auth-note{
    padding:12px 14px;
    border:1px solid var(--aq-line);
    border-radius:13px;
    background:var(--aq-subtle);
    color:var(--aq-muted);
    font-size:12px;
    line-height:1.5;
}

.auth-legal{
    display:flex;
    flex-wrap:wrap;
    justify-content:center;
    gap:10px 16px;
    margin-top:18px;
    font-size:12px;
}

.auth-legal a{
    min-height:44px;
    display:inline-flex;
    align-items:center;
}

.auth-version{
    margin-top:18px;
    color:var(--aq-faint);
    font-size:12px;
    text-align:center;
}

.auth-telegram-shell{
    width:min(100%,520px);
    min-height:100vh;
    min-height:100dvh;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    background:var(--aq-bg);
}

.auth-telegram-intro{
    padding:24px 20px;
    background:
        radial-gradient(500px 260px at 12% -20%,rgba(16,196,227,.3),transparent 60%),
        linear-gradient(180deg,var(--aq-navy-soft),#0b1a31);
    color:#fff;
}

.auth-telegram-intro .auth-story-title{
    margin-top:18px;
    font-size:24px;
}

.auth-telegram-intro .auth-story-copy{
    margin-top:9px;
    font-size:13px;
}

.auth-telegram-content{
    width:100%;
    flex:1;
    padding:20px 16px calc(24px + env(safe-area-inset-bottom));
}

.auth-telegram-card{
    display:grid;
    gap:14px;
}

.auth-telegram-card .auth-title{
    font-size:21px;
}

.auth-choice-grid,
.auth-home-grid,
.auth-actions,
.auth-telegram-form{
    display:grid;
    gap:10px;
}

.auth-home-link{
    min-height:62px;
    border:1px solid var(--aq-line);
    border-radius:14px;
    display:grid;
    align-content:center;
    gap:4px;
    padding:12px 14px;
    background:var(--aq-surface);
    color:var(--aq-ink);
    text-decoration:none;
}

.auth-home-link strong{
    font-family:"Sora","Manrope",sans-serif;
    font-size:15px;
}

.auth-home-link span{
    color:var(--aq-muted);
    font-size:12px;
}

.auth-home-link.is-primary{
    border:0;
    background:linear-gradient(135deg,var(--aq-cyan),#0a9fbb);
    color:var(--aq-cyan-ink);
}

.auth-home-link.is-primary span{
    color:rgba(4,37,44,.72);
}

.auth-text-button{
    min-height:44px;
    border:0;
    background:transparent;
    color:var(--aq-cyan-text);
    font-size:13px;
    font-weight:800;
    cursor:pointer;
}

body.is-awardiqs-telegram .auth-telegram-shell{
    min-height:var(--awardiqs-tg-viewport-stable-height,100dvh);
}

@keyframes aq-auth-glow{
    0%,100%{box-shadow:0 0 0 6px rgba(16,196,227,.2)}
    50%{box-shadow:0 0 0 10px rgba(16,196,227,.05)}
}

@media(max-width:820px){
    .auth-split{
        display:flex;
        flex-direction:column;
    }

    .auth-story{
        min-height:auto;
        padding:20px 20px 24px;
    }

    .auth-story-content{
        margin-top:20px;
    }

    .auth-story-title{
        margin-top:10px;
        font-size:24px;
        line-height:1.2;
    }

    .auth-story-copy{
        margin-top:9px;
        font-size:13px;
        line-height:1.6;
    }

    .auth-path,
    .auth-facts{
        display:none;
    }

    .auth-brand-mark{
        width:32px;
        height:32px;
        border-radius:10px;
        font-size:18px;
    }

    .auth-brand-name{
        font-size:17px;
    }

    .auth-workspace{
        flex:1;
        align-items:flex-start;
        padding:20px 16px 28px;
    }

    .auth-title{
        font-size:21px;
    }

    .auth-form{
        margin-top:20px;
    }
}

@media(max-width:360px){
    .auth-story,
    .auth-telegram-intro{
        padding-right:16px;
        padding-left:16px;
    }

    .auth-workspace,
    .auth-telegram-content{
        padding-right:12px;
        padding-left:12px;
    }
}

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