/* ============================================================
   海淀区残疾人温馨家园综合改革项目管理系统 全局样式
   无任何前端框架依赖，纯手写 CSS
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", sans-serif;
    font-size: 14px; color: #333; background: #f0f2f5;
}
a { color: #1f3a8f; text-decoration: none; }
a:hover { color: #3a5fc4; }
table { width: 100%; border-collapse: collapse; background: #fff; }
th, td { padding: 10px 12px; border-bottom: 1px solid #eef0f4; text-align: left; font-size: 13px; }
th { background: #f7f8fb; color: #556; font-weight: 600; white-space: nowrap; }
tr:hover td { background: #fafbfe; }

/* ---------- 布局 ---------- */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 210px; flex-shrink: 0; background: #1f2b45; color: #cdd6e6;
    display: flex; flex-direction: column;
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side-logo {
    width: 40px; height: 40px; border-radius: 10px; background: #1f3a8f;
    color: #fff; font-size: 22px; display: flex; align-items: center; justify-content: center; font-weight: bold;
}
.side-title { font-size: 14px; color: #fff; line-height: 1.4; }
.side-title small { font-size: 11px; color: #8fa0bd; font-weight: normal; }
.side-nav { flex: 1; overflow-y: auto; padding: 8px 0 30px; }
.nav-group { font-size: 12px; color: #7f8fae; padding: 14px 18px 6px; }
.side-nav a { display: block; color: #cdd6e6; padding: 9px 18px 9px 26px; font-size: 13.5px; border-left: 3px solid transparent; }
.side-nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-nav a.active { background: rgba(31,58,143,.45); color: #fff; border-left-color: #4f7cff; }

.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar {
    height: 56px; background: #fff; display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); position: sticky; top: 0; z-index: 10;
}
.topbar-title { font-size: 17px; font-weight: 600; color: #223; }
.topbar-user { display: flex; align-items: center; gap: 12px; color: #667; font-size: 13px; }
.user-role { background: #eef2ff; color: #1f3a8f; padding: 3px 10px; border-radius: 12px; font-size: 12px; }
.topbar-user a { color: #e05a5a; }
.content { flex: 1; padding: 22px 24px; }
.footer { text-align: center; color: #99a; font-size: 12px; padding: 14px; }

/* ---------- 通用组件 ---------- */
.card { background: #fff; border-radius: 8px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,.05); margin-bottom: 18px; }
.card h3 { font-size: 15px; color: #223; margin-bottom: 14px; border-left: 3px solid #1f3a8f; padding-left: 10px; }
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.stat-row { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.stat {
    flex: 1; min-width: 150px; background: #fff; border-radius: 8px; padding: 18px 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.stat .num { font-size: 26px; font-weight: 700; color: #1f3a8f; }
.stat .label { color: #889; font-size: 13px; margin-top: 4px; }
.stat.warn .num { color: #d48806; }
.stat.danger .num { color: #cf1322; }
.stat.success .num { color: #389e0d; }

.btn {
    display: inline-block; border: 1px solid #d9dce3; background: #fff; color: #334;
    padding: 7px 18px; border-radius: 6px; cursor: pointer; font-size: 13.5px; line-height: 1.5;
}
.btn:hover { border-color: #1f3a8f; color: #1f3a8f; }
.btn-primary { background: #1f3a8f; border-color: #1f3a8f; color: #fff; }
.btn-primary:hover { background: #2a4cb0; color: #fff; }
.btn-danger { background: #fff; border-color: #e05a5a; color: #e05a5a; }
.btn-danger:hover { background: #e05a5a; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12.5px; }
.btn-block { width: 100%; padding: 12px; font-size: 15px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

.badge {
    display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; white-space: nowrap;
}
.badge-default { background: #f0f1f5; color: #778; }
.badge-primary { background: #e8f0ff; color: #1f3a8f; }
.badge-success { background: #e9f9e6; color: #2f8f0f; }
.badge-warning { background: #fff6e0; color: #b57b00; }
.badge-danger  { background: #fdecec; color: #cf1322; }
.badge-info    { background: #e6f7ff; color: #0d6ebd; }

.alert { padding: 10px 16px; border-radius: 6px; margin-bottom: 14px; font-size: 13.5px; }
.alert-success { background: #e9f9e6; color: #2f8f0f; border: 1px solid #bfe7b8; }
.alert-danger  { background: #fdecec; color: #cf1322; border: 1px solid #f5b5b5; }
.alert-warning { background: #fff6e0; color: #a06b00; border: 1px solid #f2dfa8; }
.alert-info    { background: #e6f7ff; color: #0d6ebd; border: 1px solid #b9e0f8; }

.form-item { margin-bottom: 14px; }
.form-item label { display: block; margin-bottom: 6px; color: #556; font-size: 13px; }
.form-item input[type=text], .form-item input[type=password], .form-item input[type=number],
.form-item input[type=date], .form-item input[type=datetime-local], .form-item select,
.form-item textarea, .toolbar input, .toolbar select {
    width: 100%; padding: 8px 10px; border: 1px solid #d9dce3; border-radius: 6px;
    font-size: 13.5px; background: #fff; color: #333;
}
.form-item textarea { min-height: 80px; resize: vertical; }
.form-item .req { color: #e05a5a; margin-left: 2px; }
.form-grid { display: flex; gap: 16px; flex-wrap: wrap; }
.form-grid .form-item { flex: 1; min-width: 200px; }
.form-hint { font-size: 12px; color: #99a; margin-top: 4px; }

.modal-mask {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100;
    align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal { background: #fff; border-radius: 10px; width: 560px; max-width: 94%; max-height: 88vh; overflow-y: auto; padding: 22px; }
.modal h3 { font-size: 16px; margin-bottom: 16px; }
.modal-actions { text-align: right; margin-top: 18px; }

.pager { display: flex; gap: 12px; align-items: center; margin-top: 14px; color: #889; font-size: 13px; }
.pager a { border: 1px solid #d9dce3; padding: 4px 12px; border-radius: 5px; }

.table-actions a, .table-actions button { margin-right: 6px; }
.text-muted { color: #99a; font-size: 12.5px; }
.text-danger { color: #cf1322; }
.text-success { color: #2f8f0f; }
.text-center { text-align: center; }
.mt10 { margin-top: 10px; }
.mb10 { margin-bottom: 10px; }
.mr5 { margin-right: 5px; }

.progress-outer { background: #eef0f4; border-radius: 8px; height: 10px; width: 130px; display: inline-block; vertical-align: middle; }
.progress-inner { background: #1f3a8f; height: 100%; border-radius: 8px; }

/* ---------- 登录页 ---------- */
.login-body {
    background: linear-gradient(135deg, #1f2b45 0%, #1f3a8f 100%);
    display: flex; align-items: center; justify-content: center; min-height: 100vh;
}
.login-wrap { width: 400px; max-width: 92%; text-align: center; }
.login-logo {
    width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 16px; background: rgba(255,255,255,.15);
    color: #fff; font-size: 34px; font-weight: bold; display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,.3);
}
.login-brand h1 { color: #fff; font-size: 22px; line-height: 1.5; margin-bottom: 6px; }
.login-brand p { color: rgba(255,255,255,.6); font-size: 13px; margin-bottom: 26px; }
.login-box { background: #fff; border-radius: 12px; padding: 30px 28px; text-align: left; box-shadow: 0 10px 40px rgba(0,0,0,.3); }
.login-box label { display: block; color: #667; font-size: 13px; margin: 14px 0 6px; }
.login-box input {
    width: 100%; padding: 11px 12px; border: 1px solid #d9dce3; border-radius: 6px; font-size: 14px;
}
.login-box input:focus { outline: none; border-color: #1f3a8f; }
.login-box .btn-primary { margin-top: 22px; }
.login-foot { color: rgba(255,255,255,.45); font-size: 12px; margin-top: 20px; }

/* ---------- 通用美化补充 ---------- */
.btn-lg { padding: 10px 26px; font-size: 15px; }

/* 项目树（申报页 / 菜单页通用） */
.tree-cat { margin-bottom: 6px; }
.tree-cat-title {
    margin: 18px 0 8px; font-weight: 700; color: #1f3a8f; font-size: 15px;
    border-left: 4px solid #1f3a8f; padding-left: 10px;
}
.tree-sub-title {
    margin: 12px 0 6px; font-weight: 600; color: #223; background: #f7f8fb;
    padding: 7px 12px; border-radius: 4px;
}
.tree-sub-title .badge { margin-left: 8px; vertical-align: middle; }

/* 申报页表格 */
.declare-table td:first-child { text-align: center; }
.declare-table input[type=checkbox] { width: 18px; height: 18px; cursor: pointer; vertical-align: middle; }
.declare-table tr:has(input:checked) td { background: #f0f5ff; }
.custom-input {
    width: 100%; padding: 7px 10px; border: 1px solid #d9dce3; border-radius: 6px;
    font-size: 13.5px; background: #fff;
}
.custom-input:focus { outline: none; border-color: #1f3a8f; box-shadow: 0 0 0 2px rgba(31,58,143,.12); }

/* 申报前置确认卡 */
.confirm-card { text-align: center; padding: 36px 28px; }
.confirm-icon { font-size: 46px; margin-bottom: 14px; }
.confirm-card h3 { text-align: center; border-left: none; font-size: 18px; }

/* 底部固定操作条 */
.action-bar {
    position: sticky; bottom: 0; background: #fff; border-radius: 8px; padding: 14px 20px;
    box-shadow: 0 -2px 8px rgba(0,0,0,.07); margin-top: 8px;
    display: flex; gap: 12px; justify-content: flex-end; z-index: 5;
}

/* 菜单页：大类卡片 */
.menu-cat { margin-bottom: 18px; }
.menu-cat-head {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding-bottom: 12px; margin-bottom: 6px; border-bottom: 1px solid #eef0f4;
}
.menu-cat-head .cat-name { font-size: 16px; font-weight: 700; color: #1f2b45; }
.menu-cat-head .cat-meta { font-size: 12px; color: #99a; font-weight: normal; }
.menu-cat-head .spacer { flex: 1; }
.menu-cat-head .btn-group { display: flex; gap: 6px; }

/* 菜单页：二级子类区块 */
.menu-sub-block { margin: 10px 0; }
.menu-sub-head {
    margin: 0 0 6px; font-weight: 600; color: #223; background: #f7f8fb;
    padding: 7px 12px; border-radius: 4px; display: flex; align-items: center; gap: 8px;
}
.menu-sub-head .badge { margin-left: 4px; }
.menu-sub-actions { margin-left: auto; display: flex; gap: 6px; }
.menu-no-sub-head {
    margin: 14px 0 6px; font-weight: 600; color: #667; background: #fafafa;
    padding: 7px 12px; border-radius: 4px; border-left: 3px solid #bbb;
}

/* ---------- 固定列宽：避免不同分组表格列宽跳动 ---------- */
.declare-table, .custom-table, .menu-table { table-layout: fixed; width: 100%; }
.declare-table td, .custom-table td, .menu-table td { vertical-align: top; }

/* 申报·项目勾选表（3列：勾选 / 项目名称 / 服务标准） */
.declare-table th:nth-child(1), .declare-table td:nth-child(1) { width: 50px; }
.declare-table th:nth-child(2), .declare-table td:nth-child(2) { width: 32%; }

/* 申报·自定义项目表（3列：空 / 自定义名称 / 操作） */
.custom-table th:nth-child(1), .custom-table td:nth-child(1) { width: 50px; }
.custom-table th:nth-child(3), .custom-table td:nth-child(3) { width: 80px; }

/* 菜单页·项目表（7列：类型 / 名称 / 成本 / 服务标准 / 考核 / 状态 / 操作） */
.menu-table th:nth-child(1), .menu-table td:nth-child(1) { width: 60px; text-align: center; }
.menu-table th:nth-child(2), .menu-table td:nth-child(2) { width: 18%; }
.menu-table th:nth-child(3), .menu-table td:nth-child(3) { width: 96px; }
.menu-table th:nth-child(4), .menu-table td:nth-child(4) { width: 28%; }
.menu-table th:nth-child(5), .menu-table td:nth-child(5) { width: 18%; }
.menu-table th:nth-child(6), .menu-table td:nth-child(6) { width: 70px; text-align: center; }
.menu-table th:nth-child(7), .menu-table td:nth-child(7) { width: 130px; }

/* ---------- 可折叠 ---------- */
.fold .fold-body { /* 默认展开 */ }
.fold:not(.open) .fold-body { display: none; }
.fold-toggle { cursor: pointer; user-select: none; }
.fold-icon {
    display: inline-block; width: 14px; text-align: center; color: #99a;
    transition: transform .18s; font-size: 12px; line-height: 1; flex-shrink: 0;
}
.fold:not(.open) .fold-toggle .fold-icon { transform: rotate(-90deg); }
.fold-toggle:hover .fold-icon { color: #1f3a8f; }

/* ---------- 折叠标题内的批量选择 ---------- */
.fold-extra {
    display: inline-block; margin-left: 10px; padding: 1px 8px;
    font-size: 11px; font-weight: 400; color: #1f3a8f;
    background: #e8f0ff; border-radius: 3px; cursor: pointer;
    user-select: none; vertical-align: middle;
}
.fold-extra:hover { background: #1f3a8f; color: #fff; }
.tree-cat-title .fold-extra { margin-left: 14px; }

/* ---------- 身份模拟横幅 ---------- */
.impersonate-bar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    background: #fff6e0; border-bottom: 1px solid #f2dfa8; color: #8a5a00;
    padding: 8px 24px; font-size: 13px; position: sticky; top: 0; z-index: 11;
}
.impersonate-bar .imp-meta { color: #b58a2a; font-size: 12px; }
.impersonate-bar form { display: inline; }

/* ---------- 街镇信息管理 ---------- */
.street-info-grid {
    display: flex; flex-wrap: wrap; gap: 28px; align-items: center;
    padding: 14px 18px; background: #f7f8fb; border: 1px solid #e6e9f0; border-radius: 6px;
}
.street-info-item { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.street-info-label { color: #667; font-weight: 600; }
.street-info-value { color: #223; font-weight: 700; }
.homes-table { table-layout: fixed; width: 100%; }

/* ---------- 申报项目块状结构（一行多个 · 固定高度） ---------- */
.proj-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}
.proj-block {
    display: flex; align-items: flex-start; gap: 9px;
    height: 128px; padding: 10px 12px;
    border: 1px solid #e3e7ef; border-radius: 6px;
    background: #fff; cursor: pointer; overflow: hidden;
    transition: border-color .15s, background .15s;
}
.proj-block:hover { border-color: #1f3a8f; background: #f7f9ff; }
.proj-block.is-on { border-color: #1f3a8f; background: #eef3ff; }
.proj-block input[type="checkbox"] { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; cursor: pointer; }
.proj-main { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; }
.proj-name {
    flex-shrink: 0; font-weight: 600; color: #223; margin-bottom: 5px; line-height: 1.45;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.proj-std {
    flex: 1; min-height: 0; font-size: 12px; color: #667; line-height: 1.6; word-break: break-word;
    display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- 两步申报 ---------- */
.text-center { text-align: center; }
.step-bar {
    display: flex; align-items: center; justify-content: center; gap: 16px;
    margin: 14px 0 18px; padding: 12px;
    background: #fff; border: 1px solid #e6e9f0; border-radius: 8px;
}
.step { display: flex; align-items: center; gap: 8px; font-size: 14px; color: #8892a6; font-weight: 600; }
.step-n {
    width: 24px; height: 24px; border-radius: 50%; background: #e6e9f0; color: #8892a6;
    display: inline-flex; align-items: center; justify-content: center; font-size: 13px;
}
.step.active { color: #1f3a8f; }
.step.active .step-n { background: #1f3a8f; color: #fff; }
.step-arrow { color: #c3c9d6; }

/* ---------- 服务提供规格填写 ---------- */
.supply-card { border: 1px solid #e6e9f0; border-radius: 6px; margin-bottom: 14px; overflow: hidden; }
.supply-card-title { background: #f7f8fb; padding: 9px 14px; font-weight: 600; color: #223; border-bottom: 1px solid #e6e9f0; }
.supply-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.supply-table th, .supply-table td { padding: 8px 10px; border-bottom: 1px solid #f0f2f6; font-size: 13px; text-align: left; vertical-align: middle; }
.supply-table th { background: #fafbfd; font-weight: 600; color: #667; font-size: 12px; }
/* 三列固定宽度：类别 / 需提供 / 数量（系数），避免窄屏下挤压变形 */
.supply-table .col-cat  { width: 108px; }
.supply-table .col-name { width: auto; }
.supply-table .col-qty  { width: 236px; }
/* ---------- 第 3 步：服务提供规格块（紧凑网格） ---------- */
.supply-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 8px; margin: 2px 0 12px;
}
.supply-item {
    display: flex; flex-direction: column;
    padding: 8px 10px 9px; border: 1px solid #e3e7ef; border-radius: 6px; background: #fff;
    transition: border-color .15s, background .15s;
}
.supply-item:hover { border-color: #1f3a8f; background: #f7f9ff; }
/* 深蓝边框 = 该条目已填系数（> 0），与第 2 步「已分配」同一套语义 */
.supply-item.is-on { border-color: #1f3a8f; background: #eef3ff; }
.supply-item:focus-within { border-color: #1f3a8f; background: #eef3ff; }

.si-head {
    display: flex; align-items: center; gap: 6px; margin-bottom: 7px;
    min-width: 0; flex-wrap: wrap;
}
.si-name {
    font-weight: 600; color: #223; font-size: 13px; line-height: 1.4;
    min-width: 0; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.si-qty { display: flex; align-items: center; gap: 5px; min-width: 0; }
.si-qty .qty-pre { min-width: 0; margin-right: 2px; flex-shrink: 0; }
/* 数量基准：置于块首，与「+ 类别 + 条目名」连读 */
.si-basis {
    flex-shrink: 0; font-size: 12px; font-weight: 700; color: #1f3a8f;
    background: #eef3ff; border: 1px solid #c9d8f5; border-radius: 3px;
    padding: 1px 7px; white-space: nowrap;
}
.supply-item.is-on .si-basis { background: #dbe6ff; border-color: #9db8ef; }
.si-qty .qty-input {
    width: 100%; min-width: 0; flex: 1; padding: 5px 8px; font-size: 15px;
}
.si-unit { font-size: 12px; color: #8892a6; flex-shrink: 0; }
.supply-item.is-on .si-unit { color: #1f3a8f; }

@media (max-width: 640px) {
    .supply-grid { grid-template-columns: 1fr; }
}

/* 窄屏时数量列不换行，保证输入框完整可见 */
.supply-table td.col-qty-cell { white-space: nowrap; }
.qty-pre {
    display: inline-block; min-width: 58px; margin-right: 8px; text-align: right;
    font-size: 12px; color: #a06a10; font-weight: 700;
}
.qty-input {
    width: 108px; padding: 7px 10px; border: 1px solid #d8dce6; border-radius: 4px;
    font-size: 16px; font-weight: 600; text-align: center; color: #1f3a8f;
}
.qty-input:focus { border-color: #1f3a8f; outline: none; }

.tag { display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px; white-space: nowrap; }
.tag-each { background: #e8f0ff; color: #1f3a8f; }
.tag-once { background: #e9f7ee; color: #1e7a45; }
.tag-opt  { background: #fff4e0; color: #a06a10; }
.tag-err { background: #ffe6e6; color: #c0392b; font-weight: 700; }

/* ---------- 轻提示浮层（AJAX 暂存反馈） ---------- */
.ajax-tip {
    display: none; position: fixed; top: 76px; left: 50%; transform: translateX(-50%);
    z-index: 1200; padding: 12px 24px; border-radius: 6px; font-size: 14px;
    line-height: 1.7; white-space: normal; word-break: break-word; overflow-wrap: anywhere;
    box-shadow: 0 4px 18px rgba(0,0,0,.16);
    width: max-content; max-width: min(560px, 86vw); text-align: center;
}
.ajax-tip.ok  { background: #f0fbf3; color: #237804; border: 1px solid #b7eb8f; }
.ajax-tip.err { background: #fff2f0; color: #cf1322; border: 1px solid #ffccc7; }

/* 自定义规格区：与标准规格同一套卡片，仅标题保留浅灰底以示区分 */
.custom-supply {
    margin-top: 10px; padding: 10px 12px;
    background: #fafbfd; border: 1px dashed #dfe3ec; border-radius: 6px;
}
.custom-supply-title { font-size: 12px; color: #667; margin-bottom: 8px; font-weight: 600; }
.custom-supply .supply-grid { margin-bottom: 8px; }
/* 卡片内的名称输入框：占满剩余宽度 */
.supply-item .si-inline {
    flex: 1; min-width: 0; padding: 3px 7px;
    border: 1px solid #dfe3ec; border-radius: 4px; background: #fff;
    font-size: 13px; font-weight: 600; color: #223;
}
.supply-item .si-inline:focus { border-color: #1f3a8f; outline: none; }
/* 卡片内的单位输入框 */
.supply-item .si-unit-in {
    width: 58px; padding: 5px 7px; flex-shrink: 0;
    border: 1px solid #dfe3ec; border-radius: 4px;
    font-size: 12px; color: #667; text-align: center; background: #fff;
}
.supply-item .si-unit-in:focus { border-color: #1f3a8f; outline: none; }
/* 删除按钮 */
.supply-item .si-del {
    margin-left: auto; flex-shrink: 0; width: 18px; height: 18px; padding: 0;
    border: none; border-radius: 50%; background: transparent;
    color: #b9c0cc; font-size: 15px; line-height: 18px; cursor: pointer;
}
.supply-item .si-del:hover { background: #ffe6e6; color: #cf1322; }
/* 添加按钮 */
.btn-add {
    border-style: dashed; color: #1f3a8f; background: #fff;
}
.btn-add:hover { border-style: dashed; background: #f2f7ff; }
.custom-supply-row { display: flex; gap: 8px; margin-bottom: 6px; }
.custom-supply-row input { padding: 5px 9px; border: 1px solid #d8dce6; border-radius: 4px; }
.custom-supply-row input[type="text"]:first-child { flex: 1; }
.custom-supply-row input:focus { border-color: #1f3a8f; outline: none; }
.unit-input { width: 80px; }

/* 申报第二步：醒目提示条 */
.supply-hint {
    background: #fff8e6; border: 1px solid #ffd97a; border-left: 4px solid #f0a500;
    color: #7a5200; padding: 11px 14px; border-radius: 6px;
    margin-bottom: 14px; font-size: 14px; line-height: 1.8;
}
.supply-hint b { color: #5c3d00; }
/* ---------- 申报内容预览 ---------- */
.pv-sum {
    background: #eef3ff; border: 1px solid #c9d8f5; color: #1f3a8f;
    padding: 11px 14px; border-radius: 6px; margin-bottom: 14px; font-size: 14px;
}
.pv-card { border: 1px solid #e6e9f0; border-radius: 6px; margin-bottom: 12px; overflow: hidden; }
.pv-title { background: #f7f8fb; padding: 9px 14px; font-weight: 600; color: #223; border-bottom: 1px solid #e6e9f0; }
.pv-tag-nos { margin-left: 8px; font-size: 12px; font-weight: 400; color: #8a5a00; background: #fdf6e3; border: 1px solid #f0dfae; border-radius: 3px; padding: 1px 7px; }
.pv-table { width: 100%; }
.pv-table th, .pv-table td { padding: 8px 12px; border-bottom: 1px solid #f0f2f6; font-size: 13px; text-align: left; }
.pv-table th { background: #fafbfd; color: #667; font-weight: 600; font-size: 12px; }
.pv-qty { font-weight: 700; font-size: 15px; color: #1f3a8f; }
.pv-zero { color: #a0a6b4; font-weight: 400; font-size: 13px; }
.pv-ul { margin: 0; padding: 10px 14px 10px 32px; font-size: 13px; color: #333; }
.pv-coef { font-weight: 400; color: #556; font-size: 13px; }
.pv-base { font-weight: 400; color: #99a; font-size: 11px; }
.step-bar .step { white-space: nowrap; }

/* ---------- 第二步：按大类分组的项目表 ---------- */
.ps-cat { border: 1px solid #e6e9f0; border-radius: 6px; margin-bottom: 10px; background: #fff; }
.ps-cat-title {
    margin: 0; padding: 10px 14px; cursor: pointer;
    background: #f7f8fb; border-bottom: 1px solid #e6e9f0;
    font-weight: 600; color: #223; font-size: 14px;
    display: flex; align-items: center; gap: 8px;
}
.ps-cat:hover .ps-cat-title { background: #f0f4fc; }
.ps-cat-title .fold-icon { color: #8892a6; font-size: 12px; }
.ps-cat-sub { margin-left: auto; font-weight: 400; font-size: 12px; color: #667; }
.ps-cat-sub b { color: #1f3a8f; }
.ps-sub { padding: 10px 14px 4px; }
.ps-sub-title { font-size: 12px; color: #667; font-weight: 600; margin-bottom: 6px; }
/* 子类内的项目块网格（与第 1 步项目块视觉一致） */
.ps-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
    gap: 10px; margin-bottom: 10px;
}
.ps-card {
    padding: 10px 12px; border: 1px solid #e3e7ef; border-radius: 6px;
    background: #fff; transition: border-color .15s, background .15s;
}
.ps-card:hover { border-color: #1f3a8f; background: #f7f9ff; }
/* 深蓝边框 = 已分配人数或场次（数值 > 0） */
.ps-card.is-on { border-color: #1f3a8f; background: #eef3ff; }
/* 正在输入时也高亮，避免「填了 0 就退回未填写外观」的困惑 */
.ps-card:focus-within { border-color: #1f3a8f; background: #eef3ff; }
/* 已填写但为 0：琥珀色提示，表示「明确填过 0」而非「没填」 */
.ps-card.is-zero { border-color: #e8b96b; background: #fffbf2; }
.ps-card.is-zero:focus-within { border-color: #1f3a8f; background: #eef3ff; }
/* 只按人数核算的项目：人数输入框占满卡片宽度，卡片可跨两列 */
.ps-card.nos-session { grid-column: span 2; }
.ps-card.nos-session .ps-card-name { min-height: 0; }
.ps-card.nos-session .ps-input-wrap .qty-input { padding-right: 26px; }
@media (max-width: 640px) {
    .ps-card.nos-session { grid-column: span 1; }
}
.ps-card-name {
    font-weight: 600; color: #223; font-size: 14px; line-height: 1.45; margin-bottom: 9px;
    min-height: 40px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ps-card-fields { display: flex; gap: 10px; }
.ps-field { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ps-field > span:first-child { font-size: 12px; color: #667; }
.ps-input-wrap { position: relative; display: block; }
.ps-input-wrap .qty-input { width: 100%; padding-right: 24px; }
.ps-input-wrap i {
    position: absolute; right: 9px; top: 50%; transform: translateY(-50%);
    font-style: normal; font-size: 12px; color: #8892a6; pointer-events: none;
}
.ps-card.is-on .ps-input-wrap i { color: #1f3a8f; }
@media (max-width: 640px) {
    .ps-grid { grid-template-columns: 1fr; }
    .ps-card-name { min-height: 0; }
}
.supply-hint .zero-tip { color: #c0392b; font-weight: 700; }
/* ---------- 填写说明 ---------- */
/* 第 1 步说明：统一为与第 2/3 步一致的琥珀色 */
.guide-tip {
    background: #fff8e6; border: 1px solid #ffd97a; border-left: 4px solid #f0a500;
    border-radius: 6px; padding: 11px 14px; margin: 0 0 14px;
    color: #7a5200; font-size: 14px; line-height: 1.8;
}
.guide-tip b, .guide-ol b { color: #5c3d00; }
.guide-ol { margin: 4px 0 0; padding-left: 20px; }
.guide-ol li { margin-bottom: 2px; }

/* 统一的《填写说明》标题 */
.hint-title {
    font-weight: 700; color: #5c3d00; font-size: 14px; margin: 0 0 6px;
}

/* 说明区对照表：无边框纯列表，与琥珀背景融为一体（三步统一） */
.supply-hint .hint-table, .form-hint .hint-table {
    width: 100%; border-collapse: collapse; margin: 4px 0 8px;
    background: transparent; border: none; border-radius: 0;
}
.supply-hint .hint-table .ht-label, .form-hint .hint-table .ht-label {
    width: 92px; text-align: right; vertical-align: top;
    padding: 3px 12px 3px 0; font-weight: 700; color: #8a5a00;
    background: none; border: none; white-space: nowrap;
}
.supply-hint .hint-table td, .form-hint .hint-table td {
    vertical-align: top; padding: 3px 0; color: #6a5a3a;
    border: none; background: none;
}
/* 行间用极淡虚线分隔，扫读更轻，不形成「白盒子」 */
.supply-hint .hint-table tr + tr td,
.supply-hint .hint-table tr + tr td.ht-label {
    border-top: 1px dashed rgba(170, 130, 50, .20);
}
.supply-hint .hint-table td b { color: #b45309; }

/* ---------- 项目弹窗内的清单编辑 ---------- */
.supply-edit { width: 100%; border: 1px solid #e3e7ef; border-radius: 4px; }
.supply-edit th, .supply-edit td { padding: 5px 6px; border-bottom: 1px solid #f0f2f6; font-size: 12px; text-align: left; }
.supply-edit th { background: #fafbfd; color: #667; font-weight: 600; }
.supply-edit input[type="text"], .supply-edit select {
    width: 100%; padding: 4px 6px; border: 1px solid #d8dce6; border-radius: 3px; font-size: 12px; background: #fff;
}
.supply-edit input:focus, .supply-edit select:focus { border-color: #1f3a8f; outline: none; }
.supply-edit td:last-child { width: 44px; }

/* ---------- 区级：街镇申报内容详情弹窗 ---------- */
.dd-sum {
    padding: 10px 14px; margin-bottom: 12px; border-radius: 6px;
    background: #f2f7ff; border: 1px solid #c9d8f5; color: #223; font-size: 13px;
}
.dd-sum b { color: #1f3a8f; }
.dd-proj {
    border: 1px solid #e6e9f0; border-radius: 6px; margin-bottom: 10px;
    background: #fff; overflow: hidden;
}
.dd-phead {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    padding: 9px 12px; background: #f7f8fb; border-bottom: 1px solid #e6e9f0;
}
.dd-cname { font-size: 12px; color: #667; }
.dd-pname { font-weight: 700; color: #223; font-size: 14px; }
.dd-ctag {
    font-size: 11px; padding: 1px 6px; border-radius: 3px;
    background: #fff4e0; color: #a06a10; border: 1px solid #f0dfae;
}
.dd-ps { padding: 8px 12px; font-size: 13px; color: #334; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.dd-ps b { color: #1f3a8f; font-size: 14px; }
.dd-mtag { font-size: 12px; color: #237804; background: #f0fbf3; border: 1px solid #b7eb8f; border-radius: 3px; padding: 1px 7px; }

.dd-table { width: 100%; border-collapse: collapse; }
.dd-table th {
    padding: 7px 10px; background: #fafbfd; border-bottom: 1px solid #e6e9f0;
    font-size: 12px; color: #667; font-weight: 600; text-align: left;
}
.dd-table td { padding: 7px 10px; border-bottom: 1px solid #f5f6f9; font-size: 13px; }
.dd-table tr:last-child td { border-bottom: none; }
.dd-num { text-align: right; font-weight: 600; color: #1f3a8f; white-space: nowrap; }
.dd-unit {
    text-align: center; color: #667; font-size: 13px; white-space: nowrap;
}
.dd-zero .dd-unit { color: #a8b0bd; }
.dd-zero td { color: #8892a6; }
.dd-zero .dd-num { color: #8892a6; font-weight: 400; }

.dd-basis {
    display: inline-block; font-size: 12px; font-weight: 700; color: #1f3a8f;
    background: #eef3ff; border: 1px solid #c9d8f5; border-radius: 3px; padding: 1px 7px;
}
.dd-cat {
    display: inline-block; font-size: 12px; border-radius: 3px; padding: 1px 7px;
    white-space: nowrap;   /* 类别文案不折行 */
}
.dd-cat-each { background: #eef3ff; color: #1f3a8f; }
.dd-cat-once { background: #f0fbf3; color: #237804; }
.dd-cat-opt  { background: #fff4e0; color: #a06a10; }
.dd-none { padding: 10px 12px; font-size: 13px; color: #8892a6; }
.dd-titlebar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }

/* ---------- 区级申报详情：可编辑控件 ---------- */
.dd-input {
    width: 74px; padding: 4px 7px; border: 1px solid #d8dce6; border-radius: 4px;
    font-size: 13px; text-align: center; color: #1f3a8f; font-weight: 600; background: #fff;
}
.dd-input:focus { border-color: #1f3a8f; outline: none; box-shadow: 0 0 0 2px rgba(31,58,143,.12); }
.dd-input-sm { width: 66px; }
.dd-input::placeholder { color: #b8bfcc; font-weight: 400; }
.dd-savebar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid #e6e9f0;
}
.decl-status-link { text-decoration: none; }
.decl-status-link:hover .decl-status-tip { color: #1f3a8f; }
.decl-status-tip { font-size: 12px; color: #8892a6; margin-left: 2px; }

/* ---------- 区级：审定流程指引 ---------- */
.dd-guide {
    margin: 0 0 16px; padding: 14px 18px; border-radius: 6px;
    background: #f7f9ff; border: 1px solid #c9d8f5; border-left: 4px solid #1f3a8f;
}
.dd-guide-title { font-weight: 700; color: #1f3a8f; margin-bottom: 8px; font-size: 14px; }
.dd-guide-ol { margin: 0; padding-left: 22px; color: #4a4a4a; font-size: 13px; line-height: 1.9; }
.dd-guide-ol b { color: #1f3a8f; }
.dd-guide-tip {
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed #c9d8f5;
    font-size: 13px; color: #4a4a4a;
}
#generate { scroll-margin-top: 80px; outline: 2px solid #1f3a8f; outline-offset: 3px; }

/* ---------- 区级：审定弹窗内容区 ---------- */
.dd-audit-body { max-height: 74vh; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.dd-audit-body .card {
    margin-bottom: 14px; box-shadow: none; border: 1px solid #e6e9f0; border-radius: 6px;
}
.dd-audit-body .card:last-child { margin-bottom: 0; }
.ps-ctag {
    display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 3px;
    font-size: 11px; font-weight: 400; color: #a06a10; background: #fff4e0;
    border: 1px solid #f0dfae; vertical-align: middle;
}

/* ---------- 第 3 步说明：分节标题与示例 ---------- */
.supply-hint .hint-sec {
    display: block; margin: 10px 0 4px; font-size: 13px; font-weight: 700; color: #5c3d00;
}
.supply-hint .hint-sec:first-of-type { margin-top: 6px; }
.hint-demo {
    display: flex; align-items: center; flex-wrap: wrap; gap: 6px;
    padding: 7px 10px; margin: 5px 0;
    background: #fffdf6; border: 1px dashed #e0c880; border-radius: 5px;
    font-size: 13px; color: #6a5a3a;
}
.hint-demo .si-name { font-weight: 600; color: #223; }
.hint-demo b { color: #b45309; }

/* ---------- 说明区：提示与箭头 ---------- */
.supply-hint .hint-note {
    display: inline-block; margin-left: 6px; padding: 1px 8px;
    background: rgba(255, 255, 255, .7); border: 1px dashed #d9b95c; border-radius: 3px;
    font-size: 12.5px; color: #8a6d1f;
}
.hint-demo .dd-arrow { color: #b08d3a; font-weight: 700; margin: 0 2px; }

/* ---------- 第3步：无需填写规格的固定服务项目 ---------- */
.supply-none {
    padding: 14px 16px; margin: 2px 0 10px;
    background: #f7f8fb; border: 1px dashed #dfe3ec; border-radius: 6px;
    color: #8892a6; font-size: 13px; text-align: center;
}

/* ---------- 第 2 步：人数口径提示 ---------- */
.ps-sum-note {
    margin-top: 6px; padding: 6px 10px;
    background: #fffdf6; border-left: 3px solid #e0c880; border-radius: 3px;
    font-size: 12.5px; line-height: 1.8; color: #6a5a3a;
}
.ps-sum-note b { color: #8a5a00; }
.ps-sum-note .text-muted { color: #999; }

/* ---------- 核对弹窗：未填规格的占位 ---------- */
.pv-empty {
    padding: 10px 12px; font-size: 12.5px; color: #a8b0bd;
    background: #fafbfd; border: 1px dashed #e6e9f0; border-radius: 4px;
}

/* ---------- 资金汇总总览 ---------- */
.bar-wrap {
    display: flex; align-items: center; gap: 8px;
}
.bar-wrap .bar {
    height: 8px; background: #1f3a8f; border-radius: 4px; min-width: 2px;
}
.bar-wrap span { font-size: 12.5px; color: #667; white-space: nowrap; }

/* 明细行：条目 · 口径 · 数量 × 单价 = 金额 */
.amt-line {
    font-size: 12.5px; line-height: 1.9; color: #333;
    display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap;
}
.amt-line .amt-name { font-weight: 600; color: #111; }
.amt-line .amt-base {
    font-size: 11px; color: #8a5a00; background: #fdf6e3;
    border: 1px solid #f0dfae; border-radius: 3px; padding: 0 5px;
}
.amt-line .amt-qty  { color: #555; }
.amt-line .amt-price { color: #889; }
.amt-line .amt-val {
    margin-left: auto; font-weight: 700; color: #1f3a8f; min-width: 78px;
    text-align: right; white-space: nowrap;
}

/* ---------- 服务提供定价：预估算表 ---------- */
.est-table { width: 100%; border-collapse: collapse; }
.est-table th {
    padding: 7px 10px; background: #fafbfd; border-bottom: 1px solid #e6e9f0;
    font-size: 12px; color: #667; font-weight: 600; text-align: left;
}
.est-table td {
    padding: 7px 10px; border-bottom: 1px solid #f5f6f9;
    font-size: 13px; vertical-align: top;
}
.est-table tr:last-child td { border-bottom: none; }

/* ---------- 项目总额核定：已设定行高亮 ---------- */
tr.is-set td { background: #f0fbf3; }
tr.is-set td input { border-color: #b7eb8f; background: #f6ffed; }

/* ---------- 基准单价（固定服务项目） ---------- */
.base-price-input {
    width: 110px; padding: 5px 9px; border: 1px solid #f0dfae; border-radius: 4px;
    background: #fffdf6; color: #8a5a00; font-weight: 600;
}
.base-price-input:focus { border-color: #f0a500; outline: none; }

/* ---------- 申报提交状态条 ---------- */
.decl-status-bar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin: 0 0 14px;
    padding: 10px 14px; border-radius: 6px; font-size: 13.5px;
}
.decl-status-bar .dsb-left { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.decl-status-bar .dsb-left b { font-size: 14.5px; }
/* 已锁定：绿色语义 */
.decl-status-bar.is-locked {
    background: #f0fbf3; border-color: #b7eb8f; color: #237804;
}
.decl-status-bar.is-locked .dsb-time { color: #237804; }
/* 已提交：蓝色强调 */
.decl-status-bar .dsb-title { color: #1f3a8f; font-size: 14.5px; }
.decl-status-bar.is-locked .dsb-title { color: #237804; }
.decl-status-bar .dsb-time { color: #1f3a8f; font-weight: 600; }
.decl-status-bar .dsb-deadline { color: #6b7280; font-size: 12.5px; }
.decl-status-bar .dsb-deadline.overdue { color: #cf1322; font-weight: 700; }
.decl-status-bar .dsb-right { color: #6b7280; font-size: 12.5px; }

/* ---------- 区级：申报提交时间 ---------- */
.decl-at-cell { white-space: nowrap; font-size: 12.5px; }
.decl-at { color: #1f3a8f; font-weight: 600; font-variant-numeric: tabular-nums; }
.decl-at.locked { color: #237804; }

/* 草稿状态：灰色调，与「已提交」区分 */
.decl-status-bar.is-draft {
    background: #f8f9fb; border-color: #dfe3ea; color: #5b6472;
}
.decl-status-bar.is-draft .dsb-title { color: #5b6472; }
.decl-status-bar.is-draft .dsb-time { color: #8892a6; font-weight: 400; }

/* ---------- 项目信息菜单：导出工具栏 ---------- */
.menu-toolbar {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; flex-wrap: wrap; margin: 0 0 14px; padding: 9px 14px;
    background: #f7f9fc; border: 1px solid #e3e8f0; border-radius: 6px;
}
.menu-toolbar .mt-info { font-size: 13px; color: #5b6472; }
.menu-toolbar .mt-info b { color: #1f3a8f; font-size: 14px; }
.menu-toolbar .mt-btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- 打印：只输出项目菜单清单 ---------- */
@media print {
    @page { size: A4 landscape; margin: 10mm; }

    /* 隐藏页面框架：侧边栏、顶栏、工具栏
       类名以 inc/header.php 的实际输出为准：.sidebar / .side-nav / .topbar */
    .sidebar, .side-brand, .side-logo, .side-title, .side-nav, .nav-group,
    .topbar, .impersonate-bar, .menu-toolbar, .footer { display: none !important; }

    /* 布局复位：侧栏隐藏后主区域占满整页 */
    html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
    .layout { display: block !important; margin: 0 !important; padding: 0 !important;
        width: 100% !important; max-width: none !important; }
    .main { display: block !important; margin: 0 !important; padding: 0 !important;
        width: 100% !important; max-width: none !important; }
    .content { display: block !important; margin: 0 !important; padding: 0 !important;
        width: 100% !important; max-width: none !important; }

    /* 卡片与折叠容器去装饰 */
    .card { border: none !important; box-shadow: none !important;
        margin: 0 0 10px !important; padding: 0 !important; background: none !important; }
    .fold-body { display: block !important; }

    /* 隐藏一切交互元素与非清单内容 */
    button, .btn, input, select, textarea,
    form, fieldset,
    .modal-mask, .alert, .form-hint, .supply-hint,
    .table-actions, .menu-sub-actions, .btn-group,
    .fold-icon, .supply-edit, .hint-table,
    .stat-row, .stat, .menu-cat-head .badge,
    .menu-sub-head .badge, .cat-meta, .spacer,

    /* 大类 / 子类标题：只保留名称，去掉统计、徽章、按钮、折叠图标 */
    .menu-cat-head, .menu-sub-head, .menu-no-sub-head {
        page-break-after: avoid; break-after: avoid;
        font-weight: 700 !important; font-size: 13.5px !important;
        margin: 12px 0 4px !important; padding: 0 0 3px !important;
        background: none !important; border: none !important;
        border-bottom: 1px solid #666 !important;
    }
    .menu-cat-head .cat-meta,
    .menu-cat-head .badge,
    .menu-cat-head .btn-group,
    .menu-sub-head .badge,
    .menu-sub-head .menu-sub-actions,
    .fold-toggle, .spacer { display: none !important; }
    .menu-cat-head .cat-name { font-size: 14.5px !important; font-weight: 700 !important; }

    /* 清单表格 */
    table { width: 100% !important; border-collapse: collapse !important;
        page-break-inside: auto; margin: 0 0 8px !important; }
    thead { display: table-header-group; }
    tr { page-break-inside: avoid; page-break-after: auto; }
    td, th { border: 1px solid #8a8a8a !important; padding: 4px 6px !important;
        font-size: 11px !important; line-height: 1.5 !important; vertical-align: top !important; }
    th { background: #e8ecf3 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact;
        font-size: 11.5px !important; text-align: left !important; }

    /* 隐藏「操作」列（清单表最后一列） */
    .menu-table td:last-child, .menu-table th:last-child { display: none !important; }

    /* 徽章：完全去掉样式，只留文字（「标准」「启用」等） */
    .badge, .badge-default, .badge-primary, .badge-success,
    .badge-warning, .badge-info, .badge-danger {
        display: inline !important;
        background: none !important; border: none !important;
        box-shadow: none !important; color: #000 !important;
        padding: 0 !important; margin: 0 !important;
        font-size: 11px !important; font-weight: 400 !important;
        line-height: inherit !important;
    }
    /* 「类型」「状态」两列信息量低，打印时隐藏 */
    .menu-table td:nth-child(1), .menu-table th:nth-child(1),
    .menu-table td:nth-child(5), .menu-table th:nth-child(5) { display: none !important; }

    a { text-decoration: none !important; color: #000 !important; }
}

/* ---------- 街镇端：双确认流程图 ---------- */
.flow-steps {
    display: flex; align-items: flex-start; gap: 0;
    flex-wrap: wrap; padding: 4px 0;
}
.flow-step {
    display: flex; align-items: flex-start; gap: 10px;
    flex: 1 1 190px; min-width: 170px; position: relative;
}
.fs-dot {
    width: 28px; height: 28px; flex-shrink: 0;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    background: #eef0f4; color: #98a0ae; border: 2px solid #dfe3ea;
}
.fs-body { flex: 1; min-width: 0; padding-right: 10px; }
.fs-title { font-size: 13.5px; font-weight: 700; color: #6b7280; line-height: 1.6; }
.fs-desc  { font-size: 12px; color: #98a0ae; line-height: 1.6; }
.fs-time  { font-size: 11.5px; color: #a8b0bd; font-variant-numeric: tabular-nums; margin-top: 1px; }
/* 连接线 */
.fs-line {
    position: absolute; left: 32px; top: 13px;
    width: calc(100% - 42px); height: 2px; background: #e3e6ec;
}
.flow-step:last-child .fs-line { display: none; }

/* 已完成 */
.flow-step.done .fs-dot { background: #f0fbf3; color: #237804; border-color: #b7eb8f; }
.flow-step.done .fs-title { color: #237804; }
.flow-step.done .fs-desc  { color: #5a8f3c; }
.flow-step.done .fs-line  { background: #b7eb8f; }

/* 当前步骤 */
.flow-step.now .fs-dot {
    background: #1f3a8f; color: #fff; border-color: #1f3a8f;
    box-shadow: 0 0 0 4px rgba(31, 58, 143, .12);
}
.flow-step.now .fs-title { color: #1f3a8f; font-size: 14px; }
.flow-step.now .fs-desc  { color: #1f3a8f; font-weight: 600; }

@media (max-width: 700px) {
    .flow-step { flex: 1 1 100%; }
    .fs-line { display: none !important; }
}

/* ---------- 双确认流程：在 step-bar 基础上扩展「已完成」与文字层级 ---------- */
.step-bar .step { align-items: flex-start; }
.step-bar .step-n { flex-shrink: 0; margin-top: 1px; }
.step-bar .step-txt { display: flex; flex-direction: column; line-height: 1.45; }

/* 已完成：绿色 */
.step-bar .step.done { color: #237804; }
.step-bar .step.done .step-n { background: #f0fbf3; color: #237804; box-shadow: inset 0 0 0 1px #b7eb8f; }
/* 完成后箭头变绿 */
.step-bar .step.done + .step-arrow { color: #b7eb8f; }

/* 标题与描述 */
.step-bar .st-title { font-size: 14px; font-weight: 600; }
.step-bar .st-desc  { font-size: 12px; font-weight: 400; color: #98a0ae; margin-top: 1px; }
.step-bar .st-time  { font-size: 11.5px; font-weight: 400; color: #a8b0bd; font-variant-numeric: tabular-nums; }
.step-bar .step.active .st-title { font-size: 14.5px; }
.step-bar .step.active .st-desc  { color: #1f3a8f; font-weight: 600; }
.step-bar .step.done .st-desc    { color: #5a8f3c; }

/* 窄屏：竖排 */
@media (max-width: 760px) {
    .step-bar { flex-direction: column; align-items: flex-start; gap: 10px; }
    .step-bar .step-arrow { display: none; }
}

/* ---------- 街镇端：全局流程条（跨页面，6 步单行） ---------- */
.flow-global {
    margin: 0 0 8px; padding: 12px 10px;
    gap: 8px; flex-wrap: wrap; justify-content: center;
}
.flow-global .step { gap: 6px; }
.flow-global .st-title { font-size: 13px; white-space: nowrap; }
.flow-global .step.active .st-title { font-size: 13.5px; }
/* 下方一行说明 */
.flow-now {
    margin: 0; padding: 8px 12px; border-radius: 5px;
    background: #f2f7ff; border: 1px solid #c9d8f5;
    font-size: 13px; color: #2a3f5f; line-height: 1.7;
}
.flow-now b { color: #1f3a8f; }
/* 已全部完成 */
.flow-global + .flow-now { background: #f0fbf3; border-color: #b7eb8f; color: #237804; }
.flow-global + .flow-now b { color: #237804; }
.flow-global .step-txt, .flow-global .st-title { display: block; }
.flow-global .st-title { font-size: 13.5px; }
.flow-global .step.active .st-title { color: #1f3a8f; }

/* ---------- 街镇端：最终项目清单 ---------- */
tr.row-adjusted td { background: #fffbf0; }
tr.row-adjusted td:first-child { box-shadow: inset 3px 0 0 #f0a500; }

/* ---------- 街镇端：最终项目清单的规格明细 ---------- */
.sup-line {
    font-size: 12.5px; line-height: 1.85; color: #333;
    word-break: keep-all; overflow-wrap: break-word;
}
.sup-line .sl-name { font-weight: 600; color: #111; }
.sup-line .sl-spec { color: #666; }

/* ---------- 最终项目清单：长文本单元格 ---------- */
.cell-wrap {
    font-size: 12.5px; line-height: 1.75;
    word-break: keep-all; overflow-wrap: break-word;
    vertical-align: top;
}

/* ---------- 最终项目清单：宽表横向滚动 ---------- */
.table-scroll { overflow-x: auto; margin: 0 -2px; }
.table-scroll > table { min-width: 1180px; }
.final-list-table th {
    background: #fafbfd; font-size: 12px; color: #667; font-weight: 600;
    white-space: nowrap;
}
.final-list-table td { vertical-align: middle; }

/* ---------- 最终项目清单：百分比列宽（9 列，合计 100%） ---------- */
.table-scroll > table { min-width: 0; table-layout: fixed; }
.final-list-table .c-no    { width: 4%;  }
.final-list-table .c-cat   { width: 11%; }
.final-list-table .c-sub   { width: 11%; }
.final-list-table .c-prj   { width: 13%; }
.final-list-table .c-desc  { width: 13%; }
.final-list-table .c-asm   { width: 13%; }
.final-list-table .c-pers  { width: 6%;  }
.final-list-table .c-sess  { width: 6%;  }
.final-list-table .c-spec  { width: 23%; }
/* 窄列内容居中且不换行 */
.final-list-table .c-no,
.final-list-table .c-pers,
.final-list-table .c-sess { text-align: center; }
.final-list-table td.c-no,
.final-list-table td.c-pers,
.final-list-table td.c-sess { vertical-align: middle; }

/* 百分比列宽必须配合 border-box，否则 width 不含 padding/border，会把列挤出表格 */
.final-list-table,
.final-list-table th,
.final-list-table td { box-sizing: border-box; }

/* ---------- 后台首页：流程节点 ---------- */
.node-cell {
    width: 7.14%; padding: 8px 4px; text-align: center; vertical-align: top;
    border-left: 1px solid #eef0f4;
}
.node-cell:first-child { border-left: none; }
.node-link {
    display: block; text-decoration: none; color: inherit;
    padding: 4px 2px; border-radius: 5px; transition: background .15s;
}
.node-link:hover { background: #f4f7fd; }
.node-title { display: block; color: #667; font-size: 12.5px; line-height: 1.5; margin-top: 3px; }
.node-go { display: block; color: #1f3a8f; font-size: 11.5px; margin-top: 2px; font-weight: 600; }

/* 已完成 */
.node-cell.done .node-title { color: #237804; }
/* 当前待办 */
.node-cell.now { background: #fffdf5; }
.node-cell.now .node-title { color: #1f3a8f; font-weight: 600; }
.node-cell.now .node-link { box-shadow: inset 0 0 0 1px #f0dfae; }
/* 未开始 */
.node-cell.wait .node-title { color: #a8b0bd; }

@media print { .node-go { display: none; } }

/* ---------- 区级审定：补充自定义规格条目 ---------- */
.dd-addsup {
    margin: 8px 0 4px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.dd-addsup-tip { font-size: 12px; color: #98a0ae; }
.dd-addsup-form {
    display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
    margin: 6px 0 10px; padding: 8px 10px;
    background: #f7f9fc; border: 1px dashed #c9d4e8; border-radius: 5px;
}
.dd-addsup-form .dd-input { padding: 4px 7px; border: 1px solid #d9dce3; border-radius: 4px; }
.dd-addsup-basis { font-size: 12px; color: #667; }
