@font-face {
    font-family: "YouSheBiaoTiHei";
    src: url("../fonts/youshe/YouSheBiaoTiHei.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

:root {
    --brand: #89ba36;
    --brand-soft: #9dc84a;
    --brand-deep: #6f9628;
    --paper: #f4f8f4;
    --card: #ffffff;
    --text: #303032;
    --muted: #6d756f;
    --line: #d8e6d9;
    --danger: #c04a3f;
    --font: "Heiti SC", "STHeiti", "SimHei", "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    --title-font: "YouSheBiaoTiHei", "Heiti SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body.login-page {
    margin: 0;
    color: var(--text);
    font-family: var(--font);
    background: var(--paper);
}

.login-page a {
    color: inherit;
}

.login-shell {
    min-height: 100%;
    display: flex;
}

.brand-panel {
    position: relative;
    flex: 1.15;
    overflow: hidden;
    color: #fff;
    background: #1f7a2b url("../images/login-edu-campus.jpg") center / cover no-repeat;
}

.brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(20, 72, 28, 0.38) 0%, rgba(20, 72, 28, 0.22) 42%, rgba(20, 72, 28, 0.62) 100%),
        linear-gradient(115deg, rgba(43, 153, 57, 0.42) 0%, rgba(31, 122, 43, 0.18) 58%, rgba(20, 72, 28, 0.28) 100%);
}

.brand-panel::after {
    content: "";
    position: absolute;
    width: 360px;
    height: 360px;
    right: -70px;
    bottom: -60px;
    background: url("../images/brand/logo-mark.png") center / contain no-repeat;
    opacity: 0.08;
}

.brand-content {
    position: relative;
    z-index: 1;
    max-width: 520px;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding: 56px 64px;
}

.brand-logo {
    width: 72px;
    height: 72px;
    margin-bottom: 28px;
}

.brand-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 0.28em;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.82);
}

.brand-kicker::before {
    content: "";
    width: 28px;
    height: 1px;
    background: #fff;
}

.brand-title {
    margin: 22px 0 10px;
    font-family: var(--title-font);
    font-size: 44px;
    font-weight: normal;
    letter-spacing: 0.12em;
    line-height: 1.2;
}

.brand-slogan {
    display: block;
    width: min(360px, 100%);
    margin: 8px 0 0;
}

.brand-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin-top: auto;
    padding-top: 56px;
}

.brand-point {
    padding: 16px 12px 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.22);
}

.brand-point strong {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    font-weight: 600;
}

.brand-point span {
    font-size: 12px;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.68);
}

.form-panel {
    flex: 0.85;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 28px;
    background: var(--paper);
}

.form-card {
    width: 100%;
    max-width: 420px;
    padding: 36px 36px 28px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--card);
    box-shadow: 0 18px 50px rgba(137, 186, 54, 0.12);
}

.form-logo {
    display: block;
    width: 100%;
    max-width: 260px;
    height: auto;
    margin-bottom: 22px;
}

.form-card h1 {
    margin: 0 0 8px;
    font-family: var(--title-font);
    font-size: 30px;
    font-weight: normal;
    letter-spacing: 0.08em;
}

.form-card .sub {
    margin: 0 0 32px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.field {
    margin-bottom: 18px;
}

.field label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    color: #44514b;
}

.field-box {
    position: relative;
}

.field-box i {
    position: absolute;
    left: 14px;
    top: 50%;
    width: 16px;
    margin-top: -8px;
    color: #8a918b;
    font-size: 15px;
    pointer-events: none;
}

.field-box input {
    width: 100%;
    height: 48px;
    padding: 0 42px 0 40px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
    font-family: var(--font);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field-box input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(137, 186, 54, 0.18);
}

.field-box .toggle-password {
    position: absolute;
    right: 8px;
    top: 50%;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8a918b;
    cursor: pointer;
}

.form-error {
    display: none;
    margin: -4px 0 16px;
    padding: 10px 12px;
    border-radius: 10px;
    background: #f8e8e5;
    color: var(--danger);
    font-size: 13px;
}

.form-error.is-visible {
    display: block;
}

.login-btn {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 12px;
    background: var(--brand);
    color: #fff;
    font-family: var(--font);
    font-size: 16px;
    letter-spacing: 0.18em;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
}

.login-btn:hover {
    background: var(--brand-deep);
    transform: translateY(-1px);
}

.login-btn:disabled {
    opacity: 0.7;
    cursor: wait;
    transform: none;
}

.form-foot {
    margin-top: 28px;
    color: #8b8f8a;
    font-size: 12px;
    line-height: 1.8;
}

@media (max-width: 960px) {
    .login-shell {
        flex-direction: column;
    }

    .brand-content {
        padding: 36px 28px 28px;
    }

    .brand-title {
        font-size: 40px;
    }

    .brand-points {
        padding-top: 28px;
    }
}

@media (max-width: 640px) {
    .brand-content {
        padding: 28px 20px 20px;
    }

    .brand-title {
        margin-top: 16px;
        font-size: 32px;
    }

    .brand-points {
        display: none;
    }

    .form-panel {
        padding: 20px 16px 32px;
    }

    .form-card {
        padding: 24px 18px 20px;
    }
}
