:root{
  color-scheme:light;
  --bg:#f7f8fc;
  --card:#fff;
  --line:#e7eaf2;
  --line-strong:#dde2ec;
  --text:#10162d;
  --muted:#7d86a2;
  --soft:#a3abc0;
  --purple:#6c3cff;
  --purple-2:#8458ff;
  --purple-soft:#f0ebff;
  --green:#0bbd83;
  --green-soft:#e6faf3;
  --red:#ff4057;
  --red-soft:#fff0f2;
  --blue:#2f80ed;
  --amber:#f59e0b;
  --radius:16px;
  --shadow:0 7px 22px rgba(34,49,91,.055);
  --safe:env(safe-area-inset-bottom,0px);
  --content:1040px
}
*{box-sizing:border-box}
html,
body{margin:0;min-width:0;min-height:100%;background:var(--bg);color:var(--text)}
html{scroll-behavior:smooth}
body{font:14px/1.35 Inter,-apple-system,BlinkMacSystemFont,"SF Pro Text","Segoe UI",sans-serif;-webkit-font-smoothing:antialiased;overflow-x:hidden}
button,
input,
select{font:inherit}
button,
a,
select{touch-action:manipulation}
button{cursor:pointer}
a{text-decoration:none;color:inherit}
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.positive{color:var(--green)!important}.negative{color:var(--red)!important}
:is(button,
a,
input,
select,
summary):focus-visible{outline:3px solid rgba(108,60,255,.18);outline-offset:2px}

.app-shell{min-height:100dvh}
.topbar{
  position:sticky;top:0;z-index:1000;height:62px;padding:0 max(18px,calc((100vw - var(--content))/2));
  display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.97);
  border-bottom:1px solid var(--line);backdrop-filter:blur(20px);-webkit-backdrop-filter:blur(20px)
}
.brand{display:flex;align-items:center;gap:9px}
.brand-mark{width:32px;height:32px;display:block;border-radius:9px;box-shadow:0 3px 10px rgba(26,36,67,.12)}
.brand-name{font-size:17px;font-weight:850;letter-spacing:-.45px}
.topbar-actions{display:flex;align-items:center;gap:5px}
.top-icon,
.plain-icon,
.back-btn,
.drawer-close{
  border:0;background:transparent;color:#435071;display:grid;place-items:center;padding:0
}
.top-icon{width:36px;height:36px;border-radius:10px}
.top-icon:hover,
.plain-icon:hover{background:#f4f2fb;color:var(--purple)}
.ui-icon{width:20px;height:20px;display:block;overflow:visible}
.top-icon .ui-icon{width:19px;height:19px}
.plain-icon .ui-icon{width:18px;height:18px}
.back-btn .ui-icon{width:22px;height:22px}
.desktop-nav{display:flex;gap:4px}
.desktop-nav a{padding:9px 12px;border-radius:10px;color:#727b98;font-size:11px;font-weight:800}
.desktop-nav a.is-active{background:var(--purple-soft);color:var(--purple)}

.page{width:min(100%,var(--content));margin:0 auto;padding:14px 18px 100px}
.view{display:none}.view.is-active{display:block}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow)}
.hidden-ohlc{display:none!important}

.market-topline{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:8px;margin-bottom:4px}
.back-btn{width:34px;height:40px;font-size:32px;line-height:1}
.pair-title{display:flex;align-items:center;gap:9px;min-width:0}
.coin-mark{width:38px;height:38px;flex:0 0 38px;border-radius:11px;overflow:hidden;background:#111a2b;display:grid;place-items:center}
.coin-mark img{width:100%;height:100%;display:block;object-fit:cover}
.coin-mark>span{display:none}
.pair-copy{display:flex;flex-direction:column;min-width:0}
#symbolSelect{
  appearance:none;-webkit-appearance:none;border:0;background:transparent;color:var(--text);padding:0 18px 0 0;max-width:165px;
  font-size:14px;font-weight:900;outline:0;
  background-image:linear-gradient(45deg,transparent 50%,#77809a 50%),linear-gradient(135deg,#77809a 50%,transparent 50%);
  background-position:calc(100% - 7px) 55%,calc(100% - 3px) 55%;background-size:4px 4px,4px 4px;background-repeat:no-repeat
}
.pair-copy small{margin-top:2px;color:#8891aa;font-size:8px}
.market-actions{display:flex;align-items:center;gap:2px}
.plain-icon{width:34px;height:34px;border-radius:9px;font-size:19px}

.market-price-block{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px;padding:4px 4px 9px}
.price-area{display:flex;align-items:center;gap:8px;min-width:0}
.price-area strong{font-size:29px;line-height:1;font-weight:900;letter-spacing:-1px;font-variant-numeric:tabular-nums}
.price-area span{display:inline-flex;align-items:center;min-height:26px;padding:0 8px;border-radius:7px;background:var(--green-soft);font-size:11px;font-weight:900}
.price-area span.negative{background:var(--red-soft)}
.ohlc-grid{display:grid;gap:3px;min-width:118px}
.ohlc-grid span{display:grid;grid-template-columns:auto auto;gap:7px;justify-content:space-between;align-items:center}
.ohlc-grid em{font-style:normal;color:#8d95ab;font-size:7px}
.ohlc-grid b{font-size:8px;color:#58617b}

.chart-card{overflow:hidden}
.screen-tabs{display:flex;gap:4px;padding:7px}.screen-tabs button{min-width:92px}
.screen-tabs button{height:32px;border:0;border-radius:9px;background:#f7f8fc;color:#75809c;font-size:9px;font-weight:800}
.screen-tabs button.is-active{background:var(--purple-soft);color:var(--purple)}
.market-toolbar{display:flex;align-items:center;gap:6px;padding:7px 9px 6px;border-top:1px solid #f0f2f7}
.timeframes{display:grid;grid-template-columns:repeat(5,1fr);gap:4px;flex:1}
.timeframes button{height:31px;border:0;border-radius:9px;background:#f8f9fc;color:#737d98;font-size:8px;font-weight:850}
.timeframes button.is-active{background:var(--purple);color:#fff}
.support-toggle{height:31px;min-width:42px;padding:0 8px;border-radius:9px;background:#f1ecff;color:var(--purple);display:flex;align-items:center;justify-content:center;font-size:8px;font-weight:900}
.support-toggle input{display:none}
.chart-shell{position:relative;height:326px;background:#fff;border-top:1px solid #f1f3f8;border-bottom:1px solid #f1f3f8}
.price-chart{width:100%;height:100%}
.chart-loading{position:absolute;inset:0;display:grid;place-items:center;background:#fff;color:var(--muted);font-size:10px}
.indicator-row{display:flex;gap:6px;padding:8px 10px}
.indicator-row span{padding:5px 8px;border-radius:999px;background:#f7f8fc;color:#707b98;font-size:7px;font-weight:800}
.market-mini-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:5px;padding:0 9px 8px}
.market-mini-stats.second{grid-template-columns:1fr 1fr;padding-top:0}
.market-mini-stats>div{padding:7px 8px;border-radius:9px;background:#fafbfe;border:1px solid #eef1f6}
.market-mini-stats span{display:block;color:#9aa1b3;font-size:7px}
.market-mini-stats b{display:block;margin-top:3px;font-size:9px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.grid-summary{width:100%;margin:10px 0 0;padding:10px 11px;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:9px;text-align:left}
.summary-icon,
.mini-bars{width:34px;height:34px;padding:7px;border-radius:10px;background:var(--purple-soft);display:flex;align-items:flex-end;justify-content:center;gap:3px}
.summary-icon i,
.mini-bars i{width:3px;border-radius:3px;background:var(--purple)}
.summary-icon i:nth-child(1),
.mini-bars i:nth-child(1){height:9px}.summary-icon i:nth-child(2),
.mini-bars i:nth-child(2){height:18px}.summary-icon i:nth-child(3),
.mini-bars i:nth-child(3){height:13px}
.summary-copy{min-width:0}.summary-copy b,
.section-title b{display:block;font-size:11px}.summary-copy small,
.section-title small{display:block;margin-top:2px;color:var(--muted);font-size:7px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.chevron{font-size:22px;color:var(--purple)}

.orderbook-card{margin-top:10px;overflow:hidden}
.section-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px}
.section-title{display:flex;align-items:center;gap:8px;min-width:0}
.live-pill,
.status-pill,
.bot-live{display:inline-flex;align-items:center;justify-content:center;border-radius:999px;background:var(--green-soft);color:var(--green);font-size:8px;font-weight:900;white-space:nowrap}
.live-pill{height:28px;padding:0 9px}
.book-tabs{display:flex;gap:18px;padding:0 11px 7px}.book-tabs button{appearance:none;border:0;background:none;padding:0;color:#8992aa;font:inherit;font-size:8px;font-weight:800;cursor:pointer}.book-tabs button.is-active{color:var(--purple)}
.book-step-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:2px 11px 8px;color:#7d879d;font-size:7px;font-weight:850}.book-step-toolbar>span{white-space:nowrap}.book-step-toolbar .depth-step select{min-width:82px}
.ratio-row{display:grid;grid-template-columns:42px 1fr 42px;align-items:center;gap:7px;padding:0 11px 8px;font-size:7px}.ratio-row>b{color:var(--green)}.ratio-row>strong{color:var(--red);text-align:right}.ratio-row>i{height:5px;border-radius:999px;background:#ffdce1;overflow:hidden}.ratio-row>i>em{display:block;height:100%;background:var(--green)}
.book-columns,
.book-row{display:grid;grid-template-columns:1fr .72fr .72fr 1fr;gap:5px;align-items:center;padding:0 10px}
.book-columns{height:25px;background:#fafbfe;color:#9ca4b7;font-size:6px;font-weight:900}.book-columns span:nth-child(n+2){text-align:right}
.book-ladder{min-height:145px}.book-row{position:relative;min-height:28px;border-bottom:1px solid #f2f4f8;font-size:8px;font-variant-numeric:tabular-nums}.depth-pane{padding:0 10px 10px}.depth-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:5px 0 8px}.depth-legend{display:flex;align-items:center;gap:15px;font-size:8px;font-weight:850;color:#6e778e}.depth-legend span{display:flex;align-items:center;gap:5px}.depth-legend i{width:8px;height:8px;border-radius:2px}.depth-legend .buy i{background:var(--green)}.depth-legend .sell i{background:var(--red)}.depth-step{display:flex;align-items:center;gap:6px}.depth-step select,
.depth-step input{height:28px;border:1px solid #e7eaf0;border-radius:8px;background:#fff;color:#687087;font-size:8px;font-weight:800}.depth-step select{padding:0 22px 0 9px}.depth-step input{width:86px;padding:0 8px;font-variant-numeric:tabular-nums}.depth-step input:focus,
.depth-step select:focus{outline:none;border-color:#c9baff;box-shadow:0 0 0 2px rgba(105,77,255,.08)}.depth-chart{height:205px;position:relative;overflow:hidden;border:1px solid #eef1f5;border-radius:10px;background:#fff}.depth-chart svg{display:block;width:100%;height:100%}.depth-grid{stroke:#edf0f5;stroke-width:1}.depth-midline{stroke:#b7becc;stroke-width:1;stroke-dasharray:4 4}.depth-buy-line{fill:none;stroke:var(--green);stroke-width:2}.depth-sell-line{fill:none;stroke:var(--red);stroke-width:2}.depth-buy-fill{fill:url(#depthBuyGradient)}.depth-sell-fill{fill:url(#depthSellGradient)}.depth-axis{fill:#858ea4;font-size:8px;font-weight:750}.depth-y-label{fill:#9aa2b4;font-size:8px;font-weight:750}.depth-table-head,
.depth-table-row{display:grid;grid-template-columns:1.05fr .85fr 1fr .85fr 1.05fr;align-items:center;text-align:right;font-variant-numeric:tabular-nums}.depth-table-head{min-height:46px;padding:9px 2px 5px;color:#757e94;font-size:7px;font-weight:850;line-height:1.35}.depth-table-head span:nth-child(3){text-align:center}.depth-table-row{min-height:29px;border-bottom:1px solid #f3f5f8;font-size:8px}.depth-table-row span:nth-child(1),
.depth-table-row span:nth-child(2){color:var(--green);background:linear-gradient(90deg,rgba(68,183,139,.08),transparent)}.depth-table-row span:nth-child(4),
.depth-table-row span:nth-child(5){background:linear-gradient(270deg,rgba(240,93,103,.08),transparent)}.depth-table-row span{padding:7px 3px}.depth-table-row .depth-center-price{text-align:center;color:#c84f5d;font-weight:900;line-height:1.1}.depth-center-price small{display:block;margin-top:2px;color:#43a77f;font-size:6px;font-weight:850}.depth-ratio{display:grid;grid-template-columns:45px 1fr 45px;align-items:center;gap:7px;padding:10px 2px 2px;font-size:8px;font-weight:900}.depth-ratio>b{color:var(--green)}.depth-ratio>strong{color:var(--red);text-align:right}.depth-ratio>i{display:flex;height:9px;border-radius:999px;overflow:hidden;background:#eef1f5}.depth-ratio>i>em{display:block;height:100%;background:var(--green)}.depth-ratio>i>strong{display:block;height:100%;background:var(--red)}
.book-row>*{position:relative;z-index:1}.book-row .buy{color:var(--green);text-align:right}.book-row .sell{color:var(--red);text-align:right}.book-row .qty:last-child{text-align:right}
.buy-depth:before,
.sell-depth:before{content:"";position:absolute;top:-7px;bottom:-7px;width:var(--depth);z-index:-1;opacity:.75}.buy-depth:before{left:-10px;background:linear-gradient(90deg,#eaf9f3,transparent)}.sell-depth:before{right:-10px;background:linear-gradient(270deg,#fff0f2,transparent)}
.book-mid{display:flex;align-items:center;justify-content:center;gap:7px;padding:7px 10px;border-top:1px solid #eef1f5}.book-mid b{font-size:11px}.book-mid span{font-size:7px;color:var(--muted)}
.book-foot{padding:0 10px 10px;text-align:center;color:#9da5b7;font-size:6px}
.chart-meta{display:none}
.empty-state{padding:22px 10px;text-align:center;color:var(--muted);font-size:9px}

/* shared page headers */
.section-page-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:3px 2px 10px}
.section-page-head h1{margin:0;font-size:22px;line-height:1.05;letter-spacing:-.65px}
.section-page-head p{margin:3px 0 0;color:#8b93a9;font-size:9px}
.segment-pills,
.portfolio-chips{display:flex;gap:6px;margin:0 0 10px}
.segment-pills button,
.portfolio-chips button{border:0;border-radius:9px;background:#f2f4f9;color:#7f88a1;height:32px;padding:0 12px;font-size:8px;font-weight:850}
.segment-pills button.is-active,
.portfolio-chips button.is-active{background:var(--purple-soft);color:var(--purple)}

/* bots */
.bots-page-head{align-items:flex-end;margin-bottom:12px}
.bots-page-head h1{font-size:26px}
.bots-page-head p{font-size:9px}
.bot-refresh-btn{height:36px;padding:0 14px;border:0;border-radius:10px;background:linear-gradient(135deg,#6434ff,#7548f6);color:#fff;font-size:9px;font-weight:900;box-shadow:0 7px 16px rgba(103,57,242,.2)}
.bot-filter-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:12px}
.bot-filter-tabs button{height:38px;padding:0 6px;border-radius:10px;font-size:9px}
.bot-page-summary{display:flex;align-items:center;gap:8px;margin:0 2px 9px;padding:0 2px;color:var(--muted);font-size:8px}
.bot-page-summary>b{margin-left:auto;color:#273147;font-size:10px}
.bot-page-summary .status-pill{height:24px;padding:0 8px}

.bot-list{display:grid;gap:10px}
.bot-card{padding:13px;border-radius:15px;box-shadow:0 7px 22px rgba(41,52,87,.055)}
.bot-ref-card{border:1px solid #edf0f5}
.bot-card-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.bot-identity{display:flex;align-items:center;gap:10px;min-width:0}
.bot-identity img{width:40px;height:40px;border-radius:11px;background:#111a2b}
.bot-identity>span:last-child{min-width:0}
.bot-pair-title{display:block!important;font-size:13px!important;letter-spacing:-.2px;white-space:nowrap}
.bot-identity small{display:block;margin-top:3px;color:#9aa1b2;font-size:7.5px}
.binance-dot{font-style:normal;color:#f3ba2f;font-size:7px}
.bot-live{height:27px;padding:0 10px;background:#e6fff4;color:#18a779;font-size:8px}

.bot-main-metric{display:grid;grid-template-columns:1fr 1fr;gap:10px;align-items:end;margin:14px 0 12px}
.bot-main-metric>span{min-width:0}
.bot-main-metric small{display:block;margin-bottom:4px;color:#98a0b2;font-size:7px;font-weight:750}
.bot-main-metric b{display:block;color:#1faa7d;font-size:18px;letter-spacing:-.45px;white-space:nowrap}
.bot-main-metric .bot-price-metric{text-align:right}
.bot-main-metric .bot-price-metric b{color:#273147;font-size:13px}

.bot-ref-stats{display:grid;grid-template-columns:1fr 1fr;gap:0;margin-bottom:11px}
.bot-ref-stats>div{padding:2px 12px 2px 0}
.bot-ref-stats>div+div{padding-left:13px;border-left:1px solid #eceff4}
.bot-ref-stats span{display:block;color:#8e97aa;font-size:7.5px}
.bot-ref-stats b{display:block;margin-top:4px;color:#303a54;font-size:11px}
.bot-ref-stats small{display:block;margin-top:2px;color:#99a1b3;font-size:6.5px}

.bot-ref-actions{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.bot-ref-actions.bot-ref-actions-three{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.bot-ref-actions button{height:38px;border:0;border-radius:10px;background:#f3efff;color:#6b39ed;font-size:9px;font-weight:900}
.bot-ref-actions button:last-child{background:#f7f4ff}
.bot-ref-actions.bot-ref-actions-three button{padding:0 4px;font-size:7.5px;white-space:nowrap}
.bot-detail-panel{margin-top:9px}
.bot-detail-meta{display:grid;grid-template-columns:1fr 1fr;gap:7px;margin-top:8px}
.bot-detail-meta span{padding:8px;border:1px solid #edf0f5;border-radius:9px;color:#929aad;font-size:7px}
.bot-detail-meta b{display:block;margin-top:3px;color:#303a54;font-size:8px}
.bot-detail-trades,
.bot-detail-levels{margin-top:8px;border:1px solid #edf0f5;border-radius:10px;overflow:hidden;background:#fff}
.bot-detail-section-title{padding:8px 9px;border-bottom:1px solid #edf0f5;background:#f8f9fc;color:#727c94;font-size:7px;font-weight:850}
.grid-level-row.is-anchor{background:#faf8ff}
.side.anchor{background:#eee9ff;color:#7042e8}
.grid-levels-list .order-row>span:last-child b{font-variant-numeric:tabular-nums}

.bot-symbol-badge{
  width:40px;height:40px;border-radius:11px;display:inline-flex;align-items:center;justify-content:center;
  flex:0 0 40px;background:#151e30;color:#fff;font-size:10px;font-weight:900
}
.info-note{margin:9px 0 0;padding:9px;border-radius:9px;background:#f5f7fc;color:#7e87a0;font-size:8px}
.order-list{border-top:1px solid #eef1f5;max-height:340px;overflow:auto}.order-row{display:grid;grid-template-columns:48px 1fr;gap:8px;align-items:center;padding:7px 9px;border-bottom:1px solid #f1f3f7}.order-row:last-child{border-bottom:0}.order-row>span:last-child{display:flex;justify-content:space-between;align-items:center}.order-row small{font-size:7px;color:var(--muted)}.side{display:inline-flex;align-items:center;justify-content:center;min-height:23px;border-radius:999px;font-size:8px;font-weight:900}.side.buy{background:var(--green-soft);color:var(--green)}.side.sell{background:var(--red-soft);color:var(--red)}

/* orders */
.orders-analytics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:9px}
.orders-stat-card{position:relative;overflow:hidden;min-width:0;padding:11px 10px;border:1px solid #edf0f6;border-radius:12px;background:linear-gradient(145deg,#fff,#fafbff);box-shadow:0 5px 16px rgba(36,48,84,.045)}
.orders-stat-card:after{content:"";position:absolute;right:-15px;bottom:-18px;width:54px;height:54px;border-radius:50%;background:#eeeaff;opacity:.55}
.orders-stat-card.buy:after{background:#d9f8ed}.orders-stat-card.sell:after{background:#ffe3e8}
.orders-stat-card small{display:block;color:#8a93a8;font-size:6.5px;font-weight:800}.orders-stat-card>b{display:block;margin:5px 0 2px;color:#29334c;font-size:16px;line-height:1}.orders-stat-card>span{display:block;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#8c95a9;font-size:6.5px;font-weight:700}.orders-stat-card.buy>b{color:var(--green)}.orders-stat-card.sell>b{color:var(--red)}
.orders-chart-card{margin-bottom:9px;padding:11px 11px 8px}.orders-chart-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.orders-chart-head b{display:block;color:#303a54;font-size:10px}.orders-chart-head small{display:block;margin-top:2px;color:#929aaf;font-size:6.5px}.orders-chart-head>span{padding:4px 7px;border-radius:999px;background:#f3f0ff;color:var(--purple);font-size:6.5px;font-weight:850}
.orders-activity-chart{height:106px;display:flex;align-items:flex-end;gap:5px;padding:13px 3px 3px;border-bottom:1px solid #edf0f5;background:repeating-linear-gradient(to top,transparent 0,transparent 25px,#f2f4f8 26px)}
.orders-chart-day{height:100%;min-width:0;flex:1;display:grid;grid-template-rows:minmax(0,1fr) 13px;align-items:end;text-align:center}.orders-chart-bars{height:100%;display:flex;align-items:flex-end;justify-content:center;gap:2px}.orders-chart-bars i{display:block;width:min(8px,38%);min-height:2px;border-radius:3px 3px 1px 1px}.orders-chart-bars i.buy{background:linear-gradient(180deg,#31d2a1,#1fb785)}.orders-chart-bars i.sell{background:linear-gradient(180deg,#ff7587,#e94d64)}.orders-chart-day small{padding-top:3px;color:#9aa2b4;font-size:5.5px;font-weight:700}
.orders-chart-legend{display:flex;justify-content:flex-end;gap:10px;padding-top:7px;color:#7f899f;font-size:6.5px;font-weight:750}.orders-chart-legend span{display:flex;align-items:center;gap:4px}.orders-chart-legend i{width:6px;height:6px;border-radius:50%;background:var(--green)}.orders-chart-legend .sell i{background:var(--red)}

.orders-view{padding-bottom:8px}.orders-page-head{margin-bottom:12px}.orders-page-head h1{font-size:25px}.orders-page-head p{font-size:10px}.orders-head-actions{display:flex;align-items:center;gap:5px}.orders-open-btn{height:31px;padding:0 10px;border:1px solid #ebeef4;border-radius:9px;background:#fff;color:#6f7891;font-size:7px;font-weight:850}
.trade-history-card{overflow:hidden;padding:0 10px 7px}.trade-filter-tabs{display:grid;grid-template-columns:1.35fr .8fr .8fr .9fr;gap:2px;margin:9px 0 10px;padding:3px;border-radius:10px;background:#f6f7fb}.trade-filter-tabs button{height:34px;border:0;border-radius:8px;background:transparent;color:#828ba2;font-size:8px;font-weight:850}.trade-filter-tabs button.is-active{background:#fff;color:var(--purple);box-shadow:0 2px 8px rgba(39,49,83,.08),inset 0 -2px 0 rgba(108,60,255,.55)}
.trade-history-list{padding:0 1px}.trade-day{margin-top:9px}.trade-day:first-child{margin-top:2px}.trade-day-title{padding:4px 2px 7px;color:#34405c;font-size:9px;font-weight:900}.trade-day-title small{margin-left:5px;color:#959db0;font-size:7px;font-weight:650}
.trade-items{position:relative}.trade-items:before{content:"";position:absolute;left:8px;top:9px;bottom:9px;width:1px;background:#e8ebf1}.trade-history-row{position:relative;display:grid;grid-template-columns:34px 34px minmax(0,1fr) minmax(78px,auto);gap:8px;align-items:center;min-height:67px;padding:7px 0;border-bottom:1px solid #f0f2f6;font-variant-numeric:tabular-nums}.trade-history-row:last-child{border-bottom:0}.trade-timeline{position:relative;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;z-index:1}.trade-dot{width:8px;height:8px;border-radius:50%;background:var(--green);box-shadow:0 0 0 3px #fff}.trade-history-row.sell .trade-dot{background:var(--red)}.trade-time{margin-top:8px;color:#8c95a9;font-size:6.5px;font-weight:700}
.trade-coin{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;background:var(--coin-bg,#273147);color:#fff;font-size:8px;font-weight:900;box-shadow:0 4px 10px rgba(34,45,76,.11)}.trade-main{min-width:0}.trade-main b{display:block;font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.trade-main small{display:block;margin-top:3px;font-size:7px;font-weight:800}.trade-main small.buy{color:var(--green)}.trade-main small.sell{color:var(--red)}
.trade-values{text-align:right;min-width:0}.trade-values>b{display:block;color:#26314c;font-size:9px;white-space:nowrap}.trade-values>span{display:block;margin-top:2px;color:#78829a;font-size:7px;white-space:nowrap}.trade-values>small{display:block;margin-top:2px;color:#5f6982;font-size:7px;font-weight:750;white-space:nowrap}.trade-empty{padding:35px 10px;text-align:center;color:#8b94a8;font-size:9px}
.open-orders-card{margin-top:10px;overflow:hidden}.open-orders-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:10px 11px;border-bottom:1px solid #eef1f5}.open-orders-head b{display:block;font-size:10px}.open-orders-head small{display:block;margin-top:2px;color:var(--muted);font-size:7px}.open-orders-head button{height:28px;padding:0 9px;border:0;border-radius:8px;background:#f3efff;color:var(--purple);font-size:7px;font-weight:850}
.list-card{overflow:hidden}.data-list,
.asset-list{padding:0 10px 10px}.data-row,
.asset-row{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px;align-items:center;min-height:58px;padding:8px 2px;border-bottom:1px solid #eef1f5}.data-row:last-child,
.asset-row:last-child{border-bottom:0}.asset-badge{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:var(--purple-soft);color:var(--purple);font-size:9px;font-weight:900}.data-row b,
.asset-row b{display:block;font-size:10px}.data-row small,
.asset-row small{display:block;margin-top:2px;color:var(--muted);font-size:7px}.row-value,
.asset-row strong{text-align:right;font-size:9px;font-weight:850}.row-value small{font-weight:500}.secondary-btn{min-height:30px;padding:0 9px;border:1px solid var(--line);border-radius:8px;background:#fff;color:#59637d;font-size:8px;font-weight:800}

/* portfolio */
.portfolio-view{padding-bottom:8px}.portfolio-page-head{margin-bottom:14px}.portfolio-page-head h1{font-size:25px}.portfolio-page-head p{font-size:10px}
.portfolio-hero{position:relative;overflow:hidden;padding:16px 17px 18px;margin-bottom:10px;border-radius:15px;background:linear-gradient(135deg,#6d35ff 0%,#7c43ff 58%,#905bff 100%);color:#fff;box-shadow:0 14px 34px rgba(108,60,255,.24)}
.portfolio-hero:before{content:"";position:absolute;right:-36px;top:-58px;width:180px;height:180px;border-radius:50%;background:radial-gradient(circle,rgba(255,255,255,.18),rgba(255,255,255,0) 68%)}
.portfolio-hero-top{display:flex;align-items:center;justify-content:space-between;gap:10px;position:relative;z-index:1}.portfolio-hero-top>span{font-size:9px;opacity:.92}.portfolio-hero-top>i{font-style:normal;padding:6px 10px;border-radius:8px;background:#d8fff0;color:#1aa879;font-size:8px;font-weight:900;box-shadow:0 3px 10px rgba(14,123,88,.1)}.portfolio-hero-top>i.negative{background:#ffe8ed;color:#d94e61}.portfolio-hero-top>i.waiting{background:rgba(255,255,255,.18);color:#fff;box-shadow:none}
.portfolio-hero>b{display:block;position:relative;z-index:1;margin-top:8px;font-size:25px;line-height:1.04;letter-spacing:-.8px}.portfolio-hero>small{display:block;position:relative;z-index:1;margin-top:5px;font-size:8px;opacity:.82}
.portfolio-hero-bars{position:absolute;right:18px;bottom:14px;height:36px;display:flex;align-items:flex-end;gap:6px;opacity:.2}.portfolio-hero-bars em{display:block;width:7px;border-radius:7px 7px 2px 2px;background:#fff}.portfolio-hero-bars em:nth-child(1){height:13px}.portfolio-hero-bars em:nth-child(2){height:22px}.portfolio-hero-bars em:nth-child(3){height:31px}.portfolio-hero-bars em:nth-child(4){height:20px}
.portfolio-chips{display:grid;grid-template-columns:repeat(5,1fr);gap:6px;margin-bottom:10px}.portfolio-chips button{height:35px;padding:0;border-radius:9px;background:#f7f8fc;color:#7c849a}.portfolio-chips button.is-active{background:linear-gradient(135deg,#6b36ff,#7445f8);color:#fff;box-shadow:0 5px 12px rgba(108,60,255,.18)}
.portfolio-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:10px}.portfolio-summary .card{min-width:0;padding:10px 9px 9px;border-radius:12px;box-shadow:0 5px 16px rgba(36,48,84,.045)}.portfolio-summary-card>span{display:flex;align-items:center;gap:5px;color:#68718b;font-size:7px;font-weight:750}.portfolio-summary-card>span i{width:7px;height:7px;border-radius:50%;background:var(--green);flex:0 0 7px}.portfolio-summary-card.locked>span i{background:var(--purple)}.portfolio-summary-card.assets>span i{background:#7d97e9}.portfolio-summary-card>b{display:block;margin:7px 0 2px;font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.portfolio-summary-card>small{display:block;color:#929ab0;font-size:6.5px}
.allocation-card{padding:12px;margin-bottom:10px}.allocation-head{display:flex;align-items:center;justify-content:space-between;gap:8px}.allocation-head b{font-size:11px}.allocation-head small{max-width:56%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:6.5px;color:var(--muted)}
.allocation-visual{display:grid;grid-template-columns:112px minmax(0,1fr);align-items:center;gap:17px;padding:11px 3px 3px}.donut{--portfolio-donut:conic-gradient(#dfe4ef 0 100%);width:108px;height:108px;border-radius:50%;display:grid;place-items:center;background:var(--portfolio-donut);position:relative}.donut:after{content:"";position:absolute;width:67px;height:67px;border-radius:50%;background:#fff;box-shadow:inset 0 0 0 1px rgba(224,229,239,.45)}.donut>span{position:relative;z-index:1;display:grid;place-items:center;text-align:center}.donut>span>b{font-size:11px;letter-spacing:-.25px}.donut>span>small{margin-top:1px;color:#788198;font-size:6px;font-weight:800}
.legend{display:grid;gap:8px;min-width:0}.legend-row{display:grid!important;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;color:#69728b!important;font-size:8px!important}.legend-row i{width:8px;height:8px;border-radius:50%;background:var(--dot,#7045ff)!important}.legend-row b{font-size:8px;color:#313a54;white-space:nowrap}.legend-row small{font-size:7px;color:#8e96aa;white-space:nowrap}
.portfolio-assets-card{overflow:hidden}.portfolio-assets-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px 7px}.portfolio-assets-head>div>b{display:block;font-size:11px}.portfolio-assets-head>div>small{display:block;margin-top:2px;color:#929bb0;font-size:6.5px}.portfolio-assets-head>span{padding:4px 7px;border-radius:999px;background:#f1edff;color:var(--purple);font-size:7px;font-weight:900}
.portfolio-assets-card .asset-list{padding:0 11px 4px}.portfolio-assets-card .asset-row{min-height:57px;padding:8px 1px}.portfolio-assets-card .asset-badge{width:35px;height:35px;border-radius:50%;background:var(--asset-bg,#efeaff);color:#fff;font-size:10px;box-shadow:0 4px 10px rgba(56,67,103,.09)}.portfolio-assets-card .asset-row b{font-size:10px}.portfolio-assets-card .asset-row small{font-size:6.5px}.portfolio-assets-card .asset-row strong{font-size:9px}.portfolio-assets-card .asset-row strong small{display:block;margin-top:2px;color:#9aa2b4;font-size:6px;font-weight:600}

/* settings */
.settings-group{padding:8px 10px;margin-bottom:9px}
.settings-group h2{margin:0 0 5px;font-size:9px}
.settings-row{min-height:39px;display:flex;align-items:center;justify-content:space-between;gap:10px;border-top:1px solid #f0f2f6;color:#39435f;font-size:9px}.settings-group h2+.settings-row{border-top:0}
.settings-row b{color:#79829a;font-size:8px;font-weight:700}.settings-label{display:inline-flex;align-items:center;gap:8px;min-width:0}.settings-icon{width:17px;height:17px;flex:0 0 17px;color:#66718f}.switch{width:34px;height:20px;border-radius:999px;background:#dfe3eb;position:relative}.switch:after{content:"";position:absolute;top:2px;left:2px;width:16px;height:16px;border-radius:50%;background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.15)}.switch.on{background:var(--purple)}.switch.on:after{left:16px}
.settings-status{display:flex;align-items:center;gap:7px;padding:7px 8px;border-radius:8px;background:#fafbfe}.settings-status .dot{width:7px;height:7px;border-radius:50%;background:#aab0bf}.settings-status b{font-size:8px}.settings-status.ok .dot{background:var(--green)}.settings-status.ok b{color:var(--green)}.settings-status.bad .dot{background:var(--red)}.settings-status.bad b{color:var(--red)}
.api-credential-box{margin:8px 0 4px;padding:10px;border:1px solid #e8ebf2;border-radius:11px;background:#fafbfe}
.api-credential-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:9px}
.api-credential-head b{display:block;color:#37405a;font-size:9px}
.api-credential-head small{display:block;margin-top:3px;color:var(--muted);font-size:7px;line-height:1.45}
.api-credential-head>span{flex:0 0 auto;padding:4px 6px;border-radius:6px;background:#f0edff;color:var(--purple);font-size:7px;font-weight:800}
.api-field{display:block;margin-top:8px}
.api-field>span:first-child{display:block;margin-bottom:4px;color:#65708b;font-size:7px;font-weight:800}
.api-field input{width:100%;height:40px;padding:0 10px;border:1px solid #dfe4ed;border-radius:9px;background:#fff;color:#2d3650;outline:0;font-size:16px;font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}
.api-field input:focus{border-color:#b8a7ff;box-shadow:0 0 0 3px rgba(108,60,255,.08)}
.api-secret-wrap{display:grid!important;grid-template-columns:minmax(0,1fr) auto;gap:6px;align-items:center}
.api-secret-toggle{height:40px;padding:0 10px;border:1px solid #dfe4ed;border-radius:9px;background:#fff;color:#65708b;font-size:8px;font-weight:800}
.api-credential-help{margin:8px 0 0;color:#7d879f;font-size:7px;line-height:1.45}
.api-credential-help.warn{color:#b46a1d}
.api-credential-help.bad{color:var(--red)}
.api-save-btn{width:100%;margin-top:9px}

/* drawer */
.mobile-drawer,
.mobile-drawer-backdrop,
.tabbar{display:none}
.toast{position:fixed;left:50%;bottom:82px;z-index:20000;max-width:calc(100vw - 24px);padding:9px 12px;border-radius:10px;background:#252b3c;color:#fff;font-size:9px;opacity:0;pointer-events:none;transform:translate(-50%,8px);transition:.2s}.toast.is-visible{opacity:1;transform:translate(-50%,0)}.toast.error{background:#943b49}

@media(min-width:761px){
  .view{max-width:760px;margin:0 auto}
  .bot-stat-grid{grid-template-columns:repeat(4,1fr)}
}
@media(max-width:760px){
  body{padding-bottom:calc(58px + var(--safe));background:#fff}
  .topbar{height:54px;padding:0 13px}.brand-mark{width:29px;height:29px;border-radius:8px}.brand-name{font-size:15px}.desktop-nav{display:none}
  .page{width:100%;padding:10px 12px 18px;background:#fff}
  .market-price-block{padding-left:2px;padding-right:2px}
  .chart-shell{height:300px}
  .tabbar{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;z-index:9000;height:calc(58px + var(--safe));padding:5px 6px max(5px,var(--safe));border-top:1px solid var(--line);background:rgba(255,255,255,.98);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px)}
  .tabbar a{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;color:#7f89a3;border-radius:8px}.tabbar .tab-icon{width:21px;height:21px;display:block}.tabbar a>b{font-size:7px;font-weight:750}.tabbar a.is-active{color:var(--purple)}.tabbar a.is-active .tab-icon{filter:drop-shadow(0 2px 4px rgba(108,60,255,.14))}
  .mobile-drawer-backdrop{display:block;position:fixed;inset:0;z-index:11900;background:rgba(14,23,42,.34);opacity:0;pointer-events:none;transition:.18s}.mobile-drawer-backdrop:not([hidden]){opacity:1;pointer-events:auto}
  .mobile-drawer{display:flex;position:fixed;z-index:12000;inset:0 auto 0 0;width:min(310px,82vw);padding:calc(16px + env(safe-area-inset-top)) 14px 16px;flex-direction:column;background:linear-gradient(180deg,#101a2d,#111b31);color:#fff;box-shadow:24px 0 60px rgba(15,23,42,.32)}
  .drawer-head{display:grid;grid-template-columns:auto 1fr auto;gap:9px;align-items:center}.drawer-head img{width:36px;height:36px;border-radius:10px}.drawer-head b{display:block;font-size:14px}.drawer-head small{display:block;margin-top:2px;color:#9aa7bf;font-size:7px}.drawer-close{width:32px;height:32px;color:#fff;font-size:24px}
  .drawer-user{display:flex;align-items:center;gap:9px;margin:18px 0 12px;padding:10px;border-radius:12px;background:rgba(255,255,255,.055)}.avatar{width:36px;height:36px;border-radius:50%;display:grid;place-items:center;background:#7d8ba8;color:#fff;font-weight:900}.drawer-user b{display:block;font-size:10px}.drawer-user small{display:block;margin-top:2px;color:#9aa7bf;font-size:7px}
  .drawer-nav{display:grid;gap:3px}.drawer-nav a{height:38px;padding:0 9px;border-radius:9px;display:flex;align-items:center;gap:10px;color:#d6ddea;font-size:9px}.drawer-nav .nav-icon{width:18px;height:18px;flex:0 0 18px}.drawer-nav .nav-label{min-width:0}.drawer-nav a.is-active{background:rgba(255,255,255,.07);color:#fff}
  .drawer-links{display:grid;gap:2px;margin-top:14px;padding-top:11px;border-top:1px solid rgba(255,255,255,.09)}.drawer-links a{height:36px;padding:0 8px;display:flex;align-items:center;justify-content:space-between;color:#d7deea;font-size:8px}.drawer-links a>span:last-child{color:#98a5bc}.drawer-link-title{display:flex;align-items:center;gap:9px;color:#d7deea!important}.drawer-link-icon{width:17px;height:17px;flex:0 0 17px}
  .drawer-logout{margin-top:10px;border:0;background:transparent;color:#ff6678;font-size:9px;font-weight:800;display:flex;align-items:center;gap:9px;padding:8px}
  .drawer-version{margin-top:auto;padding:10px;border:1px solid rgba(255,255,255,.1);border-radius:11px;display:flex;align-items:center;gap:8px}.drawer-version img{width:28px;height:28px}.drawer-version b{display:block;font-size:8px}.drawer-version small{display:block;color:#95a3ba;font-size:6px}
}
@media(max-width:390px){
  .page{padding-left:10px;padding-right:10px}
  .price-area strong{font-size:27px}
  .ohlc-grid{min-width:112px}
  .chart-shell{height:286px}
  .screen-tabs button{font-size:8px}
  .portfolio-summary{gap:5px}
}
@media(max-width:350px){
  .market-price-block{grid-template-columns:1fr}.ohlc-grid{grid-template-columns:repeat(3,1fr);min-width:0}.ohlc-grid span{display:block}.ohlc-grid b{display:block;margin-top:2px}
}
@media(prefers-reduced-motion:reduce){*,
*:before,
*:after{scroll-behavior:auto!important;animation:none!important;transition:none!important}}


/* Authentication & security */
.security-good{color:var(--green)!important}
.security-warn{color:var(--amber)!important}
.security-bad{color:var(--red)!important}
.login-body{min-height:100dvh;display:grid;place-items:center;padding:22px;background:
  radial-gradient(circle at 20% 10%,rgba(108,60,255,.08),transparent 30%),
  linear-gradient(180deg,#fbfbfe,#f5f7fb)}
.login-card{width:min(390px,100%);padding:22px;border:1px solid var(--line);border-radius:20px;background:#fff;box-shadow:0 22px 70px rgba(30,42,78,.10)}
.login-brand{display:flex;align-items:center;gap:10px;margin-bottom:22px}
.login-brand .brand-mark{width:40px;height:40px;border-radius:11px}
.login-brand b{display:block;font-size:18px;letter-spacing:-.4px}
.login-brand small{display:block;margin-top:3px;color:var(--muted);font-size:8px}
.login-heading h1{margin:0;font-size:24px;letter-spacing:-.7px}
.login-heading p{margin:6px 0 18px;color:var(--muted);font-size:10px;line-height:1.5}
.login-card form>label:not(.remember-row){display:grid;gap:6px;margin:12px 0}
.login-card form>label>span{color:#566078;font-size:9px;font-weight:800}
.login-card input[type="text"],
.login-card input[type="password"],
.login-card input[name="username"]{
  width:100%;height:46px;padding:0 13px;border:1px solid var(--line-strong);border-radius:12px;background:#fafbfe;color:var(--text);outline:0;font-size:16px
}
.login-card input:focus{border-color:#b6a3ff;box-shadow:0 0 0 3px rgba(108,60,255,.10)}
.remember-row{display:flex!important;align-items:flex-start;gap:9px;margin:14px 0!important;cursor:pointer}
.remember-row input{width:18px;height:18px;margin:1px 0 0;accent-color:var(--purple)}
.remember-row span{display:block!important}
.remember-row b{display:block;font-size:10px;color:#37405a}
.remember-row small{display:block;margin-top:2px;color:var(--muted);font-size:8px;font-weight:500}
.primary-btn{width:100%;height:44px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--purple),var(--purple-2));color:#fff;font-weight:900}
.login-submit{margin-top:4px}
.login-error{margin-top:12px;padding:10px 11px;border:1px solid #ffd0d6;border-radius:10px;background:var(--red-soft);color:#b63244;font-size:9px}
.login-foot{margin:16px 0 0;text-align:center;color:#a0a7b8;font-size:7px}


/* AWS update */
.server-update-box{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px;margin-top:4px;border:1px solid #eceff5;border-radius:11px;background:#fafbfe}
.server-update-box>div{min-width:0}.server-update-box b{display:block;font-size:9px}.server-update-box small{display:block;margin-top:3px;color:var(--muted);font-size:7px;line-height:1.4}
.update-btn{height:34px;min-width:82px;padding:0 12px;border:0;border-radius:9px;background:linear-gradient(135deg,var(--purple),var(--purple-2));color:#fff;font-size:8px;font-weight:900;box-shadow:0 5px 14px rgba(108,60,255,.18)}
.update-btn:disabled{opacity:.55;cursor:default;box-shadow:none}
.update-log{max-height:160px;margin:8px 0 0;padding:9px 10px;overflow:auto;border:1px solid #eceff5;border-radius:9px;background:#111827;color:#d9e2f1;font:7px/1.5 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;white-space:pre-wrap;word-break:break-word}


/* Reference icon system */
.nav-icon,
.tab-icon,
.settings-icon,
.drawer-link-icon,
.ui-icon{
  fill:none;
  stroke:currentColor;
  vector-effect:non-scaling-stroke;
}
.tabbar a,
.drawer-nav a,
.settings-label,
.top-icon,
.plain-icon{
  -webkit-tap-highlight-color:transparent;
}
@media(max-width:760px){
  .tabbar{height:calc(61px + var(--safe));padding-top:6px}
  .tabbar .tab-icon{width:20px;height:20px}
  .tabbar a>b{font-size:7.5px;line-height:1.1}
  .drawer-nav a{font-size:9.5px}
}


.asset-list-section-title{
  padding:14px 4px 8px;
  font-size:12px;
  font-weight:700;
  color:var(--muted,#7a8494);
  letter-spacing:.02em;
}
.wallet-total-row{
  margin-bottom:4px;
}
.wallet-total-row small{
  line-height:1.35;
}




/* Bot dashboard polish */
[data-view="bots"]{padding-bottom:10px}
.bots-page-head{margin-bottom:14px}
.bots-page-head h1{font-size:27px;letter-spacing:-.8px}
.bots-page-head p{max-width:290px;margin-top:4px;line-height:1.45}
.bot-refresh-btn{height:34px;padding:0 12px;border-radius:11px;background:#f3efff;color:#6b3df0;box-shadow:none}

.bot-filter-tabs{gap:5px;margin-bottom:10px;padding:3px;border-radius:12px;background:#f5f6fa}
.bot-filter-tabs button{height:34px;border-radius:9px;background:transparent;font-size:8px}
.bot-filter-tabs button.is-active{background:#fff;color:#6538ef;box-shadow:0 3px 12px rgba(39,49,83,.07)}

.bot-page-summary{min-height:42px;margin:0 0 10px;padding:8px 11px;border:1px solid #eef0f5;border-radius:12px;background:#fff}
.bot-page-summary>span:first-child{font-size:7px;font-weight:800;color:#8e96a9}
.bot-page-summary>b{font-size:11px;letter-spacing:-.2px}
.bot-page-summary .status-pill{display:inline-flex;align-items:center;justify-content:center;min-width:48px;height:23px;border:0;border-radius:999px;background:#eafff6;color:#13976c;font-size:7px;font-weight:900}

.bot-dashboard-card{
  position:relative;
  overflow:hidden;
  padding:0;
  border:1px solid #e9edf4;
  border-radius:18px;
  background:linear-gradient(180deg,#fff 0%,#fff 72%,#fbfbfe 100%);
  box-shadow:0 15px 42px rgba(34,47,82,.075)
}
.bot-dashboard-card:before{
  content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,#6b3cff,#8c64ff 48%,#35c99a)
}
.bot-dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:15px 15px 11px}
.bot-dashboard-head .bot-identity img{width:42px;height:42px;border-radius:12px;box-shadow:0 6px 14px rgba(24,33,55,.12)}
.bot-dashboard-head .bot-pair-title{font-size:14px!important;letter-spacing:-.35px}
.bot-dashboard-head .bot-identity small{font-size:7px}
.bot-running-pill{display:inline-flex;align-items:center;gap:5px;height:25px;padding:0 8px;border-radius:999px;background:#ecfff7;color:#15956b;font-size:7px;font-weight:900;white-space:nowrap}
.bot-running-pill i{width:6px;height:6px;border-radius:50%;background:#25bd8b;box-shadow:0 0 0 3px rgba(37,189,139,.10)}

.bot-hero-row{display:grid;grid-template-columns:minmax(0,1.3fr) minmax(110px,.7fr);gap:8px;padding:0 15px 11px}
.bot-value-block,
.bot-pnl-block{min-width:0;border-radius:13px}
.bot-value-block{padding:11px 12px;background:linear-gradient(135deg,#151d31,#222d48);color:#fff}
.bot-value-block small,
.bot-pnl-block small{display:block;font-size:6.5px;font-weight:800}
.bot-value-block small{color:#aeb8ce}
.bot-value-block strong{display:inline-block;margin-top:4px;font-size:23px;line-height:1;letter-spacing:-.8px}
.bot-value-block>span{margin-left:4px;color:#aeb8ce;font-size:7px;font-weight:800}
.bot-pnl-block{display:flex;flex-direction:column;justify-content:center;padding:10px 11px;border:1px solid #eceff5;background:#fafbfe;text-align:right}
.bot-pnl-block small{color:#8992a7}
.bot-pnl-block strong{display:block;margin-top:5px;font-size:11px}
.bot-pnl-block>span{display:block;margin-top:3px;font-size:8px;font-weight:900}
.bot-pnl-block.positive strong,
.bot-pnl-block.positive>span{color:#149d70}
.bot-pnl-block.negative strong,
.bot-pnl-block.negative>span{color:#d64d61}





























.bot-compact-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));margin:0 15px 11px;padding:9px 0;border-top:1px solid #f0f2f6;border-bottom:1px solid #f0f2f6}
.bot-compact-stats>span{min-width:0;padding:0 8px;border-left:1px solid #f0f2f6}
.bot-compact-stats>span:first-child{padding-left:0;border-left:0}
.bot-compact-stats>span:last-child{padding-right:0}
.bot-compact-stats small{display:block;color:#9aa2b3;font-size:6px;white-space:nowrap}
.bot-compact-stats b{display:block;margin-top:3px;color:#384159;font-size:7.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

.bot-dashboard-actions{display:grid;grid-template-columns:1fr 1fr;gap:7px;padding:0 15px 14px}
.bot-dashboard-actions button{height:39px;padding:0 10px;border:1px solid #ece9f8;border-radius:11px;background:#f8f6ff;color:#6840dc;font-size:8px;font-weight:900;text-align:left}
.bot-dashboard-actions button span{margin-right:5px;font-size:11px;vertical-align:-1px}
.bot-dashboard-actions button b{float:right;min-width:22px;padding:3px 5px;border-radius:999px;background:#ece7ff;color:#6b3ce9;font-size:6.5px;text-align:center}

.bot-dashboard-detail{margin:0;padding:0 15px 14px;border-top:1px solid #f0f2f6;background:#fcfcfe}
.bot-dashboard-detail .bot-detail-meta{padding-top:10px;margin-top:0}
.bot-dashboard-detail .bot-detail-meta span{background:#fff}
.bot-dashboard-detail .bot-detail-trades,
.bot-dashboard-detail .bot-detail-levels{border-radius:12px}
.bot-dashboard-detail .order-row{min-height:45px;padding:8px 9px}
.bot-dashboard-detail .order-row>span:last-child{display:block}
.bot-dashboard-detail .order-row>span:last-child b{display:block;color:#313a53;font-size:9px}
.bot-dashboard-detail .order-row>span:last-child small{display:block;margin-top:3px;line-height:1.35}
.bot-estimate-note{margin:8px 1px 0;color:#a0a7b7;font-size:6.5px;line-height:1.45}
.side.anchor{background:#eee9ff;color:#7042e8}

@media(max-width:390px){
  .bot-dashboard-head{padding-left:12px;padding-right:12px}
  .bot-hero-row,
.bot-dashboard-actions{padding-left:12px;padding-right:12px}
  .bot-compact-stats{margin-left:12px;margin-right:12px}
  .bot-value-block strong{font-size:21px}
  .bot-compact-stats{grid-template-columns:1fr 1fr;row-gap:8px}
  .bot-compact-stats>span:nth-child(3){border-left:0;padding-left:0}
}


/* Completed Grid history */
.bot-dashboard-actions.bot-dashboard-actions-three{grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
.bot-dashboard-actions.bot-dashboard-actions-three button{padding:0 7px;font-size:7px;white-space:nowrap}
.bot-dashboard-actions.bot-dashboard-actions-three button span{font-size:10px;margin-right:3px}
.bot-dashboard-actions.bot-dashboard-actions-three button b{min-width:19px;padding:2px 4px}

.bot-detail-cycles{margin-top:8px;border:1px solid #edf0f5;border-radius:12px;overflow:hidden;background:#fff}
.grid-cycle-list{display:grid}
.grid-cycle-row{padding:10px 10px 9px;border-bottom:1px solid #f0f2f6}
.grid-cycle-row:last-child{border-bottom:0}
.grid-cycle-top{display:flex;align-items:center;justify-content:space-between;gap:8px}
.grid-cycle-badge{display:inline-flex;align-items:center;min-height:21px;padding:0 7px;border-radius:999px;background:#f0edff;color:#6d40e7;font-size:6.5px;font-weight:900}
.grid-cycle-top strong{font-size:9px}
.grid-cycle-route{display:grid;grid-template-columns:1fr auto 1fr;gap:8px;align-items:center;margin-top:9px}
.grid-cycle-route>span{padding:8px 9px;border-radius:10px}
.grid-cycle-route>span.buy{background:#f2fcf8}
.grid-cycle-route>span.sell{background:#fff5f6}
.grid-cycle-route small{display:block;font-size:6px;font-weight:900}
.grid-cycle-route .buy small{color:#19a477}
.grid-cycle-route .sell small{color:#da5366}
.grid-cycle-route b{display:block;margin-top:3px;color:#303950;font-size:10px}
.grid-cycle-route>i{font-style:normal;color:#9aa2b4;font-size:12px}
.grid-cycle-meta{display:flex;flex-wrap:wrap;gap:5px 10px;margin-top:8px;color:#7f899f;font-size:6.5px}
.grid-cycle-id{margin-top:6px;color:#a2a9b8;font:6px/1.3 ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

@media(max-width:390px){
  .bot-dashboard-actions.bot-dashboard-actions-three{gap:4px}
  .bot-dashboard-actions.bot-dashboard-actions-three button{padding:0 5px;font-size:6.5px}
}


/* Grid performance strip */
.grid-performance-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:6px;
  margin:0 15px 11px;
}
.grid-performance-strip>span{
  min-width:0;
  padding:8px 8px 7px;
  border:1px solid #edf0f5;
  border-radius:10px;
  background:#fff;
}
.grid-performance-strip small{
  display:block;
  color:#9aa2b3;
  font-size:5.8px;
  font-weight:800;
  white-space:nowrap;
}
.grid-performance-strip b{
  display:block;
  margin-top:3px;
  color:#354057;
  font-size:7.6px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.grid-performance-strip em{
  display:block;
  margin-top:2px;
  color:#9aa2b3;
  font-size:5.8px;
  font-style:normal;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.grid-performance-strip em.positive{color:#149d70}
.grid-performance-strip em.negative{color:#d64d61}

@media(max-width:390px){
  .grid-performance-strip{
    grid-template-columns:1fr 1fr;
    margin-left:12px;
    margin-right:12px;
  }
}


/* MACD chart toggle */
.indicator-row button{
  padding:5px 8px;
  border:0;
  border-radius:999px;
  background:#f7f8fc;
  color:#707b98;
  font-size:7px;
  font-weight:800;
  line-height:1;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
.indicator-row button.is-active{
  background:#eee9ff;
  color:var(--purple);
}


/* Order Book mobile compact fix */
.book-step-toolbar{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:10px!important;
  padding:4px 11px 7px!important;
  min-height:34px!important;
  color:#7d879d!important;
  font-size:8px!important;
  line-height:1!important;
  font-weight:850!important;
}
.book-step-toolbar>span{
  display:block!important;
  margin:0!important;
  padding:0!important;
  font-size:8px!important;
  line-height:1!important;
  white-space:nowrap!important;
}
.book-step-toolbar .depth-step,
.depth-toolbar .depth-step{
  display:flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  margin:0!important;
}
.book-step-toolbar .depth-step select,
.depth-toolbar .depth-step select{
  appearance:none!important;
  -webkit-appearance:none!important;
  box-sizing:border-box!important;
  width:84px!important;
  min-width:84px!important;
  max-width:84px!important;
  height:28px!important;
  margin:0!important;
  padding:0 24px 0 9px!important;
  border:1px solid #e5e9f1!important;
  border-radius:9px!important;
  background-color:#fff!important;
  color:#606b82!important;
  font-size:9px!important;
  line-height:28px!important;
  font-weight:850!important;
}
.ratio-row{
  padding:2px 11px 8px!important;
  font-size:7.5px!important;
}
.book-ladder{
  min-height:0!important;
  height:auto!important;
}
.book-row{
  min-height:30px!important;
}
.book-mid{
  margin-top:0!important;
}
@media(max-width:760px){
  .orderbook-card{min-height:0!important}
  .book-step-toolbar{padding-left:10px!important;padding-right:10px!important}
  .book-step-toolbar>span{font-size:7.5px!important}
  .book-step-toolbar .depth-step select,
.depth-toolbar .depth-step select{
    width:80px!important;
    min-width:80px!important;
    max-width:80px!important;
    height:27px!important;
    font-size:8.5px!important;
  }
}


/* Binance-style Depth chart */
.depth-toolbar-binance{
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  gap:7px!important;
  padding:8px 0 10px!important;
}
.depth-toolbar-binance .depth-step{
  order:1;
}
.depth-toolbar-binance .depth-step select{
  width:78px!important;
  min-width:78px!important;
  max-width:78px!important;
  height:27px!important;
  padding:0 22px 0 9px!important;
  border:0!important;
  border-radius:8px!important;
  background:#f4f6fa!important;
  color:#677188!important;
  font-size:8px!important;
  font-weight:900!important;
  text-align:center!important;
  text-align-last:center!important;
  box-shadow:none!important;
}
.depth-toolbar-binance .depth-legend{
  order:2;
  justify-content:center!important;
  gap:16px!important;
  color:#727c91!important;
  font-size:8px!important;
}
.depth-toolbar-binance .depth-legend i{
  width:9px!important;
  height:9px!important;
  border-radius:0!important;
}
.depth-chart-binance{
  width:100%!important;
  height:292px!important;
  border:0!important;
  border-radius:0!important;
  background:#fff!important;
  overflow:hidden!important;
}
.depth-chart-binance svg{
  width:100%!important;
  height:100%!important;
  overflow:visible!important;
}
.depth-chart-binance .depth-grid{
  stroke:#edf0f5!important;
  stroke-width:.8!important;
}
.depth-chart-binance .depth-grid-v{
  opacity:.72;
}
.depth-chart-binance .depth-midline{
  stroke:#cbd1dc!important;
  stroke-width:.8!important;
  stroke-dasharray:3 4!important;
  opacity:.55!important;
}
.depth-chart-binance .depth-buy-line{
  fill:none!important;
  stroke:#27b98a!important;
  stroke-width:1.6!important;
  stroke-linejoin:miter!important;
}
.depth-chart-binance .depth-sell-line{
  fill:none!important;
  stroke:#ef4561!important;
  stroke-width:1.6!important;
  stroke-linejoin:miter!important;
}
.depth-chart-binance .depth-buy-fill{
  fill:url(#depthBuyGradient)!important;
  stroke:none!important;
}
.depth-chart-binance .depth-sell-fill{
  fill:url(#depthSellGradient)!important;
  stroke:none!important;
}
.depth-chart-binance .depth-axis{
  fill:#7f899d!important;
  font-size:7.5px!important;
  font-weight:750!important;
}
.depth-chart-binance .depth-y-label{
  fill:#7f899d!important;
  font-size:7.5px!important;
  font-weight:750!important;
}
.depth-chart-binance .depth-y-right{
  dominant-baseline:middle;
}
.depth-pane{
  padding:0 10px 10px!important;
}

@media(max-width:760px){
  .depth-pane{
    padding:0 0 8px!important;
  }
  .depth-toolbar-binance{
    padding:7px 0 8px!important;
  }
  .depth-chart-binance{
    height:315px!important;
  }
}


/* Depth chart polish */
.depth-chart-binance{
  position:relative!important;
  background:linear-gradient(180deg,#fff 0%,#fcfdff 100%)!important;
}
.depth-chart-binance:before{
  content:"";
  position:absolute;
  left:50%;
  top:12px;
  bottom:28px;
  width:1px;
  transform:translateX(-.5px);
  background:linear-gradient(180deg,rgba(109,63,242,.14),rgba(109,63,242,.04));
  pointer-events:none;
  z-index:2;
}
.depth-chart-binance svg{
  position:relative;
  z-index:1;
}
.depth-soft-bg{
  fill:url(#depthCenterGlow);
}
.depth-side-badge{
  position:absolute;
  top:8px;
  z-index:3;
  display:flex;
  align-items:center;
  gap:5px;
  padding:5px 7px;
  border-radius:999px;
  font-size:6.5px;
  font-weight:850;
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  box-shadow:0 4px 12px rgba(35,43,66,.05);
}
.depth-side-badge span{opacity:.72}
.depth-side-badge b{font-size:7px}
.depth-side-bid{
  left:10px;
  color:#168b68;
  background:rgba(236,253,247,.92);
  border:1px solid rgba(39,185,138,.12);
}
.depth-side-ask{
  right:48px;
  color:#cf3f57;
  background:rgba(255,243,245,.92);
  border:1px solid rgba(239,69,97,.12);
}
.depth-center-chip{
  position:absolute;
  left:50%;
  bottom:31px;
  z-index:4;
  transform:translateX(-50%);
  min-width:86px;
  padding:6px 9px 5px;
  border:1px solid #e7e3fb;
  border-radius:11px;
  background:rgba(255,255,255,.94);
  text-align:center;
  box-shadow:0 7px 18px rgba(76,54,154,.10);
  backdrop-filter:blur(10px);
  -webkit-backdrop-filter:blur(10px);
  pointer-events:none;
}
.depth-center-chip b{
  display:block;
  color:#313a55;
  font-size:8.5px;
  line-height:1;
  font-variant-numeric:tabular-nums;
}
.depth-center-chip small{
  display:block;
  margin-top:3px;
  color:#989fb0;
  font-size:5.5px;
  line-height:1;
  white-space:nowrap;
}
.depth-chart-binance .depth-buy-line,
.depth-chart-binance .depth-sell-line{
  filter:drop-shadow(0 1px 0 rgba(255,255,255,.7));
}
.depth-chart-binance .depth-axis,
.depth-chart-binance .depth-y-label{
  font-variant-numeric:tabular-nums;
}

@media(max-width:760px){
  .depth-side-badge{top:6px}
  .depth-side-bid{left:8px}
  .depth-side-ask{right:45px}
  .depth-center-chip{bottom:30px}
}


/* Security settings polish */
.security-card .settings-row{min-height:44px}
.security-card .settings-label>span{display:flex;flex-direction:column;gap:2px}
.settings-sub{display:block;color:#9aa2b4;font-size:6.3px;font-weight:600;line-height:1.2}
.security-chip{
  display:inline-flex!important;
  align-items:center;
  justify-content:center;
  min-height:24px;
  padding:0 8px;
  border-radius:999px;
  background:#f3f5f8;
  color:#7d879b!important;
  font-size:7px!important;
  font-weight:900!important;
  white-space:nowrap;
}
.security-chip.good{background:#eafaf4;color:#1aa777!important}
.security-chip.warn{background:#fff7e9;color:#d28a12!important}
.security-chip.bad{background:#fff0f2;color:#d94d63!important}
.security-connection-row .secondary-btn{
  height:31px;
  min-width:78px;
  padding:0 10px;
  border-radius:9px;
  font-size:7.5px;
}
.security-card .settings-status{
  margin:0 0 2px;
  min-height:30px;
  padding:7px 9px;
}


/* Interactive notification switch */
button.switch{
  appearance:none;
  -webkit-appearance:none;
  border:0;
  padding:0;
  flex:0 0 34px;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
}
button.switch:focus-visible{
  outline:2px solid rgba(108,60,255,.28);
  outline-offset:2px;
}


/* Market intelligence */
.connection-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:1px;
  padding:0;
  overflow:hidden;
  margin:9px 0;
  background:#eef1f6;
}
.connection-strip>span{
  min-width:0;
  padding:9px 8px;
  background:#fff;
  display:grid;
  grid-template-columns:8px minmax(0,1fr);
  align-items:center;
  column-gap:6px;
  row-gap:2px;
}
.connection-strip>span>i{
  width:7px;height:7px;border-radius:50%;background:#b7becb;
  grid-row:1 / span 2;
}
.connection-strip>span>b{font-size:7px;color:#434d67;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.connection-strip>span>small{font-size:6px;color:#9aa2b3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.connection-strip>span.good>i{background:var(--green)}
.connection-strip>span.warn>i{background:var(--amber)}
.connection-strip>span.bad>i{background:var(--red)}
.connection-strip>span.waiting>i{background:#b7becb}

.book-tools{display:flex;align-items:center;gap:6px}
.book-smart-filter{
  height:27px;padding:0 9px;border:1px solid #e5e9f1;border-radius:9px;
  background:#fff;color:#8b93a6;font:inherit;font-size:7px;font-weight:900;
}
.book-smart-filter.is-active{background:#f0edff;border-color:#e0d8ff;color:var(--purple)}
.book-signal-row{
  min-height:29px;padding:0 11px 7px;display:flex;align-items:center;justify-content:space-between;gap:8px;
}
.book-wall-summary{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#7e879b;font-size:6.5px;font-weight:700}
.book-pressure,
.depth-imbalance{
  flex:0 0 auto;padding:4px 7px;border-radius:999px;font-size:6.5px;font-weight:900;
  background:#f3f5f8;color:#7e879b
}
.book-pressure.buy,
.depth-imbalance.buy{background:#eafaf4;color:#159b70}
.book-pressure.sell,
.depth-imbalance.sell{background:#fff0f2;color:#d94d63}
.book-pressure.neutral,
.depth-imbalance.neutral{background:#f3f5f8;color:#7e879b}
.book-row .qty{position:relative}
.book-row .qty.wall{font-weight:900}
.book-row .qty.wall em{
  display:inline-block;margin-left:4px;padding:2px 4px;border-radius:4px;
  font-style:normal;font-size:4.8px;line-height:1;background:rgba(108,60,255,.10);color:var(--purple);vertical-align:1px
}
.book-row .wall-price{font-weight:950}
.book-row.has-wall{background:linear-gradient(90deg,rgba(31,199,154,.025),transparent 46%,transparent 54%,rgba(239,69,97,.025))}
.depth-toolbar-binance .depth-imbalance{order:3;margin-top:-1px}

/* Grid health + profit */
.grid-health-card{
  margin:9px 0 0;padding:10px;border:1px solid #edf0f5;border-radius:12px;background:#fbfcff
}
.grid-health-head,
.grid-profit-head{display:flex;align-items:center;justify-content:space-between;gap:10px}
.grid-health-head>span,
.grid-profit-head>span{display:grid;gap:2px}
.grid-health-head b,
.grid-profit-head b{font-size:8px;color:#3c4660}
.grid-health-head small,
.grid-profit-head small{font-size:5.8px;color:#9aa2b4}
.grid-health-head em{
  padding:4px 7px;border-radius:999px;font-style:normal;font-size:6px;font-weight:900
}
.grid-health-head em.good{background:#eafaf4;color:#159b70}
.grid-health-head em.warn{background:#fff7e9;color:#d28a12}
.grid-health-grid{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin-top:9px
}
.grid-health-grid>span{
  min-width:0;padding:7px 6px;border-radius:9px;background:#fff;border:1px solid #f0f2f6;display:grid;gap:3px
}
.grid-health-grid small{font-size:5.4px;color:#9aa2b4;white-space:nowrap}
.grid-health-grid b{font-size:7px;color:#47516b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.grid-profit-card{
  margin:9px 0 0;padding:10px;border:1px solid #edf0f5;border-radius:12px;background:#fff
}
.grid-profit-head strong{font-size:7.5px}
.grid-profit-bars{
  height:92px;margin-top:9px;padding:6px 2px 0;display:flex;align-items:flex-end;justify-content:space-around;gap:4px;
  border-top:1px solid #f3f4f7;background:linear-gradient(180deg,#fff,#fbfcff)
}
.grid-profit-bar{
  flex:1;min-width:0;height:100%;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:3px;position:relative
}
.grid-profit-bar i{
  display:block;width:min(18px,70%);height:var(--bar-height);min-height:6px;border-radius:4px 4px 2px 2px;
  background:#b8c0ce
}
.grid-profit-bar.positive i{background:linear-gradient(180deg,#39c99b,#8de5c6)}
.grid-profit-bar.negative i{background:linear-gradient(180deg,#ef526b,#f5a0ad)}
.grid-profit-bar small{font-size:5.2px;color:#9ca4b5}
.grid-profit-bar em{
  position:absolute;top:0;font-style:normal;font-size:4.8px;color:#afb5c1
}
.grid-profit-empty{padding:14px 0 4px;text-align:center;color:#a1a8b7;font-size:6.5px}

/* Notification center */
.top-notify{position:relative}
.notify-count{
  position:absolute;right:-3px;top:-3px;min-width:14px;height:14px;padding:0 3px;border-radius:999px;
  display:grid;place-items:center;background:#ef4561;color:#fff;font-size:5.5px;font-weight:950;border:2px solid #fff
}
.notify-backdrop{
  position:fixed;inset:0;z-index:90;background:rgba(26,33,52,.24);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px)
}
.notify-panel{
  position:fixed;z-index:91;top:0;right:0;width:min(360px,92vw);height:100dvh;background:#fff;
  box-shadow:-18px 0 48px rgba(30,42,78,.16);padding:max(16px,env(safe-area-inset-top)) 14px max(18px,env(safe-area-inset-bottom));
  overflow:auto
}
.notify-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:2px 2px 12px;border-bottom:1px solid #eef1f5}
.notify-head>div{display:grid;gap:3px}
.notify-head b{font-size:14px;color:#2f3851}
.notify-head small{font-size:7px;color:#9aa2b4}
.notify-head button{
  width:31px;height:31px;border:0;border-radius:9px;background:#f5f6f9;color:#626d85;font-size:19px;line-height:1
}
.notify-actions{display:flex;justify-content:flex-end;gap:7px;padding:9px 0}
.notify-actions button{
  border:0;border-radius:8px;padding:7px 9px;background:#f5f6f9;color:#6d778e;font-size:6.5px;font-weight:850
}
.notify-list{display:grid;gap:7px}
.notify-item{
  display:grid;grid-template-columns:8px minmax(0,1fr);gap:8px;padding:9px;border:1px solid #edf0f5;border-radius:11px;background:#fff
}
.notify-item>i{width:7px;height:7px;margin-top:3px;border-radius:50%;background:#8e98aa}
.notify-item.good>i{background:var(--green)}
.notify-item.bad>i{background:var(--red)}
.notify-item.info>i{background:var(--purple)}
.notify-item.is-read{opacity:.62}
.notify-item span{display:grid;gap:3px;min-width:0}
.notify-item b{font-size:7.5px;color:#414b65}
.notify-item small{font-size:6.5px;color:#7d879c;line-height:1.35}
.notify-item em{font-style:normal;font-size:5.5px;color:#adb3bf}
body.notify-open{overflow:hidden}

@media(max-width:760px){
  .connection-strip{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid-health-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
  .book-wall-summary{max-width:68%}
}


/* Mahan Trailing Grid */
.mahan-grid-ui{margin:14px 0}
.trailing-grid-card{padding:16px;overflow:hidden}
.tg-head,
.tg-head>div,
.tg-price,
.tg-trailing-title,
.tg-actions,
.tg-level-title{display:flex;align-items:center}
.tg-head{justify-content:space-between;gap:12px}
.tg-head>div{gap:10px;min-width:0}.tg-head>div>span:last-child{display:grid;min-width:0}
.tg-head b{font-size:15px}.tg-head small{color:var(--muted);font-size:11px;margin-top:2px}
.tg-logo{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--purple-soft);color:var(--purple);font-weight:900;font-size:17px}
.tg-env,
.tg-state{font-style:normal;font-size:10px;font-weight:800;padding:6px 9px;border-radius:999px;background:#f1f3f8;color:var(--muted);white-space:nowrap}
.tg-state.on{background:var(--green-soft);color:var(--green)}.tg-state.off{background:var(--red-soft);color:var(--red)}
.tg-empty{padding:18px 4px 4px;color:var(--muted);font-size:12px}
.tg-price{justify-content:space-between;gap:12px;padding:18px 2px 12px}.tg-price>span{display:grid;gap:3px}
.tg-price>span:last-child{text-align:right}.tg-price small,
.tg-track-grid small,
.tg-stats small{font-size:10px;color:var(--muted);font-weight:600}
.tg-price b{font-size:20px;letter-spacing:-.4px}.tg-price b i{font-size:10px;font-style:normal;color:var(--muted)}
.tg-trailing{border:1px solid var(--line);border-radius:14px;padding:13px;background:linear-gradient(180deg,#fff,#faf9ff)}
.tg-trailing.active{border-color:rgba(108,60,255,.24);box-shadow:inset 0 0 0 1px rgba(108,60,255,.035)}
.tg-trailing-title{justify-content:space-between}.tg-trailing-title>span{display:flex;align-items:center;gap:7px}.tg-trailing-title i{width:8px;height:8px;border-radius:50%;background:var(--purple);box-shadow:0 0 0 4px var(--purple-soft)}
.tg-trailing-title b{font-size:12px}.tg-trailing-title strong{font-size:11px;color:var(--purple);background:var(--purple-soft);padding:4px 7px;border-radius:7px}
.tg-track-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-top:13px}.tg-track-grid span{display:grid;gap:3px;min-width:0}.tg-track-grid b{font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.tg-track-line{height:6px;background:#eceef5;border-radius:999px;margin-top:13px;position:relative}.tg-track-line i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--purple),var(--purple-2));max-width:100%}.tg-track-line b{position:absolute;right:0;top:9px;font-size:9px;color:var(--muted)}
.tg-stats{display:grid;grid-template-columns:1.5fr repeat(3,.7fr);gap:7px;margin-top:22px}.tg-stats span{display:grid;gap:3px;padding:9px;background:#f8f9fc;border-radius:10px;min-width:0}.tg-stats b{font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.tg-actions{gap:8px;margin-top:12px}.tg-actions button{border:0;border-radius:11px;padding:11px 14px;font-weight:800;background:var(--purple);color:#fff;flex:1}.tg-actions button.secondary{background:var(--purple-soft);color:var(--purple)}
.tg-detail{margin-top:13px;border-top:1px solid var(--line);padding-top:13px}.tg-level-title{justify-content:space-between;margin:8px 0}.tg-level-title small{font-size:10px;color:var(--muted)}
.tg-slot-list,
.tg-trades{display:grid;gap:6px}.tg-slot-list>div,
.tg-trade{display:grid;grid-template-columns:42px 1fr 1.4fr;align-items:center;gap:8px;padding:9px 10px;background:#f8f9fc;border-radius:10px}.tg-slot-list span,
.tg-trade>span{font-size:9px;font-weight:900}.tg-slot-list .buy,
.tg-trade .buy{color:var(--green)}.tg-slot-list .sell,
.tg-trade .sell{color:var(--red)}.tg-slot-list small,
.tg-trade small{font-size:10px;color:var(--muted)}.tg-trade{grid-template-columns:36px 1fr 1fr 1fr}.tg-trade em{text-align:right;font-style:normal;font-size:10px}
@media(max-width:430px){.mahan-grid-ui{margin:10px 0}.trailing-grid-card{padding:13px}.tg-price b{font-size:18px}.tg-track-grid{gap:5px}.tg-track-grid b{font-size:11px}.tg-stats{grid-template-columns:1.5fr .7fr .7fr .7fr;gap:5px}.tg-stats span{padding:8px 6px}.tg-actions button{padding:10px 8px;font-size:12px}}

.tg-worker-note{margin:14px 0 0;padding:12px 14px;border:1px solid var(--line,#e6e8f0);border-radius:14px;background:var(--soft,#f8f9fc);display:flex;gap:4px;flex-direction:column;font-size:13px}
.tg-worker-note b{color:var(--positive,#2fad78)}
.tg-worker-note span{color:var(--muted,#7d86a3);line-height:1.4}
.tg-actions button:disabled{opacity:.55;cursor:not-allowed}

.tg-config{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:14px 0}
.tg-config label{min-width:0;padding:10px 12px;border-radius:14px;background:var(--soft,#f7f8fc);border:1px solid var(--line,#e8eaf2)}
.tg-config label span{display:block;margin-bottom:5px;font-size:11px;font-weight:700;color:var(--muted,#858da8)}
.tg-config input{width:100%;min-width:0;border:0;outline:0;background:transparent;font:inherit;font-size:15px;font-weight:750;color:var(--text,#12172b);padding:0}
.tg-config input:disabled{opacity:.65}
@media(max-width:430px){.tg-config{gap:8px}.tg-config label{padding:9px 10px}}

/* Grid settings: match MahanPro card language and neutralize iOS form styling */
.tg-config{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
.tg-config label{display:block;min-width:0;padding:10px 12px 11px;border:1px solid #edf0f7;border-radius:16px;background:#f8f9fd;box-shadow:none}
.tg-config label:focus-within{background:#fff;border-color:#b9a8ff;box-shadow:0 0 0 3px rgba(103,61,255,.08)}
.tg-config label span{display:block;margin:0 0 5px;font-size:12px;line-height:1.2;font-weight:700;color:#8b93ad}
.tg-config input{-webkit-appearance:none;appearance:none;display:block;width:100%;min-width:0;height:25px;margin:0;padding:0;border:0!important;border-radius:0!important;outline:0!important;background:transparent!important;box-shadow:none!important;color:#151a31!important;font:inherit;font-size:16px;font-weight:800;line-height:25px}
.tg-config input:disabled{-webkit-text-fill-color:#151a31;color:#151a31!important;opacity:.72}
.tg-worker-note{margin:14px 0 0;padding:12px 14px;border:1px solid #e8ebf4;border-radius:16px;background:#f8f9fd;box-shadow:none}
.tg-worker-note b{font-size:13px;color:#38ae7a}
.tg-worker-note span{margin-top:3px;font-size:12px;color:#8991aa;line-height:1.45}
@media(max-width:430px){
 .tg-config{gap:8px}
 .tg-config label{padding:9px 11px 10px;border-radius:15px}
 .tg-config label span{font-size:11px}
 .tg-config input{font-size:15px}
}

.tg-backtest-result{margin:12px 0;padding:13px;border:1px solid #e8ebf4;border-radius:16px;background:#f8f9fd}
.tg-backtest-result>b{display:block;margin-bottom:10px;font-size:13px}
.tg-backtest-result>div{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.tg-backtest-result span{font-size:10px;color:#8b93ad}.tg-backtest-result strong{display:block;margin-top:2px;font-size:13px;color:#151a31}
.tg-backtest-result small{display:block;margin-top:10px;color:#8b93ad;font-size:10px;line-height:1.35}
.tg-actions:has([data-grid-backtest]){display:grid;grid-template-columns:.8fr 1.2fr 1fr;gap:8px}
@media(max-width:430px){.tg-backtest-result>div{grid-template-columns:repeat(2,1fr)}.tg-actions:has([data-grid-backtest]){grid-template-columns:1fr 1fr}.tg-actions:has([data-grid-backtest]) .secondary{grid-column:1/-1}}

/* Backtest mobile result — explicit selectors for older iOS/WebKit */
.mahan-grid-ui .tg-backtest-result{display:block;margin:16px 0 12px;padding:14px;border:1px solid #e7eaf3;border-radius:18px;background:#f8f9fd;overflow:hidden}
.mahan-grid-ui .tg-backtest-result[hidden]{display:none!important}
.mahan-grid-ui .tg-backtest-result>b{display:block;margin:0 0 12px;color:#171c32;font-size:15px;line-height:1.25;font-weight:800}
.mahan-grid-ui .tg-backtest-result>div{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:8px!important}
.mahan-grid-ui .tg-backtest-result>div>span{display:flex!important;min-width:0;min-height:58px;padding:9px 10px;border-radius:13px;background:#fff;flex-direction:column;justify-content:center;color:#8b93ad;font-size:11px;line-height:1.2}
.mahan-grid-ui .tg-backtest-result>div>span>strong{display:block;margin-top:5px;color:#171c32;font-size:14px;line-height:1.2;font-weight:800;overflow-wrap:anywhere}
.mahan-grid-ui .tg-backtest-result>small{display:block;margin-top:11px;color:#8b93ad;font-size:11px;line-height:1.45}
.mahan-grid-ui .tg-actions{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;gap:9px!important}
.mahan-grid-ui .tg-actions>button{width:100%!important;min-width:0!important;min-height:52px;height:auto!important;padding:10px 8px!important;white-space:normal;line-height:1.15}
.mahan-grid-ui .tg-actions>button.secondary{grid-column:1/-1}
@media(min-width:600px){.mahan-grid-ui .tg-backtest-result>div{grid-template-columns:repeat(3,minmax(0,1fr))!important}.mahan-grid-ui .tg-actions{grid-template-columns:repeat(3,minmax(0,1fr))!important}.mahan-grid-ui .tg-actions>button.secondary{grid-column:auto}}

.tg-order-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:12px 0}
.tg-order-preview>span{min-width:0;padding:9px 10px;border:1px solid #edf0f7;border-radius:13px;background:#f8f9fd}
.tg-order-preview small{display:block;color:#8b93ad;font-size:10px;font-weight:700;line-height:1.2}
.tg-order-preview b{display:block;margin-top:4px;color:#171c32;font-size:12px;line-height:1.25;overflow-wrap:anywhere}
@media(max-width:430px){.tg-order-preview{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Order economics: reuse Mahan stat-card visual language */
.mahan-grid-ui .tg-economics-title{display:flex;align-items:center;justify-content:space-between;margin:14px 0 8px}
.mahan-grid-ui .tg-economics-title b{font-size:13px;color:#171c32}
.mahan-grid-ui .tg-economics-title small{font-size:10px;color:#8b93ad}
.mahan-grid-ui .tg-stats.tg-order-preview{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:0 0 12px!important}
.mahan-grid-ui .tg-stats.tg-order-preview>span{display:block!important;min-width:0!important;padding:10px 12px!important;border:1px solid #edf0f7!important;border-radius:14px!important;background:#f8f9fd!important}
.mahan-grid-ui .tg-stats.tg-order-preview>span>small{display:block!important;margin:0!important;color:#8b93ad!important;font-size:10px!important;font-weight:700!important;line-height:1.2!important}
.mahan-grid-ui .tg-stats.tg-order-preview>span>b{display:block!important;margin-top:5px!important;color:#171c32!important;font-size:13px!important;font-weight:800!important;line-height:1.25!important;overflow-wrap:anywhere!important}
@media(min-width:700px){.mahan-grid-ui .tg-stats.tg-order-preview{grid-template-columns:repeat(3,minmax(0,1fr))!important}}

.mahan-grid-ui .tg-mode-banner{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:12px 0;padding:10px 12px;border-radius:14px;border:1px solid #e8ebf4;background:#f8f9fd}
.mahan-grid-ui .tg-mode-banner b{font-size:12px;line-height:1.3;white-space:nowrap}
.mahan-grid-ui .tg-mode-banner span{font-size:10px;line-height:1.4;text-align:right;color:#8b93ad}
.mahan-grid-ui .tg-mode-banner.tracking-only b{color:#7565c9}
.mahan-grid-ui .tg-mode-banner.orders-on{border-color:#caeadc;background:#f3fbf7}
.mahan-grid-ui .tg-mode-banner.orders-on b{color:#239a68}
@media(max-width:430px){.mahan-grid-ui .tg-mode-banner{display:block}.mahan-grid-ui .tg-mode-banner span{display:block;margin-top:3px;text-align:left}}

.mahan-bot-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin:0 0 14px;padding:0;color:inherit}
.mahan-bot-summary>span{display:block;min-width:0;padding:12px 14px;border:1px solid #e9ecf4;border-radius:14px;background:#fff}
.mahan-bot-summary small{display:block;color:#949cb0;font-size:8px;font-weight:800}
.mahan-bot-summary b{display:block;margin-top:5px;color:#20283d;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mahan-bot-summary b.positive{color:#27aa7c}
.mahan-bot-summary b.negative{color:#d35764}
@media(max-width:430px){.mahan-bot-summary{gap:7px}.mahan-bot-summary>span{padding:10px 9px}.mahan-bot-summary b{font-size:11px}.mahan-bot-summary small{font-size:7px}}

.grid-stop-backdrop{position:fixed;inset:0;z-index:2100;background:rgba(15,20,38,.34);backdrop-filter:blur(5px)}
.grid-stop-sheet{position:fixed;left:50%;bottom:0;z-index:2101;width:min(560px,100%);transform:translateX(-50%);padding:10px 16px calc(18px + env(safe-area-inset-bottom));border-radius:24px 24px 0 0;background:#fff;box-shadow:0 -22px 60px rgba(22,29,52,.18)}
.grid-stop-handle{width:42px;height:4px;margin:0 auto 12px;border-radius:999px;background:#d9deeb}
.grid-stop-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;margin-bottom:12px}
.grid-stop-head span{min-width:0}
.grid-stop-head b{display:block;color:#182036;font-size:18px;letter-spacing:-.3px}
.grid-stop-head small{display:block;margin-top:4px;color:#8d95aa;font-size:11px}
.grid-stop-head button{width:34px;height:34px;flex:0 0 34px;border:0;border-radius:10px;background:#f3f5fa;color:#65708b;font-size:22px}
.grid-stop-option{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;margin-top:9px;padding:14px 14px;border:1px solid #e7ebf4;border-radius:16px;background:#fff;text-align:left}
.grid-stop-option span{min-width:0}
.grid-stop-option b{display:block;font-size:14px}
.grid-stop-option small{display:block;margin-top:4px;color:#8e96aa;font-size:10px;line-height:1.45}
.grid-stop-option small em{font-style:normal;font-weight:900}
.grid-stop-option strong{font-size:22px;font-weight:500}
.grid-stop-option.keep{border-color:#ded7ff;background:#f8f6ff}
.grid-stop-option.keep b,
.grid-stop-option.keep strong{color:#643cff}
.grid-stop-option.close-position{border-color:#f0d0d5;background:#fff8f9}
.grid-stop-option.close-position b,
.grid-stop-option.close-position strong{color:#c64658}
.grid-stop-option:disabled{opacity:.55;pointer-events:none}
.grid-stop-note{margin:11px 4px 0;color:#98a0b2;font-size:9px;line-height:1.45}
@media(min-width:700px){.grid-stop-sheet{bottom:24px;border-radius:24px}.grid-stop-backdrop{background:rgba(15,20,38,.28)}}


/* Mobile viewport polish: stable header offset and safe toast placement */
@media (max-width:760px){
  html{scroll-padding-top:54px}
  .topbar{transform:translateZ(0)}
  .toast{
    bottom:calc(70px + var(--safe));
    max-width:calc(100vw - 32px);
    text-align:center;
  }
}
