:root {
  --bg: #f4f6f8;
  --panel: #ffffff;
  --line: #dfe5ec;
  --line-soft: #edf1f5;
  --text: #17202a;
  --muted: #6b7785;
  --gold: #b88a2d;
  --gold-soft: #f7edda;
  --green: #028a55;
  --red: #c64040;
  --blue: #2866c7;
  --dark: #111827;
  --shadow: 0 12px 30px rgba(16, 24, 40, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  min-height: 100vh;
}

.topbar {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #111827;
  color: #fff;
  border-bottom: 1px solid #202938;
}

.brand {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0;
}

.subtitle {
  color: #aeb8c5;
  font-size: 12px;
  margin-top: 4px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.status-pill,
.role-pill {
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid #344052;
  border-radius: 6px;
  color: #d8dee8;
  background: #182131;
  white-space: nowrap;
}

.role-pill {
  cursor: pointer;
}

.role-pill.logged-in {
  color: #d8f8e8;
  border-color: rgba(2, 138, 85, 0.35);
}

.role-pill.guest {
  color: #d8dee8;
  border-color: #344052;
}

.role-pill.expired {
  color: #ffe2e2;
  border-color: rgba(198, 64, 64, 0.42);
}

.status-pill.online {
  color: #d8f8e8;
  border-color: rgba(2, 138, 85, 0.35);
}

.status-pill.error,
.status-pill.closed {
  color: #ffe2e2;
  border-color: rgba(198, 64, 64, 0.35);
}

.conversion-strip {
  margin: 18px 28px 12px;
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 18px;
  background: linear-gradient(90deg, #fff, #fff8eb);
  border: 1px solid #ead7b7;
  border-radius: 8px;
}

.conversion-strip.dashboard-strip {
  height: 160px;
  min-height: 160px;
  align-items: stretch;
  gap: 16px;
}

.btc-tile {
  width: 132px;
  min-width: 132px;
  height: 132px;
  min-height: 132px;
  aspect-ratio: 1 / 1;
  border: 1px solid #e7c978;
  border-radius: 8px;
  background: linear-gradient(160deg, #fffdf5 0%, #fff3c4 52%, #f8d36b 100%);
  color: #422006;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85), 0 10px 22px rgba(122, 82, 16, 0.12);
}

.btc-symbol {
  font-size: 35px;
  font-weight: 800;
  letter-spacing: 0;
}

.btc-change {
  font-size: 18px;
  font-weight: 700;
  color: #7a5210;
}

.btc-change.positive {
  color: #059669;
}

.btc-change.negative {
  color: #dc2626;
}

.intel-lanes {
  flex: 1;
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.intel-card {
  min-width: 0;
  height: 132px;
  min-height: 132px;
  border: 1px solid #ead7b7;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  padding: 12px 12px;
  text-align: left;
  color: var(--text);
  overflow: hidden;
}

.intel-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
  margin-bottom: 10px;
  font-size: 15px;
}

.intel-card-head small {
  color: var(--muted);
  font-weight: 400;
  white-space: nowrap;
}

.intel-list {
  display: grid;
  gap: 8px;
}

.intel-item {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.32;
}

.intel-item strong {
  min-width: 0;
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.intel-time,
.intel-empty {
  color: var(--muted);
  font-size: 13px;
}

.strip-title {
  font-weight: 700;
  font-size: 16px;
}

.strip-copy {
  color: var(--muted);
  margin-top: 5px;
}

.toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, max-content) minmax(320px, 1fr);
  align-items: center;
  gap: 12px;
  margin: 0 28px 12px;
}

.mode-tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef2f7;
}

.mode-tab {
  min-width: 84px;
  height: 34px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 700;
}

.mode-tab.active {
  background: #111827;
  color: #fff;
}

.tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  min-width: 0;
}

.tab {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 8px 12px;
  white-space: nowrap;
  color: var(--muted);
}

.tab.active {
  color: #111827;
  border-color: var(--gold);
  background: var(--gold-soft);
  font-weight: 700;
}

.tab .count {
  margin-left: 6px;
  color: var(--gold);
}

.unread-mini {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  min-height: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
}

.performance-strip {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-self: stretch;
  padding: 3px 0;
}

.performance-row {
  min-height: 24px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 2px 8px;
  overflow: hidden;
}

.performance-row.long {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.performance-row.short {
  border-color: #fecaca;
  background: #fff7f7;
}

.performance-label {
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.performance-track {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.performance-track::-webkit-scrollbar {
  display: none;
}

.performance-item {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  color: #0f172a;
  font-size: 12px;
  line-height: 18px;
}

.performance-item strong {
  font-size: 12px;
  font-weight: 900;
}

.performance-item em {
  font-style: normal;
  font-weight: 800;
}

.performance-empty {
  color: var(--muted);
  font-size: 12px;
}

.lock-mini {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  min-height: 18px;
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid #e7c978;
  background: linear-gradient(160deg, #fffdf5 0%, #fff3c4 52%, #f8d36b 100%);
  color: #422006;
  font-size: 11px;
  font-weight: 700;
}

.search-box {
  display: flex;
  min-width: 320px;
  gap: 8px;
}

.search-box input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 9px 11px;
  outline: none;
}

.search-box button,
.action-btn {
  border: 1px solid #c9d2dd;
  background: #fff;
  border-radius: 7px;
  padding: 8px 10px;
  color: #1f2937;
}

.search-box button {
  background: #111827;
  color: #fff;
  border-color: #111827;
  min-width: 64px;
}

.main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 0 28px 28px;
  align-items: start;
}

.table-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.table-panel {
  height: var(--table-panel-target-height, 660px);
  display: flex;
  flex-direction: column;
}

.panel-header {
  height: 72px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.panel-header h1 {
  margin: 0;
  font-size: 16px;
}

.panel-header p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.lock-hint {
  color: var(--gold);
  font-size: 12px;
}

.table-tools {
  min-height: 48px;
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line-soft);
  background: #fbfcfe;
}

.table-tools label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.table-tools select,
.table-tools input {
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0 9px;
}

.table-tools input {
  width: 160px;
}

.table-search-box {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 2px;
}

.table-search-box input {
  width: 210px;
}

.table-search-box button {
  height: 32px;
  border: 1px solid #111827;
  border-radius: 6px;
  background: #111827;
  color: #fff;
  padding: 0 12px;
}

.tool-btn {
  height: 32px;
  border: 1px solid #c9d2dd;
  background: #fff;
  border-radius: 6px;
  padding: 0 10px;
}

.tool-btn.ghost {
  color: var(--muted);
}

.watchlist-tools {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
  margin-left: auto;
}

.watchlist-tools.hidden {
  display: none;
}

.watchlist-add-btn {
  border-color: #d7b36a;
  background: #fff8eb;
  color: #7a5210;
  font-weight: 700;
}

.watchlist-hint {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}

.action-btn:disabled,
.actions button:disabled {
  cursor: not-allowed;
  opacity: 0.56;
  background: #f3f4f6;
  color: #94a3b8;
}

.table-scroll-tools {
  display: block;
  min-height: 42px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: #fff;
}

.top-scrollbar {
  overflow-x: auto;
  overflow-y: hidden;
  height: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: #f8fafc;
}

.top-scroll-inner {
  height: 1px;
}

.table-wrap {
  overflow: auto;
  flex: 1;
  min-height: 0;
  position: relative;
  cursor: grab;
  touch-action: pan-y;
  user-select: auto;
}

.table-wrap.dragging-scroll {
  cursor: grabbing;
  user-select: none;
}

table {
  width: 100%;
  min-width: 1760px;
  border-collapse: separate;
  border-spacing: 0;
}

.signal-table {
  width: max-content;
  min-width: 1320px;
}

th,
td {
  height: 42px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  white-space: nowrap;
}

.signal-table th,
.signal-table td {
  height: 38px;
  padding: 6px 7px;
}

.signal-table th[data-col],
.signal-table td[data-col] {
  box-sizing: border-box;
}

th[data-col="signal_time"],
td[data-col="signal_time"] {
  width: 76px;
  min-width: 76px;
  max-width: 76px;
}

body[data-radar-mode="long"] .signal-table th[data-col="current_wave"],
body[data-radar-mode="long"] .signal-table td[data-col="current_wave"] {
  width: 66px;
  min-width: 66px;
  max-width: 66px;
}

body[data-radar-mode="long"] .signal-table th[data-col="development_status"],
body[data-radar-mode="long"] .signal-table td[data-col="development_status"] {
  width: 94px;
  min-width: 94px;
  max-width: 94px;
}

body[data-radar-mode="long"] .signal-table th[data-col="coin"],
body[data-radar-mode="long"] .signal-table td[data-col="coin"] {
  width: 92px;
  min-width: 92px;
  max-width: 92px;
}

body[data-radar-mode="long"] .signal-table th[data-col="exchange_entry"],
body[data-radar-mode="long"] .signal-table td[data-col="exchange_entry"] {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
}

body[data-radar-mode="long"] .signal-table th[data-col="current_price"],
body[data-radar-mode="long"] .signal-table td[data-col="current_price"],
body[data-radar-mode="long"] .signal-table th[data-col="spot_price"],
body[data-radar-mode="long"] .signal-table td[data-col="spot_price"],
body[data-radar-mode="long"] .signal-table th[data-col="first_price"],
body[data-radar-mode="long"] .signal-table td[data-col="first_price"] {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
}

body[data-radar-mode="long"] .signal-table th[data-col="first_gain"],
body[data-radar-mode="long"] .signal-table td[data-col="first_gain"],
body[data-radar-mode="long"] .signal-table th[data-col="history_max_gain"],
body[data-radar-mode="long"] .signal-table td[data-col="history_max_gain"] {
  width: 86px;
  min-width: 86px;
  max-width: 86px;
}

body[data-radar-mode="long"] .signal-table th[data-col="first_max_gain"],
body[data-radar-mode="long"] .signal-table td[data-col="first_max_gain"],
body[data-radar-mode="long"] .signal-table th[data-col="volume_growth"],
body[data-radar-mode="long"] .signal-table td[data-col="volume_growth"],
body[data-radar-mode="long"] .signal-table th[data-col="oi_change"],
body[data-radar-mode="long"] .signal-table td[data-col="oi_change"] {
  width: 104px;
  min-width: 104px;
  max-width: 104px;
}

body[data-radar-mode="long"] .signal-table th[data-col="volume_rank"],
body[data-radar-mode="long"] .signal-table td[data-col="volume_rank"],
body[data-radar-mode="long"] .signal-table th[data-col="market_cap"],
body[data-radar-mode="long"] .signal-table td[data-col="market_cap"],
body[data-radar-mode="long"] .signal-table th[data-col="oi_mcap"],
body[data-radar-mode="long"] .signal-table td[data-col="oi_mcap"] {
  width: 84px;
  min-width: 84px;
  max-width: 84px;
}

.signal-time-cell {
  padding-top: 6px;
  padding-bottom: 6px;
}

.signal-time-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  line-height: 1.05;
}

.signal-time-date {
  color: var(--text);
  font-weight: 700;
}

.signal-time-clock {
  color: var(--muted);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  color: #44515f;
  font-size: 12px;
  font-weight: 700;
}

.th-inner {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: max-content;
}

.signal-table .th-inner {
  gap: 3px;
}

.th-btn {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 700;
  text-align: left;
  padding: 0;
  line-height: 1.15;
  white-space: pre-line;
}

.th-btn::after {
  content: " ?";
  color: var(--gold);
  font-weight: 700;
}

.mini-sort-btn {
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.signal-table .mini-sort-btn {
  width: 18px;
  height: 20px;
  border-radius: 4px;
  font-size: 11px;
}

.signal-table .action-btn {
  padding: 5px 8px;
}

tbody tr:hover td {
  background: #fbfcfe;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 4;
  background: var(--panel);
  background-clip: padding-box;
}

th.sticky-col {
  z-index: 9;
  background: #f8fafc;
}

tbody tr:hover td.sticky-col {
  background: #fbfcfe;
}

.pinned-col {
  box-shadow: 1px 0 0 var(--line-soft);
}

.coin-btn {
  border: 0;
  background: transparent;
  padding: 0;
  font-weight: 700;
  color: #111827;
}

.field-cell {
  cursor: pointer;
}

.field-cell:hover {
  text-decoration: underline;
  text-decoration-color: #d7b36a;
  text-underline-offset: 4px;
}

.source-masked-row td {
  background: #fbfcfe;
}

.source-mask-cell {
  color: #cbd5e1;
  cursor: default;
}

.source-mask-label {
  color: inherit;
}

.masked-placeholder {
  color: #d1d5db;
}

.source-masked-row:hover td,
.source-masked-row:hover td.sticky-col {
  background: #fbfcfe;
}

.global-asset-data-row td {
  border-bottom-color: #f2ead8;
}

.global-asset-cell {
  min-width: 112px;
}

.global-asset-cn {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.global-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.global-section-row td {
  position: sticky;
  left: 0;
  z-index: 3;
  padding: 0;
  background: #fff4cf;
  border-top: 1px solid #e5bd68;
  border-bottom: 1px solid #e5bd68;
}

.global-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 28px;
  padding: 4px 10px;
  color: #6f4700;
  font-size: 13px;
}

.global-section-title strong {
  font-size: 14px;
  letter-spacing: 0;
}

.global-section-title span {
  color: #9a6a10;
}

.global-event-cell {
  width: 300px;
  min-width: 300px;
  max-width: 300px;
  cursor: pointer;
  overflow: hidden;
}

.global-event-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 7px;
  margin-right: 6px;
  border: 1px solid #ead7b7;
  border-radius: 6px;
  color: #7a5210;
  background: #fff8e6;
  font-size: 12px;
  vertical-align: middle;
}

.global-event-title {
  display: inline-block;
  max-width: 210px;
  color: #1f2937;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: middle;
}

.global-event-earnings,
.global-event-rating {
  color: #175cd3;
  background: #eff8ff;
  border-color: #b2ddff;
}

.global-event-macro,
.global-event-regulation {
  color: #b42318;
  background: #fff1f3;
  border-color: #fecdd6;
}

.global-event-commodity {
  color: #027a48;
  background: #ecfdf3;
  border-color: #abefc6;
}

.global-event-loading {
  color: #7a5210;
  background: #fff8e6;
  border-color: #ead7b7;
}

.global-news-row td {
  height: 34px;
  padding: 0;
  background: #fffaf0;
  border-bottom-color: #ead7b7;
  cursor: pointer;
}

.global-news-row:hover td {
  background: #fff6df;
}

.global-news-track {
  position: relative;
  overflow: hidden;
  height: 34px;
  line-height: 34px;
  color: #7a5210;
  font-size: 13px;
}

.global-news-track span {
  display: inline-block;
  min-width: 100%;
  padding-left: 100%;
  white-space: nowrap;
  animation: global-news-marquee 32s linear infinite;
}

.global-news-row:hover .global-news-track span {
  animation-play-state: paused;
}

@keyframes global-news-marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-100%);
  }
}

.asset-type-stock {
  color: #175cd3;
  background: #eff8ff;
  border-color: #b2ddff;
}

.asset-type-adr {
  color: #6941c6;
  background: #f4f3ff;
  border-color: #d9d6fe;
}

.asset-type-preipo {
  color: #9f1ab1;
  background: #fdf4ff;
  border-color: #f0abfc;
}

.asset-type-overseas {
  color: #075985;
  background: #f0f9ff;
  border-color: #bae6fd;
}

.asset-type-etf {
  color: #027a48;
  background: #ecfdf3;
  border-color: #abefc6;
}

.asset-type-leverage {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.asset-type-commodity {
  color: #7a5210;
  background: var(--gold-soft);
  border-color: #ead7b7;
}

.global-status-fresh {
  color: #027a48;
  background: #ecfdf3;
  border-color: #abefc6;
}

.global-status-watch {
  color: #175cd3;
  background: #eff8ff;
  border-color: #b2ddff;
}

.global-status-history {
  color: #7a5210;
  background: var(--gold-soft);
  border-color: #ead7b7;
}

.global-status-idle {
  color: #667085;
  background: #f8fafc;
  border-color: var(--line);
}

.global-news-modal-list .news-modal-item strong {
  display: block;
  color: #111827;
  font-weight: 700;
}

.positive {
  color: var(--green);
}

.negative {
  color: var(--red);
}

.muted {
  color: var(--muted);
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid var(--line);
  background: #fff;
  color: #4b5563;
  font-size: 12px;
}

.tag.gold {
  color: #7a5210;
  background: var(--gold-soft);
  border-color: #ead7b7;
}

.tag.locked {
  color: #422006;
  background: linear-gradient(160deg, #fffdf5 0%, #fff3c4 52%, #f8d36b 100%);
  border-color: #e7c978;
  font-weight: 700;
}

.short-ai-filter-tag {
  min-width: 72px;
  justify-content: center;
  font-weight: 700;
}

.short-ai-confirming {
  color: #344054;
  background: #f9fafb;
  border-color: #d0d5dd;
}

.short-ai-data {
  color: #92400e;
  background: #fffbeb;
  border-color: #fbbf24;
}

.short-ai-stale {
  color: #7f1d1d;
  background: #fef2f2;
  border-color: #fecaca;
}

.short-ai-a {
  color: #7a271a;
  background: #fff1f0;
  border-color: #fecdca;
}

.short-ai-b {
  color: #175cd3;
  background: #eff8ff;
  border-color: #b2ddff;
}

.short-ai-c {
  color: #05603a;
  background: #ecfdf3;
  border-color: #abefc6;
}

.premium-feature-tag {
  color: #422006 !important;
  border-color: #e7c978 !important;
  background: linear-gradient(160deg, #fffdf5 0%, #fff3c4 52%, #f8d36b 100%) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
  font-weight: 700;
}

th[data-field="onchain"] .th-btn,
th[data-field="deep_insight"] .th-btn {
  color: #422006;
  border-color: #e7c978;
  background: linear-gradient(160deg, #fffdf5 0%, #fff3c4 52%, #f8d36b 100%);
  font-weight: 700;
}

.permission-empty,
.permission-box {
  color: #7a5210;
  background: #fff8eb;
}

.permission-empty {
  padding: 0 !important;
  text-align: center;
}

.permission-box {
  border: 1px solid #ead7b7;
  border-radius: 8px;
  padding: 14px;
  box-sizing: border-box;
  width: 100%;
  min-height: 122px;
  display: grid;
  place-content: center;
  justify-items: center;
  align-content: center;
}

.permission-box p {
  margin: 8px 0 0;
  color: #6b7280;
  white-space: normal;
  text-align: center;
}

.permission-actions {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.permission-actions button {
  border: 1px solid #ead7b7;
  border-radius: 6px;
  padding: 7px 10px;
  background: #fff;
  color: #7a5210;
}

.signal-type-tag {
  font-weight: 700;
}

.development-status {
  min-width: 68px;
  justify-content: center;
  font-weight: 800;
}

.development-status.new {
  color: #7a5210;
  border-color: #e7c978;
  background: #fff8eb;
}

.development-status.active,
.development-status.strong {
  color: #027a48;
  border-color: #86efac;
  background: #ecfdf3;
}

.development-status.strong {
  box-shadow: inset 0 0 0 1px rgba(2, 138, 85, 0.12);
}

.development-status.pullback,
.development-status.watch {
  color: #92400e;
  border-color: #fcd34d;
  background: #fffbeb;
}

.development-status.failed {
  color: #b42318;
  border-color: #fecaca;
  background: #fff1f2;
}

.preview-gate-row td {
  padding: 0;
  background: #fff8eb;
}

.permission-gate-row td {
  padding: 0 !important;
}

.preview-gate {
  position: relative;
  min-height: 168px;
  margin: 0;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.96), rgba(241, 245, 249, 0.96));
}

.preview-skeleton {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: center;
  gap: 12px;
  padding: 24px 34px;
  filter: blur(4px);
  opacity: 0.62;
}

.preview-skeleton span {
  display: block;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(90deg, #e2e8f0, #f8fafc, #e2e8f0);
}

.preview-skeleton span:nth-child(2) {
  width: 92%;
}

.preview-skeleton span:nth-child(3) {
  width: 86%;
}

.preview-skeleton span:nth-child(4) {
  width: 78%;
}

.preview-gate-copy {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  color: #17202a;
  background: rgba(255, 255, 255, 0.28);
}

.preview-gate-copy strong {
  font-size: 18px;
  font-weight: 900;
}

.preview-gate-copy small {
  color: #64748b;
  font-size: 13px;
}

.signal-type-micro {
  color: #027a48;
  background: #ecfdf3;
  border-color: #abefc6;
}

.signal-type-unusual {
  color: #175cd3;
  background: #eff8ff;
  border-color: #b2ddff;
}

.signal-type-volatile {
  color: #b54708;
  background: #fffaeb;
  border-color: #fedf89;
}

.signal-type-pump {
  color: #b42318;
  background: #fef3f2;
  border-color: #fecdca;
}

.signal-type-default {
  color: #4b5563;
  background: #fff;
  border-color: var(--line);
}

.actions {
  display: flex;
  gap: 6px;
}

.actions button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 5px 7px;
  font-size: 12px;
}

.curve-cell {
  width: 128px;
  cursor: pointer;
}

.curve-thumb,
.curve-empty {
  width: 112px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 0;
  overflow: hidden;
}

.curve-thumb img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.curve-empty {
  color: var(--muted);
  font-size: 12px;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.empty.small {
  padding: 12px;
  font-size: 12px;
  text-align: left;
}

.search-results {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 18px;
}

.inline-search-results {
  flex: 1 1 360px;
  min-width: 280px;
  margin-bottom: 0;
  flex-direction: row;
  align-items: center;
  overflow-x: auto;
  padding-bottom: 1px;
}

.search-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 4px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fff;
  white-space: nowrap;
}

.search-chip-meta {
  color: var(--muted);
  font-size: 12px;
}

.result-card {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 10px;
  background: #fbfcfe;
}

.result-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-weight: 700;
}

.result-meta {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.result-actions {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.result-actions button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 3px 5px;
  font-size: 12px;
}

.side-news-list {
  display: grid;
  gap: 8px;
  margin-bottom: 18px;
}

.side-news-item {
  border-left: 3px solid #d7b36a;
  padding: 4px 0 4px 8px;
}

.side-news-item a {
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}

.side-news-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.news-modal-list {
  display: grid;
  gap: 10px;
}

.news-modal-item {
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 10px;
}

.news-modal-item a {
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.news-modal-summary {
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.55;
}

.btc-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.btc-overview-cell {
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  padding: 9px;
  background: #fbfcfe;
}

.btc-overview-cell span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 4px;
}

.btc-overview-cell strong {
  font-size: 15px;
}

.main-market-table {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
}

.main-market-table th,
.main-market-table td {
  border-bottom: 1px solid var(--line-soft);
  padding: 7px 6px;
  text-align: left;
}

.modal-section-title {
  margin: 16px 0 8px;
  font-size: 15px;
}

.note-list {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.note-list div {
  border-left: 3px solid #d7b36a;
  padding-left: 8px;
}

.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 20;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.42);
}

.modal-card {
  position: absolute;
  top: 8vh;
  left: 50%;
  transform: translateX(-50%);
  width: min(860px, calc(100vw - 32px));
  max-height: 84vh;
  overflow: hidden;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
}

.modal-card.compact {
  width: min(460px, calc(100vw - 32px));
  top: 14vh;
}

.modal-card.member-center {
  width: min(720px, calc(100vw - 32px));
  top: 8vh;
  max-height: 88vh;
}

.modal-card.wide {
  width: min(1080px, calc(100vw - 32px));
  top: 6vh;
  max-height: 88vh;
}

.modal-header {
  height: 54px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-soft);
}

.modal-header h2 {
  margin: 0;
  font-size: 16px;
}

.icon-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 20px;
  line-height: 1;
}

.modal-body {
  overflow: auto;
  padding: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 8px 14px;
}

.detail-grid.compact-grid {
  grid-template-columns: 118px 1fr;
  font-size: 13px;
}

.modal-card.member-center .modal-body {
  padding: 20px 22px;
}

.modal-card.member-center .detail-grid.compact-grid {
  grid-template-columns: 118px minmax(0, 1fr) 118px minmax(0, 1fr);
  gap: 10px 18px;
  align-items: start;
  font-size: 14px;
  line-height: 1.55;
}

.modal-card.member-center .detail-grid dt {
  white-space: nowrap;
}

.modal-card.member-center .detail-grid dd {
  min-width: 0;
  white-space: normal;
  word-break: break-word;
}

.modal-card.member-center .auth-note {
  margin-top: 18px;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  background: #f8fafc;
  font-size: 13px;
  line-height: 1.7;
}

.modal-card.member-center .modal-actions {
  justify-content: flex-start;
  gap: 10px;
}

.modal-card.member-center .modal-actions button {
  min-width: 104px;
  height: 38px;
  padding: 0 14px;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .modal-card.member-center {
    width: calc(100vw - 20px);
    top: 10px;
    max-height: calc(100vh - 20px);
  }

  .modal-card.member-center .detail-grid.compact-grid {
    grid-template-columns: 110px minmax(0, 1fr);
  }
}

.detail-grid.insight-grid {
  grid-template-columns: 150px minmax(0, 1fr);
  font-size: 15px;
  line-height: 1.6;
}

.detail-grid dt {
  color: var(--muted);
}

.detail-grid dd {
  margin: 0;
  word-break: break-word;
  white-space: pre-line;
}

.coin-profile-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}

.coin-profile-logo {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  background: #f5f7fb;
  border: 1px solid var(--line-soft);
  flex: 0 0 auto;
}

.coin-profile-logo.fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7a5210;
  background: #fff8eb;
  font-weight: 800;
}

.coin-profile-name {
  font-size: 17px;
  font-weight: 800;
}

.coin-profile-symbol {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.exchange-list {
  display: grid;
  gap: 8px;
}

.exchange-link {
  display: grid;
  grid-template-columns: 24px 28px auto 1fr;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fbfcfe;
  color: #111827;
  text-decoration: none;
}

.exchange-link:hover {
  border-color: #d7b36a;
  background: #fffaf0;
}

.exchange-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff8eb;
  color: #7a5210;
  font-size: 12px;
  font-weight: 700;
}

.exchange-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
  border: 1px solid var(--line-soft);
}

.exchange-logo.fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7a5210;
  background: #fff8eb;
  font-size: 12px;
  font-weight: 800;
}

.exchange-name {
  font-weight: 700;
}

.exchange-note {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

.exchange-section {
  margin-top: 14px;
}

.exchange-section-title {
  margin-bottom: 8px;
  color: #44515f;
  font-size: 13px;
  font-weight: 800;
}

.fee-link-list {
  display: grid;
  gap: 8px;
}

.fee-link-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #ead7b7;
  border-radius: 7px;
  background: #fffaf0;
  color: #111827;
  text-decoration: none;
}

.fee-link-item.disabled {
  color: var(--muted);
  background: #fbfcfe;
  border-color: var(--line-soft);
}

.fee-link-name {
  font-weight: 700;
}

.fee-link-note {
  color: var(--muted);
  font-size: 12px;
}

.field-current-value {
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid #ead7b7;
  border-radius: 7px;
  background: #fff8eb;
  color: #7a5210;
  font-size: 18px;
  font-weight: 700;
}

.ai-aggregation {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 6px 2px;
}

.ai-aggregation-mark {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #f0e2c4;
  border-top-color: #b88a2d;
  animation: aiAggregationSpin 0.9s linear infinite;
  flex: 0 0 auto;
}

.ai-aggregation-title {
  font-size: 15px;
  font-weight: 800;
  color: #111827;
}

.ai-aggregation-text {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.ai-aggregation.error .ai-aggregation-mark {
  animation: none;
  border-color: #f3c7c7;
  border-top-color: #b91c1c;
}

@keyframes aiAggregationSpin {
  to {
    transform: rotate(360deg);
  }
}

.column-settings {
  display: grid;
  gap: 8px;
}

.column-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fbfcfe;
}

.column-setting-actions {
  display: flex;
  gap: 6px;
}

.column-setting-actions button,
.modal-actions button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 6px;
  padding: 6px 8px;
}

.column-setting-actions button:disabled {
  color: #a8b1bd;
  cursor: not-allowed;
}

.modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.auth-form {
  display: grid;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.auth-form input,
.auth-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
  color: var(--text);
}

.auth-error {
  min-height: 18px;
  color: var(--red);
  font-size: 13px;
}

.auth-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.payment-scan-box {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.payment-scan-error {
  color: var(--red);
}

.payment-scan-muted {
  color: var(--muted);
}

.payment-transfer-row {
  display: grid;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px dashed var(--line-soft);
}

.payment-transfer-detail,
.mono-mini {
  max-width: 260px;
  overflow-wrap: anywhere;
  color: var(--muted);
  font-family: "Consolas", "SFMono-Regular", monospace;
  font-size: 11px;
  line-height: 1.45;
}

.admin-section {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.admin-create-section {
  margin-top: 0;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.admin-section-head h3 {
  margin: 0;
  font-size: 14px;
}

.admin-section-head span {
  color: var(--muted);
  font-size: 12px;
}

.admin-section-head button,
.admin-create-form button,
.admin-user-actions button,
.admin-input-action button,
.admin-row-action button,
.admin-users-table button {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 7px 9px;
  white-space: nowrap;
}

.admin-row-action button.danger,
.admin-users-table button.danger {
  color: #b42318;
  border-color: #fecdca;
  background: #fff7f6;
}

.admin-section-head button:disabled,
.admin-user-actions button:disabled,
.admin-input-action button:disabled,
.admin-row-action button:disabled,
.admin-users-table button:disabled {
  color: #a8b1bd;
  background: #f8fafc;
  cursor: not-allowed;
}

.admin-create-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
  gap: 8px;
  align-items: center;
}

.admin-create-form input,
.admin-create-form select,
.admin-member-card input,
.admin-member-card select,
.admin-users-table input,
.admin-users-table select {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  color: var(--text);
}

.admin-member-list {
  display: grid;
  gap: 10px;
  max-height: 52vh;
  overflow: auto;
  padding-right: 2px;
}

.admin-member-card {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfe;
}

.admin-member-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.admin-member-title {
  font-size: 15px;
  font-weight: 800;
}

.admin-user-sub {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.admin-user-uid {
  color: #344054;
  max-width: 520px;
  word-break: break-all;
}

.admin-user-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
}

.admin-member-grid,
.admin-billing-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-member-grid label,
.admin-billing-grid label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
}

.admin-input-action,
.admin-row-action {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.admin-point-metric {
  display: grid;
  align-content: center;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #ead7b7;
  border-radius: 7px;
  background: #fffaf0;
}

.admin-point-metric span,
.admin-point-metric small {
  color: var(--muted);
  font-size: 12px;
}

.admin-point-metric strong {
  margin: 2px 0;
  font-size: 16px;
}

.admin-empty {
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}

.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
}

.admin-users-table {
  border: 0;
}

.admin-users-table th,
.admin-users-table td {
  padding: 8px 10px;
  white-space: nowrap;
  vertical-align: middle;
}

.admin-row-action {
  min-width: 300px;
}

.admin-note-input {
  min-width: 220px;
}

.mini-table {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line-soft);
}

.mini-table th,
.mini-table td {
  height: 36px;
}

.mini-table .round-divider td {
  height: auto;
  padding: 10px 12px;
  background: #fff8eb;
  color: #7a5210;
  font-weight: 700;
  border-top: 1px solid #ead7b7;
  border-bottom: 1px solid #ead7b7;
}

.mini-table .round-divider.current-round td {
  background: #ecfdf3;
  color: #027a48;
  border-color: #abefc6;
}

.round-divider span {
  margin-left: 14px;
  color: #8a6a2f;
  font-weight: 600;
}

.round-divider.current-round span {
  color: #047857;
}

.curve-large-wrap {
  width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #0b0f17;
  overflow: hidden;
}

.curve-large {
  width: 100%;
  max-height: 68vh;
  object-fit: contain;
  display: block;
}

.signal-chart-shell {
  display: grid;
  gap: 12px;
}

.signal-chart-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.signal-chart-title {
  font-size: 18px;
  font-weight: 800;
}

.signal-chart-status {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.chart-range-controls {
  display: inline-flex;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.chart-range-btn {
  min-width: 42px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.chart-range-btn.active {
  background: #111827;
  color: #fff;
}

.signal-chart-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: #fbfcfe;
  color: var(--muted);
  font-size: 12px;
}

.signal-chart-legend strong {
  color: var(--text);
  font-size: 16px;
}

.signal-chart-canvas {
  width: 100%;
  height: 440px;
  min-height: 440px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.chart-unavailable {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.signal-chart-details {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fbfcfe;
}

.signal-chart-table th,
.signal-chart-table td {
  white-space: nowrap;
}

.modal-card.chart {
  position: fixed;
  inset: 0;
  top: 0;
  left: 0;
  transform: none;
  width: 100vw;
  height: 100vh;
  max-height: none;
  background: #0b1118;
  color: #e5e7eb;
  border: 1px solid #1f2a37;
  border-radius: 0;
  box-shadow: 0 28px 70px rgba(0, 0, 0, 0.34);
}

.modal-card.chart .modal-header {
  flex: 0 0 auto;
  background: #0f1722;
  border-bottom-color: #1f2a37;
}

.modal-card.chart .modal-header h2 {
  color: #f8fafc;
}

.modal-card.chart .icon-btn {
  color: #cbd5e1;
  background: #111827;
  border-color: #334155;
}

.modal-card.chart .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #0b1118;
}

.trade-chart-shell {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #0b1118;
  color: #e5e7eb;
}

.trade-chart-topbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid #1f2a37;
  background: #0f1722;
}

.trade-chart-symbol {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.trade-chart-symbol strong {
  color: #f8fafc;
  font-size: 18px;
  letter-spacing: 0;
}

.trade-chart-symbol span,
.trade-chart-symbol em {
  color: #94a3b8;
  font-size: 12px;
  font-style: normal;
}

.trade-chart-symbol b {
  color: #00c087;
  font-size: 16px;
}

.trade-chart-controls,
.trade-chart-tabs {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.trade-chart-controls span {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: #263445;
}

.trade-chart-btn {
  height: 30px;
  padding: 0 10px;
  border: 1px solid #334155;
  border-radius: 4px;
  background: #111827;
  color: #dbe4ef;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.trade-chart-btn:hover {
  border-color: #64748b;
  background: #152235;
}

.trade-chart-btn.active {
  border-color: #d7a934;
  color: #f8d56b;
  background: #1e293b;
}

.trade-chart-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0;
}

.trade-chart-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(300px, 45vh) auto minmax(150px, 1fr);
  border-right: 1px solid #1f2a37;
  overflow: auto;
}

.trade-chart-main-canvas,
.trade-chart-lower-canvas,
.trade-chart-mini-canvas {
  width: 100%;
  display: block;
  background: #0b1017;
}

.trade-chart-main-canvas {
  height: 45vh;
  min-height: 300px;
  border-bottom: 1px solid #1f2a37;
  cursor: grab;
  touch-action: none;
}

.trade-chart-tabs {
  justify-content: flex-start;
  padding: 8px 12px;
  border-bottom: 1px solid #1f2a37;
  background: #0f1722;
}

.trade-chart-lower-canvas {
  height: 150px;
  min-height: 150px;
}

.trade-chart-mini-panels {
  display: none;
  grid-template-columns: 1fr;
  gap: 1px;
  min-height: 0;
  background: #1f2a37;
}

.trade-chart-mini-canvas {
  height: 112px;
  min-height: 112px;
  cursor: grab;
  touch-action: none;
}

.trade-chart-lower-canvas {
  cursor: grab;
  touch-action: none;
}

.trade-chart-main-canvas.dragging,
.trade-chart-lower-canvas.dragging,
.trade-chart-mini-canvas.dragging {
  cursor: grabbing;
}

.trade-chart-shell.multi-mode .trade-chart-lower-canvas {
  display: none;
}

.trade-chart-shell.multi-mode .trade-chart-mini-panels {
  display: grid;
}

.trade-chart-shell.multi-mode .trade-chart-main {
  grid-template-rows: minmax(240px, 34vh) auto auto;
}

.trade-chart-shell.multi-mode .trade-chart-main-canvas {
  height: 34vh;
  min-height: 240px;
}

.trade-chart-side {
  min-width: 0;
  min-height: 0;
  padding: 14px;
  overflow: auto;
  background: #0f1722;
}

.trade-chart-side h3 {
  margin: 0 0 12px;
  color: #f8fafc;
  font-size: 15px;
}

.trade-chart-side-grid {
  display: grid;
  gap: 8px;
}

.trade-chart-metric {
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #263445;
  border-radius: 6px;
  background: #111827;
}

.trade-chart-metric span {
  color: #94a3b8;
  font-size: 12px;
}

.trade-chart-metric strong {
  min-width: 0;
  color: #f8fafc;
  font-size: 13px;
  font-weight: 800;
  word-break: break-word;
}

.trade-chart-metric strong.positive {
  color: #00c087;
}

.trade-chart-metric strong.negative {
  color: #f6465d;
}

.chart-page {
  margin: 0;
  min-width: 1120px;
  height: 100vh;
  overflow: hidden;
  background: #0b1118;
}

.standalone-chart-shell {
  height: 100vh;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: #0b1118;
  color: #e5e7eb;
}

.standalone-chart-topbar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 6px 10px;
  border-bottom: 1px solid #1f2a37;
  background: #0f1722;
}

.standalone-chart-symbol {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
}

.standalone-chart-symbol strong {
  flex: 0 0 auto;
  color: #f8fafc;
  font-size: 15px;
}

.standalone-chart-symbol b {
  flex: 0 0 auto;
  color: #00c087;
  font-size: 15px;
}

.standalone-chart-symbol span {
  min-width: 0;
  overflow: hidden;
  color: #cbd5e1;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.standalone-chart-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.standalone-chart-controls span {
  width: 1px;
  height: 24px;
  margin: 0 2px;
  background: #263445;
}

.standalone-chart-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
}

.standalone-chart-main {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(330px, 52vh) auto minmax(160px, 1fr);
  border-right: 1px solid #1f2a37;
  overflow: hidden;
}

.standalone-chart-main .trade-chart-main-canvas {
  height: 52vh;
  min-height: 330px;
}

.chart-page .trade-chart-main-canvas,
.chart-page .trade-chart-lower-canvas,
.chart-page .trade-chart-mini-canvas,
.chart-page .trade-chart-main-canvas.dragging,
.chart-page .trade-chart-lower-canvas.dragging,
.chart-page .trade-chart-mini-canvas.dragging {
  cursor: default;
}

.standalone-chart-shell.multi-mode .trade-chart-lower-canvas {
  display: none;
}

.standalone-chart-shell.multi-mode .trade-chart-mini-panels {
  display: grid;
}

.standalone-chart-shell.multi-mode .standalone-chart-main {
  grid-template-rows: minmax(260px, 36vh) auto minmax(0, 1fr);
}

.standalone-chart-shell.multi-mode .trade-chart-main-canvas {
  height: 36vh;
  min-height: 260px;
}

.standalone-chart-shell.multi-mode .trade-chart-mini-panels {
  grid-auto-rows: minmax(112px, 1fr);
  overflow: hidden;
}

.standalone-chart-shell.multi-mode .trade-chart-mini-canvas {
  height: 100%;
  min-height: 112px;
}

@media (max-width: 1020px) {
  .main-grid {
    grid-template-columns: 1fr;
  }

  .toolbar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .conversion-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .btc-tile {
    width: 100%;
    min-width: 0;
    min-height: 86px;
  }

  .intel-lanes,
  .btc-overview-grid {
    grid-template-columns: 1fr;
  }

  .search-box {
    min-width: 0;
  }

  .table-scroll-tools {
    grid-template-columns: 1fr;
  }

  .admin-create-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-create-form button {
    grid-column: 1 / -1;
  }

  .admin-member-head {
    display: grid;
  }

  .admin-user-actions {
    justify-content: flex-start;
  }

  .admin-member-grid,
  .admin-billing-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signal-chart-toolbar {
    display: grid;
  }

  .chart-range-controls {
    justify-self: start;
  }

  .modal-card.chart {
    inset: 0;
    width: 100vw;
    height: 100vh;
    top: 0;
    max-height: none;
  }

  .trade-chart-topbar,
  .trade-chart-layout {
    grid-template-columns: 1fr;
  }

  .trade-chart-controls {
    justify-content: flex-start;
  }

  .trade-chart-main {
    border-right: 0;
    border-bottom: 1px solid #1f2a37;
  }

  .trade-chart-side {
    max-height: 220px;
  }
}

@media (max-width: 640px) {
  .modal-card.wide {
    width: calc(100vw - 16px);
    top: 10px;
    max-height: calc(100vh - 20px);
  }

  .modal-body {
    padding: 12px;
  }

  .admin-create-form,
  .admin-member-grid,
  .admin-billing-grid {
    grid-template-columns: 1fr;
  }

  .admin-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .admin-input-action,
  .admin-row-action {
    grid-template-columns: 1fr;
  }

  .signal-chart-canvas {
    height: 360px;
    min-height: 360px;
  }

  .signal-chart-legend {
    align-items: flex-start;
    flex-direction: column;
  }

  .modal-card.chart .modal-header {
    height: 46px;
    padding: 0 10px;
  }

  .trade-chart-topbar {
    padding: 10px;
  }

  .trade-chart-controls span {
    display: none;
  }

  .trade-chart-main {
    grid-template-rows: 330px auto minmax(130px, 1fr);
  }

  .trade-chart-main-canvas {
    height: 330px;
  }

  .trade-chart-mini-panels {
    grid-template-columns: 1fr;
  }

  .trade-chart-metric {
    grid-template-columns: 96px minmax(0, 1fr);
  }
}
