/* qywx.yqicloud.com —— 企业微信工单系统样式 */
* { box-sizing: border-box; }

:root {
  --bd: #e2e6ea;
  --tx: #1f2329;
  --muted: #8a929b;
  --pri: #1268d6;
  --bg: #f5f6f7;
}

body {
  margin: 0;
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--tx);
  background: var(--bg);
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* 顶栏 */
.topbar { background: #fff; border-bottom: 1px solid var(--bd); }
.topbar-in { display: flex; align-items: center; gap: 16px; height: 52px; justify-content: flex-end; }
.brand { font-weight: 600; font-size: 16px; color: var(--tx); text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 6px 12px; border-radius: 6px; color: #4e5969; text-decoration: none; font-size: 14px;
}
.nav a:hover { background: #f2f3f5; }
.nav a.on { background: #eaf2fd; color: var(--pri); font-weight: 500; }
.user { display: flex; align-items: center; gap: 8px; }
.nick { font-size: 13px; color: #4e5969; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; object-fit: cover;
  background: var(--pri); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px;
}
.avatar-ph { background: #8a929b; }
.topbar-exit { color: var(--muted); text-decoration: none; font-size: 13px; }
.topbar-exit:hover { color: var(--pri); }

/* 页面 */
.page-h1 { font-size: 20px; font-weight: 600; margin: 20px 0 14px; }
.card {
  background: #fff; border: 1px solid var(--bd); border-radius: 8px;
  padding: 18px 20px; margin-bottom: 16px;
}

/* 查询条件 */
.filters {
  background: #fff; border: 1px solid var(--bd); border-radius: 8px;
  padding: 14px 18px; margin-bottom: 14px;
}
.filters-row { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 12px; }
.filters-row:last-child { margin-bottom: 0; }
/* 单框综合查询：输入框占满剩余宽度，按钮同行靠右 */
.filters-inline .filters-row { flex-wrap: nowrap; align-items: center; margin-bottom: 0; }
.filters-inline label.grow { flex: 1 1 auto; min-width: 0; }
.filters-inline label.grow input { width: 100%; }
.filters-inline .filters-actions { flex: 0 0 auto; align-items: center; }
.filters label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #4e5969; }
.filters input, .filters select {
  height: 34px; padding: 0 10px; border: 1px solid var(--bd); border-radius: 6px;
  font-size: 14px; width: 200px; background: #fff; color: var(--tx);
}
.filters input:focus, .filters select:focus { outline: none; border-color: var(--pri); }
.filters-actions { display: flex; align-items: flex-end; gap: 8px; }

/* 按钮 */
.btn {
  display: inline-block; height: 34px; line-height: 32px; padding: 0 16px;
  border: 1px solid var(--bd); border-radius: 6px; background: #fff;
  color: var(--tx); text-decoration: none; font-size: 14px; cursor: pointer;
}
.btn:hover { border-color: #c9cdd4; }
.btn-primary { background: var(--pri); border-color: var(--pri); color: #fff; }
.btn-primary:hover { background: #0f5cbd; }

/* 列表 */
.list-head {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 10px; color: #4e5969; font-size: 13px;
}
.table-wrap { background: #fff; border: 1px solid var(--bd); border-radius: 8px; overflow-x: auto; }
.grid { width: 100%; border-collapse: collapse; }
.grid th, .grid td { padding: 11px 12px; text-align: left; border-bottom: 1px solid #f0f1f2; font-size: 13px; }
.grid th { background: #fafbfc; color: #4e5969; font-weight: 500; white-space: nowrap; }
.grid tr:last-child td { border-bottom: none; }
.grid tbody tr:hover { background: #fafbfc; }
.cell-content { max-width: 420px; }
.cell-time { white-space: nowrap; color: #86909c; }
.link { color: var(--pri); text-decoration: none; }
.link:hover { text-decoration: underline; }

.tag {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 12px; background: #f2f3f5; color: #4e5969;
}
.tag-new      { background: #fff7e6; color: #d48806; }
.tag-assigned { background: #e8f3ff; color: #1268d6; }
.tag-doing    { background: #f9f0ff; color: #722ed1; }
.tag-done     { background: #e8ffea; color: #00992a; }
.tag-closed   { background: #f2f3f5; color: #86909c; }

.empty {
  background: #fff; border: 1px solid var(--bd); border-radius: 8px;
  padding: 40px; text-align: center; color: var(--muted);
}

/* 分页 */
.pager { display: flex; gap: 6px; justify-content: center; margin: 18px 0; }
.pager a {
  min-width: 30px; height: 30px; line-height: 28px; text-align: center;
  border: 1px solid var(--bd); border-radius: 6px; background: #fff;
  color: var(--tx); text-decoration: none; font-size: 13px; padding: 0 6px;
}
.pager a.on { background: var(--pri); border-color: var(--pri); color: #fff; }

/* 表单 */
.form-row { display: flex; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.form label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: #4e5969; flex: 1; min-width: 240px; }
.form input, .form select, .form textarea {
  padding: 8px 10px; border: 1px solid var(--bd); border-radius: 6px;
  font-size: 14px; font-family: inherit; background: #fff; color: var(--tx); width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--pri); }
.req { color: #f53f3f; }
.form-actions { display: flex; gap: 10px; margin-top: 6px; }

/* 详情键值表 */
.kv { width: 100%; border-collapse: collapse; }
.kv th, .kv td { padding: 9px 10px; border-bottom: 1px solid #f0f1f2; text-align: left; font-size: 13px; }
.kv th { width: 110px; color: #4e5969; font-weight: 500; background: #fafbfc; }
.kv tr:last-child th, .kv tr:last-child td { border-bottom: none; }

.alert { border-radius: 6px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.alert-err { background: #ffece8; color: #cb2634; }
.muted { color: var(--muted); }

.footer {
  margin-top: 30px; padding: 18px 0; text-align: center;
  color: var(--muted); font-size: 12px; border-top: 1px solid var(--bd);
}


/* 工单类型标签 */
.tag-type { background:#eef2ff; color:#3730a3; }
