.shell {
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr;
}

.brand-panel {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.brand-panel::after {
    content: "X";
    position: absolute;
    z-index: -1;
    right: -20px;
    bottom: -68px;
    font-size: clamp(180px,25vw,340px);
    font-weight: 900;
    line-height: 1;
    letter-spacing: -.1em;
    color: rgba(36,91,255,.07);
    pointer-events: none;
}

.back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 12px;
    font-weight: 800;
    font-size: 12px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-sm);
    transition: background var(--t) var(--ease),transform var(--t) var(--ease),box-shadow var(--t) var(--ease);
}

.back:hover {
    background: var(--blue-soft);
    transform: translate(-1px,-1px);
    box-shadow: var(--shadow-sm);
}

.back:active {
    transform: translate(2px,2px);
    box-shadow: var(--shadow-xs);
}

.back .icon {
    width: 15px;
    height: 15px;
    transition: transform var(--t) var(--ease);
}

.back:hover .icon {
    transform: translateX(-3px);
}

.brand-body {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.brand-body .eyebrow,
.brand-text,
.brand-foot,
.brand-stats,
.brand-bottom {
    display: none;
}

.brand-body h1 {
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.06em;
    white-space: nowrap;
}

.title-period {
    color: var(--blue);
}

.form-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 28px;
    min-width: 0;
}

.form-topline {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    max-width: 470px;
    margin: 0 0 14px;
    color: var(--muted-2);
    font: 700 10px/1.2 'JetBrains Mono',monospace;
    letter-spacing: .12em;
}

.live-dot {
    width: 8px;
    height: 8px;
    border: 1px solid var(--line);
    background: #36D17C;
    box-shadow: var(--shadow-xs);
}

.topline-code {
    margin-left: auto;
    color: var(--blue);
}

.auth-card {
    width: 100%;
    max-width: 470px;
    padding: 24px 20px;
    box-shadow: var(--sh-2);
    animation: cardIn 320ms var(--ease) both;
}

@keyframes cardIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.card-head {
    margin-bottom: 22px;
}

.section-index {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
    font: 700 10px/1.3 'JetBrains Mono',monospace;
    letter-spacing: .1em;
    color: var(--muted-2);
}

.index-number {
    padding: 4px 6px;
    background: var(--blue-soft);
    color: var(--blue-deep);
    border: 1px solid var(--blue);
}

.card-head h2 {
    font-size: clamp(27px,6vw,36px);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -.06em;
}

.card-head p {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.65;
    color: var(--muted-2);
}

.card-head b {
    color: var(--ink);
    overflow-wrap: anywhere;
}

.field {
    display: grid;
    gap: 7px;
    margin-bottom: 17px;
    min-width: 0;
    animation: fieldIn 210ms var(--ease) both;
}

@keyframes fieldIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

.field-hint {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.45;
}

input {
    height: 47px;
}

.input-wrap {
    position: relative;
}

.input-wrap input {
    padding-right: 52px;
}

.toggle {
    position: absolute;
    top: 5px;
    right: 5px;
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    color: var(--muted-2);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: background var(--t) var(--ease),color var(--t) var(--ease),border-color var(--t) var(--ease);
}

.toggle:hover {
    background: var(--blue-soft);
    border-color: var(--ink);
    color: var(--blue-deep);
}

.error {
    min-height: 0;
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--err);
}

.error:not(:empty) {
    padding: 10px 12px;
    background: #FFF0EF;
    border: 2px solid var(--err);
    box-shadow: 0 0 0 3px rgba(180,35,24,.18);
    animation: errorIn 220ms var(--ease);
}

@keyframes errorIn {
    0% {
        opacity: 0;
        transform: translateX(-4px);
    }
    100% {
        opacity: 1;
        transform: none;
    }
}

.notice {
    margin-bottom: 18px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.5;
    font-weight: 650;
    background: var(--blue-soft);
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-sm);
}

.auth-card .btn {
    position: relative;
    width: 100%;
    min-height: 48px;
}

#login-form .submit-btn {
    justify-content: center;
    margin-top: 2px;
}

.submit-btn .submit-arrow {
    position: absolute;
    right: 14px;
    width: 17px;
    height: 17px;
    transition: transform var(--t) var(--ease);
}

.submit-btn:hover .submit-arrow {
    transform: translate(2px,-2px);
}

.btn.loading {
    pointer-events: none;
    opacity: .85;
}

.btn.loading .btn-label {
    opacity: .9;
}

.btn.loading .submit-arrow {
    display: none;
}

.spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.btn.loading .spinner {
    display: block;
}

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

.auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 20px 0 12px;
    color: #737D8D;
    font: 700 10px/1 'JetBrains Mono',monospace;
    letter-spacing: .12em;
}

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

.switch-btn {
    margin-top: 0;
    background: #fff!important;
    color: var(--ink)!important;
}

.switch-btn:hover {
    background: var(--blue-soft)!important;
}

.privacy-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 18px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.privacy-note .icon {
    width: 13px;
    height: 13px;
    color: var(--blue);
}

.ok-mark {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 18px;
    background: var(--blue);
    color: #fff;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    animation: pop 280ms var(--ease) both;
}

.ok-mark .icon {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

@keyframes pop {
    from {
        transform: scale(.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.links {
    display: grid;
    gap: 12px;
}

.links .btn {
    justify-content: flex-start;
}

.links .btn .action-tail {
    margin-left: auto;
}

.shimmer {
    display: block;
    height: 20px;
    margin-bottom: 14px;
    border: 1px solid var(--line);
}

.s1 {
    width: 40%;
    height: 28px;
}

.s2 {
    width: 100%;
    height: 46px;
}

.s3 {
    width: 100%;
    height: 46px;
    margin-bottom: 0;
}

.form-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    max-width: 470px;
    margin-top: 26px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    font: 700 9px/1.5 'JetBrains Mono',monospace;
    letter-spacing: .08em;
    color: var(--muted);
}

.form-footer a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--ink);
    transition: color var(--t) var(--ease);
}

.form-footer a:hover {
    color: var(--blue);
}

.form-footer .icon {
    width: 12px;
    height: 12px;
}

@media (min-width: 820px) {
    .shell {
        grid-template-columns: minmax(300px,.88fr) minmax(480px,1.12fr);
        grid-template-rows: 1fr;
        min-height: 100vh;
    }
    .brand-panel {
        flex-direction: column;
        align-items: stretch;
        justify-content: space-between;
        min-height: 100vh;
        padding: 28px clamp(24px,4vw,54px);
        color: #fff;
        background: var(--blue);
        border: 0;
        border-right: 1px solid var(--line);
    }
    .brand-panel::before {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0;
        background-image: linear-gradient(rgba(255,255,255,.1) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.1) 1px,transparent 1px);
        background-size: 28px 28px;
        mask-image: linear-gradient(135deg,#000,transparent 80%);
    }
    .brand-panel::after {
        right: -44px;
        bottom: 24px;
        color: rgba(255,255,255,.1);
        font-size: clamp(240px,29vw,430px);
    }
    .back {
        align-self: flex-start;
        background: transparent;
        color: #fff;
        border-color: #fff;
        box-shadow: var(--shadow-sm);
    }
    .back:hover {
        background: rgba(255,255,255,.14);
        box-shadow: var(--shadow-sm);
    }
    .brand-body {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        position: relative;
        z-index: 1;
    }
    .brand-mark {
        width: 62px;
        height: 62px;
        font-size: 30px;
        background: #fff;
        color: var(--blue);
        border-color: #fff;
        box-shadow: var(--shadow-md);
    }
    .brand-body .eyebrow {
        display: inline-flex;
        margin-top: 35px;
        background: rgba(255,255,255,.12);
        border-color: rgba(255,255,255,.7);
        color: #fff;
    }
    .eyebrow-dot {
        display: inline-block;
        width: 7px;
        height: 7px;
        background: #7BFFB1;
        border: 1px solid var(--line);
    }
    .brand-body h1 {
        margin-top: 20px;
        font-size: clamp(58px,7vw,100px);
        line-height: .92;
        letter-spacing: -.09em;
        color: #fff;
    }
    .title-period {
        color: #A8FFCE;
    }
    .brand-text {
        display: block;
        margin-top: 22px;
        max-width: 31ch;
        font-size: 16px;
        line-height: 1.75;
        color: rgba(255,255,255,.88);
    }
    .brand-stats {
        display: grid;
        grid-template-columns: 1fr;
        gap: 0;
        width: min(100%,340px);
        margin-top: 34px;
        border-top: 1px solid rgba(255,255,255,.5);
    }
    .brand-stats>div {
        display: flex;
        align-items: center;
        gap: 14px;
        padding: 11px 0;
        border-bottom: 1px solid rgba(255,255,255,.35);
    }
    .brand-stats strong {
        font: 700 11px 'JetBrains Mono',monospace;
        color: #A8FFCE;
    }
    .brand-stats span {
        font-size: 12px;
        font-weight: 650;
        color: #fff;
    }
    .brand-bottom {
        display: block;
        position: relative;
        z-index: 1;
        margin-top: 30px;
    }
    .brand-marquee {
        overflow: hidden;
        padding: 11px 0;
        border-top: 1px solid rgba(255,255,255,.45);
        border-bottom: 1px solid rgba(255,255,255,.45);
        font: 700 10px 'JetBrains Mono',monospace;
        letter-spacing: .13em;
        color: rgba(255,255,255,.92);
        white-space: nowrap;
    }
    .marquee-track {
        display: flex;
        width: max-content;
        animation: marquee 22s linear infinite;
    }
    .marquee-track span {
        padding-right: 24px;
    }
    @keyframes marquee {
        to {
            transform: translateX(-50%);
        }
    }
    .brand-foot {
        display: block;
        margin-top: 15px;
        font-size: 11px;
        color: rgba(255,255,255,.75);
    }
    .brand-foot span {
        margin: 0 5px;
        color: #A8FFCE;
    }
    .form-panel {
        justify-content: center;
        padding: 42px clamp(24px,4vw,64px);
    }
    .form-topline {
        max-width: 470px;
        margin-bottom: 16px;
    }
    .auth-card {
        padding: 34px;
        max-width: 470px;
    }
    .card-head {
        margin-bottom: 26px;
    }
}

@media (max-width: 360px) {
    .brand-body h1 {
        font-size: 17px;
    }
    .back {
        padding: 0 9px;
    }
    .auth-card {
        padding: 20px 16px;
    }
    .card-head h2 {
        font-size: 27px;
    }
    .form-footer {
        font-size: 8px;
    }
}

/* Cloudflare Turnstile */
.captcha-field {
    display: grid;
    gap: 8px;
    margin-bottom: 17px;
    min-width: 0;
}

.captcha-widget {
    min-height: 65px;
    max-width: 100%;
    overflow: hidden;
}

.captcha-widget:empty {
    min-height: 0;
}

.captcha-note {
    margin: 0;
    font-size: 11px;
    line-height: 1.45;
    color: var(--muted);
}

.captcha-note.is-error {
    color: var(--err);
    font-weight: 700;
}

.captcha-note:empty {
    display: none;
}

.captcha-retry {
    justify-self: start;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--surface);
    color: var(--ink);
    font: 750 12px 'Inter', sans-serif;
    cursor: pointer;
}

.captcha-retry:hover {
    background: var(--blue-soft);
}

@media (prefers-reduced-motion: reduce) {
    .marquee-track,
    .field {
        animation: none;
    }
}


/* ---------- XzsnyC professional auth polish ---------- */
.form-panel {
    background:
        radial-gradient(circle at 100% 0%, rgba(36,91,255,.07), transparent 34%),
        linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,248,252,.98));
}

.auth-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(203,213,225,.82);
    border-radius: 20px;
    box-shadow: 0 22px 55px rgba(15,23,42,.10), 0 3px 12px rgba(15,23,42,.05);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: linear-gradient(90deg, var(--blue), #5d7fff, var(--blue));
}

.card-head h2 {
    color: var(--ink);
    letter-spacing: -.055em;
}

.card-head p {
    max-width: 43ch;
}

.field label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: -.01em;
}

.field input {
    height: 52px;
    border-radius: 11px;
    background: #fbfcfe;
    border-color: #d6dee9;
    box-shadow: inset 0 1px 1px rgba(15,23,42,.02);
}

.field input:hover {
    border-color: #aebbd0;
    background: #fff;
}

.field input:focus {
    background: #fff;
}

.toggle {
    top: 7px;
    right: 7px;
    width: 38px;
    height: 38px;
    border-radius: 10px;
}

#login-form .submit-btn {
    min-height: 52px;
    border-radius: 11px;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 10px 22px -12px rgba(36,91,255,.85);
}

.switch-btn {
    min-height: 50px !important;
    border-radius: 11px !important;
    border-color: #d6dee9 !important;
    font-weight: 750 !important;
}

.auth-divider {
    margin: 22px 0 13px;
}

.privacy-note {
    margin-bottom: 2px;
}

@media (max-width: 819px) {
    .brand-panel {
        min-height: 76px;
        padding: 14px 20px;
        background: rgba(255,255,255,.96);
        backdrop-filter: blur(12px);
    }

    .brand-panel::after {
        right: -12px;
        bottom: -82px;
        font-size: 230px;
        color: rgba(36,91,255,.055);
    }

    .brand-body h1 {
        font-size: 20px;
        letter-spacing: -.07em;
    }

    .back {
        min-height: 42px;
        padding-inline: 13px;
        border-radius: 10px;
    }

    .form-panel {
        padding: 25px 16px 32px;
    }

    .form-topline {
        margin-bottom: 12px;
    }

    .auth-card {
        max-width: 520px;
        padding: 27px 22px 23px;
        border-radius: 20px;
    }

    .card-head {
        margin-bottom: 24px;
    }

    .card-head h2 {
        font-size: clamp(29px, 8vw, 37px);
    }

    .card-head p {
        font-size: 13px;
        line-height: 1.7;
    }
}

@media (max-width: 390px) {
    .brand-panel {
        padding-inline: 14px;
    }

    .auth-card {
        padding-inline: 18px;
        border-radius: 18px;
    }

    .card-head h2 {
        font-size: 29px;
    }
}
