/* Financial pages: keep operational detail while following the Figma card hierarchy. */
body[data-page="finance"] .finance-inline-summary{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px;margin:0 0 18px;
}
body[data-page="finance"] .finance-inline-summary span{
  display:flex;min-width:0;min-height:86px;flex-direction:column;justify-content:center;gap:8px;
  padding:16px 18px;border:1px solid #e9edf5;border-radius:12px;background:#fff;color:#8294b2;
}
body[data-page="finance"] .finance-inline-summary b{color:#253552;font-size:19px;overflow-wrap:anywhere}
body[data-page="finance"] .income-records>.card,
body[data-page="finance"] .finance-pay-progress,
body[data-page="finance"] .finance-employee-detail,
body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail){
  background:#fff;border:1px solid #e9edf5;border-radius:12px;box-shadow:none;
}
body[data-page="finance"] .income-records .table th,
body[data-page="finance"] .finance-pay-progress~.card .table th{background:#fff;color:#8294b2;font-weight:600}
body[data-page="finance"] .finance-employee-detail .section-head{align-items:flex-start;gap:14px}
body[data-page="finance"] .finance-employee-detail .section-head h2{color:#253552}
body[data-page="finance"] .finance-pay-formula>div{background:#fff;border-color:#e9edf5;border-radius:9px}
body[data-page="finance"] .finance-pay-formula>div:not(.finance-formula-total) strong{color:#253552}
body[data-page="finance"] .finance-pay-formula .finance-formula-total{background:color-mix(in srgb,var(--company-accent,#4376f6) 8%,white);border-color:color-mix(in srgb,var(--company-accent,#4376f6) 22%,white)}
body[data-page="finance"] .finance-employee-actions{display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap}
body[data-page="finance"] .income-records .employee-row-actions .danger{color:#c74750}
@media(max-width:700px){
  body[data-page="finance"] .finance-inline-summary{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px}
  body[data-page="finance"] .finance-inline-summary span{min-height:76px;padding:13px}
  body[data-page="finance"] .finance-inline-summary span:last-child{grid-column:1/-1}
  body[data-page="finance"] .finance-employee-detail .section-head{flex-wrap:wrap}
  body[data-page="finance"] .finance-employee-actions{justify-content:flex-start}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table-wrap{overflow:visible}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table,
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table tbody{display:block;width:100%;min-width:0!important}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table colgroup,
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table thead{display:none}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 12px;padding:14px;margin-bottom:10px;border:1px solid #e8edf5;border-radius:12px}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td{display:flex;justify-content:space-between;align-items:baseline;gap:8px;min-width:0;padding:7px 0;border:0;white-space:normal;text-align:right;overflow-wrap:anywhere}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td::before{color:#8294b2;font-size:11px;text-align:left}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(1){grid-column:1/-1;display:block;text-align:left;font-weight:600}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(2)::before{content:"ก่อนหัก"}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(3)::before{content:"ยอดหักรวม"}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(4)::before{content:"สุทธิ"}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(5)::before{content:"จ่ายแล้ว"}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(6)::before{content:"ค้างจ่าย"}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(7)::before{content:"สถานะ"}
  body[data-page="finance"] .finance-pay-progress~.card:not(.finance-employee-detail) .table td:nth-child(8){grid-column:1/-1;justify-content:flex-start}
}
