:root {
    --auth-bg: #f0f4f8;
    --auth-surface: #ffffff;
    --auth-border: #e2e8f0;
    --auth-border-hover: #cbd5e1;
    --auth-border-focus: #3b82f6;
    --auth-text: #1e293b;
    --auth-text-secondary: #475569;
    --auth-text-muted: #94a3b8;
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-primary-glow: rgba(37, 99, 235, 0.15);
    --auth-error: #dc2626;
    --auth-success: #16a34a;
    --auth-radius-sm: 12px;
    --auth-radius: 16px;
    --auth-radius-lg: 24px;
    --auth-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
}

/* ===== 页面背景 ===== */
.auth-page {
    min-height: 100vh;
    font-family: var(--auth-font);
    background:
        radial-gradient(circle at 10% 20%, rgba(59, 130, 246, 0.08) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(99, 102, 241, 0.06) 0%, transparent 40%),
        linear-gradient(180deg, #f8fafc 0%, #f0f4f8 50%, #e8edf5 100%);
    color: var(--auth-text);
    position: relative;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.auth-page .footer {
    position: relative;
    background: transparent;
    border-top: 1px solid var(--auth-border);
    box-shadow: none;
    margin-top: auto;
}

.auth-page .footer-copyright,
.auth-page .footer-icp {
    color: var(--auth-text-muted);
}

/* ===== 布局容器 ===== */
.auth-shell {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    min-height: calc(100vh - 120px);
}

/* 顶部品牌 */
.auth-top-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 28px;
    transition: opacity 0.2s;
}

.auth-top-brand:hover {
    opacity: 0.8;
}

.auth-top-text {
    font-size: 20px;
    font-weight: 800;
    color: var(--auth-text);
    letter-spacing: -0.02em;
}

/* ===== 主卡片 ===== */
.auth-card-wrapper {
    width: 100%;
    max-width: 420px;
}

.auth-card {
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-lg);
    padding: 40px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.04),
        0 8px 32px rgba(0, 0, 0, 0.06);
}

.auth-card-header {
    text-align: center;
    margin-bottom: 28px;
}

.auth-card-header h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--auth-text);
    margin: 0 0 6px;
    letter-spacing: -0.02em;
}

.auth-card-header p {
    font-size: 14px;
    color: var(--auth-text-muted);
    margin: 0;
    line-height: 1.5;
}

/* ===== Element UI 表单覆盖 ===== */
.auth-form .el-form-item {
    margin-bottom: 16px;
}

.auth-form .el-form-item:last-child {
    margin-bottom: 0;
}

/* 输入框 - 强选择器覆盖 Element UI 默认 */
.auth-form .auth-input .el-input__inner {
    height: 48px;
    line-height: 48px;
    background: #ffffff;
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius-sm);
    color: var(--auth-text);
    font-size: 14px;
    padding-left: 46px !important;
    transition: all 0.2s ease;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.auth-form .auth-input .el-input__inner::placeholder {
    color: var(--auth-text-muted);
    font-size: 14px;
}

.auth-form .auth-input .el-input__inner:hover {
    border-color: var(--auth-border-hover);
    background: #fafbfc;
}

.auth-form .auth-input .el-input__inner:focus {
    background: #ffffff;
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-primary-glow), 0 1px 2px rgba(0, 0, 0, 0.02);
}

/* 输入框图标 - 左侧定位 */
.auth-form .auth-input .el-input__prefix {
    left: 14px;
    color: var(--auth-text-muted);
    transition: color 0.2s;
}

.auth-form .auth-input .el-input__prefix .el-input__icon {
    font-size: 16px;
    width: 20px;
    text-align: center;
    line-height: 48px;
}

.auth-form .auth-input.is-focus .el-input__prefix {
    color: var(--auth-primary);
}

/* 密码显示切换 */
.auth-form .auth-input .el-input__suffix {
    right: 12px;
}

.auth-form .auth-input .el-input__suffix-inner {
    color: var(--auth-text-muted);
}

/* 错误提示 */
.auth-form .el-form-item__error {
    padding-top: 4px;
    font-size: 12px;
    color: var(--auth-error);
}

/* ===== 验证码 ===== */
.captcha-wrapper {
    display: flex;
    gap: 12px;
    align-items: center;
}

.captcha-input {
    flex: 1;
}

.captcha-image-wrapper {
    width: 120px;
    height: 48px;
    border-radius: var(--auth-radius-sm);
    overflow: hidden;
    cursor: pointer;
    border: 1px solid var(--auth-border);
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.captcha-image-wrapper:hover {
    border-color: var(--auth-border-focus);
    box-shadow: 0 0 0 3px var(--auth-primary-glow);
}

.captcha-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.captcha-loading {
    color: var(--auth-text-muted);
    font-size: 18px;
}

/* ===== 记住我 - 左对齐 ===== */
.auth-options {
    margin-bottom: 8px !important;
}

.auth-options .el-form-item__content {
    display: flex;
    justify-content: flex-start !important;
    align-items: center;
    line-height: 1;
}

/* 复选框 */
.auth-checkbox .el-checkbox__input .el-checkbox__inner {
    background: #ffffff;
    border-color: var(--auth-border);
    width: 16px;
    height: 16px;
    border-radius: 5px;
}

.auth-checkbox .el-checkbox__input.is-checked .el-checkbox__inner {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-checkbox .el-checkbox__label {
    color: var(--auth-text-secondary) !important;
    font-size: 13px;
    padding-left: 8px;
}

/* 链接 */
.auth-help-link,
.auth-link-inline,
.auth-link {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.2s;
}

.auth-help-link:hover,
.auth-link-inline:hover,
.auth-link:hover {
    color: var(--auth-primary-hover);
}

/* ===== 主按钮 ===== */
.auth-button {
    width: 100%;
    height: 48px;
    border: none;
    border-radius: var(--auth-radius-sm);
    background: linear-gradient(135deg, var(--auth-primary), #4f46e5);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    letter-spacing: 0.02em;
}

.auth-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.35);
    filter: brightness(1.05);
}

.auth-button:active {
    transform: translateY(0);
}

.auth-button:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none;
    filter: none;
}

/* ===== 分隔线 ===== */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 22px 0;
}

.divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--auth-border), transparent);
}

.divider-text {
    color: var(--auth-text-muted);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ===== 底部 ===== */
.auth-footer {
    text-align: center;
    color: var(--auth-text-secondary);
    font-size: 14px;
}

.auth-footer p {
    margin: 0;
}

/* ===== 特性标签（登录页底部） ===== */
.auth-features {
    display: flex;
    justify-content: center;
    gap: 32px;
    margin-top: 28px;
    flex-wrap: wrap;
}

.auth-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--auth-text-muted);
    font-size: 13px;
    font-weight: 500;
}

.auth-feature-item i {
    color: var(--auth-primary);
    font-size: 16px;
}

/* ===== 注册页两列布局 ===== */
.auth-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

@media (max-width: 480px) {
    .auth-form-row {
        grid-template-columns: 1fr;
    }
}

/* ===== 条款同意 ===== */
.terms-text {
    color: var(--auth-text-muted);
    font-size: 13px;
}

/* ===== 响应式 ===== */
@media (max-width: 480px) {
    .auth-shell {
        padding: 20px 16px;
        justify-content: center;
        min-height: calc(100vh - 100px);
    }

    .auth-top-brand {
        margin-bottom: 16px;
    }

    .auth-top-text {
        font-size: 18px;
    }

    .auth-card {
        padding: 24px 18px;
        border-radius: var(--auth-radius);
    }

    .auth-card-header {
        margin-bottom: 20px;
    }

    .auth-card-header h1 {
        font-size: 20px;
    }

    .auth-form .el-form-item {
        margin-bottom: 12px;
    }

    .auth-features {
        gap: 14px;
        margin-top: 20px;
    }

    .auth-feature-item {
        font-size: 12px;
    }

    .captcha-image-wrapper {
        width: 100px;
        height: 44px;
    }

    .auth-form .auth-input .el-input__inner {
        height: 44px;
        line-height: 44px;
        padding-left: 42px !important;
    }

    .auth-form .auth-input .el-input__prefix .el-input__icon {
        line-height: 44px;
    }

    .auth-button {
        height: 44px;
    }

    /* 注册页双列在移动端堆叠，避免间距叠加 */
    .auth-form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .auth-form-row .el-form-item {
        margin-bottom: 12px;
    }

    .auth-form-row .el-form-item:last-child {
        margin-bottom: 12px;
    }
}

/* ===== 隐藏加载闪烁 ===== */
[v-cloak] {
    display: none;
}
