/* ============================================================
   视图：订单查询 · 局部样式
   只补充 styles.css 没覆盖的排版细节，颜色/圆角/边框一律用变量
   ============================================================ */

/* ---------------- ① 上传卡 ---------------- */
.orders-upload { margin-bottom: 14px; }
.orders-file { display: none; }

.orders-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; padding: 26px 18px; text-align: center; cursor: pointer;
  border: 1px dashed var(--border); border-radius: var(--radius);
  background: var(--surface-2); color: var(--fg);
  transition: background .15s, border-color .15s; user-select: none;
}
.orders-drop:hover { background: var(--surface); border-color: var(--muted); }
.orders-drop.over { background: var(--surface); border-color: var(--fg); }
.orders-drop.is-busy { cursor: progress; border-style: solid; }
.orders-drop-ico { font-size: 24px; opacity: .55; line-height: 1; }
.orders-drop-t { font-size: 13.5px; font-weight: 500; }
.orders-drop-s { font-size: 11.5px; color: var(--muted); }
.orders-drop-link { color: var(--info); }
.orders-file-name { max-width: 320px; display: inline-block; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }

.orders-spin {
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid var(--border); border-top-color: var(--fg);
  animation: orders-spin .8s linear infinite;
}
@keyframes orders-spin { to { transform: rotate(360deg); } }

/* 导入结果 */
.orders-import { margin-top: 14px; }
.orders-res-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.orders-res-file {
  font-size: 12px; color: var(--muted); max-width: 340px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.orders-res-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
@media (max-width: 900px) { .orders-res-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.orders-res-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2); padding: 8px 10px; min-width: 0;
}
.orders-res-item .k { font-size: 11px; color: var(--muted); }
.orders-res-item .v {
  font-size: 13px; font-weight: 600; margin-top: 2px;
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 未匹配抖音ID */
.orders-unmatched {
  margin-top: 12px; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--warn-bg);
}
.orders-unmatched.ok { background: var(--surface-2); }
.orders-unmatched-h { font-size: 12px; color: var(--warn); margin-bottom: 8px; }
.orders-chips { gap: 6px; }
.orders-chips .chip { font-size: 11px; }
.orders-unmatched-foot { margin-top: 10px; }

/* ---------------- ② 筛选条 ---------------- */
.orders-filter { margin-bottom: 14px; }
.orders-filter .card-body { padding: 12px 15px; }
.orders-q { width: 230px; height: 32px; }
.orders-date { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.orders-date .input { width: 152px; height: 32px; }
.orders-status { width: auto; min-width: 148px; height: 32px; }

/* 汇总卡里的小字注释（有效单数 / 退款金额） */
.orders-stat-note {
  display: inline-block; margin-left: 6px;
  font-size: 11px; font-weight: 400; color: var(--muted);
  white-space: nowrap;
}

/* ---------------- ④ 订单明细 ---------------- */
.orders-list { margin-bottom: 14px; }
.orders-table-wrap { overflow-x: auto; }
.orders-table { min-width: 1040px; }
.orders-table td { white-space: nowrap; }
.orders-th-num { text-align: right; }
.orders-table td.orders-th-num { text-align: right; }

.orders-time { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.orders-name { font-weight: 500; }
.orders-id { font-size: 12.5px; }
.orders-id-remark {
  font-size: 11px; color: var(--muted); max-width: 170px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.orders-title {
  display: block; max-width: 300px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.orders-oid { font-size: 11.5px; color: var(--muted); }

/* 分页 */
.orders-page {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2);
}
.orders-page-info { font-size: 12px; color: var(--muted); }

/* ---------------- ⑤ 按抖音号统计 ---------------- */
.orders-stat-table { min-width: 900px; }
.orders-stat-row { cursor: pointer; }
.orders-stat-row:hover .orders-name { text-decoration: underline; }

.orders-missing {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface-2);
}

@media (max-width: 1000px) {
  .orders-q { width: 100%; }
  .orders-date, .orders-date .input { width: 100%; }
  .orders-date { flex: 1 1 100%; }
}
