@import url("styles.css");

.page {
  align-items: flex-start;
  justify-content: center;
  padding: 32px 24px 48px;
}

.card {
  width: 100%;
  max-width: 1440px;
  background: var(--color-bg-modal);
  border-radius: var(--radius-modal);
  padding: 28px 32px 24px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

.card__header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 20px;
}

.card__title {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text-primary);
}

.btn-create {
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-field);
  background: var(--color-accent);
  color: #ffffff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
}

.btn-create:hover {
  background: var(--color-accent-hover);
}

.btn-create:active {
  transform: scale(0.99);
}

.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid #e5e7eb;
  margin-bottom: 0;
}

.tabs__item {
  position: relative;
  padding: 0 0 12px;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}

.tabs__item:hover {
  color: var(--color-text-primary);
}

.tabs__item--active {
  color: var(--color-text-primary);
  font-weight: 600;
}

.tabs__item--active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px 2px 0 0;
}

.panel {
  padding-top: 4px;
}

.panel--hidden {
  display: none !important;
}

.panel__empty {
  padding: 48px 0;
  text-align: center;
  font-size: 14px;
  color: var(--color-text-muted);
}

.table-wrap {
  margin: 0 -4px;
  padding: 0 4px;
}

.wallets-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 13px;
}

.wallets-table__th {
  padding: 14px 10px 12px;
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  white-space: nowrap;
  border-bottom: 1px solid #e5e7eb;
}


.wallets-table__th--address {
  width: 19%;
  padding-left: 4px;
}

.wallets-table__th--actions {
  width: 108px;
}

.wallets-table th:nth-child(2) { width: 9%; }
.wallets-table th:nth-child(3),
.wallets-table th:nth-child(4),
.wallets-table th:nth-child(5) { width: 12%; }
.wallets-table th:nth-child(6) { width: 9%; }
.wallets-table th:nth-child(7) { width: 14%; }

.wallets-table th.wallets-table__col--queue,
.wallets-table td.wallets-table__col--queue {
  text-align: center;
}

.th-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}

.th-sort:hover {
  color: var(--color-text-primary);
}

.th-sort__icon {
  flex-shrink: 0;
  color: var(--color-text-muted);
}

.wallets-table td {
  padding: 14px 10px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f2f5;
  overflow: hidden;
}

.wallets-table tbody tr:last-child td {
  border-bottom: none;
}

.wallets-table td:first-child {
  padding-left: 4px;
}

.address-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.address-cell__text {
  font-family: ui-monospace, "SF Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-copy {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}

.btn-copy:hover {
  color: var(--color-text-secondary);
  background: rgba(0, 0, 0, 0.04);
}

.btn-copy--copied {
  color: var(--color-accent);
}

.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 20px;
  background: #e6f8f2;
  font-size: 12px;
  font-weight: 600;
  color: #007a55;
  white-space: nowrap;
}

.balance-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.balance-cell__value {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
}

.token-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  background: #f3f4f6;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-secondary);
}

.queue-indicator {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
}

.queue-indicator--muted {
  color: var(--color-text-muted);
  font-weight: 500;
}

.queue-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.15s;
}

.queue-link:hover {
  color: var(--color-accent-hover);
  text-decoration: underline;
}

.queue-link--with-gap {
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
}

.queue-link--with-gap:hover {
  text-decoration: none;
}

.queue-link--with-gap:hover .queue-link__count {
  color: var(--color-text-primary);
}

.queue-link__count {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-secondary);
  line-height: 1.2;
}

.queue-link__gap {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 4px;
  background: #d91d0b24;
  border: 1px solid #f0112059;
  font-size: 11px;
  font-weight: 700;
  color: #d91d0b;
  line-height: 1.2;
  letter-spacing: 0.02em;
  box-shadow: 0 0 0 0 rgba(240, 17, 32, 0.35);
  animation: queue-gap-alert 1.8s ease-in-out infinite;
}

@keyframes queue-gap-alert {
  0%,
  100% {
    background: #d91d0b24;
    border-color: #f0112059;
    box-shadow: 0 0 0 0 rgba(240, 17, 32, 0.35);
  }

  50% {
    background: #d91d0b3d;
    border-color: #f01120;
    box-shadow: 0 0 0 4px rgba(240, 17, 32, 0.14);
  }
}

.queue-link--with-gap:hover .queue-link__gap {
  animation: none;
  background: #d91d0b47;
  border-color: #f01120;
  color: #b8160a;
}

.queue-link__icon {
  flex-shrink: 0;
  color: #f01120;
}

.network-cell {
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  white-space: nowrap;
}

.actions-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.btn-action {
  padding: 8px 16px;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-primary);
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.btn-action:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.btn-action:active {
  transform: scale(0.99);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding-top: 16px;
  flex-wrap: wrap;
}

.pagination__size,
.pagination__nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pagination__label,
.pagination__pages {
  font-size: 13px;
  color: var(--color-text-secondary);
  white-space: nowrap;
}

.select {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.select__input {
  appearance: none;
  padding: 6px 28px 6px 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #ffffff;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-primary);
  cursor: pointer;
  outline: none;
  transition: border-color 0.15s;
}

.select__input:hover,
.select__input:focus {
  border-color: #d1d5db;
}

.select--page .select__input {
  min-width: 52px;
  text-align: center;
  padding-left: 14px;
}

.select__chevron {
  position: absolute;
  right: 8px;
  pointer-events: none;
  color: var(--color-text-muted);
}

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

.pagination__arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: #e6f8f2;
  color: var(--color-accent);
  cursor: pointer;
  transition: background 0.15s, opacity 0.15s;
}

.pagination__arrow:hover:not(:disabled) {
  background: #ccf0e3;
}

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

@media (max-width: 900px) {
  .card {
    padding: 20px 16px 16px;
  }

  .wallets-table__th:nth-child(4),
  .wallets-table__th:nth-child(5),
  .wallets-table td:nth-child(4),
  .wallets-table td:nth-child(5) {
    display: none;
  }
}
