.purchases-workspace .purchase-ready{background:var(--green-soft)}.purchase-soon{color:var(--amber);font-weight:700}.purchase-print-heading{display:none}.invoice-line{border:1px solid var(--line);border-radius:12px;padding:var(--space-4);background:var(--bg)}.invoice-subtotal{display:flex;justify-content:space-between;gap:var(--space-3);font-size:var(--text-sm);grid-column:1 / -1}.invoice-subtotal output{font-weight:800;color:var(--green)}.invoice-line label input[type=search]{margin-bottom:var(--space-2)}.operation-entry-dialog:has([data-multi-invoice]) .form-actions{position:sticky;bottom:0;background:var(--surface);padding-block:var(--space-4);z-index:2;border-top:1px solid var(--line)}.operation-total{position:sticky;bottom:80px;background:var(--green-soft);padding:var(--space-4);border-radius:12px;z-index:2}
@media(max-width:640px){.purchase-needs-table,.purchase-needs-table tbody{display:block;min-width:0}.purchase-needs-table thead{display:none}.purchase-needs-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-2);padding:var(--space-4);border:1px solid var(--line);border-radius:12px;margin-block:var(--space-3)}.purchase-needs-table td{border:0;white-space:normal;padding:var(--space-2);min-width:0}.purchase-needs-table td:first-child,.purchase-needs-table td:last-child{grid-column:1 / -1}.purchase-needs-table td:nth-child(2)::before{content:'المتبقي بالطلبات';display:block;color:var(--muted)}.purchase-needs-table td:nth-child(3)::before{content:'المتوفر';display:block;color:var(--muted)}.purchase-needs-table td:nth-child(5)::before{content:'أقرب احتياج ';display:block;color:var(--muted)}.invoice-line{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:var(--space-3)}.invoice-line>label:first-child{grid-column:1 / -1}.invoice-line>label{min-width:0}.invoice-line .icon-btn{justify-self:end}.invoice-base-preview{grid-column:1 / -1}.operation-total{position:static}}
@media print{body.print-purchases .sidebar,body.print-purchases .topbar,body.print-purchases .main>header,body.print-purchases .period-status,body.print-purchases .workspace-context,body.print-purchases .statusbar,body.print-purchases #toast,body.print-purchases .purchases-workspace>:not(#section-needs),body.print-purchases #section-needs button,body.print-purchases #section-needs .section-head{display:none}body.print-purchases .main{margin:0;padding:0}body.print-purchases #section-needs{border:0;box-shadow:none;padding:0}body.print-purchases .purchase-print-heading{display:block;text-align:center}body.print-purchases .purchase-print-heading img{width:48px}body.print-purchases .purchase-needs-table{display:table;width:100%;min-width:0;font-size:12px}body.print-purchases .purchase-needs-table thead{display:table-header-group}body.print-purchases .purchase-needs-table tbody{display:table-row-group}body.print-purchases .purchase-needs-table tr{display:table-row;break-inside:avoid}body.print-purchases .purchase-needs-table td{display:table-cell}body.print-purchases .purchase-needs-table td::before{display:none}@page{size:A4 portrait;margin:12mm}}
@media print{body.print-purchases,body.print-purchases .shell,body.print-purchases .main,body.print-purchases #page-content,body.print-purchases #section-needs{background:var(--surface);margin:0;padding:0;width:100%;max-width:100%}body.print-purchases #section-needs .tablewrap{overflow:visible;border:0}body.print-purchases #section-needs .purchase-needs-table{table-layout:fixed;width:100%;border-collapse:collapse}body.print-purchases #section-needs th,body.print-purchases #section-needs td{white-space:normal;overflow-wrap:anywhere;min-width:0;padding:8px 5px;font-size:11px;line-height:1.6}body.print-purchases #section-needs th:nth-child(1){width:18%}body.print-purchases #section-needs th:nth-child(2),body.print-purchases #section-needs th:nth-child(3){width:12%}body.print-purchases #section-needs th:nth-child(4){width:18%}body.print-purchases #section-needs th:nth-child(5){width:15%}body.print-purchases #section-needs th:nth-child(6){width:25%}body.print-purchases #section-needs button[data-action=open-request]{display:inline;background:transparent;border:0;box-shadow:none;min-height:0;padding:0;font-size:11px;color:var(--ink)}body.print-purchases #section-needs td:nth-child(5){white-space:nowrap}.purchase-print-heading h1{font-size:22px}}

.purchase-print-request{display:none}@media print{body.print-purchases .purchase-print-request{display:block;font-weight:700}}
