.finance-page[hidden] { display: none; }
body.finance-view .records-header p,
body.finance-view .records-header .toolbar { display: none; }
.finance-page { min-height: 300px; padding: 12px; }
.finance-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.finance-actions label { cursor: pointer; }
.finance-notice { margin: 0 0 10px; padding: 8px 10px; background: #e9f6f1; color: #176b56; font-size: 13px; }
.finance-notice.is-error, .finance-error { background: #fff1ed; color: #a03f2b; }
.finance-section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 14px 0 7px; }
.finance-section-heading h3 { margin: 0; font-size: 15px; }
.finance-section-heading span { color: #65777c; font-size: 12px; }
.finance-scroll { overflow: auto; max-height: 460px; border: 1px solid #e0e8e9; }
.finance-table, body .finance-table { width: 100%; min-width: 660px; table-layout: fixed; border-collapse: collapse; }
.finance-table th, .finance-table td { padding: 7px 9px; border-bottom: 1px solid #e5ebec; font-size: 12px; text-align: left; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; }
.finance-table th { position: sticky; top: 0; z-index: 1; background: #f4f8f8; color: #4b6266; }
.finance-table th:nth-child(2), .finance-table td:nth-child(2) { width: 30%; }
.finance-mapping-form, .finance-payroll-form { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 8px 0 12px; }
.finance-mapping-form label, .finance-payroll-form label { display: grid; gap: 4px; min-width: 130px; font-size: 12px; color: #53646a; }
.finance-mapping-form select, .finance-payroll-form input { height: 34px; width: 100%; max-width: 220px; box-sizing: border-box; padding: 4px 8px; border: 1px solid #d6e0e3; border-radius: 5px; background: white; color: #172c31; font: inherit; }
.finance-mapping-form .primary-button, .finance-payroll-form .primary-button { min-height: 34px; }
.finance-text-button { border: 0; background: transparent; color: #096d82; cursor: pointer; }
.finance-taobao-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 8px; }
.finance-taobao-filters select, .finance-taobao-filters input { min-height: 34px; max-width: 100%; padding: 4px 8px; border: 1px solid #d6e0e3; border-radius: 5px; background: #fff; color: #172c31; font: inherit; }
.finance-taobao-filters [data-taobao-month] { width: 130px; }
.finance-taobao-filters [data-taobao-shop] { width: 210px; }
.finance-taobao-filters [data-taobao-status] { width: 135px; }
.finance-taobao-filters [data-taobao-search] { width: 230px; }
.finance-taobao-table .finance-filter-label { display: block; min-height: 16px; line-height: 16px; white-space: nowrap; }
.finance-taobao-table .finance-header-filter { display: block; width: 26px; height: 18px; min-height: 18px; margin: 2px auto 0; padding: 0; border: 1px solid #c8d4d8; border-radius: 3px; appearance: none; color: transparent; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23526870' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 13px 13px no-repeat; cursor: pointer; }
.finance-taobao-table .finance-header-filter option { color: #172c31; font-size: 12px; }
.finance-taobao-table th.is-active .finance-filter-label { color: #165cba; }
.finance-taobao-table .finance-header-filter.is-active { border-color: #165cba; background-color: #eaf2ff; }
body .finance-table.finance-taobao-table { min-width: 1600px; }
.finance-taobao-table th:nth-child(1) { width: 94px; }
.finance-taobao-table th:nth-child(2), .finance-taobao-table td:nth-child(2) { width: 160px; }
.finance-taobao-table th:nth-child(3) { width: 72px; }
.finance-taobao-table th:nth-child(4) { width: 180px; }
.finance-taobao-table th:nth-child(5) { width: 94px; }
.finance-taobao-table th:nth-child(6) { width: 110px; }
.finance-taobao-table th:nth-child(7) { width: 132px; }
.finance-taobao-table th:nth-child(8) { width: 95px; }
.finance-taobao-table th:nth-child(9) { width: 105px; }
.finance-taobao-table th:nth-child(10) { width: 160px; }
.finance-taobao-table th:nth-child(11) { width: 140px; }
.finance-taobao-table th:nth-child(12) { width: 105px; }
.finance-taobao-table th:nth-child(13) { width: 155px; }
.finance-taobao-table td:nth-child(9), .finance-taobao-table td:nth-child(10), .finance-taobao-table td:nth-child(11), .finance-taobao-table td:nth-child(13) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.finance-order-detail-button { max-width: 100%; padding: 0; border: 0; background: transparent; color: #086b7d; font: inherit; text-align: left; overflow-wrap: anywhere; cursor: pointer; text-decoration: underline; }
.finance-operation-detail { margin: 7px 0 10px; padding: 9px 10px; border: 1px solid #cbdfe5; border-radius: 5px; background: #f8fbfc; }
.finance-operation-detail[hidden] { display: none; }
.finance-operation-detail h4 { margin: 0 0 4px; font-size: 13px; }
.finance-operation-detail p { margin: 4px 0 7px; font-size: 12px; }
.finance-operation-detail .finance-scroll { max-height: 220px; }
body .finance-table.finance-operation-table { min-width: 850px; }
.finance-operation-table th:nth-child(2), .finance-operation-table td:nth-child(2) { width: 54px; }
.finance-operation-table th:nth-child(3), .finance-operation-table td:nth-child(3),
.finance-operation-table th:nth-child(4), .finance-operation-table td:nth-child(4) { width: 100px; }
.finance-operation-table th:nth-child(5), .finance-operation-table td:nth-child(5) { width: 110px; }
.finance-operation-table th:nth-child(6), .finance-operation-table td:nth-child(6) { width: 150px; }
.finance-reconciled { color: #176b5d; font-weight: 700; }
.finance-pending { color: #a25a20; font-weight: 700; }
.finance-taobao-pages { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.finance-taobao-pages button { min-height: 30px; padding: 4px 10px; border: 1px solid #d6e0e3; border-radius: 5px; background: #fff; cursor: pointer; }
.finance-taobao-pages button:disabled { opacity: .45; cursor: default; }
.finance-unmatched { margin-top: 16px; }
.finance-unmatched summary { cursor: pointer; color: #435f65; font-size: 13px; font-weight: 700; }
body .finance-table.finance-unmatched-table { min-width: 850px; }
body.finance-view .finance-taobao-table tbody td:nth-child(2),
body.finance-view .finance-unmatched-table tbody td:nth-child(2) { position: static; left: auto; z-index: auto; box-shadow: none; background: transparent; }
body.finance-view .finance-taobao-table thead th:nth-child(2),
body.finance-view .finance-unmatched-table thead th:nth-child(2) { position: sticky; top: 0; left: auto; z-index: 1; box-shadow: none; background: #f4f8f8; }
.finance-loading, .finance-error { padding: 12px; font-size: 13px; }
.finance-company-select { display: grid; gap: 4px; min-width: min(100%, 340px); font-size: 12px; color: #53646a; }
.finance-company-select[hidden] { display: none; }
.finance-segmented { display: inline-flex; align-self: end; border: 1px solid #d6e0e3; border-radius: 5px; overflow: hidden; }
.finance-segmented button { min-height: 34px; padding: 5px 12px; border: 0; background: #fff; color: #53646a; cursor: pointer; }
.finance-segmented button + button { border-left: 1px solid #d6e0e3; }
.finance-segmented button.active { background: #e9f6f1; color: #164c43; font-weight: 700; }
.finance-company-select select { min-height: 34px; width: 100%; padding: 4px 8px; border: 1px solid #d6e0e3; border-radius: 5px; background: #fff; color: #172c31; }
.equity-control-tree { display: grid; grid-template-columns: minmax(150px, 220px) minmax(220px, 1fr); align-items: start; gap: 32px; max-width: 900px; margin: 0 auto; text-align: left; }
.equity-controller { position: sticky; top: 24px; padding: 16px; border: 1px solid #5b8b80; border-radius: 5px; background: #e9f6f1; color: #164c43; font-weight: 700; text-align: center; }
.equity-control-list { border-left: 1px solid #91aaa4; padding: 0 0 0 22px; }
.equity-control-item { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 42px; margin: 0 0 10px; padding: 8px 12px; border: 1px solid #d6e0e3; border-radius: 5px; background: #fff; }
.equity-control-item::before { content: ''; position: absolute; left: -23px; top: 50%; width: 22px; border-top: 1px solid #91aaa4; }
.equity-control-name { overflow-wrap: anywhere; }
.equity-control-ratio { flex: 0 0 auto; color: #164c43; }
.equity-diagram { min-height: 220px; padding: 24px 12px; text-align: center; overflow-x: auto; }
.equity-company { display: inline-block; max-width: min(100%, 520px); padding: 12px 18px; border: 1px solid #5b8b80; border-radius: 5px; background: #e9f6f1; color: #164c43; font-weight: 700; overflow-wrap: anywhere; }
.equity-branches { display: flex; justify-content: center; gap: 14px; margin: 38px auto 0; width: max-content; max-width: 100%; border-top: 1px solid #91aaa4; }
.equity-branch { position: relative; min-width: 145px; max-width: 230px; padding-top: 20px; }
.equity-branch::before { content: ''; position: absolute; top: -38px; left: 50%; height: 58px; border-left: 1px solid #91aaa4; }
.equity-holder { position: relative; padding: 10px 12px; border: 1px solid #d6e0e3; border-radius: 5px; background: #fff; overflow-wrap: anywhere; }
.equity-ratio { display: block; margin-top: 5px; color: #53646a; font-size: 12px; }
.equity-raw-ratio { margin-top: 18px; color: #53646a; font-size: 12px; }
.equity-tables { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.equity-table-section { min-width: 0; }
.equity-scroll { max-height: 70vh; }
body .finance-table.equity-table { width: 100%; min-width: 0; }
.equity-table th:first-child, .equity-table td:first-child { width: 48px; text-align: center; }
.equity-table th:nth-child(2), .equity-table td:nth-child(2) { width: 40%; }
.equity-table th:nth-child(3), .equity-table td:nth-child(3) { width: 26%; }
.equity-table th, .equity-table td { padding: 6px; vertical-align: top; overflow-wrap: anywhere; }
@media (max-width: 1180px) { .equity-tables { grid-template-columns: 1fr; } }
@media (max-width: 700px) { .finance-page { padding: 8px; } .finance-section-heading { display: block; } .finance-section-heading span { display: block; margin-top: 4px; } .finance-payroll-form label { flex: 1 1 40%; } .equity-control-tree { grid-template-columns: 1fr; gap: 20px; } .equity-controller { position: static; } }
