.merchant-dialog{width:min(980px,calc(100vw - 32px))!important;height:min(720px,calc(100vh - 32px))!important;max-width:none!important;max-height:none!important;padding:0!important;overflow:hidden!important;border:1px solid #8f7a42!important;border-radius:3px;background:#0b100e!important;color:#d8d4c8;box-shadow:0 20px 80px #000!important}
.merchant-dialog::backdrop{background:#000c!important}.merchant-dialog form{box-sizing:border-box;height:100%!important;min-width:0;display:grid!important;grid-template-rows:auto auto auto auto minmax(0,1fr) auto!important;gap:0!important;padding:0!important;overflow:hidden}.merchant-dialog header{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:10px 14px!important;border:0!important;border-bottom:1px solid #675b39!important;background:linear-gradient(#31342f,#20231f)!important}.merchant-dialog header span{display:grid}.merchant-dialog header i{color:#a99c75;font:10px Tahoma;text-transform:uppercase;letter-spacing:1.5px}.merchant-dialog header b{color:#f2dfab;font:18px Georgia;text-shadow:1px 1px #000}.merchant-dialog header>button{width:28px;height:24px;padding:0;border:1px solid #646760;background:#4b4e49;color:#fff;font:bold 16px Tahoma}
.merchant-dialog nav{display:grid!important;grid-template-columns:repeat(2,1fr);gap:0!important;padding:8px 12px 0;background:#111713;border-bottom:1px solid #343b35}.merchant-dialog nav button{min-width:0;padding:9px;border:1px solid #444b45;border-bottom:0;background:#202621;color:#aaa;font:bold 12px Tahoma}.merchant-dialog nav button.active{position:relative;z-index:1;color:#ffe399!important;border-color:#9c8340!important;background:linear-gradient(#493b1c,#282619)!important}.merchant-buy-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;padding:8px 12px;background:#0e1411}.merchant-buy-tabs[hidden]{display:none!important}.merchant-buy-tabs button{height:30px;border:1px solid #4d5750;background:#171d19;color:#aaa;font:bold 11px Tahoma}.merchant-buy-tabs button.active{border-color:#b5963d;background:#3c321c;color:#ffe399}.merchant-summary{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:9px 14px;background:#151b17;border-bottom:1px solid #343b35}.merchant-summary p{min-width:0;margin:0;color:#b6bab4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.merchant-summary b{flex:none;color:#f2ce5d;font:13px Tahoma}
.merchant-tools{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:8px!important;padding:10px 12px;background:#0e1411}.merchant-tools label{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:9px}.merchant-tools label span{color:#a9a58f;font:bold 11px Tahoma;text-transform:uppercase}.merchant-tools input{box-sizing:border-box;width:100%;min-width:0;padding:8px 10px!important;border:1px solid #4d5750!important;background:#070b09!important;color:#eee!important;outline:none}.merchant-tools input:focus{border-color:#ac9148!important}.merchant-tools>button{padding:0 13px;border:1px solid #746536;background:#2f2d20;color:#ebd58f}.merchant-dialog #merchant-content{box-sizing:border-box;min-width:0;min-height:0;display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;align-content:start;gap:8px!important;margin:0 12px 10px;padding:8px!important;overflow-x:hidden!important;overflow-y:auto!important;border:1px solid #39423b;background:#070b09;scrollbar-color:#666 #171b18}
.merchant-card{box-sizing:border-box;min-width:0;display:grid;grid-template-columns:48px minmax(0,1fr);grid-template-areas:"icon info" "controls controls";gap:7px 9px;padding:9px;border:1px solid #414a43;background:linear-gradient(135deg,#222823,#171c18);box-shadow:inset 0 0 0 1px #111}.merchant-card:hover{border-color:#8d783e}.merchant-card>img{grid-area:icon;width:44px;height:44px;object-fit:contain;image-rendering:pixelated}.merchant-card-info{grid-area:info;min-width:0;display:grid;align-content:center;gap:2px}.merchant-card-info b{color:#f0d99a;font:15px Georgia;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.merchant-card-info small{color:#d0b65f}.merchant-card-info em{color:#9ca49e;font:11px Tahoma normal;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.merchant-card-controls{grid-area:controls;min-width:0;display:grid;grid-template-columns:auto minmax(44px,64px) auto auto auto minmax(58px,auto);gap:4px}.merchant-card-controls button,.merchant-card-controls input,.merchant-sell-actions button,.merchant-sell-actions input{box-sizing:border-box;height:29px;min-width:0;border:1px solid #535d55;background:#111612;color:#ddd;font:bold 11px Tahoma}.merchant-card-controls button{padding:0 7px}.merchant-card-controls button:hover,.merchant-sell-actions button:hover{border-color:#aa8b3d;color:#ffe49b}.merchant-card-controls input,.merchant-sell-actions input{text-align:center;-moz-appearance:textfield}.merchant-card-controls input::-webkit-inner-spin-button,.merchant-sell-actions input::-webkit-inner-spin-button{appearance:none}.merchant-card-controls [data-merchant-buy]{border-color:#a38331;background:linear-gradient(#806326,#4a391b);color:#fff0b0}
.merchant-sell-row{grid-column:1/-1;box-sizing:border-box;min-width:0;display:grid;grid-template-columns:22px 44px minmax(150px,1fr) auto minmax(320px,auto);align-items:center;gap:9px;padding:8px;border:1px solid #414a43;background:linear-gradient(#222823,#171c18)}.merchant-sell-row.locked{border-color:#5f6f75;background:#172126}.merchant-sell-row>img{width:40px;height:40px;object-fit:contain;image-rendering:pixelated}.merchant-sell-row .merchant-card-info small{color:#bfb26e}.merchant-line-total{min-width:92px;color:#e4ca70;text-align:right;font:bold 12px Tahoma}.merchant-sell-actions{display:grid;grid-template-columns:minmax(44px,60px) repeat(3,42px) 34px;gap:4px}.merchant-sell-actions .merchant-lock{font-size:15px}.merchant-sell-row input[type=checkbox]{accent-color:#b89538}.merchant-dialog footer{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:12px!important;padding:10px 12px!important;border:0!important;border-top:1px solid #625a3e!important;background:#20231f!important}.merchant-dialog footer span{margin-right:auto;color:#c4bc9d}.merchant-dialog footer button{padding:8px 16px;border:1px solid #a98733;background:linear-gradient(#876728,#503c1b);color:#fff0b0;font-weight:bold}.merchant-empty{grid-column:1/-1!important;margin:0;padding:70px 20px!important;text-align:center;color:#899188}
@media(max-width:760px){.merchant-dialog #merchant-content{grid-template-columns:1fr!important}.merchant-sell-row{grid-template-columns:22px 40px minmax(0,1fr);grid-template-areas:"check icon info" "total total controls"}.merchant-sell-row>input[type=checkbox]{grid-area:check}.merchant-sell-row>img{grid-area:icon}.merchant-sell-row>.merchant-card-info{grid-area:info}.merchant-line-total{grid-area:total;text-align:left}.merchant-sell-actions{grid-area:controls}.merchant-summary p{display:none}}

/* Compact trade layout: the negotiated quantity is the primary control. */
.merchant-dialog #merchant-content{grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:6px!important;padding:6px!important}
.merchant-card{grid-template-columns:42px minmax(0,1fr) auto;grid-template-areas:"icon info total" "controls controls controls";gap:5px 8px;padding:7px;min-height:94px}.merchant-card>img{width:40px;height:40px}.merchant-buy-total{grid-area:total;align-self:center;min-width:62px;color:#ffe184;text-align:right;font:bold 14px Tahoma}.merchant-card-controls{grid-template-columns:38px minmax(60px,1fr) 34px 40px 46px 54px;align-items:stretch}.merchant-current{position:relative;display:block;height:34px}.merchant-current span{position:absolute;z-index:2;top:2px;left:0;width:100%;color:#a99b70;text-align:center;font:bold 8px Tahoma;text-transform:uppercase;letter-spacing:.5px;pointer-events:none}.merchant-card-controls .merchant-current input,.merchant-sell-actions .merchant-current input{width:100%;height:34px!important;padding:10px 2px 0;border:1px solid #c29b3b!important;background:#080c0a!important;color:#fff2a2!important;font:bold 18px Tahoma!important;box-shadow:inset 0 0 8px #000,0 0 0 1px #211a08;text-align:center}.merchant-card-controls button{height:34px}.merchant-card-info b{font-size:14px}.merchant-card-info em{font-size:10px}
.merchant-sell-row{grid-column:1/-1;grid-template-columns:20px 40px minmax(180px,1fr) minmax(300px,360px) 90px;gap:8px;min-height:58px;padding:6px 8px}.merchant-sell-row>.merchant-card-info{grid-area:auto!important}.merchant-sell-row>img{width:36px;height:36px}.merchant-sell-actions{grid-template-columns:minmax(62px,1fr) 34px 40px 46px 34px;align-items:stretch}.merchant-sell-actions>[data-merchant-step="-10"]{display:none}.merchant-sell-actions .merchant-current{height:34px}.merchant-sell-actions button{height:34px}.merchant-line-total{grid-area:auto!important;min-width:0;font-size:13px}.merchant-dialog footer span{font-weight:bold;color:#e5d29a}
@media(max-width:900px){.merchant-dialog #merchant-content{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:680px){.merchant-dialog #merchant-content{grid-template-columns:1fr!important}.merchant-sell-row{grid-template-columns:20px 36px minmax(0,1fr);grid-template-areas:"check icon info" "controls controls controls" "total total total"}.merchant-sell-row>input[type=checkbox]{grid-area:check}.merchant-sell-row>img{grid-area:icon}.merchant-sell-row>.merchant-card-info{grid-area:info!important}.merchant-sell-actions{grid-area:controls}.merchant-line-total{grid-area:total!important;text-align:right}}
.merchant-dialog form{grid-template-rows:auto auto auto auto auto auto minmax(0,1fr) auto!important}.merchant-equipment-filters{display:grid;grid-template-columns:repeat(3,minmax(130px,1fr)) minmax(260px,1.4fr) auto;gap:6px;padding:0 12px 9px;background:#0e1411}.merchant-equipment-filters[hidden]{display:none!important}.merchant-equipment-filters select,.merchant-equipment-filters input,.merchant-equipment-filters button{box-sizing:border-box;min-width:0;height:31px;border:1px solid #4d5750;background:#090d0b;color:#ddd}.merchant-equipment-filters select{padding:0 7px}.merchant-equipment-filters label{display:grid;grid-template-columns:auto 58px auto 58px;align-items:center;gap:5px;color:#b9ae87;font-size:11px}.merchant-equipment-filters input{width:100%;padding:0 5px}.merchant-equipment-filters button{padding:0 10px;border-color:#796535;color:#e8d18a}.merchant-equipment-filters button:hover{border-color:#c29b3b;color:#fff0aa}
@media(max-width:800px){.merchant-equipment-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.merchant-equipment-filters label{grid-column:1/-1}}
.merchant-dialog nav.sell-only{grid-template-columns:1fr!important}.merchant-dialog nav.sell-only [data-merchant-tab="sell"]{display:block!important;justify-self:stretch}
