#wbWeeklyReportsView { margin: -2px; padding: 2px; background: #f4f7fb; }
.wb-weekly-shell { display: grid; gap: 12px; }
.wb-weekly-toolbar { padding: 16px; }
.wb-weekly-heading,.wb-weekly-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.wb-weekly-heading h2,.wb-weekly-detail-head h2 { margin: 2px 0 0; }
.wb-weekly-heading p { margin: 4px 0 0; color: var(--muted); }
.wb-weekly-actions,.wb-weekly-detail-actions,.wb-weekly-tab-tools { display: flex; align-items: center; gap: 8px; }
.wb-weekly-filters { display: grid; grid-template-columns: repeat(4,minmax(118px,1fr)) auto auto minmax(210px,1.4fr); gap: 8px; align-items: end; margin-top: 14px; }
.wb-weekly-filters label,.wb-weekly-tab-tools label,.wb-weekly-import-card label { display: grid; gap: 4px; color: var(--muted); font-size: 12px; }
.wb-weekly-filters select,.wb-weekly-filters input,.wb-weekly-tab-tools select,.wb-weekly-tab-tools input,.wb-weekly-import-card select,.wb-weekly-import-card input { min-height: 36px; border: 1px solid #d8e1eb; border-radius: 8px; background: #fff; padding: 7px 9px; color: var(--text); }
.wb-weekly-filters .wb-weekly-check { display: flex; align-items: center; gap: 6px; min-height: 36px; color: var(--text); }
.wb-weekly-filters .wb-weekly-check input { min-height: auto; }
.wb-weekly-archive { padding: 0; overflow: hidden; }
.wb-weekly-archive table,.wb-weekly-tab table { width: 100%; border-collapse: collapse; }
.wb-weekly-archive th,.wb-weekly-archive td,.wb-weekly-tab th,.wb-weekly-tab td { padding: 11px 12px; border-bottom: 1px solid #e6ebf1; text-align: left; white-space: nowrap; }
.wb-weekly-archive th,.wb-weekly-tab th { color: #667587; font-size: 11px; text-transform: uppercase; letter-spacing: .035em; background: #f8fafc; }
.wb-weekly-archive-table { min-width: 1540px; table-layout: fixed; }
.wb-weekly-archive-table .wb-weekly-col-period { width: 24%; }
.wb-weekly-archive-table .wb-weekly-col-account { width: 10%; }
.wb-weekly-archive-table .wb-weekly-col-realization,
.wb-weekly-archive-table .wb-weekly-col-expenses,
.wb-weekly-archive-table .wb-weekly-col-payout { width: 11%; }
.wb-weekly-archive-table .wb-weekly-col-profit,
.wb-weekly-archive-table .wb-weekly-col-tax { width: 9%; }
.wb-weekly-archive-table .wb-weekly-col-profit-after-tax { width: 12%; }
.wb-weekly-archive-table .wb-weekly-col-difference { width: 8%; }
.wb-weekly-archive-table .wb-weekly-col-status { width: 7%; }
.wb-weekly-archive-table th:nth-child(n+3):nth-child(-n+9),
.wb-weekly-archive-table td:nth-child(n+3):nth-child(-n+9) { text-align: right; }
.wb-weekly-archive-table th:nth-child(1),
.wb-weekly-archive-table th:nth-child(2),
.wb-weekly-archive-table th:nth-child(10),
.wb-weekly-archive-table td:nth-child(1),
.wb-weekly-archive-table td:nth-child(2),
.wb-weekly-archive-table td:nth-child(10) { text-align: left; }
.wb-weekly-archive-table td:first-child small { display: block; overflow-wrap: anywhere; white-space: normal; color: var(--muted); line-height: 1.35; }
.wb-weekly-archive tbody tr { cursor: pointer; }
.wb-weekly-archive tbody tr:hover { background: #f2f7ff; }
.wb-weekly-state { padding: 20px; color: var(--muted); }
.wb-weekly-sync-status { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; padding: 10px 12px; border-radius: 9px; background: #f5f9fd; color: var(--muted); font-size: 12px; }
.wb-weekly-sync-status b { color: #274561; }
.wb-weekly-money { font-variant-numeric: tabular-nums; text-align: right !important; }
.wb-weekly-money.negative { color: #b13939; }
.wb-weekly-tax-value { text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.wb-weekly-tax-state { display: block; margin-top: 5px; font-size: 11px; white-space: normal; }
.wb-weekly-tax-state.estimated { color: #7a5a00; }
.wb-weekly-tax-state.incomplete { color: #a62d2d; }
.wb-weekly-status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.wb-weekly-status.ready { color: #14733f; background: #e8f8ef; }
.wb-weekly-status.warning { color: #935d00; background: #fff5d8; }
.wb-weekly-status.error { color: #aa2e2e; background: #ffeded; }
.wb-weekly-detail-head { padding: 4px 2px; }
.wb-weekly-detail-head > div:nth-child(2) { flex: 1; }
.wb-weekly-detail-head span { color: var(--muted); font-size: 13px; }
.wb-weekly-quality { display: flex; flex-wrap: wrap; gap: 7px; }
.wb-weekly-quality span, .wb-weekly-quality button { padding: 7px 10px; border: 1px solid #dfe7ef; border-radius: 8px; background: #fff; color: #176b42; font: inherit; font-size: 12px; }
.wb-weekly-quality button { cursor: pointer; text-align: left; }
.wb-weekly-quality span.warning, .wb-weekly-quality button.warning { color: #985f00; border-color: #f1d59e; background: #fffaf0; }
.wb-weekly-quality span.error { color: #a62d2d; border-color: #efb8b8; background: #fff4f4; }
.wb-weekly-kpis { display: grid; grid-template-columns: repeat(4,minmax(150px,1fr)); gap: 8px; }
.wb-weekly-kpi { min-width: 0; padding: 13px 14px; border: 1px solid #dfe6ef; border-radius: 10px; background: #fff; box-shadow: 0 2px 8px rgba(23,47,77,.035); }
.wb-weekly-kpi span { display: block; color: var(--muted); font-size: 12px; }
.wb-weekly-kpi strong { display: block; margin-top: 5px; font-size: 21px; font-variant-numeric: tabular-nums; }
.wb-weekly-kpi small { display: block; min-height: 17px; margin-top: 3px; color: var(--muted); }
.wb-weekly-kpi small.positive { color: #14733f; }.wb-weekly-kpi small.negative { color: #b13939; }
.wb-weekly-kpi-action { font: inherit; color: inherit; text-align: left; cursor: pointer; }
.wb-weekly-kpi-action:hover { border-color: #67a4dd; box-shadow: 0 4px 14px rgba(20,101,192,.12); }
.wb-weekly-tabs { display: flex; gap: 4px; border-bottom: 1px solid #dce4ec; }
.wb-weekly-tabs button,.wb-weekly-segments button { border: 0; background: transparent; padding: 10px 13px; color: var(--muted); font-weight: 700; cursor: pointer; }
.wb-weekly-tabs button.active { color: #1465c0; border-bottom: 2px solid #1465c0; }
.wb-weekly-segments { display: inline-flex; padding: 3px; border-radius: 9px; background: #edf2f7; }
.wb-weekly-segments button { padding: 7px 10px; border-radius: 7px; }
.wb-weekly-segments button.active { color: #173b63; background: #fff; box-shadow: 0 1px 4px rgba(25,45,68,.12); }
.wb-weekly-tab { display: none; padding: 16px; }
.wb-weekly-tab.active { display: block; }
.wb-weekly-tab-tools { justify-content: space-between; margin-bottom: 12px; }
.wb-weekly-operation-summary { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0 0 12px; padding: 11px 13px; border: 1px solid #dbe5ef; border-radius: 9px; background: #f7fafc; font-size: 12px; }
.wb-weekly-operation-summary strong { width: 100%; font-size: 14px; }.wb-weekly-operation-summary span { color: #536579; }
.wb-weekly-operations-table th button { border: 0; padding: 0; background: transparent; color: inherit; font: inherit; text-transform: inherit; letter-spacing: inherit; cursor: pointer; }
.wb-weekly-operation-detail { min-width: 260px; max-width: 420px; white-space: normal !important; font-weight: 650; color: #21364d; }
.wb-weekly-ladder { max-width: 690px; margin: auto; }
.wb-weekly-ladder-row { display: grid; grid-template-columns: 1fr auto; gap: 20px; padding: 7px 4px; font-variant-numeric: tabular-nums; }
.wb-weekly-ladder-row.total { margin-top: 7px; padding-top: 12px; border-top: 1px solid #cfd9e4; font-weight: 800; }
.wb-weekly-ladder-row.negative b { color: #a93434; }
.wb-weekly-summary-grid { display: grid; grid-template-columns: minmax(320px,1fr) minmax(320px,1fr); gap: 20px; }
.wb-weekly-summary-grid h3 { margin: 2px 0 10px; }
.wb-weekly-warning-list { display: grid; gap: 7px; margin-bottom: 14px; }
.wb-weekly-warning-list div { padding: 9px 11px; border-radius: 8px; background: #fff6df; color: #8c5a00; }
.wb-weekly-comparison { width: 100%; border-collapse: collapse; }
.wb-weekly-column-settings { position: absolute; z-index: 4; right: 16px; display: grid; grid-template-columns: repeat(2,minmax(150px,1fr)); gap: 7px; width: 380px; padding: 12px; border: 1px solid #dbe3ec; border-radius: 9px; background: #fff; box-shadow: 0 10px 28px rgba(28,47,69,.16); }
.wb-weekly-column-settings label { display: flex; gap: 6px; align-items: center; font-size: 12px; }
.wb-weekly-product-toggle { width: 24px; margin-right: 4px; border: 0; background: transparent; color: #42698f; cursor: pointer; }
.wb-weekly-product-child { background: #f8fbfe; }
.wb-weekly-product-child td:first-child { padding-left: 38px; }
.wb-weekly-raw-card { width: min(920px,calc(100vw - 32px)); max-height: 86vh; }
.wb-weekly-raw-card pre { overflow: auto; max-height: 68vh; padding: 14px; border-radius: 8px; background: #17202b; color: #e8eef6; white-space: pre-wrap; word-break: break-word; }
.wb-weekly-import-card { width: min(540px,calc(100vw - 32px)); }
.wb-weekly-import-card form { display: grid; gap: 12px; }
.wb-weekly-selected-file { padding: 12px; border: 1px dashed #bdcbd9; border-radius: 8px; color: var(--muted); }
.wb-weekly-reconciliation { max-width: 720px; display: grid; gap: 10px; }
.wb-weekly-reconciliation-row { display: grid; grid-template-columns: 1fr auto; padding: 11px 12px; border-radius: 8px; background: #f6f9fc; font-variant-numeric: tabular-nums; }
.wb-weekly-reconciliation-row.total { border: 1px solid #ccd9e6; background: #fff; font-weight: 800; }
.wb-weekly-expense-cards { display: grid; grid-template-columns: repeat(3,minmax(220px,1fr)); gap: 9px; }
.wb-weekly-expense { padding: 13px; border: 1px solid #dfe6ee; border-radius: 9px; background: #fff; cursor: pointer; }
.wb-weekly-expense:hover { border-color: #8eb7e5; }
.wb-weekly-expense strong { display: block; margin: 5px 0; font-size: 20px; }
.wb-weekly-expense small { color: var(--muted); }
.wb-weekly-expense small + small { margin-top: 4px; }
.wb-weekly-expense-summary { margin-bottom: 18px; padding: 14px; border: 1px solid #dbe5ef; border-radius: 11px; background: #fff; }
.wb-weekly-expense-summary h3 { margin: 0 0 9px; }
.wb-weekly-expense-summary button { display: grid; grid-template-columns: minmax(0,1fr) auto 70px 18px; gap: 10px; align-items: center; width: 100%; padding: 10px 7px; border: 0; border-top: 1px solid #edf1f5; background: transparent; color: inherit; text-align: left; cursor: pointer; }
.wb-weekly-expense-summary button strong,.wb-weekly-expense-summary button small { text-align: right; font-variant-numeric: tabular-nums; }.wb-weekly-expense-summary button small { color: var(--muted); }
.wb-expense-heading { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-bottom: 14px; }.wb-expense-heading h3 { margin: 2px 0 0; font-size: 22px; }.wb-expense-heading span,.wb-expense-heading p { color: var(--muted); font-size: 12px; }
.wb-expense-tree { display: grid; gap: 8px; }.wb-expense-category { border: 1px solid #dce5ee; border-radius: 10px; background: #fff; overflow: hidden; }
.wb-expense-category > summary,.wb-expense-sources > details > summary,.wb-expense-products > details > summary { display: grid; align-items: center; gap: 10px; cursor: pointer; list-style: none; }.wb-expense-category > summary::-webkit-details-marker,.wb-expense-sources summary::-webkit-details-marker,.wb-expense-products summary::-webkit-details-marker { display: none; }
.wb-expense-category > summary { grid-template-columns: minmax(0,1fr) auto 18px; padding: 14px; font-size: 16px; }.wb-expense-category > summary strong { font-size: 18px; font-variant-numeric: tabular-nums; }.wb-expense-category[open] > summary b,.wb-expense-sources details[open] > summary b,.wb-expense-products details[open] > summary b { transform: rotate(90deg); }
.wb-expense-flow { display: flex; flex-wrap: wrap; gap: 12px 22px; padding: 10px 14px; background: #f7fafc; color: #536579; font-size: 12px; }.wb-expense-flow strong { color: #21364d; }
.wb-expense-sources { padding: 0 14px 12px; }.wb-expense-sources > details { border-top: 1px solid #e8edf2; }.wb-expense-sources > details > summary { grid-template-columns: minmax(0,1fr) auto auto 18px; padding: 12px 4px; }.wb-expense-sources summary small { color: var(--muted); }
.wb-expense-products { padding: 0 0 6px 16px; }.wb-expense-products > details { border-left: 2px solid #dbe8f5; }.wb-expense-products > details.unallocated { border-left-color: #e3a84b; background: #fffaf1; }.wb-expense-products > details > summary { grid-template-columns: minmax(0,1fr) 70px auto 18px; padding: 10px 12px; }.wb-expense-products summary span small { display: block; margin-top: 3px; color: var(--muted); }.wb-expense-products summary em { color: var(--muted); font-style: normal; font-size: 12px; }
.wb-expense-operation-list { padding: 0 12px 10px 24px; }.wb-expense-operation-list > div { display: grid; grid-template-columns: minmax(150px,1fr) minmax(220px,1.5fr) auto minmax(170px,1fr) auto; gap: 10px; align-items: center; padding: 9px 0; border-top: 1px dashed #dce4ec; font-size: 12px; }.wb-expense-operation-list small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.wb-expense-detail-title { margin: 12px 0 7px; color: var(--ink); font-size: 13px; }.wb-expense-penalty-reason { display: flex; min-width: 0; flex-direction: column; color: var(--ink); }.wb-expense-penalty-reason small { color: var(--muted); }
.wb-expense-unallocated { margin-bottom: 12px; padding: 11px 13px; border: 1px solid #efcf94; border-radius: 9px; background: #fffaf0; }.wb-expense-unallocated summary { cursor: pointer; color: #8b5900; }.wb-expense-unallocated summary strong { float: right; }.wb-expense-unallocated p { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 3px 12px; padding-top: 9px; border-top: 1px solid #f2dfba; }.wb-expense-unallocated p small { grid-column: 1 / -1; color: #765f37; }
.wb-weekly-versions { margin: 0; padding-left: 20px; color: var(--muted); }
.wb-weekly-versions li { margin: 5px 0; }
@media (max-width: 1100px) { .wb-weekly-filters { grid-template-columns: repeat(3,1fr); }.wb-weekly-kpis { grid-template-columns: repeat(2,1fr); }.wb-weekly-summary-grid { grid-template-columns: 1fr; }.wb-weekly-expense-cards { grid-template-columns: repeat(2,1fr); } }
@media (max-width: 760px) { .wb-weekly-heading,.wb-weekly-detail-head,.wb-expense-heading { align-items: stretch; flex-direction: column; }.wb-weekly-actions,.wb-weekly-detail-actions,.wb-weekly-tab-tools { align-items: stretch; flex-direction: column; }.wb-weekly-filters,.wb-weekly-kpis,.wb-weekly-expense-cards { grid-template-columns: 1fr; }.wb-weekly-tabs { overflow-x: auto; }.wb-weekly-tab { padding: 10px; }.wb-weekly-column-settings { position: static; width: auto; grid-template-columns: 1fr; }.wb-weekly-archive-table { min-width: 0; table-layout: auto; }.wb-weekly-archive-table td { width: 100% !important; text-align: right !important; white-space: normal; }.wb-weekly-archive-table td::before { text-align: left; }.wb-weekly-archive-table td:first-child,.wb-weekly-archive-table td:last-child { text-align: left !important; }.wb-weekly-operations-wrap { overflow: visible; }.wb-weekly-operations-table thead { display: none; }.wb-weekly-operations-table,.wb-weekly-operations-table tbody,.wb-weekly-operations-table tr,.wb-weekly-operations-table td { display: block; width: 100%; }.wb-weekly-operations-table tr { display: flex; flex-direction: column; margin-bottom: 10px; padding: 10px 12px; border: 1px solid #dfe6ee; border-radius: 10px; background: #fff; }.wb-weekly-operations-table td { display: grid; grid-template-columns: 105px minmax(0,1fr); gap: 9px; padding: 5px 0; border: 0; text-align: left !important; white-space: normal; overflow-wrap: anywhere; }.wb-weekly-operations-table td::before { content: attr(data-label); color: var(--muted); font-size: 11px; }.wb-weekly-operations-table td:nth-child(1) { order: 1; }.wb-weekly-operations-table td:nth-child(2) { order: 2; }.wb-weekly-operations-table td:nth-child(4) { order: 3; }.wb-weekly-operations-table td:nth-child(5) { order: 4; }.wb-weekly-operations-table td:nth-child(9) { order: 5; }.wb-weekly-operations-table td:nth-child(3),.wb-weekly-operations-table td:nth-child(6),.wb-weekly-operations-table td:nth-child(7),.wb-weekly-operations-table td:nth-child(8),.wb-weekly-operations-table td:nth-child(10),.wb-weekly-operations-table td:nth-child(11),.wb-weekly-operations-table td:nth-child(12),.wb-weekly-operations-table td:nth-child(13) { order: 10; color: var(--muted); font-size: 12px; }.wb-weekly-operation-detail { min-width: 0; max-width: none; }.wb-weekly-expense-summary button { grid-template-columns: minmax(0,1fr) auto 18px; }.wb-weekly-expense-summary button small { grid-column: 1 / 2; grid-row: 2; text-align: left; }.wb-expense-sources > details > summary { grid-template-columns: minmax(0,1fr) auto 18px; }.wb-expense-sources > details > summary small { grid-column: 1 / 2; grid-row: 2; }.wb-expense-products { padding-left: 6px; }.wb-expense-products > details > summary { grid-template-columns: minmax(0,1fr) auto 18px; }.wb-expense-products summary em { grid-column: 1 / 2; grid-row: 2; }.wb-expense-operation-list { padding-left: 12px; }.wb-expense-operation-list > div { grid-template-columns: 1fr auto; }.wb-expense-operation-list > div > span:nth-of-type(2) { grid-column: 1 / -1; } }
