:root {
    --ink: #17211b;
    --muted: #6c766f;
    --paper: #fffefb;
    --canvas: #edf1eb;
    --forest: #164c3a;
    --forest-deep: #0e3025;
    --forest-soft: #e3eee8;
    --gold: #d8aa3f;
    --red: #c33c34;
    --line: #d8dfda;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    color: var(--ink);
    background:
        linear-gradient(rgba(22, 76, 58, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(22, 76, 58, 0.04) 1px, transparent 1px),
        var(--canvas);
    background-size: 28px 28px;
    font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

button,
input {
    font: inherit;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(360px, 0.9fr) minmax(500px, 1.1fr);
    width: min(1180px, calc(100% - 56px));
    min-height: min(720px, calc(100vh - 80px));
    margin: 40px auto;
    overflow: hidden;
    background: var(--paper);
    border: 1px solid rgba(23, 33, 27, 0.08);
    border-radius: 7px 7px 34px 7px;
    box-shadow: 0 30px 90px rgba(22, 42, 31, 0.14);
}

.login-thesis {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 62px 56px 42px;
    color: white;
    background: var(--forest-deep);
}

.login-thesis::before,
.login-thesis::after {
    position: absolute;
    border: 1px solid rgba(216, 170, 63, 0.24);
    border-radius: 50%;
    content: "";
}

.login-thesis::before {
    right: -180px;
    bottom: 70px;
    width: 390px;
    height: 390px;
}

.login-thesis::after {
    right: -112px;
    bottom: 138px;
    width: 250px;
    height: 250px;
    border-width: 34px;
}

.eyebrow {
    margin: 0 0 18px;
    color: var(--gold);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.18em;
}

.login-thesis h1 {
    position: relative;
    z-index: 1;
    max-width: 440px;
    margin: 0;
    font-family: Georgia, "Songti SC", serif;
    font-size: clamp(46px, 5vw, 70px);
    font-weight: 500;
    letter-spacing: -0.055em;
    line-height: 1.08;
}

.brand-copy {
    position: relative;
    z-index: 1;
    max-width: 390px;
    margin: 28px 0 0;
    color: rgba(255, 255, 255, 0.58);
    font-size: 14px;
    line-height: 1.9;
}

.thesis-footer {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 20px;
    color: rgba(255, 255, 255, 0.42);
    font-size: 9px;
    letter-spacing: 0.16em;
}

.login-panel {
    display: grid;
    place-items: center;
    padding: 62px;
}

.login-card {
    width: min(100%, 440px);
}

.login-heading {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 22px;
    margin-bottom: 38px;
}

.step-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    color: var(--forest);
    background: var(--forest-soft);
    border-radius: 4px 4px 13px 4px;
    font-family: Georgia, serif;
    font-size: 13px;
}

.login-heading .eyebrow {
    margin-bottom: 8px;
    color: var(--forest);
}

.login-heading h2 {
    margin: 0 0 9px;
    font-family: Georgia, "Songti SC", serif;
    font-size: 34px;
    font-weight: 500;
}

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

.login-error {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: -15px 0 22px;
    padding: 12px 14px;
    color: var(--red);
    background: #fff0ed;
    border-left: 3px solid var(--red);
    border-radius: 3px;
    font-size: 12px;
}

.login-error i,
.access-note i {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
}

.login-form {
    display: grid;
    gap: 20px;
}

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

.login-form label span {
    color: var(--forest);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.05em;
}

.login-form input {
    width: 100%;
    padding: 15px 14px;
    color: var(--ink);
    background: #f7f9f6;
    border: 1px solid #d4dcd6;
    border-radius: 4px;
    outline: none;
    transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

.login-form input:focus {
    background: white;
    border-color: var(--forest);
    box-shadow: 0 0 0 4px rgba(22, 76, 58, 0.1);
}

.login-form input::placeholder {
    color: #aeb6b0;
    font-size: 11px;
}

.login-form button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    margin-top: 6px;
    padding: 0 19px;
    color: white;
    background: var(--forest);
    border: 0;
    border-radius: 4px 4px 15px 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 750;
}

.login-form button:hover {
    background: #103e2f;
}

.login-form button span {
    color: var(--gold);
    font-size: 19px;
}

.access-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 28px 0 0;
    padding-top: 20px;
    color: var(--muted);
    border-top: 1px solid var(--line);
    font-size: 10px;
}

.access-note i {
    color: var(--gold);
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .login-thesis {
        min-height: 360px;
        padding: 44px 38px 30px;
    }

    .login-thesis h1 {
        max-width: 620px;
    }
}

@media (max-width: 560px) {
    .login-shell {
        width: min(100% - 24px, 1180px);
        margin: 12px auto;
    }

    .login-thesis {
        min-height: 300px;
        padding: 36px 25px 25px;
    }

    .login-thesis h1 {
        font-size: 42px;
    }

    .thesis-footer span:last-child {
        display: none;
    }

    .login-panel {
        padding: 42px 24px;
    }

    .login-heading {
        gap: 15px;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}
