﻿:root {
    --bg0: #0b1220;
    --bg1: #0f172a;
    --card: rgba(11,18,32,.78);
    --card2: rgba(17,24,39,.82);
    --border: rgba(148,163,184,.22);
    --text: #e5e7eb;
    --muted: #9ca3af;
    --primary: #2563eb;
    --primary2: #0ea5e9;
    --danger: #ef4444;
    --shadow: 0 20px 60px rgba(0,0,0,.45);
    --radius: 18px;
    --ring: 0 0 0 4px rgba(37,99,235,.18);
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

.auth-body {
    margin: 0;
    font-family: ui-sans-serif,system-ui,-apple-system,"Segoe UI",Roboto,Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji";
    color: var(--text);
    background: radial-gradient(1200px 500px at 15% 10%, rgba(37,99,235,.22), transparent 60%), radial-gradient(900px 480px at 85% 20%, rgba(14,165,233,.18), transparent 55%), radial-gradient(700px 500px at 50% 95%, rgba(99,102,241,.12), transparent 55%), linear-gradient(180deg,var(--bg0),var(--bg1));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.auth-shell {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 22px;
    align-items: stretch;
}

.auth-brand {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 28px;
    background: linear-gradient(145deg, rgba(17,24,39,.85), rgba(11,18,32,.75));
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    min-height: 520px;
}

    .auth-brand::before {
        content: "";
        position: absolute;
        inset: -2px;
        background: radial-gradient(600px 220px at 20% 15%, rgba(37,99,235,.35), transparent 60%), radial-gradient(520px 220px at 80% 25%, rgba(14,165,233,.25), transparent 55%);
        filter: blur(10px);
        opacity: .9;
        pointer-events: none;
    }

.auth-brand-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
}

.auth-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    letter-spacing: .2px;
    font-size: 18px;
}

.auth-logo-badge {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: linear-gradient(135deg,var(--primary),var(--primary2));
    display: grid;
    place-items: center;
    box-shadow: 0 10px 25px rgba(37,99,235,.28);
}

    .auth-logo-badge svg {
        width: 22px;
        height: 22px
    }

.auth-brand-title {
    margin: 18px 0 8px;
    font-size: 30px;
    line-height: 1.08
}

.auth-brand-sub {
    margin: 0;
    color: var(--muted);
    max-width: 46ch;
    line-height: 1.6;
    font-size: 14px
}

.auth-chip {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(2,6,23,.18);
    color: rgba(226,232,240,.88);
    font-size: 12px;
    white-space: nowrap;
}

.auth-brand-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: rgba(156,163,175,.85);
    font-size: 12.5px;
    padding-top: 12px;
    border-top: 1px solid rgba(148,163,184,.14);
}

.auth-card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 22px 18px 22px;
    background: linear-gradient(160deg, rgba(17,24,39,.90), rgba(11,18,32,.82));
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

    .auth-card::after {
        content: "";
        position: absolute;
        inset: -1px;
        background: radial-gradient(480px 240px at 40% 0%, rgba(255,255,255,.06), transparent 60%);
        pointer-events: none;
    }

    .auth-card > * {
        position: relative;
        z-index: 1
    }

.auth-head {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.auth-head-ico {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: rgba(2,6,23,.26);
    border: 1px solid rgba(148,163,184,.18);
    display: grid;
    place-items: center;
}

    .auth-head-ico svg {
        width: 22px;
        height: 22px
    }

.auth-head h2 {
    margin: 0 0 6px;
    font-size: 22px;
    letter-spacing: .2px
}

.auth-head p {
    margin: 0;
    color: var(--muted);
    font-size: 13.5px;
    line-height: 1.5
}

.auth-alert {
    border: 1px solid rgba(239,68,68,.35);
    background: rgba(239,68,68,.10);
    color: #fecaca;
    padding: 10px 12px;
    border-radius: 14px;
    margin: 10px 0 12px;
    font-size: 13px;
}

.auth-ok {
    border: 1px solid rgba(34,197,94,.30);
    background: rgba(34,197,94,.10);
    color: rgba(187,247,208,.95);
    padding: 10px 12px;
    border-radius: 14px;
    margin: 10px 0 12px;
    font-size: 13px;
}

.auth-field {
    margin-top: 12px
}

.auth-label {
    margin-bottom: 6px;
    font-size: 13px;
    color: #cbd5e1
}

.auth-row {
    display: flex;
    gap: 10px;
    align-items: center
}

.auth-input {
    width: 100%;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(2,6,23,.30);
    color: var(--text);
    outline: none;
    transition: border .15s ease, box-shadow .15s ease, background .15s ease;
}

    .auth-input:focus {
        border-color: rgba(37,99,235,.65);
        box-shadow: var(--ring);
        background: rgba(2,6,23,.36)
    }

    .auth-input::placeholder {
        color: rgba(156,163,175,.7)
    }

    .auth-input[readonly] {
        opacity: .9
    }

.auth-icon-btn {
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(2,6,23,.30);
    color: #cbd5e1;
    border-radius: 14px;
    padding: 10px 12px;
    cursor: pointer;
}

    .auth-icon-btn:hover {
        border-color: rgba(148,163,184,.35)
    }

    .auth-icon-btn svg {
        width: 18px;
        height: 18px;
        display: block
    }

.auth-btn {
    margin-top: 14px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    border: 0;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: .2px;
    color: white;
    background: linear-gradient(135deg,var(--primary),var(--primary2));
    box-shadow: 0 12px 26px rgba(37,99,235,.26);
    transition: transform .06s ease, filter .15s ease, opacity .15s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

    .auth-btn:hover {
        filter: brightness(1.06)
    }

    .auth-btn:active {
        transform: translateY(1px)
    }

    .auth-btn[disabled] {
        opacity: .7;
        cursor: not-allowed;
        transform: none
    }

.auth-btn-outline {
    margin-top: 10px;
    width: 100%;
    padding: 11px 14px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.22);
    background: rgba(2,6,23,.25);
    color: #e5e7eb;
    font-weight: 800;
    cursor: pointer;
}

    .auth-btn-outline:hover {
        border-color: rgba(148,163,184,.35)
    }

.auth-spinner {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid rgba(255,255,255,.35);
    border-top-color: white;
    display: none;
    animation: authspin .8s linear infinite;
}

.auth-btn.is-loading .auth-spinner {
    display: inline-block
}

@keyframes authspin {
    to {
        transform: rotate(360deg)
    }
}

.auth-help {
    margin-top: 10px;
    color: rgba(156,163,175,.9);
    font-size: 12.5px;
    line-height: 1.45;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.auth-link {
    color: #93c5fd;
    text-decoration: none
}

    .auth-link:hover {
        text-decoration: underline
    }

.auth-box {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(148,163,184,.18);
    background: rgba(2,6,23,.22);
}

.auth-box-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px
}

.auth-box-title {
    font-size: 12.5px;
    color: rgba(226,232,240,.9);
    font-weight: 700
}

.auth-badge {
    font-size: 12px;
    color: rgba(156,163,175,.95)
}

.auth-bar {
    height: 10px;
    border-radius: 999px;
    background: rgba(148,163,184,.18);
    overflow: hidden;
}

    .auth-bar > span {
        display: block;
        height: 100%;
        background: linear-gradient(135deg,var(--primary),var(--primary2));
        width: 0%;
        transition: width .2s ease;
    }

.auth-req {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: rgba(156,163,175,.95);
    font-size: 12.5px;
    margin-top: 6px
}

    .auth-req.ok {
        color: rgba(187,247,208,.92)
    }

.auth-mark {
    width: 16px;
    flex: 0 0 auto;
    opacity: .9
}

.val {
    display: block;
    margin-top: 6px;
    color: #fca5a5;
    font-size: 12.5px;
}

/* Responsive */
@media (max-width:900px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 520px
    }

    .auth-brand {
        display: none
    }
}

@media (prefers-reduced-motion:reduce) {
    * {
        animation: none !important;
        transition: none !important
    }
}
