/* 问卷平台 v3 — Element UI 风格零依赖 */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px; color: #303133; background: #f0f2f5;
}
#app { min-height: 100vh; display: flex; flex-direction: column; }
a { color: #409eff; text-decoration: none; cursor: pointer; }

/* ===== 顶部导航 ===== */
.topnav { background: #fff; border-bottom: 1px solid #e4e7ed; padding: 0 40px; display: flex; gap: 8px; }
.topnav .nav-item { padding: 14px 4px; margin-right: 24px; cursor: pointer; font-size: 14px; color: #303133; border-bottom: 2px solid transparent; user-select: none; }
.topnav .nav-item:hover { color: #409eff; }
.topnav .nav-item.active { color: #409eff; border-bottom-color: #409eff; font-weight: 500; }

/* ===== 底部状态栏 ===== */
.footbar { background: #fff; border-top: 1px solid #e4e7ed; padding: 10px 40px; display: flex; align-items: center; gap: 18px; color: #606266; font-size: 12px; flex-wrap: wrap; }
.footbar .grow { flex: 1; }

/* ===== 主体 ===== */
.main { flex: 1; padding: 16px 40px; overflow-x: auto; }
.page-title { font-size: 15px; font-weight: 500; color: #303133; margin: 2px 0 12px; }
.card { background: #fff; border-radius: 4px; border: 1px solid #ebeef5; box-shadow: 0 1px 3px rgba(0,0,0,.04); }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; gap: 4px; padding: 7px 12px; font-size: 12px; border-radius: 4px; border: 1px solid #dcdfe6; background: #fff; color: #606266; cursor: pointer; white-space: nowrap; user-select: none; }
.btn:hover { color: #409eff; border-color: #c6e2ff; background: #ecf5ff; }
.btn.primary { background: #409eff; border-color: #409eff; color: #fff; }
.btn.primary:hover { background: #66b1ff; border-color: #66b1ff; }
.btn.success { background: #67c23a; border-color: #67c23a; color: #fff; }
.btn.success:hover { background: #85cf60; }
.btn.warning { background: #e6a23c; border-color: #e6a23c; color: #fff; }
.btn.warning:hover { background: #ebb563; }
.btn.danger { background: #f56c6c; border-color: #f56c6c; color: #fff; }
.btn.danger:hover { background: #f78989; }
.btn.info-plain { color: #909399; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.sm { padding: 4px 8px; font-size: 12px; }
.link-btn { color: #409eff; cursor: pointer; margin: 0 4px; font-size: 12px; white-space: nowrap; }
.link-btn:hover { text-decoration: underline; }
.link-btn.danger { color: #f56c6c; }
.link-btn.warning { color: #e6a23c; }

/* ===== 表单 ===== */
.filter-bar { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; padding: 14px 16px; }
.filter-bar .fitem { display: flex; align-items: center; gap: 6px; }
.filter-bar label { color: #606266; font-size: 13px; white-space: nowrap; }
.input, select.input { height: 30px; padding: 0 9px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 12px; color: #606266; background: #fff; outline: none; }
.input:focus { border-color: #409eff; }
.input::placeholder { color: #c0c4cc; }

/* 多选标签组 */
.tag-group { display: inline-flex; flex-wrap: wrap; gap: 4px; max-width: 420px; }
.tag { padding: 2px 8px; font-size: 12px; border-radius: 3px; border: 1px solid #dcdfe6; color: #909399; cursor: pointer; user-select: none; background: #f4f4f5; }
.tag.on { background: #ecf5ff; border-color: #c6e2ff; color: #409eff; }

/* ===== 工具栏 ===== */
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 12px 16px; border-bottom: 1px solid #ebeef5; align-items: center; }
.toolbar .grow { flex: 1; }

/* ===== 表格 ===== */
.table-wrap { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 12px; }
table.data th, table.data td { border-bottom: 1px solid #ebeef5; padding: 9px 8px; text-align: center; white-space: nowrap; }
table.data th { color: #909399; font-weight: 500; background: #f8f9fb; position: sticky; top: 0; }
table.data tbody tr:hover { background: #f5f7fa; }
table.data td.left, table.data th.left { text-align: left; }
table.data .ellipsis { max-width: 220px; overflow: hidden; text-overflow: ellipsis; display: inline-block; vertical-align: middle; }
.empty-tip { text-align: center; color: #909399; padding: 60px 0; font-size: 13px; }
.summary-row td { background: #f8f9fb; font-weight: 500; color: #606266; }

/* ===== 标签/状态 ===== */
.st { display: inline-block; padding: 2px 8px; font-size: 12px; border-radius: 3px; }
.st-blue { background: #ecf5ff; color: #409eff; }
.st-green { background: #f0f9eb; color: #67c23a; }
.st-orange { background: #fdf6ec; color: #e6a23c; }
.st-red { background: #fef0f0; color: #f56c6c; }
.st-gray { background: #f4f4f5; color: #909399; }
.st-purple { background: #f4ecff; color: #9254de; }

/* ===== 分页 ===== */
.pager { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 14px; color: #606266; font-size: 12px; }
.pager button { min-width: 28px; height: 28px; border: 1px solid #dcdfe6; background: #fff; border-radius: 3px; cursor: pointer; color: #606266; font-size: 12px; }
.pager button.cur { background: #409eff; border-color: #409eff; color: #fff; }
.pager button:disabled { cursor: not-allowed; opacity: .4; }
.pager input { width: 44px; height: 28px; border: 1px solid #dcdfe6; border-radius: 3px; text-align: center; }

/* ===== 对话框 ===== */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: flex; align-items: flex-start; justify-content: center; z-index: 100; overflow: auto; padding: 60px 16px; }
.mask[hidden] { display: none !important; }
.dialog { background: #fff; border-radius: 6px; min-width: 420px; max-width: 720px; width: 100%; max-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.dialog.wide { max-width: 1240px; }
.dialog.wide .dlg-body { padding: 20px 24px; }
.dialog.wide .dlg-head { padding: 16px 24px; font-size: 16px; }
.dialog.wide .dlg-foot { padding: 14px 24px; }
.mask { padding: 40px 16px; }
.dialog .dlg-head { padding: 14px 18px; border-bottom: 1px solid #ebeef5; display: flex; align-items: center; font-size: 15px; font-weight: 500; }
.dialog .dlg-head .close { margin-left: auto; cursor: pointer; color: #909399; font-size: 18px; line-height: 1; }
.dialog .dlg-body { padding: 18px; overflow: auto; }
.dialog .dlg-foot { padding: 12px 18px; border-top: 1px solid #ebeef5; text-align: right; }
.form-row { display: flex; align-items: center; margin-bottom: 14px; gap: 8px; }
.form-row > label { width: 92px; text-align: right; color: #606266; flex-shrink: 0; }
.form-row .input, .form-row select.input { flex: 1; height: 32px; }
.form-row textarea.input { height: 64px; padding: 6px 9px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 16px; }

/* ===== 工作台卡片 ===== */
.module-title { font-size: 14px; font-weight: 500; padding-bottom: 10px; margin-bottom: 16px; border-bottom: 2px solid #409eff; display: inline-block; color: #303133; }
.module-cards { display: flex; gap: 16px; flex-wrap: wrap; }
.module-card { width: 120px; padding: 22px 0 18px; text-align: center; background: #fff; border: 1px solid #ebeef5; border-radius: 6px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.module-card:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.module-card .ic { width: 38px; height: 38px; border-radius: 8px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 17px; }
.module-card .name { font-size: 13px; color: #303133; }

/* ===== 登录 ===== */
.login-wrap { flex: 1; display: flex; align-items: center; justify-content: center; background: linear-gradient(160deg, #e8f1fd 0%, #f0f2f5 60%); }
.login-card { width: 360px; background: #fff; border-radius: 8px; padding: 34px 32px 28px; box-shadow: 0 6px 24px rgba(0,0,0,.08); }
.login-card h2 { font-size: 19px; font-weight: 500; text-align: center; margin-bottom: 6px; }
.login-card .sub { text-align: center; color: #909399; font-size: 12px; margin-bottom: 24px; }
.login-card .form-row label { width: 64px; }
.login-card .btn { width: 100%; justify-content: center; padding: 10px; font-size: 14px; margin-top: 6px; }

/* ===== 提示 ===== */
.toast { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; padding: 9px 18px; border-radius: 4px; font-size: 13px; color: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15); }
.toast.ok { background: #67c23a; }
.toast.err { background: #f56c6c; }

/* 代理管理两栏 */
.proxy-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .proxy-cols { grid-template-columns: 1fr; } .form-grid { grid-template-columns: 1fr; } }
.panel-head { display: flex; align-items: center; gap: 8px; padding: 13px 16px; border-bottom: 1px solid #ebeef5; font-size: 13px; }
.panel-head .ttl { font-weight: 500; color: #303133; }
.panel-head .grow { flex: 1; }
.section-bar { padding: 9px 16px; background: #f8f9fb; border-bottom: 1px solid #ebeef5; color: #e6a23c; font-size: 12px; font-weight: 500; }
.gen-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid #ebeef5; }
.gen-link { margin: 10px 16px 0; padding: 8px 10px; background: #f5f7fa; border-radius: 4px; color: #409eff; word-break: break-all; font-size: 12px; display: flex; gap: 8px; align-items: center; }

/* ---------- 录入概率 ---------- */
.prob-head { display: flex; gap: 24px; font-size: 14px; margin-bottom: 10px; flex-wrap: wrap; align-items: center; }
.prob-head b { color: #303133; }
.prob-list { max-height: 560px; overflow: auto; border: 1px solid #ebeef5; border-radius: 6px; padding: 2px 14px; }
.prob-q { padding: 13px 0; border-bottom: 1px dashed #ebeef5; }
.prob-q:last-child { border-bottom: none; }
.prob-q-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prob-q-head b { font-size: 14px; color: #303133; }
.prob-q-head .meta { font-size: 11px; color: #909399; border: 1px solid #e4e7ed; border-radius: 3px; padding: 0 5px; white-space: nowrap; }
.prob-use { margin-left: auto; font-size: 12px; color: #f56c6c; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; white-space: nowrap; }
.prob-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 8px; align-items: center; }
.prob-opt { font-size: 14px; color: #606266; display: inline-flex; align-items: center; gap: 4px; }
.prob-opt input { width: 88px; height: 30px; font-size: 13px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 6px; font-size: 12px; }
.prob-opt input:focus { outline: none; border-color: #409eff; }

.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---------- 订单表单(对齐源站) ---------- */
.rd { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #606266; cursor: pointer; margin-right: 10px; white-space: nowrap; }
.rd input { margin: 0; }
.unit { color: #909399; font-size: 13px; }
.fw-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; flex: 1; }
.btn.small { padding: 4px 10px; font-size: 12px; height: 28px; }
.proxy-block { border: 1px solid #ebeef5; border-radius: 6px; padding: 12px 14px; margin-top: 6px; background: #fafbfc; }
.proxy-lines { display: flex; flex-direction: column; gap: 8px; }
.pline { display: flex; gap: 8px; align-items: center; }
.pline .input { height: 30px; font-size: 12px; }
.form-row .input[type="date"] { min-width: 150px; }
.dialog.wide .form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
.cfg-sec { font-size: 13px; font-weight: 600; color: #303133; margin: 4px 0 12px; padding-left: 8px; border-left: 3px solid #409eff; }

/* ---------- 订单页增强(对齐源站) ---------- */
.toolbar-2 { flex-wrap: wrap; row-gap: 8px; }
.btn.dark { background:#4a4f5c; color:#fff; border-color:#4a4f5c; }
.btn.dark:hover { background:#3b404b; }
.btn.orange { background:#e6a23c; color:#fff; border-color:#e6a23c; }
.btn.orange:hover { background:#cf9236; }
.btn.icon { padding:4px 9px; font-size:14px; }
.prog { display:inline-block; width:44px; height:6px; background:#ebeef5; border-radius:3px; vertical-align:middle; margin-right:5px; overflow:hidden; }
.prog > i { display:block; height:100%; background:#409eff; border-radius:3px; }
.col-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:10px 16px; padding:6px 0; }

/* 查看答卷 */
.ans-head { display:flex; align-items:center; gap:8px; font-size:13px; padding-bottom:10px; border-bottom:1px solid #ebeef5; }
.ans-meta { font-size:12px; color:#909399; margin:10px 0; }
.ans-list { max-height:520px; overflow:auto; }
.ans-row { display:flex; gap:14px; padding:7px 0; border-bottom:1px dashed #f0f2f5; font-size:13px; }
.ans-q { flex:1; color:#303133; }
.ans-a { width:260px; color:#409eff; text-align:right; flex-shrink:0; }

/* 答案比例 */
.ratio-list { max-height:560px; overflow:auto; }
.ratio-q { padding:12px 0; border-bottom:1px solid #f0f2f5; }
.ratio-title { font-size:13px; color:#303133; margin-bottom:8px; }
.ratio-title .meta { font-size:11px; color:#909399; border:1px solid #e4e7ed; border-radius:3px; padding:0 5px; margin-left:6px; }
.ratio-row { display:flex; align-items:center; gap:10px; font-size:12px; color:#606266; padding:2px 0; }
.ratio-label { width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ratio-bar { flex:1; height:12px; background:#f2f4f8; border-radius:6px; overflow:hidden; }
.ratio-bar > i { display:block; height:100%; background:linear-gradient(90deg,#409eff,#79bbff); }
.ratio-num { width:96px; text-align:right; color:#909399; }

/* 解析结果页(借鉴源站快捷结构浏览) */
.pv-stats { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.pv-stat { flex:1; min-width:104px; background:#f7f9fc; border:1px solid #ebeef5; border-radius:6px; padding:10px 12px; display:flex; flex-direction:column; gap:2px; }
.pv-stat-val { font-size:18px; font-weight:600; color:#303133; }
.pv-stat-label { font-size:12px; color:#909399; }
.pv-stat.is-safe { background:#f0f9eb; border-color:#67c23a44; }
.pv-stat.is-safe .pv-stat-val { color:#67c23a; }
.pv-stat.is-danger { background:#fef0f0; border-color:#f56c6c55; }
.pv-stat.is-danger .pv-stat-val { color:#f56c6c; }
.pv-stat.is-warning { background:#fef0f0; border-color:#f56c6c55; }
.pv-stat.is-warning .pv-stat-val { color:#f56c6c; }
.pv-stat.is-jump { background:#f4ecff; border-color:#9254de44; }
.pv-stat.is-jump .pv-stat-val { color:#9254de; }
.pv-list { max-height:420px; overflow:auto; border:1px solid #ebeef5; border-radius:6px; padding:4px 14px; }
.pv-page-div { display:flex; align-items:center; gap:10px; margin:10px 0 2px; }
.pv-page-line { flex:1; height:1px; background:#e4e7ed; }
.pv-page-text { font-size:12px; color:#909399; white-space:nowrap; }
.pv-q { padding:12px 8px; border-bottom:1px dashed #ebeef5; border-radius:4px; }
.pv-q:last-child { border-bottom:none; }
.pv-q.is-lie { background:#fef0f0; }
.pv-q.is-unsup { background:#fdf6ec; }
.pv-q-head { display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; }
.pv-q-seq { color:#909399; font-size:13px; flex-shrink:0; }
.pv-q-title { font-size:14px; color:#303133; font-weight:500; }
.pv-q-badges { display:inline-flex; gap:5px; flex-wrap:wrap; }
.pv-badge { font-size:11px; border:1px solid #e4e7ed; border-radius:3px; padding:0 5px; white-space:nowrap; }
.pv-badge-lie { color:#f56c6c; border-color:#f56c6c; background:#fff; font-weight:600; }
.pv-opts { margin-top:7px; display:flex; flex-direction:column; gap:3px; }
.pv-opt { font-size:13px; color:#606266; display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:1px 0; }
.pv-opt-lie { color:#f56c6c; font-weight:600; }
.pv-opt-lie-tag { font-size:11px; color:#fff; background:#f56c6c; border-radius:3px; padding:0 5px; }
.pv-opt-other { font-size:11px; color:#e6a23c; border:1px solid #e6a23c66; border-radius:3px; padding:0 4px; }
.pv-opt-jump { font-size:11px; color:#9254de; border:1px solid #9254de66; border-radius:3px; padding:0 5px; cursor:pointer; }
.pv-opt-jump:hover { background:#f4ecff; }
.pv-opt-jump.end { color:#f56c6c; border-color:#f56c6c66; cursor:default; }
.pv-fill-hint { margin-top:6px; font-size:12px; color:#909399; background:#f7f9fc; border-radius:4px; padding:5px 9px; display:inline-block; }
.pv-pulse { animation:pvPulse 1.5s ease; }
@keyframes pvPulse { 0%,100% { box-shadow:none; } 30% { box-shadow:0 0 0 3px #409eff66; } }
.pv-config { margin-top:12px; border-top:1px solid #ebeef5; padding-top:12px; }

/* 新增订单对话框布局修复 */
.fw-hint { color: #909399; font-size: 12px; margin-top: 6px; line-height: 1.5; }
.form-row textarea.input { width: 100%; box-sizing: border-box; }
.form-row > .fw-row { gap: 10px; }
.fw-row .rd, .fw-row .btn { flex-shrink: 0; }
