/* BookkSOLE v2.20.5 — page layout and data-table quality corrections.
   Visual-only rules. Business workflows, calculations, APIs and persisted data are untouched. */

/* Normalize page width and remove clipping from common content surfaces. */
#app.authenticated .pg,
#app.authenticated .pg>.card,
#app.authenticated .pg .card,
#app.authenticated .pg .p7-page-card{
  min-width:0!important;
  box-sizing:border-box!important;
}
#app.authenticated .pg:not(#home)>h1:first-child{
  margin:2px 0 6px!important;
  color:var(--g-violet-deep)!important;
  font-size:26px!important;
  line-height:1.2!important;
  font-weight:850!important;
  letter-spacing:-.04em!important;
}
#app.authenticated #tax>h1:first-child+p,
#app.authenticated #inventory>h1:first-child+p,
#app.authenticated #withholding>h1:first-child+p{
  max-width:780px!important;
  margin:0 0 20px!important;
  color:var(--g-muted)!important;
  font-size:12px!important;
  line-height:1.65!important;
}

/* Keep one scrolling layer: the table's containing viewport, not the table itself. */
#app.authenticated .pg table{
  display:table!important;
  width:100%!important;
  max-width:none!important;
  overflow:visible!important;
  white-space:normal!important;
  border-collapse:separate!important;
  border-spacing:0!important;
}
#app.authenticated .pg table th{
  padding:10px 12px!important;
  background:rgba(243,232,255,.72)!important;
  color:#5b3478!important;
  font-size:10px!important;
  font-weight:850!important;
  letter-spacing:.045em!important;
  line-height:1.35!important;
  white-space:nowrap!important;
  border-bottom:1px solid rgba(126,34,206,.16)!important;
}
#app.authenticated .pg table td{
  padding:10px 12px!important;
  color:#342442!important;
  font-size:12px!important;
  line-height:1.45!important;
  vertical-align:middle!important;
  border-bottom:1px solid rgba(126,34,206,.09)!important;
}
#app.authenticated .pg table tr:last-child td{border-bottom:0!important}
#app.authenticated .pg table tbody tr:hover td{background:rgba(243,232,255,.28)!important}
#app.authenticated .pg table .right,
#app.authenticated .pg table .amount,
#app.authenticated .pg table .numeric,
#app.authenticated .pg table [data-numeric="true"]{
  text-align:right!important;
  white-space:nowrap!important;
  font-variant-numeric:tabular-nums!important;
}

/* Explicit horizontal scrolling for every data-table family. */
#app.authenticated .party-table-wrap,
#app.authenticated .invoice-table-wrap,
#app.authenticated .table-wrap,
#app.authenticated .p5-table-wrap,
#app.authenticated #salesTable,
#app.authenticated #expenseTable,
#app.authenticated #inventoryTable,
#app.authenticated #wTable,
#app.authenticated #bbTable,
#app.authenticated #receivablesTable,
#app.authenticated #collectionHistory,
#app.authenticated #payablesTable,
#app.authenticated #payablePaymentHistory,
#app.authenticated #ownerMovementsTable,
#app.authenticated #expandedWithholdingTable,
#app.authenticated #employeeTable,
#app.authenticated #payrollTable,
#app.authenticated #taxPaymentHistory,
#app.authenticated #inventorySnapshots{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  overscroll-behavior-x:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-width:thin!important;
  scrollbar-color:rgba(126,34,206,.34) rgba(243,232,255,.55)!important;
}
#app.authenticated #home #receivablesCard,
#app.authenticated #home #payablesCard,
#app.authenticated #home #ownerMovementsCard{
  overflow:visible!important;
}
#app.authenticated .party-table-wrap::-webkit-scrollbar,
#app.authenticated .invoice-table-wrap::-webkit-scrollbar,
#app.authenticated .table-wrap::-webkit-scrollbar,
#app.authenticated .p5-table-wrap::-webkit-scrollbar,
#app.authenticated #salesTable::-webkit-scrollbar,
#app.authenticated #expenseTable::-webkit-scrollbar,
#app.authenticated #inventoryTable::-webkit-scrollbar,
#app.authenticated #wTable::-webkit-scrollbar,
#app.authenticated #bbTable::-webkit-scrollbar{height:7px}
#app.authenticated .party-table-wrap::-webkit-scrollbar-thumb,
#app.authenticated .invoice-table-wrap::-webkit-scrollbar-thumb,
#app.authenticated .table-wrap::-webkit-scrollbar-thumb,
#app.authenticated .p5-table-wrap::-webkit-scrollbar-thumb,
#app.authenticated #salesTable::-webkit-scrollbar-thumb,
#app.authenticated #expenseTable::-webkit-scrollbar-thumb,
#app.authenticated #inventoryTable::-webkit-scrollbar-thumb,
#app.authenticated #wTable::-webkit-scrollbar-thumb,
#app.authenticated #bbTable::-webkit-scrollbar-thumb{
  background:rgba(126,34,206,.36)!important;
  border-radius:99px!important;
}

/* Violet consistency in the accounting-specific pages that retain legacy inline styles. */
#app.authenticated #accountingCenter,
#app.authenticated #accounting.p5-financial-reports{
  background:transparent!important;
  color:var(--g-ink)!important;
}
#app.authenticated #accountingCenter .p4-summary-card,
#app.authenticated #accounting .p5-summary-card{
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(126,34,206,.20)!important;
  border-radius:15px!important;
  box-shadow:0 8px 24px rgba(71,28,105,.055),inset 0 1px 0 rgba(255,255,255,.9)!important;
}
#app.authenticated #accountingCenter .p4-tabs{
  border-bottom-color:rgba(126,34,206,.16)!important;
}
#app.authenticated #accountingCenter .p4-tabs button.active{
  background:rgba(243,232,255,.9)!important;
  border-color:rgba(126,34,206,.24)!important;
  color:var(--g-violet-deep)!important;
}
#app.authenticated #accountingCenter .p4-code{color:var(--g-violet-deep)!important}
#app.authenticated #accountingCenter .p4-accounting-note,
#app.authenticated .p4-source-detail,
#app.authenticated .p4-journal-heading div{
  background:rgba(250,246,255,.82)!important;
  border-color:rgba(126,34,206,.16)!important;
}
#app.authenticated #accounting .p5-report-filter-card{
  background:rgba(255,255,255,.72)!important;
  border:1px solid rgba(126,34,206,.22)!important;
  border-radius:16px!important;
  box-shadow:0 8px 24px rgba(71,28,105,.055),inset 0 1px 0 rgba(255,255,255,.9)!important;
}
#app.authenticated #accounting .p5-filter-grid input,
#app.authenticated #accounting .p5-filter-grid select{
  border-color:rgba(126,34,206,.25)!important;
  border-radius:9px!important;
}
#app.authenticated #accounting .p5-run-control .btn.primary{
  background:linear-gradient(135deg,#9333ea,#5b2182)!important;
  border-color:rgba(255,255,255,.55)!important;
  color:#fff!important;
  box-shadow:0 7px 18px rgba(126,34,206,.18)!important;
}
#app.authenticated #accounting .p5-table thead th,
#app.authenticated #accounting .p5-table tfoot th,
#app.authenticated #accounting .p5-table .p5-group-row th{
  background:rgba(243,232,255,.76)!important;
  color:#563172!important;
  border-color:rgba(126,34,206,.14)!important;
}
#app.authenticated #accounting .p5-table td,
#app.authenticated #accountingCenter .p4-table td{
  border-color:rgba(126,34,206,.10)!important;
}

/* Shared glass cards have balanced dimensions and never force their grid wider. */
#app.authenticated .pg>.card,
#app.authenticated .pg .p7-page-card,
#app.authenticated #home .dashboard-shell>.dashboard-main>.card,
#app.authenticated #home .dashboard-side>.card{
  min-width:0!important;
  box-sizing:border-box!important;
}
#app.authenticated .pg .p7-page-filter,
#app.authenticated .pg .party-directory-controls,
#app.authenticated .pg .p5-filter-grid,
#app.authenticated .pg .p4-filter-row{
  min-width:0!important;
}
#app.authenticated .pg input,
#app.authenticated .pg select,
#app.authenticated .pg textarea{max-width:100%;box-sizing:border-box!important}

@media(max-width:760px){
  #app.authenticated .pg:not(#home)>h1:first-child{font-size:23px!important}
  #app.authenticated #tax>h1:first-child+p,
  #app.authenticated #inventory>h1:first-child+p,
  #app.authenticated #withholding>h1:first-child+p{margin-bottom:16px!important}
  #app.authenticated .pg table th{padding:9px 10px!important;font-size:10px!important}
  #app.authenticated .pg table td{padding:9px 10px!important;font-size:11.5px!important}
  #app.authenticated #accountingCenter .p4-panel{padding:13px!important}
}
@media(max-width:430px){
  #app.authenticated .pg:not(#home)>h1:first-child{font-size:21px!important}
  #app.authenticated .pg table th{font-size:9.5px!important;padding:8px 9px!important}
  #app.authenticated .pg table td{font-size:11px!important;padding:8px 9px!important}
}

/* Keep official BIR source forms opaque and print-safe. */
@media screen{
  #app.authenticated .birPaper,
  #app.authenticated .birPaper table,
  #app.authenticated .birTable{
    background:#fff!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
}
@media print{
  #app.authenticated .birPaper,
  #app.authenticated .birPaper table,
  #app.authenticated .birTable{background:#fff!important;box-shadow:none!important}
}

/* Final table-brand alignment: remove legacy teal borders and link treatment. */
#app.authenticated .pg table{
  border:1px solid rgba(126,34,206,.18)!important;
  border-radius:12px!important;
}
#app.authenticated .party-table-wrap,
#app.authenticated .invoice-table-wrap,
#app.authenticated .table-wrap,
#app.authenticated .p5-table-wrap{border-radius:12px!important}
#app.authenticated .party-name-link{color:var(--g-violet-deep)!important}
#app.authenticated .party-name-link:hover{color:var(--g-violet)!important}
#app.authenticated .party-table td small{color:#78688a!important}
#app.authenticated .invoice-table{min-width:1060px!important}
#app.authenticated #accounting .p5-table{min-width:500px!important}
