:root {
  --primary: #4f46e5;
  --primary-light: #e0e7ff;
  --primary-dark: #3730a3;
  --success: #10b981;
  --success-light: #d1fae5;
  --warning: #f59e0b;
  --warning-light: #fef3c7;
  --danger: #ef4444;
  --danger-light: #fee2e2;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 6px rgba(0,0,0,0.07), 0 2px 4px rgba(0,0,0,0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  font-size: 14px;
  line-height: 1.6;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
  background: white;
  padding: 40px;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.15);
  width: 400px;
  max-width: 90vw;
}

.login-card h1 {
  text-align: center;
  font-size: 24px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 8px;
}

.login-card .subtitle {
  text-align: center;
  color: var(--gray-500);
  margin-bottom: 32px;
}

.login-form .form-group { margin-bottom: 20px; }

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.btn-login {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: var(--radius);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-login:hover { background: var(--primary-dark); }
.btn-login:disabled { opacity: 0.6; cursor: not-allowed; }

.login-error {
  color: var(--danger);
  text-align: center;
  font-size: 13px;
  margin-top: 12px;
}

/* ============================================================
   Layout
   ============================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  background: var(--gray-900);
  color: white;
  padding: 20px 0;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  align-self: flex-start;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-logo {
  padding: 0 24px 20px;
  font-size: 18px;
  font-weight: 600;
  border-bottom: 1px solid var(--gray-700);
  margin-bottom: 12px;
}

.sidebar-nav { flex: 1; }

.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  color: var(--gray-400);
  text-decoration: none;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-nav a:hover { background: var(--gray-800); color: white; }
.sidebar-nav a.active { background: var(--primary); color: white; }

.sidebar-nav .nav-icon { font-size: 18px; width: 24px; text-align: center; }

.sidebar-user {
  padding: 16px 24px;
  border-top: 1px solid var(--gray-700);
  font-size: 13px;
}

.sidebar-user .user-name { color: white; font-weight: 500; }
.sidebar-user .user-role { color: var(--gray-400); font-size: 12px; }

.btn-logout {
  margin-top: 8px;
  color: var(--gray-400);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 13px;
  padding: 0;
}

.btn-logout:hover { color: var(--danger); }

.main-content {
  flex: 1;
  padding: 24px 32px;
  min-width: 0; /* 防止 flex 子项被内容撑爆 */
}

.page-header {
  margin-bottom: 24px;
}

.page-header h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--gray-900);
}

.page-header .page-desc {
  color: var(--gray-500);
  font-size: 13px;
  margin-top: 4px;
}

/* ============================================================
   Components
   ============================================================ */
.card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 16px;
}

.btn {
  padding: 8px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-success:hover { background: #059669; }
.btn-warning { background: var(--warning); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-outline { background: white; border: 1px solid var(--gray-300); color: var(--gray-700); }
.btn-outline:hover { background: var(--gray-50); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-success { background: var(--success-light); color: #065f46; }
.badge-info { background: var(--primary-light); color: var(--primary-dark); }
.badge-gray { background: var(--gray-100); color: var(--gray-600); }
.badge-danger { background: var(--danger-light); color: #991b1b; }

/* Table */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-200);
  font-size: 13px;
}

th {
  font-weight: 600;
  color: var(--gray-500);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

tbody tr:hover { background: var(--gray-50); }

/* Form */
.form-group { margin-bottom: 16px; }

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--gray-600);
  margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius);
  font-size: 14px;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-group textarea { resize: vertical; min-height: 120px; }

/* Topic cards */
.topic-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: box-shadow 0.2s;
}

.topic-card:hover { box-shadow: var(--shadow-lg); }

.topic-card .topic-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.topic-card .topic-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-900);
  flex: 1;
  line-height: 1.4;
}

.topic-card .topic-meta {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--gray-500);
  margin-bottom: 8px;
}

.topic-card .topic-reason {
  font-size: 13px;
  color: var(--gray-600);
  background: var(--gray-50);
  padding: 8px 12px;
  border-radius: var(--radius);
  margin-bottom: 8px;
}

.topic-card .topic-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.topic-card .selection-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.score-bar {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.score-bar .score-value {
  font-weight: 600;
  font-size: 13px;
}

.score-bar .score-label {
  font-size: 11px;
  color: var(--gray-400);
}

/* Editor */
.editor-layout {
  display: grid;
  grid-template-columns: 280px 1fr 240px;
  gap: 20px;
}

.editor-sidebar {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.editor-main {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.editor-actions {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.editor-textarea {
  width: 100%;
  min-height: 500px;
  height: calc(100vh - 360px);
  max-height: 800px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  font-size: 14px;
  line-height: 1.8;
  font-family: inherit;
  resize: vertical;
}

.editor-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.status-stepper {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.status-step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-400);
}

.status-step.active { color: var(--primary); font-weight: 500; }
.status-step.done { color: var(--success); }

.status-step .step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-300);
  flex-shrink: 0;
}

.status-step.active .step-dot { background: var(--primary); }
.status-step.done .step-dot { background: var(--success); }

.edit-timeline {
  max-height: 200px;
  overflow-y: auto;
}

.edit-timeline-item {
  font-size: 12px;
  color: var(--gray-500);
  padding: 6px 0;
  border-bottom: 1px solid var(--gray-100);
}

.edit-timeline-item .timeline-user {
  font-weight: 500;
  color: var(--gray-700);
}

/* Charts */
.chart-container {
  position: relative;
  height: 300px;
  margin-bottom: 20px;
}

/* Loading */
.loading-spinner {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 40px;
  color: var(--gray-400);
}

.spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-200);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 1000;
  justify-content: center;
  align-items: center;
}

.modal-overlay.active { display: flex; }

.modal {
  background: white;
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 480px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
}

.modal h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
}

/* Modal large variant */
.modal-lg { width: 600px; }

/* Account detail view */
.account-detail { margin-bottom: 16px; }
.account-detail .detail-row {
  display: flex;
  padding: 10px 0;
  border-bottom: 1px solid var(--gray-100);
}
.account-detail .detail-row:last-child { border-bottom: none; }
.account-detail .detail-label {
  min-width: 80px;
  font-size: 13px;
  color: var(--gray-500);
  font-weight: 500;
  flex-shrink: 0;
}
.account-detail .detail-label + span {
  font-size: 14px;
  color: var(--gray-800);
  line-height: 1.6;
}

/* Input with eye toggle */
.input-with-eye {
  position: relative;
  display: flex;
  align-items: center;
}
.input-with-eye input {
  flex: 1;
  padding-right: 36px;
}
.input-with-eye .eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
  color: var(--gray-400);
  user-select: none;
  line-height: 1;
}
.input-with-eye .eye-toggle:hover { color: var(--gray-600); }

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: var(--gray-800);
  color: white;
  padding: 12px 20px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  font-size: 14px;
  animation: slideIn 0.3s ease;
}

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.filter-tab {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--gray-300);
  background: white;
  color: var(--gray-600);
  transition: all 0.2s;
}

.filter-tab.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 16px 0 4px;
  border-top: 1px solid var(--gray-100);
  margin-top: 16px;
}
.pagination .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* Grid */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }

/* Stats cards */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.stat-card {
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
}

.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--gray-900);
}

.stat-card .stat-label {
  font-size: 13px;
  color: var(--gray-500);
  margin-top: 4px;
}

/* Upload area */
.upload-area {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
}

.upload-area:hover { border-color: var(--primary); }
.upload-area.dragover { border-color: var(--primary); background: var(--primary-light); }

/* Responsive */
@media (max-width: 1024px) {
  .editor-layout { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ============================================================
   账号选择弹窗
   ============================================================ */
.account-pick-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 8px;
  max-height: 400px;
  overflow-y: auto;
}
.account-pick-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
}
.account-pick-item:hover { border-color: var(--primary); background: var(--primary-light); }
.account-pick-item input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--primary);
}
.account-pick-item:has(input:checked) {
  border-color: var(--primary);
  background: var(--primary-light);
  box-shadow: 0 0 0 2px var(--primary-light);
}

/* ============================================================
   账号管理 - 卡片网格样式
   ============================================================ */
.account-card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

@media (max-width: 1024px) {
  .account-card-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .account-card-grid { grid-template-columns: 1fr; }
}

.account-card {
  background: white;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}
.account-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  border-color: var(--primary);
}

.account-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}
.account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  flex-shrink: 0;
}
.account-card-title { flex: 1; min-width: 0; }
.account-name {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.account-meta {
  font-size: 12px;
  color: var(--gray-500);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-positioning {
  font-size: 13px;
  color: var(--gray-700);
  line-height: 1.6;
  min-height: 42px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.account-positioning.empty {
  color: var(--gray-400);
  font-style: italic;
}

.account-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 22px;
}
.account-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: var(--primary-light);
  color: var(--primary);
  border-radius: 10px;
  font-weight: 500;
}

.account-card-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  margin-top: auto;
}
.account-stat { flex: 1; }
.account-stat .stat-num {
  font-size: 18px;
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.2;
}
.account-stat .stat-label {
  font-size: 11px;
  color: var(--gray-500);
  margin-top: 2px;
}

.account-card-actions {
  display: flex;
  gap: 4px;
}
.btn-icon {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--gray-100);
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
}
.btn-icon:hover { background: var(--primary-light); }
.btn-icon.btn-icon-danger:hover { background: #fef2f2; }

.account-status-chip {
  font-size: 12px;
  padding: 3px 10px;
  background: var(--gray-100);
  color: var(--gray-700);
  border-radius: 10px;
}
.account-status-chip strong { color: var(--primary); margin-left: 4px; }

/* ============================================================
   Tab 栏 + 账号分析页样式
   ============================================================ */
.tab-bar {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--gray-200, #e5e7eb);
  margin-bottom: 16px;
  padding: 0 4px;
}
.tab-pill {
  padding: 10px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-500, #6b7280);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: all 0.15s ease;
  user-select: none;
}
.tab-pill:hover {
  color: var(--primary, #4f46e5);
}
.tab-pill.active {
  color: var(--primary, #4f46e5);
  border-bottom-color: var(--primary, #4f46e5);
}

.account-suggest-card {
  background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
  border-radius: 10px;
  padding: 16px;
  margin-bottom: 12px;
  border-left: 4px solid var(--primary, #4f46e5);
}
.account-suggest-card .suggest-label {
  font-size: 12px;
  color: var(--gray-500, #6b7280);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

@media (max-width: 768px) {
  .sidebar { display: none; }
  .stats-row { grid-template-columns: 1fr; }
}

/* ============================================================
   编辑信号台视觉体系（2026-07）
   以“从嘈杂信号中筛选可写内容”为主题：冷雾纸面 + 深墨信息层级 +
   海松绿操作色 + 信号橙风险/热点提示。以下规则有意覆盖旧版通用后台样式。
   ============================================================ */
:root {
  --primary: #0b6871;
  --primary-light: #dceeed;
  --primary-dark: #064a52;
  --signal: #df623e;
  --signal-light: #fff0e9;
  --success: #248466;
  --success-light: #e0f1e9;
  --warning: #b7771f;
  --warning-light: #fff2d4;
  --danger: #bd4541;
  --danger-light: #fde9e7;
  --gray-50: #f1f4f1;
  --gray-100: #e7ece9;
  --gray-200: #d6dfdb;
  --gray-300: #c2cfca;
  --gray-400: #8b9b98;
  --gray-500: #657672;
  --gray-600: #485b57;
  --gray-700: #30433f;
  --gray-800: #213330;
  --gray-900: #162724;
  --radius: 5px;
  --radius-lg: 9px;
  --shadow: none;
  --shadow-lg: 0 12px 30px rgba(22, 39, 36, .08);
}

* { scrollbar-color: var(--gray-300) transparent; scrollbar-width: thin; }

body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 85% -10%, rgba(126, 183, 174, .20), transparent 30rem),
    radial-gradient(circle at 35% 105%, rgba(221, 168, 112, .12), transparent 26rem),
    var(--gray-50);
  color: var(--gray-800);
  font-family: "PingFang SC", "Microsoft YaHei UI", "Noto Sans CJK SC", sans-serif;
  font-size: 14px;
  letter-spacing: .01em;
}

button, input, select, textarea { font: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(11, 104, 113, .22);
  outline-offset: 2px;
}

/* Login: a restrained editorial cover rather than a generic gradient card. */
.login-container {
  position: relative;
  overflow: hidden;
  padding: 28px;
  background:
    linear-gradient(118deg, rgba(11, 104, 113, .94) 0 42%, transparent 42%),
    radial-gradient(circle at 78% 28%, rgba(223, 98, 62, .20) 0 1px, transparent 1.4px) 0 0 / 17px 17px,
    #e6ede9;
}
.login-container::after {
  content: "";
  position: absolute;
  right: 8vw;
  bottom: -12vw;
  width: min(49vw, 610px);
  aspect-ratio: 1;
  border: 1px solid rgba(11, 104, 113, .22);
  border-radius: 50%;
  box-shadow: 0 0 0 48px rgba(11, 104, 113, .055), 0 0 0 96px rgba(11, 104, 113, .035);
  pointer-events: none;
}
.login-card {
  position: relative;
  z-index: 1;
  width: min(430px, 100%);
  padding: 46px 46px 42px;
  border: 1px solid rgba(22, 39, 36, .16);
  border-radius: 10px;
  box-shadow: 16px 18px 0 rgba(22, 39, 36, .11);
}
.login-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .15em;
}
.login-mark, .sidebar-mark {
  position: relative;
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid currentColor;
  border-radius: 50%;
}
.login-mark::before, .sidebar-mark::before {
  content: "";
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}
.login-card h1 {
  margin-bottom: 9px;
  color: var(--gray-900);
  font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif;
  font-size: clamp(29px, 5vw, 36px);
  font-weight: 600;
  letter-spacing: .06em;
}
.login-card .subtitle { margin-bottom: 34px; color: var(--gray-500); letter-spacing: .04em; }
.login-form label { color: var(--gray-700); font-size: 12px; font-weight: 700; letter-spacing: .06em; }
.login-form input { padding: 12px 13px; border-color: var(--gray-300); border-radius: 4px; background: #fcfdfb; }
.login-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.btn-login { padding: 13px; border-radius: 4px; background: var(--primary); font-weight: 700; letter-spacing: .22em; }
.btn-login:hover { background: var(--primary-dark); transform: translateY(-1px); }

/* Shell */
.app-layout { min-height: 100vh; }
.sidebar {
  width: 248px;
  padding: 20px 13px 15px;
  background: #193330;
  color: #f6f8f5;
  border-right: 1px solid rgba(255, 255, 255, .07);
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 24px 24px;
}
.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 68px;
  margin: 0 7px 17px;
  padding: 0 5px 18px;
  border-bottom: 1px solid rgba(229, 241, 236, .14);
  color: #dceee9;
  font-size: 15px;
}
.sidebar-logo .sidebar-mark { color: #e7a560; flex: 0 0 auto; }
.sidebar-logo strong { display: block; font-size: 15px; font-weight: 650; letter-spacing: .045em; }
.sidebar-logo small { display: block; margin-top: 3px; color: rgba(220, 238, 233, .52); font-size: 8px; letter-spacing: .115em; }
.sidebar-nav { display: flex; flex-direction: column; gap: 3px; }
.nav-section-label { margin: 17px 12px 5px; color: rgba(220, 238, 233, .43); font-size: 10px; font-weight: 700; letter-spacing: .13em; }
.sidebar-nav a {
  position: relative;
  gap: 12px;
  margin: 0;
  padding: 10px 12px;
  border-radius: 5px;
  color: rgba(236, 246, 243, .68);
  font-size: 13px;
}
.sidebar-nav a::before { content: ""; position: absolute; left: 0; width: 2px; height: 18px; background: transparent; }
.sidebar-nav a:hover { background: rgba(231, 245, 240, .08); color: white; }
.sidebar-nav a.active { background: rgba(167, 221, 209, .13); color: #fbfdfb; }
.sidebar-nav a.active::before { background: #e7a560; }
.sidebar-nav .nav-icon { position: relative; width: 18px; height: 18px; font-size: 0; flex: 0 0 18px; }
.nav-icon::before, .nav-icon::after { content: ""; position: absolute; box-sizing: border-box; }
.nav-icon-topics::before { inset: 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-icon-topics::after { width: 4px; height: 4px; top: 7px; left: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 3px rgba(231, 165, 96, .22); }
.nav-icon-editor::before { width: 12px; height: 2px; top: 8px; left: 3px; background: currentColor; transform: rotate(-45deg); }
.nav-icon-editor::after { width: 3px; height: 3px; top: 5px; left: 12px; border: 1.5px solid currentColor; border-left: 0; border-bottom: 0; transform: rotate(45deg); }
.nav-icon-articles::before { inset: 2px 4px; border: 1.5px solid currentColor; border-radius: 1px; }
.nav-icon-articles::after { width: 6px; height: 1px; top: 7px; left: 6px; background: currentColor; box-shadow: 0 4px 0 currentColor; }
.nav-icon-accounts::before { width: 11px; height: 11px; top: 1px; left: 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-icon-accounts::after { width: 16px; height: 7px; bottom: 1px; left: 1px; border: 1.5px solid currentColor; border-radius: 10px 10px 3px 3px; border-bottom: 0; }
.nav-icon-analytics::before { width: 3px; height: 7px; bottom: 2px; left: 2px; background: currentColor; box-shadow: 5px -4px 0 currentColor, 10px -8px 0 currentColor; }
.nav-icon-admin::before { inset: 3px; border: 1.5px solid currentColor; border-radius: 50%; }
.nav-icon-admin::after { width: 3px; height: 3px; top: 7px; left: 7px; background: currentColor; border-radius: 50%; box-shadow: 0 -6px 0 -1px currentColor, 0 6px 0 -1px currentColor, 6px 0 0 -1px currentColor, -6px 0 0 -1px currentColor; }
.sidebar-user { margin: 14px 7px 0; padding: 15px 5px 2px; border-top-color: rgba(229, 241, 236, .14); }
.sidebar-user .user-name { font-weight: 650; letter-spacing: .03em; }
.sidebar-user .user-role { margin-top: 3px; color: rgba(220, 238, 233, .52); }
.btn-logout { margin-top: 12px; color: rgba(220, 238, 233, .67); font-size: 12px; }
.btn-logout:hover { color: #f0a188; }

.main-content { max-width: 1600px; margin: 0 auto; padding: 38px clamp(20px, 4vw, 62px) 62px; }
.page-header { position: relative; margin-bottom: 28px; padding-bottom: 19px; border-bottom: 1px solid var(--gray-300); }
.page-header::after { content: ""; position: absolute; left: 0; bottom: -1px; width: 54px; height: 2px; background: var(--signal); }
.page-header h2 { color: var(--gray-900); font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif; font-size: clamp(24px, 3vw, 31px); font-weight: 600; letter-spacing: .055em; }
.page-header .page-desc { margin-top: 7px; color: var(--gray-500); font-size: 13px; }

/* Core components */
.card, .topic-card, .stat-card, .editor-sidebar, .editor-main, .editor-actions, .account-card {
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  box-shadow: none;
}
.card { padding: 22px; margin-bottom: 18px; background: rgba(255,255,253,.84); }
.card-title { display: flex; align-items: center; min-height: 24px; margin-bottom: 17px; color: var(--gray-900); font-size: 15px; font-weight: 700; letter-spacing: .035em; }
.btn { min-height: 34px; padding: 7px 13px; border-radius: 4px; font-weight: 650; transition: background .16s ease, border-color .16s ease, transform .16s ease; }
.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn-primary { background: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); }
.btn-outline { border-color: var(--gray-300); background: transparent; color: var(--gray-700); }
.btn-outline:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary-dark); }
.btn-icon { border-radius: 4px; background: var(--gray-100); }
.badge { border-radius: 4px; font-size: 11px; font-weight: 700; letter-spacing: .025em; }
.badge-info { background: var(--primary-light); color: var(--primary-dark); }
th, td { padding: 13px 15px; border-bottom-color: var(--gray-200); }
th { color: var(--gray-500); font-size: 11px; letter-spacing: .11em; }
tbody tr { transition: background .15s ease; }
tbody tr:hover { background: rgba(220, 238, 237, .40); }
.form-group input, .form-group select, .form-group textarea, .editor-textarea { border-color: var(--gray-300); border-radius: 4px; background: #fcfdfb; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .editor-textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }

/* Content flow */
.filter-tabs { gap: 7px; margin-bottom: 21px; padding: 3px 0; }
.filter-tab { padding: 7px 13px; border-color: var(--gray-300); border-radius: 4px; background: rgba(255,255,253,.64); color: var(--gray-600); }
.filter-tab:hover { border-color: var(--primary); color: var(--primary-dark); }
.filter-tab.active { border-color: var(--primary); background: var(--primary); }
.topic-card { position: relative; overflow: hidden; padding: 19px 21px 18px 25px; margin-bottom: 11px; background: rgba(255,255,253,.88); }
.topic-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--cat-color, var(--primary)); }
.topic-card:hover { border-color: rgba(11, 104, 113, .40); box-shadow: var(--shadow-lg); transform: translateY(-1px); }
.topic-card .topic-title { color: var(--gray-900); font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif; font-size: 17px; font-weight: 600; line-height: 1.55; letter-spacing: .02em; }
.topic-card .topic-meta { gap: 15px; color: var(--gray-500); }
.topic-card .topic-reason { padding: 9px 11px; border-left: 2px solid var(--signal); border-radius: 0 4px 4px 0; background: #f5f8f5; color: var(--gray-600); }
.score-bar .score-value { color: var(--primary-dark); font-size: 15px; }
.editor-layout { gap: 16px; grid-template-columns: minmax(230px, .72fr) minmax(440px, 1.7fr) minmax(210px, .62fr); }
.editor-sidebar, .editor-main, .editor-actions { padding: 20px; background: rgba(255,255,253,.88); }
.editor-textarea { line-height: 1.9; }
.status-step.active { color: var(--primary); }
.status-step .step-dot { border-radius: 2px; }
.status-step.active .step-dot { background: var(--primary); }
.tab-bar { gap: 0; padding: 0; border-bottom-color: var(--gray-300); }
.tab-pill { padding: 10px 15px; color: var(--gray-500); font-size: 13px; }
.tab-pill:hover, .tab-pill.active { color: var(--primary-dark); }
.tab-pill.active { border-bottom-color: var(--signal); }
.account-suggest-card { border: 1px solid #d3e4e0; border-left: 4px solid var(--signal); border-radius: var(--radius-lg); background: linear-gradient(120deg, #eaf4f1, #fcfdf9); }

/* Dense data views */
.stats-row { gap: 12px; }
.stat-card { position: relative; overflow: hidden; padding: 18px; background: rgba(255,255,253,.8); }
.stat-card::after { content: ""; position: absolute; top: 0; right: 0; width: 36px; height: 3px; background: var(--signal); }
.stat-card .stat-value { color: var(--gray-900); font-family: "Noto Serif SC", "Source Han Serif SC", "Songti SC", STSong, serif; font-size: 31px; font-weight: 600; letter-spacing: .025em; }
.stat-card .stat-label { color: var(--gray-500); font-size: 12px; }
.account-card { padding: 19px; background: rgba(255,255,253,.88); }
.account-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); }
.account-avatar { border-radius: 50%; background: var(--primary); font-family: "Noto Serif SC", "Source Han Serif SC", serif; }
.account-tag { border-radius: 4px; background: var(--primary-light); color: var(--primary-dark); }
.account-status-chip { border-radius: 4px; }
.chart-container { border-top: 1px solid var(--gray-200); padding-top: 14px; }
.toast { right: 28px; bottom: 28px; border: 1px solid rgba(231, 245, 240, .20); border-radius: 5px; background: var(--gray-900); box-shadow: 8px 9px 0 rgba(22,39,36,.12); }
.modal-overlay { background: rgba(22,39,36,.46); backdrop-filter: blur(3px); }
.modal { border: 1px solid var(--gray-200); border-radius: 9px; box-shadow: 16px 18px 0 rgba(22,39,36,.16); }
.modal h3 { color: var(--gray-900); font-family: "Noto Serif SC", "Source Han Serif SC", serif; font-weight: 600; }
.pagination { border-top-color: var(--gray-200); }

@media (max-width: 1024px) {
  .main-content { padding: 30px 25px 52px; }
  .sidebar { width: 218px; }
  .sidebar-logo small { display: none; }
  .editor-layout { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .app-layout { display: block; }
  .sidebar { position: relative; display: block; width: 100%; height: auto; min-height: 0; padding: 11px 13px 12px; overflow: hidden; }
  .sidebar-logo { min-height: 40px; margin: 0 5px 7px; padding: 0 3px 9px; }
  .sidebar-logo small, .nav-section-label, .sidebar-user { display: none; }
  .sidebar-nav { flex-direction: row; gap: 3px; overflow-x: auto; padding: 0 1px; }
  .sidebar-nav a { flex: 0 0 auto; padding: 8px 10px; font-size: 12px; }
  .sidebar-nav a::before { display: none; }
  .sidebar-nav .nav-icon { width: 16px; height: 16px; flex-basis: 16px; }
  .main-content { padding: 25px 16px 42px; }
  .page-header { margin-bottom: 22px; }
  .card { padding: 17px; }
  .topic-card { padding: 16px 16px 15px 20px; }
  .topic-card .topic-header, .topic-card .topic-footer { gap: 10px; align-items: flex-start; flex-direction: column; }
  .topic-card .topic-title { font-size: 16px; }
  .login-container { padding: 20px; background: linear-gradient(158deg, rgba(11, 104, 113, .94) 0 27%, transparent 27%), #e6ede9; }
  .login-card { padding: 36px 27px 32px; box-shadow: 10px 11px 0 rgba(22,39,36,.12); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
