/* ============================================================
   reportes.css - Centro de Reportes
   ============================================================ */

.rep-root { padding: 0; }

/* Hero */
.rep-hero {
  background: linear-gradient(135deg, #042e22, #084734 50%, #0d6b4f);
  color: #fff; border-radius: 12px; padding: 1.5rem 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: 1.5rem;
}
.rep-hero__info { display: flex; align-items: center; gap: 1rem; }
.rep-hero__icon { font-size: 2rem; opacity: .85; }
.rep-hero__title { font-size: 1.35rem; font-weight: 700; }
.rep-hero__sub { font-size: .85rem; opacity: .8; margin-top: .15rem; }
.rep-hero__actions { display: flex; gap: .5rem; }
.rep-hero-btn {
  background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.3);
  color: #fff; padding: .55rem 1rem; border-radius: 8px; cursor: pointer;
  font-size: .82rem; display: flex; align-items: center; gap: .4rem;
  transition: background .2s;
}
.rep-hero-btn:hover { background: rgba(255,255,255,.3); }

/* Section titles */
.rep-section { margin-bottom: 1.5rem; }
.rep-section__title {
  font-size: 1rem; font-weight: 700; color: var(--brand-text);
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: .75rem;
}
.rep-section__title i { color: var(--brand-primary); }

/* KPI row */
.rep-kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: .75rem; margin-bottom: 1.5rem;
}
.rep-kpi {
  background: var(--brand-surface); border-radius: 8px;
  padding: 1rem; display: flex; align-items: center; gap: .75rem;
  border: 1px solid var(--brand-border);
  transition: transform .15s, box-shadow .15s;
}
.rep-kpi:hover { transform: translateY(-2px); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
.rep-kpi-icon {
  width: 42px; height: 42px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0;
}
.rep-kpi-icon--ventas { background: #dbeafe; color: #2563eb; }
.rep-kpi-icon--ok { background: #dcfce7; color: #16a34a; }
.rep-kpi-icon--warn { background: #fef9c3; color: #ca8a04; }
.rep-kpi-icon--danger { background: #fee2e2; color: #dc2626; }
.rep-kpi-icon--accent { background: #ede9fe; color: #7c3aed; }
.rep-kpi-icon--sky { background: #e0f2fe; color: #0284c7; }
.rep-kpi-data { display: flex; flex-direction: column; }
.rep-kpi-val { font-size: 1.2rem; font-weight: 800; color: var(--brand-text); }
.rep-kpi-lbl { font-size: .72rem; color: #4b5563; text-transform: uppercase; letter-spacing: .4px; font-weight: 600; }

/* Charts row */
.rep-charts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1rem; margin-bottom: 1.5rem;
}
.rep-chart-card {
  background: var(--brand-surface); border-radius: 12px;
  padding: 1.25rem; border: 1px solid var(--brand-border);
}
.rep-chart-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
}
.rep-chart-title { font-size: .9rem; font-weight: 700; color: var(--brand-text); }
.rep-chart-wrap { position: relative; height: 260px; }

/* Quick links grid */
.rep-links {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: .75rem;
}
.rep-link-card {
  background: var(--brand-surface); border: 1px solid var(--brand-border);
  border-radius: 12px; padding: 1.15rem;
  display: flex; align-items: flex-start; gap: .85rem;
  cursor: pointer; transition: all .15s;
  text-decoration: none;
}
.rep-link-card:hover { border-color: var(--brand-primary); box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.rep-link-icon {
  width: 44px; height: 44px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.rep-link-body { flex: 1; }
.rep-link-title { font-size: .88rem; font-weight: 700; color: var(--brand-text); margin-bottom: .2rem; }
.rep-link-desc { font-size: .75rem; color: var(--brand-text-muted); line-height: 1.35; }

/* Progress bar */
.rep-progress-wrap { margin-top: .35rem; }
.rep-progress-bar {
  height: 6px; background: var(--brand-border); border-radius: 3px; overflow: hidden;
}
.rep-progress-fill {
  height: 100%; border-radius: 3px; transition: width .6s ease;
}
.rep-progress-label {
  display: flex; justify-content: space-between; margin-top: .25rem;
  font-size: .7rem; color: var(--brand-text-muted);
}

/* Mini table for pedidos */
.rep-mini-tbl { width: 100%; border-collapse: collapse; }
.rep-mini-tbl th {
  font-size: .7rem; text-transform: uppercase; letter-spacing: .5px;
  color: var(--brand-text-muted); border-bottom: 1px solid var(--brand-border);
  padding: .35rem .5rem; text-align: left;
}
.rep-mini-tbl td { padding: .4rem .5rem; font-size: .82rem; color: var(--brand-text); border-bottom: 1px solid var(--border-light, #f3f4f6); }

/* Responsive */
@media (max-width:768px) {
  .rep-hero { flex-direction: column; text-align: center; padding: 1rem; }
  .rep-hero__info { flex-direction: column; }
  .rep-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .rep-charts { grid-template-columns: 1fr; }
  .rep-links { grid-template-columns: 1fr; }
  .rep-hero__actions { flex-wrap: wrap; justify-content: center; }
}
@media (max-width:480px) {
  .rep-kpi-grid { grid-template-columns: 1fr; }
}

/* Skeleton */
.rep-sk-bar { height: 14px; background: var(--brand-border); border-radius: 4px; margin-bottom: .6rem; animation: sk-pulse 1.2s infinite; }
.rep-sk-bar--lg { width: 60%; height: 20px; margin-bottom: 1rem; }
.rep-sk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(195px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.rep-sk-card { height: 72px; background: var(--brand-border); border-radius: 8px; animation: sk-pulse 1.2s infinite; }
@keyframes sk-pulse { 0%,100%{opacity:.5} 50%{opacity:1} }
