/* ============================================
   TechDigest - 科技数码文案聚合网站 v3
   深色科技风主题 · 精修版
   ============================================ */

:root {
    --bg-primary: #0a0e17;
    --bg-secondary: #111827;
    --bg-tertiary: #1a2235;
    --bg-card: #162032;
    --bg-hover: #1e2d42;
    --border-color: #1e3a5f;
    --border-light: #2a3f5f;
    --text-primary: #e8edf5;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --accent-blue: #3b82f6;
    --accent-cyan: #06b6d4;
    --accent-purple: #8b5cf6;
    --accent-green: #10b981;
    --accent-orange: #f59e0b;
    --accent-red: #ef4444;
    --accent-pink: #ec4899;
    --gradient-hero: linear-gradient(135deg, #0ea5e9 0%, #8b5cf6 50%, #ec4899 100%);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.5);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --transition: all 0.25s ease;
    --sidebar-width: 300px;
    --history-width: 300px;
    --topbar-height: 56px;
    --content-max-width: 1500px;
    /* 侧栏两阶段拖拽基准常量（与 js/app.js 的 SB 常量一一对应，改一处需改两处） */
    --sidebar-margin-left: 40px;
    --sidebar-default-width: 300px;
    --sidebar-default-ml: 40px;
    --resizer-width: 10px;
}

/* ================= 浅色主题（默认） ================= */
/* 老板偏好浅色：默认 data-theme=light。变量覆盖后，绝大多数组件（用语义变量）自动翻转。 */
html[data-theme="light"] {
    --bg-primary: #f4f6fb;
    --bg-secondary: #ffffff;
    --bg-tertiary: #eef1f7;
    --bg-card: #ffffff;
    --bg-hover: #e8edf4;
    --border-color: #d4dce8;
    --border-light: #c2cee0;
    --text-primary: #1b2435;
    --text-secondary: #55617a;
    --text-muted: #8b96ab;
    --shadow-sm: 0 1px 3px rgba(20,30,50,0.08);
    --shadow-md: 0 4px 12px rgba(20,30,50,0.12);
    --shadow-lg: 0 8px 30px rgba(20,30,50,0.16);
}
/* 少量硬编码深色面板的浅色覆盖 */
html[data-theme="light"] .top-bar { background: rgba(255,255,255,0.86); }
html[data-theme="light"] .loading-overlay { background: rgba(244,246,251,0.92); }
html[data-theme="light"] .ai-edit-pane { background: rgba(232,237,244,0.7); }
html[data-theme="light"] .ai-chat-panel { background: rgba(232,237,244,0.6); }
html[data-theme="light"] .ai-chat-input { background: #ffffff; }
html[data-theme="light"] .ai-proof-panel { background: rgba(232,237,244,0.6); }
html[data-theme="light"] .ai-proof-item { background: rgba(232,237,244,0.7); }
html[data-theme="light"] .ai-proof-note-input { background: #ffffff; }
html[data-theme="light"] .ai-cite:hover { color: #06222b; }
/* 浅色下滚动条更柔和 */
html[data-theme="light"] ::-webkit-scrollbar-thumb { background: #c2cee0; }
html[data-theme="light"] ::-webkit-scrollbar-track { background: #eef1f7; }

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

html { font-size: 15px; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

a { color: var(--accent-cyan); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-blue); }

button {
    cursor: pointer; border: none; outline: none;
    font-family: inherit; font-size: inherit; transition: var(--transition);
}
ul { list-style: none; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ==================== Top Bar ==================== */
.top-bar {
    position: sticky; top: 0; z-index: 100;
    height: var(--topbar-height);
    background: rgba(17, 24, 39, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
}
.logo {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.3rem; font-weight: 700;
    background: var(--gradient-hero);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}
.logo i { font-size: 1.5rem; -webkit-text-fill-color: var(--accent-cyan); }
.top-bar-right { display: flex; align-items: center; gap: 16px; }
.update-time { font-size: 0.8rem; color: var(--text-muted); }
.refresh-btn {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--bg-tertiary); color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid var(--border-color);
}
.refresh-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent-cyan); }
.refresh-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.spinning { animation: spin 1s linear infinite; }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.auto-pulse { animation: spin 2.6s linear infinite; opacity: .62; }

/* ==================== Main Layout ==================== */
.main-container {
    display: flex;
    justify-content: flex-start;
    min-height: calc(100vh - var(--topbar-height));
    /* v260908b：恢复居中留白（内容区在侧栏以外的剩余空间里居中，而非贴左铺满） */
    padding-left: max(0px, calc((100% - (var(--sidebar-default-ml) + var(--sidebar-default-width) + var(--resizer-width) + var(--content-max-width))) / 2));
}

/* ==================== Sidebar ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    position: sticky; top: var(--topbar-height);
    height: calc(100vh - var(--topbar-height));
    overflow-y: auto; flex-shrink: 0;
    margin-left: var(--sidebar-margin-left);
    transition: width .18s ease, margin-left .18s ease;
}
/* 侧栏 / 内容 可拖动分隔条（两阶段缩放：左拖先吃左边距，右拖只恢复默认） */
.sidebar-resizer {
    width: var(--resizer-width); flex-shrink: 0; cursor: col-resize; touch-action: none;
    background: transparent; position: relative; z-index: 6;
    margin-left: calc(var(--resizer-width) / -2); margin-right: calc(var(--resizer-width) / -2);
}
.sidebar-resizer::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: 50%;
    width: 2px; transform: translateX(-50%);
    background: var(--border-color); transition: background .15s, box-shadow .15s;
}
.sidebar-resizer:hover::after,
.sidebar-resizer.active::after {
    background: var(--accent-purple);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.55);
}
/* 抓握点：hover 才出现，提示可拖 */
.sidebar-resizer::before {
    content: ''; position: absolute; top: 50%; left: 50%; width: 4px; height: 34px;
    transform: translate(-50%, -50%); border-radius: 3px; opacity: 0; transition: opacity .15s;
    background: repeating-linear-gradient(to bottom, var(--accent-purple) 0 3px, transparent 3px 7px);
}
.sidebar-resizer:hover::before,
.sidebar-resizer.active::before { opacity: .9; }
/* 到达边界时用光标语义提示"只能往哪边拖" */
.sidebar-resizer.at-max { cursor: w-resize; }   /* 已是默认，只能向左收窄 */
.sidebar-resizer.at-min { cursor: e-resize; }   /* 已到最窄，只能向右恢复 */
.sidebar-resizer.at-max::after,
.sidebar-resizer.at-min::after { background: var(--accent-orange); }
.sidebar-resizer:focus-visible { outline: 2px solid var(--accent-purple); outline-offset: 2px; }
/* 拖拽中的实时尺寸气泡 */
.sidebar-resizer-badge {
    position: absolute; top: 50%; left: 14px; transform: translateY(-50%); white-space: nowrap;
    padding: 4px 8px; border-radius: 6px; font-size: .72rem; font-variant-numeric: tabular-nums;
    background: var(--bg-card); border: 1px solid var(--accent-purple); color: var(--text-primary);
    box-shadow: var(--shadow-md); pointer-events: none; z-index: 7;
}
html.sb-dragging { cursor: col-resize; }
html.sb-dragging, html.sb-dragging * { user-select: none !important; }
html.sb-dragging .sidebar { transition: none !important; }     /* 拖拽中禁用过渡，否则会"追不上"手 */
.sidebar-nav { flex: 1; padding: 16px 8px; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 16px; border-radius: var(--radius-md);
    cursor: pointer; color: var(--text-secondary);
    font-size: 0.92rem; font-weight: 500;
    border: 1px solid transparent; transition: var(--transition);
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
    background: var(--bg-tertiary); color: var(--accent-cyan);
    border-color: var(--border-color);
    box-shadow: 0 0 20px rgba(6, 182, 212, 0.08);
}
.nav-item i { width: 22px; text-align: center; font-size: 1.1rem; }
.nav-item-disabled {
    cursor: not-allowed; opacity: 0.5; pointer-events: none;
}
.nav-item-disabled i { width: 22px; text-align: center; font-size: 1.1rem; }
.nav-item-disabled span { }

/* v260819：带子项的导航分组（父项可展开/折叠，子项缩进展示）*/
.nav-group { display: flex; flex-direction: column; }
.nav-parent { position: relative; }
.nav-label { flex: 1; }
.nav-caret { width: 14px !important; font-size: .72rem !important; color: var(--text-muted); transition: transform .2s ease; margin-left: 4px; }
.nav-caret.open { transform: rotate(90deg); }
.nav-children { display: flex; flex-direction: column; gap: 2px; padding-left: 26px; margin-top: 2px; }
.nav-child { padding: 10px 16px; font-size: 0.88rem; }
.nav-child-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); opacity: .55; flex: 0 0 auto; }
.nav-item.nav-child.active .nav-child-dot { background: var(--accent-cyan); opacity: 1; }

.badge-coming {
    font-size: 0.62rem; padding: 2px 8px; border-radius: 10px;
    background: rgba(139, 92, 246, 0.2); color: var(--accent-purple);
    margin-left: auto; white-space: nowrap;
}
.badge-live {
    font-size: 0.62rem; padding: 2px 8px; border-radius: 10px;
    background: rgba(16, 185, 129, 0.18); color: #34d399;
    margin-left: auto; white-space: nowrap;
    border: 1px solid rgba(16, 185, 129, 0.35);
}

/* ==================== 风格分析面板 ==================== */
.style-panel { max-width: var(--content-max-width); }
.style-header {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 12px; margin-bottom: 22px;
}
.panel-title {
    font-size: 1.35rem; font-weight: 700; color: var(--text-primary);
    display: flex; align-items: center; gap: 10px; margin: 0;
}
.panel-title i { color: var(--accent-purple); }
.panel-sub { margin: 6px 0 0; font-size: 0.82rem; color: var(--text-secondary); }
.panel-sub strong { color: var(--accent-cyan); }
.style-empty { text-align: center; padding: 80px 20px; color: var(--text-muted); font-size: 0.9rem; }

.style-overview {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 20px;
}
.ov-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 16px 18px;
}
.ov-num { font-size: 1.5rem; font-weight: 700; color: var(--accent-cyan); line-height: 1.2; }
.ov-num .ov-unit { font-size: 0.85rem; color: var(--text-muted); margin-left: 2px; font-weight: 500; }
.ov-label { font-size: 0.72rem; color: var(--text-muted); margin-top: 6px; }

.style-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px;
}
.style-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); padding: 18px 20px;
}
.card-title {
    font-size: 1rem; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px; margin: 0 0 2px;
}
.card-title i { color: var(--accent-purple); }
.card-hint { font-size: 0.72rem; color: var(--text-muted); margin: 0 0 14px; }

.word-cloud {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px;
    padding: 8px 4px; line-height: 1.6;
}
.cloud-word {
    font-weight: 700; cursor: default; transition: transform 0.15s ease, opacity 0.15s ease;
    opacity: 0.92;
}
.cloud-word:hover { transform: scale(1.08); opacity: 1; }

.bar-list { display: flex; flex-direction: column; gap: 10px; }
/* 用固定列宽的 grid，保证所有柱子的 0 刻度（bar-track 起点）对齐在同一竖线上 */
.bar-row { display: grid; grid-template-columns: 96px 1fr 42px; align-items: center; gap: 10px; }
.bar-label {
    font-size: 0.8rem; color: var(--text-secondary);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right;
}
.bar-track {
    height: 10px; background: var(--bg-tertiary);
    border-radius: 6px; overflow: hidden;
}
.bar-fill {
    height: 100%; border-radius: 6px; min-width: 3px;
    transition: width 0.5s ease;
    background-image: linear-gradient(180deg, rgba(255,255,255,0.22), rgba(0,0,0,0.10));
}
.bar-val { font-size: 0.78rem; color: var(--text-muted); text-align: left; }
/* 来源活跃度分组（筛选源 / 主题源 / 其他）*/
.src-group { margin-bottom: 14px; }
.src-group:last-child { margin-bottom: 0; }
.src-group-title { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.src-group-count { font-size: 0.72rem; color: var(--text-muted); }
.src-group .bar-list { gap: 8px; }

@media (max-width: 880px) {
    .style-overview { grid-template-columns: repeat(2, 1fr); }
    .style-grid { grid-template-columns: 1fr; }
}
.section-subtitle { font-size: 1rem; font-weight: 600; color: var(--text-primary); display: flex; align-items: center; gap: 8px; margin: 24px 0 14px; }
.section-subtitle i { color: var(--accent-cyan); }

/* 热点分析输入区 */
.hot-topic-input-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 20px; margin-bottom: 20px; }
.hot-topic-input-card .card-title { margin-bottom: 2px; }
.hot-topic-input-card .card-hint { margin-bottom: 18px; }
.hot-topic-field { margin-bottom: 16px; }
.hot-topic-field label, .hot-topic-urls > label { display: block; font-size: .84rem; font-weight: 500; color: var(--text-primary); margin-bottom: 6px; }
.hot-topic-optional { font-size: .72rem; color: var(--text-muted); font-weight: 400; margin-left: 6px; }
.hot-topic-field input, .hot-topic-urls textarea, .hot-topic-article textarea {
    width: 100%; padding: 10px 12px; border-radius: var(--radius-md); border: 1px solid var(--border-color);
    background: var(--bg-secondary); color: var(--text-primary); font-size: .86rem; outline: none; resize: vertical;
}
.hot-topic-field input:focus, .hot-topic-urls textarea:focus, .hot-topic-article textarea:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6,182,212,.1); }
.hot-topic-articles { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.hot-topic-article { background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-sm); padding: 12px; }
.hot-topic-article-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.hot-topic-article-head label { font-size: .82rem; font-weight: 600; color: var(--text-secondary); }
.hot-topic-remove { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hot-topic-remove:hover { color: #ef4444; border-color: #ef4444; }
.hot-topic-actions { display: flex; gap: 10px; margin-bottom: 18px; }
.hot-topic-urls { margin-bottom: 18px; }
.hot-topic-url-row { display: flex; gap: 10px; align-items: stretch; }
.hot-topic-url-row textarea { flex: 1; min-height: 78px; }
.hot-topic-url-row button { flex: 0 0 auto; align-self: flex-start; }
.hot-topic-run { display: flex; align-items: center; gap: 12px; }
.hot-topic-run-hint { font-size: .76rem; color: var(--text-muted); }
.hot-topic-error { margin-top: 12px; color: #ef4444; font-size: .84rem; display: flex; align-items: center; gap: 6px; }
.hot-topic-result { margin-top: 18px; border-top: 1px dashed var(--border-light); padding-top: 18px; }
.hot-topic-result h4 { margin: 0 0 10px; font-size: 1rem; color: var(--accent-purple); display: flex; align-items: center; gap: 8px; }
.hot-topic-result-body pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .9rem; line-height: 1.7; color: var(--text-primary); margin: 0; }
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border-color); }
.sidebar-stats { display: flex; gap: 8px; }
.stat-item {
    flex: 1; text-align: center; padding: 10px 6px;
    background: var(--bg-tertiary); border-radius: var(--radius-sm);
}
.stat-num { display: block; font-size: 1.2rem; font-weight: 700; color: var(--accent-cyan); }
.stat-label { font-size: 0.7rem; color: var(--text-muted); }
.stat-today-badge {
    display: inline-flex; align-items: center; gap: 3px;
    margin-top: 5px; padding: 2px 6px; border-radius: 999px;
    font-size: .62rem; font-weight: 600; color: #fff;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    box-shadow: 0 2px 8px rgba(139,92,246,.35);
    animation: statBadgePop .5s cubic-bezier(.34,1.56,.64,1), statBadgePulse 2s ease-in-out infinite .5s;
}
@keyframes statBadgePop {
    0% { transform: scale(0); opacity: 0; }
    70% { transform: scale(1.15); opacity: 1; }
    100% { transform: scale(1); }
}
@keyframes statBadgePulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(139,92,246,.35); }
    50% { box-shadow: 0 2px 14px rgba(6,182,212,.55); }
}
.sidebar-stats-caption { margin-top: 10px; font-size: 0.68rem; line-height: 1.5; color: var(--text-muted); text-align: center; }

/* ==================== Content ==================== */
.content {
    flex: 1;
    /* v260908b：参考主流站点（知乎/B站）——导航居左，内容区在剩余空间里居中，
       有最大可读宽度（1500px），而不是无限铺满；窄屏自动退化为铺满 */
    max-width: var(--content-max-width);
    padding: 28px 36px;
    overflow-y: auto;
}

/* v260908b：热点看板卡片最多 4 列 —— 窄屏沿用 auto-fill 自适应(1~3 列)，宽屏固定 4 列 */
@media (min-width: 1400px) {
    .tech-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ==================== Sub Tabs ==================== */
.social-hotboard { max-width: none; }
.tech-hotboard { max-width: none; }
.sub-tabs {
    display: flex; gap: 6px; margin-bottom: 24px;
    background: var(--bg-secondary); padding: 5px;
    border-radius: var(--radius-md); border: 1px solid var(--border-color);
    max-width: 580px;
}
.sub-tab {
    flex: 1; padding: 10px 18px; border-radius: var(--radius-sm);
    background: transparent; color: var(--text-secondary);
    font-size: 0.85rem; font-weight: 500;
    display: flex; align-items: center; justify-content: center; gap: 7px;
}
.sub-tab:hover { color: var(--text-primary); }
.sub-tab.active { background: var(--bg-tertiary); color: var(--accent-cyan); box-shadow: var(--shadow-sm); }

/* ==================== Platform Buttons ==================== */
.platform-buttons {
    display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap;
}
.platform-btn {
    padding: 9px 18px; border-radius: var(--radius-md);
    background: var(--bg-secondary); color: var(--text-secondary);
    font-size: 0.83rem; font-weight: 500;
    border: 1px solid var(--border-color);
    display: flex; align-items: center; gap: 7px;
}
.platform-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.platform-btn.active { color: #fff; border-color: transparent; box-shadow: var(--shadow-md); }
.platform-btn.weibo.active { background: linear-gradient(135deg, #e6162d, #ff6b6b); }
.platform-btn.douyin.active { background: linear-gradient(135deg, #111, #333); border-color: #555; }
.platform-btn.toutiao.active { background: linear-gradient(135deg, #e13b3f, #ff6b6b); }
.platform-btn.baidu.active { background: linear-gradient(135deg, #2932e1, #6b7fff); }
.platform-btn.zhihu.active { background: linear-gradient(135deg, #0084ff, #2e9bff); }

/* ==================== Hot List (竖排) ==================== */
.hot-list-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    min-height: 300px; position: relative; overflow: hidden;
}
.hot-list { padding: 4px 0; }
.hot-item {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 18px;
    border-bottom: 1px solid rgba(30, 58, 95, 0.25);
    transition: var(--transition);
}
.hot-item:last-child { border-bottom: none; }
.hot-item:hover { background: var(--bg-hover); }
.hot-rank-front {
    width: 28px; height: 28px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.82rem; font-weight: 700; color: var(--text-muted);
    background: var(--bg-tertiary); border-radius: 8px;
}
.hot-rank-front.top3 { color: #fff; background: var(--gradient-hero); }
.hot-rank-back {
    flex-shrink: 0;
    display: inline-flex; align-items: center;
    font-size: 0.72rem; font-weight: 600; color: var(--text-muted);
    background: var(--bg-tertiary); border-radius: 999px;
    padding: 2px 8px;
}
.hot-content {
    flex: 1; min-width: 0;
    display: flex; flex-direction: column; align-items: flex-start; gap: 4px;
}
.hot-title {
    font-size: 0.88rem; font-weight: 500; color: var(--text-primary);
    width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hot-title:hover { color: var(--accent-cyan); }
.hot-metrics { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hot-desc {
    margin: 0; font-size: .74rem; line-height: 1.4; color: var(--text-muted);
    width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hot-tag {
    font-size: 0.66rem; padding: 2px 8px; border-radius: 10px;
    white-space: nowrap; flex-shrink: 0;
}
.hot-tag.tag-new { background: rgba(16,185,129,0.15); color: var(--accent-green); }
.hot-tag.tag-hot { background: rgba(239,68,68,0.15); color: var(--accent-red); }
.hot-tag.tag-rising { background: rgba(245,158,11,0.15); color: var(--accent-orange); }
.hot-tag.tag-ad { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.hot-tag.tag-field { background: rgba(59,130,246,0.15); color: #3b82f6; border: 1px solid rgba(59,130,246,0.25); }
.hot-brand {
    font-size: 0.66rem; padding: 2px 8px; border-radius: 10px;
    white-space: nowrap; flex-shrink: 0;
    background: rgba(59,130,246,.12); color: #3b82f6;
}
html[data-theme="dark"] .hot-brand { background: rgba(96,165,250,.18); color: #93c5fd; }

/* ===== 社媒榜单来源条 + 原帖/搜索操作 ===== */
.social-source-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 12px; padding: 9px 14px; border-radius: var(--radius-md);
    background: var(--bg-tertiary); border: 1px solid var(--border-color); font-size: .78rem;
}
.social-source-label { color: var(--text-muted); }
.social-source-link {
    display: inline-flex; align-items: center; gap: 5px; font-weight: 600;
    color: var(--accent-purple); padding: 2px 8px; border-radius: 6px;
    border: 1px solid rgba(139,92,246,.32); background: rgba(139,92,246,.08);
}
.social-source-link:hover { background: rgba(139,92,246,.16); color: var(--accent-purple); }
.social-source-note { color: var(--text-muted); }
.social-source-count { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.social-refresh-btn { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; font-size: .78rem; transition: var(--transition); }
.social-refresh-btn:hover:not(:disabled) { border-color: var(--accent-cyan); color: var(--accent-cyan); background: var(--bg-hover); }
.social-refresh-btn:disabled { opacity: .55; cursor: not-allowed; }
.social-refresh-btn i.spinning { animation: fa-spin 1s linear infinite; }
.hot-hot { flex-shrink: 0; font-size: .70rem; color: var(--accent-orange); }
.hot-views, .hot-videos { flex-shrink: 0; font-size: .70rem; color: var(--text-muted); }
.hot-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; opacity: 0; transform: translateX(4px); transition: opacity .15s, transform .15s; }
.hot-item:hover .hot-actions, .hot-item:focus-within .hot-actions { opacity: 1; transform: none; }
@media (hover: none) { .hot-actions { opacity: 1; transform: none; } }
.hot-open {
    display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
    font-size: .72rem; color: var(--accent-cyan);
    border: 1px solid rgba(6,182,212,.34); background: rgba(6,182,212,.08);
}
.hot-open:hover { background: rgba(6,182,212,.18); }
.hot-open.is-search { color: var(--accent-orange); border-color: rgba(245,158,11,.34); background: rgba(245,158,11,.08); }
.hot-open.is-search:hover { background: rgba(245,158,11,.18); }
.hot-icon-btn {
    width: 26px; height: 26px; border-radius: 6px; background: transparent;
    border: 1px solid var(--border-color); color: var(--text-muted); font-size: .72rem;
}
.hot-icon-btn:hover { color: var(--accent-purple); border-color: var(--accent-purple); }
.hot-empty-note {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
    font-size: 0.85rem;
}

/* ==================== Loading & Error & Empty ==================== */
.loading-overlay {
    position: absolute; inset: 0;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    background: rgba(17,24,39,0.9); z-index: 10; gap: 16px; padding: 24px;
}
.spinner { width: 36px; height: 36px; border: 3px solid var(--border-color); border-top-color: var(--accent-cyan); border-radius: 50%; animation: spin 0.8s linear infinite; }

/* ==================== 加载进度条（科技资讯热点看板） ==================== */
.progress-card {
    width: min(460px, 86%); display: flex; flex-direction: column; gap: 12px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 22px 24px; box-shadow: var(--shadow-lg);
}
.progress-track {
    position: relative; width: 100%; height: 10px; border-radius: 999px;
    background: var(--bg-secondary); overflow: hidden;
    border: 1px solid var(--border-color);
}
.progress-fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0;
    border-radius: 999px; overflow: hidden; will-change: width;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple));
    background-size: 200% 100%;
    animation: progress-hue 3.2s ease-in-out infinite;
    /* 0.45s 缓动，叠加每 200ms 涓流推进，过渡与进度首尾相接成连续流动 */
    transition: width .45s cubic-bezier(.22, .61, .36, 1);
}
@keyframes progress-hue { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
/* 流光：即使宽度一帧没变，用户也能看到"在动" */
.progress-fill::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
    transform: translateX(-100%); animation: progress-sheen 1.5s ease-in-out infinite;
}
@keyframes progress-sheen { to { transform: translateX(100%); } }
/* 总大小未知：不再劫持 width（原 .indeterminate 做法），只叠加更快的流光 */
.progress-track.unknown-total .progress-fill::after { animation-duration: .9s; }
/* 阶段步进指示器 */
.progress-steps { display: flex; gap: 14px; font-size: .72rem; color: var(--text-muted); }
.progress-step i { font-size: .4rem; margin-right: 4px; vertical-align: middle; }
.progress-step.done { color: var(--accent-green); }
.progress-step.active { color: var(--accent-cyan); font-weight: 700; }
.progress-step.active i { animation: spin 1s linear infinite; }
/* 修复：模板实际挂的是 unknown-total 类（而非 indeterminate），旧选择器对不上 → total=0 时
   进度条 width 恒为 0、看起来像死掉，正是用户“以为卡死→反复点→从零重来”循环的根源。
   这里改用 unknown-total，并保留明显扫动条 + 流光，明确告知“仍在下载”。*/
.progress-track.unknown-total .progress-fill {
    width: 45% !important; transition: none;
    animation: progress-indeterminate 1.2s ease-in-out infinite;
}
@keyframes progress-indeterminate {
    0%   { left: -45%; }
    100% { left: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    /* 非 unknown-total 的进度条照旧关闭动画 */
    .progress-track:not(.unknown-total) .progress-fill, .progress-fill::after { animation: none !important; }
    .progress-fill { transition: width .2s linear; }
    /* unknown-total：关掉扫动，但用静态斜纹条表明“仍在下载”，避免又像死掉（用户已多次踩此坑）*/
    .progress-track.unknown-total .progress-fill {
        animation: none !important; left: 0 !important;
        background-color: #8b5cf6;
        background-image: repeating-linear-gradient(45deg, rgba(255,255,255,.35) 0 10px, transparent 10px 20px);
    }
}
/* v260907：后台补齐进度条（首批已上屏时的紧凑条，不遮挡列表） */
.bg-progress-strip {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    margin: 0 0 12px; padding: 8px 14px;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-md); font-size: .78rem; color: var(--text-secondary);
}
.bg-progress-strip > i.fa-circle-notch { color: var(--accent-cyan); }
.bg-progress-track {
    position: relative; flex: 1 1 160px; min-width: 120px; height: 6px;
    border-radius: 999px; background: var(--bg-secondary); overflow: hidden;
    border: 1px solid var(--border-color);
}
.bg-progress-fill {
    position: absolute; left: 0; top: 0; bottom: 0; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan), var(--accent-purple));
    background-size: 200% 100%; animation: progress-hue 3.2s ease-in-out infinite;
    transition: width .45s cubic-bezier(.22, .61, .36, 1);
}
.bg-progress-percent { font-weight: 700; color: var(--accent-cyan); }
.bg-progress-bytes { color: var(--text-muted); }
.bg-progress-hint { flex: 1 1 100%; font-size: .72rem; color: var(--text-muted); }
.progress-meta {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.progress-label {
    font-size: 0.86rem; color: var(--text-secondary); line-height: 1.4;
}
.progress-percent {
    font-size: 0.92rem; font-weight: 700; color: var(--accent-cyan);
    font-variant-numeric: tabular-nums; white-space: nowrap;
}
.progress-bytes {
    font-size: 0.76rem; color: var(--text-muted); font-variant-numeric: tabular-nums;
}
.error-message {
    display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 40px 20px; color: var(--accent-red); flex-direction: column;
}
.error-message i { font-size: 2rem; }
.error-message button { margin-top: 8px; padding: 8px 20px; border-radius: var(--radius-sm); background: var(--accent-red); color: #fff; }
.empty-state {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 60px 20px; color: var(--text-muted); gap: 12px;
}
.empty-state i { font-size: 3rem; }

/* ==================== Tech Controls ==================== */
.tech-controls {
    display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px;
}
.source-filter { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.filter-label { font-size: 0.78rem; color: var(--text-muted); margin-right: 2px; }
.source-tag {
    padding: 5px 12px; border-radius: 20px; font-size: 0.75rem;
    background: var(--bg-secondary); color: var(--text-secondary);
    border: 1px solid var(--border-color); cursor: pointer; transition: var(--transition);
}
.source-tag:hover { background: var(--bg-hover); color: var(--text-primary); }
.source-tag.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.tech-search { max-width: 460px; }
.search-input {
    width: 100%; padding: 9px 14px; border-radius: var(--radius-md);
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 0.85rem; outline: none; transition: var(--transition);
}
.search-input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6,182,212,0.1); }
.search-input::placeholder { color: var(--text-muted); }

/* ==================== Tech List ==================== */
.tech-list-container {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    min-height: 300px; position: relative; overflow: hidden; padding: 14px;
}
.tech-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
    gap: 12px;
}
.tech-card {
    background: var(--bg-card); border-radius: var(--radius-md);
    padding: 15px; border: 1px solid var(--border-color);
    transition: var(--transition); display: flex; flex-direction: column; gap: 8px;
}
.tech-card:hover { border-color: var(--accent-cyan); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.tech-card-header { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tech-source-badge { font-size: 0.66rem; padding: 2px 8px; border-radius: 4px; color: #fff; font-weight: 600; }
.tech-time { font-size: 0.7rem; color: var(--text-muted); margin-left: auto; }
/* 热门度徽章 / 热度分 */
.tech-hot-badge {
    font-size: 0.62rem; padding: 2px 7px; border-radius: 4px; font-weight: 700; letter-spacing: .5px;
    background: linear-gradient(135deg, #ff8a00, #ff5e3a); color: #fff; box-shadow: 0 1px 4px rgba(255,94,58,.35);
}
.tech-hot-badge.explode { background: linear-gradient(135deg, #ff3b3b, #ff0050); box-shadow: 0 1px 6px rgba(255,0,80,.45); }
.tech-hot-badge.top50 { background: linear-gradient(135deg, #ff2d55, #ff6a00); box-shadow: 0 1px 6px rgba(255,45,85,.45); font-weight: 800; }
.tech-heat { font-size: 0.66rem; color: #ff7a18; font-weight: 600; padding: 1px 6px; border-radius: 4px; background: rgba(255,122,24,.1); }
.tech-heat.social-heat { color: #ef4444; background: rgba(239,68,68,.1); }
.tech-sort { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tech-layer-switch { display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; flex-wrap: wrap; }
.tech-layer-switch .tech-layer-label { font-size: 0.78rem; color: var(--text-muted); display: inline-flex; align-items: center; gap: 5px; }

/* v260904：冷层「手动加载」引导面板。复用 empty-state 视觉但更强引导 */
.cold-layer-gate {
    display: flex;
    justify-content: center;
    padding: 60px 16px;
}
.cold-layer-gate-card {
    max-width: 480px;
    width: 100%;
    text-align: center;
    background: var(--bg-secondary);
    border: 1px dashed var(--border-color);
    border-radius: var(--radius-md);
    padding: 32px 24px;
    color: var(--text-secondary);
}
.cold-layer-gate-card > i {
    font-size: 2.4rem;
    color: var(--accent-cyan);
    margin-bottom: 12px;
    display: inline-block;
}
.cold-layer-gate-card h3 {
    font-size: 1.05rem;
    color: var(--text-primary);
    margin: 0 0 12px;
    font-weight: 600;
}
.cold-layer-gate-card p {
    font-size: 0.85rem;
    line-height: 1.6;
    margin: 6px 0;
}
.cold-layer-gate-card p strong { color: var(--accent-cyan); font-weight: 600; }
.cold-layer-gate-hint { color: var(--text-muted); font-size: 0.78rem !important; }
.cold-layer-err {
    margin-top: 14px;
    padding: 9px 14px;
    border-radius: var(--radius-md);
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.4);
    color: #fca5a5;
    font-size: 0.82rem;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}
.cold-layer-err i { color: #f87171; flex-shrink: 0; }
.cold-layer-load-btn {
    margin-top: 18px;
    padding: 10px 26px;
    border-radius: var(--radius-md);
    background: var(--accent-blue);
    color: #fff;
    border: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: filter .15s, transform .15s;
}
.cold-layer-load-btn:hover:not(:disabled) { filter: brightness(1.1); transform: translateY(-1px); }
.cold-layer-load-btn:disabled { opacity: .6; cursor: not-allowed; }
.cold-layer-load-btn .spinning { animation: spin 1s linear infinite; }
.hot-only { display: inline-flex; align-items: center; gap: 5px; font-size: 0.74rem; color: var(--text-secondary); cursor: pointer; margin-left: 4px; user-select: none; }
.hot-only input { accent-color: var(--accent-blue); cursor: pointer; }
.tech-card-title { font-size: 0.9rem; font-weight: 600; line-height: 1.45; }
.tech-card-title a {
    color: var(--text-primary);
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.tech-card-title a:hover { color: var(--accent-cyan); }
.tech-card-desc {
    font-size: 0.78rem; color: var(--text-secondary); line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.tech-card-desc-empty { color: var(--text-muted); font-style: italic; }
.tech-card-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tech-tag { font-size: 0.65rem; padding: 2px 7px; border-radius: 4px; background: rgba(59,130,246,0.12); color: var(--accent-blue); }
.tech-tag-default { background: rgba(100,116,139,0.15); color: var(--text-muted); }
.tech-load-more {
    text-align: center; margin-top: 16px;
}
.tech-load-more button {
    padding: 10px 32px; border-radius: var(--radius-md);
    background: var(--bg-tertiary); color: var(--accent-cyan);
    border: 1px solid var(--border-color); font-size: 0.85rem;
}
.tech-load-more button:hover { background: var(--bg-hover); border-color: var(--accent-cyan); }
.tech-load-more button:disabled { opacity: 0.4; cursor: not-allowed; }

/* ==================== Placeholder ==================== */
.placeholder-panel { min-height: 70vh; display: flex; align-items: center; justify-content: center; }
.placeholder-content { text-align: center; max-width: 500px; }
.placeholder-icon {
    width: 100px; height: 100px; margin: 0 auto 24px;
    background: var(--bg-tertiary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--border-color);
}
.placeholder-icon i { font-size: 2.5rem; color: var(--accent-cyan); }
.placeholder-content h2 {
    font-size: 1.6rem; margin-bottom: 8px;
    background: var(--gradient-hero);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
}
.placeholder-desc { color: var(--text-secondary); margin-bottom: 24px; }
.coming-soon-badge {
    display: inline-flex; align-items: center; gap: 8px; padding: 10px 24px;
    background: rgba(139,92,246,0.12); border: 1px solid rgba(139,92,246,0.3);
    border-radius: var(--radius-md); color: var(--accent-purple); margin-bottom: 32px;
}
.feature-preview { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.feature-item {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 20px; background: var(--bg-tertiary); border-radius: var(--radius-md);
    border: 1px solid var(--border-color); min-width: 120px;
}
.feature-item i { font-size: 1.3rem; color: var(--accent-cyan); }
.feature-item span { font-size: 0.8rem; color: var(--text-secondary); }

/* ==================== AI Writer Panel ==================== */
.ai-writer-panel { padding: 0; }
.ai-writer-container { max-width: 100%; }

.ai-writer-header {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 0 16px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px;
}
.ai-writer-header i { font-size: 1.6rem; color: var(--accent-cyan); }
.ai-writer-header h2 { font-size: 1.3rem; color: var(--text-primary); margin: 0; }
.ai-badge {
    margin-left: auto; font-size: 0.72rem; padding: 3px 12px; border-radius: 12px;
    background: rgba(139,92,246,0.15); color: var(--accent-purple);
}

/* 收藏夹快捷生成条 */
.ai-fav-strip {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 14px; margin-bottom: 18px;
    background: rgba(245, 158, 11, 0.07); border: 1px solid rgba(245, 158, 11, 0.25);
    border-radius: 12px;
}
.ai-fav-strip-label { font-size: 0.85rem; color: var(--accent-amber, #f59e0b); font-weight: 600; white-space: nowrap; }
.ai-fav-strip-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ai-fav-strip-count { font-size: 0.78rem; color: var(--text-muted); }
.ai-fav-expand { margin-left: auto; border: 1px solid var(--border, rgba(255,255,255,0.12)); background: transparent; color: var(--text-secondary); padding: 4px 10px; border-radius: 8px; cursor: pointer; font-size: 0.78rem; display: inline-flex; align-items: center; gap: 4px; transition: all .15s; }
.ai-fav-expand:hover { color: var(--accent-amber, #f59e0b); border-color: var(--accent-amber, #f59e0b); }
.ai-fav-chips { display: flex; gap: 8px; flex-wrap: wrap; overflow-x: hidden; overflow-y: auto; max-height: 132px; padding: 2px; scrollbar-width: thin; }
.ai-fav-chips.expanded { max-height: 420px; }
.ai-fav-chip {
    flex: 0 0 auto; max-width: 200px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    font-size: 0.8rem; padding: 5px 8px 5px 12px; border-radius: 16px; cursor: pointer;
    background: var(--bg-glass, rgba(255,255,255,0.06)); color: var(--text-primary);
    border: 1px solid var(--border-color); transition: all 0.15s ease;
    display: inline-flex; align-items: center; gap: 6px;
}
.ai-fav-chip:hover { background: var(--accent-amber, #f59e0b); color: #fff; border-color: transparent; }
.ai-fav-chip-text { overflow: hidden; text-overflow: ellipsis; }
.ai-fav-chip-remove {
    width: 16px; height: 16px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    font-size: .65rem; color: inherit; opacity: .7; background: rgba(0,0,0,.08);
}
.ai-fav-chip:hover .ai-fav-chip-remove { opacity: 1; background: rgba(255,255,255,.25); }
.ai-fav-chip-remove:hover { transform: scale(1.1); }
.ai-fav-empty {
    font-size: 0.82rem; color: var(--text-muted); margin-bottom: 18px; padding: 10px 14px;
    border: 1px dashed var(--border-color); border-radius: 12px;
}
.ai-fav-empty i { color: var(--accent-amber, #f59e0b); margin-right: 6px; }

.ai-writer-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.ai-input-section, .ai-control-section {
    display: flex; flex-direction: column; gap: 16px;
}

.ai-field { display: flex; flex-direction: column; gap: 6px; }
.ai-field-grow { flex: 1; display: flex; flex-direction: column; }
.ai-field-grow .ai-textarea-main { flex: 1; resize: vertical; }
.ai-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
}
.ai-label i { color: var(--accent-cyan); width: 16px; text-align: center; }

/* 「信息来源 / 参考文献」输入区视觉提示，让用户一眼认出这是参考文献入口 */
.ai-field-ref {
    background: rgba(6,182,212,0.06);
    border: 1px solid rgba(6,182,212,0.35);
    border-left: 3px solid var(--accent-cyan);
    border-radius: var(--radius-md);
    padding: 12px 14px 14px;
}
.ai-field-ref .ai-label { color: var(--accent-cyan); }
.ai-field-ref .ai-textarea:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6,182,212,0.12); }

/* 「联网搜索」开关 */
.ai-toggle {
    display: flex; align-items: center; gap: 10px;
    font-size: 0.84rem; font-weight: 600; color: var(--text-primary);
    cursor: pointer; user-select: none;
}
.ai-toggle input { display: none; }
.ai-toggle-track {
    position: relative; width: 40px; height: 22px; border-radius: 999px;
    background: var(--border-color); transition: background .2s; flex-shrink: 0;
}
.ai-toggle-thumb {
    position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3);
}
.ai-toggle input:checked + .ai-toggle-track { background: var(--accent-cyan); }
.ai-toggle input:checked + .ai-toggle-track .ai-toggle-thumb { transform: translateX(18px); }
.ai-toggle i { color: var(--accent-cyan); width: 16px; text-align: center; }

.ai-input {
    padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 0.88rem; outline: none; transition: var(--transition);
}
.ai-input:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6,182,212,0.1); }
.ai-input::placeholder { color: var(--text-muted); }

.ai-textarea {
    padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 0.85rem; outline: none;
    resize: vertical; font-family: inherit; line-height: 1.6; transition: var(--transition);
}
.ai-textarea:focus { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6,182,212,0.1); }
.ai-textarea::placeholder { color: var(--text-muted); }
.ai-textarea-main { min-height: 180px; }
.ai-textarea-sm { min-height: 60px; }
.ai-char-count { font-size: 0.7rem; color: var(--text-muted); text-align: right; margin-top: -4px; }

/* 原文上传按钮 / 拖拽区 */
.ai-field-head { display: flex; align-items: center; gap: 8px; }
.ai-upload-btn {
    margin-left: auto; padding: 3px 10px; border: 1px dashed var(--accent-cyan);
    background: transparent; color: var(--accent-cyan); border-radius: 6px;
    font-size: 0.72rem; cursor: pointer; transition: background .15s, color .15s;
}
.ai-upload-btn:hover { background: var(--accent-cyan); color: #06222b; }
.ai-file-hidden { display: none; }
.ai-upload-status { margin-left: 8px; font-size: 0.7rem; color: var(--text-muted); }
.ai-dropzone { position: relative; flex: 1; display: flex; }
.ai-dropzone .ai-textarea-main { width: 100%; }
.ai-dropzone.dragover { outline: 2px dashed var(--accent-cyan); outline-offset: 2px; border-radius: var(--radius); }
.ai-dropzone-hint {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    gap: 8px; background: rgba(34,211,238,0.12); color: var(--accent-cyan);
    font-size: 0.9rem; font-weight: 600; border-radius: var(--radius); pointer-events: none;
}

/* 参数卡片 */
.ai-params-card {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 18px;
    display: flex; flex-direction: column; gap: 16px;
}
.ai-params-title {
    font-size: 0.95rem; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px; margin: 0 0 4px;
}
.ai-params-title i { color: var(--accent-purple); }

/* Radio 按钮组 */
.ai-radio-group {
    display: flex; flex-wrap: wrap; gap: 6px;
}
.ai-radio {
    display: flex; align-items: center; cursor: pointer;
    padding: 6px 13px; border-radius: 20px;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
    font-size: 0.78rem; color: var(--text-secondary); transition: var(--transition);
    user-select: none;
}
.ai-radio input { display: none; }
.ai-radio:hover { background: var(--bg-hover); color: var(--text-primary); }
.ai-radio.active {
    background: rgba(6,182,212,0.15); border-color: var(--accent-cyan);
    color: var(--accent-cyan); font-weight: 600;
}

/* 平台 / 文体预设 */
.ai-label-tip { margin-left: auto; font-size: 0.68rem; font-weight: 400; color: var(--text-muted); }
.ai-preset-row { display: flex; flex-wrap: wrap; gap: 8px; }
.ai-preset-chip {
    display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
    padding: 7px 14px; border-radius: 8px;
    background: linear-gradient(135deg, rgba(34,211,238,0.12), rgba(34,211,238,0.04));
    border: 1px solid rgba(34,211,238,0.4); color: var(--accent-cyan);
    font-size: 0.76rem; font-weight: 600; transition: var(--transition);
}
.ai-preset-chip:hover { background: var(--accent-cyan); color: #06222b; }
.ai-preset-chip i { font-size: 0.82rem; }

/* API 设置卡片（BYOK：用户自带 key） */
.ai-api-card { gap: 12px; border-color: rgba(6,182,212,0.35); }
.ai-api-toggle {
    margin-left: auto; background: transparent; border: 1px solid var(--border-color);
    color: var(--text-muted); font-size: 0.72rem; padding: 2px 10px; border-radius: 12px; cursor: pointer;
    transition: var(--transition);
}
.ai-api-toggle:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.ai-api-status {
    font-size: 0.78rem; padding: 8px 12px; border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 7px; line-height: 1.4;
}
.ai-api-status.ok { background: rgba(34,197,94,0.12); color: var(--accent-green); border: 1px solid rgba(34,197,94,0.3); }
.ai-api-status.warn { background: rgba(234,179,8,0.1); color: #eab308; border: 1px solid rgba(234,179,8,0.25); }
.ai-key-row { display: flex; gap: 8px; align-items: center; }
.ai-key-row .ai-input { flex: 1; }
.ai-eye-btn {
    flex: 0 0 auto; width: 40px; height: 40px; border-radius: var(--radius-sm);
    background: var(--bg-tertiary); border: 1px solid var(--border-color); color: var(--text-secondary);
    cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.ai-eye-btn:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.ai-input-sub { margin-top: 8px; }
.ai-api-actions { display: flex; gap: 8px; }
.ai-api-actions .ai-action-btn.primary { background: var(--gradient-hero); color: #fff; border: none; }
.ai-api-actions .ai-action-btn.primary:hover { color: #fff; box-shadow: 0 4px 16px rgba(6,182,212,0.3); }
.ai-api-hint { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; margin: 0; }

/* 站点默认 API 信息 */
.ai-api-default {
    background: rgba(6,182,212,0.06); border: 1px dashed rgba(6,182,212,0.35);
    border-radius: var(--radius-md); padding: 12px;
    display: flex; flex-direction: column; gap: 8px;
}
.ai-api-default-title {
    font-size: 0.82rem; font-weight: 600; color: var(--text-primary);
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.ai-api-default-title i { color: var(--accent-cyan); }
.ai-api-default-note {
    margin-left: auto; font-size: 0.7rem; color: var(--text-muted); font-weight: 400;
}
.ai-api-default-row {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: 0.76rem; color: var(--text-secondary); line-height: 1.4;
}
.ai-api-default-row span:first-child { color: var(--text-muted); flex: 0 0 auto; }
.ai-api-default-row span:last-child { color: var(--text-primary); text-align: right; word-break: break-all; }

/* 生成按钮 */
.ai-generate-btn {
    width: 100%; padding: 14px; border-radius: var(--radius-md);
    background: var(--gradient-hero); color: #fff; font-size: 1rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: none; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 20px rgba(6,182,212,0.3);
    margin-top: 4px;
}
.ai-generate-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 25px rgba(6,182,212,0.4); }
.ai-generate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 输出区 */
.ai-output-section {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); overflow: hidden;
    animation: fadeInUp 0.4s ease;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
.ai-output-header {
    display: flex; align-items: center; gap: 12px;
    padding: 14px 18px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}
.ai-output-header h3 {
    font-size: 0.9rem; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px; margin: 0;
}
.ai-output-header h3 i { color: var(--accent-green); }
.ai-output-actions { display: flex; gap: 6px; margin-left: auto; }

/* 选项卡栏（紧贴 header 下方） */
.ai-output-tabbar {
    display: flex; gap: 0;
    padding: 0 16px;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-color);
}
.ai-tab-btn {
    padding: 10px 18px; border: none;
    border-bottom: 2px solid transparent;
    background: transparent; color: var(--text-muted);
    font-size: 0.82rem; font-weight: 500; cursor: pointer;
    display: flex; align-items: center; gap: 6px;
    transition: var(--transition); border-radius: 0;
    margin-bottom: -1px;
}
.ai-tab-btn:hover { color: var(--text-primary); background: rgba(6,182,212,0.04); }
.ai-tab-btn.active {
    color: var(--accent-cyan); font-weight: 600;
    border-bottom-color: var(--accent-cyan);
    background: var(--bg-primary);
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
    border-top: 2px solid var(--accent-cyan);
}
.ai-tab-btn.active i { color: var(--accent-cyan); }
.ai-action-btn {
    padding: 6px 12px; border-radius: var(--radius-sm);
    background: var(--bg-secondary); color: var(--text-secondary);
    border: 1px solid var(--border-color); font-size: 0.75rem;
    display: flex; align-items: center; gap: 5px; cursor: pointer; transition: var(--transition);
}
.ai-action-btn:hover { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent-cyan); }
/* v26101006：「生成配图」按钮与相邻按钮完全同款，去除单独覆盖 */

.ai-output-content { padding: 20px 24px; }
.ai-output-meta {
    display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 16px;
    font-size: 0.75rem; color: var(--text-muted);
}
.ai-output-meta span { display: flex; align-items: center; gap: 4px; }
.ai-output-meta i { font-size: 0.7rem; }
.ai-fact-badge {
    display: inline-flex; align-items: center; gap: 4px; margin-left: 2px;
    padding: 2px 8px; border-radius: 999px;
    background: rgba(16, 185, 129, 0.12); color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.35); font-weight: 600;
}
.ai-output-title h2 {
    font-size: 1.3rem; font-weight: 700; color: var(--text-primary);
    margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border-color);
    line-height: 1.4;
}
.ai-output-body { line-height: 1.8; color: var(--text-secondary); }
.ai-output-body h2 {
    font-size: 1.1rem; font-weight: 600; color: var(--text-primary);
    margin: 20px 0 10px;
}
.ai-output-body h3 {
    font-size: 0.95rem; font-weight: 600; color: var(--text-primary);
    margin: 16px 0 8px;
}
.ai-output-body p { margin-bottom: 10px; }
.ai-output-body li { margin-left: 20px; margin-bottom: 4px; list-style: disc; }
.ai-output-plain p { text-indent: 2em; margin-bottom: 12px; }
.ai-output-raw { white-space: pre-wrap; font-size: 0.92rem; line-height: 1.8; color: var(--text-secondary); }

/* 原文抽图注入正文 —— 配图块 */
.ai-output-image {
    margin: 16px 0;
    text-align: center;
}
.ai-output-image img {
    max-width: 100%;
    max-height: 420px;
    border-radius: 10px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.18);
    background: #f3f4f6;
    display: inline-block;
}
.ai-output-image-cap {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-muted, #8a94a6);
}
.ai-img-badge {
    color: var(--accent-cyan);
    background: rgba(56, 189, 248, 0.12);
    padding: 1px 8px;
    border-radius: 10px;
    font-weight: 600;
}
.ai-caption-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 2px;
    font-size: 0.78rem;
    color: var(--text-muted, #8a94a6);
    cursor: pointer;
    user-select: none;
}
.ai-caption-toggle input { width: 14px; height: 14px; accent-color: var(--accent-cyan); cursor: pointer; }

/* 生成中：末尾闪烁打字光标，强化流式打字观感（按 tab 独立控制） */
.ai-output-body.generating::after {
    content: '▋';
    display: inline-block;
    margin-left: 2px;
    color: var(--accent-cyan);
    font-weight: 400;
    animation: ai-caret-blink 1s steps(1) infinite;
}
@keyframes ai-caret-blink { 0%, 50% { opacity: 1; } 50.01%, 100% { opacity: 0; } }
.ai-output-char-count {
    text-align: right; margin-top: 16px; padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 0.75rem; color: var(--text-muted);
}

/* 数据来源 / 引用 */
.ai-sources-box {
    margin-top: 16px; padding: 14px 16px;
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius); border-left: 3px solid var(--accent-cyan);
}
.ai-sources-title {
    font-size: 0.85rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
}
.ai-sources-title i { color: var(--accent-cyan); }
.ai-sources-list { margin: 0 0 10px; padding-left: 20px; }
.ai-sources-list li { margin-bottom: 4px; font-size: 0.8rem; word-break: break-all; }
.ai-sources-list a { color: var(--accent-cyan); text-decoration: none; }
.ai-sources-list a:hover { text-decoration: underline; }
.ai-source-item.ai-source-failed a { color: var(--text-muted); text-decoration: line-through; opacity: 0.75; }
.ai-source-fail-note { margin-left: 6px; font-size: 0.72rem; color: #f87171; font-weight: 600; }
.ai-sources-note {
    font-size: 0.72rem; color: var(--text-muted); line-height: 1.6;
    display: flex; gap: 6px; align-items: flex-start;
}
.ai-sources-note i { margin-top: 2px; flex-shrink: 0; }

/* 学术化内联引用与 tooltip */
.ai-output-content { position: relative; }
.ai-cite-seg {
    display: inline;
    border-radius: 3px;
    transition: background-color 0.15s ease, box-shadow 0.15s ease;
}
.ai-cite-seg.ai-cite-active {
    background-color: rgba(34, 211, 238, 0.14);
    box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.18);
}
.ai-cite {
    display: inline-block;
    margin-left: 2px;
    padding: 0 4px;
    font-size: 0.72em;
    font-weight: 600;
    color: var(--accent-cyan);
    background: rgba(34, 211, 238, 0.08);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
    vertical-align: super;
    line-height: 1;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.ai-cite:hover {
    background: rgba(34, 211, 238, 0.25);
    color: #fff;
}
.ai-cite-unsure {
    color: var(--text-muted);
    background: rgba(255, 160, 0, 0.12);
}
.ai-cite-unsure:hover {
    background: rgba(255, 160, 0, 0.25);
    color: #fff;
}
.ai-source-active {
    background-color: rgba(34, 211, 238, 0.10);
    border-radius: 4px;
}
.ai-cite-tooltip {
    position: absolute;
    z-index: 100;
    pointer-events: none;
    transform: translateX(-50%);
    max-width: 420px;
    min-width: 120px;
}
.ai-cite-tooltip-inner {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 8px 12px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    display: flex;
    align-items: flex-start;
    gap: 8px;
    line-height: 1.5;
    font-size: 0.78rem;
}
.ai-cite-tooltip-inner::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid var(--border-color);
}
.ai-cite-tooltip-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 1px 5px;
    border-radius: 4px;
    background: rgba(34, 211, 238, 0.15);
    color: var(--accent-cyan);
    font-weight: 600;
}
.ai-cite-tooltip-source {
    color: var(--text-secondary);
    word-break: break-all;
}

/* 表单提示文字 */
.ai-hint {
    display: block; margin-top: 6px;
    font-size: 0.72rem; color: var(--text-muted); line-height: 1.5;
}

/* ===== AI 历史记录抽屉（右侧） ===== */
.ai-history-toggle {
    position: fixed; right: 0; top: 50%; transform: translateY(-50%);
    z-index: 1200; width: 44px; height: 56px;
    background: var(--accent-cyan); color: #06222b;
    border: none; border-radius: 12px 0 0 12px;
    cursor: pointer; box-shadow: -4px 0 16px rgba(0,0,0,0.25);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; transition: width .2s ease;
}
.ai-history-toggle:hover { width: 50px; }
.ai-history-badge {
    position: absolute; top: -6px; right: -6px;
    background: var(--color-danger, #ef4444); color: #fff;
    min-width: 18px; height: 18px; padding: 0 4px;
    border-radius: 9px; font-size: 0.65rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.ai-history-backdrop {
    position: fixed; inset: 0; z-index: 1250;
    background: rgba(0,0,0,0.35); backdrop-filter: blur(1px);
    opacity: 0; pointer-events: none; transition: opacity .25s ease;
}
.ai-history-backdrop.open { opacity: 1; pointer-events: auto; }
.ai-history-drawer {
    position: fixed; top: var(--topbar-height); right: 0; bottom: 0;
    width: var(--history-width); max-width: 86vw; z-index: 1300;
    background: var(--bg-secondary); border-left: 1px solid var(--border-color);
    box-shadow: -8px 0 32px rgba(0,0,0,0.35);
    transform: translateX(100%); transition: transform .28s ease;
    display: flex; flex-direction: column;
}
.ai-history-drawer.open { transform: translateX(0); }
.ai-history-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border-color);
}
.ai-history-header h3 {
    font-size: 0.95rem; margin: 0; display: flex; align-items: center; gap: 8px;
    color: var(--text-primary);
}
.ai-history-header h3 i { color: var(--accent-cyan); }
.ai-history-actions { display: flex; align-items: center; gap: 8px; }
/* 历史筛选：全部 / 文案 / 插图 */
.ai-history-filter {
    display: flex; align-items: center; gap: 6px;
    padding: 10px 12px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}
.ai-history-filter button {
    flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 6px 8px; border-radius: 8px; cursor: pointer;
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 0.78rem; font-weight: 500;
    transition: var(--transition);
}
.ai-history-filter button:hover { color: var(--text-primary); border-color: var(--border-light); }
.ai-history-filter button.active {
    color: #06121f; background: var(--gradient-hero); border-color: transparent;
    box-shadow: 0 0 16px rgba(139, 92, 246, 0.35);
}
.ai-history-clear {
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-muted); border-radius: 6px; padding: 3px 8px;
    font-size: 0.72rem; cursor: pointer;
}
.ai-history-clear:hover { color: var(--color-danger, #ef4444); border-color: var(--color-danger, #ef4444); }
.ai-history-close {
    background: transparent; border: none; color: var(--text-muted);
    font-size: 1rem; cursor: pointer;
}
.ai-history-close:hover { color: var(--text-primary); }
.ai-history-list {
    flex: 1; overflow-y: auto; padding: 10px;
}
.ai-history-item {
    position: relative; padding: 12px 12px 12px 14px; margin-bottom: 10px;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
    border-radius: var(--radius); cursor: pointer; transition: border-color .15s;
}
.ai-history-item:hover { border-color: var(--accent-cyan); }
.ai-history-item.is-image { border-color: rgba(139, 92, 246, 0.4); }
.ai-history-item.is-image:hover { border-color: var(--accent-purple); }
.ai-history-item.is-image .ai-history-item-title i { color: var(--accent-purple); margin-right: 6px; }
.ai-history-item-title {
    font-size: 0.84rem; font-weight: 600; color: var(--text-primary);
    margin-bottom: 6px; padding-right: 28px;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden; line-height: 1.4;
}
/* v260903：模型徽标（历史项标题旁的 deepseek / kimi 标签） */
.ai-history-model-badge {
    display: inline-block;
    margin-left: 6px;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1.4;
    vertical-align: middle;
    -webkit-line-clamp: unset;
}
.ai-history-model-badge.model-deepseek {
    background: rgba(14, 165, 233, 0.18);
    color: #0ea5e9;
    border: 1px solid rgba(14, 165, 233, 0.35);
}
.ai-history-model-badge.model-kimi {
    background: rgba(168, 85, 247, 0.18);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.35);
}
.ai-history-model-badge.model-other {
    background: rgba(148, 163, 184, 0.18);
    color: #94a3b8;
    border: 1px solid rgba(148, 163, 184, 0.35);
}
.ai-history-item-meta {
    display: flex; flex-wrap: wrap; gap: 8px;
    font-size: 0.68rem; color: var(--text-muted);
}
.ai-history-item-meta span {
    background: var(--bg-card); padding: 2px 6px; border-radius: 4px;
}
.ai-history-item-actions {
    position: absolute; top: 8px; right: 8px;
    display: flex; align-items: center; gap: 4px;
}
.ai-history-img {
    background: transparent; border: none; color: var(--accent-cyan);
    cursor: pointer; font-size: 0.8rem; padding: 2px;
}
.ai-history-img:hover { color: var(--accent-purple); }
.ai-history-del {
    background: transparent; border: none; color: var(--text-muted);
    cursor: pointer; font-size: 0.8rem; padding: 2px;
}
.ai-history-del:hover { color: var(--color-danger, #ef4444); }
.ai-history-empty {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 12px;
    color: var(--text-muted); text-align: center; padding: 30px;
}
.ai-history-empty i { font-size: 2rem; opacity: .5; }
.ai-history-empty p { font-size: 0.78rem; line-height: 1.6; }

/* 空状态 */
.ai-empty-state {
    text-align: center; padding: 40px 20px;
    background: var(--bg-secondary); border: 1px dashed var(--border-color);
    border-radius: var(--radius-lg);
}
.ai-empty-icon {
    width: 72px; height: 72px; margin: 0 auto 16px;
    background: var(--bg-tertiary); border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--border-color);
}
.ai-empty-icon i { font-size: 2rem; color: var(--accent-cyan); }
.ai-empty-state h3 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 8px; }
.ai-empty-state > p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 20px; }
.ai-tips { display: flex; flex-direction: column; gap: 10px; max-width: 480px; margin: 0 auto; text-align: left; }
.ai-tip-item {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 10px 14px; background: var(--bg-tertiary);
    border-radius: var(--radius-sm); font-size: 0.82rem; color: var(--text-secondary);
}
.ai-tip-item i { color: var(--accent-orange); margin-top: 2px; flex-shrink: 0; }

/* ==================== PPT Panel ==================== */
.ppt-panel { padding: 0; }
.ppt-container { max-width: 100%; }

.ppt-header {
    display: flex; align-items: center; gap: 12px;
    padding: 20px 0 16px; border-bottom: 1px solid var(--border-color); margin-bottom: 20px;
}
.ppt-header i { font-size: 1.6rem; color: #D24726; }
.ppt-header h2 { font-size: 1.3rem; color: var(--text-primary); margin: 0; }
.ppt-badge {
    margin-left: auto; font-size: 0.72rem; padding: 3px 12px; border-radius: 12px;
    background: rgba(210,71,38,0.15); color: #D24726;
}

.ppt-body {
    display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-bottom: 20px;
}
.ppt-input-section, .ppt-control-section {
    display: flex; flex-direction: column; gap: 16px;
}

.ppt-field { display: flex; flex-direction: column; gap: 6px; }
.ppt-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
}
.ppt-label i { color: #D24726; width: 16px; text-align: center; }

.ppt-input {
    padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 0.88rem; outline: none; transition: var(--transition);
}
.ppt-input:focus { border-color: #D24726; box-shadow: 0 0 0 3px rgba(210,71,38,0.1); }
.ppt-input::placeholder { color: var(--text-muted); }

.ppt-textarea {
    padding: 10px 14px; border-radius: var(--radius-md);
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    color: var(--text-primary); font-size: 0.84rem; outline: none;
    resize: vertical; font-family: inherit; line-height: 1.6; transition: var(--transition);
    min-height: 220px;
}
.ppt-textarea:focus { border-color: #D24726; box-shadow: 0 0 0 3px rgba(210,71,38,0.1); }
.ppt-textarea::placeholder { color: var(--text-muted); }
.ppt-char-count { font-size: 0.7rem; color: var(--text-muted); text-align: right; margin-top: -4px; }

/* 输入方式切换 */
.ppt-input-tabs { display: flex; gap: 6px; }
.ppt-input-tab {
    flex: 1; padding: 8px 12px; border-radius: var(--radius-sm);
    background: var(--bg-secondary); color: var(--text-secondary);
    border: 1px solid var(--border-color); font-size: 0.8rem;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; transition: var(--transition);
}
.ppt-input-tab:hover { background: var(--bg-hover); color: var(--text-primary); }
.ppt-input-tab.active { background: rgba(210,71,38,0.12); border-color: #D24726; color: #D24726; }

/* 上传区 */
.ppt-upload-zone {
    background: var(--bg-secondary); border: 2px dashed var(--border-color);
    border-radius: var(--radius-md); padding: 30px; text-align: center;
    cursor: pointer; transition: var(--transition); min-height: 140px;
    display: flex; align-items: center; justify-content: center;
}
.ppt-upload-zone:hover { border-color: #D24726; background: rgba(210,71,38,0.04); }
.ppt-upload-icon { font-size: 2rem; color: var(--text-muted); margin-bottom: 10px; }
.ppt-upload-zone p { font-size: 0.85rem; color: var(--text-secondary); margin-bottom: 4px; }
.ppt-upload-hint { font-size: 0.72rem; color: var(--text-muted); }
.ppt-upload-done {
    display: flex; align-items: center; gap: 10px;
    color: var(--accent-green); font-size: 0.9rem; font-weight: 600;
}
.ppt-upload-done i { font-size: 1.3rem; }
.ppt-upload-remove {
    width: 22px; height: 22px; border-radius: 50%; background: rgba(239,68,68,0.15);
    color: var(--accent-red); font-size: 0.7rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none; margin-left: auto;
}

/* 参数卡片 */
.ppt-params-card {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 18px;
    display: flex; flex-direction: column; gap: 16px;
}
.ppt-params-title {
    font-size: 0.95rem; color: var(--text-primary);
    display: flex; align-items: center; gap: 8px; margin: 0 0 4px;
}
.ppt-params-title i { color: #D24726; }

/* PPT Radio 按钮 */
.ppt-radio-group { display: flex; flex-wrap: wrap; gap: 6px; }
.ppt-radio {
    display: flex; align-items: center; cursor: pointer;
    padding: 6px 13px; border-radius: 20px;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
    font-size: 0.78rem; color: var(--text-secondary); transition: var(--transition);
    user-select: none;
}
.ppt-radio input { display: none; }
.ppt-radio:hover { background: var(--bg-hover); color: var(--text-primary); }
.ppt-radio.active { background: rgba(210,71,38,0.12); border-color: #D24726; color: #D24726; font-weight: 600; }

/* 主题网格 */
.ppt-theme-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.ppt-theme-item {
    text-align: center; cursor: pointer; padding: 6px; border-radius: var(--radius-sm);
    border: 2px solid transparent; transition: var(--transition);
}
.ppt-theme-item:hover { border-color: var(--border-light); }
.ppt-theme-item.active { border-color: #D24726; background: rgba(210,71,38,0.06); }
.ppt-theme-preview {
    width: 100%; height: 36px; border-radius: 4px; margin-bottom: 6px;
}
.ppt-theme-item span { font-size: 0.7rem; color: var(--text-secondary); }
.ppt-theme-item.active span { color: #D24726; font-weight: 600; }

/* Checkbox */
.ppt-check-group { display: flex; gap: 16px; flex-wrap: wrap; }
.ppt-check {
    display: flex; align-items: center; gap: 6px; font-size: 0.8rem;
    color: var(--text-secondary); cursor: pointer; user-select: none;
}
.ppt-check input { accent-color: #D24726; }

/* 生成按钮 */
.ppt-generate-btn {
    width: 100%; padding: 14px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, #D24726, #EA580C); color: #fff;
    font-size: 1rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: none; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 20px rgba(210,71,38,0.3); margin-top: 4px;
}
.ppt-generate-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 25px rgba(210,71,38,0.4); }
.ppt-generate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* 下载按钮 */
.ppt-download-btn {
    width: 100%; padding: 14px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, #059669, #10B981); color: #fff;
    font-size: 1rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    border: none; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 20px rgba(5,150,105,0.3);
}
.ppt-download-btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 6px 25px rgba(5,150,105,0.4); }
.ppt-download-btn:disabled {
    opacity: 0.45; cursor: not-allowed; transform: none;
    background: var(--bg-tertiary); color: var(--text-muted);
    box-shadow: none; border: 1px solid var(--border-color);
}

/* 生成状态提示 */
.ppt-status-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; background: rgba(5,150,105,0.08);
    border: 1px solid rgba(5,150,105,0.25); border-radius: var(--radius-sm);
    font-size: 0.8rem; color: #10B981;
}
.ppt-status-bar i { font-size: 0.9rem; }

/* 预览提示条 */
.ppt-preview-bar {
    display: flex; align-items: center; gap: 10px;
    padding: 12px 18px; background: var(--bg-secondary);
    border: 1px solid var(--border-color); border-radius: var(--radius-md);
    font-size: 0.82rem; color: var(--text-secondary);
}
.ppt-preview-bar i { color: var(--accent-cyan); }
.ppt-preview-count { margin-left: auto; font-size: 0.78rem; color: #D24726; white-space: nowrap; }

/* ==================== PPT Three-Column Panel ==================== */
.ppt-outline-gen-btn {
    width: 100%; padding: 10px; border-radius: var(--radius-md);
    background: linear-gradient(135deg, #D24726, #EA580C); color: #fff;
    border: none; font-size: 0.82rem; font-weight: 600;
    display: flex; align-items: center; justify-content: center; gap: 6px;
    cursor: pointer; transition: var(--transition); margin-top: 4px;
    box-shadow: 0 2px 12px rgba(210,71,38,0.25);
}
.ppt-outline-gen-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(210,71,38,0.35); }
.ppt-outline-gen-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; box-shadow: none; }

.ppt-body-3col {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 16px;
    align-items: stretch;
}
.ppt-col {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); overflow: hidden;
    display: flex; flex-direction: column;
}
.ppt-col-header {
    padding: 10px 14px; border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary); font-size: 0.82rem; font-weight: 600;
    color: var(--text-primary); display: flex; align-items: center; gap: 8px;
}
.ppt-col-header i { color: #D24726; }
.ppt-col-input { padding: 10px; gap: 8px; }
.ppt-col-params { padding: 10px; gap: 8px; }
.ppt-col-outline { flex: 1; }

.ppt-label-sm { font-size: 0.72rem; color: var(--text-muted); font-weight: 600; margin-bottom: 2px; }

.ppt-textarea-3col {
    min-height: 180px; font-size: 0.78rem;
}

/* 三栏折叠大纲列表 */
.ppt-col-outline .ppt-outline-list {
    padding: 6px; display: flex; flex-direction: column; gap: 6px;
    max-height: calc(100vh - 300px); overflow-y: auto;
}
.ppt-col-outline .outline-slide {
    background: var(--bg-primary); border: 1px solid var(--border-color);
    border-radius: var(--radius-sm); overflow: hidden;
}
.ppt-col-outline .outline-slide-header {
    cursor: pointer; user-select: none;
}
.ppt-col-outline .outline-slide-header:hover { background: var(--bg-hover); }
.outline-toggle {
    color: var(--text-muted); font-size: 0.7rem; margin-left: auto; margin-right: 4px;
    transition: transform 0.2s;
}
.outline-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: #D24726; color: #fff; font-size: 11px; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.outline-title-input {
    flex: 1; padding: 5px 8px; border-radius: 3px;
    background: transparent; border: 1px solid transparent;
    color: var(--text-primary); font-size: 0.78rem; font-weight: 600;
    outline: none; font-family: inherit; min-width: 0;
}
.outline-title-input:focus { border-color: #D24726; background: var(--bg-secondary); }
.outline-points { padding: 3px 6px 6px 10px; }
.outline-point { display: flex; align-items: flex-start; gap: 4px; margin: 2px 0; }
.outline-bullet { color: #D24726; font-size: 0.9rem; line-height: 1.8; }
.outline-point-input {
    flex: 1; padding: 3px 6px; border-radius: 3px;
    background: transparent; border: 1px solid transparent;
    color: var(--text-secondary); font-size: 0.75rem;
    outline: none; resize: none; font-family: inherit; line-height: 1.5;
    min-height: 24px; overflow: hidden;
}
.outline-point-input:focus { border-color: var(--accent-cyan); background: var(--bg-secondary); }
.outline-points-textarea {
    width: 100%; padding: 8px 10px; border-radius: 4px;
    background: var(--bg-primary); border: 1px solid var(--border-color);
    color: var(--text-secondary); font-size: 0.78rem;
    outline: none; resize: vertical; font-family: inherit;
    line-height: 1.7; min-height: 80px;
}
.outline-points-textarea:focus { border-color: var(--accent-cyan); }
.outline-btn-del {
    width: 20px; height: 20px; border-radius: 50%; background: transparent;
    color: var(--text-muted); font-size: 0.65rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none; flex-shrink: 0;
}
.outline-btn-del:hover { background: rgba(239,68,68,0.12); color: #ef4444; }
.outline-btn-del-sm {
    width: 18px; height: 18px; border-radius: 50%; background: transparent;
    color: var(--text-muted); font-size: 0.6rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none; flex-shrink: 0;
}
.outline-btn-del-sm:hover { background: rgba(239,68,68,0.12); color: #ef4444; }
.outline-btn-add {
    display: flex; align-items: center; gap: 3px; margin: 2px 0;
    padding: 3px 8px; border-radius: 3px;
    background: transparent; border: 1px dashed var(--border-color);
    color: var(--text-muted); font-size: 0.72rem; cursor: pointer;
}
.outline-btn-add:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.outline-btn-add-section {
    width: 100%; padding: 6px; border-radius: var(--radius-sm);
    background: transparent; border: 1px dashed var(--border-color);
    color: var(--text-muted); font-size: 0.75rem; display: flex; align-items: center; justify-content: center; gap: 4px;
    cursor: pointer;
}
.outline-btn-add-section:hover { border-color: #D24726; color: #D24726; }

/* ==================== AI 生成插图 ==================== */
.ai-image-panel { padding: 0; }
.ai-image-container { max-width: 100%; }
.ai-image-header {
    display: flex; align-items: center; gap: 10px;
    padding: 16px 20px; border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(6,182,212,0.06));
}
.ai-image-header i { font-size: 1.6rem; color: var(--accent-purple); }
.ai-image-header h2 { font-size: 1.3rem; color: var(--text-primary); margin: 0; }
.ai-image-header .ai-badge { margin-left: auto; }

.ai-image-body {
    display: grid; grid-template-columns: 380px 1fr; gap: 20px;
    padding: 20px; align-items: start;
}
.ai-image-input-section { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 16px; }
.ai-image-result-section { display: flex; flex-direction: column; gap: 16px; }

/* 从 AI 文案导入按钮 */
.ai-import-btn {
    margin-left: auto; padding: 5px 10px; font-size: 0.72rem;
    border-radius: var(--radius-sm); border: 1px solid var(--accent-purple);
    background: rgba(168,85,247,0.1); color: var(--accent-purple);
    cursor: pointer; transition: var(--transition);
    display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
}
.ai-import-btn:hover:not(:disabled) { background: var(--accent-purple); color: #fff; }
.ai-import-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ai-hint { font-size: 0.72rem; color: var(--text-muted); line-height: 1.5; margin-top: -2px; }
.ai-hint strong { color: var(--accent-purple); font-weight: 600; }

/* 风格网格 */
.ai-image-style-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ai-image-style-chip {
    display: flex; align-items: center; gap: 8px; padding: 10px 12px;
    border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--bg-tertiary); color: var(--text-secondary);
    font-size: 0.8rem; cursor: pointer; transition: var(--transition); text-align: left;
}
.ai-image-style-chip i { color: var(--text-muted); width: 16px; text-align: center; }
.ai-image-style-chip:hover { border-color: var(--accent-purple); color: var(--text-primary); }
.ai-image-style-chip.active {
    border-color: var(--accent-purple); background: rgba(168,85,247,0.14);
    color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(168,85,247,0.12);
}
.ai-image-style-chip.active i { color: var(--accent-purple); }

/* 结果区 */
.ai-image-results {
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); padding: 16px; min-height: 320px;
    display: flex; flex-direction: column; gap: 14px;
}
.ai-image-loading {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
    color: var(--text-secondary); min-height: 280px; text-align: center;
}
.spinner {
    width: 44px; height: 44px; border-radius: 50%;
    border: 4px solid rgba(168,85,247,0.2); border-top-color: var(--accent-purple);
    animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.ai-image-error {
    background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.35);
    color: #f87171; border-radius: var(--radius-md); padding: 12px 14px;
    font-size: 0.82rem; line-height: 1.5; display: flex; gap: 8px; align-items: flex-start;
}
.ai-image-error i { margin-top: 2px; flex: 0 0 auto; }

/* v260903：每日生图配额提示 */
.ai-image-quota {
    margin-top: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    font-size: 0.75rem; color: var(--text-muted);
}
.ai-image-quota b { color: var(--accent-cyan); font-weight: 700; }
.ai-image-quota b.low { color: #fbbf24; }
.ai-image-quota-reset { opacity: 0.75; }

/* 4 图网格 */
.ai-image-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.ai-image-card {
    position: relative; border-radius: var(--radius-md); overflow: hidden;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
    display: flex; flex-direction: column;
}
.ai-image-card img {
    width: 100%; aspect-ratio: 3 / 4; object-fit: cover; display: block; background: var(--bg-tertiary);
}
.ai-image-card-actions { padding: 8px; display: flex; justify-content: center; border-top: 1px solid var(--border-color); }
.ai-image-dl {
    flex: 1; text-decoration: none; text-align: center; padding: 8px;
    border-radius: var(--radius-sm); background: var(--gradient-hero); color: #fff;
    font-size: 0.78rem; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    transition: var(--transition);
}
.ai-image-dl:hover { box-shadow: 0 4px 14px rgba(6,182,212,0.3); }
.ai-image-card-idx {
    position: absolute; top: 8px; left: 8px; z-index: 2;
    background: rgba(0,0,0,0.55); color: #fff; font-size: 0.7rem; font-weight: 700;
    width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
}
.ai-image-empty {
    flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px;
    color: var(--text-muted); min-height: 280px; text-align: center;
}
.ai-image-empty i { font-size: 2.6rem; opacity: 0.4; }
.ai-image-empty p { font-size: 0.82rem; line-height: 1.6; margin: 0; }

/* 进度条（逐张生成实时反馈） */
.ai-image-progress { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.ai-image-progress-bar {
    width: 100%; height: 10px; border-radius: 999px; overflow: hidden;
    background: var(--bg-tertiary); border: 1px solid var(--border-color);
}
.ai-image-progress-fill {
    height: 100%; border-radius: 999px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
    transition: width 0.5s ease;
    box-shadow: 0 0 12px rgba(168,85,247,0.5);
}
.ai-image-progress-text {
    margin: 0; font-size: 0.8rem; color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
}
.spinning-slow { animation: spin 2.4s linear infinite; color: var(--accent-purple); }

/* 等待中的骨架占位 */
.ai-image-skeleton {
    aspect-ratio: 3 / 4; width: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 10px;
    background: linear-gradient(110deg, var(--bg-tertiary) 30%, rgba(168,85,247,0.08) 50%, var(--bg-tertiary) 70%);
    background-size: 220% 100%; animation: aiShimmer 1.4s ease-in-out infinite; color: var(--text-muted); font-size: 0.78rem;
}
.ai-image-skeleton .spinner { width: 30px; height: 30px; border-width: 3px; }
@keyframes aiShimmer {
    0% { background-position: 120% 0; }
    100% { background-position: -120% 0; }
}

/* 单图失败 */
.ai-image-card-err {
    aspect-ratio: 3 / 4; width: 100%; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 8px; padding: 10px;
    background: rgba(239,68,68,0.08); color: #f87171; font-size: 0.78rem; text-align: center;
}
.ai-image-card-err i { font-size: 1.4rem; }

/* AI 生成配图（并入 AI 文案结果区） */
.ai-image-embedded { margin-top: 18px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-tertiary); overflow: hidden; }
.ai-image-embedded-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: var(--bg-card); cursor: pointer; font-weight: 600; color: var(--text-secondary); transition: var(--transition); }
.ai-image-embedded-head:hover { color: var(--text-primary); background: var(--bg-hover); }
.ai-image-embedded-body { padding: 0; } /* v26101006：内嵌区改用 .ai-image-body 两栏布局（同独立插图页） */
.ai-image-embedded-params { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ai-image-embedded-params .ai-image-style-grid { grid-template-columns: repeat(2, 1fr); }
.ai-image-embedded-api { border-top: 1px solid var(--border-light); padding-top: 12px; }
.ai-image-embedded-api .ai-api-toggle { background: transparent; border: none; color: var(--accent-cyan); font-size: .8rem; cursor: pointer; padding: 0; }
.ai-image-embedded-api .ai-image-api-fields { margin-top: 12px; display: grid; gap: 12px; }
/* v26101007：生成后「已存入历史图文」提示 */
.ai-image-saved-hint { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 9px 12px; border-radius: var(--radius-sm); background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.4); color: #14803a; font-size: 0.82rem; font-weight: 600; }
.ai-image-saved-hint i { color: #16a34a; }

/* ==================== Responsive ==================== */
@media (max-width: 900px) {
    .ai-image-body { grid-template-columns: 1fr; }
    .ai-image-style-grid { grid-template-columns: repeat(2, 1fr); }
    .ai-image-grid { grid-template-columns: repeat(2, 1fr); }
    .main-container { flex-direction: column; }
    .sidebar {
        width: 100%; height: auto; position: relative; top: 0;
        flex-direction: row; border-right: none; border-bottom: 1px solid var(--border-color); padding: 8px;
    }
    .sidebar-nav { flex-direction: row; gap: 8px; padding: 4px; overflow-x: auto; }
    .nav-item { padding: 10px 14px; font-size: 0.8rem; white-space: nowrap; }
    .sidebar-footer { display: none; }
    .content { padding: 16px; max-width: 100%; }
    .tech-grid { grid-template-columns: 1fr; }
    .sub-tabs { max-width: 100%; }
    .ai-writer-body { grid-template-columns: 1fr; }
    .ppt-body { grid-template-columns: 1fr; }
    .ppt-theme-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 500px) {
    .sub-tabs { flex-direction: column; }
    .platform-buttons { flex-direction: column; }
    .platform-btn { width: 100%; justify-content: center; }
}

/* ================= 编辑 / 对话修改 / 校对 面板 ================= */
.ai-action-btn.active { color: var(--accent-cyan); border-color: var(--accent-cyan); background: rgba(6,182,212,0.08); }

/* 编辑态 */
.ai-edit-area { padding: 4px 0 8px; }
.ai-edit-row { margin-bottom: 10px; }
.ai-edit-row.ai-edit-main { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ai-edit-pane { display: flex; flex-direction: column; border: 1px solid var(--border-light); border-radius: 10px; overflow: hidden; background: rgba(15,28,46,0.6); }
.ai-edit-pane-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; font-size: 0.78rem; color: var(--text-secondary); background: rgba(6,182,212,0.05); border-bottom: 1px solid var(--border-light); }
.ai-edit-pane-head .ai-action-btn { padding: 3px 8px; font-size: 0.72rem; }
.ai-edit-title { width: 100%; box-sizing: border-box; }
.ai-edit-textarea { width: 100%; min-height: 360px; max-height: 74vh; border: none; resize: vertical; field-sizing: content; /* v260908c：随内容自动增高(Chromium 123+)，老浏览器回退手动拉伸 */ padding: 12px; background: transparent; color: var(--text-primary); font-size: 0.9rem; line-height: 1.7; font-family: inherit; outline: none; }
.ai-edit-preview { min-height: 360px; resize: vertical; overflow: auto; padding: 12px; }
.ai-edit-preview .ai-output-body { color: var(--text-secondary); }
.ai-edit-actions { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.ai-edit-actions .primary { background: var(--gradient-hero); color: #fff; border: none; }
.ai-edit-actions .primary:hover { box-shadow: 0 4px 16px rgba(6,182,212,0.3); }
.ai-edit-hint { font-size: 0.74rem; color: var(--text-secondary); }
@media (max-width: 760px) { .ai-edit-row.ai-edit-main { grid-template-columns: 1fr; } }

/* 对话修改 */
.ai-chat-panel { margin-top: 14px; border: 1px solid var(--border-light); border-radius: 12px; background: rgba(15,28,46,0.5); overflow: hidden; }
.ai-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 0.85rem; color: var(--text-primary); background: rgba(6,182,212,0.06); border-bottom: 1px solid var(--border-light); }
.ai-chat-head i { color: var(--accent-cyan); margin-right: 6px; }
.ai-chat-clear { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 0.74rem; }
.ai-chat-clear:hover { color: var(--accent-cyan); }
.ai-chat-list { max-height: 320px; overflow: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; }
.ai-chat-empty { font-size: 0.8rem; color: var(--text-secondary); line-height: 1.6; }
.ai-chat-msg { max-width: 88%; }
.ai-chat-msg .ai-chat-role { font-size: 0.7rem; color: var(--text-secondary); margin-bottom: 3px; }
.ai-chat-msg.user { align-self: flex-end; text-align: right; }
.ai-chat-msg.user .ai-chat-text { background: rgba(14,165,233,0.16); border: 1px solid rgba(14,165,233,0.3); }
.ai-chat-msg.assistant .ai-chat-text { background: rgba(16,185,129,0.1); border: 1px solid rgba(16,185,129,0.25); }
.ai-chat-text { display: inline-block; text-align: left; padding: 8px 12px; border-radius: 10px; font-size: 0.86rem; line-height: 1.6; color: var(--text-primary); white-space: pre-wrap; word-break: break-word; }
.ai-chat-input-row { display: flex; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border-light); }
.ai-chat-input { flex: 1; min-height: 44px; max-height: 120px; resize: vertical; border: 1px solid var(--border-light); border-radius: 8px; padding: 8px 10px; background: rgba(15,28,46,0.6); color: var(--text-primary); font-size: 0.86rem; outline: none; font-family: inherit; }
.ai-chat-input:focus { border-color: var(--accent-cyan); }
.ai-chat-input-row .primary { background: var(--gradient-hero); color: #fff; border: none; align-self: flex-end; }

/* 校对面板 */
.ai-proof-panel { margin-top: 14px; border: 1px solid var(--border-light); border-radius: 12px; background: rgba(15,28,46,0.5); overflow: hidden; }
.ai-proof-head { display: flex; flex-direction: column; gap: 8px; padding: 10px 14px; font-size: 0.85rem; color: var(--text-primary); background: rgba(6,182,212,0.06); border-bottom: 1px solid var(--border-light); }
.ai-proof-head > div:first-child i { color: var(--accent-cyan); margin-right: 6px; }
.ai-proof-sum { display: block; margin-top: 4px; font-size: 0.78rem; color: var(--text-secondary); }
.ai-proof-sum .ok { color: var(--accent-green); }
.ai-proof-sum .doubt { color: #f59e0b; }
.ai-proof-sum .wrong { color: #ef4444; }
.ai-proof-sum .nocite { color: #ef4444; font-weight: 600; }
.ai-proof-head-actions { display: flex; gap: 8px; }
.ai-proof-note { padding: 6px 14px; font-size: 0.74rem; color: var(--text-secondary); background: rgba(245,158,11,0.08); }
.ai-proof-error { padding: 6px 14px; font-size: 0.78rem; color: #fca5a5; background: rgba(239,68,68,0.12); }
.ai-proof-list { max-height: 420px; overflow: auto; padding: 8px 14px; display: flex; flex-direction: column; gap: 8px; }
.ai-proof-item { border: 1px solid var(--border-light); border-radius: 10px; padding: 10px 12px; background: rgba(15,28,46,0.6); }
.ai-proof-item-main { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ai-proof-cat { font-size: 0.68rem; padding: 2px 8px; border-radius: 999px; background: rgba(6,182,212,0.15); color: var(--accent-cyan); border: 1px solid rgba(6,182,212,0.3); }
.ai-proof-cat.cat-价格 { background: rgba(236,72,153,0.15); color: #f472b6; border-color: rgba(236,72,153,0.3); }
.ai-proof-cat.cat-日期 { background: rgba(139,92,246,0.15); color: #a78bfa; border-color: rgba(139,92,246,0.3); }
.ai-proof-cat.cat-型号, .ai-proof-cat.cat-版本 { background: rgba(16,185,129,0.15); color: #34d399; border-color: rgba(16,185,129,0.3); }
.ai-proof-val { font-weight: 600; color: var(--text-primary); font-size: 0.92rem; }
.ai-proof-cite { font-size: 0.74rem; color: var(--text-secondary); }
.ai-proof-cite a { color: var(--accent-cyan); }
.ai-proof-cite.nocite { color: #ef4444; font-weight: 600; }
.ai-proof-ctx { font-size: 0.78rem; color: var(--text-secondary); line-height: 1.6; margin: 6px 0; padding-left: 8px; border-left: 2px solid var(--border-light); }
.ai-proof-item-foot { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ai-proof-status { display: flex; gap: 6px; }
.ai-proof-st { font-size: 0.72rem; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--border-light); background: transparent; color: var(--text-secondary); cursor: pointer; }
.ai-proof-st.ok.on { background: rgba(16,185,129,0.2); color: #34d399; border-color: rgba(16,185,129,0.4); }
.ai-proof-st.doubt.on { background: rgba(245,158,11,0.2); color: #fbbf24; border-color: rgba(245,158,11,0.4); }
.ai-proof-st.wrong.on { background: rgba(239,68,68,0.2); color: #f87171; border-color: rgba(239,68,68,0.4); }
.ai-proof-st.on { box-shadow: inset 0 0 0 1px currentColor; }
.ai-proof-note-input { flex: 1; min-width: 140px; border: 1px solid var(--border-light); border-radius: 8px; padding: 4px 8px; background: rgba(15,28,46,0.6); color: var(--text-primary); font-size: 0.76rem; outline: none; }
.ai-proof-note-input:focus { border-color: var(--accent-cyan); }
.ai-proof-empty { padding: 14px; font-size: 0.8rem; color: var(--text-secondary); }

/* ================= 顶部栏退出按钮 ================= */
.logout-btn {
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-secondary); width: 34px; height: 34px; border-radius: 8px;
    cursor: pointer; transition: var(--transition); font-size: 0.9rem;
}
.logout-btn:hover { color: var(--accent-pink); border-color: var(--accent-pink); }
/* 主题切换按钮（浅色/深色） */
.theme-btn {
    background: transparent; border: 1px solid var(--border-color);
    color: var(--text-secondary); width: 34px; height: 34px; border-radius: 8px;
    cursor: pointer; transition: var(--transition); font-size: 0.9rem;
}
.theme-btn:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

/* ================= 登录遮罩（玻璃拟态 + 渐变炫光） ================= */
.login-overlay {
    position: fixed; inset: 0; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    background:
        radial-gradient(1200px 600px at 20% 10%, rgba(139,92,246,0.30), transparent 60%),
        radial-gradient(1000px 500px at 90% 90%, rgba(6,182,212,0.24), transparent 55%),
        linear-gradient(160deg, #0a0714 0%, #0a0e1c 45%, #120a22 100%);
    overflow: hidden;
}
/* 第三层光晕（紫色为主，更炫酷，参考通义千问紫系） */
.login-aurora {
    position: absolute; inset: -10%; z-index: 1; pointer-events: none;
    background:
        radial-gradient(560px 560px at 50% 42%, rgba(139,92,246,0.18), transparent 62%),
        radial-gradient(420px 420px at 72% 28%, rgba(6,182,212,0.14), transparent 60%),
        radial-gradient(360px 360px at 28% 72%, rgba(236,72,153,0.12), transparent 60%);
    animation: loginFloat 14s ease-in-out infinite;
}
@keyframes loginFloat { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-18px) scale(1.06); } }
.login-overlay::before {
    content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%;
    background: conic-gradient(from 0deg, #8b5cf6, #06b6d4, #ec4899, #a855f7, #8b5cf6);
    filter: blur(95px); opacity: 0.30; top: -130px; left: -90px;
    animation: loginSpin 18s linear infinite;
}
.login-overlay::after {
    content: ''; position: absolute; width: 500px; height: 500px; border-radius: 50%;
    background: conic-gradient(from 180deg, #06b6d4, #8b5cf6, #a855f7, #06b6d4);
    filter: blur(95px); opacity: 0.24; bottom: -150px; right: -70px;
    animation: loginSpin 22s linear infinite reverse;
}
@keyframes loginSpin { to { transform: rotate(360deg); } }
.login-card {
    position: relative; z-index: 2; width: 420px; max-width: 92vw;
    padding: 38px 36px 30px; border-radius: 22px; text-align: center;
    background: rgba(17, 24, 39, 0.55);
    border: 1px solid rgba(139, 92, 246, 0.35);
    backdrop-filter: blur(18px) saturate(140%);
    box-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 0 46px rgba(139,92,246,0.20);
    animation: loginIn .5s ease both;
}
@keyframes loginIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.login-logo {
    display: inline-flex; align-items: center; gap: 10px; margin-bottom: 18px;
    font-size: 1.3rem; font-weight: 700; color: var(--text-primary);
}
.login-logo i { color: var(--accent-cyan); font-size: 1.5rem; }
.login-card h2 {
    margin: 0 0 6px; font-size: 1.35rem; color: var(--text-primary);
    background: var(--gradient-hero); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.login-sub { margin: 0 0 22px; font-size: 0.82rem; color: var(--text-secondary); }
.login-field {
    display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
    padding: 0 12px; height: 46px; border-radius: 12px;
    background: rgba(10, 14, 23, 0.6); border: 1px solid var(--border-color);
    transition: border-color .15s, box-shadow .15s;
}
.login-field:focus-within { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(6,182,212,0.12); }
.login-field i { color: var(--text-muted); font-size: 0.95rem; }
.login-field input {
    flex: 1; border: none; background: transparent; outline: none;
    color: var(--text-primary); font-size: 0.92rem; height: 100%;
}
.login-field input::placeholder { color: var(--text-muted); }
.login-err {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    padding: 10px 12px; margin-bottom: 14px; border-radius: 10px;
    background: rgba(239, 68, 68, 0.12); border: 1px solid rgba(239, 68, 68, 0.35);
    color: #ef4444; font-size: 0.84rem; font-weight: 600;
}
.login-err i { font-size: 1rem; }
/* v26092003：登录失败分级提示 —— 橙色=临近锁定，红色=已锁定 */
.login-err.lv-warn {
    background: rgba(245, 158, 11, 0.12); border-color: rgba(245, 158, 11, 0.38); color: #d97706;
}
.login-err.lv-locked {
    background: rgba(239, 68, 68, 0.16); border-color: rgba(239, 68, 68, 0.45); color: #dc2626;
}
/* v26092003：锁定倒计时条 */
.login-lock {
    display: flex; align-items: center; gap: 8px; justify-content: center;
    padding: 9px 12px; margin-bottom: 14px; border-radius: 10px;
    background: rgba(139, 92, 246, 0.10); border: 1px solid rgba(139, 92, 246, 0.32);
    color: var(--text-muted); font-size: 0.82rem;
}
.login-lock i { font-size: 0.95rem; color: #8b5cf6; }
.login-lock b { color: #8b5cf6; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .5px; }
/* v26092003：锁定期间登录按钮必须一眼看出不可点 */
.login-btn:disabled { opacity: .6; cursor: not-allowed; box-shadow: none; }
.login-btn:disabled:hover { transform: none; }
.login-btn {
    width: 100%; height: 46px; margin-top: 6px; border: none; cursor: pointer;
    border-radius: 12px; font-size: 0.98rem; font-weight: 600; letter-spacing: 2px;
    color: #fff; background: var(--gradient-hero);
    box-shadow: 0 8px 24px rgba(139,92,246,0.35); transition: transform .12s, box-shadow .15s;
}
.login-btn:hover { transform: translateY(-1px); box-shadow: 0 12px 30px rgba(139,92,246,0.45); }
.login-btn:active { transform: translateY(0); }
.login-guest {
    width: 100%; margin-top: 14px; background: transparent; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 0.76rem; transition: color .15s;
}
.login-guest:hover { color: var(--text-secondary); text-decoration: underline; }

/* ===== v260824：登录方式切换 / 验证码 / 找回密码 ===== */
.login-tabs { display: flex; gap: 6px; margin-bottom: 14px; background: rgba(255,255,255,0.05); border: 1px solid var(--border, rgba(255,255,255,0.1)); border-radius: 12px; padding: 4px; }
.login-tabs button { flex: 1; border: none; background: transparent; color: var(--text-muted); cursor: pointer; padding: 9px 4px; border-radius: 9px; font-size: 0.8rem; font-weight: 600; transition: all .15s; }
.login-tabs button.active { background: var(--gradient-hero); color: #fff; box-shadow: 0 6px 16px rgba(139,92,246,0.3); }
.login-tabs button:hover:not(.active) { color: var(--text-secondary); }
.login-field-code { padding-right: 4px; }
.login-code-btn { margin-left: 8px; white-space: nowrap; border: none; cursor: pointer; border-radius: 10px; padding: 0 14px; height: 40px; font-size: 0.8rem; font-weight: 600; color: #fff; background: var(--gradient-hero); display: inline-flex; align-items: center; gap: 5px; }
.login-code-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.login-demo-code { font-size: 0.78rem; color: var(--accent-cyan); margin: -4px 0 8px; }
.login-demo-code b { letter-spacing: 2px; }
.login-link { color: var(--accent-cyan); cursor: pointer; font-size: 0.82rem; margin-left: auto; }
.login-link:hover { text-decoration: underline; }
.login-form-footer { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.login-form-footer > span { color: var(--text-muted); font-size: 0.8rem; }

.login-reset-overlay { position: fixed; inset: 0; z-index: 2100; display: flex; align-items: center; justify-content: center; background: rgba(10,12,24,0.6); backdrop-filter: blur(4px); }
.login-reset-modal { position: relative; width: 380px; max-width: 92vw; background: var(--bg-card, #1b1f33); border: 1px solid var(--border, rgba(255,255,255,0.12)); border-radius: 16px; padding: 26px 24px; box-shadow: 0 30px 80px rgba(0,0,0,0.45); }
.login-reset-modal h3 { margin: 0 0 4px; font-size: 1.15rem; color: var(--text-primary); }
.login-reset-modal .login-form-sub { margin-bottom: 16px; }
.login-reset-close { position: absolute; top: 12px; right: 12px; width: 30px; height: 30px; border-radius: 8px; border: none; background: rgba(255,255,255,0.06); color: var(--text-muted); cursor: pointer; font-size: 0.9rem; }
.login-reset-close:hover { color: var(--text-primary); background: rgba(255,255,255,0.12); }
.login-reset-modal .login-btn { margin-top: 12px; }
.login-skip { display: block; width: 100%; margin-top: 10px; text-align: center; background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 0.8rem; }
.login-skip:hover { color: var(--text-secondary); }

/* 发送邮件弹窗（SMTP 直投）：正文 textarea + 附件提示
   注意：类名用 .mail-send-modal，不能叫 .email-modal ——
   历史文案面板已有一套同名的 .email-modal（旧弹窗），同名会互相污染样式。 */
.mail-send-modal { width: 460px; }
.mail-send-body-field { margin-bottom: 10px; }
.mail-send-body-field .login-icon { display: none; }
.mail-send-body-input {
    height: auto; min-height: 96px; padding: 14px 16px;
    line-height: 1.6; font-size: .92rem; resize: vertical; font-family: inherit;
}
.mail-send-attach-tip {
    display: flex; align-items: center; gap: 6px;
    margin: 0 0 12px; font-size: .8rem; color: var(--text-muted);
    word-break: break-all;
}
.mail-send-modal .login-demo-code { color: #22c55e; }

/* 个人中心：邮件发送设置表单 */
.smtp-form { display: flex; flex-direction: column; gap: 10px; }
.smtp-row { display: flex; gap: 10px; }
.smtp-row > * { flex: 1; min-width: 0; }
.smtp-row .smtp-port { flex: 0 0 110px; }
.smtp-input {
    width: 100%; padding: 10px 12px; border-radius: 8px;
    border: 1px solid #cbd5e1;        /* 浅色主题默认边框，避免变量未定义时透明看不见 */
    background: #ffffff;              /* 浅色主题白底 */
    color: #1e293b; font-size: .9rem; outline: none;
    transition: border-color .15s, box-shadow .15s;
}
.smtp-input:hover { border-color: #94a3b8; }
.smtp-input:focus { border-color: #6366f1; box-shadow: 0 0 0 3px rgba(99,102,241,0.12); }
.smtp-input::placeholder { color: #94a3b8; }
html[data-theme="dark"] .smtp-input {
    border-color: rgba(255,255,255,0.18); background: rgba(255,255,255,0.04);
    color: #e2e8f0;
}
html[data-theme="dark"] .smtp-input::placeholder { color: #64748b; }
.smtp-hint { font-size: .78rem; color: var(--text-muted); line-height: 1.6; }
.smtp-status { font-size: .82rem; display: flex; align-items: center; gap: 6px; }
.smtp-status.ok { color: #22c55e; }
.smtp-status.warn { color: #f59e0b; }
.smtp-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 修改账户弹窗：tab 切换 */
.account-edit-modal { width: 460px; }
.account-edit-tabs {
    display: flex; gap: 8px; margin: 4px 0 16px;
    border-bottom: 1px solid var(--border, rgba(255,255,255,0.12));
}
.account-edit-tab {
    background: none; border: none; padding: 8px 4px; cursor: pointer;
    color: var(--text-muted); font-size: .9rem; font-weight: 500;
    border-bottom: 2px solid transparent; margin-bottom: -1px;
    display: inline-flex; align-items: center; gap: 6px;
}
.account-edit-tab:hover { color: var(--text-secondary); }
.account-edit-tab.active {
    color: var(--accent, #6366f1);
    border-bottom-color: var(--accent, #6366f1);
}

/* 邮件模块：左侧导航独立模块 + 内部子页切换 */
.email-panel {
    padding: 0 8px;
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--topbar-height) - 56px);
}
.email-panel .panel-header { margin: 0 0 18px; flex-shrink: 0; }
.email-panel .panel-header h2 {
    display: flex; align-items: center; gap: 10px;
    font-size: 1.45rem; font-weight: 600; color: var(--text-primary);
    margin: 0 0 4px;
}
.email-panel .panel-sub { color: var(--text-muted); font-size: .88rem; margin: 0; }

.email-subtabs {
    display: flex; gap: 6px; margin-bottom: 18px;
    background: var(--bg-card, rgba(255,255,255,0.04));
    border-radius: 12px; padding: 6px;
    width: fit-content; min-width: 320px;
    flex-shrink: 0;
}
.email-subtab {
    background: none; border: none; padding: 8px 16px; cursor: pointer;
    color: var(--text-muted); font-size: .9rem; font-weight: 500;
    border-radius: 8px; display: inline-flex; align-items: center; gap: 8px;
    transition: background .15s, color .15s;
}
.email-subtab:hover { color: var(--text-secondary); }
.email-subtab.active {
    background: var(--bg-primary, #ffffff);
    color: var(--accent, #6366f1);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
html[data-theme="dark"] .email-subtab.active {
    background: var(--bg-elev, rgba(255,255,255,0.1));
}

.email-subpage {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    animation: fadeIn .2s ease-out;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* SMTP 高级选项（折叠面板） */
.smtp-advanced {
    border: 1px dashed #cbd5e1; border-radius: 8px;
    padding: 8px 12px; background: #f8fafc; margin-top: 4px;
}
html[data-theme="dark"] .smtp-advanced { border-color: rgba(255,255,255,0.12); background: rgba(255,255,255,0.02); }
.smtp-advanced > summary {
    cursor: pointer; font-size: .82rem; color: var(--accent, #6366f1);
    user-select: none; outline: none; list-style: none;
    display: inline-flex; align-items: center; gap: 4px;
}
.smtp-advanced > summary::before { content: '▸'; display: inline-block; transition: transform .15s; }
.smtp-advanced[open] > summary::before { transform: rotate(90deg); }
.smtp-advanced[open] { padding-bottom: 12px; }

/* 分页 */
.email-pager { display: flex; align-items: center; gap: 6px; justify-content: center; margin-top: 12px; flex-wrap: wrap; }
.email-pager .profile-mini[disabled] { opacity: .4; cursor: not-allowed; }
.email-pager-info { font-size: .8rem; color: var(--text-muted); padding: 0 4px; }

/* 邮件记录：发件人行 */
.profile-email-sender { font-size: .85rem; color: var(--text-secondary); margin-top: 4px; display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.profile-email-from { font-family: ui-monospace, monospace; font-size: .82rem; }
.profile-email-badge-sys {
    font-size: .7rem; padding: 1px 6px; border-radius: 4px;
    background: rgba(245,158,11,0.12); color: #b45309;
}

/* 邮件弹窗：通讯录 */
.email-contacts {
    margin-top: 8px; padding: 8px 10px;
    border: 1px solid #e2e8f0; border-radius: 8px;
    background: #f8fafc;
}
html[data-theme="dark"] .email-contacts { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.03); }
.email-contacts-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.email-contacts-head label {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: .82rem; color: var(--text-secondary); font-weight: 500;
}
.email-contacts-add { display: flex; gap: 6px; margin-bottom: 6px; }
.email-contacts-add .smtp-input { padding: 6px 10px; font-size: .85rem; }
.email-contacts-list { display: flex; flex-direction: column; gap: 4px; max-height: 160px; overflow-y: auto; }
.email-contact {
    display: flex; align-items: center; gap: 8px; padding: 4px 6px;
    border-radius: 6px; transition: background .12s;
}
.email-contact:hover { background: rgba(99,102,241,0.06); }
.email-contact label { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.email-contact-name { font-weight: 500; }
.email-contact-email { color: var(--text-muted); font-size: .82rem; font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.email-contacts-empty { color: var(--text-muted); font-size: .82rem; padding: 6px 0; }

/* ================= 浅色主题下的登录页（默认）：更浅、更透气、紫系炫光 ================= */
html[data-theme="light"] .login-overlay {
    background:
        radial-gradient(900px 520px at 12% 0%, rgba(139,92,246,0.26), transparent 60%),
        radial-gradient(820px 480px at 100% 100%, rgba(6,182,212,0.20), transparent 55%),
        radial-gradient(680px 420px at 82% 12%, rgba(236,72,153,0.16), transparent 55%),
        linear-gradient(160deg, #f6f4ff 0%, #eef3fb 48%, #f4ecff 100%);
}
html[data-theme="light"] .login-aurora {
    background:
        radial-gradient(640px 560px at 50% 40%, rgba(139,92,246,0.16), transparent 62%),
        radial-gradient(440px 420px at 74% 26%, rgba(6,182,212,0.13), transparent 60%),
        radial-gradient(380px 360px at 26% 74%, rgba(236,72,153,0.11), transparent 60%),
        linear-gradient(rgba(139,92,246,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139,92,246,0.05) 1px, transparent 1px);
    background-size: 100% 100%, 100% 100%, 100% 100%, 28px 28px, 28px 28px;
}
html[data-theme="light"] .login-overlay::before {
    background: conic-gradient(from 0deg, #8b5cf6, #06b6d4, #ec4899, #a855f7, #8b5cf6);
    opacity: 0.38; filter: blur(105px);
}
html[data-theme="light"] .login-overlay::after {
    background: conic-gradient(from 180deg, #06b6d4, #8b5cf6, #a855f7, #06b6d4);
    opacity: 0.32; filter: blur(105px);
}
html[data-theme="light"] .login-card {
    width: 440px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(139, 92, 246, 0.40);
    box-shadow: 0 24px 70px rgba(76, 29, 149, 0.18), 0 0 50px rgba(139, 92, 246, 0.16);
}
html[data-theme="light"] .login-field {
    background: rgba(255, 255, 255, 0.85); border: 1px solid rgba(139, 92, 246, 0.25);
}
html[data-theme="light"] .login-field:focus-within { border-color: var(--accent-purple); box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.16); }

/* 移动端隐藏可拖动分隔条，并让侧栏/内容纵向堆叠、恢复默认布局 */
@media (max-width: 900px) {
    .main-container { flex-direction: column; padding-left: 0; }
    .sidebar { margin-left: 0; width: 100%; position: static; height: auto; }
    .sidebar-resizer { display: none; }
}

/* ============ 登录页 v2：紫系主导 + 浮动光球 + 科技网格 + 卡片流光 ============ */
.login-overlay { perspective: 1000px; }

/* 1) 透视科技网格：底部向远处收敛 + 缓慢滚动，营造"数据平面"纵深感 */
.login-grid {
    position: absolute; left: -25%; right: -25%; bottom: -6%; height: 78%; z-index: 0; pointer-events: none;
    background-image:
        linear-gradient(rgba(124,58,237,.20) 1px, transparent 1px),
        linear-gradient(90deg, rgba(124,58,237,.20) 1px, transparent 1px);
    background-size: 48px 48px;
    transform: rotateX(66deg) translateZ(-60px);
    transform-origin: 50% 100%;
    -webkit-mask-image: linear-gradient(to top, #000 6%, rgba(0,0,0,.35) 45%, transparent 82%);
            mask-image: linear-gradient(to top, #000 6%, rgba(0,0,0,.35) 45%, transparent 82%);
    animation: lpGrid 8s linear infinite;
    will-change: background-position;
}
@keyframes lpGrid { to { background-position: 0 48px, 48px 0; } }

/* 2) 浮动光球：6 个不同尺寸/轨迹/时长，紫→白高光渐变 + 外发光 */
.login-orbs { position: absolute; inset: 0; z-index: 1; pointer-events: none; }
.orb {
    position: absolute; border-radius: 50%; opacity: .8;
    background: radial-gradient(circle at 32% 28%,
        rgba(255,255,255,.95) 0%, rgba(196,132,252,.62) 38%, rgba(124,58,237,.18) 68%, transparent 72%);
    box-shadow: 0 0 38px rgba(139,92,246,.55), inset 0 0 20px rgba(255,255,255,.38);
    animation: lpOrb var(--dur) ease-in-out var(--delay) infinite;
    will-change: transform;
}
.orb-1 { width: 92px; height: 92px; left:  7%; top: 16%; --dur: 15s; --delay: 0s;   }
.orb-2 { width: 54px; height: 54px; left: 20%; top: 68%; --dur: 19s; --delay: -3s;  }
.orb-3 { width: 128px;height: 128px;right: 10%; top: 12%; --dur: 23s; --delay: -7s; opacity: .58; }
.orb-4 { width: 40px; height: 40px; right: 22%; top: 58%; --dur: 13s; --delay: -1.5s;}
.orb-5 { width: 70px; height: 70px; left:  46%; top:  6%; --dur: 27s; --delay: -11s; opacity: .5; }
.orb-6 { width: 30px; height: 30px; left:  62%; bottom: 12%; --dur: 11s; --delay: -5s; }
@keyframes lpOrb {
    0%,100% { transform: translate3d(0,0,0) scale(1); }
    30%     { transform: translate3d(22px,-30px,0) scale(1.10); }
    60%     { transform: translate3d(-16px,18px,0) scale(.92); }
}

/* 3) 扫光束：一道倾斜紫光横掠全屏 */
.login-beam {
    position: absolute; top: -30%; width: 190px; height: 160%; z-index: 1; pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(168,85,247,.20), rgba(255,255,255,.10), rgba(168,85,247,.20), transparent);
    filter: blur(14px); transform: rotate(14deg);
    animation: lpBeam 8.5s ease-in-out infinite; will-change: left, opacity;
}
@keyframes lpBeam { 0%,100% { left: 8%;  opacity: .22; } 50% { left: 86%; opacity: .62; } }

/* 4) 卡片：紫边玻璃 + 旋转环形流光 + 斜向掠光 */
.login-card { overflow: hidden; isolation: isolate; }
.login-card > * { position: relative; z-index: 2; }
.login-card-ring {
    position: absolute; left: 50%; top: 50%; width: 190%; aspect-ratio: 1; z-index: 0;
    transform: translate(-50%,-50%); pointer-events: none;
    background: conic-gradient(from 0deg, transparent 0 58%,
        rgba(168,85,247,.85) 72%, rgba(255,255,255,.95) 79%, rgba(34,211,238,.55) 85%, transparent 92%);
    -webkit-mask: radial-gradient(closest-side, transparent 69%, #000 73%, #000 100%);
            mask: radial-gradient(closest-side, transparent 69%, #000 73%, #000 100%);
    animation: lpRing 5.5s linear infinite; will-change: transform;
}
@keyframes lpRing { to { transform: translate(-50%,-50%) rotate(360deg); } }
.login-card-shine {
    position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit;
    background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.16) 46%, transparent 60%);
    transform: translateX(-125%); animation: lpShine 6s ease-in-out 1.4s infinite; will-change: transform;
}
@keyframes lpShine { 0% { transform: translateX(-125%); } 55%,100% { transform: translateX(125%); } }

/* 5) Logo 脉冲环 */
.login-logo-badge { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; }
.login-logo-pulse {
    position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(168,85,247,.7);
    animation: lpPulse 2.6s ease-out infinite;
}
@keyframes lpPulse { 0% { transform: scale(.68); opacity: .95; } 100% { transform: scale(1.75); opacity: 0; } }

/* 6) 按钮：紫系流动渐变 + hover 掠光 */
.login-btn {
    position: relative; overflow: hidden;
    background: linear-gradient(120deg, #7c3aed 0%, #a855f7 42%, #c084fc 68%, #7c3aed 100%);
    background-size: 220% 100%; animation: lpBtn 6s ease infinite;
    box-shadow: 0 10px 28px rgba(124,58,237,.42);
}
@keyframes lpBtn { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.login-btn::after {
    content: ''; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.42), transparent);
}
.login-btn:hover::after { transition: transform .6s ease; transform: translateX(100%); }
.login-btn.busy { pointer-events: none; opacity: .78; }

/* 7) 输入框/入场/访客提示 */
.login-field:focus-within { border-color: var(--accent-purple) !important; box-shadow: 0 0 0 3px rgba(168,85,247,.20), 0 0 22px rgba(168,85,247,.18) !important; }
.login-card h2, .login-sub, .login-field, .login-btn, .login-guest, .login-guest-note { animation: lpIn .5s cubic-bezier(.22,.61,.36,1) both; }
.login-card h2 { animation-delay: .06s; } .login-sub { animation-delay: .11s; }
.login-field:nth-of-type(1) { animation-delay: .16s; } .login-field:nth-of-type(2) { animation-delay: .21s; }
.login-btn { animation-delay: .27s; } .login-guest { animation-delay: .33s; } .login-guest-note { animation-delay: .37s; }
@keyframes lpIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.login-guest-note { margin-top: 10px; font-size: .70rem; color: var(--text-muted); opacity: .85; }
.login-guest-note i { color: var(--accent-orange); }

/* ---------- 浅色主题：更透气的半透明玻璃（老板默认主题） ---------- */
html[data-theme="light"] .login-card {
    background: linear-gradient(158deg, rgba(255,255,255,.80) 0%, rgba(250,246,255,.60) 58%, rgba(245,240,255,.72) 100%);
    border: 1px solid rgba(168,85,247,.42);
    -webkit-backdrop-filter: blur(28px) saturate(185%);
            backdrop-filter: blur(28px) saturate(185%);
    box-shadow: 0 28px 82px rgba(76,29,149,.20), 0 0 62px rgba(168,85,247,.18), inset 0 1px 0 rgba(255,255,255,.92);
}
html[data-theme="light"] .login-card-shine { background: linear-gradient(115deg, transparent 32%, rgba(255,255,255,.62) 46%, transparent 60%); }
html[data-theme="light"] .login-grid { background-image:
    linear-gradient(rgba(124,58,237,.13) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,.13) 1px, transparent 1px); }
html[data-theme="light"] .orb { opacity: .62; box-shadow: 0 0 42px rgba(139,92,246,.34), inset 0 0 22px rgba(255,255,255,.62); }
html[data-theme="light"] .login-card h2 { background: linear-gradient(120deg, #7c3aed, #a855f7 55%, #22d3ee); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }

/* ---------- 性能与无障碍 ---------- */
@media (max-width: 640px) { .orb-3, .orb-5, .orb-6 { display: none; } .login-grid { opacity: .5; } .login-beam { display: none; } }
@media (prefers-reduced-motion: reduce) {
    .login-grid, .orb, .login-beam, .login-card-ring, .login-card-shine, .login-aurora,
    .login-overlay::before, .login-overlay::after, .login-btn, .login-logo-pulse,
    .login-card h2, .login-sub, .login-field, .login-guest, .login-guest-note { animation: none !important; }
}

/* ============================================================
   登录页（通用外壳 + 两种模式）
   ============================================================ */
.login-page {
    position: fixed; inset: 0; z-index: 2000;
    background: var(--bg-secondary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    overflow: auto;
}
/* A 站：居中大卡片 */
.login-page-card-mode {
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-height: 100vh; padding: 24px;
}
/* B 站：左右分栏 */
.login-page-split {
    display: flex; min-height: 100vh;
}
.login-page-bg {
    position: fixed; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(900px 520px at 12% 0%, rgba(59,130,246,0.22), transparent 60%),
        radial-gradient(820px 480px at 100% 100%, rgba(124,58,237,0.18), transparent 55%),
        radial-gradient(680px 420px at 82% 12%, rgba(6,182,212,0.12), transparent 55%),
        linear-gradient(155deg, var(--bg-secondary) 0%, #eef2fb 48%, var(--bg-secondary) 100%);
}
html[data-theme="dark"] .login-page-bg {
    background:
        radial-gradient(900px 520px at 12% 0%, rgba(59,130,246,0.18), transparent 60%),
        radial-gradient(820px 480px at 100% 100%, rgba(124,58,237,0.16), transparent 55%),
        radial-gradient(680px 420px at 82% 12%, rgba(6,182,212,0.10), transparent 55%),
        linear-gradient(155deg, #0b1220 0%, #111827 48%, #0f172a 100%);
}
.login-page-card {
    position: relative; z-index: 1;
    width: 100%; max-width: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 22px;
    box-shadow: 0 24px 70px rgba(0,0,0,0.12), 0 0 0 1px rgba(139,92,246,0.06);
    overflow: hidden;
    animation: cardIn .5s ease both;
}
@keyframes cardIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }

/* 上半：品牌区 */
.login-card-brand {
    position: relative;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    min-height: 260px; padding: 38px 24px 32px;
    background:
        radial-gradient(900px 520px at 12% 0%, rgba(59,130,246,0.35), transparent 60%),
        radial-gradient(820px 480px at 100% 100%, rgba(124,58,237,0.32), transparent 55%),
        radial-gradient(680px 420px at 82% 12%, rgba(6,182,212,0.22), transparent 55%),
        linear-gradient(155deg, #0b1220 0%, #111827 48%, #0f172a 100%);
    color: #fff;
    overflow: hidden;
}
.login-card-brand .login-brand-bg,
.login-card-brand .login-brand-grid,
.login-card-brand .login-brand-glow { position: absolute; inset: 0; pointer-events: none; }
.login-card-brand .login-brand-bg {
    background:
        radial-gradient(circle at 50% 55%, rgba(59,130,246,0.18) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(124,58,237,0.18) 0%, transparent 45%);
}
.login-card-brand .login-brand-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    transform: perspective(800px) rotateX(56deg) scale(1.4);
    transform-origin: center bottom;
    opacity: .35;
    mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent 80%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent 80%);
}
.login-card-brand .login-brand-glow::before,
.login-card-brand .login-brand-glow::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35;
}
.login-card-brand .login-brand-glow::before { width: 320px; height: 320px; background: #3b82f6; top: -70px; right: -80px; }
.login-card-brand .login-brand-glow::after { width: 260px; height: 260px; background: #a855f7; bottom: -50px; left: -60px; }
.login-card-brand .login-brand-visual {
    position: relative; width: 120px; height: 120px; margin-bottom: 22px;
    display: flex; align-items: center; justify-content: center;
}
.login-card-brand .login-brand-core {
    position: relative; width: 72px; height: 72px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6 55%, #06b6d4);
    box-shadow: 0 0 40px rgba(59,130,246,0.55), 0 0 80px rgba(139,92,246,0.35), inset 0 0 20px rgba(255,255,255,0.22);
    font-size: 2rem; color: #fff;
    z-index: 2;
}
.login-card-brand .core-ring {
    position: absolute; inset: -14px; border-radius: 50%;
    border: 1.5px solid rgba(59,130,246,0.35);
    animation: corePulse 2.8s ease-out infinite;
}
.login-card-brand .core-ring-2 { inset: -28px; border-color: rgba(139,92,246,0.22); animation-delay: .6s; }
.login-card-brand .core-ring-3 { inset: -42px; border-color: rgba(6,182,212,0.14); animation-delay: 1.2s; }
@keyframes corePulse { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
.login-card-brand .login-brand-text { position: relative; z-index: 2; text-align: center; max-width: 420px; }
.login-card-brand .login-brand-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 16px; opacity: .92; }
.login-card-brand .login-brand-logo i { color: #22d3ee; }
.login-card-brand .login-brand-text h1 { margin: 0 0 10px; font-size: 1.55rem; font-weight: 800; letter-spacing: 1px; line-height: 1.25; }
.login-card-brand .login-brand-text h1 span { color: #22d3ee; }
.login-card-brand .login-brand-text p { margin: 0; font-size: .88rem; color: rgba(255,255,255,0.72); line-height: 1.6; }

/* 下半：表单区 */
.login-card-form {
    padding: 32px 34px 28px;
    animation: formIn .5s ease .1s both;
}
@keyframes formIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.login-card-form h2 { margin: 0 0 6px; font-size: 1.45rem; font-weight: 700; color: var(--text-primary); }
.login-card-form .login-form-sub { margin: 0 0 26px; font-size: .84rem; color: var(--text-muted); }
.login-page .login-field { position: relative; margin-bottom: 16px; }
.login-icon {
    position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
    color: #9ca3af; font-size: .95rem; pointer-events: none; z-index: 1;
    transition: color .15s;
}
.login-field:focus-within .login-icon { color: #7c3aed; }
.login-input {
    width: 100%; height: 50px; border-radius: 12px;
    border: 1px solid #e5e7eb; background: #ffffff;
    padding: 0 18px 0 46px; outline: none;
    color: var(--text-primary); font-size: .96rem;
    box-shadow: none !important;
    -webkit-box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color .15s, background .15s;
}
.login-input:hover { border-color: #c7cad1; }
html[data-theme="dark"] .login-input {
    background: #1f2937;
    border-color: #374151;
    color: #f3f4f6;
}
.login-input:focus {
    border-color: #7c3aed;
    background: #ffffff;
}
html[data-theme="dark"] .login-input:focus {
    border-color: #a78bfa;
    background: #1f2937;
}
.login-input::placeholder { color: #9ca3af; }
/* 强制覆盖 Chrome autofill 黄色背景 */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover,
.login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
    box-shadow: 0 0 0 1000px #ffffff inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}
html[data-theme="dark"] .login-input:-webkit-autofill,
html[data-theme="dark"] .login-input:-webkit-autofill:hover,
html[data-theme="dark"] .login-input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px #1f2937 inset !important;
    box-shadow: 0 0 0 1000px #1f2937 inset !important;
    -webkit-text-fill-color: #f3f4f6 !important;
}
/* v26101302：登录密码「显示/隐藏」眼睛按钮 */
.login-field-password .login-input { padding-right: 46px; }
.login-eye {
    position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
    border: none; background: transparent; cursor: pointer; padding: 4px;
    color: #9ca3af; font-size: 1rem; line-height: 1; z-index: 2;
    display: inline-flex; align-items: center; justify-content: center;
}
.login-eye:hover, .login-eye.active { color: #7c3aed; }
html[data-theme="dark"] .login-eye { color: #6b7280; }
html[data-theme="dark"] .login-eye:hover, html[data-theme="dark"] .login-eye.active { color: #a78bfa; }
.login-options { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 20px; }
.login-remember { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; font-size: .82rem; color: var(--text-secondary); }
.login-remember input { position: absolute; opacity: 0; width: 0; height: 0; }
.login-remember .check-box {
    width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--border-light);
    background: var(--bg-card); display: flex; align-items: center; justify-content: center;
    transition: all .15s;
}
.login-remember .check-box i { font-size: .65rem; color: #fff; opacity: 0; transform: scale(.8); transition: all .15s; }
.login-remember input:checked + .check-box { background: var(--accent-purple); border-color: var(--accent-purple); }
.login-remember input:checked + .check-box i { opacity: 1; transform: scale(1); }
.login-page .login-err {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 12px; margin-bottom: 14px; border-radius: 8px;
    background: rgba(239,68,68,0.10); border: 1px solid rgba(239,68,68,0.30);
    color: #ef4444; font-size: .82rem; font-weight: 600;
}
.login-page .login-btn {
    width: 100%; height: 46px; border: none; cursor: pointer; border-radius: 12px;
    font-size: .98rem; font-weight: 600; letter-spacing: 2px; color: #fff;
    background: linear-gradient(120deg, #3b82f6 0%, #7c3aed 55%, #a855f7 100%);
    background-size: 200% 100%; box-shadow: 0 10px 26px rgba(59,130,246,0.32);
    transition: transform .12s, box-shadow .15s; position: relative; overflow: hidden;
    animation: lpBtn 5s ease infinite;
}
.login-page .login-btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(59,130,246,0.40); }
.login-page .login-btn.busy { pointer-events: none; opacity: .78; }
.login-form-footer { margin-top: 22px; text-align: center; font-size: .78rem; color: var(--text-muted); }
.login-page-footer {
    position: relative; z-index: 1;
    margin-top: 18px;
    font-size: .72rem; color: var(--text-muted); text-align: center;
}
@media (max-width: 520px) {
    .login-page { padding: 0; }
    .login-page-card { max-width: 100%; min-height: 100vh; border-radius: 0; border: none; display: flex; flex-direction: column; }
    .login-card-brand { min-height: 220px; flex-shrink: 0; }
    .login-card-form { flex: 1; padding: 26px 22px 32px; }
    .login-card-brand .login-brand-text h1 { font-size: 1.35rem; }
    .login-card-form h2 { font-size: 1.3rem; }
}
@media (max-height: 760px) and (min-width: 521px) {
    .login-page { justify-content: flex-start; padding-top: 24px; }
    .login-page-card { margin-bottom: 24px; }
}

/* ============================================================
   登录页 - 左右分栏（B 站 tech-digest-74r.pages.dev）
   ============================================================ */
.login-brand-split {
    position: relative; flex: 1 1 46%; min-width: 420px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    overflow: hidden;
    background:
        radial-gradient(900px 520px at 12% 0%, rgba(59,130,246,0.35), transparent 60%),
        radial-gradient(820px 480px at 100% 100%, rgba(124,58,237,0.32), transparent 55%),
        radial-gradient(680px 420px at 82% 12%, rgba(6,182,212,0.22), transparent 55%),
        linear-gradient(155deg, #0b1220 0%, #111827 48%, #0f172a 100%);
    color: #fff;
}
.login-brand-split-bg,
.login-brand-split-grid,
.login-brand-split-glow { position: absolute; inset: 0; pointer-events: none; }
.login-brand-split-bg {
    background:
        radial-gradient(circle at 50% 55%, rgba(59,130,246,0.18) 0%, transparent 50%),
        radial-gradient(circle at 30% 80%, rgba(124,58,237,0.18) 0%, transparent 45%);
}
.login-brand-split-grid {
    background-image:
        linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
    background-size: 46px 46px;
    transform: perspective(800px) rotateX(56deg) scale(1.4);
    transform-origin: center bottom;
    opacity: .35;
    mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent 80%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,0.9), transparent 80%);
}
.login-brand-split-glow::before,
.login-brand-split-glow::after {
    content: ''; position: absolute; border-radius: 50%; filter: blur(90px); opacity: .35;
}
.login-brand-split-glow::before { width: 360px; height: 360px; background: #3b82f6; top: -80px; right: -90px; }
.login-brand-split-glow::after { width: 300px; height: 300px; background: #a855f7; bottom: -60px; left: -70px; }
.login-brand-split-visual {
    position: relative; width: 260px; height: 260px; margin-bottom: 38px;
    display: flex; align-items: center; justify-content: center;
}
.login-brand-split-core {
    position: relative; width: 110px; height: 110px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6 55%, #06b6d4);
    box-shadow: 0 0 60px rgba(59,130,246,0.55), 0 0 120px rgba(139,92,246,0.35), inset 0 0 30px rgba(255,255,255,0.22);
    font-size: 3.2rem; color: #fff;
    z-index: 2;
}
.split-ring {
    position: absolute; inset: -22px; border-radius: 50%;
    border: 1.5px solid rgba(59,130,246,0.35);
    animation: splitPulse 2.8s ease-out infinite;
}
.split-ring-2 { inset: -44px; border-color: rgba(139,92,246,0.22); animation-delay: .6s; }
.split-ring-3 { inset: -68px; border-color: rgba(6,182,212,0.14); animation-delay: 1.2s; }
@keyframes splitPulse { 0% { transform: scale(.92); opacity: 1; } 100% { transform: scale(1.18); opacity: 0; } }
.login-brand-split-orbit {
    position: absolute; inset: 0; z-index: 1;
}
.orbit-p {
    position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border-radius: 50%;
    background: #22d3ee; box-shadow: 0 0 14px #22d3ee;
    transform: translate(-50%, -50%);
    animation: splitOrbit1 8s linear infinite;
}
.orbit-p-2 { background: #a855f7; box-shadow: 0 0 14px #a855f7; animation-name: splitOrbit2; animation-duration: 11s; }
.orbit-p-3 { background: #3b82f6; box-shadow: 0 0 14px #3b82f6; animation-name: splitOrbit3; animation-duration: 14s; }
@keyframes splitOrbit1 { 0% { transform: translate(-50%,-50%) rotate(0deg) translateX(115px) rotate(0deg); } 100% { transform: translate(-50%,-50%) rotate(360deg) translateX(115px) rotate(-360deg); } }
@keyframes splitOrbit2 { 0% { transform: translate(-50%,-50%) rotate(120deg) translateX(145px) rotate(-120deg); } 100% { transform: translate(-50%,-50%) rotate(480deg) translateX(145px) rotate(-480deg); } }
@keyframes splitOrbit3 { 0% { transform: translate(-50%,-50%) rotate(240deg) translateX(175px) rotate(-240deg); } 100% { transform: translate(-50%,-50%) rotate(600deg) translateX(175px) rotate(-600deg); } }
.login-brand-split-text { position: relative; z-index: 2; text-align: center; max-width: 480px; padding: 0 32px; }
.login-brand-split-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 22px; opacity: .92; }
.login-brand-split-logo i { color: #22d3ee; }
.login-brand-split-text h1 { margin: 0 0 14px; font-size: 2.1rem; font-weight: 800; letter-spacing: 1px; line-height: 1.2; }
.login-brand-split-text h1 span { color: #22d3ee; }
.login-brand-split-text p { margin: 0; font-size: .98rem; color: rgba(255,255,255,0.72); line-height: 1.7; }
.login-brand-split-dots {
    position: absolute; bottom: 42px; left: 50%; transform: translateX(-50%);
    display: flex; gap: 8px; z-index: 2;
}
.login-brand-split-dots span { width: 22px; height: 4px; border-radius: 2px; background: rgba(255,255,255,0.25); transition: background .2s; cursor: pointer; }
.login-brand-split-dots span:hover { background: rgba(255,255,255,0.55); }
.login-brand-split-dots span.active { background: #fff; }
.split-slide { will-change: opacity, transform; }
.split-fade-enter-active, .split-fade-leave-active { transition: opacity .45s ease, transform .45s ease; }
.split-fade-enter-from { opacity: 0; transform: translateY(14px); }
.split-fade-leave-to { opacity: 0; transform: translateY(-14px); }

.login-form-panel-split {
    flex: 1 1 54%; min-width: 460px;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    background: var(--bg-secondary);
    padding: 40px 48px;
    position: relative;
}
.login-form-card-split {
    width: 100%; max-width: 440px;
    animation: splitFormIn .5s ease both;
}
@keyframes splitFormIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.login-form-card-split-header { display: flex; align-items: center; margin-bottom: 48px; }
.login-form-card-split-logo { display: inline-flex; align-items: center; gap: 8px; font-size: 1.15rem; font-weight: 700; color: var(--text-primary); }
.login-form-card-split-logo i { color: var(--accent-cyan); }
.login-form-card-split h2 { margin: 0 0 8px; font-size: 1.55rem; font-weight: 700; color: var(--text-primary); }
.login-form-card-split .login-form-sub { margin: 0 0 32px; font-size: .84rem; color: var(--text-muted); }
.login-form-card-split .login-field { margin-bottom: 20px; }
.login-page-footer-split {
    position: absolute; bottom: 28px;
    font-size: .72rem; color: var(--text-muted); text-align: center;
}
@media (max-width: 900px) {
    .login-page-split { flex-direction: column; overflow-y: auto; }
    .login-brand-split { flex: none; min-height: 240px; min-width: auto; width: 100%; padding: 32px 20px; }
    .login-brand-split-visual { width: 160px; height: 160px; margin-bottom: 20px; }
    .login-brand-split-core { width: 72px; height: 72px; font-size: 2rem; }
    .split-ring { inset: -14px; } .split-ring-2 { inset: -28px; } .split-ring-3 { inset: -42px; }
    @keyframes splitOrbit1 { 0% { transform: translate(-50%,-50%) rotate(0deg) translateX(70px) rotate(0deg); } 100% { transform: translate(-50%,-50%) rotate(360deg) translateX(70px) rotate(-360deg); } }
    @keyframes splitOrbit2 { 0% { transform: translate(-50%,-50%) rotate(120deg) translateX(90px) rotate(-120deg); } 100% { transform: translate(-50%,-50%) rotate(480deg) translateX(90px) rotate(-480deg); } }
    @keyframes splitOrbit3 { 0% { transform: translate(-50%,-50%) rotate(240deg) translateX(110px) rotate(-240deg); } 100% { transform: translate(-50%,-50%) rotate(600deg) translateX(110px) rotate(-600deg); } }
    .login-brand-split-text h1 { font-size: 1.45rem; }
    .login-brand-split-dots { bottom: 22px; }
    .login-form-panel-split { flex: none; min-width: auto; width: 100%; padding: 32px 24px 80px; }
    .login-form-card-split-header { margin-bottom: 28px; }
    .login-form-card-split h2 { font-size: 1.4rem; }
    .login-page-footer-split { position: static; margin-top: 28px; }
}
@media (max-width: 420px) {
    .login-form-card-split h2 { font-size: 1.3rem; }
    .login-brand-split-text { padding: 0 16px; }
}

/* ============================================================
   个人中心（需求③）—— profile-panel
   ============================================================ */
.profile-panel { display: flex; flex-direction: column; gap: 16px; padding: 20px; width: 100%; max-width: 1760px; margin: 0 auto; } /* v26102609：1280→1760，全账号表格列多，给备注列留足宽度 */

/* 头部：头像 + 身份 + 同步状态 + 操作 */
.profile-head {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: linear-gradient(120deg, rgba(139,92,246,.14), rgba(6,182,212,.08));
    border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 18px 20px;
}
.profile-avatar {
    width: 56px; height: 56px; flex: 0 0 56px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 700; color: #fff;
    background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
    box-shadow: 0 6px 18px rgba(139,92,246,.4); text-transform: uppercase;
}
.profile-id { flex: 1 1 200px; min-width: 0; }
.profile-id h2 { font-size: 1.2rem; margin: 0; display: flex; align-items: center; gap: 8px; }
.profile-storage { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-size: .76rem; color: var(--text-secondary); }
.profile-storage.cloud { color: var(--accent-cyan); }
.profile-storage.local { color: var(--accent-orange); }
/* v26101601：前端版本徽标——个人中心顶部公示页面版本，跨设备对比缓存新旧一目了然；
   与 app.js 内置版本不一致时（缓存打回旧版）转警示色并提示强刷 */
.profile-ver { display: inline-block; margin-top: 4px; margin-left: 12px; font-size: .72rem; color: var(--text-muted); letter-spacing: .3px; }
.profile-ver.mismatch { color: var(--accent-red); font-weight: 600; }
.profile-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-sync { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; color: var(--text-muted); max-width: 320px; }
.profile-sync.busy { color: var(--accent-blue); }
.profile-sync.err { color: var(--accent-red); }

/* 通用按钮（个人中心） */
.profile-btn {
    display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-md);
    border: 1px solid var(--border-light); background: var(--bg-tertiary); color: var(--text-primary);
    font-size: .82rem; cursor: pointer; transition: var(--transition); white-space: nowrap;
}
.profile-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.profile-btn.primary { background: linear-gradient(120deg, var(--accent-purple), #a855f7); color: #fff; border-color: transparent; }
.profile-btn.primary:hover { filter: brightness(1.08); color: #fff; }
.profile-btn.ghost { background: transparent; }
.profile-btn.danger { color: var(--accent-red); border-color: rgba(239,68,68,.4); }
.profile-btn.danger:hover { background: rgba(239,68,68,.12); color: var(--accent-red); border-color: var(--accent-red); }

/* 访客提醒条 */
.profile-warn {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius-md);
    background: rgba(245,158,11,.10); border: 1px solid rgba(245,158,11,.35); color: var(--text-secondary);
    font-size: .82rem; line-height: 1.6;
}
.profile-warn i { color: var(--accent-orange); font-size: 1.15rem; margin-top: 2px; flex: 0 0 auto; }
.profile-warn strong { color: var(--text-primary); }

/* 卡片网格：三列等宽，全局配置 / 我的收藏 / 数据管理处于同一行 */
.profile-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 1100px) {
    .profile-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
    .profile-grid { grid-template-columns: 1fr; }
}
.profile-card { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 16px; }
.profile-card-settings { grid-column: auto; }
.profile-card-settings .settings-group { display: flex; flex-direction: column; gap: 0; }
.profile-card-settings .settings-group-title { grid-column: 1 / -1; font-size: .78rem; font-weight: 600; color: var(--text-secondary); margin: 10px 0 4px; display: flex; align-items: center; gap: 6px; }
.profile-card-settings .settings-group-title:first-child { margin-top: 0; }
.profile-card h3 { font-size: .92rem; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; color: var(--text-primary); }
.profile-card h3 i { color: var(--accent-purple); }

.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px dashed var(--border-light); font-size: .84rem; }
.profile-row:first-of-type { border-top: none; }
.profile-row > span:first-child { color: var(--text-secondary); white-space: nowrap; }
.profile-row select { max-width: 60%; }
.profile-val { color: var(--text-primary); font-weight: 600; text-align: right; }
.profile-mini { margin-left: 8px; font-size: .72rem; padding: 3px 9px; border-radius: var(--radius-sm); border: 1px solid var(--border-light); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; transition: var(--transition); }
.profile-mini:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

.profile-check { display: flex; align-items: flex-start; gap: 8px; font-size: .8rem; color: var(--text-secondary); line-height: 1.5; cursor: pointer; }
.profile-check input { margin-top: 3px; accent-color: var(--accent-purple); }
.profile-check em { display: block; font-style: normal; font-size: .72rem; color: var(--text-muted); margin-top: 2px; }

.profile-count { margin-left: auto; background: rgba(139,92,246,.18); color: var(--accent-purple); border-radius: 999px; padding: 0 8px; font-size: .72rem; font-weight: 700; }

/* 收藏列表 */
.profile-fav-empty { font-size: .82rem; color: var(--text-muted); padding: 10px 0; }
.profile-fav { list-style: none; display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow: auto; }
.profile-fav li { display: flex; align-items: center; gap: 8px; font-size: .82rem; padding: 6px 8px; border-radius: var(--radius-sm); background: var(--bg-tertiary); }
.profile-fav li a { flex: 1 1 auto; min-width: 0; color: var(--text-primary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-fav li a:hover { color: var(--accent-cyan); }
.profile-fav-src { flex: 0 0 auto; font-size: .68rem; color: var(--text-muted); background: var(--bg-secondary); padding: 1px 6px; border-radius: 4px; }
.profile-fav li button { flex: 0 0 auto; border: none; background: transparent; color: var(--text-muted); cursor: pointer; font-size: .85rem; }
.profile-fav li button:hover { color: var(--accent-red); }
.profile-fav-actions { display: flex; align-items: center; gap: 4px; }
.profile-fav-ai:hover { color: var(--accent-cyan) !important; }

/* 收藏批量选择 */
.profile-fav-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.profile-fav-head h3 { margin: 0; display: flex; align-items: center; gap: 8px; }
.profile-fav-batch { display: flex; align-items: center; gap: 8px; }
.profile-fav-batch-count { font-size: .8rem; color: var(--text-secondary); }
.profile-fav li.is-selected { background: rgba(139,92,246,.1); outline: 1px solid rgba(139,92,246,.35); }
.profile-fav-check { flex: 0 0 auto; accent-color: var(--accent-purple); cursor: pointer; }
.profile-fav-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border-light); }
.profile-fav-selectall { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--text-secondary); cursor: pointer; }
.profile-fav-selectall input { accent-color: var(--accent-purple); }
.profile-fav-tip { font-size: .72rem; color: var(--text-muted); }

/* 数据管理 */
.profile-btns { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.profile-note { font-size: .74rem; color: var(--text-muted); line-height: 1.6; margin-top: 6px; }
.profile-note strong { color: var(--text-secondary); }

/* 个人中心：云端空间使用进度条 */
.cloud-usage { margin-top: 12px; padding: 10px 12px; background: var(--bg-soft, #f6f8fb); border: 1px solid var(--border-light); border-radius: 10px; }
.cloud-usage-head { display: flex; justify-content: space-between; align-items: center; font-size: .78rem; color: var(--text-secondary); margin-bottom: 7px; }
.cloud-usage-head i { margin-right: 5px; color: var(--primary, #2f6bff); }
.cloud-usage-val { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text-primary); }
.cloud-usage-bar { height: 9px; border-radius: 999px; background: #e7ebf2; overflow: hidden; }
.cloud-usage-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #3ec77a, #2f9bff); transition: width .35s ease; }
.cloud-usage-fill.warn { background: linear-gradient(90deg, #f5b13a, #f59e0b); }
.cloud-usage-fill.danger { background: linear-gradient(90deg, #f0506e, #e23b3b); }

/* 导航项上的云端/本机徽标 */
.badge { display: inline-flex; align-items: center; padding: 1px 7px; border-radius: 999px; font-size: .6rem; font-weight: 700; line-height: 1.7; letter-spacing: .02em; }
.badge-cloud { background: rgba(6,182,212,.16); color: var(--accent-cyan); border: 1px solid rgba(6,182,212,.4); }
.badge-local { background: rgba(245,158,11,.16); color: var(--accent-orange); border: 1px solid rgba(245,158,11,.4); }
.badge-admin { background: rgba(139,92,246,.16); color: var(--accent-purple); border: 1px solid rgba(139,92,246,.4); margin-left: 6px; }
/* v260819：统一导航内所有 badge 与文字的间距（实时 / 云端 / 本机 / 管理员 / 计数）*/
.nav-item .badge { margin-left: 6px; flex-shrink: 0; }

/* 分段控件（主题切换等） */
.seg { display: inline-flex; border: 1px solid var(--border-color); border-radius: var(--radius-sm); overflow: hidden; }
.seg button { padding: 6px 14px; background: var(--bg-tertiary); color: var(--text-secondary); font-size: .8rem; border: none; cursor: pointer; transition: var(--transition); }
.seg button + button { border-left: 1px solid var(--border-color); }
.seg button.on { background: linear-gradient(120deg, var(--accent-purple), #a855f7); color: #fff; }
.seg button:hover:not(.on) { background: var(--bg-hover); color: var(--text-primary); }

/* 科技卡片上的收藏按钮 */
.tech-fav {
    width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; border: 1px solid var(--border-color);
    background: var(--bg-tertiary); color: var(--text-muted); cursor: pointer; font-size: .9rem;
    display: inline-flex; align-items: center; justify-content: center; transition: var(--transition);
}
.tech-fav:hover { color: var(--accent-orange); border-color: var(--accent-orange); }
.tech-fav.on { color: #fff; background: linear-gradient(135deg, var(--accent-orange), #f97316); border-color: transparent; box-shadow: 0 2px 8px rgba(245,158,11,.4); }
.tech-fav.tech-ai:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }

/* 浅色主题下个人中心的细微覆盖 */
html[data-theme="light"] .profile-head { background: linear-gradient(120deg, rgba(139,92,246,.10), rgba(6,182,212,.06)); }

/* v2608：热点看板时间过滤 + 热度规则面板 */
.tech-controls { display: flex; flex-wrap: wrap; gap: 10px 12px; align-items: center; padding: 12px 0; }
.tech-controls-compact { flex-direction: row; flex-wrap: nowrap; gap: 8px; align-items: center; padding: 8px 12px; background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: var(--radius-lg); margin-bottom: 10px; }
.tech-controls-compact .time-filter { display: flex; gap: 6px; align-items: center; padding-right: 10px; border-right: 1px solid var(--border-light); flex: 0 0 auto; }
.tech-controls-compact .tech-search { position: relative; flex: 1 1 160px; min-width: 140px; max-width: 260px; }
.tech-controls-compact .tech-search i { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: .8rem; }
.tech-controls-compact .tech-search input { width: 100%; padding: 5px 10px 5px 28px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); font-size: .78rem; }
.tech-controls-compact .tech-sort { display: flex; gap: 6px; align-items: center; flex: 0 0 auto; margin-left: auto; }
.tech-controls-compact .source-tag { padding: 4px 9px; border-radius: 16px; font-size: .7rem; }
.tech-controls-compact .hot-only { font-size: .7rem; gap: 4px; }
.source-filter-row { display: flex; flex-wrap: wrap; gap: 8px 6px; align-items: center; padding: 10px 0 14px; border-top: 1px solid var(--border-light); }
.source-filter-row .filter-label { color: var(--text-secondary); font-size: .82rem; margin-right: 4px; }
.time-filter .time-fav.on { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border-color: transparent; }
.source-tag.hot-rule-btn { display: inline-flex; align-items: center; gap: 4px; }
.source-tag.hot-rule-btn.on { background: linear-gradient(120deg, var(--accent-purple), #a855f7); color: #fff; border-color: transparent; }

/* 热度规则弹窗 */
.hot-rule-wrap { position: relative; display: inline-flex; vertical-align: middle; }
.hot-rule-popover { position: absolute; top: calc(100% + 8px); right: 0; left: auto; z-index: 31; }
.hot-rule-popover-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.15); z-index: 30; }
.hot-rule-popover-card { position: relative; width: 420px; max-width: calc(100vw - 40px); padding: 14px 16px; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: 0 16px 48px rgba(0,0,0,0.18); z-index: 31; }
.hot-rule-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hot-rule-head h4 { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--accent-purple); font-size: 1rem; }
.hot-rule-close { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.hot-rule-close:hover { color: var(--text-primary); background: var(--bg-hover); }
.hot-rule-desc { margin: 6px 0 14px; color: var(--text-muted); font-size: .8rem; }
.hot-rule-body { display: grid; gap: 14px; }
.hot-rule-row { display: grid; gap: 8px; }
.hot-rule-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-primary); font-size: .88rem; font-weight: 500; }
.hot-rule-num { display: inline-flex; align-items: center; gap: 5px; }
.hot-rule-num input[type="number"] { width: 54px; padding: 4px 6px; text-align: center; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-tertiary); color: var(--text-primary); font-size: .85rem; font-weight: 600; -moz-appearance: textfield; }
.hot-rule-num input[type="number"]::-webkit-outer-spin-button,
.hot-rule-num input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.hot-rule-step { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-color); border-radius: var(--radius-sm); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; font-size: 1rem; line-height: 1; transition: var(--transition); }
.hot-rule-step:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); background: var(--bg-hover); }
.hot-rule-unit { color: var(--text-muted); font-size: .8rem; margin-left: 2px; }
.hot-rule-slider { width: 100%; }
.hot-rule-slider input[type="range"] { width: 100%; height: 8px; accent-color: var(--accent-cyan); border-radius: 4px; }
.hot-rule-hint { color: var(--text-muted); font-size: .75rem; }
.hot-rule-presets { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding-top: 10px; border-top: 1px dashed var(--border-light); }
.hot-rule-presets-label { color: var(--text-secondary); font-size: .84rem; }
.hot-rule-presets .source-tag.reset-btn { margin-left: auto; }
@media (max-width: 720px) {
    .tech-controls-compact { flex-wrap: wrap; }
    .tech-controls-compact .tech-sort { margin-left: 0; }
    .hot-rule-popover { left: auto; right: 0; }
    .hot-rule-popover-card { width: auto; min-width: 320px; max-width: calc(100vw - 40px); }
    .hot-rule-label { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* v2608：管理员「全账号使用情况」面板 */
.profile-card-admin { grid-column: 1 / -1; }
.profile-card-admin h3 i { color: #f59e0b; }
.delete-account-modal { max-width: 460px; }
.delete-account-list { margin: 10px 0; padding-left: 18px; font-size: .82rem; color: var(--text-secondary); line-height: 1.7; }
.delete-account-list li { margin-bottom: 4px; }
.delete-account-warn { color: var(--accent-red); font-size: .82rem; font-weight: 600; }
.admin-actions { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.admin-gen-time { font-size: .78rem; color: var(--text-muted); }
.admin-err { color: #ef4444; font-size: .84rem; padding: 8px 0; }
.admin-table-wrap { overflow-x: auto; margin-top: 6px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .84rem; }
.admin-table th, .admin-table td { padding: 9px 10px; text-align: left; border-bottom: 1px solid var(--border-light); white-space: nowrap; }
.admin-table th { background: var(--bg-tertiary); color: var(--text-secondary); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
.admin-table tbody tr:hover { background: var(--bg-hover); }
.admin-table tr.is-self { background: rgba(245,158,11,.06); }
.admin-table tr.is-self:hover { background: rgba(245,158,11,.12); }
.admin-table tr.is-admin-row { border-left: 3px solid #f59e0b; }
.admin-table .admin-time { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.admin-table .admin-ip { color: var(--accent-cyan); font-variant-numeric: tabular-nums; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.admin-table .admin-role { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.admin-table .role-admin { background: #fef3c7; color: #b45309; }
.admin-table .role-user { background: #e0f2fe; color: #0369a1; }
html[data-theme="dark"] .admin-table .role-admin { background: rgba(245,158,11,.18); color: #fcd34d; }
html[data-theme="dark"] .admin-table .role-user { background: rgba(56,189,248,.15); color: #7dd3fc; }
.admin-self-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: #f59e0b; color: #fff; font-size: .68rem; font-weight: 600; }
.admin-table th:not(.text-left), .admin-table td:not(.text-left) { text-align: center; }
.admin-table td .admin-op { justify-content: center; }
.admin-table tr.is-disabled { opacity: .65; background: rgba(239,68,68,.04); }
.admin-table .admin-status { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .72rem; font-weight: 600; }
.admin-table .status-active { background: #dcfce7; color: #15803d; }
.admin-table .status-disabled { background: #fee2e2; color: #b91c1c; }
html[data-theme="dark"] .admin-table .status-active { background: rgba(34,197,94,.15); color: #86efac; }
html[data-theme="dark"] .admin-table .status-disabled { background: rgba(239,68,68,.15); color: #fca5a5; }
.admin-empty { text-align: center; padding: 28px 0; color: var(--text-muted); }
.admin-empty i { font-size: 2rem; display: block; margin-bottom: 8px; }
/* v260820：管理员账号管理 */
.admin-add-btn { background: linear-gradient(120deg, var(--accent-purple), #a855f7); color: #fff; border-color: transparent; }
.admin-add-btn:hover { filter: brightness(1.08); color: #fff; border-color: transparent; }
.admin-op { display: inline-flex; gap: 4px; }
.admin-op-btn {
    width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-color);
    background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; font-size: .78rem;
    transition: all .15s;
}
.admin-op-btn:hover { border-color: var(--accent-cyan); color: var(--accent-cyan); }
.admin-op-btn.danger:hover { border-color: var(--accent-red); color: var(--accent-red); background: rgba(239,68,68,.1); }
.admin-op-btn.success:hover { border-color: #22c55e; color: #22c55e; background: rgba(34,197,94,.1); }
.admin-op-btn.warn:hover { border-color: #f59e0b; color: #f59e0b; background: rgba(245,158,11,.1); }
.admin-op-btn.info:hover { border-color: #3b82f6; color: #3b82f6; background: rgba(59,130,246,.1); }
.admin-history-count {
    background: transparent; border: none; padding: 0; margin: 0;
    color: var(--accent-cyan); font-weight: 700; cursor: pointer;
    text-decoration: underline; text-underline-offset: 2px;
}
.admin-history-count:hover { color: var(--accent-purple); }
/* v26101602：Usage 表图片列「组 / 张」中的张数小字 */
.admin-history-pics {
    font-size: .72rem; color: var(--text-muted); font-weight: 400; margin-left: 2px;
    text-decoration: none;
}
.admin-op-btn:disabled { opacity: .4; cursor: not-allowed; }
.admin-role-select {
    width: 100%; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--border-color);
    background: var(--bg-tertiary); color: var(--text-primary); font-size: .9rem;
}
.admin-modal-err { margin-top: 10px; padding: 8px 12px; border-radius: 8px; background: rgba(239,68,68,.1); color: #ef4444; font-size: .84rem; }
.admin-note-cell { max-width: 320px; min-width: 200px; position: relative; } /* v26102609：220→320，备注列保全 */
/* v26102609：热点看板「网站分类」行——视觉上比来源标签更醒目（紫底强调），与普通来源 tag 区分 */
.tech-category-row { margin-bottom: 4px; }
.tech-category-row .cat-tag { font-weight: 700; border: 1px solid var(--border-color); background: var(--bg-tertiary); }
.tech-category-row .cat-tag.active { background: linear-gradient(120deg, var(--accent-purple), #a855f7); color: #fff; border-color: transparent; }
.tech-category-row .filter-label { color: var(--accent-purple); }
/* v26102607：登录日志弹窗 */
.login-log-modal { max-width: 520px; }
.login-log-loading, .login-log-empty { text-align: center; padding: 24px 0; color: var(--text-muted); }
.login-log-empty i { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.login-log-err { padding: 8px 12px; border-radius: 8px; background: rgba(239,68,68,.1); color: #ef4444; font-size: .84rem; margin-bottom: 10px; }
.login-log-list { max-height: 420px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.login-log-item {
    display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center;
    padding: 8px 12px; border-radius: 8px; background: var(--bg-tertiary);
    border: 1px solid var(--border-light); font-size: .82rem;
}
.login-log-time { color: var(--text-secondary); font-variant-numeric: tabular-nums; }
.login-log-ip { color: var(--accent-cyan); font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; }
.login-log-method {
    display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px;
    font-size: .72rem; font-weight: 600; white-space: nowrap; background: #e0f2fe; color: #0369a1;
}
.login-log-method.m-phone-code, .login-log-method.m-phone-pwd { background: #ede9fe; color: #6d28d9; }
.login-log-method.m-unknown { background: #f1f5f9; color: #64748b; }
html[data-theme="dark"] .login-log-method { background: rgba(56,189,248,.15); color: #7dd3fc; }
html[data-theme="dark"] .login-log-method.m-phone-code, html[data-theme="dark"] .login-log-method.m-phone-pwd { background: rgba(167,139,250,.18); color: #c4b5fd; }
html[data-theme="dark"] .login-log-method.m-unknown { background: rgba(148,163,184,.15); color: #cbd5e1; }
.admin-note-input {
    width: 100%; padding: 5px 8px; border-radius: 8px; border: 1px solid var(--border-color);
    background: var(--bg-tertiary); color: var(--text-primary); font-size: .82rem;
    font-family: inherit; transition: var(--transition);
}
.admin-note-input::placeholder { color: var(--text-muted); }
.admin-note-input:focus { outline: none; border-color: var(--accent-cyan); background: var(--bg-card); }
.admin-note-input:disabled { opacity: .55; cursor: not-allowed; }
.admin-note-spin { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--accent-cyan); font-size: .8rem; }

/* v2608：历史图文面板 */
.history-docs-panel { padding: 0; }
.history-docs-tabs { display: flex; gap: 8px; padding: 14px 18px 0; border-bottom: 1px solid var(--border-color); }
.history-docs-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border-radius: var(--radius-md) var(--radius-md) 0 0; border: 1px solid transparent; border-bottom: none; background: transparent; color: var(--text-secondary); font-size: .85rem; cursor: pointer; transition: var(--transition); }
.history-docs-tab:hover { color: var(--text-primary); background: var(--bg-tertiary); }
.history-docs-tab.active { color: var(--accent-purple); background: var(--bg-card); border-color: var(--border-color); border-bottom: 1px solid var(--bg-card); margin-bottom: -1px; font-weight: 600; }
.history-docs-tab .badge { background: rgba(139,92,246,.18); color: var(--accent-purple); padding: 0 6px; border-radius: 999px; font-size: .7rem; }

/* 历史图片网格 */
.history-images-wrap { padding: 16px 18px; }
.history-images-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; align-items: start; }
.history-image-card { position: relative; background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; transition: var(--transition); }
.history-image-card:hover { border-color: var(--accent-cyan); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.history-image-card.is-selected { border-color: var(--accent-purple); box-shadow: 0 0 0 2px rgba(139,92,246,.25); }
.history-image-check { position: absolute; top: 8px; left: 8px; z-index: 2; }
.history-image-check input { width: 16px; height: 16px; accent-color: var(--accent-purple); }
.history-image-thumb { position: relative; aspect-ratio: 4/3; background: var(--bg-tertiary); display: flex; align-items: center; justify-content: center; overflow: hidden; cursor: pointer; }
.history-image-thumb img { width: 100%; height: 100%; object-fit: cover; }
.history-image-count { position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff; font-size: .72rem; padding: 2px 8px; border-radius: var(--radius-sm); }
.history-image-info { padding: 10px 12px; }
.history-image-title { font-size: .84rem; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 6px; }
.history-image-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; font-size: .72rem; color: var(--text-muted); }
.history-image-brand { background: var(--bg-tertiary); padding: 1px 6px; border-radius: var(--radius-sm); }
.history-image-actions { display: flex; gap: 6px; }
.history-image-actions .profile-btn { padding: 5px 10px; font-size: .72rem; }

/* AI 搜图面板 */
.ai-image-search-panel { padding: 0; }
.ai-image-search-container { padding: 20px; max-width: 1200px; margin: 0 auto; }
.ai-image-search-header { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.ai-image-search-header h2 { font-size: 1.25rem; margin: 0; }
.ai-image-search-sub { color: var(--text-muted); font-size: .82rem; margin: 0 0 16px; }
.ai-image-search-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 16px; }
.ais-field { display: flex; flex-direction: column; gap: 6px; }
.ais-field label { font-size: .78rem; color: var(--text-secondary); }
.ais-field input { padding: 8px 10px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-tertiary); color: var(--text-primary); font-size: .84rem; }
.ais-field input:focus { outline: none; border-color: var(--accent-cyan); }
.ai-image-search-err { color: var(--accent-red); font-size: .84rem; margin-bottom: 12px; }
.ai-image-search-actions { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; gap: 10px; flex-wrap: wrap; }
.ais-count { font-size: .82rem; color: var(--text-muted); }
.ais-select-all { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius-md); border: 1px solid var(--accent-purple); background: rgba(139,92,246,.12); color: var(--accent-purple); font-size: .82rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.ais-select-all:hover { background: rgba(139,92,246,.22); }
.ais-select-all:disabled { opacity: .5; cursor: not-allowed; }
.ais-actions-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ai-image-search-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
/* v26101404：卡片外观完全保持原样（按用户要求回退 v26101403 视觉重构），仅按钮顺序调整——对勾最左、删除最右 */
.ai-image-search-card { position: relative; aspect-ratio: 4/3; border-radius: var(--radius-md); overflow: hidden; border: 3px solid var(--border-color); cursor: pointer; transition: var(--transition); }
.ai-image-search-card:hover { border-color: var(--accent-cyan); }
.ai-image-search-card.selected { border-color: var(--accent-purple); box-shadow: 0 0 0 4px rgba(139,92,246,.4); transform: translateY(-2px); }
.ai-image-search-card img { width: 100%; height: 100%; object-fit: cover; }
.ais-card-info { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(transparent, rgba(0,0,0,.75)); color: #fff; padding: 20px 8px 6px; font-size: .72rem; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.ais-card-page { color: #9ae6ff; text-decoration: none; white-space: nowrap; display: inline-flex; align-items: center; gap: 3px; }
.ais-card-page:hover { color: #fff; text-decoration: underline; }
/* 对勾：最左 */
.ais-card-check { position: absolute; top: 6px; left: 6px; width: 28px; height: 28px; border-radius: 50%; background: rgba(0,0,0,.45); color: #fff; font-size: 1.15rem; display: flex; align-items: center; justify-content: center; transition: var(--transition); }
.ai-image-search-card.selected .ais-card-check { background: var(--accent-purple); box-shadow: 0 2px 10px rgba(139,92,246,.65); color: #fff; }
/* 缩放/复制：紧随对勾 */
.ais-card-zoom { position: absolute; top: 6px; left: 40px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .8rem; transition: var(--transition); }
.ais-card-zoom:hover { background: var(--accent-cyan); }
.ais-card-copy { position: absolute; top: 6px; left: 74px; z-index: 3; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .8rem; transition: var(--transition); }
.ais-card-copy:hover { background: var(--accent-purple); }
/* 删除：最右 */
.ais-card-remove { position: absolute; top: 6px; right: 6px; z-index: 4; width: 26px; height: 26px; border-radius: 50%; border: none; background: rgba(0,0,0,.5); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: .85rem; transition: background .15s; }
.ais-card-remove:hover { background: #ef4444; }
/* AI 搜图放大预览 lightbox（v26101402：浅色化、去纯黑） */
.img-lightbox-backdrop { position: fixed; inset: 0; background: rgba(100,116,139,.38); -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); z-index: 2000; }
.img-lightbox { position: fixed; inset: 0; z-index: 2001; display: flex; align-items: center; justify-content: center; padding: 40px; }
.img-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: var(--radius-md); box-shadow: var(--shadow-lg); }
.img-lightbox-close { position: absolute; top: 18px; right: 22px; width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--bg-hover); color: var(--text-primary); font-size: 1.1rem; cursor: pointer; }
.img-lightbox-close:hover { background: var(--accent-red); color: #fff; }
/* v260903 → v26101403：历史图片灯箱 —— 浅色「有界弹窗」；放大预览区 + 箭头改独立 gutter（网格布局不再压图）
   v26101412：默认尺寸 +8% —— 宽 min(1320→1426px, 96→98vw)，高 96→98vh（视口物理上限，再高出屏）；
     另加右下角拖拽手柄（.ig-resize）可有限度拉大拉小
   v26101412b：修复存量布局 bug 三连（均为 .img-lightbox 属性泄漏——同类选择器、本规则未覆盖即继承）：
     ① align-items:center/justify-content:center 泄漏 → 列向 flex 把三块按内容宽度水平居中，
        ig-body 收缩到图片宽 → 翻页钮贴图片边缘而非弹窗两端、胶片条溢出屏外；
     ② .img-lightbox img 的 max-height:88vh/max-width:92vw 后代泄漏进 .ig-img（特异性压制）；
     ③ inset:0 的 right:0/bottom:0 泄漏 → top:50%+bottom:0+height:auto 把弹窗钉成 50vh 高，
        body 只填剩余空间、大图必然溢出被裁（本项为图片裁切的总根因）。
     显式覆盖：align-items/justify-content + right/bottom:auto；.ig-img 规则加 .img-gallery 前缀提特异性。 */
.img-gallery {
    position: fixed; top: 50%; left: 50%; right: auto; bottom: auto;
    transform: translate(-50%, -50%);
    z-index: 2001; width: min(1426px, 98vw); max-height: 98vh; padding: 0;
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; overflow: hidden;
    align-items: stretch; justify-content: flex-start;
}
/* v26101412：拖拽缩放手柄（弹窗右下角，双击恢复默认） */
.ig-resize {
    position: absolute; right: 0; bottom: 0; z-index: 6;
    width: 26px; height: 26px; cursor: nwse-resize; touch-action: none; opacity: .5;
    background: linear-gradient(135deg, transparent 50%, var(--text-muted) 50%);
    border-bottom-right-radius: var(--radius-lg);
}
.ig-resize:hover { opacity: 1; }
.img-gallery img { user-select: none; -webkit-user-drag: none; }
.ig-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0;
    padding: 8px 12px; border-bottom: 1px solid var(--border-light); background: var(--bg-card);
}
.ig-counter { font-size: .85rem; font-weight: 600; color: var(--text-secondary); }
.ig-tools { display: flex; align-items: center; gap: 6px; }
.ig-tools button {
    width: 34px; height: 34px; border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--bg-secondary); color: var(--text-secondary); font-size: .95rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; transition: var(--transition);
}
.ig-tools button:hover { background: var(--bg-hover); color: var(--accent-purple); border-color: var(--accent-purple); }
.ig-tools button.is-disabled { opacity: .4; pointer-events: none; }
.ig-tools .ig-close:hover { color: #fff; background: var(--accent-red); border-color: var(--accent-red); }
/* v26101413：grid(minmax(0,1fr) 行) 在自动高度容器里不按图片内容撑开（实测 body 仅 355px、
   802px 大图溢出被裁），改 flex 行向居中：body 高度=图片高度+padding，弹窗随之内容撑起至 98vh 上限。
   用户拖拽定高后 body 高度确定（flex:1 1 auto + min-height:0），图片由 JS 内联 max-height 钳位。 */
.ig-body {
    position: relative; flex: 1 1 auto; min-height: 0; padding: 14px;
    display: flex; align-items: center; justify-content: center; gap: 10px; overflow: hidden;
    background: #ffffff; cursor: zoom-in;
}
/* v26101405：预览图按原始尺寸等比完整显示，禁止被裁切/底部被挡
   v26101413：max-height:100% 在自动高度的 flex/grid 链里不解析（弹窗高度由内容撑起→百分比无参照），
     大图实测溢出预览区被 overflow:hidden 裁掉。改用视口 calc：98vh 减去弹窗 chrome
     （head 51 + film 73 + body 上下padding 28 ≈ 152，留 8px 余量取 160）。默认态保证完整显示；
     用户拖拽缩放时由 JS 按弹窗实际高度内联钳位（见 startGalleryBoxResize → galleryFitImgToBox）。
   ⚠️ 选择器必须带 .img-gallery 前缀：.img-lightbox img 是后代选择器（特异性 0,1,1），
     会压过裸 .ig-img（0,1,0）把 max-height:88vh/max-width:92vw 泄漏进来（实测 864px 大图被裁切的根因）。 */
.img-gallery .ig-img {
    justify-self: center; align-self: center;
    width: auto; height: auto; max-width: 100%; max-height: calc(98vh - 160px);
    object-fit: contain; border-radius: var(--radius-sm);
    transition: opacity .25s ease, transform .12s ease-out; will-change: transform;
}
.ig-img.is-zoom { cursor: grab; }
.ig-img.is-loading { opacity: 0; }
.ig-spinner {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    color: var(--text-muted); font-size: 1.8rem; z-index: 1;
}
/* v26101409：左右翻页钮绝对定位于弹窗左右两端、垂直居中——位置恒定，
   大图小图切换时按钮不动，不用移动鼠标找按钮 */
.ig-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3;
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--border-color);
    background: rgba(255,255,255,.92); color: var(--text-primary); font-size: 1.05rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center; box-shadow: var(--shadow-sm);
    transition: var(--transition);
}
.ig-nav.prev { left: 14px; }
.ig-nav.next { right: 14px; }
.ig-nav:hover { background: var(--accent-purple); color: #fff; border-color: var(--accent-purple); }
.ig-film {
    flex-shrink: 0; padding: 8px 10px; border-top: 1px solid var(--border-light);
    background: var(--bg-card); display: flex; justify-content: center;
}
.ig-film-inner { display: flex; gap: 8px; max-width: 100%; overflow-x: auto; padding: 2px; scrollbar-width: thin; }
.ig-film .gf {
    flex: 0 0 auto; width: 52px; height: 52px; border-radius: var(--radius-sm); overflow: hidden;
    border: 2px solid var(--border-color); cursor: pointer; background: var(--bg-tertiary);
    opacity: .6; transition: var(--transition);
}
.ig-film .gf:hover { opacity: .9; }
.ig-film .gf--active { opacity: 1; border-color: var(--accent-purple); box-shadow: 0 0 0 2px rgba(139,92,246,.25); }
.ig-film .gf img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* v26101406：胶片条缩略图加载失败时保留占位格（不隐藏），与历史马赛克口径一致 */
.ig-film .gf.gf--broken { position: relative; background: var(--bg-tertiary); }
.ig-film .gf.gf--broken::after {
    content: "\f03e"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: .9rem;
}

/* v26101404：预览失败占位（恢复原样式） */
.ais-card-broken {
    position: absolute; inset: 0; display: flex; flex-direction: column; gap: 6px;
    align-items: center; justify-content: center; background: var(--bg-tertiary);
    color: var(--text-muted); font-size: .78rem;
}
.ais-card-broken i { font-size: 1.6rem; opacity: .55; }
.ai-image-search-card.broken { border-style: dashed; border-color: var(--border-color); }

/* v26101401：历史图片卡片 —— 多图马赛克网格（自适应列数，类 Instagram/Google Photos） */
/* v26101408：固定 3 列 + 视图最多 9 张（3 行封顶）——40 张记录不再把卡片撑高、同排卡片不再被拉伸出空白 */
/* v26101412：视图最多 6 张（3 列 × 2 行）——用户要求 6 宫格替代 9 宫格 */
/* v26101503：容器统一 aspect-ratio 3/2 + 行高 repeat(2,1fr) —— 六宫格与大图两种模式缩略图区
   完全等高（用户截图反馈：6 张卡是矮宫格、1 张卡 4:3 大图更高，同一排卡片高低不齐） */
.history-image-thumbs {
    display: grid; grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(2, 1fr);
    gap: 5px; padding: 6px; background: var(--bg-tertiary);
    aspect-ratio: 3 / 2;
}
/* v26101503：解除方格约束（原 1/1 会压过 1fr 行高导致格子溢出），格子尺寸改由容器比例+行高决定，任何列宽下都保持正方 */
.history-image-thumbs .hit {
    position: relative; aspect-ratio: auto; overflow: hidden; border-radius: 6px;
    cursor: pointer; background: rgba(0,0,0,.06);
}
/* v26101409：统一 3×3 九宫格 —— 不足 9 张的记录用淡色空位补足，所有卡片缩略图区完全一致；
   撤销上轮单图 4:3 特殊样式（用户要求不管几张都统一） */
/* v26101412：<6 张走大图模式（用户要求图少时大图+角标更好看，见 hero-img）；≥6 张不足 6 格用淡色空位补足 */
.history-image-thumbs .hit--empty { background: rgba(0,0,0,.03); cursor: default; }
.history-image-thumbs .hit img {
    width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease;
}
.history-image-thumbs .hit:hover img { transform: scale(1.08); }
.history-image-thumbs .hit--more {
    display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5);
    color: #fff; font-weight: 700; font-size: .95rem;
}
/* v26101405：图加载失败时保留占位格（不消失），显示"图失效"图标，避免用户误以为只存了部分图 */
.history-image-thumbs .hit--broken, .history-image-thumbs .hero-img.hit--broken { background: var(--bg-tertiary); }
.history-image-thumbs .hit--broken::after, .history-image-thumbs .hero-img.hit--broken::after {
    content: "\f03e"; font-family: "Font Awesome 6 Free"; font-weight: 900;
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    color: var(--text-muted); font-size: 1.4rem;
}
/* v26101412：<6 张大图模式（大图 + 右下角 +N 角标） */
/* v26101503：大图高度由容器 3:2 决定（去掉 4:3），与六宫格模式卡片完全等高 */
.history-image-thumbs.hit-hero { display: block; }
.history-image-thumbs.hit-hero .hero-img {
    position: relative; aspect-ratio: auto; height: 100%; border-radius: 6px; overflow: hidden;
    cursor: pointer; background: rgba(0,0,0,.06);
}
.history-image-thumbs.hit-hero .hero-img img {
    width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .25s ease;
}
.history-image-thumbs.hit-hero .hero-img:hover img { transform: scale(1.04); }
.history-image-thumbs.hit-hero .hero-more {
    position: absolute; right: 8px; bottom: 8px; background: rgba(0,0,0,.65); color: #fff;
    font-size: .78rem; font-weight: 600; padding: 2px 10px; border-radius: var(--radius-sm);
}

.ai-image-search-empty { text-align: center; padding: 40px; color: var(--text-muted); font-size: .85rem; }
.ai-image-search-empty i { font-size: 2rem; margin-bottom: 10px; display: block; }
.history-docs-header { display: flex; align-items: center; justify-content: space-between; padding: 4px 4px 16px; border-bottom: 1px solid var(--border-light); margin-bottom: 16px; }
.history-docs-header .panel-title { margin: 0 0 4px; font-size: 1.15rem; }
.history-docs-header .panel-sub { margin: 0; color: var(--text-muted); font-size: .82rem; }
.history-docs-filters { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.hd-search { flex: 1; min-width: 220px; position: relative; }
.hd-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); }
.hd-search input { width: 100%; padding: 9px 12px 9px 36px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); font-size: .88rem; }
.history-docs-filters select { padding: 9px 12px; border-radius: var(--radius-md); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); font-size: .85rem; min-width: 110px; }
.history-docs-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 10px 14px; margin-bottom: 10px; background: linear-gradient(120deg, rgba(245,158,11,.08), rgba(6,182,212,.06)); border: 1px solid rgba(245,158,11,.25); border-radius: var(--radius-md); }
.hd-sel-count { color: #b45309; font-weight: 600; font-size: .85rem; }
.hd-action-sep { color: var(--text-muted); font-size: .82rem; margin-left: 4px; }
.profile-btn.outline { background: transparent; color: var(--accent-cyan); border: 1px solid var(--accent-cyan); }
.profile-btn.outline:hover { background: var(--accent-cyan); color: #fff; }
.profile-btn.danger { background: #ef4444; color: #fff; border-color: #ef4444; }
.profile-btn.danger:hover { background: #dc2626; }
.profile-btn.ghost { background: transparent; color: var(--text-secondary); border: 1px solid var(--border-color); }
.history-docs-err { color: #ef4444; padding: 10px 0; font-size: .85rem; }
.history-docs-deleting { display: flex; align-items: center; justify-content: center; min-height: 160px; margin-bottom: 12px; border-radius: var(--radius-md); background: rgba(255,255,255,.06); border: 1px dashed var(--border-color); }
.history-docs-deleting-inner { display: flex; align-items: center; gap: 10px; color: var(--accent-cyan); font-size: .95rem; font-weight: 500; }
.history-docs-deleting-inner i { font-size: 1.3rem; }
.history-docs-table-wrap { overflow-x: auto; border: 1px solid var(--border-color); border-radius: var(--radius-md); }
.history-docs-table { width: 100%; border-collapse: collapse; font-size: .83rem; }
.history-docs-table th, .history-docs-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border-light); white-space: nowrap; vertical-align: middle; }
.history-docs-table th { background: var(--bg-tertiary); color: var(--text-secondary); font-weight: 600; font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; }
.history-docs-table tbody tr:hover { background: var(--bg-hover); }
.history-docs-table tr.is-selected { background: rgba(245,158,11,.10); }
.history-docs-table .hd-col-check { width: 36px; text-align: center; }
.history-docs-table .hd-col-op { width: 110px; }
.history-docs-table .hd-title { max-width: 280px; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); font-weight: 500; }
.history-docs-table .hd-keywords { max-width: 180px; overflow: hidden; text-overflow: ellipsis; color: var(--text-muted); }
.history-docs-table .hd-time, .history-docs-table .hd-num { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.hd-tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: .72rem; background: var(--bg-tertiary); color: var(--text-secondary); }
.hd-tag-platform { background: rgba(6,182,212,.12); color: #0e7490; }
.hd-tag-style { background: rgba(139,92,246,.12); color: #6d28d9; }
.hd-tag-structure { background: rgba(16,185,129,.12); color: #047857; }
.hd-tag-structure.structure-plain { background: rgba(245,158,11,.12); color: #b45309; }
/* v260903：历史文案表「模型」列徽标 */
.hd-tag.model-deepseek { background: rgba(14,165,233,.12); color: #0ea5e9; }
.hd-tag.model-kimi { background: rgba(168,85,247,.12); color: #a855f7; }
.hd-tag.model-other { background: rgba(148,163,184,.12); color: #64748b; }
.hd-tag-muted { color: var(--text-muted); font-size: .72rem; }
html[data-theme="dark"] .hd-tag.model-deepseek { color: #38bdf8; }
html[data-theme="dark"] .hd-tag.model-kimi { color: #c084fc; }
html[data-theme="dark"] .hd-tag.model-other { color: #94a3b8; }
html[data-theme="dark"] .hd-tag-platform { color: #7dd3fc; }
html[data-theme="dark"] .hd-tag-style { color: #c4b5fd; }
html[data-theme="dark"] .hd-tag-structure { color: #34d399; }
html[data-theme="dark"] .hd-tag-structure.structure-plain { color: #fcd34d; }
.hd-icon-btn { width: 28px; height: 28px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: .82rem; margin-right: 4px; transition: var(--transition); }
.hd-icon-btn:hover { color: var(--accent-cyan); border-color: var(--accent-cyan); }
.hd-icon-btn.hd-icon-danger:hover { color: #ef4444; border-color: #ef4444; }
.history-docs-empty { text-align: center; padding: 48px 0; color: var(--text-muted); }
.history-docs-empty i { font-size: 2.4rem; display: block; margin-bottom: 10px; }
/* v260904：历史图文加载中转圈占位，避免重新加载时下方大片空白无反馈 */
.history-docs-loading { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 64px 0; color: var(--text-muted); font-size: 15px; }
.history-docs-loading .fa-spinner { font-size: 34px; color: var(--accent, #4f7cff); }
.history-docs-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 14px 12px; border-top: 1px solid var(--border-light); background: var(--bg-tertiary); }
.doc-preview-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; }
.doc-preview-modal { position: fixed; top: calc(var(--topbar-height) + 20px); left: 50%; transform: translateX(-50%); width: 860px; max-width: calc(100vw - 40px); max-height: calc(100vh - var(--topbar-height) - 40px); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(0,0,0,.28); z-index: 51; display: flex; flex-direction: column; overflow: hidden; }
.doc-preview-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-light); flex-shrink: 0; background: var(--bg-card); position: sticky; top: 0; z-index: 10; min-height: 56px; }
.doc-preview-head h3 { margin: 0; font-size: 1.2rem; line-height: 1.5; min-width: 0; flex: 1 1 auto; word-break: break-word; overflow-wrap: anywhere; color: var(--text-primary); font-weight: 600; }
.doc-preview-head h3:empty::before { content: '（未命名文案）'; color: var(--text-muted); font-weight: 400; }
.doc-preview-head-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.doc-preview-img-btn { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-primary); font-size: .82rem; cursor: pointer; }
.doc-preview-img-btn:hover { background: var(--accent-cyan); color: #fff; border-color: var(--accent-cyan); }
.doc-preview-close { width: 32px; height: 32px; flex-shrink: 0; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.doc-preview-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.doc-preview-meta { display: flex; flex-wrap: wrap; gap: 12px 18px; padding: 12px 20px; border-bottom: 1px solid var(--border-light); background: var(--bg-tertiary); color: var(--text-secondary); font-size: .8rem; flex-shrink: 0; }
.doc-preview-meta i { color: var(--accent-cyan); }
.doc-preview-body { flex: 1 1 auto; overflow-y: auto; padding: 20px; min-height: 0; }
.doc-preview-body pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: .92rem; line-height: 1.7; color: var(--text-primary); margin: 0; }
.doc-preview-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-light); }

/* 历史文案邮件发送弹窗 */
.email-modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 52; }
.email-modal { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 560px; max-width: calc(100vw - 40px); max-height: calc(100vh - 60px); background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: 0 24px 80px rgba(0,0,0,.28); z-index: 53; display: flex; flex-direction: column; }
.email-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border-light); }
.email-modal-head h4 { margin: 0; display: flex; align-items: center; gap: 8px; color: var(--accent-purple); font-size: 1.05rem; }
.email-modal-close { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--border-color); background: var(--bg-tertiary); color: var(--text-secondary); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.email-modal-close:hover { background: var(--bg-hover); color: var(--text-primary); }
.email-modal-body { flex: 1 1 auto; overflow-y: auto; padding: 20px; display: grid; gap: 18px; }
.email-field label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: .85rem; font-weight: 500; }
.email-recipients { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-tertiary); min-height: 44px; }
.email-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 8px; border-radius: var(--radius-sm); background: rgba(6,182,212,.12); color: #0e7490; font-size: .82rem; }
.email-chip button { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; border: none; background: transparent; color: inherit; cursor: pointer; border-radius: 3px; }
.email-chip button:hover { background: rgba(0,0,0,.08); }
.email-input { flex: 1; min-width: 160px; border: none; background: transparent; color: var(--text-primary); font-size: .88rem; outline: none; }
.email-docs label { display: block; margin-bottom: 8px; color: var(--text-secondary); font-size: .85rem; font-weight: 500; }
.email-docs ul { margin: 0; padding-left: 18px; color: var(--text-primary); font-size: .86rem; max-height: 180px; overflow-y: auto; }
.email-docs li { margin-bottom: 6px; line-height: 1.4; }
.email-docs li i { color: var(--accent-cyan); margin-right: 6px; }
.email-modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border-light); }
@keyframes shakeModal {
    0%, 100% { transform: translate(-50%, -50%) translateX(0); }
    20% { transform: translate(-50%, -50%) translateX(-8px); }
    40% { transform: translate(-50%, -50%) translateX(8px); }
    60% { transform: translate(-50%, -50%) translateX(-5px); }
    80% { transform: translate(-50%, -50%) translateX(5px); }
}
.email-modal.shake { animation: shakeModal .4s ease-in-out; }

/* 管理员账号弹窗：独立输入框需要可见边框与背景 */
.admin-account-modal .email-input {
    width: 100%;
    display: block;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: .9rem;
    line-height: 1.4;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}
.admin-account-modal .email-input:focus {
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(6,182,212,.12);
}
.admin-account-modal .email-input:disabled {
    background: var(--bg-hover);
    color: var(--text-muted);
    cursor: not-allowed;
}
.admin-account-modal .admin-role-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
    color: var(--text-primary);
    font-size: .9rem;
}

/* 个人中心邮件发送记录 */
.profile-email-card { grid-column: span 2; }
@media (max-width: 620px) { .profile-email-card { grid-column: 1 / -1; } }
.profile-email-empty { color: var(--text-muted); font-size: .86rem; padding: 8px 0; }
.profile-email-list { list-style: none; margin: 0; padding: 0; max-height: 320px; overflow-y: auto; }
/* 邮件模块发送记录：落地窗式撑满剩余高度 */
.email-subpage .profile-email-card {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}
.email-subpage .profile-email-list {
    flex: 1;
    min-height: 0;
    max-height: none;
}
.email-subpage .email-pager { flex-shrink: 0; }
.profile-email-list li { padding: 12px; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-tertiary); margin-bottom: 10px; }
.profile-email-list li:last-child { margin-bottom: 0; }
.profile-email-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; font-size: .8rem; flex-wrap: wrap; }
.profile-email-time { color: var(--text-muted); }
.profile-email-wc { color: var(--text-secondary); font-weight: 600; }
.profile-email-status { color: var(--accent-cyan); font-weight: 600; margin-left: auto; }
.profile-email-del { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.profile-email-del:hover { color: #ef4444; border-color: #ef4444; }
.profile-email-recipients, .profile-email-docs { font-size: .82rem; color: var(--text-primary); line-height: 1.4; margin-top: 4px; }
.profile-email-recipients strong, .profile-email-docs strong { color: var(--text-secondary); font-weight: 500; }

.hd-title a { color: inherit; text-decoration: none; cursor: pointer; }
.hd-title a:hover { color: var(--accent-cyan); text-decoration: underline; }

/* ============ 历史文案表格：除标题列外均居中 ============ */
.history-docs-table th { text-align: center; }
.history-docs-table td { text-align: center; vertical-align: middle; }
.history-docs-table td.hd-title { text-align: left; }
.history-docs-table td.hd-keywords { text-align: left; }

/* ============ 来源类型标签（筛选源 / 主题源）============ */
.src-kind { display: inline-block; flex: 0 0 auto; font-size: .62rem; font-weight: 700; padding: 1px 7px; border-radius: 999px; margin-right: 8px; line-height: 1.6; }
.src-kind.kind-data { background: rgba(6,182,212,.15); color: #0e7490; }
.src-kind.kind-theme { background: rgba(139,92,246,.15); color: #6d28d9; }
.src-kind.kind-other { background: rgba(148,163,184,.18); color: #64748b; }
.bar-row { align-items: center; }

/* ============ 热点看板导出工具条 ============ */
.tech-export-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0 6px; }
.tech-export-bar select { padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-primary); font-size: .82rem; }
.tech-export-label { font-size: .84rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.tech-export-hint { font-size: .72rem; color: var(--text-muted); margin-left: auto; }
.tech-export-count { font-size: .82rem; color: var(--accent, #2f6bff); font-weight: 600; background: var(--accent-soft, rgba(47,107,255,.1)); padding: 5px 10px; border-radius: var(--radius-sm); }

/* ============ 热点看板批量收藏工具条 ============ */
.tech-batch-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0 12px; border-bottom: 1px solid var(--border-light); margin-bottom: 6px; }
.tech-batch-label { font-size: .84rem; color: var(--text-secondary); display: inline-flex; align-items: center; gap: 6px; }
.tech-batch-bar .profile-btn { font-size: .78rem; padding: 5px 10px; }

/* ============ 热点看板分页 ============ */
.tech-pagination { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; padding: 14px 12px; border-top: 1px solid var(--border-light); background: var(--bg-tertiary); }
.tech-pagination .page-btn { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary); font-size: .78rem; cursor: pointer; transition: var(--transition); }
.tech-pagination .page-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent-cyan); }
.tech-pagination .page-btn:disabled { opacity: .45; cursor: not-allowed; }
.tech-pagination .page-btn.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.tech-pagination .page-info { margin-left: 10px; color: var(--text-muted); font-size: .76rem; }
.tech-page-info { margin-right: 8px; color: var(--text-muted); font-size: .76rem; }
.tech-page-summary { padding: 14px 12px; border-top: 1px solid var(--border-light); background: var(--bg-tertiary); color: var(--text-muted); font-size: .76rem; text-align: center; }
.history-docs-pagination .page-btn { padding: 6px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary); font-size: .78rem; cursor: pointer; transition: var(--transition); }
.history-docs-pagination .page-btn:hover:not(:disabled) { background: var(--bg-hover); color: var(--text-primary); border-color: var(--accent-cyan); }
.history-docs-pagination .page-btn:disabled { opacity: .45; cursor: not-allowed; }
.history-docs-pagination .page-btn.active { background: var(--accent-blue); color: #fff; border-color: var(--accent-blue); }
.history-docs-pagination .page-info { margin-left: 10px; color: var(--text-muted); font-size: .76rem; }
html[data-theme="light"] .profile-warn { background: rgba(245,158,11,.08); }

/* ============ v260907：滑块安全验证弹窗 ============ */
.slider-captcha-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 10000;
    display: flex; align-items: center; justify-content: center;
    animation: sliderFadeIn .2s ease;
}
@keyframes sliderFadeIn { from { opacity: 0; } to { opacity: 1; } }
.slider-captcha-modal {
    background: var(--bg-card); border-radius: var(--radius-lg); padding: 32px 28px 24px;
    width: min(380px, 92%); box-shadow: var(--shadow-lg); position: relative;
    text-align: center;
}
.slider-captcha-close {
    position: absolute; top: 12px; right: 12px; background: none; border: none;
    color: var(--text-muted); cursor: pointer; font-size: 1.1rem; padding: 4px 8px;
}
.slider-captcha-close:hover { color: var(--text-primary); }
.slider-captcha-icon {
    font-size: 2.6rem; color: var(--accent-blue); margin-bottom: 10px;
}
.slider-captcha-modal h3 { margin: 0 0 6px; font-size: 1.15rem; color: var(--text-primary); }
.slider-captcha-hint { font-size: .84rem; color: var(--text-secondary); margin: 0 0 18px; }
.slider-track {
    position: relative; height: 44px; background: var(--bg-secondary);
    border-radius: 22px; border: 1px solid var(--border-color); margin: 0 0 12px;
    user-select: none; overflow: hidden;
}
.slider-fill {
    position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, var(--accent-blue), var(--accent-cyan));
    opacity: .18; transition: width .1s linear;
    border-radius: 22px 0 0 22px;
}
.slider-text {
    position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
    font-size: .86rem; color: var(--text-muted); pointer-events: none;
    letter-spacing: .5px;
}
.slider-text.success { color: var(--accent-green); font-weight: 600; }
.slider-text.fail { color: #ef4444; }
.slider-handle {
    position: absolute; top: 4px; left: 0; width: 36px; height: 36px;
    background: var(--bg-card); border: 1px solid var(--accent-blue);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: var(--accent-blue); cursor: grab; box-shadow: 0 2px 8px rgba(34,211,238,.25);
    transition: box-shadow .15s, transform .05s;
    touch-action: none;
}
.slider-handle:hover { box-shadow: 0 4px 12px rgba(34,211,238,.4); }
.slider-handle:active { cursor: grabbing; transform: scale(1.05); }
.slider-handle.completed { background: var(--accent-green); border-color: var(--accent-green); color: #fff; }
.slider-captcha-foot { font-size: .72rem; color: var(--text-muted); margin: 4px 0 0; }

/* ============ v260907：正文插入图片（本地/系统生成） ============ */
.img-picker-modal { width: min(1100px, 94vw); max-width: 94vw; }
.img-picker-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); max-height: 68vh; }
.img-picker-tabs { display: flex; gap: 8px; margin: 10px 0 2px; }
.img-picker-tab { padding: 5px 14px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary); font-size: .8rem; cursor: pointer; }
.img-picker-tab.active { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.img-picker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; margin: 14px 0 6px; max-height: 52vh; overflow-y: auto; }
.img-picker-item {
    border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden;
    cursor: pointer; background: var(--bg-secondary); transition: var(--transition);
    display: flex; flex-direction: column;
}
.img-picker-item:hover { border-color: var(--accent-cyan); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0,0,0,.12); }
.img-picker-item img { width: 100%; height: 110px; object-fit: cover; display: block; background: var(--bg-tertiary); }
.img-picker-label { font-size: .74rem; color: var(--text-secondary); padding: 6px 8px; text-align: center; }
.ai-output-image img { max-width: 100%; border-radius: var(--radius-md); }
.img-picker-bad { position: absolute; top: 6px; left: 6px; background: rgba(239,68,68,.9); color: #fff; font-size: .66rem; padding: 2px 6px; border-radius: 4px; }
.img-picker-item { position: relative; }
.img-picker-item { position: relative; }
.img-picker-del {
    position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%;
    background: rgba(239,68,68,.92); color: #fff; border: none; cursor: pointer; font-size: .78rem;
    display: flex; align-items: center; justify-content: center;
}
.img-picker-del:hover { background: #dc2626; }
.img-picker-del:disabled { opacity: .6; cursor: wait; }

/* ============ v260914：正文配图编辑（旋转/裁剪/替换） ============ */
.img-edit-modal { width: min(1000px, 94vw); max-width: 94vw; }
.img-edit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; max-height: 66vh; overflow-y: auto; margin: 12px 0 4px; padding: 2px; }
.img-edit-card { border: 1px solid var(--border-color); border-radius: var(--radius-md); overflow: hidden; background: var(--bg-secondary); display: flex; flex-direction: column; }
.img-edit-thumb { position: relative; background: var(--bg-tertiary); height: 130px; display: flex; align-items: center; justify-content: center; }
.img-edit-thumb img { max-width: 100%; max-height: 130px; object-fit: contain; display: block; }
.img-edit-loading { position: absolute; inset: 0; background: rgba(0,0,0,.55); color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; font-size: .78rem; }
.img-edit-meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 8px; font-size: .74rem; color: var(--text-secondary); border-bottom: 1px solid var(--border-light); }
.img-edit-alt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.img-edit-idx { color: var(--text-muted); flex: 0 0 auto; }
.img-edit-ops { display: flex; flex-wrap: wrap; gap: 5px; padding: 8px; }
.img-op-btn { flex: 0 0 auto; padding: 5px 8px; border-radius: var(--radius-sm); border: 1px solid var(--border-color); background: var(--bg-card); color: var(--text-secondary); font-size: .74rem; cursor: pointer; transition: var(--transition); }
.img-op-btn:hover:not(:disabled) { border-color: var(--accent-cyan); color: var(--text-primary); }
.img-op-btn:disabled { opacity: .45; cursor: not-allowed; }
.img-op-btn.wide { flex: 1 1 auto; }

.img-crop-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.62); z-index: 10050; display: flex; align-items: center; justify-content: center; }
.img-crop-modal { background: var(--bg-card); border-radius: var(--radius-lg); padding: 20px 20px 16px; width: min(860px, 94vw); position: relative; box-shadow: var(--shadow-lg); }
.img-crop-modal h3 { margin: 0 0 10px; font-size: 1.05rem; color: var(--text-primary); }
.img-crop-modal h3 small { color: var(--text-muted); font-weight: 400; font-size: .76rem; margin-left: 8px; }
.img-crop-ratios { display: flex; gap: 6px; margin-bottom: 10px; }
.img-crop-ratio { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary); font-size: .78rem; cursor: pointer; }
.img-crop-ratio.active { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.img-crop-stage { position: relative; width: 100%; max-height: 58vh; background: #0b0f16; border-radius: var(--radius-md); overflow: hidden; display: flex; align-items: center; justify-content: center; user-select: none; }
.img-crop-stage img { max-width: 100%; max-height: 58vh; display: block; pointer-events: none; }
.img-crop-box { position: absolute; border: 1px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; touch-action: none; }
.img-crop-size { position: absolute; bottom: -22px; left: 0; background: rgba(0,0,0,.7); color: #fff; font-size: .68rem; padding: 2px 6px; border-radius: 4px; white-space: nowrap; }
.img-crop-h { position: absolute; width: 12px; height: 12px; background: #fff; border-radius: 2px; }
.img-crop-h.nw { left: -6px; top: -6px; cursor: nwse-resize; }
.img-crop-h.ne { right: -6px; top: -6px; cursor: nesw-resize; }
.img-crop-h.sw { left: -6px; bottom: -6px; cursor: nesw-resize; }
.img-crop-h.se { right: -6px; bottom: -6px; cursor: nwse-resize; }
/* v260914c：四边中点手柄（上/下为横向长条，左/右为纵向长条，便于点中） */
.img-crop-h.n { left: 50%; top: -6px; margin-left: -14px; width: 28px; height: 12px; border-radius: 3px; cursor: ns-resize; }
.img-crop-h.s { left: 50%; bottom: -6px; margin-left: -14px; width: 28px; height: 12px; border-radius: 3px; cursor: ns-resize; }
.img-crop-h.w { top: 50%; left: -6px; margin-top: -14px; width: 12px; height: 28px; border-radius: 3px; cursor: ew-resize; }
.img-crop-h.e { top: 50%; right: -6px; margin-top: -14px; width: 12px; height: 28px; border-radius: 3px; cursor: ew-resize; }
.img-crop-hint { position: absolute; color: #fff; font-size: .84rem; display: flex; align-items: center; gap: 8px; }
.img-crop-actions { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.img-crop-tip { font-size: .74rem; color: var(--text-muted); margin-left: auto; }
@media (max-width: 880px) { .img-crop-tip { display: none; } }

/* ============ v260914b：预览区点选图片（Word 式） ============ */
.ai-edit-img-hint { font-size: .72rem; color: var(--text-muted); font-weight: 400; }
.ai-edit-img-wrap { position: relative; display: inline-block; max-width: 100%; margin: 6px 0; border: 2px solid transparent; border-radius: 8px; cursor: pointer; transition: var(--transition); }
.ai-edit-img-wrap:hover { border-color: rgba(34,211,238,.5); }
.ai-edit-img-wrap.selected { border-color: var(--accent-cyan); box-shadow: 0 0 0 3px rgba(34,211,238,.18); }
.ai-edit-img-wrap img { display: block; max-width: 100%; border-radius: 6px; }
.ai-edit-img-bar {
    position: absolute; top: 6px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 6px; padding: 5px 8px;
    background: rgba(12,20,32,.94); border: 1px solid var(--accent-cyan);
    border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.35); z-index: 5; white-space: nowrap;
}
.img-bar-btn {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px;
    border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-card);
    color: var(--text-secondary); font-size: .74rem; cursor: pointer; transition: var(--transition);
}
.img-bar-btn:hover:not(:disabled) { border-color: var(--accent-cyan); color: var(--text-primary); }
.img-bar-btn:disabled { opacity: .5; cursor: not-allowed; }
.img-bar-btn.danger { color: #ef4444; border-color: rgba(239,68,68,.5); }
.img-bar-btn.danger:hover:not(:disabled) { background: rgba(239,68,68,.15); color: #ef4444; }
.img-bar-busy { font-size: .72rem; color: var(--accent-cyan); display: inline-flex; align-items: center; gap: 5px; }

/* v260914b：图片编辑器 —— 旋转行 */
.img-crop-rotates { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.img-crop-rlabel { font-size: .78rem; color: var(--text-muted); margin-right: 2px; }
.img-crop-rbtn {
    display: inline-flex; align-items: center; gap: 5px; padding: 5px 12px;
    border-radius: var(--radius-sm); border: 1px solid var(--border-color);
    background: var(--bg-secondary); color: var(--text-secondary); font-size: .78rem; cursor: pointer;
    transition: var(--transition);
}
.img-crop-rbtn:hover:not(:disabled) { border-color: var(--accent-cyan); color: var(--text-primary); }
.img-crop-rbtn:disabled { opacity: .45; cursor: not-allowed; }
.img-crop-rhint { font-size: .72rem; color: var(--text-muted); margin-left: auto; }
@media (max-width: 880px) { .img-crop-rhint { display: none; } }

/* ============ v260916：回收站 ============ */
/* v260923：补齐 v260916 漏定义的页头样式。
   原问题：index.html 里用了 .hd-header / .hd-title / .hd-sub 三个类，但 style.css 里**一个都没有定义**
   （全站只有 .history-docs-table .hd-title 这个同名不同义的规则），于是 .hd-title 退化成普通 block：
   <i> 是 inline（占一行）、<h2> 是 block（另起一行）→ 图标和标题被拆成上下两行。
   这里按站内既有版式（参照 .history-docs-header）补齐，并全部用 .trash-panel 作用域限定，不影响其他面板。
   注意：别把这里的 .hd-title 与 .history-docs-table .hd-title（表格列省略号）混为一谈。 */
.trash-panel .hd-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 4px 4px 16px; border-bottom: 1px solid var(--border-light); margin-bottom: 14px; }
.trash-panel .hd-title { display: flex; align-items: center; flex-wrap: wrap; gap: 0 10px; min-width: 0; }
.trash-panel .hd-title > i { font-size: 1.15rem; color: var(--accent-purple); line-height: 1; }
.trash-panel .hd-title > h2 { margin: 0; font-size: 1.15rem; font-weight: 700; line-height: 1.3; color: var(--text-primary); }
.trash-panel .hd-sub { flex: 0 0 100%; margin: 4px 0 0; font-size: .82rem; color: var(--text-muted); }
.trash-panel .hd-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
/* 窄屏：图标+标题仍保持一行，操作按钮换到下一行 */
@media (max-width: 560px) { .trash-panel .hd-actions { width: 100%; } }

.trash-tabs { display: flex; align-items: center; gap: 8px; margin: 14px 0 10px; flex-wrap: wrap; }
.trash-tab { padding: 6px 16px; border-radius: 999px; border: 1px solid var(--border-color); background: var(--bg-secondary); color: var(--text-secondary); font-size: .84rem; cursor: pointer; transition: var(--transition); }
.trash-tab:hover { border-color: var(--accent-cyan); }
.trash-tab.active { background: var(--accent-blue); border-color: var(--accent-blue); color: #fff; }
.trash-hint { font-size: .76rem; color: var(--text-muted); margin-left: auto; }
.trash-err { color: #ef4444; font-size: .84rem; margin: 8px 0; }
.trash-empty { color: var(--text-muted); font-size: .88rem; padding: 34px 0; text-align: center; }
.trash-list { display: flex; flex-direction: column; gap: 10px; }
.trash-item { border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-card); padding: 12px 14px; }
.trash-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.trash-item-main { flex: 1 1 260px; min-width: 0; }
.trash-item-title { font-size: .92rem; color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.trash-item-meta { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 5px; font-size: .74rem; color: var(--text-muted); }
/* v26101901：回收站类型徽标（AI搜图 / AI生成插图）——同名条目靠它+生成时间区分 */
.trash-kind { display: inline-block; padding: 0 7px; border-radius: 999px; font-size: .68rem; line-height: 18px; background: rgba(99,102,241,.12); color: var(--accent, #6366f1); border: 1px solid rgba(99,102,241,.25); }
.trash-item-acts { display: flex; gap: 8px; flex: 0 0 auto; }
.trash-imgs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border-light); }
.trash-img { position: relative; width: 96px; height: 74px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border-color); background: var(--bg-tertiary); }
.trash-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.trash-img-acts { position: absolute; inset: auto 0 0 0; display: flex; justify-content: flex-end; gap: 4px; padding: 3px; background: linear-gradient(transparent, rgba(0,0,0,.6)); }
.trash-img-acts button { width: 22px; height: 22px; border-radius: 50%; border: none; background: rgba(255,255,255,.9); color: #1f2937; font-size: .66rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.trash-img-acts button.danger { background: rgba(239,68,68,.95); color: #fff; }
.trash-img-acts button:disabled { opacity: .5; cursor: not-allowed; }

/* ============ v260916：编辑未保存就导出 弹窗 ============ */
.unsaved-overlay { z-index: 10200; }
.unsaved-modal { max-width: 460px; }
.unsaved-modal h3 { display: flex; align-items: center; gap: 8px; color: #f59e0b; }
.unsaved-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.unsaved-acts .profile-btn { flex: 1 1 auto; justify-content: center; }
.unsaved-tip { font-size: .74rem; color: var(--text-muted); margin: 10px 0 0; }

/* v260917：回收站保留期提示 + 到期倒计时 */
.trash-retention { font-size: .76rem; color: var(--text-muted); padding-left: 10px; border-left: 1px solid var(--border-color); }
/* v26091702：到期提醒色阶 —— 剩 >3 天 绿（充裕）/ ≤3 天 橙（注意）/ ≤1 天 红（紧急） */
.trash-expire { color: var(--text-muted); font-variant-numeric: tabular-nums; }
.trash-expire.level-safe { color: var(--accent-green); }
.trash-expire.level-warn { color: var(--accent-orange); font-weight: 500; }
.trash-expire.level-urgent { color: var(--accent-red); font-weight: 600; background: rgba(239,68,68,.12); border-radius: 4px; padding: 1px 6px; }
/* 兼容旧类名 */
.trash-expire.urgent { color: var(--accent-red); font-weight: 600; }

/* 色阶图例 */
.trash-legend { display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; color: var(--text-muted); padding-left: 10px; border-left: 1px solid var(--border-color); }
.trash-legend .trash-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; vertical-align: middle; }
.trash-legend .trash-dot.safe { background: var(--accent-green); }
.trash-legend .trash-dot.warn { background: var(--accent-orange); }
.trash-legend .trash-dot.urgent { background: var(--accent-red); }

/* ============ v260918：视频 / 数字人 —— 功能框架占位样式 ============ */
.fw-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 2px; }
.fw-badge {
    display: inline-flex; align-items: center; gap: 6px; font-size: .73rem; font-weight: 600;
    padding: 5px 12px; border-radius: 999px; white-space: nowrap;
    border: 1px dashed var(--accent-orange); color: var(--accent-orange); background: rgba(245, 158, 11, .10);
}
.fw-notice {
    display: flex; gap: 11px; align-items: flex-start;
    font-size: .84rem; line-height: 1.75; color: var(--text-secondary);
    background: var(--bg-secondary); border: 1px solid var(--border-color);
    border-left: 3px solid var(--accent-blue); border-radius: 8px;
    padding: 13px 16px; margin: 16px 0 20px;
}
.fw-notice > i { color: var(--accent-blue); margin-top: 3px; flex: 0 0 auto; }
.fw-notice b { color: var(--text-primary); }

.fw-card {
    background: var(--bg-card); border: 1px solid var(--border-color);
    border-radius: 10px; padding: 18px 20px; margin-bottom: 16px;
}
.fw-card-decide { border-left: 3px solid var(--accent-purple); }
.fw-card-risk { border-left: 3px solid var(--accent-orange); }
.fw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-bottom: 16px; }
.fw-grid .fw-card { margin-bottom: 0; }

.fw-stages { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.fw-stage {
    display: flex; gap: 14px; padding: 13px 15px;
    background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 9px;
}
.fw-stage-idx {
    flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
    background: var(--accent-blue); color: #fff; font-size: .78rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.fw-stage-body { flex: 1 1 auto; min-width: 0; }
.fw-stage-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fw-stage-name { font-size: .9rem; font-weight: 650; color: var(--text-primary); }
.fw-stage-name i { color: var(--accent-cyan); margin-right: 4px; }
.fw-stage-plan { font-size: .84rem; color: var(--text-secondary); margin: 6px 0 4px; line-height: 1.7; }
.fw-stage-reuse { font-size: .78rem; color: var(--text-muted); margin: 0; }
.fw-stage-reuse i { color: var(--accent-green); margin-right: 4px; }

.fw-tag { font-size: .7rem; font-weight: 650; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.fw-tag.ok { background: rgba(16, 185, 129, .16); color: var(--accent-green); }
.fw-tag.info { background: rgba(59, 130, 246, .16); color: var(--accent-blue); }
.fw-tag.warn { background: rgba(245, 158, 11, .18); color: var(--accent-orange); }
.fw-tag.danger { background: rgba(239, 68, 68, .16); color: var(--accent-red); }

.fw-list { list-style: none; padding: 0; margin: 10px 0 0; }
.fw-list li {
    display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
    padding: 8px 0; border-bottom: 1px dashed var(--border-color); font-size: .84rem;
}
.fw-list li:last-child { border-bottom: none; }
.fw-list-k { flex: 0 0 104px; color: var(--text-muted); font-size: .8rem; }
.fw-list-v { flex: 1 1 180px; color: var(--text-primary); min-width: 0; }
.fw-list-note { font-size: .76rem; color: var(--text-muted); }

.fw-decide { margin: 8px 0 0; padding-left: 22px; font-size: .86rem; color: var(--text-secondary); line-height: 1.8; }
.fw-decide li { margin: 6px 0; }
.fw-note { font-size: .86rem; color: var(--text-secondary); margin: 6px 0 0; line-height: 1.8; }
.fw-note b { color: var(--text-primary); }
.fw-note + .fw-note { margin-top: 10px; }

.fw-mini { width: 100%; border-collapse: collapse; font-size: .8rem; margin-top: 10px; }
.fw-mini th, .fw-mini td { border: 1px solid var(--border-color); padding: 8px 11px; text-align: left; color: var(--text-secondary); }
.fw-mini th { background: var(--bg-secondary); color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.fw-mini b { color: var(--text-primary); }

.fw-pre {
    background: var(--bg-secondary); border: 1px solid var(--border-color); border-radius: 8px;
    padding: 13px 16px; margin: 10px 0 0; overflow-x: auto; white-space: pre;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
    font-size: .78rem; line-height: 1.75; color: var(--text-secondary);
}

/* ============================================================================
   v26091802：邮件投递链路图（Mail Flow）+ 常用联系人管理
   设计意图：一张图讲清「谁 → 邮件 → 谁」。
   - 设置页用大图（长期概览：我的发件身份 → 默认收件人）
   - 发送弹窗用紧凑图（本次概览：发件人 → 待发文案 → 实际收件人）
   全部使用语义变量，深浅主题自动翻转；窄屏自动竖排。
   ========================================================================== */

/* ---------------- 链路图容器 ---------------- */
.mf {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 14px;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    background:
        radial-gradient(130% 150% at 0% 0%, rgba(139, 92, 246, .10), transparent 58%),
        radial-gradient(130% 150% at 100% 0%, rgba(6, 182, 212, .10), transparent 58%),
        var(--bg-tertiary);
    overflow: hidden;
}
.mf--sm { padding: 10px; }

/* ---------------- 节点（发件人 / 收件人） ---------------- */
.mf-node {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 1 auto;
    min-width: 0;
    padding: 9px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}
.mf--sm .mf-node { padding: 7px 10px; gap: 8px; }

.mf-ico {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .92rem;
    background: rgba(139, 92, 246, .14);
    color: var(--accent-purple);
}
.mf--sm .mf-ico { width: 28px; height: 28px; border-radius: 8px; font-size: .78rem; }
.mf-node--to .mf-ico { background: rgba(6, 182, 212, .14); color: var(--accent-cyan); }
.mf-node--sys .mf-ico { background: rgba(245, 158, 11, .16); color: var(--accent-orange); }

.mf-txt { min-width: 0; }
.mf-role {
    font-size: .66rem;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: var(--text-muted);
    line-height: 1.4;
}
.mf-name {
    font-size: .87rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf--sm .mf-name { font-size: .82rem; }
.mf-mail {
    font-size: .75rem;
    line-height: 1.45;
    color: var(--text-secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf--sm .mf-mail { font-size: .72rem; }
.mf-more {
    display: inline-block;
    margin-left: 5px;
    padding: 0 5px;
    border-radius: 20px;
    font-size: .68rem;
    font-family: inherit;
    background: rgba(6, 182, 212, .16);
    color: var(--accent-cyan);
}
/* v260924：收件人节点改为「列出全部收件人」。
   原实现只渲染 effectiveRecipientList[0] / emailRecipients[0] 外加一个「+N」角标，
   一封邮件发给多人时，图里只能看到 1 个人 —— 而这张图的定位是「下一封邮件实际的样子」，
   看漏收件人是会真出事的（发错人 / 以为只发了一个）。所以逐条列出，宁可变高也不藏。
   .mf-more（上面那条）保留但已不再被引用，方便回滚。 */
.mf-rcpts { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mf-rcpts--scroll { max-height: 6.2rem; overflow-y: auto; padding-right: 4px; }
.mf-rcpt { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mf-rcpt-name {
    flex: 0 1 auto;
    min-width: 0;
    font-size: .87rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf-rcpt-mail {
    flex: 0 1 auto;
    min-width: 0;
    font-size: .75rem;
    line-height: 1.45;
    color: var(--text-secondary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.mf--sm .mf-rcpt-name { font-size: .82rem; }
.mf--sm .mf-rcpt-mail { font-size: .72rem; }
.mf-rcpts-more { margin-top: 4px; font-size: .68rem; color: var(--accent-cyan); }

/* ---------------- 箭头段（线 + 中间的信封 + 箭头头） ---------------- */
.mf-link {
    position: relative;
    flex: 1 1 54px;
    min-width: 54px;
    align-self: center;
    height: 34px;
}
.mf--sm .mf-link { flex-basis: 44px; min-width: 44px; height: 30px; }

/* 主干线：紫 → 青渐变 */
.mf-link::before {
    content: '';
    position: absolute;
    left: 0;
    right: 11px;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent-purple), var(--accent-cyan));
}
/* 流动高光：暗示「邮件正在传递」 */
.mf-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 11px;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    border-radius: 2px;
    background-image: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, .95) 50%, transparent 100%);
    background-size: 45% 100%;
    background-repeat: no-repeat;
    animation: mf-flow 3.2s linear infinite;
}
@keyframes mf-flow {
    0%   { background-position: -50% 0; }
    100% { background-position: 150% 0; }
}
@media (prefers-reduced-motion: reduce) {
    .mf-link::after { display: none; }
}

/* 箭头中点：信封徽章（背景为实色，正好遮住线，形成「穿过」的观感） */
.mf-badge {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .74rem;
    background: var(--bg-card);
    border: 1.5px solid var(--accent-purple);
    color: var(--accent-purple);
    box-shadow: 0 0 0 3px var(--bg-tertiary);
}
.mf--sm .mf-badge { width: 26px; height: 26px; font-size: .68rem; }

/* 箭头头 */
.mf-head {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid var(--accent-cyan);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

/* ---------------- 图下注释 / 告警条 ---------------- */
.mf-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    background: var(--bg-tertiary);
    font-size: .8rem;
    line-height: 1.6;
    color: var(--text-secondary);
}
.mf-note i { margin-top: 3px; flex: 0 0 auto; color: var(--text-muted); }
.mf-note b { color: var(--text-primary); }
.mf-note--warn { background: rgba(245, 158, 11, .10); border-color: rgba(245, 158, 11, .32); }
.mf-note--warn i { color: var(--accent-orange); }
.mf-note--ok { background: rgba(16, 185, 129, .10); border-color: rgba(16, 185, 129, .32); }
.mf-note--ok i { color: var(--accent-green); }
.mf-note__act { margin-left: auto; flex: 0 0 auto; white-space: nowrap; }

/* ---------------- 常用联系人管理 ---------------- */
.contact-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.contact-toolbar__hint { font-size: .8rem; color: var(--text-muted); line-height: 1.5; }

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1.35fr;
    gap: 8px;
    padding: 12px;
    margin-bottom: 10px;
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-tertiary);
}
.contact-form .contact-form__foot {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}
@media (max-width: 720px) {
    .contact-form { grid-template-columns: 1fr; }
}

.contact-rows { display: flex; flex-direction: column; gap: 6px; }

.contact-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    transition: var(--transition);
}
.contact-row:hover { border-color: var(--accent-purple); }

.contact-avatar {
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .76rem;
    font-weight: 700;
    background: rgba(139, 92, 246, .14);
    color: var(--accent-purple);
    text-transform: uppercase;
}
.contact-row--default .contact-avatar { background: rgba(16, 185, 129, .16); color: var(--accent-green); }

.contact-main { flex: 1 1 auto; min-width: 0; }
.contact-name {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: .87rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.45;
}
.contact-email {
    font-size: .77rem;
    line-height: 1.45;
    color: var(--text-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.contact-tag {
    padding: 1px 7px;
    border-radius: 20px;
    font-size: .67rem;
    font-weight: 500;
    border: 1px solid transparent;
}
.contact-tag--default {
    background: rgba(16, 185, 129, .14);
    border-color: rgba(16, 185, 129, .32);
    color: var(--accent-green);
}
.contact-tag--recent {
    background: rgba(6, 182, 212, .14);
    border-color: rgba(6, 182, 212, .32);
    color: var(--accent-cyan);
}

.contact-actions { display: flex; gap: 4px; flex: 0 0 auto; }
.contact-icon-btn {
    width: 28px;
    height: 28px;
    border-radius: 7px;
    border: 1px solid var(--border-color);
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .74rem;
    transition: var(--transition);
}
.contact-icon-btn:hover { background: var(--bg-hover); color: var(--text-primary); }
.contact-icon-btn.is-on {
    background: rgba(16, 185, 129, .14);
    border-color: rgba(16, 185, 129, .35);
    color: var(--accent-green);
}
.contact-icon-btn.is-danger:hover {
    background: rgba(239, 68, 68, .14);
    border-color: rgba(239, 68, 68, .4);
    color: var(--accent-red);
}
.contact-icon-btn:disabled { opacity: .45; cursor: not-allowed; }

.contact-empty {
    padding: 20px 16px;
    text-align: center;
    font-size: .83rem;
    line-height: 1.7;
    color: var(--text-muted);
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
}
.contact-empty i { display: block; font-size: 1.3rem; margin-bottom: 8px; opacity: .5; }

/* ---------------- 窄屏：链路图竖排（箭头转向下） ---------------- */
@media (max-width: 640px) {
    .mf { flex-direction: column; align-items: stretch; }
    .mf-node { width: 100%; }
    /* 高度要同时容纳「信封徽章」与「向下箭头头」；徽章同时缩小，
       否则 30px 的徽章会把整段竖线遮掉，只剩一个孤零零的点。 */
    .mf-link {
        flex: 0 0 60px;
        width: 100%;
        min-width: 0;
        height: 60px;
    }
    .mf-link::before {
        left: 50%;
        right: auto;
        top: 0;
        bottom: 10px;
        width: 2px;
        height: auto;
        margin: 0 0 0 -1px;
        background: linear-gradient(180deg, var(--accent-purple), var(--accent-cyan));
    }
    .mf-link::after { display: none; }
    .mf-badge,
    .mf--sm .mf-badge {
        width: 22px;
        height: 22px;
        font-size: .6rem;
        box-shadow: 0 0 0 2px var(--bg-tertiary);
    }
    .mf-head {
        left: 50%;
        right: auto;
        top: auto;
        bottom: 0;
        margin-left: -6px;
        transform: none;
        border-left: 6px solid transparent;
        border-right: 6px solid transparent;
        border-top: 10px solid var(--accent-cyan);
        border-bottom: 0;
    }
    /* v260924：竖排时横向空间最紧，收件人改成「名字一行、邮箱一行」，
       否则长邮箱会被省略号截掉 —— 而这张图的意义就是要看清发给了谁。 */
    .mf-rcpt { flex-direction: column; align-items: flex-start; gap: 0; }
    .mf-rcpts--scroll { max-height: 8rem; }
    /* 告警条内的操作按钮换行显示，避免被挤出容器 */
    .mf-note { flex-wrap: wrap; }
    .mf-note__act { margin-left: 0; }
}

/* v26091803：发送弹窗联系人行内的「默认收件人」图钉（解释为什么会自动勾选） */
.contact-pin {
    font-size: .68rem;
    color: var(--accent-green);
    flex: 0 0 auto;
}

/* v26092008 启动期会话探测遮罩 */
.boot-splash{position:fixed;inset:0;z-index:99999;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:14px;background:var(--bg-primary);opacity:0;animation:bootSplashIn .18s linear .18s forwards}
.boot-splash-spinner{width:34px;height:34px;border-radius:50%;border:3px solid var(--bg-tertiary);border-top-color:#22d3ee;animation:bootSplashSpin .8s linear infinite}
.boot-splash-text{color:var(--text-secondary);font-size:13px;letter-spacing:.5px}
@keyframes bootSplashIn{to{opacity:1}}
@keyframes bootSplashSpin{to{transform:rotate(360deg)}}
@media (prefers-reduced-motion:reduce){.boot-splash-spinner{animation-duration:2.4s}}

/* ============================================================
   v26093002：法定页脚（参考主流站排版，单行居中）
   「Copyright © 2026 TechDigest 科技数码文案  沪ICP备16028033号-7（链接工信部）
     [公安徽标] 沪公网安备 XXXXXXXX号（链接公安平台查询页，号码下发后取消 hidden）」
   ============================================================ */
.site-icp-footer {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 4px 14px;
    text-align: center;
    padding: 30px 0 12px;
    font-size: .72rem;
    color: var(--text-muted);
}
.site-icp-footer a { color: var(--text-muted); text-decoration: none; }
.site-icp-footer a:hover { color: var(--accent-cyan); }

/* 公安徽标：14px，与文字基线对齐 */
.gongan-beian img,
.login-icp img {
    width: 14px;
    height: 14px;
    vertical-align: -2px;
    margin-right: 3px;
}

/* 登录页页脚：同一行内排布（版权 + ICP + 公安） */
.login-page-footer .login-icp,
.login-page-footer-split .login-icp {
    display: inline-block;
    margin-left: 14px;
    color: var(--text-muted);
    text-decoration: none;
}
.login-page-footer .login-icp:hover,
.login-page-footer-split .login-icp:hover { color: var(--accent-cyan); }

