:root{
    --bg-a:#08111f;
    --bg-b:#0f1e39;
    --bg-c:#13284b;
    --card:#ffffff;
    --text:#141b2d;
    --muted:#697287;
    --line:rgba(18,25,45,.08);
    --primary:#00b0ff;
    --primary-2:#7c4dff;
    --ok:#16a34a;
    --danger:#ef4444;
    --glass:rgba(255,255,255,.88);
    --shadow:0 22px 60px rgba(0,0,0,.26);
    --shadow-soft:0 12px 28px rgba(20,36,72,.14);
}

*{box-sizing:border-box}
html,body{margin:0;padding:0}
body.auth-page{
    min-height:100vh;
    font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
    color:var(--text);
    background:
        radial-gradient(circle at 12% 18%, rgba(0,176,255,.18), transparent 24%),
        radial-gradient(circle at 86% 14%, rgba(124,77,255,.18), transparent 24%),
        radial-gradient(circle at 76% 82%, rgba(255,255,255,.08), transparent 18%),
        linear-gradient(140deg, var(--bg-a), var(--bg-b) 48%, var(--bg-c));
}

.auth-shell{
    min-height:100vh;
    display:grid;
    grid-template-columns:1fr 1.1fr;
    overflow:hidden;
}

.auth-hero,
.auth-hero--register{
    position:relative;
    background:
        radial-gradient(circle at 35% 24%, rgba(255,255,255,.16), transparent 18%),
        radial-gradient(circle at 74% 38%, rgba(0,176,255,.24), transparent 18%),
        linear-gradient(160deg, rgba(255,255,255,.05), rgba(255,255,255,.015));
}
.auth-hero--register::before,
.auth-hero--register::after{
    content:"";
    position:absolute;
    border-radius:34px;
    border:1px solid rgba(255,255,255,.14);
    box-shadow:inset 0 1px 0 rgba(255,255,255,.3), 0 28px 50px rgba(0,0,0,.16);
}
.auth-hero--register::before{
    width:360px;height:240px;left:10%;top:16%;
    background:linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.02));
    transform:rotate(-8deg);
}
.auth-hero--register::after{
    width:280px;height:280px;right:10%;bottom:12%;
    background:linear-gradient(135deg, rgba(0,176,255,.22), rgba(124,77,255,.14));
    transform:rotate(10deg);
}

.auth-card{
    align-self:center;
    justify-self:center;
    width:min(760px, calc(100% - 34px));
    padding:34px 30px 28px;
    background:var(--glass);
    backdrop-filter:blur(18px);
    border:1px solid rgba(255,255,255,.42);
    border-radius:30px;
    box-shadow:inset 0 1px 0 rgba(255,255,255,.78), var(--shadow);
    position:relative;
}
.auth-card--wide{width:min(840px, calc(100% - 34px))}
.auth-card::before{
    content:"";
    position:absolute;
    inset:0;
    border-radius:inherit;
    padding:1px;
    background:linear-gradient(135deg, rgba(255,255,255,.92), rgba(0,176,255,.16), rgba(124,77,255,.16));
    -webkit-mask:linear-gradient(#fff 0 0) content-box,linear-gradient(#fff 0 0);
    -webkit-mask-composite:xor;
            mask-composite:exclude;
    pointer-events:none;
}

.auth-logo{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    min-height:42px;
    padding:0 14px;
    border-radius:999px;
    background:linear-gradient(135deg, #0d1734, #1f4fd1);
    color:#fff;
    box-shadow:0 12px 24px rgba(31,79,209,.28);
    font-weight:800;
    font-size:13px;
    letter-spacing:.08em;
}

.auth-card h1{
    margin:18px 0 10px;
    font-size:36px;
    line-height:1.05;
    letter-spacing:-.03em;
}
.auth-sub{
    margin:0 0 22px;
    color:var(--muted);
    font-size:14px;
    line-height:1.7;
}

.alert{
    padding:13px 14px;
    border-radius:15px;
    margin:0 0 14px;
    font-size:14px;
    line-height:1.6;
    box-shadow:var(--shadow-soft);
    border:1px solid transparent;
}
.alert--error{background:rgba(239,68,68,.09); color:#991b1b; border-color:rgba(239,68,68,.16)}
.alert--success{background:rgba(22,163,74,.09); color:#166534; border-color:rgba(22,163,74,.16)}

.auth-form{display:grid; gap:14px}
.auth-form--grid{
    grid-template-columns:repeat(2, minmax(0, 1fr));
    gap:14px;
}
.auth-form label{
    display:block;
    margin:0 0 8px;
    font-size:13px;
    font-weight:700;
    color:#25304a;
}
.auth-form input{
    width:100%;
    min-height:54px;
    padding:0 16px;
    border-radius:16px;
    border:1px solid rgba(18,25,45,.10);
    background:#fff;
    color:var(--text);
    font-size:15px;
    outline:none;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.8),
        0 8px 20px rgba(15,23,42,.05);
    transition:border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.auth-form input::placeholder{color:#9aa3b6}
.auth-form input:focus{
    border-color:rgba(0,176,255,.5);
    box-shadow:
        0 0 0 4px rgba(0,176,255,.12),
        0 14px 28px rgba(36,62,126,.12);
    transform:translateY(-1px);
}

.auth-form__full{grid-column:1 / -1}

.auth-btn{
    width:100%;
    min-height:56px;
    border:none;
    border-radius:18px;
    background:linear-gradient(135deg, var(--primary), var(--primary-2));
    color:#fff;
    font-size:15px;
    font-weight:800;
    letter-spacing:.01em;
    cursor:pointer;
    box-shadow:
        0 18px 30px rgba(0,176,255,.24),
        inset 0 1px 0 rgba(255,255,255,.28);
    transition:transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.auth-btn:hover{
    transform:translateY(-2px);
    box-shadow:0 22px 36px rgba(0,176,255,.28), inset 0 1px 0 rgba(255,255,255,.28);
    filter:saturate(1.05);
}
.auth-btn:active{transform:translateY(0)}

.auth-links{
    display:flex;
    flex-wrap:wrap;
    gap:10px 14px;
    margin-top:18px;
}
.auth-links a{
    color:#2454d4;
    text-decoration:none;
    font-size:14px;
    font-weight:700;
}
.auth-links a:hover{text-decoration:underline}

@media (max-width: 1080px){
    .auth-shell{grid-template-columns:1fr}
    .auth-hero,.auth-hero--register{display:none}
    .auth-card,.auth-card--wide{margin:24px 0}
}
@media (max-width: 720px){
    .auth-card,.auth-card--wide{
        width:min(100% - 18px, 840px);
        padding:24px 14px 18px;
        border-radius:22px;
    }
    .auth-card h1{font-size:28px}
    .auth-sub{font-size:13px}
    .auth-form--grid{grid-template-columns:1fr}
    .auth-form input{min-height:50px;border-radius:14px}
    .auth-btn{min-height:52px;border-radius:16px}
    .auth-links{flex-direction:column;gap:8px}
}