

.saved-table{min-width:880px;width:100%;table-layout:fixed;border-collapse:separate;border-spacing:0;user-select:none}
.saved-table th,.saved-table td{box-sizing:border-box}
.saved-table th{text-align:left!important;padding:8px 10px;background:#eef4f2}
.saved-table th button{border:0;background:none;padding:4px 0;min-height:26px;font-size:11px;color:#5e7975}
.saved-table td{padding:10px 10px;text-align:left!important;border-right:1px solid #eff3f2;border-bottom:1px solid #eff3f2;cursor:cell;font-size:13px;vertical-align:middle}
.saved-table td.money{text-align:right!important}
.income-amount{color:var(--primary)!important;font-weight:600}
.expense-amount{color:#b13a3a!important;font-weight:600}
.saved-table th:first-child,.saved-table td:first-child{width:38px;min-width:38px;max-width:38px;text-align:center!important}
.saved-table th:nth-child(2),.saved-table td:nth-child(2){width:95px;min-width:95px;max-width:95px}
.saved-table th:nth-child(3),.saved-table td:nth-child(3){width:175px;min-width:175px;max-width:175px;white-space:normal;word-break:keep-all;overflow-wrap:break-word}
.saved-table th:nth-child(4),.saved-table td:nth-child(4){width:110px;min-width:110px;max-width:110px}
.saved-table th:nth-child(5),.saved-table td:nth-child(5){width:105px;min-width:105px;max-width:105px}
.saved-table th:nth-child(6),.saved-table td:nth-child(6){width:105px;min-width:105px;max-width:105px}
.saved-table th:nth-child(7),.saved-table td:nth-child(7){min-width:160px;width:auto;word-break:keep-all;overflow-wrap:anywhere}
.saved-table th:last-child,.saved-table td:last-child{width:68px;min-width:68px;max-width:68px;text-align:center!important;border-right:0}
.saved-table th:first-child,.saved-table td:first-child{position:sticky;left:0;z-index:2;background-color:#fff!important}
.saved-table th:nth-child(2),.saved-table td:nth-child(2){position:sticky;left:38px;z-index:2;background-color:#fff!important;border-right:2px solid #cbdcd6}
.saved-table thead th:first-child,.saved-table thead th:nth-child(2){background-color:#eef4f2!important;z-index:5}
.saved-table tr.selected-row td:first-child,.saved-table tr.selected-row td:nth-child(2){background-color:#dcefeb!important}
.saved-table input[type=checkbox]{width:15px;height:15px;accent-color:var(--primary);cursor:pointer}
.saved-table .sub{display:block}
.saved-table .saved-note{white-space:pre-wrap;overflow-wrap:anywhere}
.saved-table tr.selected-row td{background:#dcefeb;border-bottom-color:#b4d6ce}
.saved-table tr.selected-row td:first-child{box-shadow:inset 3px 0 #277e72}
.transfer-badge{display:flex;flex-direction:column;gap:2px;font-size:11.5px;line-height:1.35}
.transfer-badge .from,.transfer-badge .to{color:var(--ink);font-weight:600;white-space:normal}
.transfer-badge .arrow{color:var(--primary);font-weight:700;font-size:10px;margin-right:3px}
.card.income-card{border-top:3px solid var(--primary)}.card.income-card strong{color:var(--primary)}
.card.expense-card{border-top:3px solid #b13a3a}.card.expense-card strong{color:#b13a3a}
.card.balance-card{border-top:3px solid #3d5b58}
.selection-guide{padding:8px 14px!important;margin:0;font-size:11px;background:#f7faf9;border-bottom:1px solid var(--line)}
.selection-count{padding:10px 16px;border-top:1px solid var(--line);font-size:11px;color:#56756e}
.saved-ledger .table-scroll{max-height:70vh}
.saved-table thead{position:sticky;top:0;z-index:3;background:#eef4f2}
.entry-table select{min-width:0;width:100%;text-overflow:ellipsis}
.entry-table td:nth-child(3){width:190px;min-width:190px}
.entry-table .transfer-recipient{display:flex;flex-direction:column;position:static;gap:4px;margin:6px 0 0;font-size:10px;color:var(--muted)}
.entry-table td:has(.transfer-recipient){min-width:210px}
.entry-table td:has(.transfer-recipient)>select{display:block}
.entry-table .transfer-recipient select{position:static;width:100%;min-width:0}
.ledger-filters{display:flex;align-items:end;gap:10px;flex-wrap:wrap;background:white;padding:16px;border:1px solid var(--line);border-radius:9px;margin-bottom:16px}
.ledger-filters label{display:flex;flex-direction:column;gap:5px;font-size:11px;color:#6b7c81}
.ledger-filters input,.ledger-filters select{font-size:12px;padding:7px;height:36px}
.ledger-filters input[type=date]{width:145px}
.ledger-filters .search-field{flex:1;min-width:140px}
.ledger-filters .form-error{width:100%;margin:0}
.range-divider{align-self:center;margin-top:16px}
.ledger-toolbar{display:flex;justify-content:space-between;gap:12px;align-items:center;margin-bottom:12px}
.ledger-toolbar .muted{font-size:11px;margin-left:12px}
.inline-ledger .entry-table{min-width:850px}
.inline-ledger .entry-table td:last-child{width:40px;min-width:40px}
.inline-ledger .entry-table td:nth-child(6){min-width:220px}
.inline-ledger .entry-table td:nth-child(7){width:40px}
.inline-ledger .bulk-tools{flex-wrap:wrap}
.inline-ledger .bulk-tools label{font-size:11px}
.inline-ledger .bulk-tools input{font-size:12px;height:34px}
.inline-ledger .modal-head{padding:14px 18px}
.inline-ledger .modal-head h2{font-size:15px}
.inline-ledger .modal-head p{font-size:11px}
.inline-ledger .modal-footer{position:static}
.inline-ledger #bulk-grid{max-height:38vh}
.page-ledger .month-badge{font-size:10px;white-space:nowrap}
.page-ledger h1{flex-wrap:wrap}
.page-ledger .page-head .actions{gap:6px}
.page-ledger .page-head .button,.page-ledger #month-view{font-size:11px}
.page-ledger .page-head input[type=month]{max-width:140px}
.page-ledger .cards{margin-bottom:13px}
.clipboard-helper{position:fixed;left:-10000px;top:0;width:1px;height:1px}
.inline-ledger .entry-table{min-width:1080px}.inline-ledger .entry-table td:nth-child(5),.inline-ledger .entry-table td:nth-child(6){width:130px;min-width:130px}.inline-ledger .entry-table td:nth-child(7){width:auto;min-width:220px}.entry-table input[data-field=income],.entry-table input[data-field=expense]{text-align:right}.entry-table input:disabled{background:#eef2f1}
.column-filter-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0 0 15px;color:var(--muted);font-size:11px}.column-filter-bar button{font-size:11px;min-height:30px;padding:5px 9px}.saved-table th button[data-column]{width:100%;display:flex;justify-content:space-between;gap:8px}.saved-table th button.column-active{color:var(--primary);font-weight:800}.saved-table th:has(.column-active){background:#d9ede7}.column-filter-panel{position:fixed;z-index:60;background:white;border:1px solid #cbdcd6;border-radius:9px;box-shadow:0 10px 36px #153c3830;padding:14px;max-height:calc(100vh - 24px);overflow:auto;font-size:12px}.column-filter-title{display:flex;justify-content:space-between;align-items:center;margin-bottom:9px}.column-filter-title button{min-height:24px;padding:0 7px;border:0;font-size:20px}.column-sort{display:flex;gap:6px}.column-sort button{flex:1;font-size:11px;min-height:32px;padding:6px}.column-filter-panel .clear-column{display:block;border:0;background:none;color:var(--primary);padding:8px 0;font-size:11px;min-height:30px}.column-filter-panel>input{width:100%;height:34px;font-size:12px}.column-select-actions{display:flex;gap:3px;margin:7px 0}.column-select-actions button{border:0;padding:4px;font-size:10px;min-height:25px;color:var(--primary)}.column-values{max-height:190px;min-height:55px;overflow:auto;border:1px solid var(--line);border-radius:4px;padding:5px}.column-values label{display:flex;align-items:center;gap:8px;padding:5px;cursor:pointer;word-break:break-word}.column-values label:hover{background:#edf6f3}.column-values input{flex:none;width:15px;height:15px;accent-color:var(--primary)}.column-filter-count{margin:7px 0;color:var(--muted);font-size:10px}.column-filter-footer{display:flex;justify-content:flex-end;gap:6px;padding-top:6px;border-top:1px solid var(--line)}.column-filter-footer button{font-size:11px;min-height:32px;padding:6px 14px}
.period-picker{position:relative}.period-picker>summary{list-style:none;display:flex;align-items:center;gap:12px;padding:9px 13px;border:1px solid #dce3e6;border-radius:7px;background:white;cursor:pointer;min-height:39px;font-size:12px;font-weight:600}.period-picker>summary::-webkit-details-marker{display:none}.period-picker[open]>summary{border-color:var(--primary);color:var(--primary)}.period-menu{position:absolute;right:0;top:calc(100% + 8px);z-index:30;width:340px;max-width:calc(100vw - 86px);padding:18px;border:1px solid var(--line);border-radius:10px;background:white;box-shadow:0 12px 40px #153c3826}.period-menu label{display:flex;flex-direction:column;gap:6px;font-size:11px;color:#647c77}.period-menu form:first-child{display:flex;align-items:end;gap:10px;padding-bottom:16px;border-bottom:1px solid var(--line)}.period-menu form:first-child label{flex:1}.period-menu input{width:100%;font-size:12px!important;max-width:none!important}.period-menu form:last-child{padding-top:16px}.period-menu b{font-size:12px}.period-dates{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:12px 0}.period-menu .primary{width:100%}.page-ledger .page-head .actions{width:auto}
@media(max-width:760px){.ledger-toolbar{flex-direction:column;align-items:stretch}.ledger-toolbar .muted{display:block;margin:5px 0}.ledger-filters{gap:8px;padding:12px}.ledger-filters input[type=date]{width:130px}.ledger-filters .range-divider{display:none}.saved-ledger .table-scroll{max-height:60vh}.inline-ledger .bulk-tools .muted{width:100%;font-size:9px}.page-ledger .month-badge{font-size:9px}}

table.column-layout {display:block;width:100%;border-spacing:0}
.column-layout thead,.column-layout tbody {display:block}
.column-layout tr {display:grid;grid-template-columns:var(--tracks);align-items:stretch}
.column-layout tr[hidden] {display:none}
table.column-layout tr>:is(th,td):nth-child(n) {grid-row:1;width:auto;min-width:0;max-width:none;box-sizing:border-box;align-content:center;overflow-wrap:anywhere}
.column-layout th {position:relative;cursor:grab;text-align:left!important}
.column-layout th.amount-heading {text-align:right!important}
.column-layout td {text-align:left!important}
.column-layout td:has(.money),.column-layout td.money {text-align:right!important}
.column-layout td:last-child:has(button:only-child) {text-align:center!important}
.column-layout th [data-table-column] {border:0;background:transparent;color:inherit;padding:3px 0;min-height:24px}
.column-layout th [data-table-column].primary {color:var(--primary);text-decoration:underline}
.column-grip {position:absolute;right:0;top:0;bottom:0;width:8px;cursor:col-resize;touch-action:none;user-select:none;z-index:1}
.column-grip::after {content:'';position:absolute;right:2px;top:23%;height:54%;border-right:1px solid #cbd8d6}
.column-grip:hover,.column-grip:focus-visible {background:#bbd9d4}
.column-layout input:not([type=checkbox]),.column-layout select,.column-layout textarea {max-width:100%;min-width:0}

.month-navigation {display:inline-flex;align-items:center;gap:4px}
.month-navigation>button {min-width:34px;font-size:20px;line-height:1}
.month-navigation .period-menu>.period-dates {margin-top:12px}

.column-layout td:has(.recent-payment-month) {white-space:normal;overflow-wrap:anywhere}
.column-layout td:has(.recent-payment-month) .tag {max-width:100%;white-space:normal;box-sizing:border-box}
.column-layout td .recent-payment-month {display:block;margin-top:4px;white-space:normal;overflow-wrap:anywhere;line-height:1.35}
.column-layout td .sub {white-space:nowrap}

/* Keep header labels, status badges and actions inside resized display columns. */
table[data-filter-table].column-layout tr > :is(td,th) {
  white-space:normal;
  overflow-wrap:anywhere;
  padding-inline:min(1vw,10px);
}
table[data-filter-table].column-layout :is(td,th) :is(button,.money,.tag,.sub) {
  box-sizing:border-box;
  min-width:0;
  max-width:100%;
  white-space:normal;
  overflow-wrap:anywhere;
}
table[data-filter-table].column-layout td button {padding-inline:4px}
table[data-filter-table].column-layout th button {padding-inline:0}

.workspace .topbar {height:36px;min-height:36px}
.workspace main {padding-top:12px}
.workspace .page-head {margin-bottom:10px;gap:8px 16px;flex-direction:row;align-items:center;flex-wrap:wrap}
.workspace .page-head .eyebrow,.workspace .page-head p,.workspace .page-head .month-badge {display:none}
.workspace .page-head h1 {margin:0;font-size:22px}
.workspace .page-head .actions,.header-team {display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.workspace .cards {gap:8px;margin-bottom:10px}
.workspace .cards .card {min-height:0;padding:10px 14px}
.workspace .card strong {margin:4px 0 0;font-size:22px}
.workspace .card p {margin:3px 0 0}
.workspace .card p:empty,.workspace .card-label>span {display:none}
.workspace .filters,.workspace .column-filter-bar,.workspace .ledger-toolbar {margin-block:6px}

.page-members .target-directory {width:100%;min-width:0}
.page-members .target-directory .table-scroll {width:100%;overflow:auto;border-bottom:0}
.page-members .target-directory .column-layout tr>td {text-align:left}.page-members .target-directory:has(>.table-scroll)::after {display:none}
.directory-panels {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,360px),1fr));gap:12px;align-items:start}
.directory-panels .panel {min-width:0}
.target-summary {display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:10px 14px;margin:12px 0;border:1px solid var(--line);border-radius:8px;background:white}
.target-summary span {color:#52646e}.target-summary button {margin-inline-start:auto}
.directory-results {display:grid;grid-template-columns:1fr 1fr;gap:14px;flex:1;min-height:240px;max-height:400px;overflow-y:auto;padding:2px;margin:0}
@media (max-width:600px){.directory-results{grid-template-columns:1fr;max-height:320px}}
.directory-column {display:flex;flex-direction:column;background:#fbfcfc;border:1px solid var(--line);border-radius:8px;overflow:hidden}
.directory-col-head {display:flex;align-items:center;justify-content:space-between;padding:9px 12px;background:#f0f4f4;border-bottom:1px solid var(--line);position:sticky;top:0;z-index:2}
.directory-col-head h3 {margin:0;font-size:12px;font-weight:700;color:var(--ink)}
.directory-badge {font-size:11px;font-weight:600;background:#dbe7e5;color:var(--primary);padding:1px 7px;border-radius:10px}
.directory-list {list-style:none;margin:0;padding:6px;display:flex;flex-direction:column;gap:3px;overflow-y:auto}
.directory-item {display:flex;align-items:center;justify-content:space-between;gap:8px;padding:6px 10px;border-radius:6px;background:white;border:1px solid #f0f3f4;transition:background .15s,border-color .15s}
.directory-item:hover {background:#f4f8f7;border-color:#dce7e5}
.directory-name {font-size:13px;font-weight:500;color:var(--ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.directory-actions {display:flex;align-items:center;gap:2px;flex-shrink:0}
.directory-btn {padding:2px 7px;min-height:25px;font-size:11px;border-radius:4px}
.directory-empty {padding:30px 12px;text-align:center;color:var(--muted);font-size:12px}
.directory-search-wrapper {position:relative;display:flex;align-items:center}
.directory-search-icon {position:absolute;left:12px;font-size:13px;pointer-events:none;opacity:.6}
.directory-search-wrapper input {width:100%;height:40px;padding:8px 12px 8px 34px;border:1px solid var(--line);border-radius:8px;font-size:13px;background:#fafcfb;transition:border-color .15s,background-color .15s}
.directory-search-wrapper input:focus {background:#fff;border-color:var(--primary)}
dialog.target-directory-modal {width:min(720px,calc(100vw - 32px))!important}
dialog.target-directory-modal .modal-body {padding:18px 22px;max-height:calc(88vh - 80px);overflow:hidden;display:flex;flex-direction:column;gap:14px}
.directory-form-box {background:#f7faf9;border:1px solid #d9e6e4;border-radius:8px;padding:12px 14px;display:flex;flex-direction:column;gap:8px;transition:background .2s,border-color .2s}
.directory-form-box.editing {background:#fff9f0;border-color:#eed6b0}
.directory-form-head {display:flex;align-items:center;justify-content:space-between}
.directory-form-title {display:flex;align-items:baseline;gap:8px}
.directory-form-title strong {font-size:12px;color:var(--ink)}
.directory-form-title .sub {font-size:11px;color:var(--muted);margin-top:0}
.directory-form-row {display:flex;align-items:center;gap:8px}
.directory-form-row select {width:115px;flex-shrink:0;height:38px;font-size:13px}
.directory-form-row input {flex:1;height:38px;font-size:13px}
.directory-form-row button.primary {height:38px;padding:0 16px;flex-shrink:0;min-height:38px}

.column-layout th [data-table-column] {white-space:nowrap;display:inline-flex;align-items:center;gap:4px}
.member-actions {display:flex;align-items:center;gap:4px;white-space:nowrap}
.page-members .column-layout tr>td:first-child {position:sticky;left:0;z-index:2;background-color:#fff!important;border-right:2px solid #e0eae6}
.page-members .column-layout thead tr>th:first-child {position:sticky;left:0;z-index:5;background-color:#eef4f2!important;border-right:2px solid #cbdcd6}
dialog input[type=month] {width:100%;max-width:100%}
.salary-calculator .project-role {display:flex;align-items:center;gap:12px;margin-bottom:8px}
.salary-calculator .lead-checkbox {display:inline-flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap;margin-top:18px}
dialog.member-bulk-modal {width:min(680px,calc(100vw - 32px))!important}
.member-bulk-textarea {width:100%;border:1px solid var(--line);border-radius:6px;padding:10px;font-family:monospace;font-size:13px;line-height:1.5;resize:vertical;box-sizing:border-box}
.member-bulk-hint {margin:8px 0 12px;font-size:12px;color:var(--muted)}
.member-bulk-preview-bar {margin:10px 0}
.salary-history-title {font-size:11px;font-weight:600;color:var(--muted);margin-bottom:6px}

.page-overview .cards {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:1180px){.page-overview .cards {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.page-overview .cards {grid-template-columns:1fr}}
.notice-assign {display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
[data-action="team-ledger"] {white-space:nowrap}

.access-controls-row {display:flex;gap:12px;align-items:end;flex-wrap:wrap;width:100%}
.access-user {display:flex;flex-direction:column;gap:12px;padding:16px 20px;border-top:1px solid var(--line)}
.access-user.my-account {background:#fafcfb}
.access-user-main {display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;width:100%}
.user-meta b {font-size:14px;color:var(--ink);display:inline-flex;align-items:center;gap:6px}
.user-meta small {display:block;font-size:12px;color:var(--muted)}
.user-controls {display:flex;align-items:end;gap:10px;border:0;padding:0;margin:0;flex-wrap:wrap}
.my-account-status {display:flex;align-items:center;gap:8px}
.view-team-options {background:#f8faf9;border:1px solid #e2ebe8;border-radius:8px;padding:10px 14px;width:100%;box-sizing:border-box}
.view-team-options b {display:block;font-size:12px;color:var(--ink);margin-bottom:6px}
.view-team-list {display:flex;align-items:center;gap:14px;flex-wrap:wrap;margin-bottom:4px}
.view-team-options label {display:inline-flex!important;flex-direction:row!important;align-items:center;gap:6px;font-size:13px;cursor:pointer}
.view-team-options label.disabled-choice {opacity:0.5;cursor:default}
.view-team-options small {display:block;font-size:11px;color:var(--muted);margin-top:4px}
.disabled-field {opacity:0.55}

.page-access #access-summary-cards {margin-bottom:16px}
.page-access .cards {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:1180px){.page-access .cards {grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.page-access .cards {grid-template-columns:1fr}}

.access-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;align-items:start}
@media (max-width:1080px){.access-grid {grid-template-columns:1fr}}
.access-col {display:flex;flex-direction:column;gap:16px;min-width:0}

.access-backup-grid {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;width:100%}
@media (max-width:500px){.access-backup-grid {grid-template-columns:1fr}}
.access-backup-footer {display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px;width:100%;flex-wrap:wrap}
.access-backup-footer .backup-desc {font-size:11px;color:var(--muted);flex:1;min-width:180px;margin:0}
.backup-status-wrap {padding:10px 14px;margin:0 22px 16px;background:#f4f8f7;border:1px solid #dbe7e4;border-radius:6px}
.backup-status-wrap .panel-copy {margin:0;font-size:12px;color:#244641}
.page-access .panel-copy {word-break:keep-all}
