:root{
    --a-card:#ffffffee;
    --a-text:#0f172a;
    --a-muted:#64748b;
    --a-stroke:#e2e8f0;
    --a-input:#f8fafc;
    --a-shadow: 0 18px 45px rgba(2,6,23,.18);
    --a-phoneWidth: 440px;
}

body.auth-bg{
    margin:0;
    font-family:"Quicksand", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
    color:var(--a-text);
    background:
        radial-gradient(1100px 700px at 15% 10%, rgba(34,197,94,.28), transparent 55%),
        radial-gradient(900px 700px at 85% 30%, rgba(139,92,246,.35), transparent 50%),
        linear-gradient(135deg, rgba(14,165,233,.9), rgba(139,92,246,.92));
}

.auth-app{
    min-height:100vh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:18px;
}

.auth-phone{
    width:min(var(--a-phoneWidth), 100%);
    border-radius: 28px;
    box-shadow: 0 25px 80px rgba(2,6,23,.35);
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.18);
    padding:14px;
    backdrop-filter: blur(14px);
}

.auth-frame{
    width:100%;
    border-radius: 22px;
    overflow:hidden;
    box-shadow: var(--a-shadow);
    background: var(--a-card);
    border: 1px solid rgba(255,255,255,.40);
}

@media (max-width: 520px){
    .auth-app{ padding: 10px; }
    .auth-phone{
        width: 100%;
        padding: 10px;
        border-radius: 22px;
    }
    .auth-frame{ border-radius: 18px; }
}
@media (max-width: 380px){
    .auth-app{ padding: 8px; }
    .auth-phone{ padding: 8px; }
}

.auth-topbar{
    padding:16px 16px 14px;
    color:#fff;
    background:
        linear-gradient(135deg, rgba(255,255,255,.12), rgba(255,255,255,.06)),
        radial-gradient(900px 500px at 20% 30%, rgba(34,197,94,.35), transparent 55%),
        radial-gradient(900px 500px at 80% 40%, rgba(14,165,233,.42), transparent 55%),
        linear-gradient(135deg, rgba(34,197,94,.55), rgba(139,92,246,.65));
}
.auth-toprow{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
}
.auth-brand{
    display:flex;
    align-items:center;
    gap:10px;
    min-width:0;
}
.auth-logo{
    width:36px;height:36px;border-radius:12px;
    background: rgba(255,255,255,.22);
    display:grid;place-items:center;
    border:1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(10px);
    font-weight:900;
    flex:0 0 auto;
}
.auth-brandText b{
    display:block;
    font-weight:900;
    letter-spacing:.2px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.auth-brandText span{
    display:block;
    opacity:.9;
    font-weight:700;
    font-size:12px;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.auth-lang{
    display:flex;
    align-items:center;
    gap:8px;
    padding:8px 10px;
    border-radius:14px;
    background: rgba(255,255,255,.18);
    border:1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(10px);
    color:#fff;
    font-weight:900;
    user-select:none;
    flex:0 0 auto;
    position:relative;
}
.auth-lang button{
    background:transparent;
    border:none;
    padding:0;
    color:#fff;
    font-weight:900;
    display:flex;
    align-items:center;
    gap:8px;
    cursor:pointer;
}
.auth-lang .menu{
    position:absolute;
    top:calc(100% + 10px);
    right:0;
    width:190px;
    background:#fff;
    border-radius:14px;
    border:1px solid rgba(2,6,23,.08);
    box-shadow: 0 18px 35px rgba(2,6,23,.16);
    overflow:hidden;
    display:none;
    z-index:30;
}
.auth-lang.open .menu{ display:block; }
.auth-lang .menu a{
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:10px 12px;
    text-decoration:none;
    color:#0f172a;
    font-weight:900;
    border-bottom:1px solid rgba(2,6,23,.06);
}
.auth-lang .menu a:last-child{ border-bottom:none; }
.auth-lang .menu a.active{
    background: rgba(14,165,233,.08);
}
.auth-lang .menu a > div{
    display:flex;
    align-items:center;
    gap:10px;
}

.auth-headline{ margin:12px 0 0; }
.auth-headline h1{ margin:0; font-size:20px; line-height:1.15; letter-spacing:.2px; }
.auth-headline p{ margin:6px 0 0; opacity:.95; font-weight:700; font-size:13px; }

.auth-tabs{
    padding:12px;
    display:flex;
    gap:10px;
    background: linear-gradient(135deg, rgba(255,255,255,.72), rgba(255,255,255,.55));
    border-bottom:1px solid rgba(2,6,23,.06);
    position:sticky;
    top:0;
    z-index:2;
    backdrop-filter: blur(10px);
}
.auth-tab{
    flex:1;
    display:block;
    text-align:center;
    padding:12px 14px;
    border-radius:14px;
    font-weight:900;
    color: var(--a-muted);
    background: rgba(15,23,42,.05);
    text-decoration:none;
    transition:.2s ease;
}
.auth-tab.active{
    color:#fff;
    background: linear-gradient(135deg, rgba(34,197,94,.95), rgba(14,165,233,.95));
    box-shadow: 0 10px 22px rgba(14,165,233,.18);
}

.auth-panel{ padding:14px 14px 16px; }

.auth-title{ text-align:center; margin:10px 0 12px; }
.auth-title h2{ margin:0; font-size:22px; letter-spacing:.2px; }
.auth-title p{ margin:6px 0 0; color: var(--a-muted); font-weight:800; font-size:13px; }

.a-field{ display:grid; gap:8px; margin:12px 0; }
.a-inputWrap{
    display:flex;
    align-items:center;
    border:1px solid var(--a-stroke);
    background: var(--a-input);
    border-radius: 14px;
    overflow:hidden;
    min-height:48px;
}
.a-icon{
    width:44px;
    height:48px;
    display:grid;
    place-items:center;
    font-weight:900;
    color: rgba(15,23,42,.55);
    user-select:none;
}
.a-inputWrap input,
.a-inputWrap select{
    width:100%;
    border:none;
    outline:none;
    background:transparent;
    padding:12px 12px 12px 0;
    font-weight:900;
    font-size:14px;
    color: var(--a-text);
    font-family: inherit;
}
.a-inputWrap select{ padding-right:14px; cursor:pointer; }
.a-eye{
    border:none;
    background:transparent;
    width:46px;height:48px;
    cursor:pointer;
    color: rgba(15,23,42,.55);
    font-size:16px;
}
.a-help{
    font-size:12px;
    color: var(--a-muted);
    font-weight:800;
    margin-top:2px;
    padding-left:6px;
}

.a-agree{
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding:8px 4px 0;
    font-weight:800;
    color: rgba(15,23,42,.82);
    font-size:13px;
    line-height:1.35;
}
.a-agree input{ width:18px; height:18px; margin-top:2px; }
.a-agree a{ color:#0284c7; font-weight:900; text-decoration:none; }
.a-agree a:hover{ text-decoration:underline; }

.a-error{
    display:none;
    margin-top:8px;
    padding:10px 12px;
    border-radius:14px;
    border:1px solid rgba(239,68,68,.25);
    background: rgba(239,68,68,.08);
    color: rgba(127,29,29,.92);
    font-weight:900;
    font-size:13px;
}
.a-error.show{ display:block; }

.a-btn{
    width:100%;
    border:none;
    cursor:pointer;
    padding:14px 14px;
    border-radius:16px;
    font-weight:900;
    font-size:15px;
    color:#fff;
    background: linear-gradient(135deg, rgba(34,197,94,.98), rgba(14,165,233,.98));
    box-shadow: 0 14px 28px rgba(2,6,23,.14);
    transition: transform .08s ease, opacity .2s ease;
    margin-top:10px;
    display:flex;
    align-items:center;
    justify-content:center;
    gap:10px;
}
.a-btn:active{ transform: translateY(1px); }
.a-btn:disabled{ cursor:not-allowed; opacity:.55; box-shadow:none; }

.a-spinner{
    width:18px; height:18px;
    border-radius:50%;
    border:2px solid rgba(255,255,255,.55);
    border-top-color: rgba(255,255,255,1);
    animation: aSpin .8s linear infinite;
    display:none;
}
.a-btn.loading .a-spinner{ display:inline-block; }
.a-btn.loading .a-btnText{ opacity:.95; }

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

.a-footer{
    text-align:center;
    margin-top:12px;
    display:grid;
    gap:10px;
    padding-bottom:4px;
}
.a-swap{ color: var(--a-muted); font-weight:900; font-size:13px; }
.a-swap a{ color:#0ea5e9; font-weight:900; text-decoration:none; }
.a-swap a:hover{ text-decoration:underline; }
.a-service{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    font-weight:900;
    color: rgba(15,23,42,.78);
    text-decoration:none;
    font-size:13px;
}
