/* ============================================================
   字节跳动后台规范 — 公共样式
   色彩 / 间距 / 圆角 / 阴影 / 字体 / 交互态
   ============================================================ */
:root {
  /* 品牌色 */
  --brand: #3370FF;
  --brand-hover: #4080FF;
  --brand-active: #245BDB;
  --brand-light: #E8F1FF;
  --brand-soft: #F2F7FF;

  /* 状态色 */
  --success: #00B42A;
  --success-light: #E8F9ED;
  --warning: #FF7D00;
  --warning-light: #FFF3E0;
  --error: #F53F3F;
  --error-light: #FFECE8;
  --info: #722ED1;
  --info-light: #F2EBFE;

  /* 文本色 */
  --text-1: #1D2129;
  --text-2: #4E5969;
  --text-3: #86909C;
  --text-4: #C9CDD4;
  --text-on-brand: #FFFFFF;

  /* 背景色 */
  --bg-page: #F7F8FA;
  --bg-card: #FFFFFF;
  --bg-hover: #F2F3F5;
  --bg-soft: #F7F8FA;

  /* 边框 */
  --border-1: #E5E6EB;
  --border-2: #F2F3F5;

  /* 阴影 */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.08);

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --radius-xl: 12px;

  /* 间距 */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;

  /* 布局尺寸 */
  --topbar-h: 56px;
  --sidebar-w: 224px;
  --content-max: 1280px;

  /* 主题相关（深色模式独立覆盖） */
  --shadow-color: rgba(0, 0, 0, 0.04);
  --scrim: rgba(0, 0, 0, 0.45);
}

/* ============================================================
   夜间模式 — 所有变量映射到深色值
   通过 <html data-theme="dark"> 切换
   ============================================================ */
html[data-theme="dark"] {
  /* 品牌色（深色模式稍微提亮以保持对比度） */
  --brand: #4D7DFF;
  --brand-hover: #5B8DEF;
  --brand-active: #3370FF;
  --brand-light: #1B2B4D;
  --brand-soft: #142039;

  /* 状态色（深色模式微调） */
  --success: #2DCB6A;
  --success-light: #0F2E1F;
  --warning: #FF9A3D;
  --warning-light: #3A2410;
  --error: #FF6464;
  --error-light: #3A1717;
  --info: #A672FF;
  --info-light: #26193A;

  /* 文本色 — 反转 */
  --text-1: #F5F6F7;
  --text-2: #C9CDD4;
  --text-3: #86909C;
  --text-4: #4E5969;
  --text-on-brand: #FFFFFF;

  /* 背景色 */
  --bg-page: #0F1115;
  --bg-card: #1A1D24;
  --bg-hover: #252932;
  --bg-soft: #1F232C;

  /* 边框 */
  --border-1: #2D323C;
  --border-2: #23272F;

  /* 阴影（深色更黑） */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 6px 16px rgba(0, 0, 0, 0.50);

  --shadow-color: rgba(0, 0, 0, 0.30);
  --scrim: rgba(0, 0, 0, 0.65);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC",
    "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans CN",
    "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-hover); }
a:visited { color: var(--brand); }

h1, h2, h3, h4 { margin: 0; color: var(--text-1); font-weight: 600; }
h1 { font-size: 20px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }

p { margin: 0 0 var(--space-3) 0; color: var(--text-2); }

/* ============ 布局 ============ */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: var(--topbar-h);
  min-height: 52px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-1);
  display: flex;
  align-items: center;
  padding: 0 var(--space-4);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
  gap: var(--space-2);
}
.topbar-brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 15px;
  font-weight: 600;
  color: var(--text-1);
  margin-right: var(--space-4);
  white-space: nowrap;
  flex-shrink: 0;
}
.topbar-brand .tag { font-size: 11px; }
.topbar-brand .logo {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--brand), #5B8DEF);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 14px;
}
.topbar-logo {
  width: 30px; height: 30px;
  display: block;
}
.topbar-spacer { flex: 1; min-width: 0; }
.topbar-user {
  display: flex; align-items: center; gap: var(--space-2);
  color: var(--text-2); font-size: 12px;
  white-space: nowrap; flex-shrink: 0;
}
.topbar-user > span { font-size: 12px; }
.topbar-user .topbar-username {
  max-width: 110px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 12px;
  color: var(--text-1);
  font-weight: 500;
}
.topbar-user .topbar-divider {
  color: var(--text-4);
  font-size: 12px;
  padding: 0 2px;
  user-select: none;
}
.topbar-user .avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--brand-light); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 12px;
}
.topbar-user a {
  color: var(--text-2);
  font-size: 12px;
  padding: 4px 6px;
  border-radius: 4px;
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s, background 0.15s;
}
.topbar-user a:hover { color: var(--brand); background: var(--bg-hover); }
.topbar-user .nav-layout-toggle,
.topbar-user .theme-toggle { font-size: 12px; padding: 4px 6px; }

/* ===== v30 子系统 tab 栏 ===== */
.topbar-subsystems {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 0 1 auto;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 0 var(--space-2);
}
.topbar-subsystems::-webkit-scrollbar { height: 4px; }
.topbar-subsystems::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 2px; }
.subsystem-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  height: 36px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-2);
  background: transparent;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  border: 1px solid transparent;
  flex-shrink: 0;
}
.subsystem-tab:hover {
  color: var(--brand);
  background: var(--brand-light);
}
.subsystem-tab .sub-icon {
  font-size: 14px;
  line-height: 1;
}
.subsystem-tab .sub-name {
  font-size: 13px;
  line-height: 1.2;
}
.subsystem-tab.active {
  color: white;
  background: var(--brand);
  font-weight: 600;
  box-shadow: 0 2px 6px rgba(50, 109, 230, 0.25);
}
.subsystem-tab.active .sub-name { color: white; }
.subsystem-tab.active:hover { background: var(--brand); }

/* 暗色模式适配 */
html[data-theme="dark"] .subsystem-tab:hover {
  background: rgba(64, 128, 255, 0.15);
}
html[data-theme="dark"] .subsystem-tab.active {
  background: var(--brand);
}

/* 布局切换按钮 */
.nav-layout-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 1px solid var(--border-1);
  background: var(--bg-card);
  cursor: pointer;
  font-size: 16px;
  transition: all 0.15s;
}
.nav-layout-toggle:hover {
  border-color: var(--brand);
  background: var(--brand-light);
}
.nav-layout-toggle .ico-legacy { display: none; }
.nav-layout-toggle .ico-new { display: inline-block; }
.user-chip {
  display: inline-flex; align-items: center; gap: var(--space-2);
  padding: 4px 10px 4px 4px;
  border-radius: 999px;
  background: var(--bg-soft);
  transition: all 0.2s ease;
  text-decoration: none;
}
.user-chip:hover { background: var(--brand-light); color: var(--brand); }

/* ============ 二次确认弹窗（管理端专用） ============ */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(29, 33, 41, 0.55);
  backdrop-filter: blur(2px);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  animation: mask-in 0.18s ease;
}
@keyframes mask-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 420px; max-width: 92vw;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.20);
  overflow: hidden;
  animation: modal-in 0.22s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes modal-in { from { transform: translateY(12px) scale(0.96); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-head {
  padding: 18px 20px 12px;
  display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid var(--border-2);
}
.modal-icon {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.modal-icon.danger  { background: #FFECE8; color: var(--error); }
.modal-icon.warning { background: #FFF3E0; color: var(--warning); }
.modal-icon.info    { background: var(--brand-light); color: var(--brand); }
.modal-title { font-size: 16px; font-weight: 600; color: var(--text-1); }
.modal-body { padding: 16px 20px; color: var(--text-2); font-size: 14px; line-height: 1.7; }
.modal-body .modal-detail {
  margin-top: 10px; padding: 10px 12px;
  background: var(--bg-soft); border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 12.5px; color: var(--text-2);
  word-break: break-all;
}
.modal-foot {
  padding: 12px 20px 18px;
  display: flex; gap: 10px; justify-content: flex-end;
  background: var(--bg-soft);
  border-top: 1px solid var(--border-2);
}
.modal-foot .btn { min-width: 80px; }

/* ============ 任务进度条（用户端任务管理） ============
   命名空间 .progress-cell，避开和上传组件的 .progress-bar 冲突 */
.progress-cell {
  display: block;
  min-width: 140px;
}
.progress-cell .progress-bar {
  display: block;
  width: 100%;
  height: 8px;
  background: var(--border-2);
  border-radius: 4px;
  overflow: hidden;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.05);
}
.progress-cell .progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), #4080FF);
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 4px rgba(51, 112, 255, 0.5);
}
.progress-cell .progress-fill.warn   { background: linear-gradient(90deg, #FF7D00, #FFB84D); box-shadow: 0 0 4px rgba(255, 125, 0, 0.5); }
.progress-cell .progress-fill.danger { background: linear-gradient(90deg, #F53F3F, #FF7A7A); box-shadow: 0 0 4px rgba(245, 63, 63, 0.5); }
.progress-cell .progress-text {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  white-space: nowrap;
  color: var(--text-2);
  font-family: var(--font-mono, monospace);
  text-align: right;
}

.layout {
  display: flex;
  flex: 1;
  min-height: calc(100vh - var(--topbar-h));
}
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-card);
  border-right: 1px solid var(--border-1);
  padding: var(--space-4) 0;
  position: sticky;
  top: var(--topbar-h);
  align-self: flex-start;
  height: calc(100vh - var(--topbar-h));
  overflow-y: auto;
}
.sidebar-section { padding: 0 var(--space-3); margin-bottom: var(--space-4); }
.sidebar-title {
  font-size: 12px; color: var(--text-3); padding: var(--space-2) var(--space-3);
  text-transform: none; font-weight: 500;
}
.nav-link {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 8px 12px; margin: 2px 0;
  border-radius: var(--radius-md);
  color: var(--text-2); font-size: 14px;
  transition: all 0.2s ease;
  cursor: pointer;
}
.nav-link:hover { background: var(--bg-hover); color: var(--text-1); }
.nav-link.active {
  background: var(--brand-light); color: var(--brand);
  font-weight: 500;
}
.nav-link .ico { width: 18px; text-align: center; opacity: 0.85; }

.content {
  flex: 1;
  padding: var(--space-6);
  overflow-x: auto;
  min-width: 0;
}
.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-5);
  gap: var(--space-4);
}
.page-title { font-size: 20px; font-weight: 600; color: var(--text-1); }
.page-subtitle { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.breadcrumb { color: var(--text-3); font-size: 13px; margin-bottom: var(--space-3); }
.breadcrumb .sep { margin: 0 6px; }
.breadcrumb .cur { color: var(--text-1); }

/* ============ 卡片 ============ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}
.card-pad { padding: var(--space-5); }
.card-pad-lg { padding: var(--space-6); }
.card-head {
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--border-1);
  display: flex; align-items: center; justify-content: space-between;
}
.card-head h2 { font-size: 15px; font-weight: 600; }
.card-body { padding: var(--space-5); }
.card + .card { margin-top: var(--space-4); }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
}
.stat-label { color: var(--text-3); font-size: 13px; margin-bottom: var(--space-2); }
.stat-value { font-size: 24px; font-weight: 600; color: var(--text-1); line-height: 1.2; }
.stat-value.brand { color: var(--brand); }
.stat-value.success { color: var(--success); }
.stat-value.warning { color: var(--warning); }
.stat-value.error { color: var(--error); }
.stat-foot { color: var(--text-3); font-size: 12px; margin-top: var(--space-2); }

.grid { display: grid; gap: var(--space-4); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-6 { grid-template-columns: repeat(6, 1fr); }
@media (max-width: 1100px) {
  .grid-4, .grid-5, .grid-6 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .grid-2, .grid-3, .grid-4, .grid-5, .grid-6 { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 var(--space-4);
  border: 1px solid var(--border-1);
  background: var(--bg-card);
  color: var(--text-1);
  border-radius: var(--radius-md);
  font-size: 14px; font-family: inherit;
  cursor: pointer; user-select: none;
  transition: all 0.2s ease;
  text-decoration: none;
}
.btn:hover { border-color: var(--brand); color: var(--brand); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-primary {
  background: var(--brand); color: var(--text-on-brand);
  border-color: var(--brand);
}
.btn-primary:hover { background: var(--brand-hover); border-color: var(--brand-hover); color: white; }
.btn-primary:active { background: var(--brand-active); }

.btn-danger {
  background: var(--bg-card); color: var(--error);
  border-color: var(--border-1);
}
.btn-danger:hover { background: var(--error); color: white; border-color: var(--error); }

.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-hover); color: var(--text-1); border-color: transparent; }

.btn-sm { height: 28px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 40px; padding: 0 var(--space-6); font-size: 15px; }
.btn-block { width: 100%; }

/* ============ 表格 ============ */
.tbl-wrap { overflow-x: auto; max-width: 100%; }
table.tbl {
  width: 100%;
  min-width: 1100px;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--bg-card);
  table-layout: auto;
}
table.tbl thead th {
  text-align: left;
  font-weight: 500;
  color: var(--text-2);
  font-size: 13px;
  padding: 12px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border-1);
  white-space: nowrap;
}
table.tbl tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-2);
  color: var(--text-1);
  vertical-align: middle;
  white-space: nowrap;
  word-break: keep-all;
}
table.tbl tbody tr:hover { background: var(--bg-soft); }
table.tbl tbody tr:last-child td { border-bottom: none; }
table.tbl .empty { text-align: center; color: var(--text-3); padding: 32px 16px; }

/* 等宽列对齐 */
.tbl-fixed { table-layout: fixed; }
.tbl-fixed th, .tbl-fixed td { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 视频缩略图 */
.task-thumb { width: 80px; height: 45px; object-fit: cover; border-radius: var(--radius-sm); cursor: pointer; background: #000; }
.task-thumb:hover { opacity: 0.85; }
.thumb-cell { width: 90px; padding: 4px 6px !important; }

/* 积分单元（三行式） */
.credits-cell {
  display: flex; flex-direction: column; gap: 3px;
  font-size: 12px; line-height: 1.5;
  padding: 4px 0;
}
.credits-row { display: flex; align-items: center; gap: 6px; }
.credits-label {
  color: var(--text-3);
  min-width: 30px;
  font-size: 11px;
}
.credits-val {
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, monospace;
}

.text-mono { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 13px; }
.text-muted { color: var(--text-3); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-error { color: var(--error); }
.text-brand { color: var(--brand); }
.text-truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ============ 标签 ============ */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--radius-sm);
  font-size: 12px; line-height: 18px;
  background: var(--bg-hover); color: var(--text-2);
  border: 1px solid transparent;
}
.tag-brand { background: var(--brand-light); color: var(--brand); }
.tag-success { background: var(--success-light); color: var(--success); }
.tag-warning { background: var(--warning-light); color: var(--warning); }
.tag-error { background: var(--error-light); color: var(--error); }
.tag-info { background: var(--info-light); color: var(--info); }

/* ============ 表单 ============ */
.form-row { margin-bottom: var(--space-4); }
.form-label {
  display: block; font-size: 14px; color: var(--text-1);
  margin-bottom: var(--space-2);
  font-weight: 500;
}
.form-help { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.input, .select, .textarea {
  width: 100%;
  height: 32px;
  padding: 4px 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-1);
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.textarea { height: auto; min-height: 80px; padding: 8px 12px; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text-4); }
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(51, 112, 255, 0.12);
}
.input::placeholder { color: var(--text-4); }
.input:disabled, .select:disabled { background: var(--bg-soft); color: var(--text-3); cursor: not-allowed; }

.form-grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-4); }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: var(--space-4); }
.form-grid-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: var(--space-4); }
@media (max-width: 700px) { .form-grid-2, .form-grid-3, .form-grid-4 { grid-template-columns: 1fr; } }

/* v27 权限矩阵 */
.perm-matrix { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.perm-matrix th, .perm-matrix td { padding: 12px 10px; text-align: center; border-bottom: 1px solid var(--border-1, #2a2a2a); }
.perm-matrix thead th { background: var(--bg-soft, #1a1a1a); font-weight: 600; color: var(--text-2, #ccc); position: sticky; top: 0; }
.perm-matrix tbody tr:hover { background: var(--bg-soft, #1a1a1a); }
.perm-matrix td:first-child, .perm-matrix th:first-child { text-align: left; }
.perm-check { display: inline-flex; align-items: center; cursor: pointer; }
.perm-check input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; }

.form-actions {
  display: flex; gap: var(--space-2); justify-content: flex-end;
  margin-top: var(--space-5);
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-2);
}

/* ============ Flash 提示 ============ */
.flash-area { margin-bottom: var(--space-4); }
.flash {
  display: flex; align-items: center; gap: var(--space-2);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  margin-bottom: var(--space-2);
  border: 1px solid;
}
.flash-success { background: var(--success-light); color: var(--success); border-color: #B3E5C0; }
.flash-error { background: var(--error-light); color: var(--error); border-color: #FCCFC9; }
.flash-info { background: var(--brand-light); color: var(--brand); border-color: #B3D5FF; }

/* ============ 空状态 ============ */
.empty {
  padding: var(--space-10) var(--space-5);
  text-align: center; color: var(--text-3); font-size: 14px;
}

/* ============ 登录页 ============ */
.auth-bg {
  min-height: 100vh;
  background: linear-gradient(135deg, #F0F5FF 0%, #F7F8FA 100%);
  display: flex; align-items: center; justify-content: center;
  padding: var(--space-4);
}
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: var(--space-8) var(--space-6);
  border: 1px solid var(--border-1);
}
.auth-logo {
  display: flex; align-items: center; justify-content: center;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.auth-logo .logo {
  width: 36px; height: 36px; border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--brand), #5B8DEF);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 16px;
}
.auth-title { font-size: 20px; font-weight: 600; color: var(--text-1); }
.auth-sub { color: var(--text-3); font-size: 13px; margin-top: 4px; margin-bottom: var(--space-5); text-align: center; }
.auth-foot { text-align: center; color: var(--text-3); font-size: 12px; margin-top: var(--space-4); }

/* ============ 上传/进度 ============ */
.progress {
  width: 100%; height: 6px;
  background: var(--bg-hover);
  border-radius: 999px;
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  background: var(--brand);
  transition: width 0.3s ease;
}

/* ============ 工具 ============ */
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.flex { display: flex; }
.flex-1 { flex: 1; }
.inline-block { display: inline-block; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none; }
.inline { display: inline; }
.space-y-2 > * + * { margin-top: var(--space-2); }
.space-y-3 > * + * { margin-top: var(--space-3); }
.space-y-4 > * + * { margin-top: var(--space-4); }

/* ============ 紧凑按钮（新建用户等） ============ */
.btn-strong { color: var(--text-1); font-weight: 500; }
.btn-primary.btn-strong { color: white; }
.btn:visited { color: var(--text-1); }
.btn-primary:visited { color: white; }

/* ============ 导航红点徽标 ============ */
.nav-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px;
  background: var(--error); color: white;
  font-size: 11px; font-weight: 600; line-height: 1;
  margin-left: auto;
}
.nav-link.active .nav-badge { background: var(--error); color: white; }

/* ============ 拖拽上传区 ============ */
.dropzone {
  border: 2px dashed var(--border-1);
  border-radius: var(--radius-lg);
  padding: var(--space-10) var(--space-6);
  text-align: center;
  background: var(--bg-soft);
  transition: all 0.2s ease;
  cursor: pointer;
}
.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--brand);
  background: var(--brand-soft);
}
.dropzone-icon { font-size: 40px; margin-bottom: var(--space-3); }
.dropzone-text { color: var(--text-2); font-size: 15px; margin-bottom: var(--space-2); }
.dropzone-hint { color: var(--text-3); font-size: 12px; }
.dropzone-link { color: var(--brand); cursor: pointer; }

/* ============ 任务文件列表（多文件上传） ============ */
.file-list { display: flex; flex-direction: column; gap: var(--space-2); }
.file-item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
}
.file-item:hover { border-color: var(--brand); }
.file-item .file-icon {
  width: 36px; height: 36px;
  border-radius: var(--radius-md);
  background: var(--brand-light);
  color: var(--brand);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.file-item .file-info { flex: 1; min-width: 0; }
.file-item .file-name {
  font-size: 14px; color: var(--text-1);
  font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-item .file-meta {
  font-size: 12px; color: var(--text-3);
  margin-top: 2px;
}
.file-item .file-status { font-size: 12px; }
.file-item .file-remove {
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: transparent; border: none;
  color: var(--text-3); font-size: 16px;
  cursor: pointer; transition: all 0.2s ease;
}
.file-item .file-remove:hover { background: var(--error-light); color: var(--error); }

/* ============ 视频对比滑动分隔条 ============ */
.compare-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  user-select: none;
  touch-action: none;
}
.compare-side {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  background: #000;
}
.compare-side video {
  width: 100%; height: 100%; object-fit: contain;
  display: block; background: #000;
  aspect-ratio: 16 / 9;
  min-height: 100%;
}
.compare-side.compare-right { clip-path: inset(0 0 0 50%); }
.compare-side.compare-left { clip-path: inset(0 50% 0 0); }
.compare-label {
  position: absolute; top: 12px; padding: 4px 10px;
  background: rgba(0,0,0,0.6); color: white;
  font-size: 12px; border-radius: var(--radius-sm);
  pointer-events: none; z-index: 2;
}
.compare-label.left { left: 12px; }
.compare-label.right { right: 12px; }
.compare-divider {
  position: absolute; top: 0;
  left: 50%;
  width: 3px; height: 100%;
  background: white;
  transform: translateX(-50%);
  z-index: 3;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(0,0,0,0.4);
}
.compare-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: white;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transform: translate(-50%, -50%);
  z-index: 4;
  cursor: ew-resize;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text-1);
  font-weight: 700;
}
.compare-handle:hover { transform: translate(-50%, -50%) scale(1.1); }

/* ============ Tab 切换 ============ */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--border-1);
  margin-bottom: var(--space-4);
  gap: var(--space-6);
}
.tab-item {
  padding: 10px 0;
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  position: relative;
  transition: color 0.2s ease;
  text-decoration: none;
}
.tab-item:hover { color: var(--text-1); }
.tab-item.active {
  color: var(--brand);
  font-weight: 500;
}
.tab-item.active::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  background: var(--brand);
  border-radius: 2px 2px 0 0;
}

/* ============ 紧凑任务行 ============ */
.task-row {
  display: flex; align-items: center;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border-2);
  font-size: 14px;
}
.task-row:hover { background: var(--bg-soft); }
.task-row .task-id { color: var(--text-3); font-family: monospace; font-size: 12px; min-width: 120px; }
.task-row .task-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row .task-actions { display: flex; gap: var(--space-2); }

/* ============ 单选/复选（增强风格） ============ */
.radio-group, .check-group { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.radio-card, .check-card {
  flex: 1; min-width: 120px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--bg-card);
}
.radio-card:hover, .check-card:hover { border-color: var(--brand); }
.radio-card.selected, .check-card.selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 500;
}
.radio-card-title, .check-card-title { font-size: 14px; margin-bottom: 2px; }
.radio-card-desc, .check-card-desc { font-size: 12px; color: var(--text-3); }
.radio-card.selected .radio-card-desc, .check-card.selected .check-card-desc { color: var(--brand); }

/* ============================================================
   主题切换按钮（顶栏 · 用户信息旁 · 28x28 紧凑型）
   ============================================================ */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 4px;
  background: transparent;
  border: 1px solid var(--border-1);
  cursor: pointer;
  color: var(--text-2);
  padding: 0; line-height: 0;
  transition: all 0.2s ease;
  user-select: none;
}
.theme-toggle:hover {
  background: var(--brand-light);
  color: var(--brand);
  border-color: var(--brand);
}
.theme-toggle .ico-sun, .theme-toggle .ico-moon {
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 14px; line-height: 1;
}
.theme-toggle .ico-sun { display: none; }
.theme-toggle .ico-moon { display: inline-flex; }
html[data-theme="dark"] .theme-toggle .ico-sun { display: inline-flex; }
html[data-theme="dark"] .theme-toggle .ico-moon { display: none; }

/* 主题切换时全局平滑过渡 */
html, body, .topbar, .sidebar, .card, .stat-card, .auth-card,
.btn, .input, .select, .tag, .modal-card, .tab-item, .nav-link,
table.tbl thead th, table.tbl tbody td, .file-item, .dropzone,
.flash, .progress-cell, .progress-cell .progress-bar {
  transition: background-color 0.25s ease, color 0.25s ease,
              border-color 0.25s ease, box-shadow 0.25s ease;
}

/* 深色模式特别修正：某些固定深色渐变（如 brand 渐变填充）保持不变 */
html[data-theme="dark"] .auth-bg {
  background: linear-gradient(135deg, #0F1525 0%, #0F1115 100%);
}
html[data-theme="dark"] .modal-mask {
  background: rgba(0, 0, 0, 0.7);
}
html[data-theme="dark"] .progress-cell .progress-fill {
  box-shadow: 0 0 4px rgba(91, 141, 239, 0.5);
}
html[data-theme="dark"] .topbar-brand .logo {
  background: linear-gradient(135deg, var(--brand), #4080FF);
}
html[data-theme="dark"] .auth-logo .logo {
  background: linear-gradient(135deg, var(--brand), #5B8DEF);
}
html[data-theme="dark"] .compare-wrap,
html[data-theme="dark"] .compare-side { background: #000; }
html[data-theme="dark"] .compare-side video { background: #000; }
html[data-theme="dark"] .flash-success { border-color: #1F5C2D; }
html[data-theme="dark"] .flash-error   { border-color: #5C1F1F; }
html[data-theme="dark"] .flash-info    { border-color: #1F3D5C; }

/* ============================================================
   套餐卡片（稳定版 · 用户端 + 管理端共用）
   ============================================================ */
.pkg-card-stable {
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  display: flex; flex-direction: column;
  transition: all 0.25s ease;
  min-height: 480px;
  position: relative;
}
.pkg-card-stable:hover {
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(51, 112, 255, 0.12);
}
.pkg-card-stable .pkg-head {
  text-align: center; padding-bottom: 20px;
  border-bottom: 1px solid var(--border-2); margin-bottom: 20px;
}
.pkg-card-stable .pkg-name { font-size: 20px; font-weight: 600; margin: 0 0 8px; color: var(--text-1); }
.pkg-card-stable .pkg-tag { display: inline-block; font-size: 11px; padding: 2px 10px; border-radius: 999px; }
.pkg-card-stable .pkg-tag-monthly   { background: var(--brand-light); color: var(--brand); }
.pkg-card-stable .pkg-tag-quarterly { background: var(--success-light); color: var(--success); }
.pkg-card-stable .pkg-tag-yearly    { background: var(--warning-light); color: var(--warning); }

.pkg-card-stable .pkg-price { text-align: center; margin: 0 0 24px; }
.pkg-card-stable .pkg-price .cur { font-size: 16px; color: var(--text-3); vertical-align: top; line-height: 2.4; }
.pkg-card-stable .pkg-price .num { font-size: 44px; font-weight: 700; color: var(--brand); margin: 0 4px; line-height: 1; }
.pkg-card-stable .pkg-price .unit { font-size: 13px; color: var(--text-3); }

.pkg-card-stable .pkg-features { list-style: none; padding: 0; margin: 0 0 20px; }
.pkg-card-stable .pkg-features li {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; font-size: 13px; color: var(--text-2);
  border-bottom: 1px dashed var(--border-2);
}
.pkg-card-stable .pkg-features li:last-child { border-bottom: none; }
.pkg-card-stable .pkg-features li b { color: var(--text-1); font-weight: 600; }
.pkg-card-stable .pkg-features li .ico { color: var(--success); margin-right: 6px; }

.pkg-card-stable .pkg-desc {
  font-size: 12px; color: var(--text-3); line-height: 1.6;
  padding: 12px 0; border-top: 1px dashed var(--border-2); margin-bottom: 16px;
  min-height: 60px;
}
.pkg-card-stable .pkg-action { margin-top: auto; }
.pkg-card-stable .pkg-action .btn { width: 100%; }

/* 我的套餐 banner */
.my-pkg-banner-stable {
  background: linear-gradient(135deg, var(--brand-soft), var(--bg-card));
  border: 1px solid var(--brand);
  border-radius: var(--radius-lg);
  padding: 24px 28px; margin-bottom: 24px;
}
.my-pkg-banner-stable .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; gap: 12px; }
.my-pkg-banner-stable .head .left { display: flex; align-items: center; gap: 10px; }
.my-pkg-banner-stable .head .pkg-name { font-size: 18px; font-weight: 600; }
.my-pkg-banner-stable .head .expire { font-size: 12px; color: var(--text-3); }
.my-pkg-banner-stable .stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px;
}
@media (max-width: 900px) { .my-pkg-banner-stable .stats { grid-template-columns: repeat(2, 1fr); } }
.my-pkg-banner-stable .stat .lbl { font-size: 12px; color: var(--text-3); margin-bottom: 4px; }
.my-pkg-banner-stable .stat .val { font-size: 24px; font-weight: 600; color: var(--brand); }

/* 套餐卡片栅格 */
.pkg-grid-stable {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
@media (max-width: 1100px) { .pkg-grid-stable { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .pkg-grid-stable { grid-template-columns: 1fr; } }

/* ============================================================
   套餐 radio 卡片（管理端 - 稳定版）
   ============================================================ */
.pkg-radio-grid-stable {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px;
}
@media (max-width: 1100px) { .pkg-radio-grid-stable { grid-template-columns: 1fr 1fr; } }
.pkg-radio-stable { display: block; cursor: pointer; }
.pkg-radio-stable input { position: absolute; opacity: 0; pointer-events: none; }
.pkg-radio-stable .inner {
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 16px;
  background: var(--bg-card);
  transition: all 0.2s ease;
}
.pkg-radio-stable:hover .inner { border-color: var(--brand); }
.pkg-radio-stable input:checked + .inner {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-light);
  background: var(--brand-soft);
}
.pkg-radio-stable .name { font-size: 14px; font-weight: 600; color: var(--text-1); }
.pkg-radio-stable .price { font-size: 22px; font-weight: 700; color: var(--brand); margin: 6px 0; }
.pkg-radio-stable .price .cur { font-size: 12px; }
.pkg-radio-stable .list { font-size: 12px; color: var(--text-2); line-height: 1.7; margin: 8px 0 0; padding: 0; list-style: none; }
.pkg-radio-stable .list li:before { content: '✓ '; color: var(--success); }

/* ============================================================
   计费规则列表（管理端 - 卡片式行）
   ============================================================ */
.rule-row-card {
  background: var(--bg-card); border: 1px solid var(--border-1);
  border-radius: var(--radius-md); padding: 16px 20px;
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr 1fr 220px; gap: 12px; align-items: center;
  margin-bottom: 12px;
  transition: all 0.2s ease;
}
.rule-row-card:hover { border-color: var(--brand); }
@media (max-width: 1280px) { .rule-row-card { grid-template-columns: 1fr 1fr 1fr; row-gap: 8px; } }
.rule-row-card .field { display: flex; flex-direction: column; }
.rule-row-card .field .lbl { font-size: 11px; color: var(--text-3); }
.rule-row-card .field .val { font-size: 14px; color: var(--text-1); font-weight: 500; margin-top: 2px; }
.rule-row-card .field .val.brand { color: var(--brand); }
.rule-row-card .actions { display: flex; gap: 6px; }
.rule-row-card .tag { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 3px; }
.rule-row-card .tag-default { background: var(--bg-hover); color: var(--text-2); }

/* ============================================================
   分页组件（通用）
   ============================================================ */
.pagination-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; margin-top: 16px; gap: 16px; flex-wrap: wrap;
  border-top: 1px solid var(--border-2);
}
.pagination-info { color: var(--text-3); font-size: 13px; }
.pagination-info b { color: var(--text-1); font-weight: 600; }
.pagination {
  display: inline-flex; gap: 4px; align-items: center;
}
.pg-btn {
  min-width: 32px; height: 32px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; color: var(--text-2);
  background: var(--bg-card); border: 1px solid var(--border-1);
  border-radius: var(--radius-sm); cursor: pointer;
  text-decoration: none; user-select: none;
  transition: all 0.15s ease;
}
.pg-btn:hover:not(.disabled):not(.active) {
  border-color: var(--brand); color: var(--brand); background: var(--brand-soft);
}
.pg-btn.active {
  background: var(--brand); color: #fff; border-color: var(--brand);
  font-weight: 600;
}
.pg-btn.disabled {
  color: var(--text-4); cursor: not-allowed; background: var(--bg-soft);
}
.pg-ellipsis {
  min-width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 13px;
}
.pagination-jump {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-3); font-size: 13px;
}
.pagination-jump input {
  width: 56px; height: 32px; padding: 0 8px;
  text-align: center; font-size: 13px;
  border: 1px solid var(--border-1); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-1);
}
.pagination-jump input:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
@media (max-width: 700px) {
  .pagination-bar { flex-direction: column; align-items: stretch; }
  .pagination { justify-content: center; }
  .pagination-jump { justify-content: center; }
}

/* ============================================================
   套餐类型色块
   ============================================================ */
.pkg-color-dot {
  display: inline-block; width: 16px; height: 16px; border-radius: 4px;
  vertical-align: middle; box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3px var(--border-1);
}
.pkg-color-dot.pkg-color-brand   { background: var(--brand); }
.pkg-color-dot.pkg-color-success { background: var(--success); }
.pkg-color-dot.pkg-color-warning { background: var(--warning); }
.pkg-color-dot.pkg-color-error   { background: var(--error); }

/* ============================================================
   每页数量切换（与分页栏并列）
   ============================================================ */
.per-page-form {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-3); font-size: 13px;
  padding: 12px 16px;
}
.per-page-form .select {
  height: 32px; padding: 0 8px;
  border: 1px solid var(--border-1); border-radius: var(--radius-sm);
  background: var(--bg-card); color: var(--text-1);
  font-size: 13px; cursor: pointer;
}
.per-page-form .select:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-light);
}
@media (max-width: 700px) {
  .per-page-form { margin-left: 0; justify-content: center; }
}

/* ============================================================
   card-foot 容器（分页/底部工具）
   ============================================================ */
.card-foot {
  border-top: 1px solid var(--border-2);
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.card-foot .pagination-bar {
  border-top: none; padding: 12px 16px; margin: 0; flex: 1; min-width: 0;
}

/* ============================================================
   数据看板（agent_dashboard.html 用）
   ============================================================ */
.dash-trend-bar {
  display: inline-block;
  height: 8px;
  background: var(--brand);
  border-radius: 4px;
  vertical-align: middle;
  margin-left: 8px;
}
.dash-trend-bar.warn { background: #FF7D00; }
.dash-trend-bar.success { background: #00B42A; }
.dash-trend-bar.error { background: #F53F3F; }
.alert-card {
  border-left: 3px solid var(--brand);
  padding: 10px 12px;
  background: var(--bg-2);
  border-radius: 6px;
  margin-bottom: 8px;
}
.alert-card-warning { border-left-color: #FF7D00; }
.alert-card-error { border-left-color: #F53F3F; }
.dash-mono { font-family: var(--font-mono, "SF Mono", Menlo, monospace); }

/* 数据看板专用 — 统一数字字号 */
.dash-stat-value {
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-1);
  font-family: var(--font-mono, "SF Mono", Menlo, monospace);
}
.dash-stat-value.brand { color: var(--brand); }
.dash-stat-value.success { color: var(--success); }
.dash-stat-value.warning { color: var(--warning); }
.dash-stat-value.error { color: var(--error); }
.dash-stat-value.info { color: var(--info); }

/* 数据看板 - 趋势卡 子项 */
.dash-mini-stat {
  padding: 12px;
  background: var(--bg-soft);
  border-radius: 6px;
  display: flex; flex-direction: column; gap: 4px;
}
.dash-mini-stat .mini-label { font-size: 12px; color: var(--text-3); }
.dash-mini-stat .mini-value { font-size: 20px; font-weight: 600; font-family: var(--font-mono, "SF Mono", Menlo, monospace); }
.dash-mini-stat .mini-value.brand { color: var(--brand); }
.dash-mini-stat .mini-value.success { color: var(--success); }
.dash-mini-stat .mini-value.warning { color: var(--warning); }
.dash-mini-stat .mini-value.info { color: var(--info); }

/* 水平进度条（占比 / 趋势） */
.dash-progress {
  display: inline-block;
  height: 6px;
  background: var(--border-2);
  border-radius: 3px;
  overflow: hidden;
  width: 60px;
  margin-right: 6px;
  vertical-align: middle;
}
.dash-progress > span {
  display: block;
  height: 100%;
  background: var(--brand);
  border-radius: 3px;
}
.dash-progress.warn > span { background: var(--warning); }
.dash-progress.success > span { background: var(--success); }
.dash-progress.error > span { background: var(--error); }

/* 时间范围筛选 */
.dash-filter-bar {
  display: flex; align-items: center; gap: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border-1);
  border-radius: var(--radius-md);
  padding: 4px;
}
.dash-filter-bar .seg {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
  background: transparent;
  border: none;
  font-family: inherit;
}
.dash-filter-bar .seg:hover { color: var(--text-1); background: var(--bg-hover); }
.dash-filter-bar .seg.active { background: var(--brand); color: #fff; }

/* ============ SVG Icon System (Lucide) ============ */
svg.cv-icon {
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
  flex-shrink: 0;
}

/* Icon containers: flex so SVG sizes correctly */
.ico, .sub-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Nav / sidebar icon sizing */
.nav-link .ico svg,
.sidebar-section .ico svg,
.subsystem-tab .sub-icon svg {
  width: 18px;
  height: 18px;
}

/* Theme & layout toggle icons */
.theme-toggle svg,
.nav-layout-toggle svg {
  width: 15px;
  height: 15px;
}
.theme-toggle .ico-sun,
.theme-toggle .ico-moon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Stat card icon */
.stat-icon svg {
  width: 32px;
  height: 32px;
}

/* Modal icon */
.modal-icon svg {
  width: 22px;
  height: 22px;
}

/* Empty state icon */
.empty-icon svg {
  width: 48px;
  height: 48px;
  color: var(--text-3);
}

/* Step badge (form section numbers, replaces ①②③④⑤) */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-light);
  color: var(--brand);
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}

/* Dot indicator (alert level, replaces 🔴🟠🔵) */
.dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 4px;
  flex-shrink: 0;
}
.dot-error   { background: var(--error); }
.dot-warning { background: var(--warning); }
.dot-info    { background: var(--brand); }
.dot-success { background: var(--success); }

/* File icon in upload list */
.file-icon svg {
  width: 36px;
  height: 36px;
}

/* Password toggle icon */
.pwd-toggle svg {
  width: 20px;
  height: 20px;
}

