/* Every station section uses the existing overview palette and navigation art. */
.tradefront-themed{--overview-rgb:128,190,223;--overview-accent:#80bedf}
.tradefront-themed[data-faction="wayne_frontier_guild"]{--overview-rgb:223,180,120;--overview-accent:#dfb478}
.tradefront-themed[data-faction="ember_caravan"]{--overview-rgb:220,142,119;--overview-accent:#dc8e77}
.tradefront-themed[data-faction="nyx_quantum_collective"]{--overview-rgb:182,157,222;--overview-accent:#b69dde}
.tradefront-themed .tradefront-tabs{max-width:none;background:linear-gradient(115deg,rgba(var(--overview-rgb),.07),transparent 75%),#091224;border-color:rgba(var(--overview-rgb),.24);gap:5px}
.tradefront-themed .tradefront-tab{min-height:84px;padding:5px 4px 9px;gap:2px;color:#b2c2da}
.tradefront-themed .tradefront-tab-art{display:block;width:54px;height:54px;object-fit:contain;flex:none;filter:drop-shadow(0 2px 3px rgba(0,0,0,.3))}
.tradefront-themed .tradefront-tab.is-active{color:#f0f4fc;border-color:rgba(var(--overview-rgb),.45);background:linear-gradient(145deg,rgba(var(--overview-rgb),.21),rgba(var(--overview-rgb),.05));box-shadow:inset 0 1px 0 rgba(255,255,255,.07),0 0 13px rgba(var(--overview-rgb),.09)}
.tradefront-themed .tradefront-tab:hover,.tradefront-themed .tradefront-tab:focus-visible{color:#f0f4fc;border-color:rgba(var(--overview-rgb),.6);background-color:rgba(var(--overview-rgb),.08)}
.tradefront-themed .tradefront-tab small{color:var(--overview-accent);border-color:rgba(var(--overview-rgb),.25);background:#0b1426}
.tradefront-themed:not(.tradefront-overview-shell) .tradefront-heading,.tradefront-themed:not(.tradefront-overview-shell) .trade-bubble,.tradefront-themed:not(.tradefront-overview-shell) .tradefront-project-card{border-color:rgba(var(--overview-rgb),.4);background:radial-gradient(ellipse at top left,rgba(var(--overview-rgb),.13),transparent 68%),linear-gradient(145deg,#111c32,#091126)}
.tradefront-themed .tradefront-kicker,.tradefront-themed:not(.tradefront-overview-shell) .trade-bubble-title,.tradefront-themed .trade-section-title,.tradefront-themed .trade-status-value{color:var(--overview-accent)}
.tradefront-themed .tradefront-heading-portrait,.tradefront-themed .tradefront-heading-station{border-color:rgba(var(--overview-rgb),.28)}
.tradefront-themed .tradefront-fold,.tradefront-themed .tradefront-running,.tradefront-themed .trade-subpanel,.tradefront-themed .trade-status-card,.tradefront-themed .trade-send-card,.tradefront-themed .trade-action-card{border-color:rgba(var(--overview-rgb),.24);background:linear-gradient(135deg,rgba(var(--overview-rgb),.06),transparent 80%),#0b1528}
.tradefront-themed .tradefront-market-group{--market-rgb:var(--overview-rgb)}
.tradefront-themed .tradefront-fold-toggle,.tradefront-themed .trade-send-badge,.tradefront-themed .tradefront-project-target strong,.tradefront-themed .tradefront-progress-percent{color:var(--overview-accent);border-color:rgba(var(--overview-rgb),.25)}
.tradefront-themed .tradefront-project-meter>span{background:linear-gradient(90deg,rgba(var(--overview-rgb),.48),var(--overview-accent));box-shadow:0 0 10px rgba(var(--overview-rgb),.24)}
.tradefront-themed:not(.tradefront-overview-shell) .tradefront-level-badge,.tradefront-themed:not(.tradefront-overview-shell) .tradefront-project-stage.is-unlocked{border-color:rgba(var(--overview-rgb),.4);background:rgba(var(--overview-rgb),.08);color:#d9e3f2}
.tradefront-themed .tradefront-project-stage.is-unlocked .tradefront-stage-number{color:var(--overview-accent);border-color:rgba(var(--overview-rgb),.55);box-shadow:0 0 10px rgba(var(--overview-rgb),.12)}
.tradefront-themed .trade-offer-card{--offer-accent:var(--overview-accent);border-color:rgba(var(--overview-rgb),.3);background:radial-gradient(ellipse at top left,rgba(var(--overview-rgb),.1),transparent 70%),linear-gradient(145deg,#111c32,#091126)}
.tradefront-themed .tradefront-view .btn,.tradefront-themed .trade-cargo-picker-trigger,.trade-cargo-dialog button,.orbit-confirm.tradefront-themed .orbit-confirm-btn{border:1px solid rgba(var(--overview-rgb),.4);background:linear-gradient(145deg,rgba(var(--overview-rgb),.18),rgba(var(--overview-rgb),.055));color:#e9f2ff;box-shadow:inset 0 1px 0 rgba(255,255,255,.04);white-space:normal;cursor:pointer}
.tradefront-themed .trade-cargo-picker-trigger,.trade-cargo-dialog button,.tradefront-themed .tradefront-arrival .trade-send-launch-btn{min-height:44px;padding:9px 12px;border-radius:10px;font:inherit;font-size:.75rem;font-weight:700;line-height:1.4}
.tradefront-themed .tradefront-view .btn:hover:not(:disabled),.tradefront-themed .trade-cargo-picker-trigger:hover:not(:disabled),.trade-cargo-dialog button:hover:not(:disabled){border-color:var(--overview-accent);background-color:rgba(var(--overview-rgb),.09)}
.tradefront-themed .tradefront-view .btn:disabled,.tradefront-themed .trade-cargo-picker-trigger:disabled,.trade-cargo-dialog button:disabled{opacity:.42;box-shadow:none;cursor:not-allowed}
.tradefront-themed button:focus-visible,.tradefront-themed summary:focus-visible,.tradefront-themed input:focus-visible,.tradefront-themed select:focus-visible,.tradefront-themed a:focus-visible{outline:2px solid var(--overview-accent);outline-offset:3px}
.tradefront-arrival .trade-mission-box{margin:0}
.tradefront-arrival .trade-mission-split{gap:12px}
.tradefront-arrival .trade-status-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
.tradefront-arrival .trade-status-label{overflow-wrap:anywhere}
.tradefront-arrival .tradefront-arrival-intro{margin:6px 0 12px;color:#a6b8cc;font-size:.75rem;line-height:1.55}
.tradefront-arrival .trade-send-grid{gap:12px}
.tradefront-arrival .trade-send-card{padding:12px;min-width:0}
.tradefront-arrival .trade-send-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.tradefront-arrival .trade-send-name{font-size:.96rem;line-height:1.4}
.tradefront-arrival .trade-send-stock{font-size:.7rem;line-height:1.5;color:#a6bdd7}
.tradefront-arrival .trade-send-badge{flex:none;padding:4px 7px;font-size:.63rem;line-height:1.5;white-space:normal;background:rgba(var(--overview-rgb),.07)}
.tradefront-arrival .trade-send-form{display:grid;gap:12px;margin:0}
.tradefront-arrival .trade-inline-field{min-width:0;font-size:.72rem}
.tradefront-arrival .trade-inline-field>span{line-height:1.4}
.tradefront-arrival select,.tradefront-arrival input[type=number]{min-height:44px;width:100%;box-sizing:border-box}
.tradefront-arrival .tradefront-arrival-send-row{display:grid;grid-template-columns:64px minmax(0,1fr) minmax(104px,.9fr);gap:9px;align-items:stretch;min-width:0}
.tradefront-arrival .tradefront-arrival-send-row>input,.tradefront-arrival .tradefront-arrival-send-row>button{min-width:0;box-sizing:border-box;margin:0;border-radius:10px}
.tradefront-arrival .trade-cargo-picker-trigger{width:100%;text-align:left;min-width:0}
.tradefront-arrival .trade-send-launch-btn{width:100%;min-width:0;margin:0}
.tradefront-cargo-summary{font-size:.7rem;color:#a6b8cc;padding-top:10px;border-top:1px solid rgba(var(--overview-rgb),.15);min-width:0;overflow-wrap:anywhere}
.tradefront-cargo-summary>strong{display:block;color:#bdcde3;font-size:.68rem;margin-bottom:5px}
.tradefront-cargo-summary>[data-cargo-summary]{display:flex;gap:5px;flex-wrap:wrap;line-height:1.5}
.trade-cargo-chip{padding:3px 6px;border:1px solid rgba(var(--overview-rgb),.2);background:rgba(var(--overview-rgb),.045);border-radius:7px;color:#cbd9ec;overflow-wrap:anywhere}
.tradefront-cargo-error,.trade-cargo-dialog-error{color:#efaaaa;font-size:.74rem;line-height:1.5;margin:0}
.tradefront-cargo-error[hidden],.trade-cargo-dialog-error[hidden]{display:none!important}
.tradefront-alternative-preview{padding:12px;border:1px solid rgba(var(--overview-rgb),.2);border-radius:11px;background:rgba(5,13,29,.3)}
.tradefront-alternative-preview h4{margin:0 0 8px;color:var(--overview-accent);font-size:.86rem;line-height:1.5}
.tradefront-alternative-preview p{line-height:1.6}
.tradefront-alternative-preview form{margin-top:10px}
.trade-cargo-dialog{inset:0;margin:auto;padding:0;width:min(680px,calc(100% - 24px));max-width:none;max-height:calc(100vh - 24px);max-height:calc(100dvh - 24px);border:1px solid rgba(var(--overview-rgb),.4);border-radius:18px;background:radial-gradient(ellipse at top left,rgba(var(--overview-rgb),.13),transparent 68%),linear-gradient(145deg,#111c32,#091126);color:#d4deed;overflow:hidden;box-sizing:border-box}
.trade-cargo-dialog::backdrop{background:rgba(2,6,17,.8)}
body.trade-cargo-open{overflow:hidden}
.trade-cargo-dialog *{box-sizing:border-box;min-width:0}
.trade-cargo-dialog[open]{display:flex;flex-direction:column}
.trade-cargo-dialog>form{display:flex;flex-direction:column;overflow:hidden;min-height:0;margin:0}
.trade-cargo-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 16px;border-bottom:1px solid rgba(var(--overview-rgb),.16);flex:none}
.trade-cargo-dialog-header h2{margin:0;color:var(--overview-accent);font-size:1.05rem;line-height:1.4}
.trade-cargo-dialog-header button{width:44px;min-width:44px;font-size:1.2rem;padding:5px}
.trade-cargo-dialog-body{overflow-y:auto;overscroll-behavior:contain;padding:12px 16px;min-height:0;scrollbar-width:thin}
.trade-cargo-dialog-body>p{margin:0 0 12px;font-size:.77rem;line-height:1.6;overflow-wrap:anywhere}
.trade-cargo-capacity{display:flex;align-items:baseline;justify-content:space-between;gap:8px 15px;flex-wrap:wrap;font-size:.75rem;padding:10px 12px;border:1px solid rgba(var(--overview-rgb),.22);border-radius:10px;color:#a6bdd7}
.trade-cargo-capacity strong{color:var(--overview-accent);font-variant-numeric:tabular-nums}
.trade-cargo-input-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px;margin:13px 0}
.trade-cargo-input-grid label{display:grid;gap:5px;font-size:.75rem;line-height:1.4}
.trade-cargo-input-grid input{min-height:44px;width:100%;border:1px solid rgba(var(--overview-rgb),.27);border-radius:10px;padding:9px 10px;background:#091428;color:#e4efff;color-scheme:dark;font:inherit}
.trade-cargo-dialog-actions{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:12px 16px;border-top:1px solid rgba(var(--overview-rgb),.16);flex:none}
.trade-cargo-dialog-actions button{overflow-wrap:anywhere}
.orbit-confirm.tradefront-themed .orbit-confirm-dialog{border-color:rgba(var(--overview-rgb),.4);background:radial-gradient(ellipse at top left,rgba(var(--overview-rgb),.13),transparent 68%),linear-gradient(145deg,#111c32,#091126)}
.orbit-confirm.tradefront-themed .orbit-confirm-title,.orbit-confirm.tradefront-themed .orbit-confirm-kicker{color:var(--overview-accent)}
@media(max-width:620px){
  .tradefront-themed .tradefront-tabs{gap:3px;padding:4px}
  .tradefront-themed .tradefront-tab{min-height:78px;padding:4px 2px 7px;font-size:.61rem;line-height:1.3;gap:3px}
  .tradefront-themed .tradefront-tab-art{width:46px;height:46px}
  .tradefront-themed .tradefront-tab small{top:3px;right:3px;font-size:.49rem}
  .tradefront-arrival .trade-send-card{padding:10px}
  .tradefront-arrival .tradefront-arrival-send-row{grid-template-columns:54px minmax(0,1fr) minmax(90px,.9fr);gap:7px}
  .tradefront-arrival .trade-inline-field{font-size:.68rem}
  .tradefront-themed .trade-cargo-picker-trigger,.tradefront-themed .tradefront-arrival .trade-send-launch-btn{padding:9px 7px;font-size:.7rem}
  .trade-cargo-input-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .trade-cargo-dialog-header,.trade-cargo-dialog-body,.trade-cargo-dialog-actions{padding:11px 12px}
  .trade-cargo-dialog-actions button{padding:8px 5px;font-size:.69rem}
}
@media(max-width:360px){
  .tradefront-themed .tradefront-tab-art{width:40px;height:40px}
  .tradefront-themed .tradefront-tab{font-size:.54rem;min-height:76px;overflow-wrap:normal}
}
