.app-shell .wd-ledger-dashboard {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 16px;
}
.app-shell .wd-ledger-app .wd-ledger-panel.wd-ledger-dashboard { flex: 0 0 auto; min-height: 0; }
.wd-ledger-dashboard > .wd-ledger-todos { grid-column: 1 / -1; }
.wd-ledger-dashboard > .wd-ledger-kpis { order: -1; }
.wd-ledger-dashboard > .wd-ledger-kpis,
.wd-ledger-dashboard > .wd-ledger-distributions,
.wd-ledger-dashboard > .wd-ledger-note { grid-column: 1 / -1; }
.wd-ledger-distributions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.wd-ledger-distributions > .wd-ledger-split { display: contents; }

.wd-ledger-dashboard .wd-todo-list{grid-template-columns:repeat(2,minmax(0,1fr));max-height:none;overflow:visible;scrollbar-gutter:auto;align-items:stretch;margin-top:2px}
.wd-ledger-dashboard .wd-todo-list>.wd-ledger-empty{grid-column:1/-1}
.wd-ledger-dashboard>.wd-ledger-block,.wd-ledger-dashboard .wd-ledger-distributions .wd-ledger-block{padding:14px;border:1px solid var(--wd-line);border-radius:12px;background:var(--wd-surface)}
.wd-ledger-dashboard .wd-ledger-empty{padding:12px 0;text-align:left}
.wd-ledger-dashboard .wd-ledger-note{margin:0}
.wd-ledger-dashboard .wd-ledger-timeline li{display:grid;grid-template-columns:1fr;gap:4px}
.wd-ledger-dashboard>.wd-ledger-block:not(.wd-ledger-todos){grid-column:1/-1}
.wd-ledger-dashboard .wd-ledger-timeline{grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}
@media(min-width:1800px){.wd-ledger-dashboard .wd-todo-list{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.wd-ledger-dashboard .wd-todo-list,.wd-ledger-dashboard .wd-ledger-timeline{grid-template-columns:1fr}}

/* 登记表单按内容展开，避免视口定高挤压填写区。 */
.app-shell .wd-ledger-registration-page { height:auto; min-height:0; overflow:visible; }
.app-shell .wd-ledger-registration-page .wd-ledger-panel.wd-daily { flex:0 0 auto; height:auto; overflow:visible; }
.app-shell .wd-ledger-registration-page .wd-daily-body { flex:none; grid-template-columns:minmax(220px,300px) minmax(0,1fr); grid-template-rows:auto; align-items:start; overflow:visible; }
.app-shell .wd-ledger-registration-page .wd-daily-list { align-self:start; max-height:min(640px,70dvh); }
.app-shell .wd-ledger-registration-page .wd-daily-form { height:auto; align-self:start; overflow:visible; }
.app-shell .wd-ledger-registration-page .wd-content-registration { flex:none; height:auto; overflow:visible; }
.app-shell .wd-ledger-registration-page .wd-content-layout { flex:none; grid-template-columns:160px minmax(0,1fr); grid-template-rows:auto; align-items:start; overflow:visible; }
.app-shell .wd-ledger-registration-page .wd-content-fields { height:auto; overflow:visible; gap:14px; }
.app-shell .wd-ledger-registration-page .wd-content-rail { align-self:start; max-height:600px; }
.app-shell .wd-ledger-registration-page .wd-daily-editor { flex:none; overflow:visible; }
.wd-content-metrics { padding:12px 0; border-top:1px solid var(--wd-line); }
.wd-content-metrics h3 { margin:0 0 6px; font-size:14px; }
.wd-content-metrics > p { margin:0; font-size:12px; }
.app-shell .wd-ledger-registration-page .wd-content-footer { display:flex; flex-wrap:wrap; align-items:center; gap:12px; }
.app-shell .wd-ledger-registration-page .wd-content-footer .wd-device-return-row { flex:1 1 280px; margin:0; gap:8px; }
.app-shell .wd-ledger-registration-page .wd-content-footer > button[data-wd-action] { margin-left:auto; }
@media(max-width:900px) {
 .app-shell .wd-ledger-registration-page .wd-daily-body { grid-template-columns:minmax(0,1fr); }
 .app-shell .wd-ledger-registration-page .wd-daily-list { max-height:240px; }
}
@media(max-width:540px) {
 .app-shell .wd-ledger-registration-page .wd-content-layout { grid-template-columns:minmax(0,1fr); }
 .app-shell .wd-ledger-registration-page .wd-content-rail { max-height:260px; border-right:0; padding-right:0; }
 .app-shell .wd-ledger-registration-page .wd-content-rail-items { display:flex; max-height:150px; overflow:auto; }
 .app-shell .wd-ledger-registration-page .wd-content-slot-wrap { flex:0 0 140px; }
}
