/* v1.13.158: Warehouse panels use the shared surface2/text tokens in both themes.
   The old --card2 token was only defined for light mode and caused white, unreadable help banners in dark mode. */
.wh156-layout{display:grid;gap:16px;direction:rtl}.wh156-tabs{display:flex;gap:9px;flex-wrap:wrap}.wh156-tab{background:var(--card,#fff);color:var(--text,#203148);border:1px solid var(--line,#dce5eb);border-radius:11px;padding:11px 16px;text-decoration:none;font-weight:700;font-size:13px}.wh156-tab.active{background:var(--primary,#146f62);color:#fff;border-color:transparent}.wh156-card{padding:20px;min-width:0;display:grid;gap:17px}.wh156-card h2,.wh156-card h3{margin:0 0 8px}.wh156-card p{color:var(--muted,#748399);line-height:1.8;margin:4px 0}.wh156-tools{display:flex;justify-content:space-between;align-items:center;gap:15px}.wh156-help{border:1px solid var(--line,#dce5eb);background:var(--surface2,#eef6f6);padding:14px;border-radius:12px;line-height:1.9;color:var(--text,#253448)}.wh156-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.wh156-metric{border:1px solid var(--line,#dce5eb);border-radius:12px;padding:16px;background:var(--card,#fff);display:flex;flex-direction:column;gap:12px;min-width:0}.wh156-metric small{color:var(--muted,#718096)}.wh156-metric strong{font-size:20px;overflow-wrap:anywhere}.wh156-filters{display:flex;gap:12px;align-items:center;flex-wrap:wrap}.wh156-filters .input{min-width:220px;max-width:420px;flex:1}.wh156-scroll{max-width:100%;overflow:auto}.wh156-table{width:100%;border-collapse:collapse;white-space:nowrap;font-size:13px}.wh156-table th{text-align:right;background:var(--surface2,#eef6f6);padding:12px 14px;position:sticky;top:0;z-index:1}.wh156-table td{padding:11px 14px;border-bottom:1px solid var(--line,#e6ecef);color:var(--text,#253448)}.wh156-table .num{text-align:left;font-variant-numeric:tabular-nums}.wh156-code{font-weight:700;direction:ltr;text-align:right}.wh156-opening{background:rgba(22,158,117,.09)}.wh156-review{background:rgba(234,179,8,.09)}.wh156-warning{color:#b56816;font-weight:700}.wh156-pagination{display:flex;justify-content:space-between;align-items:center;margin-top:15px;color:var(--muted,#748399)}.wh156-upload{display:block;padding:26px;border:2px dashed var(--line,#90aaa4);border-radius:12px;cursor:pointer;text-align:center;font-weight:700}.wh156-upload input{display:block;margin:12px auto 0;max-width:100%}.wh156-issue{padding:15px;border:1px solid #e4ae55;border-radius:12px;background:rgba(255,178,44,.08)}.wh156-issue-list{max-height:290px;overflow:auto;font-size:12px;line-height:2.15}.wh156-issue-list>div{border-bottom:1px solid var(--line,#dedede)}.wh156-confirm{display:grid;gap:14px}.wh156-confirm label{line-height:2;display:flex;gap:9px;align-items:baseline}.wh156-confirm input{accent-color:#168971}.wh156-back{display:inline-block;margin-bottom:14px;text-decoration:none;color:var(--primary,#127669)}.wh156-last{color:var(--muted,#697789);font-size:12px;padding:10px}
@media(max-width:900px){.wh156-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.wh156-card{padding:13px}.wh156-tools{flex-wrap:wrap}}@media(max-width:500px){.wh156-metrics{grid-template-columns:1fr 1fr}.wh156-metric{padding:10px}.wh156-metric strong{font-size:16px}.wh156-tab{font-size:11px;padding:9px}.wh156-pagination{flex-wrap:wrap;gap:8px}}
.wh156-source{border:1px solid var(--line,#d9e5e8);border-radius:12px;padding:14px}.wh156-source summary{font-weight:700;cursor:pointer}.wh156-source strong{display:block;margin:14px 0}.wh156-source .table-wrap{max-height:380px}
/* v157 catalogue UI */
.wh157-actions{display:flex;flex-wrap:wrap;gap:7px;align-items:center}.wh157-filter .select{max-width:220px;min-width:160px}.wh157-sources{display:flex;gap:4px;flex-wrap:wrap;max-width:250px}.wh157-pill{display:inline-block;padding:3px 7px;border-radius:7px;background:rgba(17,136,120,.12);font-size:11px;white-space:nowrap}.wh157-on{color:#059669;font-weight:700}.wh157-off{color:#9f6a30;font-weight:700}.wh157-danger{color:#bd4444!important}.wh157-unlinked{max-height:360px}.wh157-edit-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:13px;direction:rtl;max-height:65vh;overflow-y:auto;padding:8px}.wh157-edit-form .field{min-width:0}.wh157-edit-form label{display:block;margin-bottom:6px}.wh157-edit-form .field input,.wh157-edit-form .field select{width:100%}.wh157-wide{grid-column:1/-1}.wh157-check{display:flex;align-items:center}.wh157-check label{display:flex;gap:9px}.wh157-group{border:1px solid var(--line,#d9e5e8);border-radius:12px;padding:12px}.wh157-member-entry{display:grid;grid-template-columns:1fr 130px auto;gap:8px;margin:10px 0}.wh157-member{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:9px;padding:7px;border-bottom:1px solid var(--line,#d9e5e8)}.wh157-member input{max-width:125px}.wh157-member label{display:flex;align-items:center;gap:7px}.wh157-edit-form .input,.wh157-edit-form .select{min-width:0}@media(max-width:700px){.wh157-edit-form{grid-template-columns:1fr}.wh157-member-entry{grid-template-columns:1fr 1fr}.wh157-member-entry button{grid-column:1/-1}}

/* v1.13.159 - sort controls and compact master-data editors */
.wh159-sort{all:unset;display:inline-flex;align-items:center;gap:6px;cursor:pointer;font:inherit;font-weight:700;color:var(--text,#253448);white-space:nowrap;padding:2px 1px}.wh159-sort span{color:var(--muted,#84949f);font-size:11px}.wh159-sort:focus-visible,.wh159-plus:focus-visible,.wh159-icon-create:focus-visible{outline:2px solid var(--primary,#17a085);outline-offset:3px}.wh159-icon-create{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:34px;padding:5px 9px}.wh159-field-row{display:flex;gap:6px;align-items:stretch;width:100%}.wh159-field-row>.input{min-width:0;flex:1;width:auto!important}.wh159-plus{display:inline-flex;align-items:center;justify-content:center;min-width:37px;flex:0 0 37px;padding:6px}.wh159-plus svg{width:16px;height:16px}.wh159-lookup{display:grid;gap:14px;max-width:720px}.wh159-lookup-create{display:flex;align-items:center;gap:8px;flex-wrap:wrap}.wh159-lookup-create .input{min-width:190px;flex:1}.wh159-lookup-table{max-height:55vh;overflow:auto}.wh159-lookup-actions{display:flex;gap:8px}.wh159-lookup .wh156-table th{background:var(--surface2,#eef6f6)}@media(max-width:630px){.wh159-lookup-create .input{min-width:130px}.wh159-lookup-actions{flex-wrap:wrap}}

/* v1.13.161 master catalogue approvals and internal return navigation */
.wh161-notice{display:flex;justify-content:space-between;align-items:center;gap:16px;flex-wrap:wrap;border:1px solid var(--primary,#188b7c);background:var(--surface2,#142434);color:var(--text,#e8f0f9)}
.wh161-notice p{margin:5px 0 0;color:var(--muted,#abc0cf)}
.wh161-pending .wh156-scroll{max-height:45vh;overflow:auto;margin-top:12px}
.wh161-return{display:flex;margin-bottom:12px}
.wh156-filters #wh161-cardex-search{width:100%;max-width:460px}

/* v1.13.168 - show Excel opening quantity independently from ledger movements */
.wh168-opening-source{display:flex;flex-wrap:wrap;align-items:baseline;gap:8px 12px;padding:13px 15px;background:var(--surface2,#f2f7f7);border:1px solid var(--line,#dce5eb);border-radius:11px;color:var(--text,#24354b)}
.wh168-opening-source small{color:var(--muted,#718096);font-size:12px;line-height:1.8}
.wh168-opening-value{font-weight:800!important;color:var(--text,#22354b)!important;font-size:1.06em;font-variant-numeric:tabular-nums;direction:ltr;unicode-bidi:isolate}
.wh156-table .wh156-opening .wh168-opening-value{background:rgba(17,148,112,.13)}

/* v1.13.173: independent catalog source reconciliation / Excel export */
.wh173-source-tools{display:flex;flex-wrap:wrap;align-items:end;gap:10px 14px;border:1px solid var(--line,#dce5eb);border-radius:12px;padding:13px;background:var(--surface2,#ecf4f5)}
.wh173-source-tools>label:not(.wh173-hide-triple){display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--text,#253448);font-weight:700}
.wh173-source-tools .select{min-width:205px;max-width:360px}
.wh173-hide-triple{display:inline-flex;align-items:center;gap:8px;font-size:12px;font-weight:700;cursor:pointer;color:var(--text,#253448);padding:10px 0}
.wh173-hide-triple input{accent-color:var(--primary,#168971);width:17px;height:17px}
.wh173-counter{font-size:12px;color:var(--muted,#748399);margin-inline-start:auto;padding:8px}
.wh173-export{display:inline-flex;align-items:center;gap:6px}
@media(max-width:700px){.wh173-source-tools .select{min-width:145px;max-width:100%;width:100%}.wh173-source-tools>label:not(.wh173-hide-triple){flex:1;min-width:165px}.wh173-counter{margin:0}}
.wh173-match-state{display:block;margin-top:5px;color:var(--muted,#718096);font-size:11px;white-space:nowrap}.wh173-match-state:has(+ .wh157-on){color:var(--muted,#718096)}

/* v1.13.177: compact, collapsible Excel-like source filter in the Sources heading. */
.wh156-table th.wh175-source-heading{min-width:110px;vertical-align:bottom;position:sticky}
.wh175-source-head-row{display:flex;align-items:center;gap:7px;justify-content:flex-start;position:relative}
.wh175-filter-toggle{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;padding:0;border:1px solid var(--line,#dce5eb);border-radius:8px;background:var(--surface2,#142434);color:var(--muted,#8397a7);cursor:pointer;flex:0 0 28px}
.wh175-filter-toggle:hover,.wh175-filter-toggle:focus-visible{border-color:var(--primary,#12a183);color:var(--primary,#12a183);outline:none}
.wh175-filter-toggle.is-active{color:var(--primary,#12a183);border-color:var(--primary,#12a183);background:rgba(18,161,131,.10)}
.wh175-filter-popover{position:absolute;top:calc(100% + 7px);inset-inline-start:0;z-index:30;min-width:220px;max-width:min(280px,80vw);padding:10px;border:1px solid var(--line,#dce5eb);border-radius:10px;background:var(--surface,#0e1d2b);box-shadow:0 12px 28px rgba(0,0,0,.25)}
.wh175-filter-popover[hidden]{display:none!important}
.wh175-head-filter{display:flex;flex-direction:column;gap:6px;max-width:100%;color:var(--muted,#8397a7);font-size:11px;font-weight:600}
.wh175-source-select{display:block;width:100%;max-width:100%;min-width:0;min-height:34px!important;padding:5px 7px!important;border:1px solid var(--line,#c5d4df)!important;border-radius:8px;background:var(--card,#fff)!important;color:var(--text,#24354b)!important;font-size:11px!important;font-weight:600;cursor:pointer;direction:rtl}
.wh175-source-select:focus-visible{outline:2px solid var(--primary,#12a183);outline-offset:2px}

/* v1.13.179: compact cardex index, sortable headings and hidden warehouse filter. */
.wh179-cardex-table th{overflow:visible}.wh179-sort{display:inline-flex;align-items:center;gap:7px;cursor:pointer;border:0;background:transparent;color:var(--text,#e9f3f8);font:inherit;font-weight:700;padding:3px 0;white-space:nowrap}.wh179-sort span{color:var(--muted,#91a8b6);font-size:10px}.wh179-sort.is-active span{color:var(--primary,#16a085)}.wh179-sort:focus-visible,.wh179-filter-trigger:focus-visible,.wh179-eye:focus-visible{outline:2px solid var(--primary,#16a085);outline-offset:2px}.wh179-warehouse-th{z-index:5!important}.wh179-warehouse-head{display:flex;align-items:center;gap:6px;position:relative;min-width:125px}.wh179-filter-trigger{width:28px;height:28px;display:inline-flex;justify-content:center;align-items:center;border:1px solid var(--line,#334454);border-radius:7px;color:var(--muted,#9aabb7);background:var(--surface2,#192b3b);cursor:pointer;padding:0}.wh179-filter-trigger:hover,.wh179-filter-trigger.is-active{color:var(--primary,#18ad8a);border-color:var(--primary,#18ad8a)}.wh179-warehouse-menu{position:absolute;top:calc(100% + 7px);inset-inline-start:0;min-width:195px;z-index:30;background:var(--card,#112131);color:var(--text,#e9f3f8);border:1px solid var(--line,#334454);border-radius:10px;box-shadow:0 12px 24px rgba(0,0,0,.22);padding:10px;text-align:right}.wh179-warehouse-menu[hidden]{display:none!important}.wh179-warehouse-menu label{display:block;margin-bottom:6px;font-size:11px;color:var(--muted,#a4b5c5)}.wh179-warehouse-menu select{width:100%;min-width:175px;font-size:12px}.wh179-eye{display:inline-flex;align-items:center;justify-content:center;width:38px;height:33px;padding:5px}.wh179-eye svg{flex:0 0 auto}.wh179-cardex-pages{gap:12px;flex-wrap:wrap}.wh179-cardex-pages>div{display:flex;gap:8px}

/* v1.13.180: Inventory movement summary -- Excel export and compact in-column filter. */
.wh180-report-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.wh180-report-table th{overflow:visible}
.wh180-warehouse-th{z-index:5!important}
.wh180-report-table .wh179-warehouse-head{min-width:115px}
.wh180-report-table .wh179-warehouse-menu{z-index:40}
@media(max-width:670px){.wh180-report-actions{width:100%}.wh180-report-actions .btn{flex:1}}

/* v181: one-pass master-catalog reconciliation status and searchable Excel candidates. */
.wh181-audit{margin-bottom:12px}
.wh181-audit .wh156-tools{align-items:center}
.wh181-audit .wh156-tools p{margin-top:6px;line-height:1.8}
.wh181-pending-results{margin:12px 0;border:1px solid var(--line,#294052);border-radius:10px;padding:12px;background:var(--surface2,#102337)}
.wh181-pending-results p{color:var(--muted,#a9bdca);font-size:12px;line-height:1.8}
