*{margin:0;padding:0;box-sizing:border-box}
    :root{
      --bg:#f4f7fb;
      --card:#ffffff;
      --text:#1f2937;
      --muted:#6b7280;
      --line:#e5e7eb;
      --primary:#2563eb;
      --primary-hover:#1d4ed8;
      --success:#16a34a;
      --danger:#dc2626;
      --gray:#6b7280;
      --warning:#f59e0b;
      --radius:10px;
      --shadow:0 4px 16px rgba(15,23,42,.05);
    }

    body{
      font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Arial,sans-serif;
      background:var(--bg);
      font-size:12px;
      color:var(--text);
    }

    .header{
      min-height:54px;
      background:rgba(255,255,255,.96);
      backdrop-filter:blur(8px);
      display:flex;
      align-items:center;
      justify-content:space-between;
      padding:8px 14px;
      border-bottom:1px solid var(--line);
      position:sticky;
      top:0;
      z-index:20;
      gap:10px;
      flex-wrap:wrap;
    }

    .title-wrap{
      display:flex;
      align-items:center;
      gap:8px;
    }

    .logo{
      width:28px;
      height:28px;
      border-radius:8px;
      background:linear-gradient(135deg,#2563eb,#60a5fa);
      color:#fff;
      display:flex;
      align-items:center;
      justify-content:center;
      font-weight:700;
      font-size:13px;
    }

    .title{font-size:14px;font-weight:700}
    .sub{font-size:10px;color:var(--muted);margin-top:2px}

    .top-tools{
      display:flex;
      gap:6px;
      flex-wrap:wrap;
      align-items:center;
    }

    .btn{
      border:none;
      border-radius:8px;
      padding:6px 10px;
      cursor:pointer;
      font-size:12px;
      font-weight:600;
      transition:.15s;
      white-space:nowrap;
    }

    .btn:hover{transform:translateY(-1px)}
    .btn.primary{background:var(--primary);color:#fff}
    .btn.primary:hover{background:var(--primary-hover)}
    .btn.green{background:var(--success);color:#fff}
    .btn.gray{background:var(--gray);color:#fff}
    .btn.red{background:var(--danger);color:#fff}
    .btn.orange{background:var(--warning);color:#fff}

    .input, select.input{
      height:30px;
      border:1px solid var(--line);
      border-radius:8px;
      background:#fff;
      padding:0 8px;
      outline:none;
      font-size:12px;
      transition:.15s;
    }

    .input:focus, select.input:focus{
      border-color:#93c5fd;
      box-shadow:0 0 0 3px rgba(37,99,235,.08);
    }

    .header .mini-input{width:120px}
    .header .mini-select{width:110px}
    .header .mini-date{width:125px}
    .header .file-wrap{
      display:flex;
      align-items:center;
      gap:5px;
    }

    .container{padding:10px}

    .panel{
      background:var(--card);
      border:1px solid var(--line);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      padding:10px;
      margin-bottom:8px;
    }

    .panel-title{
      font-size:12px;
      font-weight:700;
      margin-bottom:8px;
    }

    .msg{
      margin-top:6px;
      font-size:11px;
      color:var(--muted);
      min-height:14px;
    }

    .edit-bar{
      margin-top:6px;
      font-size:11px;
      color:#b45309;
      background:#fff7ed;
      border:1px solid #fed7aa;
      padding:6px 8px;
      border-radius:8px;
    }

    .quick-group{
      display:flex;
      flex-wrap:wrap;
      gap:6px;
      margin-top:6px;
    }

    .quick-group .btn{
      padding:5px 8px;
      font-size:11px;
    }

    .form-row{
      display:flex;
      gap:10px;
      flex-wrap:wrap;
      align-items:flex-end;
    }

    .form-item{
      display:flex;
      flex-direction:column;
      gap:4px;
      width:160px;
    }

    .form-item label{
      font-size:10px;
      color:var(--muted);
      font-weight:600;
    }

    .form-item.channel{width:220px}
    .form-item.long{width:220px}
    .form-item.mid{width:180px}
    .form-item.short{width:130px}
    .form-item.date{width:140px}
    .form-item.money{width:140px}
    .form-item.actions{
      width:auto;
      display:flex;
      flex-direction:row;
      gap:6px;
      align-items:flex-end;
      padding-top:14px;
    }

.stats{
  display:grid;
  grid-template-columns:repeat(11,1fr);
  gap:8px;
  margin-bottom:8px;
}
    .stat{
      background:var(--card);
      border:1px solid var(--line);
      border-radius:10px;
      padding:10px;
      box-shadow:var(--shadow);
    }

    .stat .label{
      color:var(--muted);
      font-size:10px;
    }

    .stat .num{
      font-size:18px;
      font-weight:800;
      margin-top:5px;
    }

.profit-positive {
  color: #16a34a;
}

.profit-negative {
  color: #dc2626;
}

    .table-panel{
      background:var(--card);
      border:1px solid var(--line);
      border-radius:var(--radius);
      box-shadow:var(--shadow);
      overflow:hidden;
    }

    .table-head{
      padding:8px 10px;
      border-bottom:1px solid var(--line);
      display:flex;
      justify-content:space-between;
      align-items:center;
      flex-wrap:wrap;
      gap:8px;
    }

    .table-wrap{overflow:auto}

    table{
      width:100%;
      min-width:1950px;
      border-collapse:collapse;
      font-size:12px;
    }

    th,td{
      border-bottom:1px solid #edf0f4;
      padding:8px 6px;
      text-align:center;
      white-space:nowrap;
    }

    th{
      background:#f8fafc;
      color:#475569;
      font-weight:700;
      cursor:pointer;
      user-select:none;
    }

    tr:hover td{background:#fafcff}

    .empty{
      padding:16px;
      text-align:center;
      color:#94a3b8;
    }

    .pagination{
      display:flex;
      justify-content:space-between;
      align-items:center;
      padding:8px 10px;
      border-top:1px solid var(--line);
      background:#fff;
      flex-wrap:wrap;
      gap:8px;
    }

    .page-info{
      color:var(--muted);
      font-size:11px;
    }

    @media (max-width: 1280px){
      .stats{grid-template-columns:repeat(3,1fr)}
    }

    @media (max-width: 768px){
      .stats{grid-template-columns:repeat(2,1fr)}
    }
/* ===== 专业报表感升级 ===== */

th[data-sort]{
  cursor:pointer;
  user-select:none;
  transition:all .2s ease;
  white-space:nowrap;
}

th[data-sort]:hover{
  background:#f5f7fb;
  color:#1677ff;
}

th.sorted{
  color:#1677ff;
  font-weight:700;
  background:#eef4ff;
}

.table-wrap table tbody tr{
  transition:background .2s ease, box-shadow .2s ease;
}

.table-wrap table tbody tr:hover{
  background:#f8fbff;
}

.num-cell{
  text-align:right;
  font-variant-numeric: tabular-nums;
  white-space:nowrap;
}

.table-wrap table th,
.table-wrap table td{
  white-space:nowrap;
}

.table-wrap{
  overflow:auto;
  border-radius:12px;
}

.table-wrap table{
  min-width:1800px;
}

/* ===== 报表系统增强美化（保留原字号版） ===== */

/* 整体留白更舒服 */
.container{
  gap: 12px;
}

/* 面板更像后台系统 */
.panel,
.table-panel{
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(15, 23, 42, 0.05);
  border: 1px solid #eef2f7;
}

/* 面板标题：恢复原来大小 */
.panel-title,
.section-title{
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
}

/* 顶部统计卡片 */
.stats{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.stat{
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid #edf2f7;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: all .2s ease;
}

.stat:hover{
  transform: translateY(-1px);
  box-shadow: 0 5px 12px rgba(15, 23, 42, 0.07);
}

.stat .label{
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 6px;
}

.stat .num{
  font-size: 18px;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
  font-variant-numeric: tabular-nums;
}

/* 正负数 */
.profit-positive{
  color: #16a34a !important;
}

.profit-negative{
  color: #dc2626 !important;
}

/* 表格容器 */
.table-wrap{
  overflow: auto;
  border-radius: 10px;
  border: 1px solid #eef2f7;
}

/* 表格基础 */
.table-wrap table{
  width: 100%;
  min-width: 1900px;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
}

/* 表头 */
.table-wrap thead th{
  position: sticky;
  top: 0;
  z-index: 3;
  background: #ffffff;
  color: #374151;
  font-weight: 700;
  font-size: 12px;
  border-bottom: 1px solid #e5e7eb;
  white-space: nowrap;
  padding: 10px 8px;
  text-align: center;
}

/* 可排序表头 */
th[data-sort]{
  cursor: pointer;
  user-select: none;
  transition: all .2s ease;
}

th[data-sort]:hover{
  background: #f5f7fb;
  color: #1677ff;
}

th.sorted{
  color: #1677ff;
  background: #eef4ff !important;
}

/* 表格内容 */
.table-wrap tbody td{
  padding: 8px 8px;
  border-bottom: 1px solid #f1f5f9;
  white-space: nowrap;
  color: #1f2937;
  font-size: 12px;
  background: #fff;
}

/* 行 hover */
.table-wrap tbody tr{
  transition: background .18s ease;
}

.table-wrap tbody tr:hover td{
 background:#dbeafe;
}

/* 数字列右对齐 */
.num-cell{
    text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 空数据 */
.empty{
  text-align: center;
  color: #9ca3af;
  padding: 24px 0 !important;
}

/* 操作列固定 */
.table-wrap th:last-child,
.table-wrap td:last-child{
  position: sticky;
  right: 0;
  z-index: 2;
  background: #fff;
  box-shadow: -6px 0 8px rgba(15, 23, 42, 0.03);
}

.table-wrap tbody tr:hover td:last-child{
  background: #f8fbff;
}

/* 第一列勾选框固定 */
.table-wrap th:first-child,
.table-wrap td:first-child{
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 6px 0 8px rgba(15, 23, 42, 0.03);
}

.table-wrap tbody tr:hover td:first-child{
  background: #f8fbff;
}

/* 按钮统一 */
.btn{
  border-radius: 8px;
  font-weight: 600;
  font-size: 12px;
  transition: all .18s ease;
}

.btn:hover{
  transform: translateY(-1px);
}

/* 顶部工具区、筛选区更整齐 */
.form-row{
  gap: 10px;
  flex-wrap: wrap;
}

.form-item label{
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 5px;
  display: block;
}

/* 输入框更精致 */
.input{
  border: 1px solid #dbe3ee;
  border-radius: 8px;
  background: #fff;
  font-size: 12px;
  transition: all .18s ease;
}

.input:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
  outline: none;
}

/* 表格头部区域 */
.table-head,
.section-header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

/* 分页区域 */
.pagination{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 10px;
}

.page-info{
  color: #6b7280;
  font-size: 12px;
}

/* 快捷按钮组 */
.quick-group{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

/* 消息提示 */
.msg{
  margin-top: 8px;
  color: #6b7280;
  font-size: 12px;
}

.action-cell{
  white-space: nowrap;
  text-align:center;
}

.action-cell .btn{
  margin:0 3px;
}

.action-cell{
  min-width:120px;
}




.btn.danger{background:var(--danger);color:#fff}
.btn.danger:hover{background:#b91c1c}

.form-item.operator-picker-item{
  width:220px;
}

.picker-box{
  position:relative;
  width:100%;
}

.picker-display{
  min-height:30px;
  border:1px solid #dbe3ee;
  border-radius:8px;
  background:#fff;
  padding:0 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  cursor:pointer;
  user-select:none;
}

.picker-display:hover{
  border-color:#93c5fd;
}

.picker-panel{
  position:absolute;
  top:36px;
  left:0;
  width:560px;
  max-width:calc(100vw - 40px);
  background:#fff;
  border:1px solid #dbe3ee;
  border-radius:12px;
  box-shadow:0 12px 30px rgba(15,23,42,.12);
  padding:10px;
  z-index:999;
}

.picker-search{
  width:100%;
  margin-bottom:8px;
}

.operator-grid{
  display:grid;
  grid-template-columns:repeat(5, 1fr);
  gap:8px;
  max-height:320px;
  overflow:auto;
}

.operator-option{
  border:1px solid #dbe3ee;
  background:#fff;
  border-radius:10px;
  height:38px;
  padding:0 8px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.operator-option:hover{
  border-color:#93c5fd;
  background:#eff6ff;
  color:#2563eb;
}

.operator-option.active{
  background:#2563eb;
  color:#fff;
  border-color:#2563eb;
}

.operator-empty{
  color:#94a3b8;
  padding:12px 0;
  grid-column:1 / -1;
  text-align:center;
}

.remark-cell{
  display:inline-block;
  width:20px;
  max-width:20px;
  min-width:20px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  text-align:left;
  vertical-align:middle;
  cursor:text;
}

.remark-placeholder{
  color:#9ca3af;
}

@media (max-width: 1280px){
  .operator-grid{
    grid-template-columns:repeat(4, 1fr);
  }
  .picker-panel{
    width:540px;
  }
}

@media (max-width: 900px){
  .operator-grid{
    grid-template-columns:repeat(3, 1fr);
  }
  .picker-panel{
    width:460px;
  }
}

@media (max-width: 640px){
  .operator-grid{
    grid-template-columns:repeat(2, 1fr);
  }
  .picker-panel{
    width:calc(100vw - 40px);
  }
}


.remark-td{
  min-width:30px;
  cursor:text;
}

.remark-td:hover{
  background:#f8fbff;
}


.picker-display{
  padding: 0 8px;
  height: 30px;
}

.picker-arrow{
  font-size: 11px;
}

#operatorPickerText{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}


/* ===== 轻量美化补充 ===== */
.panel,
.table-panel,
.stat{
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.panel:hover,
.table-panel:hover{
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.07);
}

.table-wrap tbody tr{
  transition: transform .14s ease, background .18s ease;
}

.table-wrap tbody tr:hover{
  transform: translateY(-1px);
}

.btn{
  position: relative;
  overflow: hidden;
}

.btn::after{
  content:'';
  position:absolute;
  inset:0;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.18), transparent);
  transform:translateX(-140%);
  transition:transform .45s ease;
  pointer-events:none;
}

.btn:hover::after{
  transform:translateX(140%);
}

.form-item.operator-picker-item{
  width: 178px;
}

.picker-panel{
  animation: pickerDrop .16s ease;
}

@keyframes pickerDrop{
  from{opacity:0;transform:translateY(-4px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}

.score-good{
  color:#16a34a;
  font-weight:700;
}

.score-mid{
  color:#f59e0b;
  font-weight:700;
}

.score-bad{
  color:#dc2626;
  font-weight:700;
}

.score-cell{
  font-variant-numeric: tabular-nums;
}
/* 评分颜色 */

.score-bad{
 color:#dc2626;
 font-weight:700;
}

.score-mid{
 color:#f59e0b;
 font-weight:700;
}

.score-good{
 color:#16a34a;
 font-weight:700;
}
/* 快捷日期按钮 */

.quick-btn{

background:#eef4ff;

color:#335277;

border:1px solid #d9e7ff;

border-radius:10px;

padding:6px 12px;

font-weight:700;

}
.quick-btn:hover{

background:#dbeafe;

color:#1d4ed8;

border-color:#bfdbfe;

}
/* 日期框 */

input[type="date"].input{

height:32px;

padding:0 10px;

border:1px solid #dbe3ee;

border-radius:10px;

background:#fff;

color:#1f2937;

}
.score-bad{
color:#dc2626 !important;
font-weight:700;
}

.score-mid{
color:#f59e0b !important;
font-weight:700;
}

.score-good{
color:#16a34a !important;
font-weight:700;
}
#dateRange{
  cursor:pointer;
  min-width:260px;
  background:#fff;
}
/* 日期输入框美化 */
input[type="date"].input{
  height: 34px;
  padding: 0 12px;
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  background: #ffffff;
  color: #1f2937;
  font-size: 12px;
  transition: all .18s ease;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

input[type="date"].input:hover{
  border-color: #bfd7ff;
  background: #f8fbff;
}

input[type="date"].input:focus{
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14);
  outline: none;
}

/* WebKit 日历图标稍微顺一点 */
input[type="date"].input::-webkit-calendar-picker-indicator{
  cursor: pointer;
  opacity: .75;
  transition: opacity .18s ease;
}

input[type="date"].input::-webkit-calendar-picker-indicator:hover{
  opacity: 1;
}

/* ===== 本次修复补丁 ===== */
#metaType, #type, #searchType {
  width: 100%;
}

.remark-cell {
  width: 2.2em;
  max-width: 2.2em;
  min-width: 2.2em;
}

.remark-td {
  min-width: 42px;
}

th[data-sort="remark"] {
  cursor: pointer;
}

/* 类型选择器：和推量人选择器保持一致 */
.form-item.type-picker-item{ width:178px; }
.type-picker-panel{ width:420px; }
.type-grid{ grid-template-columns:repeat(4, 1fr); }
#typePickerText{
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
@media (max-width: 900px){
  .type-picker-panel{ width:360px; }
  .type-grid{ grid-template-columns:repeat(3, 1fr); }
}
@media (max-width: 640px){
  .type-picker-panel{ width:calc(100vw - 40px); }
  .type-grid{ grid-template-columns:repeat(2, 1fr); }
}


/* 查询中转圈提示 */
.loading-spinner{
  display:inline-block;
  width:12px;
  height:12px;
  margin-right:6px;
  border:2px solid rgba(37,99,235,0.22);
  border-top-color:#2563eb;
  border-radius:50%;
  vertical-align:-2px;
  animation: loadingSpin .75s linear infinite;
}

@keyframes loadingSpin{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

/* 当前筛选框：矮版 */
.filter-status,
#filterStatus{
  display:block !important;
  margin-top:6px !important;
  margin-bottom:8px !important;
  padding:6px 12px !important;
  border:1px solid rgba(37,99,235,0.14) !important;
  border-radius:10px !important;
  background:#fff !important;
  color:#475569 !important;
  font-size:12px !important;
  line-height:1.4 !important;
  box-shadow:0 1px 4px rgba(15,23,42,0.04) !important;
}


/* =========================================================
   仅调整：渠道归属设置 + 成本录入 / 编辑 左右并排
   其他区域不改动
   ========================================================= */

.maintenance-inline-row{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:8px;
  padding:8px 10px 0;
  align-items:stretch;
}

.maintenance-inline-col{
  min-width:0;
}

.maintenance-inline-col .panel{
  height:100%;
  margin-bottom:8px;
}

/* 并排后表单更紧凑一点，只作用于这两块 */
.maintenance-inline-row .form-row{
  gap:8px;
}

.maintenance-inline-row .form-item{
  min-width:0;
}

.maintenance-inline-row .form-item.mid{
  width:145px;
}

.maintenance-inline-row .form-item.channel{
  width:170px;
}

.maintenance-inline-row .form-item.date{
  width:125px;
}

.maintenance-inline-row .form-item.money{
  width:120px;
}

.maintenance-inline-row .form-item.short{
  width:105px;
}

.maintenance-inline-row .form-item.actions{
  width:auto;
}

@media (max-width: 1200px){
  .maintenance-inline-row{
    grid-template-columns:1fr;
  }
}


/* =========================================================
   本次微调：
   1. 隐藏空渠道 / 隐藏无消费 移到快捷日期后
   2. 补回数据总表斑马纹
   3. 数据总表行高稍微压小
   ========================================================= */

/* 快捷筛选里的隐藏按钮 */
.quick-group .filter-toggle-btn{
  background:#eef4ff !important;
  color:#335277 !important;
  border:1px solid #d9e7ff !important;
  border-radius:999px !important;
  padding:5px 10px !important;
  font-size:11px !important;
  font-weight:700 !important;
}

.quick-group .filter-toggle-btn.active{
  background:#2563eb !important;
  color:#fff !important;
  border-color:#2563eb !important;
}

/* 数据总表斑马纹 */
.table-wrap tbody tr:nth-child(odd) td{
  background:#ffffff !important;
}

.table-wrap tbody tr:nth-child(even) td{
  background:rgba(37,99,235,0.035) !important;
}

.table-wrap tbody tr:hover td{
  background:rgba(37,99,235,0.085) !important;
}

/* 数据总表高度压小一点 */
.table-wrap tbody td{
  padding-top:6px !important;
  padding-bottom:6px !important;
  line-height:1.25 !important;
}

.table-wrap thead th{
  padding-top:7px !important;
  padding-bottom:7px !important;
  line-height:1.25 !important;
}

/* 表格按钮也稍微压小 */
.action-cell .btn{
  padding:5px 8px !important;
  font-size:11px !important;
  margin:0 2px !important;
}

/* 分页区域压小一点 */
.pagination{
  padding:6px 10px !important;
}


/* =========================================================
   UI PRO V1：现代数据后台视觉升级
   说明：
   - 只改视觉，不改功能
   - 不改接口、不改字段、不改按钮事件
   - 保留现有所有功能
   ========================================================= */

body.ui-pro-v1{
  --bg:#f6f8fb;
  --card:#ffffff;
  --text:#111827;
  --muted:#64748b;
  --line:#e6ebf2;
  --line-soft:#f0f3f8;
  --primary:#2563eb;
  --primary-soft:#eff6ff;
  --success:#16a34a;
  --danger:#dc2626;
  --warning:#d97706;
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.055), transparent 320px),
    linear-gradient(180deg,#f8fafc 0%,#f4f7fb 100%);
  color:var(--text);
  font-size:12px;
}

/* 顶部导航：更像数据产品 */
body.ui-pro-v1 .header{
  min-height:50px;
  padding:7px 12px;
  background:rgba(255,255,255,.86);
  backdrop-filter:blur(14px);
  border-bottom:1px solid rgba(226,232,240,.9);
  box-shadow:0 1px 10px rgba(15,23,42,.035);
}

body.ui-pro-v1 .logo{
  width:28px;
  height:28px;
  border-radius:7px;
  background:linear-gradient(135deg,#1d4ed8,#60a5fa);
  box-shadow:0 6px 16px rgba(37,99,235,.2);
}

body.ui-pro-v1 .title{
  font-size:14px;
  letter-spacing:.2px;
}

body.ui-pro-v1 .sub{
  color:#94a3b8;
}

/* 顶部按钮与输入框更轻 */
body.ui-pro-v1 .top-tools{
  gap:5px;
}

body.ui-pro-v1 .btn{
  border-radius:7px;
  padding:5px 9px;
  font-size:11px;
  font-weight:700;
  box-shadow:none;
}

body.ui-pro-v1 .btn:hover{
  transform:translateY(-1px);
  filter:saturate(1.04);
}

body.ui-pro-v1 .btn.primary{
  background:#2563eb;
  color:#fff;
}

body.ui-pro-v1 .btn.green{
  background:#059669;
  color:#fff;
}

body.ui-pro-v1 .btn.orange{
  background:#d97706;
  color:#fff;
}

body.ui-pro-v1 .btn.gray{
  background:#475569;
  color:#fff;
}

body.ui-pro-v1 .btn.red,
body.ui-pro-v1 .btn.danger{
  background:#dc2626;
  color:#fff;
}

/* 输入框统一 */
body.ui-pro-v1 .input,
body.ui-pro-v1 select.input,
body.ui-pro-v1 input[type="date"].input,
body.ui-pro-v1 .picker-display{
  height:30px;
  border:1px solid #d8e0eb;
  border-radius:7px;
  background:#fff;
  color:#111827;
  font-size:12px;
  box-shadow:0 1px 1px rgba(15,23,42,.02);
}

body.ui-pro-v1 .input:hover,
body.ui-pro-v1 select.input:hover,
body.ui-pro-v1 input[type="date"].input:hover,
body.ui-pro-v1 .picker-display:hover{
  border-color:#b9c7db;
  background:#fbfdff;
}

body.ui-pro-v1 .input:focus,
body.ui-pro-v1 select.input:focus,
body.ui-pro-v1 input[type="date"].input:focus{
  border-color:#60a5fa;
  box-shadow:0 0 0 3px rgba(37,99,235,.11);
}

/* 主容器 */
body.ui-pro-v1 .container{
  padding:9px 10px;
}

/* 面板：更薄、更现代 */
body.ui-pro-v1 .panel,
body.ui-pro-v1 .table-panel,
body.ui-pro-v1 .stat{
  border:1px solid rgba(226,232,240,.95);
  border-radius:9px;
  background:rgba(255,255,255,.94);
  box-shadow:0 2px 10px rgba(15,23,42,.035);
}

body.ui-pro-v1 .panel{
  padding:9px 10px;
  margin-bottom:8px;
}

body.ui-pro-v1 .panel:hover,
body.ui-pro-v1 .table-panel:hover{
  box-shadow:0 4px 16px rgba(15,23,42,.055);
  transform:none;
}

body.ui-pro-v1 .panel-title,
body.ui-pro-v1 .section-title{
  font-size:13px;
  font-weight:800;
  color:#111827;
  letter-spacing:.1px;
  margin-bottom:8px;
}

/* 维护区左右并排保持，但视觉轻一点 */
body.ui-pro-v1 .maintenance-inline-row{
  padding:8px 10px 0;
  gap:8px;
}

body.ui-pro-v1 .maintenance-inline-col .panel{
  margin-bottom:8px;
}

/* 表单区 */
body.ui-pro-v1 .form-row{
  gap:8px;
}

body.ui-pro-v1 .form-item{
  gap:3px;
}

body.ui-pro-v1 .form-item label{
  font-size:11px;
  color:#64748b;
  font-weight:700;
  margin-bottom:3px;
}

/* 筛选面板更像工具栏 */
body.ui-pro-v1 .container > .panel:first-child{
  border-color:#dbe7f7;
  background:rgba(255,255,255,.96);
}

/* 快捷日期按钮：标签感 */
body.ui-pro-v1 .quick-group{
  gap:6px;
  margin-top:7px;
}

body.ui-pro-v1 .quick-btn{
  background:#f3f6fb !important;
  color:#334155 !important;
  border:1px solid #dfe7f2 !important;
  border-radius:999px !important;
  padding:5px 10px !important;
  font-size:11px !important;
  font-weight:700 !important;
}

body.ui-pro-v1 .quick-btn:hover{
  background:#eaf2ff !important;
  color:#1d4ed8 !important;
  border-color:#c7dcff !important;
}

body.ui-pro-v1 .quick-group .filter-toggle-btn.active{
  background:#2563eb !important;
  color:#fff !important;
  border-color:#2563eb !important;
}

/* 当前筛选状态：低调但清晰 */
body.ui-pro-v1 .filter-status,
body.ui-pro-v1 #filterStatus{
  display:block !important;
  margin-top:6px !important;
  margin-bottom:6px !important;
  padding:6px 10px !important;
  border:1px solid #e3eaf4 !important;
  border-radius:8px !important;
  background:#fbfdff !important;
  color:#64748b !important;
  font-size:12px !important;
  line-height:1.35 !important;
  box-shadow:none !important;
}

/* 查询提示 */
body.ui-pro-v1 .msg{
  color:#64748b;
  font-size:11px;
}

/* 查询中转圈 */
body.ui-pro-v1 .loading-spinner{
  display:inline-block;
  width:12px;
  height:12px;
  margin-right:6px;
  border:2px solid rgba(37,99,235,.22);
  border-top-color:#2563eb;
  border-radius:50%;
  vertical-align:-2px;
  animation: loadingSpin .75s linear infinite;
}

@keyframes loadingSpin{
  from{ transform:rotate(0deg); }
  to{ transform:rotate(360deg); }
}

/* 统计卡：驾驶舱感 */
body.ui-pro-v1 .stats{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(128px,1fr));
  gap:8px;
  margin:8px 0 10px;
}

body.ui-pro-v1 .stat{
  position:relative;
  padding:9px 10px;
  overflow:hidden;
  transition:none;
}

body.ui-pro-v1 .stat:hover{
  transform:none;
  box-shadow:0 4px 14px rgba(15,23,42,.055);
}

body.ui-pro-v1 .stat::before{
  content:'';
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:#dbeafe;
}

body.ui-pro-v1 .stat:nth-child(1)::before,
body.ui-pro-v1 .stat:nth-child(10)::before,
body.ui-pro-v1 .stat:nth-child(11)::before{
  background:#93c5fd;
}

body.ui-pro-v1 .stat .label{
  font-size:11px;
  color:#64748b;
  margin-bottom:4px;
}

body.ui-pro-v1 .stat .num{
  font-size:18px;
  font-weight:850;
  color:#0f172a;
  letter-spacing:-.2px;
  font-variant-numeric:tabular-nums;
}

/* 盈亏颜色保留但更克制 */
body.ui-pro-v1 .profit-positive{
  color:#059669 !important;
}

body.ui-pro-v1 .profit-negative{
  color:#dc2626 !important;
}

/* 表格模块 */
body.ui-pro-v1 .table-panel{
  overflow:hidden;
}

body.ui-pro-v1 .table-head{
  padding:8px 10px;
  border-bottom:1px solid #e8eef6;
  background:#fff;
  margin-bottom:0;
}

body.ui-pro-v1 .section-title{
  margin-bottom:0;
}

/* 表格：现代数据终端感 */
body.ui-pro-v1 .table-wrap{
  border:0;
  border-radius:0;
  overflow:auto;
}

body.ui-pro-v1 .table-wrap table,
body.ui-pro-v1 table{
  width:100%;
  min-width:1900px;
  border-collapse:separate;
  border-spacing:0;
  background:#fff;
  font-size:12px;
}

body.ui-pro-v1 .table-wrap thead th{
  position:sticky;
  top:0;
  z-index:5;
  background:#f8fafc !important;
  color:#475569;
  font-size:11px;
  font-weight:800;
  padding:7px 6px !important;
  line-height:1.25;
  border-bottom:1px solid #e2e8f0;
  white-space:nowrap;
}

body.ui-pro-v1 th[data-sort]:hover{
  background:#eef4ff !important;
  color:#1d4ed8;
}

body.ui-pro-v1 th.sorted{
  background:#eaf2ff !important;
  color:#1d4ed8 !important;
}

/* 内容行更紧凑 */
body.ui-pro-v1 .table-wrap tbody td{
  padding:6px 6px !important;
  line-height:1.25 !important;
  border-bottom:1px solid #eef2f7;
  color:#1f2937;
  font-size:11px;
  white-space:nowrap;
  background:#fff;
}

/* 斑马纹恢复，轻透明 */
body.ui-pro-v1 .table-wrap tbody tr:nth-child(odd) td{
  background:#ffffff !important;
}

body.ui-pro-v1 .table-wrap tbody tr:nth-child(even) td{
  background:rgba(37,99,235,.028) !important;
}

body.ui-pro-v1 .table-wrap tbody tr:hover td{
  background:rgba(37,99,235,.075) !important;
}

/* 不冻结左右列，避免颜色割裂 */
body.ui-pro-v1 .table-wrap th:first-child,
body.ui-pro-v1 .table-wrap td:first-child,
body.ui-pro-v1 .table-wrap th:last-child,
body.ui-pro-v1 .table-wrap td:last-child{
  position:static !important;
  left:auto !important;
  right:auto !important;
  z-index:auto !important;
  box-shadow:none !important;
}

/* 数字列安静，重点靠颜色 */
body.ui-pro-v1 .num-cell,
body.ui-pro-v1 .score-cell{
  text-align:center;
  font-variant-numeric:tabular-nums;
}

/* 评分颜色 */
body.ui-pro-v1 .score-good{
  color:#059669 !important;
  font-weight:800;
}

body.ui-pro-v1 .score-mid{
  color:#d97706 !important;
  font-weight:800;
}

body.ui-pro-v1 .score-bad{
  color:#dc2626 !important;
  font-weight:800;
}

/* 操作列 */
body.ui-pro-v1 .action-cell{
  min-width:120px;
  white-space:nowrap;
  overflow:visible;
}

body.ui-pro-v1 .action-cell .btn{
  padding:4px 8px !important;
  font-size:11px !important;
  margin:0 2px !important;
  border-radius:6px;
}

/* 旧备注样式保留兼容，当前已替换为渠道标记 */
body.ui-pro-v1 .remark-cell{
  width:2.2em;
  max-width:2.2em;
  min-width:2.2em;
}

/* 分页 */
body.ui-pro-v1 .pagination{
  padding:6px 10px !important;
  border-top:1px solid #e8eef6;
  background:#fff;
}

body.ui-pro-v1 .page-info{
  color:#64748b;
  font-size:11px;
}

/* 选择器弹窗：更轻 */
body.ui-pro-v1 .picker-panel{
  border:1px solid #dbe3ee;
  border-radius:10px;
  box-shadow:0 14px 34px rgba(15,23,42,.14);
}

body.ui-pro-v1 .operator-option{
  border-radius:8px;
  height:34px;
  font-size:11px;
}

body.ui-pro-v1 .operator-option:hover{
  background:#eff6ff;
}

body.ui-pro-v1 .operator-option.active{
  background:#2563eb;
  color:#fff;
}

/* 文件选择不要太抢眼 */
body.ui-pro-v1 input[type="file"]{
  color:#64748b;
}

/* 小屏兜底 */
@media (max-width:1280px){
  body.ui-pro-v1 .stats{
    grid-template-columns:repeat(4,minmax(120px,1fr));
  }
}

@media (max-width:768px){
  body.ui-pro-v1 .stats{
    grid-template-columns:repeat(2,minmax(120px,1fr));
  }
}


/* =========================================================
   投放状态筛选：停量渠道 / 在跑渠道
   判断规则：
   - 在跑渠道：最新数据日有消费
   - 停量渠道：历史有消费，但最新数据日没有消费
   ========================================================= */
.quick-group .status-toggle-btn{
  background:#f8fafc !important;
  color:#475569 !important;
  border:1px solid #dbe3ee !important;
}

.quick-group .status-toggle-btn.running.active{
  background:#16a34a !important;
  color:#fff !important;
  border-color:#16a34a !important;
}

.quick-group .status-toggle-btn.stopped.active{
  background:#dc2626 !important;
  color:#fff !important;
  border-color:#dc2626 !important;
}


/* =========================================================
   渠道标记：替代备注
   选项：可加量 / 观察中 / 已停量 / 假量
   渠道级标记，保存到 channel_meta.tag
   ========================================================= */

.channel-tag-td{
  min-width:74px;
  cursor:pointer;
}

.channel-tag{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:54px;
  height:22px;
  padding:0 8px;
  border-radius:999px;
  font-size:11px;
  font-weight:800;
  line-height:1;
  border:1px solid transparent;
  white-space:nowrap;
}

.channel-tag.tag-empty{
  color:#94a3b8;
  background:#f8fafc;
  border-color:#e2e8f0;
}

.channel-tag.tag-add{
  color:#047857;
  background:#ecfdf5;
  border-color:#bbf7d0;
}

.channel-tag.tag-watch{
  color:#b45309;
  background:#fffbeb;
  border-color:#fde68a;
}

.channel-tag.tag-stop{
  color:#475569;
  background:#f1f5f9;
  border-color:#cbd5e1;
}

.channel-tag.tag-fake{
  color:#b91c1c;
  background:#fef2f2;
  border-color:#fecaca;
}

.channel-tag-select{
  min-width:86px;
}

body.ui-pro-v1 .channel-tag{
  height:20px;
  font-size:11px;
  padding:0 7px;
}



/* 人均打开：默认 —，点击单行同步 */
.avg-open-cell{font-weight:800;font-variant-numeric:tabular-nums;}
.avg-open-empty{color:#94a3b8!important;}
.avg-open-bad{color:#dc2626!important;}
.avg-open-mid{color:#d97706!important;}
.avg-open-good{color:#16a34a!important;}
.avg-open-sync-btn{border:none;background:transparent;font-weight:900;cursor:pointer;padding:0 6px;font-size:13px;border-radius:6px;}
.avg-open-sync-btn:hover{background:#eff6ff;color:#2563eb!important;}
.avg-open-sync-btn:disabled{cursor:not-allowed;opacity:.7;}
.op-link-td{min-width:42px;}
.op-link-btn{border:1px solid #bfdbfe;background:#eff6ff;color:#2563eb;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:900;cursor:pointer;}
.op-link-btn:hover{background:#2563eb;color:#fff;}
.op-link-empty{color:#cbd5e1;font-weight:800;}


/* OP优化版：短横线更紧凑 */
.avg-open-sync-btn{
  font-size:12px !important;
  line-height:1 !important;
  padding:0 4px !important;
  min-width:18px;
}

.op-link-btn:disabled{
  opacity:.65;
  cursor:wait;
}


/* 活跃人数：非陌陌平台可点击 - 同步OP活跃用户数 */
.active-sync-btn{
  border:none;
  background:transparent;
  color:#94a3b8;
  font-weight:900;
  cursor:pointer;
  padding:0 4px;
  min-width:18px;
  font-size:12px;
  border-radius:6px;
}
.active-sync-btn:hover{
  background:#eff6ff;
  color:#2563eb;
}
.active-sync-btn:disabled{
  cursor:not-allowed;
  opacity:.7;
}


/* OP风险行：平均打开次数 < 2 或 平均在线时长 < 300秒 */
.table-wrap tbody tr.op-risk-row td{
  color:#dc2626 !important;
  font-weight:600 !important;
}

.table-wrap tbody tr.op-risk-row:hover td{
  background:#fff5f5 !important;
}

.table-wrap tbody tr.op-risk-row td:nth-child(22),
.table-wrap tbody tr.op-risk-row td:nth-child(23){
  color:#b91c1c !important;
  font-weight:700;
}

.table-wrap tbody tr.op-risk-row{
  box-shadow: inset 3px 0 0 #ef4444;
}
