/*
 * FreiExchange Layout CSS
 * Extracted from Star Admin template (ui/css/style.css) — only used rules
 * Bootstrap 4.1.3 loaded separately via CDN
 * Generated: 2026-03-01
 */

/* === Core Styles === */
/* Reset Styles */
body {
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

.form-control,
.dataTables_wrapper select,
.form-control:focus,
.dataTables_wrapper select:focus {
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
}

.form-control,
.dataTables_wrapper select {
  box-shadow: none;
}

.form-control:focus,
.dataTables_wrapper select:focus {
  outline: 0;
  box-shadow: none;
}

a,
div,
h1,
h2,
h3,
h4,
h5,
p,
span {
  text-shadow: none;
}

[type=button]:focus,
a:active,
a:focus,
a:visited,
button::-moz-focus-inner,
input[type=button]::-moz-focus-inner,
input[type=file] > input[type=button]::-moz-focus-inner,
input[type=reset]::-moz-focus-inner,
input[type=submit]::-moz-focus-inner,
select::-moz-focus-inner {
  outline: 0;
}

.form-control:focus,
.dataTables_wrapper select:focus,
button:focus,
input,
input:focus,
select:focus,
textarea:focus {
  outline: none;
  outline-width: 0;
  outline-color: transparent;
  box-shadow: none;
  outline-style: none;
}

textarea {
  resize: none;
  overflow-x: hidden;
}

.btn,
.btn-group.open .dropdown-toggle,
.btn:active,
.btn:focus,
.btn:hover,
.btn:visited,
a,
a:active,
a:checked,
a:focus,
a:hover,
a:visited,
body,
button,
button:active,
button:hover,
button:visited,
div,
input,
input:active,
input:focus,
input:hover,
input:visited,
select,
select:active,
select:focus,
select:visited,
textarea,
textarea:active,
textarea:focus,
textarea:hover,
textarea:visited {
  -webkit-box-shadow: none;
  -moz-box-shadow: none;
  box-shadow: none;
}

.btn.active.focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn:active:focus,
.btn:focus,
button,
button:active,
button:checked,
button:focus,
button:hover,
button:visited {
  outline: 0;
  outline-offset: 0;
}

.dropdown-menu > li > a:active,
.dropdown-menu > li > a:focus,
.dropdown-menu > li > a:hover,
.dropdown-menu > li > a:visited {
  outline: 0;
}

a:focus,
input:focus {
  border-color: transparent;
  outline: none;
}

/* Typography */
:root,
body {
  font-size: 1rem;
  font-family: "Source Sans Pro", "Open Sans", sans-serif;
  font-weight: 400;
}

.h1,
.h2,
.h3,
.h4,
.h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: "Source Sans Pro", "Open Sans", sans-serif;
  line-height: 1;
  color: #a6aaaf;
}

/* Monospace for numeric data — applies to all tables site-wide */
.table td.text-center:not(.wallet-actions),
.table td.text-right:not(.wallet-actions),
.table-striped td.text-center:not(.wallet-actions),
.table-striped td.text-right:not(.wallet-actions),
.ob-row span {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

p {
  font-size: 0.875rem;
  font-weight: 400;
}

.h1,
h1 {
  font-size: 2.5rem;
  font-weight: 600;
}

.h2,
h2 {
  font-size: 1.875rem;
  font-weight: 600;
}

.h3,
h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

.h4,
h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

.h5,
h5 {
  font-size: 1.125rem;
  font-weight: 600;
}

.h6,
h6 {
  font-size: 1rem;
  font-weight: 600;
}

/* Card Title, Subtitle, Description */
.card-title {
  margin-bottom: 1.5rem;
  text-transform: uppercase;
  color: #a6aaaf;
  font-weight: 600;
  font-size: 1.125rem;
}

.card-subtitle {
  margin-top: 0.625rem;
  margin-bottom: 0.625rem;
}

/* Miscellanoeous */
body,
html {
  overflow-x: hidden;
  padding-right: 0;
}

*:-moz-full-screen,
*:-webkit-full-screen,
*:fullscreen *:-ms-fullscreen {
  overflow: auto;
}

.page-body-wrapper {
  background: #272b35;
  padding-left: 0;
  padding-right: 0;
}

.page-body-wrapper.full-page-wrapper {
  min-height: 100vh;
}

.page-body-wrapper.full-page-wrapper .content-wrapper {
  max-width: 100%;
}

@media (max-width: 991.98px) {
  .main-panel {
    padding-top: 60px;
  }
}

.content-wrapper {
  padding: 1.5rem 0;
  width: 100%;
  padding-right: 6px;
  padding-left: 6px;
  margin-right: auto;
  margin-left: auto;
  min-height: calc(100vh - 135px - 60px);
  -webkit-flex-grow: 1;
  flex-grow: 1;
}

@media (min-width: 576px) {
  .content-wrapper {
    max-width: 540px;
  }
}

@media (min-width: 768px) {
  .content-wrapper {
    max-width: 720px;
  }
}

@media (min-width: 992px) {
  .content-wrapper {
    max-width: 960px;
  }
}

@media (min-width: 1200px) {
  .content-wrapper {
    max-width: 1140px;
  }
}

.container-scroller {
  overflow: hidden;
}

pre {
  padding: 15px;
  font-size: 14px;
}

.fade.show, .fade.in {
  opacity: 1;
}

/* Horizontal Layout Navbar */
.navbar.horizontal-layout {
  font-family: "Source Sans Pro", "Open Sans", sans-serif;
}

.navbar.horizontal-layout .nav-top {
  background: #272b35;
  height: 60px;
  position: relative;
}

.navbar.horizontal-layout .nav-top .navbar-brand-wrapper {
  padding: 0 1rem 0 0;
}

@media (max-width: 767px) {
  .navbar.horizontal-layout .nav-top .navbar-brand-wrapper {
    padding: 0 1rem;
  }
}

.navbar.horizontal-layout .nav-top .navbar-brand-wrapper .navbar-brand {
  margin-right: 0;
  padding: 0.25rem 0;
}

.navbar.horizontal-layout .nav-top .navbar-brand-wrapper .navbar-brand:active, .navbar.horizontal-layout .nav-top .navbar-brand-wrapper .navbar-brand:focus, .navbar.horizontal-layout .nav-top .navbar-brand-wrapper .navbar-brand:hover {
  color: #424546;
}

.navbar.horizontal-layout .nav-top .navbar-brand-wrapper .navbar-brand img {
  max-width: 100%;
  height: 34px;
  margin: auto;
  vertical-align: middle;
}

.navbar.horizontal-layout .nav-top .navbar-brand-wrapper .brand-logo-mini {
  display: none;
}

.navbar.horizontal-layout .nav-top .navbar-brand-wrapper .brand-logo-mini img {
  width: auto;
  max-width: 100%;
  height: 28px;
  margin-left: 0;
}

@media (max-width: 767.98px) {
  .navbar.horizontal-layout .nav-top .navbar-brand-wrapper {
    width: auto;
  }
  .navbar.horizontal-layout .nav-top .navbar-brand-wrapper .brand-logo {
    display: none;
  }
  .navbar.horizontal-layout .nav-top .navbar-brand-wrapper .brand-logo-mini {
    display: block;
  }
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper {
  color: #fff;
  padding: 0 0 0 1rem;
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav {
  -webkit-flex-direction: row;
  flex-direction: row;
  -webkit-align-items: center;
  align-items: center;
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav .nav-item {
  margin-left: 1rem;
  margin-right: 1rem;
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav .nav-item:last-child {
  margin-right: 0;
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav .nav-item .nav-link {
  color: inherit;
  font-size: 0.875rem;
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav .nav-item .nav-link i {
  font-size: 1.25rem;
  vertical-align: middle;
  margin-right: .5rem;
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav.navbar-nav-right {
  margin-left: auto;
}

@media (max-width: 767.98px) {
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper {
    padding-left: 15px;
    padding-right: 15px;
  }
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav .nav-item {
    margin-left: 5px;
    margin-right: 5px;
  }
}

.navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-toggler {
  border: 0;
  color: inherit;
  font-size: 1.5rem;
  padding: 0;
  display: none;
}

@media (max-width: 991.98px) {
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-toggler {
    display: block;
    padding-right: 0;
  }
  /* Hide nav links on mobile — show via hamburger toggle */
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav-right {
    display: none;
  }
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav-right.nav-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #1a1e27;
    border-bottom: 1px solid #30363d;
    padding: 8px 0;
    z-index: 1000;
  }
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav-right.nav-open .nav-item {
    margin: 0;
  }
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav-right.nav-open .nav-item .nav-link {
    padding: 10px 20px;
    border-bottom: 1px solid #21262d;
  }
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav-right.nav-open .nav-item:last-child .nav-link {
    border-bottom: none;
  }
}



@media (max-width: 991px) {
  .navbar.horizontal-layout {
    position: fixed;
    z-index: 1030;
    top: 0;
    left: 0;
    right: 0;
  }
  .navbar.horizontal-layout .nav-top {
    border-bottom: 1px solid #343740;
  }
}

/* Footer */
.footer {
  background: #272b35;
  padding: 20px;
  transition: all 0.25s ease;
  -moz-transition: all 0.25s ease;
  -webkit-transition: all 0.25s ease;
  -ms-transition: all 0.25s ease;
  border-top: 1px solid #343740;
  font-size: calc(0.875rem - 0.05rem);
  font-family: "Source Sans Pro", "Open Sans", sans-serif;
  color: #8b949e;
}

.footer a {
  color: #58a6ff;
  font-size: inherit;
}
.footer a:hover {
  color: #79b8ff;
}

@media (max-width: 991px) {
  .footer {
    margin-left: 0;
    width: 100%;
  }
}

/* Utilities */
.grid-margin {
  margin-bottom: 12px;
}

@media (min-width: 576px) {
  .grid-margin-sm-0 {
    margin-bottom: 0;
  }
}

@media (min-width: 768px) {
  .grid-margin-md-0 {
    margin-bottom: 0;
  }
}

@media (min-width: 992px) {
  .grid-margin-lg-0 {
    margin-bottom: 0;
  }
}

@media (min-width: 1200px) {
  .grid-margin-xl-0 {
    margin-bottom: 0;
  }
}

.stretch-card {
  display: -webkit-flex;
  display: flex;
  -webkit-align-items: stretch;
  align-items: stretch;
  -webkit-justify-content: stretch;
  justify-content: stretch;
}

.stretch-card > .card {
  width: 100%;
  min-width: 100%;
}

/* Card Component */
.card {
  border: 0;
  background-color: #0d1117;
  color: #e6edf3;
  box-shadow: 0 2px 16px -11px rgba(0, 0, 0, 0.5);
  -webkit-box-shadow: 0 2px 16px -11px rgba(0, 0, 0, 0.5);
  -moz-box-shadow: 0 2px 16px -11px rgba(0, 0, 0, 0.5);
}

/* Dark table overrides */
.table {
  color: #e6edf3;
}
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03);
}
.table-striped tbody tr:nth-of-type(even) {
  background-color: transparent;
}
.table thead th {
  border-bottom-color: #30363d;
  color: #8b949e;
}
.table td, .table th {
  border-top-color: #30363d;
}
.table a {
  color: #58a6ff;
}

/* Dark form controls */
.form-control {
  background-color: #161b22;
  border-color: #30363d;
  color: #e6edf3;
}
.form-control:focus {
  background-color: #0d1117;
  border-color: #58a6ff;
  color: #e6edf3;
}

/* Dark modal */
.modal-content {
  background-color: #0d1117;
  border-color: #30363d;
  color: #e6edf3;
}
.modal-header {
  border-bottom-color: #30363d;
}
.modal-footer {
  border-top-color: #30363d;
}
.close {
  color: #e6edf3;
}

/* Dark buttons */
.btn-default {
  background-color: #21262d;
  border-color: #30363d;
  color: #e6edf3;
}

.card .card-body {
  padding: 30px 30px;
}

.card .card-body + .card-body {
  padding-top: 0;
}

.card .card-img-overlay {
  padding: 30px 30px;
}

/* Dark-themed disabled buttons */
button.disabled.btn,
.btn.disabled,
.btn:disabled {
  background: #21262d;
  border-color: #30363d;
  color: #484f58;
  opacity: 0.7;
  cursor: not-allowed;
}

/* btn-xs (not in Bootstrap 4) */
.btn-xs {
  padding: 3px 8px;
  font-size: 0.75rem;
  line-height: 1.5;
  border-radius: 3px;
}

/* Dark-themed active buttons */
.btn-success, .btn-success:hover, .btn-success:focus, .btn-success:active {
  background: #1a7f37;
  border-color: #1a7f37;
  color: #fff !important;
}
.btn-success:hover { background: #218c3e; border-color: #218c3e; }
.btn-danger, .btn-danger:hover, .btn-danger:focus, .btn-danger:active {
  background: #9e2a2a;
  border-color: #9e2a2a;
  color: #fff !important;
}
.btn-danger:hover { background: #b33030; border-color: #b33030; }
.btn-info, .btn-info:hover, .btn-info:focus, .btn-info:active {
  background: #1a6b9e;
  border-color: #1a6b9e;
  color: #fff !important;
}
.btn-info:hover { background: #1f7db8; border-color: #1f7db8; }
.btn-warning, .btn-warning:hover, .btn-warning:focus, .btn-warning:active {
  background: #8a6d2b;
  border-color: #8a6d2b;
  color: #fff !important;
}
.btn-warning:hover { background: #9e7d32; border-color: #9e7d32; }

/* Site Custom Styles */

/* Customize the scrollbars */

::-webkit-scrollbar {
      width: 10px;
} /* this targets the default scrollbar (compulsory) */

::-webkit-scrollbar-track {
      background-color: #f2f2f2;
} /* the new scrollbar will have a flat appearance with the set background color */

::-webkit-scrollbar-thumb {
      background-color:  #b3b3ff;
} /* this will style the thumb, ignoring the track */

::-webkit-scrollbar-button {
      background-color: #1a1a1a;
} /* optionally, you can style the top and the bottom buttons (left and right for horizontal bars) */

::-webkit-scrollbar-corner {
      background-color: black;
} /* if both the vertical and the horizontal bars appear, then perhaps the right bottom corner also needs to be styled */


i {
    display: inline-block;
    font-size: 20px;
    width: 20px;
    text-align: left;
    color: #246ec3;
}

a:hover {
    text-decoration: none;
}


:disabled {
  background-color: #252933;
}

input[type="text"]:disabled {
  background: #252933;
}

#buy_price, #buy_amount, #buy_total, #sell_price, #sell_total, #sell_amount {
    background-color: #FFF;
    color: #000;
    border: none;
}

.chart_coin {
    padding-right:5px;
}

.chart_coin_container{
    float:left;
    font-size:0.8rem;
    font-weight:bold;
    padding:5px;
    display:table-cell;
    vertical-align:middle;
}

.websocket{
    font-size:0.75rem;
    padding-right:5px;
    margin:auto;
    float:right;
}

.tv{
    float:left;
}

.depth_chart {
    float:left;
}

/* === Mobile Responsive === */
@media (max-width: 767px) {
  .card .card-body {
    padding: 16px 12px;
  }
  .card-title {
    font-size: 0.95rem;
    margin-bottom: 1rem;
  }
  .content-wrapper {
    padding: 0.75rem 0;
  }
  .table {
    font-size: 0.75rem;
  }
  .table td, .table th {
    padding: 0.4rem 0.3rem;
    white-space: nowrap;
  }
  .navbar.horizontal-layout .nav-top .navbar-menu-wrapper .navbar-nav .nav-link b {
    font-size: 0.75rem;
  }
  /* Hide DataTables responsive expand controls */
  table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child:before,
  table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child:before {
    display: none !important;
  }
  table.dataTable.dtr-inline.collapsed > tbody > tr > td:first-child,
  table.dataTable.dtr-inline.collapsed > tbody > tr > th:first-child {
    padding-left: 0.3rem !important;
  }
  /* Wallet action buttons — stack on mobile */
  .wallet-actions {
    white-space: normal !important;
  }
  .wallet-actions .btn {
    display: inline-block;
    margin: 1px 0;
    font-size: 0.65rem;
    padding: 2px 6px;
  }
  .wallet-in-orders {
    font-size: 0.65rem;
    color: #8b949e;
    white-space: nowrap;
  }
}

/* Toggle switch for Hide Zero Balances */
.hide-zero-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  user-select: none;
}
.hide-zero-toggle input {
  display: none;
}
.hide-zero-switch {
  width: 36px;
  height: 20px;
  background: #30363d;
  border-radius: 10px;
  position: relative;
  transition: background 0.2s;
}
.hide-zero-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  background: #8b949e;
  border-radius: 50%;
  transition: transform 0.2s, background 0.2s;
}
.hide-zero-toggle input:checked + .hide-zero-switch {
  background: #1a7f37;
}
.hide-zero-toggle input:checked + .hide-zero-switch::after {
  transform: translateX(16px);
  background: #fff;
}

/* Account page — horizontal tabs */
.account-tabs {
  display: flex;
  border-bottom: 1px solid #30363d;
  margin-bottom: 16px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.account-tabs::-webkit-scrollbar { display: none; }
.account-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: #8b949e;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.account-tab:hover { color: #e6edf3; text-decoration: none; border-bottom-color: #484f58; }
.account-tab.active { color: #58a6ff; border-bottom-color: #58a6ff; }
.account-tab i { font-size: 0.7rem; }
.account-tab-close { color: #f85149 !important; }
.account-tab-close.active { border-bottom-color: #f85149; }
.account-content { padding-top: 4px; }
@media (max-width: 767.98px) {
  .account-tab { padding: 6px 12px; font-size: 0.75rem; }
}

/* Market stats bar */
.market-stats {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.75rem;
}
.market-stats-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.market-stats-item img {
  width: 18px;
  height: 18px;
}
.market-stats-label {
  color: #8b949e;
  font-weight: 600;
}
@media (max-width: 767.98px) {
  .market-stats {
    gap: 10px;
    font-size: 0.7rem;
  }
}

/* Trading page — Buy/Sell form inputs (CoinEx/Binance style) */
.trade-form {
  padding: 10px 12px;
}
.trade-form-avail {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  margin-bottom: 10px;
  color: #8b949e;
}
.trade-form-avail-value {
  color: #e6edf3;
  cursor: pointer;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
.trade-form-avail-value:hover {
  color: #58a6ff;
}
.trade-form-avail-coin {
  color: #8b949e;
  font-weight: 600;
}
.trade-input-row {
  display: flex;
  align-items: center;
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 4px;
  margin-bottom: 8px;
  height: 36px;
}
.trade-input-row:focus-within {
  border-color: #58a6ff;
}
.trade-input-label {
  color: #8b949e;
  font-size: 0.75rem;
  padding: 0 10px;
  white-space: nowrap;
  user-select: none;
  min-width: 52px;
}
.trade-input,
.trade-input-row input[type="text"] {
  flex: 1;
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  color: #e6edf3 !important;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.875rem;
  padding: 0 4px;
  text-align: right;
  outline: none !important;
  min-width: 0;
  box-shadow: none !important;
  height: 100%;
}
.trade-input-unit {
  color: #8b949e;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0 10px;
  white-space: nowrap;
  user-select: none;
}
.trade-btn {
  margin-top: 4px;
  padding: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 4px;
}
.trade-msg {
  font-size: 0.75rem;
  margin-top: 4px;
  min-height: 1.2em;
}

/* Trade amount slider */
.trade-slider {
  padding: 2px 2px 0;
  margin-bottom: 8px;
}
.trade-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: #30363d;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}
.trade-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #58a6ff;
  border: 2px solid #0d1117;
  cursor: pointer;
}
.trade-range::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #58a6ff;
  border: 2px solid #0d1117;
  cursor: pointer;
}
.trade-slider-marks {
  display: flex;
  justify-content: space-between;
  padding: 0 2px;
  margin-top: 2px;
}
.trade-slider-mark {
  font-size: 0.65rem;
  color: #484f58;
  cursor: pointer;
  user-select: none;
}
.trade-slider-mark:hover {
  color: #8b949e;
}

/* Trading page — Buy/Sell tab toggle (mobile) */
.trade-tab-toggle {
  display: none;
}
@media (max-width: 767.98px) {
  .trade-tab-toggle {
    display: flex;
    margin-bottom: 8px;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #30363d;
  }
  .trade-tab-toggle .trade-tab-btn {
    flex: 1;
    padding: 8px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    background: #161b22;
    color: #8b949e;
    border: none;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
  }
  .trade-tab-toggle .trade-tab-btn.active-sell {
    background: #9e2a2a;
    color: #fff;
  }
  .trade-tab-toggle .trade-tab-btn.active-buy {
    background: #1a7f37;
    color: #fff;
  }
  .trade-form-sell,
  .trade-form-buy {
    display: none;
  }
  .trade-form-sell.trade-form-active,
  .trade-form-buy.trade-form-active {
    display: block;
  }
}

/* Trading page — order book mobile */
@media (max-width: 767.98px) {
  .orderbook-section .col-md-6 {
    margin-bottom: 8px;
  }
}

/* Trading page — history tabs */
.trade-history-tabs {
  display: flex;
  border-bottom: 1px solid #30363d;
  margin-bottom: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.trade-history-tabs::-webkit-scrollbar {
  display: none;
}
.trade-history-tab {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 0.8rem;
  color: #8b949e;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
}
.trade-history-tab:hover {
  color: #e6edf3;
}
.trade-history-tab.active {
  color: #58a6ff;
  border-bottom-color: #58a6ff;
}
@media (max-width: 767.98px) {
  .trade-history-tab {
    padding: 6px 12px;
    font-size: 0.75rem;
  }
  .thistory {
    font-size: 0.7rem !important;
  }
  .thistory th,
  .thistory td {
    padding: 4px 3px;
    white-space: nowrap;
  }
  #headTable {
    font-size: 0.7rem !important;
  }
  #headTable th,
  #headTable td {
    padding: 4px 3px;
    white-space: nowrap;
  }
}

/* Trading page mobile — chart */
@media (max-width: 767.98px) {
  #tv_chart_container {
    height: 250px !important;
  }
  .depth_chart {
    display: none !important;
  }
  .trade-form {
    padding: 6px 4px;
  }
}

/* Trade confirmation modals — dark theme */
#submit_buyform .modal-content,
#submit_sellform .modal-content {
  background-color: #161b22;
  border: 1px solid #30363d;
  color: #e6edf3;
}
#submit_buyform .modal-body,
#submit_sellform .modal-body {
  padding: 16px;
}
#submit_buyform .modal-body .table,
#submit_sellform .modal-body .table {
  color: #e6edf3;
  margin-bottom: 0;
}
#submit_buyform .modal-body .table th,
#submit_sellform .modal-body .table th {
  color: #8b949e;
  border-color: #30363d;
  font-weight: 600;
  font-size: 0.8rem;
}
#submit_buyform .modal-body .table td,
#submit_sellform .modal-body .table td {
  border-color: #30363d;
  font-size: 0.8rem;
}
#submit_buyform .modal-footer,
#submit_sellform .modal-footer {
  border-top: 1px solid #30363d;
  padding: 12px 16px;
  display: flex;
  gap: 8px;
}
#buy_fill_info,
#sell_fill_info {
  background: #0d1117;
  color: #8b949e;
  border: 1px solid #30363d;
}

/* ── Orderbook ── */
.ob-header {
  display: flex;
  padding: 4px 12px 4px 8px;
  font-size: 0.75rem;
  color: #484f58;
  font-weight: 600;
  text-transform: uppercase;
  border-bottom: 1px solid #21262d;
  gap: 8px;
}
.ob-header span { flex: 1; text-align: right; min-width: 0; }
.ob-header span:first-child { text-align: left; }
.ob-body {
  max-height: 220px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #30363d transparent;
}
.ob-body::-webkit-scrollbar { width: 4px; }
.ob-body::-webkit-scrollbar-thumb { background: #30363d; border-radius: 2px; }
.ob-body::-webkit-scrollbar-track { background: transparent; }
.ob-row {
  display: flex;
  align-items: center;
  padding: 2px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  position: relative;
  line-height: 1.6;
  gap: 8px;
}
.ob-row:hover { background: rgba(88, 166, 255, 0.08); }
.ob-row span { flex: 1; text-align: right; position: relative; z-index: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ob-row span:first-child { text-align: left; }
.ob-row .ob-depth {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  z-index: 0;
  pointer-events: none;
}
/* Sell orders (asks) — red */
.ob-sell .ob-row span:first-child { color: #f85149; }
.ob-sell .ob-row .ob-depth { background: rgba(248, 81, 73, 0.08); }
.ob-sell .ob-row:hover .ob-depth { background: rgba(248, 81, 73, 0.15); }
/* Buy orders (bids) — green, depth bar from left */
.ob-buy .ob-row span:first-child { color: #3fb950; }
.ob-buy .ob-row .ob-depth { background: rgba(63, 185, 80, 0.08); right: auto; left: 0; }
.ob-buy .ob-row:hover .ob-depth { background: rgba(63, 185, 80, 0.15); }
/* Amount & total columns */
.ob-row span.ob-amt,
.ob-row span.ob-total,
.ob-row span.ob-sum { color: #c9d1d9; }
/* Spread indicator between sell & buy */
.ob-spread {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 4px 8px;
  font-size: 0.75rem;
  color: #8b949e;
  border-top: 1px solid #21262d;
  border-bottom: 1px solid #21262d;
  background: #0d1117;
}
.ob-spread .ob-spread-price { color: #e6edf3; font-weight: 600; margin: 0 6px; }
/* Mobile — hide BTC column & improve readability */
@media (max-width: 767.98px) {
  .ob-col-total { display: none !important; }
  .ob-header .ob-hdr-total { display: none !important; }
  .ob-row {
    font-size: 0.7rem;
    padding: 2px 4px;
    gap: 6px;
  }
  .ob-row span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    min-width: 0;
  }
  .ob-header {
    font-size: 0.65rem;
    padding: 4px 4px;
    gap: 6px;
  }
}

/* =============================================
   Auth Pages (Login, Register, Forgot Password)
   ============================================= */
.auth-card {
  max-width: 440px;
  margin: 0 auto;
}
.auth-card-body {
  padding: 24px;
}
.auth-field {
  margin-bottom: 16px;
}
.auth-field label {
  display: block;
  color: #e6edf3;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.auth-field .form-control {
  background: #0d1117;
  border: 1px solid #30363d;
  border-radius: 6px;
  color: #e6edf3;
  font-size: 0.8rem;
  padding: 8px 12px;
  transition: border-color 0.15s;
}
.auth-field .form-control:focus {
  border-color: #58a6ff;
  background: #0d1117;
}
.auth-field .form-control::placeholder {
  color: #484f58;
}
.auth-hint {
  display: block;
  color: #6e7681;
  font-size: 0.75rem;
  margin-top: 4px;
}
.auth-submit {
  background: #238636;
  border-color: #238636;
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 10px 16px;
  border-radius: 6px;
  margin-top: 8px;
}
.auth-submit:hover {
  background: #2ea043;
  border-color: #2ea043;
}
.auth-alert {
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 0.8rem;
  margin-bottom: 16px;
  line-height: 1.4;
}
.auth-alert i {
  margin-right: 6px;
}
.auth-alert--danger {
  background: rgba(248, 81, 73, 0.1);
  border: 1px solid rgba(248, 81, 73, 0.3);
  color: #f85149;
}
.auth-alert--success {
  background: rgba(63, 185, 80, 0.1);
  border: 1px solid rgba(63, 185, 80, 0.3);
  color: #3fb950;
}
.auth-footer {
  text-align: center;
  color: #8b949e;
  font-size: 0.8rem;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid #30363d;
}
.auth-footer a {
  color: #58a6ff;
  text-decoration: none;
}
.auth-footer a:hover {
  text-decoration: underline;
}
@media (max-width: 576px) {
  .auth-card-body { padding: 16px; }
}
