:root {
  color-scheme: light;
  --bg: #f4f6f8;
  --panel: #ffffff;
  --panel-strong: #eef2f5;
  --ink: #15202b;
  --muted: #667381;
  --line: #dce3ea;
  --teal: #0b8f7a;
  --teal-soft: #dff5f0;
  --coral: #d65f4b;
  --coral-soft: #fde9e5;
  --blue: #3467d6;
  --yellow: #f2b84b;
  --shadow: 0 18px 46px rgba(18, 32, 46, 0.08);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.login-view {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 28px;
}

.brand-block,
.product-title,
.panel-head,
.sidebar-head,
.tabs-head,
.graph-legend,
.stat-row,
.token-title,
.record-addresses {
  display: flex;
  align-items: center;
}

.brand-block {
  gap: 14px;
  margin-bottom: 26px;
}

.brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-weight: 800;
}

.brand-mark.small {
  width: 38px;
  height: 38px;
  font-size: 14px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  line-height: 1.2;
}

h2 {
  font-size: 17px;
  line-height: 1.25;
}

.brand-block p,
.product-title p,
.eyebrow,
.form-message,
.status-line,
.meta-text {
  color: var(--muted);
}

.eyebrow {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

label {
  display: block;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
}

label span {
  display: inline-block;
  margin-bottom: 6px;
}

input,
select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(52, 103, 214, 0.14);
}

.captcha-row,
.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.captcha-row canvas {
  width: 116px;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.qr-box {
  display: grid;
  place-items: center;
  margin: 14px 0;
}

.qr-box img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.primary-btn,
.ghost-btn,
.icon-btn,
.tab,
.address-btn {
  border: 0;
  border-radius: 8px;
  min-height: 38px;
}

.primary-btn {
  background: var(--ink);
  color: #ffffff;
  padding: 0 18px;
  font-weight: 700;
}

.login-panel .primary-btn {
  width: 100%;
  margin-top: 18px;
}

.login-panel .full-width {
  width: 100%;
  margin-top: 10px;
}

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

.ghost-btn,
.icon-btn,
.tab,
.address-btn {
  background: var(--panel-strong);
  color: var(--ink);
}

.ghost-btn {
  padding: 0 14px;
}

.verify-entry-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.receipt-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.receipt-head span,
.receipt-head em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}

.receipt-head strong {
  font-size: 18px;
}

.icon-btn {
  width: 40px;
  display: none;
}

.form-message {
  min-height: 20px;
  margin-top: 12px;
  font-size: 13px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
}

.admin-shell {
  min-height: 100vh;
  background: var(--panel);
}

.admin-layout {
  min-height: calc(100vh - 73px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--bg);
}

.admin-nav {
  position: sticky;
  top: 0;
  align-self: start;
  height: calc(100vh - 73px);
  overflow: auto;
  border-right: 1px solid var(--line);
  background: #ffffff;
  padding: 12px;
}

.admin-nav-btn {
  width: 100%;
  min-height: 40px;
  margin-bottom: 6px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  padding: 0 12px;
  font-weight: 700;
}

.admin-nav-btn.active {
  background: var(--ink);
  color: #ffffff;
}

.admin-topbar {
  padding: 16px 20px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}

.admin-main {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.admin-module[hidden] {
  display: none !important;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 13px;
}

.pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pagination-bar select {
  width: auto;
  min-width: 76px;
  height: 34px;
  margin: 0 4px;
}

.permission-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, 1fr));
  gap: 6px;
  min-width: 320px;
}

.permission-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: var(--ink);
  font-size: 12px;
}

.permission-item input {
  width: auto;
  height: auto;
}

.admin-filters,
.admin-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.case-inline-form {
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  margin-top: 14px;
}

.admin-form {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.admin-form textarea {
  grid-column: span 2;
  min-height: 104px;
  resize: vertical;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(110px, 1fr));
  gap: 10px;
}

.overview-card {
  min-height: 94px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.overview-card span,
.overview-card em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.overview-card strong {
  display: block;
  margin: 8px 0 4px;
  font-size: 24px;
}

.mini-tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 2px 4px 2px 0;
  padding: 3px 7px;
  border-radius: 999px;
  background: #eef3f7;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.overview-split {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.overview-dist {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.overview-dist > strong,
.overview-latest > strong {
  font-size: 13px;
}

.overview-dist span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.overview-latest {
  margin-top: 12px;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.section-title-row > strong {
  font-size: 13px;
}

.section-title-row .table-actions {
  margin-bottom: 0;
  flex-wrap: wrap;
}

.compact-metrics {
  margin-top: 10px;
}

.compact-table {
  margin-top: 8px;
}

.table-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.saved-filter-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.saved-filter-bar span,
.saved-filter-bar em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.saved-filter-chip {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  min-width: 32px;
  width: 32px;
  padding: 0;
}

.section-subhead {
  margin: 16px 0 10px;
  color: var(--ink);
  font-size: 13px;
}

.import-box {
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.import-box summary {
  cursor: pointer;
  font-weight: 800;
}

.import-box textarea {
  width: 100%;
  margin: 8px 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  resize: vertical;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px;
  background: #ffffff;
  border-right: 1px solid var(--line);
  overflow: auto;
  z-index: 20;
}

.sidebar-head {
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.sidebar-close {
  display: inline-grid;
  place-items: center;
}

.app-shell.history-collapsed {
  grid-template-columns: 1fr;
}

.app-shell.history-collapsed .sidebar {
  display: none;
}

.history-restore {
  display: none;
}

.history-collapsed .history-restore {
  display: inline-flex;
  align-items: center;
}

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

.history-item {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 30px;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
  color: var(--ink);
}

.history-item.active {
  border-color: var(--blue);
  background: #f1f7ff;
}

.history-open,
.history-delete {
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0;
}

.history-delete {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 18px;
}

.history-delete:hover {
  background: var(--panel-strong);
  color: var(--coral);
}

.history-item strong,
.history-item span {
  display: block;
}

.history-item strong {
  font-size: 14px;
  margin-bottom: 4px;
}

.history-item span {
  color: var(--muted);
  font-size: 12px;
}

.workspace {
  min-width: 0;
  padding: 20px;
}

.topbar {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

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

.language-row {
  justify-content: flex-end;
  margin-bottom: 14px;
}

.language-select {
  width: auto;
  min-width: 126px;
  height: 38px;
  padding: 0 10px;
  font-weight: 700;
}

.product-title {
  gap: 12px;
  min-width: 0;
}

.product-title h1 {
  font-size: 20px;
}

.product-title p {
  font-size: 13px;
}

.searchbar {
  margin-top: 16px;
  display: grid;
  grid-template-columns: 210px minmax(260px, 1fr) 104px;
  gap: 10px;
}

.chain-picker {
  position: relative;
}

.chain-current {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 34px 0 12px;
  text-align: left;
}

.chain-current::after {
  content: "v";
  position: absolute;
  right: 12px;
  top: 9px;
  color: var(--muted);
}

.chain-menu {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 40;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.chain-picker.open .chain-menu {
  display: grid;
  gap: 4px;
}

.chain-option {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  padding: 0 8px;
  text-align: left;
}

.chain-option:hover,
.chain-option.selected {
  background: var(--panel-strong);
}

.chain-option strong {
  visibility: hidden;
  color: var(--teal);
  font-weight: 900;
}

.chain-option.selected strong {
  visibility: visible;
}

.searchbar button {
  height: 42px;
}

.status-line {
  min-height: 22px;
  margin: 10px 0 0;
  font-size: 13px;
}

.screening-panel {
  margin-top: 12px;
}

.account-usage-panel {
  margin-top: 12px;
}

.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 14px 18px 18px;
}

.usage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 12px;
}

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

.usage-card-head strong,
.usage-card-head span {
  min-width: 0;
}

.usage-card-head span {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.usage-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.usage-stats div {
  border-radius: 8px;
  background: #ffffff;
  padding: 8px;
}

.usage-stats span,
.usage-ops span {
  color: var(--muted);
  font-size: 12px;
}

.usage-stats strong {
  display: block;
  margin-top: 4px;
  font-size: 16px;
}

.usage-ops {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.usage-ops span {
  border-radius: 999px;
  background: var(--panel-strong);
  padding: 5px 8px;
}

.screening-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.screening-form textarea {
  width: 100%;
  min-height: 78px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  font: inherit;
}

.screening-form button {
  min-height: 42px;
  align-self: start;
}

.screening-result {
  padding: 14px 18px 18px;
}

.user-watchlist {
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
}

.user-alerts {
  border-top: 1px solid var(--line);
  padding: 14px 18px 18px;
}

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

.user-watchlist-head h3 {
  margin: 0;
  font-size: 15px;
}

.watchlist-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, 0.5fr) 88px;
  gap: 10px;
  margin-bottom: 10px;
}

.watchlist-items {
  display: grid;
  gap: 8px;
}

.watchlist-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.watchlist-item strong,
.watchlist-item span {
  display: block;
}

.watchlist-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.watchlist-delete {
  min-width: 34px;
  height: 34px;
  padding: 0;
}

.alert-item {
  grid-template-columns: minmax(0, 1fr) minmax(96px, 0.25fr);
}

.inline-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.compact-input {
  width: min(240px, 100%);
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: #ffffff;
  color: var(--ink);
}

.alert-close {
  min-height: 34px;
  padding: 0 10px;
}

.alert-actions {
  display: grid;
  gap: 6px;
  align-content: start;
}

.case-counts {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

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

.screening-summary div {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

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

.case-workload-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--text);
  cursor: pointer;
  padding: 10px;
  text-align: left;
}

.case-workload-btn:hover,
.case-workload-btn:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(44, 123, 229, 0.12);
  outline: none;
}

.screening-summary span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.screening-summary strong {
  display: block;
  margin-top: 4px;
  font-size: 18px;
}

.responsive-table {
  overflow-x: auto;
}

.responsive-table table {
  width: 100%;
  border-collapse: collapse;
}

.responsive-table th,
.responsive-table td {
  border-top: 1px solid var(--line);
  padding: 9px 8px;
  text-align: left;
  vertical-align: top;
  font-size: 12px;
}

.responsive-table th {
  color: var(--muted);
  font-weight: 800;
}

.screening-history,
.query-report-history {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.screening-history h3,
.query-report-history h3 {
  margin: 0;
  font-size: 14px;
}

.screening-history-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 0.8fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 10px;
}

.screening-history-item strong,
.screening-history-item span {
  display: block;
}

.screening-history-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.screening-history-addresses {
  display: grid;
  gap: 6px;
  align-content: start;
}

.screening-export-link {
  display: inline-grid;
  place-items: center;
  min-height: 34px;
  text-decoration: none;
}

.result-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(320px, 0.75fr);
  gap: 16px;
}

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

.panel-head {
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}

.graph-legend {
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
}

.graph-tools {
  display: flex;
  gap: 6px;
}

.icon-tool {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 8px;
  background: var(--panel-strong);
  color: var(--ink);
  font-weight: 800;
}

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
  margin-right: 5px;
}

.dot.in {
  background: var(--teal);
}

.dot.out {
  background: var(--coral);
}

.graph-stage {
  min-height: 520px;
  overflow: auto;
  background: #fbfcfd;
  cursor: grab;
  user-select: none;
}

.graph-stage.dragging {
  cursor: grabbing;
}

.graph-panel.fullscreen {
  position: fixed;
  inset: 12px;
  z-index: 80;
  display: flex;
  flex-direction: column;
}

.graph-panel.fullscreen .graph-stage {
  flex: 1;
  min-height: 0;
}

.flow-svg {
  display: block;
  min-width: 860px;
}

.flow-edge {
  fill: none;
  stroke-linecap: round;
  opacity: 0.72;
  transition: opacity 0.15s ease, stroke-width 0.15s ease;
}

.flow-edge.in {
  stroke: var(--teal);
}

.flow-edge.out {
  stroke: var(--coral);
}

.flow-edge.active {
  opacity: 1;
  stroke-width: 8px;
}

.flow-node rect {
  fill: #ffffff;
  stroke: var(--line);
  stroke-width: 1.4;
  rx: 8;
}

.flow-node.viewed rect {
  stroke: var(--blue);
  stroke-dasharray: 4 3;
}

.flow-node.risk-low rect {
  stroke: #d6a600;
}

.flow-node.risk-medium rect {
  stroke: #e08a2f;
  stroke-width: 2;
}

.flow-node.risk-high rect,
.flow-node.risk-critical rect {
  stroke: var(--coral);
  stroke-width: 2.4;
}

.flow-node.center rect {
  fill: #17202b;
  stroke: #17202b;
}

.flow-node.center text {
  fill: #ffffff;
}

.flow-node text {
  fill: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.flow-node .addr-hi,
.full-address mark {
  fill: var(--blue);
  color: var(--blue);
  background: transparent;
  font-weight: 1000;
  text-shadow: 0 0 0 var(--blue);
}

.node-address {
  font-family: Consolas, "SFMono-Regular", monospace;
}

.expand-toggle {
  cursor: pointer;
  fill: var(--blue) !important;
  font-size: 22px !important;
  font-weight: 900 !important;
}

.full-address {
  font-family: Consolas, "SFMono-Regular", monospace;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.flow-node .sub {
  fill: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.flow-node.center .sub {
  fill: rgba(255, 255, 255, 0.72);
}

.edge-label {
  fill: #526171;
  font-size: 11px;
  font-weight: 700;
}

.wallet-summary {
  padding: 18px;
  display: grid;
  gap: 12px;
}

.total-card {
  padding: 16px;
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
}

.total-card span {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12px;
  margin-bottom: 8px;
}

.total-card strong {
  display: block;
  font-size: 30px;
  line-height: 1.1;
}

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

.stat-row {
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
}

.stat-row span:first-child {
  color: var(--muted);
  font-size: 13px;
}

.stat-row strong {
  max-width: 58%;
  text-align: right;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.demo-note {
  padding: 12px;
  border-radius: 8px;
  background: #fff8e6;
  color: #775100;
  border: 1px solid #f5d894;
  font-size: 13px;
}

.records-panel {
  margin-top: 16px;
}

.tabs-head {
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}

.tabs {
  display: flex;
  gap: 8px;
}

.tab {
  min-width: 74px;
  padding: 0 14px;
  font-weight: 700;
}

.tab.active {
  background: var(--ink);
  color: #ffffff;
}

.filter-field {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.filter-field span {
  margin: 0;
}

.filter-field input {
  width: 92px;
}

.records-body {
  min-height: 220px;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.data-table th {
  color: var(--muted);
  background: #fbfcfd;
  font-size: 12px;
  font-weight: 800;
}

.data-table tr.record-row {
  cursor: pointer;
}

.data-table tr.record-row:hover,
.data-table tr.record-row.active {
  background: #f1f7ff;
}

.token-title {
  gap: 10px;
}

.token-badge {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal-soft);
  color: var(--teal);
  font-weight: 800;
}

.token-title strong,
.record-addresses strong {
  display: block;
}

.token-title span,
.record-addresses span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.record-addresses {
  gap: 8px;
}

.address-btn {
  min-height: 30px;
  padding: 0 9px;
  color: var(--blue);
  font-weight: 700;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.node-modal {
  display: none;
}

.node-modal.open {
  display: block;
}

.node-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(14, 24, 34, 0.32);
}

.node-modal-panel {
  position: fixed;
  right: 18px;
  top: 18px;
  z-index: 101;
  width: min(520px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

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

.query-node-btn {
  width: 100%;
  margin-top: 16px;
}

.node-admin-link {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  text-decoration: none;
}

.hash-link {
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

.label-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  margin: 4px 0 0 0;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef3ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  vertical-align: middle;
}

.label-pill.exchange {
  background: #e9f8f4;
  color: var(--teal);
}

.label-pill.risk {
  background: #fff1ef;
  color: var(--coral);
}

.label-pill.whale {
  background: #fff7dc;
  color: #775100;
}

.risk-summary {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.risk-summary span,
.risk-summary em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.report-btn {
  justify-self: start;
  margin-top: 2px;
}

.risk-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  background: #eef1f4;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.risk-badge.low {
  background: #fff7dc;
  color: #775100;
}

.risk-badge.medium {
  background: #fff0df;
  color: #a65300;
}

.risk-badge.high,
.risk-badge.critical {
  background: #fff1ef;
  color: var(--coral);
}

.risk-rules {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.risk-rule {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.risk-rule strong,
.risk-rule span {
  display: block;
}

.risk-rule span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.checklist-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.checklist-row input {
  margin-top: 2px;
}

.checklist-row strong,
.checklist-row em {
  display: block;
}

.checklist-row em {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.aml-report-panel {
  width: min(780px, calc(100vw - 36px));
}

.report-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 12px;
}

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

.case-report-title {
  display: none;
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.case-report-title h2 {
  margin: 4px 0;
}

.case-report-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

@media print {
  body * {
    visibility: hidden;
  }

  #amlReportModal,
  #amlReportModal *,
  #adminModal,
  #adminModal *,
  #verifyResult,
  #verifyResult * {
    visibility: visible;
  }

  #amlReportModal .node-modal-backdrop,
  #amlReportModal .node-modal-head button,
  #amlReportModal .report-actions,
  #adminModal .node-modal-backdrop,
  #adminModal .node-modal-head,
  #adminModal .report-actions,
  #adminModal form {
    display: none !important;
  }

  #amlReportModal .node-modal-panel,
  #adminModal .node-modal-panel {
    position: absolute;
    inset: 0;
    width: auto;
    max-height: none;
    overflow: visible;
    border: 0;
    box-shadow: none;
  }

  #adminModal .case-report-title {
    display: block;
  }

  .verify-panel {
    border: 0;
    box-shadow: none;
    width: auto;
    padding: 0;
  }

  .verify-panel .brand-block,
  .verify-panel label,
  .verify-panel button,
  .verify-panel .form-message {
    display: none !important;
  }

  #verifyResult {
    position: absolute;
    inset: 0;
    padding: 24px;
  }
}

.empty-state {
  min-height: 220px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 14px;
  text-align: center;
  padding: 24px;
}

.empty-state.compact {
  min-height: 84px;
}

.mobile-card-list {
  display: none;
}

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

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(86vw, 320px);
    transform: translateX(-105%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow);
  }

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

  .sidebar-close,
  .icon-btn {
    display: inline-grid;
    place-items: center;
  }

  .workspace {
    padding: 14px;
  }

  .searchbar,
  .usage-grid,
  .screening-form,
  .watchlist-form,
  .result-grid,
  .admin-filters,
  .admin-form,
  .overview-grid,
  .overview-split {
    grid-template-columns: 1fr;
  }

  .graph-stage {
    min-height: 440px;
  }

  .tabs-head {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-field {
    justify-content: space-between;
  }

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

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

  .screening-history-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .topbar {
    gap: 10px;
  }

  .product-title h1 {
    font-size: 17px;
  }

  .product-title p {
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .searchbar {
    gap: 8px;
  }

  .screening-form,
  .screening-result {
    padding: 12px;
  }

  .screening-summary {
    grid-template-columns: 1fr;
  }

  .usage-stats {
    grid-template-columns: 1fr;
  }

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

  .graph-legend {
    align-self: stretch;
    justify-content: space-between;
  }

  .flow-svg {
    min-width: 760px;
  }

  .data-table {
    display: none;
  }

  .mobile-card-list {
    display: grid;
    gap: 10px;
    padding: 12px;
  }

  .mobile-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
    background: #ffffff;
  }

  .mobile-card.active {
    border-color: var(--blue);
    background: #f1f7ff;
  }

  .mobile-card .row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 12px;
  }
}
