* {
    box-sizing: border-box;
}

:root {
    --primary: #7138f4;
    --primary-dark: #5824d6;
    --ink: #282735;
    --muted: #7b788a;
    --line: #e2deea;
}

body {
    margin: 0;
    color: var(--ink);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
        "Microsoft YaHei", Arial, sans-serif;
    background: #eef3ff;
}

.login-page {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(420px, 1.08fr) minmax(430px, 0.92fr);
}

.login-visual {
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: clamp(50px, 7vw, 110px);
    background:
        radial-gradient(circle at 22% 18%, rgba(255, 255, 255, 0.22), transparent 26%),
        radial-gradient(circle at 84% 84%, rgba(193, 164, 255, 0.3), transparent 30%),
        linear-gradient(145deg, #6322eb 0%, #7f3fff 54%, #985fff 100%);
}

.login-visual::before,
.login-visual::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50%;
}

.login-visual::before {
    width: 520px;
    height: 520px;
    top: -270px;
    right: -180px;
}

.login-visual::after {
    width: 360px;
    height: 360px;
    bottom: -205px;
    left: -130px;
}

.visual-content {
    position: relative;
    z-index: 1;
    max-width: 580px;
    color: #fff;
}

.visual-badge {
    display: inline-flex;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.32);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.visual-content h1 {
    margin: 24px 0 15px;
    font-size: clamp(42px, 5.2vw, 74px);
    font-weight: 850;
    letter-spacing: -0.055em;
    line-height: 1.05;
}

.visual-content p {
    max-width: 500px;
    margin: 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: clamp(15px, 1.25vw, 19px);
    line-height: 1.8;
}

.visual-grid {
    display: grid;
    width: min(100%, 470px);
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 52px;
}

.visual-grid span {
    height: 74px;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.visual-grid span:nth-child(2),
.visual-grid span:nth-child(4),
.visual-grid span:nth-child(6) {
    background: rgba(255, 255, 255, 0.15);
}

.login-panel {
    display: grid;
    min-width: 0;
    place-items: center;
    padding: 42px;
    background:
        radial-gradient(circle at 100% 0%, rgba(113, 56, 244, 0.08), transparent 28%),
        #f7f8fc;
}

.login-card {
    width: min(100%, 440px);
    padding: 42px;
    border: 1px solid rgba(226, 222, 234, 0.9);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 22px 55px rgba(58, 45, 88, 0.1);
}

.login-logo {
    display: block;
    width: 240px;
    max-width: 78%;
    height: auto;
    margin-bottom: 42px;
}

.login-heading h2 {
    margin: 0;
    color: #242230;
    font-size: 28px;
    font-weight: 850;
    letter-spacing: -0.025em;
}

.login-heading p {
    margin: 9px 0 30px;
    color: var(--muted);
    font-size: 14px;
}

.login-field {
    display: grid;
    gap: 8px;
    margin-bottom: 20px;
    color: #565267;
    font-size: 13px;
    font-weight: 750;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
}

.input-shell input {
    width: 100%;
    height: 50px;
    padding: 0 14px 0 44px;
    border: 1px solid var(--line);
    border-radius: 11px;
    outline: none;
    background: #fff;
    color: #292635;
    font: inherit;
    font-size: 14px;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-shell input::placeholder {
    color: #aaa7b2;
}

.input-shell input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(113, 56, 244, 0.11);
}

.input-icon {
    position: absolute;
    z-index: 1;
    left: 17px;
    width: 14px;
    height: 14px;
    pointer-events: none;
}

.user-icon {
    border: 2px solid #9994a5;
    border-radius: 50%;
}

.user-icon::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 9px;
    top: 12px;
    left: -4px;
    border: 2px solid #9994a5;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
}

.lock-icon {
    top: 18px;
    border: 2px solid #9994a5;
    border-radius: 3px;
}

.lock-icon::before {
    content: "";
    position: absolute;
    width: 8px;
    height: 8px;
    top: -9px;
    left: 1px;
    border: 2px solid #9994a5;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.login-error {
    margin: -3px 0 17px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fff4f4;
    color: #b42323;
    font-size: 13px;
}

.login-button {
    width: 100%;
    height: 50px;
    margin-top: 5px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(135deg, #8247ff, #6825ed);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
    box-shadow: 0 11px 22px rgba(113, 56, 244, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(113, 56, 244, 0.3);
}

.login-footer {
    margin: 27px 0 0;
    color: #aaa7b2;
    font-size: 11px;
    text-align: center;
}

@media (max-width: 900px) {
    .login-page {
        grid-template-columns: 1fr;
    }

    .login-visual {
        min-height: 260px;
        padding: 50px 34px;
    }

    .visual-content h1 {
        margin-top: 16px;
        font-size: 42px;
    }

    .visual-grid {
        display: none;
    }

    .login-panel {
        padding: 34px 20px;
    }
}

@media (max-width: 520px) {
    .login-visual {
        min-height: 220px;
        padding: 38px 24px;
    }

    .visual-content h1 {
        font-size: 34px;
    }

    .visual-content p {
        font-size: 13px;
    }

    .login-card {
        padding: 30px 24px;
        border-radius: 18px;
    }

    .login-logo {
        width: 210px;
        margin-bottom: 34px;
    }
}
