:root {
  --bg: #1f2124;
  --bg-soft: #26292d;
  --panel: #2e3135;
  --panel-elevated: #34383d;
  --surface-2: #282b2f;
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #f3f5f7;
  --text-2: #c7cfd8;
  --muted: #919ba6;
  --muted-2: #68717c;
  --accent: #78b4e0;
  --accent-2: #7fd2c0;
  --number: #eef2f5;
  --link: #96bfde;
  --accent-soft: rgba(63, 162, 249, 0.14);
  --ok: #4ecb8c;
  --bad: #f07e76;
  --warn: #d8ac5b;
  --shadow: 0 18px 36px rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 8px 20px rgba(0, 0, 0, 0.14);
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --sans: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  background: var(--bg);
  color: var(--text-2);
  font-family: var(--sans);
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
  position: relative;
  isolation: isolate;
  background: var(--bg);
}

.shell::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% 10%, rgba(120, 180, 224, 0.06), transparent 24%),
    radial-gradient(circle at 88% 86%, rgba(127, 210, 192, 0.05), transparent 20%),
    linear-gradient(180deg, rgba(38, 41, 45, 0.96) 0%, rgba(31, 33, 36, 0.98) 100%);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  align-self: start;
  height: 100vh;
  border-right: 0;
  border-bottom: 0;
  background: rgba(255, 255, 255, 0.015);
  backdrop-filter: none;
  padding: 20px 16px;
  display: grid;
  grid-template-rows: auto auto 1fr;
  align-items: start;
  gap: 18px;
  box-shadow: none;
}

.sidebar-brand {
  display: grid;
  justify-items: center;
  justify-self: center;
  text-align: center;
  width: 100%;
  gap: 8px;
  min-width: 0;
  padding: 6px 0 2px;
}

.sidebar-home-link {
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  position: relative;
  border-radius: 30px;
  justify-self: center;
  -webkit-tap-highlight-color: transparent;
}

.nav-list {
  display: grid;
  gap: 8px;
  min-width: 0;
  overflow: visible;
  padding-bottom: 0;
}

.nav-item {
  display: block;
  position: relative;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  text-decoration: none;
  padding: 14px 14px 14px 16px;
  min-height: 50px;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: color 0.16s ease, transform 0.16s ease, border-color 0.16s ease, background-color 0.16s ease;
}

.nav-item-overview {
  min-height: 88px;
  font-size: 16px;
}

.nav-item::after {
  content: "";
  position: absolute;
  left: 12px;
  width: 4px;
  top: 10px;
  bottom: 10px;
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
  opacity: 0;
  transform: scaleY(0.45);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.nav-item:hover {
  color: var(--text);
  background: rgba(120, 180, 224, 0.08);
  border-color: rgba(120, 180, 224, 0.18);
}

.nav-item.active {
  color: var(--text);
  font-weight: 600;
  background: rgba(120, 180, 224, 0.12);
  border-color: rgba(120, 180, 224, 0.24);
}

.nav-item.active::after {
  opacity: 1;
  transform: scaleY(1);
}

.sidebar-box {
  display: grid;
  gap: 8px;
  align-content: start;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.022);
  padding: 10px;
  min-width: 0;
}

.kv-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 4px;
  min-width: 122px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
  color: var(--muted);
}

.kv-row > strong {
  justify-self: start;
  text-align: left;
  max-width: none;
  font-size: 12px;
}

.workspace {
  padding: 18px 18px 18px 22px;
  display: grid;
  align-content: start;
  gap: 14px;
  min-width: 0;
  min-height: 100vh;
  background: transparent;
}

.action-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.action-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(55, 57, 61, 0.96) 0%, rgba(43, 45, 48, 0.96) 100%);
  color: var(--text);
  text-decoration: none;
  padding: 14px 16px;
  display: grid;
  gap: 6px;
  min-height: 110px;
  box-shadow: var(--shadow-soft);
  transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.action-card:hover {
  border-color: rgba(63, 162, 249, 0.42);
  transform: translateY(-2px);
  box-shadow: 0 28px 48px rgba(0, 0, 0, 0.28);
}

.action-card-primary {
  border-color: rgba(63, 162, 249, 0.36);
  background: linear-gradient(135deg, rgba(34, 54, 87, 0.94) 0%, rgba(26, 51, 56, 0.94) 100%);
}

.action-eyebrow {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.action-card strong {
  font-size: 34px;
  line-height: 1;
  color: var(--number);
  text-shadow: 0 0 22px rgba(159, 243, 255, 0.12);
}

.action-label {
  font-size: 12px;
  color: #ebf8ff;
}

.action-meta {
  font-size: 12px;
  color: rgba(232, 247, 255, 0.68);
  line-height: 1.35;
}

.view-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(63, 162, 249, 0.18);
  border-radius: 22px;
  background:
    radial-gradient(circle at top right, rgba(0, 255, 163, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(49, 49, 49, 0.98) 0%, rgba(40, 42, 45, 0.98) 100%);
  padding: 18px 18px 16px;
  box-shadow: var(--shadow-soft);
}

.view-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.view-shell-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.view-shell-copy {
  display: grid;
  gap: 6px;
}

.view-eyebrow {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #8eeeff;
}

.view-title {
  margin: 0;
  font-family: var(--display);
  font-size: 28px;
  line-height: 1;
  letter-spacing: -0.03em;
}

.view-subtitle {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.view-shell-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-back-btn {
  min-width: 96px;
}

.view-link-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.view-link-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #b8c0ca;
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.view-link-chip:hover {
  border-color: rgba(63, 162, 249, 0.42);
  background: rgba(63, 162, 249, 0.1);
  color: #eef9ff;
}

.view-link-chip-active {
  border-color: rgba(63, 162, 249, 0.56);
  background: rgba(63, 162, 249, 0.16);
  color: #eef9ff;
}

.hero-avatar {
  width: 56px;
  height: 56px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(63, 162, 249, 0.28) 0%, rgba(0, 255, 163, 0.18) 100%);
  border: 1px solid rgba(63, 162, 249, 0.28);
  box-shadow: 0 0 28px rgba(63, 162, 249, 0.18);
  color: var(--text);
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-hero-avatar {
  position: relative;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  overflow: visible;
  border-radius: 30px;
  background: transparent;
  box-shadow: none;
  isolation: isolate;
  transition: transform 0.18s ease;
}

.sidebar-hero-avatar::before {
  content: "";
  position: absolute;
  inset: -7px;
  padding: 2px;
  border-radius: 36px;
  background:
    conic-gradient(
      from 180deg,
      rgba(63, 162, 249, 0) 0deg,
      rgba(63, 162, 249, 0.95) 92deg,
      rgba(0, 255, 163, 0.98) 180deg,
      rgba(63, 162, 249, 0.9) 278deg,
      rgba(63, 162, 249, 0) 360deg
    );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: 0;
  filter: blur(5px);
  pointer-events: none;
}

.sidebar-hero-avatar::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 22px;
  background: radial-gradient(circle, rgba(63, 162, 249, 0.22) 0%, rgba(0, 255, 163, 0.12) 44%, transparent 72%);
  opacity: 0;
  filter: blur(12px);
  pointer-events: none;
  transition: opacity 0.18s ease;
}

.sidebar-home-link:hover .sidebar-hero-avatar {
  transform: translateY(-1px);
}

.sidebar-hero-avatar-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 8px 16px rgba(0, 0, 0, 0.34))
    drop-shadow(0 0 16px rgba(63, 162, 249, 0.12));
  transition: transform 0.18s ease, filter 0.18s ease;
}

.sidebar-home-link:hover .sidebar-hero-avatar-img,
.sidebar-home-link:focus-visible .sidebar-hero-avatar-img {
  transform: translateY(-1px) scale(1.02);
  filter:
    drop-shadow(0 10px 18px rgba(0, 0, 0, 0.36))
    drop-shadow(0 0 18px rgba(63, 162, 249, 0.2));
}

.sidebar-home-link:focus-visible {
  outline: none;
}

.sidebar-hero-avatar.avatar-click-glow::before {
  opacity: 1;
  animation: avatar-ring-sweep 1s cubic-bezier(0.2, 0.72, 0.22, 1);
}

.sidebar-hero-avatar.avatar-click-glow::after {
  opacity: 1;
}

.sidebar-hero-avatar.avatar-click-glow .sidebar-hero-avatar-img {
  animation: avatar-image-pop 0.84s cubic-bezier(0.2, 0.72, 0.22, 1);
  filter:
    drop-shadow(0 12px 22px rgba(0, 0, 0, 0.38))
    drop-shadow(0 0 18px rgba(63, 162, 249, 0.32))
    drop-shadow(0 0 28px rgba(0, 255, 163, 0.16));
}

.sidebar-slogan {
  margin: 0;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.08em;
  color: #e8f7ff;
  max-width: 180px;
  text-align: center;
}

@keyframes avatar-ring-sweep {
  0% {
    opacity: 0;
    transform: rotate(0deg) scale(0.92);
    filter: blur(7px);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: rotate(1turn) scale(1.03);
    filter: blur(4px);
  }
}

@keyframes avatar-image-pop {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }

  30% {
    transform: translateY(-2px) scale(1.04);
  }

  66% {
    transform: translateY(0) scale(1.01);
  }
}

.top-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.meta-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
}

.meta-label {
  color: var(--muted-2);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  grid-auto-rows: 1fr;
  align-items: stretch;
}

.kpi-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  padding: 16px;
  min-height: 124px;
  display: grid;
  gap: 8px;
  box-shadow: var(--shadow-soft);
}

.kpi-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.kpi-title {
  font-size: 11px;
  color: var(--muted-2);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.kpi-value {
  font-size: 30px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--number);
  text-shadow: none;
}

.live-flash,
.live-flash-up,
.live-flash-down {
  will-change: transform, filter, text-shadow;
}

.live-flash {
  animation: liveFlashNeutral 0.42s ease;
}

.live-flash-up {
  animation: liveFlashUp 0.42s ease;
}

.live-flash-down {
  animation: liveFlashDown 0.42s ease;
}

.row-live-in td,
.row-live-update td {
  animation: liveRowPulse 0.55s ease;
}

@keyframes liveFlashNeutral {
  0% {
    transform: translateY(0);
    filter: brightness(1);
  }
  35% {
    transform: translateY(-1px);
    filter: brightness(1.08);
  }
  100% {
    transform: translateY(0);
    filter: brightness(1);
  }
}

@keyframes liveFlashUp {
  0% {
    transform: translateY(0);
    filter: brightness(1);
    text-shadow: 0 0 0 rgba(19, 155, 82, 0);
  }
  35% {
    transform: translateY(-1px);
    filter: brightness(1.12);
    text-shadow: 0 0 16px rgba(19, 155, 82, 0.32);
  }
  100% {
    transform: translateY(0);
    filter: brightness(1);
    text-shadow: 0 0 0 rgba(19, 155, 82, 0);
  }
}

@keyframes liveRowPulse {
  0% {
    background: rgba(120, 194, 255, 0);
  }
  35% {
    background: rgba(120, 194, 255, 0.08);
  }
  100% {
    background: rgba(120, 194, 255, 0);
  }
}

@keyframes liveFlashDown {
  0% {
    transform: translateY(0);
    filter: brightness(1);
    text-shadow: 0 0 0 rgba(197, 55, 55, 0);
  }
  35% {
    transform: translateY(-1px);
    filter: brightness(1.12);
    text-shadow: 0 0 16px rgba(197, 55, 55, 0.28);
  }
  100% {
    transform: translateY(0);
    filter: brightness(1);
    text-shadow: 0 0 0 rgba(197, 55, 55, 0);
  }
}

.kpi-hint {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.35;
}

.kpi-hint-sub {
  font-size: 11px;
  line-height: 1.3;
}

#capturePoolMetaText.kpi-hint,
#monitorPoolMetaText.kpi-hint {
  font-size: 11px;
}

.meter {
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.meter-seg {
  display: block;
  height: 100%;
  width: 0%;
  transition: width 0.35s ease;
}

.meter-accent {
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 100%);
}

.meter-ok {
  background: linear-gradient(90deg, #00ffa3 0%, #00d47e 100%);
}

.meter-warn {
  background: linear-gradient(90deg, #f5cf67 0%, #f5aa00 100%);
}

.meter-row {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--text-2);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.summary-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.026);
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  color: var(--text-2);
  min-height: 64px;
}

.summary-item strong {
  color: var(--number);
  font-size: 15px;
  text-shadow: none;
}

.summary-item strong.up {
  color: var(--ok);
}

.summary-item strong.down {
  color: var(--bad);
}

.summary-item strong.warn {
  color: var(--warn);
}

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

.mini-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(55, 57, 61, 0.96) 0%, rgba(43, 45, 48, 0.96) 100%);
  padding: 12px;
  display: grid;
  gap: 5px;
  box-shadow: var(--shadow-soft);
}

.mini-title {
  color: var(--muted-2);
  font-size: 12px;
}

.mini-value {
  font-size: 20px;
  line-height: 1;
  color: var(--number);
  text-shadow: none;
}

.mini-hint {
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.35;
}

.pipeline-tags {
  display: grid;
  gap: 3px;
}

.pipeline-actions {
  margin-top: 8px;
  margin-bottom: 6px;
}

.pipeline-action-btn {
  display: inline-block;
  border: 1px solid rgba(63, 162, 249, 0.38);
  background: rgba(63, 162, 249, 0.14);
  color: #d7efff;
  text-decoration: none;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 600;
}

.pipeline-action-btn:hover {
  border-color: rgba(63, 162, 249, 0.5);
  background: rgba(63, 162, 249, 0.2);
}

.panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.024);
  padding: 14px;
  min-width: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.panel-tight {
  padding-bottom: 8px;
}

.panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.panel-head > div:first-child {
  min-width: 0;
}

.panel-head h2 {
  margin: 0;
  font-family: var(--display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--text);
}

.panel-subhead {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.panel-subhead h3 {
  margin: 0;
  font-size: 13px;
}

.filters {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  max-width: 100%;
}

.filters input,
.filters select {
  flex: 1 1 156px;
  min-width: 0;
}

input,
select,
button {
  font-family: inherit;
}

input,
select {
  height: 36px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  border-radius: 10px;
  font-size: 12px;
  padding: 0 10px;
}

input {
  width: 280px;
}

.counter {
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text-2);
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.018);
}

.table-wrap::-webkit-scrollbar,
.nav-list::-webkit-scrollbar,
.sidebar-box::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-wrap::-webkit-scrollbar-thumb,
.nav-list::-webkit-scrollbar-thumb,
.sidebar-box::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.table-wrap::-webkit-scrollbar-track,
.nav-list::-webkit-scrollbar-track,
.sidebar-box::-webkit-scrollbar-track {
  background: transparent;
}

.table-wrap.no-y-scroll {
  overflow-x: auto;
  overflow-y: hidden;
}

.data-table {
  width: max(100%, 980px);
  border-collapse: collapse;
  font-size: 12px;
}

.data-table.compact {
  width: max(100%, 620px);
}

.data-table.compact-wide {
  width: max(100%, 760px);
}

.data-table th,
.data-table td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  padding: 9px 10px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  background: #2a2d31;
  color: var(--muted);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
  font-weight: 600;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.06);
}

.data-table td {
  color: var(--text-2);
}

.data-table tbody tr {
  --row-bg: rgba(255, 255, 255, 0.01);
  background: var(--row-bg);
}

.data-table tbody tr:nth-child(even) {
  --row-bg: rgba(255, 255, 255, 0.035);
}

.data-table tbody tr:hover {
  --row-bg: rgba(120, 180, 224, 0.08);
  background: var(--row-bg);
}

.market {
  max-width: 360px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.type-tag {
  display: inline-block;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 18px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
}

.type-open {
  color: #1266b0;
}

.type-close {
  color: #8b5f18;
}

.type-monitor {
  color: #5c697d;
}

.diag-stack {
  display: grid;
  gap: 8px;
}

.diag-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(55, 57, 61, 0.96) 0%, rgba(43, 45, 48, 0.96) 100%);
}

.diag-card h3 {
  margin: 0 0 6px;
  font-size: 13px;
}

.diag-hint {
  margin: 6px 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}

#activitySection .table-wrap {
  max-height: 640px;
}

#activitySection .panel-head {
  margin-bottom: 10px;
}

#activitySection .score-toolbar {
  justify-content: flex-end;
}

#activitySection .chip-group {
  margin-right: 4px;
}

#activitySection .data-table tbody tr:first-child td {
  border-top: 1px solid rgba(63, 162, 249, 0.18);
}

#activitySection .data-table td {
  font-size: 11.5px;
}

#activitySection .type-tag {
  letter-spacing: 0.08em;
}

.activity-tape-shell {
  border: 1px solid rgba(63, 162, 249, 0.14);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(44, 46, 50, 0.98) 0%, rgba(36, 38, 41, 0.98) 100%);
  box-shadow: var(--shadow-soft);
}

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

.activity-tape-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.activity-tape-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  min-width: 0;
}

.activity-live-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--accent-2);
  box-shadow: 0 0 12px rgba(0, 255, 163, 0.5);
  animation: tapePulse 1.8s ease-in-out infinite;
}

.activity-live-text {
  font-family: var(--display);
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.activity-live-sub {
  color: var(--text-2);
  font-size: 11px;
}

.activity-tape-stats {
  color: var(--text-2);
  font-size: 11px;
}

.activity-tape-wrap {
  border: 0;
  border-radius: 0 0 22px 22px;
  background: transparent;
}

.activity-tape-table {
  width: max(100%, 1120px);
}

.activity-hot .cell-main {
  color: var(--text);
}

.activity-row-new td {
  background: linear-gradient(90deg, rgba(63, 162, 249, 0.12) 0%, rgba(0, 255, 163, 0.04) 100%);
  animation: activityRowFlash 2.8s ease-out 1;
}

.type-tag-open {
  color: #9bd0ff;
}

.type-tag-close {
  color: #ffd487;
}

.type-tag-skip {
  color: #f7c46c;
}

.type-tag-dry {
  color: #9bffc9;
}

.type-tag-signal,
.type-tag-other {
  color: #aab0bb;
}

@keyframes tapePulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.62;
    transform: scale(0.85);
  }
}

@keyframes activityRowFlash {
  0% {
    box-shadow: inset 3px 0 0 rgba(63, 162, 249, 0.9);
    background: linear-gradient(90deg, rgba(63, 162, 249, 0.18) 0%, rgba(0, 255, 163, 0.08) 100%);
  }
  100% {
    box-shadow: inset 0 0 0 rgba(63, 162, 249, 0);
    background: transparent;
  }
}

.mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}

.up {
  color: var(--ok);
}

.down {
  color: var(--bad);
}

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

.status {
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  border: 1px solid transparent;
  white-space: nowrap;
  display: inline-block;
}

.status-up {
  color: var(--ok);
  border-color: rgba(19, 155, 82, 0.35);
  background: rgba(19, 155, 82, 0.08);
}

.status-down {
  color: var(--bad);
  border-color: rgba(197, 55, 55, 0.25);
  background: rgba(197, 55, 55, 0.07);
}

.status-warn {
  color: var(--warn);
  border-color: rgba(179, 116, 34, 0.35);
  background: rgba(179, 116, 34, 0.08);
}

.health-chip {
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 1px 8px;
  font-size: 11px;
  line-height: 18px;
}

.health-good {
  color: var(--ok);
  border-color: rgba(19, 155, 82, 0.32);
  background: rgba(19, 155, 82, 0.1);
}

.health-watch {
  color: var(--warn);
  border-color: rgba(179, 116, 34, 0.32);
  background: rgba(179, 116, 34, 0.1);
}

.health-risk {
  color: var(--bad);
  border-color: rgba(197, 55, 55, 0.28);
  background: rgba(197, 55, 55, 0.08);
}

.addr-link {
  color: var(--link);
  text-decoration: none;
}

.addr-link:hover {
  text-decoration: underline;
}

.copy-btn {
  margin-left: 5px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: #b8c0ca;
  font-size: 11px;
  line-height: 18px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.copy-btn:hover {
  border-color: rgba(63, 162, 249, 0.45);
  color: #ffffff;
  background: rgba(63, 162, 249, 0.12);
}

.address-card-table .copy-btn {
  display: block;
  margin-left: 0;
  margin-top: 3px;
  width: fit-content;
}

.score-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  justify-self: end;
  max-width: 100%;
}

.chip-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip-btn {
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  font-size: 12px;
  padding: 0 12px;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.chip-btn:hover {
  border-color: rgba(63, 162, 249, 0.4);
  background: rgba(63, 162, 249, 0.1);
}

.chip-btn-active {
  border-color: rgba(63, 162, 249, 0.55);
  background: rgba(63, 162, 249, 0.16);
  color: var(--text);
}

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

.score-filter select {
  width: 92px;
  height: 30px;
  padding: 0 8px;
}

.score-pager {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pager-btn {
  height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: #b8c0ca;
  font-size: 12px;
  padding: 0 10px;
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background-color 0.16s ease;
}

.pager-btn:hover:not(:disabled) {
  border-color: rgba(63, 162, 249, 0.4);
  color: #ffffff;
  background: rgba(63, 162, 249, 0.1);
}

.pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.address-card-table {
  width: max(100%, 1240px);
}

.positions-table {
  width: max(100%, 1280px);
}

.observation-table {
  width: max(100%, 1220px);
}

.observation-toolbar {
  justify-content: flex-end;
}

#observationSummaryText {
  margin-top: 4px;
}

.address-card-table tbody tr {
  cursor: default;
}

.score-total {
  border-bottom: 1px dashed rgba(63, 162, 249, 0.4);
  color: #d7efff;
}

.score-total-trigger {
  cursor: help;
}

.profile-cell {
  min-width: 250px;
  max-width: 360px;
  line-height: 1.35;
}

.addr-stack {
  min-width: 220px;
}

.badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: #c3cad3;
  font-size: 10px;
  line-height: 1;
  padding: 3px 7px;
}

.cell-main {
  color: var(--text);
}

.cell-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.table-number {
  white-space: nowrap;
}

.sticky-col {
  position: sticky;
  left: 0;
  z-index: 2;
  background: var(--row-bg, rgba(255, 255, 255, 0.01));
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.05);
}

.data-table th.sticky-col {
  z-index: 4;
  background: #2a2c2f;
}

.address-card-table th:nth-child(1),
.address-card-table td:nth-child(1) {
  min-width: 92px;
}

.address-card-table th:nth-child(2),
.address-card-table td:nth-child(2) {
  min-width: 74px;
}

.address-card-table th:nth-child(3),
.address-card-table td:nth-child(3) {
  min-width: 244px;
}

.address-card-table .sticky-col-1 {
  left: 0;
}

.address-card-table .sticky-col-2 {
  left: 92px;
}

.address-card-table .sticky-col-3 {
  left: 166px;
}

.positions-table th:nth-child(2),
.positions-table td:nth-child(2) {
  min-width: 320px;
}

.positions-table th:nth-child(3),
.positions-table td:nth-child(3) {
  min-width: 206px;
}

.positions-table .sticky-col-1 {
  left: 0;
}

.positions-table .sticky-col-2 {
  left: 320px;
}

.row-actions {
  display: inline-flex;
  gap: 6px;
  flex-wrap: wrap;
}

.row-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 26px;
  border: 1px solid rgba(63, 162, 249, 0.4);
  border-radius: 999px;
  background: rgba(63, 162, 249, 0.14);
  color: var(--text);
  text-decoration: none;
  font-size: 11px;
  line-height: 1;
  padding: 0 10px;
}

.row-action-btn-subtle {
  border-color: var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: #b8c0ca;
}

.grade-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 11px;
  line-height: 1;
  font-weight: 700;
}

.grade-pill-s {
  color: var(--text);
  border-color: rgba(63, 162, 249, 0.42);
  background: rgba(63, 162, 249, 0.14);
}

.grade-pill-a {
  color: var(--warn);
  border-color: rgba(245, 170, 0, 0.25);
  background: rgba(245, 170, 0, 0.1);
}

.pulse-stack {
  min-width: 118px;
}

.pulse-bars {
  height: 28px;
  display: flex;
  align-items: flex-end;
  gap: 4px;
}

.pulse-bar {
  position: relative;
  flex: 1 1 0;
  min-width: 12px;
  border-radius: 5px 5px 3px 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.pulse-bar span {
  position: absolute;
  inset: auto 0 2px 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.78);
  font-size: 9px;
  line-height: 1;
}

.pulse-bar-strong {
  background: linear-gradient(180deg, #4af7b3 0%, #00d47e 100%);
}

.pulse-bar-mid {
  background: linear-gradient(180deg, #7ec8ff 0%, #3fa2f9 100%);
}

.pulse-bar-weak {
  background: linear-gradient(180deg, #ffd487 0%, #f5aa00 100%);
}

.pulse-legend {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.1;
}

.price-pulse {
  min-width: 128px;
}

.price-track {
  position: relative;
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.price-range {
  position: absolute;
  top: 50%;
  height: 4px;
  transform: translateY(-50%);
  border-radius: 999px;
}

.price-range-up {
  background: rgba(19, 155, 82, 0.35);
}

.price-range-down {
  background: rgba(197, 55, 55, 0.28);
}

.price-range-flat {
  background: rgba(27, 111, 191, 0.24);
}

.price-marker {
  position: absolute;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(49, 49, 49, 0.92);
}

.price-marker-entry {
  background: #607187;
}

.price-marker-up {
  background: #139b52;
}

.price-marker-down {
  background: #c53737;
}

.price-marker-flat {
  background: #1b6fbf;
}

.profile-cell .line-1 {
  color: var(--text);
}

.profile-cell .line-2 {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
}

.score-tooltip {
  position: fixed;
  z-index: 18;
  max-width: 320px;
  pointer-events: none;
  white-space: pre-wrap;
  line-height: 1.4;
  font-size: 12px;
  color: var(--text-2);
  background: rgba(43, 45, 48, 0.98);
  border: 1px solid rgba(63, 162, 249, 0.28);
  border-radius: 12px;
  padding: 8px 9px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
}

.sample-toolbar {
  justify-content: flex-end;
  margin-top: 6px;
}

@media (max-width: 1280px) {
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pipeline-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

}

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    height: 100dvh;
    padding: 16px 14px 18px;
    gap: 14px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    overflow-y: auto;
    background: rgba(32, 34, 38, 0.96);
    border-right: 1px solid var(--line);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.32);
    z-index: 80;
  }

  .sidebar-brand {
    justify-self: start;
    justify-items: start;
    text-align: left;
  }

  .nav-list {
    display: grid;
    flex-wrap: initial;
    gap: 8px;
    padding-bottom: 0;
    scroll-snap-type: none;
  }

  .nav-item,
  .nav-item-overview {
    min-height: 50px;
    padding: 14px 14px 14px 16px;
    font-size: 14px;
    border-radius: 14px;
  }

  .nav-item::after {
    left: 12px;
    right: auto;
    top: 10px;
    bottom: 10px;
    width: 4px;
    height: 3px;
    transform: scaleY(0.45);
  }

  .nav-item.active::after {
    transform: scaleY(1);
  }

  .sidebar-box {
    grid-auto-flow: row;
    gap: 8px;
    justify-content: initial;
    overflow: visible;
    padding-bottom: 0;
  }

  .kv-row {
    min-width: 0;
  }

  .workspace {
    padding: 12px;
    gap: 12px;
    }
  
  .sidebar-footer {
    min-height: auto;
    align-content: start;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    border: 0;
    margin: 0;
    padding: 0;
    background: rgba(10, 12, 14, 0.56);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
    z-index: 70;
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
  }

  .workspace-meta-button-mobile {
    display: inline-flex;
  }

  .workspace-header {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .workspace-header-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 740px) {
  .sidebar-hero-avatar {
    width: 76px;
    height: 76px;
    border-radius: 24px;
  }

  .sidebar-slogan {
    font-size: 12px;
    max-width: none;
  }

  .activity-tape-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .activity-tape-meta {
    justify-items: start;
  }

  .top-meta {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .kpi-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .kpi-card {
    flex: 0 0 min(85vw, 320px);
    min-height: 126px;
    scroll-snap-align: start;
  }

  .kpi-value {
    font-size: 24px;
  }

  .summary-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .summary-item {
    min-height: 76px;
  }

  .summary-item strong {
    font-size: 14px;
  }

  .terminal-summary-copy {
    justify-items: start;
    text-align: left;
  }

  .view-shell {
    padding: 14px;
  }

  .view-shell-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .view-shell-tools {
    justify-content: flex-start;
  }

  .view-title {
    font-size: 22px;
  }

  .pipeline-kpis {
    grid-template-columns: 1fr;
  }

  .action-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    -webkit-overflow-scrolling: touch;
  }

  .action-card {
    flex: 0 0 min(72vw, 240px);
    min-height: 88px;
  }

  .panel {
    padding: 10px;
    border-radius: 16px;
  }

  .panel-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .panel-head h2 {
    font-size: 14px;
  }

  .filters {
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }

  .filters input,
  .filters select {
    width: 100%;
  }

  input {
    width: 100%;
  }

  .counter {
    font-size: 11px;
    padding: 2px 6px;
  }

  .score-toolbar {
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
  }

  .chip-group {
    width: 100%;
  }

  .score-pager {
    width: 100%;
    justify-content: space-between;
  }

  .pager-btn {
    flex: 1 1 auto;
    min-width: 0;
  }

  .sample-toolbar {
    justify-content: flex-start;
  }

  .observation-toolbar {
    justify-content: flex-start;
    width: 100%;
  }

  .observation-toolbar .counter {
    width: 100%;
  }

  .observation-table {
    width: max(100%, 1080px);
  }

  .table-wrap {
    border-radius: 7px;
  }

  .table-wrap-mobile-cards {
    border: 0;
    overflow: visible;
  }

  .table-wrap-mobile-cards .data-table {
    width: 100%;
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 8px;
  }

  .table-wrap-mobile-cards .data-table thead {
    display: none;
  }

  .table-wrap-mobile-cards .data-table tbody,
  .table-wrap-mobile-cards .data-table tr,
  .table-wrap-mobile-cards .data-table td {
    display: block;
    width: 100%;
  }

  .table-wrap-mobile-cards .data-table tbody tr {
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 12px;
    box-shadow: var(--shadow-soft);
  }

  .table-wrap-mobile-cards .data-table tbody tr:nth-child(even),
  .table-wrap-mobile-cards .data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
  }

  .table-wrap-mobile-cards .data-table td {
    border-bottom: 0;
    padding: 6px 0;
    font-size: 12px;
  }

  .table-wrap-mobile-cards .data-table td[data-label] {
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
  }

  .table-wrap-mobile-cards .data-table td + td {
    border-top: 1px dashed rgba(255, 255, 255, 0.06);
  }

  .table-wrap-mobile-cards .data-table td[data-label]::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
  }

  .table-wrap-mobile-cards .data-table td.address-cell .copy-btn {
    margin-top: 2px;
  }

  .table-wrap-mobile-cards .data-table tr.row-empty td {
    display: block;
    text-align: center;
    padding: 10px 2px;
  }

  .table-wrap-mobile-cards .data-table tr.row-empty td::before {
    content: none;
  }

  .table-wrap-mobile-cards .market {
    max-width: none;
    -webkit-line-clamp: 3;
  }

  .table-wrap-mobile-cards .sticky-col {
    position: static;
    left: auto;
    box-shadow: none;
    background: transparent;
  }

  .diag-stack {
    gap: 7px;
  }

  .diag-card h3 {
    font-size: 12px;
  }

  .diag-hint {
    font-size: 11px;
  }
}

@media (max-width: 520px) {
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .table-wrap-mobile-cards .data-table td[data-label] {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 6px;
  }
}

.sidebar-footer {
  display: grid;
  gap: 12px;
  align-content: end;
  min-height: 100%;
}

.nav-item-title {
  display: block;
}

.nav-item-meta {
  display: block;
  margin-top: 5px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.nav-item.active .nav-item-meta,
.nav-item:hover .nav-item-meta {
  color: var(--text-2);
}

.nav-item-login {
  text-align: center;
  min-height: 46px;
  padding-left: 14px;
}

.sidebar-backdrop {
  display: none;
}

.workspace-header {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.026);
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
}

.workspace-header::before {
  content: none;
}

.workspace-header-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.workspace-title {
  margin: 0;
  font-family: var(--display);
  font-size: 30px;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--text);
}

.workspace-subtitle {
  margin: 0;
  max-width: 820px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.workspace-header-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  align-items: stretch;
}

.workspace-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 12px;
  color: var(--text-2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.workspace-meta-chip span {
  color: var(--muted);
}

.workspace-meta-chip strong {
  color: var(--text);
  font-weight: 700;
}

.workspace-meta-button {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
  transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.workspace-meta-button:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
}

.workspace-meta-button-mobile {
  display: none;
}

.workspace-header-minimal {
  padding: 10px 12px;
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.workspace-header-minimal .workspace-header-meta {
  width: 100%;
  justify-content: flex-end;
}

.workspace-content {
  display: grid;
  align-content: start;
  gap: 16px;
}

.terminal-loading,
.terminal-error-panel {
  min-height: 180px;
}

.terminal-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.terminal-dashboard-grid-risk {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-dashboard-grid-system {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.terminal-domain-card .panel-head {
  margin-bottom: 12px;
}

.terminal-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.terminal-metric {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.028);
  padding: 12px;
  min-height: 108px;
}

.terminal-metric-label {
  color: var(--muted-2);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.terminal-metric-value {
  color: var(--number);
  font-size: 26px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-shadow: none;
}

.terminal-metric-value.up {
  color: var(--ok);
}

.terminal-metric-value.down {
  color: var(--bad);
}

.terminal-metric-value.warn {
  color: var(--warn);
}

.terminal-metric-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.terminal-summary-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.terminal-summary-item {
  align-items: flex-start;
}

.terminal-summary-copy {
  display: grid;
  gap: 6px;
  justify-items: end;
  text-align: right;
}

.terminal-summary-hint {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.3;
}

.terminal-toolbar {
  gap: 8px;
  row-gap: 10px;
}

.terminal-toolbar .chip-btn,
.terminal-toolbar .terminal-btn-link {
  text-decoration: none;
}

.terminal-input-small {
  width: 118px;
  flex: 0 0 118px;
}

.terminal-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 12px;
  color: var(--text-2);
}

.terminal-check input {
  width: auto;
  height: auto;
  accent-color: var(--accent);
}

.terminal-btn-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
}

.cell-stack {
  display: grid;
  gap: 4px;
}

.cell-main {
  color: var(--text);
  line-height: 1.4;
}

.cell-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.terminal-link-strong {
  font-weight: 600;
}

.terminal-tabs {
  margin: 0 0 12px;
}

.wallet-table-hint {
  margin: -2px 0 12px;
}

.terminal-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
}

.terminal-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.9fr);
  gap: 14px;
}

.wallet-address-panel {
  max-width: none;
}

.wallet-address-bar {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.028);
}

.wallet-address-full {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-all;
}

.terminal-badge-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

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

.terminal-market-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
}

.empty-state {
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
  padding: 18px;
  color: var(--text-2);
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.terminal-log-line {
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.5;
}

.contact-panel {
  max-width: 760px;
}

.contact-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.028);
}

.contact-handle {
  display: grid;
  gap: 6px;
}

.contact-label {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.contact-copy-btn {
  min-width: 92px;
}

.terminal-copy-chip {
  cursor: pointer;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 100;
  min-width: 112px;
  border: 1px solid rgba(63, 162, 249, 0.36);
  border-radius: 12px;
  padding: 10px 14px;
  background: rgba(32, 34, 36, 0.94);
  box-shadow: var(--shadow);
  color: #eef9ff;
  font-size: 12px;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.toast-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1180px) {
  .workspace-header {
    grid-template-columns: 1fr;
  }

  .workspace-header-meta {
    justify-content: flex-start;
  }
}

@media (max-width: 960px) {
  .terminal-dashboard-grid,
  .terminal-dashboard-grid-risk,
  .terminal-dashboard-grid-system,
  .terminal-detail-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .workspace {
    padding: 14px;
  }

  .workspace-title {
    font-size: 24px;
  }

  .terminal-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .terminal-metric-grid {
    grid-template-columns: 1fr;
  }

  .contact-shell,
  .terminal-pager {
    flex-direction: column;
    align-items: stretch;
  }
}

/* ===== 实时数字滚动动画（Hyperliquid风格）===== */
@keyframes numRollUp {
  0%   { transform: translateY(6px); opacity: 0.4; filter: brightness(1.3); }
  60%  { transform: translateY(-1px); opacity: 1; filter: brightness(1.15); }
  100% { transform: translateY(0);   opacity: 1; filter: brightness(1); }
}
@keyframes numRollDown {
  0%   { transform: translateY(-6px); opacity: 0.4; filter: brightness(1.3); }
  60%  { transform: translateY(1px);  opacity: 1;   filter: brightness(1.15); }
  100% { transform: translateY(0);    opacity: 1;   filter: brightness(1); }
}
@keyframes numGlowUp {
  0%   { text-shadow: 0 0 0 rgba(78, 203, 140, 0); }
  40%  { text-shadow: 0 0 18px rgba(78, 203, 140, 0.55), 0 0 6px rgba(78, 203, 140, 0.35); }
  100% { text-shadow: 0 0 0 rgba(78, 203, 140, 0); }
}
@keyframes numGlowDown {
  0%   { text-shadow: 0 0 0 rgba(240, 126, 118, 0); }
  40%  { text-shadow: 0 0 18px rgba(240, 126, 118, 0.55), 0 0 6px rgba(240, 126, 118, 0.35); }
  100% { text-shadow: 0 0 0 rgba(240, 126, 118, 0); }
}
.num-tick-up {
  animation: numRollUp 0.38s cubic-bezier(0.22, 0.61, 0.36, 1), numGlowUp 0.55s ease;
  display: inline-block;
}
.num-tick-down {
  animation: numRollDown 0.38s cubic-bezier(0.22, 0.61, 0.36, 1), numGlowDown 0.55s ease;
  display: inline-block;
}
.num-tick-neutral {
  animation: numRollUp 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
  display: inline-block;
}
/* 让 metric value 支持 inline-block 动画 */
.terminal-metric-value {
  display: inline-block;
}

/* ===== 手机端紧凑模式（≤ 740px）===== */
@media (max-width: 740px) {
  /* 指标格: 保持2列，但卡片更紧凑 */
  .terminal-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 7px;
  }

  .terminal-metric {
    padding: 9px 10px;
    min-height: 76px;
    border-radius: 12px;
    gap: 4px;
  }

  .terminal-metric-label {
    font-size: 9.5px;
    letter-spacing: 0.05em;
  }

  .terminal-metric-value {
    font-size: 18px;
    letter-spacing: -0.02em;
    line-height: 1.1;
  }

  .terminal-metric-help {
    font-size: 10.5px;
    line-height: 1.35;
  }

  /* section面板：更紧凑 */
  .terminal-domain-card {
    padding: 12px;
    border-radius: 14px;
  }

  .terminal-domain-card .panel-head {
    margin-bottom: 8px;
  }

  .terminal-domain-card .panel-head h2 {
    font-size: 14px;
  }

  .terminal-domain-card .panel-head p {
    font-size: 11px;
    display: none;
  }

  /* 外层dashboard布局：强制单列 */
  .terminal-dashboard-grid,
  .terminal-dashboard-grid-risk,
  .terminal-dashboard-grid-system {
    grid-template-columns: 1fr !important;
    gap: 10px;
  }

  /* workspace 内边距收紧 */
  .workspace {
    padding: 10px;
    gap: 10px;
  }

  /* 顶部summary strip：2列 */
  .terminal-summary-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
  }

  /* 手机上隐藏次要section的注释文字，节省空间 */
  .view-subtitle {
    display: none;
  }

  /* 面板头标题缩小 */
  .panel-head h2 {
    font-size: 13px;
  }
}

/* 超小屏（≤ 420px）进一步压缩 */
@media (max-width: 420px) {
  .terminal-metric-value {
    font-size: 16px;
  }

  .terminal-metric {
    padding: 8px 9px;
    min-height: 70px;
  }

  .workspace {
    padding: 8px;
    gap: 8px;
  }
}
