/* Xinglian paper-white ledger; existing calendar and knowledge layouts keep their scope. */
body.ledger-active { background:#f6f5ef; color:#24382f; color-scheme:light; }
.ledger-active .sidebar { background:#f6f5ef; }
.ledger-active .sidebar nav a.active { background:#e9eae1; color:#24382f; }
.ledger-active h1, .ledger-active h2, .ledger-active h3, #ledger-dialog h2 { font-family:system-ui,"Microsoft YaHei",sans-serif; font-weight:500; }
.ledger-active #page-title { font-size:28px; }
.ledger-active .primary, #ledger-dialog .primary { background:#274638; border-color:#274638; color:#fffefb; }
.ledger-active button, #ledger-dialog button { border-radius:8px; min-height:40px; white-space:normal; }
.ledger-active .muted, #ledger-dialog .muted { color:#697169; }
.ledger-toolbar { display:flex; gap:16px; align-items:end; flex-wrap:wrap; margin-bottom:28px; }
.ledger-toolbar label { margin:0; font-weight:400; }
.ledger-toolbar input { width:auto; min-width:145px; }
.ledger-tabs { display:flex; gap:4px; flex-wrap:wrap; }
.ledger-tabs button { border:0; background:transparent; color:#697169; }
.ledger-tabs button[aria-pressed=true] { background:#e9eae1; color:#24382f; }
.ledger-layout { display:grid; grid-template-columns:minmax(0,1fr) 310px; gap:40px; }
.ledger-summary { padding:0 0 26px; border-bottom:1px solid #dddfd6; }
.ledger-amount { font-size:36px; font-weight:400; font-variant-numeric:tabular-nums; letter-spacing:-1px; margin:8px 0; }
.ledger-metrics { display:flex; gap:28px; flex-wrap:wrap; margin-top:16px; font-size:13px; }
.ledger-metrics span { display:block; margin-bottom:5px; color:#697169; }
.ledger-list { margin-top:24px; }
.ledger-entry { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; width:100%; padding:16px 8px; border:0; border-bottom:1px solid #dddfd6; border-radius:0!important; background:transparent; text-align:left; justify-content:stretch; }
.ledger-entry:hover { background:#eeeee6; }
.ledger-entry strong { display:block; font-weight:500; overflow-wrap:anywhere; }
.ledger-entry small { display:block; color:#697169; font-size:12px; }
.ledger-entry .ledger-money { text-align:right; font-variant-numeric:tabular-nums; }
.ledger-aside { border-left:1px solid #dddfd6; padding-left:28px; }
.ledger-aside h2 { font-size:17px; margin:0 0 14px; }
.ledger-aside p { font-size:14px; line-height:1.8; }
.ledger-category { margin:18px 0; }
.ledger-category summary { cursor:pointer; display:grid; grid-template-columns:1fr auto; font-size:13px; gap:8px 10px; }
.ledger-category meter { grid-column:1/-1; width:100%; height:7px; display:block; accent-color:#69846d; }
.ledger-category li { font-size:12px; margin:6px 0; }
.ledger-coverage { border-top:1px solid #dddfd6; padding-top:16px; margin-top:22px; font-size:12px!important; }
.ledger-empty { padding:42px 0; color:#697169; text-align:center; }
.ledger-source { padding:18px 0; border-bottom:1px solid #dddfd6; }
.ledger-source strong { font-weight:500; }
.ledger-source p { font-size:12px; margin:6px 0; color:#697169; }
#ledger-dialog { width:min(650px,calc(100% - 28px)); max-height:90dvh; padding:26px; border:1px solid #dddfd6; border-radius:12px; color:#24382f; background:#fffefb; box-shadow:0 12px 40px #24382f18; }
#ledger-dialog::backdrop { background:#24382f24; }
.ledger-dialog-head { display:flex; justify-content:space-between; align-items:center; gap:16px; }
.ledger-dialog-head h2 { font-size:22px; margin:0; }
#ledger-dialog .ledger-close { border:0; background:transparent; padding:6px; min-width:44px; }
#ledger-dialog form { margin-top:16px; }
#ledger-dialog label { font-weight:400; }
#ledger-dialog input, #ledger-dialog select, #ledger-dialog textarea { background:#fffefb; font-size:16px; }
.ledger-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:0 16px; }
.ledger-form-grid>* { min-width:0; }
.ledger-wide { grid-column:1/-1; }
.ledger-controls { display:flex; justify-content:flex-end; gap:10px; flex-wrap:wrap; margin-top:24px; }
.ledger-slip { padding:22px 0 8px; }
.ledger-slip dl { display:grid; grid-template-columns:95px minmax(0,1fr); gap:12px; font-size:14px; }
.ledger-slip dt { color:#697169; }.ledger-slip dd { margin:0; overflow-wrap:anywhere; }
.ledger-reason { background:#faf7ef; border-radius:7px; padding:12px; font-size:13px; color:#6d633a; }
.ledger-table { width:100%; border-collapse:collapse; margin-top:18px; font-size:13px; }
.ledger-table th, .ledger-table td { text-align:left; border-bottom:1px solid #dddfd6; padding:10px 7px; overflow-wrap:anywhere; }
.ledger-table th { font-weight:500; color:#697169; }
.ledger-table td small { display:block; color:#697169; }
.ledger-confirmation { white-space:pre-wrap; font-size:14px; line-height:1.8; padding:14px 0; }
.ledger-stage { padding:16px 0; color:#697169; }
.ledger-error { color:#a33f32; font-size:13px; white-space:pre-wrap; }
@media(max-width:1000px) { .ledger-layout { grid-template-columns:1fr; gap:28px; }.ledger-aside { border-left:0; border-top:1px solid #dddfd6; padding:24px 0; } }
@media(max-width:600px) { .ledger-active .sidebar nav { grid-template-columns:repeat(5,minmax(0,1fr)); }.ledger-active .sidebar nav a, .ledger-active .mobile-tools { padding:8px 2px; font-size:11px; min-width:0; }.ledger-active button, #ledger-dialog button { min-height:44px; }.ledger-active .page-header { flex-wrap:wrap; }.ledger-toolbar { gap:12px; }.ledger-form-grid { grid-template-columns:1fr; }#ledger-dialog { padding:18px; }.ledger-table th:first-child,.ledger-table td:first-child { display:none; }.ledger-metrics { gap:18px; }.ledger-active #page-title { font-size:26px; } }
@media(prefers-reduced-motion:no-preference) { .ledger-slip { animation:ledger-open .24s ease-out; } @keyframes ledger-open { from { transform:translateY(8px); opacity:.5; } to { transform:none; opacity:1; } } }
