:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --accent: #f0b90b;
    --accent-deep: #d8a700;
    --text: #0b0e11;
    --muted: #7b8794;
    --line: #e7ebf0;
    --shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
    --page-bg: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    width: 100%;
    min-height: 100%;
}

body {
    min-height: 100dvh;
    background: var(--page-bg);
    color: var(--text);
    font-family: "PingFang SC-Regular", "PingFang SC", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

button {
    -webkit-tap-highlight-color: transparent;
}

input {
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.page {
    width: 100%;
    max-width: 430px;
    min-height: 100dvh;
    margin: 0 auto;
    padding: 28px 16px calc(28px + env(safe-area-inset-bottom));
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth {
    width: 100%;
}

.auth__logo {
    width: 112px;
    height: 64px;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    overflow: hidden;
}

    .auth__logo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: transparent;
    }

.auth__panel {
    background: var(--surface);
    border: 1px solid rgba(231, 235, 240, 0.9);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 22px 16px 18px;
}

.auth__header {
    text-align: center;
    margin-bottom: 18px;
}

.auth__title {
    font-size: 22px;
    line-height: 1.2;
    font-family: "PingFang SC-Semibold", "PingFang SC", sans-serif;
    color: var(--text);
}

.auth__subtitle {
    margin-top: 8px;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

.auth__form {
    display: grid;
    gap: 14px;
}

.field {
    display: grid;
    gap: 8px;
}

.field__label {
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
    font-family: "PingFang SC-Semibold", "PingFang SC", sans-serif;
    color: #1f2a37;
}

.field__input {
    width: 100%;
    height: 38px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-soft);
    padding: 0 14px;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

    .field__input::placeholder {
        color: #9aa4b2;
    }

    .field__input:focus {
        border-color: rgba(240, 185, 11, 0.95);
        background: #ffffff;
        box-shadow: 0 0 0 3px rgba(240, 185, 11, 0.12);
    }

    .field__input.is-invalid {
        border-color: rgba(239, 68, 68, 0.55);
        background: #fff7f7;
        box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.08);
    }

.login-form__error {
    min-height: 16px;
    font-size: 12px;
    line-height: 1.3;
    color: #ef4444;
    padding-left: 2px;
    margin-top: -2px;
}

/* 验证码行：左侧输入框，右侧图片，和输入框同一水平线 */
.field--captcha {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 96px;
    grid-template-rows: auto 38px auto;
    column-gap: 12px;
    row-gap: 8px;
    align-items: start;
}

    .field--captcha .field__group {
        display: contents;
    }

    .field--captcha .field__label {
        grid-column: 1;
        grid-row: 1;
    }

    .field--captcha .field__input {
        grid-column: 1;
        grid-row: 2;
    }

    .field--captcha .login-form__error {
        grid-column: 1;
        grid-row: 3;
    }

    .field--captcha .captcha__image {
        grid-column: 2;
        grid-row: 2;
        width: 96px;
        height: 38px;
        align-self: start;
        justify-self: end;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #ffffff;
        object-fit: cover;
        cursor: pointer;
        user-select: none;
    }

.primary-btn {
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(180deg, #f6cf31 0%, var(--accent) 100%);
    color: #111111;
    font-family: "PingFang SC-Semibold", "PingFang SC", sans-serif;
    font-size: 15px;
    box-shadow: 0 10px 20px rgba(240, 185, 11, 0.22);
    cursor: pointer;
}

    .primary-btn:active {
        transform: translateY(1px);
    }

    .primary-btn:disabled {
        cursor: not-allowed;
        opacity: 0.8;
    }

.auth__link {
    margin-top: 16px;
    text-align: center;
    font-size: 13px;
    line-height: 1.5;
    color: var(--muted);
}

    .auth__link a {
        color: var(--accent-deep);
        font-family: "PingFang SC-Semibold", "PingFang SC", sans-serif;
    }

@media (max-width: 360px) {
    .page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .auth__panel {
        padding-left: 14px;
        padding-right: 14px;
    }

    .field--captcha {
        grid-template-columns: minmax(0, 1fr) 88px;
    }

        .field--captcha .captcha__image {
            width: 88px;
        }

    .auth__title {
        font-size: 20px;
    }
}

.swal-home {
    border-radius: 18px;
    border: 1px solid rgba(240, 185, 11, 0.16);
    box-shadow: 0 18px 40px rgba(70, 48, 0, 0.16);
}

.swal-home__title {
    color: #111827;
    font-family: "PingFang SC-Semibold", "PingFang SC", sans-serif;
}

.swal-home .swal2-html-container {
    color: #6b7280;
}

.swal-home__confirm {
    color: #111111 !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 18px rgba(240, 185, 11, 0.22) !important;
}