/* ============ 接口测试模块 ============ */

/* 结果颜色 */
.st-ok { color: #67c23a; }
.st-err { color: #f56c6c; }
.st-warn { color: #e6a23c; }
.st-skip { color: #909399; }

/* ---------- 接口管理：左树右编辑 ---------- */
.api-split { min-height: calc(100vh - 88px); }
.api-split > .api-side { width: 290px; display: flex; flex-direction: column; position: sticky; top: 0; max-height: calc(100vh - 88px); }
.api-tree-wrap { flex: 1; overflow: auto; min-height: 160px; margin: 0 -4px; }
.api-tree .el-tree-node__content { height: 32px; border-radius: 4px; }
.api-tree .method-tag { min-width: 50px; height: 18px; padding: 0 4px; font-size: 10.5px; flex-shrink: 0; }
.api-tree-label { display: inline-flex; align-items: center; gap: 6px; min-width: 0; flex: 1; overflow: hidden; }
.api-tree-label .ellipsis { min-width: 0; }
.api-tree-label .el-icon { color: #e6a23c; flex-shrink: 0; }
.api-tree-count { color: var(--to-muted); font-size: 12px; margin-left: 4px; }
.api-tree .tree-node:hover .api-tree-count { display: none; }
.api-stats { border-top: 1px solid var(--to-border); padding-top: 10px; margin-top: 10px; font-size: 12px; color: var(--to-muted); }
.api-stats .between { margin-bottom: 4px; }
.api-stats b { color: var(--el-text-color-primary); font-size: 13px; }

/* 请求行 */
.req-line { display: flex; gap: 8px; align-items: center; }
.req-line .req-method { width: 118px; flex-shrink: 0; }
.req-line .req-url { flex: 1; min-width: 0; }
.req-line .req-url input { font-family: Consolas, "SFMono-Regular", Menlo, monospace; }
.req-line .el-button + .el-button, .req-line .el-dropdown { margin-left: 0; }
.req-method .el-select__placeholder:not(.is-transparent) { font-weight: 700; }
.req-method.m-GET .el-select__placeholder:not(.is-transparent) { color: #67c23a; }
.req-method.m-POST .el-select__placeholder:not(.is-transparent) { color: #e6a23c; }
.req-method.m-PUT .el-select__placeholder:not(.is-transparent) { color: #409eff; }
.req-method.m-DELETE .el-select__placeholder:not(.is-transparent) { color: #f56c6c; }
.req-method.m-PATCH .el-select__placeholder:not(.is-transparent),
.req-method.m-HEAD .el-select__placeholder:not(.is-transparent),
.req-method.m-OPTIONS .el-select__placeholder:not(.is-transparent) { color: #909399; }
.def-meta .el-form-item { margin-bottom: 12px; }
.code-input textarea { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 13px; line-height: 1.55; }
.tab-count { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 8px; background: var(--el-color-primary-light-9); color: var(--el-color-primary); font-size: 11px; line-height: 16px; }
.tab-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #67c23a; margin-left: 4px; vertical-align: middle; }
.sub-title { font-weight: 600; font-size: 13px; margin: 12px 0 6px; display: flex; align-items: center; gap: 8px; }
.sub-title:first-child { margin-top: 0; }

/* 断言 / 提取器编辑器 */
.ae-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.ae-head { color: var(--to-muted); font-size: 12px; margin-bottom: 4px; }
.ae-c-en { width: 40px; flex-shrink: 0; }
.ae-c-type { width: 132px; flex-shrink: 0; }
.ae-c-expr { flex: 3; min-width: 0; }
.ae-c-op { width: 112px; flex-shrink: 0; }
.ae-c-exp { flex: 2; min-width: 0; }
.ae-c-var { flex: 2; min-width: 0; }
.ae-c-del { width: 24px; flex-shrink: 0; text-align: center; }
.ae-tools { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.ae-tools .el-button + .el-button { margin-left: 0; }

/* 调试结果 */
.sr-summary { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 8px 12px; background: var(--el-fill-color-lighter); border: 1px solid var(--to-border); border-radius: 6px; margin-bottom: 8px; font-size: 13px; color: var(--to-muted); }
.sr-summary b { font-size: 15px; margin-left: 4px; font-family: Consolas, Menlo, monospace; }
.sr-url { display: flex; align-items: center; gap: 8px; word-break: break-all; margin-bottom: 8px; }

/* ---------- 报告 ---------- */
.rv-summary { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.rv-rate { font-size: 22px; font-weight: 600; line-height: 1.3; }
.rv-cards { display: flex; gap: 12px; flex-wrap: wrap; }
.rv-card { min-width: 92px; padding: 10px 14px; border: 1px solid var(--to-border); border-radius: 8px; display: flex; flex-direction: column; gap: 4px; background: var(--to-card); }
.rv-card > span { color: var(--to-muted); font-size: 12px; }
.rv-card b { font-size: 20px; line-height: 1.2; }
.rv-desc { flex: 1; min-width: 300px; }
.rv-running { display: flex; align-items: center; gap: 8px; color: var(--el-color-primary); margin-top: 12px; }
.rv-step { display: flex; align-items: center; gap: 8px; width: 100%; min-width: 0; padding-right: 8px; font-size: 13.5px; }
.rv-step > .el-icon { font-size: 16px; flex-shrink: 0; }
.rv-idx { color: var(--to-muted); font-size: 12px; width: 28px; flex-shrink: 0; }
.rv-name { max-width: 280px; font-weight: 500; }
.rv-url { color: var(--to-muted); font-size: 12.5px; max-width: 460px; }
.rv-code { font-weight: 600; font-family: Consolas, Menlo, monospace; }
.rv-time { width: 70px; text-align: right; flex-shrink: 0; }
.report-view .el-collapse-item__header { height: auto; min-height: 44px; line-height: 1.4; }
.report-view .el-collapse-item__content { padding: 4px 12px 12px; }
.report-view .el-collapse-item.is-disabled .el-collapse-item__header { cursor: default; color: inherit; }

/* ---------- 场景编辑 ---------- */
.scn-title { font-size: 15px; }
.scn-step { border: 1px solid var(--to-border); border-radius: 8px; margin-bottom: 8px; background: var(--to-card); transition: border-color .15s, box-shadow .15s; }
.scn-step.disabled .scn-step-head { opacity: .55; }
.scn-step.drag-over { border-color: var(--el-color-primary); box-shadow: 0 0 0 2px var(--el-color-primary-light-8); }
.scn-step-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; }
.scn-step-head .el-button + .el-button { margin-left: 0; }
.drag-handle { cursor: grab; color: var(--to-muted); display: inline-flex; padding: 2px; }
.drag-handle:active { cursor: grabbing; }
.scn-idx { width: 22px; height: 22px; border-radius: 50%; background: var(--el-fill-color); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }
.scn-name { width: 180px; flex-shrink: 0; }
.scn-brief { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; overflow: hidden; white-space: nowrap; }
.scn-step-body { border-top: 1px dashed var(--to-border); padding: 12px; }
.cron-presets { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.cron-presets .el-button + .el-button { margin-left: 0; }
.side-card .el-card__body { padding-top: 12px; }
