@import url("assets/ui/inventory/fonts/rubik.css");

/* Approved Figma v02, 393×852 / 375×812. Scoped to the new inventory only. */
#nmx.inv-active {
  --inv-canvas:#07111f; --inv-text:#f3f5fa; --inv-muted:#9fb5c8;
  --inv-gold:#f2c752; --inv-green:#66d56b; --inv-radius:12px;
  background:#050d14;
}
#nmx.inv-active .nm-wrap { padding:0; gap:0; max-width:none; }
#nmx.inv-active .nm-wrap > .nm-head { display:none; }
#nmx.inv-active #nmx-body { overflow:auto; display:block; scrollbar-width:thin; }
#nmx.inv-active .inv-shell, #nmx.inv-active .inv-shell * { font-family:'GS Inventory Rubik','Rubik',sans-serif; box-sizing:border-box; }
#nmx.inv-active .inv-shell {
  position:relative; display:flex; flex-direction:column; gap:6px; width:100%; max-width:440px;
  height:100%; min-height:782px; margin:0 auto; padding:8px;
  padding-top:max(8px,var(--sa-top,0px)); padding-bottom:max(8px,var(--sa-bottom,0px));
  color:var(--inv-text); background:linear-gradient(#0b1828,#050d14);
  font-size:14px; line-height:1.2; font-weight:500; isolation:isolate;
  text-shadow:none; -webkit-text-stroke:0; letter-spacing:normal;
}
#nmx.inv-active button { -webkit-tap-highlight-color:transparent; }
#nmx.inv-active button:focus-visible { outline:3px solid #fff0ac; outline-offset:2px; z-index:5; }
#nmx.inv-active button:disabled { cursor:default; }
#nmx.inv-active .inv-icon { display:inline-block; position:relative; flex:none; vertical-align:middle; pointer-events:none; }
#nmx.inv-active .inv-icon img { position:absolute; left:50%; top:50%; max-width:none; transform-origin:center; display:block; }
#nmx.inv-active .inv-bitmap { display:block; flex:none; object-fit:contain; pointer-events:none; image-rendering:auto; }
#nmx.inv-active .inv-header { display:flex; align-items:center; justify-content:space-between; gap:6px; height:44px; flex:none; }
#nmx.inv-active .inv-back { width:44px; height:44px; border-radius:10px; background:#0b1a27; border:1px solid #30495e; display:grid; place-items:center; flex:none; }
#nmx.inv-active .inv-heading { display:flex; align-items:center; gap:5px; height:44px; min-width:0; font-size:19px; font-weight:700; white-space:nowrap; flex:1; }
#nmx.inv-active .inv-wallets { display:flex; gap:12px; flex:none; }
#nmx.inv-active .inv-wallet { display:flex; align-items:center; justify-content:center; gap:8px; width:72px; height:36px; border:1.5px solid #294252; border-radius:18px; background:linear-gradient(#09121c,#030b12); box-shadow:inset 0 1px 1px #b5d8f114,inset 0 -2px 5px #0004086b,0 2px 3px #0004; font-size:12px; font-weight:700; }
#nmx.inv-active .inv-wallet b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#nmx.inv-active .inv-tabs { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; padding:0 2px; height:50px; flex:none; border:1px solid #2a435d; border-radius:12px; background:linear-gradient(#0d1c2d,#071422); }
#nmx.inv-active .inv-tab { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; min-width:0; height:50px; border-radius:9px; font-size:10px; font-weight:700; color:#91b4cf; white-space:nowrap; }
#nmx.inv-active .inv-tab:disabled { color:#91b4cf; opacity:.67; }
#nmx.inv-active .inv-tab.selected { border:2px solid #ffde70; color:#fff0bd; background:linear-gradient(#b38927,#9a7420 60%,#76551b); box-shadow:inset 0 -3px 12px #f9d26666,inset 0 1px 1px #fff1b83d,0 3px 10px #eeb83e2e; }
#nmx.inv-active .inv-scene { flex:1 0 220px; min-height:220px; position:relative; overflow:hidden; background:url("assets/ui/inventory/hero-scene-six-positions.png") center / cover no-repeat; }
#nmx.inv-active .inv-scene::before { content:''; position:absolute; inset:0; pointer-events:none; background:linear-gradient(#06101b66,transparent 25%,transparent 80%,#06101b73); }
#nmx.inv-active .inv-power { position:absolute; top:3px; left:50%; transform:translateX(-50%); display:flex; flex-direction:column; align-items:center; color:#91b0cc; font-size:11px; white-space:nowrap; z-index:1; }
#nmx.inv-active .inv-power > div { display:flex; align-items:center; gap:6px; height:31.2px; }
#nmx.inv-active .inv-power b { color:#ffd35a; font-size:26px; font-weight:700; }
#nmx.inv-active .inv-hero-portrait { position:absolute; height:calc(67.5% - 40px); max-width:49%; width:auto; object-fit:contain; left:50%; bottom:30%; transform:translateX(-50%); image-rendering:auto; }
#nmx.inv-active .inv-equipped { position:absolute; display:flex; flex-direction:column; justify-content:space-between; top:calc(20% - 10px); bottom:calc(30% - 59px); width:66px; }
#nmx.inv-active .inv-equipped.left { left:10px; } #nmx.inv-active .inv-equipped.right { right:10px; }
#nmx.inv-active .inv-tile {
  --rarity:#28465e; position:relative; height:58px; min-width:0; flex:none; display:block;
  border:2px solid var(--rarity); border-radius:8px; background:linear-gradient(#111b29,#10101c 55%,#122432);
  box-shadow:inset 0 1px 1px #c2e1ff1c,inset 0 -2px 5px #0009;
}
#nmx.inv-active .inv-r-uncommon { --rarity:#66d56b; box-shadow:0 0 5px #59cc6626,inset 0 1px 1px #c2e1ff1c,inset 0 -2px 5px #0009; }
#nmx.inv-active .inv-r-rare { --rarity:#479edd; box-shadow:0 0 5px #3399e521,inset 0 1px 1px #c2e1ff1c,inset 0 -2px 5px #0009; }
#nmx.inv-active .inv-r-epic { --rarity:#ad49ee; box-shadow:0 0 5px #ab40f540,inset 0 1px 1px #c2e1ff1c,inset 0 -2px 5px #0009; }
#nmx.inv-active .inv-r-legend { --rarity:#f7cc50; box-shadow:0 0 5px #ffc44740,inset 0 1px 1px #c2e1ff1c,inset 0 -2px 5px #0009; }
#nmx.inv-active .inv-r-mythic { --rarity:#ee7563; box-shadow:0 0 5px #f2594040,inset 0 1px 1px #c2e1ff1c,inset 0 -2px 5px #0009; }
#nmx.inv-active .inv-tile.selected { --rarity:#ffdc68; border-width:2.5px; box-shadow:inset 0 -3px 12px #f9d26666,inset 0 1px 1px #fff1b83d,0 3px 10px #eeb83e2e; }
#nmx.inv-active .inv-gear-art { position:absolute; left:50%; top:-1px; transform:translateX(-50%); width:44px; height:44px; object-fit:contain; image-rendering:auto; pointer-events:none; }
#nmx.inv-active .inv-tile small { position:absolute; left:5px; bottom:3px; font-size:9px; font-weight:500; color:#e5f0f8; line-height:1.2; white-space:nowrap; }
#nmx.inv-active .inv-glint { position:absolute; top:0; left:2px; opacity:.85; }
#nmx.inv-active .inv-check { position:absolute; right:3px; top:2px; }
#nmx.inv-active .inv-tile-empty { border-width:1.5px; }
#nmx.inv-active .inv-tile-empty > .inv-icon { position:absolute; left:50%; top:14px; transform:translateX(-50%); }
#nmx.inv-active .inv-tile-empty:disabled { opacity:1; }
#nmx.inv-active .inv-stats { display:flex; align-items:center; flex:none; height:56px; border:1px solid #29475b; border-radius:13px; background:linear-gradient(#0a1823,#07121b); box-shadow:inset 0 1px 1px #b5d8f114,inset 0 -2px 5px #0004086b,0 2px 3px #0004; }
#nmx.inv-active .inv-stat { display:flex; align-items:center; justify-content:center; gap:4px; width:33.333%; min-width:0; }
#nmx.inv-active .inv-stat-medallion { display:grid; place-items:center; width:28px; height:28px; border-radius:50%; border:1px solid #2c4c64; background:linear-gradient(#132a3e,#06101a); flex:none; }
#nmx.inv-active .inv-stat > div { min-width:0; width:76px; }
#nmx.inv-active .inv-stat-label { display:block; font-size:10px; color:#8db3cf; margin-bottom:2px; }
#nmx.inv-active .inv-stat-value { display:flex; align-items:flex-start; gap:4px; white-space:nowrap; }
#nmx.inv-active .inv-stat-value b { font-size:16px; font-weight:700; }
#nmx.inv-active .inv-stat-value em { font-size:9px; font-weight:700; font-style:normal; color:var(--inv-green); margin-top:1px; }
#nmx.inv-active .inv-panel { display:flex; flex-direction:column; flex:none; gap:6px; height:302px; padding:7px; border:1px solid #324553; border-radius:13px; background:linear-gradient(#101e29,#08121b); box-shadow:inset 0 1px 1px #b5d8f114,inset 0 -2px 5px #0004086b,0 2px 3px #0004; }
#nmx.inv-active .inv-filters { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:2px; height:44px; flex:none; }
#nmx.inv-active .inv-filter { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:3px; min-width:0; border-radius:8px; font-size:10px; color:#9fb5c8; background:linear-gradient(#13222e,#0b151e); white-space:nowrap; }
#nmx.inv-active .inv-filter.selected, #nmx.inv-active .inv-nav-item.selected { color:#ffe49a; border:1px solid #f1ce6a; background:radial-gradient(ellipse at 50% 110%,#e4b13c70,transparent 90%),linear-gradient(#0a121b,#24251a 52%,#695123); box-shadow:inset 0 -3px 12px #f9d26666,inset 0 1px 1px #fff1b83d,0 3px 10px #eeb83e2e; }
#nmx.inv-active .inv-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); grid-auto-rows:58px; align-content:start; gap:6px; min-height:0; height:186px; flex:1; overflow:auto; scrollbar-width:thin; padding:0; }
#nmx.inv-active .inv-empty { grid-column:1/-1; grid-row:span 3; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; min-height:176px; text-align:center; }
#nmx.inv-active .inv-empty b { font-size:14px; font-weight:500; }
#nmx.inv-active .inv-empty > span { font-size:10px; color:#8aa9bf; }
#nmx.inv-active .inv-actions { display:flex; gap:8px; height:44px; flex:none; }
#nmx.inv-active .inv-button { display:flex; align-items:center; justify-content:center; gap:8px; height:44px; min-height:44px; min-width:0; flex:1; border-radius:12px; font-size:14px; font-weight:500; white-space:nowrap; }
#nmx.inv-active .inv-button.gold { color:#07111f; border:1.5px solid #ffe69b; background:linear-gradient(#f7d674,#e9bb4b 44%,#c58a20); box-shadow:inset 0 1px 1px #fff3b9a6,inset 0 -2px 2px #70401080,0 1px 9px #d4a13733; }
#nmx.inv-active .inv-button.dark { border:1.5px solid #63718199; background:linear-gradient(#32404e,#1d2b38); box-shadow:inset 0 1px 1px #b5d8f114,inset 0 -2px 5px #0004086b,0 2px 3px #0004; }
#nmx.inv-active .inv-button:disabled { opacity:.45; }
#nmx.inv-active .inv-nav { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:2px; height:64px; flex:none; border-radius:12px; border:1px solid #263b4d; background:linear-gradient(#111f2a,#060e15); }
#nmx.inv-active .inv-nav-item { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:2px; border-radius:10px; min-width:0; font-size:10px; color:#a8bac8; }
#nmx.inv-active .inv-nav-item.selected { font-size:11px; }
#nmx.inv-active .inv-materials { display:flex; flex-direction:column; flex:1; gap:12px; padding:18px 10px; min-height:400px; }
#nmx.inv-active .inv-materials h2 { margin:0 0 8px; font-size:20px; }
#nmx.inv-active .inv-material { display:flex; justify-content:space-between; gap:12px; border:1px solid #29475b; background:#0c1c2b; border-radius:12px; padding:20px 14px; }
#nmx.inv-active .inv-material b { font-weight:500; }
#nmx.inv-active .inv-materials > .inv-button { flex:none; margin-top:auto; }
#nmx.inv-active .inv-overlay { position:fixed; inset:0; z-index:100; display:grid; place-items:center; padding:16px; }
#nmx.inv-active .inv-shade { position:absolute; inset:0; background:#020811d9; width:100%; height:100%; }
#nmx.inv-active .inv-detail { position:relative; display:flex; flex-direction:column; gap:12px; width:min(100%,500px); max-height:calc(100dvh - 32px); padding:16px; border:1.5px solid #63829b; border-radius:16px; background:linear-gradient(#13283b,#08121d); box-shadow:0 12px 60px #000b; }
#nmx.inv-active .inv-detail > header { display:flex; align-items:center; justify-content:space-between; gap:12px; font-size:18px; }
#nmx.inv-active .inv-close { display:grid; place-items:center; width:44px; height:44px; font-size:28px; border:1px solid #63829b; border-radius:9px; flex:none; }
#nmx.inv-active .inv-detail-res { margin:0; color:#a6c5dc; font-size:12px; line-height:1.5; }
#nmx.inv-active .inv-detail-content { overflow:auto; min-height:0; overscroll-behavior:contain; }
#nmx.inv-active .inv-detail .nm-slot { background:#0a1725; border:1px solid #29475b; }
#nmx.inv-active .inv-detail .nm-btn { min-height:44px; display:flex; align-items:center; justify-content:center; border:1px solid #63829b; border-radius:9px; padding:10px; background:linear-gradient(#32404e,#1d2b38); color:#eff5fb; }
#nmx.inv-active .inv-detail .nm-btn.gold { border-color:#ffe69b; color:#07111f; background:linear-gradient(#f7d674,#c58a20); }
#nmx.inv-active .inv-detail .nm-btn:disabled { opacity:.45; }
@media (max-width:365px) {
  #nmx.inv-active .inv-wallets { gap:4px; }
  #nmx.inv-active .inv-wallet { width:64px; gap:4px; }
  #nmx.inv-active .inv-heading { font-size:17px; }
  #nmx.inv-active .inv-stat-medallion { width:24px; height:24px; }
  #nmx.inv-active .inv-stat > div { width:auto; }
}
@media (prefers-reduced-motion:reduce) { #nmx.inv-active * { scroll-behavior:auto; } }
