/* ==========================================================================
   松南印务官网 · 补充样式
   --------------------------------------------------------------------------
   基础样式 style.css 已包含 .panel / .empty-state / .page-head / .crumb 等，
   本文件只补充基础表里没有的部分：分页条、数据表格、状态徽标、表单栅格、工具栏。
   ========================================================================== */

/* ---------------------------------------------------------------- 分页 */

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 22px;
}

.pager-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  font-size: 14px;
  text-decoration: none;
  transition: border-color .18s ease, color .18s ease, background .18s ease;
}

.pager-item:hover { border-color: var(--brand); color: var(--brand); }

.pager-item.is-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  font-weight: 600;
}

.pager-item.is-disabled { opacity: .5; cursor: not-allowed; }

.pager-gap { color: var(--muted); padding: 0 2px; }

.pager-info { margin-left: auto; font-size: 13px; color: var(--muted); }

/* ---------------------------------------------------------------- 表格 */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th,
.table td {
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.table th {
  background: var(--surface);
  color: var(--muted);
  font-weight: 500;
  font-size: 13px;
}

.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafcff; }

.table td.wrap { white-space: normal; min-width: 240px; }
.table .col-num { width: 64px; color: var(--muted); }
.table .col-actions { width: 1%; white-space: nowrap; }

/* ------------------------------------------------------------ 状态徽标 */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
}

.badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.badge-new      { background: #eff6ff; border-color: #bfdbfe; color: #1d4ed8; }
.badge-progress { background: #fff7ed; border-color: #fed7aa; color: #c2410c; }
.badge-closed   { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }
.badge-on       { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; }
.badge-off      { background: #f1f5f9; border-color: #e2e8f0; color: #64748b; }

/* ------------------------------------------------------------ 表单栅格 */

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.form-grid .field-full { grid-column: 1 / -1; }

/* ------------------------------------------------------------ 工具栏 */

.toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar .toolbar-right { margin-left: auto; }
.toolbar .input,
.toolbar .select { height: 40px; }

/* -------------------------------------------------------- 小图标按钮 */

.btn-xs {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: 8px;
}

/* ---------------------------------------------------- 产品列表英文名 */

.svc-row .svc-en {
  font-size: 11.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 8px;
}

/* -------------------------------------------------------- 头像与上传 */

.avatar-xl { overflow: hidden; }

.avatar-xl img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
}

.upload-box { cursor: pointer; }

.upload-box svg { color: var(--brand); margin-bottom: 6px; }

.f-actions form { margin: 0; display: inline-flex; }

.btn-link-danger {
  background: none;
  border: 0;
  padding: 0;
  color: var(--danger);
  font-size: 13px;
  cursor: pointer;
}

.btn-link-danger:hover { text-decoration: underline; }

@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
}
