:root {
  color-scheme: dark;
  --bg: #080b12;
  --bg-soft: #0d1320;
  --panel: rgba(17, 24, 39, 0.84);
  --panel-solid: #111827;
  --panel-2: #162033;
  --line: rgba(148, 163, 184, 0.14);
  --line-strong: rgba(148, 163, 184, 0.26);
  --text: #edf2f7;
  --muted: #a8b4c5;
  --faint: #8b9ab0;
  --green: #49d17d;
  --red: #ff7b8d;
  --yellow: #f3c969;
  --blue: #72b7ff;
  --purple: #b79cff;
  --shadow: 0 14px 42px rgba(0, 0, 0, 0.24);
  --font-sans: Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", "SF Pro Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-num: "SF Pro Text", Pretendard, "Noto Sans KR", "Apple SD Gothic Neo", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-xs: 0.68rem;
  --fs-sm: 0.74rem;
  --fs-base: 0.81rem;
  --fs-md: 0.88rem;
  --fs-lg: 1.00rem;
  --fs-xl: 1.24rem;
}

* { box-sizing: border-box; }

html { min-height: 100%; }
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font-sans);
  font-size: 13px;
  line-height: 1.36;
  letter-spacing: -0.012em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background:
    radial-gradient(circle at 20% -12%, rgba(114, 183, 255, 0.18), transparent 34rem),
    radial-gradient(circle at 86% 4%, rgba(73, 209, 125, 0.10), transparent 30rem),
    linear-gradient(180deg, #0c111c 0%, var(--bg) 72%);
  color: var(--text);
}

button, input, select { font: inherit; }
.app-shell {
  display: grid;
  grid-template-columns: 176px minmax(0, 1fr);
  gap: 8px;
  width: calc(100% - 8px);
  margin: 0 auto;
  align-items: start;
}
.dashboard-content { min-width: 0; }
.hero, main, footer { width: 100%; margin: 0 auto; }
.sidebar {
  position: sticky;
  top: 8px;
  z-index: 10;
  display: grid;
  gap: 12px;
  max-height: calc(100vh - 16px);
  overflow: auto;
  padding: 10px;
  margin-top: 8px;
  background: rgba(10, 15, 25, 0.88);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f6feb, #2dbf7b);
  color: #fff;
  font-weight: 860;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.30);
}
.sidebar-brand strong {
  display: block;
  color: #f8fafc;
  font-size: var(--fs-base);
  line-height: 1.1;
  font-weight: 820;
  white-space: nowrap;
}
.sidebar-brand span:not(.brand-mark) {
  display: block;
  margin-top: 2px;
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 690;
  letter-spacing: 0;
  white-space: nowrap;
}
.side-nav { display: grid; gap: 10px; }
.nav-group { display: grid; gap: 5px; min-width: 0; }
.nav-group > strong {
  color: var(--faint);
  font-size: 0.67rem;
  font-weight: 790;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 29px;
  width: 100%;
  padding: 5px 7px;
  color: #dbe7f5;
  text-decoration: none;
  text-align: left;
  background: rgba(15, 23, 42, 0.52);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: var(--fs-sm);
  font-weight: 760;
  line-height: 1.18;
}
.nav-item.is-active {
  color: #fff;
  background: rgba(31, 47, 72, 0.96);
  border-color: rgba(114, 183, 255, 0.62);
  box-shadow: inset 3px 0 0 var(--blue);
}
.nav-item:not(.is-active):hover,
.nav-item:not(.is-active):focus-visible {
  color: #fff;
  background: rgba(24, 37, 58, 0.84);
  border-color: rgba(114, 183, 255, 0.42);
  outline: none;
}
.nav-item.is-disabled {
  cursor: not-allowed;
  color: rgba(168, 180, 197, 0.62);
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(148, 163, 184, 0.09);
}
.nav-item span {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 1px 5px;
  border-radius: 999px;
  color: rgba(243, 201, 105, 0.78);
  background: rgba(243, 201, 105, 0.08);
  font-size: 0.64rem;
  font-weight: 780;
  line-height: 1;
  white-space: nowrap;
}
.terminal-status {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 2px 0;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-family: var(--font-num);
  font-size: 0.58rem;
  font-weight: 760;
  letter-spacing: 0.06em;
  white-space: nowrap;
}
.terminal-status i {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(73, 209, 125, 0.55);
}
.hero {
  display: block;
  padding: 12px 0 8px;
}
.hero-copy { min-width: 0; }
.hero-title-row {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  flex-wrap: wrap;
}
.hero-title-row h1 { min-width: 0; }
.title-refresh {
  --remain: 100;
  --refresh-color: #49d17d;
  --refresh-track: rgba(73, 209, 125, 0.14);
  --refresh-size: 20px;
  --refresh-stroke: 1.5;
  position: relative;
  flex: 0 0 auto;
  width: var(--refresh-size);
  height: var(--refresh-size);
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 0;
  color: #eafff2;
  line-height: 1;
}
.title-refresh > svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.title-refresh .refresh-track-ring,
.title-refresh .refresh-progress-ring {
  fill: none;
  stroke-width: var(--refresh-stroke);
}
.title-refresh .refresh-track-ring { stroke: var(--refresh-track); }
.title-refresh .refresh-progress-ring {
  stroke: var(--refresh-color);
  stroke-linecap: round;
  stroke-dasharray: var(--remain) 100;
  transform-box: view-box;
  transform: scaleX(-1) rotate(-90deg);
  transform-origin: 50% 50%;
}
.refresh-count {
  position: relative;
  z-index: 1;
  width: 14px;
  height: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: currentColor;
  font-family: var(--font-num);
  font-size: 0.50rem;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  text-align: center;
  transform: translateY(0.5px);
}
.title-refresh.loading {
  --refresh-color: #f3c969;
  --refresh-track: rgba(243, 201, 105, 0.15);
  color: #fff1bb;
}
.title-refresh.error {
  --refresh-color: #ff7b8d;
  --refresh-track: rgba(255, 123, 141, 0.15);
  color: #ffd9df;
}
.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: var(--fs-xs);
  font-weight: 720;
}
h1 {
  margin: 0;
  font-size: clamp(1.45rem, 2.4vw, 2.05rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
}
.lede {
  margin: 8px 0 0;
  color: #b8c4d8;
  max-width: 760px;
  line-height: 1.42;
  font-size: var(--fs-md);
}

.summary-card, .summary-detail, .table-wrap, .orderbook-side, .market-pulse-side {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow);
}
input, select {
  width: 100%;
  min-height: 32px;
  color: var(--text);
  background: rgba(7, 10, 18, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 5px 8px;
  outline: none;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.14); }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}
.summary-grid:empty { display: none; }
.summary-card {
  position: relative;
  min-height: 60px;
  overflow: hidden;
  padding: 7px 9px;
  text-align: left;
  color: inherit;
  appearance: none;
}
.summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.035), transparent 58%);
  pointer-events: none;
}
.summary-card small { display: block; margin-bottom: 4px; color: var(--muted); font-size: 0.68rem; font-weight: 680; letter-spacing: -0.01em; }
.summary-card strong { display: block; font-size: 1.12rem; line-height: 1.04; letter-spacing: -0.03em; font-weight: 780; }
.summary-card span { display: block; margin-top: 4px; color: var(--faint); font-size: 0.67rem; font-weight: 620; line-height: 1.26; }
.summary-card.good strong { color: var(--green); }
.summary-card.warn strong { color: var(--yellow); }
.summary-card.bad strong { color: var(--red); }
.summary-card.log strong { color: #c4b5fd; }
.summary-card.refresh strong { color: var(--blue); }
.summary-clickable { cursor: pointer; }
.summary-clickable:hover, .summary-card.is-active { border-color: rgba(114, 183, 255, 0.56); background: rgba(24, 34, 52, 0.92); }
.summary-card.is-active::after { content: ""; position: absolute; left: 16px; right: 16px; bottom: 0; height: 3px; border-radius: 999px 999px 0 0; background: var(--blue); }
.refresh-visual { display: flex; align-items: center; margin-top: 5px; }
.refresh-track {
  position: relative;
  display: block;
  flex: 1;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
}
.refresh-track i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transform-origin: left center;
  animation: refreshSweep 10s linear infinite;
}
.summary-card.refresh.loading .refresh-track i {
  animation: none;
  transform: scaleX(1);
  background: linear-gradient(90deg, var(--yellow), var(--green));
}
.summary-card.refresh.error .refresh-track i { animation: none; transform: scaleX(1); background: var(--red); }
@keyframes refreshSweep { from { transform: scaleX(0); } to { transform: scaleX(1); } }

.summary-detail {
  grid-column: 1 / -1;
  margin-top: -2px;
  padding: 11px;
}
.summary-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.summary-detail-head strong { font-size: var(--fs-md); font-weight: 800; letter-spacing: -0.02em; }
.summary-detail-head button {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  color: var(--text);
  background: #1e293b;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: var(--fs-sm);
  line-height: 1;
}
.summary-detail-head button:hover { border-color: rgba(114, 183, 255, 0.56); background: rgba(30, 41, 59, 0.92); }
.summary-detail-head button span { display: block; line-height: 1; transform: translateY(0); }
.blocklist-list { display: flex; flex-wrap: wrap; gap: 8px; max-height: none; overflow: visible; }
.blocklist-list span { display: inline-flex; align-items: baseline; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; color: #d7e0ec; background: #0b1020; font-size: var(--fs-sm); font-weight: 760; letter-spacing: -0.015em; }
.blocklist-list span small { color: var(--faint); font-size: var(--fs-xs); font-weight: 720; letter-spacing: 0; }
.blocklist-list em { color: var(--muted); font-size: 0.82rem; font-style: normal; }
.summary-text-body, .summary-log-body { display: block; }
.summary-text-detail { color: var(--muted); font-size: var(--fs-sm); line-height: 1.6; }
.summary-log-list { display: grid; gap: 7px; list-style: none; margin: 0; padding: 0; }
.summary-log-list li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.summary-log-list time { flex: 0 0 auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.summary-log-list li.event span { color: var(--text); }
.summary-log-list li.ok span { color: var(--green); }
.summary-log-list li.error span { color: var(--red); }
.period-log-section { display: grid; gap: 9px; margin-bottom: 12px; }
.period-log-section:last-child { margin-bottom: 0; }
.period-log-section > strong { color: var(--text); font-size: var(--fs-sm); font-weight: 840; }
.period-log-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.period-log-card { display: grid; gap: 3px; padding: 9px 10px; border: 1px solid var(--line); border-radius: 12px; background: rgba(7, 10, 18, 0.45); }
.period-log-card small { color: var(--faint); font-size: 0.7rem; font-weight: 760; }
.period-log-card strong { font-size: var(--fs-base); line-height: 1.15; font-weight: 840; }
.period-log-card span { color: var(--muted); font-size: 0.72rem; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.event-log {
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.72);
  box-shadow: var(--shadow);
}
.event-log-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.event-log-head strong { font-size: var(--fs-md); font-weight: 820; letter-spacing: -0.02em; }
.event-log-head span { color: var(--faint); font-size: var(--fs-xs); font-weight: 680; }
.event-log ul { display: grid; gap: 6px; list-style: none; margin: 0; padding: 0; }
.event-log li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: var(--fs-sm); line-height: 1.45; }
.event-log time { flex: 0 0 auto; color: var(--faint); font-variant-numeric: tabular-nums; }
.event-log li.event span { color: var(--text); }
.event-log li.ok span { color: var(--green); }
.event-log li.error span { color: var(--red); }

.market-layout {
  display: grid;
  grid-template-columns: max-content minmax(280px, 304px) minmax(208px, 232px);
  gap: 8px;
  align-items: stretch;
}
.asset-list-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.table-wrap { overflow: auto; min-width: 0; }
.asset-tabs {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-height: 34px;
  margin: 0;
}
.table-tools .asset-tabs { min-height: 26px; }
.asset-compact-menu { position: relative; }
.asset-menu-trigger {
  cursor: pointer;
  justify-content: center;
}
.tool-control.asset-menu-trigger {
  min-width: 68px;
  color: var(--tool-control-value-color);
}
.asset-menu-trigger b { color: var(--tool-control-label-color); font-size: var(--tool-control-label-size); font-weight: var(--tool-control-weight); line-height: 1; }
.asset-menu-trigger i { color: var(--tool-control-icon-color); font-style: normal; font-size: 0.60rem; line-height: 1; }
.tool-control:hover,
.asset-compact-menu.is-open .asset-menu-trigger {
  border-color: rgba(114, 183, 255, 0.42);
  background: rgba(24, 34, 52, 0.70);
}
.asset-menu-pop {
  position: absolute;
  top: calc(100% + 7px);
  left: 0;
  z-index: 20;
  display: grid;
  gap: 3px;
  width: 170px;
  padding: 6px;
  border: 1px solid rgba(130, 153, 192, 0.25);
  border-radius: 14px;
  background: #111b31;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}
.table-tools .asset-menu-pop,
.history-head-inline .history-menu-pop {
  left: auto;
  right: 0;
}
.asset-menu-pop[hidden] { display: none; }
.asset-menu-item {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #aebbd1;
  font-size: var(--fs-sm);
  font-weight: 760;
  line-height: 1;
  text-align: left;
}
.asset-menu-item b { color: var(--faint); font-size: 0.68rem; font-weight: 820; }
.asset-menu-item:hover { background: rgba(255, 255, 255, 0.06); color: #e8f3ff; }
.asset-menu-item.is-active { background: rgba(114, 183, 255, 0.15); color: #fff; }
.asset-menu-item.is-active b { color: inherit; }
.asset-tab-detail:empty { display: none; }
.asset-tab-detail {
  position: sticky;
  left: 0;
  z-index: 3;
  display: grid;
  gap: 7px;
  max-width: 100%;
  max-height: 156px;
  overflow: auto;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 10, 18, 0.64);
}
.asset-tab-detail-bottom {
  position: sticky;
  left: 0;
  margin-top: 0;
  border-top: 1px solid rgba(139, 162, 196, 0.16);
  border-bottom: 0;
  background: rgba(7, 10, 18, 0.38);
}
.page-status-line {
  position: static;
  left: auto;
  z-index: auto;
  display: block;
  max-width: none;
  max-height: none;
  overflow: visible;
  margin-top: 3px;
  padding: 0 2px;
  border: 0;
  background: transparent;
}
.asset-tab-detail-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
}
.asset-tab-detail-head strong { font-size: var(--fs-sm); font-weight: 840; }
.asset-tab-detail-head small { color: var(--faint); font-size: 0.65rem; font-weight: 720; }
.asset-chip-list { display: flex; flex-wrap: wrap; gap: 5px; }
.asset-chip-list span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  padding: 3px 7px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.62);
  color: #dbe7f5;
  font-size: 0.68rem;
  font-weight: 760;
}
.asset-chip-list span small { color: var(--faint); font-size: 0.60rem; font-weight: 720; }
.asset-chip-list em { color: var(--muted); font-size: var(--fs-sm); font-style: normal; }
.block-status-plain {
  padding: 5px 8px;
  color: var(--faint);
  font-size: 0.66rem;
  font-weight: 720;
  line-height: 1.35;
  letter-spacing: -0.01em;
  white-space: normal;
}
.block-status-plain.ok { color: rgba(203, 213, 225, 0.88); }
.block-status-plain.warn { color: #fecaca; }
/*
 * Shared toolbar control template.
 * Add `.tool-control` to any toolbar button/label so height, padding,
 * colors, hover, and focus ring update together from the variables below.
 */
:where(.table-tools, .history-toolbar) {
  --tool-control-height: 34px;
  --tool-control-gap: 6px;
  --tool-control-padding-x: 11px;
  --tool-control-radius: 10px;
  --tool-control-border: rgba(148, 163, 184, 0.20);
  --tool-control-bg: rgba(18, 27, 45, 0.62);
  --tool-control-label-color: #a9b8ce;
  --tool-control-icon-color: #95a7bf;
  --tool-control-value-color: #dbe7f5;
  --tool-control-accent-color: #f0cf78;
  --tool-control-font-size: 0.78rem;
  --tool-control-label-size: 0.70rem;
  --tool-control-weight: 780;
  --tool-control-value-weight: 820;
  --tool-control-focus-border: rgba(114, 183, 255, 0.62);
  --tool-control-focus-shadow: 0 0 0 3px rgba(96, 165, 250, 0.10);
}
.table-tools {
  --tool-control-height: 26px;
  --tool-control-gap: 4px;
  --tool-control-padding-x: 7px;
  --tool-control-radius: 8px;
  --tool-control-font-size: 0.72rem;
  --tool-control-label-size: 0.64rem;
}
.history-head-inline {
  --tool-control-height: 26px;
  --tool-control-gap: 4px;
  --tool-control-padding-x: 7px;
  --tool-control-radius: 8px;
  --tool-control-font-size: 0.72rem;
  --tool-control-label-size: 0.64rem;
}
.history-head-inline .history-toolbar {
  --tool-control-height: 26px;
  --tool-control-gap: 4px;
  --tool-control-padding-x: 7px;
  --tool-control-radius: 8px;
  --tool-control-font-size: 0.72rem;
  --tool-control-label-size: 0.64rem;
}
.table-tools {
  position: sticky;
  left: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 6px;
  width: max-content;
  min-width: 100%;
  padding: 4px 7px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 28, 0.74);
  backdrop-filter: blur(10px);
}
.table-title {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1 1 auto;
  min-width: 0;
  padding: 0 1px;
  color: var(--text);
}
.table-title strong {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 840;
  letter-spacing: -0.02em;
  white-space: nowrap;
}
.table-toolbar-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
}
.table-tools .title-refresh { --refresh-size: 17px; --refresh-stroke: 1.4; }
.table-tools .refresh-count { width: 12px; height: 12px; font-size: 0.46rem; }
.tool-control {
  display: inline-flex;
  align-items: center;
  gap: var(--tool-control-gap);
  min-width: 0;
  min-height: var(--tool-control-height);
  padding: 0 var(--tool-control-padding-x);
  border: 1px solid var(--tool-control-border);
  border-radius: var(--tool-control-radius);
  background: var(--tool-control-bg);
  color: var(--tool-control-label-color);
  font-size: var(--tool-control-font-size);
  font-weight: var(--tool-control-weight);
  line-height: 1;
  letter-spacing: -0.01em;
}
.tool-control:focus-within {
  border-color: var(--tool-control-focus-border);
  box-shadow: var(--tool-control-focus-shadow);
}
.tool-control input:focus,
.tool-control input:focus-visible {
  border-color: transparent;
  box-shadow: none;
  outline: none;
}
.search-tool {
  position: relative;
  flex: 0 0 auto;
  width: 26px;
  --search-expanded-width: 26px;
  --search-input-width: 0px;
  justify-content: center;
  overflow: hidden;
  transition: width 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}
.search-tool:focus-within {
  width: var(--search-expanded-width);
  justify-content: flex-start;
}
.search-tool span { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 1em; flex: 0 0 auto; color: var(--tool-control-label-color); font-size: 0.96rem; line-height: 1; transform: none; }
.search-tool input {
  width: 0;
  min-width: 0;
  max-width: 0;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tool-control-value-color);
  font-size: var(--tool-control-font-size);
  font-weight: var(--tool-control-weight);
  line-height: 1;
  opacity: 0;
  transition: width 160ms ease, max-width 160ms ease, opacity 120ms ease;
}
.search-tool input::placeholder { color: var(--tool-control-icon-color); opacity: 1; }
.search-tool:focus-within input,
.search-tool input:not(:placeholder-shown) {
  width: var(--search-input-width);
  max-width: var(--search-input-width);
  opacity: 1;
}
.search-tool:has(input:not(:placeholder-shown)) {
  width: var(--search-expanded-width);
  justify-content: flex-start;
}
.point-tool {
  flex: 0 0 auto;
  white-space: nowrap;
}
.point-tool span { color: var(--tool-control-label-color); font-size: var(--tool-control-label-size); font-weight: var(--tool-control-weight); line-height: 1; }
.point-tool input {
  width: calc(var(--point-input-ch, 7ch) + 2px);
  min-width: 1ch;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--tool-control-accent-color);
  text-align: right;
  font-size: 0.76rem;
  font-weight: var(--tool-control-value-weight);
  line-height: 1;
}
.point-tool b { color: var(--tool-control-accent-color); font-size: 0.66rem; font-weight: var(--tool-control-value-weight); line-height: 1; }
.orderbook-side {
  position: sticky;
  top: 68px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  padding: 9px;
  min-height: 190px;
  overflow: hidden;
}
.market-pulse-side {
  position: sticky;
  top: 68px;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  min-height: 190px;
  max-height: calc(100vh - 86px);
  overflow: hidden;
  padding: 9px;
}
.realtime-log-stack { display: grid; gap: 7px; min-width: 0; }
.history-panel {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-height: 0;
}
.history-panel-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}
.history-list-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.history-sort-title-row {
  display: grid;
  grid-template-columns: 9px 58px minmax(0, 1fr);
  column-gap: 4px;
  align-items: center;
  min-height: 26px;
  padding: 0 0 0 7px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-solid);
  color: var(--muted);
  font-size: var(--fs-sm);
  letter-spacing: -0.006em;
}
.history-sort-spacer {
  display: block;
  width: 9px;
  min-width: 9px;
}
.history-sort-heading {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  width: 100%;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font-size: inherit;
  font-weight: 800;
  line-height: 1;
  letter-spacing: inherit;
  text-align: left;
  white-space: nowrap;
  cursor: pointer;
}
.history-sort-heading:hover,
.history-sort-heading.is-active {
  color: #edf5ff;
}
.history-sort-heading .sort-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1em;
  margin-left: 2px;
  color: var(--blue);
  font-weight: 850;
  line-height: 1;
}
.history-sort-heading.is-active .sort-mark:empty::before {
  content: "▼";
}
.history-list-panel {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}
.history-list-panel .realtime-log-list {
  max-height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}
.history-list-panel .realtime-log-list::-webkit-scrollbar { width: 8px; }
.history-list-panel .realtime-log-list::-webkit-scrollbar-thumb { background: rgba(148, 163, 184, 0.25); border-radius: 999px; }
.history-list-panel .realtime-log-list::-webkit-scrollbar-track { background: rgba(7, 10, 18, 0.20); }
.history-query { display: grid; gap: 7px; }
.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: nowrap;
  gap: 5px;
  min-width: 0;
  padding: 0;
}
.history-toolbar .history-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}
.history-toolbar .history-control > span {
  color: var(--tool-control-label-color);
  font-size: var(--tool-control-label-size);
  font-weight: var(--tool-control-weight);
  line-height: 1;
}
.history-control-sort { flex: 0 0 auto; }
.history-filters, .history-types, .history-sorts {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.history-filter, .history-type, .history-sort {
  cursor: pointer;
  min-width: 0;
  padding: 5px 7px;
  color: var(--muted);
  background: rgba(7, 10, 18, 0.45);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 820;
  line-height: 1;
}
.history-filter.is-active, .history-type.is-active, .history-sort.is-active { color: #e8f3ff; border-color: rgba(114, 183, 255, 0.62); background: rgba(114, 183, 255, 0.12); }
.history-toolbar .history-types,
.history-toolbar .history-sorts {
  flex-wrap: nowrap;
  gap: 0;
  overflow: hidden;
  padding: 2px;
  background: rgba(7, 10, 18, 0.36);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.history-toolbar .history-type,
.history-toolbar .history-sort {
  border: 0;
  background: transparent;
  padding: 5px 6px;
  color: var(--tool-control-label-color);
  font-size: 0.58rem;
}
.history-toolbar .history-type.is-active,
.history-toolbar .history-sort.is-active {
  color: var(--tool-control-value-color);
  background: rgba(114, 183, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(114, 183, 255, 0.38);
}
.history-selects {
  display: grid;
  grid-template-columns: minmax(82px, 1fr);
  gap: 6px;
}
.history-selects label {
  display: grid;
  gap: 3px;
  color: var(--faint);
  font-size: 0.58rem;
  font-weight: 760;
}
.history-selects select {
  width: 100%;
  min-width: 0;
  padding: 6px 7px;
  color: #e7eef8;
  background: rgba(7, 10, 18, 0.62);
  border: 1px solid var(--line);
  border-radius: 9px;
  font-size: 0.67rem;
  font-weight: 780;
}
.realtime-log-foot { display: flex; justify-content: flex-end; padding-top: 3px; }
.realtime-log-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 4px 7px;
  border-bottom: 1px solid var(--line);
  background: rgba(11, 16, 28, 0.74);
}
.history-head-inline {
  position: relative;
  flex-wrap: nowrap;
  overflow: visible !important;
}
.history-head-inline .history-toolbar,
.history-head-inline .history-compact-menu {
  position: relative;
  z-index: 40;
}
.history-title {
  flex: 1 1 auto;
  min-width: 0;
}
.history-head-inline .history-toolbar {
  flex: 0 0 auto;
}
.history-head-inline .history-menu-pop {
  left: auto;
  right: 0;
  width: 148px;
}
.alert-settings-trigger {
  cursor: pointer;
  min-width: 26px;
  justify-content: center;
  padding: 0 6px;
  color: #f8d47a;
}
.alert-settings-trigger.is-muted { color: var(--faint); opacity: 0.72; }
.alert-settings-pop {
  position: absolute;
  top: calc(100% + 7px);
  right: 7px;
  z-index: 60;
  width: min(340px, calc(100vw - 24px));
  padding: 10px;
  border: 1px solid rgba(130, 153, 192, 0.22);
  border-radius: 14px;
  background: #101a2f;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}
.alert-settings-pop[hidden] { display: none; }
.alert-settings-form { display: grid; gap: 8px; }
.alert-settings-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 1px 1px 2px;
}
.alert-settings-head strong { color: #f3f8ff; font-size: 0.84rem; font-weight: 900; letter-spacing: -0.02em; }
.alert-settings-head span { color: var(--faint); font-size: 0.61rem; font-weight: 780; white-space: nowrap; }
.alert-connect-card,
.alert-rules-card,
.alert-editor-card,
.alert-empty-card {
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 12px;
  background: rgba(8, 13, 24, 0.34);
}
.alert-connect-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 9px;
}
.alert-connect-card > div,
.alert-card-title,
.alert-empty-card { display: grid; gap: 2px; min-width: 0; }
.alert-connect-card b,
.alert-card-title b,
.alert-empty-card b { color: #edf5ff; font-size: 0.74rem; font-weight: 900; }
.alert-connect-card span,
.alert-card-title span,
.alert-empty-card span { color: var(--faint); font-size: 0.62rem; font-weight: 720; line-height: 1.28; }
.alert-connect-card.is-connected { border-color: rgba(34, 197, 94, 0.24); background: rgba(22, 163, 74, 0.09); }
.alert-connect-card.is-connected b { color: #bbf7d0; }
.alert-connect-card .tool-control { flex: 0 0 auto; min-height: 30px; cursor: pointer; }
.alert-connect-card .subtle { color: #cbd5e1; }
.alert-direct-fallback {
  display: block;
  margin: -3px 2px 0;
  padding: 0 2px;
  color: var(--faint);
  font-size: 0.59rem;
  font-weight: 710;
  line-height: 1.35;
}
.alert-direct-fallback code {
  padding: 1px 4px;
  border-radius: 5px;
  background: rgba(0, 0, 0, 0.24);
  color: #dbeafe;
  user-select: all;
}
.alert-rules-card { display: grid; gap: 7px; padding: 9px; }
.alert-rule-list { display: grid; gap: 5px; }
.alert-rule-row,
.alert-add-row,
.alert-limit-row {
  width: 100%;
  min-width: 0;
  min-height: 34px;
  border: 1px solid rgba(148, 163, 184, 0.12);
  border-radius: 10px;
  background: rgba(7, 10, 18, 0.30);
  color: var(--text);
}
.alert-rule-row {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  text-align: left;
  cursor: pointer;
}
.alert-rule-row.is-active { border-color: rgba(114, 183, 255, 0.50); background: rgba(37, 99, 235, 0.16); }
.alert-rule-row.is-off { opacity: 0.76; }
.alert-rule-icon { font-size: 0.72rem; line-height: 1; }
.alert-rule-main { display: grid; gap: 1px; min-width: 0; }
.alert-rule-main b { color: #f3f8ff; font-size: 0.72rem; font-weight: 900; letter-spacing: -0.01em; }
.alert-rule-main small { color: var(--faint); font-size: 0.58rem; font-weight: 720; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.alert-rule-state {
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.12);
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 900;
  white-space: nowrap;
}
.alert-rule-row.is-on .alert-rule-state { color: #bbf7d0; background: rgba(34, 197, 94, 0.11); }
.alert-rule-row.is-active .alert-rule-state { color: #dbeafe; background: rgba(114, 183, 255, 0.16); }
.alert-add-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  color: #bfdbfe;
  font-size: 0.68rem;
  font-weight: 900;
  cursor: pointer;
}
.alert-limit-row {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 760;
}
.alert-editor-card {
  display: grid;
  gap: 8px;
  padding: 9px;
  background: rgba(7, 10, 18, 0.26);
}
.alert-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}
.alert-field-wide { grid-column: 1 / -1; }
.alert-settings-form label {
  display: grid;
  gap: 4px;
  color: var(--faint);
  font-size: 0.62rem;
  font-weight: 760;
}
.alert-settings-form .alert-toggle {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 24px;
  color: var(--text);
  font-size: 0.70rem;
  font-weight: 850;
}
.alert-settings-form .alert-toggle input { width: auto; min-height: 0; }
.alert-input-unit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px;
}
.alert-input-unit em {
  color: var(--faint);
  font-size: 0.56rem;
  font-style: normal;
  font-weight: 850;
  white-space: nowrap;
}
.alert-settings-form input,
.alert-settings-form select {
  min-height: 30px;
  min-width: 0;
  padding: 5px 7px;
  font-size: 0.72rem;
}
.alert-settings-form input:disabled,
.alert-settings-form button:disabled { opacity: 0.56; cursor: not-allowed; }
.alert-settings-actions { display: grid; grid-template-columns: 1fr auto; gap: 6px; }
.alert-settings-actions .tool-control { justify-content: center; min-height: 32px; cursor: pointer; color: var(--tool-control-value-color); }
.alert-settings-actions #alertDeleteButton { color: #fca5a5; }
.alert-empty-card { padding: 10px; text-align: left; }
.alert-settings-status {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 740;
  line-height: 1.35;
  text-align: right;
  min-height: 1em;
}
@media (max-width: 520px) {
  .alert-editor-grid { grid-template-columns: 1fr; }
  .alert-connect-card { grid-template-columns: 1fr; }
  .alert-connect-card .tool-control { justify-content: center; }
}
.history-head-inline .history-sort-menu .history-menu-pop {
  width: 122px;
}
.realtime-log-head strong { display: block; color: var(--text); font-size: var(--fs-sm); font-weight: 840; letter-spacing: -0.02em; }
.realtime-log-head > div > span { display: block; margin-top: 1px; color: var(--faint); font-size: 0.64rem; font-weight: 720; white-space: nowrap; }
.realtime-log-list { display: grid; gap: 0; }
.realtime-log-list article {
  position: relative;
  display: grid;
  grid-template-columns: 12px 36px minmax(0, 1fr);
  align-items: start;
  column-gap: 5px;
  row-gap: 1px;
  padding: 6px 0;
  border-bottom: 1px solid rgba(148, 163, 184, 0.09);
  cursor: pointer;
  border-radius: 8px;
}
.realtime-log-list article:focus-visible {
  outline: 2px solid rgba(114, 183, 255, 0.58);
  outline-offset: 2px;
}
.realtime-log-list .history-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 12px;
  height: 12px;
  min-width: 12px;
  min-height: 12px;
  margin-top: 2px;
  color: var(--purple);
  line-height: 0;
}
.realtime-log-list .history-marker svg {
  display: block;
  width: 12px;
  height: 12px;
  overflow: visible;
  shape-rendering: geometricPrecision;
}
.realtime-log-list .history-marker circle {
  fill: currentColor;
}
.realtime-log-list article.good .history-marker { color: var(--green); }
.realtime-log-list article.profit-blue-dark .history-marker { color: #1d4ed8; }
.realtime-log-list article.profit-blue-bright .history-marker { color: #38bdf8; }
.realtime-log-list article.profit-green-dark .history-marker { color: #166534; }
.realtime-log-list article.profit-green-bright .history-marker { color: #4ade80; }
.realtime-log-list article.warn .history-marker { color: var(--yellow); }
.realtime-log-list article.event .history-marker { color: var(--blue); }
.realtime-log-list article.bad .history-marker,
.realtime-log-list article.error .history-marker { color: var(--red); }
.history-summary {
  cursor: pointer;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 28px;
  align-items: center;
  column-gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  text-align: left;
}
.history-summary em { color: var(--faint); font-size: 0.55rem; font-style: normal; font-weight: 760; text-align: right; }
.realtime-log-list time { color: var(--faint); font-size: 0.61rem; font-weight: 760; line-height: 1.2; padding-top: 1px; }
.realtime-log-list b { min-width: 0; color: #e7eef8; font-size: 0.70rem; line-height: 1.20; font-weight: 790; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.realtime-log-list span { min-width: 0; color: var(--faint); font-size: 0.62rem; line-height: 1.18; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.realtime-log-list .history-detail {
  display: none;
  grid-column: 2 / -1;
  margin: 2px 0 1px;
  padding: 5px 7px;
  color: var(--muted);
  background: rgba(7, 10, 18, 0.34);
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 8px;
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.32;
}
.realtime-log-list .history-item.is-expanded .history-detail { display: block; }
.realtime-log-list .history-item.is-expanded { background: rgba(255, 255, 255, 0.025); }
.history-callout {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid rgba(73, 209, 125, 0.24);
  border-radius: 12px;
  background: rgba(73, 209, 125, 0.08);
}
.history-callout small { color: var(--green); font-size: 0.66rem; font-weight: 820; }
.history-callout strong { color: #eafff2; font-size: var(--fs-base); font-weight: 860; line-height: 1.14; }
.history-callout span { color: var(--muted); font-size: 0.67rem; font-weight: 720; }
.history-section { display: grid; gap: 4px; }
.history-section > strong { color: var(--muted); font-size: 0.66rem; font-weight: 820; letter-spacing: 0.04em; }
.side-panel-stack { display: flex; flex: 1; flex-direction: column; gap: 9px; min-height: 0; width: 100%; }
.side-market-panels { display: block; min-height: 0; width: 100%; }
.side-market-panels > * + * { margin-top: 9px; }
.selected-asset-card {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.72);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}
.selected-asset-card strong {
  display: block;
  color: #f8fafc;
  font-size: var(--fs-base);
  font-weight: 800;
  letter-spacing: -0.02em;
}
.orderbook-placeholder { display: grid; gap: 7px; padding: 12px; color: var(--muted); }
.orderbook-placeholder strong { color: var(--text); font-size: var(--fs-lg); }
.orderbook-placeholder span { font-size: var(--fs-sm); line-height: 1.55; }
.side-selected-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.side-selected-summary div {
  display: grid;
  gap: 3px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.52);
}
.side-selected-summary small { color: var(--faint); font-size: 0.7rem; font-weight: 740; }
.side-selected-summary strong { font-size: var(--fs-sm); font-weight: 820; }
.side-selected-summary .shop { color: var(--yellow); }
.side-selected-summary .bid { color: var(--blue); }
table { border-collapse: separate; border-spacing: 0; table-layout: auto; }
.table-wrap > table { width: max-content; min-width: 0; }
th, td { padding: 4px 7px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; white-space: nowrap; }
th {
  position: relative;
  z-index: 1;
  background: var(--panel-solid);
  color: var(--muted);
  font-size: var(--fs-sm);
  letter-spacing: -0.006em;
}
th:not(:first-child), td:not(:first-child) { text-align: right; }
th:first-child, td:first-child { text-align: left; }
.table-wrap > table > tbody > tr:last-child > td { border-bottom: 0; }
.table-wrap > table > tbody > tr.asset-row:nth-child(even) > td { background-color: rgba(255, 255, 255, 0.015); }
.table-wrap > table > tbody > tr.asset-row { cursor: pointer; }
.table-wrap > table > tbody > tr.asset-row:hover > td, .table-wrap > table > tbody > tr.asset-row.is-expanded > td { background-color: rgba(26, 37, 56, 0.78); }
.table-wrap > table > tbody > tr.row-profit > td:first-child,
.table-wrap > table > tbody > tr.row-loss > td:first-child,
.table-wrap > table > tbody > tr.row-flat > td:first-child { box-shadow: none; }
.row-blocked td { opacity: 0.58; }

.sort-button {
  appearance: none;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  cursor: pointer;
  font-weight: 760;
  text-align: left;
  width: 100%;
}
th:not(:first-child) .sort-button { text-align: right; }
.sort-button:hover, .sort-button.active { color: var(--text); }
.sort-mark { display: inline-flex; align-items: center; justify-content: center; min-width: 1em; margin-left: 2px; color: var(--blue); font-weight: 850; line-height: 1; }
.header-control {
  display: grid;
  gap: 5px;
  min-width: 142px;
}
.header-control.align-end { justify-items: end; }
.header-input {
  min-height: 28px;
  width: 142px;
  padding: 5px 8px;
  border-radius: 8px;
  font-size: var(--fs-xs);
  font-weight: 700;
}
.points-input {
  width: 112px;
  text-align: right;
}

.coin-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 132px;
  line-height: 1;
}
.expand-mark { width: 12px; color: var(--muted); font-size: 0.8rem; }
.coin-icon, .coin-icon-img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  flex: 0 0 28px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.08), 0 7px 18px rgba(0, 0, 0, 0.28);
}
.coin-icon {
  display: inline-grid;
  place-items: center;
  background: linear-gradient(135deg, #2f6feb, #2dbf7b);
  color: white;
  font-weight: 820;
  line-height: 1;
}
.coin-icon-img {
  display: block;
  object-fit: cover;
  object-position: center center;
  padding: 0;
  background: transparent;
  vertical-align: middle;
}
.asset-symbol { color: #fff; font-size: var(--fs-base); font-weight: 760; letter-spacing: -0.02em; line-height: 1.14; }
.sub { margin-top: 2px; color: var(--muted); font-size: var(--fs-xs); line-height: 1.15; letter-spacing: 0.01em; }
.mono { font-variant-numeric: tabular-nums; font-family: var(--font-num); }
.value-strong, .result-head { color: #eef4fb; font-weight: 690; white-space: nowrap; font-size: var(--fs-base); letter-spacing: -0.01em; }
.volume-cell .value-strong { color: #c7d2fe; }
.shop-cell .value-strong { color: var(--yellow); }
.bid-cell .value-strong { color: var(--blue); }
.bid-value-cell .value-strong { color: #c7d2fe; }
.rate-cell { width: 1%; }
.profit-cell { width: 1%; }
.good-text { color: var(--green); }
.bad-text { color: var(--red); }
.neutral-text { color: var(--muted); }
.badge {
  display: inline-flex;
  align-items: center;
  min-width: 58px;
  justify-content: center;
  width: fit-content;
  gap: 5px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: var(--fs-xs);
  font-weight: 680;
  line-height: 1;
  white-space: nowrap;
}
.badge.good { color: var(--green); background: rgba(45, 212, 127, 0.13); }
.badge.bad { color: var(--red); background: rgba(251, 113, 133, 0.13); }
.badge.warn { color: var(--yellow); background: rgba(250, 204, 21, 0.13); }
.badge.neutral { color: #cbd5e1; background: rgba(148, 163, 184, 0.12); }
.result-cell { min-width: 210px; }
.result-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px; }
.empty-cell { padding: 34px 16px; text-align: center; color: var(--muted); }

.detail-row td { padding: 0 8px 10px 38px; background: rgba(15, 23, 42, 0.52); white-space: normal; width: 0; max-width: 0; }
.orderbook-panel {
  flex: 0 0 auto;
  display: block;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  max-width: none;
  margin: 0;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}
.orderbook-head { display: grid; gap: 2px; margin-bottom: 5px; color: var(--text); }
.orderbook-head strong { font-size: var(--fs-base); font-weight: 740; }
.orderbook-head span { color: var(--muted); font-size: var(--fs-xs); font-weight: 700; }
.panel-section-title {
  display: flex;
  align-items: center;
  min-height: 19px;
  margin-bottom: 6px;
  padding: 0 2px 5px;
  border-bottom: 1px solid rgba(139, 162, 196, 0.14);
}
.orderbook-table { flex: 0 0 auto; width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; background: rgba(15, 23, 42, 0.72); border-radius: 10px; overflow: hidden; }
.price-col { width: 142px; }
.value-col { width: auto; }
.orderbook-table th, .orderbook-table td { padding: 3px 6px; border-bottom: 0; font-size: var(--fs-sm); }
.orderbook-table th { background: rgba(15, 23, 42, 0.94); color: #cbd5e1; border-bottom: 1px solid rgba(148, 163, 184, 0.18); text-align: right; font-weight: 800; }
.orderbook-table th:first-child, .orderbook-table td:first-child { text-align: right; }
.orderbook-table tfoot td { color: var(--muted); font-weight: 900; font-size: 0.72rem; }
.book-row td, .book-marker-row td { position: relative; height: 19px; overflow: hidden; }
.ask-row td { background: rgba(251, 113, 133, 0.075); }
.bid-row td { background: rgba(96, 165, 250, 0.075); }
.flat-row td { background: rgba(148, 163, 184, 0.07); }
.book-price-cell { font-weight: 690; }
.book-price-wrap { display: grid; grid-template-columns: minmax(68px, 1fr) 48px; align-items: center; gap: 8px; width: 100%; }
.book-price { text-align: right; }
.book-rate { text-align: right; font-size: 0.66rem; font-weight: 650; opacity: 0.96; }
.book-value { text-align: right; color: #e2e8f0; }
.book-value span:not(.depth-bar) { position: relative; z-index: 1; }
.depth-bar { position: absolute; top: 3px; bottom: 3px; right: 0; opacity: 0.34; border-radius: 5px 0 0 5px; }
.bid-bar { background: #60a5fa; }
.ask-bar { background: #fb7185; }
.flat-bar { background: #94a3b8; opacity: 0.22; }
.down { color: #60a5fa; font-weight: 760; }
.up { color: #fb7185; font-weight: 760; }
.flat { color: #cbd5e1; font-weight: 760; }
.selected-row td {
  background-color: rgba(96, 165, 250, 0.13);
  border-top: 1px solid rgba(96, 165, 250, 0.62);
  border-bottom: 1px solid rgba(96, 165, 250, 0.62);
}
.selected-row td:first-child { border-left: 1px solid rgba(96, 165, 250, 0.62); }
.selected-row td:last-child { border-right: 1px solid rgba(96, 165, 250, 0.62); }
.book-marker-row .book-price,
.book-shop-row .book-price {
  color: #ffe8a3;
}
.book-marker-row .depth-bar,
.book-shop-row .depth-bar { opacity: 0.34; }
.trade-price-row td { padding: 4px 6px; text-align: right !important; color: #f8fafc; background: rgba(250, 204, 21, 0.10); border-top: 1px solid var(--line-strong); border-bottom: 1px solid var(--line-strong); font-weight: 900; }
.orderbook-note { margin-top: 7px; color: var(--faint); font-size: 0.7rem; text-align: center; }
.orderbook-empty { padding: 14px; color: var(--muted); }
.trades-panel {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 126px;
  overflow: hidden;
  padding: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(7, 10, 18, 0.72);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.22);
}
.trades-head { margin-bottom: 5px; color: var(--text); }
.trades-head strong { font-size: var(--fs-base); font-weight: 740; }
.trades-scroll { flex: 0 0 auto; min-height: 0; overflow: auto; border-radius: 10px; background: rgba(15, 23, 42, 0.72); }
.trades-table { width: 100%; min-width: 0; table-layout: fixed; border-collapse: collapse; }
.trade-time-col { width: 64px; }
.trade-price-col { width: 92px; }
.trade-value-col { width: auto; }
.trades-table th, .trades-table td { padding: 3px 6px; border-bottom: 0; font-size: var(--fs-sm); }
.trades-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(15, 23, 42, 0.96);
  color: #cbd5e1;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  text-align: right;
  font-weight: 800;
}
.trades-table th:first-child, .trades-table td:first-child { text-align: left; color: var(--faint); }
.trades-table td { height: 22px; text-align: right; color: #e2e8f0; }
.trades-table tbody tr:nth-child(-n + 20) td { height: 22px; }
.trades-table .trade-price { font-weight: 760; }
.trade-bid .trade-price { color: #fb7185; }
.trade-ask .trade-price { color: #60a5fa; }
.trade-neutral .trade-price { color: #cbd5e1; }
.trades-empty { padding: 14px !important; text-align: center !important; color: var(--muted) !important; }

/* Unified dense design pass: stronger whole/part hierarchy + shared micro-rules. */
:root {
  --bg: #060a11;
  --bg-soft: #0a101b;
  --surface-main: rgba(15, 23, 38, 0.90);
  --surface-side: rgba(12, 18, 30, 0.82);
  --surface-inner: rgba(8, 13, 23, 0.62);
  --surface-raised: rgba(21, 31, 49, 0.78);
  --line: rgba(128, 148, 178, 0.15);
  --line-strong: rgba(139, 162, 196, 0.30);
  --text: #f1f6fd;
  --muted: #aebad0;
  --faint: #7f8da5;
  --green: #42d689;
  --red: #ff7085;
  --yellow: #f2c96d;
  --blue: #68b8ff;
  --purple: #ad9cff;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow: 0 16px 46px rgba(0, 0, 0, 0.28);
}

body {
  font-size: 12.5px;
  line-height: 1.32;
  background:
    radial-gradient(circle at 18% -12%, rgba(104, 184, 255, 0.14), transparent 31rem),
    radial-gradient(circle at 88% 0%, rgba(66, 214, 137, 0.075), transparent 28rem),
    linear-gradient(180deg, #0a101b 0%, var(--bg) 74%);
}

.app-shell {
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 7px;
  width: calc(100% - 7px);
}

.sidebar {
  padding: 9px;
  background: rgba(7, 11, 19, 0.90);
  border-color: rgba(139, 162, 196, 0.18);
  border-radius: var(--radius-lg);
}
.sidebar-brand { gap: 8px; padding-bottom: 9px; }
.brand-mark { width: 28px; height: 28px; border-radius: var(--radius-sm); }
.nav-group { gap: 4px; }
.nav-group > strong { color: #77869d; font-size: 0.62rem; letter-spacing: 0.10em; }
.nav-item {
  min-height: 27px;
  padding: 4px 7px;
  border-radius: var(--radius-sm);
  font-size: 0.70rem;
  background: rgba(16, 24, 39, 0.38);
}
.nav-item.is-active {
  background: rgba(29, 45, 68, 0.96);
  border-color: rgba(104, 184, 255, 0.58);
  box-shadow: inset 3px 0 0 var(--blue), 0 0 0 1px rgba(104, 184, 255, 0.06);
}
.nav-item.is-disabled span {
  color: rgba(174, 186, 208, 0.58);
  background: rgba(148, 163, 184, 0.07);
}
.sidebar-toggle {
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin-left: auto;
  flex: 0 0 auto;
  border: 1px solid rgba(139, 162, 196, 0.22);
  border-radius: var(--radius-sm);
  background: rgba(16, 24, 39, 0.48);
  color: #dbe7f5;
  font-size: 1.02rem;
  font-weight: 850;
  line-height: 1;
}
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible {
  border-color: rgba(104, 184, 255, 0.58);
  background: rgba(29, 45, 68, 0.90);
  outline: none;
}
.app-shell.is-sidebar-collapsed {
  grid-template-columns: 48px minmax(0, 1fr);
}
.app-shell.is-sidebar-collapsed .sidebar {
  padding: 7px;
  overflow: visible;
}
.app-shell.is-sidebar-collapsed .sidebar-brand {
  justify-content: center;
  gap: 0;
  padding-bottom: 0;
  border-bottom: 0;
}
.app-shell.is-sidebar-collapsed .brand-mark {
  width: 28px;
  height: 28px;
}
.app-shell.is-sidebar-collapsed .sidebar-brand-text,
.app-shell.is-sidebar-collapsed .side-nav,
.app-shell.is-sidebar-collapsed .terminal-status {
  display: none;
}
.app-shell.is-sidebar-collapsed .sidebar-toggle {
  position: absolute;
  top: 42px;
  left: 50%;
  width: 22px;
  height: 22px;
  margin-left: -11px;
  font-size: 0.98rem;
}
.app-shell:not(.is-sidebar-collapsed) .sidebar-toggle {
  transform: rotate(180deg);
}

.summary-card,
.summary-detail,
.table-wrap,
.orderbook-side,
.market-pulse-side {
  border-radius: var(--radius-lg);
  border-color: var(--line);
  box-shadow: var(--shadow);
}
.summary-card { min-height: 56px; padding: 7px 9px; background: var(--surface-side); }
.summary-card small { color: #8fa0b9; font-size: 0.64rem; }
.summary-card strong { font-size: 1.04rem; font-weight: 820; }
.summary-card span { margin-top: 3px; font-size: 0.63rem; color: #7f8da5; }
.summary-card.is-active,
.summary-clickable:hover { background: rgba(21, 31, 49, 0.92); }

.market-layout {
  grid-template-columns: max-content minmax(280px, 304px) minmax(208px, 232px);
  gap: 7px;
}
.table-wrap {
  background: var(--surface-main);
  border-color: rgba(139, 162, 196, 0.24);
}
.orderbook-side,
.market-pulse-side {
  align-self: start;
  max-height: calc(100vh - 76px);
  overflow: auto;
  background: var(--surface-side);
  border-color: rgba(128, 148, 178, 0.14);
  padding: 8px;
}

.table-tools,
.realtime-log-head {
  min-height: 36px;
  padding: 5px 8px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.96), rgba(12, 18, 30, 0.92));
  border-bottom-color: rgba(139, 162, 196, 0.26);
}
.table-title strong,
.realtime-log-head strong,
.orderbook-head strong,
.trades-head strong {
  color: #f4f8ff;
  font-size: 0.76rem;
  font-weight: 860;
  letter-spacing: -0.02em;
}
:where(.table-tools, .history-toolbar) {
  --tool-control-height: 27px;
  --tool-control-gap: 4px;
  --tool-control-padding-x: 8px;
  --tool-control-radius: 8px;
  --tool-control-border: rgba(139, 162, 196, 0.22);
  --tool-control-bg: rgba(8, 13, 23, 0.55);
  --tool-control-label-color: #91a1bb;
  --tool-control-value-color: #e6eef9;
  --tool-control-accent-color: var(--yellow);
  --tool-control-font-size: 0.70rem;
  --tool-control-label-size: 0.61rem;
}
.tool-control { box-shadow: inset 0 1px 0 rgba(255,255,255,0.035); }
.tool-control:hover,
.asset-compact-menu.is-open .asset-menu-trigger { background: rgba(21, 31, 49, 0.78); }
.asset-menu-pop {
  width: 162px;
  border-radius: var(--radius-md);
  background: #0d1728;
  border-color: rgba(139, 162, 196, 0.28);
}
.asset-menu-item { padding: 7px 8px; border-radius: var(--radius-sm); font-size: 0.70rem; }

th, td { padding: 3px 5px; }
th {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 28px;
  background: #101929;
  color: #95a4bb;
  font-size: 0.66rem;
  font-weight: 780;
  border-bottom-color: rgba(139, 162, 196, 0.24);
}
.sort-button { font-weight: 800; }
.sort-button:hover,
.sort-button.active { color: #edf5ff; }
.sort-mark { color: var(--blue); }
.table-wrap > table > tbody > tr.asset-row > td {
  height: 34px;
  background-clip: padding-box;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}
.table-wrap > table > tbody > tr.asset-row:nth-child(even) > td { background-color: rgba(255, 255, 255, 0.024); }
.table-wrap > table > tbody > tr.asset-row:nth-of-type(10n + 1) > td { border-top: 1px solid rgba(139, 162, 196, 0.24); }
.table-wrap > table > tbody > tr.asset-row:hover > td { background-color: rgba(29, 43, 64, 0.76); }
.table-wrap > table > tbody > tr.asset-row.is-expanded > td {
  background-color: rgba(31, 47, 72, 0.86);
  border-top-color: rgba(104, 184, 255, 0.34);
  border-bottom-color: rgba(104, 184, 255, 0.28);
}
.table-wrap > table > tbody > tr.row-profit > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.table-wrap > table > tbody > tr.row-loss > td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.table-wrap > table > tbody > tr.row-flat > td:first-child { box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.35); }
.row-blocked td { opacity: 0.52; }

.coin-cell { width: 1%; }
.coin-wrap { gap: 4px; min-width: 0; }
.coin-wrap > div { min-width: 0; }
.coin-icon,
.coin-icon-img { width: 20px; height: 20px; flex-basis: 20px; }
.asset-symbol { white-space: nowrap; font-size: 0.72rem; font-weight: 820; }
.sub { white-space: nowrap; margin-top: 1px; color: #8796ae; font-size: 0.58rem; }
.mono { font-variant-numeric: tabular-nums lining-nums; }
.value-strong,
.result-head { font-size: 0.73rem; font-weight: 740; color: #e9f0fa; }
.volume-cell .value-strong,
.bid-value-cell .value-strong { color: #b8c6df; }
.shop-cell .value-strong { color: #f3d27a; }
.bid-cell .value-strong { color: #7cc3ff; }
.good-text { color: #45dc8e; }
.bad-text { color: #ff7a8d; }
.neutral-text { color: #8d9bb1; }
.badge {
  min-width: 48px;
  padding: 2px 5px;
  font-size: 0.60rem;
  font-weight: 790;
}
.badge.good { color: #74eba6; background: rgba(66, 214, 137, 0.11); }
.badge.bad { color: #ff8fa0; background: rgba(255, 112, 133, 0.11); }
.badge.neutral { color: #9ba9bd; background: rgba(148, 163, 184, 0.08); }

.selected-asset-card,
.orderbook-panel,
.trades-panel {
  border-radius: var(--radius-md);
  border-color: rgba(139, 162, 196, 0.22);
  background: var(--surface-inner);
  box-shadow: none;
}
.selected-asset-card { padding: 7px 9px; }
.side-selected-summary { gap: 6px; margin-bottom: 8px; }
.side-selected-summary div { padding: 7px; border-radius: var(--radius-sm); background: rgba(8, 13, 23, 0.50); }
.side-selected-summary small { font-size: 0.62rem; color: #8796ae; }
.side-selected-summary strong { font-size: 0.72rem; }
.orderbook-panel,
.trades-panel { padding: 5px; }
.orderbook-table,
.trades-scroll { border-radius: var(--radius-sm); background: rgba(12, 18, 30, 0.82); }
.orderbook-table th,
.orderbook-table td,
.trades-table th,
.trades-table td { padding: 2px 5px; font-size: 0.68rem; }
.book-row td,
.book-marker-row td { height: 18px; }
.book-price-wrap { grid-template-columns: minmax(62px, 1fr) 44px; gap: 6px; }
.book-rate { color: inherit; font-size: 0.61rem; opacity: 0.82; }
.depth-bar { top: 4px; bottom: 4px; opacity: 0.24; }
.ask-row td { background: rgba(255, 112, 133, 0.055); }
.bid-row td { background: rgba(104, 184, 255, 0.055); }
.flat-row td { background: rgba(148, 163, 184, 0.045); }
.down { color: #68b8ff; }
.up { color: #ff7085; }
.selected-row td { background-color: rgba(104, 184, 255, 0.12); }
.book-marker-row .book-price,
.book-shop-row .book-price { color: #ffe29a; }
.trade-price-row td { background: rgba(242, 201, 109, 0.09); }
.trades-table td { height: 20px; color: #dbe5f2; }
.trades-panel { min-height: 462px; }

.market-pulse-side .realtime-log-stack { gap: 6px; }
.realtime-log-list article {
  grid-template-columns: 9px 29px minmax(0, 1fr);
  column-gap: 4px;
  padding: 5px 0;
  border-bottom-color: rgba(139, 162, 196, 0.08);
}
.realtime-log-list .history-marker,
.realtime-log-list .history-marker svg { width: 9px; height: 9px; min-width: 9px; min-height: 9px; }
.history-summary { grid-template-columns: 29px minmax(0, 1fr) 22px; column-gap: 5px; }
.realtime-log-list time { font-size: 0.56rem; }
.realtime-log-list b { font-size: 0.65rem; color: #e6eef9; }
.realtime-log-list span { font-size: 0.58rem; color: #8796ae; }
.realtime-log-list .history-detail { padding: 5px 6px; border-radius: var(--radius-sm); background: rgba(8, 13, 23, 0.42); }

footer { padding: 18px 0 28px; color: var(--faint); font-size: 0.70rem; line-height: 1.5; }

/* Panel header unification: make point shop, orderbook, and history bars identical. */
.table-tools,
.side-panel-topbar,
.realtime-log-head {
  min-height: 37px;
  height: 37px;
  padding: 5px 8px;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.96), rgba(12, 18, 30, 0.92));
  border-bottom: 1px solid rgba(139, 162, 196, 0.26);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
}
.side-panel-topbar,
.realtime-log-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex: 0 0 auto;
}
.orderbook-side,
.market-pulse-side {
  top: 0;
  align-self: start;
  max-height: 100vh;
  padding: 0;
  overflow: hidden;
}
.side-panel-stack,
.realtime-log-stack {
  gap: 8px;
  width: 100%;
  max-height: 100vh;
  overflow: auto;
  padding-bottom: 8px;
}
.orderbook-panel,
.trades-panel {
  width: auto;
  margin-inline: 8px;
}
.market-pulse-side .realtime-log-list,
.market-pulse-side .history-callout,
.market-pulse-side .history-section {
  margin-inline: 6px;
}
.table-title { min-height: 26px; }
.table-title strong,
.realtime-log-head strong,
.orderbook-head strong,
.trades-head strong {
  font-size: 0.76rem;
  font-weight: 860;
}
.panel-title-meta {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--faint);
  font-size: 0.64rem;
  font-weight: 760;
  letter-spacing: -0.01em;
}
.orderbook-side-topbar .table-title {
  flex: 1 1 auto;
  gap: 7px;
}
.history-head-inline .history-toolbar { align-items: center; }
.orderbook-placeholder { margin: 8px; }


/* Shared panel-box template: one source for box / title-row / body styling. */
.panel-box {
  --panel-box-radius: var(--radius-md);
  --panel-box-border: rgba(139, 162, 196, 0.22);
  --panel-box-bg: var(--surface-inner);
  --panel-box-shadow: none;
  --panel-title-height: 37px;
  --panel-title-padding-y: 5px;
  --panel-title-padding-x: 8px;
  --panel-title-bg: linear-gradient(180deg, rgba(18, 27, 43, 0.96), rgba(12, 18, 30, 0.92));
  --panel-title-border: rgba(139, 162, 196, 0.26);
  --panel-title-color: #f4f8ff;
  --panel-title-size: 0.76rem;
  --panel-title-weight: 860;
  --panel-body-padding: 8px;
  --panel-body-gap: 8px;
  border: 1px solid var(--panel-box-border);
  border-radius: var(--panel-box-radius);
  background: var(--panel-box-bg);
  box-shadow: var(--panel-box-shadow);
  overflow: hidden;
}
.panel-box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: var(--panel-title-height);
  height: var(--panel-title-height);
  padding: var(--panel-title-padding-y) var(--panel-title-padding-x);
  background: var(--panel-title-bg);
  border-bottom: 1px solid var(--panel-title-border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  color: var(--panel-title-color);
}
.panel-box-title strong {
  color: var(--panel-title-color);
  font-size: var(--panel-title-size);
  font-weight: var(--panel-title-weight);
  letter-spacing: -0.02em;
}
.panel-box-body {
  min-width: 0;
  padding: var(--panel-body-padding);
}
.asset-table-body,
.realtime-log-list.panel-box-body {
  display: grid;
  gap: var(--panel-body-gap);
}
.side-market-panels.panel-box-body {
  display: block;
}
.history-panel-body.panel-box-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.side-market-panels.panel-box-body > * + *,
.history-panel-body.panel-box-body > * + * {
  margin-top: var(--panel-body-gap);
}
.asset-table-body {
  overflow: auto;
}
.table-wrap .asset-table-body > table { width: max-content; min-width: 0; }
.table-wrap .asset-table-body > table > tbody > tr:last-child > td { border-bottom: 0; }
.table-wrap .asset-table-body > table > tbody > tr.asset-row { cursor: pointer; }
.table-wrap .asset-table-body > table > tbody > tr.asset-row > td {
  height: 34px;
  background-clip: padding-box;
  transition: background-color 120ms ease, box-shadow 120ms ease;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td { background-color: rgba(255, 255, 255, 0.024); }
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-of-type(10n + 1) > td { border-top: 1px solid rgba(139, 162, 196, 0.24); }
.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td { background-color: rgba(29, 43, 64, 0.76); }
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td {
  background-color: rgba(31, 47, 72, 0.86);
  border-top-color: rgba(104, 184, 255, 0.34);
  border-bottom-color: rgba(104, 184, 255, 0.28);
}
.table-wrap .asset-table-body > table > tbody > tr.row-profit > td:first-child { box-shadow: inset 3px 0 0 var(--green); }
.table-wrap .asset-table-body > table > tbody > tr.row-loss > td:first-child { box-shadow: inset 3px 0 0 var(--red); }
.table-wrap .asset-table-body > table > tbody > tr.row-flat > td:first-child { box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.35); }
.table-wrap.panel-box,
.orderbook-side.panel-box,
.market-pulse-side.panel-box {
  --panel-box-radius: var(--radius-lg);
  --panel-box-bg: var(--surface-side);
}
.table-wrap.panel-box {
  --panel-box-bg: var(--surface-main);
  --panel-box-border: rgba(139, 162, 196, 0.24);
}
.inner-panel-box {
  --panel-title-height: 28px;
  --panel-title-padding-y: 4px;
  --panel-title-padding-x: 7px;
  --panel-body-padding: 5px;
  --panel-body-gap: 6px;
  --panel-title-bg: linear-gradient(180deg, rgba(18, 27, 43, 0.82), rgba(10, 16, 27, 0.76));
  --panel-title-border: rgba(139, 162, 196, 0.18);
}
.inner-panel-box .panel-box-title {
  position: static;
  z-index: auto;
}
.orderbook-body,
.trades-scroll.panel-box-body {
  padding: 0;
  border-radius: var(--radius-sm);
  background: rgba(12, 18, 30, 0.82);
  overflow: auto;
}
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box {
  padding: 0;
}
.history-panel-body.panel-box-body {
  overflow: auto;
}
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  margin-inline: 0;
  padding: 0;
  background: rgba(12, 18, 30, 0.82);
  overflow: auto;
}
.history-list-panel.inner-panel-box .history-item {
  padding-inline: 7px;
}
.history-list-head.panel-box-title {
  position: static;
  z-index: auto;
}

/* Nested panels: flat, zero-gutter sections for dense information areas. */
.side-market-panels.panel-box-body,
.history-panel-body.panel-box-body {
  padding: 0;
}
.side-market-panels.panel-box-body > * + *,
.history-panel-body.panel-box-body > * + * {
  margin-top: 0;
}
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box {
  --panel-box-radius: 0;
  --panel-box-bg: transparent;
  --panel-box-border: rgba(139, 162, 196, 0.16);
  width: auto;
  margin-inline: 0;
  border-right: 0;
  border-left: 0;
  border-radius: 0;
  box-shadow: none;
}
.orderbook-panel.inner-panel-box:first-child,
.history-list-panel.inner-panel-box:first-child {
  border-top: 0;
}
.orderbook-body,
.trades-scroll.panel-box-body,
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  border-radius: 0;
}
.inner-panel-box .panel-box-title {
  border-radius: 0;
}
.orderbook-panel.inner-panel-box .orderbook-table,
.trades-panel.inner-panel-box .trades-table {
  border-radius: 0;
  background: transparent;
}

@media (max-width: 1460px) {
  .market-layout { grid-template-columns: max-content minmax(280px, 304px); }
  .market-pulse-side { display: none; }
}

@media (max-width: 900px) {
  .app-shell {
    display: block;
    width: calc(100% - 8px);
  }
  .sidebar {
    top: 0;
    max-height: none;
    margin-top: 8px;
    margin-bottom: 10px;
    padding: 9px;
    overflow: visible;
  }
  .sidebar-brand {
    padding-bottom: 8px;
  }
  .side-nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: thin;
  }
  .nav-group {
    flex: 0 0 158px;
    align-content: start;
  }
  .nav-group:first-child {
    flex-basis: 132px;
  }
  .service-nav-group {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .service-nav-group > strong { display: none; }
  .service-nav-group .nav-item {
    width: auto;
    min-width: max-content;
    white-space: nowrap;
  }
  .terminal-status { display: none; }
  .hero { align-items: stretch; padding-top: 8px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .summary-detail { grid-column: 1 / -1; }
  .market-layout { grid-template-columns: 1fr; }
  .orderbook-side { position: static; }

}

@media (max-width: 560px) {
  .app-shell { width: calc(100% - 6px); }
  .sidebar-brand strong { font-size: var(--fs-sm); }
  .sidebar-brand span:not(.brand-mark) { display: none; }
  .nav-group { flex-basis: 148px; }
  h1 { font-size: 1.72rem; }
  .summary-grid { grid-template-columns: 1fr; }
  .summary-detail { grid-column: 1 / -1; }

}



/* 2026-05-29: remove profit/loss/flat status stripes before coin icons. */
.table-wrap > table > tbody > tr.row-profit > td:first-child,
.table-wrap > table > tbody > tr.row-loss > td:first-child,
.table-wrap > table > tbody > tr.row-flat > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.row-profit > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.row-loss > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.row-flat > td:first-child {
  box-shadow: none !important;
}


/* 2026-05-29: normalize point-shop row heights. The 10-row guide border made every 10th row 0.25px taller. */
.table-wrap > table > tbody > tr.asset-row:nth-of-type(10n + 1) > td,
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-of-type(10n + 1) > td {
  border-top: 0 !important;
}
.table-wrap > table > tbody > tr.asset-row > td,
.table-wrap .asset-table-body > table > tbody > tr.asset-row > td {
  height: 34px !important;
}


/* 2026-05-29: normalize orderbook ladder rows. Use inset shadows for highlights so borders do not change row height. */
.orderbook-table tbody tr,
.orderbook-table tbody tr > td,
.orderbook-table tbody tr > th {
  height: 18px !important;
  min-height: 18px !important;
  max-height: 18px !important;
  line-height: 1 !important;
}
.orderbook-table tbody tr > td,
.orderbook-table tbody tr > th {
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
}
.selected-row td {
  border-top-width: 0 !important;
  border-bottom-width: 0 !important;
  box-shadow: inset 0 1px 0 rgba(96, 165, 250, 0.62), inset 0 -1px 0 rgba(96, 165, 250, 0.62);
}


/* 2026-05-29: make horizontal rules reach panel edges and keep history rule ends square. */
.table-wrap .asset-table-body {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.table-wrap .asset-table-body > table {
  width: 100% !important;
}
.realtime-log-list article,
.realtime-log-list .history-item,
.realtime-log-list .history-detail,
.history-callout {
  border-radius: 0 !important;
}
.realtime-log-list article {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* 2026-05-29: A / A1 hierarchy unification.
   A  = major panel title bars: point shop, selected coin, history.
   A1 = data/topic headers inside the panel: point-shop table header, orderbook, trades. */
:root {
  --a-title-height: 37px;
  --a-title-bg: linear-gradient(180deg, rgba(18, 27, 43, 0.96), rgba(12, 18, 30, 0.92));
  --a-title-border: rgba(139, 162, 196, 0.26);
  --a-title-color: #f4f8ff;
  --a-title-size: 0.76rem;
  --a-title-weight: 860;
  --a1-title-height: 28px;
  --a1-title-bg: linear-gradient(180deg, rgba(18, 27, 43, 0.82), rgba(10, 16, 27, 0.76));
  --a1-title-border: rgba(139, 162, 196, 0.18);
  --a1-title-color: #dbe7f7;
  --a1-title-size: 0.70rem;
  --a1-title-weight: 800;
}
.table-tools.panel-box-title,
.side-panel-topbar.panel-box-title,
.realtime-log-head.panel-box-title {
  min-height: var(--a-title-height) !important;
  height: var(--a-title-height) !important;
  padding: 5px 8px !important;
  background: var(--a-title-bg) !important;
  border-bottom: 1px solid var(--a-title-border) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035) !important;
}
.table-tools .table-title,
.side-panel-topbar .table-title,
.realtime-log-head .history-title {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}
.table-tools .table-title strong,
.side-panel-topbar .table-title strong,
.realtime-log-head .history-title strong {
  color: var(--a-title-color) !important;
  font-size: var(--a-title-size) !important;
  font-weight: var(--a-title-weight) !important;
  letter-spacing: -0.02em;
}
.orderbook-head.panel-section-title,
.trades-head.panel-section-title,
.asset-table-body > table > thead > tr > th {
  height: var(--a1-title-height) !important;
  min-height: var(--a1-title-height) !important;
  padding: 4px 7px !important;
  background: var(--a1-title-bg) !important;
  border-top: 0 !important;
  border-bottom: 1px solid var(--a1-title-border) !important;
  box-shadow: none !important;
  color: var(--a1-title-color) !important;
}
.orderbook-head.panel-section-title,
.trades-head.panel-section-title {
  justify-content: flex-start;
  margin: 0;
}
.orderbook-head.panel-section-title strong,
.trades-head.panel-section-title strong,
.asset-table-body > table > thead .sort-button {
  color: var(--a1-title-color) !important;
  font-size: var(--a1-title-size) !important;
  font-weight: var(--a1-title-weight) !important;
  letter-spacing: -0.01em;
}
.asset-table-body > table > thead .sort-button.active,
.asset-table-body > table > thead .sort-button:hover {
  color: #f4f8ff !important;
}
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box {
  border-top-color: var(--a1-title-border);
}
.orderbook-panel.inner-panel-box:first-child,
.history-list-panel.inner-panel-box:first-child {
  border-top: 0;
}
.history-panel-body.panel-box-body {
  padding: 0 !important;
}
.history-list-panel.inner-panel-box {
  border-top: 0;
}

/* 2026-05-29: remove A→A1 gutters and square off clipped list/table ends. */
.table-wrap .asset-table-body,
.side-market-panels.panel-box-body,
.history-panel-body.panel-box-body {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}
.side-panel-stack,
.realtime-log-stack {
  gap: 0 !important;
  padding-bottom: 0 !important;
}
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
/* Keep inner rows/list ends square, but let the main A-level boxes use their normal rounded corners. */
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box,
.orderbook-body,
.trades-scroll.panel-box-body,
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body,
.realtime-log-list article,
.realtime-log-list .history-item,
.realtime-log-list .history-detail {
  border-radius: 0 !important;
}
.trades-scroll.panel-box-body,
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  overflow-x: hidden;
}
.trades-table tbody tr:last-child td,
.realtime-log-list article:last-child {
  border-bottom: 0 !important;
}

/* 2026-05-29: normalize bottom edges. Avoid stacked bottom padding + inner border that made
   trades/history bottoms look visually thicker than the side/top borders. */
.orderbook-body,
.trades-scroll.panel-box-body,
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body,
.table-wrap .asset-table-body {
  padding-bottom: 0 !important;
}
.orderbook-panel.inner-panel-box:last-child,
.trades-panel.inner-panel-box:last-child,
.history-list-panel.inner-panel-box:last-child {
  border-bottom: 0 !important;
}
.orderbook-table tbody tr:last-child td,
.trades-table tbody tr:last-child td,
.realtime-log-list article:last-child,
.asset-table-body > table > tbody > tr:last-child > td {
  border-bottom: 0 !important;
}

/* 2026-06-02: history uses no date divider rows; each timestamp includes compact date.
   Keep the timestamp column fixed and start expanded details under the main label. */
.realtime-log-list article {
  grid-template-columns: 9px 58px minmax(0, 1fr) !important;
}
.realtime-log-list time {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.realtime-log-list .history-detail {
  grid-column: 3 / -1 !important;
}

/* 2026-05-29: keep collapsed history rows pixel-equal.
   Real borders and content-driven grid height made the last/history rows look uneven
   under mobile browser scaling. Use a fixed collapsed row box and non-layout shadow
   separator; expanded rows may grow only when the user opens details. */
:root { --history-row-height: 30px; }
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body,
.realtime-log-list {
  gap: 0 !important;
  row-gap: 0 !important;
}
.realtime-log-list .history-item {
  box-sizing: border-box !important;
  height: var(--history-row-height) !important;
  min-height: var(--history-row-height) !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  align-items: center !important;
  border-bottom: 0 !important;
  box-shadow: inset 0 -1px 0 rgba(139, 162, 196, 0.08) !important;
}
.realtime-log-list .history-item:last-child {
  box-shadow: none !important;
}
.history-panel-body.panel-box-body,
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  border-bottom-left-radius: calc(var(--panel-box-radius, 16px) - 1px);
  border-bottom-right-radius: calc(var(--panel-box-radius, 16px) - 1px);
  overflow-y: hidden;
}
.realtime-log-list .history-item:not(.is-expanded) .history-detail {
  display: none !important;
}
.realtime-log-list .history-item.is-expanded {
  height: auto !important;
  min-height: var(--history-row-height) !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}

/* 2026-05-29: focused density/readability/unification polish. */
:root {
  --bg: #050912;
  --surface-main: rgba(13, 20, 34, 0.94);
  --surface-side: rgba(10, 16, 28, 0.88);
  --surface-inner: rgba(7, 12, 21, 0.58);
  --surface-raised: rgba(18, 28, 45, 0.82);
  --line: rgba(132, 152, 184, 0.18);
  --line-strong: rgba(144, 166, 198, 0.34);
  --text: #f3f7fc;
  --muted: #b0bdd1;
  --faint: #8492a8;
  --green: #4ade8f;
  --red: #ff7588;
  --yellow: #f2cd74;
  --blue: #71bdff;
  --purple: #b8a5ff;
  --a-title-height: 34px;
  --a-title-bg: linear-gradient(180deg, rgba(18, 28, 46, 0.98), rgba(10, 17, 29, 0.96));
  --a-title-border: rgba(144, 166, 198, 0.30);
  --a-title-size: 0.75rem;
  --a1-title-height: 26px;
  --a1-title-bg: linear-gradient(180deg, rgba(20, 31, 50, 0.95), rgba(12, 19, 32, 0.94));
  --a1-title-border: rgba(144, 166, 198, 0.27);
  --a1-title-color: #e2eaf6;
  --a1-title-size: 0.68rem;
  --history-row-height: 28px;
}

body {
  font-size: 12px;
  line-height: 1.28;
}

.app-shell {
  gap: 6px;
  width: calc(100% - 6px);
}
.app-shell.is-sidebar-collapsed {
  grid-template-columns: 48px minmax(0, 1fr);
}

.summary-grid,
.market-layout {
  gap: 6px;
}

.summary-card {
  min-height: 52px;
  padding: 6px 8px;
}
.summary-card small { margin-bottom: 3px; font-size: 0.62rem; font-weight: 730; }
.summary-card strong { font-size: 1rem; font-weight: 840; }
.summary-card span { margin-top: 2px; font-size: 0.61rem; }

.table-tools.panel-box-title,
.side-panel-topbar.panel-box-title,
.realtime-log-head.panel-box-title {
  padding: 4px 7px !important;
}
.table-title { min-height: 24px; }

:where(.table-tools, .history-toolbar) {
  --tool-control-height: 24px;
  --tool-control-padding-x: 7px;
  --tool-control-border: rgba(144, 166, 198, 0.25);
  --tool-control-bg: rgba(9, 15, 26, 0.72);
  --tool-control-label-color: #9eadc3;
  --tool-control-value-color: #edf4fc;
  --tool-control-font-size: 0.68rem;
  --tool-control-label-size: 0.60rem;
}
.tool-control { min-height: var(--tool-control-height); }
.point-tool input,
.search-tool input {
  min-height: 20px;
}
.table-tools .asset-tabs { min-height: 24px; }
.asset-menu-pop {
  top: calc(100% + 5px);
  border-color: rgba(144, 166, 198, 0.34);
  background: #0b1424;
}
.asset-menu-item {
  padding: 6px 8px;
  font-size: 0.68rem;
}

.asset-table-body > table > thead > tr > th {
  padding: 3px 6px !important;
  color: #d4deeb !important;
}
.asset-table-body > table > thead .sort-button {
  font-weight: 840 !important;
}
.sort-mark {
  color: #83c8ff;
  opacity: 0.95;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row > td,
.table-wrap > table > tbody > tr.asset-row > td {
  height: 31px !important;
  padding: 2px 6px;
  border-bottom-color: rgba(132, 152, 184, 0.13);
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td {
  background-color: rgba(255, 255, 255, 0.018);
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td {
  background-color: rgba(28, 42, 63, 0.70);
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td {
  background-color: rgba(33, 52, 78, 0.84);
  box-shadow: inset 0 1px 0 rgba(113, 189, 255, 0.30), inset 0 -1px 0 rgba(113, 189, 255, 0.24);
}

.coin-wrap { gap: 5px; }
.coin-icon,
.coin-icon-img {
  width: 18px;
  height: 18px;
  flex-basis: 18px;
}
.asset-symbol {
  color: #f8fbff;
  font-size: 0.70rem;
  font-weight: 830;
}
.sub {
  color: #8e9cb1;
  font-size: 0.56rem;
}
.value-strong,
.result-head {
  color: #edf3fa;
  font-size: 0.71rem;
  font-weight: 760;
}
.volume-cell .value-strong,
.bid-value-cell .value-strong { color: #c7d2e5; }
.shop-cell .value-strong { color: #f4d17b; }
.bid-cell .value-strong { color: #83c8ff; }
.badge {
  min-width: 46px;
  padding: 1px 5px;
  font-size: 0.58rem;
  font-weight: 820;
}
.badge.good { color: #7cf0ae; background: rgba(74, 222, 143, 0.12); }
.badge.bad { color: #ff93a2; background: rgba(255, 117, 136, 0.12); }
.badge.warn { color: #f5d98d; background: rgba(242, 205, 116, 0.12); }

.inner-panel-box {
  --panel-title-height: var(--a1-title-height);
  --panel-title-padding-y: 3px;
  --panel-title-padding-x: 7px;
}
.orderbook-head.panel-section-title,
.trades-head.panel-section-title {
  padding: 3px 7px !important;
}
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box {
  border-color: rgba(144, 166, 198, 0.18);
}
.orderbook-table th,
.trades-table th {
  color: #d4deeb;
  border-bottom-color: rgba(144, 166, 198, 0.23);
  font-weight: 840;
}
.orderbook-table th,
.orderbook-table td,
.trades-table th,
.trades-table td {
  padding: 2px 5px;
  font-size: 0.66rem;
}
.orderbook-table tbody tr,
.orderbook-table tbody tr > td,
.orderbook-table tbody tr > th {
  height: 17px !important;
  min-height: 17px !important;
  max-height: 17px !important;
}
.trades-table td,
.trades-table tbody tr:nth-child(-n + 20) td {
  height: 19px;
}
.ask-row td { background: rgba(255, 117, 136, 0.062); }
.bid-row td { background: rgba(113, 189, 255, 0.062); }
.depth-bar { opacity: 0.28; }
.selected-row td {
  background-color: rgba(113, 189, 255, 0.13) !important;
  box-shadow: inset 0 1px 0 rgba(113, 189, 255, 0.64), inset 0 -1px 0 rgba(113, 189, 255, 0.64) !important;
}
.book-marker-row .book-price,
.book-shop-row .book-price {
  color: #ffe5a5;
  font-weight: 820;
}

.realtime-log-list .history-item {
  grid-template-columns: 9px 30px minmax(0, 1fr);
  column-gap: 4px;
  box-shadow: inset 0 -1px 0 rgba(132, 152, 184, 0.09) !important;
}
.history-summary {
  grid-template-columns: 30px minmax(0, 1fr) 22px;
}
.realtime-log-list time { color: #8b99af; font-size: 0.55rem; }
.realtime-log-list b { color: #edf4fc; font-size: 0.64rem; font-weight: 820; }
.realtime-log-list span { color: #8c9ab0; font-size: 0.57rem; }
.realtime-log-list .history-detail {
  background: rgba(8, 13, 23, 0.50);
  border-color: rgba(132, 152, 184, 0.14);
}

footer {
  padding: 14px 0 22px;
  font-size: 0.68rem;
}

/* 2026-05-29: use the dense layout to keep history visible on normal laptop widths. */
@media (max-width: 1460px) and (min-width: 1181px) {
  .market-layout {
    grid-template-columns: max-content minmax(280px, 304px) minmax(188px, 208px) !important;
  }
  .market-pulse-side {
    display: block !important;
  }
  .market-pulse-side .history-compact-menu:not(.history-sort-menu) .history-menu-pop {
    left: 0;
    right: auto;
  }
  .market-pulse-side .history-sort-menu .history-menu-pop {
    left: auto;
    right: 0;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .market-layout {
    grid-template-columns: max-content minmax(280px, 304px) !important;
  }
  .market-pulse-side {
    display: none !important;
  }
}

/* 2026-05-29: tighten A1 side columns and make selected-row marking continuous. */
.market-layout {
  grid-template-columns: max-content minmax(252px, 270px) minmax(188px, 208px) !important;
}
.price-col { width: 112px; }
.trade-time-col { width: 56px; }
.trade-price-col { width: 58px; }
.book-price-wrap {
  grid-template-columns: minmax(44px, 54px) 40px;
  justify-content: end;
  gap: 4px;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td:first-child,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td:first-child {
  box-shadow: inset 0 1px 0 rgba(113, 189, 255, 0.30), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded.row-profit > td:first-child,
.table-wrap > table > tbody > tr.asset-row.is-expanded.row-profit > td:first-child {
  box-shadow: inset 3px 0 0 var(--green), inset 0 1px 0 rgba(113, 189, 255, 0.30), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded.row-loss > td:first-child,
.table-wrap > table > tbody > tr.asset-row.is-expanded.row-loss > td:first-child {
  box-shadow: inset 3px 0 0 var(--red), inset 0 1px 0 rgba(113, 189, 255, 0.30), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded.row-flat > td:first-child,
.table-wrap > table > tbody > tr.asset-row.is-expanded.row-flat > td:first-child {
  box-shadow: inset 3px 0 0 rgba(148, 163, 184, 0.35), inset 0 1px 0 rgba(113, 189, 255, 0.30), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
}

@media (max-width: 1460px) and (min-width: 1181px) {
  .market-layout {
    grid-template-columns: max-content minmax(252px, 270px) minmax(188px, 208px) !important;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .market-layout {
    grid-template-columns: max-content minmax(252px, 270px) !important;
  }
}

@media (max-width: 900px) {
  .market-layout {
    grid-template-columns: 1fr !important;
  }
}

/* 2026-05-29: let A1 orderbook/trades columns size to their actual content. */
.market-layout {
  grid-template-columns: max-content max-content minmax(188px, 208px) !important;
}
.orderbook-side {
  width: max-content;
  min-width: 0;
}
.side-panel-stack,
.side-market-panels,
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box {
  width: max-content;
  min-width: 0;
}
.orderbook-table,
.trades-table {
  width: max-content;
  min-width: 0;
  table-layout: auto;
}
.price-col,
.value-col,
.trade-time-col,
.trade-price-col,
.trade-value-col {
  width: auto;
}
.book-price,
.book-rate {
  font-variant-numeric: tabular-nums lining-nums;
  text-align: right;
}
.orderbook-table th,
.orderbook-table td,
.trades-table th,
.trades-table td {
  width: auto;
}

@media (max-width: 1460px) and (min-width: 1181px) {
  .market-layout {
    grid-template-columns: max-content max-content minmax(188px, 208px) !important;
  }
}

@media (max-width: 1180px) and (min-width: 901px) {
  .market-layout {
    grid-template-columns: max-content max-content !important;
  }
}

@media (max-width: 900px) {
  .market-layout {
    grid-template-columns: 1fr !important;
  }
  .orderbook-side,
  .side-panel-stack,
  .side-market-panels,
  .orderbook-panel.inner-panel-box,
  .trades-panel.inner-panel-box {
    width: 100%;
  }
}

/* 2026-05-29: when A1 panels have extra width, give it to amount columns. */
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.orderbook-body,
.trades-scroll.panel-box-body,
.orderbook-table,
.trades-table {
  width: 100%;
}
.orderbook-table,
.trades-table {
  table-layout: auto;
}
.price-col,
.rate-col,
.trade-time-col,
.trade-price-col {
  width: 1%;
}
.value-col,
.trade-value-col {
  width: auto;
}
.book-price-cell,
.book-rate-cell,
.trades-table td:first-child,
.trades-table td:nth-child(2),
.trades-table th:first-child,
.trades-table th:nth-child(2) {
  white-space: nowrap;
}
.book-price-cell,
.book-rate-cell {
  text-align: right !important;
}
.book-price-cell {
  padding-right: 3px !important;
}
.book-rate-cell {
  padding-left: 3px !important;
}
.book-value,
.trades-table td:last-child,
.trades-table th:last-child {
  width: auto;
}

/* 2026-05-29: show multiline opportunity details in the history list. */
.realtime-log-list .history-detail {
  white-space: pre-line !important;
}

/* 2026-05-29: boxes size to their own content, not to the tallest neighbor. */
.market-layout {
  align-items: start !important;
}
.table-wrap.panel-box,
.orderbook-side.panel-box,
.market-pulse-side.panel-box {
  align-self: start !important;
  height: max-content !important;
  min-height: 0 !important;
  max-height: none !important;
  background: var(--surface-side) !important;
}
.table-wrap.panel-box {
  --panel-box-bg: var(--surface-side) !important;
}
.table-wrap .asset-table-body,
.orderbook-side .side-panel-stack,
.market-pulse-side .realtime-log-stack {
  height: max-content !important;
  max-height: none !important;
  overflow: visible !important;
}
.orderbook-side.panel-box,
.market-pulse-side.panel-box {
  position: sticky;
  overflow: visible !important;
}
.trades-panel {
  min-height: 0 !important;
}
/* Keep the outer box corners visually intact while preserving overflow-visible menus. */
.orderbook-side.panel-box::after,
.market-pulse-side.panel-box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
  border: 1px solid var(--panel-box-border, rgba(139, 162, 196, 0.22));
  border-radius: var(--panel-box-radius, var(--radius-lg));
}
.orderbook-side .trades-panel.inner-panel-box,
.orderbook-side .trades-scroll.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  border-bottom-left-radius: calc(var(--radius-lg) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-lg) - 1px) !important;
}
.orderbook-side .trades-scroll.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  overflow: hidden !important;
}
/* Round every visible edge that touches an overflow-visible outer panel. */
.table-wrap.panel-box > .table-tools.panel-box-title,
.orderbook-side.panel-box .side-panel-topbar.panel-box-title,
.market-pulse-side.panel-box .realtime-log-head.panel-box-title {
  border-top-left-radius: calc(var(--radius-lg) - 1px) !important;
  border-top-right-radius: calc(var(--radius-lg) - 1px) !important;
  overflow: hidden !important;
}
.table-wrap.panel-box > .asset-table-body.panel-box-body,
.orderbook-side .trades-panel.inner-panel-box,
.orderbook-side .trades-scroll.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  border-bottom-left-radius: calc(var(--radius-lg) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-lg) - 1px) !important;
}
.table-wrap.panel-box > .asset-table-body.panel-box-body,
.orderbook-side .trades-scroll.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  overflow: hidden !important;
}
.market-pulse-side.panel-box .realtime-log-head.history-head-inline.panel-box-title {
  overflow: visible !important;
}
.history-compact-menu {
  position: relative;
  z-index: 40;
}
.history-compact-menu .history-menu-pop {
  z-index: 40;
}
@media (max-width: 900px) {
  .orderbook-side.panel-box,
  .market-pulse-side.panel-box {
    width: 100%;
  }
}

/* 2026-05-29: side-box border/corner cleanup.
   Keep orderbook/history as one clean A-level frame like the point-shop box:
   one visible outer border, flat inner sections, no nested rounded bottoms. */
.orderbook-side.panel-box,
.market-pulse-side.panel-box {
  --panel-box-border: rgba(139, 162, 196, 0.24);
  border-color: transparent !important;
  background: var(--surface-side) !important;
  box-shadow: var(--shadow) !important;
}
.orderbook-side.panel-box::after,
.market-pulse-side.panel-box::after {
  box-sizing: border-box;
  border-color: var(--panel-box-border) !important;
}
.orderbook-side.panel-box .side-panel-topbar.panel-box-title,
.market-pulse-side.panel-box .realtime-log-head.panel-box-title {
  background: var(--a-title-bg) !important;
  border-bottom: 1px solid var(--a-title-border) !important;
}
.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box {
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.orderbook-panel.inner-panel-box {
  border-top: 0 !important;
}
.trades-panel.inner-panel-box {
  border-top: 1px solid var(--a1-title-border) !important;
}
.orderbook-side .trades-panel.inner-panel-box,
.orderbook-side .trades-scroll.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body,
.orderbook-body,
.trades-scroll.panel-box-body,
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  border-radius: 0 !important;
  background: transparent !important;
}
.orderbook-side .trades-scroll.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  overflow: visible !important;
}
.table-wrap.panel-box > .asset-table-body.panel-box-body {
  border-bottom-left-radius: calc(var(--radius-lg) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-lg) - 1px) !important;
}

/* 2026-05-29: final whole-dashboard consistency polish.
   Keep behavior/layout intact while resolving late override drift across A/A1 bars,
   rows, controls, menus, badges, history, orderbook, and trade tables. */
:root {
  --surface-main: rgba(12, 18, 30, 0.94);
  --surface-side: rgba(10, 16, 27, 0.90);
  --surface-inner: rgba(8, 13, 22, 0.56);
  --surface-hover: rgba(27, 40, 60, 0.74);
  --surface-active: rgba(40, 48, 60, 0.84);
  --line: rgba(139, 158, 188, 0.18);
  --line-strong: rgba(149, 169, 200, 0.30);
  --text: #f3f7fc;
  --muted: #afbdd0;
  --faint: #8795aa;
  --positive: #ff4d5f;
  --negative: #4f9dff;
  --warning: #f6c85f;
  --neutral: #aab6c8;
  --kr-market-volume: #8fb5d8;
  --kr-shop-price: #ffd56f;
  --kr-bid-price: #ff7a85;
  --kr-bid-value: #ff9ba3;
  --green: #52d891;
  --red: var(--positive);
  --blue: var(--negative);
  --yellow: var(--warning);
  --a-title-height: 34px;
  --a1-title-height: 26px;
  --row-h: 31px;
  --book-row-h: 17px;
  --control-h: 24px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
}

body {
  letter-spacing: 0;
}

.summary-card,
.summary-detail,
.table-wrap.panel-box,
.orderbook-side.panel-box,
.market-pulse-side.panel-box {
  background: var(--surface-side) !important;
  border-color: var(--line) !important;
  border-radius: var(--radius-lg) !important;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.24) !important;
}

.table-tools.panel-box-title,
.side-panel-topbar.panel-box-title,
.realtime-log-head.panel-box-title {
  min-height: var(--a-title-height) !important;
  height: var(--a-title-height) !important;
  padding: 4px 7px !important;
  background: linear-gradient(180deg, rgba(18, 27, 43, 0.98), rgba(10, 16, 28, 0.96)) !important;
  border-bottom: 1px solid var(--line-strong) !important;
}

.table-title strong,
.realtime-log-head strong,
.orderbook-head strong,
.trades-head strong,
.panel-box-title strong {
  color: var(--text) !important;
  font-size: 0.74rem !important;
  font-weight: 840 !important;
  letter-spacing: 0 !important;
}

.orderbook-head.panel-section-title,
.trades-head.panel-section-title,
.asset-table-body > table > thead > tr > th {
  height: var(--a1-title-height) !important;
  min-height: var(--a1-title-height) !important;
  padding: 3px 6px !important;
  color: #d8e2ee !important;
  background: linear-gradient(180deg, rgba(17, 26, 42, 0.98), rgba(10, 16, 28, 0.95)) !important;
  border-bottom: 1px solid rgba(139, 158, 188, 0.24) !important;
}

.orderbook-head.panel-section-title strong,
.trades-head.panel-section-title strong,
.asset-table-body > table > thead .sort-button {
  color: #d8e2ee !important;
  font-size: 0.67rem !important;
  font-weight: 820 !important;
}

:where(.table-tools, .history-toolbar) {
  --tool-control-height: var(--control-h);
  --tool-control-padding-x: 7px;
  --tool-control-radius: var(--radius-sm);
  --tool-control-border: rgba(139, 158, 188, 0.24);
  --tool-control-bg: rgba(8, 13, 22, 0.68);
  --tool-control-focus-border: rgba(170, 182, 200, 0.72);
  --tool-control-focus-shadow: 0 0 0 2px rgba(170, 182, 200, 0.12);
  --tool-control-label-color: #9cacbf;
  --tool-control-value-color: #eef4fb;
  --tool-control-accent-color: var(--warning);
  --tool-control-font-size: 0.68rem;
  --tool-control-label-size: 0.60rem;
}

input,
select,
.tool-control,
.asset-menu-trigger {
  border-color: var(--tool-control-border, var(--line)) !important;
  border-radius: var(--radius-sm) !important;
}

.tool-control:hover,
.asset-compact-menu.is-open .asset-menu-trigger,
.summary-clickable:hover,
.summary-card.is-active {
  background: var(--surface-hover) !important;
  border-color: rgba(170, 182, 200, 0.42) !important;
}

input:focus,
select:focus,
.tool-control:focus-within,
.asset-menu-trigger:focus-visible,
.sort-button:focus-visible,
.history-item:focus-visible {
  outline: none !important;
  border-color: rgba(170, 182, 200, 0.72) !important;
  box-shadow: 0 0 0 2px rgba(170, 182, 200, 0.12) !important;
}

.asset-menu-pop,
.history-menu-pop {
  padding: 5px !important;
  background: #0b1424 !important;
  border: 1px solid rgba(139, 158, 188, 0.30) !important;
  border-radius: var(--radius-md) !important;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.30) !important;
}

.asset-menu-item {
  min-height: 26px !important;
  padding: 6px 8px !important;
  border-radius: var(--radius-sm) !important;
  color: var(--muted) !important;
  font-size: 0.68rem !important;
  font-weight: 780 !important;
}

.asset-menu-item:hover,
.asset-menu-item.is-active {
  color: var(--text) !important;
  background: rgba(170, 182, 200, 0.12) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row > td,
.table-wrap > table > tbody > tr.asset-row > td {
  height: var(--row-h) !important;
  padding: 2px 6px !important;
  border-bottom: 1px solid rgba(139, 158, 188, 0.12) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td {
  background-color: rgba(255, 255, 255, 0.014) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td {
  background-color: var(--surface-hover) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td {
  background-color: var(--surface-active) !important;
  box-shadow: inset 0 1px 0 rgba(170, 182, 200, 0.28), inset 0 -1px 0 rgba(170, 182, 200, 0.22) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.row-profit > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.row-loss > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.row-flat > td:first-child,
.table-wrap > table > tbody > tr.row-profit > td:first-child,
.table-wrap > table > tbody > tr.row-loss > td:first-child,
.table-wrap > table > tbody > tr.row-flat > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded.row-profit > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded.row-loss > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded.row-flat > td:first-child {
  box-shadow: inset 0 1px 0 rgba(170, 182, 200, 0.28), inset 0 -1px 0 rgba(170, 182, 200, 0.22) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row:not(.is-expanded).row-profit > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.asset-row:not(.is-expanded).row-loss > td:first-child,
.table-wrap .asset-table-body > table > tbody > tr.asset-row:not(.is-expanded).row-flat > td:first-child,
.table-wrap > table > tbody > tr.asset-row:not(.is-expanded).row-profit > td:first-child,
.table-wrap > table > tbody > tr.asset-row:not(.is-expanded).row-loss > td:first-child,
.table-wrap > table > tbody > tr.asset-row:not(.is-expanded).row-flat > td:first-child {
  box-shadow: none !important;
}

.coin-icon,
.coin-icon-img {
  width: 18px !important;
  height: 18px !important;
  flex: 0 0 18px !important;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.07) !important;
}

.asset-symbol,
.value-strong,
.result-head {
  font-size: 0.70rem !important;
  font-weight: 760 !important;
}

.asset-symbol {
  color: #f8fbff !important;
  font-weight: 820 !important;
}

.sub {
  color: var(--faint) !important;
  font-size: 0.56rem !important;
}

.summary-card.good strong,
.good-text,
.badge.good,
.up,
.trade-bid .trade-price {
  color: var(--positive) !important;
}

.summary-card.bad strong,
.bad-text,
.badge.bad,
.down,
.trade-ask .trade-price {
  color: var(--negative) !important;
}

.summary-card.warn strong,
.badge.warn,
.shop-cell .value-strong,
.book-marker-row .book-price,
.book-shop-row .book-price {
  color: var(--warning) !important;
}

.neutral-text,
.flat,
.badge.neutral {
  color: var(--neutral) !important;
}

.badge {
  min-width: 46px !important;
  padding: 1px 5px !important;
  border: 1px solid rgba(139, 158, 188, 0.12) !important;
  border-radius: 999px !important;
  font-size: 0.58rem !important;
  font-weight: 800 !important;
}

.badge.good { background: rgba(255, 117, 136, 0.12) !important; }
.badge.bad { background: rgba(113, 189, 255, 0.12) !important; }
.badge.warn { background: rgba(242, 205, 116, 0.12) !important; }
.badge.neutral { background: rgba(170, 182, 200, 0.10) !important; }

.orderbook-table th,
.orderbook-table td,
.trades-table th,
.trades-table td {
  padding: 2px 5px !important;
  font-size: 0.66rem !important;
  border-bottom-color: rgba(139, 158, 188, 0.10) !important;
}

.orderbook-table tbody tr,
.orderbook-table tbody tr > td,
.orderbook-table tbody tr > th {
  height: var(--book-row-h) !important;
  min-height: var(--book-row-h) !important;
  max-height: var(--book-row-h) !important;
}

.ask-row td { background: rgba(113, 189, 255, 0.060) !important; }
.bid-row td { background: rgba(255, 117, 136, 0.060) !important; }
.flat-row td { background: rgba(170, 182, 200, 0.050) !important; }
.ask-bar { background: var(--negative) !important; }
.bid-bar { background: var(--positive) !important; }

.selected-row td {
  background-color: rgba(170, 182, 200, 0.12) !important;
  background-image:
    linear-gradient(rgba(170, 182, 200, 0.36), rgba(170, 182, 200, 0.36)),
    linear-gradient(rgba(170, 182, 200, 0.28), rgba(170, 182, 200, 0.28)) !important;
  background-repeat: no-repeat !important;
  background-size: 100% 1px, 100% 1px !important;
  background-position: top left, bottom left !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  box-shadow: none !important;
}

.selected-row td:first-child {
  border-left: 1px solid rgba(170, 182, 200, 0.34) !important;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px;
}

.selected-row td:last-child {
  border-right: 1px solid rgba(170, 182, 200, 0.34) !important;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px;
}

.volume-cell .value-strong { color: var(--kr-market-volume) !important; }
.shop-cell .value-strong { color: var(--kr-shop-price) !important; }
.bid-cell .value-strong { color: var(--kr-bid-price) !important; }
.bid-value-cell .value-strong { color: var(--kr-bid-value) !important; }
.rate-cell .badge.good,
.profit-cell .good-text { color: var(--positive) !important; }
.rate-cell .badge.bad,
.profit-cell .bad-text { color: var(--negative) !important; }
.rate-cell .badge.neutral,
.profit-cell .neutral-text { color: var(--neutral) !important; }

.realtime-log-list .history-item {
  min-height: 28px !important;
  color: var(--muted) !important;
  box-shadow: inset 0 -1px 0 rgba(139, 158, 188, 0.10) !important;
}

.realtime-log-list .history-item:hover,
.realtime-log-list .history-item.is-expanded {
  background: var(--surface-hover) !important;
}

.realtime-log-list article.good .history-marker { color: var(--positive) !important; }
.realtime-log-list article.bad .history-marker,
.realtime-log-list article.error .history-marker { color: var(--negative) !important; }
.realtime-log-list article.warn .history-marker { color: var(--warning) !important; }
.realtime-log-list article.event .history-marker { color: var(--neutral) !important; }

.history-detail {
  background: rgba(8, 13, 22, 0.58) !important;
  border-color: rgba(139, 158, 188, 0.16) !important;
}

body,
button,
input,
select,
th,
td,
small,
strong,
.asset-symbol,
.value-strong,
.result-head,
.sort-button,
.badge,
.tool-control,
.asset-menu-item,
.realtime-log-list b,
.realtime-log-list span {
  letter-spacing: 0 !important;
}

@media (min-width: 1181px) {
  .market-layout {
    grid-template-columns: max-content max-content minmax(188px, 208px) !important;
    width: max-content !important;
    max-width: 100% !important;
  }
  .table-wrap.panel-box {
    width: max-content !important;
    max-width: calc(100vw - 56px) !important;
  }
}

/* 2026-05-29: history bottom edge cleanup.
   Remove the last-row bottom separator and clip the history body to the rounded panel
   so the final row cannot show through the lower border. Keep header menus visible. */
.market-pulse-side .history-panel-body,
.market-pulse-side .history-list-panel.inner-panel-box,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  border-bottom-left-radius: calc(var(--radius-lg) - 1px) !important;
  border-bottom-right-radius: calc(var(--radius-lg) - 1px) !important;
  overflow: hidden !important;
}
.market-pulse-side .realtime-log-list .history-item:last-child {
  box-shadow: none !important;
}
/* 2026-05-29: compact menu + orderbook selected-row polish.
   The point-shop compact menu was opening, but the title bar clipped the popup,
   so it looked like that menu did not open while history menus did. */
.table-tools.panel-box-title {
  overflow: visible !important;
  z-index: 80 !important;
}
.table-tools .asset-compact-menu,
.table-tools .asset-menu-pop {
  z-index: 90;
}
.table-tools .asset-menu-pop {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(104, 184, 255, 0.08);
}

/* Match the selected orderbook row to the point-shop selected row language:
   blue-tinted fill, clear top/bottom rails, and one left accent. */
.orderbook-table .selected-row > td,
.orderbook-table .selected-row > th {
  background-color: rgba(33, 52, 78, 0.84) !important;
  box-shadow: inset 0 1px 0 rgba(113, 189, 255, 0.30), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
}
.orderbook-table .selected-row > td:first-child,
.orderbook-table .selected-row > th:first-child {
  box-shadow: inset 3px 0 0 rgba(113, 189, 255, 0.88), inset 0 1px 0 rgba(113, 189, 255, 0.30), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
}
.asset-menu-pop {
  z-index: 2000 !important;
}
/* Exact override for the compact menu clipping rule. */
.table-wrap.panel-box > .table-tools.panel-box-title {
  overflow: visible !important;
}

/* 2026-05-29: point-shop list row separation polish.
   Improve row scanability without reintroducing colored left status stripes or changing row height. */
.table-wrap .asset-table-body > table > tbody > tr.asset-row > td,
.table-wrap > table > tbody > tr.asset-row > td {
  background-color: rgba(7, 12, 21, 0.20) !important;
  border-bottom-color: rgba(139, 158, 188, 0.20) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td,
.table-wrap > table > tbody > tr.asset-row:nth-child(even) > td {
  background-color: rgba(255, 255, 255, 0.040) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td,
.table-wrap > table > tbody > tr.asset-row:hover > td {
  background-color: rgba(31, 48, 72, 0.78) !important;
  border-bottom-color: rgba(150, 174, 210, 0.30) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td {
  background-color: rgba(40, 58, 84, 0.88) !important;
  border-bottom-color: rgba(150, 174, 210, 0.32) !important;
  box-shadow: inset 0 1px 0 rgba(113, 189, 255, 0.32), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row > td:first-child,
.table-wrap > table > tbody > tr.asset-row > td:first-child {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.018) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td:first-child,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td:first-child {
  box-shadow: inset 0 1px 0 rgba(113, 189, 255, 0.32), inset 0 -1px 0 rgba(113, 189, 255, 0.24) !important;
}

/* 2026-05-29: compact table sort triangle polish. */
.asset-table-body thead .sort-button {
  display: inline-flex !important;
  align-items: center !important;
  gap: 4px !important;
  width: auto !important;
  max-width: 100% !important;
  line-height: 1 !important;
  vertical-align: middle !important;
}
.asset-table-body thead th:not(:first-child) .sort-button {
  justify-content: flex-end !important;
}
.asset-table-body thead .sort-mark {
  min-width: 12px !important;
  width: 12px !important;
  height: 12px !important;
  margin-left: 0 !important;
  display: inline-grid !important;
  place-items: center !important;
  border-radius: 4px !important;
  color: transparent !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  line-height: 1 !important;
  font-size: 0 !important;
  transform: translateY(-0.5px) !important;
}
.asset-table-body thead .sort-mark::before {
  content: "";
  width: 0;
  height: 0;
  border-left: 3.5px solid transparent;
  border-right: 3.5px solid transparent;
  border-bottom: 5px solid rgba(149, 164, 187, 0.36);
  transform: translateY(0.5px);
}
.asset-table-body thead .sort-button.active .sort-mark {
  background: rgba(114, 183, 255, 0.12) !important;
  border-color: rgba(114, 183, 255, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 0 1px rgba(0,0,0,0.08) !important;
}
.asset-table-body thead .sort-button.active .sort-mark::before {
  border-bottom-color: #72b7ff;
}
.asset-table-body thead .sort-button.active .sort-mark[data-dir="desc"]::before {
  transform: translateY(-0.5px) rotate(180deg);
}

/* 2026-05-29: history marker semantic colors + optically centered sort triangles.
   History circles: error=red, change=yellow, profit with enough bid liquidity=bright green,
   profit below 기준금액 liquidity=dark green. Keep this independent from trading up/down tokens. */
:root {
  --history-profit-ok: #5ff29a;
  --history-profit-low: #206c43;
  --history-change: #f4c84d;
  --history-error: #ff5b6e;
}
.realtime-log-list article.good .history-marker { color: var(--history-profit-ok) !important; }
.realtime-log-list article.low-good .history-marker { color: var(--history-profit-low) !important; }
.realtime-log-list article.event .history-marker,
.realtime-log-list article.warn .history-marker { color: var(--history-change) !important; }
.realtime-log-list article.bad .history-marker,
.realtime-log-list article.error .history-marker { color: var(--history-error) !important; }
.asset-table-body thead .sort-mark {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 12px !important;
  min-width: 12px !important;
  height: 12px !important;
  min-height: 12px !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  color: rgba(149, 164, 187, 0.45) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  font-size: 0 !important;
  line-height: 0 !important;
  vertical-align: middle !important;
  transform: none !important;
  position: relative !important;
}
.asset-table-body thead .sort-mark::before {
  content: "" !important;
  display: block !important;
  width: 7px !important;
  height: 6px !important;
  background: currentColor !important;
  border: 0 !important;
  clip-path: polygon(50% 0, 100% 100%, 0 100%) !important;
  transform: none !important;
  transform-origin: 50% 50% !important;
}
.asset-table-body thead .sort-button.active .sort-mark {
  color: #72b7ff !important;
  background: rgba(114, 183, 255, 0.12) !important;
  border-color: rgba(114, 183, 255, 0.28) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 0 0 1px rgba(0,0,0,0.08) !important;
}
.asset-table-body thead .sort-button.active .sort-mark[data-dir="desc"]::before {
  transform: rotate(180deg) !important;
}

/* 2026-05-29: clean sort mark — inactive is blank; active shows only a triangle, no chip/border. */
.asset-table-body thead .sort-mark {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.asset-table-body thead .sort-mark::before,
.asset-table-body thead .sort-mark::after {
  content: none !important;
  display: none !important;
}
.asset-table-body thead .sort-button.active .sort-mark {
  color: #72b7ff !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.asset-table-body thead .sort-button.active .sort-mark::before {
  content: "" !important;
  display: block !important;
  position: static !important;
  width: 7px !important;
  height: 6px !important;
  background: currentColor !important;
  border: 0 !important;
  border-radius: 0 !important;
  clip-path: polygon(50% 0, 100% 100%, 0 100%) !important;
  transform: none !important;
  opacity: 1 !important;
}
.asset-table-body thead .sort-button.active .sort-mark[data-dir="desc"]::before {
  transform: rotate(180deg) !important;
}

:root {
  --positive: #f04452;
  --negative: #2f80ed;
  --green: var(--positive);
  --red: var(--positive);
  --blue: var(--negative);
  --kr-amount: #a9bdd3;
  --kr-market-volume: var(--kr-amount);
  --kr-shop-price: #e8893a;
  --kr-bid-price: #f4d35e;
  --kr-bid-value: var(--kr-amount);
  --kr-ask-price: #64a8ff;
}

.volume-cell .value-strong { color: var(--kr-market-volume) !important; }
.shop-cell .value-strong { color: var(--kr-shop-price) !important; }
.bid-cell .value-strong { color: var(--kr-bid-price) !important; }
.bid-value-cell .value-strong { color: var(--kr-bid-value) !important; }
.rate-cell .badge.good,
.profit-cell .good-text { color: var(--positive) !important; }
.rate-cell .badge.bad,
.profit-cell .bad-text { color: var(--negative) !important; }
.badge.good { background: rgba(240, 68, 82, 0.12) !important; }
.badge.bad { background: rgba(47, 128, 237, 0.12) !important; }

/* Korean orderbook convention: bid/buy red, ask/sell blue. */
.trade-bid .trade-price,
.bid-row .book-price { color: var(--kr-bid-price) !important; }
.trade-ask .trade-price,
.ask-row .book-price { color: var(--kr-ask-price) !important; }
.bid-row td { background: rgba(240, 68, 82, 0.060) !important; }
.ask-row td { background: rgba(47, 128, 237, 0.060) !important; }
.bid-bar { background: var(--positive) !important; }
.ask-bar { background: var(--negative) !important; }

/* Same concept / same level color mapping. */
.point-tool input,
.point-tool b {
  color: var(--kr-shop-price) !important;
}
.best-bid-row .book-price-cell .book-price {
  color: var(--kr-bid-price) !important;
}
.book-value,
.trades-table td:last-child,
.trades-table th:last-child {
  color: var(--kr-amount) !important;
}

.orderbook-side.panel-box,
.market-pulse-side.panel-box {
  border: 1px solid var(--line) !important;
  border-radius: var(--radius-lg) !important;
  background: var(--surface-side) !important;
  overflow: visible !important;
}

.orderbook-side.panel-box::after,
.market-pulse-side.panel-box::after {
  content: none !important;
  display: none !important;
}

.orderbook-side .side-panel-stack,
.market-pulse-side .realtime-log-stack,
.side-market-panels.panel-box-body,
.history-panel-body.panel-box-body {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
}

.orderbook-panel.inner-panel-box,
.trades-panel.inner-panel-box,
.history-list-panel.inner-panel-box,
.orderbook-body,
.trades-scroll.panel-box-body,
.history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  border-left: 0 !important;
  border-right: 0 !important;
  border-bottom: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.orderbook-side .trades-panel.inner-panel-box,
.orderbook-side .trades-scroll.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box,
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body,
.market-pulse-side .history-panel-body {
  border-bottom-left-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Orderbook selected row: exactly match the point-shop selected row treatment. */
.orderbook-table .selected-row > td,
.orderbook-table .selected-row > th {
  background-color: var(--surface-active) !important;
  background-image: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: inset 0 1px 0 rgba(170, 182, 200, 0.28), inset 0 -1px 0 rgba(170, 182, 200, 0.22) !important;
}
.orderbook-table .selected-row > td:first-child,
.orderbook-table .selected-row > th:first-child,
.orderbook-table .selected-row > td:last-child,
.orderbook-table .selected-row > th:last-child {
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: inset 0 1px 0 rgba(170, 182, 200, 0.28), inset 0 -1px 0 rgba(170, 182, 200, 0.22) !important;
}

/* 2026-05-29: Upbit-inspired orderbook/trade color structure using B-Point's existing palette.
   Structure only follows Upbit: ask area = blue side, bid area = red side,
   price/rate = change direction, executions = trade side. Actual colors stay in
   the prior B-Point Korean/Upbit palette, and exchange/shop marker stays gold. */
.orderbook-table .ask-row > td {
  background-color: rgba(47, 128, 237, 0.145) !important;
  box-shadow: none !important;
}
.orderbook-table .bid-row > td {
  background-color: rgba(240, 68, 82, 0.145) !important;
  box-shadow: none !important;
}
.orderbook-table .ask-row > .book-price-cell,
.orderbook-table .ask-row > .book-rate-cell,
.orderbook-table .ask-row > td:first-child { background-color: rgba(47, 128, 237, 0.190) !important; }
.orderbook-table .bid-row > .book-price-cell,
.orderbook-table .bid-row > .book-rate-cell,
.orderbook-table .bid-row > td:first-child { background-color: rgba(240, 68, 82, 0.190) !important; }
.orderbook-table .ask-bar { background: rgba(47, 128, 237, 0.58) !important; }
.orderbook-table .bid-bar { background: rgba(240, 68, 82, 0.58) !important; }

.orderbook-table .book-price-cell.up .book-price,
.orderbook-table .book-rate-cell.up .book-rate { color: var(--positive) !important; }
.orderbook-table .book-price-cell.down .book-price,
.orderbook-table .book-rate-cell.down .book-rate { color: var(--negative) !important; }
.orderbook-table .book-price-cell.flat .book-price,
.orderbook-table .book-rate-cell.flat .book-rate { color: var(--neutral) !important; }
.orderbook-table .book-value,
.orderbook-table .book-value span:not(.depth-bar) { color: var(--kr-amount) !important; }

/* 호가창 강조는 빗썸포인트샵 선택행과 동일하게: surface-active + 회색 상하 라인.
   교환가는 행 강조 없이 가격 숫자만 금색으로 표시한다. */
.orderbook-table .selected-row > td,
.orderbook-table .selected-row > th {
  background-color: var(--surface-active) !important;
  background-image: none !important;
  border-top: 0 !important;
  border-bottom: 0 !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: inset 0 1px 0 rgba(170, 182, 200, 0.28), inset 0 -1px 0 rgba(170, 182, 200, 0.22) !important;
}
.orderbook-table .selected-row > td:first-child,
.orderbook-table .selected-row > th:first-child,
.orderbook-table .selected-row > td:last-child,
.orderbook-table .selected-row > th:last-child {
  border-left-color: transparent !important;
  border-right-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: inset 0 1px 0 rgba(170, 182, 200, 0.28), inset 0 -1px 0 rgba(170, 182, 200, 0.22) !important;
}
.orderbook-table .book-marker-row .book-price-cell .book-price,
.orderbook-table .book-shop-row .book-price-cell .book-price {
  color: var(--kr-shop-price) !important;
}
.orderbook-table .best-bid-row .book-price-cell .book-price {
  color: var(--kr-bid-price) !important;
}

.trades-table .trade-bid .trade-price,
.trades-table .trade-bid td:last-child { color: var(--positive) !important; }
.trades-table .trade-ask .trade-price,
.trades-table .trade-ask td:last-child { color: var(--negative) !important; }
.trades-table .trade-neutral .trade-price,
.trades-table .trade-neutral td:last-child { color: var(--neutral) !important; }

/* 2026-05-29: comfortable separation between point-shop exchange price and best bid. */
.asset-table-body > table > tbody > tr > td.shop-cell .value-strong,
.shop-cell .value-strong,
.orderbook-table .book-marker-row .book-price-cell .book-price,
.orderbook-table .book-shop-row .book-price-cell .book-price {
  color: var(--kr-shop-price) !important;
  font-weight: 820 !important;
  text-shadow: none !important;
}
.asset-table-body > table > tbody > tr > td.bid-cell .value-strong,
.bid-cell .value-strong,
.orderbook-table .best-bid-row .book-price-cell .book-price {
  color: var(--kr-bid-price) !important;
  font-weight: 820 !important;
  text-shadow: none !important;
}

/* Final selected-row override: border-only emphasis. Do not add selected-row fill. */
.orderbook-table .selected-row.ask-row > td,
.orderbook-table .selected-row.ask-row > th { background-color: rgba(47, 128, 237, 0.145) !important; }
.orderbook-table .selected-row.bid-row > td,
.orderbook-table .selected-row.bid-row > th { background-color: rgba(240, 68, 82, 0.145) !important; }
.orderbook-table .selected-row.ask-row > .book-price-cell,
.orderbook-table .selected-row.ask-row > .book-rate-cell,
.orderbook-table .selected-row.ask-row > td:first-child { background-color: rgba(47, 128, 237, 0.190) !important; }
.orderbook-table .selected-row.bid-row > .book-price-cell,
.orderbook-table .selected-row.bid-row > .book-rate-cell,
.orderbook-table .selected-row.bid-row > td:first-child { background-color: rgba(240, 68, 82, 0.190) !important; }
.orderbook-table .selected-row > td,
.orderbook-table .selected-row > th,
.orderbook-table .selected-row > td.book-price-cell,
.orderbook-table .selected-row > td.book-rate-cell,
.orderbook-table .selected-row > td.book-value {
  background-image: none !important;
  box-shadow: inset 0 1px 0 rgba(210, 222, 238, 0.54), inset 0 -1px 0 rgba(210, 222, 238, 0.46) !important;
  border-left-color: transparent !important;
  border-right-color: transparent !important;
}
.orderbook-table .selected-row > td:first-child,
.orderbook-table .selected-row > th:first-child {
  box-shadow: inset 1px 0 0 rgba(210, 222, 238, 0.58), inset 0 1px 0 rgba(210, 222, 238, 0.54), inset 0 -1px 0 rgba(210, 222, 238, 0.46) !important;
}
.orderbook-table .selected-row > td:last-child,
.orderbook-table .selected-row > th:last-child {
  box-shadow: inset -1px 0 0 rgba(210, 222, 238, 0.58), inset 0 1px 0 rgba(210, 222, 238, 0.54), inset 0 -1px 0 rgba(210, 222, 238, 0.46) !important;
}

/* 2026-05-29: calm full-dashboard tone pass.
   Keep Korean market semantics and scanability, but reduce saturation/glow/colored fills. */
:root {
  --bg: #090d14;
  --bg-soft: #0e141f;
  --panel: rgba(15, 21, 32, 0.88);
  --panel-solid: #101724;
  --panel-2: #151e2d;
  --line: rgba(142, 154, 174, 0.16);
  --line-strong: rgba(150, 162, 182, 0.26);
  --text: #dce5ee;
  --muted: #9daabb;
  --faint: #7f8ca0;
  --positive: #d96b72;
  --negative: #5f8fcf;
  --green: var(--positive);
  --red: var(--positive);
  --blue: var(--negative);
  --yellow: #d1ab63;
  --purple: #9e8bc8;
  --neutral: #9aa6b7;
  --surface-main: rgba(13, 19, 30, 0.94);
  --surface-side: rgba(11, 17, 27, 0.91);
  --surface-inner: rgba(9, 14, 22, 0.58);
  --surface-raised: rgba(19, 27, 40, 0.74);
  --surface-hover: rgba(31, 39, 51, 0.64);
  --surface-active: rgba(41, 45, 52, 0.78);
  --kr-amount: #98a5b6;
  --kr-market-volume: var(--kr-amount);
  --kr-shop-price: #d18c51;
  --kr-bid-price: #d4ba68;
  --kr-bid-value: var(--kr-amount);
  --kr-ask-price: #6796c9;
  --history-profit-ok: #89b891;
  --history-profit-low: #53775f;
  --history-change: #c7a55c;
  --history-error: #c96a72;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.20);
}

body {
  background:
    radial-gradient(circle at 20% -12%, rgba(103, 150, 201, 0.08), transparent 34rem),
    radial-gradient(circle at 86% 4%, rgba(137, 184, 145, 0.045), transparent 30rem),
    linear-gradient(180deg, #0b1019 0%, var(--bg) 72%) !important;
}

.sidebar,
.table-wrap.panel-box,
.orderbook-side.panel-box,
.market-pulse-side.panel-box,
.panel-box,
.inner-panel-box,
.summary-card,
.asset-menu-pop,
.tool-control,
.nav-item {
  box-shadow: none !important;
}

.brand-mark {
  background: linear-gradient(135deg, #315177, #3f6f5b) !important;
  color: #eef4f7 !important;
  box-shadow: none !important;
}
.nav-item.is-active {
  color: #edf3f8 !important;
  background: rgba(28, 37, 50, 0.82) !important;
  border-color: rgba(103, 150, 201, 0.38) !important;
  box-shadow: inset 3px 0 0 rgba(103, 150, 201, 0.60) !important;
}
.nav-item span,
.asset-menu-count,
.history-meta,
.pill {
  color: rgba(209, 171, 99, 0.78) !important;
  background: rgba(209, 171, 99, 0.065) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row > td,
.table-wrap > table > tbody > tr.asset-row > td {
  background-color: rgba(12, 18, 28, 0.70) !important;
  border-bottom-color: rgba(142, 154, 174, 0.13) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td,
.table-wrap > table > tbody > tr.asset-row:nth-child(even) > td {
  background-color: rgba(16, 23, 34, 0.70) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td,
.table-wrap > table > tbody > tr.asset-row:hover > td {
  background-color: var(--surface-hover) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td {
  background-color: var(--surface-active) !important;
  box-shadow: inset 0 1px 0 rgba(176, 186, 202, 0.26), inset 0 -1px 0 rgba(176, 186, 202, 0.22) !important;
}

.rate-cell .badge.good,
.badge.good {
  color: var(--positive) !important;
  background: rgba(217, 107, 114, 0.085) !important;
}
.rate-cell .badge.bad,
.badge.bad {
  color: var(--negative) !important;
  background: rgba(95, 143, 207, 0.085) !important;
}
.profit-cell .good-text,
.rate-cell .badge.good { color: var(--positive) !important; }
.profit-cell .bad-text,
.rate-cell .badge.bad { color: var(--negative) !important; }

.orderbook-table .ask-row > td,
.orderbook-table .selected-row.ask-row > td,
.orderbook-table .selected-row.ask-row > th {
  background-color: rgba(95, 143, 207, 0.080) !important;
}
.orderbook-table .bid-row > td,
.orderbook-table .selected-row.bid-row > td,
.orderbook-table .selected-row.bid-row > th {
  background-color: rgba(217, 107, 114, 0.080) !important;
}
.orderbook-table .ask-row > .book-price-cell,
.orderbook-table .ask-row > .book-rate-cell,
.orderbook-table .ask-row > td:first-child,
.orderbook-table .selected-row.ask-row > .book-price-cell,
.orderbook-table .selected-row.ask-row > .book-rate-cell,
.orderbook-table .selected-row.ask-row > td:first-child {
  background-color: rgba(95, 143, 207, 0.115) !important;
}
.orderbook-table .bid-row > .book-price-cell,
.orderbook-table .bid-row > .book-rate-cell,
.orderbook-table .bid-row > td:first-child,
.orderbook-table .selected-row.bid-row > .book-price-cell,
.orderbook-table .selected-row.bid-row > .book-rate-cell,
.orderbook-table .selected-row.bid-row > td:first-child {
  background-color: rgba(217, 107, 114, 0.115) !important;
}
.orderbook-table .ask-bar { background: rgba(95, 143, 207, 0.38) !important; }
.orderbook-table .bid-bar { background: rgba(217, 107, 114, 0.38) !important; }
.orderbook-table .selected-row > td,
.orderbook-table .selected-row > th,
.orderbook-table .selected-row > td.book-price-cell,
.orderbook-table .selected-row > td.book-rate-cell,
.orderbook-table .selected-row > td.book-value {
  box-shadow: inset 0 1px 0 rgba(176, 186, 202, 0.34), inset 0 -1px 0 rgba(176, 186, 202, 0.30) !important;
}
.orderbook-table .selected-row > td:first-child,
.orderbook-table .selected-row > th:first-child {
  box-shadow: inset 1px 0 0 rgba(176, 186, 202, 0.34), inset 0 1px 0 rgba(176, 186, 202, 0.34), inset 0 -1px 0 rgba(176, 186, 202, 0.30) !important;
}
.orderbook-table .selected-row > td:last-child,
.orderbook-table .selected-row > th:last-child {
  box-shadow: inset -1px 0 0 rgba(176, 186, 202, 0.34), inset 0 1px 0 rgba(176, 186, 202, 0.34), inset 0 -1px 0 rgba(176, 186, 202, 0.30) !important;
}

.asset-table-body thead .sort-button.active .sort-mark {
  color: #86a9cf !important;
}
:focus-visible {
  outline-color: rgba(134, 169, 207, 0.48) !important;
}

/* 2026-05-29: slight tone-up after calm pass — a bit more lively, still comfortable. */
:root {
  --bg: #0a0f18;
  --bg-soft: #101827;
  --panel: rgba(17, 24, 37, 0.90);
  --panel-solid: #121b2a;
  --panel-2: #182438;
  --line: rgba(150, 165, 188, 0.18);
  --line-strong: rgba(158, 174, 198, 0.30);
  --text: #e5edf5;
  --muted: #a8b6c7;
  --faint: #8997ab;
  --positive: #e47a81;
  --negative: #6fa1dc;
  --green: var(--positive);
  --red: var(--positive);
  --blue: var(--negative);
  --yellow: #ddba70;
  --purple: #aa98d2;
  --neutral: #a4b0c1;
  --surface-main: rgba(15, 23, 36, 0.95);
  --surface-side: rgba(13, 20, 32, 0.92);
  --surface-inner: rgba(10, 16, 26, 0.62);
  --surface-raised: rgba(22, 32, 48, 0.78);
  --surface-hover: rgba(36, 47, 62, 0.68);
  --surface-active: rgba(47, 53, 63, 0.82);
  --kr-amount: #a3b0c1;
  --kr-market-volume: var(--kr-amount);
  --kr-shop-price: #dd985a;
  --kr-bid-price: #dec777;
  --kr-bid-value: var(--kr-amount);
  --kr-ask-price: #78a8d8;
  --history-profit-ok: #97c79c;
  --history-profit-low: #63866d;
  --history-change: #d2b368;
  --history-error: #d87981;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
}

body {
  background:
    radial-gradient(circle at 20% -12%, rgba(120, 168, 216, 0.105), transparent 34rem),
    radial-gradient(circle at 86% 4%, rgba(151, 199, 156, 0.060), transparent 30rem),
    linear-gradient(180deg, #0d1420 0%, var(--bg) 72%) !important;
}

.brand-mark {
  background: linear-gradient(135deg, #3a5f89, #4a7c66) !important;
}
.nav-item.is-active {
  background: rgba(33, 45, 61, 0.86) !important;
  border-color: rgba(120, 168, 216, 0.44) !important;
  box-shadow: inset 3px 0 0 rgba(120, 168, 216, 0.68) !important;
}
.nav-item span,
.asset-menu-count,
.history-meta,
.pill {
  color: rgba(221, 186, 112, 0.84) !important;
  background: rgba(221, 186, 112, 0.080) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row > td,
.table-wrap > table > tbody > tr.asset-row > td {
  background-color: rgba(14, 21, 33, 0.74) !important;
  border-bottom-color: rgba(150, 165, 188, 0.15) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td,
.table-wrap > table > tbody > tr.asset-row:nth-child(even) > td {
  background-color: rgba(18, 27, 40, 0.74) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td,
.table-wrap > table > tbody > tr.asset-row:hover > td {
  background-color: var(--surface-hover) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td {
  background-color: var(--surface-active) !important;
  box-shadow: inset 0 1px 0 rgba(188, 200, 216, 0.30), inset 0 -1px 0 rgba(188, 200, 216, 0.26) !important;
}

.rate-cell .badge.good,
.badge.good {
  color: var(--positive) !important;
  background: rgba(228, 122, 129, 0.105) !important;
}
.rate-cell .badge.bad,
.badge.bad {
  color: var(--negative) !important;
  background: rgba(111, 161, 220, 0.105) !important;
}

.orderbook-table .ask-row > td,
.orderbook-table .selected-row.ask-row > td,
.orderbook-table .selected-row.ask-row > th {
  background-color: rgba(111, 161, 220, 0.100) !important;
}
.orderbook-table .bid-row > td,
.orderbook-table .selected-row.bid-row > td,
.orderbook-table .selected-row.bid-row > th {
  background-color: rgba(228, 122, 129, 0.100) !important;
}
.orderbook-table .ask-row > .book-price-cell,
.orderbook-table .ask-row > .book-rate-cell,
.orderbook-table .ask-row > td:first-child,
.orderbook-table .selected-row.ask-row > .book-price-cell,
.orderbook-table .selected-row.ask-row > .book-rate-cell,
.orderbook-table .selected-row.ask-row > td:first-child {
  background-color: rgba(111, 161, 220, 0.140) !important;
}
.orderbook-table .bid-row > .book-price-cell,
.orderbook-table .bid-row > .book-rate-cell,
.orderbook-table .bid-row > td:first-child,
.orderbook-table .selected-row.bid-row > .book-price-cell,
.orderbook-table .selected-row.bid-row > .book-rate-cell,
.orderbook-table .selected-row.bid-row > td:first-child {
  background-color: rgba(228, 122, 129, 0.140) !important;
}
.orderbook-table .ask-bar { background: rgba(111, 161, 220, 0.44) !important; }
.orderbook-table .bid-bar { background: rgba(228, 122, 129, 0.44) !important; }

.asset-table-body thead .sort-button.active .sort-mark {
  color: #95b8df !important;
}
:focus-visible {
  outline-color: rgba(149, 184, 223, 0.54) !important;
}

/* 2026-05-29: tone level 8 — vivid and high-scan, controlled below neon. */
:root {
  --bg: #0c1320;
  --bg-soft: #142236;
  --panel: rgba(22, 33, 51, 0.94);
  --panel-solid: #17263b;
  --panel-2: #22334c;
  --line: rgba(174, 192, 220, 0.25);
  --line-strong: rgba(184, 203, 232, 0.40);
  --text: #f2f7fc;
  --muted: #bccadd;
  --faint: #9eadc2;
  --positive: #f48c93;
  --negative: #88bcf4;
  --green: var(--positive);
  --red: var(--positive);
  --blue: var(--negative);
  --yellow: #efd084;
  --purple: #c2afe6;
  --neutral: #b8c4d4;
  --surface-main: rgba(19, 30, 46, 0.98);
  --surface-side: rgba(17, 27, 43, 0.96);
  --surface-inner: rgba(14, 23, 37, 0.72);
  --surface-raised: rgba(30, 46, 68, 0.88);
  --surface-hover: rgba(50, 67, 88, 0.78);
  --surface-active: rgba(64, 72, 88, 0.90);
  --kr-amount: #b8c5d6;
  --kr-market-volume: var(--kr-amount);
  --kr-shop-price: #efaa6a;
  --kr-bid-price: #f0d98a;
  --kr-bid-value: var(--kr-amount);
  --kr-ask-price: #91c3f2;
  --history-profit-ok: #b0e0b0;
  --history-profit-low: #79a283;
  --history-change: #e5c77a;
  --history-error: #e98a92;
  --shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

body {
  background:
    radial-gradient(circle at 20% -12%, rgba(145, 195, 242, 0.165), transparent 34rem),
    radial-gradient(circle at 86% 4%, rgba(176, 224, 176, 0.095), transparent 30rem),
    linear-gradient(180deg, #111d2f 0%, var(--bg) 72%) !important;
}

.brand-mark {
  background: linear-gradient(135deg, #4a78aa, #5f9a7f) !important;
}
.nav-item.is-active {
  background: rgba(44, 60, 82, 0.94) !important;
  border-color: rgba(145, 195, 242, 0.62) !important;
  box-shadow: inset 3px 0 0 rgba(145, 195, 242, 0.86) !important;
}
.nav-item span,
.asset-menu-count,
.history-meta,
.pill {
  color: rgba(239, 208, 132, 0.96) !important;
  background: rgba(239, 208, 132, 0.115) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row > td,
.table-wrap > table > tbody > tr.asset-row > td {
  background-color: rgba(20, 31, 48, 0.86) !important;
  border-bottom-color: rgba(174, 192, 220, 0.21) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td,
.table-wrap > table > tbody > tr.asset-row:nth-child(even) > td {
  background-color: rgba(26, 39, 58, 0.86) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td,
.table-wrap > table > tbody > tr.asset-row:hover > td {
  background-color: var(--surface-hover) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td {
  background-color: var(--surface-active) !important;
  box-shadow: inset 0 1px 0 rgba(218, 228, 242, 0.40), inset 0 -1px 0 rgba(218, 228, 242, 0.34) !important;
}

.rate-cell .badge.good,
.badge.good {
  color: var(--positive) !important;
  background: rgba(244, 140, 147, 0.145) !important;
}
.rate-cell .badge.bad,
.badge.bad {
  color: var(--negative) !important;
  background: rgba(136, 188, 244, 0.145) !important;
}

.orderbook-table .ask-row > td,
.orderbook-table .selected-row.ask-row > td,
.orderbook-table .selected-row.ask-row > th {
  background-color: rgba(136, 188, 244, 0.145) !important;
}
.orderbook-table .bid-row > td,
.orderbook-table .selected-row.bid-row > td,
.orderbook-table .selected-row.bid-row > th {
  background-color: rgba(244, 140, 147, 0.145) !important;
}
.orderbook-table .ask-row > .book-price-cell,
.orderbook-table .ask-row > .book-rate-cell,
.orderbook-table .ask-row > td:first-child,
.orderbook-table .selected-row.ask-row > .book-price-cell,
.orderbook-table .selected-row.ask-row > .book-rate-cell,
.orderbook-table .selected-row.ask-row > td:first-child {
  background-color: rgba(136, 188, 244, 0.195) !important;
}
.orderbook-table .bid-row > .book-price-cell,
.orderbook-table .bid-row > .book-rate-cell,
.orderbook-table .bid-row > td:first-child,
.orderbook-table .selected-row.bid-row > .book-price-cell,
.orderbook-table .selected-row.bid-row > .book-rate-cell,
.orderbook-table .selected-row.bid-row > td:first-child {
  background-color: rgba(244, 140, 147, 0.195) !important;
}
.orderbook-table .ask-bar { background: rgba(136, 188, 244, 0.56) !important; }
.orderbook-table .bid-bar { background: rgba(244, 140, 147, 0.56) !important; }

.asset-table-body thead .sort-button.active .sort-mark {
  color: #afd1f5 !important;
}
:focus-visible {
  outline-color: rgba(175, 209, 245, 0.68) !important;
}

/* 2026-05-30: tone level 7 — livelier than 6, softer than the prior 7.5. */
:root {
  --bg: #0b111c;
  --bg-soft: #121d2f;
  --panel: rgba(19, 28, 44, 0.92);
  --panel-solid: #142137;
  --panel-2: #1d2b43;
  --line: rgba(162, 178, 204, 0.21);
  --line-strong: rgba(171, 189, 216, 0.34);
  --text: #ebf2f8;
  --muted: #b1bfd2;
  --faint: #93a2b8;
  --positive: #eb848b;
  --negative: #7badE8;
  --green: var(--positive);
  --red: var(--positive);
  --blue: var(--negative);
  --yellow: #e6c679;
  --purple: #b5a2da;
  --neutral: #acb8c9;
  --surface-main: rgba(17, 26, 41, 0.96);
  --surface-side: rgba(15, 23, 37, 0.94);
  --surface-inner: rgba(12, 19, 31, 0.67);
  --surface-raised: rgba(26, 38, 58, 0.82);
  --surface-hover: rgba(42, 56, 75, 0.72);
  --surface-active: rgba(54, 61, 76, 0.86);
  --kr-amount: #acb9cb;
  --kr-market-volume: var(--kr-amount);
  --kr-shop-price: #e6a060;
  --kr-bid-price: #e7d080;
  --kr-bid-value: var(--kr-amount);
  --kr-ask-price: #84b5e8;
  --shadow: 0 13px 35px rgba(0, 0, 0, 0.23);
}

body {
  background:
    radial-gradient(circle at 20% -12%, rgba(132, 181, 232, 0.135), transparent 34rem),
    radial-gradient(circle at 86% 4%, rgba(164, 211, 168, 0.075), transparent 30rem),
    linear-gradient(180deg, #0f1827 0%, var(--bg) 72%) !important;
}

.brand-mark {
  background: linear-gradient(135deg, #426b99, #548a72) !important;
}
.nav-item.is-active {
  background: rgba(38, 52, 71, 0.90) !important;
  border-color: rgba(132, 181, 232, 0.52) !important;
  box-shadow: inset 3px 0 0 rgba(132, 181, 232, 0.76) !important;
}
.nav-item span,
.asset-menu-count,
.history-meta,
.pill {
  color: rgba(230, 198, 121, 0.90) !important;
  background: rgba(230, 198, 121, 0.095) !important;
}

.table-wrap .asset-table-body > table > tbody > tr.asset-row > td,
.table-wrap > table > tbody > tr.asset-row > td {
  background-color: rgba(17, 26, 41, 0.80) !important;
  border-bottom-color: rgba(162, 178, 204, 0.18) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:nth-child(even) > td,
.table-wrap > table > tbody > tr.asset-row:nth-child(even) > td {
  background-color: rgba(22, 33, 50, 0.80) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row:hover > td,
.table-wrap > table > tbody > tr.asset-row:hover > td {
  background-color: var(--surface-hover) !important;
}
.table-wrap .asset-table-body > table > tbody > tr.asset-row.is-expanded > td,
.table-wrap > table > tbody > tr.asset-row.is-expanded > td {
  background-color: var(--surface-active) !important;
  box-shadow: inset 0 1px 0 rgba(202, 214, 232, 0.34), inset 0 -1px 0 rgba(202, 214, 232, 0.29) !important;
}

.rate-cell .badge.good,
.badge.good {
  color: var(--positive) !important;
  background: rgba(235, 132, 139, 0.122) !important;
}
.rate-cell .badge.bad,
.badge.bad {
  color: var(--negative) !important;
  background: rgba(123, 173, 232, 0.122) !important;
}

.orderbook-table .ask-row > td,
.orderbook-table .selected-row.ask-row > td,
.orderbook-table .selected-row.ask-row > th {
  background-color: rgba(123, 173, 232, 0.120) !important;
}
.orderbook-table .bid-row > td,
.orderbook-table .selected-row.bid-row > td,
.orderbook-table .selected-row.bid-row > th {
  background-color: rgba(235, 132, 139, 0.120) !important;
}
.orderbook-table .ask-row > .book-price-cell,
.orderbook-table .ask-row > .book-rate-cell,
.orderbook-table .ask-row > td:first-child,
.orderbook-table .selected-row.ask-row > .book-price-cell,
.orderbook-table .selected-row.ask-row > .book-rate-cell,
.orderbook-table .selected-row.ask-row > td:first-child {
  background-color: rgba(123, 173, 232, 0.165) !important;
}
.orderbook-table .bid-row > .book-price-cell,
.orderbook-table .bid-row > .book-rate-cell,
.orderbook-table .bid-row > td:first-child,
.orderbook-table .selected-row.bid-row > .book-price-cell,
.orderbook-table .selected-row.bid-row > .book-rate-cell,
.orderbook-table .selected-row.bid-row > td:first-child {
  background-color: rgba(235, 132, 139, 0.165) !important;
}
.orderbook-table .ask-bar { background: rgba(123, 173, 232, 0.49) !important; }
.orderbook-table .bid-bar { background: rgba(235, 132, 139, 0.49) !important; }

.asset-table-body thead .sort-button.active .sort-mark {
  color: #a0c4ee !important;
}
:focus-visible {
  outline-color: rgba(160, 196, 238, 0.60) !important;
}

/* 2026-05-29: restore original history-circle semantic colors, independent of tone calibration. */
:root {
  --history-profit-ok: #5ff29a;
  --history-profit-low: #206c43;
  --history-change: #f4c84d;
  --history-error: #ff5b6e;
}
.realtime-log-list article.good .history-marker { color: var(--history-profit-ok) !important; }
.realtime-log-list article.low-good .history-marker { color: var(--history-profit-low) !important; }
.realtime-log-list article.event .history-marker,
.realtime-log-list article.warn .history-marker { color: var(--history-change) !important; }
.realtime-log-list article.bad .history-marker,
.realtime-log-list article.error .history-marker { color: var(--history-error) !important; }

/* 2026-06-02: history uses the full stored dataset; keep the panel fixed and scroll only the list content. */
.market-pulse-side.panel-box {
  align-self: start !important;
  height: var(--matched-side-height, calc(100vh - 76px)) !important;
  min-height: 190px !important;
  max-height: var(--matched-side-height, calc(100vh - 76px)) !important;
  overflow: visible !important;
}
.market-pulse-side .realtime-log-stack.history-panel {
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: visible !important;
}
.market-pulse-side .history-panel-body.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: none !important;
  overflow: hidden !important;
}
.market-pulse-side .history-panel-body.panel-box-body,
.market-pulse-side .history-list-panel.inner-panel-box {
  display: flex !important;
  flex-direction: column !important;
}
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  flex: 1 1 auto !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin;
}

/* 2026-06-02: match history height to the orderbook box and group rows by date. */
.history-date-divider {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 24px;
  padding: 4px 7px 3px;
  color: #aab8cc;
  font-size: 0.58rem;
  font-weight: 860;
  letter-spacing: 0.02em;
  background: linear-gradient(180deg, rgba(13, 20, 33, 0.98), rgba(11, 17, 28, 0.92));
  border-top: 1px solid rgba(139, 162, 196, 0.20);
  border-bottom: 1px solid rgba(139, 162, 196, 0.14);
}
.history-date-divider::before,
.history-date-divider::after {
  content: "";
  height: 1px;
  flex: 1 1 auto;
  background: rgba(139, 162, 196, 0.18);
}
.history-date-divider span {
  flex: 0 0 auto;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1180px) {
  .market-layout {
    grid-template-columns: max-content minmax(252px, 270px) !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
  }
  .table-wrap.panel-box {
    grid-column: 1 !important;
    grid-row: 1 / span 2 !important;
  }
  .orderbook-side.panel-box {
    grid-column: 2 !important;
    grid-row: 1 !important;
    display: block !important;
    position: static !important;
  }
  .market-pulse-side.panel-box {
    grid-column: 2 !important;
    grid-row: 2 !important;
    display: block !important;
    position: static !important;
    margin-top: 7px !important;
  }
}

/* 2026-06-02: mobile = row 1 coin list full-width; row 2 orderbook/trades + history in two columns. */
@media (max-width: 900px) {
  .market-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    grid-auto-rows: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    align-items: start !important;
  }
  .table-wrap.panel-box {
    grid-column: 1 / -1 !important;
    grid-row: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .orderbook-side.panel-box {
    grid-column: 1 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    position: static !important;
  }
  .market-pulse-side.panel-box {
    grid-column: 2 !important;
    grid-row: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    position: static !important;
    margin-top: 0 !important;
  }
}

/* 2026-06-03: history width fits visible row text instead of clipping titles.
   Keep it compact: title rows size to content, expanded details can widen/wrap up to a safe cap. */
.market-layout {
  grid-template-columns: max-content max-content fit-content(360px) !important;
}
.market-pulse-side.panel-box,
.market-pulse-side .realtime-log-stack,
.market-pulse-side .history-panel,
.market-pulse-side .history-panel-body,
.market-pulse-side .history-list-panel,
.market-pulse-side .realtime-log-list {
  width: max-content !important;
  min-width: 208px !important;
  max-width: 360px !important;
}
.realtime-log-list article,
.realtime-log-list .history-item {
  grid-template-columns: 9px 58px max-content !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: 360px !important;
}
.realtime-log-list time {
  white-space: nowrap !important;
  font-variant-numeric: tabular-nums !important;
}
.market-pulse-side .realtime-log-list b {
  overflow: visible !important;
  text-overflow: clip !important;
  white-space: nowrap !important;
}
.realtime-log-list .history-detail {
  grid-column: 3 / -1 !important;
  width: max-content !important;
  max-width: 270px !important;
  white-space: pre-line !important;
  overflow-wrap: anywhere !important;
}
.realtime-log-list .history-item.is-expanded {
  height: max-content !important;
  min-height: 76px !important;
  align-items: start !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}
@media (max-width: 900px) {
  .market-pulse-side.panel-box,
  .market-pulse-side .realtime-log-stack,
  .market-pulse-side .history-panel,
  .market-pulse-side .history-panel-body,
  .market-pulse-side .history-list-panel,
  .market-pulse-side .realtime-log-list,
  .realtime-log-list article,
  .realtime-log-list .history-item {
    width: 100% !important;
    max-width: 100% !important;
  }
  .realtime-log-list article,
  .realtime-log-list .history-item {
    grid-template-columns: 9px 58px minmax(max-content, 1fr) !important;
  }
}

/* 2026-06-04: final history display guard.
   Fix expanded-detail overlap/visual stacking and keep type filters (especially 오류) stable. */
.market-pulse-side.panel-box,
.market-pulse-side .realtime-log-stack,
.market-pulse-side .history-panel,
.market-pulse-side .history-panel-body,
.market-pulse-side .history-list-panel,
.market-pulse-side .realtime-log-list {
  box-sizing: border-box !important;
}
.market-pulse-side .history-list-panel.inner-panel-box .realtime-log-list.panel-box-body {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  align-content: stretch !important;
  gap: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}
.realtime-log-list article,
.realtime-log-list .history-item {
  box-sizing: border-box !important;
  grid-template-columns: 9px 58px max-content !important;
  grid-auto-rows: max-content !important;
  align-items: center !important;
  width: max-content !important;
  min-width: 100% !important;
  max-width: 360px !important;
  height: var(--history-row-height) !important;
  min-height: var(--history-row-height) !important;
  max-height: none !important;
  overflow: visible !important;
  isolation: isolate !important;
}
.realtime-log-list .history-item.is-expanded {
  height: auto !important;
  min-height: max-content !important;
  align-items: start !important;
  padding-top: 6px !important;
  padding-bottom: 6px !important;
  background: rgba(31, 42, 58, 0.72) !important;
  box-shadow: inset 0 1px 0 rgba(202, 214, 232, 0.22), inset 0 -1px 0 rgba(202, 214, 232, 0.18) !important;
}
.realtime-log-list .history-item.is-expanded + .history-item {
  position: relative !important;
  z-index: 0 !important;
}
.realtime-log-list .history-detail {
  grid-column: 3 / -1 !important;
  box-sizing: border-box !important;
  position: relative !important;
  z-index: 1 !important;
  width: 100% !important;
  min-width: 154px !important;
  max-width: min(270px, calc(100vw - 96px)) !important;
  margin-top: 4px !important;
  white-space: pre-line !important;
  overflow: visible !important;
  overflow-wrap: anywhere !important;
  line-height: 1.34 !important;
}
.realtime-log-list .history-item:not(.is-expanded) .history-detail {
  display: none !important;
}
.realtime-log-list .history-item.is-expanded .history-detail {
  display: block !important;
}
.realtime-log-list article.profit-blue-dark .history-marker { color: #1d4ed8 !important; }
.realtime-log-list article.profit-blue-bright .history-marker { color: #38bdf8 !important; }
.realtime-log-list article.profit-green-dark .history-marker { color: #166534 !important; }
.realtime-log-list article.profit-green-bright .history-marker { color: #4ade80 !important; }
.realtime-log-list article.error .history-marker { color: var(--history-error) !important; }
.realtime-log-list .history-item:not([data-history-id]) {
  cursor: default !important;
  grid-template-columns: 9px 58px minmax(116px, 1fr) !important;
  width: 100% !important;
}
.history-date-divider {
  display: none !important;
}

/* 2026-06-07: vertically center collapsed history rows.
   Fixed-height grid rows were centering each cell inside the content track,
   but the track itself stayed at the top of the row. */
.realtime-log-list .history-item:not(.is-expanded) {
  align-content: center !important;
  align-items: center !important;
}
.realtime-log-list .history-item:not(.is-expanded) .history-marker {
  margin-top: 0 !important;
}
.realtime-log-list .history-item:not(.is-expanded) time {
  padding-top: 0 !important;
}
@media (max-width: 900px) {
  .realtime-log-list article,
  .realtime-log-list .history-item {
    grid-template-columns: 9px 58px minmax(0, 1fr) !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .market-pulse-side .realtime-log-list b {
    min-width: 0 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
  .realtime-log-list .history-detail {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }
}

/* 2026-06-04: history 시간/수익률 header matches the LEFT Bithumb point-shop table header exactly. */
.history-sort-title-row {
  display: grid !important;
  grid-template-columns: 10px 58px minmax(0, 1fr) !important;
  column-gap: 4px !important;
  align-items: center !important;
  min-height: 26px !important;
  height: 26px !important;
  padding: 3px 6px !important;
  border-bottom: 1px solid rgba(139, 158, 188, 0.24) !important;
  background: rgba(0, 0, 0, 0) !important;
  color: #d8e2ee !important;
  font-size: 0.66rem !important;
  font-weight: 780 !important;
  letter-spacing: normal !important;
  box-shadow: none !important;
}
.history-sort-spacer {
  width: 10px !important;
  min-width: 10px !important;
}
.history-sort-heading {
  appearance: none !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: inherit !important;
  font-size: 0.67rem !important;
  font-weight: 820 !important;
  line-height: 1 !important;
  letter-spacing: normal !important;
  text-align: left !important;
  white-space: nowrap !important;
  cursor: pointer !important;
  vertical-align: middle !important;
}
.history-sort-heading:hover,
.history-sort-heading.is-active {
  color: #f4f8ff !important;
}
.history-sort-heading .sort-mark {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 12px !important;
  min-width: 12px !important;
  height: 12px !important;
  min-height: 12px !important;
  margin-left: 0 !important;
  padding: 0 !important;
  border-radius: 4px !important;
  color: rgba(149, 164, 187, 0.45) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
  vertical-align: middle !important;
  transform: none !important;
  position: relative !important;
}
.history-sort-heading .sort-mark::before,
.history-sort-heading .sort-mark::after {
  content: none !important;
  display: none !important;
}
.history-sort-heading.is-active .sort-mark {
  color: #a0c4ee !important;
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}
.history-sort-heading.is-active .sort-mark::before {
  content: "" !important;
  display: block !important;
  position: static !important;
  width: 7px !important;
  height: 6px !important;
  background: currentColor !important;
  border: 0 !important;
  border-radius: 0 !important;
  clip-path: polygon(50% 0, 100% 100%, 0 100%) !important;
  transform: none !important;
  opacity: 1 !important;
}
.history-sort-heading.is-active .sort-mark[data-dir="desc"]::before {
  transform: rotate(180deg) !important;
}

/* Hangang Terminal shared navigation shell. Keep this final block authoritative. */
body { overflow-x: hidden; }
.app-shell.ht-app {
  display: grid !important;
  grid-template-columns: 176px minmax(0, 1fr) !important;
  gap: 0 !important;
  width: 100% !important;
  min-height: 100vh;
  margin: 0 !important;
}
.ht-main { min-width: 0; }
.sidebar.ht-sidebar {
  position: sticky !important;
  top: 0 !important;
  z-index: 20 !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 0 !important;
  width: 176px !important;
  height: 100vh !important;
  max-height: 100vh !important;
  min-height: 0;
  margin: 0 !important;
  padding: 14px 10px 12px !important;
  overflow: hidden !important;
  background: #080d16 !important;
  border: 0 !important;
  border-right: 1px solid #263348 !important;
  border-radius: 0 !important;
  box-shadow: 10px 0 28px rgba(0, 0, 0, 0.16) !important;
  backdrop-filter: none !important;
}
.ht-brand { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0 3px 14px; border-bottom: 1px solid #253247; color: #f7fbff; text-decoration: none; }
.ht-mark { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border: 1px solid rgba(126, 183, 255, 0.48); border-radius: 7px; background: linear-gradient(135deg, #315f99, #39755d); color: #fff; font-size: 13px; font-weight: 900; }
.ht-brand-copy { display: block; min-width: 0; }
.ht-brand-copy strong, .ht-brand-copy small { display: block; white-space: nowrap; }
.ht-brand-copy strong { font-size: 12px; line-height: 1.15; }
.ht-brand-copy small { margin-top: 3px; color: #75869e; font-size: 8px; font-weight: 750; letter-spacing: 0.08em; }
.ht-nav { display: flex; flex-direction: column; gap: 5px; margin-top: 14px; }
.ht-nav-link { display: flex; align-items: center; min-height: 31px; padding: 6px 8px; border: 1px solid transparent; border-radius: 6px; color: #b9c5d5; background: transparent; font-size: 11px; font-weight: 720; line-height: 1.15; text-decoration: none; white-space: nowrap; }
.ht-nav-link:hover, .ht-nav-link:focus-visible { border-color: #405576; background: #111b2a; color: #fff; outline: none; }
.ht-nav-link.is-active { border-color: rgba(116, 175, 255, 0.46); background: #172438; color: #fff; box-shadow: inset 3px 0 0 #74afff; }
.ht-status { display: flex; align-items: center; gap: 6px; margin-top: auto; padding: 11px 4px 0; border-top: 1px solid #253247; color: #718197; font-size: 8px; font-weight: 800; letter-spacing: 0.08em; white-space: nowrap; }
.ht-status i { width: 6px; height: 6px; flex: 0 0 6px; border-radius: 50%; background: #49d58a; box-shadow: 0 0 7px rgba(73, 213, 138, 0.55); }
@media (max-width: 640px) {
  .app-shell.ht-app { display: block !important; min-width: 0 !important; }
  .ht-main { width: 100% !important; max-width: 100% !important; min-width: 0 !important; }
  .sidebar.ht-sidebar { position: sticky !important; top: 0 !important; width: 100% !important; height: 64px !important; min-height: 64px !important; max-height: 64px !important; padding: 7px 10px !important; display: grid !important; grid-template-columns: auto minmax(0, 1fr) auto !important; align-items: center !important; gap: 10px !important; border-right: 0 !important; border-bottom: 1px solid #263348 !important; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22) !important; }
  .ht-brand { padding: 0; border: 0; }
  .ht-mark { width: 28px; height: 28px; flex-basis: 28px; }
  .ht-brand-copy { display: none; }
  .ht-nav { min-width: 0; flex-direction: row; gap: 4px; margin: 0; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
  .ht-nav-link { flex: 0 0 auto; min-height: 30px; padding: 6px 8px; }
  .ht-nav-link.is-active { box-shadow: inset 0 -2px 0 #74afff; }
  .ht-status { margin: 0; padding: 0; border: 0; }
  .ht-status span { display: none; }
}
@media (max-width: 480px) {
  .sidebar.ht-sidebar { grid-template-columns: 28px minmax(0, 1fr) !important; gap: 7px !important; }
  .ht-status { display: none; }
  .ht-nav-link { padding-inline: 7px; font-size: 10px; }
}

/* Unified collapsible Hangang Terminal navigation. */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.ht-brand-row { display: flex; align-items: center; gap: 5px; padding-bottom: 12px; border-bottom: 1px solid #253247; }
.ht-brand-row .ht-brand { flex: 1 1 auto; padding: 0; border: 0; }
.ht-toggle.sidebar-toggle { display: grid; place-items: center; width: 24px; height: 24px; margin-left: auto; flex: 0 0 24px; padding: 0; border: 1px solid #32435c; border-radius: 6px; background: #101a29; color: #c8d5e6; font-size: 17px; cursor: pointer; }
.ht-nav-link { gap: 9px; }
.ht-nav-link svg { width: 17px; height: 17px; flex: 0 0 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.app-shell.ht-app.is-sidebar-collapsed { grid-template-columns: 58px minmax(0, 1fr) !important; }
.app-shell.ht-app.is-sidebar-collapsed .sidebar.ht-sidebar { width: 58px !important; padding-inline: 8px !important; overflow: hidden !important; }
.app-shell.ht-app.is-sidebar-collapsed .ht-brand-row { display: grid; justify-items: center; gap: 7px; padding-bottom: 12px; }
.app-shell.ht-app.is-sidebar-collapsed .ht-brand-copy,
.app-shell.ht-app.is-sidebar-collapsed .ht-nav-link span,
.app-shell.ht-app.is-sidebar-collapsed .ht-status span { display: none; }
.app-shell.ht-app.is-sidebar-collapsed .ht-toggle.sidebar-toggle { position: static; width: 24px; height: 24px; margin: 0; font-size: 17px; }
.app-shell.ht-app.is-sidebar-collapsed .ht-nav { display: flex; }
.app-shell.ht-app.is-sidebar-collapsed .ht-nav-link { justify-content: center; padding-inline: 0; }
.app-shell.ht-app.is-sidebar-collapsed .ht-status { display: flex; justify-content: center; }
@media (max-width: 640px) {
  .app-shell.ht-app.is-sidebar-collapsed { display: block !important; }
  .app-shell.ht-app.is-sidebar-collapsed .sidebar.ht-sidebar { width: 100% !important; padding: 7px 10px !important; overflow: auto !important; }
  .ht-brand-row, .app-shell.ht-app.is-sidebar-collapsed .ht-brand-row { display: block; padding: 0; border: 0; }
  .ht-toggle.sidebar-toggle { display: none !important; }
  .ht-nav-link, .app-shell.ht-app.is-sidebar-collapsed .ht-nav-link { justify-content: flex-start; gap: 6px; }
  .app-shell.ht-app.is-sidebar-collapsed .ht-nav-link span { display: inline; }
}

