.legal-note .error-message {
    margin-top: 5px;
    margin-left: 24px;
}

/* ================================================================
   登录页 & 注册页 共用样式
   ================================================================ */

/* -------------------------------- 共用 -------------------------------- */

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.breadcrumb a {
    text-decoration: none;
}

/* -------------------------------- 登录页 -------------------------------- */

.login-strip {
    padding: 34px 0 44px;
    background: #f6f8fc;
}

.login-layout {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 16px 42px rgba(20, 34, 64, .12);
    overflow: hidden;
    position: relative;
}

.login-head {
    position: relative;
    text-align: center;
    overflow: hidden;
    padding: 40px;
    background: linear-gradient(155deg, #121a2e 0%, #1c2746 42%, #243a66 100%);
    color: #fff;
}

    .login-head::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 90% 85% at 50% -25%, rgba(255, 106, 0, .18), transparent 55%);
        pointer-events: none;
    }

    .login-head::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: min(320px, 72%);
        height: 3px;
        border-radius: 3px;
        background: linear-gradient(90deg, transparent, rgba(255, 106, 0, .32), #ff5e16, rgba(255, 106, 0, .32), transparent);
    }

.login-title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 46px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}

    .login-title .accent {
        color: #ff4a2a;
    }

.login-sub {
    position: relative;
    z-index: 1;
    margin: 14px auto 0;
    font-size: 20px;
    color: rgba(255, 255, 255, .92);
    font-weight: 500;
    line-height: 1.65;
}

.login-form {
    --label-col: 148px;
    --label-gap: 22px;
    padding: 40px 48px 44px;
    max-width: 680px;
    margin: 0 auto;
}

.login-row {
    display: grid;
    grid-template-columns: var(--label-col) 1fr;
    gap: 16px var(--label-gap);
    align-items: center;
    margin-bottom: 22px;
}

.login-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2e57;
    text-align: right;
}

.input-with-icon {
    display: flex;
    align-items: center;
    border: 1px solid #ced7e7;
    background: #fff;
    min-height: 48px;
}

    .input-with-icon.error {
        border-color: #dc3545;
        box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.1);
    }

.input-icon {
    width: 46px;
    text-align: center;
    color: #9aa4b3;
    font-size: 18px;
    border-right: 1px solid #e2e8f3;
    flex: 0 0 auto;
}

.input-with-icon input {
    border: 0;
    box-shadow: none;
    width: 100%;
    min-height: 46px;
    font-size: 15px;
    color: #333;
    padding: 0 14px;
}

    .input-with-icon input:focus {
        outline: none;
    }

    .input-with-icon input.error:focus {
        outline: none;
    }

/* 登录页 — 红色警告框（.login-strip 作用域隔离，防止与注册页 .error-message 冲突） */
.login-strip .error-message {
    display: none;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 12px 16px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14.5px;
    align-items: flex-start;
}

    .login-strip .error-message.show {
        display: flex;
        animation: fadeIn 0.3s ease;
    }

.error-icon {
    margin-right: 10px;
    font-size: 18px;
    flex-shrink: 0;
}

.field-error {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
    display: none;
    grid-column: 2;
}

    .field-error.show {
        display: block;
    }

.remember-row {
    margin: 10px 0 26px;
    padding-left: calc(var(--label-col) + var(--label-gap));
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 15px;
    color: #374151;
    line-height: 1.5;
}

    .remember-row input {
        margin-top: 4px;
        flex-shrink: 0;
    }

.signin-btn {
    display: block;
    border: none;
    min-height: 50px;
    margin-left: calc(var(--label-col) + var(--label-gap));
    width: calc(100% - var(--label-col) - var(--label-gap));
    box-sizing: border-box;
    background: linear-gradient(90deg, #ff4a2a, #e43f22);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: .01em;
    transition: all 0.3s;
}

    .signin-btn:hover {
        filter: brightness(1.20);
        transform: translateY(-1px);
        box-shadow: 0 4px 12px rgba(255, 74, 42, 0.3);
    }

    .signin-btn:active {
        transform: translateY(0);
    }

    .signin-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
        box-shadow: none;
    }

.forgot-link {
    display: inline-block;
    margin-top: 16px;
    color: #ff4a2a;
    font-size: 14px;
    text-decoration: none;
}

    .forgot-link:hover {
        text-decoration: underline;
    }

.forgot-wrap {
    text-align: center;
    margin-left: 0;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid #eef1f5;
    margin-top: 44px;
    padding-top: 14px;
}

.signup-hint {
    margin: 8px 0 0;
    font-size: 14px;
    color: #4b5563;
}

    .signup-hint a {
        color: #ff4a2a;
        text-decoration: none;
        font-weight: 600;
    }

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

.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

    .loading-overlay.show {
        display: flex;
    }

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 74, 42, 0.2);
    border-left-color: #ff4a2a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: #10b981;
    color: white;
    padding: 16px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: none;
    align-items: center;
    gap: 12px;
    z-index: 1000;
}

    .success-message.show {
        display: flex;
        animation: slideIn 0.3s ease;
    }

.success-icon {
    font-size: 24px;
}

.success-text {
    font-weight: 500;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* -------------------------------- 注册页 -------------------------------- */

.register-strip {
    padding: 32px 0 40px;
    background: #f6f8fc;
}

.register-layout {
    max-width: 900px;
    margin: 0 auto;
    background: #fff;
    box-shadow: 0 16px 40px rgba(20, 34, 64, .12);
    overflow: hidden;
}

.register-head {
    position: relative;
    text-align: center;
    overflow: hidden;
    padding: 40px;
    background: linear-gradient(155deg, #121a2e 0%, #1c2746 42%, #243a66 100%);
    color: #fff;
}

    .register-head::before {
        content: "";
        position: absolute;
        inset: 0;
        background: radial-gradient(ellipse 90% 85% at 50% -25%, rgba(255, 74, 42, .16), transparent 55%);
        pointer-events: none;
    }

    .register-head::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: 0;
        transform: translateX(-50%);
        width: min(320px, 72%);
        height: 3px;
        border-radius: 3px;
        background: linear-gradient(90deg, transparent, rgba(255, 74, 42, .35), #ff4a2a, rgba(255, 74, 42, .35), transparent);
    }

.register-title {
    position: relative;
    z-index: 1;
    margin: 0;
    font-size: 46px;
    font-weight: 800;
    letter-spacing: .03em;
    line-height: 1.15;
    color: #fff;
    text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}

.register-head .accent {
    color: #ff4a2a;
}

.register-sub {
    position: relative;
    z-index: 1;
    margin: 14px auto 0;
    font-size: 20px;
    color: rgba(255, 255, 255, .92);
    font-weight: 500;
    line-height: 1.65;
}

    .register-sub .accent {
        font-weight: 800;
    }

.register-form {
    --rf-label-col: 210px;
    --rf-gap: 26px;
    padding: 34px 40px 40px;
}

.rf-row {
    display: grid;
    grid-template-columns: minmax(168px, var(--rf-label-col)) 1fr;
    gap: 16px var(--rf-gap);
    align-items: center;
    margin-bottom: 26px;
}

    .rf-row:last-of-type {
        margin-bottom: 0;
    }

.rf-label {
    font-size: 16px;
    font-weight: 600;
    color: #1f2e57;
    text-align: right;
    padding-right: 6px;
}

.req {
    color: #ef4444;
    margin-right: 4px;
}

.register-strip .form-control {
    border-radius: 0;
    border: 1px solid #d8e2f0;
    min-height: 48px;
    font-size: 15px;
}

    .register-strip .form-control:focus {
        border-color: #7a92b8;
        box-shadow: none;
    }

.rf-verify {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#captchaInput {
    width: 100px;
    min-width: 100px;
    flex: 0 0 auto;
}

.captcha-box {
    height: 48px;
    min-width: 148px;
    padding: 0 16px;
    background: linear-gradient(135deg, #eef2fa 0%, #e2e9f5 100%);
    border: 1px solid #c5d2e8;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 21px;
    letter-spacing: 6px;
    color: #1f2e57;
    user-select: none;
    font-family: Georgia, "Times New Roman", serif;
    text-shadow: 1px 1px 0 rgba(255,255,255,.6);
}

.captcha-refresh {
    width: 48px;
    height: 48px;
    border: 1px solid #d8e2f0;
    background: #fff;
    color: #1f2e57;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .captcha-refresh:hover {
        background: #f3f6fb;
        color: #e43f22;
        border-color: #c5d2e8;
    }

.legal-note {
    margin: 28px 0 0;
    font-size: 15px;
    color: #5c6570;
    text-align: left;
    line-height: 1.7;
    margin-left: calc(var(--rf-label-col) + var(--rf-gap));
    width: calc(100% - var(--rf-label-col) - var(--rf-gap));
}

    .legal-note label {
        display: flex;
        align-items: flex-start;
        gap: 9px;
        cursor: pointer;
    }

    .legal-note input[type="checkbox"] {
        width: 15px;
        height: 15px;
        margin-top: 6px;
        flex: 0 0 auto;
    }

    .legal-note.secondary {
        margin-top: 10px;
    }

    .legal-note a {
        color: #325f8d;
        font-weight: 600;
    }

.action-row {
    margin-top: 32px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 22px;
    flex-wrap: wrap;
    margin-left: calc(var(--rf-label-col) + var(--rf-gap));
    width: calc(100% - var(--rf-label-col) - var(--rf-gap));
}

.register-btn {
    border: none;
    background: linear-gradient(90deg, #ff4a2a, #e43f22);
    color: #fff;
    min-height: 52px;
    min-width: 220px;
    font-weight: 800;
    font-size: 16px;
    padding: 0 32px;
    letter-spacing: .02em;
}

    .register-btn:hover {
        filter: brightness(1.20);
    }

.login-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: #325f8d;
    text-decoration: none;
    font-size: 16px;
}

    .login-link:hover {
        color: #e43f22;
    }

/* 注册页 — 红色内联文字（.register-strip 作用域隔离） */
.register-strip .error-message {
    color: #dc3545;
    font-size: 0.85rem;
    margin-top: 4px;
    min-height: 20px;
    display: none;
    padding-left: 2px;
}

    .register-strip .error-message.show {
        display: block;
        animation: fadeIn 0.3s ease-in;
    }

.form-control.error {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-feedback {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 4px;
    text-align: center;
    font-weight: 500;
    display: none;
    animation: fadeIn 0.3s ease-in;
}

    .form-feedback.show {
        display: block;
    }

    .form-feedback.error {
        background-color: rgba(220, 53, 69, 0.1);
        color: #dc3545;
        border: 1px solid #f5c6cb;
    }

    .form-feedback.success {
        background-color: rgba(40, 167, 69, 0.1);
        color: #28a745;
        border: 1px solid #c3e6cb;
    }

@keyframes shake {
    0%, 100% {
        transform: translateX(0);
    }

    10%, 30%, 50%, 70%, 90% {
        transform: translateX(-5px);
    }

    20%, 40%, 60%, 80% {
        transform: translateX(5px);
    }
}

.form-control.error-shake {
    animation: shake 0.5s ease-in-out;
}

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

/* ≥1200px */
@media (min-width: 1200px) {
}

/* ≤991px (移动端折叠布局) */
@media (max-width: 991.98px) {
}

/* ≥768px */
@media (min-width: 768px) {
}

/* <768px */
@media (max-width: 767.98px) {
    /* 登录页 */
    .login-head {
        padding: 20px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-sub {
        font-size: 15px;
        margin-top: 12px;
    }

    .login-form {
        padding: 26px 18px 30px;
        max-width: none;
    }

    .login-row {
        grid-template-columns: 1fr;
        gap: 8px;
        margin-bottom: 16px;
    }

    .login-label {
        text-align: left;
        font-size: 15px;
    }

    .input-icon {
        width: 42px;
        font-size: 16px;
    }

    .input-with-icon input {
        font-size: 15px;
        min-height: 44px;
    }

    .remember-row {
        padding-left: 0;
        margin: 6px 0 18px;
        font-size: 14px;
    }

    .signin-btn {
        min-height: 48px;
        font-size: 15px;
        margin-left: 0;
        width: 100%;
    }

    .forgot-wrap {
        margin-left: 0;
        width: 100%;
    }

    .forgot-link {
        font-size: 14px;
    }

    .field-error {
        grid-column: 1;
    }

    /* 注册页 */
    .register-head {
        padding: 40px 22px 36px;
    }

    .register-title {
        font-size: 30px;
    }

    .register-sub {
        font-size: 15px;
        margin-top: 14px;
    }

    .register-form {
        padding: 24px 20px 28px;
    }

    .rf-row {
        grid-template-columns: 1fr;
        text-align: left;
    }

    .rf-label {
        text-align: left;
        padding-right: 0;
    }

    .legal-note {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }

    .action-row {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }
}
