/* ============================================================
   IM P5：运营风控与质检（平台端）
   前缀：rk-（风控）/ rq-（质检）
   ============================================================ */

.rk-card { background: var(--bg-2, #17140f); border: 1px solid var(--line, #2a2520); border-radius: 12px; padding: 16px; color: var(--text-1, #e8e2d6); }
.rk-card + .rk-card { margin-top: 14px; }
.rk-muted { color: var(--text-3, #8c8478); font-size: 11.5px; }
.rk-title { margin: 0 0 12px; font-size: 15px; font-weight: 600; color: var(--text-1, #e8e2d6); }

/* KPI */
.rk-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rk-kpis-qa { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rk-kpi { background: var(--bg-2, #17140f); border: 1px solid var(--line, #2a2520); border-radius: 10px; padding: 13px 15px; display: flex; flex-direction: column; gap: 5px; }
.rk-kpi span { font-size: 11px; color: var(--text-3, #8c8478); }
.rk-kpi b { font-size: 21px; font-weight: 600; color: var(--gold-2, #c8a96a); line-height: 1.2; }
.rk-kpi i { font-style: normal; font-size: 10.5px; color: var(--text-3, #8c8478); }
.rk-kpi.danger { border-color: rgba(224, 101, 79, .45); }
.rk-kpi.danger b { color: #e0654f; }

/* 顶部开关 */
.rk-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft, #241f19); margin-bottom: 12px; }
.rk-global { display: flex; align-items: center; gap: 10px; font-size: 13px; flex-wrap: wrap; }
.rk-global b { font-weight: 600; }
.rk-head-actions { display: flex; gap: 8px; }
.rk-dot { width: 9px; height: 9px; border-radius: 50%; background: #8c8478; box-shadow: 0 0 0 3px rgba(140, 132, 120, .15); }
.rk-dot.ok { background: #4fae7a; box-shadow: 0 0 0 3px rgba(79, 174, 122, .16); }
.rk-dot.off { background: #e0654f; box-shadow: 0 0 0 3px rgba(224, 101, 79, .18); }

.rk-switch { position: relative; display: inline-flex; width: 42px; height: 22px; cursor: pointer; }
.rk-switch input { opacity: 0; width: 0; height: 0; }
.rk-switch i { position: absolute; inset: 0; background: #3a332b; border-radius: 22px; transition: .2s; }
.rk-switch i::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #d8d1c5; transition: .2s; }
.rk-switch input:checked + i { background: rgba(79, 174, 122, .75); }
.rk-switch input:checked + i::after { transform: translateX(20px); background: #fff; }

/* 标签页 */
.rk-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft, #241f19); margin-bottom: 12px; }
.rk-tabs span { border: 1px solid transparent; border-radius: 14px; padding: 5px 14px; font-size: 12.5px; color: var(--text-2, #b6ad9d); cursor: pointer; }
.rk-tabs span:hover { color: var(--gold-2, #c8a96a); }
.rk-tabs span.active { background: rgba(200, 169, 106, .14); border-color: var(--gold-2, #c8a96a); color: var(--gold-2, #c8a96a); }

/* 工具条 */
.rk-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.rk-tools .input { max-width: 240px; }

/* 表格 */
#rk-body, #rkw-list, #rkv-list, #rkb-list, #rqq-agents { overflow-x: auto; }
.rk-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.rk-table th { text-align: left; font-weight: 500; font-size: 11px; color: var(--text-3, #8c8478); padding: 9px 10px; border-bottom: 1px solid var(--line, #2a2520); white-space: nowrap; }
.rk-table td { padding: 10px; border-bottom: 1px solid var(--line-soft, #241f19); color: var(--text-2, #b6ad9d); vertical-align: middle; }
.rk-table tbody tr:hover { background: rgba(200, 169, 106, .04); }
.rk-hit { color: var(--gold-2, #c8a96a); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-content { max-width: 320px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rk-pager { padding: 12px 0 0; text-align: right; font-size: 11.5px; color: var(--text-3, #8c8478); }

/* 表单 */
.rk-form { display: flex; flex-direction: column; gap: 6px; }
.rk-form label { font-size: 11.5px; color: var(--text-3, #8c8478); margin-top: 6px; }
.rk-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.rk-form-2 .rk-span2 { grid-column: span 2; }
.rk-tip { margin-top: 12px; font-size: 11.5px; line-height: 1.7; color: var(--text-3, #8c8478); background: rgba(255, 255, 255, .02); border-radius: 8px; padding: 10px 12px; }

/* 违规详情 */
.rk-detail { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 20px; }
.rk-detail > div { display: flex; flex-direction: column; gap: 3px; }
.rk-detail > div > span { font-size: 10.5px; color: var(--text-3, #8c8478); }
.rk-detail > div > b { font-size: 12.5px; font-weight: 500; color: var(--text-1, #e8e2d6); }
.rk-detail .rk-span2 { grid-column: span 2; }
.rk-quote { margin: 0; font-size: 12.5px; line-height: 1.7; color: var(--text-2, #b6ad9d); background: rgba(255, 255, 255, .03); border-left: 2px solid var(--gold-2, #c8a96a); border-radius: 0 8px 8px 0; padding: 10px 12px; white-space: pre-wrap; word-break: break-all; }
.rk-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft, #241f19); }

/* 质检 */
.rk-online { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #8c8478; margin-right: 6px; vertical-align: middle; }
.rk-online.on { background: #4fae7a; box-shadow: 0 0 0 3px rgba(79, 174, 122, .14); }
.rk-note p { margin: 0 0 8px; font-size: 12px; line-height: 1.8; color: var(--text-3, #8c8478); }
.rk-note p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .rk-form-2 { grid-template-columns: 1fr; }
  .rk-form-2 .rk-span2 { grid-column: span 1; }
  .rk-detail { grid-template-columns: 1fr; }
  .rk-detail .rk-span2 { grid-column: span 1; }
}
