.amanta-credit-pay-width { max-width: 1400px; }
.amanta-credit-pay-panel { max-height: calc(100dvh - 40px); display:flex; flex-direction:column; overflow:hidden; }
.amanta-credit-pay-panel > :first-child { flex-shrink:0; }
.amanta-credit-pay-panel h2 { font-size:24px; line-height:30px; margin-top:6px; }
.amanta-credit-pay-body { display:flex; flex-direction:column; min-height:0; overflow:hidden; }
.amanta-credit-payment { display:flex; flex-direction:column; min-height:0; color:#162033; font-size:13px; }
.amanta-credit-pay-context { display:flex; flex-wrap:wrap; gap:4px 16px; padding:12px 24px 0; font-size:12px; color:#536783; flex-shrink:0; }
.amanta-credit-pay-context strong { color:#162033; }
.amanta-credit-pay-scroll { padding:14px 24px; display:flex; flex-direction:column; gap:14px; overflow:auto; min-height:0; }
.amanta-credit-pay-scroll > button { align-self:flex-start; }
.amanta-credit-pay-review-head > div:first-child { min-width:0; overflow-wrap:anywhere; }
.amanta-credit-pay-entry,.amanta-credit-pay-review { border:1px solid #dce4ef; border-radius:12px; flex-shrink:0; min-width:0; }
.amanta-credit-pay-entry { padding:12px; margin:0; }
.amanta-credit-pay-fields { display:grid; grid-template-columns:minmax(130px,1fr) minmax(115px,.9fr) minmax(125px,1fr) minmax(210px,1.8fr) minmax(125px,1fr) minmax(150px,1.15fr); gap:8px; align-items:start; }
.amanta-credit-pay-field { display:flex; flex-direction:column; gap:6px; min-width:0; }
.amanta-payment-fields { display:grid; grid-template-columns:repeat(auto-fit,minmax(170px,1fr)); gap:8px; align-items:start; }
.amanta-payment-dialog .amanta-credit-pay-review { overflow:hidden; }
.amanta-credit-pay-field > div > input { min-width:0; }
.amanta-credit-pay-field button:not([role="option"]) { flex-shrink:0; }
.amanta-payment-dialog .amanta-credit-pay-entry > p { margin:10px 0 0; }
.amanta-payment-dialog .amanta-credit-pay-field textarea { min-height:48px; border:1px solid #dce4ef; border-radius:8px; padding:10px; width:100%; resize:vertical; }
.amanta-credit-pay-field > span:first-child { font-size:12px; line-height:18px; color:#536783; }
.amanta-credit-pay-field input:not([aria-hidden="true"]),.amanta-credit-pay-field > div { box-sizing:border-box; width:100%; height:48px!important; min-height:48px; }
.amanta-credit-pay-field input:not([aria-hidden="true"]) { border:1px solid #dce4ef; border-radius:8px; background:#fff; padding:10px; color:#162033; font-size:13px; line-height:20px; }
.amanta-credit-pay-field input::placeholder { color:#8192ac; }
.amanta-credit-pay-field input:disabled,.amanta-credit-pay-field input[readonly] { background:#f7f9fc; }
.amanta-credit-pay-field input:focus-visible { outline:2px solid #f49b77; outline-offset:2px; }
.amanta-credit-pay-field.amanta-credit-pay-cash input:not([aria-hidden="true"]),.amanta-payment-dialog .amanta-personnel-payment-field.amanta-credit-pay-cash input { background:#fffbeb; border-color:#e6c884; }
.amanta-credit-pay-field.amanta-credit-pay-amount input,.amanta-payment-dialog .amanta-personnel-payment-field.amanta-credit-pay-amount input { color:#dc2626; font-variant-numeric:tabular-nums; }
.is-reviewed .amanta-credit-pay-cash input:not([aria-hidden="true"]),.is-reviewed .amanta-credit-pay-amount input:not([aria-hidden="true"]) { background:#fff6dc; border:2px solid #c58a24; }
.is-reviewed .amanta-credit-pay-cash > span,.is-reviewed .amanta-credit-pay-amount > span { color:#815416; font-weight:600; }
.amanta-credit-pay-extras { display:grid; grid-template-columns:minmax(160px,1fr) minmax(0,2fr); gap:12px; border-top:1px solid #dce4ef; margin-top:12px; padding-top:12px; }
.amanta-credit-pay-extras.has-partial { grid-template-columns:repeat(3,minmax(0,1fr)); }
.amanta-credit-pay-extras > :only-child { grid-column:1 / -1; }
.amanta-credit-pay-review-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 12px; background:#f7f9fc; border-radius:12px 12px 0 0; border-bottom:1px solid #dce4ef; }
.amanta-credit-pay-review-head > div:first-child { display:flex; flex-direction:column; gap:4px; }
.amanta-credit-pay-review-head span { color:#536783; font-size:12px; }
.amanta-credit-pay-review-head .amanta-pay-total { margin:0; flex:0 0 auto; }
.amanta-credit-pay-review table { width:100%; table-layout:fixed; border-collapse:collapse; }
.amanta-credit-pay-review th { text-align:right; color:#536783; font-size:12px; font-weight:500; padding:10px 8px; background:#f7f9fc; }
.amanta-credit-pay-review td { padding:10px 8px; border-top:1px solid #dce4ef; text-align:right; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.amanta-credit-pay-review th:first-child,.amanta-credit-pay-review td:first-child { text-align:left; padding-left:12px; }
.amanta-credit-pay-review th:last-child,.amanta-credit-pay-review td:last-child { padding-right:12px; }
.amanta-credit-pay-money { color:#dc2626; }
.amanta-credit-pay-hint { margin:10px 12px; font-size:12px; color:#536783; }
.amanta-credit-pay-entry .amanta-credit-pay-hint { margin:10px 0 0; }
.amanta-credit-pay-error { margin:0; padding:10px 12px; background:#fff1f2; border:1px solid #fecdd3; border-radius:8px; color:#be123c; }
.amanta-credit-pay-footer { display:flex; justify-content:flex-end; align-items:center; gap:8px; padding:12px 24px; border-top:1px solid #dce4ef; flex-shrink:0; }
.amanta-credit-pay-footer button { height:48px; padding:0 16px; border:1px solid #dce4ef; border-radius:8px; background:#fff; white-space:nowrap; }
.amanta-credit-pay-footer button:disabled { opacity:.6; }
.amanta-credit-pay-footer .amanta-credit-pay-check { color:#fff; background:#171717; border-color:#171717; }
.amanta-credit-pay-footer .amanta-credit-pay-confirm { color:#fff; background:#15803d; border-color:#15803d; }
.amanta-credit-pay-status { margin-right:auto; font-size:12px; color:#815416; }
.amanta-payment-fill { border:1px solid #dce4ef; border-radius:8px; padding:0 12px; height:48px; white-space:nowrap; }
.amanta-payment-details { border:1px solid #dce4ef; border-radius:12px; padding:12px; }
.amanta-payment-details summary { cursor:pointer; color:#536783; }
.amanta-payment-details table { width:100%; table-layout:fixed; margin-top:12px; border-collapse:collapse; }
.amanta-payment-details :is(th,td) { padding:8px; text-align:left; overflow-wrap:anywhere; border-bottom:1px solid #dce4ef; }
.amanta-payment-dialog .amanta-personnel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }
.amanta-payment-dialog .amanta-personnel-payment-field > div:first-child { font-size:12px; line-height:18px; font-weight:400; letter-spacing:normal; text-transform:none; margin:0 0 6px; color:#536783; }
.amanta-payment-dialog .amanta-personnel-grid input:not([aria-hidden="true"]),.amanta-payment-dialog .amanta-personnel-grid .amanta-personnel-control { height:48px!important; min-height:48px; }
.amanta-personnel-sheet .amanta-credit-pay-cash input { background:#fffbeb!important; border-color:#e6c884!important; }
.amanta-personnel-sheet.is-reviewed :is(.amanta-credit-pay-cash,.amanta-credit-pay-amount) input { background:#fff6dc!important; border:2px solid #c58a24!important; }
.amanta-payment-batch-footer button { height:48px!important; min-height:48px!important; padding:0 14px!important; }
.amanta-payment-batch-footer .btn-secondary { background:#171717!important; color:white!important; border-color:#171717!important; }
.amanta-payment-batch-footer .btn-primary { background:#15803d!important; color:white!important; border-color:#15803d!important; }

/* Section identity uses existing palette colours, without overriding financial semantics. */
.amanta-payment-theme-personnel { --payment-accent:#e84420; --payment-tint:#fff7ed; --payment-border:#fed7aa; }
.amanta-payment-theme-subcontractors { --payment-accent:#1e40af; --payment-tint:#eff6ff; --payment-border:#bfdbfe; }
.amanta-payment-theme-suppliers { --payment-accent:#047857; --payment-tint:#ecfdf5; --payment-border:#a7f3d0; }
button.amanta-payment-launch { color:var(--payment-accent)!important; background:var(--payment-tint)!important; border-color:var(--payment-border)!important; min-height:40px; }
button.amanta-payment-launch:hover { background:var(--payment-border)!important; color:var(--payment-accent)!important; }
.amanta-payment-section-icon { flex-shrink:0; }
.amanta-payment-section-title { display:flex; align-items:center; gap:10px; }
[class*="amanta-payment-theme-"]:is(.amanta-personnel-panel,.amanta-payment-dialog) > :first-child { border-top:4px solid var(--payment-accent); background:var(--payment-tint); }
[class*="amanta-payment-theme-"] h2 .amanta-payment-section-icon { color:var(--payment-accent); }
[class*="amanta-payment-theme-"] .amanta-personnel-tabs button[aria-selected="true"] { color:var(--payment-accent)!important; border-color:var(--payment-accent)!important; }
[class*="amanta-payment-theme-"] :is(.amanta-pay-sticky-heading,.amanta-credit-pay-review-head) { background:var(--payment-tint); }
[class*="amanta-payment-theme-"] .amanta-pay-sticky-heading > div { background:var(--payment-tint); }
[class*="amanta-payment-theme-"] :is(.amanta-personnel-sheet-tools,.amanta-personnel-sheet-data) { border-color:var(--payment-border); }
[class*="amanta-payment-theme-"] .amanta-pay-draft-note .btn-primary,
[class*="amanta-payment-theme-"] .amanta-counterparty-load .btn-primary { background:var(--payment-accent)!important; border-color:var(--payment-accent)!important; }
@media(max-width:1199px) {
  .amanta-credit-pay-fields { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media(max-width:650px) {
  .amanta-credit-pay-fields { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .amanta-credit-pay-extras,.amanta-credit-pay-extras.has-partial { grid-template-columns:1fr; }
  .amanta-credit-pay-scroll { padding:12px; }
  .amanta-credit-pay-context { padding-left:12px; padding-right:12px; }
  .amanta-credit-pay-footer { padding:12px; flex-wrap:wrap; }
  .amanta-credit-pay-status { flex-basis:100%; }
  .amanta-credit-pay-review th,.amanta-credit-pay-review td { padding:8px 4px; font-size:11px; }
}
