/* ============================================================
   VELORA — Admin & Checkout styles
   ============================================================ */

/* ─── Admin tabs ─────────────────────────────────────────── */
.admin-tabs {
  display: flex;
  gap: .5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
  overflow-x: auto;
}

.admin-tab {
  padding: .75rem 1.25rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text2);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: color .2s, border-color .2s;
}

.admin-tab:hover { color: var(--primary); }
.admin-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ─── Admin panels ───────────────────────────────────────── */
.admin-panel { display: none; }
.admin-panel.active { display: block; }

/* ─── Stat cards ─────────────────────────────────────────── */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.admin-stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.admin-stat-card .stat-icon {
  font-size: 1.5rem;
  margin-bottom: .25rem;
}

.admin-stat-card .stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--text1);
  line-height: 1;
}

.admin-stat-card .stat-label {
  font-size: .8rem;
  color: var(--text3);
  font-weight: 500;
}

.admin-stat-card.accent { border-color: var(--primary); }
.admin-stat-card.accent .stat-value { color: var(--primary); }

/* ─── Admin table ────────────────────────────────────────── */
.admin-table-wrap {
  overflow-x: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}

.admin-table th {
  background: var(--bg2);
  padding: .85rem 1rem;
  text-align: left;
  font-size: .78rem;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

.admin-table td {
  padding: .9rem 1rem;
  color: var(--text1);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.admin-table tr:last-child td { border-bottom: none; }
.admin-table tr:hover td { background: var(--bg2); }

.admin-table .user-cell {
  display: flex;
  align-items: center;
  gap: .6rem;
}

.admin-table .user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
  color: #fff;
  flex-shrink: 0;
}

.admin-table .user-name { font-weight: 600; }
.admin-table .user-sub  { font-size: .78rem; color: var(--text3); }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .55rem;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.badge-green  { background: rgba(34,197,94,.15);  color: #22c55e; }
.badge-yellow { background: rgba(234,179,8,.15);  color: #eab308; }
.badge-red    { background: rgba(239,68,68,.15);  color: #ef4444; }
.badge-blue   { background: rgba(99,102,241,.15); color: #6366f1; }
.badge-gray   { background: var(--bg2);           color: var(--text3); }

/* ─── Action buttons ─────────────────────────────────────── */
.action-btns { display: flex; gap: .4rem; flex-wrap: wrap; }

.btn-approve {
  padding: .3rem .75rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: rgba(34,197,94,.15);
  color: #22c55e;
  transition: background .2s;
}
.btn-approve:hover { background: rgba(34,197,94,.3); }

.btn-reject {
  padding: .3rem .75rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: rgba(239,68,68,.12);
  color: #ef4444;
  transition: background .2s;
}
.btn-reject:hover { background: rgba(239,68,68,.25); }

.btn-warn {
  padding: .3rem .75rem;
  border-radius: 8px;
  font-size: .78rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  background: rgba(234,179,8,.15);
  color: #ca8a04;
  transition: background .2s;
}
.btn-warn:hover { background: rgba(234,179,8,.3); }

/* ─── Admin search bar ───────────────────────────────────── */
.admin-search {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.admin-search input {
  flex: 1;
  min-width: 200px;
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text1);
  font-size: .9rem;
}

.admin-search select {
  padding: .65rem 1rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg2);
  color: var(--text1);
  font-size: .9rem;
  cursor: pointer;
}

/* ─── Empty state ────────────────────────────────────────── */
.admin-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text3);
}
.admin-empty .admin-empty-icon { font-size: 2.5rem; margin-bottom: .5rem; }
.admin-empty p { margin: 0; font-size: .95rem; }

/* ─── Checkout page ──────────────────────────────────────── */
.checkout-page {
  min-height: 100vh;
  background: var(--bg);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}

.checkout-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
}

.checkout-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 1rem;
}

.checkout-creator-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.checkout-creator-name { font-size: 1.1rem; font-weight: 700; color: var(--text1); }
.checkout-creator-sub  { font-size: .82rem; color: var(--text3); margin-top: .1rem; }

.checkout-body { padding: 2rem; }

.checkout-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.25rem;
  background: var(--bg2);
  border-radius: 12px;
  margin-bottom: 1.5rem;
}

.checkout-price-label { font-size: .9rem; color: var(--text2); }
.checkout-price-value { font-size: 1.5rem; font-weight: 800; color: var(--primary); }

.checkout-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  margin-bottom: 1.5rem;
}

.checkout-method {
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
  background: none;
  color: var(--text1);
}

.checkout-method:hover { border-color: var(--primary); background: var(--bg2); }
.checkout-method.selected { border-color: var(--primary); background: rgba(var(--primary-rgb),.08); }

.checkout-method .method-icon { font-size: 1.6rem; margin-bottom: .35rem; }
.checkout-method .method-name { font-size: .82rem; font-weight: 700; }

/* PIX panel */
.pix-panel { display: none; }
.pix-panel.visible { display: block; }

.pix-qr {
  width: 160px;
  height: 160px;
  background: #fff;
  border-radius: 12px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,.12);
}

.pix-qr svg { width: 100%; height: 100%; }

.pix-code-label { font-size: .8rem; color: var(--text3); margin-bottom: .4rem; }

.pix-code-box {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .6rem .85rem;
  margin-bottom: 1.25rem;
}

.pix-code-text {
  flex: 1;
  font-size: .72rem;
  color: var(--text2);
  word-break: break-all;
  font-family: monospace;
}

.btn-copy {
  padding: .35rem .65rem;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text1);
  font-size: .75rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s;
}
.btn-copy:hover { background: var(--bg2); }

/* Card panel */
.card-panel { display: none; }
.card-panel.visible { display: block; }

.card-number-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

/* Checkout steps */
.checkout-step { display: none; }
.checkout-step.active { display: block; }
.checkout-back { margin-bottom: .75rem; }

.checkout-success {
  text-align: center;
  padding: 1.5rem 0;
}
.checkout-success .success-icon { font-size: 3rem; margin-bottom: .75rem; }
.checkout-success h3 { font-size: 1.25rem; font-weight: 800; color: var(--text1); margin: 0 0 .5rem; }
.checkout-success p  { color: var(--text3); font-size: .9rem; margin: 0 0 1.5rem; }

/* ─── Report modal ───────────────────────────────────────── */
.report-reason-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  margin-bottom: 1rem;
}

.report-reason-btn {
  padding: .6rem .75rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: none;
  color: var(--text1);
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: border-color .2s, background .2s;
}
.report-reason-btn:hover    { border-color: var(--primary); background: var(--bg2); }
.report-reason-btn.selected { border-color: var(--primary); background: rgba(var(--primary-rgb),.08); }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 640px) {
  .admin-stats { grid-template-columns: repeat(2, 1fr); }
  .checkout-methods { grid-template-columns: 1fr 1fr; }
  .checkout-body { padding: 1.5rem; }
}
