*{box-sizing:border-box}body{margin:0;font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#172033;background:#f5f7fb;font-size:14px}.app{display:flex;min-height:100vh}aside{width:232px;background:#0f1b31;color:#dce7fa;position:fixed;inset:0 auto 0 0;padding:24px 14px;z-index:5}.brand{display:flex;gap:12px;align-items:center;padding:4px 6px 26px}.brand .logo{width:40px;height:40px;border-radius:12px;background:#fff;color:#0f1b31;display:grid;place-items:center;font-weight:900;font-size:19px}.brand b{display:block;font-size:16px;color:#fff}.brand small{display:block;color:#8ea1c0;margin-top:4px}nav{display:grid;gap:5px}nav button{border:0;background:transparent;color:#aebdd4;text-align:left;padding:12px 14px;border-radius:10px;cursor:pointer;font-size:14px}nav button:hover,nav button.active{background:#1d3150;color:#fff;font-weight:700}.legend{position:absolute;bottom:20px;left:18px;right:18px;border-top:1px solid #263956;padding-top:15px;display:grid;gap:8px;color:#9eb0cc;font-size:12px}.legend b{color:#dce7fa}.legend span{display:flex;align-items:center;gap:7px}.dot{width:8px;height:8px;border-radius:50%}.dot.input{background:#2f6bff}.dot.auto{background:#a9b3c2}.dot.custom{background:#9b63ff}main{margin-left:232px;width:calc(100% - 232px)}header{height:92px;background:#fff;border-bottom:1px solid #e7ebf2;display:flex;justify-content:space-between;align-items:center;padding:0 28px;position:sticky;top:0;z-index:4}h1{font-size:22px;margin:0 0 6px}header p{margin:0;color:#7c8aa2}.top-actions{display:flex;gap:10px}button,select,input{font:inherit}button{background:#2f6bff;color:white;border:0;border-radius:9px;padding:10px 15px;cursor:pointer;font-weight:650}.soft,.ghost{background:#edf3ff;color:#2760dd}.danger{background:#fff0f0;color:#d94646}select,input{border:1px solid #dce3ed;border-radius:9px;padding:10px 12px;background:#fff;color:#172033}#content{padding:24px 28px 60px}.card{background:#fff;border:1px solid #e5eaf1;border-radius:16px;padding:18px;box-shadow:0 1px 2px rgba(16,24,40,.02)}.kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:16px}.kpi small{color:#7c8aa2}.kpi strong{font-size:25px;display:block;margin:10px 0 5px}.kpi em{font-style:normal;color:#96a2b4;font-size:12px}.grid2{display:grid;grid-template-columns:1.35fr 1fr;gap:16px}.section-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.section-title h3{margin:0;font-size:16px}.section-title span,.muted{color:#8a98ad}.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.left,.right{display:flex;gap:10px;align-items:center}.table-wrap{overflow:auto;border:1px solid #e7ebf2;border-radius:12px}table{width:100%;border-collapse:collapse;min-width:850px}th{background:#f8fafc;color:#718096;font-weight:600;text-align:left;font-size:12px}th,td{padding:13px 12px;border-bottom:1px solid #edf0f4;white-space:nowrap}tbody tr:hover{background:#fafcff}.num{text-align:right;font-variant-numeric:tabular-nums}.tag{display:inline-flex;padding:4px 8px;border-radius:99px;background:#e9f1ff;color:#255ed7;font-size:12px}.tag.small{background:#eef8f2;color:#21834a}.notice{background:#f1f6ff;border:1px solid #dbe7ff;color:#38547e;border-radius:12px;padding:13px 15px;margin-bottom:14px;line-height:1.65}.workflow{display:grid;grid-template-columns:240px 1fr;gap:16px}.entity-list{padding:10px}.entity-list button{width:100%;display:flex;justify-content:space-between;background:transparent;color:#42526a;padding:11px;border-radius:9px}.entity-list button.active{background:#edf3ff;color:#2159d3}.entity-list small{font-weight:400}.work-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px}.work-head h2{margin:0 0 4px;font-size:19px}.steps{display:flex;gap:8px;margin-bottom:16px}.step{background:#f3f5f8;color:#718096;padding:8px 12px;border-radius:99px;font-size:12px}.step.on{background:#eaf1ff;color:#275fdc;font-weight:700}.input-section{border:1px solid #e4e9f1;border-radius:14px;margin-bottom:14px;overflow:hidden}.input-section .title{padding:12px 15px;background:#f9fafc;display:flex;justify-content:space-between;align-items:center}.input-section .title b{font-size:14px}.field-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;padding:15px}.field{border:1px solid #e4e9f1;border-radius:11px;padding:11px;background:#fff}.field label{display:flex;justify-content:space-between;color:#536278;font-size:12px;margin-bottom:8px}.field input{width:100%;padding:8px 10px}.field.input{border-left:3px solid #2f6bff}.field.auto{background:#f7f8fa;color:#69768a}.field.auto strong{font-size:17px}.field.custom{border-left:3px solid #9b63ff}.hint{font-size:11px;color:#9aa6b8;margin-top:6px}.result-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;padding:15px}.result{background:#f7f9fc;border-radius:11px;padding:13px}.result small{color:#78869b}.result b{display:block;font-size:18px;margin-top:7px}.result.primary{background:#edf3ff;color:#2159d3}.formula{font-size:12px;color:#7b8799;margin-top:5px}.identity-box{display:flex;gap:10px;align-items:center}.identity-box select{font-weight:700}.rule-card{border:1px solid #e3e8f0;border-radius:14px;padding:15px;margin-bottom:12px}.rule-card h3{margin:0 0 6px}.rule-card p{color:#7d8ba1;line-height:1.6}.rule-row{display:grid;grid-template-columns:1.2fr .7fr 1.8fr auto;gap:10px;align-items:center;padding:9px 0;border-top:1px solid #eef1f5}.pill-input{font-size:11px;background:#eaf1ff;color:#2860d7;padding:3px 7px;border-radius:99px}.pill-auto{font-size:11px;background:#eef1f4;color:#657287;padding:3px 7px;border-radius:99px}.pill-custom{font-size:11px;background:#f3edff;color:#7546d8;padding:3px 7px;border-radius:99px}.modal{position:fixed;inset:0;background:rgba(10,20,38,.42);display:grid;place-items:center;z-index:20}.modal.hidden{display:none}.modal-card{background:white;width:min(760px,92vw);max-height:88vh;overflow:auto;border-radius:17px;padding:20px;box-shadow:0 24px 60px rgba(0,0,0,.18)}.modal-head{display:flex;justify-content:space-between;align-items:center}.modal-head h3{margin:0}.x{background:#f1f3f6;color:#667085;font-size:18px;padding:5px 10px}.form-actions{display:flex;justify-content:flex-end;gap:8px;margin-top:18px}.switch{display:inline-flex;gap:4px;background:#f1f3f6;border-radius:9px;padding:3px}.switch button{padding:7px 10px;background:transparent;color:#667085}.switch button.on{background:#fff;color:#245bd2;box-shadow:0 1px 3px #d9dee8}.empty{text-align:center;padding:35px;color:#8c99ab}@media(max-width:1100px){.kpis{grid-template-columns:repeat(2,1fr)}.workflow{grid-template-columns:1fr}.entity-list{display:flex;overflow:auto}.entity-list button{min-width:150px}.field-grid{grid-template-columns:repeat(2,1fr)}}
/* 全站表格纵向对齐修复 */
table{table-layout:fixed}
th,td{box-sizing:border-box;vertical-align:middle;text-align:left}
th.num,td.num{text-align:right!important;font-variant-numeric:tabular-nums}
th:first-child,td:first-child{text-align:left}
td .muted{display:block;margin-top:3px}
/* 基础资料：表头与资料使用完全相同的列轨道 */
#content table th,#content table td{overflow:hidden;text-overflow:ellipsis}
#content table th:last-child,#content table td:last-child{overflow:visible;text-overflow:clip}
/* 主体资料 7列 */
.tabs + .toolbar + .card table:has(th:nth-child(7)){min-width:980px}
.tabs + .toolbar + .card table:has(th:nth-child(7)) th:nth-child(1),.tabs + .toolbar + .card table:has(th:nth-child(7)) td:nth-child(1){width:18%}
.tabs + .toolbar + .card table:has(th:nth-child(7)) th:nth-child(2),.tabs + .toolbar + .card table:has(th:nth-child(7)) td:nth-child(2){width:14%}
.tabs + .toolbar + .card table:has(th:nth-child(7)) th:nth-child(3),.tabs + .toolbar + .card table:has(th:nth-child(7)) td:nth-child(3){width:12%}
.tabs + .toolbar + .card table:has(th:nth-child(7)) th:nth-child(4),.tabs + .toolbar + .card table:has(th:nth-child(7)) td:nth-child(4){width:15%}
.tabs + .toolbar + .card table:has(th:nth-child(7)) th:nth-child(5),.tabs + .toolbar + .card table:has(th:nth-child(7)) td:nth-child(5){width:13%}
.tabs + .toolbar + .card table:has(th:nth-child(7)) th:nth-child(6),.tabs + .toolbar + .card table:has(th:nth-child(7)) td:nth-child(6){width:10%;text-align:right}
.tabs + .toolbar + .card table:has(th:nth-child(7)) th:nth-child(7),.tabs + .toolbar + .card table:has(th:nth-child(7)) td:nth-child(7){width:18%;text-align:right}
/* 店铺资料 5列 */
.tabs + .toolbar + .card table:not(:has(th:nth-child(6))){min-width:860px}
.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) th:nth-child(1),.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) td:nth-child(1){width:34%}
.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) th:nth-child(2),.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) td:nth-child(2){width:20%}
.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) th:nth-child(3),.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) td:nth-child(3){width:14%}
.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) th:nth-child(4),.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) td:nth-child(4){width:16%}
.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) th:nth-child(5),.tabs + .toolbar + .card table:not(:has(th:nth-child(6))) td:nth-child(5){width:16%;text-align:right}
/* 月度录入：输入框与所属列同宽，数字统一右对齐 */
.entry-table input.cell-input,.entry-table td input{width:100%;min-width:0;text-align:right}
.entry-table th:not(:first-child),.entry-table td:not(:first-child){text-align:right}
.entry-table th:first-child,.entry-table td:first-child{text-align:left}
/* 操作按钮不换行，避免把列撑歪 */
td:last-child button{white-space:nowrap;margin:2px}
/* 恢复上一版季度界面：四季度独立切换 */
.quarter-tabs{display:flex;gap:8px;margin-bottom:14px;background:#f5f7fb;padding:0}.quarter-tabs button{min-width:112px;background:#eef2f7;color:#5e6b7d}.quarter-tabs button.on{background:#2f6bff;color:#fff}.quarter-tabs + .notice + .card table{min-width:1000px}.quarter-tabs + .notice + .card table th:first-child,.quarter-tabs + .notice + .card table td:first-child{width:18%;text-align:left}.quarter-tabs + .notice + .card table th:nth-child(n+2),.quarter-tabs + .notice + .card table td:nth-child(n+2){text-align:right}
/* 2026-09 全站表头/资料同轴：表头与该列内容采用完全相同的水平对齐规则 */
thead th.num, tbody td.num{ text-align:right!important; }
/* 月度录入的第2-8列全部是金额列，表头、输入框、自动值统一右对齐 */
.input-section .table-wrap table th:nth-child(n+2),
.input-section .table-wrap table td:nth-child(n+2){text-align:right!important}
.input-section .table-wrap table td:nth-child(n+2) input{width:100%;text-align:right!important;display:block;margin:0}
/* 配置页：数量/金额列同轴，操作列统一左对齐 */
.card table th:last-child,.card table td:last-child{text-align:left}
/* 季度表：第一列左对齐，其余财务列全部右对齐 */
.quarter-tabs + .notice + .card table th:nth-child(n+2),
.quarter-tabs + .notice + .card table td:nth-child(n+2){text-align:right!important}
/* Excel店铺字段完整化：宽表横向滚动，所有金额表头与输入数据保持同轴 */
.input-section .table-wrap{overflow-x:auto}.input-section table{min-width:1480px;table-layout:fixed}.input-section table th:first-child,.input-section table td:first-child{width:210px;text-align:left}.input-section table th:not(:first-child),.input-section table td:not(:first-child){width:135px;text-align:right}.input-section table td input{width:100%;min-width:0;text-align:right;box-sizing:border-box;font-variant-numeric:tabular-nums}.input-section table th{white-space:nowrap}

.period-cutoff{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin:12px 0 14px;padding:12px 14px;background:#f8fafc;border:1px solid #e7ebf0;border-radius:12px}.period-cutoff label{display:flex;align-items:center;gap:10px}.period-cutoff input{width:auto;min-width:150px}
