/* ═══════════════════════════════════════════════════════════════
   KFOO AI — Mobile Trading UI v2 (Binance-style, matches www.html)
   Applies ONLY on mobile (max-width: 768px). Desktop is untouched.
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 768px) {

  /* Hide ALL existing UI on mobile — replaced by m2-app */
  body.has-m2 .top-nav,
  body.has-m2 .trading-container,
  body.has-m2 .mob-orders-bar,
  body.has-m2 .mob-action-bar,
  body.has-m2 .mob-sheet-overlay,
  body.has-m2 .pnl-share-overlay {
    display: none !important;
  }

  body.has-m2 {
    background: #12161c;
    color: #eaecef;
    font-family: system-ui, -apple-system, "Cairo", sans-serif;
    margin: 0;
    padding: 0 0 168px 0;   /* room for fixed footer */
    min-height: 100vh;
    overflow-x: hidden;
  }

  /* ── Theme tokens ── */
  .m2-app {
    --m2-bg:        #12161c;
    --m2-card:      #1e2329;
    --m2-gray:      #2b3139;
    --m2-border:    #2b3139;
    --m2-text:      #eaecef;
    --m2-muted:     #707a8a;
    --m2-green:     #00c087;
    --m2-red:       #f6465d;
    --m2-yellow:    #fcd535;

    display: flex;
    flex-direction: column;
    max-width: 480px;
    margin: 0 auto;
    border-left: 1px solid var(--m2-border);
    border-right: 1px solid var(--m2-border);
    background: var(--m2-bg);
    color: var(--m2-text);
    direction: rtl;
  }

  /* ── HEADER ── */
  .m2-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .m2-header-l { display: flex; align-items: center; gap: 10px; }
  .m2-burger {
    background: transparent; border: none; color: var(--m2-muted);
    padding: 4px; cursor: pointer; display:flex; align-items:center;
  }
  .m2-symbol-wrap { display: flex; align-items: center; gap: 6px; cursor: pointer; }
  .m2-symbol { font-weight: 700; font-size: 17px; color: var(--m2-text); }
  .m2-symbol-tag {
    font-size: 10px; background: var(--m2-gray); color: var(--m2-muted);
    padding: 2px 5px; border-radius: 3px;
  }
  .m2-symbol-arrow { color: var(--m2-muted); font-size: 12px; }
  .m2-header-r { display: flex; align-items: center; gap: 14px; }
  .m2-header-change { font-size: 13px; font-weight: 500; }
  .m2-header-change.up   { color: var(--m2-green); }
  .m2-header-change.down { color: var(--m2-red); }
  .m2-dots {
    background: transparent; border: none; color: var(--m2-text);
    cursor: pointer; padding: 4px;
  }

  /* ── MAIN: order-book + trade-form ── */
  .m2-main {
    display: flex;
    flex-direction: row;   /* with dir=rtl, first child renders on right */
    align-items: stretch;
    padding: 0;
  }

  /* OrderBook (right side in RTL = 40%) */
  .m2-ob {
    width: 40%;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 10px;
  }
  .m2-ob-funding {
    color: var(--m2-muted);
    line-height: 1.3;
    margin-bottom: 6px;
  }
  .m2-ob-funding .row {
    display: flex; justify-content: space-between;
  }
  .m2-ob-funding .row.val { color: #fff; }

  .m2-ob-head {
    display: flex; justify-content: space-between;
    color: var(--m2-muted); margin-bottom: 4px;
  }

  .m2-ob-rows { display: flex; flex-direction: column; gap: 0; }
  .m2-ob-row {
    position: relative;
    display: flex; align-items: center; justify-content: space-between;
    height: 20px;
    padding: 0 2px;
    overflow: hidden;
  }
  .m2-ob-row .bar {
    position: absolute; right: 0; top: 0; bottom: 0;
    z-index: 0;
  }
  .m2-ob-row.ask .bar { background: rgba(246, 70, 93, 0.15); }
  .m2-ob-row.bid .bar { background: rgba(0, 192, 135, 0.15); }
  .m2-ob-row .qty   { position: relative; z-index: 1; color: var(--m2-muted); }
  .m2-ob-row .price { position: relative; z-index: 1; }
  .m2-ob-row.ask .price { color: var(--m2-red); }
  .m2-ob-row.bid .price { color: var(--m2-green); }

  .m2-ob-mid {
    padding: 8px 0;
    text-align: center;
  }
  .m2-ob-mid .big   { font-size: 18px; font-weight: 700; }
  .m2-ob-mid .small { font-size: 10px; color: var(--m2-muted); margin-top: 2px; }
  .m2-ob-mid.up   .big { color: var(--m2-green); }
  .m2-ob-mid.down .big { color: var(--m2-red); }

  .m2-ob-sentiment {
    margin-top: 6px;
    display: flex; height: 4px; border-radius: 999px; overflow: hidden;
  }
  .m2-ob-sentiment .s-red   { background: var(--m2-red);   }
  .m2-ob-sentiment .s-green { background: var(--m2-green); }
  .m2-ob-sent-labels {
    display: flex; justify-content: space-between;
    font-size: 9px; color: var(--m2-muted); margin-top: 2px;
  }

  .m2-ob-precision {
    margin-top: 6px;
    display: flex; align-items: center; justify-content: space-between;
    background: var(--m2-gray);
    border-radius: 4px;
    padding: 5px 7px;
  }
  .m2-ob-precision .picker {
    display: flex; align-items: center; gap: 4px;
    color: var(--m2-muted); cursor: pointer;
  }
  .m2-ob-precision .grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    width: 12px; height: 12px;
  }
  .m2-ob-precision .grid > div { border-radius: 1px; }
  .m2-ob-precision .grid > div:nth-child(1),
  .m2-ob-precision .grid > div:nth-child(3) { background: var(--m2-red); }
  .m2-ob-precision .grid > div:nth-child(2),
  .m2-ob-precision .grid > div:nth-child(4) { background: var(--m2-green); }
  .m2-ob-precision .val { color: #fff; font-size: 11px; }

  /* TradeForm (left side in RTL = 60%) */
  .m2-form {
    width: 60%;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  /* Buy/Sell tabs */
  .m2-side-tabs {
    display: flex;
    background: var(--m2-gray);
    border-radius: 6px;
    overflow: hidden;
    height: 36px;
  }
  .m2-side-tab {
    flex: 1;
    background: transparent;
    border: none;
    color: var(--m2-muted);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
  }
  .m2-side-tab.active-buy  { background: var(--m2-green); color: #fff; }
  .m2-side-tab.active-sell { background: var(--m2-red);   color: #fff; }

  /* Mode selector row */
  .m2-mode-row {
    display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 4px;
  }
  .m2-mode-btn {
    background: var(--m2-gray); color: #fff; border: none;
    border-radius: 4px; padding: 5px 4px; font-size: 11px; text-align: center;
    cursor: pointer;
  }
  .m2-mode-btn:hover { filter: brightness(1.2); }

  /* Order type */
  .m2-order-type {
    background: var(--m2-gray); border-radius: 4px;
    padding: 9px 10px; display: flex; align-items: center; justify-content: space-between;
    font-size: 13px; cursor: pointer;
  }
  .m2-order-type .v { color: #fff; }
  .m2-order-type .ico { color: var(--m2-muted); font-size: 14px; }

  /* Price + Amount inputs */
  .m2-price-input,
  .m2-amount-row {
    background: var(--m2-gray); border-radius: 4px;
    padding: 6px 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px;
  }
  .m2-price-input.market { color: var(--m2-muted); font-style: italic; padding: 9px 8px; }
  .m2-price-input input {
    background: transparent; border: none; color: #fff;
    text-align: center; flex: 1; outline: none; font-size: 13px;
    direction: ltr;
  }

  .m2-amount-row { padding: 4px; }
  .m2-amount-row .pm-btn {
    width: 32px; height: 32px;
    background: transparent !important; border: none; color: var(--m2-muted);
    font-size: 20px; cursor: pointer;
  }
  .m2-amount-row .pm-btn:hover { color: #fff; }
  .m2-amount-input {
    flex: 1;
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    border: none !important;
    color: #fff !important;
    text-align: center;
    outline: none !important;
    box-shadow: none !important;
    font-size: 13px;
    direction: ltr;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  /* Remove spin buttons on number inputs */
  .m2-amount-input::-webkit-outer-spin-button,
  .m2-amount-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
  }
  /* Override Chrome/Edge autofill yellow/white background */
  .m2-amount-input:-webkit-autofill,
  .m2-amount-input:-webkit-autofill:hover,
  .m2-amount-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #fff !important;
    -webkit-box-shadow: 0 0 0 1000px var(--m2-gray) inset !important;
    transition: background-color 9999s ease-in-out 0s;
  }
  .m2-amount-input::placeholder { color: var(--m2-muted) !important; opacity: 1; }
  .m2-amount-suffix {
    color: var(--m2-muted); font-size: 11px; opacity: 0.7;
    padding-left: 4px;
  }

  /* Apply the same hygiene to the price input that replaces "سعر السوق" */
  #m2PriceInput {
    flex: 1; width: 100%;
    background: transparent !important;
    border: none !important;
    color: #fff !important;
    text-align: center;
    outline: none !important;
    box-shadow: none !important;
    font-size: 13px;
    direction: ltr;
    -webkit-appearance: none !important;
    appearance: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  #m2PriceInput::-webkit-outer-spin-button,
  #m2PriceInput::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
  }

  /* Percentage slider w/ diamonds */
  .m2-pct-slider {
    position: relative; padding: 6px 0;
  }
  .m2-pct-track {
    height: 2px; background: var(--m2-gray); border-radius: 999px;
    position: relative;
  }
  .m2-pct-fill {
    position: absolute; right: 0; top: 0; height: 100%;
    background: var(--m2-yellow); border-radius: 999px;
    width: 0%;
    transition: width 0.15s;
  }
  .m2-pct-dot {
    position: absolute; top: 50%;
    width: 9px; height: 9px;
    background: var(--m2-gray); border: 1px solid var(--m2-muted);
    transform: translate(50%, -50%) rotate(45deg);
    cursor: pointer;
  }
  .m2-pct-dot.active { background: var(--m2-yellow); border-color: var(--m2-yellow); }

  /* Available */
  .m2-available {
    display: flex; justify-content: space-between; font-size: 10px;
  }
  .m2-available .left { display: flex; align-items: center; gap: 4px; color: #fff; }
  .m2-available .right { color: var(--m2-muted); }

  /* Options */
  .m2-options {
    display: flex; flex-direction: column; gap: 4px;
    font-size: 12px; color: var(--m2-muted);
  }
  .m2-options label {
    display: flex; align-items: center; justify-content: flex-end; gap: 8px;
    cursor: pointer;
  }
  .m2-options input[type=checkbox] {
    width: 14px; height: 14px;
    accent-color: var(--m2-yellow);
    cursor: pointer;
  }

  /* SL/TP inputs (hidden by default) */
  .m2-sltp-box {
    background: var(--m2-gray); border-radius: 4px;
    padding: 8px; display: none;
    flex-direction: column; gap: 6px;
  }
  .m2-sltp-box.show { display: flex; }
  .m2-sltp-row { display: flex; gap: 6px; align-items: center; }
  .m2-sltp-row label {
    color: var(--m2-muted); font-size: 11px; min-width: 28px;
  }
  .m2-sltp-row input {
    flex: 1;
    background: var(--m2-bg); border: 1px solid var(--m2-border);
    color: #fff; border-radius: 4px;
    padding: 6px 8px; font-size: 12px;
    outline: none; direction: ltr; text-align: left;
  }

  /* Summary */
  .m2-summary {
    margin-top: 2px;
    display: flex; flex-direction: column; gap: 2px;
    font-size: 10px;
  }
  .m2-summary .row {
    display: flex; justify-content: space-between;
  }
  .m2-summary .row + .row {
    border-top: 1px dotted var(--m2-muted);
    padding-top: 2px; margin-top: 2px;
  }
  .m2-summary .label { color: var(--m2-muted); }
  .m2-summary .val   { color: #fff; }

  /* Action button */
  .m2-action-btn {
    margin-top: 6px;
    padding: 11px 0;
    border: none; border-radius: 6px;
    font-weight: 700; font-size: 14px;
    color: #fff; cursor: pointer;
    width: 100%;
  }
  .m2-action-btn.buy  { background: var(--m2-green); box-shadow: 0 4px 16px rgba(0,192,135,0.25); }
  .m2-action-btn.sell { background: var(--m2-red);   box-shadow: 0 4px 16px rgba(246,70,93,0.25); }
  .m2-action-btn:disabled { opacity: 0.5; cursor: not-allowed; }

  /* ── Positions/Orders/Bots tabs ── */
  .m2-positions {
    margin-top: 14px;
    border-top: 1px solid var(--m2-border);
    padding: 12px 14px;
  }
  .m2-pos-tabs {
    display: flex;
    border-bottom: 1px solid var(--m2-border);
    margin-bottom: 12px;
  }
  .m2-pos-tab {
    flex: 1;
    background: transparent; border: none;
    color: var(--m2-muted);
    font-size: 12px; font-weight: 500;
    padding: 8px 0;
    cursor: pointer;
    position: relative;
  }
  .m2-pos-tab.active {
    color: #fff;
  }
  .m2-pos-tab.active::after {
    content: '';
    position: absolute; bottom: -1px; left: 0; right: 0;
    height: 2px; background: var(--m2-yellow); border-radius: 2px 2px 0 0;
  }
  .m2-pos-empty {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    padding: 40px 0;
    opacity: 0.4;
  }
  .m2-pos-empty svg { width: 40px; height: 40px; color: var(--m2-muted); }
  .m2-pos-empty span { font-size: 11px; color: var(--m2-muted); margin-top: 6px; }

  .m2-pos-list { display: flex; flex-direction: column; gap: 8px; }
  .m2-pos-card {
    background: var(--m2-card); border: 1px solid var(--m2-border);
    border-radius: 6px; padding: 10px;
    font-size: 11px;
  }
  .m2-pos-card .head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 6px;
  }
  .m2-pos-card .sym { font-weight: 700; color: #fff; font-size: 13px; }
  .m2-pos-card .side { font-size: 10px; padding: 2px 6px; border-radius: 3px; }
  .m2-pos-card .side.long  { background: rgba(0,192,135,0.15); color: var(--m2-green); }
  .m2-pos-card .side.short { background: rgba(246,70,93,0.15); color: var(--m2-red); }
  .m2-pos-card .rows { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
  .m2-pos-card .rows .lbl { color: var(--m2-muted); }
  .m2-pos-card .rows .v { color: #fff; text-align: left; direction: ltr; }
  .m2-pos-card .pnl-pos { color: var(--m2-green); }
  .m2-pos-card .pnl-neg { color: var(--m2-red); }
  .m2-pos-close-btn {
    margin-top: 8px; width: 100%;
    background: var(--m2-gray); border: 1px solid var(--m2-border);
    color: #fff; border-radius: 4px;
    padding: 6px 0; font-size: 12px; cursor: pointer;
  }
  .m2-pos-close-btn:hover { background: var(--m2-red); border-color: var(--m2-red); }

  /* ── FOOTER ── */
  .m2-footer {
    position: fixed; bottom: 0; left: 0; right: 0;
    max-width: 480px; margin: 0 auto;
    z-index: 50;
    background: var(--m2-card);
    border-top: 1px solid var(--m2-border);
  }
  .m2-footer-chart {
    padding: 8px 14px;
    display: flex; align-items: center; justify-content: space-between;
    font-size: 10px; cursor: pointer;
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-footer-chart .l { display: flex; align-items: center; gap: 6px; }
  .m2-footer-chart .ico { display: inline-flex; align-items: center; }
  .m2-footer-tabs {
    padding: 8px 14px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 12px; color: var(--m2-muted);
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-footer-tabs .ft {
    display: flex; align-items: center; gap: 4px;
    cursor: pointer;
  }
  .m2-footer-tabs .ft.active {
    position: relative; color: #fff;
  }
  .m2-footer-tabs .ft.active::after {
    content: '';
    position: absolute; bottom: -8px; left: 0; right: 0;
    height: 2px; background: var(--m2-yellow); border-radius: 2px 2px 0 0;
  }

  .m2-footer-nav {
    padding: 8px 8px 22px 8px;
    display: flex; justify-content: space-around;
  }
  .m2-footer-nav a {
    text-decoration: none;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    color: var(--m2-muted);
    opacity: 0.6;
    font-size: 10px;
  }
  .m2-footer-nav a.active { color: #fff; opacity: 1; }
  .m2-footer-nav svg { width: 22px; height: 22px; }

  /* ── Chart icon button in header ── */
  .m2-chart-icon-btn {
    background: transparent; border: none;
    color: var(--m2-yellow);
    cursor: pointer; padding: 2px 4px;
    display: inline-flex; align-items: center;
  }
  .m2-chart-icon-btn:active { opacity: 0.7; }

  /* ── Chart drawer (fullscreen Binance-style) ── */
  .m2-chart-overlay {
    position: fixed !important; inset: 0 !important;
    background: var(--m2-bg, #12161c);
    z-index: 1300;
    display: none;
  }
  .m2-chart-overlay.open { display: flex; flex-direction: column; }
  .m2-chart-sheet {
    background: var(--m2-bg);
    width: 100%;
    height: 100vh;
    max-width: 480px;
    margin: 0 auto;
    display: flex; flex-direction: column;
    overflow: hidden;
  }

  /* Top bar */
  .m2-chart-topbar {
    display: grid;
    grid-template-columns: 40px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-chart-back {
    background: transparent; border: none; color: #fff;
    padding: 4px; cursor: pointer;
    display: inline-flex; align-items: center;
  }
  .m2-chart-symbol-wrap { text-align: center; cursor: pointer; }
  .m2-chart-sym-line {
    display: inline-flex; align-items: center; gap: 6px;
    justify-content: center;
  }
  .m2-chart-sym { color: #fff; font-weight: 800; font-size: 16px; }
  .m2-chart-sym-tag {
    background: var(--m2-gray); color: var(--m2-muted);
    font-size: 10px; padding: 2px 5px; border-radius: 3px;
  }
  .m2-chart-sym-arrow { color: var(--m2-muted); font-size: 11px; }
  .m2-chart-sym-sub { color: var(--m2-muted); font-size: 10px; margin-top: 2px; }
  .m2-chart-actions {
    display: flex; gap: 8px;
  }
  .m2-chart-ic {
    background: transparent; border: none; color: #fff;
    cursor: pointer; padding: 4px;
    display: inline-flex; align-items: center;
  }

  /* Price row */
  .m2-chart-price-row {
    display: flex; justify-content: space-between;
    padding: 10px 12px;
    gap: 12px;
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-chart-price-left { text-align: right; }
  .m2-chart-price-label { color: var(--m2-muted); font-size: 10px; }
  .m2-chart-price {
    color: var(--m2-green); font-size: 22px; font-weight: 800;
    margin-top: 2px; direction: ltr; text-align: right;
  }
  .m2-chart-price.down { color: var(--m2-red); }
  .m2-chart-price-meta {
    margin-top: 4px;
    display: flex; gap: 6px; align-items: center;
    flex-direction: row-reverse;
    font-size: 10px;
  }
  .m2-chart-change { color: var(--m2-green); font-weight: 700; direction: ltr; }
  .m2-chart-change.down { color: var(--m2-red); }
  .m2-chart-fair { color: var(--m2-muted); }
  .m2-chart-price-right {
    display: grid; grid-template-columns: 1fr; gap: 2px;
    font-size: 10px;
    align-content: center;
  }
  .m2-chart-stat {
    display: flex; justify-content: space-between; gap: 8px;
  }
  .m2-chart-stat .lbl { color: var(--m2-muted); }
  .m2-chart-stat .val { color: #fff; direction: ltr; }

  /* Timeframe bar */
  .m2-chart-tfbar {
    display: flex; padding: 8px 12px; gap: 12px;
    border-bottom: 1px solid var(--m2-border);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .m2-chart-tf-btn {
    background: transparent; border: none;
    color: var(--m2-muted);
    font-size: 13px; font-weight: 600;
    padding: 4px 6px; cursor: pointer;
    white-space: nowrap;
    position: relative;
  }
  .m2-chart-tf-btn.active {
    color: var(--m2-yellow);
  }
  .m2-chart-tf-btn.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -8px;
    height: 2px; background: var(--m2-yellow);
  }

  /* Chart body */
  .m2-chart-sheet-body {
    flex: 1 1 auto; min-height: 200px;
    max-height: 38vh;
    overflow: hidden;
    display: flex; flex-direction: column;
    background: #0b0e11;
  }
  body.m2-chart-open .chart-wrapper {
    display: block !important;
    height: 100% !important;
    width: 100% !important;
    border-radius: 0 !important;
  }

  /* Order book section */
  .m2-chart-ob-section {
    flex-shrink: 0;
    background: var(--m2-bg);
    border-top: 1px solid var(--m2-border);
    max-height: 38vh;
    overflow-y: auto;
  }
  .m2-chart-ob-tabs {
    display: flex; gap: 16px;
    padding: 8px 12px;
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-chart-ob-tab {
    background: transparent; border: none;
    color: var(--m2-muted);
    font-size: 13px; font-weight: 600;
    padding: 4px 0; cursor: pointer;
    position: relative;
  }
  .m2-chart-ob-tab.active { color: #fff; }
  .m2-chart-ob-tab.active::after {
    content: ''; position: absolute; left: 0; right: 0; bottom: -8px;
    height: 2px; background: var(--m2-yellow);
  }
  .m2-chart-ob-sentiment {
    padding: 8px 12px 4px;
  }
  .m2-chart-ob-sentiment .lbl {
    display: flex; justify-content: space-between;
    font-size: 11px; font-weight: 700;
    margin-bottom: 4px;
  }
  .m2-chart-ob-sentiment .lbl .r { color: var(--m2-red);   direction: ltr; }
  .m2-chart-ob-sentiment .lbl .g { color: var(--m2-green); direction: ltr; }
  .m2-chart-ob-sentiment .bar {
    display: flex; height: 4px; border-radius: 999px; overflow: hidden;
  }
  .m2-chart-ob-sentiment .bg { background: var(--m2-green); }
  .m2-chart-ob-sentiment .rd { background: var(--m2-red); }

  /* Header row: طلب | precision | عرض */
  .m2-chart-ob-headrow {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    padding: 6px 12px;
    font-size: 11px;
    color: var(--m2-muted);
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .m2-chart-ob-headrow .hl { color: var(--m2-muted); }
  .m2-chart-ob-headrow .hl:first-child { text-align: right; }
  .m2-chart-ob-headrow .hl:last-child  { text-align: left;  direction: ltr; }
  .m2-chart-ob-headrow .hr { text-align: center; }
  .m2-chart-ob-headrow .prec {
    background: var(--m2-gray);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
  }

  /* Ladder: each row shows 4 cells (bid qty, bid price, ask price, ask qty)
     with two background depth bars (bid grows from center→right, ask center→left) */
  .m2-chart-ob-ladder {
    padding: 0;
    font-size: 11px;
    overflow-y: auto;
    max-height: 30vh;
  }
  .m2-chart-ob-ladder-row {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    align-items: center;
    height: 22px;
    padding: 0 12px;
    overflow: hidden;
  }
  /* depth bars (positioned absolutely behind text) */
  .m2-chart-ob-ladder-row .bid-bar {
    position: absolute; top: 0; bottom: 0; right: 50%;
    background: rgba(0,192,135,0.18);
    z-index: 0;
  }
  .m2-chart-ob-ladder-row .ask-bar {
    position: absolute; top: 0; bottom: 0; left: 50%;
    background: rgba(246,70,93,0.18);
    z-index: 0;
  }
  .m2-chart-ob-ladder-row > span {
    position: relative; z-index: 1;
    direction: ltr;
  }
  .m2-chart-ob-ladder-row .bid-qty {
    color: var(--m2-muted);
    text-align: right;
    padding-right: 4px;
  }
  .m2-chart-ob-ladder-row .bid-price {
    color: var(--m2-green);
    font-weight: 600;
    text-align: right;
    padding-right: 4px;
  }
  .m2-chart-ob-ladder-row .ask-price {
    color: var(--m2-red);
    font-weight: 600;
    text-align: left;
    padding-left: 4px;
  }
  .m2-chart-ob-ladder-row .ask-qty {
    color: var(--m2-muted);
    text-align: left;
    padding-left: 4px;
  }

  /* Trades panel */
  .m2-chart-trades-head {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 8px 12px;
    color: var(--m2-muted);
    font-size: 11px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }
  .m2-chart-trades-head .t { text-align: right; }
  .m2-chart-trades-head .p { text-align: center; }
  .m2-chart-trades-head .q { text-align: left; direction: ltr; }
  .m2-chart-trades-rows {
    max-height: 30vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 11px;
  }
  .m2-chart-trade {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    padding: 4px 12px;
    height: 22px;
    align-items: center;
  }
  .m2-chart-trade .t {
    direction: ltr; color: var(--m2-muted);
    text-align: right; font-size: 10px;
  }
  .m2-chart-trade .p {
    direction: ltr; font-weight: 700;
    text-align: center;
  }
  .m2-chart-trade.buy  .p { color: var(--m2-green); }
  .m2-chart-trade.sell .p { color: var(--m2-red); }
  .m2-chart-trade .q {
    direction: ltr; color: #fff;
    text-align: left; font-size: 11px;
  }

  /* Sticky bottom action bar */
  .m2-chart-action-bar {
    flex-shrink: 0;
    display: grid; grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 10px 12px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    background: var(--m2-card);
    border-top: 1px solid var(--m2-border);
  }
  .m2-chart-action-bar button {
    padding: 12px 0;
    border: none; border-radius: 8px;
    font-weight: 800; font-size: 15px;
    color: #fff; cursor: pointer;
  }
  .m2-chart-buy  { background: var(--m2-green); box-shadow: 0 4px 16px rgba(0,192,135,0.25); }
  .m2-chart-sell { background: var(--m2-red);   box-shadow: 0 4px 16px rgba(246,70,93,0.25); }
  .m2-chart-buy:active, .m2-chart-sell:active { opacity: 0.85; }

  /* ── Leverage modal ── */
  .m2-lev-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 110;
    display: none;
    align-items: center; justify-content: center;
  }
  .m2-lev-overlay.open { display: flex; }
  .m2-lev-modal {
    background: var(--m2-card);
    border: 1px solid var(--m2-border);
    border-radius: 12px;
    width: 88%; max-width: 360px;
    padding: 18px;
  }
  .m2-lev-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
  }
  .m2-lev-head .ttl { font-weight: 700; color: #fff; font-size: 15px; }
  .m2-lev-head .x {
    background: transparent; border: none; color: #fff;
    font-size: 20px; cursor: pointer;
  }
  .m2-lev-val {
    text-align: center; font-size: 36px; font-weight: 900;
    color: var(--m2-yellow); margin-bottom: 12px;
  }
  .m2-lev-input {
    width: 100%;
    margin-bottom: 14px;
    accent-color: var(--m2-yellow);
  }
  .m2-lev-presets {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
    margin-bottom: 14px;
  }
  .m2-lev-presets button {
    background: var(--m2-gray); color: #fff; border: none;
    border-radius: 4px; padding: 8px 0; font-size: 12px; cursor: pointer;
  }
  .m2-lev-presets button.active {
    background: var(--m2-yellow); color: #000; font-weight: 700;
  }
  .m2-lev-confirm {
    width: 100%; padding: 10px; border: none; border-radius: 6px;
    background: var(--m2-yellow); color: #000; font-weight: 700;
    cursor: pointer;
  }

  /* ─────────────────────────────────────────────────────────────
     M2 ASSETS PAGE — Pro-Trade Dark theme
     Background: #0f1419, surfaces #1b2026, primary #fcd535
     Font: IBM Plex Sans, radius: 4px (rounded-sm)
     ───────────────────────────────────────────────────────────── */
  .m2-assets-overlay {
    position: fixed !important; inset: 0 !important;
    background: #0f1419;
    z-index: 1250;
    display: none;
    flex-direction: column;
    overflow-y: auto;
    font-family: "IBM Plex Sans", system-ui, -apple-system, "Cairo", sans-serif;
  }
  .m2-assets-overlay.open { display: flex; }
  .m2-assets-page {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    padding-bottom: 80px;
    color: #dee3eb;
  }

  .m2-assets-topbar {
    display: grid;
    grid-template-columns: 32px 1fr 32px;
    align-items: center;
    padding: 14px 16px;
  }
  .m2-assets-topbar .ttl {
    color: #dee3eb;
    text-align: center;
    font-size: 16px; font-weight: 600;
    letter-spacing: 0.01em;
  }
  .m2-assets-back {
    background: transparent; border: none; color: #dee3eb;
    cursor: pointer; padding: 4px;
    display: inline-flex; align-items: center; justify-content: center;
  }

  /* ── Wallet balance hero (replaces "Estimated total") ── */
  .m2-wallet-hero {
    padding: 8px 16px 20px;
  }
  .m2-wallet-hero-lbl {
    color: #848e9c;
    font-size: 12px; font-weight: 500;
    display: flex; align-items: center; gap: 6px;
    margin-bottom: 8px;
  }
  .m2-wallet-hero-lbl .eye { font-size: 14px; }
  .m2-wallet-hero-row {
    display: flex; align-items: baseline; gap: 8px;
    flex-direction: row-reverse;
  }
  .m2-wallet-hero-val {
    font-size: 30px; font-weight: 600;
    color: #dee3eb;
    line-height: 1;
    direction: ltr;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
  }
  .m2-wallet-hero-unit {
    color: #848e9c; font-size: 14px; font-weight: 500;
  }
  .m2-wallet-hero-sub {
    color: #848e9c; font-size: 12px;
    margin-top: 6px;
    direction: ltr;
  }
  .m2-wallet-hero-pnl {
    margin-top: 12px;
    display: flex; align-items: center; gap: 6px;
    flex-direction: row-reverse;
    font-size: 13px;
  }
  .m2-wallet-hero-pnl .lbl { color: #848e9c; }
  .m2-wallet-hero-pnl .v   { font-weight: 600; direction: ltr; color: #f6465d; }
  .m2-wallet-hero-pnl.up .v { color: #0ecb81; }

  /* ── Action row: deposit + win/loss stats ── */
  .m2-assets-actions {
    display: grid;
    grid-template-columns: 1.2fr 1fr 1fr;
    gap: 8px;
    padding: 0 16px 20px;
  }
  /* Variant with 2 columns only (no deposit button) */
  .m2-assets-actions.m2-assets-actions-2 {
    grid-template-columns: 1fr 1fr;
  }

  /* Section header for trades log */
  .m2-assets-section-head {
    padding: 0 16px 8px;
    color: #848e9c;
    font-size: 13px; font-weight: 600;
    text-align: right;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    margin-bottom: 8px;
  }
  .m2-assets-deposit {
    background: #fcd535; color: #000;
    border: none; border-radius: 4px;
    padding: 14px 12px;
    font-weight: 600; font-size: 14px;
    cursor: pointer;
    font-family: inherit;
  }
  .m2-assets-stat-card {
    background: #1b2026;
    border: 1px solid transparent;
    border-radius: 4px;
    padding: 10px 8px;
    text-align: center;
    cursor: pointer;
    transition: background 0.15s;
  }
  .m2-assets-stat-card:active { background: #2b3139; }
  .m2-assets-stat-card .v {
    color: #dee3eb; font-weight: 600;
    font-size: 18px;
    direction: ltr; display: block;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
  }
  .m2-assets-stat-card.win  .v { color: #0ecb81; }
  .m2-assets-stat-card.loss .v { color: #f6465d; }
  .m2-assets-stat-card .l {
    color: #848e9c; font-size: 11px; font-weight: 500;
    margin-top: 4px; display: block;
  }

  /* ── Tabs ── */
  .m2-assets-tabs {
    display: flex; gap: 24px;
    padding: 0 16px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    flex-direction: row-reverse;
    justify-content: flex-end;
  }
  .m2-assets-tab {
    background: transparent; border: none;
    color: #848e9c;
    font-weight: 500; font-size: 14px;
    padding: 12px 0; cursor: pointer;
    position: relative;
    font-family: inherit;
  }
  .m2-assets-tab.active { color: #dee3eb; font-weight: 600; }
  .m2-assets-tab.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 2px; background: #fcd535;
  }

  /* ── Futures account row (only wallet shown) ── */
  .m2-acct-row {
    margin: 16px 16px 0;
    padding: 16px 14px;
    background: #1b2026;
    border-radius: 4px;
    display: flex; justify-content: space-between; align-items: center;
  }
  .m2-acct-row-left  { text-align: left; }
  .m2-acct-row .name { color: #dee3eb; font-size: 14px; font-weight: 600; }
  .m2-acct-row .v {
    color: #dee3eb; font-size: 16px; font-weight: 600;
    direction: ltr;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
  }
  .m2-acct-row .sub { color: #848e9c; font-size: 11px; direction: ltr; margin-top: 3px; }
  .m2-acct-row .profit { color: #0ecb81; font-size: 12px; font-weight: 600; direction: ltr; margin-top: 3px; }
  .m2-acct-row .profit.loss { color: #f6465d; }

  /* ── Trades list (under tabs) ── */
  .m2-trades-section {
    padding: 16px 0 0;
  }
  .m2-trades-section-head {
    padding: 0 16px;
    color: #848e9c; font-size: 12px; font-weight: 500;
    margin-bottom: 8px;
    text-align: right;
  }
  .m2-trade-card {
    margin: 0 16px 8px;
    padding: 12px 14px;
    background: #1b2026;
    border-radius: 4px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px;
  }
  .m2-trade-card-head {
    display: flex; justify-content: space-between; align-items: center;
    grid-column: 1 / -1;
    margin-bottom: 4px;
  }
  .m2-trade-sym {
    color: #dee3eb; font-weight: 600; font-size: 14px;
    direction: ltr;
  }
  .m2-trade-side {
    font-size: 10px; font-weight: 600;
    padding: 2px 6px; border-radius: 2px;
  }
  .m2-trade-side.long  { background: rgba(14,203,129,0.15); color: #0ecb81; }
  .m2-trade-side.short { background: rgba(246,70,93,0.15); color: #f6465d; }
  .m2-trade-card .lbl  { color: #848e9c; font-size: 11px; }
  .m2-trade-card .val  { color: #dee3eb; font-size: 12px; direction: ltr; font-feature-settings: "tnum"; }
  .m2-trade-card .row {
    display: flex; justify-content: space-between; align-items: center;
    grid-column: 1 / -1;
  }
  .m2-trade-pnl {
    font-weight: 600; font-size: 14px;
    direction: ltr;
    font-feature-settings: "tnum";
    font-variant-numeric: tabular-nums;
  }
  .m2-trade-pnl.win  { color: #0ecb81; }
  .m2-trade-pnl.loss { color: #f6465d; }
  .m2-trade-dt {
    color: #848e9c; font-size: 11px;
    direction: ltr;
    display: flex; gap: 8px; align-items: baseline;
  }
  .m2-trade-dt .d { color: #848e9c; }
  .m2-trade-dt .t { color: #dee3eb; font-weight: 500; font-feature-settings: "tnum"; }

  .m2-trades-empty {
    padding: 40px 16px; text-align: center;
    color: #848e9c; font-size: 13px;
  }

  /* ── Toast (reuse simple) ── */
  .m2-toast {
    position: fixed; top: 70px; left: 50%; transform: translateX(-50%);
    background: var(--m2-card); border: 1px solid var(--m2-border);
    color: #fff; padding: 10px 18px; border-radius: 8px;
    font-size: 13px; z-index: 200;
    box-shadow: 0 4px 20px rgba(0,0,0,0.5);
  }

  /* ── Limit existing toasts: only the latest visible on mobile ── */
  body.has-m2 .toast:not(:last-of-type) { display: none !important; }
  body.has-m2 .toast {
    max-width: 86vw;
    left: 50% !important;
    transform: translateX(-50%) !important;
    right: auto !important;
    font-size: 12px !important;
  }

  /* ── M2 order type bottom sheet ── */
  .m2-otype-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1150;
    display: none;
    align-items: flex-end;
  }
  .m2-otype-overlay.open { display: flex; }
  .m2-otype-sheet {
    background: #1c2026;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
    overflow-y: auto;
    padding: 6px 0 24px;
    animation: m2OtypeIn 0.22s ease;
  }
  @keyframes m2OtypeIn {
    from { transform: translateY(40px); opacity: 0.5; }
    to   { transform: translateY(0);    opacity: 1; }
  }
  .m2-otype-handle {
    width: 36px; height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 8px auto 12px;
  }
  .m2-otype-head {
    padding: 4px 18px 14px;
    display: flex; align-items: center; justify-content: space-between;
  }
  .m2-otype-head .ttl {
    color: #fff; font-size: 17px; font-weight: 700;
    display: flex; align-items: center; gap: 6px;
  }
  .m2-otype-head .info {
    color: var(--m2-muted); font-size: 14px;
  }
  .m2-otype-list { display: flex; flex-direction: column; }
  .m2-otype-row {
    display: grid;
    grid-template-columns: 24px 1fr auto;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.03);
  }
  .m2-otype-row:active { background: rgba(255,255,255,0.04); }
  .m2-otype-row .check {
    color: var(--m2-yellow);
    font-size: 18px;
    opacity: 0;
    width: 20px; text-align: center;
  }
  .m2-otype-row.selected .check { opacity: 1; }
  .m2-otype-row .body { text-align: right; }
  .m2-otype-row .name {
    color: #fff;
    font-size: 15px; font-weight: 700;
    margin-bottom: 4px;
    display: flex; align-items: center; gap: 8px; justify-content: flex-end;
  }
  .m2-otype-row .name .soon {
    background: rgba(252,213,53,0.12);
    color: var(--m2-yellow);
    font-size: 9px; font-weight: 700;
    padding: 2px 5px; border-radius: 3px;
  }
  .m2-otype-row .desc {
    color: var(--m2-muted);
    font-size: 12px; line-height: 1.4;
  }
  .m2-otype-row .icon {
    color: var(--m2-muted);
    width: 26px; height: 26px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  .m2-otype-row.disabled {
    opacity: 0.55;
  }

  /* ── M2 own coin picker (fullscreen overlay) ── */
  .m2-coin-overlay {
    position: fixed; inset: 0;
    background: var(--m2-bg, #12161c);
    z-index: 1200;
    display: none;
    flex-direction: column;
  }
  .m2-coin-overlay.open { display: flex; }
  .m2-coin-head {
    padding: 12px 14px;
    display: flex; align-items: center; justify-content: space-between;
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-coin-head .ttl { font-weight: 700; color: #fff; font-size: 15px; }
  .m2-coin-head .x {
    background: transparent; border: none; color: #fff;
    font-size: 22px; cursor: pointer; padding: 0 6px;
  }
  .m2-coin-tabs {
    display: flex; padding: 0 14px; gap: 18px;
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-coin-tab {
    background: transparent; border: none;
    color: var(--m2-muted); font-size: 13px; font-weight: 600;
    padding: 10px 0; cursor: pointer;
    position: relative;
  }
  .m2-coin-tab.active { color: #fff; }
  .m2-coin-tab.active::after {
    content: ''; position: absolute; bottom: -1px; left: 0; right: 0;
    height: 2px; background: var(--m2-yellow);
  }
  .m2-coin-search-wrap {
    padding: 10px 14px;
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-coin-search-wrap input {
    width: 100%; box-sizing: border-box;
    background: var(--m2-gray); border: 1px solid var(--m2-border);
    color: #fff; border-radius: 8px;
    padding: 10px 12px; font-size: 13px;
    outline: none;
  }
  .m2-coin-sort {
    padding: 8px 14px;
    display: grid; grid-template-columns: 1.2fr 1fr 1fr;
    font-size: 11px; color: var(--m2-muted);
    border-bottom: 1px solid var(--m2-border);
  }
  .m2-coin-sort > span { cursor: pointer; }
  .m2-coin-sort .num { text-align: left; direction: ltr; }
  .m2-coin-list {
    flex: 1; overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .m2-coin-row {
    display: grid; grid-template-columns: 1.2fr 1fr 1fr;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    cursor: pointer;
    align-items: center;
  }
  .m2-coin-row:hover { background: rgba(255,255,255,0.03); }
  .m2-coin-row.active { background: rgba(252,213,53,0.08); }
  .m2-coin-row .name { display: flex; align-items: center; gap: 8px; }
  .m2-coin-row .name .base { color: #fff; font-weight: 600; font-size: 14px; }
  .m2-coin-row .name .quote { color: var(--m2-muted); font-size: 11px; }
  .m2-coin-row .price { color: #fff; font-size: 13px; text-align: left; direction: ltr; }
  .m2-coin-row .chg { font-size: 13px; text-align: left; direction: ltr; font-weight: 600; }
  .m2-coin-row .chg.up   { color: var(--m2-green); }
  .m2-coin-row .chg.down { color: var(--m2-red); }
  .m2-coin-empty {
    padding: 30px; text-align: center; color: var(--m2-muted); font-size: 13px;
  }

  /* ── Coin search dropdown (moved to body) ── */
  body.has-m2 #coinSearchDropdown {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    max-width: 480px !important;
    margin: 0 auto !important;
    height: 100% !important;
    background: var(--m2-bg, #12161c) !important;
    z-index: 1000 !important;
    display: none !important;
    flex-direction: column !important;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
    overflow: hidden !important;
    transform: none !important;
  }
  body.has-m2 #coinSearchDropdown.open {
    display: flex !important;
  }
  body.has-m2 #coinSearchDropdown .coin-search-header {
    padding: 12px 14px !important;
  }
  body.has-m2 #coinSearchDropdown .coin-search-list {
    flex: 1 !important;
    max-height: none !important;
    overflow-y: auto !important;
  }

  /* ── API key icon button in m2 header ── */
  .m2-api-btn {
    background: transparent; border: none;
    color: var(--m2-yellow);
    cursor: pointer; font-size: 16px;
    padding: 4px 6px;
    display: inline-flex; align-items: center; gap: 4px;
  }
  .m2-api-btn.connected { color: var(--m2-green); }
  .m2-api-btn .lbl { font-size: 10px; font-weight: 600; }

  /* ── API key modal (compact mobile-friendly) ── */
  .m2-api-overlay {
    position: fixed !important;
    top: 0 !important; left: 0 !important;
    right: 0 !important; bottom: 0 !important;
    background: rgba(0,0,0,0.7) !important;
    z-index: 9999 !important;
    display: none !important;
    padding: 0 !important;
    margin: 0 !important;
  }
  .m2-api-overlay.open {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .m2-api-modal {
    background: #1c2026 !important;
    border: 1px solid var(--m2-border) !important;
    border-radius: 12px !important;
    width: calc(100vw - 32px) !important;
    max-width: 320px !important;
    max-height: 86vh !important;
    overflow-y: auto !important;
    padding: 14px !important;
    box-sizing: border-box !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.6);
  }
  .m2-api-modal h3 {
    margin: 0 0 4px !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    text-align: right;
  }
  .m2-api-modal .desc {
    color: var(--m2-muted) !important;
    font-size: 11px !important;
    margin: 0 0 10px !important;
    line-height: 1.4 !important;
    text-align: right;
  }
  .m2-api-modal label {
    display: block !important;
    color: var(--m2-muted) !important;
    font-size: 11px !important;
    margin: 6px 0 3px !important;
    text-align: right;
  }
  .m2-api-modal input {
    width: 100% !important;
    background: #12161c !important;
    border: 1px solid var(--m2-border) !important;
    color: #fff !important;
    padding: 8px 10px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    direction: ltr !important;
    text-align: left !important;
    outline: none !important;
    box-sizing: border-box !important;
    font-family: system-ui, monospace !important;
  }
  .m2-api-modal .actions {
    display: flex !important;
    gap: 6px !important;
    margin-top: 12px !important;
    flex-direction: row-reverse;  /* primary action on right (RTL natural) */
  }
  .m2-api-modal .actions button {
    flex: 1 !important;
    padding: 8px 0 !important;
    border: none !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    font-size: 12px !important;
    cursor: pointer !important;
  }
  .m2-api-save       { background: #ffffff !important; color: #000 !important; }
  .m2-api-cancel     { background: var(--m2-gray)   !important; color: #fff !important; }
  .m2-api-disconnect { background: var(--m2-red)    !important; color: #fff !important; }
  .m2-api-status {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: rgba(0,192,135,0.1) !important;
    border: 1px solid rgba(0,192,135,0.3) !important;
    padding: 8px !important;
    border-radius: 6px !important;
    color: var(--m2-green) !important;
    font-size: 12px !important;
    margin-bottom: 10px !important;
  }
}

/* On desktop, completely hide v2 layout + all overlays */
@media (min-width: 769px) {
  .m2-app,
  .m2-footer,
  .m2-chart-overlay,
  .m2-lev-overlay,
  .m2-api-overlay,
  .m2-coin-overlay,
  .m2-otype-overlay,
  .m2-assets-overlay { display: none !important; }
}
