:root {
    --login-bg: #071221;
    --login-bg-soft: #0d1b30;
    --login-blue: #3d72ec;
    --login-cyan: #6fd6de;
    --login-white: #f8fafc;
    --login-muted: #8b99ad;
    --login-card-text: #172033;
    --login-border: #e4e9f1;
}

* {
    box-sizing: border-box;
}

html,
body.login-modern-page {
    min-height: 100%;
}

body.login-modern-page {
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 29% 2%, rgba(46, 91, 174, 0.2), transparent 35%),
        linear-gradient(135deg, #0a1629 0%, var(--login-bg) 58%, #0b1a27 100%);
    color: var(--login-white);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

.login-shell {
    position: relative;
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    isolation: isolate;
    overflow: hidden;
}

.login-shell::before,
.login-shell::after {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(91, 130, 173, 0.09);
    border-radius: 50%;
    content: "";
}

.login-shell::before {
    right: -250px;
    bottom: -340px;
    width: 670px;
    height: 670px;
    box-shadow: 0 0 100px rgba(46, 111, 184, 0.08) inset;
}

.login-shell::after {
    right: -120px;
    bottom: -200px;
    width: 390px;
    height: 390px;
}

.login-grid {
    position: absolute;
    inset: 0;
    z-index: -2;
    opacity: 0.55;
    background-image:
        linear-gradient(rgba(112, 144, 183, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(112, 144, 183, 0.045) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, transparent 0, #000 13%, #000 86%, transparent 100%);
}

.login-header {
    display: flex;
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
    padding: 24px 0 10px;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #f8fafc;
    font-size: 18px;
    letter-spacing: 0.02em;
}

.brand-mark {
    position: relative;
    display: inline-block;
    width: 43px;
    height: 43px;
    border: 1px solid rgba(151, 180, 224, 0.22);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.brand-shape {
    position: absolute;
    width: 20px;
    height: 11px;
    border-radius: 999px;
    transform: rotate(45deg);
}

.brand-shape-one {
    top: 11px;
    left: 8px;
    background: #f6f9ff;
}

.brand-shape-two {
    right: 7px;
    bottom: 10px;
    background: linear-gradient(90deg, #68a3ff, #65d7d4);
}

.system-health {
    display: flex;
    padding: 8px 13px;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(130, 154, 190, 0.12);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.035);
    color: #8f9caf;
    font-size: 12px;
}

.health-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #66e596;
    box-shadow: 0 0 10px rgba(102, 229, 150, 0.85);
}

.login-main {
    display: grid;
    width: min(1040px, calc(100% - 48px));
    margin: auto;
    padding: 28px 0 58px;
    grid-template-columns: minmax(0, 1.12fr) minmax(390px, 0.88fr);
    align-items: center;
    gap: 90px;
}

.login-hero {
    padding-bottom: 8px;
}

.secure-badge {
    display: inline-flex;
    margin-bottom: 28px;
    padding: 8px 13px;
    align-items: center;
    gap: 9px;
    border: 1px solid rgba(82, 185, 220, 0.17);
    border-radius: 999px;
    background: rgba(76, 151, 211, 0.07);
    color: #91a4be;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.18em;
}

.secure-badge i {
    color: var(--login-cyan);
}

.login-hero h1 {
    margin: 0;
    color: #f8fafc;
    font-size: clamp(44px, 4.5vw, 66px);
    font-weight: 700;
    line-height: 1.16;
    letter-spacing: -0.045em;
}

.login-hero h1 span {
    display: block;
    background: linear-gradient(92deg, #70a4ff 0%, #71d9da 74%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-description {
    max-width: 630px;
    margin: 25px 0 42px;
    color: var(--login-muted);
    font-size: 15px;
    line-height: 1.8;
}

.feature-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.feature-item {
    display: flex;
    min-width: 0;
    padding: 15px 13px;
    align-items: center;
    gap: 11px;
    border: 1px solid rgba(129, 157, 194, 0.11);
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.025);
}

.feature-icon {
    display: inline-flex;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: rgba(54, 108, 213, 0.15);
    color: #7ba7ff;
}

.feature-item strong,
.feature-item small {
    display: block;
    white-space: nowrap;
}

.feature-item strong {
    color: #d9e1ec;
    font-size: 13px;
    font-weight: 600;
}

.feature-item small {
    margin-top: 3px;
    color: #65738a;
    font-size: 10px;
}

.login-card {
    width: 100%;
    padding: 36px 38px 31px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 25px;
    background: rgba(251, 252, 254, 0.98);
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
    color: var(--login-card-text);
}

.card-access-row {
    display: flex;
    margin-bottom: 24px;
    align-items: center;
    justify-content: space-between;
    color: #a3afc0;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.22em;
}

.access-lock {
    display: inline-flex;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #edf3ff;
    color: var(--login-blue);
    font-size: 16px;
    letter-spacing: 0;
}

.login-card h2 {
    margin: 0;
    color: #1b2437;
    font-size: 29px;
    font-weight: 700;
    line-height: 1.25;
}

.login-welcome {
    margin: 8px 0 26px;
    color: #98a4b5;
    font-size: 13px;
}

.login-welcome strong {
    color: #536176;
}

.login-field {
    margin-bottom: 18px;
}

.login-field > label,
.field-label-row label {
    margin: 0 0 8px;
    color: #3c4658;
    font-size: 12px;
    font-weight: 600;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.field-label-row span {
    margin-bottom: 8px;
    color: #a5afbe;
    font-size: 10px;
}

.field-label-row span i {
    margin-right: 3px;
    color: #5e86ed;
}

.login-input-wrap {
    position: relative;
    display: flex;
    min-height: 49px;
    align-items: center;
    border: 1px solid var(--login-border);
    border-radius: 11px;
    background: #f9fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.login-input-wrap:focus-within {
    border-color: #7ca0f5;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(61, 114, 236, 0.09);
}

.login-input-wrap > i {
    width: 43px;
    flex: 0 0 43px;
    color: #9da9ba;
    text-align: center;
}

.login-modern-page .login-input-wrap .form-control {
    width: 100%;
    height: 47px !important;
    margin: 0;
    padding: 0 42px 0 0 !important;
    border: 0;
    border-radius: 11px !important;
    outline: 0;
    background: transparent !important;
    color: #273247;
    font-size: 13px;
    box-shadow: none !important;
}

.login-modern-page .login-input-wrap .form-control::placeholder {
    color: #b1bac7;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    width: 36px;
    height: 36px;
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    outline: 0;
    background: transparent;
    color: #9aa6b6;
    cursor: pointer;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--login-blue);
}

.login-modern-page label.error {
    position: absolute;
    top: calc(100% + 3px);
    left: 0;
    z-index: 2;
    margin: 0;
    color: #e45757;
    font-size: 10px;
    font-weight: 400;
    white-space: nowrap;
}

.login-modern-page .login-input-wrap:has(label.error) {
    margin-bottom: 15px;
}

.login-submit {
    display: flex;
    width: 100%;
    min-height: 51px;
    margin-top: 24px;
    padding: 0 20px;
    align-items: center;
    justify-content: center;
    gap: 12px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(100deg, #477af0, #3165dd);
    box-shadow: 0 12px 24px rgba(49, 101, 221, 0.24);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.login-submit:hover,
.login-submit:focus {
    transform: translateY(-1px);
    box-shadow: 0 15px 28px rgba(49, 101, 221, 0.31);
    color: #fff;
    outline: 0;
}

.login-submit:active {
    transform: translateY(0);
}

.login-submit:disabled {
    cursor: wait;
    opacity: 0.68;
}

.login-notice {
    margin-top: 34px;
    padding-top: 18px;
    border-top: 1px solid #edf0f5;
    color: #a7b0bd;
    font-size: 10px;
    line-height: 1.6;
}

.login-notice i {
    margin-right: 6px;
    color: #7e9fd7;
}

.login-footer {
    display: flex;
    padding: 0 24px 20px;
    justify-content: center;
    gap: 10px;
    color: #536075;
    font-size: 10px;
}

.footer-separator {
    color: #354257;
}

@media (max-width: 1100px) {
    .login-main {
        gap: 48px;
    }

    .feature-list {
        grid-template-columns: 1fr;
        max-width: 290px;
    }
}

@media (max-width: 840px) {
    .login-shell {
        min-height: 100svh;
    }

    .login-header {
        width: min(100% - 32px, 560px);
        padding-top: 18px;
    }

    .login-main {
        width: min(100% - 32px, 520px);
        padding: 35px 0 42px;
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .login-hero {
        text-align: center;
    }

    .secure-badge {
        margin-bottom: 17px;
    }

    .login-hero h1 {
        font-size: clamp(34px, 9vw, 48px);
    }

    .hero-description {
        margin: 16px auto 0;
        font-size: 13px;
    }

    .feature-list {
        display: none;
    }

    .login-card {
        padding: 30px 28px 27px;
        border-radius: 21px;
    }

    .login-footer {
        margin-top: auto;
    }
}

@media (max-width: 480px) {
    .system-health {
        padding: 8px 10px;
        font-size: 0;
    }

    .health-dot {
        width: 8px;
        height: 8px;
    }

    .login-main {
        width: min(100% - 22px, 440px);
        padding-top: 25px;
    }

    .login-hero h1 {
        font-size: 34px;
    }

    .hero-description {
        display: none;
    }

    .login-card {
        padding: 27px 20px 24px;
    }

    .card-access-row {
        margin-bottom: 20px;
    }

    .field-label-row span {
        display: none;
    }

    .login-notice {
        margin-top: 27px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
