:root {
    color-scheme: light;
    --canvas-ink: #202724;
    --canvas-ink-soft: #313a36;
    --surface-warm: #f2f0e9;
    --surface-paper: #fbfaf6;
    --text-strong: #242824;
    --text-muted: #636a63;
    --line-subtle: #d6d3c9;
    --accent-copper: #b95b2a;
    --accent-copper-dark: #92431f;
    --error-deep: #a83828;
    --focus-ring: rgb(185 91 42 / 32%);
    font-family: "Satoshi", "Geist", "Microsoft YaHei", "PingFang SC", sans-serif;
    background: var(--surface-warm);
    color: var(--text-strong);
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    margin: 0;
}

button,
input {
    font: inherit;
}

button {
    touch-action: manipulation;
}

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(440px, 5fr);
    min-height: 100dvh;
    overflow: hidden;
}

.login-panel {
    display: grid;
    grid-column: 2;
    align-content: center;
    min-width: 0;
    padding: clamp(36px, 7vw, 112px);
    background: var(--surface-warm);
}

.login-content {
    width: min(100%, 428px);
    animation: panel-enter 460ms cubic-bezier(.2, .75, .25, 1) both;
}

.section-label,
.system-kicker {
    margin: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    line-height: 1.4;
}

.section-label {
    color: var(--accent-copper-dark);
}

h1,
h2,
p {
    overflow-wrap: anywhere;
}

h1 {
    margin: 16px 0 0;
    color: var(--text-strong);
    font-size: clamp(34px, 3.2vw, 48px);
    font-weight: 750;
    letter-spacing: -.055em;
    line-height: 1.08;
}

.login-description {
    max-width: 31rem;
    margin: 16px 0 36px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.75;
}

.field-group + .field-group {
    margin-top: 22px;
}

label {
    display: block;
    margin-bottom: 9px;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
}

input {
    width: 100%;
    min-height: 52px;
    border: 1px solid var(--line-subtle);
    border-radius: 10px;
    outline: none;
    padding: 0 15px;
    background: var(--surface-paper);
    color: var(--text-strong);
    font-size: 16px;
    transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}

input::placeholder {
    color: #92958e;
}

input:hover {
    border-color: #aaa79d;
}

input:focus {
    border-color: var(--accent-copper);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.password-control {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.password-control input {
    border-radius: 10px 0 0 10px;
}

.password-control:focus-within .password-toggle {
    border-color: var(--accent-copper);
    box-shadow: 3px 0 0 var(--focus-ring);
}

.password-toggle {
    min-width: 58px;
    min-height: 52px;
    border: 1px solid var(--line-subtle);
    border-left: 0;
    border-radius: 0 10px 10px 0;
    padding: 0 12px;
    background: var(--surface-paper);
    color: var(--accent-copper-dark);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease, transform 140ms ease;
}

.password-toggle:hover {
    background: #f1e6de;
}

.password-toggle:active,
.login-submit:active {
    transform: translateY(1px);
}

.password-toggle:focus-visible,
.login-submit:focus-visible {
    outline: 3px solid var(--focus-ring);
    outline-offset: 3px;
}

.login-error {
    margin: 20px 0 0;
    border-left: 3px solid var(--error-deep);
    padding: 8px 0 8px 12px;
    color: var(--error-deep);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.55;
}

.login-submit {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 54px;
    margin-top: 30px;
    border: 1px solid var(--accent-copper);
    border-radius: 10px;
    padding: 0 18px 0 20px;
    background: var(--accent-copper);
    color: #fffaf5;
    cursor: pointer;
    font-size: 15px;
    font-weight: 750;
    letter-spacing: .01em;
    transition: background-color 180ms ease, border-color 180ms ease, opacity 180ms ease, transform 140ms ease;
}

.login-submit:hover {
    border-color: var(--accent-copper-dark);
    background: var(--accent-copper-dark);
}

.login-submit:disabled {
    cursor: wait;
    opacity: .7;
}

.login-submit svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.session-note {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 22px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    line-height: 1.5;
}

.session-note svg {
    width: 17px;
    height: 17px;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.system-panel {
    position: relative;
    display: grid;
    grid-column: 1;
    grid-row: 1;
    align-content: space-between;
    min-width: 0;
    padding: clamp(36px, 7vw, 112px);
    overflow: hidden;
    background: var(--canvas-ink);
    color: #f4f1e9;
}

.system-grid {
    position: absolute;
    inset: 0;
    opacity: .42;
    background-image: linear-gradient(rgb(245 241 233 / 7%) 1px, transparent 1px), linear-gradient(90deg, rgb(245 241 233 / 7%) 1px, transparent 1px);
    background-position: center;
    background-size: 44px 44px;
}

.system-content,
.security-status {
    position: relative;
    z-index: 1;
}

.system-content {
    align-self: end;
    max-width: 460px;
    animation: panel-enter 500ms 70ms cubic-bezier(.2, .75, .25, 1) both;
}

.system-mark {
    display: grid;
    width: 52px;
    height: 52px;
    margin-bottom: clamp(40px, 8vh, 88px);
    border: 1px solid rgb(244 241 233 / 32%);
    place-items: center;
}

.system-mark svg {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: #e6b38f;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.35;
}

.system-kicker {
    color: #e6b38f;
}

h2 {
    margin: 15px 0 0;
    color: #f7f4ec;
    font-size: clamp(40px, 4.5vw, 68px);
    font-weight: 750;
    letter-spacing: -.07em;
    line-height: .98;
}

.system-description {
    max-width: 22rem;
    margin: 28px 0 0;
    color: #c0c4bb;
    font-size: 15px;
    line-height: 1.8;
}

.security-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    align-self: end;
    margin: 0;
    color: #c0c4bb;
    font-size: 13px;
    line-height: 1.4;
}

.security-status span {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #e6b38f;
}

@keyframes panel-enter {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767px) {
    .login-shell {
        grid-template-columns: minmax(0, 1fr);
        overflow: visible;
    }

    .login-panel {
        grid-column: 1;
        grid-row: 1;
        min-height: min(100dvh, 760px);
        padding: 48px clamp(24px, 7vw, 40px);
    }

    .system-panel {
        grid-column: 1;
        grid-row: 2;
        min-height: 232px;
        padding: 36px clamp(24px, 7vw, 40px);
    }

    .system-mark {
        width: 42px;
        height: 42px;
        margin-bottom: 36px;
    }

    .system-mark svg {
        width: 27px;
        height: 27px;
    }

    h2 {
        font-size: clamp(38px, 13vw, 58px);
    }

    .system-description {
        display: none;
    }
}

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