:root {
    --dm-paper: #f4f0e6;
    --dm-paper-light: #fffdf7;
    --dm-forest: #143f34;
    --dm-forest-deep: #0c2d26;
    --dm-ink: #17241f;
    --dm-muted: #6f7b73;
    --dm-line: rgba(20, 63, 52, .16);
    --dm-coral: #ed735c;
    --dm-mint: #69b9a4;
}

* { box-sizing: border-box; }

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

body.dm-login-page {
    position: relative;
    min-height: 100vh;
    margin: 0;
    overflow-x: hidden;
    color: var(--dm-ink);
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background:
        radial-gradient(circle at 14% 18%, rgba(237, 115, 92, .12), transparent 25%),
        radial-gradient(circle at 78% 82%, rgba(105, 185, 164, .16), transparent 29%),
        var(--dm-paper);
}

.dm-login-page::before {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    content: "";
    opacity: .38;
    background-image:
        linear-gradient(rgba(20, 63, 52, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 63, 52, .055) 1px, transparent 1px);
    background-size: 32px 32px;
}

.dm-login-page::after {
    position: fixed;
    top: -110px;
    right: -130px;
    z-index: 0;
    width: 420px;
    height: 420px;
    content: "";
    opacity: .08;
    border-radius: 50%;
    background: var(--dm-forest);
    background-position: center;
    background-size: cover;
}

.login-header,
.login-shell { position: relative; z-index: 1; }

.login-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 64px));
    margin: 0 auto;
    padding: 28px 0 18px;
}

.login-brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--dm-forest);
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
}

.login-brand:hover,
.login-brand:focus { color: var(--dm-forest); text-decoration: none; }

.login-brand-mark {
    display: grid;
    width: 43px;
    height: 43px;
    place-items: center;
    color: var(--dm-paper-light);
    border-radius: 3px 14px 3px 14px;
    background: var(--dm-forest);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    letter-spacing: .5px;
    box-shadow: 5px 5px 0 rgba(237, 115, 92, .9);
}

.login-brand small {
    display: block;
    margin-top: 4px;
    color: var(--dm-muted);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: 1.7px;
}

.back-home {
    padding: 9px 14px;
    color: var(--dm-forest);
    border: 1px solid var(--dm-line);
    border-radius: 20px;
    font-size: 13px;
    transition: .2s ease;
}

.back-home:hover,
.back-home:focus {
    color: #fff;
    text-decoration: none;
    border-color: var(--dm-forest);
    background: var(--dm-forest);
}

.back-home i { margin-right: 6px; }

.login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 440px;
    gap: clamp(48px, 8vw, 110px);
    align-items: center;
    width: min(1120px, calc(100% - 64px));
    min-height: calc(100vh - 108px);
    margin: 0 auto;
    padding: 26px 0 64px;
}

.login-visual { max-width: 570px; animation: loginRise .65s ease both; }

.login-eyebrow {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 22px;
    color: var(--dm-forest);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 11px;
    letter-spacing: 1.9px;
}

.login-eyebrow span { width: 38px; height: 2px; background: var(--dm-coral); }

.login-visual h1 {
    margin: 0;
    color: var(--dm-forest-deep);
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: clamp(42px, 5vw, 68px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: -2px;
}

.login-visual h1 em { color: var(--dm-coral); font-style: normal; }

.login-intro {
    max-width: 500px;
    margin: 24px 0 30px;
    color: var(--dm-muted);
    font-size: 15px;
    line-height: 1.9;
}

.login-flow-card {
    overflow: hidden;
    max-width: 525px;
    border: 1px solid var(--dm-line);
    border-radius: 5px;
    background: rgba(255, 253, 247, .78);
    box-shadow: 16px 16px 0 rgba(20, 63, 52, .055);
    backdrop-filter: blur(7px);
}

.flow-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    color: var(--dm-forest);
    border-bottom: 1px solid var(--dm-line);
    font-size: 12px;
    font-weight: 700;
}

.flow-card-head span { display: flex; align-items: center; gap: 8px; }
.flow-card-head i { width: 7px; height: 7px; border-radius: 50%; background: var(--dm-mint); box-shadow: 0 0 0 4px rgba(105, 185, 164, .17); }
.flow-card-head small { color: #9a9f99; font-family: Georgia, serif; font-size: 9px; letter-spacing: 1.5px; }

.login-flow-card ol { margin: 0; padding: 7px 18px 10px; list-style: none; }
.login-flow-card li { display: grid; grid-template-columns: 34px 1fr 20px; gap: 13px; align-items: center; padding: 13px 0; color: #66736c; border-bottom: 1px dashed rgba(20, 63, 52, .13); }
.login-flow-card li:last-child { border-bottom: 0; }
.login-flow-card li b { color: #9aa59e; font-family: Georgia, serif; font-size: 12px; }
.login-flow-card li span { color: var(--dm-ink); font-size: 13px; font-weight: 700; }
.login-flow-card li span small { display: block; margin-top: 3px; color: #8b958f; font-size: 11px; font-weight: 400; }
.login-flow-card li > i { color: #aeb5b1; text-align: center; }
.login-flow-card li.is-done > i { color: var(--dm-mint); }
.login-flow-card li.is-active { margin: 0 -18px; padding-right: 18px; padding-left: 18px; background: rgba(237, 115, 92, .065); }
.login-flow-card li.is-active b,
.login-flow-card li.is-active > i { color: var(--dm-coral); }

.login-assurances { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 25px; color: #68746d; font-size: 11px; }
.login-assurances i { margin-right: 5px; color: var(--dm-forest); }

.login-panel {
    overflow: hidden;
    border: 1px solid rgba(20, 63, 52, .2);
    border-radius: 6px;
    background: rgba(255, 253, 247, .94);
    box-shadow: 0 28px 65px rgba(18, 50, 42, .16), 10px 10px 0 rgba(237, 115, 92, .12);
    animation: loginRise .65s .12s ease both;
}

.login-panel-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 22px;
    color: rgba(255, 255, 255, .76);
    background: var(--dm-forest);
    font-family: Georgia, serif;
    font-size: 9px;
    letter-spacing: 1.8px;
}

.login-panel-top i { color: var(--dm-coral); }
.login-form-wrap { padding: 34px 38px 30px; }
.login-heading { display: flex; align-items: center; gap: 15px; }
.login-heading-index { display: grid; flex: 0 0 43px; width: 43px; height: 43px; place-items: center; color: var(--dm-coral); border: 1px solid rgba(237, 115, 92, .42); border-radius: 50%; font-family: Georgia, serif; font-size: 12px; }
.login-heading p { margin: 0 0 3px; color: var(--dm-muted); font-size: 11px; letter-spacing: 2px; }
.login-heading h2 { margin: 0; color: var(--dm-forest-deep); font-family: Georgia, "Songti SC", "SimSun", serif; font-size: 26px; font-weight: 700; }
.login-hint { margin: 16px 0 28px; color: #7d8881; font-size: 12px; line-height: 1.7; }

.profile-img-card,
.profile-name-card { display: none; }

#errtips { margin-bottom: 17px; padding: 10px 12px; color: #a64031; border: 1px solid rgba(237, 115, 92, .35); border-radius: 3px; background: rgba(237, 115, 92, .09); font-size: 12px; }
#errtips.hide { display: none; }

.login-field { margin-bottom: 19px; }
.login-field > label { margin-bottom: 8px; color: var(--dm-forest); font-size: 12px; font-weight: 700; }
.login-input { position: relative; flex: 1; }
.login-input > i { position: absolute; top: 50%; left: 15px; z-index: 2; color: #87948c; font-size: 14px; transform: translateY(-50%); }
.login-input .form-control { width: 100%; height: 46px; padding: 10px 14px 10px 43px; color: var(--dm-ink); border: 1px solid rgba(20, 63, 52, .21); border-radius: 3px; background: rgba(255, 255, 255, .68); box-shadow: none; font-size: 13px; transition: .2s ease; }
.login-input .form-control:focus { border-color: var(--dm-mint); background: #fff; box-shadow: 0 0 0 3px rgba(105, 185, 164, .13); }
.login-input .form-control::placeholder { color: #a9afa9; }

.captcha-row { display: flex; gap: 10px; }
.captcha-image { flex: 0 0 118px; height: 46px; overflow: hidden; padding: 0; border: 1px solid rgba(20, 63, 52, .21); border-radius: 3px; background: #fff; cursor: pointer; }
.captcha-image img { display: block; width: 100%; height: 44px; object-fit: cover; }

.login-options { display: flex; align-items: center; justify-content: space-between; min-height: 24px; margin: 2px 0 21px; }
.login-options label { display: inline-flex; align-items: center; margin: 0; color: #68746d; font-size: 12px; font-weight: 400; cursor: pointer; }
.login-options label input { position: absolute; opacity: 0; }
.login-options label span { display: inline-block; width: 16px; height: 16px; margin-right: 7px; border: 1px solid rgba(20, 63, 52, .3); border-radius: 2px; background: #fff; }
.login-options label input:checked + span { position: relative; border-color: var(--dm-forest); background: var(--dm-forest); }
.login-options label input:checked + span::after { position: absolute; top: 1px; left: 4px; width: 6px; height: 10px; content: ""; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.login-options small { color: #8a948e; font-size: 10px; }
.login-options small i { margin-right: 4px; color: var(--dm-mint); }

.login-submit { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 50px; padding: 0 19px; color: #fff; border: 0; border-radius: 3px; background: var(--dm-forest); box-shadow: none; font-size: 14px; font-weight: 700; letter-spacing: .5px; transition: .2s ease; }
.login-submit:hover,
.login-submit:focus { color: #fff; background: var(--dm-forest-deep); box-shadow: 0 8px 20px rgba(20, 63, 52, .2); transform: translateY(-1px); }
.login-submit.disabled,
.login-submit[disabled] { color: rgba(255, 255, 255, .72); background: #668078; opacity: .72; }

.login-panel-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px 22px; color: #88938d; border-top: 1px solid var(--dm-line); background: rgba(20, 63, 52, .035); font-size: 9px; letter-spacing: .5px; }

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

@media (max-width: 940px) {
    .login-shell { grid-template-columns: minmax(0, 1fr) 400px; gap: 40px; }
    .login-visual h1 { font-size: 44px; }
}

@media (max-width: 780px) {
    .login-header { width: min(100% - 36px, 560px); padding-top: 20px; }
    .login-shell { display: block; width: min(100% - 36px, 500px); min-height: auto; padding: 34px 0 48px; }
    .login-visual { margin-bottom: 34px; }
    .login-visual h1 { font-size: 39px; letter-spacing: -1px; }
    .login-intro { margin-bottom: 20px; }
    .login-flow-card,
    .login-assurances { display: none; }
}

@media (max-width: 480px) {
    .login-header { width: calc(100% - 28px); }
    .login-brand { font-size: 14px; }
    .login-brand-mark { width: 38px; height: 38px; }
    .login-brand small { display: none; }
    .back-home { padding: 7px 10px; font-size: 11px; }
    .login-shell { width: calc(100% - 28px); padding-top: 24px; }
    .login-eyebrow { margin-bottom: 13px; font-size: 9px; letter-spacing: 1px; }
    .login-visual h1 { font-size: 34px; }
    .login-intro { margin-top: 14px; font-size: 13px; line-height: 1.7; }
    .login-form-wrap { padding: 28px 22px 25px; }
    .login-heading h2 { font-size: 23px; }
    .captcha-row { gap: 7px; }
    .captcha-image { flex-basis: 106px; }
    .login-options small { display: none; }
    .login-panel-footer { padding-right: 16px; padding-left: 16px; }
}

@media (prefers-reduced-motion: reduce) {
    .login-visual,
    .login-panel { animation: none; }
}

.logout-security {
    color: var(--dm-muted);
    font-size: 12px;
}

.logout-security i { margin-right: 6px; color: var(--dm-mint); }

.logout-shell {
    position: relative;
    z-index: 1;
    display: grid;
    min-height: calc(100vh - 108px);
    padding: 40px 20px 80px;
    place-items: center;
}

.logout-card {
    width: min(440px, 100%);
    overflow: hidden;
    border: 1px solid rgba(20, 63, 52, .2);
    border-radius: 6px;
    background: rgba(255, 253, 247, .96);
    box-shadow: 0 28px 65px rgba(18, 50, 42, .16), 10px 10px 0 rgba(237, 115, 92, .12);
    animation: loginRise .55s ease both;
}

.logout-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 42px;
    padding: 0 22px;
    color: rgba(255, 255, 255, .76);
    background: var(--dm-forest);
    font-family: Georgia, serif;
    font-size: 9px;
    letter-spacing: 1.8px;
}

.logout-card-top i { color: var(--dm-coral); font-size: 7px; }
.logout-card.is-complete .logout-card-top i { color: var(--dm-mint); }

.logout-card-body {
    padding: 48px 42px 42px;
    text-align: center;
}

.logout-symbol {
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto 24px;
    place-items: center;
    color: var(--dm-coral);
    border: 1px solid rgba(237, 115, 92, .36);
    border-radius: 50%;
    background: rgba(237, 115, 92, .07);
    font-size: 25px;
    box-shadow: 0 0 0 9px rgba(237, 115, 92, .04);
}

.is-complete .logout-symbol {
    color: var(--dm-forest);
    border-color: rgba(105, 185, 164, .5);
    background: rgba(105, 185, 164, .12);
    box-shadow: 0 0 0 9px rgba(105, 185, 164, .055);
}

.logout-eyebrow {
    margin: 0 0 8px !important;
    color: var(--dm-coral) !important;
    font-family: Georgia, serif;
    font-size: 9px !important;
    font-weight: 700;
    letter-spacing: 2px;
}

.is-complete .logout-eyebrow { color: var(--dm-mint) !important; }

.logout-card h1 {
    margin: 0;
    color: var(--dm-forest-deep);
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: 31px;
    font-weight: 700;
}

.logout-card-body > p:not(.logout-eyebrow) {
    margin: 15px 0 25px;
    color: var(--dm-muted);
    font-size: 12px;
    line-height: 1.8;
}

.logout-progress {
    position: relative;
    height: 3px;
    margin: 0 0 28px;
    overflow: hidden;
    border-radius: 2px;
    background: rgba(20, 63, 52, .1);
}

.logout-progress i {
    display: block;
    width: 100%;
    height: 100%;
    background: var(--dm-mint);
    transform-origin: left;
    animation: logoutComplete 1.6s linear both;
}

.logout-progress.is-loading i {
    width: 38%;
    background: var(--dm-coral);
    animation: logoutLoading .85s ease-in-out infinite alternate;
}

.logout-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 48px;
    padding: 0 18px;
    color: #fff;
    border: 0;
    border-radius: 3px;
    background: var(--dm-forest);
    font-size: 13px;
    font-weight: 700;
    transition: .2s ease;
}

.logout-action:hover,
.logout-action:focus {
    color: #fff;
    text-decoration: none;
    background: var(--dm-forest-deep);
    box-shadow: 0 8px 20px rgba(20, 63, 52, .18);
}

@keyframes logoutLoading {
    from { transform: translateX(-20%); }
    to { transform: translateX(185%); }
}

@keyframes logoutComplete {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@media (max-width: 480px) {
    .logout-security { display: none; }
    .logout-shell { min-height: calc(100vh - 82px); padding: 24px 14px 50px; }
    .logout-card-body { padding: 40px 24px 34px; }
}
