:root {
    --fast-font:
        "Microsoft YaHei UI",
        "Microsoft YaHei",
        "PingFang SC",
        "Segoe UI",
        Arial,
        sans-serif;

    --blue: #377df2;
    --blue-deep: #245fc9;
    --cyan: #31bdec;
    --text: #293f61;
    --muted: #8d9db1;
    --line: #d9e3ef;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-width: 320px;
    height: 100%;
    margin: 0;
}

body {
    overflow: hidden;
    color: var(--text);
    background: #061b42;
    font-family: var(--fast-font);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

button,
input {
    font-family: var(--fast-font);
}

.login-background {
    position: fixed;
    inset: 0;
    overflow: hidden;
    background:
        radial-gradient(
            circle at 50% 5%,
            rgba(25, 166, 222, 0.46),
            transparent 34%
        ),
        radial-gradient(
            circle at 12% 58%,
            rgba(33, 91, 195, 0.36),
            transparent 38%
        ),
        radial-gradient(
            circle at 86% 58%,
            rgba(22, 88, 183, 0.28),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            #06173b 0%,
            #083269 46%,
            #071a42 100%
        );
}

.bg-grid {
    position: absolute;
    inset: 0;
    opacity: 0.58;
    background-image:
        radial-gradient(
            rgba(82, 178, 255, 0.28) 1px,
            transparent 1px
        );
    background-size: 8px 8px;
    mask-image:
        linear-gradient(
            to bottom,
            #000 0%,
            rgba(0, 0, 0, 0.62) 64%,
            transparent 100%
        );
}

.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(35px);
}

.glow-one {
    width: 600px;
    height: 240px;
    left: 28%;
    top: -90px;
    background: rgba(34, 210, 239, 0.20);
}

.glow-two {
    width: 520px;
    height: 280px;
    right: 5%;
    bottom: -80px;
    background: rgba(45, 108, 241, 0.20);
}

.bg-wave {
    position: absolute;
    left: -8%;
    width: 116%;
    height: 300px;
    border-top: 1px solid rgba(93, 169, 255, 0.25);
    border-radius: 50%;
}

.wave-one {
    bottom: -115px;
    transform: rotate(-4deg);
    box-shadow:
        0 -24px 90px rgba(49, 132, 249, 0.13);
}

.wave-two {
    bottom: -185px;
    transform: rotate(4deg);
}

.login-page {
    position: relative;
    z-index: 3;
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    padding: 36px;
}

.login-card {
    display: grid;
    width: min(1180px, 86vw);
    height: min(650px, 76vh);
    min-height: 580px;
    grid-template-columns:
        minmax(0, 1.35fr)
        minmax(410px, 0.78fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.80);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.99);
    box-shadow:
        0 32px 90px rgba(2, 16, 45, 0.34);
}

.brand-side {
    position: relative;
    overflow: hidden;
    padding: 37px 42px;
    background:
        radial-gradient(
            circle at 52% 59%,
            rgba(50, 159, 251, 0.12),
            transparent 37%
        ),
        linear-gradient(
            145deg,
            #f6fbff 0%,
            #ffffff 47%,
            #eff8ff 100%
        );
}

.brand-header {
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 17px;
}

.brand-logo {
    display: flex;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    color: #ffffff;
    background:
        linear-gradient(
            135deg,
            #397df5,
            #35b8ed
        );
    box-shadow:
        0 9px 22px rgba(47, 125, 246, 0.24);
}

.brand-logo svg {
    width: 34px;
    height: 34px;
}

.brand-name {
    color: #2d4263;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.brand-en {
    margin-top: 5px;
    color: #98a8bb;
    font-size: 12px;
    letter-spacing: 0.72px;
}

.iot-scene {
    position: absolute;
    left: 50%;
    top: 53%;
    width: 520px;
    height: 390px;
    transform: translate(-50%, -50%);
}

.iot-halo {
    position: absolute;
    left: 50%;
    top: 49%;
    width: 390px;
    height: 280px;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background:
        radial-gradient(
            ellipse,
            rgba(44, 153, 248, 0.18),
            rgba(44, 153, 248, 0.04) 54%,
            transparent 74%
        );
}

.iot-ring {
    position: absolute;
    left: 50%;
    top: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.ring-outer {
    width: 340px;
    height: 340px;
    border:
        1px solid
        rgba(58, 137, 240, 0.20);
}

.ring-middle {
    width: 270px;
    height: 270px;
    border:
        1px dashed
        rgba(58, 137, 240, 0.20);
}

.ring-inner {
    width: 205px;
    height: 205px;
    border:
        1px solid
        rgba(55, 179, 235, 0.22);
}

.iot-network {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
    filter:
        drop-shadow(
            0 10px 22px
            rgba(44, 126, 235, 0.09)
        );
}

.city-silhouette {
    position: absolute;
    left: 50%;
    bottom: 4px;
    display: flex;
    width: 390px;
    height: 112px;
    align-items: flex-end;
    justify-content: center;
    gap: 8px;
    transform: translateX(-50%);
    border-bottom:
        1px solid
        rgba(70, 142, 234, 0.22);
    opacity: 0.82;
}

.building {
    display: block;
    width: 30px;
    border:
        1px solid
        rgba(70, 151, 242, 0.18);
    border-bottom: 0;
    background:
        linear-gradient(
            180deg,
            rgba(78, 167, 248, 0.28),
            rgba(78, 167, 248, 0.10)
        );
}

.b1 { height: 35px; }
.b2 { height: 54px; }
.b3 { height: 47px; }
.b4 { height: 66px; }
.b5 { height: 91px; }
.b6 { height: 52px; }
.b7 { height: 71px; }
.b8 { height: 45px; }
.b9 { height: 61px; }

.brand-caption {
    position: absolute;
    z-index: 4;
    left: 0;
    right: 0;
    bottom: 35px;
    text-align: center;
}

.brand-caption strong {
    display: block;
    color: #357cf0;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.4px;
}

.brand-caption span {
    display: block;
    margin-top: 7px;
    color: #91a1b6;
    font-size: 12px;
    letter-spacing: 0.25px;
}

.form-side {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    padding: 58px 54px 72px;
    background: #ffffff;
}

/* 右上装饰背景已正式移除 */
.form-side::before,
.form-side::after {
    display: none;
    content: none;
}

.login-box {
    width: 100%;
    max-width: 360px;
}

.welcome-block h1 {
    margin: 0;
    color: #2d4770;
    font-size: 30px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.2px;
}

.welcome-en {
    margin-top: 6px;
    color: #9cabbc;
    font-size: 14px;
}

.welcome-block p {
    margin: 10px 0 0;
    color: #75879f;
    font-size: 14px;
    line-height: 1.65;
}

.login-form {
    margin-top: 44px;
}

.field-row {
    position: relative;
    display: flex;
    min-height: 58px;
    align-items: center;
    border-bottom:
        1px solid
        #d4deea;
    transition:
        border-color 0.16s ease,
        box-shadow 0.16s ease;
}

.field-row:focus-within {
    border-color: #4c8df4;
    box-shadow:
        0 1px 0
        rgba(76, 141, 244, 0.10);
}

.field-icon {
    display: flex;
    width: 31px;
    flex: 0 0 31px;
    align-items: center;
    justify-content: flex-start;
    color: #4a8bf1;
}

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

.field-row input {
    width: 100%;
    min-width: 0;
    height: 56px;
    border: 0;
    outline: 0;
    color: #304968;
    background: transparent;
    font-size: 14px;
    line-height: 56px;
}

.field-row input::placeholder {
    color: #a4b0c1;
}

.send-code-btn {
    min-width: 112px;
    height: 38px;
    margin-left: 12px;
    padding: 0 12px;
    border:
        1px solid
        #8eb4f6;
    border-radius: 4px;
    color: #347cf0;
    background: #ffffff;
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
    transition:
        color 0.16s ease,
        border-color 0.16s ease,
        background 0.16s ease;
}

.send-code-btn:hover:not(:disabled) {
    border-color: #4b8cf4;
    background: #f6f9ff;
}

.send-code-btn:disabled {
    cursor: default;
    color: #94a4ba;
    border-color: #d4deea;
    background: #f7f9fc;
}

.login-message {
    min-height: 24px;
    margin-top: 10px;
    color: #d45656;
    font-size: 13px;
    line-height: 24px;
}

.login-message.success {
    color: #259b6e;
}

.login-btn {
    width: 100%;
    height: 48px;
    margin-top: 17px;
    border: 0;
    border-radius: 4px;
    outline: 0;
    color: #ffffff;
    background:
        linear-gradient(
            180deg,
            #4893f5 0%,
            #2f78e8 100%
        );
    box-shadow:
        0 10px 24px
        rgba(47, 120, 232, 0.19);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition:
        transform 0.16s ease,
        box-shadow 0.16s ease,
        filter 0.16s ease;
}

.login-btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow:
        0 13px 28px
        rgba(47, 120, 232, 0.23);
}

.login-btn:disabled {
    cursor: default;
    filter: grayscale(0.22);
    opacity: 0.72;
}

.login-footer {
    position: absolute;
    left: 50%;
    bottom: 22px;
    width: calc(100% - 52px);
    transform: translateX(-50%);
    color: #9caabb;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
    white-space: nowrap;
}

@media (max-width: 1100px) {
    .login-card {
        width: min(1000px, 92vw);
        grid-template-columns:
            minmax(0, 1.05fr)
            minmax(390px, 0.85fr);
    }

    .brand-name {
        font-size: 22px;
    }

    .iot-scene {
        transform:
            translate(-50%, -50%)
            scale(0.90);
    }
}

@media (max-width: 850px) {
    body {
        overflow-y: auto;
    }

    .login-page {
        min-height: 100%;
        height: auto;
        padding: 24px;
    }

    .login-card {
        width: min(540px, 100%);
        height: auto;
        min-height: 700px;
        grid-template-columns: 1fr;
    }

    .brand-side {
        min-height: 185px;
    }

    .brand-header {
        align-items: flex-start;
    }

    .brand-name {
        font-size: 20px;
    }

    .brand-en {
        line-height: 1.5;
    }

    .iot-scene,
    .brand-caption {
        display: none;
    }

    .form-side {
        min-height: 495px;
        padding: 46px 38px 76px;
    }
}

@media (max-width: 520px) {
    .login-page {
        padding: 12px;
    }

    .brand-side {
        padding: 28px 22px;
    }

    .brand-logo {
        width: 46px;
        height: 46px;
        flex-basis: 46px;
    }

    .brand-logo svg {
        width: 28px;
        height: 28px;
    }

    .brand-name {
        font-size: 18px;
    }

    .form-side {
        padding:
            40px
            24px
            74px;
    }

    .welcome-block h1 {
        font-size: 26px;
    }

    .welcome-block p {
        font-size: 13px;
    }

    .send-code-btn {
        min-width: 102px;
        padding: 0 8px;
        font-size: 12px;
    }

    .login-footer {
        font-size: 11px;
    }
}

.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* brand-logo transparent override */
.brand-logo {
    background: none !important;
    box-shadow: none !important;
    border: none !important;
}

.brand-logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
}

