.p2-finance-panel { display: grid; gap: 12px; }
.p2-finance-toolbar { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 10px; border: 1px solid #dfe5e9; border-radius: 6px; background: #f7f9fa; }
.p2-finance-toolbar label, .p2-entry-form label { display: grid; gap: 5px; color: #65717b; font-size: 11px; font-weight: 800; }
.p2-finance-toolbar input, .p2-finance-toolbar select, .p2-entry-form input, .p2-entry-form select, .p2-entry-form textarea { width: 100%; min-height: 38px; border: 1px solid #cfd7dd; border-radius: 5px; padding: 7px 9px; background: #fff; color: #25313b; font: inherit; }
.p2-finance-toolbar button, .p2-entry-form button, .p2-subtabs button, .p2-row-actions button { min-height: 38px; border: 1px solid #cfd7dd; border-radius: 5px; padding: 0 12px; background: #fff; color: #46515b; font-weight: 800; }
.p2-finance-toolbar button, .p2-entry-form .primary-button { border-color: #1a855c; background: #1a855c; color: #fff; }
.p2-subtabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 3px; }
.p2-subtabs button { flex: 0 0 auto; }
.p2-subtabs button.active { border-color: #174d70; background: #174d70; color: #fff; }
.p2-summary-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; }
.p2-summary-card { min-height: 82px; padding: 12px; border: 1px solid #dfe5e9; border-radius: 6px; background: #fff; }
.p2-summary-card span { display: block; color: #6f7a83; font-size: 11px; }
.p2-summary-card strong { display: block; margin-top: 7px; color: #172b3a; font-size: 20px; }
.p2-summary-card.positive strong { color: #13714d; }
.p2-summary-card.negative strong { color: #b74036; }
.p2-summary-note { margin: 0; padding: 10px 12px; border-radius: 6px; background: #edf6f3; color: #46615a; font-size: 11px; line-height: 1.6; }
.p2-stat-columns { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.p2-stat-block { min-width: 0; padding: 10px; border: 1px solid #dfe5e9; border-radius: 6px; background: #fff; }
.p2-stat-block h4 { margin: 0 0 8px; }
.p2-supplier-bills { display: grid; gap: 10px; }
.p2-supplier-bills .warehouse-row b { text-align: right; }
.p2-supplier-bills .warehouse-row b small { display: block; margin-top: 3px; }
.p2-entry-form { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 8px; padding: 10px; border: 1px solid #dfe5e9; border-radius: 6px; background: #f7f9fa; }
.p2-entry-form .wide { grid-column: span 2; }
.p2-entry-form .full { grid-column: 1/-1; }
.p2-entry-form .p2-form-actions { grid-column: 1/-1; display: flex; justify-content: flex-end; gap: 8px; }
.p2-entry-form input[type="file"] { padding: 6px; }
.p2-entry-form[aria-busy="true"] { opacity: .72; }
.p2-entry-form button:disabled { cursor: wait; opacity: .62; }
.p2-purchase-lines { display: grid; gap: 9px; }
.p2-purchase-line { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; min-width: 0; margin: 0; padding: 10px; border: 1px solid #d7dfe4; border-radius: 6px; background: #fff; }
.p2-purchase-line legend { padding: 0 5px; color: #52616c; font-size: 11px; font-weight: 800; }
.p2-purchase-line label, .p2-category-row label { display: grid; gap: 5px; color: #65717b; font-size: 11px; font-weight: 800; }
.p2-purchase-line input, .p2-purchase-line select, .p2-category-row input { width: 100%; min-height: 38px; border: 1px solid #cfd7dd; border-radius: 5px; padding: 7px 9px; background: #fff; color: #25313b; font: inherit; }
.p2-purchase-line .p2-remove-line { align-self: end; min-height: 38px; border: 1px solid #dec5c2; border-radius: 5px; background: #fff; color: #b74036; font-weight: 800; }
.p2-line { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding: 5px 0; border-bottom: 1px dashed #e1e6ea; }
.p2-line:last-child { border-bottom: 0; }
.p2-record-list { display: grid; gap: 8px; }
.p2-record-row { display: grid; grid-template-columns: minmax(180px,1fr) minmax(180px,1.2fr) auto; gap: 10px; align-items: center; padding: 11px; border: 1px solid #dfe5e9; border-radius: 6px; background: #fff; }
.p2-record-row.voided { opacity: .66; background: #f4f5f6; }
.p2-record-row strong, .p2-record-row small { display: block; }
.p2-record-row small { margin-top: 4px; color: #76818a; line-height: 1.5; }
.p2-record-amount { text-align: right; white-space: nowrap; }
.p2-record-amount b { display: block; font-size: 16px; }
.p2-row-actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.p2-row-actions button.danger { color: #b74036; }
.p2-category-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.p2-category-form { grid-template-columns: repeat(2,minmax(0,1fr)); margin-bottom: 9px; }
.p2-category-row { display: grid; grid-template-columns: minmax(120px,.8fr) minmax(150px,1fr) minmax(90px,.55fr); gap: 8px; align-items: end; padding: 10px; border: 1px solid #dfe5e9; border-radius: 6px; background: #fff; }
.p2-category-row.voided { opacity: .66; background: #f4f5f6; }
.p2-category-row small { display: block; margin-top: 4px; color: #76818a; }
.p2-check { display: flex !important; flex-direction: row; align-items: center; gap: 7px !important; min-height: 38px; }
.p2-check input { width: auto !important; min-height: auto !important; }
.p2-message { min-height: 18px; color: #56626c; font-size: 11px; }
.p2-message.error { color: #b74036; }
.p2-percentage { color: #174d70; font-weight: 800; }
.p2-comparison-table { overflow-x: auto; }
.p2-comparison-table table { width: 100%; border-collapse: collapse; min-width: 640px; }
.p2-comparison-table th, .p2-comparison-table td { padding: 9px; border-bottom: 1px solid #e1e6ea; text-align: left; }
.p2-comparison-table th { background: #f4f7f8; color: #58636c; font-size: 11px; }
.p2-empty { padding: 18px; border: 1px dashed #cfd7dd; border-radius: 6px; color: #74808a; text-align: center; }
.p2-store-checks { display: flex; flex-wrap: wrap; gap: 8px; }
.p2-store-checks label { display: flex; align-items: center; gap: 5px; min-height: 36px; padding: 0 10px; border: 1px solid #d8dee4; border-radius: 5px; background: #fff; }
@media (max-width: 760px) {
  .p2-finance-toolbar, .p2-entry-form { grid-template-columns: 1fr 1fr; }
  .p2-summary-grid { grid-template-columns: 1fr 1fr; }
  .p2-stat-columns, .p2-category-grid { grid-template-columns: 1fr; }
  .p2-record-row { grid-template-columns: 1fr; }
  .p2-record-amount { text-align: left; }
  .p2-purchase-line { grid-template-columns: 1fr 1fr; }
  .p2-category-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .p2-finance-toolbar, .p2-entry-form { grid-template-columns: 1fr; }
  .p2-entry-form .wide { grid-column: auto; }
  .p2-summary-grid, .p2-purchase-line, .p2-category-row { grid-template-columns: 1fr; }
  .p2-line { align-items: flex-start; flex-direction: column; }
  .p2-row-actions { flex-wrap: wrap; justify-content: flex-start; }
}
