/* [project]/app/styles/future.css [app-client] (css) */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg-dark: #0b0e11;
  --bg-card: #161a1e;
  --bg-input: #1e2329;
  --bg-hover: #2b3139;
  --border: #2b3139;
  --text: #eaecef;
  --text-secondary: #848e9c;
  --text-muted: #5e6673;
  --green: #0ecb81;
  --green-bg: #0ecb811a;
  --red: #f6465d;
  --red-bg: #f6465d1a;
  --yellow: #f0b90b;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Roboto", sans-serif;
  --header-height: 64px;
  --symbol-bar-height: 40px;
  --orderbook-width: 250px;
  --trade-panel-width: 310px;
}

body.future-page {
  font-family: var(--font);
  background: var(--bg-dark);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  font-size: 12px;
  line-height: 1.4;
  overflow: hidden auto;
}

.mobile-trade-area {
  display: none;
}

.desktop-trade-form {
  flex-direction: column;
  gap: 16px;
  display: flex;
}

.mobile-orderbook, .mobile-open-close-tabs, .mobile-margin-leverage, .mobile-percent-btns, .mobile-position-filter, .mobile-pnl-summary {
  display: none;
}

.future-layout {
  margin-top: var(--header-height);
  grid-template-columns: 1fr var(--orderbook-width) var(--trade-panel-width);
  grid-template-rows: var(--symbol-bar-height) 540px 1fr;
  background: var(--bg-dark);
  min-height: calc(100vh - var(--header-height));
  grid-template-areas: "symbol symbol trade"
                       "chart orderbook trade"
                       "bottom bottom trade";
  display: grid;
}

.future-symbol-bar {
  background: var(--bg-dark);
  border-bottom: 1px solid var(--border);
  height: var(--symbol-bar-height);
  flex-shrink: 0;
  grid-area: symbol;
  align-items: center;
  gap: 20px;
  padding: 0 12px;
  display: flex;
  overflow: visible;
}

.future-symbol-bar::-webkit-scrollbar {
  display: none;
}

.future-symbol-bar .symbol-selector {
  flex-shrink: 0;
  position: relative;
}

.future-symbol-bar .symbol-main {
  cursor: pointer;
  border-radius: 4px;
  align-items: center;
  gap: 8px;
  padding: 4px 8px;
  transition: background .2s;
  display: flex;
}

.future-symbol-bar .symbol-main:hover {
  background: var(--bg-hover);
}

.future-symbol-bar .symbol-star {
  color: var(--text-muted);
  cursor: pointer;
  font-size: 14px;
  transition: color .2s;
}

.future-symbol-bar .symbol-star:hover, .future-symbol-bar .symbol-star.active {
  color: #f0b90b;
}

.future-symbol-bar .coin-logo {
  border-radius: 50%;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.future-symbol-bar .symbol-text {
  flex-direction: column;
  gap: 1px;
  display: flex;
}

.future-symbol-bar .symbol-name {
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
}

.future-symbol-bar .symbol-type {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
}

.future-symbol-bar .dropdown-arrow {
  color: var(--text-muted);
  font-size: 10px;
  transition: transform .2s;
}

.future-symbol-bar .symbol-selector.open .dropdown-arrow {
  transform: rotate(180deg);
}

.future-symbol-bar .price-section {
  flex-direction: column;
  flex-shrink: 0;
  gap: 1px;
  display: flex;
}

.future-symbol-bar .current-price {
  font-size: 18px;
  font-weight: 700;
  font-family: var(--mono);
  line-height: 1.2;
}

.future-symbol-bar .current-price.up {
  color: var(--green);
}

.future-symbol-bar .current-price.down {
  color: var(--red);
}

.future-symbol-bar .mark-price {
  color: var(--text-secondary);
  font-size: 10px;
  font-family: var(--mono);
  line-height: 1;
}

.future-symbol-bar .bar-divider {
  color: var(--text-muted);
  opacity: .3;
  flex-shrink: 0;
  margin: 0 4px;
  font-size: 14px;
}

.future-symbol-bar .stat-item {
  white-space: nowrap;
  flex-direction: column;
  flex-shrink: 0;
  gap: 2px;
  display: flex;
}

.future-symbol-bar .stat-label {
  color: var(--text-muted);
  font-size: 10px;
  line-height: 1;
}

.future-symbol-bar .stat-value {
  color: var(--text);
  font-size: 12px;
  font-family: var(--mono);
  line-height: 1;
}

.future-symbol-bar .stat-value.up {
  color: var(--green);
}

.future-symbol-bar .stat-value.down {
  color: var(--red);
}

.future-symbol-bar .stat-item.funding .stat-value.up {
  color: var(--green);
}

.future-symbol-bar .stat-item.funding .stat-value.down {
  color: var(--red);
}

.future-symbol-bar .mobile-change, .future-symbol-bar .mobile-icons {
  display: none;
}

.future-symbol-bar .symbol-row-1 {
  align-items: center;
  gap: 4px;
  display: inline-flex;
}

.future-symbol-bar .symbol-row-2 {
  display: none;
}

.symbol-dropdown {
  z-index: 9999;
  background: #0b0e11;
  border-radius: 4px;
  width: 480px;
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  overflow: hidden;
  box-shadow: 0 4px 12px #00000080;
}

.symbol-dropdown.show, .symbol-selector.open .symbol-dropdown {
  display: block;
}

.dropdown-search-box {
  padding: 12px 16px 8px;
  position: relative;
}

.dropdown-search-box .search-icon {
  color: #5e6673;
  margin-top: 2px;
  font-size: 14px;
  position: absolute;
  top: 50%;
  left: 28px;
  transform: translateY(-50%);
}

.symbol-dropdown .dropdown-search {
  color: #eaecef;
  background: #1e2329;
  border: 1px solid #2b3139;
  border-radius: 4px;
  width: 100%;
  padding: 8px 12px 8px 32px;
  font-size: 13px;
}

.symbol-dropdown .dropdown-search:focus {
  border-color: #474d57;
  outline: none;
}

.symbol-dropdown .dropdown-search::placeholder {
  color: #5e6673;
}

.dropdown-tabs-row {
  border-bottom: 1px solid #2b3139;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  display: flex;
  position: relative;
}

.symbol-dropdown .dropdown-tabs {
  gap: 24px;
  display: flex;
}

.symbol-dropdown .dropdown-tab {
  color: #848e9c;
  cursor: pointer;
  white-space: nowrap;
  border: none;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 400;
  transition: color .15s;
  position: relative;
  background: none !important;
}

.symbol-dropdown .dropdown-tab:hover {
  color: #eaecef;
}

.symbol-dropdown .dropdown-tab.active {
  color: #eaecef !important;
  background: none !important;
}

.symbol-dropdown .dropdown-tab.active:after {
  content: "";
  z-index: 1;
  background: #f0b90b;
  border-radius: 1px;
  width: 24px;
  height: 2px;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.dropdown-list-header {
  color: #5e6673;
  background: #0b0e11;
  align-items: center;
  padding: 6px 16px;
  font-size: 11px;
  display: flex;
}

.dropdown-list-header .header-col {
  cursor: pointer;
  white-space: nowrap;
  transition: color .15s;
}

.dropdown-list-header .header-col:hover {
  color: #848e9c;
}

.dropdown-list-header .col-symbol {
  flex: 1;
  padding-left: 52px;
}

.dropdown-list-header .col-price {
  text-align: right;
  width: 90px;
}

.dropdown-list-header .col-change {
  text-align: right;
  width: 70px;
}

.sort-btn {
  cursor: pointer;
  color: inherit;
  font: inherit;
  background: none;
  border: none;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  transition: color .15s;
  display: inline-flex;
}

.sort-btn:hover {
  color: #848e9c;
}

.sort-icon {
  flex-direction: column;
  align-items: center;
  gap: 0;
  margin-left: 2px;
  font-size: 6px;
  line-height: 1;
  display: inline-flex;
}

.sort-icon .arrow-up, .sort-icon .arrow-down {
  color: #5e6673;
  transition: color .15s;
}

.sort-btn:hover .arrow-up, .sort-btn:hover .arrow-down {
  color: #848e9c;
}

.sort-btn.asc .arrow-up, .sort-btn.desc .arrow-down {
  color: #f0b90b;
}

.sort-separator {
  opacity: .5;
  margin: 0 4px;
}

.symbol-dropdown .dropdown-list {
  background: #0b0e11;
  min-height: 200px;
  max-height: 360px;
  overflow-y: auto;
}

.dropdown-empty {
  color: #5e6673;
  background: #0b0e11;
  justify-content: center;
  align-items: center;
  min-height: 200px;
  font-size: 13px;
  display: flex;
}

.symbol-dropdown .dropdown-list::-webkit-scrollbar {
  width: 4px;
}

.symbol-dropdown .dropdown-list::-webkit-scrollbar-track {
  background: none;
}

.symbol-dropdown .dropdown-list::-webkit-scrollbar-thumb {
  background: #363c45;
  border-radius: 2px;
}

.symbol-dropdown .dropdown-item {
  cursor: pointer;
  align-items: center;
  padding: 8px 16px;
  transition: background .1s;
  display: flex;
}

.symbol-dropdown .dropdown-item:hover, .symbol-dropdown .dropdown-item.active {
  background: #1e2329;
}

.symbol-dropdown .item-star {
  color: #f0b90b;
  cursor: pointer;
  flex-shrink: 0;
  width: 20px;
  font-size: 12px;
  transition: color .15s;
}

.symbol-dropdown .item-star.inactive {
  color: #474d57;
}

.symbol-dropdown .item-star:hover {
  color: #f0b90b;
}

.symbol-dropdown .item-logo {
  border-radius: 50%;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-right: 12px;
}

.symbol-dropdown .item-info {
  flex-direction: column;
  flex: 1;
  gap: 1px;
  min-width: 0;
  display: flex;
}

.symbol-dropdown .item-name {
  color: #eaecef;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
}

.symbol-dropdown .item-name .perp-badge {
  color: #848e9c;
  background: #2b3139;
  border-radius: 2px;
  padding: 1px 4px;
  font-size: 10px;
  font-weight: 400;
}

.symbol-dropdown .item-vol {
  color: #5e6673;
  font-size: 11px;
}

.symbol-dropdown .item-price {
  width: 90px;
  font-size: 13px;
  font-family: var(--mono);
  color: #eaecef;
  text-align: right;
  flex-shrink: 0;
}

.symbol-dropdown .item-change {
  width: 70px;
  font-size: 13px;
  font-family: var(--mono);
  text-align: right;
  flex-shrink: 0;
}

.symbol-dropdown .item-change.up {
  color: #0ecb81;
}

.symbol-dropdown .item-change.down {
  color: #f6465d;
}

.future-chart {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  flex-direction: column;
  grid-area: chart;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.chart-toolbar {
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  display: flex;
  overflow-x: auto;
}

.chart-toolbar::-webkit-scrollbar {
  display: none;
}

.interval-btn {
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
}

.interval-btn:hover {
  background: var(--bg-hover);
}

.interval-btn.active {
  background: var(--bg-input);
  color: var(--text);
}

.chart-container {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
}

#chart {
  width: 100%;
  height: 100%;
}

.future-chart .tv-lightweight-charts {
  overflow: hidden !important;
}

.future-orderbook {
  background: var(--bg-card);
  border-right: 1px solid var(--border);
  flex-direction: column;
  grid-area: orderbook;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.ob-tab-bar {
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding: 10px 12px 0;
  display: flex;
}

.ob-tabs {
  gap: 18px;
  display: flex;
}

.ob-panel-tab {
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0 0 8px;
  font-size: 14px;
  font-weight: 600;
  position: relative;
}

.ob-panel-tab:hover {
  color: var(--text-primary, #eaecef);
}

.ob-panel-tab.active {
  color: var(--yellow, #f7a600);
}

.ob-panel-tab.active:after {
  content: "";
  background: var(--yellow, #f7a600);
  height: 2px;
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
}

.ob-control-bar {
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  display: flex;
}

.ob-control-bar.hidden {
  display: none;
}

.ob-panel {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: none;
  overflow: hidden;
}

.ob-panel.active {
  display: flex;
}

.ob-current-price {
  background: var(--bg-dark);
  border-top: 1px solid #ffffff08;
  border-bottom: 1px solid #ffffff08;
  flex-shrink: 0;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  display: flex;
}

.ob-last-arrow {
  font-size: 13px;
  font-weight: 700;
}

.ob-last-arrow.down {
  color: var(--red, #f6465d);
}

.ob-mark-flag {
  opacity: .7;
  margin-left: 6px;
  font-size: 11px;
}

.ob-bs-ratio {
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  flex-shrink: 0;
  grid-template-columns: auto 1fr auto auto auto;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 8px;
  font-size: 11px;
  display: grid;
}

.ob-bs-ratio .bs-buy {
  width: 18px;
  height: 16px;
  color: var(--green, #0ecb81);
  background: #0ecb8126;
  border-radius: 3px;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  display: inline-flex;
}

.ob-bs-ratio .bs-sell {
  width: 18px;
  height: 16px;
  color: var(--red, #f6465d);
  background: #f6465d26;
  border-radius: 3px;
  order: 4;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  display: inline-flex;
}

.ob-bs-ratio .bs-bar {
  background: #ffffff0a;
  border-radius: 2px;
  grid-column: 2 / span 1;
  width: 100%;
  height: 4px;
  display: flex;
  position: relative;
  overflow: hidden;
}

.bs-bar-buy {
  background: var(--green, #0ecb81);
}

.bs-bar-sell {
  background: var(--red, #f6465d);
}

.ob-bs-ratio .bs-pct-buy {
  color: var(--green, #0ecb81);
  font-weight: 600;
}

.ob-bs-ratio .bs-pct-sell {
  color: var(--red, #f6465d);
  order: 5;
  font-weight: 600;
}

.trades-header {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 6px 12px;
  font-size: 11px;
  display: grid;
}

.trades-header span:nth-child(2), .trades-header span:nth-child(3) {
  text-align: right;
}

.trades-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.trade-row {
  height: 22px;
  line-height: 18px;
  font-family: var(--mono);
  white-space: nowrap;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 58px;
  gap: 8px;
  padding: 2px 12px;
  font-size: 12px;
  display: grid;
}

.trade-row .trade-price.up {
  color: var(--green, #0ecb81);
}

.trade-row .trade-price.down {
  color: var(--red, #f6465d);
}

.trade-row .trade-amount {
  text-align: right;
  color: var(--text-primary, #eaecef);
}

.trade-row .trade-time {
  text-align: right;
  color: var(--text-muted);
  font-size: 11px;
}

.ob-title-bar {
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px 8px;
  display: flex;
}

.ob-title {
  color: var(--text-primary, #eaecef);
  letter-spacing: .2px;
  font-size: 13px;
  font-weight: 600;
}

.ob-title-actions {
  align-items: center;
  gap: 10px;
  display: flex;
}

.ob-view-icons {
  gap: 2px;
  display: flex;
}

.ob-view-btn {
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  width: 22px;
  height: 22px;
  padding: 3px;
  transition: background .15s;
  display: flex;
}

.ob-view-btn:hover {
  background: #ffffff0a;
}

.ob-view-btn.active {
  background: #ffffff0f;
}

.ob-view-btn .bar {
  opacity: .45;
  border-radius: 1px;
  width: 14px;
  height: 3px;
  display: block;
}

.ob-view-btn.active .bar {
  opacity: 1;
}

.ob-view-btn .bar-ask {
  background: var(--red, #f6465d);
}

.ob-view-btn .bar-bid {
  background: var(--green, #0ecb81);
}

.ob-view-btn .bar.big {
  width: 14px;
  height: 9px;
}

.ob-precision {
  color: var(--text-primary, #eaecef);
  font-size: 12px;
  font-family: var(--mono);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  background: none;
  border-radius: 4px;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  transition: background .15s;
  display: flex;
  position: relative;
}

.ob-precision:hover {
  background: #ffffff0a;
}

.ob-precision-arrow {
  color: var(--text-muted);
  font-size: 10px;
}

.ob-precision-menu {
  z-index: 10;
  background: #1e2329;
  border: 1px solid #ffffff14;
  border-radius: 6px;
  min-width: 72px;
  margin-top: 4px;
  position: absolute;
  top: 100%;
  right: 0;
  overflow: hidden;
  box-shadow: 0 8px 24px #0006;
}

.ob-precision-menu[hidden] {
  display: none;
}

.ob-precision-option {
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text-primary, #eaecef);
  cursor: pointer;
  padding: 7px 12px;
  transition: background .1s;
}

.ob-precision-option:hover {
  background: #f0b90b1a;
}

.ob-precision-option.active {
  color: var(--yellow, #f0b90b);
  background: #f0b90b0d;
}

.orderbook-header {
  border-bottom: 1px solid var(--border);
  color: var(--text-muted);
  flex-shrink: 0;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 6px 12px;
  font-size: 11px;
  display: grid;
}

.orderbook-header span:nth-child(2), .orderbook-header span:nth-child(3) {
  text-align: right;
}

.ob-current-price {
  background: var(--bg-dark);
  border-top: 1px solid #ffffff08;
  border-bottom: 1px solid #ffffff08;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 6px 12px;
  display: flex;
}

.ob-current-main {
  align-items: center;
  gap: 6px;
  display: flex;
}

.ob-last-value {
  font-family: var(--mono);
  letter-spacing: .3px;
  font-size: 18px;
  font-weight: 600;
}

.ob-last-value.up {
  color: var(--green, #0ecb81);
}

.ob-last-value.down {
  color: var(--red, #f6465d);
}

.ob-last-arrow {
  font-size: 12px;
}

.ob-last-arrow.up {
  color: var(--green, #0ecb81);
}

.ob-last-arrow.down {
  color: var(--red, #f6465d);
  transform: rotate(180deg);
}

.ob-mark-price {
  font-family: var(--mono);
  color: var(--text-muted);
  font-size: 12px;
}

.orderbook-content {
  flex-direction: column;
  flex: 1;
  min-height: 0;
  display: flex;
  overflow: hidden;
}

.asks-section, .bids-section {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.asks-section {
  flex-direction: column-reverse;
  display: flex;
}

.bids-section {
  flex-direction: column;
  display: flex;
}

.ob-row {
  height: 20px;
  line-height: 16px;
  font-family: var(--mono);
  cursor: pointer;
  grid-template-columns: 1fr 1fr 1fr;
  padding: 2px 12px;
  font-size: 12px;
  transition: background 80ms;
  display: grid;
  position: relative;
}

.ob-row:hover {
  background: #ffffff0a;
}

.ob-row .price, .ob-price {
  text-align: left;
}

.ob-row .qty, .ob-qty {
  text-align: right;
}

.ob-row .total, .ob-total {
  text-align: right;
  color: var(--text-secondary);
}

.ob-row.ask .price, .ob-row.ask .ob-price {
  color: var(--red);
}

.ob-row.bid .price, .ob-row.bid .ob-price {
  color: var(--green);
}

.ob-row .depth-bar, .ob-row .ob-depth {
  opacity: .18;
  pointer-events: none;
  z-index: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
}

.ob-row > span {
  z-index: 1;
  position: relative;
}

.ob-row.ask .depth-bar, .ob-row.ask .ob-depth {
  opacity: 1;
  background: #f6465d47;
}

.ob-row.bid .depth-bar, .ob-row.bid .ob-depth {
  opacity: 1;
  background: #0ecb8147;
}

.ob-row.user-order, .bybit-ob-row.user-order {
  border-left: 2px solid var(--yellow);
  position: relative;
  background: #f0b90b26 !important;
}

.ob-row.user-order:after, .bybit-ob-row.user-order:after {
  content: "●";
  color: var(--yellow);
  z-index: 2;
  font-size: 6px;
  position: absolute;
  top: 50%;
  right: 4px;
  transform: translateY(-50%);
}

.ob-row.user-order:hover, .bybit-ob-row.user-order:hover {
  background: #f0b90b40 !important;
}

.spread-row {
  text-align: center;
  font-family: var(--mono);
  background: var(--bg-dark);
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 14px;
  font-weight: 600;
}

.spread-row.up {
  color: var(--green);
}

.spread-row.down {
  color: var(--red);
}

.future-bottom {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  flex-direction: column;
  grid-area: bottom;
  min-height: 300px;
  display: flex;
  overflow: hidden;
}

.bottom-tabs {
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  padding: 0 12px;
  display: flex;
  overflow-x: auto;
}

.bottom-tabs::-webkit-scrollbar {
  display: none;
}

.bottom-tab {
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  padding: 10px 16px;
  font-size: 12px;
  position: relative;
}

.bottom-tab:hover, .bottom-tab.active {
  color: var(--text);
}

.bottom-tab.active:after {
  content: "";
  background: var(--yellow);
  height: 2px;
  position: absolute;
  bottom: 0;
  left: 16px;
  right: 16px;
}

.tab-badge {
  background: var(--bg-hover);
  border-radius: 8px;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 10px;
}

.bottom-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

.panel-filters {
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 8px;
  padding: 8px 16px;
  display: flex;
}

.panel-filters::-webkit-scrollbar {
  height: 0;
  display: none;
}

.filter-btn {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
}

.filter-btn:hover {
  background: var(--bg-hover);
}

.filter-btn.active {
  background: var(--bg-input);
  color: var(--text);
}

.mobile-position-filter {
  display: none;
}

.desktop-positions {
  display: table;
}

.mobile-positions-container {
  display: none;
}

.bottom-panel-section {
  height: 100%;
  display: none;
}

.bottom-panel-section.active {
  flex-direction: column;
  display: flex;
}

.empty-state {
  color: var(--text-muted);
  flex-direction: column;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 8px;
  display: flex;
}

.empty-icon {
  opacity: .5;
  font-size: 32px;
}

.data-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 11px;
}

.data-table th {
  text-align: left;
  color: var(--text-muted);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  font-weight: 500;
  position: sticky;
  top: 0;
}

.data-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
}

.data-table tr:hover td {
  background: var(--bg-hover);
}

td.long, .positions-table td.long {
  color: var(--green);
}

td.short, .positions-table td.short {
  color: var(--red);
}

td.status-filled {
  color: var(--green);
}

td.status-cancelled {
  color: #888;
}

td.status-open {
  color: var(--yellow, #f0b90b);
}

td.type-market, .positions-table td.type-market {
  font-weight: 500;
  color: #f7931a !important;
}

td.type-limit, .positions-table td.type-limit {
  font-weight: 500;
  color: #3b82f6 !important;
}

.cancel-btn {
  border: 1px solid var(--border);
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  cursor: pointer;
  background: none;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  padding: 0;
  font-size: 14px;
  transition: all .2s;
  display: inline-flex;
}

.cancel-btn:hover {
  border-color: var(--red);
  color: var(--red);
  background: #ea39431a;
}

.cancel-btn:before {
  content: "×";
  font-weight: 400;
  line-height: 1;
}

.position-symbol-cell {
  flex-direction: column;
  gap: 4px;
  display: flex;
}

.position-symbol-cell .symbol-row {
  align-items: center;
  gap: 6px;
  display: flex;
}

.position-symbol-cell .symbol-name {
  color: var(--text);
  font-weight: 500;
}

.position-symbol-cell .badge-row {
  align-items: center;
  gap: 4px;
  display: flex;
}

.position-symbol-cell .position-coin-logo {
  border-radius: 50%;
  width: 20px;
  height: 20px;
}

.side-badge {
  text-transform: uppercase;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
}

.side-badge.long {
  color: var(--green);
  background: #0ecb8126;
}

.side-badge.short {
  color: var(--red);
  background: #f6465d26;
}

.position-action-cell {
  white-space: nowrap;
}

.close-position-btn {
  background: var(--red);
  color: #fff;
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 12px;
  transition: opacity .2s;
}

.close-position-btn:hover {
  opacity: .8;
}

.future-panel {
  background: var(--bg-card);
  border-left: 1px solid var(--border);
  flex-direction: column;
  grid-area: trade;
  display: flex;
  overflow: visible;
}

.panel-header {
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  display: flex;
}

.panel-title {
  font-size: 16px;
  font-weight: 600;
}

.panel-icons {
  gap: 8px;
  display: flex;
}

.panel-icon {
  cursor: pointer;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  width: 24px;
  height: 24px;
  display: flex;
}

.panel-icon:hover {
  background: var(--bg-hover);
}

.panel-body {
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  display: flex;
}

.margin-leverage {
  gap: 8px;
  display: flex;
}

.margin-btn, .leverage-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
}

.margin-btn:hover, .leverage-btn:hover {
  background: var(--bg-hover);
}

.margin-leverage-row {
  gap: 8px;
  padding: 12px .5px 8px;
  display: flex;
}

.margin-select-btn, .leverage-select-btn {
  cursor: pointer;
  border-radius: 6px;
  flex: 1;
  justify-content: center;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
  display: flex;
}

.margin-select-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
}

.leverage-select-btn {
  border: 1px solid var(--yellow);
  color: var(--yellow);
  background: #f0b90b1a;
}

.margin-select-btn:hover, .leverage-select-btn:hover {
  background: var(--bg-hover);
}

.margin-select-btn .arrow, .leverage-select-btn .arrow {
  opacity: .7;
  font-size: 10px;
}

.order-type-tabs {
  gap: 4px;
  padding: 8px .5px;
  display: flex;
}

.order-type-tab {
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}

.order-type-tab:hover {
  color: var(--text);
}

.order-type-tab.active {
  color: var(--text);
  background: var(--bg-hover);
}

.order-type-tab.has-dropdown .arrow {
  opacity: .6;
  margin-left: 4px;
  font-size: 10px;
}

.input-group {
  padding: 0 .5px 8px;
}

.input-group label {
  color: var(--text-muted);
  margin-bottom: 4px;
  font-size: 11px;
  display: block;
}

.input-wrapper {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  align-items: center;
  display: flex;
}

.input-wrapper:focus-within {
  border-color: var(--yellow);
}

.input-wrapper input {
  color: var(--text);
  font-family: var(--mono);
  text-align: right;
  background: none;
  border: none;
  flex: 1;
  padding: 10px 12px;
  font-size: 13px;
}

.input-wrapper input:focus {
  outline: none;
}

.input-suffix {
  align-items: center;
  gap: 8px;
  padding-right: 12px;
  display: flex;
}

.last-btn {
  color: var(--text-secondary);
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  transition: all .2s;
}

.last-btn:hover {
  background: var(--bg-hover);
}

.last-btn.active {
  color: var(--yellow);
  background: #f0b90b26;
}

.swap-btn {
  color: var(--text-secondary);
  cursor: pointer;
}

.qty-unit {
  color: var(--text-muted);
  font-size: 12px;
}

.slider-container {
  padding: 0 .5px 16px;
}

.slider-track {
  background: var(--bg-hover);
  cursor: pointer;
  touch-action: none;
  border-radius: 3px;
  height: 6px;
  position: relative;
}

.slider-fill {
  background: var(--yellow);
  pointer-events: none;
  will-change: width;
  border-radius: 3px;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.slider-thumb {
  background: var(--yellow);
  cursor: grab;
  will-change: left;
  touch-action: none;
  z-index: 2;
  border: 2px solid #fff;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 2px 4px #0000004d;
}

.slider-thumb:active {
  cursor: grabbing;
  transform: translate(-50%, -50%)scale(1.1);
}

.slider-labels {
  color: var(--text-muted);
  justify-content: space-between;
  margin-top: 8px;
  font-size: 10px;
  display: flex;
}

.slider-label {
  cursor: pointer;
  border-radius: 2px;
  padding: 2px 4px;
  transition: color .15s;
}

.slider-label:hover {
  color: var(--yellow);
}

.order-info {
  padding: 0 .5px 12px;
}

.info-row {
  justify-content: space-between;
  padding: 4px 0;
  font-size: 11px;
  display: flex;
}

.info-row span:first-child {
  color: var(--text-muted);
}

.info-row span:last-child {
  font-variant-numeric: tabular-nums;
}

.info-row .link {
  color: var(--yellow);
  cursor: pointer;
}

.order-options {
  align-items: center;
  gap: 16px;
  padding: 0 .5px 12px;
  display: flex;
}

.checkbox-label {
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  display: flex;
}

.checkbox-label input {
  width: 14px;
  height: 14px;
  accent-color: var(--yellow);
  cursor: pointer;
}

.action-buttons {
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 0 .5px 12px;
  display: grid;
}

.action-btn {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
}

.action-btn.long {
  background: var(--green);
  color: #fff;
}

.action-btn.long:hover {
  background: #0db375;
}

.action-btn.short {
  background: var(--red);
  color: #fff;
}

.action-btn.short:hover {
  background: #e53e55;
}

.extra-info {
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  justify-content: space-between;
  padding: 8px .5px;
  font-size: 11px;
  display: flex;
}

.account-section {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding: 16px .5px 0;
}

.account-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  display: flex;
}

.account-title {
  font-size: 12px;
  font-weight: 500;
}

.account-row {
  justify-content: space-between;
  margin-bottom: 6px;
  font-size: 11px;
  display: flex;
}

.account-row .label {
  color: var(--text-muted);
}

.account-row .value {
  font-family: var(--mono);
}

.account-row .value.positive {
  color: var(--green);
}

.account-row .value.negative {
  color: var(--red);
}

.account-icons {
  gap: 8px;
  display: flex;
}

.acc-icon {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 11px;
}

.acc-icon:hover {
  color: var(--text);
}

.margin-bars {
  flex-direction: column;
  gap: 8px;
  margin: 10px 0;
  padding: 0 2px;
  display: flex;
}

.margin-bar-row {
  grid-template-columns: 85px 1fr 55px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  display: grid;
}

.margin-bar-row .label {
  color: var(--text-muted);
  white-space: nowrap;
}

.margin-bar-row .value {
  text-align: right;
  font-family: var(--mono);
  color: var(--text);
  font-weight: 500;
}

.bar-container {
  background: var(--bg-input);
  border-radius: 3px;
  height: 6px;
  overflow: hidden;
}

.bar-fill {
  border-radius: 3px;
  height: 100%;
  transition: width .3s;
}

.bar-fill.green {
  background: var(--green);
}

.bar-fill.yellow {
  background: var(--yellow);
}

.bar-fill.red {
  background: var(--red);
}

.balance-rows {
  flex-direction: column;
  gap: 6px;
  margin: 10px 0;
  display: flex;
}

.balance-row {
  justify-content: space-between;
  font-size: 11px;
  display: flex;
}

.balance-row .label {
  color: var(--text-muted);
}

.balance-row .value {
  font-family: var(--mono);
}

.account-buttons {
  gap: 6px;
  margin-top: 10px;
  display: flex;
}

.acc-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  flex: 1;
  padding: 8px;
  font-size: 11px;
  transition: all .15s;
}

.acc-btn:hover {
  background: var(--bg-hover);
  border-color: var(--yellow);
}

.contract-section {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding: 12px .5px 0;
}

.contract-header {
  margin-bottom: 10px;
}

.contract-title {
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.contract-rows {
  flex-direction: column;
  gap: 6px;
  display: flex;
}

.contract-row {
  justify-content: space-between;
  font-size: 11px;
  display: flex;
}

.contract-row .label {
  color: var(--text-muted);
}

.contract-row .value {
  font-family: var(--mono);
  color: var(--text);
}

.show-more-btn {
  border: 1px solid var(--border);
  width: 100%;
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border-radius: 4px;
  margin-top: 10px;
  padding: 8px;
  font-size: 11px;
  transition: all .15s;
}

.show-more-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}

.trade-feed-section {
  border-top: 1px solid var(--border);
  margin-top: 16px;
  padding: 12px .5px 0;
}

.trade-feed-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  display: flex;
}

.trade-feed-title {
  font-size: 12px;
  font-weight: 500;
}

.online-badge {
  color: var(--green);
  font-size: 11px;
}

.trade-feed-list {
  flex-direction: column;
  gap: 4px;
  max-height: 200px;
  display: flex;
  overflow-y: auto;
}

.trade-feed-item {
  background: var(--bg-input);
  border-radius: 4px;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 11px;
  display: flex;
}

.trade-feed-item .user {
  color: var(--text-secondary);
  min-width: 60px;
}

.trade-feed-item .action {
  font-weight: 500;
}

.trade-feed-item .action.long {
  color: var(--green);
}

.trade-feed-item .action.short {
  color: var(--red);
}

.trade-feed-item .symbol {
  color: var(--text);
}

.trade-feed-item .amount {
  font-family: var(--mono);
  color: var(--text-secondary);
  margin-left: auto;
}

.trade-feed-item .time {
  color: var(--text-muted);
  font-size: 10px;
}

.link {
  cursor: pointer;
  color: var(--yellow) !important;
}

.link:hover {
  text-decoration: underline;
}

@media (max-width: 1024px) {
  :root {
    --orderbook-width: 210px;
    --trade-panel-width: 290px;
  }

  .stat-item {
    display: none;
  }

  .stat-item:nth-child(-n+4) {
    display: flex;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
    --symbol-bar-height: 44px;
  }

  html {
    overflow-x: hidden;
  }

  body.future-page {
    width: 100%;
    max-width: 100vw;
    height: auto;
    min-height: 100vh;
    overflow: hidden auto;
  }

  .future-layout {
    margin-top: var(--header-height);
    grid-template-columns: 1fr;
    grid-template-rows: var(--symbol-bar-height) auto auto auto;
    min-height: calc(100vh - var(--header-height));
    grid-template-areas: "symbol"
                         "chart"
                         "trade"
                         "bottom";
    width: 100%;
    max-width: 100vw;
    position: relative;
    inset: auto;
    overflow-x: hidden;
  }

  .future-symbol-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    gap: 0;
    width: 100%;
    max-width: 100vw;
    padding: 0 12px;
    overflow: hidden;
  }

  .future-symbol-bar .symbol-selector {
    padding: 0;
  }

  .future-symbol-bar .symbol-main {
    gap: 4px;
    padding: 8px 0;
  }

  .future-symbol-bar .symbol-star, .future-symbol-bar .coin-logo {
    display: none;
  }

  .future-symbol-bar .symbol-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
  }

  .future-symbol-bar .symbol-row-1 {
    align-items: center;
    gap: 4px;
    display: flex;
  }

  .future-symbol-bar .symbol-name {
    color: var(--text);
    font-size: 18px;
    font-weight: 700;
  }

  .future-symbol-bar .dropdown-arrow {
    color: var(--text-secondary);
    font-size: 10px;
  }

  .future-symbol-bar .symbol-row-2 {
    align-items: center;
    gap: 6px;
    display: flex;
  }

  .future-symbol-bar .symbol-type {
    color: var(--text-muted);
    font-size: 12px;
  }

  .future-symbol-bar .mobile-change {
    font-size: 12px;
    display: inline;
  }

  .future-symbol-bar .mobile-change.up {
    color: var(--green);
  }

  .future-symbol-bar .mobile-change.down {
    color: var(--red);
  }

  .future-symbol-bar .price-section, .future-symbol-bar .bar-divider, .future-symbol-bar .stat-item {
    display: none;
  }

  .future-symbol-bar .mobile-icons {
    align-items: center;
    gap: 16px;
    margin-left: auto;
    display: flex;
  }

  .future-symbol-bar .mobile-icon {
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 18px;
    transition: color .2s;
  }

  .future-symbol-bar .mobile-icon:hover {
    color: var(--text);
  }

  .symbol-dropdown {
    top: calc(var(--header-height) + var(--symbol-bar-height));
    border-radius: 0;
    width: 100%;
    max-height: 70vh;
    position: fixed;
    left: 0;
    right: 0;
  }

  .future-chart {
    border-right: none;
    width: 100%;
    max-width: 100vw;
    min-height: 200px;
    max-height: 30vh;
    overflow: hidden;
  }

  .chart-container {
    max-width: 100%;
    overflow: hidden;
  }

  .chart-toolbar {
    gap: 2px;
    padding: 6px 10px;
  }

  .interval-btn {
    padding: 4px 8px;
    font-size: 11px;
  }

  .future-orderbook {
    display: none;
  }

  .future-panel {
    border-left: none;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    grid-area: trade;
    max-height: none;
    display: block;
    overflow: visible;
  }

  .panel-header {
    display: none;
  }

  .panel-body {
    gap: 0;
    padding: 0;
    display: block;
  }

  .desktop-trade-form {
    display: none;
  }

  .mobile-trade-area {
    background: var(--bg-dark);
    grid-template-columns: 52% 48%;
    gap: 0;
    min-height: 420px;
    padding: 0;
    display: grid;
    overflow: hidden;
  }

  .bybit-order-form {
    background: var(--bg-dark);
    border-right: 1px solid var(--border);
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 2px 10px 8px;
    display: flex;
    overflow: visible;
  }

  .bybit-margin-row {
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    display: flex;
  }

  .bybit-dropdown-btn {
    color: #eaecef;
    cursor: pointer;
    background: #1e2329;
    border: 1px solid #2b3139;
    border-radius: 4px;
    flex: 1;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
  }

  .bybit-dropdown-btn:active {
    background: #2b3139;
  }

  .dropdown-arrow {
    color: #848e9c;
    font-size: 10px;
  }

  .bybit-available-row {
    justify-content: space-between;
    align-items: center;
    padding: 4px 0 0;
    font-size: 11px;
    display: flex;
  }

  .available-label {
    color: #848e9cc7;
    font-size: 11px;
  }

  .available-value {
    color: #e8ecf2eb;
    font-family: var(--mono);
    align-items: center;
    gap: 6px;
    font-size: 11px;
    display: inline-flex;
  }

  .available-amt {
    display: inline-block;
  }

  .bybit-add-btn {
    color: #e8ecf2d9;
    cursor: pointer;
    background: #1e2329b3;
    border: 1px solid #ffffff24;
    border-radius: 999px;
    place-items: center;
    width: 18px;
    height: 18px;
    padding: 0;
    font-size: 13px;
    line-height: 1;
    transition: background .15s, border-color .15s, transform .15s;
    display: inline-grid;
    transform: translateY(-.5px);
  }

  .bybit-add-btn:hover {
    background: #2b3139bf;
    border-color: #ffffff38;
  }

  .bybit-add-btn:active {
    transform: translateY(.5px);
  }

  .bybit-order-type {
    margin-bottom: 2px;
  }

  .bybit-order-type-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    width: 100%;
    color: var(--text);
    cursor: pointer;
    border-radius: 4px;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    font-size: 11px;
    font-weight: 500;
    display: flex;
  }

  .bybit-input-group {
    flex-direction: column;
    gap: 2px;
    display: flex;
  }

  .bybit-input-label {
    color: var(--text-muted);
    font-size: 9px;
  }

  .bybit-input-wrapper {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    align-items: center;
    display: flex;
    overflow: hidden;
  }

  .bybit-input {
    color: var(--text);
    background: none;
    border: none;
    flex: 1;
    min-width: 0;
    padding: 8px;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    font-weight: 500;
  }

  .bybit-input:focus {
    outline: none;
  }

  .bybit-input-group.disabled {
    opacity: .5;
    pointer-events: none;
  }

  .bybit-input.disabled, .bybit-input:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
  }

  .bybit-input-suffix {
    color: var(--text-muted);
    white-space: nowrap;
    padding: 0 6px;
    font-size: 10px;
  }

  .bybit-input-suffix.swap-btn {
    cursor: pointer;
    color: var(--text-secondary);
  }

  .bybit-input-suffix.swap-btn:hover {
    color: var(--text);
  }

  .bybit-slider-container {
    padding: 20px 8px 24px;
    display: block;
  }

  .bybit-slider-track {
    background: #474d57;
    border-radius: 1px;
    height: 2px;
    position: relative;
  }

  .bybit-slider-fill {
    z-index: 1;
    background: #f0b90b;
    border-radius: 1px;
    width: 0%;
    height: 100%;
    position: absolute;
  }

  .bybit-slider-thumb {
    cursor: pointer;
    z-index: 3;
    background: #0b0e11;
    border: 2px solid #f0b90b;
    border-radius: 50%;
    width: 14px;
    height: 14px;
    position: absolute;
    top: 50%;
    left: 0%;
    transform: translate(-50%, -50%);
  }

  .bybit-slider-dots {
    pointer-events: none;
    z-index: 2;
    justify-content: space-between;
    display: flex;
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
  }

  .slider-dot {
    background: #0b0e11;
    border: 2px solid #474d57;
    border-radius: 50%;
    width: 10px;
    height: 10px;
  }

  .slider-dot.active {
    border-color: #f0b90b;
  }

  .bybit-order-info {
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    gap: 4px;
    margin-top: 2px;
    padding: 6px 0;
    display: flex;
  }

  .bybit-info-row {
    justify-content: space-between;
    align-items: center;
    font-size: 10px;
    line-height: 1.3;
    display: flex;
  }

  .bybit-info-row .info-label {
    color: var(--text-muted);
    font-size: 10px;
  }

  .bybit-info-row .info-value {
    color: var(--text);
    font-family: var(--mono);
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 65%;
    font-size: 10px;
    overflow: hidden;
  }

  .bybit-info-row .info-value.link {
    color: var(--yellow);
    cursor: pointer;
  }

  .bybit-opts-wrap {
    justify-content: space-between;
    align-items: flex-start;
    padding: 8px 0;
    display: flex;
  }

  .bybit-opts-left {
    flex-direction: column;
    gap: 8px;
    display: flex;
  }

  .bybit-opts-right {
    align-items: flex-start;
    display: flex;
  }

  .bybit-chk {
    color: #848e9c;
    cursor: pointer;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    display: flex;
  }

  .bybit-chk input[type="checkbox"] {
    appearance: none;
    cursor: pointer;
    background: none;
    border: 1.5px solid #6b7280;
    border-radius: 3px;
    flex-shrink: 0;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
    transition: all .15s;
    position: relative;
  }

  .bybit-chk input[type="checkbox"]:checked {
    background: #f0b90b;
    border-color: #f0b90b;
  }

  .bybit-chk input[type="checkbox"]:checked:after {
    content: "";
    border: 2px solid #000;
    border-width: 0 2px 2px 0;
    width: 5px;
    height: 8px;
    position: absolute;
    top: 1px;
    left: 4px;
    transform: rotate(45deg);
  }

  .bybit-chk:has(input:checked) span {
    color: #eaecef;
  }

  .bybit-gtc {
    color: #eaecef;
    cursor: pointer;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    display: flex;
  }

  .bybit-gtc span {
    color: #5e6673;
    font-size: 10px;
  }

  .bybit-opts-wrap {
    gap: 10px;
    padding: 6px 0 4px;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    display: flex !important;
  }

  .bybit-opts-row {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    width: 100%;
    min-height: 24px;
    display: flex;
  }

  .bybit-chk {
    -webkit-user-select: none;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    line-height: 1.1;
    display: inline-flex;
  }

  .bybit-chk input[type="checkbox"] {
    background: #0000001f;
    border: 1px solid #2b3139;
    border-radius: 3px;
    width: 16px;
    min-width: 16px;
    height: 16px;
    min-height: 16px;
    transition: background .15s, border-color .15s, box-shadow .15s;
    padding: 0 !important;
  }

  .bybit-chk input[type="checkbox"]:hover {
    border-color: #474d57;
  }

  .bybit-chk input[type="checkbox"]:focus-visible {
    border-color: #f0b90b73;
    outline: none;
    box-shadow: 0 0 0 2px #f0b90b2e;
  }

  .bybit-gtc {
    color: #eaecef;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    background: #1e2329;
    border: 1px solid #2b3139;
    border-radius: 4px;
    flex-shrink: 0;
    justify-content: center;
    align-items: center;
    gap: 6px;
    height: 28px;
    padding: 0 12px;
    font-size: 13px;
    font-weight: 600;
    transition: background .15s, border-color .15s, transform .15s;
    display: inline-flex;
    box-shadow: inset 0 0 0 1px #0003;
  }

  .bybit-gtc:hover {
    background: #2b3139;
    border-color: #474d57;
  }

  .bybit-gtc:active {
    transform: translateY(1px);
  }

  .bybit-gtc span {
    color: #848e9c;
    font-size: 11px;
    transform: translateY(.5px);
  }

  .bybit-trade-buttons {
    margin-top: 6px !important;
    padding-top: 0 !important;
  }

  .bybit-btn-long, .bybit-btn-short {
    border-radius: 6px;
    min-height: 48px;
    padding: 14px 16px;
    font-size: 15px;
  }

  .bybit-trade-buttons {
    background: linear-gradient(#0b0e1100 0%, #0b0e11f2 35%, #0b0e11 100%);
    flex-direction: column;
    gap: 8px;
    margin-top: auto;
    padding-top: 8px;
    padding-bottom: 8px;
    display: flex;
    position: sticky;
    bottom: 0;
  }

  .bybit-btn-long, .bybit-btn-short {
    cursor: pointer;
    border: none;
    border-radius: 8px;
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    transition: all .2s;
  }

  .bybit-btn-long {
    color: #fff;
    background: #0ecb81;
  }

  .bybit-btn-long:hover {
    background: #10dc8c;
  }

  .bybit-btn-short {
    color: #fff;
    background: #f6465d;
  }

  .bybit-btn-short:hover {
    background: #ff5a70;
  }

  .bybit-btn-long:active, .bybit-btn-short:active {
    transform: scale(.98);
  }

  .bybit-orderbook {
    background: var(--bg-dark);
    flex-direction: column;
    height: 100%;
    padding: 6px 8px;
    font-size: 10px;
    display: flex;
    overflow: hidden;
  }

  .bybit-funding-row {
    flex-direction: column;
    align-items: flex-end;
    gap: 2px;
    padding: 4px 0 8px;
    display: flex;
  }

  .funding-label {
    color: var(--text-muted);
    white-space: nowrap;
    font-size: 10px;
  }

  .funding-values {
    align-items: center;
    gap: 8px;
    display: flex;
  }

  .funding-value {
    font-family: var(--mono);
    color: var(--red);
    font-size: 12px;
    font-weight: 500;
  }

  .funding-time {
    font-family: var(--mono);
    color: var(--text);
    font-size: 12px;
  }

  .bybit-ob-header {
    color: var(--text-muted);
    justify-content: space-between;
    padding-bottom: 4px;
    font-size: 9px;
    line-height: 1.3;
    display: flex;
  }

  .bybit-ob-header span {
    text-align: right;
  }

  .bybit-ob-header span:first-child {
    text-align: left;
  }

  .bybit-asks, .bybit-bids {
    flex-direction: column;
    flex: 1;
    justify-content: flex-end;
    min-height: 0;
    display: flex;
    overflow: hidden;
  }

  .bybit-bids {
    justify-content: flex-start;
  }

  .bybit-ob-row {
    letter-spacing: 0;
    justify-content: space-between;
    padding: 3px 0;
    font-family: Roboto, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    display: flex;
    position: relative;
  }

  .bybit-ob-row .price {
    z-index: 1;
    font-weight: 500;
  }

  .bybit-ob-row .qty {
    z-index: 1;
    text-align: right;
    font-weight: 400;
  }

  .bybit-ob-row.ask .price {
    color: #f6465d;
  }

  .bybit-ob-row.bid .price {
    color: #0ecb81;
  }

  .bybit-ob-row .qty {
    color: #eaecef;
  }

  .bybit-ob-row .depth-bar {
    opacity: .15;
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
  }

  .bybit-ob-row.ask .depth-bar {
    background: var(--red);
  }

  .bybit-ob-row.bid .depth-bar {
    background: var(--green);
  }

  .bybit-ob-row[data-price] {
    cursor: pointer;
    transition: background-color .15s;
  }

  .bybit-ob-row[data-price]:active {
    background-color: #ffffff1a;
  }

  .bybit-current-price {
    justify-content: flex-start;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    display: flex;
  }

  .current-price-value {
    letter-spacing: 0;
    font-family: Roboto, sans-serif;
    font-size: 14px;
    font-weight: 600;
  }

  .current-price-value.up {
    color: var(--green);
  }

  .current-price-value.down {
    color: var(--red);
  }

  .current-price-arrow {
    color: var(--text-muted);
    font-size: 10px;
  }

  .bybit-mark-price {
    color: var(--text-muted);
    margin-bottom: 4px;
    font-family: Roboto, sans-serif;
    font-size: 10px;
  }

  .bybit-ob-footer {
    flex-direction: column;
    flex-shrink: 0;
    gap: 6px;
    padding: 4px 0 0;
    display: flex;
  }

  .ob-footer-row1 {
    width: 100%;
  }

  .ob-ratio-bar {
    border-radius: 2px;
    height: 18px;
    display: flex;
    overflow: hidden;
  }

  .ob-ratio-buy {
    background: #0ecb8126;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    display: flex;
  }

  .ob-ratio-sell {
    background: #f6465d26;
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    padding: 0 4px;
    display: flex;
  }

  .ratio-label-box {
    border-radius: 2px;
    justify-content: center;
    align-items: center;
    width: 14px;
    height: 14px;
    font-size: 9px;
    font-weight: 700;
    display: inline-flex;
    color: #fff !important;
  }

  .ratio-label-box.buy {
    background: #0ecb81;
    color: #fff !important;
  }

  .ratio-label-box.sell {
    background: #f6465d;
    color: #fff !important;
  }

  .ratio-pct {
    font-size: 10px;
    font-weight: 500;
    font-family: var(--mono);
  }

  .ob-ratio-buy .ratio-pct {
    color: #0ecb81;
  }

  .ob-ratio-sell .ratio-pct {
    color: #f6465d;
  }

  .ob-footer-row2 {
    align-items: center;
    gap: 8px;
    width: 100%;
    display: flex;
  }

  .ob-precision-dropdown {
    flex: 1;
    position: relative;
  }

  .precision-current {
    color: #eaecef;
    cursor: pointer;
    font-size: 12px;
    font-weight: 500;
    font-family: var(--mono);
    background: #2b2f36;
    border-radius: 4px;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px;
    display: flex;
  }

  .precision-arrow {
    color: #848e9c;
    font-size: 10px;
    transition: transform .2s;
  }

  .ob-precision-dropdown.open .precision-arrow {
    transform: rotate(180deg);
  }

  .precision-options {
    z-index: 100;
    background: #1e2329;
    border: 1px solid #2b2f36;
    border-radius: 4px;
    margin-bottom: 4px;
    display: none;
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    box-shadow: 0 -4px 12px #0000004d;
  }

  .ob-precision-dropdown.open .precision-options {
    display: block;
  }

  .precision-option {
    font-size: 13px;
    font-family: var(--mono);
    color: #848e9c;
    cursor: pointer;
    padding: 10px 12px;
    transition: all .15s;
  }

  .precision-option:hover {
    color: #eaecef;
    background: #2b2f36;
  }

  .precision-option.active {
    color: #f0b90b;
    background: #f0b90b1a;
  }

  .ob-mode-icons {
    cursor: pointer;
    background: #2b2f36;
    border-radius: 4px;
    flex-shrink: 0;
    align-items: center;
    padding: 5px 8px;
    display: flex;
  }

  .mode-bars-icon {
    flex-direction: column;
    gap: 3px;
    display: flex;
  }

  .bar-line {
    border-radius: 1px;
    width: 16px;
    height: 4px;
  }

  .bar-line.red {
    background: #f6465d;
  }

  .bar-line.green {
    background: #0ecb81;
  }

  .ob-mode-icons:hover .bar-line {
    opacity: .7;
  }

  .ob-decimal-box {
    color: #eaecef;
    cursor: pointer;
    background: #2b2f36;
    border-radius: 4px;
    flex: 1;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 500;
    display: flex;
  }

  .ob-decimal-arrow {
    color: #848e9c;
    font-size: 8px;
  }

  .ob-mode-box {
    flex-shrink: 0;
    align-items: center;
    gap: 10px;
    display: flex;
  }

  .ob-icon-list {
    color: #848e9c;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
  }

  .ob-icon-list:hover {
    color: #eaecef;
  }

  .ob-icon-bars {
    cursor: pointer;
    flex-direction: column;
    gap: 2px;
    padding: 2px;
    display: flex;
  }

  .ob-icon-bars:hover .bar-red, .ob-icon-bars:hover .bar-green {
    opacity: .8;
  }

  .ob-icon-bars .bar-red {
    background: #f6465d;
    border-radius: 1px;
    width: 16px;
    height: 4px;
  }

  .ob-icon-bars .bar-green {
    background: #0ecb81;
    border-radius: 1px;
    width: 16px;
    height: 4px;
  }

  .margin-leverage, .mobile-margin-leverage, .order-type-tabs {
    display: none;
  }

  .input-group {
    gap: 4px;
  }

  .input-label {
    color: var(--text-muted);
    font-size: 10px;
  }

  .input-wrapper {
    border-radius: 4px;
    height: 36px;
  }

  .input-wrapper input {
    padding: 8px 10px;
    font-size: 13px;
  }

  .input-suffix {
    padding: 0 8px;
    font-size: 11px;
  }

  .last-btn, .swap-btn, .slider-container, .mobile-percent-btns, .mobile-pct-btn {
    display: none;
  }

  .mobile-pct-btn:hover, .mobile-pct-btn.active {
    background: var(--yellow);
    color: #000;
    border-color: var(--yellow);
  }

  .order-info, .checkbox-row {
    display: none;
  }

  .trade-buttons {
    box-shadow: none;
    background: none;
    gap: 6px;
    margin: 0;
    padding: 0;
    position: static;
  }

  .btn-long, .btn-short {
    border-radius: 6px;
    padding: 12px 8px;
    font-size: 13px;
    font-weight: 600;
  }

  .btn-long {
    background: var(--green);
  }

  .btn-short {
    background: var(--red);
  }

  .extra-links, .account-section, .contract-section, .trade-feed-section {
    display: none;
  }

  .future-bottom {
    border-top: 1px solid var(--border);
    background: var(--bg-dark);
    width: 100%;
    max-width: 100vw;
    min-height: auto;
    max-height: none;
    padding-bottom: 500px;
    overflow: hidden visible;
  }

  .bottom-tabs {
    background: var(--bg-card);
    -webkit-overflow-scrolling: touch;
    flex-shrink: 0;
    gap: 0;
    width: 100%;
    max-width: 100vw;
    padding: 0 8px;
    overflow: auto hidden;
  }

  .bottom-tabs::-webkit-scrollbar {
    display: none;
  }

  .bottom-tab {
    white-space: nowrap;
    flex-shrink: 0;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 500;
  }

  .tab-badge {
    background: var(--yellow);
    color: #000;
    border-radius: 8px;
    margin-left: 3px;
    padding: 1px 5px;
    font-size: 9px;
  }

  .bottom-content {
    width: 100%;
    max-width: 100vw;
    max-height: none;
    padding: 0;
    overflow: hidden visible;
  }

  .panel-filters {
    display: none;
  }

  .mobile-pnl-summary {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    padding: 10px 12px;
    display: flex;
  }

  .mobile-pnl-item {
    flex-direction: column;
    flex: 1;
    align-items: center;
    display: flex;
  }

  .mobile-pnl-label {
    color: var(--text-secondary);
    margin-bottom: 2px;
    font-size: 10px;
  }

  .mobile-pnl-value {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 600;
  }

  .mobile-pnl-value.positive {
    color: #0ecb81;
  }

  .mobile-pnl-value.negative {
    color: #f6465d;
  }

  .mobile-position-filter {
    display: flex;
  }

  .desktop-positions {
    display: none !important;
  }

  .mobile-positions-container {
    display: block !important;
  }

  .positions-table, .orders-table, .trades-table {
    padding: 0;
  }

  .positions-header, .orders-header, .trades-header {
    display: none;
  }

  .mobile-position-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    margin: 8px;
    padding: 12px;
  }

  .mpc-header {
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    display: flex;
  }

  .mpc-symbol {
    color: var(--text);
    font-size: 13px;
    font-weight: 700;
  }

  .mpc-settings {
    color: var(--text-muted);
    cursor: pointer;
    font-size: 14px;
  }

  .mpc-position-info {
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
    display: flex;
  }

  .mpc-side {
    font-size: 11px;
    font-weight: 600;
  }

  .mpc-side.long {
    color: var(--green);
  }

  .mpc-side.short {
    color: var(--red);
  }

  .mpc-mode {
    color: var(--text-muted);
    font-size: 10px;
  }

  .mpc-leverage {
    color: var(--text-muted);
    align-items: center;
    gap: 3px;
    font-size: 10px;
    display: flex;
  }

  .mpc-leverage i {
    font-size: 9px;
  }

  .mpc-leverage-bars {
    gap: 2px;
    margin-left: 3px;
    display: flex;
  }

  .mpc-lev-bar {
    background: var(--border);
    border-radius: 1px;
    width: 2px;
    height: 8px;
  }

  .mpc-lev-bar.active {
    background: var(--green);
  }

  .mpc-lev-bar.active.short {
    background: var(--red);
  }

  .mpc-pnl-section {
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 10px;
    display: flex;
  }

  .mpc-pnl-left {
    flex-direction: column;
    gap: 2px;
    display: flex;
  }

  .mpc-pnl-label {
    color: var(--text-muted);
    font-size: 10px;
  }

  .mpc-pnl-value {
    font-size: 16px;
    font-weight: 700;
    font-family: var(--mono);
  }

  .mpc-pnl-value.positive {
    color: var(--green);
  }

  .mpc-pnl-value.negative {
    color: var(--red);
  }

  .mpc-pnl-usd {
    color: var(--text-muted);
    font-size: 10px;
    font-family: var(--mono);
  }

  .mpc-pnl-right {
    text-align: right;
  }

  .mpc-roi-label {
    color: var(--text-muted);
    justify-content: flex-end;
    align-items: center;
    gap: 3px;
    font-size: 10px;
    display: flex;
  }

  .mpc-roi-label i {
    font-size: 9px;
  }

  .mpc-roi-value {
    font-size: 13px;
    font-weight: 700;
    font-family: var(--mono);
  }

  .mpc-roi-value.positive {
    color: var(--green);
  }

  .mpc-roi-value.negative {
    color: var(--red);
  }

  .mpc-info-grid {
    grid-template-columns: 1fr 1fr 1fr;
    gap: 8px 6px;
    margin-bottom: 10px;
    display: grid;
  }

  .mpc-info-item {
    flex-direction: column;
    gap: 2px;
    display: flex;
  }

  .mpc-info-label {
    color: var(--text-muted);
    font-size: 9px;
  }

  .mpc-info-value {
    font-size: 11px;
    font-weight: 600;
    font-family: var(--mono);
    color: var(--text);
  }

  .mpc-info-value.highlight {
    color: var(--red);
  }

  .mpc-info-value.mmr {
    color: var(--yellow);
  }

  .mpc-actions {
    gap: 6px;
    display: flex;
  }

  .mpc-btn {
    cursor: pointer;
    border: none;
    border-radius: 6px;
    flex: 1;
    padding: 8px 6px;
    font-size: 11px;
    font-weight: 600;
    transition: all .2s;
  }

  .mpc-btn-reverse, .mpc-btn-tpsl, .mpc-btn-close {
    background: var(--bg-input);
    color: var(--text);
    border: 1px solid var(--border);
  }

  .mpc-btn:active {
    background: var(--border);
    transform: scale(.98);
  }

  .mobile-position-filter {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    display: flex;
  }

  .filter-checkbox {
    color: var(--text-secondary);
    cursor: pointer;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    display: flex;
  }

  .filter-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--yellow);
    cursor: pointer;
  }

  .filter-checkbox span {
    -webkit-user-select: none;
    user-select: none;
  }

  .filter-actions {
    align-items: center;
    gap: 8px;
    display: flex;
  }

  .filter-btn {
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 11px;
    font-weight: 600;
    transition: all .2s;
  }

  .close-all-btn {
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: none;
  }

  .close-all-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
  }

  .close-all-btn:active {
    transform: scale(.98);
  }

  .filter-icon-btn {
    color: var(--text-muted);
    border: 1px solid var(--border);
    background: none;
    padding: 6px 8px;
  }

  .filter-icon-btn:hover {
    background: var(--bg-hover);
    color: var(--text);
  }

  .filter-icon-btn i {
    font-size: 12px;
  }

  .positions-row {
    display: none !important;
  }

  .empty-state {
    text-align: center;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin: 12px;
    padding: 40px 20px;
    font-size: 13px;
  }

  .empty-icon {
    opacity: .5;
    margin-bottom: 12px;
    font-size: 32px;
  }
}

@media (max-width: 480px) {
  .future-chart {
    min-height: 180px;
    max-height: 25vh;
  }

  .mobile-trade-area {
    grid-template-columns: 52% 48%;
    padding: 0;
  }

  .mobile-orderbook {
    padding-right: 8px;
  }

  .mobile-ob-row {
    font-size: 10px;
  }

  .mobile-ob-spread {
    padding: 4px 0;
    font-size: 12px;
  }

  .mobile-trade-form {
    gap: 8px;
    padding-left: 10px;
  }

  .mobile-oc-tab {
    padding: 6px;
    font-size: 11px;
  }

  .mobile-ml-btn {
    padding: 5px 6px;
    font-size: 10px;
  }

  .input-wrapper {
    height: 32px;
  }

  .input-wrapper input {
    padding: 6px 8px;
    font-size: 12px;
  }

  .mobile-pct-btn {
    padding: 5px 3px;
    font-size: 9px;
  }

  .btn-long, .btn-short {
    padding: 10px 6px;
    font-size: 12px;
  }

  .future-bottom {
    min-height: auto;
    max-height: none;
  }

  .bottom-tab {
    padding: 8px 10px;
    font-size: 10px;
  }

  .tab-badge {
    background: var(--yellow);
    color: #000;
    text-align: center;
    border-radius: 6px;
    min-width: 14px;
    margin-left: 2px;
    padding: 1px 4px;
    font-size: 9px;
    display: inline-block;
  }

  .positions-row, .orders-row, .trades-row {
    padding: 10px;
  }

  .mobile-position-grid {
    gap: 6px 12px;
  }

  .mobile-pos-item .label {
    font-size: 9px;
  }

  .mobile-pos-item .value {
    font-size: 11px;
  }
}

.future-layout ::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.future-layout ::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.future-layout ::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.future-layout ::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.up {
  color: var(--green) !important;
}

.down {
  color: var(--red) !important;
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

.buy {
  color: var(--green) !important;
}

.sell {
  color: var(--red) !important;
}

.text-muted {
  color: var(--text-muted);
}

.text-mono {
  font-family: var(--mono);
}

.positions-table, .orders-table, .trades-table {
  width: 100%;
  font-size: 11px;
}

.positions-header, .orders-header, .trades-header {
  color: var(--text-muted);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 8px 12px;
  font-weight: 500;
  display: grid;
  position: sticky;
  top: 0;
}

.positions-header {
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1.5fr 1fr;
}

.orders-header {
  grid-template-columns: 1.5fr 1fr 1fr .8fr 1fr 1fr 1fr 1fr;
}

.trades-header {
  grid-template-columns: 1.5fr 1fr .8fr 1fr 1fr 1fr 1.5fr;
}

.positions-row, .orders-row, .trades-row {
  border-bottom: 1px solid var(--border);
  align-items: center;
  padding: 10px 12px;
  transition: background .15s;
  display: grid;
}

.positions-row:hover, .orders-row:hover, .trades-row:hover {
  background: var(--bg-hover);
}

.positions-row {
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr 1fr 1.5fr 1fr;
}

.orders-row {
  grid-template-columns: 1.5fr 1fr 1fr .8fr 1fr 1fr 1fr 1fr;
}

.trades-row {
  grid-template-columns: 1.5fr 1fr .8fr 1fr 1fr 1fr 1.5fr;
}

.symbol-cell {
  align-items: center;
  gap: 6px;
  display: flex;
}

.side-badge {
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
}

.side-badge.long {
  background: var(--green-bg);
  color: var(--green);
}

.side-badge.short {
  background: var(--red-bg);
  color: var(--red);
}

.leverage-badge {
  background: var(--yellow);
  color: #000;
  border-radius: 2px;
  padding: 2px 4px;
  font-size: 9px;
  font-weight: 600;
}

.liq-price {
  color: var(--red);
  font-family: var(--mono);
}

.actions-cell {
  gap: 4px;
  display: flex;
}

.btn-close-pos, .btn-cancel {
  cursor: pointer;
  border: none;
  border-radius: 3px;
  padding: 4px 10px;
  font-size: 11px;
  transition: opacity .15s;
}

.btn-close-pos {
  background: var(--red);
  color: #fff;
}

.btn-cancel {
  background: var(--bg-input);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-close-pos:hover, .btn-cancel:hover {
  opacity: .85;
}

@media (max-width: 1200px) {
  .positions-header, .positions-row {
    grid-template-columns: 2fr 1fr 1fr 1fr 1.5fr 1fr;
  }

  .positions-header span:nth-child(5), .positions-row span:nth-child(5), .positions-header span:nth-child(6), .positions-row span:nth-child(6) {
    display: none;
  }
}

@media (max-width: 768px) {
  .positions-header, .orders-header, .trades-header {
    display: none;
  }

  .positions-row, .orders-row, .trades-row {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
    display: flex;
  }

  .positions-row span, .orders-row span, .trades-row span {
    flex: 40%;
  }

  .symbol-cell {
    flex: 100%;
    margin-bottom: 4px;
  }

  .actions-cell {
    flex: 100%;
    justify-content: flex-end;
  }
}

.pnl-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-sizing: border-box;
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 40px;
  padding: 0 12px;
  display: flex;
}

.pnl-header-left {
  align-items: center;
  gap: 0;
  height: 100%;
  display: flex;
}

.pnl-main-tabs {
  background: none;
  border-radius: 0;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0;
  display: flex;
}

.pnl-main-tab {
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: 1px solid #0000;
  border-radius: 4px;
  align-items: center;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 400;
  transition: all .2s;
  display: flex;
}

.pnl-main-tab:hover {
  color: var(--text);
}

.pnl-main-tab.active {
  background: var(--bg-input);
  border-color: var(--border);
  color: var(--text);
  font-weight: 500;
}

.pnl-period-tabs {
  border-left: 1px solid var(--border);
  align-items: center;
  gap: 4px;
  height: 20px;
  margin-left: 16px;
  padding-left: 16px;
  display: flex;
}

.pnl-period-tab {
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  background: none;
  border: none;
  align-items: center;
  padding: 2px 8px;
  font-size: 12px;
  transition: all .2s;
  display: flex;
  position: relative;
}

.pnl-period-tab:hover {
  color: var(--text);
}

.pnl-period-tab.active {
  color: var(--text);
  background: none;
  font-weight: 600;
}

.pnl-header-right {
  flex-shrink: 0;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  display: flex;
}

.pnl-performance-btn {
  border: 1px solid var(--border);
  color: var(--text-secondary);
  cursor: pointer;
  background: none;
  border-radius: 4px;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  font-size: 12px;
  text-decoration: none;
  transition: all .2s;
  display: flex;
}

.pnl-performance-btn:hover {
  color: var(--text);
  border-color: var(--text-muted);
  text-decoration: none;
}

.pnl-performance-btn .arrow {
  color: var(--text-secondary);
  font-size: 11px;
}

.pnl-table-wrapper {
  flex: 1 1 0;
  height: 100%;
  min-height: 0;
  overflow: auto;
}

.pnl-table-wrapper::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.pnl-table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

.pnl-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.pnl-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  display: flex;
}

.pnl-stats {
  color: var(--text-secondary);
  font-size: 11px;
}

.pnl-table {
  table-layout: fixed;
  border-collapse: collapse;
  width: 100%;
}

.pnl-table th {
  background: var(--bg-dark);
  z-index: 1;
  text-align: left;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  padding: 6px 8px;
  font-size: 11px;
  font-weight: 400;
  position: sticky;
  top: 0;
}

.pnl-table th:first-child, .pnl-table th:nth-child(2) {
  width: 10%;
}

.pnl-table th:nth-child(3) {
  width: 8%;
}

.pnl-table th:nth-child(4), .pnl-table th:nth-child(5), .pnl-table th:nth-child(6) {
  width: 12%;
}

.pnl-table th:nth-child(7) {
  text-align: right;
  width: 10%;
}

.pnl-table th:nth-child(8), .pnl-table th:nth-child(9) {
  text-align: right;
  width: 9%;
}

.pnl-table th:nth-child(10) {
  text-align: right;
  width: 8%;
}

.pnl-table td {
  font-family: var(--mono);
  white-space: nowrap;
  text-overflow: ellipsis;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  padding: 2px 6px;
  font-size: 11px;
  line-height: 1.3;
  overflow: hidden;
}

.pnl-table td:nth-child(7), .pnl-table td:nth-child(8), .pnl-table td:nth-child(9), .pnl-table td:nth-child(10) {
  text-align: right;
}

.pnl-table tbody tr:hover {
  background: var(--bg-hover);
}

.pnl-table .symbol-cell {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  display: flex;
}

.pnl-table .symbol-cell .pnl-coin-icon {
  object-fit: cover;
  border-radius: 50%;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.pnl-table .symbol-cell .symbol-info {
  flex-direction: column;
  display: flex;
}

.pnl-table .symbol-name {
  color: var(--text);
  font-weight: 600;
}

.pnl-table .symbol-type {
  color: var(--text-muted);
  font-size: 9px;
}

.pnl-table .side-long {
  color: var(--green);
  font-weight: 600;
}

.pnl-table .side-short {
  color: var(--red);
  font-weight: 600;
}

.pnl-table .pnl-positive {
  color: var(--green);
  font-weight: 600;
}

.pnl-table .pnl-negative {
  color: var(--red);
  font-weight: 600;
}

.pnl-pagination {
  justify-content: center;
  align-items: center;
  gap: 8px;
  padding: 0;
  display: flex;
}

.pnl-pagination button {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 11px;
  transition: all .2s;
}

.pnl-pagination button:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

.pnl-pagination button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.pnl-pagination .page-info {
  color: var(--text-secondary);
  font-size: 11px;
}

.positions-table {
  border-collapse: collapse;
  width: 100%;
}

.positions-table th, .positions-table td {
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
}

.positions-table th {
  background: var(--bg-dark);
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
  font-weight: 400;
}

.positions-table td {
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: var(--mono);
}

.positions-table tbody tr:hover {
  background: var(--bg-hover);
}

.positions-table .side-long {
  color: var(--green);
  font-weight: 600;
}

.positions-table .side-short {
  color: var(--red);
  font-weight: 600;
}

.positions-table .pnl-positive {
  color: var(--green);
}

.positions-table .pnl-negative {
  color: var(--red);
}

.positions-table .action-btn {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  padding: 4px 12px;
  font-size: 11px;
  transition: all .2s;
}

.positions-table .action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--text-muted);
}

@media (max-width: 768px) {
  .pnl-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    height: auto;
    padding: 8px 12px;
  }

  .pnl-header-left {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    width: 100%;
  }

  .pnl-main-tabs {
    width: 100%;
  }

  .pnl-main-tab {
    flex: 1;
    justify-content: center;
    padding: 6px 8px;
    font-size: 11px;
  }

  .pnl-period-tabs {
    border-left: none;
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
    padding-left: 0;
  }

  .pnl-period-tab {
    padding: 4px 8px;
    font-size: 11px;
  }

  .pnl-header-right {
    display: none;
  }

  .pnl-table {
    table-layout: auto;
    min-width: 800px;
  }

  .pnl-footer {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .pnl-pagination {
    justify-content: center;
    width: 100%;
  }

  .pnl-table-wrapper {
    -webkit-overflow-scrolling: touch;
    flex: auto;
    min-height: auto;
    max-height: none;
    overflow: auto visible;
  }

  #pnlPanel {
    flex-direction: column;
    height: auto;
    min-height: auto;
    display: flex;
    overflow: visible;
  }

  #pnlPanel.active {
    display: flex;
  }

  .assets-body {
    max-height: none;
    overflow-y: visible;
  }

  .bottom-panel-section {
    height: auto;
    overflow: visible;
    display: none !important;
  }

  .bottom-panel-section.active {
    flex-direction: column;
    overflow: visible;
    display: flex !important;
  }

  .history-table-wrapper {
    -webkit-overflow-scrolling: touch;
    flex: auto;
    min-height: auto;
    max-height: none;
    overflow: auto visible;
  }

  .history-table {
    min-width: 600px;
    font-size: 11px;
  }

  .history-table th, .history-table td {
    white-space: nowrap;
    padding: 8px 6px;
  }

  #historyPanel, #tradesPanel {
    flex-direction: column;
    height: auto;
    min-height: auto;
    display: flex;
    overflow: visible;
  }

  #historyPanel.active, #tradesPanel.active {
    display: flex;
  }

  .history-footer {
    flex-direction: column;
    gap: 8px;
    padding: 12px;
  }

  .history-pagination {
    justify-content: center;
    width: 100%;
  }

  .pnl-table {
    min-width: 900px;
  }

  .pnl-table th, .pnl-table td {
    white-space: nowrap;
    padding: 8px 6px;
    font-size: 11px;
  }
}

#historyPanel, #tradesPanel {
  flex-direction: column;
  height: 100%;
}

#historyPanel.active, #tradesPanel.active {
  display: flex;
}

.history-table-wrapper {
  flex: 1 1 0;
  width: 100%;
  min-height: 0;
  overflow: auto;
}

.history-table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
}

.history-table th {
  text-align: left;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  padding: 10px 8px;
  font-size: 11px;
  font-weight: 500;
}

.history-table td {
  color: var(--text);
  white-space: nowrap;
  border-bottom: 1px solid #ffffff08;
  padding: 10px 8px;
}

.history-table tbody tr:hover {
  background: #ffffff05;
}

.history-table .buy, .history-table .side-buy, .history-table td.buy {
  color: #2ecc71;
  font-weight: 600;
}

.history-table .sell, .history-table .side-sell, .history-table td.sell {
  color: #f6465d;
  font-weight: 600;
}

.status-badge {
  letter-spacing: .2px;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 500;
  display: inline-block;
}

.status-badge.filled {
  color: #2ecc71;
  background: #2ecc7114;
}

.status-badge.canceled {
  color: #f0b90b;
  background: #f0b90b14;
}

.status-badge.expired {
  color: #6c757d;
  background: #848e9c14;
}

.status-badge.rejected {
  color: #f6465d;
  background: #f6465d14;
}

.status-badge.open, .status-badge.new {
  color: #3498db;
  background: #3498db14;
}

.status-badge.partial {
  color: #9b59b6;
  background: #9b59b614;
}

.history-table .positive, .history-table .pnl-positive {
  color: #2ecc71;
  font-weight: 600;
}

.history-table .negative, .history-table .pnl-negative {
  color: #f6465d;
  font-weight: 600;
}

.history-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-card);
  min-height: 36px;
  color: var(--text-muted);
  flex-shrink: 0;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  font-size: 12px;
  display: flex;
}

.history-stats {
  color: var(--text-secondary);
}

.history-pagination {
  gap: 4px;
  display: flex;
}

.history-pagination button {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  cursor: pointer;
  border-radius: 4px;
  padding: 6px 12px;
  font-size: 11px;
  transition: all .15s;
}

.history-pagination button:hover:not(:disabled) {
  background: var(--bg-hover);
  border-color: var(--border-hover);
}

.history-pagination button:disabled {
  opacity: .5;
  cursor: not-allowed;
}

.history-pagination .page-info {
  color: var(--text-secondary);
  padding: 6px 12px;
  font-size: 11px;
}

#assetsPanel {
  flex-direction: column;
  height: 100%;
  display: none;
}

#assetsPanel.active {
  display: flex;
}

.assets-table {
  flex-direction: column;
  width: 100%;
  height: 100%;
  font-size: 12px;
  display: flex;
}

.assets-header {
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  grid-template-columns: 2fr 1.2fr 1fr 1.5fr;
  gap: 12px;
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 500;
  display: grid;
}

.assets-header .col-coin {
  text-align: left;
}

.assets-header .col-available, .assets-header .col-inorder, .assets-header .col-total {
  text-align: right;
}

.assets-body {
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
}

.assets-row {
  border-bottom: 1px solid #2b313980;
  grid-template-columns: 2fr 1.2fr 1fr 1.5fr;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  transition: background .15s;
  display: grid;
}

.assets-row:hover {
  background: var(--bg-hover);
}

.assets-row:last-child {
  border-bottom: none;
}

.assets-row .col-coin {
  align-items: center;
  gap: 10px;
  display: flex;
}

.coin-icon {
  background: var(--bg-input);
  border-radius: 50%;
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

.coin-info {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.coin-symbol {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.coin-name {
  color: var(--text-muted);
  font-size: 11px;
}

.assets-row .col-available, .assets-row .col-inorder, .assets-row .col-total {
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  display: flex;
}

.assets-row .amount {
  font-family: var(--mono);
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.assets-row .usd-value {
  color: var(--text-muted);
  font-size: 11px;
}

.assets-body::-webkit-scrollbar {
  width: 4px;
}

.assets-body::-webkit-scrollbar-track {
  background: none;
}

.assets-body::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.assets-body::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

.empty-assets {
  text-align: center;
  color: var(--text-muted);
  padding: 40px 20px;
  font-size: 13px;
}

.positions-row .size-cell {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.positions-row .size-qty {
  color: var(--text);
  font-weight: 600;
}

.positions-row .size-usdt {
  color: var(--text-muted);
  font-size: 11px;
}

.positions-row .pnl-cell {
  flex-direction: column;
  gap: 2px;
  display: flex;
}

.positions-row .pnl-main {
  align-items: center;
  gap: 6px;
  display: flex;
}

.positions-row .pnl-value {
  font-weight: 600;
}

.positions-row .pnl-percent {
  opacity: .85;
  font-size: 11px;
}

.positions-row .pnl-krw {
  color: var(--text-muted);
  font-size: 11px;
}

.pnl-table td.qty-cell {
  white-space: nowrap;
}

.pnl-table .qty-value {
  color: var(--text);
  font-weight: 500;
}

.pnl-table .qty-usdt {
  color: var(--text-muted);
  margin-left: 4px;
  font-size: 10px;
}

.pnl-table td.pnl-cell {
  white-space: nowrap;
}

.pnl-table .pnl-value {
  font-weight: 600;
}

.pnl-table .pnl-krw {
  color: var(--text-muted);
  font-size: 10px;
  display: block;
}

.pnl-table .qty-value {
  font-weight: 500;
}

.pnl-table .qty-usdt {
  color: var(--text-muted);
  font-size: 10px;
  display: block;
}

.toast-notification {
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text);
  z-index: 10000;
  opacity: 0;
  white-space: nowrap;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 13px;
  transition: all .3s;
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%)translateY(20px);
  box-shadow: 0 4px 12px #0006;
}

.toast-notification.show {
  opacity: 1;
  transform: translateX(-50%)translateY(0);
}

.toast-notification.toast-success {
  border-color: var(--green);
  background: #0ecb811a;
}

.toast-notification.toast-error {
  border-color: var(--red);
  background: #f6465d1a;
}

.toast-notification.toast-info {
  background: #1e88e51a;
  border-color: #1e88e5;
}

.toast-notification.toast-warning {
  border-color: var(--yellow);
  background: #f0b90b1a;
}

.connection-overlay {
  z-index: 10000;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: #0b0e11f2;
  justify-content: center;
  align-items: center;
  transition: opacity .3s;
  display: flex;
  position: fixed;
  inset: 0;
}

.connection-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

.connection-content {
  text-align: center;
  padding: 40px;
}

.connection-spinner {
  border: 3px solid var(--border);
  border-top-color: var(--yellow);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  margin: 0 auto 24px;
  animation: 1s linear infinite spin;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.connection-text {
  color: var(--text);
  margin-bottom: 8px;
  font-size: 18px;
  font-weight: 600;
}

.connection-subtext {
  color: var(--text-secondary);
  font-size: 13px;
}

.panel-table-wrapper {
  -webkit-overflow-scrolling: touch;
  width: 100%;
  overflow-x: auto;
}

.panel-table-wrapper::-webkit-scrollbar {
  height: 4px;
}

.panel-table-wrapper::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

.panel-table-wrapper::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

.panel-table-wrapper .positions-table {
  min-width: 600px;
}

@media (max-width: 768px) {
  .panel-table-wrapper .positions-table {
    min-width: 500px;
    font-size: 11px;
  }

  .panel-table-wrapper .positions-table th, .panel-table-wrapper .positions-table td {
    white-space: nowrap;
    padding: 8px 6px;
  }

  .pagination-container {
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    padding: 8px;
    display: flex;
  }

  .pagination-container button {
    padding: 6px 10px;
    font-size: 11px;
  }
}

.confirm-modal-overlay {
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  box-sizing: border-box;
  background: #0009;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
  padding: 16px;
  transition: opacity .15s, visibility .15s;
  display: flex;
  position: fixed;
  top: 0;
  left: 0;
}

.confirm-modal-overlay.show, .confirm-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.confirm-modal {
  background: #1e2329;
  border-radius: 8px;
  width: 320px;
  max-width: calc(100vw - 32px);
  transition: transform .15s;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%)scale(.95);
  box-shadow: 0 8px 32px #0006;
}

.confirm-modal-overlay.show .confirm-modal, .confirm-modal-overlay.active .confirm-modal {
  transform: translate(-50%, -50%)scale(1);
}

.confirm-modal-header {
  align-items: center;
  gap: 8px;
  padding: 16px 16px 0;
  display: flex;
}

.confirm-modal-icon {
  font-size: 18px;
  line-height: 1;
}

.confirm-modal-header h3 {
  color: #eaecef;
  margin: 0;
  font-size: 14px;
  font-weight: 500;
}

.confirm-modal-body {
  padding: 12px 16px 16px;
}

.confirm-modal-body p {
  color: #848e9c;
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

.confirm-modal-body p:first-child {
  color: #eaecef;
  margin-bottom: 4px;
}

.confirm-modal-warning {
  color: #f6465d !important;
  font-size: 12px !important;
}

.confirm-modal-actions {
  gap: 8px;
  padding: 0 16px 16px;
  display: flex;
}

.confirm-modal-btn {
  cursor: pointer;
  border: none;
  border-radius: 4px;
  flex: 1;
  min-height: 36px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  transition: all .1s;
}

.confirm-modal-btn.cancel {
  color: #eaecef;
  background: #2b3139;
}

.confirm-modal-btn.cancel:hover {
  background: #363c45;
}

.confirm-modal-btn.cancel:active {
  background: #2b3139;
}

.confirm-modal-btn.confirm {
  color: #fff;
  background: #f6465d;
}

.confirm-modal-btn.confirm:hover {
  background: #ff5a6e;
}

.confirm-modal-btn.confirm:active {
  background: #e5374e;
}

@media (max-width: 480px) {
  .confirm-modal {
    width: 280px;
  }

  .confirm-modal-header {
    padding: 14px 14px 0;
  }

  .confirm-modal-header h3 {
    font-size: 13px;
  }

  .confirm-modal-body {
    padding: 10px 14px 14px;
  }

  .confirm-modal-body p {
    font-size: 12px;
  }

  .confirm-modal-actions {
    gap: 8px;
    padding: 0 14px 14px;
  }

  .confirm-modal-btn {
    min-height: 32px;
    padding: 8px 12px;
    font-size: 12px;
  }
}

.close-modal-overlay {
  z-index: 10000;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  background: #000000b3;
  justify-content: center;
  align-items: center;
  display: none;
  position: fixed;
  inset: 0;
}

.close-modal-overlay.show {
  display: flex;
}

.close-modal {
  background: linear-gradient(#1a1d24 0%, #14171c 100%);
  border: 1px solid #ffffff0f;
  border-radius: 12px;
  flex-direction: column;
  width: 360px;
  max-width: 92vw;
  max-height: calc(100vh - 32px);
  animation: .3s ease-out closeModalSlide;
  display: flex;
  box-shadow: 0 32px 64px #00000080;
}

@keyframes closeModalSlide {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.close-modal-header {
  border-bottom: 1px solid #ffffff0f;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px 16px;
  display: flex;
}

.close-modal-title {
  align-items: center;
  gap: 12px;
  display: flex;
}

.close-modal-symbol {
  align-items: center;
  gap: 8px;
  display: flex;
}

.close-modal-symbol img {
  border-radius: 50%;
  width: 28px;
  height: 28px;
}

.close-modal-symbol-name {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
}

.close-modal-side {
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
}

.close-modal-side.long {
  color: #0ecb81;
  background: #0ecb8126;
}

.close-modal-side.short {
  color: #f6465d;
  background: #f6465d26;
}

.close-modal-close {
  color: #5e6673;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  padding: 4px;
  font-size: 24px;
  line-height: 1;
  transition: color .2s;
}

.close-modal-close:hover {
  color: #fff;
  background: #ffffff0d;
}

.close-modal-tabs {
  display: none;
}

.close-modal-body {
  padding: 20px 24px;
  overflow-y: auto;
}

.close-order-type {
  background: #0d1017;
  border-radius: 8px;
  margin-bottom: 20px;
  padding: 3px;
  display: flex;
}

.close-type-btn {
  color: #5e6673;
  cursor: pointer;
  background: none;
  border: none;
  border-radius: 6px;
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 500;
  transition: all .2s;
}

.close-type-btn:hover {
  color: #848e9c;
}

.close-type-btn.active {
  color: #fff;
  background: #252930;
}

.close-position-info {
  background: #0d1017;
  border-radius: 10px;
  margin-bottom: 20px;
  padding: 14px 16px;
}

.close-info-row {
  justify-content: space-between;
  align-items: center;
  padding: 6px 0;
  display: flex;
}

.close-info-row:first-child {
  padding-top: 0;
}

.close-info-row:last-child {
  padding-bottom: 0;
}

.close-info-label {
  color: #5e6673;
  font-size: 13px;
}

.close-info-value {
  color: #eaecef;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--mono);
}

.close-field-label {
  color: #5e6673;
  margin-bottom: 8px;
  font-size: 12px;
  display: block;
}

.close-input-wrap {
  background: #0d1017;
  border: 1px solid #252930;
  border-radius: 8px;
  align-items: center;
  height: 44px;
  padding: 0 12px;
  transition: border-color .2s;
  display: flex;
}

.close-input-wrap:focus-within {
  border-color: #f0b90b;
}

.close-input {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  font-family: var(--mono);
  background: none;
  border: none;
  outline: none;
  flex: 1;
  min-width: 0;
}

.close-input::placeholder {
  color: #3c4451;
}

.close-input-unit {
  color: #5e6673;
  margin-left: 8px;
  font-size: 12px;
}

.close-input-btns {
  gap: 2px;
  margin-left: 8px;
  display: flex;
}

.close-input-btn {
  color: #848e9c;
  cursor: pointer;
  background: #252930;
  border: none;
  border-radius: 4px;
  justify-content: center;
  align-items: center;
  width: 28px;
  height: 28px;
  font-size: 16px;
  transition: all .15s;
  display: flex;
}

.close-input-btn:hover {
  color: #fff;
  background: #3c4451;
}

.close-qty-section {
  margin-bottom: 20px;
}

.close-qty-header {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  display: flex;
}

.close-qty-label {
  color: #5e6673;
  font-size: 12px;
}

.close-qty-max {
  color: #848e9c;
  font-size: 12px;
}

.close-qty-max span {
  color: #f0b90b;
  cursor: pointer;
}

.close-percent-btns {
  gap: 8px;
  margin-bottom: 16px;
  display: flex;
}

.close-percent-btn {
  color: #9aa4b2;
  cursor: pointer;
  background: linear-gradient(#14171cf2 0%, #0d1017f2 100%);
  border: 1px solid #252a33;
  border-radius: 10px;
  flex: 1;
  padding: 10px 0;
  font-size: 13px;
  font-weight: 600;
  transition: transform .12s, border-color .12s, background .12s, color .12s, box-shadow .12s;
}

.close-percent-btn:hover {
  color: #eaecef;
  border-color: #39414f;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px #00000040;
}

.close-percent-btn.active {
  color: #0b0e11;
  background: linear-gradient(#f0b90bf2 0%, #d4a50af2 100%);
  border-color: #f0b90bcc;
  box-shadow: 0 10px 24px #f0b90b2e;
}

.close-slider-wrap {
  padding: 8px 0;
  position: relative;
}

.close-slider-container {
  align-items: center;
  height: 20px;
  display: flex;
  position: relative;
}

.close-slider-track, .close-slider-fill {
  display: none;
}

.close-slider {
  appearance: none;
  --pct: 100%;
  background-color: #0000;
  background-image: linear-gradient(90deg, #f0b90b 0%, #ffdd7a 100%), linear-gradient(90deg, #252930 0% 100%);
  background-size: var(--pct) 6px, 100% 6px;
  cursor: pointer;
  z-index: 2;
  background-position: 0, 0;
  background-repeat: no-repeat;
  border: 0;
  border-radius: 999px;
  outline: none;
  width: 100%;
  height: 20px;
  margin: 0;
  padding: 0;
  display: block;
  position: relative;
  box-shadow: inset 0 0 0 1px #2b313c, inset 0 1px 2px #0000008c;
}

.close-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  cursor: pointer;
  background: linear-gradient(#fff 0%, #f2f4f7 100%);
  border: 3px solid #f0b90b;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 2px 8px #0006;
}

.close-slider::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 12px #f0b90b66;
}

.close-slider::-webkit-slider-runnable-track {
  background: none;
  border-radius: 999px;
  height: 20px;
}

.close-slider::-moz-range-thumb {
  cursor: pointer;
  background: #fff;
  border: 3px solid #f0b90b;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  box-shadow: 0 2px 8px #0006;
}

.close-slider::-moz-range-track {
  background: none;
}

.close-slider-percent {
  color: #b6c0cd;
  text-align: left;
  background: #0d101799;
  border: 1px solid #2b313ce6;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
}

.close-slider-labels {
  display: none;
}

.close-pnl-box {
  background: #0d1017;
  border-radius: 10px;
  margin-bottom: 20px;
  padding: 16px;
}

.close-pnl-row {
  justify-content: space-between;
  align-items: center;
  display: flex;
}

.close-pnl-label {
  color: #5e6673;
  font-size: 13px;
}

.close-pnl-value {
  font-size: 16px;
  font-weight: 600;
  font-family: var(--mono);
}

.close-pnl-value.profit {
  color: #0ecb81;
}

.close-pnl-value.loss {
  color: #f6465d;
}

.close-pnl-fee {
  color: #3c4451;
  text-align: right;
  margin-top: 6px;
  font-size: 11px;
}

.close-modal-prices, .close-modal-info, .close-modal-options, .close-slider-labels span:first-child {
  display: none;
}

.close-modal-footer {
  flex-shrink: 0;
  gap: 12px;
  padding: 0 24px 24px;
  display: flex;
}

.close-modal-btn {
  cursor: pointer;
  border: none;
  border-radius: 8px;
  flex: 1;
  padding: 14px 0;
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
}

.close-modal-btn.confirm {
  color: #0b0e11;
  background: linear-gradient(#f0b90b 0%, #d4a50a 100%);
}

.close-modal-btn.confirm:hover {
  filter: brightness(1.1);
}

.close-modal-btn.confirm:active {
  filter: brightness(.95);
}

.close-modal-btn.cancel {
  color: #848e9c;
  background: #252930;
}

.close-modal-btn.cancel:hover {
  color: #eaecef;
  background: #3c4451;
}

@media (max-width: 480px) {
  .close-modal {
    border-radius: 16px 16px 0 0;
    width: 100%;
    max-width: 100%;
    max-height: calc(100vh - 12px);
    margin-top: auto;
  }

  .close-modal-overlay.show {
    align-items: flex-end;
  }

  .close-modal-header {
    padding: 16px 20px 14px;
  }

  .close-modal-body {
    padding: 16px 20px;
  }

  .close-modal-footer {
    padding: 0 20px calc(20px + env(safe-area-inset-bottom));
  }

  .close-percent-btn {
    padding: 9px 0;
    font-size: 12px;
  }
}

.close-modal-header {
  padding: 14px 18px 10px !important;
}

.close-modal-symbol img {
  width: 22px !important;
  height: 22px !important;
}

.close-modal-symbol-name {
  font-size: 14px !important;
}

.close-modal-side {
  padding: 2px 7px !important;
  font-size: 11px !important;
}

.close-modal-body {
  padding: 12px 18px !important;
}

.close-order-type {
  margin-bottom: 10px !important;
  padding: 2px !important;
}

.close-type-btn {
  padding: 7px 0 !important;
  font-size: 12px !important;
}

.close-modal-info, .close-modal-prices {
  margin-bottom: 10px !important;
  padding: 10px 12px !important;
}

.close-info-row, .close-price-row {
  padding: 3px 0 !important;
  font-size: 12px !important;
}

.close-modal-field {
  margin-bottom: 8px !important;
}

.close-field-label, .close-modal-field-label {
  margin-bottom: 5px !important;
  font-size: 11px !important;
}

.close-input, .close-price-input {
  padding: 8px 12px !important;
  font-size: 13px !important;
}

.close-adjust-btn {
  padding: 6px 9px !important;
  font-size: 13px !important;
}

.close-percent-buttons {
  gap: 6px !important;
  margin-bottom: 8px !important;
}

.close-percent-btn {
  padding: 7px 0 !important;
  font-size: 12px !important;
}

.close-slider-row {
  margin-bottom: 8px !important;
}

.close-slider-percent {
  padding: 3px 9px !important;
  font-size: 11px !important;
}

.close-modal-footer {
  gap: 8px !important;
  padding: 10px 18px 14px !important;
}

.close-pnl-box {
  margin-bottom: 10px !important;
  padding: 10px 12px !important;
}

.close-pnl-label {
  font-size: 12px !important;
}

.close-pnl-value {
  font-size: 15px !important;
}

.close-pnl-fee {
  margin-top: 4px !important;
  font-size: 10px !important;
}

.close-modal-footer .btn {
  padding: 10px 0 !important;
  font-size: 13px !important;
}

/*# sourceMappingURL=app_styles_future_0d.rnr8.css.map*/