/* 全局基础样式 */
:root {
    color-scheme: light;
    --app-bg-1: #f8fafc;
    --app-bg-2: #eef2ff;
    --app-bg-3: #ecfeff;
    --app-text: #0f172a;
    --app-muted: #64748b;
    --app-border: rgba(148, 163, 184, 0.18);
    --app-shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
    --app-shadow-lg: 0 30px 80px rgba(15, 23, 42, 0.12);
}

html {
    min-height: 100%;
    background:
        radial-gradient(circle at top left, rgba(99, 102, 241, 0.14), transparent 28%),
        radial-gradient(circle at top right, rgba(14, 165, 233, 0.10), transparent 24%),
        linear-gradient(180deg, var(--app-bg-2) 0%, var(--app-bg-1) 24%, #ffffff 100%);
}

body {
    min-height: 100vh;
    font-family: 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    color: var(--app-text);
    -webkit-font-smoothing: antialiased;
    background: transparent;
}

/* 自定义滚动条 */
.sb::-webkit-scrollbar        { width: 4px; height: 4px; }
.sb::-webkit-scrollbar-track  { background: transparent; }
.sb::-webkit-scrollbar-thumb  { background: #e2e8f0; border-radius: 4px; }
.sb::-webkit-scrollbar-thumb:hover { background: #cbd5e1; }

/* 旋转动画（加载中） */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .7s linear infinite; }

/* 多行文本截断（兼容旧浏览器） */
.lc2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 防止 Vue 挂载前白屏闪烁 */
#app [v-cloak] { display: none; }

/* 页面过渡动画 */
.page-enter { opacity: 0; transform: translateY(8px); }
.page-enter-active { transition: opacity .2s, transform .2s; }

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

@keyframes toastIn {
    from { opacity: 0; transform: translateY(-8px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes modalIn {
    from { opacity: 0; transform: translateY(10px) scale(.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.fade-up {
    animation: fadeUp .28s ease-out both;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.elevated-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid var(--app-border);
    box-shadow: var(--app-shadow);
}

.elevated-card-strong {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(99, 102, 241, 0.10);
    box-shadow: var(--app-shadow-lg);
}

.app-shell {
    position: relative;
    min-height: 100vh;
}

.app-shell::before,
.app-shell::after {
    content: '';
    position: fixed;
    inset: auto;
    width: 22rem;
    height: 22rem;
    border-radius: 999px;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
    opacity: .6;
}

.app-shell::before {
    top: -6rem;
    left: -4rem;
    background: rgba(99, 102, 241, 0.16);
}

.app-shell::after {
    right: -5rem;
    bottom: -6rem;
    background: rgba(34, 197, 94, 0.12);
}

.app-content {
    position: relative;
    z-index: 1;
}

.toast-enter {
    animation: toastIn .22s ease-out both;
}

.modal-enter {
    animation: modalIn .22s ease-out both;
}

.brand-grid {
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.08) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* ══════════════════════════════════════
   登录页专用样式
══════════════════════════════════════ */
.auth-root {
    min-height: 100vh;
    display: flex;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ── 左侧品牌区 ── */
.auth-brand {
    flex: 0 0 55%;
    position: relative;
    overflow: hidden;
    background: linear-gradient(145deg, #0f0c29 0%, #1a1060 35%, #24243e 70%, #0d1b4b 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 64px;
}
.auth-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
}
.auth-glow-1 {
    width: 500px; height: 500px;
    top: -100px; left: -80px;
    background: radial-gradient(circle, rgba(99,102,241,.35) 0%, transparent 70%);
}
.auth-glow-2 {
    width: 400px; height: 400px;
    bottom: -80px; right: -60px;
    background: radial-gradient(circle, rgba(14,165,233,.28) 0%, transparent 70%);
}
.auth-glow-3 {
    width: 300px; height: 300px;
    top: 50%; left: 50%;
    transform: translate(-50%,-50%);
    background: radial-gradient(circle, rgba(139,92,246,.15) 0%, transparent 70%);
}
.auth-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}
.auth-brand-inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    display: flex;
    flex-direction: column;
    gap: 52px;
}
.auth-logo-wrap {
    display: flex;
    align-items: center;
    gap: 14px;
}
.auth-logo-icon {
    width: 52px; height: 52px;
    border-radius: 16px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0,0,0,.3);
}
.auth-logo-name {
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    letter-spacing: -.3px;
}
.auth-hero-title {
    font-size: 48px;
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    letter-spacing: -1.5px;
    text-shadow: 0 2px 20px rgba(0,0,0,.4);
}
.auth-hero-sub {
    margin-top: 18px;
    font-size: 15px;
    line-height: 1.75;
    color: rgba(255,255,255,.55);
}
.auth-feature-row {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-feature-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    backdrop-filter: blur(8px);
    transition: background .2s;
}
.auth-feature-card:hover { background: rgba(255,255,255,.1); }
.auth-feature-icon {
    font-size: 18px;
    color: rgba(165,180,252,1);
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}
.auth-feature-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(255,255,255,.9);
}
.auth-feature-desc {
    font-size: 12px;
    color: rgba(255,255,255,.4);
    margin-top: 2px;
}

/* ── 右侧表单区 ── */
.auth-form-area {
    flex: 0 0 45%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 48px 40px;
    background: #f8fafd;
}
.auth-form-box { width: 100%; max-width: 380px; }
.auth-form-header { margin-bottom: 36px; }
.auth-form-eyebrow {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: #6366f1;
    margin-bottom: 10px;
}
.auth-form-title {
    font-size: 30px;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -.5px;
}
.auth-form-fields {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.auth-field-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #94a3b8;
    margin-bottom: 8px;
}
.auth-input {
    width: 100%;
    padding: 14px 18px;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    font-size: 14px;
    color: #1e293b;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
}
.auth-input:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 4px rgba(99,102,241,.12);
}
.auth-input::placeholder { color: #cbd5e1; }
.auth-input-wrap { position: relative; }
.auth-input-pwd { padding-right: 50px; }
.auth-pwd-toggle {
    position: absolute;
    right: 0; top: 50%;
    transform: translateY(-50%);
    height: 100%;
    padding: 0 16px;
    color: #94a3b8;
    font-size: 14px;
    cursor: pointer;
    background: none;
    border: none;
    transition: color .2s;
}
.auth-pwd-toggle:hover { color: #475569; }

/* 验证码 */
.auth-captcha-block {
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.auth-captcha-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #92400e;
}
.auth-captcha-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.auth-captcha-canvas {
    border-radius: 10px;
    border: 1.5px solid #fcd34d;
    cursor: pointer;
    display: block;
    flex-shrink: 0;
}
.auth-captcha-refresh {
    color: #b45309;
    font-size: 13px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 8px;
    transition: background .15s;
}
.auth-captcha-refresh:hover { background: rgba(0,0,0,.06); }
.auth-captcha-input { letter-spacing: .3em; text-transform: uppercase; }

/* 错误提示 */
.auth-error {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 13px 16px;
    background: #fff1f2;
    border: 1.5px solid #fecdd3;
    border-radius: 14px;
    font-size: 13px;
    color: #e11d48;
}
.auth-error i { margin-top: 1px; flex-shrink: 0; }

/* 提交按钮 */
.auth-submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4338ca 100%);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: .04em;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: opacity .2s, transform .1s, box-shadow .2s;
    box-shadow: 0 4px 20px rgba(67,56,202,.4);
    margin-top: 4px;
}
.auth-submit-btn:hover:not(:disabled) {
    opacity: .92;
    box-shadow: 0 6px 28px rgba(67,56,202,.5);
    transform: translateY(-1px);
}
.auth-submit-btn:active:not(:disabled) { transform: translateY(0); }
.auth-submit-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* 移动端适配 */
@media (max-width: 768px) {
    .auth-root { flex-direction: column; }
    .auth-brand {
        flex: none;
        padding: 48px 28px 40px;
    }
    .auth-hero-title { font-size: 32px; }
    .auth-feature-row { display: none; }
    .auth-brand-inner { gap: 28px; }
    .auth-form-area {
        flex: 1;
        padding: 36px 24px 48px;
    }
}
