/* Maysara WMS design system — shared by native WMS and inventory workflows */
#inventoryView{
  --wms-ink:#1d3029;
  --wms-muted:#697871;
  --wms-line:#e2e9e5;
  --wms-bg:#f4f7f5;
  --wms-surface:#fff;
  --wms-surface-soft:#edf3ef;
  --wms-accent:#23745a;
  --wms-accent-strong:#185c45;
  --wms-accent-soft:#e6f2ec;
  --wms-green:#25815e;
  --wms-amber:#a66318;
  --wms-red:#b74343;
  --wms-purple:#23745a;
  color:var(--wms-ink);
  font-family:Cairo,Alexandria,system-ui,sans-serif;
  min-width:0;
}
#inventoryView *{box-sizing:border-box}
#inventoryView .inv-live-shell{
  width:100%;max-width:100%;margin:0;padding:20px;
  color:var(--wms-ink);background:var(--wms-bg);border:0;border-radius:0;
  font:400 14px/1.55 Cairo,Alexandria,system-ui,sans-serif;
}
#inventoryView.wms-unified-active .inv-live-head{display:none}
#inventoryView .inv-live-head{
  display:flex;align-items:center;justify-content:space-between;gap:20px;
  padding:0 0 18px;margin:0 0 18px;background:transparent;border:0;border-radius:0;
  box-shadow:none;color:var(--wms-ink)
}
#inventoryView .inv-live-head span,#inventoryView .inv-live-head small{color:var(--wms-muted)}
#inventoryView .inv-live-head h1{margin:4px 0;font-size:23px;line-height:1.3;font-weight:700;color:var(--wms-ink)}
#inventoryView .inv-live-head-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#inventoryView .inv-live-status{color:var(--wms-green)}
#inventoryView .wms-workspace-layout{
  display:grid;grid-template-columns:248px minmax(0,1fr);gap:22px;align-items:start;
  width:100%;min-width:0;direction:rtl
}
#inventoryView .wms-workspace-layout.is-collapsed{grid-template-columns:minmax(0,1fr)}
#inventoryView .wms-workspace-layout.is-collapsed>.inv-live-tabs{display:none}
#inventoryView .inv-live-tabs.wms-system-view{
  display:block;position:sticky;top:16px;z-index:4;
  width:auto;max-width:none;min-width:0;max-height:calc(100vh - 32px);overflow:auto;
  margin:0;padding:12px;background:var(--wms-surface);border:1px solid var(--wms-line);
  border-radius:14px;box-shadow:0 3px 14px rgba(24,48,37,.035);white-space:normal
}
#inventoryView .wms-sidebar-label{
  padding:5px 10px 11px;color:var(--wms-muted);font-size:11px;font-weight:700;letter-spacing:.04em
}
#inventoryView .wms-system-nav{display:grid;gap:3px}
#inventoryView .wms-nav-group{margin:1px 0}
#inventoryView .wms-nav-group summary,
#inventoryView .wms-menu-item{
  display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:8px 10px;
  color:var(--wms-ink);background:transparent;border:0;border-radius:8px;
  font:600 13px/1.4 Cairo,Alexandria,system-ui,sans-serif;text-align:right;text-decoration:none;
  cursor:pointer;transition:background .15s,color .15s
}
#inventoryView .wms-nav-group summary{list-style:none}
#inventoryView .wms-nav-group summary::-webkit-details-marker{display:none}
#inventoryView .wms-nav-group summary:hover,
#inventoryView .wms-menu-item:hover{background:var(--wms-surface-soft);color:var(--wms-accent-strong)}
#inventoryView .wms-menu-item.active{color:var(--wms-accent-strong);background:var(--wms-accent-soft);font-weight:700}
#inventoryView .wms-nav-icon{
  display:inline-grid;place-items:center;flex:0 0 21px;width:21px;height:21px;
  color:var(--wms-muted);font-size:15px;font-weight:600;line-height:1
}
#inventoryView .wms-menu-item.active .wms-nav-icon{color:var(--wms-accent)}
#inventoryView .wms-nav-label{min-width:0;overflow:hidden;text-overflow:ellipsis}
#inventoryView .wms-nav-chevron{margin-inline-start:auto;color:var(--wms-muted);font-size:13px;transition:transform .15s}
#inventoryView .wms-nav-group[open]>.wms-nav-chevron{transform:rotate(180deg)}
#inventoryView .wms-nav-children{display:grid;gap:2px;padding:3px 0 5px 0}
#inventoryView .wms-nav-children .wms-menu-item{min-height:36px;padding-inline:11px 9px;font-size:12px;font-weight:500}
#inventoryView .wms-nav-children .wms-menu-item .wms-nav-icon{font-size:13px}
#inventoryView .wms-app-root{display:grid;gap:17px;min-width:0;width:100%;padding:0;color:var(--wms-ink);font-family:inherit}
#inventoryView .wms-app-head{
  display:flex;align-items:center;justify-content:space-between;gap:20px;min-width:0;
  padding:2px 1px 15px;background:transparent;border:0;border-bottom:1px solid var(--wms-line);
  border-radius:0;box-shadow:none
}
#inventoryView .wms-app-title{min-width:0}
#inventoryView .wms-eyebrow{display:block;color:var(--wms-accent);font-size:11px;font-weight:700}
#inventoryView .wms-app-head h2{margin:3px 0 2px;color:var(--wms-ink);font-size:23px;line-height:1.35;font-weight:700}
#inventoryView .wms-app-head p{margin:0;color:var(--wms-muted);font-size:12px}
#inventoryView .wms-head-actions{display:flex;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:7px}
#inventoryView .wms-primary,#inventoryView .wms-secondary,#inventoryView .wms-quiet,
#inventoryView .wms-sidebar-toggle,#inventoryView .inv-live-head-actions button,
#inventoryView .inv-live-toolbar button,#inventoryView .inv-live-hero button{
  display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:38px;
  padding:8px 12px;border:1px solid var(--wms-line);border-radius:8px;
  background:var(--wms-surface);color:var(--wms-ink);font:inherit;font-size:12px;line-height:1.35;font-weight:600;cursor:pointer;
  transition:background .15s,border-color .15s,color .15s,box-shadow .15s
}
#inventoryView .wms-primary,#inventoryView .inv-live-hero button{
  border-color:var(--wms-accent);background:var(--wms-accent);color:#fff
}
#inventoryView .wms-primary:hover,#inventoryView .inv-live-hero button:hover{background:var(--wms-accent-strong);border-color:var(--wms-accent-strong)}
#inventoryView .wms-secondary:hover,#inventoryView .wms-quiet:hover,
#inventoryView .wms-sidebar-toggle:hover,#inventoryView .inv-live-head-actions button:hover,
#inventoryView .inv-live-toolbar button:hover{background:var(--wms-surface-soft);border-color:#cbd8d0}
#inventoryView button:focus-visible,#inventoryView a:focus-visible,#inventoryView input:focus-visible,
#inventoryView select:focus-visible,#inventoryView textarea:focus-visible,#inventoryView summary:focus-visible{
  outline:3px solid rgba(35,116,90,.24);outline-offset:2px
}
#inventoryView .wms-panel,#inventoryView .wms-kpi,#inventoryView .wms-card,
#inventoryView .wms-chart-card,#inventoryView .wms-forecast-card,
#inventoryView .inv-live-card,#inventoryView .inv-live-metric,
#inventoryView .inv-live-report-grid article,#inventoryView .irt-card,#inventoryView .irt-kpi,
#inventoryView .irt-report-chart{
  color:var(--wms-ink);background:var(--wms-surface);border:1px solid var(--wms-line);
  border-radius:11px;box-shadow:0 2px 8px rgba(24,48,37,.025)
}
#inventoryView .wms-kpi{padding:15px}
#inventoryView .wms-kpi-icon{color:var(--wms-accent)}
#inventoryView .wms-kpi small,#inventoryView .wms-kpi em,
#inventoryView .wms-panel small,#inventoryView .inv-live-card header span,
#inventoryView .inv-live-row small,#inventoryView .irt-card header span{color:var(--wms-muted)}
#inventoryView .wms-kpi strong{color:var(--wms-ink);font-size:23px;font-variant-numeric:tabular-nums}
#inventoryView .wms-panel{padding:16px}
#inventoryView .wms-panel h3,#inventoryView .inv-live-card h3,
#inventoryView .irt-card header b{color:var(--wms-ink)}
#inventoryView .wms-table,#inventoryView .inv-live-table{overflow:auto;border:1px solid var(--wms-line);border-radius:10px;background:var(--wms-surface)}
#inventoryView .wms-table th,#inventoryView .inv-live-table-head{background:var(--wms-surface-soft);color:var(--wms-muted);font-weight:700}
#inventoryView .wms-table td,#inventoryView .wms-table th,
#inventoryView .inv-live-table-row{border-color:var(--wms-line)}
#inventoryView .wms-table tr:hover td,#inventoryView .inv-live-table-row:hover{background:var(--wms-surface-soft)}
#inventoryView .wms-table input,#inventoryView .wms-table select,
#inventoryView input:not([type=checkbox]):not([type=radio]),#inventoryView select,#inventoryView textarea{
  max-width:100%;min-height:38px;padding:8px 10px;color:var(--wms-ink);
  background:var(--wms-surface);border:1px solid var(--wms-line);border-radius:8px;
  font:400 13px/1.4 Cairo,Alexandria,system-ui,sans-serif
}
#inventoryView textarea{min-height:86px}
#inventoryView .inv-live-hero,#inventoryView .inv-live-product-hero,
#inventoryView .irt-head{
  color:var(--wms-ink);background:var(--wms-surface);border:1px solid var(--wms-line);
  border-radius:11px;box-shadow:none
}
#inventoryView .inv-live-hero h2,#inventoryView .inv-live-product-hero h2,
#inventoryView .irt-head h2{color:var(--wms-ink)}
#inventoryView .inv-live-hero p,#inventoryView .inv-live-product-hero p,
#inventoryView .irt-head small{color:var(--wms-muted)}
#inventoryView .inv-live-toolbar{align-items:center;gap:12px;padding:0 0 12px;border:0}
#inventoryView .inv-live-toolbar h2{color:var(--wms-ink)}
#inventoryView .inv-live-toolbar span{color:var(--wms-muted)}
#inventoryView .inv-live-row{color:var(--wms-ink);border-color:var(--wms-line)}
#inventoryView .inv-live-row:hover{background:var(--wms-surface-soft)}
#inventoryView .inv-live-tabs button:not(.wms-menu-item){border-color:var(--wms-line);background:var(--wms-surface);color:var(--wms-ink)}
#inventoryView .inv-live-form label,#inventoryView .irt-filters label{color:var(--wms-muted);font-weight:600}
#inventoryView .wms-pill{border-radius:999px;font-size:11px;font-weight:700}
#inventoryView .wms-alert{border:1px solid var(--wms-line);border-radius:9px;box-shadow:none}
#inventoryView .wms-alert.is-error{border-color:#edc8c5}
#inventoryView .wms-empty,#inventoryView .inv-live-empty,#inventoryView .irt-empty{
  color:var(--wms-muted);background:var(--wms-surface-soft);border:1px dashed var(--wms-line);border-radius:9px
}
#inventoryView .irt-report-chart{padding:16px}
#inventoryView .irt-report-chart-head h3{color:var(--wms-ink)}
#inventoryView .irt-report-chart-row>i{background:var(--wms-surface-soft)}
#inventoryView .irt-report-chart-row>i>b{background:var(--wms-accent)}
#inventoryView .irt-report-chart-row>strong,#inventoryView .irt-report-chart-head>b{color:var(--wms-accent)}
#inventoryView .wms-app-root :where(h1,h2,h3,h4,p){overflow-wrap:anywhere}
@media(max-width:960px){
  #inventoryView .wms-workspace-layout{grid-template-columns:220px minmax(0,1fr);gap:16px}
  #inventoryView .inv-live-shell{padding:16px}
}
@media(max-width:760px){
  #inventoryView .wms-workspace-layout{grid-template-columns:minmax(0,1fr);gap:12px}
  #inventoryView .inv-live-tabs.wms-system-view{position:static;max-height:none;overflow:visible}
  #inventoryView .wms-workspace-layout.is-collapsed>.inv-live-tabs{display:none}
  #inventoryView .wms-app-head{align-items:flex-start;flex-direction:column;gap:10px}
  #inventoryView .wms-head-actions{width:100%}
  #inventoryView .wms-head-actions>*{flex:0 1 auto}
  #inventoryView .inv-live-head{align-items:flex-start;flex-direction:column;padding-bottom:12px}
}
@media(max-width:480px){
  #inventoryView .inv-live-shell{padding:12px}
  #inventoryView .inv-live-head h1,#inventoryView .wms-app-head h2{font-size:20px}
  #inventoryView .wms-head-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  #inventoryView .wms-head-actions>*{width:100%;min-width:0}
  #inventoryView .wms-kpi-grid,#inventoryView .inv-live-kpis,#inventoryView .inv-live-report-grid,#inventoryView .irt-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
  #inventoryView .wms-dashboard-grid,#inventoryView .inv-live-grid,#inventoryView .inv-live-forecast-grid{grid-template-columns:minmax(0,1fr)}
  #inventoryView .inv-live-head-actions{width:100%;display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
  #inventoryView .inv-live-head-actions button{width:100%;min-width:0}
}
/* Dark palette follows the same component rules without changing status colors */
#inventoryView.wms-theme-dark{
  --wms-ink:#e5eee9;--wms-muted:#a0b0a8;--wms-line:#34453d;--wms-bg:#17221d;
  --wms-surface:#202e27;--wms-surface-soft:#293a31;--wms-accent:#73bd99;
  --wms-accent-strong:#8bcba9;--wms-accent-soft:#28483a;--wms-green:#75c59b;
  --wms-amber:#efb85e;--wms-red:#ed8585;--wms-purple:#73bd99
}
#inventoryView.wms-theme-dark .inv-live-shell{background:var(--wms-bg)}
#inventoryView.wms-theme-dark .wms-app-head{border-bottom-color:var(--wms-line)}
#inventoryView.wms-theme-dark .wms-primary,#inventoryView.wms-theme-dark .inv-live-hero button{color:#10251b}
#inventoryView.wms-theme-dark .wms-empty,#inventoryView.wms-theme-dark .inv-live-empty,
#inventoryView.wms-theme-dark .irt-empty{background:var(--wms-surface-soft)}
#inventoryView.wms-theme-dark .wms-table th,#inventoryView.wms-theme-dark .inv-live-table-head{background:var(--wms-surface-soft)}
#inventoryView.wms-theme-dark .wms-table td,#inventoryView.wms-theme-dark .wms-table th,
#inventoryView.wms-theme-dark .inv-live-table-row{border-color:var(--wms-line);color:var(--wms-ink)}
#inventoryView.wms-theme-dark .inv-live-head-actions button,
#inventoryView.wms-theme-dark .wms-secondary,#inventoryView.wms-theme-dark .wms-quiet,
#inventoryView.wms-theme-dark .wms-sidebar-toggle{background:var(--wms-surface);color:var(--wms-ink);border-color:var(--wms-line)}

/* Native WMS tokens and chart states */
#inventoryView .wms-app-root{
  --wms-ink:#1d3029;--wms-muted:#697871;--wms-line:#e2e9e5;--wms-bg:#f4f7f5;
  --wms-purple:#23745a;--wms-green:#25815e;--wms-accent:#23745a;--wms-accent-soft:#e6f2ec
}
#inventoryView .wms-panel-head i,#inventoryView .wms-kpi-icon{background:var(--wms-accent-soft);color:var(--wms-accent)}
#inventoryView .wms-flow-step{border-color:var(--wms-line);background:var(--wms-surface);color:var(--wms-ink)}
#inventoryView .wms-flow-step:hover,#inventoryView .wms-click-row:hover,
#inventoryView .wms-click-row.is-selected{border-color:var(--wms-accent);background:var(--wms-accent-soft)}
#inventoryView .wms-chart-legend i,#inventoryView .wms-bar-done,
#inventoryView .wms-task-progress i b,#inventoryView .wms-pick-card-progress i b,
#inventoryView .wms-scan-progress>i b,#inventoryView .wms-report-bar i b{background:var(--wms-accent)}
#inventoryView .wms-bar-stack,#inventoryView .wms-forecast-bar>i,
#inventoryView .wms-risk-row>i,#inventoryView .wms-wave-progress i{background:var(--wms-surface-soft)}
#inventoryView .wms-bar-total{background:#b7d9c7}
#inventoryView .wms-bar-day>b{color:var(--wms-muted)}
#inventoryView .wms-secondary,#inventoryView .wms-period-switch button.active,
#inventoryView .wms-filter-chip{color:var(--wms-accent-strong);background:var(--wms-accent-soft);border-color:#cfe4d8}
#inventoryView .wms-text-button{color:var(--wms-accent-strong)}
#inventoryView .wms-danger-quiet{color:var(--wms-red);background:var(--wms-surface);border-color:var(--wms-line)}
#inventoryView .wms-camera-button{color:#fff;background:var(--wms-accent);border-color:var(--wms-accent)}
#inventoryView .wms-camera-stop{color:var(--wms-red);background:var(--wms-surface);border-color:var(--wms-line)}
#inventoryView .wms-task-card,#inventoryView .wms-order-card,#inventoryView .wms-wave-card,
#inventoryView .wms-wave-panel,#inventoryView .wms-warehouse-card,#inventoryView .wms-note-grid article,
#inventoryView .wms-report-metrics>div{color:var(--wms-ink);background:var(--wms-surface);border-color:var(--wms-line);box-shadow:none}
#inventoryView .wms-order-card.is-selected{border-color:var(--wms-accent);background:var(--wms-accent-soft)}
#inventoryView .wms-warehouse-code{color:var(--wms-accent-strong);background:var(--wms-accent-soft)}
#inventoryView .wms-supplier-choice:hover,#inventoryView .wms-supplier-choice.active{border-color:var(--wms-accent);background:var(--wms-accent-soft)}
#inventoryView .wms-nav-group[open]>summary .wms-nav-chevron{transform:rotate(180deg)}
#inventoryView.wms-theme-dark .wms-app-root{
  --wms-ink:#e5eee9;--wms-muted:#a0b0a8;--wms-line:#34453d;--wms-bg:#17221d;
  --wms-purple:#73bd99;--wms-green:#75c59b;--wms-accent:#73bd99;--wms-accent-soft:#28483a
}
#inventoryView.wms-theme-dark .wms-app-root{background:var(--wms-bg);color:var(--wms-ink)}
#inventoryView.wms-theme-dark .wms-flow-step,#inventoryView.wms-theme-dark .wms-task-card,
#inventoryView.wms-theme-dark .wms-order-card,#inventoryView.wms-theme-dark .wms-wave-card,
#inventoryView.wms-theme-dark .wms-wave-panel,#inventoryView.wms-theme-dark .wms-warehouse-card,
#inventoryView.wms-theme-dark .wms-note-grid article,#inventoryView.wms-theme-dark .wms-report-metrics>div,
#inventoryView.wms-theme-dark .wms-kpi,#inventoryView.wms-theme-dark .wms-panel{
  color:var(--wms-ink);background:var(--wms-surface);border-color:var(--wms-line)
}
#inventoryView.wms-theme-dark .wms-flow-step:hover,#inventoryView.wms-theme-dark .wms-click-row:hover,
#inventoryView.wms-theme-dark .wms-click-row.is-selected,#inventoryView.wms-theme-dark .wms-order-card.is-selected{
  background:var(--wms-accent-soft);border-color:var(--wms-accent)
}
#inventoryView.wms-theme-dark .wms-bar-total{background:#365c49}
#inventoryView.wms-theme-dark .wms-secondary,#inventoryView.wms-theme-dark .wms-filter-chip,
#inventoryView.wms-theme-dark .wms-period-switch button.active{color:var(--wms-ink);background:var(--wms-accent-soft);border-color:var(--wms-line)}
