/* ==================== 变量 & 基础 ==================== */
:root {
    --bg-primary: #050810;
    --bg-secondary: #0a1628;
    --bg-tertiary: #111d35;
    --bg-hover: #1a2a45;
    --bg-card: #0f1c30;
    --bg-glass: rgba(255, 255, 255, 0.06);
    --bg-glass-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #f0f4ff;
    --text-secondary: #c8d6e5;
    --text-muted: #a0b0c0;
    --text-dim: #778899;
    --accent-primary: #00e5a0;
    --accent-hover: #00cc8e;
    --accent-light: rgba(0, 229, 160, 0.08);
    --accent-glow: rgba(0, 229, 160, 0.3);
    --accent-secondary: #00b4ff;
    --accent-info: #06d6e0;
    --accent-warning: #f59e0b;
    --accent-danger: #ff4757;
    --accent-purple: #a855f7;
    --accent-pink: #ec4899;
    --accent-cyan: #06d6e0;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-light: rgba(255, 255, 255, 0.12);
    --border-glow: rgba(0, 229, 160, 0.35);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.6);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.7);
    --shadow-glow: 0 0 30px rgba(0, 229, 160, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --sidebar-width: 240px;
    --topbar-height: 64px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    --bg-gradient: radial-gradient(80% 60% at 18% 12%, rgba(0, 229, 160, 0.07) 0%, transparent 55%), radial-gradient(60% 50% at 85% 18%, rgba(0, 180, 255, 0.06) 0%, transparent 50%), radial-gradient(70% 60% at 60% 95%, rgba(168, 85, 247, 0.05) 0%, transparent 55%), linear-gradient(180deg, #050810 0%, #0a1628 50%, #050810 100%);
}

/* ==================== 亮色主题 ==================== */
[data-theme="light"] {
    --bg-primary: #f0f4f8;
    --bg-secondary: #ffffff;
    --bg-tertiary: #e8ecf1;
    --bg-hover: #dde3eb;
    --bg-card: rgba(255, 255, 255, 0.9);
    --bg-glass: rgba(0, 0, 0, 0.02);
    --bg-glass-hover: rgba(0, 0, 0, 0.04);
    --text-primary: #1a202c;
    --text-secondary: #4a5568;
    --text-muted: #718096;
    --text-dim: #a0aec0;
    --accent-primary: #059669;
    --accent-hover: #047857;
    --accent-light: rgba(5, 150, 105, 0.06);
    --accent-glow: rgba(5, 150, 105, 0.2);
    --accent-secondary: #2563eb;
    --border-color: rgba(0, 0, 0, 0.08);
    --border-light: rgba(0, 0, 0, 0.12);
    --border-glow: rgba(5, 150, 105, 0.25);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --shadow-glow: 0 0 20px rgba(5, 150, 105, 0.08);
    --bg-gradient: linear-gradient(135deg, #f0f4f8 0%, #ffffff 30%, #e8f4f8 60%, #f0f4f8 100%);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
    background: var(--bg-gradient);
    color: var(--text-primary);
    line-height: 1.6;
    overflow: hidden;
    height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background 0.4s ease, color 0.3s ease;
}

/* ==================== 科技感动态背景 ==================== */
.tech-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.tech-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(0, 229, 160, 0.06) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(0, 180, 255, 0.05) 0%, transparent 40%),
        radial-gradient(ellipse 70% 50% at 50% 80%, rgba(168, 85, 247, 0.04) 0%, transparent 50%),
        linear-gradient(180deg, #050810 0%, #0a1628 50%, #050810 100%);
    animation: bgShift 20s ease-in-out infinite alternate;
}
[data-theme="light"] .tech-bg::before {
    background:
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(5, 150, 105, 0.04) 0%, transparent 50%),
        radial-gradient(ellipse 60% 40% at 80% 20%, rgba(37, 99, 235, 0.04) 0%, transparent 40%),
        radial-gradient(ellipse 70% 50% at 50% 80%, rgba(168, 85, 247, 0.03) 0%, transparent 50%),
        linear-gradient(180deg, #f0f4f8 0%, #ffffff 50%, #f0f4f8 100%);
}

@keyframes bgShift {
    0% { opacity: 0.8; }
    50% { opacity: 1; }
    100% { opacity: 0.9; }
}

/* 网格 */
.tech-grid {
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(0, 229, 160, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 229, 160, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridMove 30s linear infinite;
    transform: perspective(500px) rotateX(45deg);
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 20%, transparent 70%);
}

@keyframes gridMove {
    0% { transform: perspective(500px) rotateX(45deg) translateY(0); }
    100% { transform: perspective(500px) rotateX(45deg) translateY(60px); }
}

/* 浮动光球 */
.tech-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: orbFloat 12s ease-in-out infinite;
}

.tech-orb-1 {
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0, 229, 160, 0.2), transparent 70%);
    top: -150px; left: -100px;
    animation-delay: 0s;
    animation-duration: 15s;
}

.tech-orb-2 {
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(0, 180, 255, 0.18), transparent 70%);
    bottom: -100px; right: -80px;
    animation-delay: -5s;
    animation-duration: 18s;
}

.tech-orb-3 {
    width: 350px; height: 350px;
    background: radial-gradient(circle, rgba(168, 85, 247, 0.15), transparent 70%);
    top: 50%; left: 60%;
    animation-delay: -8s;
    animation-duration: 20s;
}

.tech-orb-4 {
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(6, 214, 224, 0.12), transparent 70%);
    top: 20%; right: 20%;
    animation-delay: -3s;
    animation-duration: 16s;
}

@keyframes orbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(40px, -30px) scale(1.05); }
    50% { transform: translate(-20px, 20px) scale(0.95); }
    75% { transform: translate(30px, 40px) scale(1.02); }
}

/* 粒子 */
.tech-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.tech-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(0, 229, 160, 0.6);
    border-radius: 50%;
    animation: particleFloat linear infinite;
    box-shadow: 0 0 6px rgba(0, 229, 160, 0.4);
}

@keyframes particleFloat {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.6; }
    100% { transform: translateY(-10vh) translateX(80px); opacity: 0; }
}

/* 扫描线 */
.tech-scanline {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 229, 160, 0.15) 50%, transparent 100%);
    animation: scanMove 8s linear infinite;
    opacity: 0.3;
}

@keyframes scanMove {
    0% { top: -2px; }
    100% { top: 100%; }
}

/* 噪点纹理 */
.tech-noise {
    position: absolute;
    inset: 0;
    opacity: 0.02;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

.hidden { display: none !important; }
.full-width { grid-column: 1 / -1; }

/* ==================== 玻璃拟态 ==================== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255,255,255,0.05);
}
.glass-card.card-solid {
    background: var(--bg-card);
}

/* 弹窗玻璃卡片：提升不透明度保证内容可读 */
.modal-dialog.glass-card {
    background: rgba(10, 22, 40, 0.92);
    border: 1px solid var(--border-light);
}
[data-theme="light"] .modal-dialog.glass-card {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* ==================== 登录页 (左右布局) ==================== */
.login-page {
    position: fixed; inset: 0;
    display: flex;
    z-index: 1000;
    background: #f8f7f4;
    background-image:
        radial-gradient(ellipse 70% 60% at 20% 30%, rgba(255,251,235,0.8) 0%, transparent 50%),
        radial-gradient(ellipse 50% 40% at 80% 80%, rgba(245,240,230,0.6) 0%, transparent 40%),
        linear-gradient(135deg, #f8f7f4 0%, #f5f3ee 50%, #faf8f5 100%);
}

/* --- 左侧 海报区 --- */
.login-left {
    flex: 1 1 58%;
    position: relative;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #064e3b 0%, #065f46 30%, #047857 60%, #0d9488 100%);
    animation: leftBgShift 8s ease-in-out infinite alternate;
}
@keyframes leftBgShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* 装饰光球 */
.login-blob {
    position: absolute; border-radius: 50%; filter: blur(60px);
    animation: blobFloat 12s ease-in-out infinite;
}
.blob-1 { width: 500px; height: 500px; background: radial-gradient(circle, rgba(255,255,255,0.08), transparent 70%); top: -15%; left: -10%; }
.blob-2 { width: 400px; height: 400px; background: radial-gradient(circle, rgba(16,185,129,0.2), transparent 70%); bottom: -10%; right: -8%; animation-delay: -4s; }
.blob-3 { width: 300px; height: 300px; background: radial-gradient(circle, rgba(255,255,255,0.05), transparent 70%); top: 40%; right: 20%; animation-delay: -7s; }
@keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.97); }
}

/* 科技粒子 */
.login-particles {
    position: absolute; inset: 0; overflow: hidden; pointer-events: none;
}
.login-particle {
    position: absolute; width: 2px; height: 2px;
    background: rgba(255,255,255,0.4); border-radius: 50%;
    animation: loginParticleUp linear infinite;
    box-shadow: 0 0 4px rgba(255,255,255,0.3);
}
@keyframes loginParticleUp {
    0% { transform: translateY(100vh) translateX(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 0.5; }
    100% { transform: translateY(-5vh) translateX(50px); opacity: 0; }
}

/* 海报内容 */
.login-poster {
    position: relative; z-index: 10;
    width: 100%; max-width: 520px; padding: 40px;
    animation: posterSlideIn 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes posterSlideIn {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.poster-brand { margin-bottom: 48px; }
.poster-logo {
    width: 64px; height: 64px; margin-bottom: 20px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 16px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
}
.poster-brand h1 {
    font-size: 28px; font-weight: 800; color: #ffffff;
    letter-spacing: -0.5px; margin-bottom: 6px;
}
.poster-subtitle {
    font-size: 13px; color: rgba(255,255,255,0.6);
    font-weight: 400; letter-spacing: 1px; text-transform: uppercase;
}

/* 功能特性 */
.poster-features {
    display: flex; flex-direction: column; gap: 16px;
}
.pf-item {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    transition: var(--transition);
    animation: pfIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}
.pf-item:nth-child(1) { animation-delay: 0.2s; }
.pf-item:nth-child(2) { animation-delay: 0.35s; }
.pf-item:nth-child(3) { animation-delay: 0.5s; }
.pf-item:nth-child(4) { animation-delay: 0.65s; }
.pf-item:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
    transform: translateX(4px);
}
@keyframes pfIn {
    from { opacity: 0; transform: translateX(-20px); }
    to { opacity: 1; transform: translateX(0); }
}
.pf-icon {
    width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; color: #ffffff;
}
.pf-ai { background: linear-gradient(135deg, rgba(16,185,129,0.25), rgba(6,214,224,0.2)); }
.pf-layout { background: linear-gradient(135deg, rgba(59,130,246,0.25), rgba(99,102,241,0.2)); }
.pf-hot { background: linear-gradient(135deg, rgba(245,158,11,0.25), rgba(239,68,68,0.2)); }
.pf-publish { background: linear-gradient(135deg, rgba(168,85,247,0.25), rgba(236,72,153,0.2)); }
.pf-body { display: flex; flex-direction: column; gap: 2px; }
.pf-body strong { color: #ffffff; font-size: 14px; font-weight: 600; }
.pf-body span { color: rgba(255,255,255,0.6); font-size: 12px; }


/* --- 右侧 表单区 --- */
.login-right {
    flex: 1 1 42%;
    display: flex; align-items: center; justify-content: center;
    padding: 40px;
    background: #f8f7f4;
}

.login-form-wrapper {
    width: 100%; max-width: 380px;
    animation: formSlideIn 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes formSlideIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-form-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 36px 32px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.06), 0 1px 4px rgba(0,0,0,0.04);
    border: 1px solid rgba(0,0,0,0.04);
}

.lf-header { margin-bottom: 28px; }
.lf-header h2 { font-size: 22px; font-weight: 700; color: #1a202c; margin-bottom: 6px; }
.lf-header p { font-size: 13px; color: #718096; }

.login-options { display: flex; flex-direction: column; gap: 12px; }

/* 登录方式 Tab */
.login-tab-bar {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 4px;
}
.login-tab {
    flex: 1;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--text-muted);
    transition: all 0.2s;
}
.login-tab.active {
    background: var(--bg-hover);
    color: var(--text-primary);
}

/* 微信按钮 */
.login-btn-wechat {
    display: flex; align-items: center; gap: 14px;
    width: 100%; padding: 14px 18px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none; cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(16,185,129,0.25);
    text-align: left;
}
.login-btn-wechat:hover {
    background: linear-gradient(135deg, #059669, #047857);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(16,185,129,0.35);
}
.wechat-icon-wrap {
    width: 44px; height: 44px; border-radius: 10px;
    background: rgba(255,255,255,0.15);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.wechat-icon-wrap .wechat-bubble { color: white; }
.btn-wechat-text {
    display: flex; flex-direction: column; gap: 2px;
    color: white; font-size: 14px;
}

/* 注: 本地账号密码登录入口已移除, 相关样式(.login-btn-local)一并删除 */

.divider { display: flex; align-items: center; gap: 12px; color: #a0aec0; font-size: 12px; margin: 6px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: rgba(0,0,0,0.08); }

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

.login-btn-primary {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 20px; border-radius: 12px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: none; color: white; font-size: 14px;
    cursor: pointer; transition: var(--transition);
    font-weight: 600;
}
.login-btn-primary:hover { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 4px 16px rgba(16,185,129,0.3); }
.btn-full { width: 100%; }

.input-field {
    display: flex; align-items: center; gap: 10px;
    background: #f7fafc; border: 1.5px solid rgba(0,0,0,0.06);
    border-radius: 12px; padding: 0 14px;
    transition: var(--transition); height: 48px;
}
.input-field:focus-within { border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,0.1); background: #fff; }
.input-field input { flex: 1; background: none; border: none; color: #1a202c; font-size: 14px; outline: none; height: 100%; }
.input-field input::placeholder { color: #a0aec0; }
.if-icon { color: #a0aec0; flex-shrink: 0; }

.btn-text { background: none; border: none; color: #718096; cursor: pointer; font-size: 13px; padding: 8px 12px; border-radius: 8px; transition: var(--transition); margin-top: 4px; }
.btn-text:hover { color: #1a202c; background: rgba(0,0,0,0.04); }

.login-error { background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.15); color: #e53e3e; padding: 12px; border-radius: 10px; margin-top: 14px; font-size: 13px; text-align: center; }

/* 页脚版权声明：登录页底部 / 应用内容底部共用 */
.site-copyright {
    margin-top: 8px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: .3px;
    user-select: none;
}
/* 应用内容底部的版权：拉开与正文的间距, 并弱化分割线 */
.site-copyright-app {
    margin-top: 32px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    opacity: .75;
}

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

/* --- 登录页响应式 --- */
@media (max-width: 900px) {
    .login-page { flex-direction: column; }
    .login-left { flex: 0 0 auto; padding: 40px 24px; min-height: 320px; }
    .login-poster { max-width: 100%; }
    .poster-brand { margin-bottom: 28px; }
    .pf-item { padding: 10px 12px; }
    .login-right { flex: 1; padding: 32px 24px; overflow-y: auto; }
}
@media (max-width: 500px) {
    .login-left { min-height: 260px; padding: 28px 20px; }
    .poster-brand h1 { font-size: 22px; }
    .pf-body span { display: none; }
    .login-form-card { padding: 28px 22px; }
}

/* ==================== 主布局 ==================== */
.app-page { display: flex; height: 100vh; }

/* --- 侧边栏 --- */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, rgba(10,18,32,0.95) 0%, rgba(8,14,28,0.98) 100%);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column; flex-shrink: 0;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
[data-theme="light"] .sidebar {
    background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(240,244,248,0.95) 100%);
}
.sidebar-header {
    padding: 18px 16px; display: flex; align-items: center; gap: 10px;
    border-bottom: 1px solid var(--border-color);
    height: var(--topbar-height);
}
.sidebar-brand { display: flex; align-items: center; gap: 8px; }
.brand-text { font-weight: 700; font-size: 15px; letter-spacing: -0.3px; color: var(--text-primary); }
.ver-badge { font-size: 10px; color: var(--text-muted); background: var(--bg-tertiary); padding: 3px 8px; border-radius: 6px; margin-left: auto; font-weight: 600; }

.sidebar-nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.nav-section {
    padding: 16px 12px 6px; font-size: 10px; font-weight: 700;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px;
}
.nav-item {
    display: flex; align-items: center; gap: 10px; padding: 9px 12px;
    border-radius: var(--radius-sm); color: var(--text-secondary);
    cursor: pointer; transition: var(--transition); font-size: 13px;
    margin-bottom: 2px; font-weight: 500;
}
.nav-item svg { flex-shrink: 0; opacity: 0.7; transition: var(--transition); color: var(--text-secondary); }
.nav-item:hover { background: var(--bg-glass-hover); color: var(--text-primary); }
.nav-item:hover svg { opacity: 1; color: var(--text-primary); }
.nav-item.active { background: var(--accent-light); color: var(--accent-primary); }
.nav-item.active svg { opacity: 1; color: var(--accent-primary); }
.nav-badge { margin-left: auto; background: var(--bg-tertiary); color: var(--text-muted); font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }

.sidebar-footer {
    padding: 12px; border-top: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 8px;
}
.user-mini { flex: 1; display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: var(--radius-sm); cursor: pointer; transition: var(--transition); }
.user-mini:hover { background: var(--bg-glass-hover); }
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-purple));
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.user-avatar svg { opacity: 0.9; }
.user-meta { overflow: hidden; }
.user-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-plan { font-size: 10px; color: var(--text-muted); }

.icon-btn {
    width: 32px; height: 32px; border-radius: var(--radius-sm);
    border: 1px solid transparent; background: transparent;
    color: var(--text-muted); cursor: pointer; transition: var(--transition);
    display: flex; align-items: center; justify-content: center;
}
.icon-btn:hover { background: var(--bg-tertiary); color: var(--text-primary); border-color: var(--border-color); }

.sidebar-overlay {
    display: none; position: fixed; inset: 0; z-index: 99;
    background: rgba(0,0,0,0.5); backdrop-filter: blur(2px);
}

/* --- 主内容 --- */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.top-bar {
    height: var(--topbar-height); border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
    background: linear-gradient(90deg, rgba(10,18,32,0.9) 0%, rgba(8,14,28,0.85) 100%);
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}
[data-theme="light"] .top-bar {
    background: linear-gradient(90deg, rgba(255,255,255,0.95) 0%, rgba(240,244,248,0.9) 100%);
}
.tb-left { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: none; color: var(--text-primary); cursor: pointer; padding: 4px; }
.menu-toggle svg { display: block; }
.page-title { font-size: 16px; font-weight: 700; letter-spacing: -0.3px; }
.tb-right { display: flex; align-items: center; gap: 10px; }
.usage-pill {
    display: flex; align-items: center; gap: 6px;
    background: var(--accent-light); color: var(--accent-primary);
    padding: 5px 14px; border-radius: 20px; font-size: 12px; font-weight: 600;
}
.usage-pill svg { opacity: 0.8; }

.content-area { flex: 1; overflow-y: auto; padding: 24px; position: relative; }
.page { animation: pageIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==================== 卡片 ==================== */
.card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 20px; margin-bottom: 16px;
    transition: var(--transition);
}
.card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-head { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text-secondary); margin-bottom: 16px; }
.card-head svg { opacity: 0.7; }
.card-head h4 { font-size: 14px; font-weight: 600; }

.card h3 { font-size: 16px; margin-bottom: 16px; }
.card h4 { font-size: 14px; margin-bottom: 12px; color: var(--text-secondary); }

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 9px 18px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--bg-glass);
    color: var(--text-primary); font-size: 13px; cursor: pointer;
    transition: var(--transition); font-weight: 500; white-space: nowrap;
    font-family: inherit; backdrop-filter: blur(5px);
}
.btn:hover { background: var(--bg-glass-hover); border-color: var(--border-light); transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn svg { flex-shrink: 0; }

.btn-primary {
    background: linear-gradient(135deg, #10b981, #059669);
    border-color: transparent; color: white; font-weight: 600;
}
.btn-primary:hover { background: linear-gradient(135deg, #059669, #047857); box-shadow: 0 4px 20px rgba(16,185,129,0.3); }
.btn-secondary { background: var(--bg-tertiary); }
.btn-ghost { background: transparent; border-color: var(--border-color); color: var(--text-muted); }
.btn-ghost:hover { background: var(--bg-glass-hover); color: var(--text-primary); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); border-color: transparent; color: white; }
.btn-danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); color: #fca5a5; }
.btn-danger:hover { background: rgba(239,68,68,0.2); border-color: rgba(239,68,68,0.4); }
.btn-lg { padding: 12px 28px; font-size: 14px; border-radius: var(--radius-md); }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* ==================== 表单 ==================== */
.form-group { margin-bottom: 16px; }
.form-group.fw { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px; }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 10px 14px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--bg-tertiary);
    color: var(--text-primary); font-size: 13px; outline: none;
    transition: var(--transition); font-family: inherit; backdrop-filter: blur(5px);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent-primary); box-shadow: 0 0 0 3px var(--accent-light);
}
.form-group textarea { resize: vertical; border-radius: var(--radius-sm); min-height: 60px; line-height: 1.6; }
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-dim); }
.input-group { display: flex; gap: 8px; align-items: center; }
.input-group input, .input-group select { flex: 1; }
.input-sm { width: 70px !important; text-align: center; flex: none !important; }

/* Element Plus 风格下拉框 */
.form-group select {
    -webkit-appearance: none; appearance: none;
    -webkit-user-select: none; user-select: none;
    padding-right: 32px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%238899aa' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    line-height: 1.4;
}
.form-group select:hover {
    border-color: var(--accent-primary);
}
.form-group select option {
    background: var(--bg-tertiary);
    color: var(--text-primary);
    padding: 8px 12px;
    font-size: 13px;
}
[data-theme="light"] .form-group select option {
    background: #ffffff;
    color: #1a202c;
}

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

.radio-row { display: flex; gap: 16px; flex-wrap: wrap; }
.radio-row label { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--text-secondary); }

/* ==================== 仪表盘 ==================== */
.stats-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 20px;
    display: flex; align-items: center; gap: 14px;
    transition: var(--transition);
    position: relative; overflow: hidden;
}
.stat-card::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(135deg, transparent, rgba(255,255,255,0.02));
    pointer-events: none;
}
.stat-card:hover { border-color: var(--border-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.sc-icon {
    width: 44px; height: 44px; border-radius: var(--radius-md);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sc-blue .sc-icon { background: rgba(59,130,246,0.12); color: #93c5fd; }
.sc-green .sc-icon { background: rgba(16,185,129,0.12); color: #6ee7b7; }
.sc-purple .sc-icon { background: rgba(168,85,247,0.12); color: #c4b5fd; }
.sc-amber .sc-icon { background: rgba(245,158,11,0.12); color: #fcd34d; }
.sc-body { overflow: hidden; }
.sc-value { font-size: 26px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.sc-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* --- Hero Card --- */
.hero-card {
    display: flex; align-items: center; justify-content: space-between;
    padding: 28px; position: relative; overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.hero-card::after {
    content: ''; position: absolute; top: -50%; right: -20%; width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(16,185,129,0.08), transparent);
    pointer-events: none;
}
.hero-text { position: relative; z-index: 1; }
.hero-text h3 { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.hero-text p { color: var(--text-muted); font-size: 13px; margin-bottom: 20px; }
.hero-flow { display: flex; align-items: center; gap: 8px; position: relative; z-index: 1; }
.hf-item {
    display: flex; flex-direction: column; align-items: center; gap: 4px;
    cursor: pointer; transition: var(--transition);
}
.hf-item:hover { transform: translateY(-2px); }
.hf-num {
    width: 32px; height: 32px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white; font-size: 13px; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.hf-item span { font-size: 11px; color: var(--text-muted); }
.hf-arrow { color: var(--text-dim); flex-shrink: 0; opacity: 0.4; }

.data-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.data-cell { text-align: center; padding: 12px; }
.dc-label { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 4px; }
.dc-value { display: block; font-size: 22px; font-weight: 700; }

/* ==================== 公众号卡片 ==================== */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.account-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 20px;
    transition: var(--transition);
}
.account-card:hover { border-color: var(--border-light); box-shadow: var(--shadow-md); }
.account-card.default { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }

.account-header { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.account-status { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.account-status.verified { background: var(--accent-primary); box-shadow: 0 0 8px var(--accent-primary); }
.account-status.unverified { background: var(--accent-warning); }
.account-name { font-size: 15px; font-weight: 600; }
.account-badge { margin-left: auto; font-size: 10px; padding: 3px 10px; border-radius: 10px; background: var(--accent-light); color: var(--accent-primary); font-weight: 600; }
.account-detail { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }
.account-actions { display: flex; gap: 6px; margin-top: 14px; }

/* ==================== 文章列表 ==================== */
.articles-table { overflow-x: auto; }
.article-row {
    display: flex; align-items: center; padding: 14px 16px;
    border-radius: var(--radius-sm); margin-bottom: 4px;
    transition: var(--transition); cursor: pointer; border: 1px solid transparent;
}
.article-row:hover { background: var(--bg-glass-hover); border-color: var(--border-color); }
.article-row-top { background: var(--bg-card); }
.article-info { flex: 1; min-width: 0; }
.article-title { font-weight: 600; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.article-meta { font-size: 11px; color: var(--text-muted); display: flex; gap: 12px; }
.article-status {
    padding: 4px 12px; border-radius: 10px; font-size: 11px; font-weight: 600;
    white-space: nowrap;
}
.status-draft { background: var(--bg-tertiary); color: var(--text-muted); }
.status-ready { background: rgba(16,185,129,0.1); color: #6ee7b7; }
.status-published { background: rgba(59,130,246,0.1); color: #93c5fd; }
.status-failed { background: rgba(239,68,68,0.1); color: #fca5a5; }
.status-generating { background: rgba(245,158,11,0.1); color: #fcd34d; }
.status-publishing { background: rgba(245,158,11,0.1); color: #fcd34d; }
.status-scheduled { background: rgba(168,85,247,0.1); color: #c4b5fd; }

/* ==================== AI创作向导 ==================== */
.wizard { max-width: 900px; margin: 0 auto; }
.wizard-track {
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 28px;
}
.wt-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.wt-num {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-tertiary); border: 2px solid var(--border-color);
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: var(--text-muted);
    transition: var(--transition-bounce);
}
.wt-step.active .wt-num {
    background: linear-gradient(135deg, var(--accent-primary), #059669);
    border-color: transparent; color: white;
    box-shadow: 0 4px 16px rgba(16,185,129,0.35);
    transform: scale(1.1);
}
.wt-step.completed .wt-num {
    background: var(--accent-primary); border-color: transparent; color: white;
}
.wt-label { font-size: 11px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }
.wt-step.active .wt-label { color: var(--accent-primary); }
.wt-line { width: 80px; height: 2px; background: var(--border-color); margin: 0 12px; margin-bottom: 24px; border-radius: 1px; }

.gen-card { text-align: center; padding: 40px; }
.gen-anim { padding: 32px; }
.gen-orbit {
    width: 80px; height: 80px; margin: 0 auto 24px;
    position: relative;
}
.gen-planet {
    width: 20px; height: 20px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    box-shadow: 0 0 20px var(--accent-glow);
    animation: planetPulse 2s ease-in-out infinite;
}
.gen-ring {
    width: 100%; height: 100%; border-radius: 50%;
    border: 2px solid transparent; border-top-color: var(--accent-primary);
    border-right-color: rgba(16,185,129,0.3);
    animation: orbitSpin 1.5s linear infinite;
}
@keyframes orbitSpin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes planetPulse {
    0%, 100% { box-shadow: 0 0 20px var(--accent-glow); }
    50% { box-shadow: 0 0 35px var(--accent-glow), 0 0 60px rgba(16,185,129,0.2); }
}
.gen-anim h3 { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.gen-anim p { color: var(--text-muted); font-size: 13px; }

.progress-track {
    background: var(--bg-tertiary); border-radius: 10px; height: 6px;
    overflow: hidden; margin: 20px 0;
}
.progress-fill {
    height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 10px; width: 0%; transition: width 0.5s ease;
    box-shadow: 0 0 10px var(--accent-glow);
}

.ai-score-result { margin-bottom: 16px; padding: 12px; border-radius: var(--radius-sm); font-size: 13px; text-align: center; font-weight: 600; }
.ai-score-pass { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }
.ai-score-fail { background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }

/* ==================== 爆款搜索 ==================== */
.hot-results { display: grid; grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.hot-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 20px;
    transition: var(--transition);
}
.hot-card:hover { border-color: var(--border-light); }
.hot-title { font-size: 15px; font-weight: 600; margin-bottom: 6px; }
.hot-digest { color: var(--text-muted); font-size: 12px; margin-bottom: 10px; }
.hot-content { font-size: 13px; color: var(--text-secondary); max-height: 150px; overflow: hidden; position: relative; line-height: 1.7; }
.hot-content::after { content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 50px; background: linear-gradient(transparent, var(--bg-card)); }
.hot-actions { display: flex; gap: 8px; margin-top: 14px; }

/* ==================== 发布中心 ==================== */
.publish-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.publish-list { max-height: 300px; overflow-y: auto; }
.publish-list-item {
    padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    margin-bottom: 6px; cursor: pointer; transition: var(--transition);
    background: var(--bg-tertiary);
}
.publish-list-item:hover { border-color: var(--border-light); background: var(--bg-glass-hover); }
.publish-list-item.selected { border-color: var(--accent-primary); background: var(--accent-light); }
.pli-title { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.pli-meta { font-size: 11px; color: var(--text-muted); }

.preview-frame {
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); min-height: 400px; max-height: 500px;
    overflow-y: auto; padding: 16px; margin-top: 12px;
}
.preview-controls { display: flex; gap: 8px; }
.preview-controls select {
    width: auto; min-width: 150px;
    -webkit-appearance: none; appearance: none;
    padding-right: 28px; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 12 12' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2.5 4.5L6 8L9.5 4.5' stroke='%238899aa' stroke-width='1.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
    border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background-color: var(--bg-tertiary); color: var(--text-primary);
    font-size: 13px; line-height: 1.4; outline: none; transition: var(--transition);
}
.publish-actions { display: flex; gap: 8px; margin-top: 12px; }

.history-list { max-height: 200px; overflow-y: auto; }
.history-item { display: flex; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border-color); font-size: 12px; }
.history-item:last-child { border-bottom: none; }
.history-status { margin-left: auto; padding: 2px 8px; border-radius: 10px; font-size: 10px; font-weight: 600; }

/* ==================== 用户中心 ==================== */
.profile-grid { display: grid; grid-template-columns: 280px 1fr 1fr; gap: 16px; }
.profile-card { text-align: center; padding: 32px 20px; }
.profile-avatar {
    width: 72px; height: 72px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent-secondary), var(--accent-purple));
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 14px; box-shadow: 0 8px 24px rgba(59,130,246,0.25);
}
.profile-avatar svg { opacity: 0.9; }
.profile-name { font-size: 18px; font-weight: 700; margin-bottom: 6px; }
.profile-plan {
    display: inline-block; padding: 4px 14px; border-radius: 12px;
    background: var(--accent-light); color: var(--accent-primary);
    font-size: 12px; font-weight: 600; margin-bottom: 10px;
}
.profile-date { font-size: 12px; color: var(--text-muted); }

.usage-row { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.usage-row > span:first-child { width: 60px; font-size: 12px; color: var(--text-secondary); font-weight: 500; }
.usage-track { flex: 1; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.usage-fill { height: 100%; background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary)); border-radius: 3px; transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.usage-fill.warn { background: linear-gradient(90deg, var(--accent-warning), #fbbf24); }
.usage-fill.danger { background: linear-gradient(90deg, #ef4444, #f87171); }
.usage-row > span:last-child { font-size: 11px; color: var(--text-muted); min-width: 60px; text-align: right; }

.plans-card { grid-column: 1 / -1; }
.plans-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-box {
    background: var(--bg-glass); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 24px; text-align: center;
    position: relative; transition: var(--transition); backdrop-filter: blur(5px);
}
.plan-box:hover { border-color: var(--border-light); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.plan-box.rec { border-color: var(--border-glow); background: rgba(16,185,129,0.04); }
.plan-rec-badge {
    position: absolute; top: -10px; right: 16px;
    background: linear-gradient(135deg, var(--accent-primary), #059669);
    color: white; font-size: 10px; padding: 3px 12px; border-radius: 10px;
    font-weight: 700; box-shadow: 0 4px 12px rgba(16,185,129,0.3);
}
.plan-name { font-size: 15px; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 32px; font-weight: 800; margin-bottom: 16px; letter-spacing: -1px; }
.plan-price span { font-size: 13px; font-weight: 400; color: var(--text-muted); }
.plan-feat { list-style: none; margin-bottom: 20px; }
.plan-feat li { font-size: 12px; color: var(--text-secondary); padding: 5px 0; }

/* ==================== 模型配置 ==================== */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.config-list { display: flex; flex-direction: column; gap: 8px; }
.config-item {
    display: flex; align-items: center; padding: 12px;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: var(--bg-tertiary); transition: var(--transition);
}
.config-item:hover { border-color: var(--border-light); }
.config-item-info { flex: 1; }
.config-item-name { font-weight: 600; font-size: 13px; }
.config-item-key { font-size: 11px; color: var(--text-muted); }
.config-item-actions { display: flex; gap: 4px; }

/* ==================== 弹窗 ==================== */
.modal {
    position: fixed; inset: 0; z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.modal-mask { position: absolute; inset: 0; background: rgba(0,0,0,0.65); backdrop-filter: blur(8px); }
.modal-dialog {
    position: relative; border-radius: var(--radius-xl);
    width: 90%; max-width: 500px; max-height: 85vh; overflow-y: auto;
    box-shadow: var(--shadow-lg); animation: modalIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-lg { max-width: 700px; }
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 18px 22px; border-bottom: 1px solid var(--border-color);
}
.modal-head h3 { font-size: 15px; font-weight: 700; }
.modal-body { padding: 20px 22px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--border-color); }

/* ==================== 编辑器 ==================== */
.editor-tabs { display: flex; gap: 4px; margin-bottom: 8px; }
.editor-tab {
    padding: 6px 16px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--bg-tertiary);
    color: var(--text-muted); cursor: pointer; font-size: 12px;
    transition: var(--transition); font-weight: 500;
}
.editor-tab.active { background: var(--accent-primary); border-color: var(--accent-primary); color: white; }
.editor-preview {
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 16px; min-height: 200px;
    max-height: 400px; overflow-y: auto;
}

/* ==================== 空状态 ==================== */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-muted); }
.empty-state.small { padding: 24px; }
.empty-state.small p { font-size: 12px; }
.e-ico { color: var(--text-dim); margin-bottom: 12px; opacity: 0.4; display: block; margin: 0 auto 12px; }
.empty-icon { font-size: 40px; margin-bottom: 12px; opacity: 0.4; display: block; }
.empty-state p { margin-bottom: 16px; font-size: 13px; }

/* ==================== Toast ==================== */
.toast-container {
    position: fixed; top: 20px; right: 20px; z-index: 2000;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 12px 20px; border-radius: var(--radius-sm); font-size: 13px;
    font-weight: 500; box-shadow: var(--shadow-lg); animation: toastIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 360px; backdrop-filter: blur(10px);
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(30px) scale(0.95); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}
.toast-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.25); color: #6ee7b7; }
.toast-error { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }
.toast-info { background: rgba(59,130,246,0.12); border: 1px solid rgba(59,130,246,0.25); color: #93c5fd; }
.toast-warning { background: rgba(245,158,11,0.12); border: 1px solid rgba(245,158,11,0.25); color: #fcd34d; }

/* ==================== 页面公用 ==================== */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.3px; }
.page-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; }

.select {
    padding: 8px 12px; border-radius: var(--radius-sm);
    border: 1px solid var(--border-color); background: var(--bg-tertiary);
    color: var(--text-primary); font-size: 13px; outline: none; cursor: pointer;
}
.select:focus { border-color: var(--accent-primary); }

/* ==================== 主题切换按钮 ==================== */
.theme-toggle {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
    background: var(--bg-glass);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(5px);
}
.theme-toggle:hover {
    background: var(--bg-glass-hover);
    border-color: var(--border-light);
    color: var(--text-primary);
    transform: scale(1.05);
}
.theme-toggle .tt-icon {
    position: absolute;
    transition: var(--transition);
}
.theme-toggle .tt-dark { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-toggle .tt-light { opacity: 0; transform: rotate(-90deg) scale(0.5); }
[data-theme="light"] .theme-toggle .tt-dark  { opacity: 0; transform: rotate(90deg) scale(0.5); }
[data-theme="light"] .theme-toggle .tt-light { opacity: 1; transform: rotate(0deg) scale(1); }

/* ==================== 滚动条 ==================== */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg-hover); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-light); }

/* ==================== 动画工具类 ==================== */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.shimmer {
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--bg-hover) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .profile-grid { grid-template-columns: 1fr 1fr; }
    .profile-card { grid-column: 1 / -1; }
}

@MEDIA (max-width: 1024px) {
    .stats-row { grid-template-columns: repeat(2, 1fr); }
    .data-row { grid-template-columns: repeat(2, 1fr); }
    .publish-grid { grid-template-columns: 1fr; }
    .profile-grid { grid-template-columns: 1fr; }
    .config-grid { grid-template-columns: 1fr; }
    .plans-grid { grid-template-columns: 1fr; }
    .hero-card { flex-direction: column; text-align: center; gap: 20px; }
    .hero-flow { flex-wrap: wrap; }
}
@MEDIA (max-width: 768px) {
    .sidebar { position: fixed; left: -100%; z-index: 100; height: 100vh; box-shadow: var(--shadow-lg); }
    .sidebar.open { left: 0; }
    .sidebar-overlay.show { display: block; }
    .menu-toggle { display: flex; }
    .form-grid { grid-template-columns: 1fr; }
    .stats-row { grid-template-columns: 1fr 1fr; }
    .accounts-grid { grid-template-columns: 1fr; }
    .data-row { grid-template-columns: 1fr 1fr; }
    .hero-flow { flex-wrap: wrap; gap: 4px; }
    .wt-line { width: 40px; }
    .content-area { padding: 16px; }
    .login-card { padding: 32px 24px; }
    .modal-dialog { max-width: 95%; }
    .top-bar { padding: 0 14px; }
    .sc-value { font-size: 22px; }
    .page-header { flex-direction: column; align-items: flex-start; gap: 12px; }
    .page-actions { width: 100%; }
    .page-actions .select { flex: 1; }
}
@MEDIA (max-width: 480px) {
    .stats-row { grid-template-columns: 1fr; }
    .data-row { grid-template-columns: 1fr; }
    .sc-value { font-size: 20px; }
    .hero-flow { flex-direction: column; gap: 8px; }
    .hf-arrow { transform: rotate(90deg); }
    .wt-line { width: 20px; }
    .login-brand h1 { font-size: 18px; }
    .btn-lg { padding: 10px 20px; font-size: 13px; }
    .card { padding: 16px; }
    .brand-mark { width: 52px; height: 52px; }
    .brand-mark svg { width: 28px; height: 28px; }
}

/* ==================== 升级套餐页面 ==================== */
.upgrade-page {
    position: fixed; inset: 0; z-index: 100;
    background: var(--bg-primary);
    overflow-y: auto;
}
.upgrade-bg { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.upgrade-orb {
    position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.15;
    animation: floatOrb 20s infinite ease-in-out;
}
.ua-orb-1 { width: 400px; height: 400px; background: var(--accent-primary); top: -10%; left: -5%; }
.ua-orb-2 { width: 300px; height: 300px; background: var(--accent-secondary); bottom: -5%; right: -5%; animation-delay: -7s; }
.ua-orb-3 { width: 200px; height: 200px; background: #a855f7; top: 40%; left: 50%; animation-delay: -13s; }

.upgrade-content {
    position: relative; z-index: 1;
    max-width: 960px; margin: 0 auto; padding: 40px 24px 60px;
}
.upgrade-header {
    display: flex; align-items: center; gap: 20px; margin-bottom: 40px;
}
.upgrade-back { flex-shrink: 0; }
.upgrade-title-wrap { flex: 1; }
.upgrade-title-wrap h2 { font-size: 28px; font-weight: 700; margin: 0 0 4px; }
.upgrade-title-wrap p { color: var(--text-muted); font-size: 14px; margin: 0; }
.upgrade-current {
    background: var(--bg-card); border: 1px solid var(--border, rgba(255,255,255,0.08));
    border-radius: 12px; padding: 12px 20px; font-size: 13px; color: var(--text-secondary);
    flex-shrink: 0;
}
.upgrade-current strong { color: var(--accent-primary); }

.upgrade-plans {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px;
}
.plan-card {
    background: var(--bg-card);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px; padding: 32px;
    position: relative; overflow: hidden;
    transition: all 0.3s ease;
}
.plan-card:hover {
    border-color: rgba(255,255,255,0.15);
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
    transform: translateY(-4px);
}
.plan-card.popular {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px var(--accent-glow);
}
.plan-card.popular::before {
    content: '推荐';
    position: absolute; top: 16px; right: -28px;
    background: var(--accent-primary); color: var(--bg-primary);
    font-size: 11px; font-weight: 700; padding: 4px 32px;
    transform: rotate(45deg);
}
.plan-card .plan-tag {
    display: inline-block; font-size: 11px; font-weight: 600;
    color: var(--accent-primary); background: var(--accent-light);
    padding: 4px 10px; border-radius: 6px; margin-bottom: 12px;
}
.plan-card .plan-name { font-size: 22px; font-weight: 700; margin: 0 0 8px; }
.plan-card .plan-price { margin-bottom: 20px; }
.plan-card .plan-price .amount { font-size: 42px; font-weight: 800; color: var(--text-primary); }
.plan-card .plan-price .period { font-size: 14px; color: var(--text-muted); margin-left: 4px; }
.plan-card .plan-price .discount {
    display: inline-block; margin-left: 10px; font-size: 12px; font-weight: 600;
    color: var(--accent-warning); background: rgba(245,158,11,0.1);
    padding: 2px 8px; border-radius: 4px;
}
.plan-card .plan-features { list-style: none; padding: 0; margin: 0 0 24px; }
.plan-card .plan-features li {
    padding: 8px 0; font-size: 14px; color: var(--text-secondary);
    display: flex; align-items: center; gap: 8px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
}
.plan-card .plan-features li::before {
    content: ''; display: inline-block; width: 16px; height: 16px;
    background: var(--accent-primary); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolyline points='20 6 9 17 4 12' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpolyline points='20 6 9 17 4 12' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
    flex-shrink: 0;
}
.plan-card .plan-actions { display: flex; gap: 10px; }
.plan-card .plan-actions .btn { flex: 1; text-align: center; }
.plan-card .plan-period-tabs {
    display: flex; gap: 4px; margin-bottom: 16px;
    background: var(--bg-tertiary); border-radius: 8px; padding: 3px;
    width: fit-content;
}
.plan-card .plan-period-tabs button {
    padding: 6px 14px; border: none; border-radius: 6px; background: transparent;
    color: var(--text-muted); font-size: 13px; cursor: pointer; transition: all 0.2s;
}
.plan-card .plan-period-tabs button.active {
    background: var(--bg-hover); color: var(--text-primary); font-weight: 600;
}
.plan-card.current-plan { opacity: 0.85; }


/* ==================== 支付弹窗 ==================== */
.modal-payment { max-width: 420px; text-align: center; }
.modal-orders { max-width: 600px; }
.payment-info {
    padding: 16px 0; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 20px;
}
.payment-plan { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.payment-amount { font-size: 36px; font-weight: 800; color: var(--accent-primary); }
.payment-amount small { font-size: 14px; font-weight: 400; color: var(--text-muted); }
.payment-qr {
    padding: 20px; min-height: 240px;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 12px;
}
.payment-qr img, .payment-qr svg { max-width: 220px; max-height: 220px; border-radius: 12px; }
.qr-loading { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--text-muted); }
.payment-status { min-height: 24px; font-size: 14px; font-weight: 600; }
.payment-status.success { color: var(--accent-primary); }
.payment-status.pending { color: var(--accent-warning); }
.payment-tip { font-size: 13px; color: var(--text-muted); line-height: 1.6; margin: 16px 0 0; }
.payment-tip small { font-size: 11px; opacity: 0.7; }

/* 订单列表 */
.orders-list { max-height: 400px; overflow-y: auto; }
.order-item {
    display: flex; align-items: center; gap: 16px; padding: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.order-item:last-child { border-bottom: none; }
.order-icon {
    width: 40px; height: 40px; border-radius: 10px; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
    font-size: 18px; font-weight: 700;
}
.order-icon.alipay { background: rgba(16,142,233,0.15); color: #1088e9; }
.order-icon.wechat { background: rgba(9,187,7,0.15); color: #09bb07; }
.order-info { flex: 1; min-width: 0; }
.order-info .order-plan { font-weight: 600; font-size: 14px; margin-bottom: 2px; }
.order-info .order-meta { font-size: 12px; color: var(--text-muted); }
.order-amount { font-size: 18px; font-weight: 700; text-align: right; }
.order-status {
    padding: 3px 10px; border-radius: 6px; font-size: 11px; font-weight: 600;
}
.order-status.paid { background: rgba(0,229,160,0.12); color: var(--accent-primary); }
.order-status.pending { background: rgba(245,158,11,0.12); color: var(--accent-warning); }
.order-status.closed, .order-status.failed { background: rgba(239,68,68,0.12); color: #ef4444; }

/* 用量展示增强 */
.usage-bar {
    height: 6px; border-radius: 3px; background: var(--bg-glass);
    overflow: hidden; margin-top: 6px;
}
.usage-bar-fill {
    height: 100%; border-radius: 3px; background: var(--accent-primary);
    transition: width 0.4s ease;
}
.usage-bar-fill.warn { background: var(--accent-warning); }
.usage-bar-fill.danger { background: #ef4444; }

/* 用户中心用量卡片 */
.usage-cards-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; }
.usage-card-mini {
    background: var(--bg-tertiary); border-radius: 10px; padding: 12px;
    text-align: center;
}
.usage-card-mini .ucm-label { font-size: 11px; color: var(--text-muted); margin-bottom: 4px; }
.usage-card-mini .ucm-value { font-size: 20px; font-weight: 700; }
.usage-card-mini .ucm-value span { font-size: 12px; color: var(--text-muted); font-weight: 400; }

@media (max-width: 768px) {
    .upgrade-plans { grid-template-columns: 1fr; }
    .upgrade-header { flex-direction: column; align-items: flex-start; }
    .plan-card .plan-price .amount { font-size: 32px; }
    .usage-cards-mini { grid-template-columns: 1fr; }
}

/* ==================== 导入文章二创 ==================== */

/* 模式切换Tab */
.mode-tabs {
    display: flex; gap: 4px; margin-bottom: 20px;
    background: var(--bg-glass); border-radius: 12px; padding: 4px;
    width: fit-content;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}
.mode-tab {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 18px; border-radius: 10px;
    border: none; background: transparent;
    color: var(--text-muted); font-size: 13px; font-weight: 500;
    cursor: pointer; transition: var(--transition);
    -webkit-appearance: none; appearance: none;
    font-family: inherit; line-height: 1.4;
}
.mode-tab:hover {
    color: var(--text-primary);
    background: var(--bg-glass-hover);
}
.mode-tab.active {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white; font-weight: 600;
    box-shadow: 0 2px 12px var(--accent-glow);
}
.mode-tab svg {
    width: 14px; height: 14px; flex-shrink: 0;
}

/* 生成穿插配图勾选 */
.generate-images-check {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 16px; border-radius: 10px;
    background: rgba(16,185,129,0.05); border: 1px solid rgba(16,185,129,0.15);
}
.generate-images-check .checkbox-label {
    display: flex; align-items: center; justify-content: center;
    width: 20px; height: 20px; flex-shrink: 0; margin-top: 2px;
}
.generate-images-check input[type="checkbox"] {
    width: 18px; height: 18px; accent-color: var(--accent-primary); cursor: pointer;
}
.generate-images-check .check-text { display: flex; flex-direction: column; gap: 2px; }
.generate-images-check .check-text strong { font-size: 14px; color: var(--text-primary); }
.generate-images-check .check-text small { font-size: 12px; color: var(--text-muted); }

/* Loading Spinner */
.loading-spinner {
    width: 24px; height: 24px; border-radius: 50%;
    border: 3px solid var(--border-color);
    border-top-color: var(--accent-primary);
    animation: spin 0.8s linear infinite;
    display: inline-block; margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ==================== 徽章 ==================== */
.badge {
    display: inline-block; padding: 3px 10px; border-radius: 10px;
    font-size: 10px; font-weight: 600; line-height: 1.4;
}
.badge-blue { background: rgba(59,130,246,0.12); color: #93c5fd; }
.badge-green { background: rgba(16,185,129,0.12); color: #6ee7b7; }
.badge-orange { background: rgba(245,158,11,0.12); color: #fcd34d; }
.badge-purple { background: rgba(168,85,247,0.12); color: #c4b5fd; }
.badge-red { background: rgba(239,68,68,0.12); color: #fca5a5; }
.badge-gray { background: var(--bg-tertiary); color: var(--text-muted); }

/* 导入结果中的来源角标 */
#import-source-badge { font-size: 11px; }

/* 配图生成数量徽章 */
#rewrite-imgs-badge { font-size: 11px; }

/* 文章列表删除按钮 */
.article-delete-btn {
    opacity: 0.5; transition: var(--transition);
}
.article-delete-btn:hover {
    opacity: 1; color: #fca5a5; border-color: rgba(239,68,68,0.3);
}
.article-row:hover .article-delete-btn { opacity: 0.8; }

/* 用量行 */
.usage-row {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 0; border-bottom: 1px solid var(--border-color);
    font-size: 13px;
}
.usage-row:last-child { border-bottom: none; }
.usage-row > span:first-child { min-width: 70px; color: var(--text-secondary); }
.usage-track {
    flex: 1; height: 6px; border-radius: 3px;
    background: var(--bg-glass); overflow: hidden;
}
.usage-fill {
    height: 100%; border-radius: 3px; background: var(--accent-primary);
    transition: width 0.4s ease;
}
.usage-row > span:last-child { font-size: 12px; color: var(--text-muted); min-width: 45px; text-align: right; }

/* 用户中心/profile grid调整为2列 */
.profile-grid { grid-template-columns: 1fr 1fr; }

/* ============================================================
   六页面视觉 V2 —— 每页一套独立的头部语言
   （AI创作 / 爆款 / 发布 / 用户中心 / 模型配置 / 升级套餐）
   ============================================================ */

/* ---------- 0. 共用 ---------- */
.ph-text h3 { font-size: 19px; font-weight: 800; letter-spacing: -.4px; line-height: 1.3; }
.ph-text p { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; line-height: 1.5; }
.ph-eyebrow {
    font-size: 10px; font-weight: 800; letter-spacing: 1.8px;
    color: var(--accent-primary); margin-bottom: 3px;
}

:is(#page-create, #page-hot, #page-publish, #page-profile, #page-ai-config) .card-head > svg {
    width: 28px; height: 28px; padding: 6px; box-sizing: border-box;
    border-radius: 8px; opacity: 1; flex-shrink: 0;
    color: var(--accent-primary); background: var(--accent-light);
}

/* ============================================================
   1. AI创作 —— 工作台面板 + 步骤轨
   ============================================================ */
.ph-studio {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    padding: 20px 24px; margin-bottom: 14px;
    border-radius: 18px; border: 1px solid var(--border-color);
    background:
        linear-gradient(105deg, rgba(0, 229, 160, .10), rgba(0, 180, 255, .05) 42%, transparent 72%),
        var(--bg-card);
}
.ph-studio::before {
    content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px;
    border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary));
}
.ph-ico {
    width: 44px; height: 44px; border-radius: 13px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #04121a;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 8px 20px rgba(0, 229, 160, .28);
}
.ph-rail {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin-left: auto; list-style: none; padding: 0;
}
.ph-rail li {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px 6px 7px; border-radius: 999px;
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    background: var(--bg-glass); border: 1px solid var(--border-color);
}
.ph-rail b {
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 10px; font-weight: 800;
    background: var(--bg-hover); color: var(--text-secondary);
}
.ph-rail li.on {
    color: var(--text-primary);
    border-color: var(--border-glow); background: var(--accent-light);
}
.ph-rail li.on b { background: var(--accent-primary); color: #04121a; }

#page-create .mode-tabs {
    margin-bottom: 18px; padding: 4px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 12px;
}
#page-create .mode-tab { padding: 9px 18px; border-radius: 9px; }
#page-create .mode-tab.active { box-shadow: 0 6px 18px var(--accent-glow); }
#page-create .wizard { max-width: 100%; }
#page-create .wt-num { width: 34px; height: 34px; }
#page-create .wt-line { width: 64px; }
#page-create .gen-card { overflow: hidden; }

/* ============================================================
   2. 爆款 —— 橙色趋势横幅 + 排行卡
   ============================================================ */
.hot-band {
    position: relative; overflow: hidden;
    padding: 20px 24px 18px; margin-bottom: 14px;
    border-radius: 20px; color: #fff;
    background: linear-gradient(112deg, #ff8a1f 0%, #ff2d55 46%, #a52df0 100%);
    box-shadow: 0 16px 38px rgba(255, 45, 85, .22);
}
.hot-band::after {
    content: ''; position: absolute; right: -50px; bottom: -80px;
    width: 220px; height: 220px; border-radius: 50%; pointer-events: none;
    background: radial-gradient(circle, rgba(255, 255, 255, .32), transparent 65%);
}
.hb-top { position: relative; z-index: 1; display: flex; align-items: center; gap: 14px; }
.hb-ico {
    width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: #fff; background: rgba(255, 255, 255, .18);
    border: 1px solid rgba(255, 255, 255, .3);
    -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.hb-top h3 { font-size: 21px; font-weight: 800; letter-spacing: -.4px; }
.hb-top p { font-size: 12.5px; color: rgba(255, 255, 255, .84); margin-top: 2px; }
.hb-live {
    margin-left: auto; display: inline-flex; align-items: center; gap: 7px;
    padding: 6px 13px; border-radius: 999px; flex-shrink: 0;
    font-size: 11px; font-weight: 700; letter-spacing: .3px;
    background: rgba(0, 0, 0, .18); border: 1px solid rgba(255, 255, 255, .22);
}
.hb-live i {
    width: 6px; height: 6px; border-radius: 50%; background: #fff;
    animation: hbPulse 1.8s ease-out infinite;
}
@keyframes hbPulse {
    0% { box-shadow: 0 0 0 0 rgba(255, 255, 255, .7); }
    70% { box-shadow: 0 0 0 7px rgba(255, 255, 255, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
}
.hot-band .quick-tags { position: relative; z-index: 1; margin-top: 14px; }
.hot-band .qt-label { color: rgba(255, 255, 255, .72); }
.hot-band .quick-tag {
    background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .26);
    color: #fff;
}
.hot-band .quick-tag:hover {
    background: #fff; border-color: #fff; color: #ff2d55;
    transform: translateY(-1px);
}

.quick-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qt-label { font-size: 11.5px; font-weight: 700; letter-spacing: .4px; }
.quick-tag {
    padding: 6px 13px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--border-color); background: var(--bg-glass);
    color: var(--text-secondary); font-size: 12px; font-weight: 500;
    font-family: inherit; transition: var(--transition);
}

#page-hot .hot-search-card { padding: 14px 16px; border-radius: 16px; margin-bottom: 16px; }
#page-hot .hot-search-card .form-group { margin-bottom: 0; }
#page-hot .hot-search-card label { display: none; }
#page-hot .input-field {
    flex: 1; height: 42px;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
}
#page-hot .input-field:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-light);
}
#page-hot .input-field input { color: var(--text-primary); }
#page-hot .input-field input::placeholder { color: var(--text-dim); }
#page-hot .input-field .if-icon { color: var(--text-muted); }
#page-hot .input-sm { width: 68px; }

#page-hot .hot-results { gap: 12px; margin-top: 0; }
#page-hot .hot-card {
    position: relative; padding: 18px 20px 16px 62px;
    border-radius: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .02), transparent 60%),
        var(--bg-card);
}
#page-hot .hot-card:hover {
    border-color: rgba(255, 140, 70, .3);
    transform: translateY(-2px); box-shadow: var(--shadow-md);
}
.hot-rank {
    position: absolute; left: 18px; top: 18px;
    width: 32px; height: 32px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800;
    background: var(--bg-tertiary); color: var(--text-muted);
    border: 1px solid var(--border-color);
}
#page-hot .hot-card:nth-child(1) .hot-rank {
    background: linear-gradient(135deg, #ff9a3c, #ff5e3a); color: #fff;
    border-color: transparent; box-shadow: 0 6px 16px rgba(255, 94, 58, .35);
}
#page-hot .hot-card:nth-child(2) .hot-rank {
    background: linear-gradient(135deg, #ffd166, #ff9f1c); color: #3a2600;
    border-color: transparent;
}
#page-hot .hot-card:nth-child(3) .hot-rank {
    background: linear-gradient(135deg, #7ee8fa, #3aa0ff); color: #04121a;
    border-color: transparent;
}
#page-hot .hot-title { font-size: 15.5px; }

/* ============================================================
   3. 发布中心 —— 流程条 + 等高双栏 + 白色预览窗
   ============================================================ */
.pipe-head {
    display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
    padding: 15px 20px; margin-bottom: 16px;
    border-radius: 14px;
    border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-secondary);
    background: var(--bg-card);
}
.pipe-steps { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.pipe-steps .ps {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12px; font-weight: 600; color: var(--text-muted);
}
.pipe-steps .ps i {
    width: 20px; height: 20px; border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-style: normal; font-size: 11px; font-weight: 700;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
}
.pipe-steps .ps.on { color: var(--text-primary); }
.pipe-steps .ps.on i {
    background: var(--accent-secondary); color: #04121a;
    border-color: transparent;
}
.ps-line {
    width: 24px; height: 1px;
    background: linear-gradient(90deg, var(--border-light), var(--border-color));
}

#page-publish .publish-grid {
    grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
    gap: 16px; align-items: stretch;
}
#page-publish .publish-grid > .card {
    display: flex; flex-direction: column;
    margin-bottom: 0; padding: 18px;
}
#page-publish .publish-grid > .card:hover { transform: none; box-shadow: none; }
#page-publish .publish-list { flex: 1; max-height: 460px; min-height: 96px; padding-right: 2px; }
#page-publish .publish-list-item {
    padding: 12px 14px; border-left: 3px solid transparent;
}
#page-publish .publish-list-item:hover {
    border-left-color: var(--accent-primary); transform: translateX(2px);
}
#page-publish .publish-list-item.selected {
    border-left-color: var(--accent-primary);
    box-shadow: inset 0 0 0 1px var(--border-glow);
}
#page-publish .pli-title { font-size: 13px; }

#page-publish .preview-controls { margin-bottom: 0; }
#page-publish #preview-frame {
    position: relative; flex: 1; color: #242832;
    min-height: 420px; max-height: none; margin-top: 12px;
    background: #ffffff; border-radius: 14px; border: 1px solid #e6e8ee;
    padding: 44px 20px 20px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, .22);
}
#page-publish #preview-frame::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 28px;
    background: #f1f3f7; border-bottom: 1px solid #e6e8ee;
    border-radius: 13px 13px 0 0;
}
#page-publish #preview-frame::after {
    content: ''; position: absolute; top: 10px; left: 15px;
    width: 8px; height: 8px; border-radius: 50%;
    background: #ff5f57; box-shadow: 16px 0 #febc2e, 32px 0 #28c840;
}
#page-publish #preview-frame .empty-state,
#page-publish #preview-frame .empty-state p { color: #98a1b3; }
#page-publish .publish-actions { margin-top: 12px; }
#page-publish .publish-actions .btn { flex: 1; justify-content: center; }

#page-publish .history-list { max-height: 220px; }
#page-publish .history-item { padding: 10px 12px; border-radius: 8px; }
#page-publish .history-item:hover { background: var(--bg-glass-hover); }

/* ============================================================
   4. 用户中心 —— 全宽资料横幅 + 用量磁贴
   ============================================================ */
.prof-banner {
    position: relative; overflow: hidden;
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 24px 26px; margin-bottom: 16px;
    border-radius: 20px; border: 1px solid var(--border-glow);
    background:
        radial-gradient(110% 160% at 92% 0%, rgba(0, 180, 255, .16), transparent 55%),
        radial-gradient(110% 160% at 4% 100%, rgba(0, 229, 160, .16), transparent 55%),
        linear-gradient(180deg, var(--bg-tertiary), var(--bg-card));
}
.pb-avatar {
    width: 72px; height: 72px; border-radius: 22px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 800; color: #04121a;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    box-shadow: 0 12px 28px rgba(0, 229, 160, .3);
}
.pb-info { min-width: 0; flex: 1; }
.pb-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pb-top h3 { font-size: 20px; font-weight: 800; letter-spacing: -.3px; }
.pb-plan {
    font-size: 11px; font-weight: 800; letter-spacing: .3px;
    padding: 3px 10px; border-radius: 999px;
    background: var(--accent-primary); color: #04121a;
}
.pb-info > p { font-size: 12px; color: var(--text-muted); margin-top: 5px; }
.pb-actions { display: flex; gap: 8px; margin-top: 10px; }
.pb-cta {
    margin-left: auto; flex-shrink: 0;
    padding: 11px 22px; border-radius: 12px;
}
.usage-tiles {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px; margin-bottom: 16px;
}
.ut {
    padding: 16px 18px; border-radius: 16px;
    border: 1px solid var(--border-color); background: var(--bg-card);
}
.ut-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px; gap: 8px;
}
.ut-head span { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: .3px; }
.ut-head b { font-size: 13px; font-weight: 700; color: var(--text-primary); }
.ut .usage-track { height: 7px; background: var(--bg-tertiary); }
.ut .usage-fill { border-radius: 4px; }
#page-profile .feature-card { padding: 18px; }
#page-profile .feature-card:hover { transform: none; }
#page-profile .feature-card .card-head { margin-bottom: 10px; }
#page-profile .feature-rows {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px;
}
#page-profile .feature-row {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; border-radius: 12px;
    border: 1px solid var(--border-color); background: var(--bg-glass);
}
#page-profile .fr-label { font-size: 12.5px; color: var(--text-secondary); font-weight: 600; }

/* ============================================================
   5. 模型配置 —— 极简工具栏
   ============================================================ */
.cfg-head {
    display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap;
    padding-bottom: 14px; margin-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}
.cfg-head .btn { margin-left: auto; }
.cfg-note {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 12px; line-height: 1.6; color: var(--text-muted);
    margin: 0 0 16px;
}
.cfg-note svg { color: var(--accent-primary); flex-shrink: 0; margin-top: 2px; }
#page-ai-config .config-grid { gap: 16px; align-items: stretch; }
#page-ai-config .config-grid > .card { margin-bottom: 0; display: flex; flex-direction: column; }
#page-ai-config .config-list { gap: 8px; flex: 1; }
#page-ai-config .config-item { padding: 13px 14px; border-radius: 11px; }
#page-ai-config .config-item:hover { border-color: var(--border-glow); background: var(--bg-hover); }
#page-ai-config .config-item-name { font-size: 13.5px; }
#page-ai-config .config-item-actions .btn { padding: 5px 11px; }

/* ============================================================
   6. 升级套餐 —— 重新排版
   ============================================================ */
#upgrade-page.upgrade-page {
    background:
        radial-gradient(80% 50% at 50% -10%, rgba(0, 229, 160, .12), transparent 60%),
        var(--bg-primary);
}
#upgrade-page .upgrade-content {
    max-width: 1080px; margin: 0 auto; padding: 26px 24px 64px;
}
.up-top {
    display: flex; align-items: center; justify-content: space-between;
    gap: 14px; margin-bottom: 6px;
}
#upgrade-page .upgrade-back { padding: 7px 14px; }
.up-current {
    padding: 8px 16px; border-radius: 999px;
    font-size: 12.5px; color: var(--text-secondary);
    background: var(--bg-card); border: 1px solid var(--border-color);
}
.up-current strong { color: var(--accent-primary); font-weight: 700; }

.up-hero { text-align: center; margin: 14px 0 34px; }
.up-eyebrow {
    display: inline-block; font-size: 10px; font-weight: 800;
    letter-spacing: 2.4px; color: var(--accent-primary);
    padding: 4px 12px; border-radius: 999px;
    background: var(--accent-light); border: 1px solid rgba(0, 229, 160, .18);
    margin-bottom: 14px;
}
.up-hero h2 {
    font-size: 32px; font-weight: 800; letter-spacing: -1px; line-height: 1.25;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--accent-primary));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.up-hero p { font-size: 13.5px; color: var(--text-muted); margin-top: 10px; }

#upgrade-page .upgrade-plans {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px; align-items: stretch;
}
#upgrade-page .plan-card {
    position: relative; overflow: visible;
    display: flex; flex-direction: column;
    padding: 26px 26px 24px; border-radius: 22px;
    border: 1px solid var(--border-color);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .025), transparent 40%),
        var(--bg-card);
    transition: var(--transition);
}
#upgrade-page .plan-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-light);
    box-shadow: var(--shadow-lg);
}
#upgrade-page .plan-card.popular {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 1px var(--accent-primary), 0 18px 50px rgba(0, 229, 160, .16);
    background:
        radial-gradient(120% 100% at 100% 0%, rgba(0, 229, 160, .13), transparent 55%),
        var(--bg-card);
}
#upgrade-page .plan-card.popular::before,
#upgrade-page .plan-card.current-plan::after { content: none; display: none; }
#upgrade-page .plan-card.current-plan { opacity: .7; }
#upgrade-page .plan-card.current-plan:hover { transform: none; }
.pc-badge {
    position: absolute; top: 0; right: 22px; transform: translateY(-50%);
    padding: 5px 13px; border-radius: 999px;
    font-size: 10.5px; font-weight: 800; letter-spacing: .4px;
    background: var(--accent-primary); color: #04121a;
    box-shadow: 0 6px 16px var(--accent-glow);
}
#upgrade-page .pc-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#upgrade-page .plan-name { font-size: 20px; font-weight: 800; letter-spacing: -.3px; margin: 0; }
#upgrade-page .plan-tag {
    margin: 0; padding: 3px 9px; border-radius: 6px;
    font-size: 10.5px; font-weight: 700; letter-spacing: .3px;
    color: var(--text-muted); background: var(--bg-tertiary);
}
#upgrade-page .plan-card.popular .plan-tag {
    color: var(--accent-primary); background: var(--accent-light);
}
.plan-desc { font-size: 12.5px; color: var(--text-muted); margin: 6px 0 16px; line-height: 1.55; }

#upgrade-page .plan-period-tabs {
    display: flex; width: 100%; gap: 3px; padding: 4px;
    margin-bottom: 16px;
    background: var(--bg-tertiary); border-radius: 10px;
}
#upgrade-page .plan-period-tabs button {
    flex: 1; padding: 7px 0; border-radius: 7px; border: none;
    background: transparent; color: var(--text-muted);
    font-size: 12.5px; font-weight: 600; cursor: pointer;
    font-family: inherit; transition: var(--transition);
}
#upgrade-page .plan-period-tabs button.active {
    background: var(--bg-card); color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}
#upgrade-page .plan-price {
    display: flex; align-items: baseline; gap: 4px; flex-wrap: wrap;
    margin-bottom: 2px;
}
#upgrade-page .plan-price .amount {
    font-size: 40px; font-weight: 800; letter-spacing: -1.6px;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-primary));
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
#upgrade-page .plan-price .period { font-size: 13px; color: var(--text-muted); }
#upgrade-page .plan-price .discount {
    margin-left: 6px; padding: 3px 9px; border-radius: 999px;
    font-size: 11px; font-weight: 700;
    color: var(--accent-warning); background: rgba(245, 158, 11, .12);
}
#upgrade-page .plan-features {
    list-style: none; margin: 18px 0 22px; padding: 0; flex: 1;
}
#upgrade-page .plan-features li {
    display: flex; align-items: flex-start; gap: 9px;
    padding: 7px 0; font-size: 13px; color: var(--text-secondary);
    border-bottom: none;
}
#upgrade-page .plan-features li::before {
    width: 14px; height: 14px; margin-top: 3px;
    background-color: var(--accent-primary);
}
#upgrade-page .plan-actions { margin-top: auto; }
#upgrade-page .plan-actions .btn { width: 100%; justify-content: center; padding: 12px 0; border-radius: 11px; }

.up-perks {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px; margin-top: 30px;
}
.up-perk {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 14px 15px; border-radius: 14px;
    border: 1px solid var(--border-color); background: var(--bg-card);
}
.upk-ico {
    width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent-primary); background: var(--accent-light);
}
.up-perk b { display: block; font-size: 12.5px; font-weight: 700; color: var(--text-primary); }
.up-perk p { font-size: 11.5px; line-height: 1.55; color: var(--text-muted); margin-top: 3px; }

.upgrade-guarantee {
    display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
    gap: 26px; margin-top: 30px; padding-top: 22px;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 12.5px;
}
.upgrade-guarantee span { display: inline-flex; align-items: center; gap: 7px; }
.upgrade-guarantee svg { color: var(--accent-primary); }

/* ============================================================
   7. 亮色主题修正
   ============================================================ */
[data-theme="light"] .ph-studio {
    background:
        linear-gradient(105deg, rgba(5, 150, 105, .07), rgba(37, 99, 235, .04) 45%, transparent 72%),
        linear-gradient(180deg, #ffffff, #f6faf8);
    border-color: rgba(0, 0, 0, .07);
}
[data-theme="light"] .ph-ico,
[data-theme="light"] .pb-avatar,
[data-theme="light"] .pb-plan,
[data-theme="light"] .pc-badge { color: #fff; }
[data-theme="light"] .prof-banner {
    background:
        radial-gradient(110% 160% at 92% 0%, rgba(37, 99, 235, .1), transparent 55%),
        radial-gradient(110% 160% at 4% 100%, rgba(5, 150, 105, .1), transparent 55%),
        linear-gradient(180deg, #ffffff, #f4f8fb);
}
[data-theme="light"] .pipe-head { background: #ffffff; }
[data-theme="light"] .up-hero h2 {
    background: linear-gradient(135deg, #0f172a 30%, #059669);
    -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] .plan-price .amount {
    background: linear-gradient(135deg, #0f172a 20%, #059669);
    -webkit-background-clip: text; background-clip: text;
}
[data-theme="light"] #page-hot .hot-card {
    background: linear-gradient(180deg, rgba(0, 0, 0, .015), transparent 60%), #ffffff;
}

/* ============================================================
   8. 响应式
   ============================================================ */
@media (max-width: 1080px) {
    .ph-rail { margin-left: 0; }
    .up-perks { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
    #page-publish .publish-grid { grid-template-columns: 1fr; }
    #page-publish .publish-list { max-height: 260px; }
    #page-profile .feature-rows { grid-template-columns: 1fr; }
    #upgrade-page .upgrade-plans { grid-template-columns: 1fr; }
    .pipe-steps { margin-left: 0; }
}
@media (max-width: 768px) {
    .ph-studio { padding: 16px 18px; gap: 12px; }
    .ph-ico { width: 40px; height: 40px; border-radius: 12px; }
    .ph-text h3 { font-size: 17px; }
    .ph-rail li { font-size: 11.5px; padding: 5px 11px 5px 6px; }
    .hot-band { padding: 18px; border-radius: 16px; }
    .hot-band::after { display: none; }
    .hb-live { display: none; }
    .hb-top h3 { font-size: 19px; }
    .usage-tiles { grid-template-columns: 1fr; }
    .prof-banner { padding: 20px; gap: 16px; }
    .pb-avatar { width: 60px; height: 60px; border-radius: 18px; font-size: 23px; }
    .pb-cta { margin-left: 0; width: 100%; justify-content: center; }
    #page-publish #preview-frame { padding: 40px 14px 16px; min-height: 340px; }
    .up-hero h2 { font-size: 24px; }
    .up-perks { grid-template-columns: 1fr; }
    #upgrade-page .plan-card { padding: 22px 20px; }
    .upgrade-guarantee { gap: 14px; }
}
@media (max-width: 520px) {
    .ph-rail { width: 100%; }
    .ph-rail li { flex: 1; justify-content: center; }
    #page-hot .hot-card { padding-left: 54px; }
    .hot-rank { left: 14px; top: 16px; width: 28px; height: 28px; font-size: 12px; }
    .up-top { flex-wrap: wrap; }
    #upgrade-page .plan-price .amount { font-size: 34px; }
}

/* ---------- 9. 细节修补 ---------- */
.pb-actions:empty { display: none; }
#page-publish .publish-grid > .card .card-head { margin-bottom: 14px; }
#page-publish .preview-controls select { flex: 0 1 190px; }
#page-ai-config .config-grid > .card .empty-state { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }

/* ============================================================
   10. 修正：浅色徽章对比度 / 步骤条紧凑 / 计费切换更清晰
   ============================================================ */
[data-theme="light"] .badge-green  { color: #047857; }
[data-theme="light"] .badge-blue   { color: #1d4ed8; }
[data-theme="light"] .badge-orange { color: #b45309; }
[data-theme="light"] .badge-purple { color: #7e22ce; }
[data-theme="light"] .badge-red    { color: #b91c1c; }
[data-theme="light"] .badge-gray   { color: #475569; }

#page-create .wizard-track { justify-content: flex-start; margin-bottom: 18px; }
#page-create .wt-step { flex-direction: row; align-items: center; gap: 9px; }
#page-create .wt-step span {
    font-size: 12px; font-weight: 600; color: var(--text-muted);
    text-transform: none; letter-spacing: 0;
}
#page-create .wt-step.active span { color: var(--accent-primary); }
#page-create .wt-line { width: 46px; margin: 0 10px; margin-bottom: 0; }
#page-create .wt-num { width: 30px; height: 30px; font-size: 13px; }

#upgrade-page .plan-period-tabs button { color: var(--text-muted); }
#upgrade-page .plan-period-tabs button.active {
    background: var(--bg-hover); color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--border-light), var(--shadow-sm);
}
[data-theme="light"] #upgrade-page .plan-period-tabs button.active {
    background: #ffffff; color: #047857;
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, .25), 0 2px 6px rgba(0, 0, 0, .06);
}
#upgrade-page .pc-badge { right: 26px; }
#page-create .ph-rail b {
    width: auto; min-width: 20px; height: 18px; padding: 0 6px;
    border-radius: 999px; font-size: 10px; letter-spacing: .2px;
}

/* ============================================================
   11. 支付配置页（仅管理员）
   ============================================================ */
#page-pay-config .cfg-head { align-items: center; }

.pay-admin-chip {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border-radius: 999px;
    font-size: 12px; font-weight: 600; letter-spacing: .3px;
    color: var(--accent-primary);
    background: var(--accent-light);
    border: 1px solid var(--border-glow);
    white-space: nowrap;
}

.pay-grid {
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 16px; align-items: start; margin-bottom: 18px;
}

.pay-channel {
    border-radius: var(--radius-lg);
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}
.pay-channel.on { border-color: var(--border-glow); box-shadow: var(--shadow-glow); }

.pc-top {
    display: flex; align-items: center; gap: 12px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, rgba(255,255,255,.03), transparent);
}
.pc-logo {
    width: 38px; height: 38px; flex: 0 0 38px;
    border-radius: 11px; display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 700; color: #fff;
}
.pc-logo.alipay { background: linear-gradient(135deg, #1677ff, #2e9bff); }
.pc-logo.wechat { background: linear-gradient(135deg, #07c160, #0bae57); }
.pc-title { flex: 1; min-width: 0; }
.pc-title h4 { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 2px; }
.pc-title p { font-size: 12px; color: var(--text-muted); }

.pay-pill {
    font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 999px;
    border: 1px solid transparent; white-space: nowrap;
}
.pay-pill.ok      { color: #0b3; background: rgba(0, 229, 160, .12); border-color: rgba(0, 229, 160, .3); }
.pay-pill.warn    { color: #f59e0b; background: rgba(245, 158, 11, .12); border-color: rgba(245, 158, 11, .3); }
.pay-pill.off     { color: var(--text-dim); background: rgba(255, 255, 255, .05); border-color: var(--border-color); }

.pc-body { padding: 16px 18px 18px; }

.pay-field { margin-bottom: 13px; }
.pay-field label {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 12px; font-weight: 600; color: var(--text-secondary);
    margin-bottom: 6px;
}
.pay-field label .req { color: var(--accent-danger); margin-left: 2px; }
.pay-field label .saved {
    font-size: 11px; font-weight: 500; color: var(--accent-primary);
    background: var(--accent-light); padding: 1px 7px; border-radius: 999px;
}
.pay-field input[type="text"],
.pay-field input[type="password"],
.pay-field textarea {
    width: 100%; box-sizing: border-box;
    padding: 9px 12px; font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    outline: none; transition: var(--transition);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pay-field input:focus, .pay-field textarea:focus {
    border-color: var(--border-glow);
    box-shadow: 0 0 0 3px rgba(0, 229, 160, .1);
}
.pay-field textarea { resize: vertical; min-height: 74px; line-height: 1.5; word-break: break-all; }
.pay-field .hint { font-size: 11px; color: var(--text-dim); margin-top: 5px; line-height: 1.5; }

.pay-inline { display: flex; gap: 10px; }
.pay-inline > .pay-field { flex: 1; min-width: 0; }

/* 启用开关 */
.pay-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.pay-switch input { display: none; }
.pay-switch .track {
    width: 38px; height: 21px; border-radius: 999px;
    background: var(--bg-hover); border: 1px solid var(--border-light);
    position: relative; transition: var(--transition);
}
.pay-switch .track::after {
    content: ''; position: absolute; top: 2px; left: 2px;
    width: 15px; height: 15px; border-radius: 50%;
    background: var(--text-dim); transition: var(--transition);
}
.pay-switch input:checked + .track { background: rgba(0, 229, 160, .25); border-color: var(--border-glow); }
.pay-switch input:checked + .track::after { left: 19px; background: var(--accent-primary); }
.pay-switch span.lbl { font-size: 12px; color: var(--text-muted); font-weight: 500; }

.pc-foot {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 18px; border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, .12);
}
.pc-foot .grow { flex: 1; }

.pay-result {
    margin-top: 12px; padding: 10px 13px; border-radius: var(--radius-sm);
    font-size: 12px; line-height: 1.6; display: none;
}
.pay-result.show { display: block; }
.pay-result.ok   { color: #00e5a0; background: rgba(0, 229, 160, .09); border: 1px solid rgba(0, 229, 160, .25); }
.pay-result.err  { color: #ff8b8b; background: rgba(255, 71, 87, .09); border: 1px solid rgba(255, 71, 87, .25); }
.pay-result.info { color: var(--text-secondary); background: rgba(255,255,255,.04); border: 1px solid var(--border-color); }

.pay-cb-row {
    display: flex; align-items: center; gap: 8px;
    padding: 9px 12px; margin-bottom: 13px;
    background: var(--bg-tertiary); border: 1px dashed var(--border-light);
    border-radius: var(--radius-sm);
}
.pay-cb-row code {
    flex: 1; min-width: 0; font-size: 11px; color: var(--text-secondary);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.pay-cb-row .copy-btn {
    font-size: 11px; padding: 3px 9px; border-radius: 6px; cursor: pointer;
    color: var(--accent-primary); background: var(--accent-light);
    border: 1px solid var(--border-glow); white-space: nowrap;
}

.pay-help {
    padding: 16px 20px; border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border-color);
}
.pay-help h4 {
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    margin-bottom: 10px; letter-spacing: .3px;
}
.pay-help ol { margin: 0; padding-left: 18px; }
.pay-help li {
    font-size: 12.5px; line-height: 1.85; color: var(--text-muted);
    margin-bottom: 6px;
}
.pay-help li b { color: var(--text-secondary); font-weight: 600; }

.nav-badge.admin-only-badge {
    background: rgba(0, 229, 160, .15); color: var(--accent-primary);
    font-size: 10px; padding: 1px 6px;
}

[data-theme="light"] .pay-channel { background: #fff; border-color: rgba(15, 23, 42, .09); }
[data-theme="light"] .pay-channel.on { border-color: rgba(5, 150, 105, .45); }
[data-theme="light"] .pc-top { background: linear-gradient(180deg, rgba(15,23,42,.02), transparent); border-bottom-color: rgba(15,23,42,.08); }
[data-theme="light"] .pc-title h4 { color: #0f172a; }
[data-theme="light"] .pc-title p { color: #64748b; }
[data-theme="light"] .pay-field input[type="text"],
[data-theme="light"] .pay-field input[type="password"],
[data-theme="light"] .pay-field textarea {
    background: #f8fafc; border-color: rgba(15,23,42,.12); color: #0f172a;
}
[data-theme="light"] .pay-field label { color: #334155; }
[data-theme="light"] .pc-foot { background: rgba(15,23,42,.02); border-top-color: rgba(15,23,42,.08); }
[data-theme="light"] .pay-pill.ok { color: #047857; background: rgba(5,150,105,.1); border-color: rgba(5,150,105,.28); }
[data-theme="light"] .pay-pill.warn { color: #b45309; background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.3); }
[data-theme="light"] .pay-pill.off { color: #64748b; background: rgba(15,23,42,.04); border-color: rgba(15,23,42,.1); }
[data-theme="light"] .pay-cb-row { background: #f8fafc; border-color: rgba(15,23,42,.14); }
[data-theme="light"] .pay-cb-row code { color: #475569; }
[data-theme="light"] .pay-help { background: #fff; border-color: rgba(15,23,42,.09); }
[data-theme="light"] .pay-help h4 { color: #334155; }
[data-theme="light"] .pay-help li { color: #475569; }
[data-theme="light"] .pay-help li b { color: #0f172a; }
[data-theme="light"] .pay-result.err { color: #b91c1c; background: rgba(220,38,38,.07); border-color: rgba(220,38,38,.22); }
[data-theme="light"] .pay-result.ok { color: #047857; background: rgba(5,150,105,.08); border-color: rgba(5,150,105,.22); }
[data-theme="light"] .pay-admin-chip { color: #047857; background: rgba(5,150,105,.09); border-color: rgba(5,150,105,.25); }

@media (max-width: 1080px) {
    .pay-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .pay-inline { flex-direction: column; gap: 0; }
    .pc-foot { flex-wrap: wrap; }
    .pay-help { padding: 14px 16px; }
}

/* ---------- 12. 支付渠道选择与成功态 ---------- */
.pay-ch-btn {
    min-width: 132px; padding: 18px 22px;
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    border-radius: var(--radius-md);
    transition: var(--transition);
}
.pay-ch-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.pay-ch-logo {
    width: 34px; height: 34px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; font-weight: 700; color: #fff;
}
.pay-ch-logo.alipay { background: linear-gradient(135deg, #1677ff, #2e9bff); }
.pay-ch-logo.wechat { background: linear-gradient(135deg, #07c160, #0bae57); }
.pay-ch-name { font-size: 13.5px; font-weight: 600; color: var(--text-primary); }
.pay-ch-hint { font-size: 11px; color: var(--text-dim); }

.pay-success-mark {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 22px 0; color: var(--accent-primary);
}
.pay-success-mark p { font-size: 13px; font-weight: 600; color: var(--text-secondary); }

[data-theme="light"] .pay-ch-name { color: #0f172a; }
[data-theme="light"] .pay-ch-hint { color: #94a3b8; }
[data-theme="light"] .pay-success-mark p { color: #334155; }

/* 支付配置页细节修正 */
.pay-grid { align-items: stretch; }
.pay-channel { display: flex; flex-direction: column; }
.pay-channel .pc-body { flex: 1; }
/* 开关本身也是 label, 会继承 .pay-field label 的 space-between, 这里覆盖掉 */
.pay-field label.pay-switch {
    display: inline-flex; justify-content: flex-start;
    margin-bottom: 0; width: auto;
}
.pay-switch input:checked + .track::after { left: 19px; background: #ffffff; }
[data-theme="light"] .pay-switch .track { background: #e2e8f0; border-color: rgba(15,23,42,.15); }
[data-theme="light"] .pay-switch .track::after { background: #94a3b8; }
[data-theme="light"] .pay-switch input:checked + .track { background: rgba(5,150,105,.25); border-color: rgba(5,150,105,.5); }
[data-theme="light"] .pay-switch input:checked + .track::after { background: #ffffff; }
[data-theme="light"] .pay-switch span.lbl { color: #475569; }

/* ==================== 升级套餐页(嵌套在主内容区) ==================== */
/* 套餐列表: 全部展开、横向三列网格 */
#page-upgrade .upgrade-plans {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
    max-width: 1040px; margin: 0 auto 26px; align-items: stretch;
}
#page-upgrade .upgrade-plans .trial-banner { grid-column: 1 / -1; margin-bottom: 2px; }
#page-upgrade .up-hero { margin: 10px 0 26px; }
#page-upgrade .up-perks,
#page-upgrade .upgrade-guarantee { max-width: 1040px; margin-left: auto; margin-right: auto; }

.plan-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); overflow: hidden;
    transition: var(--transition); position: relative;
    display: flex; flex-direction: column;
    padding: 22px 20px; box-shadow: none;
}
.plan-card:hover { transform: none; border-color: var(--border-light); box-shadow: var(--shadow-sm); }
.plan-card.popular { border-color: var(--border-glow); }
.plan-card.popular::before { display: none; }
.plan-card.current-plan::after { display: none; }
.plan-card.trial { border-style: dashed; border-color: var(--border-glow); }
.plan-card.current-plan { opacity: 0.8; }

/* 卡片头: 套餐名 + 标签 */
.plan-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.plan-card .plan-name { font-size: 17px; font-weight: 700; margin: 0; flex: 1; min-width: 0; }
.plan-card .plan-tag {
    flex-shrink: 0;
    font-size: 10.5px; font-weight: 600; padding: 3px 8px; border-radius: 20px;
    background: var(--accent-light); color: var(--accent-primary);
    border: 1px solid var(--border-glow);
}
.plan-card .plan-price { margin: 0 0 6px; display: flex; align-items: baseline; gap: 3px; }
.plan-card .plan-price .amount { font-size: 30px; font-weight: 800; color: var(--text-primary); letter-spacing: -1px; }
.plan-card .plan-price .period { font-size: 12px; color: var(--text-muted); }
.plan-card .plan-price .discount {
    display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 12px;
    font-size: 10.5px; font-weight: 600;
    background: rgba(245, 158, 11, 0.14); color: var(--accent-warning);
}
.plan-card .plan-period-tabs { margin: 0 0 12px; }

.plan-card .plan-desc { font-size: 12.5px; color: var(--text-muted); margin: 4px 0 14px; line-height: 1.55; }
.plan-card .plan-features { list-style: none; padding: 0; margin: 0 0 18px; flex: 1; }
.plan-card .plan-features li { padding: 4px 0; font-size: 12.5px; }
.plan-card .plan-actions { display: flex; gap: 10px; margin-top: auto; }
.plan-card .plan-actions .btn { flex: 1; text-align: center; }

/* 体验版提示条 */
.trial-banner {
    display: flex; align-items: center; gap: 14px;
    padding: 14px 18px; margin-bottom: 2px;
    background: linear-gradient(135deg, rgba(0, 229, 160, 0.08), rgba(0, 180, 255, 0.06));
    border: 1px solid var(--border-glow); border-radius: var(--radius-lg);
}
.trial-banner .tb-ico {
    width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    background: var(--accent-light); color: var(--accent-primary);
}
.trial-banner .tb-text { flex: 1; min-width: 0; }
.trial-banner .tb-text b { display: block; font-size: 13px; color: var(--text-primary); }
.trial-banner .tb-text p { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.trial-banner .tb-text p strong { color: var(--accent-primary); }
.trial-banner .tb-state {
    flex-shrink: 0; padding: 4px 12px; border-radius: 20px;
    font-size: 11.5px; font-weight: 700;
    background: var(--accent-light); color: var(--accent-primary);
}
.trial-banner.exhausted { border-color: rgba(245, 158, 11, 0.4); background: rgba(245, 158, 11, 0.06); }
.trial-banner.exhausted .tb-ico { background: rgba(245, 158, 11, 0.12); color: var(--accent-warning); }
.trial-banner.exhausted .tb-state { background: rgba(245, 158, 11, 0.14); color: var(--accent-warning); }

/* 亮色主题 */
[data-theme="light"] .plan-card { background: #ffffff; border-color: rgba(15, 23, 42, 0.08); }
[data-theme="light"] .plan-card.popular { border-color: rgba(5, 150, 105, 0.45); }
[data-theme="light"] .plan-card.trial { border-color: rgba(5, 150, 105, 0.4); }
[data-theme="light"] .plan-card .plan-price .amount { color: #0f172a; }
[data-theme="light"] .plan-card .plan-price .discount { background: rgba(245, 158, 11, 0.12); color: #b45309; }

/* 窄屏: 套餐卡片退化为单列 */
@media (max-width: 960px) {
    #page-upgrade .upgrade-plans { grid-template-columns: 1fr; }
}
[data-theme="light"] .trial-banner {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.06), rgba(37, 99, 235, 0.05));
    border-color: rgba(5, 150, 105, 0.3);
}
[data-theme="light"] .trial-banner .tb-text b { color: #0f172a; }
[data-theme="light"] .trial-banner .tb-text p { color: #64748b; }
[data-theme="light"] .trial-banner.exhausted { background: rgba(245, 158, 11, 0.06); border-color: rgba(245, 158, 11, 0.4); }

/* ==================== 扫码收银台(支付弹窗) ==================== */
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); border-color: transparent; color: #fff; }
.btn-warning:hover { filter: brightness(1.08); }

/* 渠道选择卡片 */
.cashier-channels { display: flex; flex-direction: column; gap: 10px; }
.cashier-ch {
    display: flex; align-items: center; gap: 12px; width: 100%;
    padding: 14px 16px; cursor: pointer; text-align: left;
    background: var(--bg-card); color: var(--text-primary);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    transition: var(--transition);
}
.cashier-ch:hover { border-color: var(--border-glow); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.cashier-ch .cc-logo {
    width: 40px; height: 40px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; font-weight: 800; color: #fff;
}
.cashier-ch .cc-logo.alipay { background: linear-gradient(135deg, #1677ff, #0e5fd8); }
.cashier-ch .cc-logo.wechat { background: linear-gradient(135deg, #07c160, #059a4c); }
.cashier-ch .cc-logo.aggregator { background: linear-gradient(135deg, #8b5cf6, #6d28d9); }
.cashier-ch .cc-meta { flex: 1; min-width: 0; }
.cashier-ch .cc-meta b { display: block; font-size: 14px; }
.cashier-ch .cc-meta i { display: block; font-style: normal; font-size: 11.5px; color: var(--text-muted); margin-top: 2px; }
.cashier-ch .cc-arrow { color: var(--text-dim); flex-shrink: 0; }
.cashier-ch.is-demo .cc-meta i::after {
    content: '演示'; margin-left: 6px; padding: 1px 6px; border-radius: 8px;
    font-size: 10px; font-weight: 700; background: rgba(245, 158, 11, 0.14); color: var(--accent-warning);
}

/* 二维码展示区(渠道品牌化) */
.cashier-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cashier-qr .cq-brand {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; font-weight: 700; color: var(--text-secondary);
}
.cashier-qr .cq-logo {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 800; color: #fff;
}
.cashier-qr .cq-logo.alipay { background: #1677ff; }
.cashier-qr .cq-logo.wechat { background: #07c160; }
.cashier-qr .cq-logo.aggregator { background: #8b5cf6; }
.cashier-qr .cq-demo-badge {
    padding: 3px 12px; border-radius: 20px;
    font-size: 11px; font-weight: 700;
    background: rgba(245, 158, 11, 0.12); color: var(--accent-warning);
    border: 1px solid rgba(245, 158, 11, 0.35);
}
.cashier-qr .cq-box {
    padding: 10px; background: #fff; border-radius: 12px; line-height: 0;
    border: 3px solid var(--border-color); transition: border-color 0.3s ease;
}
.cashier-qr.alipay .cq-box { border-color: rgba(22, 119, 255, 0.55); }
.cashier-qr.wechat .cq-box { border-color: rgba(7, 193, 96, 0.55); }
.cashier-qr.aggregator .cq-box { border-color: rgba(139, 92, 246, 0.55); }
.cashier-qr .cq-box img { display: block; }
.cashier-qr .cq-amount { font-size: 22px; font-weight: 800; color: var(--text-primary); }

/* 弹窗头部渠道色带 */
#modal-payment .modal-dialog.pay-ch-alipay .modal-head { border-bottom: 2px solid rgba(22, 119, 255, 0.45); }
#modal-payment .modal-dialog.pay-ch-wechat .modal-head { border-bottom: 2px solid rgba(7, 193, 96, 0.45); }
#modal-payment .modal-dialog.pay-ch-aggregator .modal-head { border-bottom: 2px solid rgba(139, 92, 246, 0.45); }

/* 支付配置页: 演示模式徽标 */
.pay-pill.demo { background: rgba(245, 158, 11, 0.12); color: var(--accent-warning); border: 1px solid rgba(245, 158, 11, 0.35); }

/* 亮色主题 */
[data-theme="light"] .cashier-ch { background: #ffffff; border-color: rgba(15, 23, 42, 0.08); }
[data-theme="light"] .cashier-ch .cc-meta i { color: #64748b; }
[data-theme="light"] .cashier-qr .cq-amount { color: #0f172a; }


/* ==================== 右侧: 微信客服二维码弹框 + 返回顶部 ==================== */
.wx-fab {
    position: fixed; right: 0; top: 46%; z-index: 900;
    transform: translateY(-50%);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    padding: 13px 9px;
    color: #fff; cursor: pointer;
    background: linear-gradient(160deg, #07c160, #059a4c);
    border: none; border-radius: 12px 0 0 12px;
    box-shadow: -3px 3px 14px rgba(7, 193, 96, 0.35);
    transition: right 0.25s ease, box-shadow 0.25s ease, filter 0.25s ease;
}
.wx-fab:hover { right: 4px; filter: brightness(1.06); box-shadow: -4px 3px 18px rgba(7, 193, 96, 0.5); }
.wx-fab .wx-fab-text {
    writing-mode: vertical-rl; letter-spacing: 4px;
    font-size: 12px; font-weight: 700;
}

/* 二维码小弹框(二维码大小, 无遮罩) */
.wx-pop {
    position: fixed; right: 62px; top: 46%; z-index: 901;
    transform: translateY(-50%) translateX(14px) scale(0.92);
    transform-origin: right center;
    width: 264px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg, 0 16px 48px rgba(0, 0, 0, 0.4));
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.22s;
}
.wx-pop.open {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateY(-50%) translateX(0) scale(1);
}
.wx-pop::after {
    content: ''; position: absolute; right: -6px; top: 50%;
    width: 12px; height: 12px; transform: translateY(-50%) rotate(45deg);
    background: var(--bg-card);
    border-top: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}
.wxp-head {
    display: flex; align-items: center; gap: 9px;
    padding: 12px 14px; border-bottom: 1px solid var(--border-color);
}
.wxp-logo {
    width: 28px; height: 28px; border-radius: 8px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 800; color: #fff;
    background: linear-gradient(135deg, #07c160, #059a4c);
}
.wxp-head b { flex: 1; font-size: 13.5px; color: var(--text-primary); }
.wx-pop .icon-btn { color: var(--text-muted); }
.wx-pop .icon-btn:hover { color: var(--text-primary); }
.wxp-qr {
    margin: 14px auto 0; width: 216px;
    padding: 9px; background: #fff; border-radius: 12px; line-height: 0;
    border: 2.5px solid rgba(7, 193, 96, 0.5);
}
.wxp-qr img { width: 200px; height: 200px; display: block; }
.wxp-tip {
    text-align: center; margin: 10px 0 14px;
    font-size: 11.5px; line-height: 1.6; color: var(--text-muted);
}

/* 返回顶部 */
.back-top {
    position: fixed; right: 0; top: calc(46% + 96px); z-index: 900;
    transform: translateY(-50%) translateX(60px);
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 10px 9px;
    color: var(--text-secondary); cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border-color); border-right: none;
    border-radius: 10px 0 0 10px;
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.18);
    opacity: 0; pointer-events: none;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.28s ease;
}
.back-top.show { transform: translateY(-50%) translateX(0); opacity: 1; pointer-events: auto; }
.back-top:hover { color: var(--accent-primary); border-color: var(--border-glow); }
.back-top .bt-text { font-size: 8.5px; font-weight: 800; letter-spacing: 0.5px; white-space: nowrap; }

/* 亮色主题 */
[data-theme="light"] .wx-pop { background: #ffffff; border-color: rgba(15, 23, 42, 0.1); box-shadow: 0 16px 48px rgba(15, 23, 42, 0.18); }
[data-theme="light"] .wx-pop::after { background: #ffffff; border-color: rgba(15, 23, 42, 0.1); }
[data-theme="light"] .wxp-tip { color: #64748b; }
[data-theme="light"] .back-top { background: #ffffff; border-color: rgba(15, 23, 42, 0.1); color: #475569; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 640px) {
    .wx-fab { padding: 10px 7px; }
    .wx-fab .wx-fab-text { font-size: 11px; letter-spacing: 3px; }
    .wx-pop { right: 52px; width: 232px; }
    .wxp-qr { width: 186px; }
    .wxp-qr img { width: 170px; height: 170px; }
    .back-top { top: calc(46% + 84px); }
}

/* ==================== 运营数据统计面板(管理员) ==================== */
.ops-stats {
    margin-bottom: 22px; padding: 18px 20px 20px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
}
.ops-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.ops-head h3 { margin: 0; font-size: 15px; color: var(--text-primary); }
.ops-head .ops-sub { font-size: 11.5px; color: var(--text-dim); }
.ops-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.ops-card {
    display: flex; flex-direction: column; gap: 3px;
    padding: 12px 14px;
    background: var(--bg-hover); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); transition: var(--transition);
}
.ops-card:hover { border-color: var(--border-glow); transform: translateY(-1px); }
.ops-card .ops-num { font-size: 21px; font-weight: 800; color: var(--accent-primary); line-height: 1.2; }
.ops-card .ops-label { font-size: 12px; font-weight: 600; color: var(--text-secondary); }
.ops-card .ops-sub2 { font-size: 10.5px; color: var(--text-dim); }

[data-theme="light"] .ops-stats { background: #ffffff; border-color: rgba(15, 23, 42, 0.08); }
[data-theme="light"] .ops-card { background: #f8fafc; border-color: rgba(15, 23, 42, 0.07); }
