/* Bookkeeping pages aligned to the accepted Command Centre / Cash Position visual system. */

/* Keep the information hierarchy consistent across Bookkeeping. */
.billable-summary-cards,.invoice-summary-cards,.expense-summary-cards,.receipt-summary-cards,.credit-summary-cards,.budget-summary-cards,.banking-summary-cards{
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:12px!important;
  margin-bottom:16px!important;
}
.billable-summary-cards>div,.invoice-summary-cards>div,.expense-summary-cards>div,.receipt-summary-cards>div,.credit-summary-cards>div,.budget-summary-cards>div,.banking-summary-cards>div{
  min-height:118px!important;
  padding:17px 54px 15px 17px!important;
  border-radius:12px!important;
  border-color:#dce6ee!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(16,43,69,.025)!important;
}
.billable-summary-cards small,.invoice-summary-cards small,.expense-summary-cards small,.receipt-summary-cards small,.credit-summary-cards small,.budget-summary-cards small,.banking-summary-cards small{
  font-size:8px!important;
  letter-spacing:.045em!important;
  color:#65798b!important;
}
.billable-summary-cards strong,.invoice-summary-cards strong,.expense-summary-cards strong,.receipt-summary-cards strong,.credit-summary-cards strong,.budget-summary-cards strong,.banking-summary-cards strong{
  font-size:20px!important;
  margin:12px 0 5px!important;
}
.billable-summary-cards span,.invoice-summary-cards span,.expense-summary-cards span,.receipt-summary-cards span,.credit-summary-cards span,.budget-summary-cards span,.banking-summary-cards span{
  font-size:8.5px!important;
}

/* The registers should read as a set of clean cards, not one large admin box. */
.billable-panel,.invoice-register,.expense-panel,.receipt-panel,.budget-panel,.banking-panel{
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  padding:0!important;
  overflow:visible!important;
}

/* One quiet utility/search surface under the cards. */
.billable-search,.invoice-search,.expense-search,.receipt-search,.budget-search,.banking-toolbar,.banking-search{
  margin:0 0 12px!important;
  padding:12px 14px!important;
  border:1px solid #dce6ee!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(16,43,69,.025)!important;
}
.billable-search input,.invoice-search input,.expense-search input,.receipt-search input,.budget-search input,.banking-toolbar input,.banking-toolbar select{
  height:38px!important;
  border:1px solid #d6e1e9!important;
  border-radius:8px!important;
  background:#fff!important;
  font-size:10px!important;
}
.billable-search label>span,.expense-search label>span,.receipt-search label>span,.budget-search label>span,.banking-toolbar label>span{
  font-size:7.8px!important;
  font-weight:800!important;
  color:#61778a!important;
}
.billable-filter-note,.expense-filter-note,.receipt-filter-note,.budget-filter-note,.banking-filter-note,.credit-filter-note{
  display:none!important;
}

/* Each data group becomes its own Cash Position-style panel. */
.billable-section,.invoice-group,.expense-section,.receipt-section,.banking-section{
  margin:0 0 14px!important;
  padding:0!important;
  border:1px solid #dce6ee!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(16,43,69,.025),0 8px 24px rgba(16,43,69,.025)!important;
  overflow:hidden!important;
}
.billable-section+.billable-section,.expense-section+.expense-section,.receipt-section+.receipt-section,.banking-section+.banking-section{
  border-top:1px solid #dce6ee!important;
}
.billable-section-head,.invoice-group-head,.expense-section-head,.receipt-section-head,.banking-section-head{
  min-height:48px!important;
  margin:0!important;
  padding:13px 15px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  background:#fff!important;
  border-bottom:1px solid #e6edf2!important;
}
.billable-section-head h2,.invoice-group-head h2,.expense-section-head h2,.receipt-section-head h2,.banking-section-head h2{
  margin:0!important;
  font-size:13px!important;
  color:var(--ink)!important;
}
.billable-section-head span,.invoice-group-head span,.expense-section-head span,.receipt-section-head span,.banking-section-head span{
  font-size:8px!important;
  color:var(--muted)!important;
}

/* Remove the old blue group bands and let the table itself carry the structure. */
.billable-section-head,.invoice-group-head{background:#fff!important}
.billable-table,.invoice-table,.expense-table,.receipt-table,.banking-table{
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
}
.expense-table,.receipt-table{overflow:auto!important}
.billable-table{min-width:1040px!important}
.invoice-group{min-width:0!important}
.invoice-table{min-width:1055px!important}

/* Shared table rhythm. */
.billable-head,.invoice-head,.expense-head,.receipt-head,.credit-activity-head,.budget-head,.banking-head{
  background:#f5f8fb!important;
  color:#5e7386!important;
}
.billable-row,.invoice-row,.expense-row,.receipt-row,.credit-activity-row,.budget-row,.banking-row{
  border-bottom:1px solid #e7edf2!important;
}
.billable-row:not(.billable-head),.invoice-row:not(.invoice-head),.expense-row[data-expense-row],.receipt-row[data-receipt-row],.credit-activity-row[data-credit-activity],.budget-row[data-budget-row],.banking-row:not(.banking-head){
  min-height:48px!important;
  background:#fff!important;
}
.billable-row:not(.billable-head):hover,.invoice-row:not(.invoice-head):hover,.expense-row[data-expense-row]:hover,.receipt-row[data-receipt-row]:hover,.credit-activity-row[data-credit-activity]:hover,.budget-row[data-budget-row]:hover,.banking-row:not(.banking-head):hover{
  background:#f8fbfd!important;
}

/* Status is a quick signal, not a large label. */
.billable-row em,.invoice-row em,.banking-row>em,.receipt-link,.credit-account-card-head em,.credit-account-strip em{
  border-radius:999px!important;
  padding:4px 7px!important;
  font-size:7.2px!important;
  font-weight:800!important;
  line-height:1!important;
}

/* Billables */
.billable-panel{overflow:visible!important}
.billable-section{overflow-x:auto!important}
.billable-section-head{position:sticky;left:0;z-index:1}

/* Invoices */
.invoice-search{display:flex!important;align-items:center!important}
.invoice-search button{height:38px!important;border-radius:8px!important;padding:0 12px!important;font-size:8.5px!important}
.invoice-group{overflow:auto!important}
.invoice-group-head{position:sticky;left:0;z-index:1}

/* Expenses / Receipts */
.expense-section,.receipt-section{overflow:hidden!important}
.expense-section-head,.receipt-section-head{margin-bottom:0!important}
.expense-row,.receipt-row{padding-top:9px!important;padding-bottom:9px!important}
.expense-alert,.credit-alert{
  margin-bottom:12px!important;
  padding:10px 13px!important;
  border-radius:10px!important;
  box-shadow:none!important;
}

/* Credit Accounts uses the same clean card hierarchy. */
.credit-accounts-list,.credit-activity-panel,.credit-account-card,.credit-account-strip{
  border-color:#dce6ee!important;
  border-radius:12px!important;
  box-shadow:0 1px 2px rgba(16,43,69,.025)!important;
}
.credit-accounts-list{padding:15px!important}
.credit-account-card{padding:15px!important}
.credit-account-card-head h2{font-size:17px!important}
.credit-account-values{margin:15px 0 9px!important}
.credit-limit-bar{height:5px!important}
.credit-activity-panel{overflow:hidden!important}
.credit-activity-search{padding:12px 14px!important}
.credit-activity-table{padding:0!important}
.credit-activity-row{padding-left:14px!important;padding-right:14px!important}

/* Budget should look like a summary plus one main Cash Position-style register. */
.budget-rule{
  margin-bottom:12px!important;
  padding:10px 13px!important;
  border-radius:10px!important;
  background:#f7fbfd!important;
  box-shadow:none!important;
}
.budget-table{
  margin:0!important;
  padding:0!important;
  border:1px solid #dce6ee!important;
  border-radius:12px!important;
  background:#fff!important;
  box-shadow:0 1px 2px rgba(16,43,69,.025),0 8px 24px rgba(16,43,69,.025)!important;
  overflow:auto!important;
}
.budget-row{padding-left:14px!important;padding-right:14px!important}

/* Banking accepted layout: controls together, then two separate transaction cards. */
.banking-heading{margin-bottom:14px!important}
.banking-summary-cards{margin-top:0!important}
.banking-toolbar{
  display:grid!important;
  grid-template-columns:minmax(190px,1fr) minmax(190px,1fr) auto auto!important;
  gap:10px!important;
  align-items:end!important;
}
.banking-toolbar>label{min-width:0!important}
.banking-toolbar .banking-register-search-inline{min-width:0!important}
.banking-balance-edit{
  display:grid!important;
  grid-template-columns:150px 150px auto!important;
  gap:8px!important;
  align-items:end!important;
}
.banking-balance-edit label{min-width:0!important}
.banking-balance-edit input{width:100%!important}
.banking-clear-inline{
  align-self:end!important;
  height:38px!important;
  border:0!important;
  background:transparent!important;
  color:#5b7184!important;
  padding:0 4px!important;
  font-size:8px!important;
  font-weight:750!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
.banking-section{overflow:hidden!important}
.banking-section-head{padding:13px 15px!important}
.banking-row{grid-template-columns:110px minmax(260px,2fr) 120px 120px 120px!important}
.banking-row>em{margin-left:10px!important}
.banking-progress{height:4px!important;margin-top:auto!important}

/* Make action buttons feel like the Command Centre controls. */
.heading-actions .people-primary,.heading-actions .secondary,.banking-toolbar .secondary,.expense-alert button,.credit-alert button{
  border-radius:8px!important;
  font-size:9px!important;
}

@media(max-width:1100px){
  .banking-toolbar{grid-template-columns:1fr 1fr!important}
  .banking-balance-edit{grid-column:1/-1!important;justify-content:start!important}
  .banking-clear-inline{justify-self:start!important}
}
@media(max-width:760px){
  .billable-summary-cards,.invoice-summary-cards,.expense-summary-cards,.receipt-summary-cards,.credit-summary-cards,.budget-summary-cards,.banking-summary-cards{grid-template-columns:repeat(2,minmax(0,1fr))!important}
  .banking-toolbar{grid-template-columns:1fr!important}
  .banking-balance-edit{grid-template-columns:1fr!important;grid-column:auto!important}
}
