.sell-panel-top{display:block}
.sell-source-controls{min-width:0}.sell-source-controls .panel-head{margin-bottom:12px}.sell-source-controls .source-notes{display:block}.sell-source-controls .source-notes p{margin:6px 0}.trade-panel .sell-source-controls .source-lookup{grid-template-columns:auto minmax(0,1fr);flex-wrap:wrap}.sell-source-controls .source-lookup .group-match-status,.sell-source-controls .source-lookup>.hint,.sell-source-controls .source-lookup>.join-request-list{grid-column:1/-1}
.manual-sell{margin-top:16px;min-width:0;background:#1b2417;border:1px solid #435136;border-radius:12px;padding:15px 17px}.manual-sell[aria-busy="true"]{border-color:#8c9f4a}.manual-sell-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.manual-sell h3{margin:0;font-size:17px}.manual-sell .sell-fee{color:#d2e98a;font-size:13px;white-space:nowrap}.manual-sell p{margin:7px 0}.manual-sell label{margin-bottom:0}.manual-sell-token{display:flex;align-items:baseline;flex-wrap:wrap;gap:8px}.manual-sell-token strong{font-size:18px;color:#f2f7e8;overflow-wrap:anywhere}.manual-sell-token small{color:#9eab92;font-size:12px}.manual-sell-address{color:#9eab92;font-size:12px;overflow-wrap:anywhere;line-height:1.4}.manual-sell-wallet{display:flex;align-items:center;gap:8px;margin:10px 0}.manual-sell-wallet label{white-space:nowrap;font-size:13px}.manual-sell-wallet select{min-width:0;flex:1;padding:7px 9px;margin:0}.manual-sell button{font-size:13px;padding:8px 10px}.manual-sell-fields{display:grid;grid-template-columns:1fr 1fr;gap:9px}.manual-sell-fields label{font-size:13px;min-width:0}.manual-sell-fields input{width:100%;box-sizing:border-box;padding:8px 10px;margin-top:5px}.manual-sell-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:12px 0 0}.manual-sell-presets button{padding:10px 6px;white-space:nowrap}.manual-sell-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}.manual-sell-actions .primary{flex:1}.manual-sell .manual-sell-status{font-size:12px;line-height:1.5;color:#b9c89d;margin-bottom:0}.manual-sell-result{display:flex;flex-wrap:wrap;gap:10px;font-size:12px}.manual-sell-result:empty{display:none}.manual-sell-result a{overflow-wrap:anywhere}
.manual-sell-details{margin:10px 0 0}.manual-sell-details>div{display:grid;grid-template-columns:95px 1fr;gap:10px;padding:4px 0;border-bottom:1px solid #34402a}.manual-sell-details dt{font-size:12px;color:#aebd99}.manual-sell-details dd{margin:0;overflow-wrap:anywhere;font-size:12px}.manual-sell .manual-sell-instruction{font-size:12px;line-height:1.5;color:#cfdbb9}.manual-sell [hidden]{display:none!important}
@media(max-width:1200px){.manual-sell{padding:13px}}
@media(max-width:900px){.manual-sell{margin-bottom:12px}}
@media(max-width:480px){.manual-sell-fields{grid-template-columns:1fr 1fr}.manual-sell-presets{gap:5px}.manual-sell-presets button{font-size:12px;padding:10px 4px}.manual-sell-wallet{flex-wrap:wrap}.manual-sell-wallet select{min-width:180px}}

.manual-sell-details .manual-sell-tax-warning dd{color:#f3c777}

.manual-sell-history{display:flex;align-items:center;gap:8px;margin:10px 0}.manual-sell-history label{white-space:nowrap;font-size:13px}.manual-sell-history select{flex:1;min-width:0;max-width:100%;padding:7px 9px;margin:0;text-overflow:ellipsis}.manual-sell .manual-sell-status:empty{display:none}
@media(max-width:480px){.manual-sell-history{align-items:stretch;flex-direction:column;gap:5px}.manual-sell-history select{width:100%;box-sizing:border-box}}

.manual-sell-wallets{margin:12px 0;padding:10px 12px;border:1px solid var(--line,#38432e);border-radius:8px;min-width:0}.manual-sell-wallets legend{font-size:.9rem;color:var(--muted,#abb99b)}.manual-sell-wallets>div{display:flex;flex-wrap:wrap;gap:10px 20px}.manual-sell-wallets label{display:flex;align-items:center;gap:7px;cursor:pointer;min-width:0;font-size:.9rem}.manual-sell-wallets input{width:17px;height:17px;flex:0 0 auto;accent-color:#c7ed89}.manual-sell-wallets span{overflow-wrap:anywhere}.manual-sell-wallet-result{display:flex;flex-wrap:wrap;gap:8px;margin:8px 0;padding:8px;border:1px solid var(--line,#38432e);border-radius:6px}.manual-sell-wallet-result strong{flex-basis:100%;font-size:.9rem;font-weight:500;overflow-wrap:anywhere}

.manual-sell-presets button{white-space:normal;line-height:1.4}

/* Keep the two independent forms intact while sharing the purchase grid. */
.trade-panel-with-sell{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:auto auto auto min-content minmax(0,1fr) auto auto;column-gap:20px;align-items:start}
.trade-panel-with-sell>.sell-panel-top{grid-column:1/-1;grid-row:1}
.trade-panel-with-sell>form[id$="-ruleForm"],.trade-panel-with-sell>form>[id$="-ruleFields"],.trade-panel-with-sell .rule-setup-grid{display:contents}
.trade-panel-with-sell>form>.purchase-heading{grid-column:1/-1;grid-row:2}
.trade-panel-with-sell [id$="-ruleFields"]>.trade-wallet-selection{grid-column:1/-1;grid-row:3}
.trade-panel-with-sell .signal-settings{grid-column:1;grid-row:4;min-width:0}
.trade-panel-with-sell .trade-config{grid-column:2;grid-row:4/6;min-width:0;align-self:start}
.trade-panel-with-sell>.manual-sell{grid-column:1;grid-row:5;align-self:start;margin:8px 0 0;padding:12px;min-width:0}
.trade-panel-with-sell .trade-actions{grid-column:1/-1;grid-row:6}
.trade-panel-with-sell>form>[id$="-ruleSaveStatus"]{grid-column:1/-1;grid-row:7}

.trade-panel-with-sell .manual-sell h3{font-size:15px;margin:0 0 5px}
.trade-panel-with-sell .manual-sell-token{gap:3px 8px;line-height:1.4}
.trade-panel-with-sell .manual-sell-token strong{font-size:15px}
.trade-panel-with-sell .manual-sell-token small{font-size:11px}
.trade-panel-with-sell .manual-sell-address{font-size:11px;margin:4px 0 6px}
.trade-panel-with-sell .manual-sell-wallet,.trade-panel-with-sell .manual-sell-history{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:7px;margin:7px 0;align-items:center}
.trade-panel-with-sell .manual-sell-wallet select,.trade-panel-with-sell .manual-sell-history select{width:100%;min-width:0;max-width:100%;min-height:33px;margin:0;padding:5px 7px;font-size:12px}
.trade-panel-with-sell .manual-sell-history{grid-template-columns:auto minmax(0,1fr)}
.trade-panel-with-sell .manual-sell-wallet label,.trade-panel-with-sell .manual-sell-history label{font-size:12px;white-space:nowrap}
.trade-panel-with-sell .manual-sell button{font-size:12px;padding:6px 8px;min-height:33px}
.trade-panel-with-sell .manual-sell-wallets{margin:7px 0;padding:5px 8px 7px}
.trade-panel-with-sell .manual-sell-wallets legend{font-size:12px;padding:0 3px}
.trade-panel-with-sell .manual-sell-wallets>div{gap:6px 12px}
.trade-panel-with-sell .manual-sell-wallets label{font-size:12px;gap:5px;margin:0}
.trade-panel-with-sell .manual-sell-wallets input{min-height:15px;width:15px;height:15px;margin:0}
.trade-panel-with-sell .manual-sell-fields{display:flex;flex-wrap:wrap;gap:8px 12px;margin-top:7px}
.trade-panel-with-sell .manual-sell-fields label{flex:0 1 100px;font-size:12px;margin:0;max-width:110px}
.trade-panel-with-sell .manual-sell-fields input{width:100%;min-height:33px;margin:4px 0 0;padding:6px 8px;font-size:13px}
.trade-panel-with-sell .manual-sell-presets{width:min(100%,420px);gap:6px;margin-top:9px}
.trade-panel-with-sell .manual-sell-presets button{padding:7px 4px}
.trade-panel-with-sell .manual-sell-actions{gap:6px;margin-top:6px}
.trade-panel-with-sell .manual-sell .manual-sell-status{font-size:11px;line-height:1.45;margin-top:6px}
.trade-panel-with-sell .manual-sell-result{gap:6px;font-size:11px}
.trade-panel-with-sell .manual-sell-wallet-result{margin:6px 0;padding:6px;gap:6px}
.trade-panel-with-sell .manual-sell-details{margin-top:7px}
.trade-panel-with-sell .manual-sell-details>div{grid-template-columns:80px minmax(0,1fr);gap:8px;padding:3px 0}
.trade-panel-with-sell .manual-sell-details dt,.trade-panel-with-sell .manual-sell-details dd{font-size:11px}
.trade-panel-with-sell .timed-auto-sell>label:not(.check){width:180px;max-width:100%;margin-bottom:7px}
.trade-panel-with-sell .timed-auto-sell-tasks{margin-top:12px;padding-top:9px}
.trade-panel-with-sell .timed-auto-sell-list{margin-top:8px;max-height:200px;gap:7px}

@media(max-width:900px){
 .trade-panel-with-sell{grid-template-columns:minmax(0,1fr);grid-template-rows:auto;column-gap:0}
 .trade-panel-with-sell .signal-settings{grid-column:1;grid-row:4}
 .trade-panel-with-sell .trade-config{grid-column:1;grid-row:5}
 .trade-panel-with-sell .trade-actions{grid-column:1;grid-row:6}
 .trade-panel-with-sell>form>[id$="-ruleSaveStatus"]{grid-column:1;grid-row:7}
 .trade-panel-with-sell>.manual-sell{grid-column:1;grid-row:8;margin-top:12px}
 .trade-panel-with-sell .manual-sell button,.trade-panel-with-sell .manual-sell select,.trade-panel-with-sell .manual-sell-fields input{min-height:40px}
 .trade-panel-with-sell .manual-sell-wallets input{min-height:18px;width:18px;height:18px}
}
@media(max-width:480px){
 .trade-panel-with-sell .source-lookup .input-row{min-width:0;flex-wrap:wrap}
 .trade-panel-with-sell .source-lookup .input-row>select{flex:1 1 140px;width:100%;min-width:0}
 .trade-panel-with-sell .source-lookup .input-row>button{max-width:100%}
 .trade-panel-with-sell>.manual-sell{padding:10px}
 .trade-panel-with-sell .manual-sell-wallet{grid-template-columns:minmax(0,1fr) auto}
 .trade-panel-with-sell .manual-sell-wallet label{grid-column:1/-1}
 .trade-panel-with-sell .manual-sell-history{grid-template-columns:minmax(0,1fr);gap:4px}
 .trade-panel-with-sell .manual-sell-fields{gap:8px}
 .trade-panel-with-sell .manual-sell-presets{gap:4px}
 .trade-panel-with-sell .manual-sell-presets button{font-size:11px;padding:7px 3px}
}
