* {
    box-sizing: border-box;
}

html {
    width: 100%;
    min-width: 0;
    -webkit-text-size-adjust: 100%;
}

.auth-modern-body {
    min-height: 100vh;
    margin: 0;
    padding: 32px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background:
        radial-gradient(circle at 14% 12%, rgba(111, 130, 255, 0.14), transparent 28%),
        radial-gradient(circle at 84% 4%, rgba(123, 140, 255, 0.12), transparent 30%),
        #f4f7ff;
    color: #1f2937;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    overflow-x: hidden;
}

@supports (min-height: 100svh) {
    .auth-modern-body {
        min-height: 100svh;
    }
}

.auth-modern-shell {
    width: min(1100px, 100%);
    min-height: 640px;
    display: grid;
    grid-template-columns: 40% 60%;
    background: #fff;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(47, 65, 155, 0.16);
}

.auth-brand-panel {
    position: relative;
    overflow: hidden;
    padding: 42px 38px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
    background: linear-gradient(145deg, #6f82ff 0%, #7285ff 48%, #7b8cff 100%);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
}

.auth-brand-panel::before {
    width: 220px;
    height: 220px;
    right: -90px;
    top: -80px;
}

.auth-brand-panel::after {
    width: 180px;
    height: 180px;
    left: -70px;
    bottom: 70px;
}

.auth-logo-row,
.auth-brand-content,
.auth-illustration {
    position: relative;
    z-index: 1;
}

.auth-logo-row {
    display: flex;
    align-items: center;
    gap: 14px;
    color: inherit;
    text-decoration: none;
}

.auth-logo-badge {
    width: 54px;
    height: 54px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    color: #667aff;
    background: #fff;
    font-size: 18px;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: 0 12px 26px rgba(28, 41, 133, 0.22);
}

.auth-logo-badge img {
    width: 44px;
    height: 44px;
    display: block;
    object-fit: contain;
}

.auth-brand-name {
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
}

.auth-brand-mini {
    margin-top: 4px;
    font-size: 12px;
    opacity: 0.78;
}

.auth-brand-content {
    margin-top: 74px;
}

.auth-brand-content h2 {
    margin: 0 0 16px;
    font-size: 36px;
    line-height: 1.15;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-brand-content p {
    max-width: 330px;
    margin: 0;
    font-size: 15px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.86);
}

.auth-illustration {
    min-height: 230px;
    margin-top: 42px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.auth-illustration-asset {
    position: relative;
    z-index: 1;
    width: min(100%, 360px);
    height: auto;
    display: block;
    filter: drop-shadow(0 24px 38px rgba(30, 41, 132, 0.24));
}

.auth-cloud-card {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 8px;
    height: 150px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(10px);
    box-shadow: 0 22px 55px rgba(25, 37, 122, 0.22);
}

.auth-cloud-card::before,
.auth-cloud-card::after {
    content: "";
    position: absolute;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.24);
}

.auth-cloud-card::before {
    width: 92px;
    height: 52px;
    left: 34px;
    top: 34px;
}

.auth-cloud-card::after {
    width: 130px;
    height: 12px;
    right: 36px;
    top: 48px;
    box-shadow: 0 32px 0 rgba(255, 255, 255, 0.18), 0 64px 0 rgba(255, 255, 255, 0.14);
}

.auth-server-stack {
    position: absolute;
    left: 54px;
    bottom: 42px;
    width: 132px;
    height: 92px;
}

.auth-server-stack span {
    position: absolute;
    left: 0;
    width: 132px;
    height: 34px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 20px rgba(46, 57, 149, 0.16);
}

.auth-server-stack span:nth-child(1) {
    top: 0;
}

.auth-server-stack span:nth-child(2) {
    top: 29px;
    opacity: 0.82;
}

.auth-server-stack span:nth-child(3) {
    top: 58px;
    opacity: 0.68;
}

.auth-server-stack span::after {
    content: "";
    position: absolute;
    left: 18px;
    top: 13px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #6f82ff;
    box-shadow: 18px 0 0 rgba(111, 130, 255, 0.45);
}

.auth-shield {
    position: absolute;
    right: 54px;
    bottom: 46px;
    width: 76px;
    height: 88px;
    border-radius: 38px 38px 28px 28px;
    background: rgba(255, 255, 255, 0.24);
    border: 1px solid rgba(255, 255, 255, 0.38);
}

.auth-shield::after {
    content: "";
    position: absolute;
    left: 26px;
    top: 26px;
    width: 23px;
    height: 34px;
    border: 4px solid #fff;
    border-top: 0;
    border-left: 0;
    transform: rotate(42deg);
}

.auth-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 58px;
    background: #fff;
}

.auth-form-card {
    width: 100%;
    max-width: 430px;
}

.auth-register-page .auth-form-card {
    max-width: 620px;
}

.auth-kicker {
    display: inline-flex;
    align-items: center;
    margin-bottom: 10px;
    color: #6f82ff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.auth-form-card h1 {
    margin: 0 0 10px;
    color: #1f2937;
    font-size: 32px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

.auth-form-subtitle {
    margin: 0 0 26px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.7;
}

.auth-modern-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.auth-modern-form + .auth-modern-form {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eef2f7;
}

.auth-modern-form label,
.auth-form-grid label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    color: #374151;
    font-size: 13px;
    font-weight: 700;
}

.auth-modern-form input,
.auth-modern-form select,
.auth-modern-form textarea,
.auth-form-grid input,
.auth-form-grid select,
.auth-form-grid textarea {
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    outline: none;
    background: #fff;
    color: #111827;
    font-size: 14px;
    box-shadow: 0 4px 14px rgba(17, 24, 39, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-modern-form textarea,
.auth-form-grid textarea {
    min-height: 92px;
    padding-top: 12px;
    resize: vertical;
}

.auth-modern-form input:focus,
.auth-modern-form select:focus,
.auth-modern-form textarea:focus,
.auth-form-grid input:focus,
.auth-form-grid select:focus,
.auth-form-grid textarea:focus {
    border-color: #6f82ff;
    box-shadow: 0 0 0 4px rgba(111, 130, 255, 0.12);
}

.auth-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
}

.auth-form-grid .full {
    grid-column: 1 / -1;
}

.system-card {
    background: #fff;
    border-radius: 10px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
    margin-bottom: 16px;
}

.system-card-title {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 22px;
    margin: 0 0 14px;
    padding-left: 10px;
    color: #1f2937;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.4;
}

.system-card-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 3px;
    bottom: 3px;
    width: 3px;
    border-radius: 999px;
    background: #6f82ff;
}

.auth-contact-card {
    border: 1px solid #eef2ff;
}

.auth-primary-btn,
.auth-modern-form > button[type="submit"],
.auth-form-card form > button[type="submit"] {
    width: 100%;
    min-height: 46px;
    margin-top: 6px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #6f82ff 0%, #7b61ff 100%);
    font-size: 15px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 24px rgba(111, 130, 255, 0.28);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-primary-btn:hover,
.auth-modern-form > button[type="submit"]:hover,
.auth-form-card form > button[type="submit"]:hover {
    transform: translateY(-1px);
    filter: brightness(1.02);
    box-shadow: 0 16px 30px rgba(111, 130, 255, 0.34);
}

.auth-code-btn,
.auth-form-grid label button[type="submit"] {
    width: 100%;
    min-height: 40px;
    margin-top: 2px;
    border: 1px solid rgba(111, 130, 255, 0.34);
    border-radius: 8px;
    color: #6174f6;
    background: #f5f7ff;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: none;
    transition: background 0.18s ease, border-color 0.18s ease;
}

.auth-code-btn:hover,
.auth-form-grid label button[type="submit"]:hover {
    background: #eef2ff;
    border-color: #6f82ff;
}

.auth-links,
.auth-modern-form .muted,
.auth-form-card .muted {
    margin: 16px 0 0;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.8;
    text-align: center;
}

.auth-links a,
.auth-modern-form .muted a,
.auth-form-card .muted a {
    color: #6f82ff;
    font-weight: 700;
    text-decoration: none;
}

.auth-links a:hover,
.auth-modern-form .muted a:hover,
.auth-form-card .muted a:hover {
    text-decoration: underline;
}

.alert {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.6;
}

.alert-info {
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
}

.alert-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.auth-footer {
    width: min(1100px, 100%);
    margin-top: 18px;
    color: #8b94a7;
    font-size: 12px;
    text-align: center;
}

.auth-footer a {
    color: #6f82ff;
}

.geetest-holder {
    position: relative;
    z-index: 20;
    min-height: 48px;
    margin: 4px 0 2px;
    max-width: 100%;
    overflow: visible;
}

.geetest-holder > * {
    max-width: 100% !important;
}

.geetest-loading,
.geetest-error {
    display: flex;
    align-items: center;
    min-height: 44px;
    border: 1px dashed #c8d6f0;
    border-radius: 8px;
    padding: 0 12px;
    color: #7b8497;
    background: #f8fbff;
    font-size: 13px;
}

.geetest-error {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fff7f7;
}

.geetest-help {
    margin: 2px 0 8px;
    color: #7b8497;
    font-size: 12px;
    line-height: 1.6;
}

@media (max-width: 900px) {
    .auth-modern-body {
        padding: 20px 12px;
        justify-content: flex-start;
    }

    .auth-modern-shell {
        width: min(560px, calc(100vw - 24px));
        min-height: auto;
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: 210px;
        padding: 28px;
    }

    .auth-brand-content {
        margin-top: 36px;
    }

    .auth-brand-content h2 {
        font-size: 28px;
    }

    .auth-brand-content p {
        max-width: none;
    }

    .auth-illustration {
        display: none;
    }

    .auth-form-panel {
        padding: 34px 22px;
    }

    .auth-form-card h1 {
        font-size: 28px;
    }

    .auth-form-grid {
        grid-template-columns: 1fr;
    }

    .auth-modern-form input,
    .auth-modern-form select,
    .auth-modern-form textarea,
    .auth-form-grid input,
    .auth-form-grid select,
    .auth-form-grid textarea {
        font-size: 16px;
    }
}

@media (max-width: 520px) {
    .auth-modern-body {
        width: 100%;
        padding: 10px;
        align-items: stretch;
        justify-content: flex-start;
        background:
            radial-gradient(circle at 88% 8%, rgba(121, 103, 255, 0.22), transparent 30%),
            radial-gradient(circle at 8% 2%, rgba(92, 150, 255, 0.14), transparent 28%),
            linear-gradient(180deg, #fbfaff 0%, #f5f7ff 100%);
    }

    .auth-brand-panel {
        display: flex;
        min-height: 142px;
        padding: 30px 28px 16px;
        justify-content: flex-start;
        color: #07143d;
        background: transparent;
        overflow: visible;
    }

    .auth-modern-shell {
        width: 100%;
        position: relative;
        display: block;
        overflow: hidden;
        border-radius: 30px;
        background:
            radial-gradient(circle at 91% 13%, rgba(120, 105, 255, 0.55) 0 56px, rgba(120, 105, 255, 0.22) 57px 150px, transparent 151px),
            radial-gradient(circle at 91% 30%, rgba(255,255,255,.9) 0 10px, rgba(255,255,255,.35) 11px 18px, transparent 19px),
            linear-gradient(145deg, #ffffff 0%, #f7f6ff 42%, #eef2ff 100%);
        box-shadow: 0 20px 55px rgba(73, 91, 180, 0.18);
    }

    .auth-modern-shell::before,
    .auth-modern-shell::after {
        content: "";
        position: absolute;
        pointer-events: none;
        border-radius: 999px;
    }

    .auth-modern-shell::before {
        right: -66px;
        top: -42px;
        width: 220px;
        height: 220px;
        border: 1px solid rgba(255, 255, 255, 0.56);
        background: rgba(118, 103, 255, 0.08);
    }

    .auth-modern-shell::after {
        right: 18px;
        top: 300px;
        width: 34px;
        height: 34px;
        background: linear-gradient(135deg, rgba(122, 104, 255, 0.75), rgba(255,255,255,.75));
        box-shadow: 0 12px 28px rgba(98, 84, 222, 0.3);
    }

    .auth-brand-panel::before,
    .auth-brand-panel::after {
        display: none;
    }

    .auth-logo-row {
        gap: 12px;
        color: #07143d;
    }

    .auth-logo-badge {
        width: 58px;
        height: 58px;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.72);
        box-shadow: 0 12px 30px rgba(99, 113, 225, 0.16);
    }

    .auth-logo-badge img {
        width: 50px;
        height: 50px;
    }

    .auth-brand-name {
        font-size: 24px;
        letter-spacing: 1px;
    }

    .auth-brand-mini {
        color: #526085;
        font-size: 14px;
        letter-spacing: 2px;
        opacity: 1;
    }

    .auth-brand-content,
    .auth-illustration {
        display: none;
    }

    .auth-form-panel {
        position: relative;
        z-index: 1;
        display: block;
        padding: 18px 18px 26px;
        background: transparent;
    }

    .auth-form-card {
        max-width: none;
        padding: 28px 20px 26px;
        border-radius: 28px;
        background: rgba(255, 255, 255, 0.9);
        border: 1px solid rgba(255, 255, 255, 0.78);
        box-shadow: 0 24px 50px rgba(68, 76, 140, 0.12);
        backdrop-filter: blur(12px);
    }

    .auth-kicker {
        margin-bottom: 8px;
        color: #4a73ff;
        font-size: 18px;
        font-weight: 900;
        letter-spacing: 0.8px;
    }

    .auth-form-card h1 {
        margin-bottom: 10px;
        color: #07143d;
        font-size: 44px;
        line-height: 1.05;
        letter-spacing: -1px;
    }

    .auth-form-subtitle {
        margin-bottom: 24px;
        color: #526085;
        font-size: 16px;
        line-height: 1.65;
    }

    .auth-modern-form,
    .auth-form-grid {
        gap: 14px;
    }

    .auth-modern-form label,
    .auth-form-grid label {
        gap: 9px;
        color: #07143d;
        font-size: 16px;
        font-weight: 900;
    }

    .auth-modern-form input,
    .auth-modern-form select,
    .auth-modern-form textarea,
    .auth-form-grid input,
    .auth-form-grid select,
    .auth-form-grid textarea {
        min-height: 56px;
        padding-left: 16px;
        padding-right: 16px;
        border-color: #dddff2;
        border-radius: 18px;
        background: linear-gradient(180deg, #fbfbff, #f7f7ff);
        color: #07143d;
        font-size: 16px;
        font-weight: 700;
        box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 10px 24px rgba(31, 39, 92, 0.06);
    }

    .auth-modern-form input:focus,
    .auth-modern-form select:focus,
    .auth-modern-form textarea:focus,
    .auth-form-grid input:focus,
    .auth-form-grid select:focus,
    .auth-form-grid textarea:focus {
        border-color: #7b61ff;
        box-shadow: 0 0 0 4px rgba(123, 97, 255, 0.13), 0 12px 26px rgba(31, 39, 92, 0.08);
    }

    .auth-primary-btn,
    .auth-modern-form > button[type="submit"],
    .auth-form-card form > button[type="submit"] {
        min-height: 58px;
        margin-top: 10px;
        border-radius: 999px;
        background: linear-gradient(135deg, #69a8ff 0%, #7d4dff 100%);
        color: #fff;
        font-size: 20px;
        font-weight: 900;
        box-shadow: 0 18px 34px rgba(112, 101, 255, 0.28);
    }

    .auth-code-btn,
    .auth-form-grid label button[type="submit"] {
        min-height: 42px;
        border-radius: 14px;
        background: #f4f5ff;
        font-size: 13px;
    }

    .system-card {
        padding: 15px;
        margin-bottom: 14px;
        border-radius: 18px;
        background: rgba(250, 251, 255, 0.88);
        box-shadow: none;
    }

    .system-card-title {
        margin-bottom: 12px;
        color: #07143d;
        font-size: 16px;
    }

    .auth-links,
    .auth-modern-form .muted,
    .auth-form-card .muted {
        position: relative;
        margin-top: 22px;
        padding-top: 0;
        color: #9aa1c0;
        font-size: 15px;
        line-height: 1.9;
    }

    .auth-links::before {
        content: none;
        display: none;
    }

    .auth-links::after {
        content: none;
        display: none;
    }

    .auth-links a,
    .auth-modern-form .muted a,
    .auth-form-card .muted a {
        color: #3972ff;
        font-size: 16px;
        font-weight: 900;
    }

    .auth-footer {
        width: 100%;
        margin-top: 14px;
        padding: 0 8px 8px;
        color: #9aa1c0;
        line-height: 1.7;
    }

    .alert {
        border-radius: 16px;
    }

    .geetest-holder {
        border-radius: 18px;
    }

    .geetest-loading,
    .geetest-error {
        min-height: 50px;
        border-radius: 16px;
    }
}

@media (max-width: 360px) {
    .auth-modern-body {
        padding: 8px;
    }

    .auth-form-panel {
        padding: 14px 12px 22px;
    }

    .auth-form-card {
        padding: 24px 16px;
        border-radius: 24px;
    }

    .auth-form-card h1 {
        font-size: 38px;
    }

    .auth-brand-panel {
        padding-left: 22px;
        padding-right: 22px;
    }
}
