/* ============ 预警工作台 ============ */

.page-title-row { display: flex; align-items: center; justify-content: space-between; }
.page-title { font-size: 19px; font-weight: 700; color: var(--green-950); letter-spacing: 0.02em; }
.page-title-actions { display: flex; gap: 8px; }

/* Status tabs */
.status-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
  padding: 0 2px;
}

.status-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 9px;
  font-size: 13px;
  color: var(--ink-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  user-select: none;
}

.status-tab .count {
  font-family: var(--mono);
  font-size: 11px;
  background: var(--grey-bg);
  border-radius: 8px;
  padding: 0 6px;
  line-height: 16px;
  color: var(--ink-3);
}

.status-tab:hover { color: var(--green-800); }

.status-tab.active {
  color: var(--green-900);
  font-weight: 700;
  border-bottom-color: var(--green-800);
}

.status-tab.active .count { background: var(--green-800); color: #F5EFDD; }

/* Stat strip */
.stat-strip { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stat-main { min-width: 0; flex: 1; }
.stat-label { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.stat-value {
  font-family: var(--mono);
  font-size: 21px;
  font-weight: 700;
  color: var(--green-950);
  margin: 3px 0 2px;
  white-space: nowrap;
}

.stat-delta { font-size: 11px; white-space: nowrap; }
.stat-chart { width: 74px; height: 46px; flex-shrink: 0; }

/* Work layout */
.work-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 384px;
  gap: 10px;
  align-items: start;
}

.work-list { display: flex; flex-direction: column; min-width: 0; }

.filters-bar { padding: 10px 12px; border-bottom: 1px solid var(--line); }

.work-list .table-wrap { max-height: calc(100vh - 372px); overflow-y: auto; }

.list-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
}

.op-btn {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--green-800);
  border-radius: 3px;
  font-size: 11.5px;
  padding: 2px 9px;
}

.op-btn:hover { border-color: var(--green-700); background: var(--green-50); }

/* ============ Detail panel ============ */
.work-detail {
  position: sticky;
  top: 58px;
  max-height: calc(100vh - 70px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.detail-head { padding: 12px 14px 0; }

.detail-title-row { display: flex; align-items: center; gap: 8px; }
.detail-title { font-size: 15px; font-weight: 700; color: var(--ink); }
.detail-id { font-size: 11px; color: var(--ink-3); font-family: var(--mono); margin-top: 3px; }

.detail-tabs {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  border-bottom: 1px solid var(--line);
}

.detail-tab {
  padding: 7px 2px;
  font-size: 12.5px;
  color: var(--ink-3);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
}

.detail-tab.active { color: var(--green-900); font-weight: 700; border-bottom-color: var(--green-800); }

.detail-body { padding: 12px 14px; display: flex; flex-direction: column; gap: 12px; }

.detail-section-title { font-size: 12.5px; font-weight: 700; color: var(--green-900); }

.field-list { display: flex; flex-direction: column; gap: 7px; }

.field-row { display: flex; font-size: 12px; line-height: 1.5; }
.field-row .field-label { width: 76px; flex-shrink: 0; color: var(--ink-3); }
.field-row .field-value { color: var(--ink); }
.field-row .field-value .sub { display: block; font-size: 11px; color: var(--ink-3); }
.field-value.risk { color: var(--red-500); font-weight: 700; font-family: var(--mono); }

/* AI summary card */
.ai-card {
  background: var(--parchment);
  border: 1px solid var(--brass-200);
  border-radius: 5px;
  padding: 10px 12px;
}

.ai-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--brass-600);
  margin-bottom: 6px;
}

.ai-card-head .score { margin-left: auto; font-size: 11px; color: var(--ink-2); font-weight: 400; }
.ai-card-head .score b { font-family: var(--mono); font-size: 15px; color: var(--red-500); }
.ai-card-text { font-size: 12px; color: var(--ink-2); line-height: 1.7; text-align: justify; }

.ai-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }

.ai-chip {
  border: 1px solid var(--brass-400);
  background: #fff;
  color: var(--brass-600);
  border-radius: 3px;
  font-size: 11px;
  padding: 3px 9px;
}

.ai-chip:hover { background: var(--brass-100); }

.chip-result {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.65;
  color: var(--ink-2);
  background: #fff;
  border: 1px dashed var(--brass-400);
  border-radius: 4px;
  padding: 8px 10px;
}

/* disposition form */
.dispose-form { display: flex; flex-direction: column; gap: 8px; }
.dispose-form textarea.input { resize: vertical; min-height: 62px; line-height: 1.5; }
.char-count { font-size: 10.5px; color: var(--ink-3); text-align: right; margin-top: -4px; }
.dispose-submit { width: 100%; padding: 8px 0; font-size: 13px; }

.detail-empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 12.5px;
}

@media (max-width: 1200px) {
  .stat-strip { grid-template-columns: repeat(3, 1fr); }
  .work-layout { grid-template-columns: 1fr; }
  .work-detail { position: static; max-height: none; }
}
