/* ==========================================================================
   登录页：左侧品牌版 + 右侧登录卡
   ========================================================================== */

body.login {
    background: var(--sb-bg) !important;
}

body .sb-auth {
    display: grid;
    grid-template-columns: minmax(400px, 42%) 1fr;
    min-height: 100vh;
}

/* ---- 左侧品牌版 ---- */
body .sb-auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 52px 48px;
    color: #fff;
    background:
        radial-gradient(620px 380px at 110% -10%, rgba(255, 220, 180, .32), transparent 62%),
        linear-gradient(152deg, #ffa552 0%, #f97316 46%, #c2410c 100%);
}

body .sb-auth-brand::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        url("../img/login-art.svg"),
        radial-gradient(rgba(255, 255, 255, .16) 1px, transparent 1px);
    background-size: 640px auto, 24px 24px;
    background-position: right -70px bottom -60px, 0 0;
    background-repeat: no-repeat, repeat;
    pointer-events: none;
}

body .sb-auth-brand::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(120, 40, 0, 0) 42%, rgba(96, 30, 0, .38) 100%);
    pointer-events: none;
}

body .sb-auth-glow {
    position: absolute;
    z-index: 1;
    border-radius: 999px;
    pointer-events: none;
    filter: blur(2px);
}

body .sb-auth-glow--a {
    width: 320px;
    height: 320px;
    right: -90px;
    bottom: -110px;
    background: radial-gradient(circle at center, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 68%);
}

body .sb-auth-glow--b {
    width: 260px;
    height: 260px;
    left: -120px;
    top: 12%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 70%);
}

body .sb-auth-watermark {
    position: absolute;
    top: -34px;
    right: -46px;
    width: 280px;
    height: 280px;
    z-index: 1;
    opacity: .13;
    transform: rotate(-8deg);
    pointer-events: none;
}

body .sb-auth-watermark img {
    width: 100%;
    height: 100%;
    filter: grayscale(1) brightness(2.4) blur(1px);
}

body .sb-auth-brand-inner {
    position: relative;
    z-index: 2;
}

body .sb-auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 68px;
    height: 68px;
    margin-bottom: 26px;
    border-radius: 20px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .32);
    box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .55);
    backdrop-filter: blur(6px);
}

body .sb-auth-logo img {
    width: 42px;
    height: 42px;
}

body .sb-auth-brand h1 {
    margin: 0;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: -.01em;
    line-height: 1.1;
    color: #fff;
}

body .sb-auth-tagline {
    margin: 10px 0 0;
    font-size: 13px;
    letter-spacing: .18em;
    color: rgba(255, 255, 255, .82);
}

body .sb-auth-flow {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 352px;
    margin-top: 34px;
    padding: 16px 16px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .13);
    border: 1px solid rgba(255, 255, 255, .26);
    box-shadow: 0 22px 44px -32px rgba(60, 20, 0, .65), 0 1px 0 rgba(255, 255, 255, .22) inset;
    backdrop-filter: blur(9px);
}

body .sb-auth-flow-head {
    margin: 0 0 12px;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .14em;
    color: rgba(255, 255, 255, .72);
}

body .sb-auth-flow ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

body .sb-auth-flow li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 9px 0;
    border-top: 1px solid rgba(255, 255, 255, .12);
}

body .sb-auth-flow li:first-child {
    border-top: 0;
    padding-top: 2px;
}

body .sb-auth-flow li:last-child {
    padding-bottom: 2px;
}

body .sb-auth-flow li .material-symbols-outlined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .24);
}

body .sb-auth-flow b {
    display: block;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.35;
}

body .sb-auth-flow small {
    display: block;
    margin-top: 2px;
    font-size: 11.5px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .76);
}

body .sb-auth-brand-foot {
    position: relative;
    z-index: 2;
    font-size: 12px;
    letter-spacing: .06em;
    color: rgba(255, 255, 255, .68);
}

/* ---- 右侧登录区 ---- */
body .sb-auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    background-image:
        radial-gradient(760px 420px at 88% -12%, rgba(255, 117, 23, .09), transparent 62%),
        radial-gradient(620px 380px at 4% 106%, rgba(59, 130, 246, .06), transparent 60%);
}

body .sb-auth-card {
    width: 100%;
    max-width: 372px;
}

body .sb-auth-mini {
    display: none;
    align-items: center;
    gap: 10px;
    margin-bottom: 26px;
    font-size: 17px;
    font-weight: 700;
    color: var(--sb-text);
}

body .sb-auth-mini img {
    width: 34px;
    height: 34px;
}

body .sb-auth-head h2 {
    margin: 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.01em;
    color: var(--sb-text);
}

body .sb-auth-head p {
    margin: 8px 0 26px;
    font-size: 13px;
    color: var(--sb-muted);
}

body .sb-auth-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--sb-muted);
}

body .sb-auth-form input[type="text"],
body .sb-auth-form input[type="password"],
body .sb-auth-form input[type="email"] {
    width: 100%;
    height: 44px;
    padding: 0 13px;
    border-radius: 10px;
    border: 1px solid var(--sb-border);
    background: var(--sb-surface-2);
    color: var(--sb-text);
    font-size: 14px;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

body .sb-auth-form input:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px rgba(255, 117, 23, .16);
    background: var(--sb-surface);
}

body .sb-auth-form .form-row {
    margin-bottom: 16px;
}

body .sb-auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    margin-top: 22px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    font-size: 14.5px;
    font-weight: 650;
    letter-spacing: .02em;
    color: #fff;
    background-image: linear-gradient(135deg, #ff9d4f 0%, #f97316 48%, #ea580c 100%);
    box-shadow: 0 12px 26px -16px rgba(249, 115, 22, .95), 0 1px 0 rgba(255, 255, 255, .2) inset;
    transition: transform .14s ease, box-shadow .14s ease, filter .14s ease;
}

body .sb-auth-submit:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

body .sb-auth-submit:active {
    transform: translateY(0);
}

body .sb-auth-submit .material-symbols-outlined {
    font-size: 18px;
}

body .sb-auth-reset {
    margin: 18px 0 0;
    text-align: center;
    font-size: 12.5px;
}

body .sb-auth-reset a {
    color: var(--sb-muted);
    text-decoration: none;
}

body .sb-auth-reset a:hover {
    color: var(--color-primary-600);
}

body .sb-auth-foot {
    margin: 34px 0 0;
    text-align: center;
    font-size: 11.5px;
    letter-spacing: .04em;
    color: var(--sb-muted);
    opacity: .8;
}

@media (max-height: 800px) {
    body .sb-auth-brand {
        padding: 34px 36px;
    }

    body .sb-auth-logo {
        width: 56px;
        height: 56px;
        margin-bottom: 18px;
        border-radius: 16px;
    }

    body .sb-auth-logo img {
        width: 34px;
        height: 34px;
    }

    body .sb-auth-brand h1 {
        font-size: 32px;
    }

    body .sb-auth-tagline {
        margin-top: 8px;
    }

    body .sb-auth-flow {
        margin-top: 22px;
        padding: 12px 14px 8px;
    }

    body .sb-auth-flow li {
        padding: 7px 0;
    }
}

@media (max-height: 620px) {
    body .sb-auth-flow {
        display: none;
    }
}

/* ---- 窄屏：隐藏品牌版 ---- */
@media (max-width: 900px) {
    body .sb-auth {
        grid-template-columns: 1fr;
    }

    body .sb-auth-brand {
        display: none;
    }

    body .sb-auth-mini {
        display: flex;
    }

    body .sb-auth-main {
        min-height: 100vh;
    }
}

/* ==========================================================================
   退出登录确认框
   ========================================================================== */

.sb-logout-mask {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(6, 10, 16, .55);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity .16s ease;
}

.sb-logout-mask.is-open {
    opacity: 1;
}

.sb-logout-dialog {
    width: 100%;
    max-width: 340px;
    padding: 22px 22px 18px;
    border-radius: 16px;
    border: 1px solid var(--sb-border);
    background: var(--sb-surface);
    box-shadow: 0 40px 80px -32px rgba(0, 0, 0, .55);
    transform: translateY(6px) scale(.98);
    transition: transform .18s ease;
}

.sb-logout-mask.is-open .sb-logout-dialog {
    transform: translateY(0) scale(1);
}

.sb-logout-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    margin-bottom: 12px;
    border-radius: 11px;
    font-size: 20px;
    color: var(--color-primary-600);
    background: rgba(255, 117, 23, .12);
}

.sb-logout-dialog h2 {
    margin: 0;
    font-size: 16.5px;
    font-weight: 700;
    color: var(--sb-text);
}

.sb-logout-dialog p {
    margin: 6px 0 0;
    font-size: 13px;
    color: var(--sb-muted);
}

.sb-logout-actions {
    display: flex;
    justify-content: flex-end;
    gap: 8px;
    margin-top: 20px;
}

.sb-logout-btn {
    height: 34px;
    padding: 0 14px;
    border-radius: 9px;
    border: 1px solid var(--sb-border);
    background: var(--sb-surface-2);
    color: var(--sb-text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color .15s ease, background-color .15s ease;
}

.sb-logout-btn:hover {
    border-color: var(--sb-border-strong);
}

.sb-logout-btn.is-primary {
    border-color: transparent;
    color: #fff;
    background-image: linear-gradient(135deg, #ff9d4f, #f97316 55%, #ea580c);
}

.sb-logout-btn.is-primary:hover {
    filter: brightness(1.05);
}
