/* ============================================================
   P10 · 表单数据中心 / 评价 / Word 模板 / 小票设置
   ------------------------------------------------------------
   只补充本模块需要的构件(条形分布、时间趋势柱、星级、比率条、占位符标签),
   基础设计系统沿用 app.css(card / stat-grid / toolbar / btn / tag / form-* / pager)。
   不引入任何外部 CDN 与字体。
   ============================================================ */

/* ---------------- 时间趋势柱状图 ---------------- */
.p10-trend {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    height: 210px;
    padding: 10px 4px 0;
    overflow-x: auto;
    overflow-y: hidden;
    border-bottom: 1px solid var(--border);
}
.p10-trend .col {
    flex: 0 0 36px;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
}
.p10-trend .col .bars { flex: 1; width: 22px; display: flex; align-items: flex-end; gap: 2px; }
.p10-trend .col .bars i { flex: 1; min-height: 2px; border-radius: 3px 3px 0 0; transition: opacity .15s; }
.p10-trend .col .bars i.c { background: #4b6bff; }
.p10-trend .col .bars i.f { background: #22c55e; }
.p10-trend .col:hover .bars i { opacity: .82; }
.p10-trend .col .lb { font-size: 10px; color: var(--text-3); white-space: nowrap; }
.p10-trend .col .vv { font-size: 10px; color: var(--text-2); }

.p10-legend { display: flex; gap: 16px; margin-top: 10px; font-size: 12px; color: var(--text-2); }
.p10-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 5px; vertical-align: -1px; }
.p10-legend i.c { background: #4b6bff; }
.p10-legend i.f { background: #22c55e; }

/* ---------------- 横向条形分布 ---------------- */
.p10-bars { display: flex; flex-direction: column; gap: 7px; }
.p10-bar { display: flex; align-items: center; gap: 10px; font-size: 12.5px; }
.p10-bar .lb {
    flex: 0 0 140px;
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-2);
}
.p10-bar .track { flex: 1; height: 10px; background: #f1f3f7; border-radius: 6px; overflow: hidden; }
.p10-bar .track i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #6b86ff, #2c4be0); }
.p10-bar .vl { flex: 0 0 96px; text-align: right; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------------- 多维明细布局 ---------------- */
.p10-dim { padding: 12px 0; border-bottom: 1px dashed var(--border); }
.p10-dim:last-child { border-bottom: none; }
.p10-dim h4 { font-size: 13px; font-weight: 600; margin-bottom: 10px; color: var(--text); }

/* ---------------- 完成率进度条 ---------------- */
.p10-rate {
    display: inline-block;
    width: 76px;
    height: 8px;
    background: #f1f3f7;
    border-radius: 5px;
    overflow: hidden;
    vertical-align: middle;
    margin-right: 6px;
}
.p10-rate i { display: block; height: 100%; background: #22c55e; }

/* ---------------- 星级 ---------------- */
.p10-star { color: #f59e0b; letter-spacing: 1px; font-size: 13px; white-space: nowrap; }

/* ---------------- 多选项组(代录表单 / 打印字段) ---------------- */
.p10-checks { display: flex; flex-wrap: wrap; gap: 10px 16px; }
.p10-checks label,
.p10-checks-item { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--text-2); }
.p10-checks input[type=checkbox] { width: auto; margin: 0; }

/* ---------------- 占位符标签(可点击复制) ---------------- */
.p10-ph { display: flex; flex-wrap: wrap; gap: 8px; }
.p10-ph-item {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fafbfc;
    font-family: Menlo, Consolas, monospace;
    font-size: 12px;
    cursor: pointer;
    color: var(--primary);
}
.p10-ph-item:hover { border-color: var(--primary); background: var(--primary-light); }
.p10-ph-item em { font-style: normal; font-family: inherit; color: var(--text-3); font-size: 11px; }

/* ---------------- 滚动容器内的宽表 ---------------- */
.p10-scroll { overflow-x: auto; }
.p10-scroll table { min-width: 100%; white-space: nowrap; }

/* ---------------- 小票设置:表单分栏更紧凑 ---------------- */
.p10-ticket-grid .form-row { margin-bottom: 12px; }
.p10-ticket-grid h4 { color: var(--text-2); font-weight: 600; }

/* 窄屏 */
@media (max-width: 900px) {
    .p10-bar .lb { flex-basis: 96px; max-width: 96px; }
    .p10-bar .vl { flex-basis: 70px; }
    .p10-trend { height: 170px; }
}
