/* ==========================================================
   Zaka Exchange — 桌面交易终端(现货页专业三栏布局)
   仅在 width >= 1024px 且 .currency-page[data-zk-term] 时生效
   移动端零影响(整段在媒体查询里)
   ========================================================== */
@media (min-width: 1024px) {

/* 终端层生效时:隐藏站点原生 K 线组件(客户反馈「图下面多出来的小图」,
   它和终端层图表叠在同一个位置,还会吃掉拖拽手势) —— 纯 CSS,不改 Vue 节点 */
body.zk-term .currency-page .kline-shell,
body.zk-term .currency-page .kline-canvas,
body.zk-term .currency-page .kline-tab,
body.zk-term .currency-page .kline-options,
body.zk-term .currency-page .kline-scroll { display: none !important; }

/* 站点自带盘口面板无数据,且其 DOM 归 Vue 管,终端层不再接管它,改用自建盘口面板 */
.currency-page[data-zk-term] .depth-panel { display: none !important; }

/* 自建盘口面板 */
.zk-tc-depth {
  display: flex; flex-direction: column; height: 452px; overflow: hidden;
  background: var(--zk-panel, #0e131c) !important;
  border: 1px solid var(--zk-line, rgba(255,255,255,.07)) !important;
  border-radius: 12px !important;
}
.zk-tc-depth__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 4px;
  height: 26px; padding: 0 10px; align-items: center;
  font-size: 11px; color: var(--zk-soft, #8b96a7);
  border-bottom: 1px solid var(--zk-line, rgba(255,255,255,.07));
}
.zk-tc-depth__head span:last-child { text-align: right; }
.zk-tc-depth__asks, .zk-tc-depth__bids { padding: 2px 0; }
.zk-tc-depth__mid {
  height: 30px; display: flex; align-items: center; padding: 0 10px;
  font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--zk-txt, #eaf0f8);
  border-top: 1px solid var(--zk-line, rgba(255,255,255,.07));
  border-bottom: 1px solid var(--zk-line, rgba(255,255,255,.07));
}

.currency-page[data-zk-term] {
  display: grid !important;
  width: calc(100vw - var(--zk-side-w, 224px) - 40px) !important;
  max-width: 1720px !important;
  margin: 0 auto !important;
  padding: 0 0 26px !important;
  gap: 12px !important;
  align-items: start !important;
  grid-template-columns: 250px minmax(0, 1fr) 336px;
  grid-template-areas:
    "top    top    top"
    "coins  chart  book"
    "coins  chart  trades"
    "coins  bottom form";
}
@media (min-width: 1024px) and (max-width: 1279px) {
  .currency-page[data-zk-term] {
    grid-template-columns: 196px minmax(0, 1fr) 296px;
  }
}
@media (min-width: 1600px) {
  .currency-page[data-zk-term] {
    grid-template-columns: 262px minmax(0, 1fr) 380px;
  }
}

/* 未指定区域的直系子元素默认横跨整行,避免跑版
   (站点自带 CSS 有 `:is(....currency-page) > :not(...)` 会把直系子元素宽度写死,
    这里必须一并覆盖,否则网格项会溢出列宽) */
.currency-page[data-zk-term] > * {
  grid-column: 1 / -1; min-width: 0;
  width: 100% !important; max-width: none !important; justify-self: stretch !important;
}
/* .trade-shell 内的两个面板经 display:contents 后也成了网格项,同样给满宽 */
.currency-page[data-zk-term] .depth-panel,
.currency-page[data-zk-term] .form-panel {
  width: 100% !important; max-width: none !important; justify-self: stretch !important;
}
.currency-page[data-zk-term] > .currency-topbar {
  grid-area: top; max-width: none !important; margin: 0 !important; width: 100% !important;
  background: var(--zk-panel, #0e131c); border: 1px solid var(--zk-line, rgba(255,255,255,.07));
  border-radius: 12px; padding: 0 14px !important;
}
/* .trade-shell 只做容器,展开成网格项 */
.currency-page[data-zk-term] .trade-shell { display: contents !important; }
.currency-page[data-zk-term] .depth-panel { grid-area: book; height: 452px !important; }
.currency-page[data-zk-term] .form-panel { grid-area: form; }
.currency-page[data-zk-term] .lower-panel { grid-area: bottom; max-width: none !important; align-self: stretch !important; margin-top: 0 !important; }
.currency-page[data-zk-term] > .zk-tc-coins { grid-area: coins; }
.currency-page[data-zk-term] > .zk-tc-depth { grid-area: book; }
.currency-page[data-zk-term] > .zk-tc-chart { grid-area: chart; }
.currency-page[data-zk-term] > .zk-tc-trades { grid-area: trades; }

/* 面板统一质感 */
.currency-page[data-zk-term] .depth-panel,
.currency-page[data-zk-term] .form-panel,
.currency-page[data-zk-term] .lower-panel,
.zk-tc-coins,
.zk-tc-chart,
.zk-tc-trades,
.zk-tc-depth {
  background: var(--zk-panel, #0e131c) !important;
  border: 1px solid var(--zk-line, rgba(255,255,255,.07)) !important;
  border-radius: 12px !important;
}

/* ---------- 左侧币种列表 ---------- */
.zk-tc-coins {
  display: flex; flex-direction: column;
  position: sticky; top: 10px;
  max-height: calc(100vh - 96px);
  overflow: hidden; padding: 0;
}
.zk-tc-coins__search { padding: 10px; border-bottom: 1px solid var(--zk-line, rgba(255,255,255,.07)); }
.zk-tc-coins__search input {
  width: 100%; box-sizing: border-box; height: 32px; padding: 0 10px;
  background: #0b0f16; border: 1px solid var(--zk-line, rgba(255,255,255,.07));
  border-radius: 8px; color: var(--zk-txt, #eaf0f8); font-size: 12px; outline: none;
}
.zk-tc-coins__search input::placeholder { color: #5d6878; }
.zk-tc-coins__head, .zk-tc-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 86px 62px; gap: 6px;
  align-items: center; padding: 0 10px;
}
.zk-tc-coins__head { height: 28px; font-size: 11px; color: var(--zk-soft, #8b96a7); border-bottom: 1px solid var(--zk-line, rgba(255,255,255,.07)); }
.zk-tc-coins__head span:nth-child(2), .zk-tc-coins__head span:nth-child(3) { text-align: right; }
.zk-tc-coins__body { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 0 6px; }
.zk-tc-coins__body::-webkit-scrollbar { width: 6px; }
.zk-tc-coins__body::-webkit-scrollbar-thumb { background: #ffffff1a; border-radius: 3px; }
.zk-tc-row { height: 36px; font-size: 12px; cursor: pointer; border-radius: 6px; margin: 0 4px; }
.zk-tc-row:hover { background: #ffffff0a; }
.zk-tc-row.is-active { background: linear-gradient(90deg, rgba(29,174,254,.16), rgba(29,174,254,.02)); box-shadow: inset 2px 0 0 #1daefe; }
.zk-tc-row__name { font-weight: 600; color: var(--zk-txt, #eaf0f8); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.zk-tc-row__name small { color: var(--zk-soft, #8b96a7); font-weight: 400; font-size: 10px; margin-left: 3px; }
.zk-tc-row__price, .zk-tc-row__chg { text-align: right; font-variant-numeric: tabular-nums; }
.zk-tc-row__price { color: #c8d2e0; }

/* ---------- 中间图表 ---------- */
.zk-tc-chart { display: flex; flex-direction: column; align-self: stretch; min-height: 480px; max-height: min(760px, calc(100vh - 110px)); overflow: hidden; }
.zk-tc-quote { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; padding: 12px 14px 10px; }
.zk-tc-q__pair { font-size: 15px; font-weight: 700; color: var(--zk-txt, #eaf0f8); display: flex; align-items: baseline; gap: 4px; }
.zk-tc-q__pair span { font-size: 12px; color: var(--zk-soft, #8b96a7); font-weight: 500; }
.zk-tc-q__pair i { font-style: normal; font-size: 10px; color: #1daefe; background: rgba(29,174,254,.14); border-radius: 4px; padding: 1px 5px; margin-left: 4px; font-weight: 500; }
.zk-tc-q__last { font-size: 24px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.zk-tc-q__stats { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.zk-tc-stat { font-size: 11px; color: var(--zk-soft, #8b96a7); line-height: 1.5; }
.zk-tc-stat b { display: block; font-size: 12px; color: var(--zk-txt, #eaf0f8); font-weight: 600; font-variant-numeric: tabular-nums; }
.zk-tc-periods { display: flex; align-items: center; gap: 2px; padding: 6px 10px; border-top: 1px solid var(--zk-line, rgba(255,255,255,.07)); border-bottom: 1px solid var(--zk-line, rgba(255,255,255,.07)); }
.zk-tc-pbtn {
  border: 0; background: none; color: var(--zk-soft, #8b96a7); cursor: pointer;
  font-size: 12px; font-family: inherit; padding: 4px 9px; border-radius: 6px; line-height: 1.4;
}
.zk-tc-pbtn:hover { color: var(--zk-txt, #eaf0f8); background: #ffffff0a; }
.zk-tc-pbtn.is-active { color: #1daefe; background: rgba(29,174,254,.14); font-weight: 600; }
.zk-tc-cvwrap { position: relative; flex: 1 1 auto; min-height: 340px; }
.zk-tc-canvas { display: block; width: 100%; height: 100%; cursor: crosshair; }
.zk-tc-tip {
  position: absolute; left: 10px; top: 8px; pointer-events: none;
  font-size: 10px; line-height: 1.7; color: #9aa6b6; font-variant-numeric: tabular-nums;
}
.zk-tc-tip__ma span { margin-right: 12px; }
.zk-tc-tip__ohlc em { font-style: normal; margin-right: 10px; color: #7c8798; }
.zk-tc-tip__ohlc em u { text-decoration: none; color: #c8d2e0; margin-left: 3px; }
.zk-tc-tip__ohlc i { font-style: normal; color: #7c8798; margin-right: 10px; }

/* ---------- 右上:全站交易 ---------- */
.zk-tc-trades {
  grid-area: trades;
  display: flex; flex-direction: column; height: 320px; overflow: hidden;
  align-self: start;
}
.zk-tc-panel-title {
  height: 32px; display: flex; align-items: center; padding: 0 12px;
  font-size: 12px; font-weight: 600; color: var(--zk-txt, #eaf0f8);
  border-bottom: 1px solid var(--zk-line, rgba(255,255,255,.07)); flex: none;
}
.zk-tc-trades__cols, .zk-tc-tr {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 4px; padding: 0 12px; align-items: center;
}
.zk-tc-trades__cols { height: 26px; font-size: 11px; color: var(--zk-soft, #8b96a7); }
.zk-tc-trades__cols span:nth-child(2), .zk-tc-trades__cols span:nth-child(3),
.zk-tc-tr span:nth-child(2), .zk-tc-tr span:nth-child(3) { text-align: right; }
.zk-tc-trades__body { flex: 1; overflow-y: auto; overflow-x: hidden; padding-bottom: 4px; }
.zk-tc-trades__body::-webkit-scrollbar { width: 6px; }
.zk-tc-trades__body::-webkit-scrollbar-thumb { background: #ffffff1a; border-radius: 3px; }
.zk-tc-tr { height: 22px; font-size: 11.5px; color: #aab5c4; font-variant-numeric: tabular-nums; }
.zk-tc-tr span:nth-child(1) { color: #7c8798; }

.zk-tc-empty { padding: 18px 12px; text-align: center; font-size: 12px; color: #5d6878; }

/* 涨跌统一(沿用站点红涨绿跌) */
.zk-tc-chart .is-up, .zk-tc-coins .is-up, .zk-tc-trades .is-up, .zk-tc-quote .is-up { color: #ff5b6e !important; }
.zk-tc-chart .is-down, .zk-tc-coins .is-down, .zk-tc-trades .is-down, .zk-tc-quote .is-down { color: #14c784 !important; }

/* 盘口行(卖盘在上、买盘在下,背景深度条从右侧生长) */
.zk-tc-depth .zk-tc-drow {
  position: relative !important; display: flex !important; align-items: center !important;
  justify-content: space-between !important; height: 19px !important; line-height: 19px !important;
  padding: 0 8px !important; font-size: 11px !important; overflow: hidden; cursor: default;
  font-variant-numeric: tabular-nums; box-sizing: border-box !important;
}
.zk-tc-depth .zk-tc-drow i {
  position: absolute; top: 1px; bottom: 1px; right: 0; border-radius: 2px; pointer-events: none; z-index: 0;
}
.zk-tc-depth .zk-tc-drow.zk-ask i { background: rgba(255, 91, 110, .13); }
.zk-tc-depth .zk-tc-drow.zk-bid i { background: rgba(20, 199, 132, .13); }
.zk-tc-depth .zk-tc-drow span { position: relative; z-index: 1; }
.zk-tc-depth .zk-tc-drow.zk-ask .zk-tc-dp { color: #ff5b6e; }
.zk-tc-depth .zk-tc-drow.zk-bid .zk-tc-dp { color: #14c784; }
.zk-tc-depth .zk-tc-dq { color: var(--zk-soft, #8b96a7); }
.zk-tc-depth .zk-tc-drow:hover { background: rgba(255, 255, 255, .045); }
.zk-tc-zoomhint {
  margin-left: auto; font-size: 10px; color: #5d6878; letter-spacing: .2px;
}
.zk-tc-canvas.is-grabbing { cursor: grabbing !important; }

}
JUMP_ROUTE: direct
