/* ============================================================================
 * frontend/approval_workbench.css · 审批工作台（前台整页）
 * 复刻对标站 scrm.gdzhongke.cn「审批」页 + 8766 统一规范
 * ========================================================================== */

#approval_wbView .wk-page-card {
  display: flex; flex-direction: column; min-height: 0; height: 100%;
}
#approval_wbHost { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ------------------------------------------------- 顶部问候 + 时效 */
.aw-hero {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px; flex: none;
  gap: 20px;
}
.aw-hello { font-size: 19px; font-weight: 600; color: #1f2a37; }
.aw-hello-sub { font-size: 12px; color: #8a94a6; margin-top: 3px; }
.aw-hero-stats { display: flex; align-items: center; gap: 20px; }
.aw-hero-stat { text-align: center; min-width: 92px; }
.aw-hero-num { font-size: 22px; font-weight: 700; color: #0052cc; line-height: 1.1; }
.aw-hero-label { font-size: 12px; color: #8a94a6; margin-top: 2px; }
.aw-hero-divider { width: 1px; height: 32px; background: #e8ecf2; }

/* ------------------------------------------------- 三张入口卡 */
.aw-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 12px;
  flex: none;
}
.aw-card {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 14px;
  border: 1px solid #e8ecf2;
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  transition: border-color .15s, box-shadow .15s, transform .1s;
}
.aw-card:hover { border-color: #b3d0ff; box-shadow: 0 2px 8px rgba(9,30,66,.06); }
.aw-card:active { transform: translateY(1px); }
.aw-card.is-active { border-color: #0052cc; background: #f5f9ff; }
.aw-card-ico {
  width: 36px; height: 36px; flex: none;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff;
}
.aw-ico-todo { background: #0052cc; }
.aw-ico-mine { background: #00875a; }
.aw-ico-all  { background: #6554c0; }
.aw-card-body { flex: 1; min-width: 0; }
.aw-card-title { font-size: 14px; font-weight: 600; color: #1f2a37; }
.aw-card-sub { font-size: 12px; color: #8a94a6; margin-top: 2px; }
.aw-card-num { font-size: 22px; font-weight: 700; color: #1f2a37; flex: none; }

/* ---------------------------------------------------------- 筛选行 */
.aw-filter-bar {
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px 10px; flex: none; flex-wrap: wrap;
}
.aw-tabs { display: flex; gap: 4px; }
.aw-tab {
  height: 32px; padding: 0 12px; font-size: 13px;
  border: 1px solid #dcdfe6; border-radius: 6px;
  background: #fff; color: #5b6472; cursor: pointer; white-space: nowrap;
}
.aw-tab:hover { border-color: #0052cc; color: #0052cc; }
.aw-tab.is-active { background: #eaf2ff; border-color: #0052cc; color: #0052cc; font-weight: 600; }
.aw-tab i {
  font-style: normal; font-size: 11px; margin-left: 4px;
  background: #fff; border: 1px solid #e8ecf2; border-radius: 8px;
  padding: 0 5px; color: #98a2b3;
}

.aw-search-box { position: relative; display: flex; align-items: center; gap: 6px; margin-left: auto; }
.aw-search-box input {
  height: 32px; width: 220px; padding: 0 10px;
  border: 1px solid #dcdfe6; border-radius: 6px; font-size: 13px; outline: none;
}
.aw-search-box input:focus { border-color: #0052cc; }
.aw-search-clear {
  height: 32px; padding: 0 10px; font-size: 12px;
  border: 1px solid #dcdfe6; border-radius: 6px;
  background: #fff; color: #5b6472; cursor: pointer; flex: none;
}
.aw-search-clear:hover { border-color: #0052cc; color: #0052cc; }
.aw-tip { font-size: 12px; color: #8a94a6; }

/* ---------------------------------------------------------- 列表区 */
.aw-list-area {
  display: flex; flex-direction: column; flex: 1; min-height: 0;
  padding: 0 16px calc(var(--active-pager-height, 58px) + 14px);
}
.aw-table-wrap {
  flex: 1; min-height: 0; overflow: auto;
  border: 1px solid #e8ecf2; border-radius: 8px;
}
.aw-table-wrap table.cfg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.aw-table-wrap thead th {
  position: sticky; top: 0; z-index: 2;
  background: #f7f9fc; border-bottom: 1px solid #e8ecf2;
  padding: 0; height: 38px;
  text-align: left; font-weight: 600; color: #46536a; white-space: nowrap;
}
.aw-table-wrap tbody td {
  padding: 9px 10px; border-bottom: 1px solid #f0f3f7;
  color: #2c3849; vertical-align: middle;
}
.aw-table-wrap tbody tr.aw-row:nth-child(even) td { background: #f4f6f9; }
.aw-table-wrap tbody tr.aw-row:hover td { background: #eef2f7; }
.aw-row { cursor: pointer; }
.aw-dimm { color: #b6bdc9; }
.aw-empty { text-align: center; padding: 44px 0; color: #b6bdc9; font-size: 13px; }
.aw-id { font-size: 12px; color: #8a94a6; font-family: ui-monospace, Menlo, monospace; }
.aw-type { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; background: #eef2f7; color: #46536a; }

.aw-status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; }
.aw-status-doing    { background: #eaf2ff; color: #0052cc; }
.aw-status-pass     { background: #eef7ee; color: #3f9142; }
.aw-status-reject   { background: #ffefef; color: #e5484d; }
.aw-status-cancel   { background: #f5f5f5; color: #a0a6b0; }
.aw-status-draft    { background: #fff7e6; color: #d97706; }
.aw-status-archived { background: #f0f0f5; color: #6554c0; }

#approval_wbView .wk-pager { margin-top: 4px; }

/* ------------------------------------------------- 列拖拽把手 */
#approval_wbHost .cfg-th-inner { display: flex; align-items: center; height: 38px; padding: 0 8px; gap: 4px; }
#approval_wbHost .cfg-drag { cursor: grab; color: #b6bdc9; font-size: 12px; user-select: none; }
#approval_wbHost .cfg-drag:active { cursor: grabbing; }
#approval_wbHost .sort-th {
  background: none; border: none; cursor: pointer;
  font-weight: 600; color: #46536a; font-size: 13px; white-space: nowrap; padding: 0;
}
#approval_wbHost .sort-th:hover { color: #0052cc; }
#approval_wbHost .sort-th.active { color: #0052cc; }
#approval_wbHost .sort-th.static { cursor: default; }
#approval_wbHost .col-resizer { position: absolute; right: 0; top: 0; bottom: 0; width: 6px; cursor: col-resize; }
#approval_wbHost .col-resizer:hover { background: #d6e4ff; }
#approval_wbHost thead th { position: sticky; top: 0; }
#approval_wbHost .cfg-th { position: relative; }

/* ------------------------------------------------- 字段配置弹窗 */
.aw-col-cfg { display: flex; flex-direction: column; gap: 2px; max-height: 420px; overflow: auto; }
.aw-col-cfg-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 8px; border-radius: 6px; font-size: 13px; color: #2c3849; cursor: pointer;
}
.aw-col-cfg-row:hover { background: #f4f6f9; }

/* ------------------------------------------------------ 详情 */
.aw-detail { padding: 4px 0; }
.aw-kv-row { display: flex; gap: 12px; padding: 9px 2px; border-bottom: 1px solid #f0f3f7; font-size: 13px; }
.aw-kv-k { flex: none; width: 88px; color: #8a94a6; }
.aw-kv-v { flex: 1; color: #2c3849; word-break: break-all; }

.aw-steps-title { font-size: 13px; font-weight: 600; color: #1f2a37; margin: 16px 0 8px; }
.aw-steps { display: flex; flex-direction: column; gap: 8px; }
.aw-step { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; background: #fafbfc; border: 1px solid #eef1f5; }
.aw-step-no {
  width: 22px; height: 22px; flex: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff; background: #98a2b3;
}
.aw-step-pass .aw-step-no { background: #3f9142; }
.aw-step-reject .aw-step-no { background: #e5484d; }
.aw-step-wait .aw-step-no { background: #0052cc; }
.aw-step-title { font-size: 13px; color: #1f2a37; font-weight: 500; }
.aw-step-meta { font-size: 12px; color: #8a94a6; margin-top: 2px; }

.aw-act-bar { margin-top: 16px; padding-top: 14px; border-top: 1px solid #eef1f5; }
.aw-comment {
  width: 100%; padding: 8px 10px; font-size: 13px;
  border: 1px solid #dcdfe6; border-radius: 6px; outline: none;
  resize: vertical; font-family: inherit; box-sizing: border-box;
}
.aw-comment:focus { border-color: #0052cc; }
.aw-act-btns { display: flex; gap: 10px; margin-top: 10px; justify-content: flex-end; }

@media (max-width: 1100px) {
  .aw-cards { grid-template-columns: 1fr; }
  .aw-hero { flex-direction: column; align-items: flex-start; }
  .aw-search-box { margin-left: 0; }
  .aw-search-box input { width: 180px; }
}

/* ============================================================================
 * 审批统计（对标站 ExamineStatistics）· 2026-10-17
 * ========================================================================== */
.aw-mode-bar { flex: none; padding: 8px 16px 0; }
.aw-mode-tabs { display: inline-flex; gap: 4px; border: 1px solid #e3e8ef; border-radius: 7px; padding: 2px; background: #f7f9fc; }
.aw-mt {
  height: 26px; padding: 0 14px; font-size: 12px; border: none; border-radius: 5px;
  background: transparent; color: #5b6472; cursor: pointer;
}
.aw-mt:hover { color: #0052cc; }
.aw-mt.is-active { background: #fff; color: #0052cc; font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.06); }

.aw-stats-head { display: flex; align-items: baseline; gap: 10px; padding: 10px 16px 6px; flex: none; }
.aw-stats-title { margin: 0; font-size: 17px; font-weight: 600; color: #1f2a37; }
.aw-stats-sub { font-size: 12px; color: #8a94a6; }

.aw-stats-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 0 16px 10px; flex: none; flex-wrap: wrap;
}
.aw-sb-left { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.aw-sb-right { display: flex; align-items: center; gap: 8px; }
.aw-sb-label { font-size: 13px; color: #8a94a6; margin-right: 2px; }
.aw-sb-chip {
  height: 28px; padding: 0 11px; font-size: 12px; border: 1px solid #e3e8ef; border-radius: 14px;
  background: #fff; color: #5b6472; cursor: pointer; white-space: nowrap;
}
.aw-sb-chip:hover { border-color: #0052cc; color: #0052cc; }
.aw-sb-chip.is-active { background: #eaf2ff; border-color: #0052cc; color: #0052cc; font-weight: 600; }
.aw-sb-date { height: 28px; padding: 0 8px; font-size: 12px; border: 1px solid #e3e8ef; border-radius: 6px; outline: none; color: #46536a; }
.aw-sb-date:focus { border-color: #0052cc; }
.aw-sb-wave { color: #b6bdc9; font-size: 12px; }
.aw-stats-search {
  height: 32px; width: 200px; padding: 0 10px; border: 1px solid #dcdfe6;
  border-radius: 6px; font-size: 13px; outline: none;
}
.aw-stats-search:focus { border-color: #0052cc; }

.aw-stats-area {
  display: flex; flex-direction: column; flex: 1; min-height: 0;
  padding: 0 16px calc(var(--active-pager-height, 58px) + 14px);
}
.aw-matrix-wrap {
  flex: 1; min-height: 0; overflow: auto;
  border: 1px solid #e8ecf2; border-radius: 8px; background: #fff;
}
table.aw-matrix { width: 100%; border-collapse: collapse; font-size: 13px; }
table.aw-matrix thead th {
  position: sticky; top: 0; z-index: 2; background: #f7f9fc;
  border-bottom: 1px solid #e8ecf2; padding: 0 12px; height: 40px;
  font-weight: 600; color: #46536a; white-space: nowrap;
}
.aw-sh-name { text-align: left; min-width: 150px; }
.aw-sh-num { text-align: center; width: 84px; }
.aw-sh-total { color: #0052cc; }
.aw-sh-done { color: #1f845a; }
.aw-sh-pending { color: #b25e09; }
table.aw-matrix tbody td { padding: 9px 12px; border-bottom: 1px solid #f0f3f7; color: #2c3849; vertical-align: middle; }
table.aw-matrix tbody tr.aw-mx-row:nth-child(even) td { background: #f4f6f9; }
table.aw-matrix tbody tr.aw-mx-row:hover td { background: #eef2f7; }

.aw-td-name { display: flex; align-items: center; gap: 8px; }
.aw-avatar {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  background: #e7efff; color: #2362fb; font-size: 12px; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center;
}
.aw-name-text { color: #2c3849; font-weight: 500; }
.aw-td-num { text-align: center; font-variant-numeric: tabular-nums; }
.aw-td-num.is-clickable { color: #2362fb; cursor: pointer; font-weight: 600; }
.aw-td-num.is-clickable:hover { text-decoration: underline; }
.aw-td-num.is-zero { color: #ccd2dc; }
.aw-td-done { color: #1f845a; font-weight: 600; }
.aw-td-pending { color: #b25e09; font-weight: 600; }
.aw-td-total { color: #0052cc; font-weight: 700; background: #fbfcfe; }
.aw-matrix-foot { flex: none; padding: 8px 2px 0; font-size: 12px; color: #8a94a6; }
.aw-matrix-foot b { color: #2362fb; }
.aw-empty { text-align: center; padding: 44px 0; color: #b6bdc9; font-size: 13px; }

.aw-drill { display: flex; flex-direction: column; gap: 10px; }
.aw-drill-head { display: flex; align-items: center; gap: 10px; }
.aw-drill-badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; background: #eaf2ff; color: #0052cc; }
.aw-drill-cnt { font-size: 12px; color: #8a94a6; }
.aw-drill-list { display: flex; flex-direction: column; gap: 6px; }
.aw-drill-item {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px; border: 1px solid #eef1f6; border-radius: 7px; background: #fbfcfe;
}
.aw-drill-title { font-size: 13px; color: #2c3849; font-weight: 500; }
.aw-drill-meta { font-size: 12px; color: #8a94a6; margin-top: 2px; }
.aw-drill-time { flex: none; font-size: 12px; color: #8a94a6; font-variant-numeric: tabular-nums; }
.aw-drill-empty, .aw-drill-loading { padding: 34px 0; text-align: center; color: #b6bdc9; font-size: 13px; }

#approval_wbView .is-hidden { display: none !important; }
#approval_wbHost { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#awListModeHost, #awStatsModeHost { display: flex; flex-direction: column; flex: 1; min-height: 0; }

/* ===== 首屏「本月审批(区间)」+ 查看更多 + 三卡改版 · 2026-10-17 ===== */
.aw-hero-stat-cap{font-size:11px;color:#9aa5b4;letter-spacing:.2px;margin-bottom:2px;white-space:nowrap}
.aw-hero-num i{font-size:12px;font-style:normal;color:#8b95a5;margin-left:2px;font-weight:400}
.aw-hero-more{border:0;background:transparent;color:#0052cc;font-size:12px;cursor:pointer;
  padding:4px 8px;border-radius:6px;align-self:flex-end;margin-left:8px;white-space:nowrap}
.aw-hero-more:hover{background:#eef4ff}
.aw-cards{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:14px 0 6px}
.aw-card{display:flex;align-items:center;gap:12px;padding:16px 18px;border:1px solid #eef1f5;
  border-radius:12px;background:#fff;cursor:pointer;transition:box-shadow .15s,border-color .15s;position:relative}
.aw-card:hover{box-shadow:0 3px 12px rgba(16,32,64,.07);border-color:#dde4ec}
.aw-card.is-active{border-color:#b9d2ff;background:#fafcff}
.aw-card-body{flex:1;min-width:0}
.aw-card-title{font-size:14px;font-weight:600;color:#2c3542;margin-bottom:3px}
.aw-card-sub{font-size:12px;color:#8b95a5;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.aw-link{color:#0052cc;cursor:pointer}
.aw-link:hover{text-decoration:underline}
.aw-card-more{font-size:12px;color:#0052cc;white-space:nowrap;cursor:pointer;flex:0 0 auto}
.aw-card-more:hover{text-decoration:underline}
