/* =========================
   BMX — Trade (page)  (BORDERS ON)
   ========================= */

/* sayfa kabı */
.tr-page {
  display: flex; flex-direction: column;
  padding: 64px 20px 28px; max-width: 1400px; margin: 0 auto;
}

/* --------- Top ticker bar --------- */
.tr-ticker {
  display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 16px;
  align-items: center; padding: 10px 12px; border-radius: 10px;
  background: var(--block-bg); margin-top: 60px;
}
.tr-pair { display:flex; align-items:center; gap:10px; font-weight:700; }
.tr-pair .coin-icon { width: 24px; height: 24px; }
.tr-last { font-weight:700; }
.tr-last.green{ color: var(--color-bmx-green); }
.tr-last.red{ color: var(--color-bmx-red); }
.tr-stat { opacity:.9; font-size:14px; }
.tr-stat b { margin-right:6px; opacity:.8; }
.tr-tags { display:flex; gap:8px; }
.tr-tag { font-size:12px; border:1px solid var(--color-border-dark); padding:2px 8px; border-radius:999px; }

/* --------- 3 sütun grid --------- */
.tr-grid {
  display: grid;
  grid-template-columns: 360px minmax(540px,1fr) 340px;
  gap: 16px; /* kolonsal boşluk */
}

/* paneller */
.tr-panel {
  background: var(--block-bg); border-radius: 12px; overflow: hidden;
  color: var(--text-color);
}
.tr-panel__head {
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 12px; background: var(--block-bg);
  border-bottom: 1px solid var(--color-border-dark);
}
.tr-panel__title { margin:0; font-weight:600; font-size:20px; letter-spacing: 0.2px; }
.tr-panel__tools { display:flex; align-items:center; gap:8px; }

/* ORDER BOOK */
/* ===== Order Book (single table) ===== */
.tr-ob {
  --col-price: 1%;

}

.tr-ob__table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 13px;
}

.tr-ob__table col.col-price  { width: var(--col-price); }

/* Header tam-bleed arka plan */
.tr-ob__table thead { background: transparent; }
.tr-ob__table thead tr { position: relative; }
.tr-ob__table thead tr::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--block-bg); /* debug #635225 */
  z-index: 0;
}
.tr-ob__table thead th {
  position: relative; z-index: 1;
  padding: 6px 12px;
  font-size: 12px; font-weight: 600; opacity: .7; letter-spacing: .2px;
}

/* Hücreler ve hizalar (Price: sol, Amount: orta, Total: sağ) */
.tr-ob__table tbody td { padding: 6px 12px; font-variant-numeric: tabular-nums; }
.tr-ob__table thead th:nth-child(1), .tr-ob__table tbody td:nth-child(1) { text-align: center; }
.tr-ob__table thead th:nth-child(2), .tr-ob__table tbody td:nth-child(2) { text-align: center; white-space: nowrap; }
.tr-ob__table thead th:nth-child(3), .tr-ob__table tbody td:nth-child(3) { text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Derinlik overlay: tek tabloda hem ask hem bid satırlarına yönlü kaplama */
.tr-ob__table tbody tr { position: relative; }
.tr-ob__table tbody tr::before {
  content: ""; position: absolute; top: 0; bottom: 0;
  width: var(--w, 0%); pointer-events: none; opacity: .35; z-index: 0;
}
/* asks sağdan → sola, bids soldan → sağa */
.tr-ob__table tbody tr.row-ask::before { left: 0; right: auto; background: var(--color-bmx-red-a8); }
.tr-ob__table tbody tr.row-bid::before { left: 0; right: auto; background: var(--color-bmx-green-a8); }

/* Metin overlay üstünde kalsın */
.tr-ob__table tbody td { position: relative; z-index: 1; }

/* Fiyat renkleri */
.tr-price--ask { color: var(--color-bmx-red); }
.tr-price--bid { color: var(--color-bmx-green); }

/* Mid satırı (last + spread) */
.tr-ob__table tr.mid td {
  font-weight: 700; background: var(--block-bg);
  padding: 8px 12px;
}
.tr-ob__midline { display: flex; align-items: center; justify-content: space-between; 
  padding: 10px; font-size: 16px; }


/* CHART */
.tr-chart { height: 420px; position: relative; background: #0c0f16; }
.tr-chart__ph { position:absolute; inset:0; display:grid; place-items:center; opacity:.35; font-weight:700; letter-spacing:.5px; }

/* ---------- Tabs (genel) ---------- */
.tr-tabs { display:flex; gap:12px; padding:8px 12px; }
.tr-tabs--xs { gap:10px; padding:6px 12px; }
.tr-tabbtn {
  background:transparent; border:none; padding:8px 6px; font-weight:700; font-size: 15px; 
  cursor:pointer; border-bottom:2px solid transparent; color:var(--text-color);
}

.tr-tabbtn--xs { font-size:15px; padding:6px 4px; }
.tr-tabbtn.is-active { border-bottom-color: var(--color-bmx-darker); color: var(--color-bmx-darker); }

/* ---------- Order Entry ---------- */
.tr-order__panes { padding: 0 12px 12px; }
.tr-order__grid { display:grid; grid-template-columns: 1fr 1fr; gap:12px; }
.tr-card {
  background: var(--block-bg);
  border-radius:10px; padding:10px; display:flex; flex-direction:column; gap:8px;
}
.tr-card__title { font-weight:700; margin-bottom:4px; }
.tr-card__title.green { color: var(--color-bmx-green); }
.tr-card__title.red   { color: var(--color-bmx-red); }
.tr-card label { font-size:12px; opacity:.8; }

/* ---------- User Orders ---------- */
.tr-userorders { }
.tr-table { width:100%; border-collapse:collapse; font-size:13px; }
.tr-table thead { background: var(--block-bg); }
.tr-table thead th { border-bottom: 1px solid var(--color-border-dark); }
.tr-table th, .tr-table td { padding:8px 10px; }
.tr-table tbody tr { border-top: 1px solid var(--color-border-dark); }
.tr-empty { text-align:center; opacity:.7; padding:12px 6px; }

/* ---------- Right Sidebar ---------- */
.tr-side__list { padding:8px 12px; }
.tr-side .tr-panel__head { border-bottom: 1px solid var(--color-border-dark); }

/* Mini info rows */
.tr-minirow {
  display:flex; align-items:center; justify-content:space-between; gap:8px;
  padding:6px 8px; border-radius:8px; text-decoration:none; color:inherit;
  border: 1px solid transparent;
}

.tr-minirow__l { display:flex; align-items:center; gap:8px; }
.tr-minirow .coin-icon { width:20px; height:20px; }
.tr-minirow .coin-symbol { font-weight:700; }
.tr-minirow .coin-name { font-size:12px; color: var(--color-gray-old); }
.tr-minirow__r { text-align:right; }

/* Coin list (sağ panel) */
.tr-coinlist { padding:8px 12px 10px; }
.tr-coinlist__head {
  display:grid; grid-template-columns: 2fr 106px 48px; gap:8px;
  font-size:12px; opacity:.7; padding:4px 6px 8px;
  border-bottom: 1px solid var(--color-border-dark);
}
.tr-coinrow {
  display:grid; grid-template-columns: 2fr 80px 72px; gap:8px;
  align-items:center; padding:6px; border-radius:8px; text-decoration:none; color:inherit;
  border: 1px solid transparent;
}
.tr-coinrow + .tr-coinrow { margin-top: 6px; }
.tr-coinrow:hover { background: var(--block-bg); border-color: var(--color-bmx-shadow3); }
.tr-coinrow__l { display:flex; align-items:center; gap:8px; }
.tr-coinrow .coin-icon { width:20px; height:20px; }
.tr-coinrow .coin-symbol { font-weight:700; }
.tr-coinrow .coin-name { font-size:12px; color: var(--color-gray-old); }
.tr-coinrow .price { text-align:left; font-variant-numeric: tabular-nums; width:0%; }
.tr-coinrow .chg   { text-align:right; font-variant-numeric: tabular-nums; }
.tr-coinrow .chg.green { color: var(--color-bmx-green); }
.tr-coinrow .chg.red   { color: var(--color-bmx-red); }

/* Pane switch (genel) */
.tr-pane { display:none; }
.tr-pane.is-active { display:block; }

/* ===== Softer table headers + better alignment (Trade) ===== */

/* Hepsi: Order Book, Trades (sağ), User Orders */
.tr-ob thead th,
.tr-trades thead th,
.tr-userorders .table thead th {
  font-size: 12px;
  font-weight: 600;
  opacity: .7;
  letter-spacing: .2px;
  color: var(--text-color);
  padding: 6px 8px;
  text-transform: none;
}


/* MARKET TRADES */
.tr-trades__table{
   width:100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size:13px;
}


/* Header tam-bleed arka plan (Order Book ile tutarlı) */
.tr-trades__table thead { background: transparent; }
.tr-trades__table thead tr{ position: relative; }
.tr-trades__table thead tr::before{
  content:""; position:absolute; inset:0;
  background: var(--block-bg);
  z-index:0;
}
.tr-trades__table thead th{
  position:relative; z-index:1;
  font-size:12px; font-weight:600; opacity:.7; letter-spacing:.2px;
  color: var(--text-color);
  padding:6px 8px;
}

/* Hücreler + hizalar (Price/Amount/Time sağa hizalı idi; istersen değiştir) */
.tr-trades__table tbody td{ padding:8px 10px; font-variant-numeric: tabular-nums; }
.tr-trades__table thead th:nth-child(1),
.tr-trades__table tbody td:nth-child(1),
.tr-trades__table thead th:nth-child(2),
.tr-trades__table tbody td:nth-child(2),
.tr-trades__table thead th:nth-child(3),
.tr-trades__table tbody td:nth-child(3){ text-align:center; white-space:nowrap;  width:100%; }

/* Uzun saat formatlarında taşma güvenliği */
.tr-trades__table tbody td:nth-child(3){
  overflow:hidden; text-overflow:ellipsis;
}




/* USER ORDERS */
.tr-userorders .table td {
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
}


/* User Orders tabloları: sabit düzen + sütun genişlikleri */
.tr-userorders .table { table-layout: fixed; width:100%; }

/* Open Orders: Pair | Type | Price | Amount | Time */
#uo-open .table thead th:nth-child(1){ width:22%; text-align:left; }
#uo-open .table thead th:nth-child(2){ width:16%; text-align:left; }
#uo-open .table thead th:nth-child(3){ width:18%; text-align:right; }
#uo-open .table thead th:nth-child(4){ width:18%; text-align:right; }
#uo-open .table thead th:nth-child(5){ width:26%; text-align:right; }
#uo-open .table tbody td:nth-child(1),
#uo-open .table tbody td:nth-child(2){ text-align:left; }
#uo-open .table tbody td:nth-child(3),
#uo-open .table tbody td:nth-child(4),
#uo-open .table tbody td:nth-child(5){ text-align:right; }

/* Order History: Pair | Type | Amount | Avg Price | Status | Time */
#uo-history .table thead th:nth-child(1){ width:18%; text-align:left; }
#uo-history .table thead th:nth-child(2){ width:16%; text-align:left; }
#uo-history .table thead th:nth-child(3){ width:14%; text-align:right; }
#uo-history .table thead th:nth-child(4){ width:16%; text-align:right; }
#uo-history .table thead th:nth-child(5){ width:12%; text-align:left; }
#uo-history .table thead th:nth-child(6){ width:24%; text-align:right; }
#uo-history .table tbody td:nth-child(1),
#uo-history .table tbody td:nth-child(2){ text-align:left; }
#uo-history .table tbody td:nth-child(3),
#uo-history .table tbody td:nth-child(4),
#uo-history .table tbody td:nth-child(6){ text-align:right; }
#uo-history .table tbody td:nth-child(5){ text-align:left; }

/* Trade History: Pair | Side | Amount | Price | Role | Filled | Fee | Time */
#uo-trade .table thead th:nth-child(1){ width:14%; text-align:left; }
#uo-trade .table thead th:nth-child(2){ width:10%; text-align:left; }
#uo-trade .table thead th:nth-child(3){ width:12%; text-align:right; }
#uo-trade .table thead th:nth-child(4){ width:14%; text-align:right; }
#uo-trade .table thead th:nth-child(5){ width:10%; text-align:left; }
#uo-trade .table thead th:nth-child(6){ width:12%; text-align:right; }
#uo-trade .table thead th:nth-child(7){ width:10%; text-align:right; }
#uo-trade .table thead th:nth-child(8){ width:18%; text-align:right; }
#uo-trade .table tbody td:nth-child(1),
#uo-trade .table tbody td:nth-child(2),
#uo-trade .table tbody td:nth-child(5){ text-align:left; }
#uo-trade .table tbody td:nth-child(3),
#uo-trade .table tbody td:nth-child(4),
#uo-trade .table tbody td:nth-child(6),
#uo-trade .table tbody td:nth-child(7),
#uo-trade .table tbody td:nth-child(8){ text-align:right; }



/* ===== Spot Mini ===== */
.tr-order-mini { display: none; }
.tr-order-mini .mini-switch{
  display:flex; gap:0; border:1px solid var(--color-border-dark);
  border-radius:10px; overflow:hidden; margin:10px 12px 8px;
}
.mini-switch__btn{
  flex:1; padding:10px 12px; border:0; background:transparent; cursor:pointer;
  font-weight:700; color:var(--text-color);
}
.mini-switch__btn.is-active{
  background: var(--color-bmx-dark);
  color: var(--text-color-negative);
}
.tr-order-mini .mini-form{ padding: 8px 12px 12px; }
.tr-order-mini .row{ display:flex; gap:8px; align-items:center; margin-top:8px; }
.tr-order-mini .row label{ width:64px; font-size:12px; opacity:.8; }
.tr-order-mini .js-mini-submit{ width:100%; margin-top:10px; }

/* Mini tabs patch */
.tr-order-mini .tr-mini-tabs { padding: 6px 12px; }
.tr-order-mini .tr-mini-tabs .tr-tabbtn { font-size: 14px; padding: 6px 4px; }
.tr-order-mini .tr-mini-tabs .tr-tabbtn.is-active {
  border-bottom-color: var(--color-bmx-darker);
  color: var(--color-bmx-darker);
}

/* Hidden helper for mini rows */
.is-hidden { display: none !important; }

/* Submit buton rengi side'a göre */
#mini-submit.btn-buy { background: var(--color-bmx-green); color: var(--text-color-negative); }
#mini-submit.btn-sell { background: var(--color-bmx-red);   color: var(--text-color-negative); }

.input-field[disabled] {
  opacity: .55;
  cursor: not-allowed;
  filter: grayscale(30%);
  
}

/* SM_patch1 */

.mini-type-tabs{
  display:block;                 /* önceki flex'i iptal */
  padding: 0;                    /* önceki padding varsa sıfırla */
  margin: 6px 0 0;
}

/* Eski tab butonları DOM'da kalsa da görünmesin (ek güvenlik) */
.mini-type-tabs .mini-type-btn:not([hidden]){
  display:none !important;
}

/* Headbar grid */
.mini-headbar{
  display:grid;
  grid-template-columns: 10fr 90fr;
  align-items:center;
  gap:22px;
  background: var(--block-bg);
}

/* Sol/sağ ikon butonları */
.mini-headbar-btn{
  display:flex; align-items:center; justify-content:center;
  width:100%; height:36px;
  background: var(--block-bg);
  border:1px solid var(--color-bmx-shadow3);
  border-radius:8px;
}
.mini-headbar-btn:hover{ background: rgba(255,255,255,.06); }
.mini-headbar-btn img{ width:18px; height:18px; }

/* Dropdown alanı */
.mini-headbar-select{ position:relative; height:36px; }
.mini-headbar-select select{
  appearance:none; -webkit-appearance:none; -moz-appearance:none;
  width:100%; height:100%;
  padding:0 30px 0 12px;                  /* sağda caret boşluğu */
  background: var(--block-bg);
  color: var(--text-color);
  border:1px solid var(--color-bmx-shadow3);
  border-radius:8px;
  font-weight:700;
}
.mini-headbar-select select:focus{
  outline:0;
  border-color: var(--color-bmx-darker, #2ec6a0);
  box-shadow: 0 0 0 2px rgba(46,198,160,.15);
}

/* Sağdaki caret görseli */
.mini-select-caret{
  position:absolute; right:10px; top:50%; transform:translateY(-50%);
  width:14px; height:14px; pointer-events:none; opacity:.75;
}

/* Buy/Sell switch ile aralığı koru */
.mini-side-switch{ margin:10px 0 8px; }

/* SM_patch1_end */
/* SM_patch2*/
.mini-native-hidden{
  position:absolute !important;
  inset:auto auto auto auto;
  width:1px;height:1px;border:0;padding:0;clip:rect(0 0 0 0);
  overflow:hidden;white-space:nowrap;
}

/* trigger (kapalı görünüm) */
.mini-dd-trigger{
  display:flex; align-items:center; justify-content:space-between;
  width:100%; height:36px; padding:0 12px 0 12px; gap:8px;
  background: var(--dd-bg, var(--block-bg));
  color: var(--dd-fg, var(--text-color));
  border:1px solid var(--dd-border, var(--color-bmx-shadow3));
  border-radius:10px;
}
.mini-dd-trigger:focus-visible{
  outline:0;
  border-color: var(--dd-accent, #ff7a00);
  box-shadow: 0 0 0 6px rgba(255,122,0,.18);
}

/* menü */
.mini-dd-menu{
  position:absolute; left:0; right:0; top: calc(100% + 6px);
  background: var(--dd-bg, var(--block-bg));
  color: var(--dd-fg, var(--text-color));
  border:1px solid var(--dd-border, var(--color-bmx-shadow3));
  border-radius:12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.25), 0 0 0 6px rgba(255,122,0,.08);
  list-style:none; margin:0; padding:8px 6px;
  display:none; z-index: 50;
}
.mini-dd-menu[aria-open="true"]{ display:block; }

.mini-dd-menu li{
  padding:10px 12px; border-radius:8px; cursor:pointer;
}
.mini-dd-menu li[aria-selected="true"],
.mini-dd-menu li:hover{
  background: rgba(255,122,0,.12);
}

/* caret */
.mini-select-caret{ width:14px; height:14px; opacity:.75; pointer-events:none; }
/* SM_patch2_end */

/* menünün taşmasını engelleme */
.mini-headbar,
.mini-type-tabs,
.tr-panel,
.tr-panel__body {
  overflow: visible;
}

/* menüyü üstte tut */
.mini-headbar-select { position: relative; z-index: 200; }

/* menünün kendisi zaten absolute; gerekirse z-index artır */
.mini-dd-menu { z-index: 300; }

/* ========= GLOBAL / HER BREAKPOINT ========= */

/* sayfa kabı */
.tr-page{
  padding: 64px 20px 28px;
  max-width: 1800px;
  margin: 0 auto;
}

/* paneller dikey esnesin (başlık sabit, içerik akışkan) */
.tr-panel{ display:flex; flex-direction:column; background:var(--block-bg); border-radius:12px; color:var(--text-color); overflow:hidden; }
.tr-panel__head{ flex:0 0 auto; display:flex; align-items:center; justify-content:space-between; padding:10px 12px; border-bottom:1px solid var(--color-border-dark); }

/* grid çocuklarının fr ile daralabilmesi için */
.tr-grid > *{ min-height:0; }

/* içerik blokları satırın kalanını kullansın; gerektiğinde scroll */

.tr-chart {  flex:1 1 auto; min-height:0; overflow:auto; }
.tr-chart-body {  flex:1 1 auto; min-height:0; overflow:auto; }
.tr-depth-body {  flex:1 1 auto; min-height:0; overflow:auto; }
.tr-info-body {  flex:1 1 auto; min-height:0; overflow:auto; }
.tr-trades-body {  flex:1 1 auto; min-height:0; overflow:auto; }
.tr-search-body { min-height:0; overflow:auto; align-content: start; padding: 14px 8px 0;}


/* ticker üst boşluk (sabit header çarpışmasını önler) */
.tr-ticker{ margin-top:60px; }

/* küçük tip ayarları */
.tr-empty{ text-align:center; opacity:.7; padding:12px 6px; }

/* info wrap konum ve katman */
.mini-info-wrap{ position: relative; z-index: 210; }

/* mini menü – default gizli */
.mini-info-menu{
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 220px;
  max-width: 280px;

  background: var(--dd-bg, var(--block-bg));
  color: var(--dd-fg, var(--text-color));
  border: 1px solid var(--dd-border, var(--color-bmx-shadow3));
  border-radius: 12px;
  box-shadow: 0 20px 40px rgba(0,0,0,.25), 0 0 0 6px rgba(255,122,0,.08);

  padding: 12px;
  display: none;
}

/* görünür */
.mini-info-menu[aria-open="true"]{ display: block; }


.mini-info-text{ margin: 0 0 8px; line-height: 1.35; }
.mini-info-link{
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid var(--dd-border, var(--color-bmx-shadow3));
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  color: var(--dd-fg, var(--text-color));
}
.mini-info-link:hover{ background: var(--color-bmx-shadow3); }


.mini-headbar,
.mini-type-tabs,
.tr-panel,
.tr-panel__body{ overflow: visible; }

/* DESKTOP / WEB   */
@media (min-width:1480px){
  .tr-grid{
    display:grid;
    gap:16px;
    justify-content:center;

    grid-template-columns:
      
       320px
       auto
       325px;

    grid-template-rows:
      auto 
      480px
      220px /*c1*/
      180px /*c2*/           
      auto             
     minmax(260px, auto);
                               

    grid-template-areas:
      "   ticker         ticker      ticker "
      "   orderbook      chart       search "
      "   orderbook      chart       trades "
      "   orderbook      spot        trades   "
      "   orderbook      spot        info "
      "   userorders   userorders   userorders ";
  }

  /* kapsayıcıları geçirgen bırakıyoruz ki alt paneller grid item olsun */
  .tr-left, .tr-mid, .tr-side{ display:contents; }

  /* area atamaları */
  .tr-ticker     { grid-area: ticker; }
  .tr-ob         { grid-area: orderbook; }
  .tr-chartpanel { grid-area: chart; }
  .tr-order      { grid-area: spot; }
  .tr-searchpanel{ grid-area: search; }
  .tr-trades     { grid-area: trades; }
  .tr-infopanel  { grid-area: info; }
  .tr-userorders {grid-area: userorders; margin-bottom: 16px;}

  /* paneller satırı doldursun; içerik gerektiğinde scroll etsin */
  .tr-panel{ display:flex; flex-direction:column; }
  .tr-panel__head{ flex:0 0 auto; }
  .tr-order-mini {display: none;}

.btn-buy, .btn-sell {
margin-top:20px;
margin-bottom: 10px;} 
}



/* tablet  */
@media (max-width: 1479px) and (min-width: 622px) {
  .tr-grid{
    display:grid;
    gap:12px;
    justify-content:center;

    /* Kolonlar: [sol spacer] [OB] [Chart/Spot] [Search/Trades/Info] [sağ spacer] */
    grid-template-columns:
      
     minmax(220px, auto) 
     minmax(220px, auto) 
       320px;

    /* Satırlar: yüksekliklerin aynen oranlı kopyası */
    grid-template-rows:
      auto 
    minmax(550px, auto)
      480px
    minmax(260px, auto);
   
    grid-template-areas:
      "ticker     ticker     ticker"
      "chart      chart      spotmini"
      "orderbook  trades     search"
      "userorders userorders userorders";
  }

  /* kapsayıcıları geçirgen bırakıyoruz ki alt paneller grid item olsun */
  .tr-left, .tr-mid, .tr-side{ display:contents; }

  /* area atamaları */
  .tr-ticker     { grid-area: ticker; }
  .tr-ob         { grid-area: orderbook; }
  .tr-chartpanel { grid-area: chart; }
  .tr-order      { grid-area: spot; }
  .tr-searchpanel{ grid-area: search; }
  .tr-trades     { grid-area: trades; }
  .tr-infopanel  { grid-area: info; }
  .tr-userorders {grid-area: userorders; margin-bottom: 16px;}
  .tr-order-mini {grid-area: spotmini}

  /* paneller satırı doldursun; içerik gerektiğinde scroll etsin */
  .tr-panel{ display:flex; flex-direction:column; }
  .tr-panel__head{ flex:0 0 auto; }
  .tr-order      { display: none; }
  .tr-infopanel   { display: none; }

.btn-buy, .btn-sell {
margin-top:20px;
margin-bottom: 10px;} 

.tr-search-body { min-height:0; overflow:auto; align-content: start; padding: 14px 8px 0;}


/* Buy/Sell segmented switch: sabit yükseklik */
.mini-side-switch{
  display:flex; gap:0;
  border:1px solid var(--color-border-dark);
  border-radius:10px; overflow:hidden;
  margin:10px 12px 8px;
}
.mini-side-btn{
  flex:1 1 0;
  height:44px; line-height:44px;   /* sabit yükseklik */
  padding:0 12px;                  /* düşey padding sıfırlandığı için zıplama yok */
  border:0; background:transparent;
  font-weight:700; color:var(--text-color); cursor:pointer;
}
.mini-side-btn.is-active{
  background: var(--color-bmx-dark);
  color: var(--text-color-negative);
}

/* Order type tabs */
.mini-type-tabs{ padding:6px 12px 0; }
.mini-type-btn{
  background:transparent; border:none; cursor:pointer;
  font-weight:700; padding:6px 4px; color:var(--text-color);
  border-bottom:2px solid transparent;
}
.mini-type-btn.is-active{
  border-bottom-color: var(--color-bmx-darker);
  color: var(--color-bmx-darker);
}

/* Form alanları */
.mini-form{ padding: 8px 12px 12px; }
.mini-row{ display:grid; grid-template-columns:1fr 5fr; align-items:center; gap:10px; margin-top:10px; }
.mini-row label{ font-size:12px; opacity:.8; }
.mini-form .input-field{ width:100%; }

.is-hidden{ display:none !important; }

/* Submit buton – yana taşmasın, sabit yükseklik */
#mini-submit{ width:100%; height:44px; margin-top:12px; border-radius:10px; }
#mini-submit.btn-buy{ background: var(--color-bmx-green); color: var(--text-color-negative); }
#mini-submit.btn-sell{ background: var(--color-bmx-red);   color: var(--text-color-negative); }

}



/* Mobil */
@media (max-width: 821px) {
  .tr-grid{
    display:grid;
    gap:12px;
    justify-content:center;

    /* Kolonlar: [sol spacer] [OB] [Chart/Spot] [Search/Trades/Info] [sağ spacer] */
    grid-template-columns:
      
    minmax(280px, auto)
    minmax(300px, auto); 
    

    /* Satırlar: yüksekliklerin aynen oranlı kopyası */
    grid-template-rows:
     
      auto
     minmax(560px, auto)
      480px
    minmax(260px, auto)
    minmax(260px, auto);  
   
    grid-template-areas:
      "ticker      ticker"
      "chart    chart"
      "orderbook    spotmini"
      "trades    trades"
      "userorders  userorders";
  }

  /* kapsayıcıları geçirgen bırakıyoruz ki alt paneller grid item olsun */
  .tr-left, .tr-mid, .tr-side{ display:contents; }

  /* area atamaları */
  .tr-ticker     { grid-area: ticker; }
  .tr-ob         { grid-area: orderbook; }
  .tr-chartpanel { grid-area: chart; }
  .tr-order      { grid-area: spot; }
  .tr-searchpanel{ grid-area: search; }
  .tr-trades     { grid-area: trades; }
  .tr-infopanel  { grid-area: info; }
  .tr-userorders {grid-area: userorders; margin-bottom: 16px;}
  .tr-order-mini {grid-area: spotmini}

  /* paneller satırı doldursun; içerik gerektiğinde scroll etsin */
  .tr-panel{ display:flex; flex-direction:column; }
  .tr-panel__head{ flex:0 0 auto; }
  .tr-order      { display: none; }
  .tr-infopanel   { display: none; }
  .tr-searchpanel   { display: none; }

.btn-buy, .btn-sell {
margin-top:20px;
margin-bottom: 10px;} 

.tr-search-body { min-height:0; overflow:auto; align-content: start; padding: 14px 8px 0;}


/* Buy/Sell segmented switch: sabit yükseklik */
.mini-side-switch{
  display:flex; gap:0;
  border:1px solid var(--color-border-dark);
  border-radius:10px; overflow:hidden;
  margin:10px 12px 8px;
}
.mini-side-btn{
  flex:1 1 0;
  height:44px; line-height:44px;   /* sabit yükseklik */
  padding:0 12px;                  /* düşey padding sıfırlandığı için zıplama yok */
  border:0; background:transparent;
  font-weight:700; color:var(--text-color); cursor:pointer;
}
.mini-side-btn.is-active{
  background: var(--color-bmx-dark);
  color: var(--text-color-negative);
}

/* Order type tabs */
.mini-type-tabs{ display:flex; gap:8px; padding:6px 12px 0; }
.mini-type-btn{
  background:transparent; border:none; cursor:pointer;
  font-weight:700; padding:6px 4px; color:var(--text-color);
  border-bottom:2px solid transparent;
}
.mini-type-btn.is-active{
  border-bottom-color: var(--color-bmx-darker);
  color: var(--color-bmx-darker);
}

/* Form alanları */
.mini-form{ padding: 8px 12px 12px; }
.mini-row{ display:grid; grid-template-columns:1fr 5fr; align-items:center; gap:10px; margin-top:10px; }
.mini-row label{ font-size:12px; opacity:.8; }
.mini-form .input-field{ width:100%; }

.is-hidden{ display:none !important; }

/* Submit buton – yana taşmasın, sabit yükseklik */
#mini-submit{ width:100%; height:44px; margin-top:12px; border-radius:10px; }
#mini-submit.btn-buy{ background: var(--color-bmx-green); color: var(--text-color-negative); }
#mini-submit.btn-sell{ background: var(--color-bmx-red);   color: var(--text-color-negative); }

}