:root {
    --navy-950: #031b2b;
    --navy-900: #082f49;
    --navy-800: #0b3f5f;
    --blue-500: #16a9eb;
    --blue-400: #38bdf8;
    --gold-400: #e9ba45;
    --gold-500: #ca9221;
    --ink-900: #17212b;
    --ink-700: #3f4a56;
    --ink-500: #7b8794;
    --line: #e4e9ee;
    --surface: #f4f7f9;
    --white: #fff;
    --danger: #dc4c4c;
    --shadow: 0 24px 70px rgba(14, 34, 51, .12);
}

* { box-sizing: border-box; }

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

body {
    margin: 0;
    background: #eef3f6;
    color: var(--ink-900);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { cursor: pointer; }

.login-shell {
    display: grid;
    grid-template-columns: minmax(520px, 1.06fr) minmax(500px, .94fr);
    min-height: 100vh;
    overflow: hidden;
    background: var(--white);
}

.brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 48px clamp(48px, 6vw, 92px) 38px;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 18%, rgba(22, 169, 235, .18), transparent 29%),
        linear-gradient(145deg, var(--navy-950) 0%, #07314a 57%, #0b4463 100%);
    color: var(--white);
}

.brand-panel::after {
    position: absolute;
    right: -140px;
    bottom: -245px;
    width: 570px;
    height: 570px;
    border: 1px solid rgba(255, 255, 255, .06);
    border-radius: 50%;
    content: "";
}

.brand-panel__grid {
    position: absolute;
    inset: 0;
    opacity: .38;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 46px 46px;
    mask-image: linear-gradient(to bottom right, #000 5%, transparent 72%);
}

.brand-panel__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    pointer-events: none;
}

.brand-panel__glow--one {
    top: 13%;
    right: -9%;
    width: 300px;
    height: 300px;
    background: rgba(20, 164, 225, .07);
    box-shadow: 0 0 90px rgba(20, 164, 225, .12);
}

.brand-panel__glow--two {
    left: 19%;
    bottom: -9%;
    width: 240px;
    height: 240px;
    background: rgba(233, 186, 69, .05);
    box-shadow: 0 0 80px rgba(233, 186, 69, .08);
}

.brand-header,
.mobile-brand {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-mark {
    position: relative;
    display: grid;
    width: 52px;
    height: 58px;
    place-items: center;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.58);
    border-radius: 14px 14px 19px 19px;
    background: linear-gradient(145deg, #f1c75b, #b4770d 82%);
    box-shadow: 0 8px 25px rgba(0, 0, 0, .2), inset 0 1px rgba(255,255,255,.5);
}

.brand-mark::after {
    position: absolute;
    top: -28%;
    left: -40%;
    width: 60%;
    height: 150%;
    background: rgba(255,255,255,.15);
    content: "";
    transform: rotate(22deg);
}

.brand-mark span {
    color: var(--white);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 34px;
    font-style: italic;
    line-height: 1;
    transform: translateX(-1px);
}

.brand-name,
.brand-name-en { margin: 0; }

.brand-name {
    font-size: 19px;
    font-weight: 650;
    letter-spacing: .14em;
}

.brand-name-en {
    margin-top: 5px;
    color: rgba(255,255,255,.55);
    font-family: Arial, sans-serif;
    font-size: 9px;
    letter-spacing: .28em;
}

.brand-copy {
    position: relative;
    z-index: 3;
    width: min(545px, 100%);
    margin: auto 0;
    padding: 72px 0 58px;
}

.brand-eyebrow {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 26px;
    color: rgba(255,255,255,.54);
    font-family: Arial, sans-serif;
    font-size: 10px;
    letter-spacing: .28em;
}

.brand-eyebrow span { width: 36px; height: 1px; background: var(--gold-400); }

.brand-copy h1 {
    margin: 0;
    font-size: clamp(40px, 4.35vw, 66px);
    font-weight: 300;
    letter-spacing: .04em;
    line-height: 1.3;
}

.brand-copy h1 em {
    color: var(--gold-400);
    font-family: "STKaiti", "KaiTi", serif;
    font-style: normal;
    font-weight: 500;
}

.brand-description {
    max-width: 500px;
    margin: 26px 0 0;
    color: rgba(255,255,255,.63);
    font-size: 15px;
    letter-spacing: .07em;
    line-height: 1.9;
}

.brand-benefits {
    display: flex;
    gap: 48px;
    margin-top: 43px;
}

.benefit-item { display: flex; align-items: center; gap: 12px; }
.benefit-item > span:last-child { display: flex; flex-direction: column; gap: 4px; }
.benefit-item strong { font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.benefit-item small { color: rgba(255,255,255,.43); font-size: 11px; letter-spacing: .04em; }

.benefit-icon {
    display: grid;
    width: 40px;
    height: 40px;
    place-items: center;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 12px;
    background: rgba(255,255,255,.05);
}

.benefit-icon svg {
    width: 20px;
    fill: none;
    stroke: var(--gold-400);
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
}

.justice-visual {
    position: absolute;
    z-index: 2;
    right: clamp(-90px, -2vw, -20px);
    bottom: clamp(30px, 7vh, 92px);
    width: clamp(250px, 30vw, 420px);
    opacity: .14;
}

.justice-visual svg { width: 100%; overflow: visible; }
.justice-ring { fill: none; stroke: var(--white); stroke-width: 1; stroke-dasharray: 3 8; }
.justice-line { fill: none; stroke: var(--white); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.justice-fill { fill: var(--white); }
.justice-seal { fill: var(--gold-400); }

.justice-orbit {
    position: absolute;
    inset: 5%;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 50%;
    animation: orbit 28s linear infinite;
}

.justice-orbit::before {
    position: absolute;
    top: 19%;
    right: 1%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold-400);
    box-shadow: 0 0 16px var(--gold-400);
    content: "";
}

.brand-footer {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: rgba(255,255,255,.35);
    font-size: 9px;
    letter-spacing: .13em;
}

.form-panel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 64px clamp(42px, 6vw, 110px);
    background:
        radial-gradient(circle at 100% 0, rgba(22,169,235,.055), transparent 26%),
        var(--white);
}

.form-panel::before {
    position: absolute;
    top: 0;
    right: 0;
    width: 150px;
    height: 150px;
    border-top: 1px solid rgba(22,169,235,.1);
    border-right: 1px solid rgba(22,169,235,.1);
    content: "";
}

.mobile-brand { display: none; }

.login-card { width: min(100%, 430px); animation: reveal .65s cubic-bezier(.2,.7,.2,1) both; }

.login-heading { position: relative; margin-bottom: 38px; }

.login-heading__line {
    position: absolute;
    top: 4px;
    left: -22px;
    width: 3px;
    height: 48px;
    border-radius: 3px;
    background: linear-gradient(var(--gold-400), var(--gold-500));
}

.login-heading p {
    margin: 0 0 8px;
    color: var(--gold-500);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
}

.login-heading h2 {
    margin: 0;
    color: var(--ink-900);
    font-size: 31px;
    font-weight: 650;
    letter-spacing: .035em;
}

.login-heading > span:last-child {
    display: block;
    margin-top: 13px;
    color: var(--ink-500);
    font-size: 13px;
}

.form-notice {
    margin: -15px 0 22px;
    padding: 11px 13px;
    border: 1px solid #d7eaf3;
    border-radius: 9px;
    background: #f1f9fd;
    color: #24647f;
    font-size: 12px;
    line-height: 1.5;
}

.form-notice.is-error { border-color: #f2d2d2; background: #fff6f6; color: #ad3e3e; }

.field-group { margin-bottom: 22px; }

.field-group label {
    display: block;
    margin-bottom: 9px;
    color: var(--ink-700);
    font-size: 13px;
    font-weight: 600;
}

.field-control { position: relative; }

.field-control input {
    width: 100%;
    height: 54px;
    padding: 0 48px;
    border: 1px solid var(--line);
    border-radius: 10px;
    outline: none;
    background: #fbfcfd;
    color: var(--ink-900);
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.field-control input::placeholder { color: #adb5bd; }
.field-control input:hover { border-color: #cbd5dc; background: var(--white); }
.field-control input:focus { border-color: var(--blue-500); background: var(--white); box-shadow: 0 0 0 4px rgba(22,169,235,.1); }
.field-control.has-error input { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(220,76,76,.08); }

.field-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 16px;
    display: grid;
    width: 20px;
    place-items: center;
    color: #8e9aa5;
    transform: translateY(-50%);
    pointer-events: none;
}

.field-icon svg,
.password-toggle svg,
.security-note svg {
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.7;
}

.field-icon svg { width: 20px; }

.password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 36px;
    height: 36px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #8d98a2;
    transform: translateY(-50%);
}

.password-toggle:hover { background: #f0f4f6; color: var(--navy-800); }
.password-toggle:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 1px; }
.password-toggle svg { width: 19px; }
.password-toggle .eye-closed { display: none; }
.password-toggle[aria-pressed="true"] .eye-open { display: none; }
.password-toggle[aria-pressed="true"] .eye-closed { display: block; }

.field-error {
    min-height: 16px;
    margin: 5px 0 -13px;
    color: var(--danger);
    font-size: 11px;
}

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 0 28px;
    color: var(--ink-500);
    font-size: 12px;
}

.remember-option { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.remember-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }

.custom-checkbox {
    display: grid;
    width: 16px;
    height: 16px;
    place-items: center;
    border: 1px solid #cbd4db;
    border-radius: 4px;
    background: var(--white);
    transition: all .2s;
}

.custom-checkbox svg { width: 9px; fill: none; stroke: var(--white); stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; opacity: 0; }
.remember-option input:checked + .custom-checkbox { border-color: var(--blue-500); background: var(--blue-500); }
.remember-option input:checked + .custom-checkbox svg { opacity: 1; }
.remember-option input:focus-visible + .custom-checkbox { outline: 3px solid rgba(22,169,235,.17); }

.text-button {
    padding: 4px;
    border: 0;
    background: transparent;
    color: var(--blue-500);
    font-size: 12px;
}
.text-button:hover { color: #087eae; }
.text-button:focus-visible { border-radius: 4px; outline: 2px solid rgba(22,169,235,.45); outline-offset: 2px; }

.login-button {
    position: relative;
    display: flex;
    width: 100%;
    height: 54px;
    align-items: center;
    justify-content: center;
    gap: 11px;
    overflow: hidden;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(115deg, #087eae 0%, #10a5e8 58%, #38bdf8 100%);
    box-shadow: 0 12px 24px rgba(16, 165, 232, .22);
    color: var(--white);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: .12em;
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.login-button::before {
    position: absolute;
    top: 0;
    left: -75%;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.22), transparent);
    content: "";
    transform: skewX(-20deg);
    transition: left .55s;
}

.login-button:hover { box-shadow: 0 15px 28px rgba(16, 165, 232, .3); filter: saturate(1.08); transform: translateY(-1px); }
.login-button:hover::before { left: 130%; }
.login-button:active { box-shadow: 0 7px 15px rgba(16,165,232,.2); transform: translateY(1px); }
.login-button:focus-visible { outline: 3px solid rgba(22,169,235,.25); outline-offset: 3px; }
.login-button:disabled { cursor: wait; filter: grayscale(.1); opacity: .82; transform: none; }
.login-button > svg { width: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }

.button-loading { display: none; align-items: center; gap: 9px; letter-spacing: .06em; }
.button-loading i { width: 14px; height: 14px; border: 2px solid rgba(255,255,255,.35); border-top-color: var(--white); border-radius: 50%; animation: spin .7s linear infinite; }
.login-button.is-loading .button-label,
.login-button.is-loading > svg { display: none; }
.login-button.is-loading .button-loading { display: flex; }

.security-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 21px;
    color: #9aa4ad;
    font-size: 10px;
    line-height: 1.5;
}
.security-note svg { width: 14px; min-width: 14px; color: var(--gold-500); }

.form-footer {
    position: absolute;
    bottom: 27px;
    left: 50%;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #afb7be;
    font-size: 9px;
    letter-spacing: .06em;
    transform: translateX(-50%);
    white-space: nowrap;
}
.form-footer i { width: 2px; height: 2px; border-radius: 50%; background: #bec5ca; }

@keyframes reveal {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@media (max-width: 1080px) {
    .login-shell { grid-template-columns: minmax(400px, .86fr) minmax(470px, 1.14fr); }
    .brand-panel { padding-inline: 44px; }
    .brand-copy h1 { font-size: 45px; }
    .brand-benefits { flex-direction: column; gap: 18px; }
    .justice-visual { right: -110px; bottom: 70px; width: 340px; }
}

@media (max-width: 820px) {
    .login-shell { display: block; min-height: 100vh; background: var(--white); }
    .brand-panel { display: none; }
    .form-panel { min-height: 100vh; padding: 126px 28px 80px; background: linear-gradient(180deg, #eaf7fc 0, #fff 270px); }
    .form-panel::before { display: none; }
    .mobile-brand { position: absolute; top: 34px; left: 28px; display: flex; }
    .mobile-brand .brand-mark--small { width: 43px; height: 48px; border-color: rgba(255,255,255,.8); border-radius: 12px 12px 16px 16px; }
    .mobile-brand .brand-mark span { font-size: 27px; }
    .mobile-brand .brand-name { color: var(--navy-900); font-size: 16px; }
    .mobile-brand .brand-name-en { color: #7d9aaa; font-size: 8px; }
    .login-card { padding: 32px 28px; border: 1px solid #edf0f2; border-radius: 20px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); }
    .login-heading { margin-bottom: 30px; }
    .login-heading h2 { font-size: 27px; }
    .login-heading__line { left: -29px; }
    .form-footer { bottom: 23px; }
}

@media (max-width: 520px) {
    .form-panel { align-items: flex-start; padding: 112px 18px 70px; }
    .mobile-brand { top: 26px; left: 22px; }
    .login-card { width: 100%; padding: 27px 20px 25px; border-radius: 16px; box-shadow: 0 18px 45px rgba(14,34,51,.1); }
    .login-heading__line { display: none; }
    .login-heading h2 { font-size: 25px; }
    .field-control input { height: 52px; font-size: 13px; }
    .login-button { height: 52px; }
    .form-footer { position: absolute; width: 100%; justify-content: center; }
}

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