* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; background: #f0f2f5; color: #333; }

/* 登录注册 */
.auth-container { display: flex; justify-content: center; align-items: center; min-height: 100vh; padding: 20px; }
.auth-card { background: #fff; border-radius: 16px; padding: 40px; width: 100%; max-width: 420px; box-shadow: 0 8px 30px rgba(0,0,0,.12); }
.auth-title { text-align: center; font-size: 24px; color: #1a73e8; margin-bottom: 24px; }
.auth-tabs { display: flex; margin-bottom: 24px; }
.tab-btn { flex: 1; padding: 10px; border: 2px solid #e0e0e0; background: #fff; cursor: pointer; font-size: 15px; transition: all .2s; }
.tab-btn:first-child { border-radius: 8px 0 0 8px; }
.tab-btn:last-child { border-radius: 0 8px 8px 0; }
.tab-btn.active { background: #1a73e8; color: #fff; border-color: #1a73e8; }
.auth-form { display: none; flex-direction: column; gap: 12px; }
.auth-form.active { display: flex; }
.auth-form input, .auth-form select { padding: 12px 14px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 15px; outline: none; transition: border .2s; }
.auth-form input:focus, .auth-form select:focus { border-color: #1a73e8; }

/* 快捷登录 */
.quick-login-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid #e0e0e0; }
.quick-login-label { font-size: 13px; color: #888; margin-bottom: 10px; text-align: center; }
.quick-login-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.ql-btn { flex: 1; min-width: calc(50% - 4px); padding: 10px 8px; border: 2px solid #e0e0e0; border-radius: 10px; background: #fafafa; cursor: pointer; font-size: 13px; text-align: center; transition: all .2s; display: flex; align-items: center; justify-content: center; gap: 6px; }
.ql-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(0,0,0,.1); border-color: #1a73e8; background: #f0f4ff; }
.ql-btn:active { transform: translateY(0); }
.ql-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }

.auth-error { color: #d32f2f; font-size: 13px; text-align: center; min-height: 20px; }

/* 主界面 */
.page { display: none; }
.page.active { display: block; }
.top-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: #1a73e8; color: #fff; }
.user-info { font-weight: 600; font-size: 15px; }
.unit-info { font-size: 13px; opacity: .85; margin-left: 8px; }
.top-right { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.nav-bar { display: flex; background: #fff; border-bottom: 1px solid #e0e0e0; position: sticky; top: 0; z-index: 100; }
.nav-btn { flex: 1; padding: 12px; border: none; background: #fff; cursor: pointer; font-size: 14px; color: #666; border-bottom: 2px solid transparent; transition: all .2s; }
.nav-btn.active { color: #1a73e8; border-bottom-color: #1a73e8; font-weight: 600; }

.content { padding: 16px; max-width: 1000px; margin: 0 auto; }
.tab-content { display: none; }
.tab-content.active { display: block; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.section-header h2 { font-size: 18px; }

.btn-primary { padding: 12px; background: #1a73e8; color: #fff; border: none; border-radius: 8px; font-size: 16px; cursor: pointer; transition: background .2s; display: inline-block; text-align: center; }
.btn-primary:hover { background: #1557b0; }
.btn-primary.btn-sm { padding: 8px 16px; font-size: 14px; }
.btn-primary.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-secondary { padding: 8px 16px; background: #fff; color: #1a73e8; border: 2px solid #1a73e8; border-radius: 8px; font-size: 14px; cursor: pointer; }
.btn-secondary:hover { background: #f0f4ff; }
.btn-secondary.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-danger { padding: 6px 12px; background: #d32f2f; color: #fff; border: none; border-radius: 6px; font-size: 13px; cursor: pointer; }
.btn-danger:hover { background: #b71c1c; }
.btn-danger.btn-xs { padding: 2px 8px; font-size: 11px; }
.btn-success.btn-xs { padding: 4px 10px; font-size: 12px; background: #4caf50; color: #fff; border: none; border-radius: 6px; cursor: pointer; }
.btn-success.btn-xs:hover { background: #388e3c; }

/* Gantt 多级分包时间轴 */
.gantt-sub .gantt-label { font-size: 12px; color: #555; }
.gantt-sub .gantt-track { height: 24px; }
.gantt-unit { font-size: 10px; color: #888; }

/* 分包项卡片 */
.sub-items-wrap { border-left: 2px solid #e0e0e0; padding-left: 12px; margin: 8px 0 8px 20px; }
.sub-item-card { background: #f8f9fa; border: 1px solid #dee2e6; border-radius: 6px; padding: 8px; margin: 6px 0; }
.tasks-wrap { border-left: 2px solid #ccc; padding-left: 10px; margin: 6px 0 6px 16px; }

/* 小进度条 */
.small-bar-wrap { margin: 4px 0; font-size: 11px; color: #666; }
.small-bar-bg { background: #eee; border-radius: 4px; height: 8px; overflow: hidden; }
.small-bar-fill { height: 8px; border-radius: 4px; transition: width .3s; }

/* 认领卡片升级 */
.claim-card { background: #fff; border: 1px solid #e0e0e0; border-radius: 10px; padding: 14px; margin: 10px 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.claim-info { flex: 1; min-width: 200px; }
.claim-info .hint { font-size: 12px; color: #888; }
.claim-actions { display: flex; gap: 6px; }
.btn-small { padding: 6px 12px; border: none; border-radius: 6px; background: rgba(255,255,255,.2); color: #fff; cursor: pointer; font-size: 13px; }
.btn-small.btn-outline { background: transparent; border: 1px solid rgba(255,255,255,.5); }

/* 列表卡片 */
.list-container { display: flex; flex-direction: column; gap: 12px; }
.card { background: #fff; border-radius: 12px; padding: 16px; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: pointer; transition: box-shadow .2s; }
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.card-title { font-size: 16px; font-weight: 600; margin-bottom: 4px; }
.card-sub { font-size: 13px; color: #888; word-break: break-all; }
.card-status { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 12px; margin-top: 4px; }
.card-footer { display: flex; justify-content: space-between; margin-top: 8px; font-size: 12px; color: #999; flex-wrap: wrap; gap: 4px; }

/* 状态标签色 */
.status-waiting { background: #fff3e0; color: #e65100; }
.status-progress { background: #e3f2fd; color: #1565c0; }
.status-done { background: #e8f5e9; color: #2e7d32; }
.status-delay { background: #ffebee; color: #c62828; }
.status-early { background: #e8f5e9; color: #2e7d32; }

/* 进度条 */
.progress-bar-wrap { background: #e0e0e0; border-radius: 10px; height: 24px; overflow: hidden; margin: 8px 0; position: relative; }
.progress-bar-fill { height: 100%; background: linear-gradient(90deg, #43a047, #66bb6a); border-radius: 10px; transition: width .3s ease; }
.progress-bar-fill.delay { background: linear-gradient(90deg, #e53935, #ef5350); }
.progress-bar-fill.early { background: linear-gradient(90deg, #1e88e5, #42a5f5); }
.progress-bar-fill.partial { background: linear-gradient(90deg, #43a047, #66bb6a 60%, #e53935 60%, #ef5350); }
.progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 12px; font-weight: 600; color: #333; white-space: nowrap; }
.progress-expected-marker { position: absolute; top: 0; width: 2px; height: 100%; background: #333; z-index: 2; }
.progress-expected-marker::after { content: '应到'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #333; white-space: nowrap; }

/* 弹窗 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 1000; justify-content: center; align-items: flex-start; overflow-y: auto; padding: 40px 16px; }
.modal-overlay.active { display: flex; }
.modal { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 720px; position: relative; }
.modal-wide { max-width: 900px; }
.modal h2 { font-size: 18px; margin-bottom: 16px; }
.modal h3 { font-size: 15px; margin: 12px 0 8px; }
.modal-close { position: absolute; top: 12px; right: 16px; font-size: 24px; cursor: pointer; color: #999; background: none; border: none; }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; font-weight: 500; }
.form-group input, .form-group select, .form-group textarea { width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; outline: none; }
.form-group textarea { resize: vertical; min-height: 60px; }
.form-group input:focus, .form-group select:focus, .form-group textarea:focus { border-color: #1a73e8; }
.form-row { display: flex; gap: 8px; align-items: center; }
.form-row .form-group { flex: 1; margin-bottom: 0; }

/* 阶段列表 */
.phase-list { margin: 12px 0; }
.phase-item { background: #f8f9fa; border-radius: 10px; padding: 14px; margin-bottom: 10px; border-left: 4px solid #1a73e8; }
.phase-item.status-delay-border { border-left-color: #e53935; }
.phase-item.status-early-border { border-left-color: #1e88e5; }
.phase-item.status-done-border { border-left-color: #43a047; }
.phase-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; flex-wrap: wrap; gap: 4px; }
.phase-name { font-weight: 600; font-size: 15px; }
.phase-status-badge { font-size: 12px; padding: 2px 8px; border-radius: 4px; }
.phase-progress-wrap { margin: 8px 0; position: relative; }
.phase-dates { font-size: 12px; color: #888; display: flex; gap: 16px; flex-wrap: wrap; margin-top: 4px; }
.phase-reason { font-size: 12px; color: #c62828; margin-top: 6px; padding: 6px 10px; background: #fff3f3; border-radius: 6px; border-left: 3px solid #c62828; }
.phase-extended { font-size: 12px; color: #e65100; margin-top: 4px; padding: 4px 8px; background: #fff3e0; border-radius: 4px; }
.phase-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* 拖拽滑块 */
.slider-container { margin: 12px 0; padding: 16px 0 4px; background: #fff; border-radius: 8px; }
.slider-track { width: 100%; height: 8px; background: #e0e0e0; border-radius: 4px; position: relative; cursor: pointer; }
.slider-fill { height: 100%; border-radius: 4px; position: absolute; top: 0; left: 0; pointer-events: none; }
.slider-fill.green-part { background: linear-gradient(90deg, #43a047, #66bb6a); }
.slider-fill.red-part { background: linear-gradient(90deg, #e53935, #ef5350); }
.slider-fill.blue-part { background: linear-gradient(90deg, #1e88e5, #42a5f5); }
.slider-thumb { width: 28px; height: 28px; background: #1a73e8; border-radius: 50%; position: absolute; top: 50%; transform: translate(-50%,-50%); cursor: grab; box-shadow: 0 2px 8px rgba(0,0,0,.3); z-index: 3; }
.slider-thumb:active { cursor: grabbing; box-shadow: 0 4px 14px rgba(0,0,0,.4); }
.slider-value { text-align: center; font-size: 28px; font-weight: 700; color: #1a73e8; margin: 4px 0; }
.slider-expected { text-align: center; font-size: 13px; color: #888; margin-bottom: 8px; }

/* 双色进度条 */
.progress-bar-dual { position: relative; height: 100%; border-radius: 10px; overflow: hidden; }
.progress-bar-green { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, #43a047, #66bb6a); border-radius: 10px 0 0 10px; transition: width .3s ease; z-index: 1; }
.progress-bar-green.full { border-radius: 10px; }
.progress-bar-red { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg, #e53935, #ef5350); transition: width .3s ease; z-index: 1; }
.progress-bar-blue { position: absolute; top: 0; height: 100%; background: linear-gradient(90deg, #1e88e5, #42a5f5); transition: width .3s ease; z-index: 1; }

/* 层级树 */
.hierarchy-tree { padding: 8px 0; }
.h-level { margin: 4px 0; padding: 0; }
.h-item { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; border-left: 4px solid #1a73e8; }
.h-item.level-master { border-left-color: #1a73e8; }
.h-item.level-contractor { border-left-color: #fb8c00; margin-left: 20px; }
.h-item.level-sub { border-left-color: #7b1fa2; margin-left: 40px; }
.h-item.level-construction { border-left-color: #00897b; margin-left: 60px; }
.h-title { font-weight: 600; font-size: 14px; }
.h-unit { font-size: 12px; color: #888; }
.h-bar { margin: 6px 0; }

/* 日志 */
.log-item { font-size: 13px; padding: 8px 0; border-bottom: 1px solid #eee; }
.log-date { color: #888; }
.log-desc { margin: 2px 0; }

/* 日期轴 */
.timeline-axis { position: relative; height: 40px; margin: 10px 0 4px; border-bottom: 2px solid #ccc; }
.timeline-axis .tick { position: absolute; top: 22px; transform: translateX(-50%); font-size: 10px; color: #666; white-space: nowrap; text-align: center; }
.timeline-axis .tick::before { content: ''; position: absolute; top: -10px; left: 50%; transform: translateX(-50%); width: 1px; height: 10px; background: #999; }
.timeline-axis .tick.today { color: #1a73e8; font-weight: 600; }
.timeline-axis .tick.today::before { background: #1a73e8; width: 2px; }
.timeline-axis .tick.today::after { content: '↑今日'; position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #1a73e8; font-weight: 600; white-space: nowrap; }

/* 双栏进度条 */
.bar-pair { margin: 6px 0; }
.bar-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; }
.bar-label { font-size: 11px; color: #666; white-space: nowrap; min-width: 80px; text-align: right; }
.bar-label .dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 4px; vertical-align: middle; }
.bar-label .dot-green { background: #43a047; }
.bar-label .dot-orange { background: #ff8f00; }
.bar-track { flex: 1; height: 20px; background: #e0e0e0; border-radius: 10px; position: relative; overflow: hidden; }
.bar-fill { position: absolute; top: 0; left: 0; height: 100%; border-radius: 10px; pointer-events: none; transition: width .3s ease; }
.bar-fill.green { background: linear-gradient(90deg, #388e3c, #66bb6a); }
.bar-fill.orange { background: linear-gradient(90deg, #e65100, #ff8f00); }
.bar-fill.red { background: linear-gradient(90deg, #c62828, #e53935); }
.bar-fill.blue { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.bar-pct { font-size: 11px; color: #666; min-width: 42px; text-align: left; font-weight: 600; }

/* 橘红色可拖动条 */
.orange-slider-wrap { flex: 1; height: 26px; position: relative; cursor: pointer; }
.orange-slider-track { width: 100%; height: 22px; background: #e0e0e0; border-radius: 11px; position: relative; }
.orange-slider-fill { position: absolute; top: 0; left: 0; height: 100%; background: linear-gradient(90deg, #e65100, #ff8f00); border-radius: 11px; pointer-events: none; transition: none; }
.orange-slider-thumb { width: 26px; height: 26px; background: #ff6d00; border-radius: 50%; position: absolute; top: 50%; transform: translate(-50%,-50%); cursor: grab; box-shadow: 0 1px 6px rgba(0,0,0,.3); z-index: 3; border: 2px solid #fff; }
.orange-slider-thumb:active { cursor: grabbing; box-shadow: 0 3px 10px rgba(0,0,0,.4); }
.orange-slider-marker { position: absolute; top: 0; width: 2px; height: 100%; background: #333; z-index: 2; pointer-events: none; }
.orange-slider-marker-label { position: absolute; top: -16px; transform: translateX(-50%); font-size: 9px; color: #333; white-space: nowrap; font-weight: 600; }

/* 原因列表 */
.reason-list { margin: 8px 0; }
.reason-item { padding: 8px 12px; border-left: 3px solid #e53935; background: #fff8f8; margin-bottom: 6px; border-radius: 0 6px 6px 0; font-size: 13px; }
.reason-item .reason-date { font-size: 11px; color: #888; }
.reason-item .reason-status { display: inline-block; padding: 1px 6px; border-radius: 4px; font-size: 11px; margin-right: 6px; }
.reason-item .reason-status.delay { background: #ffcdd2; color: #c62828; }
.reason-item .reason-status.early { background: #bbdefb; color: #1565c0; }
.reason-item .reason-status.normal { background: #c8e6c9; color: #2e7d32; }
.reason-item .reason-user { font-size: 11px; color: #555; }

/* 阶段状态切换标签 */
.phase-status-badge.badge-delay { background: #ffebee; color: #c62828; }
.phase-status-badge.badge-early { background: #e3f2fd; color: #1565c0; }
.phase-status-badge.badge-done { background: #e8f5e9; color: #2e7d32; }

/* 分级阶段详情行 */
.phase-row { display: flex; align-items: center; gap: 8px; padding: 5px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; flex-wrap: wrap; }
.phase-row:last-child { border-bottom: none; }
.phase-row-name { flex: 0 0 auto; min-width: 60px; font-weight: 500; color: #333; }
.phase-row-bar { flex: 1; min-width: 80px; height: 6px; background: #e8e8e8; border-radius: 3px; position: relative; overflow: visible; }
.phase-row-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
.phase-row-fill.ok { background: #4caf50; }
.phase-row-fill.delay { background: #ff5722; }
.phase-row-fill.early { background: #ff9800; }
.phase-row-fill.wait { background: #bdbdbd; }
.phase-row-expected { position: absolute; top: -2px; width: 2px; height: 10px; background: #333; border-radius: 1px; }
.phase-row-expected::after { content: '应到'; position: absolute; top: -14px; left: 50%; transform: translateX(-50%); font-size: 9px; color: #666; white-space: nowrap; }
.phase-row-status { font-size: 11px; padding: 1px 6px; border-radius: 4px; white-space: nowrap; }
.phase-row-status.waiting { background: #e0e0e0; color: #999; }
.phase-row-status.progress { background: #e3f2fd; color: #1976d2; }
.phase-row-status.delay { background: #ffebee; color: #d32f2f; }
.phase-row-status.early { background: #fff3e0; color: #e65100; }
.phase-row-status.done { background: #e8f5e9; color: #388e3c; }

/* 批示系统 */
.instruction-btn { padding: 2px 10px; font-size: 12px; border-radius: 4px; cursor: pointer; background: #fff; color: #7b1fa2; border: 1px solid #7b1fa2; }
.instruction-btn:hover { background: #f3e5f5; }
.instruction-list { max-height: 300px; overflow-y: auto; margin: 12px 0; }
.instruction-item { padding: 10px; border-left: 3px solid #7b1fa2; background: #f8f9ff; margin-bottom: 8px; border-radius: 0 6px 6px 0; }
.instruction-item .instructor { font-weight: 600; color: #7b1fa2; font-size: 13px; }
.instruction-item .instructor .role-tag { font-weight: 400; font-size: 11px; background: #7b1fa2; color: #fff; padding: 1px 6px; border-radius: 3px; margin-left: 4px; }
.instruction-item .instruct-time { font-size: 11px; color: #999; float: right; }
.instruction-item .instruct-content { margin-top: 6px; font-size: 14px; color: #333; line-height: 1.5; }
.instruction-textarea { width: 100%; min-height: 80px; border: 1px solid #ddd; border-radius: 6px; padding: 8px; font-size: 14px; resize: vertical; box-sizing: border-box; }
.instruction-badge { display: inline-block; background: #ff5722; color: #fff; font-size: 10px; padding: 1px 5px; border-radius: 8px; margin-left: 4px; }

/* 响应式 */
@media (max-width: 480px) {
    .auth-card { padding: 24px; }
    .form-row { flex-direction: column; gap: 8px; }
    .form-row .form-group { width: 100%; }
    .modal { padding: 16px; }
    .phase-actions { flex-direction: column; align-items: stretch; }
    .phase-actions button { width: 100%; }
    .phase-row { font-size: 12px; }
    .phase-row-name { min-width: 50px; }
}

/* ========= 资金模型新样式 ========= */

/* 工程卡片 */
.project-card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: pointer; transition: box-shadow .2s, transform .1s; }
.project-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); transform: translateY(-1px); }
.project-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.project-header strong { font-size: 16px; color: #222; }
.project-meta { font-size: 13px; color: #666; margin: 4px 0; line-height: 1.6; }

/* 进度条（新） */
.progress-bar-bg { height: 22px; background: #e8e8e8; border-radius: 11px; position: relative; overflow: hidden; margin: 4px 0; }
.progress-bar-bg.fund .progress-bar-fill { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.progress-bar-bg.time .progress-bar-fill { background: linear-gradient(90deg, #43a047, #66bb6a); }
.progress-bar-fill { height: 100%; border-radius: 11px; transition: width .5s ease; }
.progress-bar-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); font-size: 11px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.3); }

/* 徽章 */
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; font-weight: 500; }
.badge-工程方 { background: #e3f2fd; color: #1565c0; }
.badge-承包方 { background: #fff3e0; color: #e65100; }
.badge-分包方 { background: #f3e5f5; color: #7b1fa2; }
.badge-施工方 { background: #e8f5e9; color: #2e7d32; }

/* 空状态 */
.empty-state { text-align: center; padding: 60px 20px; color: #999; font-size: 15px; }

/* 区块标题 */
.section-title { font-size: 18px; font-weight: 600; color: #333; margin: 16px 0 12px; padding-left: 12px; border-left: 4px solid #1a73e8; }

/* 认领卡片 */
.claim-card { background: #fff; border-radius: 10px; padding: 12px 14px; margin-bottom: 8px; border: 1px dashed #1a73e8; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.claim-actions { display: flex; gap: 6px; }
.claim-info { font-size: 14px; color: #333; }
.claim-info strong { color: #1a73e8; }
.matched-badge { background: #e8f5e9; color: #2e7d32; padding: 2px 8px; border-radius: 12px; font-size: 12px; display: inline-block; margin-top: 4px; }

/* 提示文字 */
.hint { font-size: 13px; color: #888; margin-bottom: 12px; padding: 8px 10px; background: #f5f7fa; border-radius: 6px; border-left: 3px solid #1a73e8; }

/* 详情页 */
.proj-detail-header { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.proj-detail-header h2 { font-size: 20px; color: #222; }
.detail-info { background: #f5f7fa; border-radius: 8px; padding: 12px; font-size: 14px; color: #555; line-height: 1.8; margin-bottom: 12px; }
.detail-section-label { font-size: 15px; font-weight: 600; color: #333; margin: 16px 0 8px; padding-bottom: 4px; border-bottom: 2px solid #e0e0e0; }
.detail-section-label:first-of-type { margin-top: 8px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 8px; }

/* 标段卡片 */
.section-card { background: #f8f9fb; border-radius: 10px; padding: 14px; margin-bottom: 10px; border: 1px solid #e8e8e8; }
.section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.section-header strong { font-size: 15px; color: #333; }

/* 资金进度卡片 */
.progress-card { background: #fff; border-radius: 12px; padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 8px rgba(0,0,0,.06); cursor: pointer; }
.progress-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.1); }
.progress-card-title { font-size: 16px; margin-bottom: 10px; }
.progress-row { display: flex; align-items: center; gap: 8px; margin: 6px 0; flex-wrap: wrap; }
.progress-label { font-size: 13px; font-weight: 500; min-width: 36px; color: #555; }
.progress-value { font-size: 12px; color: #888; min-width: 140px; }
.sub-progress { margin: 6px 0 0 12px; padding-left: 12px; border-left: 2px solid #e0e0e0; }

/* 组织架构树 */
.org-tree { padding: 8px 0; }
.org-node { background: #fff; border-radius: 8px; padding: 10px 14px; margin-bottom: 6px; cursor: default; font-size: 14px; }
.org-node.org-project { background: #e3f2fd; cursor: pointer; border-left: 4px solid #1a73e8; }
.org-node.org-project:hover { background: #bbdefb; }
.org-node.org-section { background: #fff3e0; margin-left: 24px; border-left: 4px solid #fb8c00; }
.org-node.org-stat { background: #f5f7fa; margin-left: 48px; font-size: 12px; color: #666; border-left: 3px solid #90a4ae; }
.org-children { margin-top: 4px; }

/* 通用按钮变体 */
.btn-info { background: #00acc1; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-info:hover { background: #00838f; }
.btn-success { background: #43a047; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-success:hover { background: #2e7d32; }
.btn-warning { background: #ff8f00; color: #fff; border: none; padding: 6px 12px; border-radius: 6px; font-size: 12px; cursor: pointer; }
.btn-warning:hover { background: #e65100; }
.btn-primary-outline { background: transparent; color: #1a73e8; border: 2px solid #1a73e8; border-radius: 8px; font-size: 13px; cursor: pointer; padding: 8px 14px; }
.btn-primary-outline:hover { background: #f0f4ff; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0; }
.table th, .table td { padding: 8px 10px; text-align: left; border-bottom: 1px solid #eee; }
.table th { background: #f5f7fa; color: #555; font-weight: 600; }
.table-sm { font-size: 12px; }
.table-sm th, .table-sm td { padding: 4px 8px; }

/* 弹窗内容区 */
.modal-content { background: #fff; border-radius: 16px; padding: 24px; width: 100%; max-width: 720px; position: relative; margin: 20px auto; }
.modal-body { max-height: 80vh; overflow-y: auto; }
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.5); z-index: 1000; overflow-y: auto; padding: 20px 16px; }

/* ========= Gantt 时间轴 ========= */
.gantt-wrap { border: 1px solid #e0e0e0; border-radius: 8px; overflow: hidden; background: #fff; font-size: 12px; }
.gantt-header { display: flex; background: #f5f7fa; border-bottom: 1px solid #e0e0e0; }
.gantt-label-hd { flex: 0 0 140px; padding: 8px 10px; font-weight: 600; font-size: 12px; color: #555; border-right: 1px solid #e0e0e0; }
.gantt-axis { flex: 1; position: relative; height: 36px; overflow: hidden; }
.gantt-month { position: absolute; top: 0; height: 100%; text-align: center; font-size: 11px; color: #666; padding-top: 10px; border-left: 1px solid #e0e0e0; }
.gantt-month:first-child { border-left: none; }
.gantt-row { display: flex; border-bottom: 1px solid #f0f0f0; }
.gantt-row:last-child { border-bottom: none; }
.gantt-label { flex: 0 0 140px; padding: 10px 10px; font-size: 12px; color: #333; border-right: 1px solid #e0e0e0; background: #fafafa; line-height: 1.4; display: flex; flex-direction: column; justify-content: center; }
.gantt-unit { font-size: 11px; color: #999; }
.gantt-track { flex: 1; position: relative; min-height: 52px; overflow: visible; padding: 2px 0; }
.gantt-bar { position: absolute; top: 12px; height: 22px; border-radius: 4px; background: #e0e0e0; z-index: 1; min-width: 2px; }
.gantt-bar-total { background: #e8f0e8; border: 1px solid #c8dcc8; }
.gantt-fill { position: absolute; top: 12px; height: 22px; border-radius: 4px; background: linear-gradient(90deg, #43a047, #66bb6a); z-index: 2; transition: width .5s ease; min-width: 2px; }
.gantt-fill-money { background: linear-gradient(90deg, #1565c0, #42a5f5); }
.gantt-marker { position: absolute; top: 8px; width: 2px; height: 30px; background: #d32f2f; z-index: 4; border-radius: 1px; }
.gantt-marker::before { content: '●'; position: absolute; top: -8px; left: 50%; transform: translateX(-50%); font-size: 10px; color: #d32f2f; }
.gantt-pct { position: absolute; top: 50%; transform: translate(-50%,-50%); font-size: 11px; font-weight: 600; color: #333; z-index: 3; white-space: nowrap; }
.gantt-date-label { position: absolute; bottom: 2px; font-size: 9px; color: #999; transform: translateX(-50%); white-space: nowrap; }

/* 移动端时间轴适配 */
@media (max-width: 600px) {
    .gantt-label, .gantt-label-hd { flex-basis: 90px; font-size: 11px; padding: 6px 6px; }
    .gantt-track { min-height: 52px; }
    .gantt-marker { top: 5px; height: 36px; }
    .gantt-date-label { display: none; }
    .gantt-pct { font-size: 10px; }
}

/* 时间轴总览 */
.timeline-project { margin-bottom: 20px; border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; background: #fff; }
.timeline-project .gantt-wrap { border: none; border-radius: 0; }

/* ========= 智慧工地 · 套壳首页 ========= */
* { -webkit-tap-highlight-color: transparent; }
#page-home { background: #eef2f8; min-height: 100vh; padding-bottom: 70px; }
.home-header { position: relative; padding: calc(env(safe-area-inset-top) + 16px) 18px 64px; background: linear-gradient(150deg,#0c2a6b 0%,#13469e 55%,#1f6fd6 100%); color: #fff; overflow: hidden; }
.home-header::before { content:''; position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.06) 1px,transparent 1px); background-size:26px 26px; mask-image:linear-gradient(180deg,#000 0%,transparent 75%); -webkit-mask-image:linear-gradient(180deg,#000 0%,transparent 75%); }
.home-header::after { content:''; position:absolute; right:-50px; top:-60px; width:200px; height:200px; border-radius:50%; background:radial-gradient(circle,rgba(0,212,255,.5),transparent 70%); filter:blur(8px); }
.home-top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.home-loc { display: flex; align-items: center; gap: 5px; font-size: 13.5px; font-weight: 600; }
.home-loc svg { width: 15px; height: 15px; fill: #00d4ff; stroke: none; }
.home-actions { display: flex; gap: 6px; }
.home-icbtn { position: relative; width: 36px; height: 36px; border: none; border-radius: 12px; background: rgba(255,255,255,.14); color: #fff; display: grid; place-items: center; }
.home-icbtn svg { width: 19px; height: 19px; fill: #fff; stroke: none; }
.home-icbtn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: #ff5a5a; border: 1.5px solid #13469e; }
.home-title { position: relative; margin-top: 16px; }
.home-title h1 { font-size: 25px; font-weight: 800; letter-spacing: 2px; display: flex; align-items: baseline; gap: 10px; }
.home-title h1 small { font-size: 11px; font-weight: 600; letter-spacing: 3px; color: #00d4ff; }
.home-title p { margin-top: 5px; font-size: 12.5px; color: rgba(255,255,255,.82); letter-spacing: 2px; }
.home-chips { position: relative; margin-top: 13px; display: flex; flex-wrap: wrap; gap: 7px; }
.home-chip { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 5px 10px; border-radius: 20px; background: rgba(255,255,255,.14); color: rgba(255,255,255,.92); }
.home-chip.air { background: rgba(20,201,151,.22); color: #9ff0d6; }
.home-chip.air i { width: 6px; height: 6px; border-radius: 50%; background: #14c997; box-shadow: 0 0 6px #14c997; }

.home-overview { position: relative; z-index: 2; margin: -50px 14px 0; background: #fff; border-radius: 18px; box-shadow: 0 10px 26px rgba(20,40,90,.10); display: grid; grid-template-columns: 1fr 1fr; }
.home-stat { position: relative; display: flex; align-items: center; gap: 10px; padding: 14px 13px; }
.home-stat:nth-child(1),.home-stat:nth-child(2) { border-bottom: 1px solid #eceff4; }
.home-stat:nth-child(1),.home-stat:nth-child(3) { border-right: 1px solid #eceff4; }
.home-stat-ic { width: 38px; height: 38px; border-radius: 11px; flex: none; display: grid; place-items: center; background: color-mix(in srgb,var(--c) 14%,#fff); }
.home-stat-ic svg { width: 21px; height: 21px; fill: var(--c); stroke: none; }
.home-stat-info b { font-size: 19px; font-weight: 800; color: #162033; }
.home-stat-info span { font-size: 11.5px; color: #7b8699; display: block; margin-top: 2px; }

.home-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px 14px 8px; }
.hc-card { position: relative; background: #fff; border-radius: 18px; padding: 15px 14px 14px; box-shadow: 0 10px 24px rgba(20,40,90,.08); overflow: hidden; cursor: pointer; transition: transform .15s, box-shadow .15s; animation: rise .45s both; }
.hc-card:active { transform: scale(.97); }
@keyframes rise { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:none} }
.hc-bg { position: absolute; right: -18px; top: -18px; width: 70px; height: 70px; border-radius: 50%; background: color-mix(in srgb,var(--c) 12%,#fff); opacity: .7; }
.hc-top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.hc-ic { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg,var(--c),color-mix(in srgb,var(--c) 60%,#000)); box-shadow: 0 6px 14px color-mix(in srgb,var(--c) 40%,transparent); }
.hc-ic svg { width: 22px; height: 22px; stroke: #fff; stroke-width: 1.9; fill: none; }
.hc-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: color-mix(in srgb,var(--c) 12%,#fff); color: var(--c); }
.hc-name { position: relative; margin-top: 13px; font-size: 15px; font-weight: 700; color: #162033; }
.hc-sub { position: relative; margin-top: 3px; font-size: 11.5px; color: #7b8699; }
/* 已接入真实功能：亮色描边 + 右下绿点 */
.hc-card.hc-lead { outline: 2px solid var(--c); outline-offset: -2px; }
.hc-card.hc-live::after { content: ''; position: absolute; right: 12px; bottom: 12px; width: 7px; height: 7px; border-radius: 50%; background: #14c997; box-shadow: 0 0 0 3px rgba(20,201,151,.18); }
/* 规划中模块：置灰弱化，避免误导 */
.hc-card.hc-off { opacity: .58; filter: saturate(.5); }
.hc-card.hc-off .hc-tag { background: #f0f1f4; color: #aab; }
.hc-card.hc-off .hc-name { color: #8995a5; }

.shell-tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 440px; z-index: 50; display: flex; background: rgba(255,255,255,.96); backdrop-filter: blur(10px); border-top: 1px solid #eceff4; padding: 7px 0 calc(env(safe-area-inset-bottom) + 7px); display: none; }
.shell-tab { flex: 1; border: none; background: none; display: flex; flex-direction: column; align-items: center; gap: 3px; color: #aeb6c4; }
.shell-tab svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.shell-tab span { font-size: 11px; font-weight: 600; }
.shell-tab.active { color: #2b6cff; }
.shell-tab.active svg { fill: color-mix(in srgb,#2b6cff 16%,transparent); }

/* 出入库管理页 */
#page-inventory { background: #eef2f8; min-height: 100vh; padding-bottom: 20px; }
.inv-head { background: linear-gradient(150deg,#9c27b0,#6a1b9a); color: #fff; padding: calc(env(safe-area-inset-top) + 14px) 16px 14px; display: flex; align-items: center; gap: 12px; }
.inv-back { background: rgba(255,255,255,.2); border: none; color: #fff; width: 32px; height: 32px; border-radius: 8px; font-size: 18px; }
.inv-head h2 { font-size: 18px; font-weight: 700; }
.inv-tabs { display: flex; background: #fff; border-bottom: 1px solid #eceff4; position: sticky; top: 0; z-index: 10; }
.inv-tab { flex: 1; padding: 12px 4px; border: none; background: #fff; font-size: 13.5px; color: #7b8699; border-bottom: 2px solid transparent; font-weight: 600; }
.inv-tab.active { color: #9c27b0; border-bottom-color: #9c27b0; }
.inv-body { padding: 14px; max-width: 920px; margin: 0 auto; }
.inv-summary-top { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 12px; }
.inv-stat { background: #fff; border-radius: 12px; padding: 12px 8px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.inv-stat b { display: block; font-size: 22px; font-weight: 800; color: #9c27b0; }
.inv-stat span { font-size: 11px; color: #7b8699; }
.inv-table th { white-space: nowrap; }
.inv-table td b { color: #2b6cff; }
.inv-table tr.zero td b { color: #ff4d4f; }
.inv-total { margin-top: 12px; text-align: right; font-size: 15px; font-weight: 700; color: #2e7d32; }
.inv-form { background: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.inv-form h3 { font-size: 17px; color: #9c27b0; margin-bottom: 12px; }
.inv-form label { display: block; font-size: 13px; color: #666; margin: 10px 0 4px; font-weight: 500; }
.inv-form input { width: 100%; padding: 11px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 15px; outline: none; box-sizing: border-box; }
.inv-form input:focus { border-color: #9c27b0; }
.inv-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inv-badge { padding: 2px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; }
.inv-badge.in { background: #e8f5e9; color: #2e7d32; }
.inv-badge.out { background: #fff3e0; color: #e65100; }
.loading { text-align: center; padding: 40px; color: #888; }

#page-placeholder, #page-attend, #page-me { background: #eef2f8; min-height: 100vh; padding: calc(env(safe-area-inset-top) + 16px) 16px; }
.ph-box, .attend-box, .me-box { background: #fff; border-radius: 16px; padding: 30px 20px; text-align: center; margin-top: 20px; box-shadow: 0 4px 14px rgba(0,0,0,.05); }
.ph-box h3 { font-size: 20px; color: #2b6cff; margin-bottom: 8px; }
.me-row { display: flex; flex-direction: column; gap: 2px; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.me-row b { font-size: 18px; color: #333; }
.me-row span { font-size: 13px; color: #888; }