.budget-table {
  table-layout: fixed;
  min-width: 1180px;
}

.income-table th:first-child,
.income-table td:first-child,
.expense-table th:nth-child(2),
.expense-table td:nth-child(2) {
  width: 240px;
}

.income-table th:nth-child(2),
.income-table td:nth-child(2),
.expense-table th:nth-child(3),
.expense-table td:nth-child(3) {
  width: 145px;
}

.income-table th:nth-child(n+3),
.income-table td:nth-child(n+3),
.expense-table th:nth-child(n+4),
.expense-table td:nth-child(n+4) {
  width: 112px;
}

.budget-table th:last-child,
.budget-table td:last-child {
  width: 48px;
}

.budget-table td.num input.small {
  display: block;
  width: 100%;
  max-width: none;
  text-align: right;
}

.budget-table td.num {
  text-align: right;
}

.budget-table input,
.budget-table select {
  min-width: 0;
}

.expense-table .status-col,
.expense-table .status-cell {
  width: 64px;
  text-align: center;
}

.expense-table th.row-actions-col,
.expense-table td.row-actions {
  width: 220px !important;
  min-width: 220px;
  text-align: right;
}

.row-actions-inner { display: flex; justify-content: flex-end; align-items: center; gap: 6px; width: 100%; }
.status-icon { width: 32px; height: 32px; border-radius: 50%; border: 1px solid; cursor: pointer; font-size: 16px; }
.status-icon.draft { color: #9a6326; border-color: #e1bd8d; background: #fff7e9; }
.status-icon.approved { color: #187347; border-color: #9bcbb0; background: #eaf7ef; }
.approved-row { background: #fbfdfb; }
.draft-row { background: #fffbe8; }
.recent-row { background: #eef6ff; }
.draft-row input,.draft-row select,.recent-row input,.recent-row select { background: transparent; }
.approve-btn { color: #187347; border-color: #9bcbb0; }
.log-btn { padding-inline: 10px; }
.audit-modal label { display: grid; gap: 6px; margin-top: 16px; font-size: 13px; font-weight: 700; color: #4d5c54; }
.audit-modal input,.audit-modal textarea { border: 1px solid #d3dbd6; background: #fff; padding: 10px; border-radius: 7px; font: inherit; resize: vertical; }
.audit-user { margin-top: 14px; padding: 10px 12px; border-radius: 8px; background: #edf3ef; color: #4d5c54; font-size: 13px; }
.log-modal { width: min(680px,100%); max-height: 85vh; display: flex; flex-direction: column; }
.log-list { overflow: auto; margin-top: 12px; }
.log-entry { padding: 14px 0; border-bottom: 1px solid #e5eae7; }
.log-meta { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.log-meta time { color: #718078; font-size: 12px; }
.log-entry p { margin: 8px 0 0; color: #536159; }
.field-chip { display: inline-block; padding: 2px 7px; border-radius: 12px; background: #edf3ef; color: #315540; font-size: 11px; font-weight: 700; text-transform: uppercase; }
.status-summary { color: #68736d; }
.budget-table .yoy-col,.budget-table .yoy-cell { width: 105px; }
.yoy { display: inline-flex; align-items: center; justify-content: flex-end; gap: 5px; font-weight: 750; }
.yoy-arrow { display: inline-grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; font-size: 16px; }
.yoy.good { color: #187347; }
.yoy.good .yoy-arrow { background: #e7f5ec; }
.yoy.bad { color: #b14938; }
.yoy.bad .yoy-arrow { background: #fbece8; }
.yoy.neutral { color: #87938c; }
.owner-table { min-width: 1380px; table-layout: fixed; }
.owner-table th,.owner-table td { width: 112px; }
.owner-table th:nth-child(1),.owner-table td:nth-child(1) { width: 65px; text-align: center; }
.owner-table th:nth-child(2),.owner-table td:nth-child(2) { width: 230px; }
.owner-table th:nth-child(3),.owner-table td:nth-child(3) { width: 150px; }
.owner-table th:last-child,.owner-table td:last-child { width: 190px; }
.owner-table td.num input { max-width: none; text-align: right; }
.group-link { border: 0; background: transparent; color: #187347; font: inherit; font-weight: 700; padding: 7px 0; cursor: pointer; text-align: left; }
.transaction-tools { gap: 20px; }
.transaction-tools > div:first-child { display: flex; align-items: baseline; gap: 10px; }
.result-count { color: #77837c; font-size: 12px; }
.search-box { width: min(360px,100%); display: flex; align-items: center; gap: 7px; border: 1px solid #d5ddd8; border-radius: 9px; padding: 0 10px; background: #fff; }
.search-box input { border: 0; padding: 10px 3px; min-width: 0; }
.transaction-table { width: 100%; min-width: 0; table-layout: fixed; }
.transaction-table-wrap { overflow-x: hidden; }
.transaction-table th,.transaction-table td { padding: 9px 7px; font-size: 12px; white-space: normal; overflow-wrap: anywhere; vertical-align: top; }
.transaction-table th { position: sticky; top: 0; z-index: 1; }
.transaction-table th:nth-child(1) { width: 12%; }
.transaction-table th:nth-child(2) { width: 10%; }
.transaction-table th:nth-child(3) { width: 18%; }
.transaction-table th:nth-child(4) { width: 28%; }
.transaction-table th:nth-child(5) { width: 20%; }
.transaction-table th:nth-child(6) { width: 12%; }
.transaction-table td:nth-child(6) { white-space: nowrap; overflow-wrap: normal; }
.transaction-type { display: inline-flex; padding: 4px 8px; border-radius: 12px; background: #edf3ef; color: #315540; font-size: 11px; font-weight: 700; }
@media(max-width:700px){.transaction-tools{align-items:stretch;flex-direction:column}.search-box{width:100%}}
.update-log-table { min-width: 1100px; }
.update-log-table th:nth-child(1) { width: 145px; }
.update-log-table th:nth-child(2) { width: 130px; }
.update-log-table th:nth-child(3) { width: 190px; }
.update-log-table th:nth-child(4) { width: 150px; }
.update-log-table th:nth-child(5) { width: 100px; }
.update-log-table th:nth-child(6) { width: 190px; }
.update-log-table td { white-space: normal; vertical-align: top; }
.update-log-table time { color: #66756d; font-size: 12px; }
.change-arrow { color: #8b9891; padding: 0 4px; }
.lock-screen { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at top,#315f46 0,#173d2a 45%,#102a1d 100%); }
.lock-card { width: min(420px,100%); padding: 36px; border-radius: 18px; background: #fff; box-shadow: 0 24px 70px #07150e66; }
.lock-mark { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 24px; border-radius: 14px; background: #ed7b2f; color: #fff; font-size: 19px; font-weight: 800; }
.lock-card h1 { margin: 6px 0 8px; font-size: 28px; }
.lock-card p { margin: 0 0 24px; color: #68736d; }
.lock-card label { display: grid; gap: 7px; color: #425149; font-size: 13px; font-weight: 700; }
.lock-card input { border: 1px solid #cdd7d1; background: #fff; padding: 12px; }
.lock-card .btn { width: 100%; margin-top: 8px; padding: 12px; }
.login-error { min-height: 26px; padding-top: 7px; color: #b14938; font-size: 13px; }
.lock-card label + label { margin-top: 14px; }
.signed-in-user { margin: 0 12px 6px; color: #a9c2b2; font-size: 11px; overflow-wrap: anywhere; }
.owner-status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 14px; font-size: 12px; font-weight: 750; }
.owner-status.approved { color: #187347; background: #e7f5ec; }
.owner-status.draft { color: #9a6326; background: #fff3df; }
