@font-face {
    font-family: "ChillRoundGothic";
    src: url("/static/fonts/chill-round-gothic-regular-gb2312.woff") format("woff");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "ChillRoundGothic";
    src: url("/static/fonts/chill-round-gothic-bold-gb2312.woff") format("woff");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

:root {
    --green: #177b45;
    --green-dark: #105f35;
    --green-soft: #edf7f0;
    --green-line: #cfe5d6;
    --ink: #213129;
    --muted: #66746c;
    --soft: #8b958f;
    --line: #dce5df;
    --danger: #b5473c;
    --danger-soft: #fff3f1;
    --page: #f4f7f5;
    --font: "ChillRoundGothic", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    font-size: 17px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--page);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(23, 123, 69, 0.22);
    outline-offset: 3px;
}

[v-cloak] {
    display: none !important;
}

.icon {
    width: 20px;
    height: 20px;
    display: block;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.login-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(520px, 1.08fr) minmax(500px, 0.92fr);
}

.login-visual {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    color: #fff;
    background: #234c37;
}

.visual-image,
.visual-overlay {
    position: absolute;
    inset: 0;
}

.visual-image {
    background-image: url("/static/img/student-v2/meal-lunch.webp");
    background-position: center;
    background-size: cover;
    transform: scale(1.02);
}

.visual-overlay {
    background:
        linear-gradient(180deg, rgba(11, 38, 24, 0.22) 0%, rgba(11, 38, 24, 0.34) 38%, rgba(8, 35, 20, 0.84) 100%),
        linear-gradient(90deg, rgba(8, 35, 20, 0.36), rgba(8, 35, 20, 0.04));
}

.login-brand,
.visual-copy {
    position: relative;
    z-index: 2;
}

.login-brand {
    position: absolute;
    left: clamp(34px, 5vw, 76px);
    top: clamp(30px, 5vw, 64px);
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.brand-mark {
    width: 48px;
    height: 48px;
    display: block;
    color: var(--green);
}

.brand-mark svg {
    width: 100%;
    height: 100%;
    display: block;
}

.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand strong {
    font-size: 20px;
    letter-spacing: 0.03em;
}

.login-brand small {
    margin-top: 1px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 14px;
}

.visual-copy {
    position: absolute;
    left: clamp(34px, 5vw, 76px);
    right: clamp(34px, 6vw, 90px);
    bottom: clamp(52px, 9vh, 110px);
    max-width: 720px;
}

.visual-kicker {
    display: inline-block;
    margin-bottom: 13px;
    color: #ccebd5;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.visual-copy h1 {
    margin: 0;
    font-size: clamp(38px, 4.25vw, 66px);
    line-height: 1.14;
    letter-spacing: 0.01em;
    text-shadow: 0 3px 18px rgba(6, 25, 14, 0.24);
}

.visual-copy > p {
    max-width: 640px;
    margin: 20px 0 26px;
    color: rgba(255, 255, 255, 0.82);
    font-size: 17px;
    line-height: 1.75;
}

.visual-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
}

.visual-points span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 14px;
    font-weight: 700;
}

.visual-points .icon {
    width: 19px;
    height: 19px;
    padding: 3px;
    color: var(--green-dark);
    background: #dff3e5;
    border-radius: 50%;
    stroke-width: 2.5;
}

.login-panel {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 52px clamp(34px, 6.4vw, 104px);
    background:
        radial-gradient(circle at 82% 12%, rgba(217, 236, 223, 0.45), transparent 30%),
        var(--page);
}

.login-box {
    width: min(100%, 520px);
}

.mobile-brand {
    display: none;
}

.login-heading > span {
    color: var(--green);
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.login-heading h2 {
    margin: 7px 0 7px;
    font-size: clamp(30px, 3vw, 40px);
    line-height: 1.2;
}

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

.login-form {
    display: grid;
    gap: 21px;
    margin-top: 37px;
}

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

.form-field > span:first-child,
.form-field > label:first-child {
    font-size: 15px;
    font-weight: 800;
}

.input-shell {
    min-height: 57px;
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 0 14px;
    color: var(--soft);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(43, 66, 52, 0.035);
}

.input-shell:focus-within {
    color: var(--green);
    border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(23, 123, 69, 0.1);
}

.input-shell.has-error {
    color: var(--danger);
    border-color: #dfaca6;
    box-shadow: 0 0 0 3px rgba(181, 71, 60, 0.08);
}

.input-shell input {
    min-width: 0;
    height: 55px;
    border: 0;
    outline: 0;
    color: var(--ink);
    background: transparent;
    font-size: 17px;
}

.input-shell input::placeholder {
    color: #a1aaa5;
}

.password-toggle {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    color: var(--muted);
    background: transparent;
    border-radius: 9px;
    cursor: pointer;
}

.password-toggle:hover {
    color: var(--green);
    background: var(--green-soft);
}

.field-error {
    color: var(--danger);
    font-size: 14px;
}

.login-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 11px 12px;
    color: #943a32;
    background: var(--danger-soft);
    border: 1px solid #edcac5;
    border-radius: 10px;
    font-size: 14px;
}

.login-error .icon {
    margin-top: 1px;
}

.login-button {
    min-height: 57px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 1px solid var(--green);
    margin-top: 2px;
    padding: 0 20px;
    color: #fff;
    background: var(--green);
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(23, 123, 69, 0.16);
    font-size: 17px;
    font-weight: 800;
    cursor: pointer;
}

.login-button:hover:not(:disabled) {
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.login-button:disabled {
    cursor: wait;
    opacity: 0.7;
}

.login-button .icon {
    width: 19px;
    height: 19px;
}

.button-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.48);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.login-footer {
    margin: 28px 0 0;
    color: var(--soft);
    font-size: 14px;
    text-align: center;
}

@media (max-width: 980px) {
    .login-page {
        grid-template-columns: minmax(360px, 0.8fr) minmax(430px, 1.2fr);
    }

    .visual-copy h1 {
        font-size: 42px;
    }

    .visual-copy > p {
        font-size: 15px;
    }

    .visual-points {
        display: grid;
    }
}

@media (max-width: 760px) {
    .login-page {
        display: block;
    }

    .login-visual {
        display: none;
    }

    .login-panel {
        min-height: 100vh;
        padding: 32px 20px;
        background:
            radial-gradient(circle at 88% 4%, rgba(210, 235, 218, 0.72), transparent 30%),
            radial-gradient(circle at 8% 96%, rgba(229, 240, 232, 0.7), transparent 38%),
            var(--page);
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 42px;
        color: var(--green);
    }

    .mobile-brand .brand-mark {
        width: 44px;
        height: 44px;
    }

    .mobile-brand strong {
        color: var(--ink);
        font-size: 19px;
    }

    .login-heading h2 {
        font-size: 30px;
    }
}

@media (max-width: 420px) {
    .login-panel {
        align-items: start;
        padding: 24px 16px;
    }

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

    .login-form {
        margin-top: 28px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
