/* TIAM v592 — financial claim flow UI hardening.
   Loaded last on purpose: this file owns only the payment-verification request cards
   and the financial-buyer helper introduced by v591. */
body[data-page="reconciliation"] .pv-request{
  background:#fff;border:1px solid #cfdde6;border-radius:14px;padding:11px 14px;
  margin-bottom:9px;box-shadow:0 2px 8px rgba(24,58,82,.035);
  transition:border-color .15s ease,box-shadow .15s ease
}
body[data-page="reconciliation"] .pv-request:hover{border-color:#a9c0cf;box-shadow:0 5px 16px rgba(24,58,82,.06)}
body[data-page="reconciliation"] .pv-request.is-final{border-inline-start:4px solid #b77a22}
body[data-page="reconciliation"] .pv-request-summary{
  display:grid;grid-template-columns:minmax(220px,1.2fr) minmax(390px,2fr) auto;
  align-items:center;gap:10px
}
body[data-page="reconciliation"] .pv-request-identity{display:grid;gap:2px;min-width:0;text-align:right}
body[data-page="reconciliation"] .pv-channel{font-size:14px;font-weight:850;color:#315e7d}
body[data-page="reconciliation"] .pv-request-identity>b{
  font-size:18px;line-height:1.35;color:#0b2d49;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
body[data-page="reconciliation"] .pv-request-identity>small{font-size:14px;font-weight:750;color:#4c687b}
body[data-page="reconciliation"] .pv-request-keyfacts{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;min-width:0
}
body[data-page="reconciliation"] .pv-request-keyfacts>span{
  display:grid;gap:2px;min-height:50px;padding:7px 9px;border:1px solid #dce6ed;border-radius:9px;background:#f7fafc
}
body[data-page="reconciliation"] .pv-request-keyfacts small{font-size:13.5px;font-weight:800;color:#506b7e}
body[data-page="reconciliation"] .pv-request-keyfacts b{font-size:16px;color:#102f49;white-space:nowrap}
body[data-page="reconciliation"] .pv-request-keyfacts em{font-style:normal;font-size:13.5px;color:#526b7d}
body[data-page="reconciliation"] .pv-status{
  display:inline-flex;align-items:center;justify-content:center;min-height:36px;padding:0 12px;
  border-radius:999px;font-size:14px;font-weight:900;white-space:nowrap
}
body[data-page="reconciliation"] .pv-status.is-requested,
body[data-page="reconciliation"] .pv-status.is-invoice{background:#fff1d8;color:#74470b;border:1px solid #e9c679}
body[data-page="reconciliation"] .pv-status.is-approved,
body[data-page="reconciliation"] .pv-status.is-done{background:#e6f5ec;color:#185a3b;border:1px solid #9bceb0}
body[data-page="reconciliation"] .pv-status.is-final{background:#eaf2ff;color:#254f85;border:1px solid #aac3e4}
body[data-page="reconciliation"] .pv-status.is-returned{background:#fff0ef;color:#8d2b27;border:1px solid #e5aaa5}
body[data-page="reconciliation"] .pv-request-meta-line{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-top:7px
}
body[data-page="reconciliation"] .pv-request-meta-line>span{
  display:flex;align-items:center;gap:7px;min-width:0;min-height:36px;padding:5px 9px;
  border:1px solid #e2e9ee;border-radius:8px;background:#fbfcfd
}
body[data-page="reconciliation"] .pv-request-meta-line small{font-size:13px;font-weight:800;color:#5b7486;white-space:nowrap}
body[data-page="reconciliation"] .pv-request-meta-line b{
  font-size:14.5px;color:#17374f;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
body[data-page="reconciliation"] .pv-request-meta-line em{font-style:normal;font-size:13px;font-weight:750;color:#587184}
body[data-page="reconciliation"] .pv-self{display:inline-flex;padding:2px 6px;border-radius:999px;background:#fff1d8;color:#764b10}
body[data-page="reconciliation"] .pv-financial-name-warning{
  display:flex;align-items:center;gap:8px;margin-top:7px;padding:7px 10px;
  border:1px solid #e8b7b1;border-radius:8px;background:#fff4f2;color:#76241f
}
body[data-page="reconciliation"] .pv-financial-name-warning b{font-size:14px}
body[data-page="reconciliation"] .pv-financial-name-warning span{font-size:13.5px;color:#68413e}
body[data-page="reconciliation"] .pv-match-card{
  display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:7px;padding:7px 10px;
  border:1px solid #d7e3ea;border-radius:9px;background:#f7fafb
}
body[data-page="reconciliation"] .pv-match-card.is-strong{background:#edf8f4;border-color:#acd6c6}
body[data-page="reconciliation"] .pv-match-card.is-possible{background:#fff8e9;border-color:#e6ce95}
body[data-page="reconciliation"] .pv-match-label{font-size:13.5px;font-weight:900;color:#28536d;white-space:nowrap}
body[data-page="reconciliation"] .pv-match-card>div{display:flex;align-items:center;justify-content:flex-end;gap:10px;min-width:0;flex-wrap:wrap}
body[data-page="reconciliation"] .pv-match-card b{font-size:15px;color:#173b55}
body[data-page="reconciliation"] .pv-match-card span:not(.pv-match-label){font-size:13.5px;color:#48677b}
body[data-page="reconciliation"] .pv-bank-state-line{
  display:flex;align-items:center;justify-content:flex-start;gap:8px;margin-top:7px;padding:6px 9px;
  border:1px solid #e1e8ed;border-radius:8px;background:#fafcfd
}
body[data-page="reconciliation"] .pv-bank-state-line span{font-size:13.5px;font-weight:800;color:#587285}
body[data-page="reconciliation"] .pv-bank-state-line b{font-size:14px;color:#29495f}
body[data-page="reconciliation"] .pv-request-actions{
  display:flex;align-items:center;justify-content:flex-end;gap:7px;flex-wrap:wrap;margin-top:8px
}
body[data-page="reconciliation"] .pv-request-actions .pv-btn{min-height:38px;font-size:14px;font-weight:850}
body[data-page="reconciliation"] .pv-financial-name-help{
  margin-top:8px;padding:9px 10px;border-radius:8px;background:#f1f6fa;color:#38586f;font-size:13.5px;line-height:1.75
}
.sm591-financial-name-note{display:block;margin-top:5px;color:#38586f;font-size:13.5px;font-weight:700;line-height:1.65}

@media (max-width:980px){
  body[data-page="reconciliation"] .pv-request-summary{grid-template-columns:1fr auto}
  body[data-page="reconciliation"] .pv-request-keyfacts{grid-column:1/-1;grid-row:2}
  body[data-page="reconciliation"] .pv-request-meta-line{grid-template-columns:1fr 1fr}
}
@media (max-width:620px){
  body[data-page="reconciliation"] .pv-request{padding:10px}
  body[data-page="reconciliation"] .pv-request-summary{grid-template-columns:1fr}
  body[data-page="reconciliation"] .pv-status{justify-self:start}
  body[data-page="reconciliation"] .pv-request-keyfacts{grid-template-columns:1fr 1fr;grid-column:auto;grid-row:auto}
  body[data-page="reconciliation"] .pv-request-keyfacts>span:last-child{grid-column:1/-1}
  body[data-page="reconciliation"] .pv-request-meta-line{grid-template-columns:1fr}
  body[data-page="reconciliation"] .pv-match-card{align-items:flex-start;flex-direction:column}
  body[data-page="reconciliation"] .pv-match-card>div{justify-content:flex-start}
  body[data-page="reconciliation"] .pv-financial-name-warning{align-items:flex-start;flex-direction:column}
  body[data-page="reconciliation"] .pv-request-actions{display:grid;grid-template-columns:1fr 1fr}
  body[data-page="reconciliation"] .pv-request-actions .pv-btn{width:100%;min-width:0}
}


/* v591 — financial claim/invoice forms: readable typography and strong contrast */
body[data-page="sales-operations"] :is(
  #sm148-expert-case-form,
  #sm148-supervisor-payment-form,
  #so-case-create-form,
  #so-sub-payment,
  #so-v113-case,
  #so-v113-sub-payment
) .field label {
  font-size: 14px !important;
  line-height: 1.55 !important;
  font-weight: 700 !important;
  color: #334e68 !important;
}

body[data-page="sales-operations"] :is(
  #sm148-expert-case-form,
  #sm148-supervisor-payment-form,
  #so-case-create-form,
  #so-sub-payment,
  #so-v113-case,
  #so-v113-sub-payment
) :is(input, select, textarea) {
  font-size: 15px !important;
  line-height: 1.55 !important;
  color: #102a43 !important;
}

body[data-page="sales-operations"] :is(
  #sm148-expert-case-form,
  #sm148-supervisor-payment-form,
  #so-case-create-form,
  #so-sub-payment,
  #so-v113-case,
  #so-v113-sub-payment
) .sm591-financial-name-note {
  font-size: 13.5px !important;
  line-height: 1.7;
  color: #52697f !important;
}

body[data-page="sales-operations"] #modal:has(:is(
  #sm148-expert-case-form,
  #sm148-supervisor-payment-form,
  #so-case-create-form,
  #so-sub-payment
)) .modal-actions .btn {
  min-height: 42px !important;
  height: auto !important;
  font-size: 14px !important;
  font-weight: 700 !important;
}


/* v592 — compact, aligned financial-claim forms.
   Scoped only to sales financial claim forms; unrelated modals are untouched. */
body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form){
  width:min(900px,calc(100vw - 32px))!important;
  max-width:900px!important;
  max-height:min(760px,calc(100vh - 24px))!important;
  border-radius:17px!important;
}
body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-head{
  min-height:54px!important;padding:11px 16px!important;
}
body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-head h3{
  font-size:17px!important;line-height:1.45!important;
}
body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-body{
  padding:14px 16px 12px!important;line-height:1.55!important;
}
body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-actions{
  min-height:58px!important;padding:8px 16px!important;gap:8px!important;
  border-top:1px solid #d9e3ea!important;background:#f8fafc!important;
}
body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-actions .btn{
  min-height:42px!important;padding:0 16px!important;border-radius:10px!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form>.form-grid{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  column-gap:14px!important;row-gap:9px!important;align-items:start!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form .field{min-width:0!important;margin:0!important}
body[data-page="sales-operations"] .sm592-financial-claim-form .field.full{grid-column:auto!important}
body[data-page="sales-operations"] .sm592-financial-claim-form .field label{
  margin:0 0 5px!important;font-size:13.5px!important;line-height:1.45!important;
  font-weight:800!important;color:#314d63!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form .field label small{
  font-size:12.5px!important;color:#667d8e!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form :is(input,select){
  box-sizing:border-box!important;min-height:42px!important;height:42px!important;
  padding:7px 10px!important;border-radius:9px!important;font-size:14.5px!important;line-height:1.3!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form textarea{
  box-sizing:border-box!important;min-height:42px!important;height:42px!important;
  padding:8px 10px!important;border-radius:9px!important;font-size:14px!important;line-height:1.55!important;resize:vertical!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form .sm591-financial-name-note,
body[data-page="sales-operations"] .sm592-financial-claim-form .sm564-identity-lock-note{
  display:block!important;margin-top:4px!important;font-size:12.5px!important;line-height:1.45!important;
  font-weight:650!important;color:#61798b!important;white-space:normal!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form .tiam-time-select{
  min-height:42px!important;height:42px!important;gap:6px!important;align-items:center!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form .tiam-time-select select{
  min-height:42px!important;height:42px!important;padding-block:4px!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form .tiam-payment-time-separator{
  font-size:17px!important;font-weight:900!important;color:#536d80!important;
}
body[data-page="sales-operations"] .sm592-financial-claim-form .date-control{min-height:42px!important}
body[data-page="sales-operations"] .sm592-financial-claim-form .date-control input{height:42px!important;min-height:42px!important}
body[data-page="sales-operations"] .sm592-financial-claim-form .calendar-trigger{width:42px!important;min-width:42px!important;height:42px!important}
body[data-page="sales-operations"] .sm592-financial-claim-form .sm564-payment-summary{margin-bottom:9px!important}

@media(max-width:820px){
  body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form){
    width:min(680px,calc(100vw - 18px))!important;max-height:calc(100vh - 14px)!important;
  }
  body[data-page="sales-operations"] .sm592-financial-claim-form>.form-grid{
    grid-template-columns:1fr!important;row-gap:8px!important;
  }
  body[data-page="sales-operations"] .sm592-financial-claim-form .field.full{grid-column:auto!important}
}
@media(max-width:520px){
  body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-head{padding:9px 12px!important}
  body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-body{padding:10px 11px!important}
  body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-actions{padding:7px 10px!important}
  body[data-page="sales-operations"] #modal:has(.sm592-financial-claim-form)>.modal-actions .btn{flex:1;min-width:0;padding-inline:10px!important;font-size:13.5px!important}
  body[data-page="sales-operations"] .sm592-financial-claim-form :is(input,select,textarea){font-size:16px!important}
}
