/* Layout for the cabinet session and bot-scoped reads on the original Mobile theme. */
:root { font-family: var(--fubot-font); color: var(--fubot-text); background: var(--fubot-bg); }
body { background: var(--fubot-bg); }
main > header { background: var(--fubot-inset); border-bottom-color: var(--fubot-edge); }
main > header .fubot-brand { padding-inline: 2px; }
main > header .fubot-brand strong { display: block; }
.card, .metrics article { border-color: var(--fubot-edge); border-radius: var(--fubot-radius); }
.screen-heading h2 { color: var(--fubot-text); }
.screen-note, .muted, #freshness { color: var(--fubot-muted); }
.bottom-navigation.terminal-tabs { border-color: var(--fubot-edge); background: var(--fubot-raised); }
.bottom-navigation [role=tab] { color: var(--fubot-muted); }
.bottom-navigation [aria-selected=true], .trade-subtabs [aria-selected=true] {
  background: var(--fubot-gold-tint); color: var(--fubot-gold-light);
}
.bottom-navigation [aria-selected=true]::before { background: var(--fubot-gold); }
.trade-subtabs [aria-selected=true] { border-color: var(--fubot-gold-edge); }
.trade-subtabs button { border-radius: .55rem; }
.trade-subtabs { padding-block: .15rem .35rem; }
#terminal:has(#bot-status:not(:empty)) #bot-status { color: var(--fubot-gold-light); }
.bottom-navigation.terminal-tabs [role=tab] { border-radius: .55rem; }
#access-gate { width: min(100%, 28rem); margin: clamp(1.75rem, 9vh, 5rem) auto 1rem; padding: 1.25rem; border-top-color: var(--fubot-gold-edge); }
#access-title { margin: 0 0 .75rem; }
#access-submit { background: var(--fubot-gold); color: var(--fubot-gold-ink); border-color: var(--fubot-gold); font-weight: 700; }
#access-submit:hover { background: var(--fubot-gold-light); }
[hidden] { display: none !important; }
#notice:empty, #bot-status:empty, #history-status:empty, #history-rows:empty { display: none; }
#notice[data-error="true"] { color: #ffadab; }
#terminal[data-screen] #market-context { display: block; }
#market-context label, .chart-card label { color: #adc0d0; font-size: .84rem; }
#bot-status { grid-column: 1 / -1; }
.terminal-select {
  width: 100%; min-height: 44px; padding: 6px 9px;
  border: 1px solid var(--fubot-edge); border-radius: 6px;
  color: var(--fubot-text); background: var(--fubot-inset); font: inherit;
}
.terminal-select:focus-visible, summary:focus-visible { outline: 2px solid #efbd50; outline-offset: 3px; }
#market-context .terminal-select { margin-top: 6px; }
#market-context #freshness { text-align: left; max-width: none; }
.connection-card a { color: #efbd50; }
.connection-card dd { overflow-wrap: anywhere; }
#bot-history { padding: 14px; border: 1px solid #2b3c4b; border-radius: 6px; background: #15212c; }
#bot-history > summary, #connection-journal > summary { cursor: pointer; color: #efbd50; }
#bot-history > label { display: block; color: #adc0d0; margin-top: 12px; }
#history-kind { margin-top: 6px; }
.execution-facts { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 7px 10px; margin-bottom: 0; }
.execution-facts dt { color: #adc0d0; }
.execution-facts dd { margin: 0; overflow-wrap: anywhere; }
#history-rows, #activity-list { padding: 0; list-style: none; }
.history-trade { border-top: 1px solid #2b3c4b; padding: 12px 0; }
.history-trade h3, .history-trade p { margin: 0 0 6px; }
.history-trade time { color: #adc0d0; font-size: .85rem; }
.history-trade .profit { color: #80dfac; }
.history-trade .loss { color: #ffadab; }
.history-trade summary { color: #efbd50; }
.history-pages { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.history-pages button { width: auto; padding-inline: 9px; }
#activity-list li { padding: 6px 0; border-bottom: 1px solid #2b3c4b; }
#open-order-rows { list-style: none; padding: 0; }
.open-order { padding-block: 12px; border-top: 1px solid #2b3c4b; }
.open-order h4 { margin: 0 0 8px; }
.open-order-facts {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px 12px; margin: 0;
}
.open-order-facts dt { color: #adc0d0; }
.open-order-facts dd { margin: 0; overflow-wrap: anywhere; }

#next-deal-status:empty { display: none; }
#next-deal-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px 12px;
  margin-bottom: 0;
}
#next-deal-facts dt { color: #adc0d0; }
#next-deal-facts dd { margin: 0; overflow-wrap: anywhere; }
#next-deal-levels h4 { margin-bottom: 6px; }
#next-deal-level-list { margin-top: 0; padding-left: 24px; }

.next-quote { border-top: 1px solid #354754; margin-top: 20px; }
#next-quote-form, #next-quote-totals, .next-quote-order {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px;
}
#next-quote-submit { grid-column: 1 / -1; min-height: 44px; }
#next-quote-status:empty { display: none; }
#next-quote-asof { color: #adc0d0; font-size: .85rem; }
#next-quote-rows { list-style: none; padding: 0; }
#next-quote-rows li { border-top: 1px solid #2b3c4b; padding-block: 10px; }
#next-quote-rows h5 { margin: 0; font-size: .95rem; }
.next-quote-order { margin-block: 7px 0; }
#next-quote-totals dt, .next-quote-order dt, #next-quote-form label { color: #adc0d0; }
#next-quote-totals dd, .next-quote-order dd { margin: 0; overflow-wrap: anywhere; }
#next-quote-totals .over-limit { color: #ffadab; }

@media (max-width: 330px) {
  #next-quote-form { grid-template-columns: minmax(0, 1fr); }
  .trade-subtabs button { font-size: .74rem; padding-inline: 3px; white-space: nowrap; }
  .trade-badges .margin-mode { font-size: .66rem; white-space: nowrap; }
}
