:root {
    --auth-bg: #f5efe8;
    --auth-card: #fffdfb;
    --auth-ink: #30271f;
    --auth-muted: #8e8176;
    --auth-line: #e8ddd2;
    --auth-primary: #805233;
    --auth-primary-dark: #5c3821;
    --auth-soft: #f7eee5;
    --auth-success: #548065;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-width: 320px;
    min-height: 100%;
    margin: 0;
}

body.auth-storefront {
    min-height: 100vh;
    background:
        radial-gradient(circle at 8% 5%, rgba(210, 151, 88, .16), transparent 24%),
        radial-gradient(circle at 94% 94%, rgba(128, 82, 51, .1), transparent 24%),
        linear-gradient(145deg, #f9f5f0 0%, var(--auth-bg) 100%);
    color: var(--auth-ink);
    font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
a {
    -webkit-tap-highlight-color: transparent;
}

.auth-page {
    display: grid;
    min-height: 100vh;
    padding: 36px 18px;
    place-items: center;
}

.auth-shell {
    display: grid;
    overflow: hidden;
    width: min(100%, 960px);
    min-height: 620px;
    grid-template-columns: minmax(0, 1.04fr) minmax(390px, .96fr);
    border: 1px solid rgba(130, 91, 58, .12);
    border-radius: 26px;
    background: var(--auth-card);
    box-shadow: 0 28px 75px rgba(63, 42, 27, .15);
}

.auth-brand {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px;
    background:
        radial-gradient(circle at 85% 14%, rgba(231, 188, 137, .19), transparent 28%),
        linear-gradient(145deg, #302117 0%, #553823 58%, #704a2f 100%);
    color: #fff;
}

.auth-brand::before,
.auth-brand::after {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.auth-brand::before {
    right: -120px;
    bottom: -105px;
    width: 360px;
    height: 360px;
}

.auth-brand::after {
    right: -54px;
    bottom: -38px;
    width: 220px;
    height: 220px;
}

.auth-brand__home,
.auth-brand__content,
.auth-brand__footer {
    position: relative;
    z-index: 1;
}

.auth-brand__home {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    gap: 12px;
    padding: 6px 8px 6px 6px;
    border-radius: 15px;
    color: #fff;
    text-decoration: none;
    transition: background .2s ease, transform .2s ease;
}

.auth-brand__home:hover {
    background: rgba(255, 255, 255, .06);
    color: #fff;
    transform: translateY(-1px);
}

.auth-brand__logo {
    display: grid;
    overflow: hidden;
    width: 48px;
    height: 48px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .48);
    border-radius: 15px;
    background: linear-gradient(145deg, #fff, #f3e7db);
    box-shadow:
        0 8px 20px rgba(26, 17, 11, .2),
        inset 0 1px 0 rgba(255, 255, 255, .9);
}

.auth-brand__logo img {
    display: block;
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.auth-brand__name {
    min-width: 0;
}

.auth-brand__name strong {
    display: block;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.auth-brand__name span {
    display: block;
    margin-top: 3px;
    color: rgba(255, 255, 255, .55);
    font-size: 8px;
    letter-spacing: 1.7px;
    line-height: 1.2;
}

.auth-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 15px;
    color: #dcb992;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 1.8px;
}

.auth-brand h1 {
    max-width: 420px;
    margin: 0;
    color: #fff;
    font-family: "Songti SC", "STSong", serif;
    font-size: 35px;
    font-weight: 600;
    line-height: 1.42;
}

.auth-brand__lead {
    max-width: 410px;
    margin: 15px 0 0;
    color: rgba(255, 255, 255, .62);
    font-size: 12px;
    line-height: 1.9;
}

.auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    margin-top: 27px;
}

.auth-benefit {
    padding: 12px 10px;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 12px;
    background: rgba(255, 255, 255, .055);
    color: rgba(255, 255, 255, .65);
    font-size: 9px;
    line-height: 1.5;
}

.auth-benefit i {
    display: block;
    margin-bottom: 6px;
    color: #d8b58f;
    font-size: 16px;
}

.auth-brand__footer {
    display: flex;
    align-items: center;
    gap: 7px;
    color: rgba(255, 255, 255, .44);
    font-size: 9px;
}

.auth-panel {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    padding: 48px 52px;
    background:
        radial-gradient(circle at 100% 0, rgba(213, 169, 120, .08), transparent 28%),
        var(--auth-card);
}

.auth-mobile-home {
    display: none;
}

.auth-panel__heading {
    margin-bottom: 28px;
}

.auth-panel__heading span {
    display: block;
    margin-bottom: 7px;
    color: #a17a59;
    font-size: 10px;
    font-weight: 650;
    letter-spacing: 1.4px;
}

.auth-panel__heading h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.4;
}

.auth-panel__heading p {
    margin: 7px 0 0;
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 19px;
}

.auth-field {
    margin: 0;
}

.auth-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    color: #4b3f35;
    font-size: 11px;
    font-weight: 650;
}

.auth-label small {
    color: #aa9d92;
    font-size: 9px;
    font-weight: 400;
}

.auth-input-wrap {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 15px;
    width: 19px;
    color: #a58e7b;
    transform: translateY(-50%);
}

.auth-input {
    display: block;
    width: 100%;
    height: 50px;
    padding: 0 44px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    outline: 0;
    background: #fff;
    color: var(--auth-ink);
    font-family: inherit;
    font-size: 12px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.auth-input::placeholder {
    color: #b8aca2;
}

.auth-input:hover {
    border-color: #cfb9a6;
}

.auth-input:focus {
    border-color: #9d7252;
    background: #fffdfb;
    box-shadow: 0 0 0 3px rgba(128, 82, 51, .09);
}

.auth-password-toggle {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: 10px;
    display: grid;
    width: 32px;
    height: 32px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    outline: 0;
    background: transparent;
    color: #9d8d81;
    cursor: pointer;
    transform: translateY(-50%);
}

.auth-password-toggle:hover,
.auth-password-toggle:focus {
    background: var(--auth-soft);
    color: var(--auth-primary);
}

.auth-options {
    display: flex;
    min-height: 20px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #796d63;
    font-size: 10px;
    cursor: pointer;
}

.auth-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--auth-primary);
}

.auth-check a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

.auth-submit {
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
    justify-content: center;
    gap: 7px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--auth-primary), #684127);
    color: #fff;
    font-family: inherit;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    box-shadow: 0 10px 23px rgba(112, 70, 41, .21);
    transition: box-shadow .2s ease, transform .2s ease, opacity .2s ease;
}

.auth-submit:hover {
    box-shadow: 0 13px 26px rgba(112, 70, 41, .27);
    transform: translateY(-1px);
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .72;
    transform: none;
}

.auth-switch {
    margin: 24px 0 0;
    color: var(--auth-muted);
    font-size: 11px;
    text-align: center;
}

.auth-switch a {
    margin-left: 4px;
    color: var(--auth-primary);
    font-weight: 650;
    text-decoration: none;
}

.auth-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 20px;
    color: #ada198;
    font-size: 9px;
}

.auth-security i {
    color: var(--auth-success);
}

.toast {
    border-radius: 10px !important;
    box-shadow: 0 12px 30px rgba(52, 35, 24, .18) !important;
}

@media screen and (max-width: 800px) {
    .auth-page {
        display: block;
        min-height: 100vh;
        padding: 0;
        background:
            radial-gradient(circle at 50% 0, rgba(202, 143, 82, .15), transparent 30%),
            var(--auth-bg);
    }

    .auth-shell {
        display: block;
        width: 100%;
        min-height: 100vh;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .auth-brand {
        display: none;
    }

    .auth-panel {
        display: block;
        width: calc(100% - 24px);
        max-width: 460px;
        min-height: auto;
        margin: 0 auto;
        padding: 18px 18px 24px;
        border: 1px solid rgba(128, 82, 51, .1);
        border-radius: 18px;
        background: rgba(255, 253, 251, .96);
        box-shadow: 0 16px 40px rgba(65, 43, 28, .1);
    }

    .auth-mobile-home {
        display: flex;
        width: calc(100% - 24px);
        max-width: 460px;
        height: 78px;
        align-items: center;
        justify-content: space-between;
        margin: 0 auto;
        color: var(--auth-ink);
        text-decoration: none;
    }

    .auth-mobile-home__brand {
        display: flex;
        min-width: 0;
        align-items: center;
        gap: 11px;
    }

    .auth-mobile-home__logo {
        display: grid;
        overflow: hidden;
        width: 42px;
        height: 42px;
        flex: 0 0 auto;
        place-items: center;
        border: 1px solid rgba(128, 82, 51, .1);
        border-radius: 13px;
        background: linear-gradient(145deg, #fff, #f6ede4);
        box-shadow: 0 6px 18px rgba(73, 49, 31, .12);
    }

    .auth-mobile-home__logo img {
        display: block;
        width: 31px;
        height: 31px;
        object-fit: contain;
    }

    .auth-mobile-home strong {
        overflow: hidden;
        max-width: 245px;
        font-size: 14px;
        font-weight: 700;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .auth-mobile-home > i {
        display: grid;
        width: 34px;
        height: 34px;
        flex: 0 0 auto;
        place-items: center;
        border: 1px solid rgba(128, 82, 51, .1);
        border-radius: 10px;
        background: rgba(255, 255, 255, .72);
        color: #80664f;
        font-size: 16px;
    }

    .auth-panel__heading {
        margin-bottom: 22px;
    }

    .auth-panel__heading span {
        font-size: 9px;
    }

    .auth-panel__heading h2 {
        font-size: 22px;
    }

    .auth-panel__heading p {
        font-size: 10px;
    }

    .auth-form {
        gap: 16px;
    }

    .auth-input {
        height: 48px;
    }

    .auth-switch {
        margin-top: 20px;
    }
}

@media screen and (max-width: 360px) {
    .auth-panel {
        padding-right: 15px;
        padding-left: 15px;
    }
}
