/* KHunter 认证页（登录 / 注册 / 修改密码） */

:root {
    color-scheme: light;
    --auth-red: #d63939;
    --auth-red-dark: #b92b2b;
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e6eaf0;
    --auth-bg: #f5f7fb;
}

* {
    box-sizing: border-box;
}

html,
body {
    min-height: 100%;
}

body.auth-page {
    margin: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at 8% 8%, rgba(214, 57, 57, .08), transparent 26rem),
        radial-gradient(circle at 92% 92%, rgba(32, 107, 196, .07), transparent 28rem),
        var(--auth-bg);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
    gap: 28px;
    align-items: stretch;
    width: 100%;
    max-width: 1240px;
    min-height: 100vh;
    margin: 0 auto;
    padding: 28px;
}

/* ==================== 左侧品牌区 ==================== */

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 660px;
    padding: 42px;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 92% 0, rgba(214, 57, 57, .48), transparent 19rem),
        radial-gradient(circle at 0 100%, rgba(56, 189, 248, .16), transparent 22rem),
        linear-gradient(145deg, #111827 0%, #1e293b 58%, #0f172a 100%);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgba(15, 23, 42, .18);
}

.auth-brand::after {
    position: absolute;
    right: -90px;
    bottom: -90px;
    width: 280px;
    height: 280px;
    content: "";
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
    box-shadow:
        0 0 0 38px rgba(255, 255, 255, .035),
        0 0 0 78px rgba(255, 255, 255, .025);
}

.auth-brand-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    width: fit-content;
    color: #fff;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: -.01em;
    text-decoration: none;
}

.auth-brand-logo img {
    width: 42px;
    height: 42px;
    padding: 5px;
    object-fit: contain;
    background: rgba(255, 255, 255, .96);
    border-radius: 13px;
}

.auth-brand-logo strong {
    font-weight: 750;
}

.auth-brand-copy {
    position: relative;
    z-index: 1;
    max-width: 520px;
    margin-top: auto;
    padding-top: 70px;
}

.auth-eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    color: #fca5a5;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-brand-copy h1 {
    margin: 0;
    color: #fff;
    font-size: clamp(30px, 4vw, 46px);
    font-weight: 750;
    line-height: 1.16;
    letter-spacing: -.045em;
}

.auth-brand-copy p {
    max-width: 460px;
    margin: 18px 0 0;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.75;
}

.auth-features {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 16px;
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
}

.auth-features li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.auth-feature-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    color: #fca5a5;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 11px;
}

.auth-feature-icon svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-features strong {
    display: block;
    color: #f8fafc;
    font-size: 13px;
    font-weight: 650;
}

.auth-features small {
    display: block;
    margin-top: 2px;
    color: #94a3b8;
    font-size: 11.5px;
}

.auth-brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 34px;
    color: #94a3b8;
    font-size: 11px;
}

.auth-status-dot {
    width: 7px;
    height: 7px;
    background: #2fb344;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(47, 179, 68, .14);
}

/* ==================== 右侧表单区 ==================== */

.auth-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    padding: 20px 8px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    padding: 36px;
    background: rgba(255, 255, 255, .97);
    border: 1px solid var(--auth-border);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, .08);
}

.auth-heading .auth-eyebrow {
    margin-bottom: 10px;
    color: var(--auth-red);
}

.auth-heading h2 {
    margin: 0;
    color: var(--auth-ink);
    font-size: 26px;
    font-weight: 750;
    line-height: 1.2;
    letter-spacing: -.035em;
}

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

.auth-hint {
    margin-top: 18px;
    padding: 11px 13px;
    color: #7f1d1d;
    background: #fff5f5;
    border: 1px solid #ffd9d9;
    border-radius: 10px;
    font-size: 12px;
}

.auth-hint a {
    color: var(--auth-red);
    font-weight: 650;
    text-decoration: none;
}

.auth-hint a:hover {
    text-decoration: underline;
}

.auth-alert {
    margin: 16px 0;
    padding: 11px 13px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.55;
}

.auth-alert-error {
    color: #991b1b;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.auth-alert-success {
    color: #166534;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.auth-form {
    display: grid;
    gap: 16px;
    margin-top: 24px;
}

.auth-field {
    display: grid;
    gap: 7px;
}

.auth-field label {
    color: #334155;
    font-size: 12px;
    font-weight: 650;
}

.auth-field input {
    width: 100%;
    height: 46px;
    padding: 0 13px;
    color: var(--auth-ink);
    background: #fff;
    border: 1px solid #dfe5ec;
    border-radius: 10px;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.auth-field input::placeholder {
    color: #a8b3c2;
}

.auth-field input:focus {
    border-color: #f0a6a6;
    box-shadow: 0 0 0 3px rgba(214, 57, 57, .1);
}

.auth-password {
    position: relative;
}

.auth-password input {
    padding-right: 62px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    padding: 5px 7px;
    color: var(--auth-red);
    background: transparent;
    border: 0;
    border-radius: 6px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 650;
    cursor: pointer;
    transform: translateY(-50%);
}

.password-toggle:hover {
    background: #fff1f1;
}

.auth-field-help {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.45;
}

.auth-field-help code {
    padding: 1px 4px;
    color: #475569;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 10.5px;
}

.auth-options {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: -2px;
}

.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #475569;
    font-size: 12px;
    cursor: pointer;
}

.auth-check input {
    width: 15px;
    height: 15px;
    accent-color: var(--auth-red);
    cursor: pointer;
}

.auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    margin-top: 4px;
    color: #fff;
    background: linear-gradient(180deg, #e04a4a, #d63939);
    border: 1px solid #c53030;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(214, 57, 57, .2);
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}

.auth-submit:hover {
    background: linear-gradient(180deg, #d63939, #c53030);
    box-shadow: 0 6px 18px rgba(214, 57, 57, .26);
    transform: translateY(-1px);
}

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

.auth-submit:disabled {
    cursor: not-allowed;
    opacity: .55;
    transform: none;
}

.auth-btn-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-switch {
    margin-top: 22px;
    color: var(--auth-muted);
    font-size: 12.5px;
    text-align: center;
}

.auth-switch a {
    color: var(--auth-red);
    font-weight: 650;
    text-decoration: none;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-note {
    margin: 18px 0 0;
    padding-top: 16px;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
    font-size: 10.5px;
    line-height: 1.6;
    text-align: center;
}

.auth-copyright {
    margin: 16px 0 0;
    color: #a8b3c2;
    font-size: 10.5px;
    text-align: center;
}

/* ==================== 响应式 ==================== */

@media (max-width: 980px) {
    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 620px;
        min-height: auto;
        padding: 18px;
    }

    .auth-brand {
        min-height: auto;
        padding: 24px;
        border-radius: 18px;
    }

    .auth-brand-copy {
        padding-top: 28px;
    }

    .auth-brand-copy h1 {
        font-size: 28px;
    }

    .auth-brand-copy p {
        margin-top: 10px;
        font-size: 12.5px;
    }

    .auth-features,
    .auth-brand-footer {
        display: none;
    }

    .auth-panel {
        padding: 0;
    }

    .auth-card {
        max-width: none;
        padding: 28px;
    }
}

@media (max-width: 520px) {
    .auth-shell {
        gap: 14px;
        padding: 12px;
    }

    .auth-brand {
        padding: 19px;
        border-radius: 15px;
    }

    .auth-brand-logo img {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .auth-brand-logo {
        font-size: 14px;
    }

    .auth-brand-copy {
        padding-top: 20px;
    }

    .auth-brand-copy h1 {
        font-size: 23px;
    }

    .auth-brand-copy p {
        display: none;
    }

    .auth-card {
        padding: 22px;
        border-radius: 16px;
    }

    .auth-heading h2 {
        font-size: 23px;
    }

    .auth-field input {
        height: 48px;
        font-size: 16px;
    }

    .auth-submit {
        height: 48px;
        font-size: 15px;
    }

    .auth-options {
        align-items: flex-start;
        flex-direction: column;
        gap: 9px;
    }
}
