:root {
    --page-bg: #0f1d35;
    --card-bg: #ffffff;
    --text-main: #1f2329;
    --text-sub: #86909c;
    --primary: #1677ff;
    --primary-hover: #4096ff;
    --danger: #cc2230;
    --input-bg: #f7f9fc;
    --input-border: #e5e6eb;
    --font-main: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-main);
    color: #fff;
    background: radial-gradient(circle at 12% 18%, #b7e5fc 0%, transparent 35%), radial-gradient(circle at 85% 80%, #c9bffe 0%, transparent 40%), linear-gradient(135deg, #e6f7ff 0%, #ffffff 45%, #f3e8ff 100%);
    overflow: hidden;
}

.aurora {
    position: fixed;
    width: 28rem;
    height: 28rem;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.5;
    pointer-events: none;
    animation: drift 10s ease-in-out infinite alternate;
}

.aurora-1 {
    top: -8rem;
    right: -4rem;
    background: #e2f6fd;
}

.aurora-2 {
    bottom: -10rem;
    left: -6rem;
    background: #ddf3fe;
    animation-delay: 2s;
}

.page {
    position: relative;
    z-index: 1;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.login-shell {
    position: relative;
    display: flex;
    width: min(800px, 100%);
    min-height: 400px;
    border-radius: 16px;
    background-color: var(--card-bg);
    background-image: linear-gradient(90deg, rgba(247, 251, 255, 0) 0%, rgba(247, 251, 255, 0) 38%, rgba(255, 255, 255, 0.88) 58%, rgba(255, 255, 255, 0.97) 72%, rgba(255, 255, 255, 1) 100%), url("../assets/images/card_left_bg.png");
    background-repeat: no-repeat, no-repeat;
    background-position: center, center;
    background-size: cover, cover;
    box-shadow: 0 28px 64px rgba(15, 23, 42, 0.22), 0 8px 24px rgba(15, 23, 42, 0.12);
    overflow: hidden;
    animation: rise 0.8s ease-out;
}

.brand-side,
.form-side {
    flex: 1 1 50%;
    position: relative;
    z-index: 1;
}

.brand-side {
    display: flex;
    flex-direction: column;
    position: relative;
    padding: 40px 30px;
}

.brand-side::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(246, 246, 246, 0.10);
    pointer-events: none;
}

.brand-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: 14px;
}

.brand-logo-icon {
    width: 34px;
    height: 34px;
    border-radius: 6px;
    object-fit: cover;
}

.brand-logo-text {
    color: #ff6628;
    font-size: 28px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.brand-copy {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1 1 auto;
    align-items: flex-start;
    width: 100%;
    max-width: 100%;
    padding-top: 50px;
}

.brand-copy-text {
    margin: 0;
    color: #86909c;
    font-size: 22px;
    font-weight: 500;
    line-height: 1.45;
    white-space: nowrap;
}

.form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    background: #ffffff;
    color: var(--text-main);
}

.form-panel {
    width: 100%;
    max-width: 320px;
}

.form-panel h1 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.4;
}

.form-subtitle {
    margin: 0 0 20px;
    color: var(--text-sub);
    font-size: 13px;
    line-height: 1.6;
}

.field-group {
    margin-bottom: 16px;
}

.field-label {
    display: block;
    margin-bottom: 6px;
    color: #4e5969;
    font-size: 13px;
    line-height: 1.5;
}

input[type="text"],
input[type="password"] {
    width: 100%;
    height: 40px;
    border: 1px solid var(--input-border);
    border-radius: 6px;
    background: var(--input-bg);
    padding: 0 12px;
    color: var(--text-main);
    font-size: 14px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[type="text"]::placeholder,
input[type="password"]::placeholder {
    color: #a9aeb8;
}

input[type="text"]:focus,
input[type="password"]:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
}

.remember-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 20px;
    color: #4e5969;
    font-size: 12px;
    line-height: 1.5;
    cursor: pointer;
}

.remember-line input[type="checkbox"] {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: var(--primary);
}

button[type="submit"] {
    width: 100%;
    height: 40px;
    border: 0;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
}

button[type="submit"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.22);
}

button[type="submit"]:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.message {
    min-height: 20px;
    margin: 12px 0 0;
    color: var(--danger);
    font-size: 13px;
    line-height: 1.5;
}

.message.success {
    color: #0d8f43;
}

@media (max-width: 860px) {
    body {
        overflow: auto;
        background: #f6f6f6;
    }

    .page {
        min-height: 100%;
        padding: 20px 16px;
    }

    .login-shell {
        flex-direction: column;
        width: 100%;
        min-height: calc(100vh - 40px);
        border-radius: 20px;
        background-color: #ffffff;
        background-image: none;
        box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    }

    .brand-side {
        min-height: auto;
        padding: 56px 24px 20px;
    }

    .brand-logo {
        margin-top: 8px;
    }

    .brand-copy {
        flex: 0 0 auto;
        width: 100%;
        max-width: none;
        margin-top: 32px;
        padding-top: 0;
    }

    .brand-copy-text {
        font-size: 18px;
        white-space: normal;
    }

    .form-side {
        align-items: flex-start;
        padding: 20px 24px 40px;
    }

    .form-panel {
        max-width: none;
    }

    .aurora {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .aurora,
    .login-shell,
    button[type="submit"] {
        animation: none;
        transition: none;
    }
}

@keyframes rise {
    from {
        transform: translateY(16px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes drift {
    from {
        transform: translate3d(-6px, -4px, 0) scale(1);
    }
    to {
        transform: translate3d(8px, 10px, 0) scale(1.06);
    }
}
