/* 现代管理后台登录页样式 */

:root {
    --bg: #f4f7fb;
    --card: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --border: #e2e8f0;
    --primary: #2563eb;
    --primary-strong: #1d4ed8;
    --primary-soft: rgba(37, 99, 235, 0.14);
    --field-bg: #f8fafc;
    --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.14);
    --radius-lg: 24px;
    --radius-md: 16px;
    --radius-sm: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    min-height: 100dvh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        radial-gradient(900px 450px at 0% 0%, #dbeafe 0%, rgba(219, 234, 254, 0) 60%),
        radial-gradient(900px 450px at 100% 0%, #e0f2fe 0%, rgba(224, 242, 254, 0) 55%),
        var(--bg);
}

a {
    color: inherit;
    text-decoration: none;
}

.login-container {
    width: 100%;
    max-width: 980px;
    animation: fadeIn 0.35s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.login-card {
    display: grid;
    grid-template-columns: 1fr;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    border: 1px solid var(--border);
}

.login-aside {
    position: relative;
    padding: 36px 28px;
    color: #f8fafc;
    background: linear-gradient(155deg, #1d4ed8 0%, #3b82f6 45%, #0ea5e9 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 12px;
}

.login-aside::before,
.login-aside::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    opacity: 0.3;
    background: rgba(255, 255, 255, 0.35);
}

.login-aside::before {
    width: 220px;
    height: 220px;
    top: -80px;
    right: -80px;
}

.login-aside::after {
    width: 140px;
    height: 140px;
    bottom: -60px;
    left: -40px;
}

.login-logo {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
}

.login-logo svg {
    width: 56px;
    height: 56px;
    margin-bottom: 6px;
}

.login-title {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.4px;
    color: #ffffff;
}

.login-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.82);
    max-width: 320px;
}

.login-main {
    padding: 36px 28px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 20px;
}

.login-main-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.login-brand-mobile {
    display: none;
}

.login-brand-mobile svg {
    width: 56px;
    height: 56px;
}

.login-main-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
}

.login-main-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

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

.form-input {
    width: 100%;
    height: 46px;
    padding: 12px 14px;
    font-size: 16px;
    color: var(--text-primary);
    background: var(--field-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    -webkit-appearance: none;
    outline: none;
}

.form-input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}

.form-input::placeholder {
    color: #94a3b8;
}

.form-input-icon {
    position: absolute;
    right: 10px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    transition: color 0.2s ease, background 0.2s ease;
}

.form-input-icon:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.06);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.form-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    user-select: none;
}

.form-checkbox input {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.form-forgot {
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.2s ease;
}

.form-forgot:hover {
    color: var(--primary-strong);
}

.form-button {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--radius-sm);
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-strong) 100%);
    cursor: pointer;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.28);
}

.form-button:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.3);
}

.form-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.24);
}

.form-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

.form-button.loading {
    color: transparent;
}

.form-button.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.form-footer {
    display: flex;
    justify-content: center;
    padding-top: 18px;
    margin-top: 6px;
    border-top: 1px solid var(--border);
}

.form-footer-link {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.2s ease;
}

.form-footer-link:hover {
    color: var(--primary);
}

.registerDialog {
    width: min(520px, 94vw);
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
    background: #ffffff;
}

.registerDialog .el-dialog__header {
    padding: 20px 24px 16px;
    background: #ffffff;
    border-bottom: none;
}

.registerDialog .el-dialog__headerbtn {
    top: 12px;
    right: 12px;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    transition: background 0.2s ease, transform 0.2s ease;
}

.registerDialog .el-dialog__headerbtn:hover {
    background: #e2e8f0;
    transform: scale(1.02);
}

.registerDialog .el-dialog__close {
    font-size: 18px;
    color: var(--text-secondary);
}

.registerDialog .el-dialog__title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.registerDialog .el-dialog__body {
    padding: 8px 24px 20px;
}

.registerDialog .el-dialog__footer {
    padding: 0 24px 24px;
    border-top: none;
    background: transparent;
}

.registerDialog .dialog-footer {
    display: flex;
    justify-content: center;
}

.registerDialog .el-form-item {
    margin-bottom: 14px;
}

.registerDialog .el-form-item__content {
    margin-left: 0 !important;
}

.registerDialog .el-row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.registerDialog .el-col {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.registerDialog .el-input__inner {
    height: 46px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    font-size: 15px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.registerDialog .el-input__inner:focus {
    border-color: #3b82f6;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.12);
}

.registerDialog .el-button {
    height: 42px;
    border-radius: 12px;
    font-weight: 600;
}

.registerDialog .el-button--default {
    background: #f1f5f9;
    border-color: #e2e8f0;
    color: #475569;
}

.registerDialog .el-button--primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: transparent;
}

.registerDialog .el-button--primary:hover,
.registerDialog .el-button--primary:focus {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: transparent;
}

.registerDialog .captcha-img {
    width: 100%;
    height: 46px;
    border-radius: 12px;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    object-fit: cover;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    display: block;
}

.registerDialog .captcha-img:hover {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.registerDialog .captcha-img:hover {
    border-color: var(--primary);
}

@media (min-width: 960px) {
    .login-card {
        grid-template-columns: 0.95fr 1.05fr;
        min-height: 560px;
    }

    .login-aside {
        padding: 56px 48px;
    }

    .login-logo svg {
        width: 64px;
        height: 64px;
    }

    .login-title {
        font-size: 28px;
    }

    .login-main {
        padding: 56px 52px 60px;
        gap: 26px;
    }

    .login-main-title {
        font-size: 22px;
    }

    .login-main-subtitle {
        font-size: 15px;
    }
}

@media (max-width: 640px) {
    body {
        align-items: flex-start;
        padding: 0;
        background: #f8fafc;
    }

    .login-container {
        max-width: 100%;
        animation: none;
    }

    .login-card {
        border: none;
        box-shadow: none;
        border-radius: 0;
        background: transparent;
        overflow: visible;
    }

    .login-aside {
        display: none;
    }

    .login-main {
        padding: 40px 22px 28px;
        gap: 18px;
    }

    .login-brand-mobile {
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 4px;
    }

    .login-brand-mobile svg {
        width: 64px;
        height: 64px;
    }

    .login-main-title {
        font-size: 20px;
        text-align: center;
    }

    .login-main-subtitle {
        font-size: 13px;
        text-align: center;
    }

    .login-form {
        gap: 16px;
    }

    .form-input {
        height: 48px;
    }

    .form-button {
        height: 50px;
        box-shadow: 0 12px 26px rgba(37, 99, 235, 0.26);
    }

    .form-footer {
        border-top: none;
        padding-top: 10px;
    }

    .registerDialog {
        width: calc(100vw - 32px);
        max-width: 100%;
        margin: 0 auto;
        border-radius: 18px;
    }

    .registerDialog .el-dialog__header {
        padding: 18px 18px 12px;
    }

    .registerDialog .el-dialog__body {
        padding: 8px 18px 16px;
    }

    .registerDialog .el-dialog__footer {
        padding: 0 18px 18px;
    }

    .registerDialog .dialog-footer {
        justify-content: center;
    }

    .registerDialog .el-button {
        width: 100%;
    }

    .registerDialog .el-row {
        display: flex;
        gap: 8px;
    }

    .registerDialog .el-col {
        padding: 0 !important;
    }

    .registerDialog .el-col-14 {
        flex: 1 1 58%;
        max-width: 58%;
    }

    .registerDialog .el-col-10 {
        flex: 1 1 42%;
        max-width: 42%;
    }
}

.fade-enter-active, .fade-leave-active {
    transition: opacity 0.2s ease;
}

.fade-enter, .fade-leave-to {
    opacity: 0;
}

.slide-up-enter-active, .slide-up-leave-active {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slide-up-enter, .slide-up-leave-to {
    opacity: 0;
    transform: translateY(10px);
}
