* {
    box-sizing: border-box;
}

:root {
    --login-primary-blue: #0b4ea2;
    --login-primary-blue-dark: #083b7b;
    --login-primary-blue-light: #2f7fe0;
}

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

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: #333;
    background: #ffffff;
}

a {
    color: inherit;
    text-decoration: none;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page-header {
    background: #ffffff;
    border-bottom: 1px solid #f0f0f0;
}

.header-inner {
    width: min(1400px, calc(100% - 48px));
    margin: 0 auto;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-title {
    margin: 0;
    color: var(--login-primary-blue);
    font-size: 36px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.header-links {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    font-size: 14px;
}

.header-links .active {
    color: #111;
}

.hero-stage {
    flex: 1;
    background: url("/assets/login-bg.jpg") center center / cover no-repeat;
    position: relative;
    min-height: 620px;
}

.hero-overlay {
    width: min(1400px, calc(100% - 48px));
    min-height: 620px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 48px 0 56px;
}

.login-panel {
    width: 100%;
    max-width: 420px;
    margin-right: 116px;
    padding: 34px 28px 30px;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 22px;
    box-shadow: 0 18px 40px rgba(27, 62, 126, 0.14);
    border: 1px solid rgba(19, 84, 180, 0.08);
}

.login-title {
    margin: 0;
    text-align: center;
    color: #17376d;
    font-size: 22px;
    font-weight: 700;
}

.login-subtitle {
    margin: 10px 0 24px;
    text-align: center;
    color: #7f8ca3;
    font-size: 14px;
    line-height: 1.6;
}

.flash-message {
    margin-bottom: 14px;
    padding: 10px 12px;
    border: 1px solid rgba(214, 70, 70, 0.25);
    background: rgba(255, 248, 248, 0.9);
    color: #b34141;
    font-size: 13px;
    line-height: 1.5;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: #47556d;
    font-size: 16px;
    font-weight: 700;
}

.form-control,
.captcha-input {
    width: 100%;
    border: 1px solid #dde7f5;
    background: #ffffff;
    font-size: 15px;
    color: #333;
    outline: none;
    padding: 0 16px;
    height: 48px;
    border-radius: 14px;
}

.form-control::placeholder,
.captcha-input::placeholder {
    color: #9e9e9e;
}

.captcha-row {
    display: flex;
    align-items: stretch;
    gap: 10px;
}

.captcha-input {
    min-width: 0;
}

.captcha-image {
    width: 170px;
    height: 48px;
    border-radius: 14px;
    border: 1px solid #dde7f5;
    background: #fff;
    cursor: pointer;
    flex-shrink: 0;
}

.btn-login {
    height: 40px;
    border: 0;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    background: linear-gradient(180deg, var(--login-primary-blue-light) 0%, var(--login-primary-blue) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35);
    border-radius: 12px;
}

.btn-login:hover {
    background: linear-gradient(180deg, #4e90e8 0%, var(--login-primary-blue-dark) 100%);
}

.panel-meta {
    margin-top: 16px;
    text-align: center;
}

.copyright {
    font-size: 12px;
    color: #8d8d8d;
}

.register-row {
    margin-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #4b5568;
    font-size: 14px;
}

.register-row a {
    color: var(--login-primary-blue);
    font-weight: 600;
}

.page-organizer {
    padding: 12px 24px 18px;
    text-align: center;
    font-size: 14px;
    color: #ffffff;
    background: var(--login-primary-blue);
    box-shadow: 0 -8px 20px rgba(11, 78, 162, 0.25);
}

.header-links a:hover {
    color: var(--login-primary-blue);
}

@media (max-width: 1200px) {
}

@media (max-width: 960px) {
    .header-inner,
    .hero-overlay {
        width: calc(100% - 32px);
    }

    .hero-stage,
    .hero-overlay {
        min-height: auto;
    }

    .hero-overlay {
        flex-direction: column;
        align-items: flex-end;
        justify-content: center;
        gap: 28px;
        padding: 32px 0;
    }

    .login-panel {
        width: min(100%, 420px);
        margin: 0 auto;
        padding: 28px 22px 22px;
    }
}

@media (max-width: 640px) {
    .page-header {
        padding: 10px 0;
    }

    .header-inner {
        min-height: auto;
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .brand-title {
        font-size: 18px;
        line-height: 1.4;
    }

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

    .captcha-row {
        flex-direction: column;
    }

    .captcha-image {
        width: 100%;
        object-fit: cover;
    }
}
