:root {
    --login-primary: #176b62;
    --login-primary-hover: #125b54;
    --login-ink: #17232d;
    --login-muted: #687682;
    --login-border: #d8e0e5;
    --login-surface: #ffffff;
    --login-page-bg: #edf1f3;
    --login-accent: #e2a23a;
}

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

body {
    margin: 0;
    color: var(--login-ink);
    background: var(--login-page-bg);
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    background-color: var(--login-page-bg);
}

.login-shell {
    width: 100%;
    min-height: 600px;
    height: 100vh;
    height: 100dvh;
    display: grid;
    grid-template-columns: minmax(0, 1.42fr) minmax(470px, 0.86fr);
    overflow: hidden;
    background: var(--login-surface);
}

.brand-panel {
    position: relative;
    min-width: 0;
    overflow: hidden;
    color: #fff;
    background-color: #16333d;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: 58% center;
}

.brand-panel::before {
    position: absolute;
    inset: 0;
    content: "";
    background: rgba(8, 31, 39, 0.48);
}

.brand-panel-inner {
    position: relative;
    z-index: 1;
    height: 100%;
    padding: 46px 64px 40px;
    display: flex;
    flex-direction: column;
}

.company-brand,
.mobile-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: grid;
    place-items: center;
    color: #17333c;
    background: var(--login-accent);
    border: 2px solid rgba(255, 255, 255, 0.72);
    border-radius: 6px;
    font-size: 23px;
    font-weight: 700;
    line-height: 1;
}

.company-name {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
}

.company-name strong {
    font-size: 19px;
    font-weight: 700;
}

.company-name span {
    margin-top: 6px;
    font-size: 10px;
    letter-spacing: 1.2px;
    opacity: 0.72;
}

.brand-copy {
    width: min(560px, 88%);
    margin-top: auto;
    margin-bottom: auto;
}

.brand-kicker {
    margin: 0 0 16px;
    color: #f2c66f;
    font-size: 14px;
    font-weight: 600;
}

.brand-copy h1 {
    margin: 0;
    font-size: 46px;
    line-height: 1.2;
    font-weight: 700;
}

.brand-subtitle {
    margin: 12px 0 0;
    font-size: 22px;
    font-weight: 500;
}

.brand-description {
    max-width: 510px;
    margin: 22px 0 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: 15px;
    line-height: 1.9;
}

.capability-list {
    margin-top: 30px;
    display: flex;
    align-items: center;
    gap: 30px;
}

.capability-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    white-space: nowrap;
}

.capability-item .layui-icon {
    color: #f2c66f;
    font-size: 19px;
}

.brand-footer {
    color: rgba(255, 255, 255, 0.62);
    font-size: 12px;
}

.login-form-panel {
    position: relative;
    min-width: 0;
    padding: 58px 72px 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

.login-panel-top {
    position: absolute;
    top: 32px;
    right: 40px;
}

.login-panel-top a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #6d7a82;
    font-size: 13px;
    font-weight: 600;
}

.login-panel-top a:hover {
    color: var(--login-primary);
}

.mobile-brand {
    display: none;
}

.form-center-box {
    width: 100%;
    max-width: 400px;
    margin: auto;
}

.role-switch {
    margin-bottom: 28px;
    padding: 4px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    background: #eef2f2;
    border: 1px solid #e2e8e8;
    border-radius: 7px;
}

.role-switch a {
    min-width: 0;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #68767e;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 600;
    transition: color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.role-switch a:hover {
    color: var(--login-primary);
}

.role-switch a.active {
    color: var(--login-primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(22, 61, 66, 0.1);
}

.form-heading {
    margin-bottom: 34px;
}

.form-product {
    margin: 0 0 12px;
    color: var(--login-primary);
    font-size: 14px;
    font-weight: 700;
}

.form-heading h2 {
    margin: 0;
    color: var(--login-ink);
    font-size: 30px;
    line-height: 1.25;
    font-weight: 700;
}

.form-heading > p:last-child {
    margin: 10px 0 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.6;
}

.login-form .layui-form-item {
    margin-bottom: 20px;
}

.field-label {
    display: block;
    margin-bottom: 8px;
    color: #344650;
    font-size: 14px;
    font-weight: 600;
}

.login-form .layui-input-wrap {
    width: 100%;
}

.login-form .layui-input {
    height: 46px;
    padding-left: 42px;
    color: var(--login-ink);
    background-color: #fff;
    border: 1px solid var(--login-border);
    border-radius: 6px;
    font-size: 14px;
    line-height: 46px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login-form .layui-input:hover {
    border-color: #aebbc2;
}

.login-form .layui-input:focus {
    border-color: var(--login-primary) !important;
    box-shadow: 0 0 0 3px rgba(23, 107, 98, 0.1);
}

.login-form .layui-input-prefix {
    width: 42px;
    color: #7d8a92;
}

.login-form .layui-input-prefix .layui-icon {
    font-size: 18px;
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 124px;
    gap: 12px;
    align-items: stretch;
}

.captcha-button {
    width: 124px;
    height: 46px;
    padding: 0;
    overflow: hidden;
    cursor: pointer;
    background: #f7f9fa;
    border: 1px solid var(--login-border);
    border-radius: 6px;
}

.captcha-button:hover,
.captcha-button:focus-visible {
    border-color: var(--login-primary);
    outline: none;
}

.verification-img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.login-options {
    min-height: 24px;
    margin: 2px 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--login-muted);
    font-size: 12px;
}

.login-options .layui-form-checkbox[lay-skin="primary"] span {
    color: #52616b;
    font-size: 13px;
}

.login-options .layui-form-checked[lay-skin="primary"] i {
    border-color: var(--login-primary) !important;
    background-color: var(--login-primary);
}

.student-login-options {
    justify-content: flex-start;
    color: #748188;
    line-height: 1.6;
}

.student-login-options > .layui-icon {
    flex: 0 0 auto;
    color: var(--login-primary);
    font-size: 16px;
}

.login-submit.layui-btn {
    width: 100%;
    height: 46px;
    margin: 0;
    color: #fff;
    background: var(--login-primary);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    line-height: 46px;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.login-submit.layui-btn:hover {
    background: var(--login-primary-hover);
}

.login-submit.layui-btn:active {
    transform: translateY(1px);
}

.security-note {
    margin-top: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: #89949b;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.security-note .layui-icon {
    color: var(--login-primary);
    font-size: 15px;
}

.form-footer {
    position: absolute;
    right: 0;
    bottom: 25px;
    left: 0;
    color: #9aa4aa;
    font-size: 12px;
    text-align: center;
}

@media (max-width: 1080px) {
    .login-shell {
        grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.9fr);
    }

    .brand-panel-inner {
        padding-right: 36px;
        padding-left: 36px;
    }

    .brand-copy h1 {
        font-size: 40px;
    }

    .capability-list {
        gap: 18px;
    }

    .login-form-panel {
        padding-right: 48px;
        padding-left: 48px;
    }
}

@media (max-width: 860px) {
    .login-page {
        padding: 0;
    }

    .login-shell {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        height: auto;
        display: block;
    }

    .brand-panel {
        display: none;
    }

    .login-form-panel {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 38px 48px 58px;
        justify-content: flex-start;
    }

    .login-panel-top {
        top: 40px;
        right: 48px;
    }

    .mobile-brand {
        display: flex;
        margin-bottom: 48px;
        color: var(--login-ink);
    }

    .mobile-brand .brand-mark {
        color: #fff;
        background: var(--login-primary);
        border-color: var(--login-primary);
    }

    .mobile-brand .company-name span {
        color: var(--login-muted);
        opacity: 1;
    }

    .form-center-box {
        margin: 0 auto;
    }

    .form-footer {
        bottom: 22px;
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 0;
        align-items: stretch;
        background: #fff;
    }

    .login-shell {
        width: 100%;
        min-height: 100vh;
        min-height: 100dvh;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .login-form-panel {
        min-height: 100vh;
        min-height: 100dvh;
        padding: 34px 24px 58px;
    }

    .login-panel-top {
        top: 39px;
        right: 24px;
    }

    .mobile-brand {
        margin-bottom: 46px;
    }

    .mobile-brand .company-name span {
        display: none;
    }

    .role-switch {
        margin-bottom: 24px;
    }

    .form-heading {
        margin-bottom: 28px;
    }

    .form-heading h2 {
        font-size: 27px;
    }

    .captcha-row {
        grid-template-columns: minmax(0, 1fr) 112px;
        gap: 10px;
    }

    .captcha-button {
        width: 112px;
    }

    .login-options {
        align-items: flex-start;
    }

    .login-options > span {
        max-width: 150px;
        text-align: right;
    }
}

@media (max-height: 720px) and (min-width: 861px) {
    .login-shell {
        min-height: 600px;
        height: 100vh;
        height: 100dvh;
    }

    .brand-panel-inner {
        padding-top: 32px;
        padding-bottom: 30px;
    }

    .brand-copy h1 {
        font-size: 40px;
    }

    .brand-description {
        margin-top: 16px;
    }

    .capability-list {
        margin-top: 22px;
    }

    .form-heading {
        margin-bottom: 26px;
    }

    .role-switch {
        margin-bottom: 20px;
    }

    .login-form .layui-form-item {
        margin-bottom: 16px;
    }

    .login-options {
        margin-bottom: 18px;
    }
}
