@charset "UTF-8";

/* Shared desktop finance UI. Accounting and status colors stay independent. */
:root {
  --bg: #f3f5f8;
  --surface: #fff;
  --ink: #202b3d;
  --muted: #69788c;
  --text: #202b3d;
  --secondary: #69788c;
  --border: #e2e7ef;
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-light: #edf5ff;
  --green: var(--primary);
  --green-dark: var(--primary-dark);
  --green-light: var(--primary-light);
  --red: #cf3636;
  --orange: #ad6800;
  --radius: 6px;
  --shadow: none;
  --sidebar-width: 224px;
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 14px;
  color: var(--ink);
  background: var(--bg);
}
body { line-height: 1.5; }
body:has(dialog[open]) { overflow: hidden; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid #69aaff; outline-offset: 3px; }
button:disabled { opacity: .45; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.sidebar {
  width: var(--sidebar-width); padding: 20px 12px 14px; background: #16243a;
  color: #c2cdde; border: 0; overflow: hidden; scrollbar-color: #40526d transparent; scrollbar-width: thin;
}
.sidebar > .brand, .sidebar > .sidebar-search { flex-shrink: 0; }
.sidebar .brand { color: #fff; padding: 0 8px; gap: 10px; font-size: 23px; letter-spacing: .8px; justify-content: flex-start; }
.sidebar .brand > div { display: block; }
.sidebar .brand small { color: #aabbd3; font-size: 12px; letter-spacing: 1px; margin-top: 1px; font-weight: 400; }
.sidebar .brand-mark { width: 35px; height: 39px; background: #1677ff; border-radius: 6px; font-size: 26px; }
.brand-mark span { background: #b9d8ff; }
.sidebar .workspace { display: none; }
.sidebar-search { display: flex; align-items: center; position: relative; margin: 23px 0 18px; color: #9aacC5; }
.sidebar-search > span { position: absolute; left: 11px; pointer-events: none; display: flex; }
.sidebar-search svg { width: 16px; height: 16px; }
.sidebar-search input { width: 100%; height: 34px; border: 1px solid #36455c; background: #1d2e47; color: #fff; border-radius: 5px; padding: 6px 29px 6px 34px; font-size: 13px; }
.sidebar-search input::placeholder { color: #a3b2c7; }
.sidebar-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
#menu-search-clear { position: absolute; right: 4px; width: 27px; height: 28px; border: 0; background: transparent; color: #c2cdde; font-size: 21px; }
#primary-navigation { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; margin-right: -6px; padding-right: 6px; }
.sidebar .nav-caption { display: block; padding: 0 12px; font-size: 12px; color: #8fa2bd; letter-spacing: 0; margin: 0 0 8px; }
.sidebar .later-caption { margin-top: 22px; }
.sidebar .nav-item { min-height: 42px; padding: 10px 12px; margin: 2px 0; gap: 10px; border-radius: 5px; justify-content: flex-start; color: #c8d3e3; font-size: 14px; font-weight: 400; text-align: left; }
.sidebar .nav-item > span:first-child { display: inline-flex; }
.sidebar .nav-item > span:last-child { display: inline-flex; }
.sidebar .nav-item svg { width: 18px; height: 18px; }
.sidebar .nav-item:hover, .sidebar .nav-group summary:hover, .sidebar .nav-subitem:hover { background: #253953; color: #fff; }
.sidebar .nav-item.active { background: #1677ff; color: white; font-weight: 600; }
.sidebar .nav-count { background: #ffffff16; color: #d7e6fa; font-size: 11px; padding: 0 6px; border-radius: 4px; }
.sidebar .nav-group { margin: 2px 0; }
.sidebar .nav-group summary { color: #c8d3e3; font-size: 14px; font-weight: 400; padding: 10px 12px; margin: 0; border-radius: 5px; }
.sidebar .nav-group[open] > summary { color: #fff; }
.sidebar .nav-children { margin: 3px 0 6px 20px; padding-left: 10px; gap: 2px; border-left: 1px solid #3a4a62; }
.sidebar .nav-subitem, .sidebar .nav-group .nav-subitem { font-size: 13px; color: #aebfd5; padding: 8px 10px; min-height: 36px; flex-direction: row; text-align: left; border-radius: 4px; gap: 7px; }
.sidebar .nav-subitem.active { color: #fff; background: #28496f; }
.sidebar .subnav-count { display: inline-block; background: #34445c; color: #cad9eb; font-size: 11px; }
.sidebar .nav-subitem.active .subnav-count { background: #37628f; color: white; }
.sidebar .receivable-dot { position: static; width: 7px; height: 7px; box-shadow: none; background: #ff6565; }
.sidebar .sidebar-bottom { display: flex; border-top: 1px solid #344258; color: #8ea2bf; margin-top: 24px; padding: 15px 10px 0; font-size: 12px; }
.sidebar-bottom span { font-size: 11px; }
.menu-search-results { flex: 1; min-height: 0; overflow-y: auto; scrollbar-width: thin; }
.menu-search-result { display: flex; flex-direction: column; align-items: flex-start; width: 100%; border: 0; border-radius: 5px; background: transparent; color: #e5edfa; text-align: left; padding: 10px 12px; gap: 4px; }
.menu-search-result:hover { background: #28496f; }
.menu-search-result strong { font-size: 14px; font-weight: 500; }
.menu-search-result small, .menu-search-empty { color: #9bb0cc; font-size: 12px; }
.menu-search-empty { padding: 12px; }
.main-shell { margin-left: var(--sidebar-width); width: calc(100% - var(--sidebar-width)); }
body.sidebar-collapsed .main-shell { margin-left: 0; width: 100%; }
html[data-sidebar-collapsed="1"] .sidebar { display: none; }
html[data-sidebar-collapsed="1"] .main-shell { margin-left: 0; width: 100%; }
.topbar { height: 56px; padding: 0 24px; background: #fff; gap: 15px; }
.topbar-leading { display: flex; align-items: center; gap: 21px; min-width: 0; }
.sidebar-toggle { display: inline-flex; align-items: center; gap: 7px; flex-shrink: 0; color: #56667b; padding: 6px 0; background: transparent; border: 0; font-size: 12px; }
.sidebar-toggle:hover { color: var(--primary); }
.sidebar-toggle svg { width: 19px; height: 19px; }
.breadcrumb { color: #78869b; font-size: 13px; white-space: nowrap; }
.breadcrumb span { margin: 0 10px; color: #bec7d5; }
.breadcrumb strong { font-weight: 500; color: #36465d; }
.top-actions { gap: 14px; }
.connection { font-size: 12px; color: #718198; }
.connection i { width: 6px; height: 6px; background: #35a76e; }
.user-button { font-size: 13px; color: #4d5e75; }
.avatar { background: #edf3fc; color: #356095; border-radius: 5px; }
main { padding: 22px 24px 18px; max-width: 1920px; }
.page-heading, #daily-page .page-heading { margin-bottom: 18px; gap: 16px; align-items: center; }
h1, .page-heading h1 { font-size: 23px; letter-spacing: 0; line-height: 1.4; color: #1d2b40; font-weight: 600; }
.eyebrow:empty { display: none; }
.eyebrow { color: #687c95; font-size: 12px; letter-spacing: 0; margin-bottom: 5px; }
.page-heading p { color: #748197; font-size: 13px; line-height: 1.6; margin: 5px 0 0; }
.heading-actions { margin-top: 0; gap: 8px; flex-wrap: wrap; flex-direction: row; }
.button, .heading-actions .button { min-height: 34px; border-radius: 5px; font-size: 13px; padding: 7px 14px; font-weight: 400; gap: 7px; box-shadow: none; }
.button.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.button.secondary { color: #41516a; border-color: #ccd5e1; background: #fff; }
.button.secondary:hover { color: var(--primary); border-color: #6ca9ff; background: #f8fbff; }
.button.danger { color: #c63535; border-color: #f2cccc; background: #fff5f5; }
.button.small { min-height: 32px; padding: 5px 11px; }
.text-button, .row-action { color: var(--primary); font-size: 13px; }
.text-button:hover, .row-action:hover { color: var(--primary-dark); text-decoration: underline; }
.row-action.dim { color: #748299; }
.icon-text { font-size: 13px; color: #5a6c85; min-height: 28px; }
.icon-text:hover { color: var(--primary); }
input, select, textarea { border-color: #ced7e3; color: #2e3d53; border-radius: 5px; padding: 7px 10px; font-size: 14px; }
input::placeholder, textarea::placeholder { color: #98a4b5; }
input:focus, select:focus, textarea:focus { border-color: #4096ff; box-shadow: 0 0 0 2px #1677ff18; }
input[type=checkbox] { accent-color: var(--primary); }
.filters { padding: 15px 16px; gap: 9px; }
.filters input, .filters select { height: 35px; font-size: 13px; }
.filters .search-field { min-width: 170px; }
.filters select { max-width: 170px; }
.date-range input { width: 130px; font-size: 13px; }
.date-range span { font-size: 12px; color: #79879b; }
.search-field svg { top: 10px; color: #8290a5; }
.reset-button { color: #65768d; width: 33px; height: 33px; border: 1px solid #d3dce8; border-radius: 5px; background: #fff; }
.ledger-panel { border-radius: 6px; box-shadow: none; }
.panel-heading { min-height: 52px; padding: 12px 16px; gap: 12px; }
.panel-heading h2 { margin: 0; font-size: 15px; font-weight: 600; color: #273951; }
.panel-heading h2 > span { margin-left: 6px; color: #71839e; font-size: 13px; font-weight: 400; }
.ledger-title { font-size: 15px; color: #273951; margin: 0; gap: 9px; }
.ledger-title > span:last-child { background: #eef3fa; color: #637a96; font-size: 12px; font-weight: 400; }
.panel-tools { gap: 17px; padding: 0; flex-wrap: wrap; }
.panel-tab { font-size: 13px; }
.table-context { padding: 11px 16px; font-size: 12px; color: #78879b; }
.ledger-table { font-size: 13px; }
#trs-page .trs-table { min-width: 960px; }
.ledger-table th { background: #f4f6fa; color: #52647d; font-size: 13px; font-weight: 500; padding: 11px 14px; border-color: #e6ebf2; }
.ledger-table td { color: #3d4e66; height: 54px; padding: 11px 14px; border-color: #edf0f5; text-align: left; }
.ledger-table th:first-child, .ledger-table td:first-child { padding-left: 16px; }
.ledger-table tbody tr:hover { background: #f5f9ff; }
.ledger-table td strong { color: #263d5a; font-size: 13px; font-weight: 500; }
.ledger-table td small { color: #7b8ba1; font-size: 12px; margin-top: 3px; }
.ledger-table tfoot td { background: #f4f7fc; }
:is(#funding-page, #trs-page, #wealth-page) .ledger-table :is(th,td):last-child:not([colspan]) { position: sticky; right: 0; z-index: 1; background: #fff; box-shadow: -4px 0 6px #17365408; }
:is(#funding-page, #trs-page, #wealth-page) .ledger-table th:last-child { background: #f4f6fa; }
.money { font-size: 14px!important; font-weight: 600!important; letter-spacing: 0; font-variant-numeric: tabular-nums; }
.money.income { color: #208357!important; }
.money.expense { color: #aa5e28!important; }
.ledger-table .receivable-money { color: #b46a00!important; }
.business-tag { background: #eff3f9; color: #596c87; font-size: 12px; }
.badge { font-size: 12px; border-radius: 4px; padding: 3px 7px; }
.badge.green-badge { background: #edf8f1; color: #248255; }
.badge.amber-badge { background: #fff7e6; color: #ad6800; }
.badge.gray-badge { background: #f0f2f6; color: #718198; }
.badge.blue-badge { background: #edf5ff; color: #2866ae; }
.badge.red-badge { background: #fff0f0; color: #c44444; }
.memo-cell { max-width: 230px; color: #62758f!important; font-size: 13px; }
.row-actions { gap: 13px; }
.table-footer { padding: 13px 16px; font-size: 13px; color: #76859a; gap: 10px; }
.pagination { font-size: 13px; gap: 8px; }
.pagination select { font-size: 13px; min-height: 32px; border-color: #d2dbe7; }
.pagination button { height: 32px; width: 32px; color: #536982; border-color: #d2dbe7; border-radius: 4px; }
.pagination > span { color: #576c87; }
.empty-state { height: 160px!important; color: #7688a0!important; }
.empty-state p { font-size: 13px; }
.page-footer { padding: 20px 0 0; font-size: 12px; color: #8a98ac; letter-spacing: 0; gap: 12px; }
dialog { color: var(--ink); box-shadow: 0 12px 60px #152a4930; }
dialog::backdrop { background: #12243b66; backdrop-filter: none; }
.drawer { width: 640px; border-radius: 0; }
.modal { width: 540px; border-radius: 8px; }
.modal.large { width: 1000px; }
.dialog-head { padding: 19px 24px 17px; align-items: center; }
.dialog-head h2 { font-size: 19px; color: #223650; margin-bottom: 5px; }
.dialog-head p { font-size: 13px; color: #718199; }
.close-button { border-radius: 4px; background: transparent; color: #718199; width: 32px; height: 32px; font-size: 23px; }
.close-button:hover { background: #edf2f8; color: #263e5e; }
.dialog-body { padding: 22px 24px; }
.dialog-foot { padding: 14px 24px; background: #fff; border-top-color: #e4eaf2; gap: 9px; }
.form-grid { gap: 17px 18px; }
.form-grid label, .login-card label { color: #51637b; font-size: 13px; gap: 7px; }
.form-grid input, .form-grid select { font-size: 14px; height: 37px; }
.field-note { color: #7a8ba3; font-size: 12px; }
.form-error { font-size: 13px; color: #cf3636; }
.inline-note { background: #f5f8fc; border-color: #e1e9f3; color: #657a97; font-size: 13px; padding: 11px 13px; }
.detail-amount { border-color: #d9e5f5; background: #f3f7fe; border-radius: 6px; padding: 18px; }
.detail-grid { gap: 18px; margin-top: 20px; }
.detail-grid dt { font-size: 12px; color: #7a8ba2; margin-bottom: 5px; }
.detail-grid dd { color: #334961; font-size: 14px; }
.section-title { font-size: 14px; color: #364f70; margin: 24px 0 12px; }
.route-chip { background: #eff5fe; color: #526f94; font-size: 12px; border-radius: 4px; }
.timeline-item { font-size: 13px; color: #556b88; border-color: #dbe4ef; }
.timeline-item small, .timeline-item p { color: #7f8fa5; font-size: 12px; }
.timeline-item:before { background: #b4c9e4; box-shadow: 0 0 0 1px #d5e0ef; }
.detail-text { font-size: 13px; color: #516a8b; }
.entry-more { border-color: #e1e8f2; }
.entry-more summary, .entry-history summary { color: #456994; font-size: 13px; }
.upload-zone { background: #f8fbff; border-color: #adcaee; border-radius: 6px; }
.upload-zone strong, .upload-zone svg { color: #386dad; }
.upload-zone strong { font-size: 15px; }
.upload-zone span, .upload-zone input { font-size: 13px; color: #7a8ea8; }
.import-summary { font-size: 13px; color: #536e90; }
.import-table { font-size: 13px; }
.import-table th { color: #4c6484; background: #f2f6fc; }
.import-table td { color: #506682; }
.reference-tabs button { font-size: 13px; color: #637b9a; }
.reference-tabs button.active { color: #1461b9; background: #edf5ff; border-color: #b5d3f9; }
.reference-item { font-size: 13px; color: #526d90; }
.reference-item small { font-size: 12px; color: #8292a9; }
.toast { background: #243d5d; border-color: #3b567a; border-radius: 6px; font-size: 14px; box-shadow: 0 6px 24px #11284622; }
.toast.error { background: #a43d3d; border-color: #b55353; }
.login-wall { background: #edf2f9; }
.login-card { border-radius: 8px; box-shadow: 0 10px 50px #233c6410; }
.login-card p, .login-card small { color: #7b8da6; font-size: 13px; }
.login-card .brand-mark { background: #1677ff; }
.setup-banner { background: #f0f6ff; border-color: #d3e3fa; color: #3f6594; font-size: 13px; }
.setup-banner div span { color: #7188a6; }
details { color: #59718f; font-size: 13px; }
.kv span:last-child { color: #4c6585; }
@media (max-width: 1100px) {
  :root { --sidebar-width: 210px; }
  main { padding: 20px; }
  .topbar { padding-inline: 20px; }
  .topbar-leading { gap: 14px; }
  .breadcrumb { font-size: 12px; }
  .page-heading { align-items: flex-start; }
  .page-heading .heading-actions { justify-content: flex-end; }
}
@media (max-width: 800px) {
  :root { --sidebar-width: 205px; }
  .sidebar { padding: 16px 10px; }
  .sidebar .nav-item, .sidebar .nav-group summary { font-size: 13px; }
  .sidebar .nav-item { margin-top: 2px; }
  .sidebar .brand { font-size: 21px; }
  .sidebar .nav-count { display: inline-flex; }
  .topbar { height: 52px; padding-inline: 14px; }
  .topbar-leading { gap: 12px; }
  .topbar .breadcrumb { display: none; }
  .topbar .connection, .top-divider { display: none; }
  main { padding: 18px 14px; }
  .page-heading, #daily-page .page-heading { flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
  .heading-actions, .page-heading .heading-actions { justify-content: flex-start; }
  .heading-actions .button { font-size: 13px; }
  .filters .search-field { min-width: 100%; }
  .filters select { max-width: none; }
  .panel-heading { gap: 10px; flex-wrap: wrap; }
  .panel-tools { margin-left: 0; gap: 14px; }
  .ledger-table { min-width: 950px; }
  .drawer { width: min(640px, 100vw); max-width: 100vw; }
  .page-footer { flex-wrap: wrap; }
}
@media (max-width: 540px) {
  .sidebar { width: 190px; }
  .main-shell { margin-left: 190px; width: calc(100% - 190px); }
  .top-actions { display: none; }
  .table-footer { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .dialog-head, .dialog-body { padding: 18px; }
  .dialog-foot { padding: 13px 18px; }
}

/* Align the header, detail and total using the same column type. */
.ledger-table :is(th,td)[data-kind="number"],
.ledger-table :is(th,td).align-right { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-table :is(th,td)[data-kind="text"],
.ledger-table :is(th,td)[data-kind="date"],
.ledger-table :is(th,td).align-left { text-align: left; }
.ledger-table :is(th,td)[data-kind="action"],
.ledger-table :is(th,td).align-center { text-align: center; }
.ledger-table th { vertical-align: middle; }
.import-table :is(th,td):nth-child(4) { text-align: right; font-variant-numeric: tabular-nums; }
.ledger-table .bs-missing { color: #8a98aa; font-variant-numeric: tabular-nums; }
.ledger-table tfoot td:empty { background: #f4f7fc; }
.bs-table-filter { border-bottom: 1px solid var(--border); }
.bs-table-filter .basis-switch { flex-shrink: 0; }
.bs-panel .bs-table td { height: 48px; }

/* Disclosure labels replace repeated triangles while retaining native controls. */
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details > summary::marker { content: ""; }
main details > summary, dialog details > summary {
  display: flex; align-items: center; gap: 8px; min-height: 28px;
}
main details > summary::after, dialog details > summary::after {
  content: "展开"; margin-left: auto; flex-shrink: 0; font-size: 12px;
  font-weight: 400; color: var(--primary); letter-spacing: 0;
}
main details[open] > summary::after, dialog details[open] > summary::after { content: "收起"; }
.bs-notice summary > span { float: none; font-weight: 400; }
.wb-result-details > summary::after { content: none; }
.wb-result-details[open] > summary::after { content: none; }
.wb-result-toggle b, .wb-summary-arrow { display: none; }
.wb-summary-profit, .wb-total-summary .wb-statement-gap { padding-right: 14px; }
.sidebar .nav-group summary > [data-icon="chevron"],
.sidebar .nav-chevron > svg { display: none; }
.sidebar .nav-group summary::after { content: "+"; color: #a7bad3; font-size: 16px; line-height: 1; }
.sidebar .nav-group[open] summary::after { content: "−"; }
.sidebar .nav-item .nav-chevron, .sidebar .nav-item[aria-expanded="true"] .nav-chevron { transform: none; }
.sidebar .nav-chevron::before { content: "+"; font-size: 16px; line-height: 1; }
.sidebar .nav-item[aria-expanded="true"] .nav-chevron::before { content: "−"; }

/* Parameter pages use account comparisons rather than empty financial totals. */
.bs-rate-overview { padding: 18px; }
.bs-rate-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,360px),1fr)); gap: 16px; }
.bs-rate-card { min-width: 0; border: 1px solid #dae3ef; border-radius: 6px; background: #fff; overflow: hidden; }
.bs-rate-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #f6f8fc; border-bottom: 1px solid #e5ebf3; }
.bs-rate-account h3, .bs-rate-account strong { margin: 0; font-size: 16px; font-weight: 600; color: #293d5a; }
.bs-rate-account > div { display: flex; flex-direction: column; gap: 3px; }
.bs-rate-account > div > span { color: #7b899d; font-size: 12px; }
.bs-rate-account small { display: block; margin-top: 4px; color: #7b899d; font-size: 12px; font-weight: 400; }
.bs-rate-values { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; padding: 19px 0; margin: 0; }
.bs-rate-value { min-width: 0; padding: 0 16px; border-right: 1px solid #e8edf4; }
.bs-rate-value:last-child { border-right: 0; }
.bs-rate-value dt { color: #697c97; font-size: 13px; }
.bs-rate-value dd { margin: 8px 0 0; font-size: 24px; font-weight: 600; color: #243b5c; }
.bs-rate-value .bs-number { font-size: 24px; font-weight: 600; letter-spacing: 0; }
.bs-rate-period { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; margin: 0; border-top: 1px solid #edf1f6; color: #75859b; font-size: 12px; }
.bs-rate-period .row-action { margin-left: auto; }
.bs-rate-missing { margin: 0; padding: 8px 16px; border-top: 1px solid #f4e8d5; background: #fffbf3; color: #a37424; font-size: 12px; }
@media(max-width:700px) {
  .bs-rate-overview { padding: 12px; }
  .bs-rate-cards { grid-template-columns: 1fr; }
  .bs-rate-account { padding: 12px; }
  .bs-rate-value { padding: 0 12px; }
  .bs-rate-value .bs-number { font-size: 22px; }
}

/* Keep reference material one step away from the working ledger. */
.heading-actions .bs-support-trigger { color: #52647d; background: #fff; }
.row-action.ledger-delete-action { color: #b9514c; }
.row-action.ledger-delete-action:hover { color: #a32922; background: #fff1f0; }
.ledger-delete-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 16px; border: 1px solid #e5eaf1; border-radius: 6px; background: #f8fafc; }
.ledger-delete-summary > div { display: grid; gap: 5px; }
.ledger-delete-summary > div > span { color: #6d7e94; font-size: 13px; }
.ledger-delete-summary > .money { white-space: nowrap; font-size: 19px; }
.ledger-delete-memo { margin: 12px 0; color: #43546d; overflow-wrap: anywhere; }
.ledger-delete-linked { margin: 18px 0; padding: 12px 14px; border: 1px solid #eadfcf; border-radius: 6px; background: #fffcf6; }
.ledger-delete-linked > h3 { margin: 0 0 8px; font-size: 14px; color: #6e552f; }
.ledger-delete-linked-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid #eee5d6; font-size: 13px; }
.ledger-delete-linked-row small { display: block; margin-top: 4px; color: #7f7b72; overflow-wrap: anywhere; }
.ledger-delete-linked > .check-line { margin-top: 12px; }
.ledger-delete-reason { display: grid; gap: 8px; margin-top: 18px; color: #56677c; font-size: 13px; }
.bs-support-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; background: #fff2d8; color: #a46306; font-size: 12px; font-variant-numeric: tabular-nums; }
.bs-support-trigger.is-error .bs-support-count { background: #fff0ef; color: #c03932; }
.modal:has(.bs-support) { width: 1060px; max-height: min(90vh,900px); overflow: hidden; }
.modal:has(.bs-support) #modal-content { display: flex; flex-direction: column; max-height: min(90vh,900px); }
.modal:has(.bs-support) .dialog-head { padding: 18px 24px 16px; flex-shrink: 0; }
.bs-support { min-height: 0; display: flex; flex-direction: column; }
.bs-support-tabs { display: flex; gap: 24px; padding: 0 24px; border-bottom: 1px solid #e4eaf2; flex-shrink: 0; overflow-x: auto; }
.bs-support-tabs button { position: relative; padding: 14px 2px; border: 0; border-radius: 0; background: transparent; color: #65768d; font-size: 14px; white-space: nowrap; }
.bs-support-tabs button:hover { color: var(--primary); }
.bs-support-tabs button[aria-selected="true"] { color: var(--primary); font-weight: 600; }
.bs-support-tabs button[aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--primary); }
.bs-support-tabs button:focus-visible { outline: 2px solid #1677ff; outline-offset: -3px; }
.bs-support-content { padding: 20px 24px 24px; overflow: auto; min-height: 180px; max-height: calc(90vh - 205px); color: #415570; font-size: 13px; line-height: 1.7; }
.bs-support-content h3 { margin: 20px 0 12px; color: #293d5a; font-size: 14px; font-weight: 600; }
.bs-support-content h3:first-child { margin-top: 0; }
.bs-support-content p { overflow-wrap: anywhere; }
.bs-support-section + .bs-support-section { margin-top: 24px; padding-top: 20px; border-top: 1px solid #e4eaf2; }
.bs-support-section h3 > span { margin-left: 6px; font-weight: 400; color: #8391a4; }
.bs-support-section > p { margin: 8px 0; }
.bs-support-source-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.bs-support-source { padding: 12px 14px; border: 1px solid #e2e8f1; border-radius: 5px; background: #f8fafc; min-width: 0; }
.bs-support-source > div:first-child { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.bs-support-source > div:first-child > a { font-weight: 500; }
.bs-support-source p { margin: 4px 0; color: #697d98; font-size: 12px; }
.bs-support-source .bs-support-filename { color: #415570; }
.bs-support-source > .text-button { display: inline-block; margin-top: 6px; }
.bs-support-source-meta { display: flex; align-items: baseline; gap: 6px 12px; flex-wrap: wrap; margin-top: 6px; color: #75849a; font-size: 12px; }
.bs-support-source-meta > h3 { margin: 0; }
.bs-support-content > .bs-support-source-meta { margin-bottom: 12px; }
.bs-support-source-files { margin-top: 10px; }
.bs-support-source-file { padding-top: 10px; margin-top: 10px; border-top: 1px solid #e2e8f1; }
.bs-support-source-file .text-button { font-size: 12px; }
.bs-support-note { padding: 10px 12px; background: #f3f7fd; border-radius: 5px; margin: 0 0 18px; }
.bs-support-content > .wb-result-list { max-height: none; overflow: visible; padding: 0; }
.bs-support-content .wb-result-list .wb-result-item { padding-left: 0; padding-right: 0; }
.bs-support-content .bs-source-grid { margin-top: 0; grid-template-columns: repeat(2,minmax(0,1fr)); }
.bs-support-content .bs-source-grid a { background: #f8fafc; }
.bs-support-content .bs-source-grid small { white-space: normal; overflow-wrap: anywhere; }
.bs-support-content .bs-version { margin: 0 0 18px; padding: 12px 14px; background: #f5f8fc; border-radius: 5px; }
.bs-support-content .bs-sources { margin: 0; padding: 0; border: 0; }
.bs-support-content .wb-original { margin: 0; border: 0; background: #fff; }
.bs-support-content .wb-original .table-scroll { max-height: none; overflow: auto; }
.bs-support-content .wb-original .ledger-table { min-width: 700px; }
.bs-support-content .wb-coverage { margin-bottom: 20px; }
.bs-support-content .wb-source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.bs-support-content .bs-accounting-note { padding: 0; border: 0; background: transparent; color: #415570; }
.bs-support-content .bs-upload, .bs-support-content .op-detail { padding: 0; }
.bs-support-content .bs-audit:first-child { padding-top: 0; }
.bs-support-content .bs-empty, .bs-support-empty { padding: 38px 20px; text-align: center; color: #75849a; }
.modal:has(.bs-support) .dialog-foot { flex-shrink: 0; position: static; }
.wb-result-compact .wb-result-head { min-height: 44px; padding: 10px 16px; }
.wb-result-compact .wb-result-head > .text-button { flex-shrink: 0; }
@media(max-width:760px) {
  .modal:has(.bs-support) { max-width: calc(100vw - 20px); max-height: 94vh; }
  .modal:has(.bs-support) #modal-content { max-height: 94vh; }
  .bs-support-tabs { gap: 20px; padding: 0 16px; }
  .bs-support-content { padding: 16px; max-height: calc(94vh - 205px); }
  .bs-support-source-grid, .bs-support-content .bs-source-grid, .bs-support-content .wb-source-grid { grid-template-columns: 1fr; }
  .wb-result-compact .wb-result-head { align-items: center; flex-wrap: wrap; }
}
.ledger-sortbar { display: flex; align-items: center; flex-wrap: wrap; gap: 10px 16px; padding: 0 16px 12px; color: #64748b; font-size: 12px; }
.ledger-sortbar label { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.ledger-sortbar select { min-width: 100px; height: 30px; padding: 4px 24px 4px 8px; font-size: 12px; }
.ledger-sortbar > span { color: #8290a3; }
@media(max-width:760px) { .ledger-sortbar > span { flex-basis: 100%; } }
