.warehouse-invoice { border:1px solid var(--border-color,#cbd5e1);border-radius:14px;padding:16px;margin-block:12px;background:var(--hub-panel-strong,var(--surface-raised,#fff));color:var(--hub-text,inherit);min-width:0 }
.warehouse-invoice-title,.warehouse-invoice-actions,.warehouse-invoice-document-toolbar,.warehouse-invoice-document-heading,.warehouse-invoice-line-title { display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap }
.warehouse-invoice :is(h3,h4) { margin:0;overflow-wrap:anywhere }
.warehouse-invoice-document-toolbar { justify-content:flex-start;align-items:end;margin-block:16px }
.warehouse-invoice-document-toolbar>label { flex:1;min-width:min(240px,100%) }
.warehouse-invoice-document-heading { margin-block:18px 12px }
.warehouse-invoice-document-heading>span { font-size:.9em;overflow-wrap:anywhere }
.warehouse-invoice-header,.warehouse-invoice-line-fields { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-block:12px }
.warehouse-invoice label { display:flex;flex-direction:column;gap:5px;min-width:0;overflow-wrap:anywhere }
.warehouse-invoice :is(input,select,textarea) { width:100%;box-sizing:border-box;min-height:44px;min-width:0;font:inherit;caret-color:currentColor }
.warehouse-invoice button { min-height:44px;padding:8px 14px;width:auto;white-space:normal;overflow-wrap:anywhere }
.warehouse-invoice :is(button,input,select,textarea):focus-visible { outline:2px solid var(--hub-accent,#2563eb);outline-offset:3px }
.warehouse-invoice button:disabled { opacity:.55;cursor:not-allowed }
.warehouse-invoice-fields { border:0;padding:0;margin:0;min-width:0 }
.warehouse-invoice-fields:disabled { opacity:.86 }
.warehouse-invoice input[readonly] { background:var(--hub-panel-muted,var(--surface-soft,transparent));font-variant-numeric:tabular-nums }
.warehouse-invoice-lines { display:flex;flex-direction:column;gap:12px;margin-block:16px }
.warehouse-invoice-line { padding-block:12px;border-block:1px solid var(--border-color,#cbd5e1);min-width:0 }
.warehouse-invoice-line-fields>label:nth-child(4) { grid-column:span 2 }
.warehouse-invoice-line-amount { display:flex;flex-direction:column;justify-content:center;gap:5px;min-height:44px;font-variant-numeric:tabular-nums;overflow-wrap:anywhere }
.warehouse-invoice .warehouse-invoice-delete { color:var(--hub-danger-text,var(--danger,#b42318));border:1px solid currentColor;background:transparent;font-weight:600 }
.warehouse-invoice .warehouse-invoice-delete:hover:not(:disabled) { background:var(--hub-danger-soft,rgba(180,35,24,.08)) }
.warehouse-invoice-expense { display:grid;grid-template-columns:1.15fr 1fr 1fr 1fr 1.2fr auto;gap:10px;align-items:end;margin-block:12px }
.warehouse-invoice .warehouse-invoice-check { flex-direction:row;align-items:center;gap:8px;min-height:44px }
.warehouse-invoice .warehouse-invoice-check input { width:20px;height:20px;min-height:20px;flex:none }
.warehouse-invoice-totals { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-block:16px }
.warehouse-invoice-totals>div { display:flex;flex-direction:column;gap:4px;border-block-end:1px solid var(--border-color,#cbd5e1);padding:8px;min-width:0;overflow-wrap:anywhere;font-variant-numeric:tabular-nums }
.warehouse-invoice [data-invoice-status] { min-height:1.5em;overflow-wrap:anywhere }
.warehouse-invoice .is-error { color:var(--hub-danger-text,var(--danger,#b42318)) }
.warehouse-invoice [data-invoice-recovery]:not(:empty) { padding-block:12px;border-block:1px solid var(--border-color,#cbd5e1) }
.warehouse-invoice [data-invoice-recovery] button { margin-inline-end:8px;margin-block-end:8px }
.warehouse-invoice .warehouse-invoice-reason { flex:1 1 100% }
.warehouse-invoice .warehouse-invoice-reason textarea { min-height:88px;resize:vertical }
.warehouse-invoice-history { overflow-wrap:anywhere }
.warehouse-invoice-history li { margin-block:8px }
.warehouse-invoice-unit-costs { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;font-variant-numeric:tabular-nums }
.warehouse-invoice-unit-costs>div { display:flex;flex-direction:column;gap:4px;min-width:0;overflow-wrap:anywhere }
.warehouse-invoice-catalog { margin-block:12px;padding-block:12px;border-block:1px solid var(--border-color,#cbd5e1);min-width:0 }
.warehouse-invoice-catalog[hidden] { display:none }
.warehouse-invoice-catalog-fields { display:grid;grid-template-columns:minmax(0,1fr) minmax(0,2fr) auto;gap:10px;align-items:end }
.warehouse-catalog-combo { position:relative;display:grid;grid-template-columns:minmax(0,1fr) 44px;gap:4px;min-width:0 }
.warehouse-invoice .warehouse-catalog-toggle { padding:0;width:44px;min-width:44px }
.warehouse-invoice .warehouse-catalog-options { position:absolute;inset:calc(100% + 4px) 0 auto;z-index:40;max-height:min(280px,42vh);overflow:auto;overscroll-behavior:contain;border:1px solid var(--border-color,#cbd5e1);border-radius:10px;background:var(--hub-panel-strong,var(--surface-raised,#fff));box-shadow:0 8px 24px rgba(15,23,42,.12);padding:4px;min-width:0;width:auto }
.warehouse-invoice .warehouse-catalog-options[hidden] { display:none }
.warehouse-invoice .warehouse-catalog-options button { display:block;width:100%;text-align:start;border:0;box-shadow:none;background:transparent;color:inherit;padding:8px;min-height:44px }
.warehouse-invoice .warehouse-catalog-options button.active,.warehouse-invoice .warehouse-catalog-options button:hover { background:var(--hub-panel-muted,var(--surface-soft,#eef2ff)) }
.warehouse-invoice [aria-invalid="true"] { border-color:var(--hub-danger-text,var(--danger,#b42318)) }
.warehouse-invoice-catalog-results { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px }
.warehouse-invoice-catalog-product { display:flex;gap:12px;align-items:center;justify-content:space-between;padding:10px;border:1px solid var(--border-color,#cbd5e1);border-radius:10px;min-width:0 }
.warehouse-invoice-catalog-product>div { display:flex;flex-direction:column;gap:4px;min-width:0;overflow-wrap:anywhere }
.warehouse-invoice-catalog-product>button { flex:none }
#depoTable td { overflow-wrap:anywhere }
#depoTable :is(th,td) { padding-inline:8px }
@media(max-width:1000px) { .warehouse-invoice-header,.warehouse-invoice-expense { grid-template-columns:repeat(2,minmax(0,1fr)) } }
@media(max-width:620px) {
 .warehouse-invoice-catalog-fields { grid-template-columns:repeat(2,minmax(0,1fr)) }
 .warehouse-invoice-catalog-fields>button { grid-column:1/-1 }
 .warehouse-invoice-catalog-results { grid-template-columns:minmax(0,1fr) }
 .warehouse-invoice { padding:12px }
 .warehouse-invoice-unit-costs { grid-template-columns:minmax(0,1fr) }
 .warehouse-invoice-header,.warehouse-invoice-line-fields,.warehouse-invoice-totals { grid-template-columns:repeat(2,minmax(0,1fr)) }
 .warehouse-invoice button,.warehouse-invoice :is(input,select,textarea) { min-height:44px }
 .warehouse-invoice-line-fields>label:nth-child(4) { grid-column:1/-1 }
 .warehouse-invoice-actions { justify-content:stretch }
 .warehouse-invoice-actions button { flex:1 1 130px }
 .warehouse-invoice-document-toolbar>label { flex-basis:100% }
 .warehouse-invoice .warehouse-invoice-check input { min-height:20px }
}
@media(max-width:379px) { .warehouse-invoice-header { grid-template-columns:minmax(0,1fr) } }
