/* ─── 上传区域 ───────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--gray-300); border-radius: var(--radius);
  padding: 32px 20px; text-align: center; cursor: pointer;
  transition: all .2s; background: var(--gray-50);
}
.upload-zone:hover, .upload-zone.drag-over {
  border-color: var(--primary); background: var(--primary-light);
}
.upload-icon { font-size: 36px; margin-bottom: 10px; }
.upload-title { font-size: 14px; font-weight: 600; color: var(--gray-700); margin-bottom: 4px; }
.upload-hint { font-size: 12px; color: var(--gray-400); }

/* ─── 媒体参数 ───────────────────────────────────────────────────────────── */
.media-params { display: none; }
.params-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.param-item { background: var(--gray-50); border-radius: 6px; padding: 8px 10px; }
.param-label { font-size: 10px; color: var(--gray-400); font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.param-value { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-top: 2px; }
.clarity-bar-wrap { background: var(--gray-100); border-radius: 4px; height: 6px; overflow: hidden; margin-top: 4px; }
.clarity-bar { height: 100%; background: linear-gradient(90deg, var(--success), var(--accent)); border-radius: 4px; transition: width .5s; }

/* ─── 模式切换 ───────────────────────────────────────────────────────────── */
.mode-tabs { display: flex; gap: 0; background: var(--gray-100); border-radius: 8px; padding: 3px; margin-bottom: 14px; }
.mode-tab {
  flex: 1; padding: 7px 14px; border-radius: 6px; text-align: center;
  font-size: 13px; font-weight: 500; cursor: pointer; color: var(--gray-500);
  transition: all .15s;
}
.mode-tab.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 1px 4px rgba(0,0,0,.1); }

/* ─── 提示词区域 ─────────────────────────────────────────────────────────── */
.prompt-section { margin-top: 14px; }
.prompt-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.prompt-label { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.prompt-tag { font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.prompt-tag.default { background: #dbeafe; color: #1e40af; }
.prompt-tag.custom { background: #d1fae5; color: #065f46; }
.prompt-textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: 12.5px; color: var(--gray-700); resize: vertical;
  min-height: 100px; outline: none; font-family: inherit; line-height: 1.6;
  transition: border-color .2s; background: var(--gray-50);
}
.prompt-textarea:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(26,86,219,.08); }
.prompt-actions { display: flex; gap: 6px; margin-top: 6px; }
.locked-prompt {
  user-select: none !important;
  -webkit-user-select: none !important;
  cursor: not-allowed !important;
  background: linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%) !important;
  color: var(--gray-600) !important;
}
.locked-prompt:focus { box-shadow: none !important; border-color: var(--gray-200) !important; }

/* ─── 知识库 ─────────────────────────────────────────────────────────────── */
.kb-section { margin-top: 14px; }
.kb-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.kb-label { font-size: 13px; font-weight: 600; color: var(--gray-700); display: flex; align-items: center; gap: 6px; }
.kb-count { font-size: 11px; background: var(--primary-light); color: var(--primary); padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.kb-list { display: flex; flex-direction: column; gap: 6px; max-height: 160px; overflow-y: auto; }
.kb-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: 7px;
}
.kb-item-icon { font-size: 16px; flex-shrink: 0; }
.kb-item-name { flex: 1; font-size: 12px; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-item-size { font-size: 11px; color: var(--gray-400); flex-shrink: 0; }
.kb-item-del { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 4px; }
.kb-item-del:hover { color: var(--danger); background: #fee2e2; }
.kb-empty { text-align: center; padding: 16px; color: var(--gray-400); font-size: 12px; }
.btn-add-kb {
  width: 100%; padding: 8px; border: 1.5px dashed var(--gray-300); border-radius: 7px;
  background: none; color: var(--gray-500); font-size: 12.5px; cursor: pointer;
  transition: all .15s; margin-top: 6px;
}
.btn-add-kb:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ─── AI 互动整改 ────────────────────────────────────────────────────────── */
.chat-panel { display: flex; flex-direction: column; height: 100%; min-height: 400px; }
.chat-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--gray-100); }
.chat-title { font-size: 13.5px; font-weight: 700; color: var(--gray-800); display: flex; align-items: center; gap: 8px; }
.chat-ai-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); box-shadow: 0 0 6px var(--success); animation: pulse 2s infinite; }
.chat-memory-count { font-size: 11px; background: #fef3c7; color: #92400e; padding: 2px 8px; border-radius: 20px; font-weight: 600; }
.chat-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 200px; max-height: 300px; }
.chat-msg { display: flex; gap: 8px; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-avatar { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.chat-avatar.ai { background: linear-gradient(135deg, var(--primary), var(--accent)); color: #fff; }
.chat-avatar.user { background: var(--gray-200); color: var(--gray-600); }
.chat-bubble { max-width: 85%; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.6; }
.chat-msg.ai .chat-bubble { background: var(--gray-50); border: 1px solid var(--gray-200); color: var(--gray-700); border-radius: 2px 10px 10px 10px; }
.chat-msg.user .chat-bubble { background: var(--primary); color: #fff; border-radius: 10px 2px 10px 10px; }
.chat-input-area { padding: 12px 14px; border-top: 1px solid var(--gray-100); }
.chat-input-wrap { display: flex; gap: 8px; }
.chat-input {
  flex: 1; padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; outline: none; resize: none; font-family: inherit; min-height: 36px; max-height: 80px;
  transition: border-color .2s;
}
.chat-input:focus { border-color: var(--primary); }
.chat-send-btn {
  padding: 9px 14px; background: var(--primary); color: #fff; border: none;
  border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600;
  transition: background .15s; flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--primary-dark); }
.chat-quick-btns { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.chat-quick-btn {
  padding: 4px 10px; border: 1px solid var(--gray-200); border-radius: 20px;
  font-size: 11.5px; color: var(--gray-600); background: #fff; cursor: pointer;
  transition: all .15s;
}
.chat-quick-btn:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-light); }

/* ─── AI互动整改：悬浮球 + 右下角聊天窗 ─────────────────────────────────── */
.chat-fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 800;
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(26,86,219,.45);
  transition: transform .18s ease, box-shadow .18s ease;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.06); box-shadow: 0 10px 26px rgba(26,86,219,.55); }
.chat-fab svg { width: 26px; height: 26px; display: block; }
.chat-fab-dot {
  position: absolute; top: 3px; right: 3px; width: 11px; height: 11px; border-radius: 50%;
  background: var(--success); border: 2px solid #fff; box-shadow: 0 0 6px var(--success);
  animation: pulse 2s infinite;
}
.chat-float .chat-window {
  position: fixed; right: 26px; bottom: 96px; z-index: 800;
  width: 380px; max-width: calc(100vw - 40px);
  height: min(560px, calc(100vh - 150px));
  background: #fff; border-radius: 14px; border: 1px solid var(--border-card);
  box-shadow: 0 18px 50px rgba(15,23,42,.28);
  display: none; overflow: hidden;
}
.chat-float.open .chat-window { display: flex; flex-direction: column; animation: chatWindowIn .22s ease; }
@keyframes chatWindowIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.chat-window .chat-panel { height: 100%; min-height: 0; max-height: none; }
.chat-window .chat-messages { max-height: none; }
.chat-close {
  border: none; background: transparent; cursor: pointer; color: var(--gray-400);
  font-size: 14px; width: 26px; height: 26px; border-radius: 7px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; transition: all .15s;
}
.chat-close:hover { background: var(--gray-100); color: var(--gray-700); }

/* ─── 分析结果 ───────────────────────────────────────────────────────────── */
.result-panel { height: 100%; }
.result-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--gray-100);
  background: linear-gradient(135deg, #f8fbff 0%, #f5f8fc 100%);
}
.result-title { font-size: 14px; font-weight: 700; color: var(--gray-800); }
.result-header-right { display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.result-style-toolbar { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.result-style-toolbar label { font-size:11px; color:var(--gray-500); font-weight:600; }
.result-style-toolbar select,
.result-style-toolbar input[type="number"] {
  height:28px; border:1px solid var(--gray-200); border-radius:7px; background:#fff; color:var(--gray-700);
  font-size:12px; padding:0 7px; outline:none;
}
.result-style-toolbar select { max-width:96px; }
.result-style-toolbar input[type="number"] { width:58px; }
.result-style-toolbar input[type="color"] {
  width:30px; height:28px; padding:2px; border:1px solid var(--gray-200); border-radius:7px; background:#fff; cursor:pointer;
}
.result-style-toolbar .style-reset-btn {
  height:28px; padding:0 8px; border:1px solid var(--gray-200); border-radius:7px; background:#fff;
  color:var(--gray-600); font-size:12px; font-weight:600; cursor:pointer;
}
.result-style-toolbar .style-reset-btn:hover { border-color:var(--primary); color:var(--primary); background:var(--primary-light); }
.result-body { padding: 18px; min-height: 300px; }
.result-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 260px; color: var(--gray-400); gap: 12px; }
.result-empty-icon { font-size: 48px; opacity: .35; }
.result-content {
  font-size: 13.5px; line-height: 1.85; color: var(--gray-700); white-space: pre-wrap;
}
.result-body.result-styled .result-content,
.result-body.result-styled .result-content * {
  font-family: var(--result-font-family, "Microsoft YaHei", "PingFang SC", Arial, sans-serif) !important;
  color: var(--result-text-color, var(--gray-700)) !important;
}
.result-body.result-styled .result-content { font-size: var(--result-font-size, 16px) !important; }
.result-body.result-styled .result-content h1 { font-size: var(--result-heading1-size, 20px) !important; -webkit-text-fill-color: var(--result-text-color, var(--gray-900)) !important; background:none !important; }
.result-body.result-styled .result-content h2 { font-size: var(--result-heading2-size, 18px) !important; }
.result-body.result-styled .result-content h3,
.result-body.result-styled .result-content strong[style] { font-size: var(--result-heading3-size, 17px) !important; }
.result-content h1 { font-size: 17px; color: var(--gray-900); margin: 14px 0 8px; font-weight: 800; border-bottom: 2px solid var(--primary-light); padding-bottom: 6px; }
.result-content h2 { font-size: 15px; color: var(--gray-800); margin: 12px 0 6px; font-weight: 700; padding-left: 10px; border-left: 3px solid var(--primary); }
.result-content h3 { font-size: 14px; color: var(--gray-800); margin: 10px 0 5px; font-weight: 700; }
.result-content strong, .result-content b { color: var(--primary); font-weight: 700; }
.result-content hr { border: none; border-top: 1px solid var(--gray-200); margin: 14px 0; }
.result-actions {
  display: flex; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--gray-100);
  flex-wrap: wrap; background: linear-gradient(135deg, #f8fbff 0%, #f5f8fc 100%);
}
/* ─── 图片预览（分析结果上方）──────────────────────────────────────────── */
.result-image-preview {
  padding: 12px 18px 10px; border-bottom: 1px solid var(--gray-100);
  display: flex; align-items: flex-start; gap: 14px;
  background: linear-gradient(135deg, #eef3ff 0%, #f5f8fc 100%);
}
.result-image-thumb {
  width: 96px; height: 72px; object-fit: cover; border-radius: 9px;
  border: 2px solid rgba(26,86,219,.18); box-shadow: 0 3px 10px rgba(0,0,0,.12);
  flex-shrink: 0; cursor: pointer; transition: transform .2s;
}
.result-image-thumb:hover { transform: scale(1.04); }
.result-image-info { flex: 1; min-width: 0; }
.result-image-name { font-size: 12px; font-weight: 600; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.result-image-meta { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.result-image-badge { display: inline-block; font-size: 10px; padding: 2px 7px; border-radius: 20px; background: var(--primary-light); color: var(--primary); font-weight: 600; margin-top: 4px; }

/* ─── 风险标签 ───────────────────────────────────────────────────────────── */
.risk-badge { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 20px; }
.risk-high { background: #fee2e2; color: #b91c1c; }
.risk-mid { background: #fef3c7; color: #92400e; }
.risk-low { background: #dbeafe; color: #1e40af; }
.risk-safe { background: #d1fae5; color: #065f46; }

/* ─── 按钮 ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px; padding: 8px 16px;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s; text-decoration: none; letter-spacing: .1px;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, #1a56db, #2563eb);
  color: #fff; box-shadow: 0 2px 10px rgba(26,86,219,.35);
  position: relative; overflow: hidden;
}
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, transparent 100%); }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #1245b0, #1a56db); box-shadow: 0 4px 16px rgba(26,86,219,.45); transform: translateY(-1px); }
.btn-primary:active:not(:disabled) { transform: translateY(0); box-shadow: 0 1px 6px rgba(26,86,219,.3); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 2px 10px rgba(16,185,129,.3); }
.btn-success:hover:not(:disabled) { background: linear-gradient(135deg, #059669, #10b981); box-shadow: 0 4px 16px rgba(16,185,129,.4); transform: translateY(-1px); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 2px 8px rgba(245,158,11,.3); }
.btn-warning:hover:not(:disabled) { background: linear-gradient(135deg, #d97706, #f59e0b); transform: translateY(-1px); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,.3); }
.btn-danger:hover:not(:disabled) { background: linear-gradient(135deg, #dc2626, #ef4444); transform: translateY(-1px); }
.btn-outline {
  background: #fff; color: var(--gray-600); border: 1.5px solid var(--gray-200);
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.btn-outline:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); background: var(--primary-light); box-shadow: 0 2px 8px rgba(26,86,219,.1); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.loading-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  border-radius: 50%; animation: spin .7s linear infinite; flex-shrink: 0;
}
.loading-spinner.dark { border-color: rgba(0,0,0,.15); border-top-color: var(--primary); }

/* ─── 文件预览 ───────────────────────────────────────────────────────────── */
.file-preview {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: var(--primary-light); border: 1px solid rgba(26,86,219,.15); border-radius: 8px;
  margin-top: 8px;
}
.file-icon { font-size: 18px; flex-shrink: 0; }
.file-name { flex: 1; font-size: 12.5px; color: var(--gray-700); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-size { font-size: 11px; color: var(--gray-400); flex-shrink: 0; }
.btn-remove { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 14px; padding: 2px 4px; border-radius: 4px; }
.btn-remove:hover { color: var(--danger); background: #fee2e2; }

/* ─── 每日智报 ───────────────────────────────────────────────────────────── */
.daily-tabs { display: flex; gap: 0; background: var(--gray-100); border-radius: 10px; padding: 4px; margin-bottom: 20px; box-shadow: inset 0 1px 3px rgba(0,0,0,.06); }
.daily-tab { flex: 1; padding: 9px 16px; border-radius: 8px; text-align: center; font-size: 13.5px; font-weight: 500; cursor: pointer; color: var(--gray-500); transition: all .2s; }
.daily-tab.active { background: #fff; color: var(--primary); font-weight: 700; box-shadow: 0 2px 8px rgba(26,86,219,.15); }
.queue-item {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 1px solid var(--gray-200); border-radius: var(--radius); background: #fff; margin-bottom: 10px;
}
.queue-item-type { font-size: 20px; flex-shrink: 0; }
.queue-item-content { flex: 1; }
.queue-item-title { font-size: 13.5px; font-weight: 600; color: var(--gray-800); }
.queue-item-time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.queue-item-preview { font-size: 12px; color: var(--gray-500); margin-top: 4px; line-height: 1.5; max-height: 36px; overflow: hidden; }
.queue-item-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ─── 历史记录 ───────────────────────────────────────────────────────────── */
.history-filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filter-select {
  padding: 7px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; color: var(--gray-700); background: #fff; outline: none;
}
.filter-select:focus { border-color: var(--primary); }
.history-table { width: 100%; border-collapse: collapse; }
.history-table th { background: var(--gray-50); padding: 10px 14px; text-align: left; font-size: 12px; font-weight: 700; color: var(--gray-500); border-bottom: 1px solid var(--gray-200); }
.history-table td { padding: 12px 14px; border-bottom: 1px solid var(--gray-100); font-size: 13px; color: var(--gray-700); }
.history-table tr:hover td { background: var(--gray-50); }
.history-table .no-data { text-align: center; padding: 40px; color: var(--gray-400); }
/* 历史记录：空状态 / 错误状态 */
.history-empty { text-align: center; padding: 48px 20px; color: var(--gray-400); }
.history-empty-icon { font-size: 40px; line-height: 1; margin-bottom: 12px; opacity: .75; }
.history-empty-title { font-size: 15px; font-weight: 700; color: var(--gray-600); margin-bottom: 6px; }
.history-empty-sub { font-size: 13px; color: var(--gray-400); }

/* ─── 系统设置 ───────────────────────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.setting-item { margin-bottom: 16px; }
.setting-label { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 6px; }
.setting-input {
  width: 100%; padding: 9px 12px; border: 1.5px solid var(--gray-200); border-radius: 8px;
  font-size: 13px; color: var(--gray-700); outline: none; background: var(--gray-50);
  transition: border-color .2s;
}
.setting-input:focus { border-color: var(--primary); background: #fff; }
.setting-desc { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
.toggle { position: relative; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0; background: var(--gray-300); border-radius: 24px;
  cursor: pointer; transition: .2s;
}
.toggle-slider::before {
  content: ''; position: absolute; width: 18px; height: 18px;
  left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }
.system-status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.status-card { background: var(--gray-50); border: 1px solid var(--gray-200); border-radius: var(--radius); padding: 16px; text-align: center; }
.status-card-icon { font-size: 28px; margin-bottom: 8px; }
.status-card-label { font-size: 12px; color: var(--gray-500); margin-bottom: 4px; }
.status-card-value { font-size: 18px; font-weight: 800; color: var(--gray-800); }

/* ─── Toast ──────────────────────────────────────────────────────────────── */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  padding: 12px 16px; border-radius: 10px; font-size: 13.5px; font-weight: 500;
  box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 8px;
  animation: slideIn .3s ease; max-width: 360px;
}
.toast.success { background: #ecfdf5; border: 1px solid #a7f3d0; color: #065f46; }
.toast.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }
.toast.info { background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af; }
.toast.warning { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ─── 模态框 ─────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 680px; max-height: 80vh; overflow-y: auto;
}
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--gray-200); }
.modal-title { font-size: 16px; font-weight: 700; color: var(--gray-900); }
.modal-close { background: none; border: none; font-size: 20px; color: var(--gray-400); cursor: pointer; padding: 4px; border-radius: 6px; }
.modal-close:hover { color: var(--gray-700); background: var(--gray-100); }
.modal-body { padding: 22px; }
.modal-footer { padding: 16px 22px; border-top: 1px solid var(--gray-200); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── 动画 ───────────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { animation: fadeIn .3s ease; }

/* ─── 滚动条 ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gray-400); }

/* ─── 分割线 ─────────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--gray-200); margin: 14px 0; }

/* ─── 手动合成区 ─────────────────────────────────────────────────────────── */
.manual-upload-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.manual-col { }
.manual-col-title { font-size: 13px; font-weight: 600; color: var(--gray-700); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.manual-files-list { min-height: 40px; max-height: 120px; overflow-y: auto; margin-bottom: 8px; }

/* ─── 日报队列推送标识 ───────────────────────────────────────────────────── */
.auto-push-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600;
  background: #d1fae5; color: #065f46;
}
.revoked-badge {
  font-size: 11px; padding: 2px 8px; border-radius: 20px; font-weight: 600;
  background: #fee2e2; color: #991b1b;
}

/* ─── 记忆管理 ───────────────────────────────────────────────────────────── */
.memory-item {
  padding: 8px 12px; background: var(--gray-50); border: 1px solid var(--gray-200);
  border-radius: 7px; margin-bottom: 6px; font-size: 12.5px; color: var(--gray-700);
  display: flex; align-items: flex-start; gap: 8px;
}
.memory-item-text { flex: 1; line-height: 1.5; }
.memory-item-del { background: none; border: none; color: var(--gray-400); cursor: pointer; font-size: 14px; flex-shrink: 0; }
.memory-item-del:hover { color: var(--danger); }

/* ─── 语音录音 ───────────────────────────────────────────────────────────── */
.voice-card { border: 1px solid rgba(26,86,219,.15); background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%); }
.voice-status { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--gray-600); }
.voice-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--gray-300); flex-shrink: 0; }
.voice-dot.recording { background: var(--danger); animation: pulse 1s infinite; }
.voice-dot.transcribing { background: var(--warning); animation: pulse 1.5s infinite; }
.voice-dot.done { background: var(--success); }
.voice-transcript {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--gray-200);
  border-radius: 8px; font-size: 13px; color: var(--gray-700); resize: vertical;
  min-height: 80px; outline: none; font-family: inherit; line-height: 1.6;
  transition: border-color .2s; background: #fff; margin-top: 8px;
}
.voice-transcript:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26,86,219,.08); }
.voice-btn-record {
  display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s; background: linear-gradient(135deg, var(--danger), #dc2626);
  color: #fff; box-shadow: 0 2px 8px rgba(239,68,68,.3);
}
.voice-btn-record.recording { background: linear-gradient(135deg, #dc2626, #b91c1c); animation: pulse-btn 1.5s infinite; }
.voice-btn-record:hover { transform: translateY(-1px); box-shadow: 0 4px 14px rgba(239,68,68,.4); }
@keyframes pulse-btn { 0%,100%{box-shadow:0 2px 8px rgba(239,68,68,.3)} 50%{box-shadow:0 2px 16px rgba(239,68,68,.6)} }
.voice-timer { font-size: 13px; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; }

/* ─── 历史日报列表 ───────────────────────────────────────────────────────── */
.daily-history-item {
  padding: 12px 16px; border: 1px solid var(--gray-200); border-radius: 8px;
  margin-bottom: 8px; cursor: pointer; transition: all .15s; background: #fff;
}
.daily-history-item:hover { border-color: var(--primary); background: var(--primary-light); }
.daily-history-date { font-size: 12px; color: var(--gray-400); font-weight: 600; }
.daily-history-preview { font-size: 13px; color: var(--gray-700); margin-top: 4px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── 历史记录列表 ───────────────────────────────────────────────────────── */
.history-item { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 8px; cursor: pointer; transition: all .15s; background: #fff; }
.history-item:hover { border-color: var(--primary); background: var(--primary-light); }
.history-item-icon { font-size: 22px; flex-shrink: 0; }
.history-item-info { flex: 1; min-width: 0; }
.history-item-title { font-size: 13.5px; font-weight: 600; color: var(--gray-800); display: flex; align-items: center; gap: 6px; }
.history-item-time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.history-item-preview { font-size: 12px; color: var(--gray-500); margin-top: 4px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item-actions { flex-shrink: 0; }
.btn-xs { padding: 4px 10px; font-size: 11.5px; border-radius: 6px; }

/* ─── push-item ─────────────────────────────────────────────────────────── */
.push-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border: 1px solid var(--gray-200); border-radius: 8px; margin-bottom: 8px; background: #fff; transition: all .15s; }
.push-item.recalled { opacity: .6; background: var(--gray-50); }
.push-item-icon { font-size: 20px; flex-shrink: 0; }
.push-item-info { flex: 1; min-width: 0; }
.push-item-title { font-size: 13px; font-weight: 600; color: var(--gray-800); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.push-item-time { font-size: 11px; color: var(--gray-400); margin-top: 2px; }
.push-item-preview { font-size: 12px; color: var(--gray-500); margin-top: 4px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── typing dots ────────────────────────────────────────────────────────── */
.typing-dots { display: inline-flex; gap: 4px; align-items: center; }
.typing-dots span { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-400); animation: typing .8s infinite; }
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-4px);opacity:1} }

/* ─── spinner ────────────────────────────────────────────────────────────── */
.spinner { width: 28px; height: 28px; border: 3px solid var(--gray-200); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto; }
/* 启动遮罩：首屏覆盖，认证决定显示登录页/主界面后淡出 */
#boot-splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: #eef2f9; transition: opacity .25s ease;
}
#boot-splash.is-hidden { opacity: 0; visibility: hidden; pointer-events: none; }
#boot-splash .boot-text { font-size: 13px; color: var(--gray-500); letter-spacing: 1px; }

