/* ===== ADMIN HOME DASHBOARD ===== */

.admin-home {
  padding: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.admin-home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.admin-home-header h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
  display: flex;
  align-items: center;
  gap: 10px;
}

.admin-home-header h2 i {
  color: #a78bfa;
}

.admin-home-greeting {
  font-size: 0.85rem;
  color: var(--text-secondary, #94a3b8);
}

/* ===== METRIC CARDS ROW ===== */

.ah-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.ah-metric-card {
  background: rgba(30, 32, 50, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.ah-metric-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.15);
}

.ah-metric-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.ah-metric-icon.purple { background: rgba(139,92,246,0.15); color: #a78bfa; }
.ah-metric-icon.blue   { background: rgba(59,130,246,0.15); color: #60a5fa; }
.ah-metric-icon.green  { background: rgba(34,197,94,0.15);  color: #4ade80; }
.ah-metric-icon.red    { background: rgba(239,68,68,0.12);  color: #f87171; }
.ah-metric-icon.amber  { background: rgba(245,158,11,0.15); color: #fbbf24; }
.ah-metric-icon.cyan   { background: rgba(6,182,212,0.15);  color: #22d3ee; }
.ah-metric-icon.indigo { background: rgba(99,102,241,0.15); color: #818cf8; }

.ah-metric-info h4 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text-primary, #e2e8f0);
  margin: 0;
  line-height: 1;
}

.ah-metric-info p {
  font-size: 0.78rem;
  color: var(--text-secondary, #94a3b8);
  margin: 4px 0 0;
}

/* ===== CHARTS GRID ===== */

.ah-charts-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 28px;
}

.ah-chart-card {
  background: rgba(30, 32, 50, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 14px;
  padding: 24px;
  transition: box-shadow 0.2s;
}

.ah-chart-card:hover {
  box-shadow: 0 8px 24px rgba(139, 92, 246, 0.1);
}

.ah-chart-card h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ah-chart-card h3 i {
  color: #a78bfa;
  font-size: 0.9rem;
}

.ah-chart-wrapper {
  position: relative;
  width: 100%;
  max-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ah-chart-wrapper canvas {
  max-height: 260px;
}

/* ===== RECENT USERS TABLE ===== */

.ah-recent-section {
  background: rgba(30, 32, 50, 0.7);
  border: 1px solid rgba(139, 92, 246, 0.12);
  border-radius: 14px;
  overflow: hidden;
}

.ah-recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.08);
}

.ah-recent-header h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary, #e2e8f0);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.ah-recent-header h3 i {
  color: #a78bfa;
}

.ah-recent-header a {
  font-size: 0.82rem;
  color: #a78bfa;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s;
}

.ah-recent-header a:hover {
  color: #c4b5fd;
}

.ah-recent-table {
  width: 100%;
  border-collapse: collapse;
}

.ah-recent-table th {
  padding: 10px 16px;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--text-secondary, #94a3b8);
  text-align: left;
  background: rgba(15, 17, 30, 0.3);
}

.ah-recent-table td {
  padding: 12px 16px;
  font-size: 0.85rem;
  color: var(--text-primary, #e2e8f0);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.ah-recent-table tr:hover td {
  background: rgba(139, 92, 246, 0.04);
}

/* ===== MERCADO PAGO STATUS ROW ===== */

.ah-status-row {
  display: flex;
  gap: 14px;
  margin-bottom: 28px;
}

.ah-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
}

.ah-status-badge.configured {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
}

.ah-status-badge.not-configured {
  background: rgba(245, 158, 11, 0.15);
  color: #fbbf24;
}

/* ===== LIGHT MODE ===== */

[data-theme="light"] .ah-metric-card,
[data-theme="light"] .ah-chart-card,
[data-theme="light"] .ah-recent-section {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .ah-metric-card:hover,
[data-theme="light"] .ah-chart-card:hover {
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.12);
}

[data-theme="light"] .ah-metric-info h4,
[data-theme="light"] .ah-chart-card h3,
[data-theme="light"] .ah-recent-header h3 {
  color: #1e293b;
}

[data-theme="light"] .ah-metric-info p {
  color: #64748b;
}

[data-theme="light"] .ah-recent-table th {
  background: #f1f5f9;
  color: #475569;
}

[data-theme="light"] .ah-recent-table td {
  color: #334155;
  border-bottom: 1px solid #f1f5f9;
}

[data-theme="light"] .ah-recent-table tr:hover td {
  background: #f8fafc;
}

[data-theme="light"] .ah-recent-header {
  border-bottom-color: #e2e8f0;
}

[data-theme="light"] .admin-home-header h2 {
  color: #1e293b;
}

[data-theme="light"] .admin-home-greeting {
  color: #64748b;
}

[data-theme="light"] .ah-status-badge.configured {
  background: #dcfce7;
  color: #166534;
}

[data-theme="light"] .ah-status-badge.not-configured {
  background: #fef3c7;
  color: #b45309;
}

/* ===== RESPONSIVO ===== */

@media (max-width: 968px) {
  .ah-charts-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .ah-metrics {
    grid-template-columns: 1fr 1fr;
  }
  
  .ah-recent-table th:nth-child(n+3),
  .ah-recent-table td:nth-child(n+3) {
    display: none;
  }
}

@media (max-width: 480px) {
  .ah-metrics {
    grid-template-columns: 1fr;
  }
}
