/* 登录与注册页独立样式，避免影响站内内容页。 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.navbar-center {
    flex: 1 1 auto;
}

.navbar-right {
    gap: 1rem;
}

.main-content {
    width: 100%;
    max-width: none;
    min-height: 0;
    flex: 1;
    display: grid;
    place-items: center;
    padding: clamp(2rem, 5vw, 4.5rem) 1.5rem;
}

.footer {
    margin-top: 0;
}

.auth-page {
    width: min(100%, 1040px);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.06fr) minmax(380px, 0.94fr);
    min-height: 560px;
    overflow: hidden;
    border: 1px solid rgba(204, 214, 226, 0.92);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(28, 39, 60, 0.14);
}

.auth-intro {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-width: 0;
    padding: clamp(2rem, 4vw, 3.5rem);
    overflow: hidden;
    color: #f8fafc;
    background:
        radial-gradient(circle at 85% 18%, rgba(245, 158, 11, 0.4), transparent 27%),
        radial-gradient(circle at 15% 85%, rgba(96, 165, 250, 0.28), transparent 30%),
        linear-gradient(145deg, #111827 0%, #25334a 58%, #1f2937 100%);
}

.auth-intro::before,
.auth-intro::after {
    content: "";
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 50%;
}

.auth-intro::before {
    width: 300px;
    height: 300px;
    top: -145px;
    right: -105px;
}

.auth-intro::after {
    width: 190px;
    height: 190px;
    bottom: -105px;
    left: -70px;
}

.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 0.8rem;
    color: #fff;
    text-decoration: none;
}

.auth-brand-mark img {
    border-radius: 13px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.22);
}

.auth-brand-mark span {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.auth-brand-mark strong {
    font-size: 1.05rem;
}

.auth-brand-mark small {
    margin-top: 0.18rem;
    color: #aebbd0;
    font-size: 0.66rem;
    letter-spacing: 0.14em;
}

.auth-intro-copy {
    max-width: 430px;
}

.auth-eyebrow {
    display: inline-block;
    color: #f59e0b;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.15em;
}

.auth-intro-copy h2 {
    margin: 1rem 0 1.1rem;
    color: #fff;
    font-size: clamp(2rem, 4vw, 3.1rem);
    line-height: 1.18;
    letter-spacing: -0.04em;
}

.auth-intro-copy p {
    max-width: 36em;
    color: #c8d2e1;
    font-size: 1rem;
    line-height: 1.8;
}

.auth-back-link {
    align-self: flex-start;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    color: #dbe4f0;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-back-link:hover {
    color: #fff;
    transform: translateX(-3px);
}

.auth-card {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: auto;
    max-width: none;
    margin: 0;
    padding: clamp(2rem, 4vw, 3.5rem);
    border-radius: 0;
    box-shadow: none;
}

.auth-heading {
    margin-bottom: 2rem;
}

.auth-title {
    margin: 0.45rem 0 0.4rem;
    color: #172033;
    text-align: left;
    font-size: 2rem;
    line-height: 1.25;
    letter-spacing: -0.025em;
}

.auth-heading p {
    color: #667085;
}

.auth-form .form-group {
    margin-bottom: 1.15rem;
}

.auth-form label {
    display: inline-block;
    margin-bottom: 0.45rem;
    color: #344054;
    font-size: 0.9rem;
    font-weight: 600;
}

.auth-form .form-control {
    min-height: 48px;
    padding: 0.72rem 0.85rem;
    border: 1px solid #d0d5dd;
    border-radius: 9px;
    background: #fff;
    color: #172033;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-form .form-control::placeholder {
    color: #98a2b3;
}

.auth-form .form-control:hover {
    border-color: #98a2b3;
}

.auth-form .form-control:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.auth-password-field {
    position: relative;
}

.auth-password-field .form-control {
    padding-right: 4.2rem;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 0.45rem;
    min-width: 48px;
    min-height: 36px;
    padding: 0 0.55rem;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #475467;
    cursor: pointer;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    transform: translateY(-50%);
}

.auth-password-toggle:hover {
    background: #f2f4f7;
    color: #172033;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-height: 32px;
}

.checkbox-group input {
    width: 18px;
    height: 18px;
    accent-color: #2563eb;
}

.checkbox-group label {
    margin: 0;
    cursor: pointer;
}

.auth-submit {
    min-height: 48px;
    margin-top: 0.2rem;
    padding: 0.75rem 1rem;
    border-radius: 9px;
    background: #2563eb;
    font-size: 1rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.auth-submit:hover {
    background: #1d4ed8;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
    transform: translateY(-1px);
}

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

.auth-footer {
    margin-top: 1.4rem;
    color: #667085;
}

.auth-footer a {
    color: #1d4ed8;
    font-weight: 700;
}

.auth-footer a:hover {
    color: #1e40af;
    text-decoration: underline;
}

.auth-form .error {
    margin-top: 0.4rem;
    color: #b42318;
}

.auth-shell-register {
    min-height: 690px;
}

@media (max-width: 1180px) {
    .navbar-search {
        display: none;
    }
}

@media (max-width: 980px) {
    .navbar-container {
        flex-wrap: wrap;
        justify-content: space-between;
    }

    .navbar-toggle {
        display: flex;
        order: 2;
    }

    .navbar-brand {
        order: 1;
    }

    .navbar-center,
    .navbar-right {
        display: none;
        flex: 0 0 100%;
        width: 100%;
    }

    .navbar-center.active,
    .navbar-right.active {
        position: static;
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 0;
        background: #343a40;
        box-shadow: none;
    }

    .navbar-center.active {
        order: 3;
        margin-top: 0.8rem;
        border-top: 1px solid rgba(255,255,255,0.1);
    }

    .navbar-right.active {
        order: 4;
    }

    .navbar-center .nav-link,
    .navbar-right .nav-link {
        width: 100%;
        padding: 0.85rem 0.25rem;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        color: #fff;
    }

    .navbar-right.active .navbar-search {
        display: flex;
        width: 100%;
        margin-top: 0.7rem;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 0.82fr) minmax(360px, 1.18fr);
    }

    .auth-intro-copy h2 {
        font-size: 2rem;
    }
}

@media (max-width: 720px) {
    .main-content {
        place-items: start center;
        padding: 1rem;
    }

    .auth-shell,
    .auth-shell-register {
        grid-template-columns: 1fr;
        min-height: 0;
        border-radius: 18px;
    }

    .auth-intro {
        min-height: 230px;
        padding: 1.5rem;
    }

    .auth-intro-copy {
        margin: 2.2rem 0 0.6rem;
    }

    .auth-intro-copy h2 {
        margin: 0.65rem 0 0.6rem;
        font-size: 1.7rem;
    }

    .auth-intro-copy p,
    .auth-back-link {
        display: none;
    }

    .auth-card {
        padding: 1.6rem 1.35rem 1.8rem;
    }

    .auth-heading {
        margin-bottom: 1.5rem;
    }

    .auth-title {
        font-size: 1.65rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-back-link,
    .auth-submit,
    .auth-form .form-control {
        transition: none;
    }
}
