.trade-goods-catalog-window .window-content,
.trade-good-editor-window .window-content {
    padding: 0;
    overflow: hidden;
    background: #070b0d;
    color: var(--nexus-text-primary);
}

.trade-goods-catalog-shell {
    height: 100%;
    min-height: 0;
    display: grid;
    grid-template-rows: auto auto auto minmax(0, 1fr) auto;
    background: linear-gradient(145deg, rgba(14, 20, 22, .98), rgba(5, 8, 10, .99));
}

.trade-goods-catalog-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--nexus-border-subtle);
}
.trade-goods-catalog-toolbar>label {
    min-width: 220px;
    flex: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid var(--nexus-border-subtle);
    border-radius: 2px;
    background: #080d0f;
}
.trade-goods-catalog-toolbar input { width: 100%; height: 30px; border: 0; background: transparent; color: var(--nexus-text-primary); }
.trade-goods-catalog-toolbar>span { color: var(--nexus-text-muted); font-size: 11px; white-space: nowrap; }
.trade-goods-catalog-toolbar>span b { color: var(--nexus-accent-bright); }
.trade-goods-catalog-toolbar button,
.trade-good-editor-shell footer button,
.fantasy-marketplace-header-tools>button {
    width: auto;
    min-height: 32px;
    margin: 0;
    padding: 5px 10px;
    border: 1px solid var(--nexus-border-subtle);
    border-radius: 2px;
    background: var(--nexus-surface-interactive);
    color: var(--nexus-text-primary);
    font-size: 11px;
    font-weight: 800;
    white-space: nowrap;
}
.trade-goods-catalog-toolbar button.bright,
.trade-good-editor-shell footer button.bright { border-color: var(--nexus-border-strong); background: var(--nexus-accent-surface-strong); color: var(--nexus-accent-bright); }

.trade-goods-market-rates {
    display: grid;
    grid-template-columns: 190px minmax(200px, 1fr) minmax(200px, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-bottom: 1px solid var(--nexus-border-subtle);
    background: rgba(23, 15, 10, .55);
}
.trade-goods-market-rates-heading { display: flex; align-items: center; gap: 8px; color: var(--nexus-accent-bright); }
.trade-goods-market-rates-heading>i { font-size: 18px; }
.trade-goods-market-rates-heading>span,
.trade-goods-market-rates>label>span:first-child { min-width: 0; display: grid; gap: 2px; }
.trade-goods-market-rates strong,
.trade-goods-market-rates>label>span:first-child { color: var(--nexus-text-primary); font-size: 11px; font-weight: 800; }
.trade-goods-market-rates small { color: var(--nexus-text-muted); font-size: 9px; font-weight: 400; }
.trade-goods-market-rates>label { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 72px; align-items: center; gap: 8px; }
.trade-goods-rate-input { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 4px; }
.trade-goods-rate-input input { width: 100%; height: 32px; margin: 0; text-align: right; }
.trade-goods-rate-input b { color: var(--nexus-text-muted); font-size: 10px; }
.trade-goods-market-rates>p { margin: 0; color: var(--nexus-text-muted); font-size: 10px; white-space: nowrap; }
.trade-goods-market-rates>p strong { color: var(--nexus-text-secondary); font-size: inherit; }

.trade-goods-catalog-columns,
.trade-goods-catalog-row {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 150px 78px;
    align-items: center;
    gap: 10px;
}
.trade-goods-catalog-columns {
    padding: 7px 12px 7px 70px;
    border-bottom: 1px solid var(--nexus-border-subtle);
    color: var(--nexus-text-muted);
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
}
.trade-goods-catalog-columns span:nth-child(1) { grid-column: 1 / 3; }
.trade-goods-catalog-list { min-height: 0; overflow: auto; padding: 7px 10px; }
.trade-goods-catalog-row {
    min-height: 62px;
    margin-bottom: 5px;
    padding: 6px 8px;
    border: 1px solid var(--nexus-border-subtle);
    border-radius: 2px;
    background: rgba(9, 14, 16, .78);
}
.trade-goods-catalog-row.is-archived { opacity: .55; }
.trade-goods-catalog-row>.nexus-entity-image { width: 46px; height: 46px; }
.trade-goods-catalog-name { min-width: 0; display: grid; gap: 3px; }
.trade-goods-catalog-name strong { overflow: hidden; color: var(--nexus-text-primary); font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.trade-goods-catalog-name small { overflow: hidden; color: var(--nexus-text-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.trade-goods-catalog-price { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 5px; }
.trade-goods-catalog-price input { width: 100%; height: 32px; margin: 0; text-align: right; }
.trade-goods-catalog-price span { color: var(--nexus-text-muted); font-size: 10px; white-space: nowrap; }
.trade-goods-catalog-actions { display: flex; justify-content: flex-end; gap: 5px; color: var(--nexus-text-muted); }
.trade-goods-catalog-actions button { width: 30px; height: 30px; margin: 0; padding: 0; border: 1px solid var(--nexus-border-subtle); border-radius: 2px; background: transparent; color: var(--nexus-text-secondary); }
.trade-goods-catalog-actions button:hover { border-color: var(--nexus-border-strong); background: var(--nexus-accent-surface); color: var(--nexus-accent-bright); }
.trade-goods-catalog-shell>footer { padding: 8px 12px; border-top: 1px solid var(--nexus-border-subtle); color: var(--nexus-text-muted); font-size: 10px; }
.trade-goods-catalog-empty { min-height: 180px; display: grid; place-content: center; justify-items: center; gap: 5px; color: var(--nexus-text-muted); }

.trade-good-editor-shell { padding: 14px; background: linear-gradient(145deg, rgba(14, 20, 22, .98), rgba(5, 8, 10, .99)); }
.trade-good-editor-identity { display: grid; grid-template-columns: 64px minmax(0, 1fr); align-items: center; gap: 12px; margin-bottom: 12px; }
.trade-good-editor-identity>.nexus-entity-image { width: 62px; height: 62px; }
.trade-good-editor-shell label { display: grid; gap: 4px; color: var(--nexus-text-secondary); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.trade-good-editor-shell input,
.trade-good-editor-shell textarea,
.trade-good-editor-shell file-picker { width: 100%; margin: 0; color: var(--nexus-text-primary); text-transform: none; }
.trade-good-image-picker { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 5px; }
.trade-good-image-picker button { width: 34px; height: 32px; margin: 0; padding: 0; border: 1px solid var(--nexus-border-subtle); border-radius: 2px; background: var(--nexus-surface-interactive); color: var(--nexus-text-primary); }
.trade-good-image-picker button:hover { border-color: var(--nexus-border-strong); color: var(--nexus-accent-bright); background: var(--nexus-accent-surface); }
.trade-good-combo { display: grid; gap: 5px; }
.trade-good-combo select,
.trade-good-combo input {
    width: 100%;
    height: 34px;
    margin: 0;
    border: 1px solid var(--nexus-border-subtle);
    border-radius: 2px;
    background: #171d20;
    color: var(--nexus-text-primary);
    font-size: 11px;
    text-transform: none;
}
.trade-good-combo select:focus,
.trade-good-combo input:focus { border-color: var(--nexus-border-strong); outline: none; box-shadow: var(--nexus-focus-ring); }
.trade-good-combo option { background: #171d20; color: #f0e8d9; }
.trade-good-editor-shell small { color: var(--nexus-text-muted); font-size: 9px; font-weight: 400; text-transform: none; }
.trade-good-editor-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.trade-good-editor-grid .is-wide { grid-column: 1 / -1; }
.trade-good-editor-shell footer { display: flex; justify-content: flex-end; gap: 7px; margin: 14px -14px -14px; padding: 10px 14px; border-top: 1px solid var(--nexus-border-subtle); }

.fantasy-marketplace-header-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }

@media (max-width: 720px) {
    .trade-goods-catalog-toolbar { flex-wrap: wrap; }
    .trade-goods-catalog-toolbar>label { flex-basis: 100%; }
    .trade-goods-market-rates { grid-template-columns: 1fr; }
    .trade-goods-market-rates>label { grid-template-columns: minmax(0, 1fr) 84px; }
    .trade-goods-catalog-columns { display: none; }
    .trade-goods-catalog-row { grid-template-columns: 48px minmax(0, 1fr) 120px; }
    .trade-goods-catalog-actions { grid-column: 2 / -1; }
    .trade-good-editor-grid { grid-template-columns: 1fr; }
    .trade-good-editor-grid .is-wide { grid-column: auto; }
}
