/* Scoped only to crypto grid tables */
.cgl-table-wrap {
  width: 100%;
  overflow-x: auto; /* horizontal scroll on small screens */
}

/* Table reset */
.cgl-table-wrap .cgl-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: var(--global-palette9);
}

/* Table head */
.cgl-table-wrap .cgl-table thead th {
  font-weight: 600;
  background: var(--global-palette9);
  color: var(--global-palette3);
  font-size: 14px;
  text-align: left;
  border-bottom: 2px solid var(--global-palette7);
  padding: 12px;
  white-space: nowrap;
}

/* Table body */
.cgl-table-wrap .cgl-table td {
  padding: 5px 8px;
  border-bottom: 1px solid var(--global-palette7);
  vertical-align: middle;
}

.cgl-table-wrap .cgl-table tbody tr:hover {
  background: var(--global-palette7);
}

/* Column sizing */
.cgl-table-wrap .cgl-table th:first-child,
.cgl-table-wrap .cgl-table td:first-child {
  width: 56px;
  color: #6b7280;
}

.cgl-table-wrap .cgl-table th:nth-child(3),
.cgl-table-wrap .cgl-table td:nth-child(3) {
  width: 220px;
  text-align: right;
}

/* Name cell */
.cgl-table-wrap .cgl-name-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cgl-table-wrap .cgl-name-wrap .img-thumbnail {
  width: var(--logo-size, 20px);
  height: var(--logo-size, 20px);
  border-radius: 50%;
  object-fit: cover;
}

.cgl-table-wrap .cgl-symbol {
  color: #6b7280;
  margin-left: 4px;
  font-size: 12px;
}

/* Helpers (scoped) */
.cgl-table-wrap .text-right { text-align: right; }
.cgl-table-wrap .pl-2 { padding-left: 8px; }

/* Empty state */
.cgl-table-wrap .cgl-table__empty {
  padding: 8px 0;
  color: #6b7280;
}

/* Responsive: enforce scroll on small viewports */
.cgl-table-wrap .cgl-table {
  min-width: 480px; /* triggers scroll on narrow screens */
}

/* Card container (HTML+CSS replacement for Tailwind) */
.cgl-card {
  max-width: 85rem;
  margin: 0 auto;
/*   padding: 40px 16px; px-4 py-10 */
}

.cgl-card__header {
  background: var(--global-palette9);
  border: 1px solid var(--global-palette7); /* gray-200 */
  border-radius: 12px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  margin-bottom: 16px;
  padding: 16px 24px;
}

.cgl-card__title {
  margin: 0 0 4px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937; /* gray-800 */
}

.cgl-card__subtitle {
  margin: 0;
  font-size: 13px;
  color: #4b5563; /* gray-600 */
}

/* Expanded table columns for the new structure */
.cgl-table-wrap .cgl-table thead th:nth-child(1),
.cgl-table-wrap .cgl-table tbody td:nth-child(1) { width: 56px; color: #6b7280; }

.cgl-table-wrap .cgl-table thead th:nth-child(2),
.cgl-table-wrap .cgl-table tbody td:nth-child(2) { min-width: 240px; }

.cgl-table-wrap .cgl-table thead th:nth-child(3),
.cgl-table-wrap .cgl-table tbody td:nth-child(3) { width: 140px; text-align: left; }

.cgl-table-wrap .cgl-table thead th:nth-child(4),
.cgl-table-wrap .cgl-table tbody td:nth-child(4),
.cgl-table-wrap .cgl-table thead th:nth-child(5),
.cgl-table-wrap .cgl-table tbody td:nth-child(5),
.cgl-table-wrap .cgl-table thead th:nth-child(6),
.cgl-table-wrap .cgl-table tbody td:nth-child(6) { width: 90px; }

.cgl-table-wrap .cgl-table thead th:nth-child(7),
.cgl-table-wrap .cgl-table tbody td:nth-child(7) { width: 170px; text-align: left; }

.cgl-table-wrap .cgl-table thead th:nth-child(8),
.cgl-table-wrap .cgl-table tbody td:nth-child(8) { width: 170px; text-align: left; }

.cgl-table-wrap .cgl-table thead th:nth-child(9),
.cgl-table-wrap .cgl-table tbody td:nth-child(9) { width: 140px; }

.cgl-name { font-weight: 600; font-size: 14px; color: var(--global-palette3); }

.cgl-price, .cgl-vol, .cgl-cap { color: var(--global-palette3); font-size: 14px; }

.cgl-change { font-size: 13px; font-weight: 600; }
.cgl-up { color: #22C55E; }
.cgl-down { color: #B91C1C; }

.cgl-spark-wrap { display: inline-block; }
.cgl-spark { display: block; height:30px; }