:root{
    --auth-brand:#52b4cb;
    --auth-brand-dark:#0b6174;
    --auth-brand-soft:#eaf8fb;
    --auth-ink:#12313b;
    --auth-muted:#647987;
    --auth-line:rgba(82,180,203,.2);
    --auth-danger:#b42318;
    --auth-danger-soft:#fff1f1;
    --auth-success:#166534;
    --auth-success-soft:#ecfdf3;
}

*{
    box-sizing:border-box;
}

body{
    margin:0;
}

.auth-page{
    min-height:100vh;
    display:flex;
    align-items:center;
    justify-content:center;
    padding:clamp(16px,3vw,34px);
    background:
        radial-gradient(circle at 86% 8%, rgba(82,180,203,.16), transparent 28rem),
        radial-gradient(circle at 10% 88%, rgba(11,97,116,.08), transparent 28rem),
        linear-gradient(180deg,#fbfdfe 0%,#f1f8fa 100%);
    color:var(--auth-ink);
}

.auth-shell{
    width:min(1040px,100%);
    display:grid;
    grid-template-columns:minmax(300px, .86fr) minmax(380px, 430px);
    gap:18px;
    align-items:stretch;
}

.auth-hero,
.auth-card{
    border:1px solid var(--auth-line);
    border-radius:26px;
    box-shadow:0 22px 60px rgba(18,49,59,.08);
}

.auth-hero{
    position:relative;
    min-height:540px;
    padding:28px;
    overflow:hidden;
    display:flex;
    flex-direction:column;
    justify-content:space-between;
    gap:24px;
    background:
        linear-gradient(145deg,rgba(82,180,203,.95),rgba(7,84,102,.98)),
        #52b4cb;
    color:#fff;
}

.auth-hero::before,
.auth-hero::after{
    content:"";
    position:absolute;
    border-radius:999px;
    pointer-events:none;
}

.auth-hero::before{
    width:260px;
    height:260px;
    inset-block-start:-80px;
    inset-inline-end:-70px;
    background:rgba(255,255,255,.14);
}

.auth-hero::after{
    width:190px;
    height:190px;
    inset-block-end:-70px;
    inset-inline-start:-60px;
    background:rgba(255,255,255,.1);
}

.auth-brand{
    position:relative;
    z-index:1;
    display:flex;
    align-items:center;
    gap:10px;
    flex-wrap:wrap;
    font-weight:850;
    font-size:18px;
}

.auth-badge{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:42px;
    height:42px;
    border-radius:16px;
    background:#fff;
    color:var(--auth-brand-dark);
    font-weight:900;
}

.auth-version{
    display:inline-flex;
    align-items:center;
    min-height:24px;
    padding:2px 9px;
    border-radius:999px;
    background:rgba(255,255,255,.16);
    color:#fff;
    font-size:11px;
    font-weight:800;
}

.auth-hero h1{
    position:relative;
    z-index:1;
    margin:0;
    max-width:540px;
    font-size:clamp(24px,3.5vw,38px);
    line-height:1.5;
    letter-spacing:-.03em;
}

.auth-hero p{
    position:relative;
    z-index:1;
    max-width:520px;
    margin:10px 0 0;
    color:rgba(255,255,255,.82);
    font-size:14px;
    line-height:2;
}

.auth-hero ul{
    position:relative;
    z-index:1;
    list-style:none;
    padding:0;
    margin:0;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.auth-hero li{
    display:flex;
    align-items:center;
    gap:9px;
    width:max-content;
    max-width:100%;
    padding:10px 12px;
    border:1px solid rgba(255,255,255,.16);
    border-radius:14px;
    background:rgba(255,255,255,.1);
    color:#fff;
    font-size:13px;
}

.auth-hero li span{
    width:8px;
    height:8px;
    border-radius:999px;
    background:#fff;
    flex:0 0 auto;
}

.auth-card{
    padding:26px;
    display:flex;
    flex-direction:column;
    gap:16px;
    background:rgba(255,255,255,.96);
    backdrop-filter:blur(16px);
}

.auth-card h2{
    margin:0;
    font-size:24px;
    line-height:1.5;
    letter-spacing:-.02em;
}

.auth-subtitle{
    margin-top:4px;
    color:var(--auth-muted);
    font-size:13px;
    line-height:1.8;
}

.auth-form,
.auth-form .form-grid{
    display:flex;
    flex-direction:column;
    gap:12px;
}

.auth-field{
    display:flex;
    flex-direction:column;
    gap:7px;
}

.auth-field label{
    font-size:12px;
    font-weight:800;
    color:var(--auth-ink);
}

.auth-field input,
.auth-form input[type="text"],
.auth-form input[type="tel"],
.auth-form input[type="password"],
.auth-form select{
    width:100%;
    min-height:50px;
    border:1px solid var(--auth-line);
    border-radius:16px;
    padding:0 15px;
    background:#fff;
    color:var(--auth-ink);
    font-family:inherit;
    font-size:14px;
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-field input:focus,
.auth-form input:focus,
.auth-form select:focus{
    border-color:var(--auth-brand);
    box-shadow:0 0 0 4px rgba(82,180,203,.16);
}

.auth-field input::placeholder{
    color:#9aadba;
}

.auth-field__hint,
.auth-helper,
.auth-note{
    color:var(--auth-muted);
    font-size:12px;
    line-height:1.8;
}

.auth-field__error{
    color:var(--auth-danger);
    font-size:12px;
    line-height:1.8;
}

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

.auth-visually-hidden{
    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;
}

.auth-password-wrap input,
.auth-password-wrap input[type="password"],
.auth-password-wrap input[type="text"]{
    padding-left:52px;
    padding-right:14px;
}

.auth-password-toggle{
    position:absolute;
    top:50%;
    left:8px;
    right:auto;
    width:38px;
    height:38px;
    min-width:38px;
    padding:0;
    border:1px solid rgba(82,180,203,.28);
    border-radius:13px;
    background:#f4fbfd;
    color:var(--auth-brand-dark);
    font-size:0;
    line-height:1;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    transform:translateY(-50%);
    transition:background .18s ease, border-color .18s ease, color .18s ease;
}

.auth-password-toggle:hover{
    background:#dff4f8;
    border-color:rgba(82,180,203,.48);
    color:#0f6f82;
}

.auth-password-toggle:focus-visible,
.auth-link:focus-visible,
.auth-card .btn:focus-visible{
    outline:0;
    box-shadow:0 0 0 4px rgba(82,180,203,.18);
}

.auth-password-toggle::before,
.auth-password-toggle::after{
    content:none;
}

.password-toggle-icon,
.password-toggle-icon svg{
    display:block;
    width:18px;
    height:18px;
    flex:0 0 18px;
}

.password-toggle-icon__eye-off{
    display:none !important;
}

.auth-password-toggle.is-visible .password-toggle-icon__eye{
    display:none !important;
}

.auth-password-toggle.is-visible .password-toggle-icon__eye-off{
    display:block !important;
}

button.auth-password-toggle,
button.auth-password-toggle:not(.secondary):not(.light):not(.danger){
    width:38px;
    height:38px;
    min-width:38px;
    min-height:38px;
    padding:0;
    background:#f4fbfd;
    color:var(--auth-brand-dark);
    border-color:rgba(82,180,203,.28);
    transform:translateY(-50%);
}

.auth-actions{
    display:flex;
    gap:9px;
    flex-wrap:wrap;
    align-items:center;
}

.auth-actions .btn,
.auth-card .btn{
    min-height:48px;
    padding:0 18px;
    border-radius:15px;
    font-size:14px;
    font-weight:850;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
}

.auth-card .btn[disabled]{
    cursor:not-allowed;
    opacity:.68;
}

.auth-step,
.auth-flow{
    display:none;
    flex-direction:column;
    gap:12px;
}

.auth-step.active,
.auth-flow.active{
    display:flex;
}

.auth-inline{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:10px;
    flex-wrap:wrap;
}

.auth-link{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    color:var(--auth-brand-dark);
    background:#f4fbfd;
    border:1px solid var(--auth-line);
    border-radius:14px;
    cursor:pointer;
    padding:0 14px;
    font-family:inherit;
    font-size:12px;
    font-weight:850;
    text-decoration:none;
}

.auth-link:hover{
    color:#074e60;
    background:#eaf8fb;
}

.auth-divider{
    border-top:1px solid var(--auth-line);
    margin-top:4px;
    padding-top:12px;
}

.auth-test-select{
    width:100%;
    min-height:46px;
    border:1px solid var(--auth-line);
    border-radius:14px;
    padding:0 12px;
    background:#fff;
    color:var(--auth-ink);
    font-family:inherit;
}

.alert{
    border:1px solid rgba(180,35,24,.18);
    border-radius:15px;
    padding:11px 13px;
    background:var(--auth-danger-soft);
    color:var(--auth-danger);
    font-size:13px;
    line-height:1.9;
}

.alert p{
    margin:0;
}

.alert.is-success{
    border-color:rgba(22,101,52,.18);
    background:var(--auth-success-soft);
    color:var(--auth-success);
}

.tab-row{
    display:flex;
    gap:8px;
    padding:5px;
    border:1px solid var(--auth-line);
    border-radius:16px;
    background:#f5fbfd;
}

.tab-btn{
    flex:1;
    min-height:40px;
    border:0;
    background:transparent;
    color:var(--auth-muted);
    padding:8px 12px;
    border-radius:12px;
    cursor:pointer;
    font-family:inherit;
    font-size:13px;
    font-weight:850;
}

.tab-btn.active{
    background:#fff;
    color:var(--auth-brand-dark);
    box-shadow:0 8px 24px rgba(18,49,59,.08);
}

.tab-panel{
    display:none;
}

.tab-panel.active{
    display:block;
}

.auth-otp-box{
    display:flex;
    flex-direction:column;
    gap:8px;
    padding:12px;
    border:1px solid var(--auth-line);
    border-radius:18px;
    background:#f8fdfe;
}

@media (max-width:960px){
    .auth-page{
        align-items:flex-start;
        padding:18px;
    }

    .auth-shell{
        grid-template-columns:1fr;
        gap:14px;
    }

    .auth-hero{
        min-height:auto;
        padding:20px;
        border-radius:20px;
    }

    .auth-hero ul{
        display:none;
    }

    .auth-hero p{
        display:none;
    }

    .auth-card{
        width:100%;
    }
}

@media (max-width:560px){
    html,
    body{
        width:100%;
        max-width:100%;
        overflow-x:hidden;
    }

    .auth-page{
        padding:0;
        background:#f7fcfd;
        overflow-x:hidden;
    }

    .auth-shell{
        width:100%;
        max-width:100%;
        min-height:100vh;
        gap:0;
        overflow-x:hidden;
    }

    .auth-hero{
        width:100%;
        max-width:100%;
        border-radius:0 0 24px 24px;
        box-shadow:none;
        border-inline:0;
        border-top:0;
    }

    .auth-hero h1{
        font-size:22px;
    }

    .auth-hero p{
        font-size:12px;
    }

    .auth-card{
        width:calc(100% - 20px);
        max-width:calc(100% - 20px);
        margin:-12px 10px 16px;
        padding:20px;
        border-radius:22px;
        box-shadow:0 18px 50px rgba(18,49,59,.1);
    }

    .auth-actions{
        flex-direction:column;
        align-items:stretch;
    }

    .auth-actions .btn,
    .auth-actions .auth-link{
        width:100%;
    }
}
