/* ============================================================
 * 速运达物流业绩报表系统 - 共享自定义样式
 * 依赖：assets/tailwind.css（编译后的 Tailwind 工具类）
 * ============================================================ */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f7fb;
}

.card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  border: 1px solid #eef0f4;
}

/* 表格 */
.tbl th {
  background: #fafbfc;
  font-weight: 600;
  color: #475569;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.tbl td,
.tbl th {
  padding: 12px 16px;
  border-bottom: 1px solid #f1f5f9;
  font-size: 14px;
}
.tbl tbody tr:hover {
  background: #f8fafc;
}

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 500;
}

/* 分页 */
.page-btn {
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  color: #475569;
  background: #fff;
  cursor: pointer;
}
.page-btn:hover {
  background: #f1f5f9;
}
.page-btn.active {
  background: #2563eb;
  color: #fff;
  border-color: #2563eb;
}
.page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* 筛选与按钮 */
.filter-input {
  padding: 7px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 13px;
  background: #fff;
  outline: none;
}
.filter-input:focus {
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}
.btn-primary {
  padding: 7px 14px;
  background: #2563eb;
  color: #fff;
  border-radius: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 0;
}
.btn-primary:hover {
  background: #1d4ed8;
}

/* 客户等级 */
.level-S { background: linear-gradient(135deg, #fbbf24, #f97316); color: #fff; }
.level-A { background: linear-gradient(135deg, #60a5fa, #3b82f6); color: #fff; }
.level-B { background: linear-gradient(135deg, #34d399, #10b981); color: #fff; }
.level-C { background: #94a3b8; color: #fff; }

/* 可访问性：跳转链接 */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 10px 16px;
  background: #1e293b;
  color: #fff;
  border-radius: 0 0 8px 0;
  font-size: 14px;
}
.skip-link:focus {
  left: 0;
}

/* 可访问性：键盘焦点可见 */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* 局部错误条 */
.inline-error {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  margin-bottom: 16px;
  border: 1px solid #fecdd3;
  background: #fff1f2;
  color: #9f1239;
  border-radius: 8px;
  font-size: 13px;
}
.inline-error button {
  border: 1px solid #fda4af;
  background: #fff;
  color: #9f1239;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

/* 图表容器（固定高度，避免 Chart.js 自动高度反馈循环） */
.chart-box {
  position: relative;
  width: 100%;
  height: 220px;
}
.chart-box canvas {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
}
.chart-box-sm { height: 180px; }
.chart-box-lg { height: 280px; }

/* 数据表格横向滚动容器（移动端） */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
