:root {
    color-scheme: light;
    --auth-green: #55a982;
    --auth-green-dark: #397c60;
    --auth-green-soft: #eef8f2;
    --auth-border: #dcebe3;
    --auth-text: #24372e;
    --auth-muted: #728078;
    --auth-danger: #b94747;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
    color: var(--auth-text);
    background:
        radial-gradient(circle at 18% 12%, rgba(119, 190, 151, 0.12), transparent 28rem),
        #fbfdfc;
}

.auth-topbar {
    position: fixed;
    inset: 0 0 auto;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    background: rgba(255, 255, 255, 0.88);
    border-bottom: 1px solid rgba(220, 235, 227, 0.8);
    backdrop-filter: blur(12px);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--auth-green-dark);
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.auth-brand img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 10px;
}

.admin-entry {
    color: var(--auth-muted);
    text-decoration: none;
    font-size: 14px;
    padding: 9px 14px;
    border: 1px solid var(--auth-border);
    border-radius: 10px;
    background: white;
    transition: 0.2s ease;
}

.admin-entry:hover {
    color: var(--auth-green-dark);
    border-color: #acd2bd;
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 104px 20px 34px;
}

.auth-card {
    width: min(100%, 430px);
    padding: 38px 38px 32px;
    background: #fff;
    border: 1px solid var(--auth-border);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(68, 111, 88, 0.08);
}

.auth-kicker {
    margin: 0 0 8px;
    color: var(--auth-green);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.12em;
}

.auth-card h1 {
    margin: 0;
    font-size: 27px;
    line-height: 1.35;
}

.auth-subtitle {
    margin: 10px 0 28px;
    color: var(--auth-muted);
    font-size: 14px;
    line-height: 1.7;
}

.auth-form {
    display: grid;
    gap: 18px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label {
    font-size: 14px;
    font-weight: 600;
}

.auth-field input {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    color: var(--auth-text);
    background: #fcfefd;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    outline: none;
    font: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-field input:focus {
    border-color: #86bea0;
    box-shadow: 0 0 0 4px rgba(85, 169, 130, 0.11);
}

.auth-submit {
    height: 49px;
    margin-top: 3px;
    border: 0;
    border-radius: 12px;
    color: white;
    background: var(--auth-green);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.auth-submit:hover {
    background: #489973;
}

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

.auth-submit:disabled {
    cursor: wait;
    opacity: 0.68;
}

.auth-message {
    min-height: 22px;
    margin: 0;
    padding: 0;
    color: var(--auth-danger);
    font-size: 13px;
    line-height: 1.6;
}

.auth-message.success {
    color: var(--auth-green-dark);
}

.auth-links {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    text-align: center;
    color: var(--auth-muted);
    font-size: 14px;
}

.auth-links a {
    color: var(--auth-green-dark);
    font-weight: 600;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.admin-note {
    padding: 13px 15px;
    color: var(--auth-muted);
    background: var(--auth-green-soft);
    border-radius: 11px;
    font-size: 13px;
    line-height: 1.65;
}

@media (max-width: 560px) {
    .auth-topbar {
        height: 62px;
        padding: 0 16px;
    }

    .auth-brand span {
        font-size: 15px;
    }

    .auth-shell {
        padding: 84px 14px 24px;
    }

    .auth-card {
        padding: 30px 23px 27px;
        border-radius: 18px;
    }
}

/* Administrator login shares the user-facing authentication design. */
.login-stage.admin-login-stage {
    padding-top: 29px;
    padding-bottom: 36px;
}

.login-brand.admin-login-brand {
    margin-bottom: 21px;
}

.admin-login-brand .login-brand-art {
    width: 325px;
    height: 158px;
}

.admin-login-brand .login-brand-art img {
    width: 325px;
}

.admin-login-brand p {
    font-size: 16px;
}

.login-card.admin-login-card {
    padding-top: 27px;
    padding-bottom: 25px;
}

.admin-login-card .login-card-header {
    margin-bottom: 20px;
}

.admin-login-mark {
    width: 42px;
    height: 42px;
    display: grid;
    margin: 0 auto 9px;
    place-items: center;
    color: var(--login-green-dark);
    background: #eff6eb;
    border-radius: 12px;
}

.admin-login-mark svg {
    width: 22px;
    height: 22px;
}

.admin-login-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: -2px 0 0;
    color: #7c867f;
    font-size: 12px;
}

.admin-login-hint svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--login-green);
}

.admin-login-card .login-register {
    margin-top: 20px;
}

@media (max-width: 560px) {
    .login-stage.admin-login-stage {
        padding-top: 62px;
    }

    .login-brand.admin-login-brand {
        margin-bottom: 15px;
    }

    .admin-login-brand .login-brand-art {
        width: 270px;
        height: 132px;
    }

    .admin-login-brand .login-brand-art img {
        width: 270px;
    }

    .admin-login-brand p {
        font-size: 14px;
    }
}

/* Reference-aligned user login page */
.login-page {
    --login-green: #78af52;
    --login-green-dark: #60943e;
    --login-line: #d8dde1;
    --login-ink: #212626;
    --login-muted: #76818d;
    min-height: 100vh;
    background:
        radial-gradient(circle at 50% 38%, rgba(246, 244, 235, 0.42), transparent 32rem),
        #fbfaf7;
    color: var(--login-ink);
}

.login-admin-entry {
    position: fixed;
    z-index: 10;
    top: 30px;
    right: 38px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 18px;
    color: var(--login-green-dark);
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid #85b768;
    border-radius: 10px;
    font-size: 16px;
    text-decoration: none;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.login-admin-entry svg {
    width: 21px;
    height: 21px;
    stroke-width: 2;
}

.login-admin-entry:hover {
    background: #fff;
    box-shadow: 0 8px 22px rgba(93, 128, 70, 0.12);
    transform: translateY(-1px);
}

.login-stage {
    width: min(100%, 1120px);
    min-height: 100vh;
    margin: 0 auto;
    padding: 30px 22px 42px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 22px;
    text-align: center;
}

.login-brand-art {
    width: 330px;
    height: 169px;
    overflow: hidden;
}

.login-brand-art img {
    display: block;
    width: 330px;
    height: auto;
    margin: 0 auto;
}

.login-brand p {
    margin: -1px 0 0;
    color: #75808b;
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

.login-card {
    width: min(100%, 510px);
    padding: 30px 42px 27px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(220, 223, 221, 0.92);
    border-radius: 20px;
    box-shadow: 0 14px 36px rgba(50, 58, 52, 0.10);
}

.login-page:not(.register-page):not(.admin-login-page) .login-card {
    width: min(100%, 475px);
}

.login-card-header {
    margin-bottom: 22px;
    text-align: center;
}

.login-card-header h1 {
    margin: 0;
    font-size: 27px;
    font-weight: 650;
    line-height: 1.4;
    letter-spacing: 0.02em;
}

.login-card-header p {
    margin: 8px 0 0;
    color: var(--login-muted);
    font-size: 15px;
}

.login-form {
    gap: 17px;
}

.login-field {
    gap: 8px;
}

.login-field label {
    color: #262b2d;
    font-size: 15px;
    font-weight: 500;
}

.login-input {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input > svg {
    position: absolute;
    z-index: 1;
    left: 17px;
    width: 20px;
    height: 20px;
    color: #77818c;
    pointer-events: none;
    stroke-width: 1.9;
}

.login-input input {
    height: 52px;
    padding: 0 48px 0 52px;
    color: #252a2c;
    background: #fff;
    border: 1px solid var(--login-line);
    border-radius: 10px;
    font-size: 15px;
}

.login-input input::placeholder {
    color: #9aa2aa;
}

.login-input input:hover {
    border-color: #c7cdd1;
}

.login-input input:focus {
    border-color: #8ab86b;
    box-shadow: 0 0 0 4px rgba(120, 175, 82, 0.10);
}

.password-toggle {
    position: absolute;
    z-index: 2;
    right: 10px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    color: #77818c;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--login-green-dark);
    background: #f4f8f1;
}

.password-toggle svg {
    width: 20px;
    height: 20px;
    stroke-width: 1.9;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -2px;
    color: #4b5359;
    font-size: 14px;
}

.login-options a,
.login-register a {
    color: var(--login-green-dark);
    font-weight: 500;
    text-decoration: none;
}

.login-options a:hover,
.login-register a:hover {
    text-decoration: underline;
}

.remember-option {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    cursor: pointer;
    user-select: none;
}

.remember-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.remember-check {
    display: grid;
    width: 19px;
    height: 19px;
    place-items: center;
    color: #fff;
    background: #fff;
    border: 1px solid #c8ced1;
    border-radius: 4px;
    transition: 0.18s ease;
}

.remember-check svg {
    width: 14px;
    height: 14px;
    opacity: 0;
    stroke-width: 3;
}

.remember-option input:checked + .remember-check {
    background: var(--login-green);
    border-color: var(--login-green);
}

.remember-option input:checked + .remember-check svg {
    opacity: 1;
}

.remember-option input:focus-visible + .remember-check {
    box-shadow: 0 0 0 4px rgba(120, 175, 82, 0.16);
}

.login-form .auth-message {
    min-height: 18px;
    margin: -5px 0 -4px;
    text-align: center;
}

.login-submit {
    height: 51px;
    margin-top: 0;
    color: #fff;
    background: var(--login-green);
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.08em;
    box-shadow: none;
}

.login-submit:hover {
    background: var(--login-green-dark);
}

.login-register {
    margin: 23px 0 0;
    color: #78818c;
    font-size: 15px;
    text-align: center;
}

@media (max-height: 820px) and (min-width: 561px) {
    .login-stage {
        padding-top: 22px;
    }

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

    .login-brand-art {
        height: 148px;
    }

    .login-card {
        padding-top: 27px;
        padding-bottom: 24px;
    }
}

@media (max-width: 560px) {
    .login-admin-entry {
        position: absolute;
        top: 15px;
        right: 15px;
        min-height: 40px;
        padding: 0 12px;
        font-size: 13px;
    }

    .login-admin-entry svg {
        width: 18px;
        height: 18px;
    }

    .login-stage {
        padding: 65px 14px 24px;
    }

    .login-brand {
        margin-bottom: 17px;
    }

    .login-brand-art {
        width: 280px;
        height: 148px;
    }

    .login-brand-art img {
        width: 280px;
    }

    .login-brand p {
        font-size: 14px;
    }

    .login-card {
        padding: 27px 22px 24px;
        border-radius: 17px;
    }

    .login-card-header h1 {
        font-size: 24px;
    }

    .login-input input {
        height: 51px;
    }
}

@media (max-width: 360px) {
    .login-admin-entry span {
        display: none;
    }

    .login-admin-entry {
        width: 40px;
        padding: 0;
        justify-content: center;
    }
}

/* Registration page uses the same visual system with a taller form. */
.register-stage {
    padding-top: 25px;
    padding-bottom: 34px;
}

.register-brand {
    margin-bottom: 19px;
}

.register-brand .login-brand-art {
    width: 315px;
    height: 151px;
}

.register-brand .login-brand-art img {
    width: 315px;
}

.register-brand p {
    font-size: 16px;
}

.register-card {
    width: min(100%, 510px);
    padding-top: 28px;
    padding-bottom: 25px;
}

.register-card .login-card-header {
    margin-bottom: 20px;
}

.register-form {
    gap: 14px;
}

.register-tip {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #7c867f;
    font-size: 12px;
    line-height: 1.5;
}

.register-tip svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    color: var(--login-green);
}

.register-form .auth-message {
    margin-top: -4px;
}

.register-submit {
    margin-top: -2px;
}

.register-card .login-register {
    margin-top: 20px;
}

@media (max-width: 560px) {
    .register-stage {
        padding-top: 62px;
    }

    .register-brand {
        margin-bottom: 14px;
    }

    .register-brand .login-brand-art {
        width: 260px;
        height: 125px;
    }

    .register-brand .login-brand-art img {
        width: 260px;
    }

    .register-brand p {
        font-size: 14px;
    }

    .register-card {
        padding-top: 24px;
        padding-bottom: 22px;
    }
}

/* Keep all user authentication pages within common 100% desktop viewports. */
@media (min-width: 561px) and (max-height: 820px) {
    .login-stage,
    .login-stage.register-stage {
        padding-top: 14px;
        padding-bottom: 18px;
    }

    .login-brand,
    .login-brand.register-brand {
        margin-bottom: 10px;
    }

    .login-brand .login-brand-art,
    .register-brand .login-brand-art {
        width: 280px;
        height: 134px;
    }

    .login-brand .login-brand-art img,
    .register-brand .login-brand-art img {
        width: 280px;
    }

    .login-brand p,
    .register-brand p {
        font-size: 15px;
    }

    .login-card,
    .login-card.register-card {
        padding: 22px 40px 20px;
    }

    .login-card .login-card-header,
    .register-card .login-card-header {
        margin-bottom: 14px;
    }

    .login-card-header h1 {
        font-size: 25px;
    }

    .login-card-header p {
        margin-top: 5px;
        font-size: 14px;
    }

    .login-form {
        gap: 13px;
    }

    .login-form.register-form {
        gap: 10px;
    }

    .login-input input {
        height: 48px;
    }

    .login-submit {
        height: 48px;
    }

    .login-form .auth-message {
        min-height: 16px;
        line-height: 1.35;
    }

    .login-register,
    .register-card .login-register {
        margin-top: 16px;
    }
}
