/* PI entry: compact business form; document previews keep their print styling. */
.modal.pi-entry-modal { width: min(1060px, 96vw); max-height: 94vh; }
.pi-entry-modal .modal-header { padding: 14px 20px; border-bottom: 1px solid #e4e9ee; }
.pi-entry-modal .modal-header h3 { font-size: 17px; color: #2b414e; }
.pi-entry-modal .modal-body { padding: 0; background: #f5f7f9; }
.pi-entry-modal .modal-footer { padding: 11px 20px; background: #fff; border-top: 1px solid #e4e9ee; }
.pi-entry-modal .btn-primary { background: #4f7288; border-color: #4f7288; }
.pi-entry-modal .btn-primary:hover { background: #3e6076; border-color: #3e6076; }
.pi-entry { padding: 16px; color: #33434e; font-size: 13px; }
.pi-entry-card { min-width: 0; padding: 13px 15px; border: 1px solid #e2e8ed; border-radius: 10px; background: #fff; }
.pi-entry > .pi-entry-card, .pi-entry > .pi-entry-columns { margin-bottom: 12px; }
.pi-entry-card-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 11px; }
.pi-entry-card-heading h3 { margin: 0; color: #344d5b; font-size: 13px; font-weight: 650; }
.pi-entry-badge { padding: 3px 8px; border-radius: 5px; background: #edf3f7; color: #617d8f; font-size: 11px; font-weight: 400; }
.pi-entry-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 12px; }
.pi-entry-basics { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.1fr) minmax(100px, .65fr); }
.pi-entry-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.pi-entry .pi-entry-field { display: flex; flex-direction: column; min-width: 0; gap: 5px; margin: 0; color: #677985; font-size: 12px; font-weight: 400; }
.pi-entry .pi-entry-field > span { min-height: 17px; }
.pi-entry .pi-required { margin-left: 3px; color: #b56861; }
.pi-entry .pi-span-two { grid-column: span 2; }
.pi-entry .form-control { width: 100%; min-width: 0; height: 34px; margin: 0; padding: 6px 10px; border: 1px solid #dce4e9; border-radius: 6px; background: #fff; color: #33434e; font: inherit; font-weight: 400; line-height: 1.45; box-shadow: none; }
.pi-entry textarea.form-control { height: auto; min-height: 46px; resize: vertical; }
.pi-entry .form-control:focus { outline: none; border-color: #8ba6b9; box-shadow: 0 0 0 3px #edf3f7; }
.pi-entry .form-control[readonly] { background: #f6f8fa; color: #5d7482; }
.pi-entry .form-control:disabled { background: #f2f5f7; color: #9aa6ae; }
.pi-entry .form-control::placeholder { color: #a0adb6; }
.pi-entry .btn-outline { border-color: #d9e2e9; background: #fff; color: #5b7486; }
.pi-entry .btn-outline:hover { background: #f0f5f8; border-color: #b9cbd7; }
.pi-entry .btn { border-radius: 6px; font-size: 12px; }
.pi-entry-products-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pi-entry .pi-entry-check { display: inline-flex; align-items: center; gap: 6px; margin: 0; color: #647987; font-size: 12px; font-weight: 400; cursor: pointer; }
.pi-entry input[type=checkbox] { flex: 0 0 auto; width: 14px; height: 14px; margin: 0; accent-color: #5f8198; }
.pi-entry .pi-edit-items-wrap { overflow-x: auto; }
.pi-entry .pi-edit-items-head, .pi-entry .pi-item-edit { display: grid; min-width: 760px; align-items: center; }
.pi-entry .pi-edit-items-head { gap: 8px; padding: 8px 0; border-top: 1px solid #e3ebf0; border-bottom: 1px solid #e3ebf0; background: #f1f5f8; color: #6a8191; text-align: left; font-size: 11px; font-weight: 500; }
.pi-entry .pi-edit-items-head > :first-child { text-align: center; }
.pi-entry .pi-item-edit { gap: 8px !important; padding: 9px 0 !important; border-bottom-color: #edf1f4 !important; }
.pi-entry .pi-item-edit:last-child { border-bottom: 0 !important; }
.pi-entry .pi-item-edit .form-control { padding: 5px 7px; font-size: 12px; }
.pi-entry .pi-picture-edit { min-width: 0; }
.pi-entry .pi-picture-edit img { width: 32px !important; height: 32px !important; margin: 3px auto 0 !important; border-color: #e0e7ec !important; border-radius: 5px !important; }
.pi-entry .pi-picture-edit .btn { font-size: 11px; }
.pi-entry .pi-item-edit > .btn-danger { width: 28px; height: 28px; padding: 0; border: 0; background: #f9efed; color: #b07872; font-size: 17px; }
.pi-entry .pi-item-edit > .btn-danger:hover { background: #f3dfdc; color: #9c554e; }
.pi-entry-calculation { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .9fr); align-items: start; gap: 18px; }
.pi-entry-calculation .pi-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pi-entry-totals { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px 18px; padding: 13px 15px; border: 1px solid #e2ebe8; border-radius: 8px; background: #f2f7f5; color: #6a7e77; font-size: 12px; }
.pi-entry-totals > :nth-child(even) { text-align: right; color: #385d51; font-weight: 650; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pi-entry .pi-entry-company { margin-bottom: 0; padding: 0; }
.pi-entry-company summary { display: flex; align-items: center; flex-wrap: wrap; gap: 7px 12px; padding: 12px 15px; color: #5e7380; cursor: pointer; list-style: none; }
.pi-entry-company summary::-webkit-details-marker { display: none; }
.pi-entry-company summary strong { font-size: 12px; font-weight: 500; }
.pi-entry-company summary small { flex: 1; color: #94a0a9; font-size: 11px; }
.pi-entry-company summary::after { content: '⌄'; color: #8b9da9; font-size: 15px; }
.pi-entry-company[open] summary::after { content: '⌃'; }
.pi-entry-company > .pi-entry-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 0 15px 14px; }
.pi-entry .pi-span-three { grid-column: span 3; }
@media (max-width: 700px) {
    .pi-entry { padding: 11px; }
    .pi-entry-card { padding: 11px 12px; }
    .pi-entry-columns, .pi-entry-calculation { grid-template-columns: minmax(0, 1fr); gap: 11px; }
    .pi-entry-basics { grid-template-columns: minmax(0, 1.45fr) minmax(75px, .65fr); }
    .pi-entry-number { grid-column: span 2; }
    .pi-entry-calculation .pi-entry-grid { gap: 12px; }
    .pi-entry-company > .pi-entry-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pi-entry-company .pi-span-three { grid-column: span 2; }
    .pi-entry-products-tools { gap: 6px; }
    .pi-entry-card-heading { margin-bottom: 9px; }
    .pi-entry-totals { padding: 11px 12px; }
    .pi-entry-modal .modal-header, .pi-entry-modal .modal-footer { padding: 12px 15px; }
}
