/* ─── admin.css v13 — Painel Administrativo ──────────────────────────────── */

.admin-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* ─── Cabeçalho ──────────────────────────────────────────────────────────── */
.admin-header {
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #333;
  padding-bottom: 16px;
}
.admin-header h1 {
  margin: 0;
  font-size: 22px;
  color: #eee;
}
.admin-badge {
  background: linear-gradient(135deg, #1a0a2e, #2d1060);
  color: #c084fc;
  border: 1px solid #7c3aed;
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
}

/* ─── Cards de contagem ───────────────────────────────────────────────────── */
.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}
.stat-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 12px;
  padding: 18px 16px;
  text-align: center;
}
.stat-card .stat-value {
  font-size: 32px;
  font-weight: 700;
  line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 12px;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-card.free    { border-color: #444; }
.stat-card.free    .stat-value { color: #aaa; }
.stat-card.vip     { border-color: #b8860b; }
.stat-card.vip     .stat-value { color: #FFD700; }
.stat-card.partner { border-color: #7B3FBE; }
.stat-card.partner .stat-value { color: #bf80ff; }
.stat-card.admin   { border-color: #7c3aed; }
.stat-card.admin   .stat-value { color: #c084fc; }
.stat-card.banned  { border-color: #cc0000; }
.stat-card.banned  .stat-value { color: #ff6b6b; }
.stat-card.shops   { border-color: #1a6b3a; }
.stat-card.shops   .stat-value { color: #4ade80; }

/* ─── Seções ──────────────────────────────────────────────────────────────── */
.admin-section {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 14px;
  padding: 24px;
}
.admin-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #ccc;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  padding: 4px 0;
  transition: color .15s;
}
.admin-section-title:hover { color: #fff; }
.admin-section-title .acc-arrow {
  margin-left: auto;
  font-size: 13px;
  color: #555;
  transition: transform .25s, color .15s;
  flex-shrink: 0;
}
.admin-section.collapsed .acc-arrow { transform: rotate(-90deg); }
.admin-section-title:hover .acc-arrow { color: #888; }

/* corpo colapsável */
.admin-section-body {
  overflow: hidden;
  max-height: 9000px;
  transition: max-height .35s ease, opacity .25s ease, margin-top .25s ease;
  opacity: 1;
  margin-top: 18px;
}
.admin-section.collapsed .admin-section-body {
  max-height: 0;
  opacity: 0;
  margin-top: 0;
}
.admin-section-title .count-badge {
  background: #2a2a2a;
  color: #888;
  border-radius: 20px;
  padding: 1px 10px;
  font-size: 12px;
  font-weight: 600;
}

/* ─── Tabelas ─────────────────────────────────────────────────────────────── */
.admin-table-wrap {
  overflow-x: auto;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.admin-table th {
  text-align: left;
  padding: 8px 12px;
  color: #666;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #2a2a2a;
}
.admin-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #252525;
  color: #ccc;
  vertical-align: middle;
}
.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: #232323; }

.td-nick  { color: #eee; font-weight: 600; }
.td-gold  { color: #FFD700; font-weight: 700; }
.td-ok    { color: #4ade80; }
.td-warn  { color: #f97316; }
.td-red   { color: #ff6b6b; }
.td-muted { color: #666; font-size: 12px; }
.td-wallet { font-family: monospace; font-size: 11px; color: #666; }

/* ─── Loading / vazio ─────────────────────────────────────────────────────── */
.admin-loading {
  text-align: center;
  padding: 40px;
  color: #555;
}
.admin-empty {
  text-align: center;
  padding: 24px;
  color: #555;
  font-size: 13px;
}

/* --- Totais financeiros (Historico de Assinaturas) --- */
.admin-totals-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.admin-total-card {
  background: #1a1a2e;
  border: 1px solid #2a2a3e;
  border-radius: 8px;
  padding: 14px 20px;
  min-width: 160px;
  text-align: center;
}
.admin-total-val {
  font-size: 22px;
  font-weight: 700;
  color: #FFD700;
  line-height: 1.2;
  text-align: center;
}
.admin-total-label {
  font-size: 12px;
  color: #888;
  margin-top: 4px;
  text-align: center;
}

/* totals card variants */
.admin-total-card--commission .admin-total-val { color: #a78bfa; }
.admin-total-card--net  .admin-total-val { color: #4ade80; }
.admin-total-card--each .admin-total-val { color: #38bdf8; }
.admin-total-card--asaas .admin-total-val { color: #f97316; }

/* Subtitle entre grupos de cards (USDC / PIX) */
.admin-totals-subtitle {
  font-size: 12px;
  font-weight: 700;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 8px 0 10px;
  text-align: center;
}

.admin-totals-note { font-size:11px; color:#444; margin:4px 0 0; text-align:center; }

/* Bloco financeiro solto (fora das seções accordion) */
.admin-financials {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* tx_hash link — clicavel, abre Ronin explorer */
a.td-tx-link {
  color: #FFD700;
  text-decoration: underline dotted rgba(255,215,0,0.5);
  cursor: pointer;
}
a.td-tx-link:hover { text-decoration: underline; opacity: 0.85; }

/* ─── Tickets ──────────────────────────────────────────────────────────────── */
.tk-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.tk-open   { background: #0f3d20; color: #4ade80; border: 1px solid #166534; }
.tk-closed { background: #1e1e2e; color: #666;    border: 1px solid #333; }
.tk-transcript-btn {
  padding: 3px 10px;
  background: #1a2a4a;
  border: 1px solid #2a4a7a;
  border-radius: 5px;
  color: #60a5fa;
  font-size: 12px;
  cursor: pointer;
  transition: background .15s;
}
.tk-transcript-btn:hover { background: #1e3a6e; }

/* ─── Abas (tabs) dentro de seções ───────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  border-bottom: 1px solid #2a2a3e;
  padding-bottom: 0;
}
.admin-tab {
  padding: 7px 18px;
  background: transparent;
  border: 1px solid transparent;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  color: #666;
  font-size: 13px;
  cursor: pointer;
  transition: color .15s, background .15s;
  white-space: nowrap;
  position: relative;
  bottom: -1px;
}
.admin-tab:hover { color: #aaa; background: #1a1a2e; }
.admin-tab.active {
  color: #e0e0e0;
  background: #1a1a2e;
  border-color: #2a2a3e;
  border-bottom-color: #1a1a2e;
}
.admin-tab-panel { padding-top: 4px; }
