* {
    box-sizing: border-box;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: #303133;
    background: #fff;
}

.invite-page-body {
    min-height: 100vh;
    background: #f3f6fb;
}

button,
input {
    font: inherit;
}

a {
    color: #409eff;
    text-decoration: none;
}

.login-container {
    display: flex;
    height: 100vh;
    min-height: 640px;
}

.login-left {
    position: relative;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px;
    background: #f5f7fa;
}

.login-left::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(245, 247, 250, 0) 0%, #f5f7fa 100%);
}

.page-logo {
    position: absolute;
    top: 30px;
    left: 40px;
    color: #303133;
    font-size: 20px;
    font-weight: 500;
    letter-spacing: 1px;
}

.login-left-content {
    text-align: center;
}

.login-left img {
    max-width: 500px;
    max-height: 500px;
    object-fit: contain;
}

.login-right {
    position: relative;
    display: flex;
    flex: 1;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 60px;
    background: #fff;
}

.login-right::before,
.login-right::after {
    content: "";
    position: absolute;
    z-index: 0;
    border-radius: 50%;
    opacity: 0.3;
}

.login-right::before {
    top: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
}

.login-right::after {
    bottom: -80px;
    left: -80px;
    width: 250px;
    height: 250px;
    background: linear-gradient(135deg, #f3e5f5 0%, #e1bee7 100%);
}

.login-form-wrapper,
.invite-card {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 380px;
}

.login-form-card,
.invite-card {
    padding: 40px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

.login-title {
    margin: 0 0 8px;
    color: #303133;
    font-size: 26px;
    font-weight: 500;
    text-align: center;
}

.login-subtitle {
    margin: 0 0 30px;
    color: #909399;
    font-size: 14px;
    text-align: center;
}

.login-form {
    display: grid;
    gap: 18px;
}

.login-input {
    position: relative;
    display: block;
}

.login-input input,
.plain-field input {
    width: 100%;
    height: 36px;
    min-height: 36px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    color: #303133;
    font-size: 14px;
    outline: none;
}

.login-input input {
    padding: 7px 30px 7px 34px;
}

.login-password-field input {
    padding-right: 48px;
}

.plain-field input {
    padding: 7px 12px;
}

.login-input input:focus,
.plain-field input:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.14);
}

.login-input input::placeholder,
.plain-field input::placeholder {
    color: #a8abb2;
}

.login-input-icon {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 10px;
    width: 16px;
    height: 16px;
    color: #c0c4cc;
    transform: translateY(-50%);
}

.login-input-icon svg {
    display: block;
    width: 16px;
    height: 16px;
}

.login-password-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    display: inline-grid;
    width: 28px;
    height: 28px;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: #a8abb2;
    cursor: pointer;
    transform: translateY(-50%);
}

.login-password-toggle:hover {
    color: #409eff;
    background: #f5f7fa;
}

.login-password-toggle svg {
    display: block;
    width: 16px;
    height: 16px;
}

.login-password-toggle .eye-closed {
    display: none;
}

.login-password-toggle.is-visible .eye-open {
    display: none;
}

.login-password-toggle.is-visible .eye-closed {
    display: block;
}

.login-option-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.login-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #409eff;
    cursor: pointer;
    font-size: 13px;
    font-weight: 400;
}

.login-checkbox input {
    width: 14px;
    height: 14px;
    min-height: 14px;
    margin: 0;
    accent-color: #409eff;
}

.login-link {
    padding: 0;
    border: 0;
    color: #409eff;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}

.login-link:hover {
    color: #1890ff;
}

.button {
    display: inline-flex;
    min-width: 88px;
    height: 36px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid #409eff;
    border-radius: 4px;
    color: #fff;
    background: #409eff;
    cursor: pointer;
    font-size: 14px;
}

.button:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}

.button-light {
    color: #606266;
    border-color: #dcdfe6;
    background: #fff;
}

.button-light:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

.login-btn {
    width: 220px;
    margin: 6px auto 0;
}

.login-footer {
    margin-top: 24px;
    color: #909399;
    font-size: 12px;
    text-align: center;
}

.login-alert {
    margin: 0 0 18px;
    padding: 10px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.login-alert.error {
    color: #c03535;
    background: #fff1f1;
}

.login-alert.success {
    color: #248a3d;
    background: #edf9ef;
}

.login-dialog[hidden] {
    display: none;
}

.login-dialog {
    position: fixed;
    z-index: 5000;
    inset: 0;
}

.login-dialog-mask {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
}

.login-dialog-panel {
    position: relative;
    width: 420px;
    max-width: calc(100vw - 32px);
    margin: 108px auto 0;
    padding: 18px 18px 12px;
    border-radius: 4px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.16);
}

.login-dialog-close {
    position: absolute;
    top: 12px;
    right: 14px;
    border: 0;
    color: #909399;
    background: transparent;
    cursor: pointer;
    font-size: 22px;
}

.login-dialog-panel h2 {
    margin: 0;
    color: #303133;
    font-size: 18px;
    font-weight: 500;
}

.login-dialog-body {
    display: flex;
    gap: 14px;
    margin-top: 18px;
    padding-right: 14px;
}

.login-dialog-icon {
    display: inline-grid;
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #909399;
    font-size: 14px;
    font-style: italic;
}

.login-dialog-body p {
    margin: 0;
    color: #606266;
    font-size: 15px;
    line-height: 1.7;
}

.login-dialog-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.invite-card {
    text-align: center;
}

.register-invite-page {
    min-height: 100vh;
    padding: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.register-invite-card {
    width: 380px;
    max-width: calc(100vw - 48px);
    padding: 42px 40px 38px;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 12px 34px rgba(30, 42, 68, 0.08);
    text-align: center;
}

.register-invite-card .login-title {
    margin-bottom: 12px;
    color: #111827;
    font-size: 26px;
    line-height: 1.3;
    font-weight: 500;
}

.register-invite-card .login-subtitle {
    margin-bottom: 18px;
}

.register-invite-card .invite-group {
    margin: 0 0 24px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.register-invite-card .invite-open,
.register-invite-card .invite-login-link {
    width: 220px;
    height: 36px;
}

.register-invite-card .invite-existing {
    margin-top: 18px;
    font-size: 14px;
}

.invite-group {
    margin: -12px 0 24px;
    padding: 8px 10px;
    border-radius: 4px;
    color: #606266;
    background: #f5f7fa;
    font-size: 13px;
}

.invite-open,
.invite-login-link {
    width: 220px;
    margin: 0 auto;
}

.invite-existing {
    display: block;
    margin-top: 18px;
    color: #409eff;
    font-size: 13px;
}

.invite-dialog-panel {
    width: 500px;
}

.invite-register-form {
    margin-top: 24px;
}

.invite-form-error {
    margin: 18px 0 0;
}

.plain-field {
    display: grid;
    gap: 8px;
    color: #606266;
    font-size: 14px;
    text-align: left;
}

@media (max-width: 900px) {
    .login-container {
        min-height: 100vh;
    }

    .login-left {
        display: none;
    }

    .login-right {
        padding: 24px;
    }

    .register-invite-page {
        padding: 20px;
    }

    .register-invite-card {
        max-width: 100%;
        padding: 34px 24px;
    }

    .login-form-card,
    .invite-card {
        padding: 32px 24px;
    }
}
