/* OROX Inventory Handover V2 — compact, existing workflows only. */
#inventoryView .inv-v2-workspace{--inv-line:var(--line);--inv-panel:var(--surface-1);--inv-soft:var(--surface-2);--inv-blue:#2979ff;--inv-teal:#23b79c;min-width:0;max-width:100%;margin-bottom:12px}
.inv-v2-workspace[hidden],.inv-v2-dialog[hidden]{display:none!important}
.inv-v2-tabs{display:flex;gap:6px;align-items:center;padding:7px;min-width:0;overflow-x:auto;overscroll-behavior-inline:contain;scrollbar-width:thin;border:1px solid var(--inv-line);border-radius:13px;background:var(--inv-panel)}
.inv-v2-tab{flex:1 0 auto;min-width:max-content;min-height:36px;padding:7px 12px;white-space:nowrap;border:1px solid transparent;border-radius:9px;background:transparent;color:var(--muted);font-size:11px;font-weight:800;transition:background .15s,border-color .15s}
.inv-v2-tab:hover:not(:disabled){background:color-mix(in srgb,var(--inv-blue) 10%,transparent);color:var(--text)}
.inv-v2-tab.active{background:linear-gradient(120deg,#1f60c6,var(--inv-blue));color:#fff;box-shadow:0 5px 15px rgba(41,121,255,.19)}
.inv-v2-tab:focus-visible,.inv-v2-workspace button:focus-visible{outline:2px solid #8bd3fa;outline-offset:2px}
.inv-v2-tab:disabled{opacity:.43;cursor:not-allowed}
.inv-v2-tab:disabled span{font-size:9px}
#invV2Panel{min-width:0}
.inv-v2-filters{display:flex;gap:8px;align-items:flex-end;flex-wrap:wrap;padding:12px 2px 4px}
.inv-v2-control{min-width:145px;display:grid;gap:5px;color:var(--muted);font-size:10px;font-weight:800}
.inv-v2-search{flex:1 1 230px;max-width:430px}
.inv-v2-control input,.inv-v2-control select{width:100%;height:36px;min-width:0;border:1px solid var(--line);border-radius:9px;background:var(--surface-2);color:var(--text);padding:7px 10px;font-size:11px}
.inv-v2-filters>.btn{min-height:36px}
.inv-v2-hint{margin:9px 2px;font-size:11px}
.inv-v2-table-wrap{margin-top:10px;border:1px solid var(--line);border-radius:13px;overflow:hidden;background:var(--surface-1)}
.inv-v2-table{width:100%;min-width:0;border-collapse:collapse}
.inv-v2-table th{font-size:10px;padding:11px 12px;background:color-mix(in srgb,var(--surface-2) 90%,#0a1830);color:var(--muted)}
.inv-v2-table td{font-size:11px;padding:11px 12px;line-height:1.55;vertical-align:middle;overflow-wrap:anywhere}
.inv-v2-table tr:last-child td{border-bottom:none}
.inv-v2-code{font-weight:850;color:#8ebcff;white-space:nowrap;direction:ltr;unicode-bidi:isolate;font-size:11px}
.inv-v2-quantity{font-variant-numeric:tabular-nums}
.inv-v2-state{display:inline-flex;align-items:center;gap:4px;padding:4px 9px;border-radius:999px;background:rgba(127,144,167,.15);color:var(--muted);font-size:10px;font-weight:800}
.inv-v2-state.posted{background:rgba(35,183,156,.13);color:#74e1bf}
.inv-v2-state.void{background:rgba(239,72,99,.15);color:#ff97a7}
.inv-v2-row-actions{display:flex;flex-wrap:wrap;align-items:center;gap:5px}
.inv-v2-row-actions .btn{font-size:10px;white-space:nowrap}

.inv-v2-default-pill{display:inline-flex;margin-inline-start:8px;padding:2px 7px;border:1px solid rgba(35,183,156,.28);border-radius:999px;background:rgba(35,183,156,.1);color:#74e1bf;font-size:9px;font-weight:800}
.inv-v2-editor-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:12px 0}
.inv-v2-editor-grid .form-field{min-width:0}
.inv-v2-editor-grid input{width:100%;max-width:100%;min-height:38px}
@media(max-width:520px){.inv-v2-editor-grid{grid-template-columns:1fr}}

.inv-v2-pagination{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:8px;margin:10px 0 2px;font-size:10px;color:var(--muted)}
.inv-v2-loading,.inv-v2-empty,.inv-v2-error{display:flex;align-items:center;justify-content:center;min-height:130px;padding:18px;border:1px dashed var(--line);border-radius:11px;color:var(--muted);font-size:12px;margin-top:10px;text-align:center;gap:10px}
.inv-v2-error{color:#ff91a1}
.inv-v2-dialog{width:min(840px,calc(100vw - 26px));max-height:min(88vh,900px);padding:0;background:var(--surface-1);color:var(--text);border:1px solid var(--line);border-radius:17px;box-shadow:0 24px 72px rgba(0,0,0,.4)}
.inv-v2-dialog::backdrop{background:rgba(4,10,21,.74);backdrop-filter:blur(3px)}
.inv-v2-dialog-shell{display:flex;flex-direction:column;max-height:88vh;min-width:0}
.inv-v2-dialog-head,.inv-v2-dialog-foot{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;padding:13px 17px;background:var(--surface-2);border-bottom:1px solid var(--line)}
.inv-v2-dialog-head h3{margin:0;font-size:16px}
.inv-v2-dialog-body{overflow-y:auto;min-height:130px;padding:16px;max-width:100%}
.inv-v2-dialog-foot{justify-content:flex-start;border-top:1px solid var(--line);border-bottom:none}
.inv-v2-detail-meta{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-bottom:14px}
.inv-v2-detail-meta>div{min-width:0;padding:10px 11px;border-radius:10px;background:var(--surface-2);border:1px solid var(--line)}
.inv-v2-detail-meta small{display:block;font-size:10px;color:var(--muted);margin-bottom:5px}
.inv-v2-detail-meta strong{display:block;overflow-wrap:anywhere;font-size:12px}
.inv-v2-dialog .inv-v2-table-wrap{margin-top:0}
.inv-v2-dialog .inv-v2-quality{margin-top:12px;padding:12px;border-radius:10px;background:rgba(201,166,107,.11);border:1px solid rgba(201,166,107,.25);font-size:12px}
.inv-v2-dialog .inv-v2-quality ul{margin:8px 0 0;padding-inline-start:20px}
.inv-v2-notes{color:var(--muted);font-size:12px;line-height:1.8}
.inv-v2-picker{display:grid;gap:7px;max-height:54vh;overflow:auto}
.inv-v2-pick{width:100%;padding:11px 14px;border:1px solid var(--line);border-radius:10px;background:var(--surface-2);color:var(--text);text-align:start;display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px}
.inv-v2-pick:hover{border-color:var(--inv-blue,#2979ff);background:rgba(41,121,255,.1)}
.inv-v2-pick strong{color:#8ebcff;font-size:12px}
.inv-v2-pick span{color:var(--muted)}
#inventoryView #inventoryMetrics .metric{padding:10px 12px;border-radius:12px}
#inventoryView #inventoryMetrics .metric b{font-size:20px;margin-top:4px}
@media(max-width:1150px){
 .inv-v2-tab{padding:7px 10px;flex:0 0 auto}
 .inv-v2-table-wrap{overflow-x:auto;max-width:100%}
 .inv-v2-table{min-width:730px}
}
@media(max-width:700px){
 #inventoryView .inv-v2-workspace{margin-bottom:8px}
 .inv-v2-tabs{display:flex;flex-wrap:wrap;overflow-x:visible;gap:5px;padding:6px}
 .inv-v2-tab{min-width:0;flex:1 1 calc(33.333% - 8px);font-size:10px;min-height:34px;padding:7px 5px}
 .inv-v2-filters{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:9px 0}
 .inv-v2-search{grid-column:1/-1;max-width:none}
 .inv-v2-filters>.btn{width:100%;min-height:36px}
 .inv-v2-control{min-width:0;max-width:100%}
 .inv-v2-table-wrap{overflow:visible;padding:0 9px;max-width:100%}
 .inv-v2-table{width:100%;min-width:0}
 .inv-v2-table thead{display:none}
 .inv-v2-table tbody{display:grid;gap:0}
 .inv-v2-table tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px 10px;padding:12px 0;border-bottom:1px solid var(--line)}
 .inv-v2-table tr:last-child{border-bottom:0}
 .inv-v2-table td{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;min-width:0;padding:1px 0;border:0;background:transparent!important;font-size:11px}
 .inv-v2-table td::before{content:attr(data-label);color:var(--muted);font-size:9px;font-weight:700}
 .inv-v2-table td:last-child{grid-column:1/-1;padding-top:5px}
 .inv-v2-row-actions{width:100%}
 .inv-v2-row-actions .btn{flex:1 1 0;min-height:33px}
 .inv-v2-detail-meta{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
 .inv-v2-dialog-body{padding:11px}
 .inv-v2-dialog-head,.inv-v2-dialog-foot{padding:11px}
 .inv-v2-dialog-head h3{font-size:13px}
 .inv-v2-pick{align-items:flex-start;flex-direction:column;gap:5px}
 /* Existing transfer actions stay fully visible on mobile, without horizontal scrolling. */
 #inventoryView #stockCountHistory .table-wrap{overflow:visible;min-height:0;max-width:100%}
 #inventoryView #stockCountHistory table{min-width:0;width:100%}
 #inventoryView #stockCountHistory thead{display:none}
 #inventoryView #stockCountHistory tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 10px;padding:11px 9px;border-bottom:1px solid var(--line)}
 #inventoryView #stockCountHistory td{min-width:0;padding:0;display:flex;flex-direction:column;gap:3px;overflow-wrap:anywhere;border:0;font-size:10px;background:transparent!important}
 #inventoryView #stockCountHistory td::before{color:var(--muted);font-size:9px;font-weight:750}
 #inventoryView #stockCountHistory td:nth-child(1)::before{content:"رقم التحويل"}
 #inventoryView #stockCountHistory td:nth-child(2)::before{content:"من"}
 #inventoryView #stockCountHistory td:nth-child(3)::before{content:"إلى"}
 #inventoryView #stockCountHistory td:nth-child(4)::before{content:"الحالة"}
 #inventoryView #stockCountHistory td:nth-child(5)::before{content:"بالطريق"}
 #inventoryView #stockCountHistory td:nth-child(6){grid-column:1/-1}
 #inventoryView #stockCountHistory td:nth-child(6)::before{content:"الإجراءات"}
 #inventoryView #stockCountHistory .action-row{display:flex;gap:5px;flex-wrap:wrap;width:100%}
 #inventoryView #stockCountHistory .action-row .btn{min-height:34px}
}
@media(max-width:370px){.inv-v2-tab{flex-basis:calc(50% - 5px)}}
@media(prefers-reduced-motion:reduce){.inv-v2-tab{transition:none}}
