/* ==========================================================================
   安居链 - 租赁管理平台  ·  全局样式
   ========================================================================== */

/* ---------- 变量 ---------- */
:root {
    --primary: #e63946;
    --primary-dark: #d32f2f;
    --primary-light: #fff1f0;
    --text-main: #303133;
    --text-regular: #606266;
    --text-secondary: #909399;
    --text-placeholder: #c0c4cc;
    --border: #ebeef5;
    --border-dark: #dcdfe6;
    --bg-page: #f0f2f5;
    --bg-hover: #f5f7fa;
    --success: #52c41a;
    --warning: #fa8c16;
    --info: #1890ff;
    --danger: #f5222d;
    --radius: 6px;
    --shadow-card: 0 2px 12px 0 rgba(0, 0, 0, .05);
    --shadow-pop: 0 4px 16px rgba(0, 0, 0, .12);
}

/* ---------- 重置 ---------- */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
        "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px; color: var(--text-main); background: var(--bg-page);
    height: 100vh; overflow: hidden; -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { font-family: inherit; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d8dce3; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c3c8d0; }
::-webkit-scrollbar-track { background: transparent; }

/* ==========================================================================
   布局
   ========================================================================== */
.app-container { display: flex; height: 100vh; }

/* ---------- 左侧边栏 ---------- */
.sidebar {
    width: 220px; background: #fff; border-right: 1px solid var(--border);
    display: flex; flex-direction: column; flex-shrink: 0;
}
.logo {
    height: 60px; display: flex; align-items: center; padding: 0 14px;
    font-size: 16px; font-weight: bold; border-bottom: 1px solid var(--border);
    color: var(--text-main); white-space: nowrap;
}
.logo .logo-img {
    height: 38px; width: auto; max-width: 100%;
    object-fit: contain; display: block;
}

.menu { padding: 15px 0; overflow-y: auto; flex: 1; }
.menu-item { cursor: pointer; color: var(--text-main); }
.menu-item.collapsed .submenu { display: none; }

.menu-group {
    padding: 14px 20px 6px; font-size: 12px; font-weight: 600;
    color: var(--text-placeholder); letter-spacing: 1px; user-select: none;
}
.menu-group:not(:first-child) { padding-top: 18px; }

.menu-title {
    padding: 12px 20px; display: flex; justify-content: space-between; align-items: center;
    font-weight: 500; transition: all .3s; user-select: none;
}
.menu-title:hover { background: var(--bg-hover); color: var(--primary); }
.menu-title::after {
    content: "▼"; font-size: 10px; transition: transform .3s; color: var(--text-placeholder);
}
.menu-item.collapsed .menu-title::after { transform: rotate(-90deg); }

.submenu { display: block; background: #fafafa; }
.submenu-item {
    padding: 10px 20px 10px 40px; color: var(--text-regular); cursor: pointer;
    transition: all .3s; font-size: 13px; position: relative; user-select: none;
}
.submenu-item:hover { color: var(--primary); background: var(--bg-hover); }
.submenu-item.active { color: var(--primary); background: var(--primary-light); font-weight: 500; }
.submenu-item.active::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
    background: var(--primary);
}

/* ---------- 右侧主区域 ---------- */
.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar {
    height: 50px; background: #fff; display: flex; align-items: center; padding: 0 20px;
    border-bottom: 1px solid var(--border); justify-content: space-between; flex-shrink: 0;
}
.breadcrumb { font-size: 14px; color: var(--text-secondary); }
.breadcrumb span { color: var(--text-main); font-weight: 500; }
.topbar-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-regular); }
.avatar {
    width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 12px;
}
.content-body { flex: 1; padding: 25px; overflow-y: auto; }

/* ==========================================================================
   页面切换
   ========================================================================== */
.page { display: none; }
.page.active { display: block; animation: pageIn .28s ease; }
@keyframes pageIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

/* ==========================================================================
   通用卡片 / 按钮
   ========================================================================== */
.card {
    background: #fff; border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
    box-shadow: var(--shadow-card);
}
.btn {
    padding: 6px 15px; border-radius: 4px; font-size: 14px; cursor: pointer;
    border: 1px solid transparent; transition: all .25s; line-height: 1.5; white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(230, 57, 70, .35); }
.btn-outline { background: #fff; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-plain { background: #fff; color: var(--text-regular); border-color: var(--border-dark); }
.btn-plain:hover { color: var(--primary); border-color: var(--primary); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(1.08); }
.btn-sm { padding: 4px 10px; font-size: 13px; }

/* ==========================================================================
   工具栏 / 筛选
   ========================================================================== */
.tree-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 1px solid var(--border); }
.toolbar-tip { margin-left: auto; font-size: 12px; color: var(--text-placeholder); }

.table-toolbar {
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.table-toolbar.no-border { border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.filter-group { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.update-time { font-size: 12px; color: var(--text-placeholder); }

.input {
    height: 32px; padding: 0 10px; border: 1px solid var(--border-dark); border-radius: 4px;
    outline: none; font-size: 13px; color: var(--text-main); background: #fff;
    transition: border-color .25s; font-family: inherit;
}
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(230, 57, 70, .12); }
.input[type="text"] { min-width: 180px; }
select.input { cursor: pointer; padding-right: 6px; }
textarea.input { height: auto; padding: 8px 10px; resize: vertical; min-height: 72px; width: 100%; line-height: 1.6; }

/* ==========================================================================
   树形视图
   ========================================================================== */
.tree-container { padding-left: 0; }
.tree-node { margin-bottom: 5px; }

.tree-node-header {
    display: flex; align-items: center; padding: 8px 10px; border-radius: 4px;
    cursor: pointer; transition: background .2s, border-color .2s; position: relative;
    border-left: 3px solid transparent;
}
.tree-node-header:hover { background: var(--bg-hover); }
.tree-node-header.highlight { background: var(--primary-light); border-left-color: var(--primary); }

/* 折叠箭头（仅有子节点时显示） */
.tree-node-header::before { content: ""; width: 14px; flex-shrink: 0; font-size: 10px; color: var(--text-placeholder); transition: transform .3s; }
.tree-node:has(> .tree-children) > .tree-node-header::before { content: "▾"; }
.tree-node.collapsed:has(> .tree-children) > .tree-node-header::before { content: "▸"; }

.tree-icon { margin-right: 8px; font-size: 15px; transition: transform .25s; }
.tree-node.collapsed > .tree-node-header > .tree-icon { transform: scale(.88); opacity: .7; }
.tree-children { padding-left: 24px; display: block; overflow: hidden; }
.tree-node.collapsed > .tree-children { display: none; }

.tree-leaf {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 10px 8px 30px; border-radius: 4px; position: relative; cursor: pointer;
    transition: background .2s; border-left: 3px solid transparent;
}
.tree-leaf:hover { background: var(--bg-hover); }
.tree-leaf .leaf-name { color: var(--text-regular); }
.tree-leaf.highlight { background: var(--primary-light); border-left-color: var(--primary); }
.tree-leaf.highlight .leaf-name { color: var(--text-main); }

/* 悬浮操作区 */
.node-actions {
    display: none; position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
    background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 2px 5px;
    box-shadow: var(--shadow-pop); align-items: center; gap: 6px; z-index: 5;
}
.tree-node-header:hover .node-actions, .tree-leaf:hover .node-actions { display: flex; }
.node-actions span { font-size: 12px; cursor: pointer; color: var(--primary); padding: 2px 4px; border-radius: 2px; transition: background .2s; }
.node-actions span:hover { background: var(--primary-light); }
.node-actions span.danger { color: var(--text-secondary); }
.node-actions span.danger:hover { color: var(--primary); }

.leaf-actions { margin-left: auto; margin-right: 10px; display: flex; gap: 12px; font-size: 12px; }
.leaf-actions a { color: var(--primary); cursor: pointer; }
.leaf-actions a:hover { text-decoration: underline; }
.tree-leaf:hover .leaf-actions { visibility: hidden; }

/* 必填/提示文字 */
.field-hint { font-size: 12px; color: var(--text-placeholder); line-height: 1.6; }
.char-counter { font-size: 12px; color: var(--text-placeholder); text-align: right; margin-top: 2px; }
.char-counter.over { color: var(--danger); }

/* 开关行 */
.switch-row {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid var(--border); border-radius: var(--radius); background: #fafbfc;
    transition: all .25s;
}
.switch-row.on { background: var(--primary-light); border-color: rgba(230, 57, 70, .3); }
.switch-row .switch-text { display: flex; flex-direction: column; gap: 3px; }
.switch-row .switch-label { font-size: 14px; font-weight: 500; }
.switch-row .switch-desc { font-size: 12px; color: var(--text-secondary); }

/* ==========================================================================
   评分录入区
   ========================================================================== */
.score-panel {
    margin-top: 16px; border: 1px solid var(--border); border-radius: var(--radius);
    overflow: hidden; background: #fff;
}
.score-panel-head {
    padding: 12px 16px; background: #fafbfc; border-bottom: 1px solid var(--border);
    font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; align-items: center;
}
.score-panel-body { padding: 18px 16px; }
.score-panel.collapsed .score-panel-body { display: none; }
.score-panel.collapsed .score-panel-head { border-bottom: none; }

.score-rules { display: flex; flex-direction: column; gap: 12px; }
.score-rule {
    display: flex; align-items: flex-start; gap: 12px; padding: 14px;
    border: 1px solid var(--border); border-radius: var(--radius); transition: all .25s;
    background: #fff;
}
.score-rule:hover { border-color: var(--border-dark); box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.score-rule .rule-main { flex: 1; min-width: 0; }
.score-rule .rule-name { width: 110px; flex-shrink: 0; }
.score-rule .rule-score { width: 96px; flex-shrink: 0; }
.score-rule .rule-del {
    color: var(--text-secondary); cursor: pointer; font-size: 15px; padding: 6px 8px;
    border-radius: 4px; transition: all .2s; flex-shrink: 0; line-height: 1;
}
.score-rule .rule-del:hover { color: var(--primary); background: var(--primary-light); }

.score-total {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; margin-top: 16px; border-radius: var(--radius);
    background: var(--primary-light); border: 1px dashed rgba(230, 57, 70, .35);
}
.score-total .st-label { font-size: 13px; color: var(--text-regular); }
.score-total .st-value { font-size: 24px; font-weight: 600; color: var(--primary); line-height: 1; }
.score-total .st-value .unit { font-size: 13px; font-weight: 400; margin-left: 2px; }
.score-total .st-tip { font-size: 12px; color: var(--text-secondary); }

.score-present-list { display: flex; flex-wrap: wrap; gap: 8px; }
.score-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px;
    border-radius: 14px; font-size: 13px; background: #f4f4f5; color: var(--text-regular);
    border: 1px solid var(--border); position: relative;
}
.score-chip .chip-value { color: var(--primary); font-weight: 600; }
.score-chip .chip-x { cursor: pointer; color: var(--text-placeholder); font-size: 12px; }
.score-chip .chip-x:hover { color: var(--primary); }

.rule-empty { padding: 26px; text-align: center; color: var(--text-placeholder); font-size: 13px; border: 1px dashed var(--border-dark); border-radius: var(--radius); }

/* 分数输入的步进控件 */
.score-stepper { display: flex; align-items: center; border: 1px solid var(--border-dark); border-radius: 4px; overflow: hidden; height: 32px; background: #fff; }
.score-stepper button {
    width: 28px; height: 100%; border: none; background: #fafbfc; cursor: pointer;
    color: var(--text-regular); font-size: 14px; transition: all .2s; flex-shrink: 0;
}
.score-stepper button:hover { background: var(--primary-light); color: var(--primary); }
.score-stepper button:disabled { color: #dcdfe6; cursor: not-allowed; background: #f7f8fa; }
.score-stepper input {
    width: 40px; height: 100%; border: none; outline: none; text-align: center;
    font-size: 13px; color: var(--text-main); font-family: inherit;
}

/* ---------- 只读展示样式 ---------- */
.readonly-value {
    min-height: 34px; padding: 7px 12px; background: #fafbfc; border: 1px solid var(--border);
    border-radius: 4px; font-size: 14px; color: var(--text-main);
}
.readonly-content {
    min-height: 100px; padding: 14px 16px; background: #fafbfc; border: 1px solid var(--border);
    border-radius: var(--radius); line-height: 1.9; font-size: 13px; color: var(--text-regular);
}
.readonly-content p { margin: 0; }
.readonly-content p.blank { height: 8px; }
.readonly-content.empty-content { color: var(--text-placeholder); display: flex; align-items: center; justify-content: center; min-height: 90px; }

.switch-row.readonly { cursor: default; }
.switch-row.readonly .switch { cursor: default; pointer-events: none; }
.switch-row.readonly:not(.on) .switch { opacity: .55; }

.score-rules.readonly { gap: 10px; }
.score-rule.readonly { cursor: default; align-items: center; }
.score-rule.readonly:hover { border-color: var(--border); box-shadow: none; }
.score-rule .rule-name-text { width: 110px; flex-shrink: 0; font-size: 13px; font-weight: 500; color: var(--text-main); }
.score-rule .rule-desc-text { font-size: 13px; color: var(--text-secondary); }
.score-rule .rule-score-text { width: 96px; flex-shrink: 0; text-align: right; font-size: 14px; font-weight: 600; color: var(--primary); }

/* ==========================================================================
   查询区（模版配置）
   ========================================================================== */
.search-card { padding: 22px 24px; }
.search-grid {
    display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.search-item { display: flex; align-items: center; gap: 10px; }
.search-item > label { font-size: 14px; color: var(--text-regular); white-space: nowrap; }
.search-item .input { width: 260px; }
.search-actions { margin-left: auto; display: flex; gap: 10px; }

/* ==========================================================================
   模版列表表格
   ========================================================================== */
.tpl-table th { background: #f7f8fa; }
.tpl-table td { height: 48px; }
.tpl-table .blank-row td {
    background: #fcfcfd; border-bottom: 1px solid #f4f5f7; color: var(--text-placeholder);
}
.tpl-table .blank-row:hover td { background: #fcfcfd; }

/* 分页控件 */
.page-ellipsis { padding: 0 4px; color: var(--text-placeholder); }
.page-size-wrap { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-regular); }
.page-size-select {
    height: 30px; padding: 0 4px; border: 1px solid var(--border-dark); border-radius: 4px;
    font-size: 13px; color: var(--text-main); background: #fff; cursor: pointer; outline: none;
    font-family: inherit;
}
.page-size-select:focus { border-color: var(--primary); }
.page-jump { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-regular); }
.page-jump-input {
    width: 46px; height: 30px; text-align: center; border: 1px solid var(--border-dark);
    border-radius: 4px; outline: none; font-size: 13px; font-family: inherit; color: var(--text-main);
}
.page-jump-input:focus { border-color: var(--primary); }

/* 开关 + 说明文字 */
.switch-cell { display: flex; align-items: center; gap: 10px; height: 32px; }

/* ==========================================================================
   模版详情页（整页）
   ========================================================================== */
.page-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card);
    padding: 16px 22px; margin-bottom: 20px; flex-wrap: wrap;
}
.page-header-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.page-back {
    cursor: pointer; color: var(--text-regular); font-size: 14px; padding: 5px 10px;
    border-radius: 4px; transition: all .2s; white-space: nowrap;
    border: 1px solid var(--border-dark); background: #fff;
}
.page-back:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }
.page-header-title { font-size: 17px; font-weight: 600; color: var(--text-main); }
.page-header-actions { display: flex; gap: 10px; }

/* 左右分栏 */
.tpl-detail-layout {
    display: grid; grid-template-columns: minmax(360px, 1fr) minmax(420px, 1.25fr);
    gap: 20px; align-items: start;
}
.tpl-form-card, .tpl-items-card { margin-bottom: 0; }
.tpl-form-card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tpl-items-card { display: flex; flex-direction: column; }
.tpl-items-card .check-tree { max-height: none; flex: 1; min-height: 380px; max-height: 620px; }
.tpl-items-card .tree-picker-actions { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }

.crumb-link { color: var(--primary); cursor: pointer; }
.crumb-link:hover { text-decoration: underline; }

@media (max-width: 1180px) {
    .tpl-detail-layout { grid-template-columns: 1fr; }
}

/* ==========================================================================
   任务规则详情页
   ========================================================================== */
.rule-detail-layout {
    display: flex; flex-direction: column; gap: 20px; align-items: stretch;
}
.rule-form-card, .rule-strategy-card { margin-bottom: 0; }
.rule-form-card .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rule-form-card .form-section-title:first-child { margin-top: 0; }
/* 执行策略：上下结构中整行展示，两个策略项并排 */
.policy-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 900px) { .policy-grid { grid-template-columns: 1fr; } }

/* 频次标签页 */
.freq-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.freq-tab {
    padding: 7px 16px; border: 1px solid var(--border-dark); border-radius: 4px;
    font-size: 13px; cursor: pointer; transition: all .22s; background: #fff;
    color: var(--text-regular); user-select: none;
}
.freq-tab:hover { color: var(--primary); border-color: var(--primary); }
.freq-tab.active {
    background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500;
    box-shadow: 0 2px 8px rgba(230, 57, 70, .28);
}

/* 星期 / 多选标签 */
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
    padding: 5px 13px; border: 1px solid var(--border-dark); border-radius: 14px;
    font-size: 13px; cursor: pointer; transition: all .2s; background: #fff; color: var(--text-regular);
    user-select: none;
}
.chip:hover { color: var(--primary); border-color: var(--primary); }
.chip.on { background: var(--primary-light); border-color: var(--primary); color: var(--primary); font-weight: 500; }

/* 适用项目：已选标签 + 弹窗选择 */
.selected-projects {
    display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; padding: 8px 10px;
    border: 1px solid var(--border-dark); border-radius: var(--radius);
    background: #fafbfc; align-items: center; max-height: 160px; overflow-y: auto;
}
.sp-empty { font-size: 13px; color: var(--text-placeholder); }
.sp-chip {
    display: inline-flex; align-items: center; gap: 6px; padding: 4px 8px 4px 11px;
    background: #fff; border: 1px solid rgba(230, 57, 70, .35); border-radius: 4px;
    font-size: 13px; color: var(--primary); max-width: 100%;
}
.sp-chip .sp-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-chip .sp-del {
    cursor: pointer; color: var(--text-placeholder); font-size: 11px; line-height: 1;
    padding: 2px 4px; border-radius: 2px; transition: all .18s; flex-shrink: 0;
}
.sp-chip .sp-del:hover { color: var(--primary); background: var(--primary-light); }
.sp-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.sp-actions .field-hint { margin-left: auto; }

/* 选择项目弹窗 */
.project-modal-content { width: 560px; max-width: 100%; }
.modal-toolbar {
    display: flex; align-items: center; gap: 10px; padding: 14px 20px;
    border-bottom: 1px solid var(--border); flex-wrap: wrap;
}
.modal-toolbar .input { flex: 1; min-width: 160px; }
.project-list-body { padding: 8px 12px; max-height: 420px; }
.project-row {
    display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 4px;
    cursor: pointer; transition: background .18s; user-select: none;
}
.project-row:hover { background: var(--bg-hover); }
.project-row.on { background: var(--primary-light); }
.project-row input[type="checkbox"] {
    accent-color: var(--primary); width: 15px; height: 15px; cursor: pointer; flex-shrink: 0;
}
.project-row .pr-name { font-size: 13px; color: var(--text-main); overflow: hidden;
    text-overflow: ellipsis; white-space: nowrap; }
.project-row.on .pr-name { color: var(--primary); font-weight: 500; }
.project-load-more {
    text-align: center; padding: 12px; font-size: 12px; color: var(--primary);
    cursor: pointer; border-radius: 4px; transition: background .18s;
}
.project-load-more:hover { background: var(--primary-light); }

/* 重复设置提醒 */
.dup-tip {
    display: flex; align-items: flex-start; gap: 8px; margin-top: 10px; padding: 10px 12px;
    background: #fff7e6; border: 1px solid #ffd591; border-radius: var(--radius);
    font-size: 12px; color: #ad6800; line-height: 1.7;
}
.dup-tip .dup-icon { flex-shrink: 0; font-size: 13px; }
.dup-tip .dup-list { display: flex; flex-direction: column; gap: 2px; }

/* 带后缀的输入 */
.field-with-suffix { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.field-with-suffix .suffix { font-size: 13px; color: var(--text-regular); }

/* 策略区块 */
.policy-block + .policy-block { margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--border); }
.policy-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px;
}
.policy-title { font-size: 14px; font-weight: 500; color: var(--text-main); }
.policy-body .form-item > label { font-size: 13px; color: var(--text-regular); display: block; margin-bottom: 8px; }
.radio-group.compact .radio-card { padding: 12px; }
.radio-group.compact .radio-desc { font-size: 12px; }

/* 规则摘要 */
.rule-summary { display: flex; flex-direction: column; gap: 2px; }
.summary-row {
    display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: 13px;
}
.summary-row:last-child { border-bottom: none; }
.summary-row .sr-label { width: 96px; flex-shrink: 0; color: var(--text-secondary); }
.summary-row .sr-value { flex: 1; color: var(--text-main); word-break: break-all; }

@media (max-width: 1240px) {
    .rule-form-card .form-grid { grid-template-columns: 1fr; }
}

/* 巡检项导入弹窗 */
.import-modal-content { width: 780px; max-width: 94vw; }
.import-tip {
    background: #f0f7ff; border: 1px solid var(--border); border-radius: 8px;
    padding: 10px 14px; font-size: 13px; color: var(--text-secondary);
    margin-bottom: 14px; line-height: 1.7;
}
.import-file-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.import-file-input { font-size: 13px; color: var(--text-secondary); }
.import-preview-head { margin: 12px 0 8px; font-size: 13px; color: var(--text-secondary); }
.import-preview-head b { color: var(--primary); }
.import-table-wrap { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.import-table th, .import-table td { font-size: 12px; }
.import-content-cell { max-width: 320px; white-space: normal; word-break: break-all; color: var(--text-secondary); }
.import-err { color: #f56c6c; }
.import-empty { padding: 24px; text-align: center; color: var(--text-secondary); font-size: 13px; }

/* ==========================================================================
   移动端：入户巡检（新建任务/房间图） + 综合巡检（计数器打分）
   ========================================================================== */
/* 列表头：当前项目 + 新建按钮 */
.app-list-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}
.app-list-head .alh-project { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.app-list-head .alh-label {
    font-size: 11px; font-weight: 400; color: var(--text-secondary);
    background: #f2f3f5; border-radius: 4px; padding: 2px 6px;
}
.app-list-head .app-btn { flex-shrink: 0; }

/* 新建任务表单 */
.indoor-form-row { padding: 9px 0 2px; }
.indoor-form-row label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.adc-fixed {
    display: inline-block; margin-left: 8px; font-size: 10px; color: #fa8c16;
    background: #fff7e6; border: 1px solid #ffd591; border-radius: 4px; padding: 1px 5px;
    transform: scale(.92); transform-origin: left center;
}
.adc-room-count { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; }
.adc-room-count .adc-clear { color: var(--primary); cursor: pointer; }
.adc-rooms { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.room-chip {
    font-size: 11px; color: var(--primary); background: #e8f3ff;
    border: 1px solid #b8dcff; border-radius: 4px; padding: 2px 7px;
}

/* 房间图：按楼层分组，点击勾选变色 */
.room-floor { margin-bottom: 12px; }
.room-floor-title {
    font-size: 12px; color: var(--text-secondary); margin: 4px 0 8px;
    display: flex; align-items: center; gap: 8px;
}
.room-floor-title::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.room-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.room-card {
    position: relative; background: #f7f8fa; border: 1.5px solid var(--border);
    border-radius: 10px; padding: 10px 4px 8px; text-align: center;
    cursor: pointer; transition: all .15s; user-select: none;
}
.room-card:active { transform: scale(.96); }
.room-card .rc-name { font-size: 15px; font-weight: 600; color: var(--text-main); }
.room-card .rc-tag { font-size: 10px; margin-top: 3px; border-radius: 4px; padding: 1px 0; }
.room-card .rc-tag.live { color: #52c41a; background: #f6ffed; }
.room-card .rc-tag.wait { color: #fa8c16; background: #fff7e6; }
.room-card .rc-tag.idle { color: #909399; background: #f2f3f5; }
.room-card .rc-check {
    position: absolute; top: 4px; right: 4px; width: 16px; height: 16px;
    border-radius: 50%; background: var(--primary); color: #fff; font-size: 10px;
    display: none; align-items: center; justify-content: center; line-height: 1;
}
.room-card.selected { background: #e8f3ff; border-color: var(--primary); }
.room-card.selected .rc-name { color: var(--primary); }
.room-card.selected .rc-check { display: flex; }

/* 综合巡检：实时总分 + 计数器 */
.app-score-total .ast-score { display: flex; align-items: baseline; gap: 6px; margin-bottom: 6px; }
.app-score-total .ast-score b { font-size: 34px; line-height: 1; color: var(--primary); }
.app-score-total .ast-score .ast-unit { font-size: 13px; color: var(--text-main); }
.app-score-total .ast-score .ast-full { font-size: 12px; color: var(--text-secondary); }
.app-score-total .ast-meta { display: flex; gap: 16px; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.app-score-total .ast-rate { color: #fa8c16; }
.app-score-total .field-hint { margin-top: 6px; }

.app-score-row {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: #fff; border-radius: 10px; padding: 11px 12px; margin-bottom: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04);
}
.app-score-row .asr-body { min-width: 0; }
.app-score-row .asr-name { font-size: 13px; color: var(--text-main); }
.app-score-row .asr-meta { font-size: 11px; color: var(--text-secondary); margin-top: 2px; }
.app-score-row .asr-score { font-size: 16px; font-weight: 600; flex-shrink: 0; }
.app-score-row .asr-score span { font-size: 11px; font-weight: 400; margin-left: 2px; }
.app-score-row .asr-score.full { color: #52c41a; }
.app-score-row .asr-score.lost { color: #f5222d; }

.counter-stepper {
    display: flex; align-items: center; gap: 6px; flex-shrink: 0;
    background: #f2f3f5; border-radius: 8px; padding: 3px;
}
.counter-stepper .cs-btn {
    width: 26px; height: 26px; border-radius: 6px; background: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: var(--primary); cursor: pointer; user-select: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}
.counter-stepper .cs-btn:active { background: #e8f3ff; }
.counter-stepper .cs-val {
    width: 40px; height: 26px; border: none; background: transparent;
    text-align: center; font-size: 14px; font-weight: 600; color: var(--text-main);
}

/* ==========================================================================
   巡楼统计：双报表 Tab + 完成率环 + 综合巡检得分统计
   ========================================================================== */
.stats-tab-card { padding: 0; }
.stats-tabs { display: flex; gap: 4px; padding: 6px 10px 0; border-bottom: 1px solid var(--border); }
.stats-tab {
    position: relative; padding: 12px 22px; font-size: 14px; color: var(--text-secondary);
    cursor: pointer; user-select: none;
}
.stats-tab:hover { color: var(--primary); }
.stats-tab.active { color: var(--primary); font-weight: 600; }
.stats-tab.active::after {
    content: ''; position: absolute; left: 16px; right: 16px; bottom: -1px;
    height: 2px; background: var(--primary); border-radius: 2px;
}

.stats-block-title { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.stats-block-tip { font-size: 12px; font-weight: 400; color: #e63946; }

/* 完成率环 */
.stat-rings {
    display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px;
    padding: 14px 0 4px;
}
.stat-ring-item { text-align: center; cursor: pointer; }
.stat-ring-item:hover .stat-ring { box-shadow: 0 0 0 3px rgba(230, 57, 70, .08); }
.stat-ring {
    width: 84px; height: 84px; margin: 0 auto; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 18px; font-weight: 600; border: 3px solid;
}
.stat-ring.green { color: #52c41a; border-color: #b7eb8f; background: #f6ffed; }
.stat-ring.red { color: #e63946; border-color: #ffc2c7; background: #fff1f0; }
.stat-ring.blue { color: #1677ff; border-color: #91caff; background: #e6f4ff; }
.stat-ring-label { margin-top: 8px; font-size: 12px; color: var(--text-secondary); }

/* 查询条 */
.stats-filter-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 0; }
.stats-filter-bar .sfb-label { font-size: 13px; color: var(--text-secondary); flex-shrink: 0; }
.stats-filter-bar .input { width: 200px; }

/* 统计表格 */
.stats-table th, .stats-table td { text-align: center; }
.stats-table td.row-strong { text-align: left; font-weight: 600; }
.stats-table .ok-text { color: #52c41a; }
.stats-table .danger-text, .stats-table .warn-text { color: #e63946; }
.stats-table .avg-score { font-weight: 600; }

/* 综合巡检得分统计 */
.score-stat-notice {
    font-size: 12px; color: #e63946; background: #fff7f8;
    border: 1px dashed #ffc2c7; border-radius: 6px; padding: 8px 12px; margin-bottom: 14px;
}
.score-stat-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.score-stat-card {
    background: #f7f8fa; border-radius: 10px; padding: 18px 0; text-align: center;
}
.score-stat-card .ssc-value { font-size: 30px; font-weight: 700; line-height: 1.2; }
.score-stat-card .ssc-value.green { color: #52c41a; }
.score-stat-card .ssc-label { margin-top: 6px; font-size: 13px; color: var(--text-secondary); }
.score-stat-foot { margin-top: 12px; font-size: 12px; color: var(--text-secondary); }

@media (max-width: 1240px) {
    .stat-rings { grid-template-columns: repeat(4, 1fr); row-gap: 18px; }
}

/* ==========================================================================
   移动端：主页面（巡楼管理） / 消息提醒 / 选房下发人员 / 权限提示
   ========================================================================== */
.phone-screen { position: relative; }

/* 列表头提示（入户：PC下发说明） */
.alh-hint { font-size: 11px; color: var(--text-secondary); }

/* 工作台：模块宫格 + 左下角待办 */
.wb-banner {
    background: linear-gradient(135deg, var(--primary), #ff7a85);
    border-radius: 12px; padding: 16px 18px; color: #fff; margin-bottom: 14px;
}
.wb-banner .wb-banner-title { font-size: 17px; font-weight: 600; }
.wb-banner .wb-banner-sub { font-size: 12px; opacity: .9; margin-top: 4px; }

.wb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.wb-item {
    background: #fff; border-radius: 12px; padding: 14px 4px 12px; text-align: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05); cursor: pointer; transition: transform .15s, box-shadow .15s;
}
.wb-item:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(0, 0, 0, .08); }
.wb-item .wb-icon { display: block; font-size: 24px; margin-bottom: 8px; }
.wb-item .wb-label { font-size: 12px; color: var(--text-main); }

.wb-foot { position: absolute; left: 14px; bottom: 14px; z-index: 30; }
.wb-todo {
    display: inline-flex; align-items: center; gap: 6px;
    background: #fff; border-radius: 18px; padding: 8px 14px; font-size: 13px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .12); cursor: pointer; color: var(--text-main);
}
.wb-todo b {
    min-width: 18px; height: 18px; border-radius: 9px; background: #e63946; color: #fff;
    font-size: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* 搜索框 */
.app-search {
    display: flex; align-items: center; gap: 8px; background: #fff;
    border-radius: 20px; padding: 9px 14px; margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}
.app-search .as-icon { font-size: 14px; opacity: .6; }
.app-search .as-input {
    flex: 1; border: none; outline: none; background: transparent;
    font-size: 13px; color: var(--text-main); min-width: 0;
}
.app-search .as-clear { color: var(--text-placeholder); cursor: pointer; font-size: 13px; }

/* 状态筛选 */
.app-status-chips {
    display: flex; gap: 8px; overflow-x: auto; padding-bottom: 10px; margin-bottom: 2px;
}
.app-status-chips .asc-item {
    flex-shrink: 0; font-size: 12px; color: var(--text-secondary);
    background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 5px 12px;
    cursor: pointer; user-select: none;
}
.app-status-chips .asc-item.active {
    color: #fff; background: var(--primary); border-color: var(--primary); font-weight: 600;
}

/* 详情页：hero + 双列信息栅格 */
.app-hero {
    border-radius: 12px; padding: 16px; margin-bottom: 12px; color: #fff;
    background: linear-gradient(135deg, var(--primary), #ff7a85);
}
.app-hero.done { background: linear-gradient(135deg, #52c41a, #95de64); }
.app-hero.wait { background: linear-gradient(135deg, #1677ff, #69b1ff); }
.app-hero .ah-name { font-size: 16px; font-weight: 600; line-height: 1.5; margin-bottom: 8px; }
.app-hero .ah-tags { display: flex; align-items: center; gap: 8px; }
.app-hero .ah-type {
    font-size: 11px; background: rgba(255, 255, 255, .22); border-radius: 10px; padding: 2px 10px;
}
.app-hero .app-status-tag {
    background: rgba(255, 255, 255, .25); color: #fff; border-radius: 10px; padding: 2px 10px; font-size: 11px;
}
.adc-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 10px; }
.adc-grid .adc-cell { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.adc-grid .adc-cell.full { grid-column: 1 / -1; }
.adc-grid .adc-label { font-size: 11px; color: var(--text-secondary); }
.adc-grid .adc-value { font-size: 13px; color: var(--text-main); word-break: break-all; }

.app-home-tabs {
    display: flex; gap: 8px; margin-bottom: 12px;
    background: #fff; border-radius: 12px; padding: 8px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
}
.app-home-tabs .aht-item {
    flex: 1; text-align: center; padding: 9px 0; border-radius: 8px;
    font-size: 13px; color: var(--text-secondary); cursor: pointer; user-select: none;
}
.app-home-tabs .aht-item em { font-style: normal; margin-left: 4px; font-size: 11px; }
.app-home-tabs .aht-item.active { background: var(--primary); color: #fff; font-weight: 600; }
.app-home-tabs .aht-item.active em { color: rgba(255, 255, 255, .85); }

.app-home-list { position: relative; padding-bottom: 56px; }
.app-home-more {
    text-align: center; font-size: 13px; color: var(--primary);
    padding: 10px 0 2px; cursor: pointer;
}

/* 左下角消息提醒 */
.app-msg-fab {
    position: absolute; left: 14px; bottom: 14px; z-index: 30;
    width: 44px; height: 44px; border-radius: 50%;
    background: #fff; box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; cursor: pointer;
}
.app-msg-fab b {
    position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px;
    border-radius: 9px; background: #e63946; color: #fff; font-size: 11px;
    display: flex; align-items: center; justify-content: center; padding: 0 4px;
}

/* 消息提醒抽屉列表 */
.msg-list { display: flex; flex-direction: column; gap: 4px; }
.msg-row { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px dashed var(--border); cursor: pointer; transition: background .15s; border-radius: 4px; }
.msg-row:hover { background: var(--primary-light); }
.msg-row:last-child { border-bottom: none; }
.msg-row .msg-icon { font-size: 18px; flex-shrink: 0; }
.msg-row .msg-text { font-size: 13px; color: var(--text-main); }
.msg-row .msg-time { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }

/* 下发人员 / 整改人选择 */
.assign-staff { display: flex; flex-wrap: wrap; gap: 8px; padding: 4px 0 8px; }
.assign-chip {
    padding: 7px 16px; border-radius: 18px; font-size: 13px;
    background: #f2f3f5; color: var(--text-secondary);
    border: 1.5px solid transparent; cursor: pointer; user-select: none;
}
.assign-chip.active {
    background: #e8f3ff; color: var(--primary); border-color: var(--primary); font-weight: 600;
}
.assign-row { padding: 10px 0; border-bottom: 1px dashed var(--border); }
.assign-row:last-child { border-bottom: none; }
.assign-row .assign-name { font-size: 13px; margin-bottom: 8px; }
.assign-row .assign-staff { padding: 0; }

/* 整改通知：整改项清单 */
.assign-block {
    background: #f7f8fa; border-radius: 8px; padding: 10px 12px; margin-bottom: 14px;
}
.assign-block .ab-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }
.assign-block .ab-item { font-size: 13px; color: var(--text-main); line-height: 1.9; }

/* 权限提示 */
.app-role-hint {
    flex: 1; text-align: center; font-size: 12px; color: #fa8c16;
    background: #fff7e6; border-radius: 8px; padding: 9px 8px;
}
.app-role-select { width: 130px; font-size: 12px; padding: 4px 6px; }
.warn-text { color: #e63946; }

/* ==========================================================================
   移动端设计系统（参照参考图：红色主色 / 白色卡片 / 居中标题栏）
   ========================================================================== */
.phone-header {
    position: relative; background: #fff; height: 46px;
    display: flex; align-items: center; justify-content: center;
    border-bottom: 1px solid #f0f0f0;
}
.phone-header .ph-title { font-size: 16px; font-weight: 600; color: #1a1a1a; }
.phone-header .ph-badge { display: none; }
.phone-body { background: #f5f5f5; padding: 10px; }

/* 列表页标题栏（白色 + 居中标题，参照图1） */
.app-detail-head {
    display: flex; align-items: center; justify-content: center; position: relative;
    background: #fff; border-radius: 10px; height: 44px; margin-bottom: 10px;
}
.app-detail-head .ath-title { font-size: 15px; font-weight: 600; color: #1a1a1a; }

/* 搜索框（灰底胶囊，参照图1） */
.app-search {
    display: flex; align-items: center; gap: 8px; background: #f2f3f5;
    border-radius: 20px; padding: 10px 14px; margin-bottom: 10px; box-shadow: none;
}
.app-search .as-icon { font-size: 14px; opacity: .55; }
.app-search .as-input { flex: 1; border: none; outline: none; background: transparent; font-size: 13px; min-width: 0; }
.app-search .as-clear { color: #b0b0b0; cursor: pointer; font-size: 13px; }

/* 页签（文字 + 红色下划线，参照图1） */
.m-tabs {
    display: flex; gap: 26px; overflow-x: auto; background: #fff;
    border-radius: 10px; padding: 2px 14px; margin-bottom: 10px;
}
.m-tabs::-webkit-scrollbar { display: none; }
.m-tab {
    flex-shrink: 0; padding: 12px 0 10px; font-size: 14px; color: #666;
    position: relative; cursor: pointer; white-space: nowrap; user-select: none;
}
.m-tab.active { color: var(--m-red); font-weight: 600; }
.m-tab.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: 0;
    height: 2px; border-radius: 1px; background: var(--m-red);
}
.m-tabs.sub { padding: 0 14px; }
.m-tabs.sub .m-tab { font-size: 13px; padding: 10px 0 9px; }

/* 任务卡片（参照图1） */
.mt-card {
    background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .04); cursor: pointer;
}
.mtc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.mtc-title { font-size: 15px; font-weight: 600; color: #1a1a1a; line-height: 1.4; }
.mtc-status { font-size: 12px; color: #8c8c8c; flex-shrink: 0; }
.mtc-status.red { color: var(--m-red); }
.mtc-status.green { color: #52c41a; }
.mtc-status.orange { color: #fa8c16; }
.mtc-status.purple { color: #722ed1; }
.mtc-status.blue { color: #1677ff; }
.mtc-row { display: flex; align-items: center; gap: 6px; font-size: 13px; line-height: 2; }
.mtc-label { color: #8c8c8c; flex-shrink: 0; }
.mtc-value { color: #333; word-break: break-all; }
.mtc-copy { color: #1677ff; font-size: 12px; margin-left: auto; flex-shrink: 0; cursor: pointer; }
.mtc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.mtc-time { font-size: 12px; color: #bfbfbf; }
.mt-btn {
    border: 1px solid var(--m-red); color: var(--m-red); background: #fff;
    border-radius: 6px; padding: 6px 14px; font-size: 13px; cursor: pointer;
}
.mt-btn:active { background: #fff1f0; }

/* 详情信息卡（参照图3） */
.md-card { background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 10px; }
.md-title {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 15px; font-weight: 600; color: #1a1a1a; margin-bottom: 6px;
}
.md-title .md-status { font-size: 12px; font-weight: 400; color: #8c8c8c; }
.md-row {
    display: flex; align-items: flex-start; gap: 12px; font-size: 13px;
    line-height: 2.2; border-bottom: 1px dashed #f0f0f0;
}
.md-row:last-child { border-bottom: none; }
.md-label { color: #8c8c8c; flex-shrink: 0; }
.md-value { flex: 1; text-align: right; color: #333; word-break: break-all; }
.md-copy-wrap { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.md-copy { color: #1677ff; font-size: 12px; cursor: pointer; }

/* 流程节点时间线 */
.md-node { display: flex; gap: 10px; padding: 6px 0; }
.md-node .nd-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--m-red);
    margin-top: 8px; flex-shrink: 0; box-shadow: 0 0 0 3px #fff1f0;
}
.md-node .nd-body { flex: 1; }
.md-node .nd-time { font-size: 12px; color: #8c8c8c; }
.md-node .nd-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; color: #333; line-height: 2; }
.md-node .nd-key { color: #333; }

/* 工作台（参照图2：红色头部 + 应用宫格 + 底部导航） */
.wb-header {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    background: var(--m-red); color: #fff; padding: 10px 12px 12px;
    margin: -10px -10px 12px; border-radius: 0 0 14px 14px;
}
.wb-header .wb-user { display: flex; align-items: center; gap: 8px; }
.wb-header .wb-avatar {
    width: 30px; height: 30px; border-radius: 50%; background: rgba(255, 255, 255, .28);
    display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px;
}
.wb-header .wb-name { font-size: 14px; font-weight: 600; }
.wb-header .wb-project {
    background: transparent; border: 1px solid rgba(255, 255, 255, .75); color: #fff;
    border-radius: 6px; padding: 5px 8px; font-size: 11px; outline: none; max-width: 46%;
}
.wb-header .wb-project option { color: #333; }
.wb-app-card { background: #fff; border-radius: 12px; padding: 12px 12px 16px; }
.wb-app-title {
    position: relative; font-size: 14px; font-weight: 600; color: #1a1a1a;
    padding-left: 10px; margin-bottom: 14px;
}
.wb-app-title::before {
    content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
    width: 3px; border-radius: 2px; background: var(--m-red);
}
.wb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 4px; }
.wb-item { text-align: center; cursor: pointer; }
.wb-item .wb-icon {
    width: 40px; height: 40px; border-radius: 11px; font-size: 18px;
    display: flex; align-items: center; justify-content: center; margin: 0 auto 6px;
}
.wb-item .wb-label { font-size: 11px; color: #333; line-height: 1.3; }

/* 底部导航（参照图2） */
.app-tabbar {
    position: absolute; left: 0; right: 0; bottom: 0; height: 56px; z-index: 20;
    background: #fff; border-top: 1px solid #f0f0f0;
    display: flex; align-items: center;
}
.app-tabbar .atb-item {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    font-size: 11px; color: #8c8c8c; cursor: pointer; user-select: none;
}
.app-tabbar .atb-icon { position: relative; font-size: 18px; line-height: 1; }
.app-tabbar .atb-icon b {
    position: absolute; top: -5px; right: -9px; min-width: 15px; height: 15px;
    border-radius: 8px; background: var(--m-red); color: #fff; font-size: 10px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}
.app-tabbar .atb-item.center .atb-icon {
    width: 40px; height: 40px; border-radius: 12px; background: var(--m-red); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    margin-top: -16px; box-shadow: 0 5px 12px rgba(225, 37, 27, .35);
}
.app-tabbar .atb-item.center .atb-label { color: var(--m-red); }
.app-tabbar-spacer { height: 58px; }

/* 主色变量（移动端） */
.app-shell {
    --m-red: #e1251b;
    --m-red-light: #fff1f0;
}
.phone-body .app-btn {
    background: var(--m-red); border-color: var(--m-red);
}
.phone-body .app-btn.ghost {
    background: #fff; color: var(--m-red); border: 1px solid var(--m-red);
}
.phone-body .app-btn.warn { background: #fa8c16; border-color: #fa8c16; }
.phone-body .app-btn.purple { background: #722ed1; border-color: #722ed1; }

/* ==========================================================================
   巡检流程（八步流程图）
   ========================================================================== */
/* 一级目录导航项（无子菜单） */
.menu-title-link::after { content: ''; }
.menu-title[data-page].active { color: var(--primary); background: var(--primary-light); font-weight: 600; }

.process-head { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; }
.process-head .ph-title { font-size: 18px; font-weight: 600; }
.process-head .process-sub { font-size: 13px; color: var(--text-secondary); }

/* 图例 */
.pf-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; font-size: 12px; color: var(--text-secondary); }
.pf-legend .pf-lg { display: inline-flex; align-items: center; gap: 6px; }
.pf-legend .pf-lg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.pf-legend .config i { background: #1677ff; }
.pf-legend .dispatch i { background: #722ed1; }
.pf-legend .execute i { background: var(--primary); }
.pf-legend .rectify i { background: #fa8c16; }
.pf-legend .stat i { background: #52c41a; }

/* 横向八步流程 */
.pf-flow {
    display: grid; grid-template-columns: repeat(8, minmax(0, 1fr));
    gap: 14px; align-items: stretch;
}
.pf-step {
    position: relative; background: #fff; border: 1px solid var(--border);
    border-radius: 10px; padding: 20px 10px 12px; text-align: center;
    transition: box-shadow .2s, transform .2s;
}
.pf-step:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, .08); transform: translateY(-2px); }
.pf-step::before {
    content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px;
    border-radius: 10px 10px 0 0; background: var(--primary);
}
.pf-step.config::before { background: #1677ff; }
.pf-step.dispatch::before { background: #722ed1; }
.pf-step.execute::before { background: var(--primary); }
.pf-step.rectify::before { background: #fa8c16; }
.pf-step.stat::before { background: #52c41a; }

.pf-node {
    width: 34px; height: 34px; margin: 0 auto 10px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-weight: 700; font-size: 15px; background: var(--primary);
    box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
}
.pf-step.config .pf-node { background: #1677ff; }
.pf-step.dispatch .pf-node { background: #722ed1; }
.pf-step.rectify .pf-node { background: #fa8c16; }
.pf-step.stat .pf-node { background: #52c41a; }

.pf-step .pf-title { font-size: 13px; font-weight: 600; line-height: 1.5; margin-bottom: 6px; }
.pf-step .pf-desc { font-size: 11px; color: var(--text-secondary); line-height: 1.6; }

/* 第三步骤：三种巡检类型分支 */
.pf-step .pf-types { display: flex; justify-content: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.pf-step .pf-chip {
    font-size: 10px; color: #722ed1; background: #f9f0ff;
    border: 1px solid #d3adf7; border-radius: 4px; padding: 1px 5px; white-space: nowrap;
}

.pf-step .pf-meta {
    margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--border);
    display: flex; flex-direction: column; gap: 3px; font-size: 10px;
}
.pf-step .pf-role { color: #fa8c16; }
.pf-step .pf-module { color: var(--text-placeholder); }

/* 步骤间流转箭头 */
.pf-arrow {
    position: absolute; top: 50%; right: -12px; transform: translateY(-50%);
    color: #c0c4cc; font-size: 12px; z-index: 2; line-height: 1;
}
.pf-step.rectify .pf-arrow { color: #ffc069; }
.pf-step.stat .pf-arrow { color: #b7eb8f; }

@media (max-width: 1240px) {
    .pf-flow { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 18px; }
    .pf-arrow { display: none; }
}

/* ==========================================================================
   巡检任务管理
   ========================================================================== */
.range-sep { color: var(--text-placeholder); padding: 0 2px; }
.muted-dash { color: var(--text-placeholder); }

/* 汇总 Tab 卡片 */
.tab-card { padding: 16px 22px 20px; }
.tab-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.tab-card-title {
    font-size: 14px; font-weight: 600; padding-left: 8px;
    border-left: 3px solid var(--primary); line-height: 1.2;
}
.tab-row { display: flex; align-items: center; gap: 14px; padding: 9px 0; flex-wrap: wrap; }
.tab-row + .tab-row { border-top: 1px dashed var(--border); }
.tab-label { width: 84px; flex-shrink: 0; font-size: 13px; color: var(--text-regular); }
.tab-items { display: flex; gap: 20px; flex-wrap: wrap; }
.tab-item {
    font-size: 14px; cursor: pointer; color: var(--text-regular); padding: 2px 2px 6px;
    border-bottom: 2px solid transparent; transition: all .2s; user-select: none; white-space: nowrap;
}
.tab-item:hover { color: var(--primary); }
.tab-item.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.tab-item b { font-weight: 500; color: var(--text-secondary); margin-left: 2px; }
.tab-item.active b { color: var(--primary); }

/* 列表中的整改与得分单元格 */
.rectify-badge {
    display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px;
    background: #f6ffed; color: var(--success); line-height: 18px;
}
.rectify-badge.warn { background: #fff7e6; color: var(--warning); }
.score-cell { font-size: 13px; font-weight: 600; color: var(--text-main); white-space: nowrap; }
.score-cell .unit { font-size: 11px; font-weight: 400; color: var(--text-secondary); margin-left: 1px; }

/* ==========================================================================
   任务详情弹窗
   ========================================================================== */
.task-modal-content { width: 820px; max-width: 100%; }
.modal-tabs {
    display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--border);
    background: #fafbfc; flex-shrink: 0;
}
.mtab {
    padding: 12px 14px; font-size: 14px; cursor: pointer; color: var(--text-regular);
    border-bottom: 2px solid transparent; transition: all .2s; user-select: none; white-space: nowrap;
}
.mtab:hover { color: var(--primary); }
.mtab.active { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); background: #fff; }
.mtab em {
    font-style: normal; font-size: 11px; margin-left: 5px; padding: 0 6px;
    border-radius: 8px; background: #f0f2f5; color: var(--text-secondary); line-height: 16px;
}
.mtab.active em { background: var(--primary-light); color: var(--primary); }
.mtab em.warn { background: #fff7e6; color: var(--warning); }

/* 闭环流程 */
.stage-flow { display: flex; gap: 10px; flex-wrap: wrap; }
.stage-node {
    flex: 1; min-width: 130px; padding: 14px; border-radius: var(--radius);
    border: 1px solid var(--border); background: #fafbfc; position: relative;
    display: flex; align-items: flex-start; gap: 10px;
}
.stage-node.done { border-color: rgba(82, 196, 26, .35); background: #f6ffed; }
.stage-node.current { border-color: var(--primary); background: var(--primary-light); }
.stage-node.todo { opacity: .6; }
.sn-dot {
    width: 18px; height: 18px; border-radius: 50%; flex-shrink: 0; font-size: 11px;
    display: flex; align-items: center; justify-content: center; color: #fff;
    background: var(--border-dark); line-height: 1;
}
.stage-node.done .sn-dot { background: var(--success); }
.stage-node.current .sn-dot { background: var(--primary); }
.sn-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.stage-node.done .sn-title { color: var(--success); }
.stage-node.current .sn-title { color: var(--primary); }
.sn-time { font-size: 11px; color: var(--text-placeholder); }

/* 评分汇总 */
.score-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.ss-item {
    background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 12px 14px; display: flex; flex-direction: column; gap: 6px;
}
.ss-label { font-size: 12px; color: var(--text-secondary); }
.ss-value { font-size: 18px; font-weight: 600; color: var(--text-main); }
.ss-value.primary { color: var(--primary); }

/* 巡检结果明细 */
.check-result-list { display: flex; flex-direction: column; gap: 12px; }
.cr-item {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 14px;
    background: #fff;
}
.cr-item.fail { border-color: rgba(245, 34, 45, .3); background: #fffafa; }
.cr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.cr-index {
    width: 20px; height: 20px; border-radius: 50%; background: #f0f2f5; color: var(--text-secondary);
    font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cr-item.fail .cr-index { background: #fff1f0; color: var(--danger); }
.cr-name { flex: 1; font-size: 13px; color: var(--text-main); min-width: 160px; }
.cr-score { font-size: 12px; color: var(--primary); font-weight: 600; }
.cr-remark {
    margin-top: 10px; font-size: 12px; color: var(--text-regular);
    background: #fafbfc; padding: 8px 10px; border-radius: 4px; line-height: 1.7;
}

/* 现场照片 */
.photo-list { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.photo-box {
    position: relative; width: 104px; height: 84px; border-radius: 4px; overflow: hidden;
    border: 1px solid var(--border-dark); background: #f0f2f5; cursor: pointer;
    transition: border-color .2s, box-shadow .2s;
}
.photo-box:hover { border-color: var(--primary); box-shadow: 0 2px 8px rgba(224, 64, 64, .25); }
.photo-box .pb-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-box .pb-name {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 3px 5px;
    font-size: 10px; line-height: 1.3; color: #fff;
    background: rgba(0, 0, 0, .58); overflow: hidden;
    white-space: nowrap; text-overflow: ellipsis;
}

/* 整改跟踪 */
.rectify-overview {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 16px;
    background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 13px; color: var(--text-regular);
}
.rectify-overview b { color: var(--text-main); }
.rectify-card {
    border: 1px solid var(--border); border-radius: var(--radius); padding: 16px;
    margin-bottom: 14px; background: #fff;
}
.rectify-card:last-child { margin-bottom: 0; }
.rc-head {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding-bottom: 12px; margin-bottom: 12px; border-bottom: 1px dashed var(--border);
}
.rc-index { font-size: 14px; font-weight: 600; }
.rc-section { margin-bottom: 12px; }
.rc-section:last-child { margin-bottom: 0; }
.rc-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 5px; }
.rc-text {
    font-size: 13px; color: var(--text-main); line-height: 1.75;
    background: #fafbfc; padding: 9px 12px; border-radius: 4px;
}
.rc-meta {
    display: flex; gap: 24px; flex-wrap: wrap; font-size: 12px; color: var(--text-secondary);
    padding: 10px 0; border-top: 1px dashed var(--border); margin-top: 12px;
}
.rc-meta b { color: var(--text-main); }
.rc-time { font-size: 11px; color: var(--text-placeholder); margin-top: 8px; }
.rc-review {
    margin-top: 14px; padding: 12px 14px; border-radius: var(--radius);
    border-left: 3px solid var(--border-dark); background: #fafbfc;
}
.rc-review.pass { border-left-color: var(--success); background: #f6ffed; }
.rc-review.reject { border-left-color: var(--danger); background: #fff1f0; }

@media (max-width: 900px) {
    .score-summary-grid { grid-template-columns: repeat(2, 1fr); }
    .stage-flow { flex-direction: column; }
}

/* ==========================================================================
   巡检项弹窗（详情 / 编辑）
   ========================================================================== */
.item-modal-content { width: 720px; max-width: 100%; }
.item-modal-content .modal-header {
    display: flex; align-items: center; justify-content: space-between;
}
.modal-close {
    cursor: pointer; color: var(--text-secondary); font-size: 15px; padding: 2px 8px;
    border-radius: 4px; transition: all .2s; font-weight: 400;
}
.modal-close:hover { background: var(--bg-hover); color: var(--primary); }

.modal-flag {
    display: flex; align-items: center; gap: 10px; margin-bottom: 18px;
    padding-bottom: 14px; border-bottom: 1px dashed var(--border);
}
.modal-flag .field-hint { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.item-modal-content .form-item + .form-item { margin-top: 18px; }
.item-modal-content .form-item > label { display: block; margin-bottom: 8px; font-size: 13px; color: var(--text-regular); }

/* 「是否打分」单选卡片 */
.score-block { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }
.radio-group { display: flex; gap: 12px; }
.radio-card {
    flex: 1; display: flex; align-items: flex-start; gap: 10px; padding: 14px;
    border: 1px solid var(--border-dark); border-radius: var(--radius); cursor: pointer;
    transition: all .25s; background: #fff;
}
.radio-card:hover { border-color: var(--primary); background: #fffafa; }
.radio-card.active { border-color: var(--primary); background: var(--primary-light); }
.radio-dot {
    width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid var(--border-dark);
    flex-shrink: 0; margin-top: 2px; position: relative; transition: all .25s; background: #fff;
}
.radio-card.active .radio-dot { border-color: var(--primary); }
.radio-card.active .radio-dot::after {
    content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--primary);
}
.radio-body { display: flex; flex-direction: column; gap: 4px; }
.radio-title { font-size: 14px; font-weight: 600; }
.radio-card.active .radio-title { color: var(--primary); }
.radio-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.5; }

/* 满分输入 */
.score-stepper .unit-hint { padding: 0 10px 0 4px; font-size: 13px; color: var(--text-secondary); line-height: 32px; }
.score-stepper input#fullScoreInput { width: 60px; font-weight: 600; color: var(--primary); }

/* 树节点类型徽标 */
.node-badge {
    font-size: 11px; padding: 1px 7px; border-radius: 9px; margin-left: 8px;
    line-height: 16px; flex-shrink: 0; white-space: nowrap;
}
.node-badge.inspect { background: #e6f7ff; color: var(--info); }
.node-badge.score { background: #fff7e6; color: var(--warning); }

/* 评分项配色 */
.tree-leaf.score-leaf.highlight { background: #fff7e6; border-left-color: var(--warning); }
.tree-node[data-kind="score"] > .tree-node-header .tree-icon { color: var(--warning); }

/* ==========================================================================
   双栏布局（模版配置）
   ========================================================================== */
.two-col { display: flex; gap: 20px; align-items: flex-start; height: calc(100vh - 90px); }
.panel {
    background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-card);
    display: flex; flex-direction: column; height: 100%; overflow: hidden;
}
.list-panel { width: 300px; flex-shrink: 0; }
.detail-panel { flex: 1; min-width: 0; }
.panel-head {
    height: 52px; padding: 0 16px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.panel-title { font-weight: 600; font-size: 15px; }
.head-actions { display: flex; gap: 8px; }

.list { flex: 1; overflow-y: auto; padding: 8px; }
.list-item {
    padding: 12px; border-radius: var(--radius); cursor: pointer; transition: all .2s;
    border: 1px solid transparent; margin-bottom: 6px;
}
.list-item:hover { background: var(--bg-hover); }
.list-item.active { background: var(--primary-light); border-color: rgba(230, 57, 70, .35); }
.list-item .li-title { font-weight: 500; margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.list-item .li-meta { font-size: 12px; color: var(--text-secondary); display: flex; gap: 10px; flex-wrap: wrap; }
.list-item .li-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.detail-scroll { flex: 1; overflow-y: auto; padding: 20px; }

/* ---------- 表单 ---------- */
.form-section-title {
    font-size: 14px; font-weight: 600; margin-bottom: 14px; padding-left: 8px;
    border-left: 3px solid var(--primary); line-height: 1.2;
}
.form-section + .form-section { margin-top: 26px; padding-top: 22px; border-top: 1px dashed var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-item { display: flex; flex-direction: column; gap: 6px; }
.form-item.full { grid-column: 1 / -1; }
.form-item > label { font-size: 13px; color: var(--text-regular); }
.form-item > label .req { color: var(--primary); margin-right: 2px; }

/* ==========================================================================
   勾选树（模版配置）
   ========================================================================== */
.check-tree { border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; max-height: 420px; overflow-y: auto; }
.check-node-row, .check-leaf-row {
    display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 4px;
    cursor: pointer; transition: background .2s; font-size: 13px;
}
.check-node-row:hover, .check-leaf-row:hover { background: var(--bg-hover); }
.check-node-row { font-weight: 500; }
.check-leaf-row { color: var(--text-regular); padding-left: 30px; }
.check-children { padding-left: 20px; }
.check-node.collapsed > .check-children { display: none; }
.check-caret { font-size: 10px; color: var(--text-placeholder); width: 12px; cursor: pointer; }
.check-tree input[type="checkbox"] { accent-color: var(--primary); width: 14px; height: 14px; cursor: pointer; flex-shrink: 0; }
.check-summary { margin-top: 10px; font-size: 12px; color: var(--text-secondary); }
.check-summary b { color: var(--primary); }
.tree-picker-actions { margin-bottom: 10px; display: flex; gap: 8px; }

/* ==========================================================================
   数据表格
   ========================================================================== */
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
    text-align: left; padding: 12px 14px; background: #fafbfc; color: var(--text-regular);
    font-weight: 600; white-space: nowrap; border-bottom: 1px solid var(--border);
}
.data-table td { padding: 13px 14px; border-bottom: 1px solid var(--border); color: var(--text-main); vertical-align: middle; }
.data-table tbody tr { transition: background .18s; }
.data-table tbody tr:hover { background: #fafcff; }
.data-table .col-op { white-space: nowrap; }
.data-table .op-link { color: var(--primary); cursor: pointer; margin-right: 12px; font-size: 13px; }
.data-table .op-link:last-child { margin-right: 0; }
.data-table .op-link:hover { text-decoration: underline; }
.data-table .op-link.muted { color: var(--text-secondary); }
.row-strong { font-weight: 500; }
.cell-sub { display: block; font-size: 12px; color: var(--text-placeholder); margin-top: 3px; }

/* ---------- 标签 ---------- */
.tag {
    display: inline-block; padding: 2px 9px; border-radius: 10px; font-size: 12px;
    line-height: 18px; white-space: nowrap;
}
.tag-red { background: #fff1f0; color: var(--primary); }
.tag-blue { background: #e6f7ff; color: var(--info); }
.tag-green { background: #f6ffed; color: var(--success); }
.tag-orange { background: #fff7e6; color: var(--warning); }
.tag-gray { background: #f4f4f5; color: var(--text-secondary); }
.tag-purple { background: #f9f0ff; color: #722ed1; }

/* ---------- 开关 ---------- */
.switch {
    width: 38px; height: 20px; border-radius: 10px; background: #d8dce3; position: relative;
    cursor: pointer; transition: background .25s; display: inline-block; vertical-align: middle; flex-shrink: 0;
}
.switch::after {
    content: ""; position: absolute; width: 16px; height: 16px; border-radius: 50%; background: #fff;
    top: 2px; left: 2px; transition: left .25s; box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
}
.switch.on { background: var(--success); }
.switch.on::after { left: 20px; }

/* ---------- 分页 ---------- */
.pagination {
    display: flex; justify-content: flex-end; align-items: center; gap: 6px;
    margin-top: 18px; font-size: 13px; color: var(--text-regular); flex-wrap: wrap;
}
.pagination .total { margin-right: auto; color: var(--text-secondary); font-size: 12px; }
.page-btn {
    min-width: 30px; height: 30px; padding: 0 8px; border: 1px solid var(--border-dark);
    border-radius: 4px; background: #fff; cursor: pointer; color: var(--text-regular);
    transition: all .2s; font-size: 13px;
}
.page-btn:hover:not(:disabled):not(.active) { color: var(--primary); border-color: var(--primary); }
.page-btn.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-btn:disabled { cursor: not-allowed; color: var(--text-placeholder); background: #f7f8fa; }

/* ---------- 空状态 ---------- */
.empty { padding: 60px 20px; text-align: center; color: var(--text-placeholder); font-size: 13px; }
.empty .empty-icon { font-size: 34px; display: block; margin-bottom: 10px; opacity: .5; }

/* ==========================================================================
   统计页
   ========================================================================== */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-card {
    background: #fff; border-radius: var(--radius); padding: 18px 20px;
    box-shadow: var(--shadow-card); position: relative; overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0, 0, 0, .09); }
.stat-card::after {
    content: ""; position: absolute; right: -20px; top: -20px; width: 76px; height: 76px;
    border-radius: 50%; background: var(--primary-light); opacity: .7;
}
.stat-label { font-size: 13px; color: var(--text-secondary); margin-bottom: 10px; position: relative; }
.stat-value { font-size: 26px; font-weight: 600; color: var(--text-main); position: relative; }
.stat-value .unit { font-size: 13px; font-weight: 400; color: var(--text-secondary); margin-left: 3px; }
.stat-trend { margin-top: 8px; font-size: 12px; position: relative; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }
.stat-trend.flat { color: var(--text-secondary); }

.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; }
.chart-card { background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-card); }
.chart-card.wide { grid-column: 1 / -1; }
.chart-title { font-size: 14px; font-weight: 600; margin-bottom: 16px; display: flex; justify-content: space-between; align-items: center; }
.chart-title .sub { font-size: 12px; font-weight: 400; color: var(--text-secondary); }

.bar-list { display: flex; flex-direction: column; gap: 14px; }
.bar-item .bar-top { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; color: var(--text-regular); }
.bar-item .bar-top b { color: var(--text-main); }
.bar-track { height: 8px; background: #f0f2f5; border-radius: 4px; overflow: hidden; }
.bar-fill {
    height: 100%; border-radius: 4px; width: 0; transition: width .8s cubic-bezier(.25, .8, .25, 1);
    background: linear-gradient(90deg, #f0716f, var(--primary));
}
svg.chart { display: block; width: 100%; height: auto; }
.chart-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px; font-size: 12px; color: var(--text-regular); }
.chart-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }

/* ==========================================================================
   模态框 / 抽屉 / 提示
   ========================================================================== */
.modal-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0, 0, 0, .45);
    z-index: 1000; justify-content: center; align-items: center; padding: 20px;
}
.modal-overlay.active { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-content {
    background: #fff; border-radius: var(--radius); width: 460px; max-width: 100%;
    max-height: calc(100vh - 80px); display: flex; flex-direction: column;
    box-shadow: 0 8px 30px rgba(0, 0, 0, .18); animation: modalIn .26s cubic-bezier(.2, .9, .3, 1.2);
}
@keyframes modalIn { from { opacity: 0; transform: translateY(-16px) scale(.97); } to { opacity: 1; transform: none; } }

.modal-header { font-size: 16px; font-weight: 600; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-body > .form-item + .form-item { margin-top: 16px; }
.modal-footer { padding: 14px 20px; display: flex; justify-content: flex-end; gap: 10px; border-top: 1px solid var(--border); }
.confirm-content { width: 380px; }
.confirm-content .modal-body { color: var(--text-regular); line-height: 1.7; }
.modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.modal-form-grid .form-item.full { grid-column: 1 / -1; }

/* 抽屉 */
.drawer-overlay {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .35); z-index: 1001;
    opacity: 0; visibility: hidden; transition: opacity .28s, visibility .28s;
}
.drawer-overlay.active { opacity: 1; visibility: visible; }
.drawer {
    position: absolute; right: 0; top: 0; bottom: 0; width: 460px; max-width: 92vw;
    background: #fff; display: flex; flex-direction: column; box-shadow: -4px 0 24px rgba(0, 0, 0, .12);
    transform: translateX(100%); transition: transform .3s cubic-bezier(.4, 0, .2, 1);
}
.drawer-overlay.active .drawer { transform: none; }
.drawer-head {
    height: 54px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--border); font-weight: 600; flex-shrink: 0;
}
.drawer-close { cursor: pointer; color: var(--text-secondary); font-size: 15px; padding: 4px 8px; border-radius: 4px; transition: all .2s; }
.drawer-close:hover { background: var(--bg-hover); color: var(--primary); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }

/* 详情列表 */
.detail-list { display: flex; flex-direction: column; }
.detail-row { display: flex; padding: 12px 0; border-bottom: 1px dashed var(--border); font-size: 13px; }
.detail-row:last-child { border-bottom: none; }
.detail-row .dr-label { width: 96px; flex-shrink: 0; color: var(--text-secondary); }
.detail-row .dr-value { flex: 1; color: var(--text-main); word-break: break-all; }

/* 时间轴 */
.timeline { margin-top: 8px; padding-left: 6px; }
.timeline-item { position: relative; padding: 0 0 20px 22px; border-left: 2px solid var(--border); }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before {
    content: ""; position: absolute; left: -6px; top: 3px; width: 10px; height: 10px;
    border-radius: 50%; background: #fff; border: 2px solid var(--border-dark);
}
.timeline-item.done::before { background: var(--success); border-color: var(--success); }
.timeline-item.current::before { background: var(--primary); border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-light); }
.timeline-item .tl-title { font-size: 13px; font-weight: 500; margin-bottom: 3px; }
.timeline-item .tl-time { font-size: 12px; color: var(--text-placeholder); }

/* Toast */
.toast-container {
    position: fixed; top: 22px; left: 50%; transform: translateX(-50%);
    z-index: 2000; display: flex; flex-direction: column; align-items: center; gap: 10px;
    pointer-events: none;
}
.toast {
    background: rgba(48, 49, 51, .93); color: #fff; padding: 10px 18px; border-radius: 4px;
    font-size: 13px; box-shadow: var(--shadow-pop); animation: toastIn .3s ease;
    display: flex; align-items: center; gap: 8px; max-width: 80vw;
}
.toast.success { background: rgba(82, 196, 26, .95); }
.toast.warn { background: rgba(250, 140, 22, .95); }
.toast.error { background: rgba(245, 34, 45, .95); }
.toast.out { animation: toastOut .3s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-14px); } }

/* ==========================================================================
   移动端占位
   ========================================================================== */
.mobile-page { display: none; }
.mobile-page.active { display: flex; flex-direction: column; align-items: center; padding-top: 6px; }
.phone-frame {
    width: 360px; height: calc(100vh - 120px); min-height: 640px; max-height: 820px;
    background: linear-gradient(180deg, #2c3e50 0%, #1a252f 100%);
    border-radius: 44px; padding: 14px;
    box-shadow:
        0 0 0 3px #1a252f,
        0 0 0 6px #2c3e50,
        0 0 0 8px #1a252f,
        0 12px 40px rgba(0, 0, 0, .35),
        0 20px 60px rgba(0, 0, 0, .25);
    position: relative;
}
/* 侧边按钮：音量+、音量-、电源 */
.phone-frame::before {
    content: '';
    position: absolute; left: -6px; top: 120px; width: 4px; height: 30px;
    background: #3a4a5b; border-radius: 0 2px 2px 0;
}
.phone-frame::after {
    content: '';
    position: absolute; right: -6px; top: 110px; width: 4px; height: 50px;
    background: #3a4a5b; border-radius: 2px 0 0 2px;
}
.phone-screen {
    width: 100%; height: 100%; background: #f0f1f4;
    border-radius: 32px; overflow: hidden; display: flex; flex-direction: column;
    position: relative;
}
/* 底部 Home 指示条 */
.phone-screen::after {
    content: '';
    position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%);
    width: 120px; height: 5px; background: rgba(0,0,0,.15); border-radius: 3px;
    z-index: 10;
}
.phone-header {
    height: 52px; padding: 14px 16px 0;
    background: linear-gradient(135deg, #e53935, #ff6d00);
    display: flex; align-items: center; gap: 8px; position: relative;
    flex-shrink: 0;
}
.phone-body { flex: 1; padding: 16px; overflow-y: auto; }
.skeleton-card { background: #fff; border-radius: 8px; padding: 14px; margin-bottom: 12px; }
.skeleton-line { height: 11px; border-radius: 6px; background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%); background-size: 400% 100%; animation: shim 1.4s ease infinite; margin-bottom: 9px; }
.skeleton-line:last-child { margin-bottom: 0; width: 60%; }
@keyframes shim { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.mobile-note { margin-top: 18px; text-align: center; font-size: 13px; color: var(--text-secondary); }

/* ==========================================================================
   B 端 APP 界面
   ========================================================================== */
.app-shell { display: flex; gap: 24px; align-items: flex-start; justify-content: center; flex-wrap: wrap; }
.app-side { width: 320px; flex-shrink: 0; }
.app-tips-card { margin-bottom: 0; }
.app-tip-list { display: flex; flex-direction: column; gap: 14px; }
.app-tip { font-size: 13px; color: var(--text-regular); line-height: 1.7; }
.app-tip b {
    display: block; color: var(--text-main); font-size: 13px; margin-bottom: 2px;
    padding-left: 8px; border-left: 2px solid var(--primary);
}
.app-tip-note {
    margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
    font-size: 12px; color: var(--text-placeholder);
}

/* 手机壳内的头部与内容 */
.phone-header {
    height: 52px; padding: 14px 16px 0;
    background: linear-gradient(135deg, #e53935, #ff6d00);
    display: flex; align-items: center; gap: 8px; position: relative;
    flex-shrink: 0;
}
/* 移动端统一返回按钮：始终贴在模块名左侧的胶囊，保证醒目 */
.ph-back, .cinvite .invite-back, .cinvite .banner-back {
    flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; margin-right: 4px; border-radius: 9px;
    font-size: 19px; font-weight: 600; line-height: 1; cursor: pointer;
    user-select: none; transition: background .2s;
}
.phone-header .ph-back { background: rgba(255, 255, 255, .24); color: #fff; }
.phone-header .ph-back:hover { background: rgba(255, 255, 255, .38); }
.cinvite .invite-back { background: #f2f3f5; color: #333; }
.cinvite .invite-back:hover { background: #e5e6eb; }
.cinvite .banner-back { background: rgba(0, 0, 0, .3); color: #fff; }
.cinvite .banner-back:hover { background: rgba(0, 0, 0, .45); }
.ph-title { flex: 1; font-size: 15px; font-weight: 600; color: #fff; }
.ph-badge {
    min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: rgba(255,255,255,.95); color: #e53935;
    font-size: 11px; font-weight: 600; display: flex; align-items: center;
    justify-content: center; flex-shrink: 0;
}
.phone-body { flex: 1; padding: 12px 14px 20px; overflow-y: auto; }

/* APP 分组标题 */
.app-section-title {
    font-size: 12px; font-weight: 600; color: var(--text-regular);
    margin: 4px 0 10px; display: flex; align-items: center; gap: 6px;
}
.app-section-title em {
    font-style: normal; font-size: 11px; background: var(--primary-light);
    color: var(--primary); padding: 0 6px; border-radius: 8px; line-height: 16px;
}
.app-empty {
    text-align: center; padding: 60px 20px; color: var(--text-placeholder);
    font-size: 13px; display: flex; flex-direction: column; gap: 10px; align-items: center;
}
.app-empty span { font-size: 34px; opacity: .5; }

/* 任务卡片 */
.app-card {
    background: #fff; border-radius: 10px; padding: 13px 14px; margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06); position: relative;
    transition: transform .2s, box-shadow .2s; cursor: pointer;
}
.app-card:active { transform: scale(.985); }
.app-card.is-new { border-left: 3px solid var(--primary); }
.app-new-dot {
    position: absolute; top: -6px; right: 10px; background: var(--primary); color: #fff;
    font-size: 10px; padding: 1px 7px; border-radius: 8px; line-height: 15px;
}
.ac-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.ac-name { font-size: 14px; font-weight: 600; color: var(--text-main); line-height: 1.4; flex: 1; }
.ac-meta { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11px; color: var(--text-secondary); margin-bottom: 10px; }
.ac-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding-top: 10px; border-top: 1px dashed var(--border);
}
.ac-rectify { font-size: 11px; color: var(--text-placeholder); }
.app-done-tag { font-size: 12px; color: var(--success); font-weight: 500; }

/* APP 按钮 */
.app-btn {
    padding: 7px 18px; border: none; border-radius: 16px; background: var(--primary);
    color: #fff; font-size: 13px; cursor: pointer; transition: all .2s;
    font-family: inherit; white-space: nowrap;
}
.app-btn:hover { background: var(--primary-dark); }
.app-btn:active { transform: scale(.96); }
.app-btn.warn { background: var(--warning); }
.app-btn.purple { background: #722ed1; }
.app-btn.ghost { background: transparent; color: var(--text-regular); border: 1px solid var(--border-dark); }
.app-btn.ghost:hover { color: var(--primary); border-color: var(--primary); background: var(--primary-light); }

/* 任务头 */
.app-task-head {
    background: linear-gradient(135deg, #ff6b6b, var(--primary)); color: #fff;
    border-radius: 10px; padding: 14px; margin-bottom: 14px;
}
.ath-name { font-size: 15px; font-weight: 600; margin-bottom: 5px; line-height: 1.4; }
.ath-meta { font-size: 11px; opacity: .88; margin-bottom: 12px; }
.app-progress .ap-bar { height: 5px; background: rgba(255, 255, 255, .3); border-radius: 3px; overflow: hidden; margin-bottom: 6px; }
.app-progress .ap-fill { height: 100%; background: #fff; border-radius: 3px; transition: width .4s ease; }
.app-progress span { font-size: 11px; opacity: .9; }

/* ==========================================================================
   移动端巡检任务详情/填写页
   ========================================================================== */
.app-detail-head {
    display: flex; align-items: center;
    margin-bottom: 14px; padding: 0 4px;
}
.app-detail-head .ath-title { font-size: 16px; font-weight: 600; color: var(--text-main); }

.app-detail-card {
    background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.app-detail-card .adc-top {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
    margin-bottom: 12px;
}
.app-detail-card .adc-name { font-size: 16px; font-weight: 600; color: var(--text-main); line-height: 1.4; flex: 1; }
.app-status-tag {
    font-size: 11px; padding: 3px 8px; border-radius: 10px; white-space: nowrap;
    background: var(--bg-hover); color: var(--text-secondary); border: 1px solid var(--border);
}
.app-status-tag.wait { background: #fff7e6; color: var(--warning); border-color: #ffd591; }
.app-status-tag.doing { background: #e6f7ff; color: var(--primary); border-color: #91d5ff; }
.app-status-tag.done { background: #f6ffed; color: var(--success); border-color: #b7eb8f; }
.app-detail-card .adc-info-row {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--border);
}
.app-detail-card .adc-info-row:last-child { border-bottom: none; }
.app-detail-card .adc-label { color: var(--text-secondary); }
.app-detail-card .adc-value { color: var(--text-main); font-weight: 500; }

.app-progress-card {
    background: #fff; border-radius: 10px; padding: 14px; margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.app-progress-meta {
    display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; color: var(--text-regular); margin-bottom: 10px;
}
.app-progress-meta .ok { color: var(--success); font-weight: 600; }
.app-progress-bar { height: 6px; background: var(--bg-hover); border-radius: 3px; overflow: hidden; }
.app-progress-fill { height: 100%; background: var(--success); border-radius: 3px; transition: width .4s ease; }

.app-cat-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.app-cat-item {
    background: #fff; border-radius: 10px; padding: 13px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06); cursor: pointer;
    border: 1px solid transparent; transition: all .2s;
}
.app-cat-item:hover, .app-cat-item.active { border-color: var(--primary); background: var(--primary-light); }
.app-cat-name { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 10px; }
.app-cat-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.app-cat-tags span {
    font-size: 11px; padding: 3px 8px; border-radius: 10px;
}
.app-cat-tags .tag-ok { background: #f6ffed; color: var(--success); }
.app-cat-tags .tag-fail { background: #fff1f0; color: var(--danger); }
.app-cat-tags .tag-wait { background: #f5f5f5; color: var(--text-secondary); }

.app-check-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.app-check-row {
    background: #fff; border-radius: 10px; padding: 12px 14px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06); display: flex; align-items: center; gap: 10px;
    border-left: 3px solid transparent;
}
.app-check-row.editable { cursor: pointer; }
.app-check-row.editable:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .08); }
.acr-index {
    width: 22px; height: 22px; border-radius: 50%; background: var(--bg-hover);
    color: var(--text-secondary); font-size: 11px; display: flex;
    align-items: center; justify-content: center; flex-shrink: 0;
}
.acr-body { flex: 1; min-width: 0; }
.acr-name { font-size: 13px; color: var(--text-main); line-height: 1.5; }
.acr-category { font-size: 11px; color: var(--text-secondary); margin-top: 3px; }
.acr-status {
    font-size: 11px; padding: 3px 8px; border-radius: 10px; white-space: nowrap;
    background: #f5f5f5; color: var(--text-secondary);
}
.acr-status.ok { background: #f6ffed; color: var(--success); }
.acr-status.fail { background: #fff1f0; color: var(--danger); }
.acr-arrow { font-size: 18px; color: var(--text-placeholder); }

/* 弹窗编辑 */
.app-modal-mask {
    position: fixed; inset: 0; background: rgba(0, 0, 0, .55);
    display: flex; align-items: center; justify-content: center;
    z-index: 200; padding: 20px;
}
.app-modal {
    background: #fff; border-radius: 12px; width: 100%; max-width: 360px;
    max-height: 86vh; overflow: hidden; display: flex; flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
}
.app-modal-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid var(--border); font-weight: 600;
}
.app-modal-close { font-size: 18px; color: var(--text-placeholder); cursor: pointer; }
.app-modal-body { padding: 16px; overflow-y: auto; }
.app-modal-foot {
    display: flex; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--border);
}
.app-modal-foot .app-btn { flex: 1; }
.app-form-row { margin-bottom: 14px; }
.app-form-row label {
    display: block; font-size: 13px; color: var(--text-main); margin-bottom: 8px;
}
.app-form-row.required label::before {
    content: '*'; color: var(--danger); margin-right: 4px;
}
.app-radio-group { display: flex; gap: 12px; }
.app-radio {
    flex: 1; text-align: center; padding: 9px 0; border-radius: 8px;
    border: 1px solid var(--border-dark); color: var(--text-regular);
    cursor: pointer; transition: all .2s; font-size: 13px;
}
.app-radio.active {
    background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 500;
}
.app-textarea { min-height: 90px; }

.app-detail-footer {
    position: sticky; bottom: 0; background: #fff;
    padding: 12px 0; margin-top: 0; border-top: 1px solid var(--border);
}

/* ==========================================================================
   巡检任务详情（整页）
   ========================================================================== */
.task-detail-card { padding: 18px 22px; }
.detail-section-title {
    display: flex; align-items: center; gap: 8px;
    font-size: 15px; font-weight: 600; color: var(--text-main);
    padding-left: 10px; border-left: 3px solid var(--primary);
    margin-bottom: 16px; line-height: 1.2;
}

/* 信息网格 */
.info-grid {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px 28px;
}
.info-item { display: flex; align-items: baseline; gap: 8px; font-size: 13px; min-width: 0; }
.ii-label { color: var(--text-secondary); flex-shrink: 0; }
.ii-label::after { content: '：'; }
.ii-value { color: var(--text-main); font-weight: 500; word-break: break-all; }

/* 明细页签 */
.detail-tabs {
    display: flex; gap: 26px; border-bottom: 1px solid var(--border);
    margin-bottom: 18px;
}
.dt-tab {
    position: relative; padding: 0 2px 12px; font-size: 14px; color: var(--text-regular);
    cursor: pointer; transition: color .2s; user-select: none;
    display: inline-flex; align-items: center; gap: 5px;
}
.dt-tab:hover { color: var(--primary); }
.dt-tab.active { color: var(--primary); font-weight: 600; }
.dt-tab.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -1px;
    height: 2px; background: var(--primary); border-radius: 2px;
}
.dt-tab em {
    font-style: normal; font-size: 11px; line-height: 16px;
    background: var(--bg-hover); color: var(--text-secondary);
    padding: 0 6px; border-radius: 8px; min-width: 18px; text-align: center;
}
.dt-tab.active em { background: var(--primary-light); color: var(--primary); }
.dt-tab em.warn { background: #fff7e6; color: var(--warning); }
.task-detail-body { min-height: 120px; }

/* 统计卡片 */
.stat-chip-row {
    display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.stat-chip {
    flex: 1 1 150px; min-width: 130px; background: var(--bg-hover);
    border: 1px solid var(--border); border-radius: var(--radius);
    padding: 14px 18px; display: flex; flex-direction: column; gap: 4px;
}
.sc-value { font-size: 24px; font-weight: 600; color: var(--text-main); line-height: 1.1; }
.sc-value.ok { color: var(--success); }
.sc-value.warn { color: var(--warning); }
.sc-label { font-size: 12px; color: var(--text-secondary); }

/* 检查详情表 */
.table-scroll { width: 100%; overflow-x: auto; }
.check-detail-table { min-width: 980px; }
.check-detail-table .cd-name { font-weight: 500; color: var(--text-main); }
.check-detail-table .cd-content { color: var(--text-regular); line-height: 1.5; }

/* 入户巡检：按房间分组的标题行 */
.check-detail-table .cdt-room-head > td {
    background: #f7f8fa; padding: 9px 12px; border-left: 3px solid var(--primary);
}
.check-detail-table .cdt-room-head:hover > td { background: #f7f8fa; }
.cdt-room-head .crh-name { font-size: 14px; font-weight: 600; color: var(--text-main); margin-right: 10px; }
.cdt-room-head .crh-stat {
    display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: 10px;
    font-size: 12px; color: var(--text-secondary); background: #fff; border: 1px solid var(--border-dark);
}
.cdt-room-head .crh-stat.ok { color: var(--success); border-color: #b3e19d; background: #f2fbf0; }
.cdt-room-head .crh-stat.fail { color: var(--danger); border-color: #fbc4c4; background: #fef0f0; }
.cdt-room-head .crh-sign {
    display: inline-flex; align-items: center; gap: 6px; margin-left: 14px;
    font-size: 12px; color: var(--text-secondary);
}
.cdt-room-head .crh-sign img {
    height: 30px; padding: 2px 4px; background: #fff;
    border: 1px solid var(--border-dark); border-radius: 3px;
}
.cdt-room-head .crh-sign.none { color: var(--text-placeholder); }
.photo-list.compact { gap: 6px; margin-top: 0; }
.photo-list.compact .photo-box { width: 34px; height: 34px; border-radius: 4px; }
.photo-list.compact .pb-name { display: none; }

/* 整体巡检照片 */
.task-detail-card.overall-photos-card {
    background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius);
    margin-bottom: 18px;
}
.overall-photos-card .photo-list.compact { margin-top: 4px; }
.app-check-item.overall-photo-card { border-left-color: var(--primary); }
.app-check-item.overall-photo-card .aci-index { background: var(--primary-light); color: var(--primary); }

/* 导出 */
.detail-export-bar { display: flex; justify-content: center; gap: 12px; padding: 20px 0 6px; }
.detail-export-bar .btn { min-width: 96px; }

/* 综合巡检总分单行展示（PC 详情页巡检结果页签底部） */
.comp-score-line {
    margin-top: 18px; padding: 14px 22px;
    background: #fff; border: 1px solid #e8eaef; border-radius: 8px;
    font-size: 14px; font-weight: 600; color: #1f2329;
}

/* 巡检类型业务说明（模版详情页，随类型切换） */
.type-explain {
    padding: 10px 14px;
    background: #f7f9fc; border: 1px solid #dce6f5; border-radius: 4px;
    font-size: 12px; line-height: 1.9; color: #646a73;
}
.type-explain b { color: var(--primary, #2563eb); margin-right: 4px; }

/* 面包屑可点击 */
.crumb-link { color: var(--primary); cursor: pointer; }
.crumb-link:hover { text-decoration: underline; }

@media (max-width: 1400px) {
    .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 巡检填写项 */
.app-check-item {
    background: #fff; border-radius: 10px; padding: 13px 14px; margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06); border-left: 3px solid transparent;
}
.app-check-item.fail { border-left-color: var(--danger); }
.aci-head { display: flex; gap: 8px; margin-bottom: 10px; }
.aci-index {
    width: 18px; height: 18px; border-radius: 50%; background: #f0f2f5; color: var(--text-secondary);
    font-size: 11px; display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.aci-name { font-size: 13px; color: var(--text-main); line-height: 1.5; flex: 1; }
.aci-actions { display: flex; gap: 10px; }
.aci-btn {
    flex: 1; text-align: center; padding: 7px 0; border-radius: 6px; font-size: 13px;
    border: 1px solid var(--border-dark); color: var(--text-regular); cursor: pointer;
    transition: all .2s; background: #fff; user-select: none;
}
.aci-btn.ok.active { background: var(--success); border-color: var(--success); color: #fff; font-weight: 500; }
.aci-btn.no.active { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 500; }
.aci-row { margin-top: 12px; }
.aci-label { display: block; font-size: 12px; color: var(--text-secondary); margin-bottom: 6px; }

/* APP 表单控件 */
.app-input {
    width: 100%; padding: 8px 10px; border: 1px solid var(--border-dark); border-radius: 6px;
    font-size: 13px; font-family: inherit; outline: none; resize: vertical; min-height: 60px;
    color: var(--text-main); background: #fff; transition: border-color .2s;
}
.app-input:focus { border-color: var(--primary); }
.app-input.small { width: 64px; min-height: auto; height: 32px; padding: 0 8px; text-align: center; display: inline-block; }

/* APP 照片行 */
.app-photo-row { display: flex; gap: 8px; flex-wrap: wrap; }
.app-photo {
    width: 62px; height: 62px; border-radius: 8px; background: #f0f2f5; position: relative;
    overflow: hidden; border: 1px solid var(--border);
}
.app-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.app-photo .ap-name {
    position: absolute; left: 0; right: 0; bottom: 0; padding: 1px 3px;
    font-size: 8px; line-height: 1.4; color: #fff; background: rgba(0, 0, 0, .5);
    overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
}
.app-photo .ap-del {
    position: absolute; top: 2px; right: 2px; width: 17px; height: 17px; border-radius: 50%;
    background: var(--danger); color: #fff; font-size: 10px; display: flex;
    align-items: center; justify-content: center; cursor: pointer;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.app-photo-add {
    width: 62px; height: 62px; border-radius: 8px; border: 1px dashed var(--border-dark);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 2px; cursor: pointer; transition: all .2s; background: #fafbfc;
}
.app-photo-add:hover { border-color: var(--primary); background: var(--primary-light); }
.app-photo-add span:first-child { font-size: 16px; color: var(--text-placeholder); }
.app-photo-add .ap-txt { font-size: 10px; color: var(--text-placeholder); }

/* APP 信息块 */
.app-block {
    background: #fff; border-radius: 10px; padding: 13px 14px; margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .06);
}
.ab-label { font-size: 12px; color: var(--text-secondary); margin-bottom: 7px; }
.ab-label em { font-style: normal; color: var(--primary); }
.ab-text { font-size: 13px; color: var(--text-main); line-height: 1.7; }
.ab-text.overdue { color: var(--danger); font-weight: 500; }
.ab-hint { font-size: 11px; color: var(--text-placeholder); margin-top: 8px; }

.app-reject {
    background: #fff1f0; border-left: 3px solid var(--danger); border-radius: 8px;
    padding: 12px 14px; margin-bottom: 10px;
}
.ar-title { font-size: 13px; font-weight: 600; color: var(--danger); margin-bottom: 4px; }
.ar-text { font-size: 12px; color: var(--text-regular); line-height: 1.6; }

/* APP 底部操作条 */
.app-footer {
    display: flex; gap: 10px; margin-top: 16px; padding-top: 14px;
    border-top: 1px solid var(--border);
}
.app-footer .app-btn { flex: 1; }

/* 移动端结果行 */
.app-result-row {
    background: #fff; border-radius: 8px; padding: 11px 13px; margin-bottom: 8px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05); border-left: 3px solid var(--success);
}
.app-result-row.fail { border-left-color: var(--danger); }
.arr-name { font-size: 13px; color: var(--text-main); flex: 1; line-height: 1.5; }

/* 入户巡检：详情抽屉按房间分组 */
.drawer-room-title {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    margin: 12px 0 8px; padding-left: 8px;
    font-size: 13px; font-weight: 600; color: var(--text-main);
    border-left: 3px solid var(--primary);
}
.drawer-room-title .drt-stat {
    font-size: 11px; font-weight: 500; color: var(--success);
    padding: 1px 7px; border-radius: 9px; background: #f2fbf0;
}
.drawer-room-title .drt-stat.fail { color: var(--danger); background: #fef0f0; }
.drawer-room-sign {
    margin: 2px 0 10px; padding: 6px 8px; background: #fafafa;
    border: 1px dashed var(--border-dark); border-radius: 6px;
    font-size: 11px; color: var(--text-secondary);
}
.drawer-room-sign img { display: block; width: 100%; height: 60px; object-fit: contain; }

/* ==========================================================================
   响应式
   ========================================================================== */
@media (max-width: 1100px) {
    .two-col { flex-direction: column; height: auto; }
    .list-panel { width: 100%; }
    .detail-panel { width: 100%; }
    .detail-scroll { max-height: none; }
    .form-grid { grid-template-columns: 1fr; }
}
