/* PC trading light overrides.
   Active only when body is NOT theme-dark (mobile trading keeps dark).
   !important beats page <style> blocks that load after this file. */

body:not(.theme-dark) {
  --trade-v4-main-bgcolor: #ffffff;
  --trade-v4-secondary-bgcolor: #f8fafc;
  --trade-v4-secondary-color: #f1f5f9;
  --trade-v4-main-text: #0f172a;
  --trade-v4-secondary-text: #64748b;
  --trade-v4-tertiary-text: #94a3b8;
  --trade-v4-split-color: rgba(15, 23, 42, 0.08);
  --trade-v4-input-bgcolor: #ffffff;
  --trade-v4-input-border-color: #cbd5e1;
  --trade-v4-input-disabled-color: #e2e8f0;
  --trade-v4-input-focus-border-color: #c5a063;
  --trade-v4-button-bgcolor: #e2e8f0;
  --trade-v4-button-color: #0f172a;
  --trade-v4-button-active-bgcolor: #00193c;
  --trade-v4-button-active-color: #ffffff;
  --trade-v4-trade-tab-bgcolor: #ffffff;
}

/* Shell panels */
body:not(.theme-dark) .page-trade__left,
body:not(.theme-dark) .page-trade__main,
body:not(.theme-dark) .page-trade__right,
body:not(.theme-dark) .page-trade__bottom,
body:not(.theme-dark) #kline-chart {
  background: #ffffff !important;
  color: #0f172a !important;
}

body:not(.theme-dark) .page-trade__ticker,
body:not(.theme-dark) .trade-ticker {
  color: #0f172a !important;
}

/* Bottom tabs / tables / assets */
body:not(.theme-dark) .seconds-tabs .tabs button {
  color: #334155 !important;
}
body:not(.theme-dark) .seconds-tabs .tabs button:hover {
  background: rgba(197, 160, 99, 0.12) !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-tabs .tabs button.cur {
  background: rgba(197, 160, 99, 0.22) !important;
  color: #0f172a !important;
  font-weight: 600;
}

body:not(.theme-dark) .seconds-orders-table th,
body:not(.theme-dark) .seconds-orders-table td {
  border-bottom-color: #e2e8f0 !important;
  color: #334155 !important;
}
body:not(.theme-dark) .seconds-orders-table th {
  color: #475569 !important;
}
body:not(.theme-dark) .seconds-orders-table .no-data {
  color: #64748b !important;
}
body:not(.theme-dark) .seconds-orders-table .up { color: #0ecb81 !important; }
body:not(.theme-dark) .seconds-orders-table .down { color: #f23645 !important; }

body:not(.theme-dark) .seconds-orders-pagination a,
body:not(.theme-dark) .seconds-orders-pagination span {
  color: #334155 !important;
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
}
body:not(.theme-dark) .seconds-orders-pagination a:hover {
  color: #00193c !important;
  border-color: #0054cc !important;
  background: rgb(230, 240, 255) !important;
}
body:not(.theme-dark) .seconds-orders-pagination .pagination-num.current,
body:not(.theme-dark) .seconds-orders-pagination span.pagination-num.current {
  color: #ffffff !important;
  border-color: #00193c !important;
  background: #00193c !important;
}
body:not(.theme-dark) .seconds-orders-pagination .pagination-prev.disabled,
body:not(.theme-dark) .seconds-orders-pagination .pagination-next.disabled {
  color: #94a3b8 !important;
  border-color: #e2e8f0 !important;
}
body:not(.theme-dark) .seconds-orders-pagination .pagination-ellipsis {
  color: #64748b !important;
}

body:not(.theme-dark) .seconds-assets-card {
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-assets-card .no-data {
  color: #64748b !important;
}
body:not(.theme-dark) .seconds-assets-grid .seconds-asset-card {
  background: rgb(230, 240, 255) !important;
  color: #0f172a !important;
  border: 1px solid #c7d7f0 !important;
}
body:not(.theme-dark) .seconds-assets-grid .seconds-asset-card .card-name {
  color: #64748b !important;
}
body:not(.theme-dark) .seconds-assets-grid .seconds-asset-card .card-balance {
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-assets-grid .seconds-asset-card .card-frozen {
  color: #64748b !important;
}
body:not(.theme-dark) .seconds-assets-convert-row {
  border-top-color: #e2e8f0 !important;
}
body:not(.theme-dark) .seconds-assets-convert-row .btn-convert {
  background: #c5a063 !important;
  color: #0a0a0a !important;
}
body:not(.theme-dark) .seconds-assets-convert-row .btn-convert:hover {
  background: #b8914f !important;
}

body:not(.theme-dark) .seconds-login-tip {
  color: #334155 !important;
}
body:not(.theme-dark) .seconds-login-tip a {
  color: #0054cc !important;
}

/* Convert modal */
body:not(.theme-dark) #seconds-convert-backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}
body:not(.theme-dark) #seconds-convert-modal .bg-neutral-900,
body:not(.theme-dark) #seconds-convert-modal .bam-modal-panel {
  background: #ffffff !important;
  color: #0f172a !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
}
body:not(.theme-dark) #seconds-convert-modal select,
body:not(.theme-dark) #seconds-convert-modal input[type="number"] {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}
body:not(.theme-dark) #seconds-convert-result {
  color: #b45309 !important;
}
body:not(.theme-dark) #seconds-convert-cancel {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

/* Seconds order form */
body:not(.theme-dark) .seconds-order-form__label {
  color: #64748b !important;
}
body:not(.theme-dark) .seconds-order-form__balance {
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-order-form__card {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-order-form__card:hover {
  border-color: #94a3b8 !important;
  background: rgb(230, 240, 255) !important;
}
body:not(.theme-dark) .seconds-order-form__card.cur {
  border-color: #0ecb81 !important;
  background: rgba(14, 203, 129, 0.1) !important;
  color: #0ecb81 !important;
}
body:not(.theme-dark) .seconds-order-form__card-sub {
  color: #64748b !important;
}
body:not(.theme-dark) .seconds-order-form__card.cur .seconds-order-form__card-sub {
  color: #0ecb81 !important;
}
body:not(.theme-dark) .seconds-order-form__input {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-order-form__input::placeholder {
  color: #94a3b8 !important;
}
body:not(.theme-dark) .seconds-order-form__fee-panel,
body:not(.theme-dark) .seconds-order-form__fee-row {
  color: #64748b !important;
}

/* Seconds settlement modal */
body:not(.theme-dark) .seconds-order-modal-backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}
body:not(.theme-dark) .seconds-order-modal-box {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-order-modal-close {
  color: #64748b !important;
}
body:not(.theme-dark) .seconds-order-modal-close:hover {
  color: #0f172a !important;
  background: #e2e8f0 !important;
}
body:not(.theme-dark) .seconds-order-modal-title,
body:not(.theme-dark) .seconds-order-circle-settling,
body:not(.theme-dark) .seconds-order-modal-info dt,
body:not(.theme-dark) .seconds-order-modal-info dd {
  color: #0f172a !important;
}
body:not(.theme-dark) .seconds-order-circle-bg {
  stroke: #cbd5e1 !important;
}
body:not(.theme-dark) .seconds-order-modal-close-row {
  border-top-color: #e2e8f0 !important;
}

/* Spot / shared trade panels */
body:not(.theme-dark) .spot-trade-panel,
body:not(.theme-dark) .perpetual-trade-panel {
  background: #ffffff !important;
}
body:not(.theme-dark) .spot-trade-dual {
  border-color: #e2e8f0 !important;
}
body:not(.theme-dark) .spot-trade-col--buy {
  background: linear-gradient(180deg, rgba(14, 203, 129, 0.08) 0%, #ffffff 48%) !important;
  border-right-color: #e2e8f0 !important;
}
body:not(.theme-dark) .spot-trade-col--sell {
  background: linear-gradient(180deg, rgba(242, 54, 69, 0.08) 0%, #ffffff 48%) !important;
}
@media (max-width: 900px) {
  body:not(.theme-dark) .spot-trade-col--buy {
    border-bottom-color: #e2e8f0 !important;
  }
}
body:not(.theme-dark) .spot-avail,
body:not(.theme-dark) .spot-total-line,
body:not(.theme-dark) .spot-slider-pct-live {
  color: #334155 !important;
}
body:not(.theme-dark) .spot-avail strong,
body:not(.theme-dark) .spot-total-line span {
  color: #0f172a !important;
}
body:not(.theme-dark) .spot-field-label,
body:not(.theme-dark) .spot-field--inline .spot-field-label,
body:not(.theme-dark) .spot-input-with-suffix .suffix,
body:not(.theme-dark) .spot-slider-hint,
body:not(.theme-dark) .spot-slider-marks,
body:not(.theme-dark) .spot-fee-line {
  color: #64748b !important;
}
body:not(.theme-dark) .spot-limit-only select.spot-limit-select,
body:not(.theme-dark) .spot-row-input,
body:not(.theme-dark) .spot-input-with-suffix {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .spot-row-input:read-only,
body:not(.theme-dark) .spot-input-with-suffix input,
body:not(.theme-dark) .spot-input-with-suffix input:read-only {
  color: #0f172a !important;
}
body:not(.theme-dark) .spot-row-input::placeholder,
body:not(.theme-dark) .spot-input-with-suffix input::placeholder {
  color: #94a3b8 !important;
}
body:not(.theme-dark) .spot-limit-price-refresh {
  border-left-color: #cbd5e1 !important;
  background: #f1f5f9 !important;
  color: #64748b !important;
}
body:not(.theme-dark) .spot-limit-price-refresh:hover {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .spot-slider {
  background: #e2e8f0 !important;
}
body:not(.theme-dark) .seconds-orders-table .spot-order-cancel-btn {
  border-color: rgba(242, 54, 69, 0.45) !important;
  background: #ffffff !important;
  color: #f23645 !important;
}
body:not(.theme-dark) .seconds-orders-table .spot-order-cancel-btn:hover:not(:disabled) {
  background: rgba(242, 54, 69, 0.08) !important;
}

/* Perpetual */
body:not(.theme-dark) .perpetual-leverage-row {
  border-bottom-color: #e2e8f0 !important;
}
body:not(.theme-dark) .perpetual-lots-stepper__btn {
  border-color: #cbd5e1 !important;
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .perpetual-lots-stepper__btn:hover {
  background: #e2e8f0 !important;
}
body:not(.theme-dark) .perpetual-lots-meta__line {
  color: #64748b !important;
}
body:not(.theme-dark) .perpetual-lots-meta__line--total {
  color: #334155 !important;
}
body:not(.theme-dark) .perpetual-holdings-table .spot-order-cancel-btn {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .perpetual-holdings-table .spot-order-cancel-btn:hover {
  background: rgb(230, 240, 255) !important;
}
body:not(.theme-dark) .perpetual-position-panel__btn:hover {
  background: rgba(197, 160, 99, 0.35) !important;
}

body:not(.theme-dark) .perpetual-holding-modal__backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}
body:not(.theme-dark) .perpetual-holding-modal__inner {
  background: #ffffff !important;
  border: 1px solid #e2e8f0;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.18);
  color: #0f172a !important;
}
body:not(.theme-dark) .perpetual-holding-modal__head {
  border-bottom-color: #e2e8f0 !important;
}
body:not(.theme-dark) .perpetual-holding-modal__title,
body:not(.theme-dark) .perpetual-holding-modal__close {
  color: #0f172a !important;
}
body:not(.theme-dark) .perpetual-holding-modal__status-wrap {
  color: #64748b !important;
}
body:not(.theme-dark) .perpetual-holding-modal__grid,
body:not(.theme-dark) .perpetual-history-modal__summary {
  background: rgb(230, 240, 255) !important;
  border-color: #c7d7f0 !important;
}
body:not(.theme-dark) .perpetual-holding-modal__grid dt {
  color: #64748b !important;
}
body:not(.theme-dark) .perpetual-holding-modal__grid dd {
  color: #0f172a !important;
}
body:not(.theme-dark) .perpetual-holding-modal__inner select.spot-limit-select,
body:not(.theme-dark) .perpetual-holding-modal__inner select.spot-limit-select option {
  border-color: #cbd5e1 !important;
  background: #ffffff !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .perpetual-history-modal__summary-label,
body:not(.theme-dark) .perpetual-history-modal__field-label,
body:not(.theme-dark) .perpetual-history-modal__grid dt {
  color: #64748b !important;
}
body:not(.theme-dark) .perpetual-history-modal__summary-pnl,
body:not(.theme-dark) .perpetual-history-modal__field-value,
body:not(.theme-dark) .perpetual-history-modal__grid dd {
  color: #0f172a !important;
}
body:not(.theme-dark) .perpetual-history-modal__summary-pnl.up { color: #0ecb81 !important; }
body:not(.theme-dark) .perpetual-history-modal__summary-pnl.down { color: #f23645 !important; }
body:not(.theme-dark) .perpetual-history-modal__trigger-note {
  background: #f8fafc !important;
  border-color: #e2e8f0 !important;
  color: #64748b !important;
}

/* Extra hard-coded dark leftovers from purged / mod panels */
body:not(.theme-dark) .mod-v2,
body:not(.theme-dark) .mod-v2 .body,
body:not(.theme-dark) .coin-switch-v2,
body:not(.theme-dark) .trade-market-panel,
body:not(.theme-dark) .trade-layout-group__order-books,
body:not(.theme-dark) .trade-layout-group__trades {
  background-color: #ffffff !important;
  color: #0f172a !important;
}

body:not(.theme-dark) .klinecharts-pro {
  color: #0f172a;
}

/* Seconds settlement fee row */
body:not(.theme-dark) .seconds-order-modal-fee-total-row,
body:not(.theme-dark) .seconds-order-modal-fee-total-row .seconds-order-modal-fee-left,
body:not(.theme-dark) .seconds-order-modal-fee-total-row .seconds-order-modal-fee-right,
body:not(.theme-dark) .seconds-order-modal-fee-total-row .seconds-order-modal-fee-val {
  color: #334155 !important;
}

/* ===== Mobile trading shell ===== */
body:not(.theme-dark) .page-trade-mobile {
  background: #ffffff !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .page-trade-mobile__head {
  background: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
}
body:not(.theme-dark) .page-trade-mobile__head-btn {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .page-trade-mobile__head-btn:active {
  background: #e2e8f0 !important;
}
body:not(.theme-dark) .page-trade-mobile__ticker-compact .ticker-symbol,
body:not(.theme-dark) .page-trade-mobile__ticker-compact .ticker-compact-row2 .val {
  color: #0f172a !important;
}
body:not(.theme-dark) .page-trade-mobile__ticker-compact .ticker-compact-row2 {
  color: #64748b !important;
}
body:not(.theme-dark) .page-trade-mobile__drawer {
  background: #ffffff !important;
  box-shadow: 2px 0 12px rgba(15, 23, 42, 0.12) !important;
  z-index: 201 !important;
}
body:not(.theme-dark) .page-trade-mobile__drawer-header {
  background: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .page-trade-mobile__drawer-header .body-small {
  color: #0f172a !important;
}
body:not(.theme-dark) .page-trade-mobile__drawer .page-trade__right .trade-layout-group__order-books,
body:not(.theme-dark) .page-trade-mobile__drawer .page-trade__right .trade-layout-group__order-books .trade-layout-group__box-content,
body:not(.theme-dark) .page-trade-mobile__drawer .page-trade__right .trade-layout-group__order-books .mod.order-books,
body:not(.theme-dark) .page-trade-mobile__drawer .page-trade__right .trade-layout-group__order-books .mod-body {
  background: #ffffff !important;
}
body:not(.theme-dark) .page-trade-mobile__backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
  z-index: 200 !important;
}
body:not(.theme-dark) .page-trade-mobile__periods {
  background: #ffffff !important;
  border-bottom-color: #e2e8f0 !important;
}
body:not(.theme-dark) .page-trade-mobile__periods button {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #334155 !important;
}
body:not(.theme-dark) .page-trade-mobile__periods button.cur {
  border-color: #0ecb81 !important;
  background: #0ecb81 !important;
  color: #ffffff !important;
  font-weight: 600;
}
body:not(.theme-dark) .page-trade-mobile .seconds-order-form__actions,
body:not(.theme-dark) .page-trade-mobile .spot-mobile-fixed-submit-wrap {
  background: #ffffff !important;
  border-top-color: #e2e8f0 !important;
  z-index: 30 !important;
}

/* Spot / perpetual mobile order sheet */
body:not(.theme-dark) .spot-order-mobile-backdrop {
  background: rgba(15, 23, 42, 0.45) !important;
}
body:not(.theme-dark) .spot-order-mobile-modal-inner {
  background: #ffffff !important;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.18) !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .spot-order-mobile-modal-head,
body:not(.theme-dark) .spot-order-mobile-modal-title,
body:not(.theme-dark) .spot-order-mobile-modal-close {
  color: #0f172a !important;
}
body:not(.theme-dark) .spot-mobile-mode-switch__btn {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #64748b !important;
}
body:not(.theme-dark) .spot-mobile-mode-switch__btn.cur {
  color: #0f172a !important;
  border-color: #0054cc !important;
  background: rgba(0, 84, 204, 0.1) !important;
}
body:not(.theme-dark) .spot-order-mobile-modal-inner #seconds-order-entry-quote {
  background: rgb(230, 240, 255) !important;
  border-color: #c7d7f0 !important;
}
body:not(.theme-dark) .spot-order-mobile-modal-inner .seconds-order-entry-quote__item dt {
  color: #64748b !important;
}
body:not(.theme-dark) .spot-order-mobile-modal-inner .seconds-order-entry-quote__item dd {
  color: #0f172a !important;
}
body:not(.theme-dark) .spot-order-mobile-modal-cancel {
  border-color: #cbd5e1 !important;
  background: #e2e8f0 !important;
  color: #0f172a !important;
}
body:not(.theme-dark) .page-trade-mobile .spot-mobile-side-toggle__btn {
  border-color: #cbd5e1 !important;
  background: #f8fafc !important;
  color: #64748b !important;
}
