/* One shared commerce shell; selectors are limited to its seven existing views. */
/* Restore readable icons in all commerce subcategories. */
.commerce-navigation a{display:inline-flex;align-items:center;gap:7px;min-height:42px;font-size:14px!important;padding:9px 12px}
.commerce-navigation .d07-icon{display:inline-block!important;width:18px;height:18px;flex:0 0 18px;stroke:currentColor;fill:none;stroke-width:1.7}
.d07-global-nav .d07-icon{display:inline-block!important;width:20px;height:20px;flex-shrink:0}

body:has(.commerce-screen) .d07-global-nav{min-height:60px;padding-block:4px}
body:has(.commerce-screen) .d07-global-nav .d07-brand img{height:44px!important}
body:is([data-active-view=trade],[data-active-view=routes],[data-active-view=operations],[data-active-view=inventory],[data-active-view=history],[data-active-view=favorites],[data-active-view=logistics]) #section-nav{display:none!important}
body:has(.commerce-screen) .public-workspace{max-width:1600px;padding:10px 20px}
body:has(.commerce-screen) .public-notice{padding:5px 10px;margin-bottom:6px;font-size:12px;border:0;background:transparent}
body:has(.commerce-screen) .public-notice button{padding:5px 9px;min-height:30px}
.commerce-screen{max-width:1600px;margin:auto;background:#0c1b28;color:#e6edf4;padding:12px!important;border-radius:6px}
.commerce-navigation{display:flex;gap:2px;overflow:auto;border-bottom:1px solid #304354;margin:0 0 12px;padding:0 0 4px;scrollbar-width:thin}
.commerce-navigation a{flex-shrink:0;color:#b9ccd8;text-decoration:none;font:500 13px/1.4 system-ui,sans-serif;padding:10px 14px;border-bottom:2px solid transparent}
.commerce-navigation a[aria-current]{color:#f3c95c;border-bottom-color:#f3c95c}
.commerce-navigation a:hover{background:#152a3a;color:#fff}
.commerce-navigation a:focus-visible{outline:2px solid #79d8e9;outline-offset:-2px}
.commerce-screen>.od-heading,.commerce-screen>.wd-heading{margin:0 0 12px!important;padding:4px 0 8px!important;background:none!important;min-height:0!important;border:0!important;box-shadow:none!important}
.commerce-screen>.od-heading h2,.commerce-screen>.wd-heading h1{font-size:22px!important;margin:0!important}
.commerce-screen>.od-heading p,.commerce-screen>.wd-heading p{font-size:13px;margin:4px 0!important}
#view-trade .commerce-screen>.od-heading{display:none!important}
.commerce-screen .od-footer,.commerce-screen .wd-footer{font-size:12px;padding:8px 0!important;margin:8px 0 0!important;background:none!important}
.commerce-screen .od-footer .od-actions{display:inline-flex;gap:6px}
.commerce-screen .cd-art,.commerce-screen .cd-summary-material .cd-art,.commerce-screen .ov-art{display:none}
.commerce-screen .cd-ship img{width:80px;max-height:60px;object-fit:contain}
.commerce-screen .cd-place img{display:none}
.commerce-screen .cd-place{min-height:0;padding:8px}
.commerce-screen .cd-main-operation,.commerce-screen .cd-panel,.commerce-screen .od-card{box-shadow:none;border:1px solid #304354;border-radius:5px;background:#102330}
.commerce-screen .cd-operation-cards{grid-template-columns:repeat(auto-fit,minmax(260px,1fr))}
.commerce-screen .wd-toolbar{gap:10px}
@media(max-width:650px){body:has(.commerce-screen) .public-workspace{padding:8px}.commerce-screen{padding:8px!important}.commerce-navigation a{padding:9px 11px}.public-notice span{font-size:11px}}
body:has(.commerce-screen) .public-notice{margin:0!important;padding:4px 10px!important;min-height:22px}
body:has(.commerce-screen) .public-notice button{display:none}
.commerce-navigation a{padding:8px 10px;font-size:12px}
.commerce-screen .cp-workspace input,.commerce-screen .cp-workspace select{height:32px!important;min-height:32px;padding:5px 8px!important}
.commerce-screen .cp-workspace .cp-tools select{height:27px!important;min-height:27px}
.cp-ticker{max-height:52px}.cp-workspace .cp-tools{margin:5px 0}.cp-workspace .cp-locations{margin:8px 0}.cp-workspace [data-capacity],.cp-workspace [data-source]{margin:3px 0}
.commerce-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto;gap:10px;align-items:end}.commerce-filters label{display:grid;gap:5px}.commerce-directory h2{font-size:22px;margin:8px 0}.commerce-directory p{color:#a9bdce;font-size:13px}.commerce-directory input,.commerce-directory select,.commerce-directory button,.inventory-inline-entry input,.inventory-inline-entry select,.inventory-inline-entry textarea,.inventory-inline-entry button{background:#172c3d;color:#edf4fa;border:1px solid #3c5264;border-radius:4px;padding:8px;min-width:0;box-sizing:border-box}.commerce-directory button{cursor:pointer}.commerce-directory button:disabled{opacity:.5}.commerce-table{overflow:auto;margin:16px 0}.commerce-table table{width:100%;border-collapse:collapse;font-size:13px}.commerce-table th,.commerce-table td{text-align:left;padding:10px;border-bottom:1px solid #304354}.commerce-table small{display:block;color:#a9bdce}.commerce-table a{color:#91d9ec}.commerce-empty{padding:24px;background:#102330}.commerce-statistics{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}.commerce-statistics>div{padding:16px;background:#172f40;border-radius:5px}.commerce-statistics strong{display:block;font-size:22px;margin-top:6px}
.inventory-inline-entry{padding:14px;background:#102330;border:1px solid #304354;margin-bottom:16px;border-radius:5px}.inventory-inline-entry form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}.inventory-inline-entry label{display:grid;gap:4px;font-size:13px}.inventory-inline-entry h2,.inventory-inline-entry p,.inventory-inline-entry footer,.inventory-inline-entry small{grid-column:1/-1;margin:3px 0}.inventory-inline-entry label:has([name=id]){grid-column:span 2}.inventory-inline-entry [name=id]{min-height:110px}.inventory-inline-entry footer{display:flex;justify-content:flex-end;gap:8px}.inventory-inline-entry [type=submit]{background:#f2c655;color:#15212a}.inventory-inline-entry [data-message]{color:#8cddcf}
@media(max-width:650px){.commerce-filters,.commerce-statistics,.inventory-inline-entry form{grid-template-columns:1fr 1fr}.cp-ticker{max-height:72px}.commerce-filters>label:first-child{grid-column:1/-1}.commerce-screen .cp-workspace input,.commerce-screen .cp-workspace select{min-height:40px}.inventory-inline-entry label:has([name=id]){grid-column:1/-1}}
body:is([data-active-view=trade],[data-active-view=routes],[data-active-view=operations],[data-active-view=inventory],[data-active-view=history],[data-active-view=favorites],[data-active-view=logistics]) .commerce-screen{background:#0c1b28!important;padding:8px!important}
.commerce-screen>.commerce-navigation{margin-bottom:6px}.commerce-screen .cp-workspace form[data-simulator]{padding:10px}.commerce-screen .cp-note{margin:4px 0}.commerce-screen .cp-metrics{padding:10px}.commerce-screen .cp-ticker{max-height:48px}

/* Keep the simulator anchored while the commodity grid is filtered. */
.commerce-screen .cp-ticker{height:48px;min-height:48px;align-content:start}
.commerce-screen .cp-workspace [data-source]{min-height:2.8em;line-height:1.4}
.commerce-screen .cp-workspace [data-warning]{display:block;min-height:1.4em;line-height:1.4}
.commerce-screen .cp-metrics>div{min-height:52px}
@media(max-width:650px){.commerce-screen .cp-ticker{height:72px;min-height:72px;max-height:72px}}
/* Keep the market grid above the simulator with enough room to compare rows. */
.commerce-screen .cp-workspace .cp-ticker{height:clamp(360px,52vh,480px);min-height:360px;max-height:480px;grid-auto-rows:28px;align-content:start;margin-bottom:20px}
.commerce-screen .cp-workspace .cp-ticker button{min-height:28px;height:28px;align-items:center}
@media(max-width:650px){.commerce-screen .cp-workspace .cp-ticker{height:320px;min-height:320px;max-height:320px;grid-auto-rows:36px}.commerce-screen .cp-workspace .cp-ticker button{height:36px;min-height:36px}}

/* Scoped current prices layout. */
.current-price-directory .commerce-filters{padding:16px;background:#102733;border:1px solid #304c5c;border-radius:6px;align-items:end}
.current-price-directory .commerce-filters label{font-size:13px;color:#bdd5e2;min-width:0}
.current-price-directory .commerce-filters input,.current-price-directory .commerce-filters select,.current-price-directory .commerce-filters button{height:40px;width:100%}
.current-price-directory [data-prices-reload]{background:#ffce32;color:#10212d;font-weight:700}
.current-price-directory .commerce-table{border:1px solid #304c5c;border-radius:6px;max-height:65vh;scrollbar-width:thin}
.current-price-directory thead th{position:sticky;top:0;background:#123346;z-index:1;white-space:nowrap;text-transform:none}
.current-price-directory tbody tr:hover{background:#153344}
.current-price-directory td,.current-price-directory tbody th{vertical-align:middle;line-height:1.5}
.current-price-directory td:nth-child(2){min-width:210px;max-width:320px}
.current-price-value{white-space:nowrap;font-weight:700;font-variant-numeric:tabular-nums}
.current-price-side{display:inline-block;white-space:nowrap;padding:4px 8px;border:1px solid currentColor;border-radius:4px;font-size:12px}
.current-price-side.is-buy{color:#ffcf32;background:#3a3215}
.current-price-side.is-sell{color:#41d9ef;background:#103441}
.current-price-directory .commerce-table a{display:inline-block;border:1px solid #3c6174;border-radius:4px;padding:6px 10px;text-decoration:none}
.current-price-directory .cp-actions{display:flex;justify-content:flex-end;align-items:center;gap:16px}
@media(max-width:1100px){.current-price-directory .commerce-filters{grid-template-columns:repeat(2,minmax(0,1fr))}.current-price-directory .commerce-filters>label:first-child{grid-column:1/-1}}
@media(max-width:550px){.current-price-directory .commerce-filters{grid-template-columns:1fr}}

/* Stable price columns: room for terminal names and aligned numeric values. */
.current-price-directory .commerce-table table{table-layout:fixed;min-width:1080px;font-size:13px}
.current-price-directory .commerce-table th,.current-price-directory .commerce-table td{padding:10px 12px;box-sizing:border-box;overflow-wrap:break-word}
.current-price-directory .commerce-table thead th{white-space:normal;line-height:1.35;font-size:12px;color:#bad6e5;height:48px}
.current-price-directory .commerce-table th:nth-child(1){width:13%}
.current-price-directory .commerce-table th:nth-child(2){width:27%}
.current-price-directory .commerce-table th:nth-child(3){width:12%}
.current-price-directory .commerce-table th:nth-child(4){width:13%;text-align:right}
.current-price-directory .commerce-table th:nth-child(5){width:11%;text-align:right}
.current-price-directory .commerce-table th:nth-child(6){width:10%}
.current-price-directory .commerce-table th:nth-child(7){width:7%;text-align:center}
.current-price-directory .commerce-table th:nth-child(8){width:7%;text-align:center}
.current-price-directory .commerce-table td:nth-child(4),.current-price-directory .commerce-table td:nth-child(5){text-align:right;font-variant-numeric:tabular-nums}
.current-price-directory .commerce-table td:nth-child(7),.current-price-directory .commerce-table td:nth-child(8){text-align:center}
.current-price-directory .commerce-table tbody th{font-weight:600}
.current-price-directory .commerce-table tbody tr:nth-child(even){background:#102330}
.current-price-directory .commerce-table tbody tr:hover{background:#193748}
.current-price-directory .commerce-table small{font-size:11px;margin-top:3px;line-height:1.35}
.current-price-directory .commerce-table time{white-space:nowrap;font-variant-numeric:tabular-nums}
.current-price-directory .commerce-table a{padding:6px 8px;white-space:nowrap}
.current-price-directory .commerce-table td:nth-child(2){min-width:0;max-width:none}

/* Short pages instead of a long independently scrolling list. */
.current-price-directory .commerce-table{max-height:none;overflow-x:auto}
.current-price-directory .price-page-size{display:flex;align-items:center;gap:8px;margin-right:auto;font-size:13px;color:#bad6e5}
.current-price-directory .cp-actions{flex-wrap:wrap;padding:8px 0}
.current-price-directory .commerce-table th,.current-price-directory .commerce-table td{padding-top:8px;padding-bottom:8px}
