/* =========================================================
   CredShields — Recently Audited (page-specific)
   Shared styles → page-components.css + penetration-testing.css
   ========================================================= */

/* Tab bar */
.ra-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 32px;
  flex-wrap: wrap;
}

.ra-tab-btn {
  padding: 10px 24px;
  border: 1px solid var(--border);
  border-radius: 40px;
  background: transparent;
  color: var(--fg-2);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 150ms, color 150ms, border-color 150ms;
}

.ra-tab-btn:hover,
.ra-tab-btn.active {
  background: var(--lime);
  border-color: var(--lime);
  color: #000;
}

/* Tab panels */
.ra-tab-panel { display: none; }
.ra-tab-panel.active { display: block; }

/* Pagination */
.ra-pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
  flex-wrap: wrap;
}

.ra-pagination button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
  transition: background 150ms;
}

.ra-pagination button:hover { background: var(--bg-surface); }

#pages { display: flex; gap: 4px; }

/* KYC table rows */
.ra-kyc-list {
  display: flex;
  flex-direction: column;
}

.ra-kyc-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.ra-kyc-identity {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ra-kyc-logo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: contain;
}

.ra-kyc-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--fg);
}

.ra-kyc-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ra-kyc-url a {
  font-size: 13px;
  color: var(--lime);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
}

.ra-kyc-url a:hover { text-decoration: underline; }

.ra-kyc-date {
  font-size: 12px;
  color: var(--fg-3);
}

.ra-kyc-action a {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: color 150ms;
}

.ra-kyc-action a:hover { color: var(--lime); }

@media (max-width: 700px) {
  .ra-kyc-row { grid-template-columns: 1fr; gap: 8px; padding: 16px 0; }
}

/* ── Audit cards (loaded by audits.js) ─────────────────── */
.audit-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  border-radius: var(--r-lg);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(195deg, #0D1A12 6%, #08110C 24%, #030B06 56%, #030B06 74%);
}

.audit-card:hover {
  background-image: linear-gradient(#000, #18181b80),
    linear-gradient(162deg, #78FF04 1%, rgba(102,102,102,0) 36%);
  background-origin: border-box;
  background-clip: content-box, border-box;
}

.audit-card > div:first-child {
  display: flex;
  width: 100%;
  padding: 1rem;
}

.audit-card p { white-space: nowrap; }

.audit_logo {
  width: 49px;
  height: 49px;
  min-width: 49px;
  min-height: 49px;
  background: #2e2e2e;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.audit_logo > img { width: 100%; }

.audit-name-detail {
  display: flex;
  align-items: center;
}

.audit-name-detail p {
  font-size: 18px;
  font-weight: 500;
  color: #fff;
  margin-left: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-name-stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.audit-name-stack .audit-type {
  font-size: 16px;
  font-weight: 400;
  color: #c5c5c5;
}

.audit-details {
  display: flex;
  margin-left: auto;
  justify-content: space-between;
  width: 400px;
}

.audit-detail p {
  font-size: 18px;
  font-weight: 400;
}

.audit-detail > p:first-child {
  font-size: 14px;
  font-weight: 500;
  line-height: 29px;
  color: #8a94a6;
}

.audit-vulnerability {
  padding: 1rem 1rem 1rem 5rem;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.audit-vulnerability > div {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.audit-vulnerability > div > div {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.divider {
  background: #333;
  width: 100%;
  height: 1px;
  margin-bottom: 1rem;
}

.vuln > p {
  color: #8a94a6;
  font-size: 14px;
  font-weight: 500;
  line-height: 29px;
}

.vuln > div {
  display: flex;
  align-items: center;
}

.vuln > div > div {
  width: 3px;
  height: 15px;
}

.vuln > div > p {
  font-size: 16px;
  font-weight: 600;
  margin-left: 0.3rem;
}

.critical-count > div { background-color: #960d00; }
.high-count > div { background-color: #ff5630; }
.medium-count > div { background-color: #ffe600; }
.low-count > div { background-color: #38cb89; }
.infor-count > div { background-color: #a3aebe; }
.gas-count > div { background-color: #f795b4; }

.audit-link {
  display: flex;
  background: #060606;
  color: #99eed5;
  margin-left: auto;
  align-items: center;
  justify-content: center;
  width: 227px;
  height: 40px;
  border-radius: 10px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: background 150ms, color 150ms;
}

.audit-link:hover,
.audit-card:hover .audit-link {
  background: var(--lime);
  color: #000;
}

.audit-link .arrow-icon {
  width: 14px;
  height: 14px;
  margin-left: 6px;
  transition: filter 150ms;
}

.audit-card:hover .audit-link .arrow-icon {
  filter: brightness(0);
}

.audit-mask {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: transparent;
  transition: background 0.3s;
}

.audit-card:hover .audit-mask {
  background: linear-gradient(90deg, #acf0c6, #78FF04);
}

/* Pagination page buttons */
.pagination_page {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--fg-2);
  font-size: 14px;
  cursor: pointer;
  transition: background 150ms, color 150ms;
}

.pagination_page.active,
.pagination_page:hover {
  background: var(--lime);
  color: #000;
  border-color: var(--lime);
}

@media (max-width: 900px) {
  .audit-card > div:first-child { flex-direction: column; gap: 1rem; }
  .audit-details { width: 100%; }
  .audit-vulnerability { padding-left: 1rem; }
  .audit-vulnerability > div { flex-wrap: wrap; gap: 1rem; }
}

@media (max-width: 600px) {
  .audit-details { flex-direction: column; gap: 0.5rem; }
  .audit-link { width: 100%; }
}
