
/*************************************************************
 * BIENVENIDA
 *************************************************************/
.welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}
.welcome-bar h1 {
  font-size: 1.55rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}
.welcome-sub {
  font-size: 0.9rem;
  color: #64748b;
  margin: 3px 0 0;
}
.fecha-hoy {
  font-size: 0.82rem;
  color: #94a3b8;
  background: #f1f5f9;
  border-radius: 20px;
  padding: 4px 14px;
  white-space: nowrap;
}

/*************************************************************
 * BANNER HERO
 *************************************************************/
.hero-banner {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #ff7a00 0%, #1f6feb 55%, #00a389 100%);
  border-radius: 16px;
  padding: 28px 32px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: #fff;
  box-shadow: 0 6px 24px rgba(41,92,186,.28);
}
.hero-texto h2 {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 0 0 4px;
  letter-spacing: -.01em;
}
.hero-texto p {
  font-size: 0.85rem;
  opacity: .82;
  margin: 0;
  max-width: 340px;
}
.hero-badge {
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 10px;
  padding: 8px 16px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  backdrop-filter: blur(4px);
}
/* ── Variante rojo oscuro (estilo login) ── */
.hero-banner--rojo {
  background:
    radial-gradient(ellipse at 25% 60%, #7a0a0a 0%, #3d0000 45%, #0d0000 100%);
  margin-top: 12px;
}
.hero-banner--rojo .hero-badge {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.20);
}

/* Círculos decorativos */
.hero-banner::before,
.hero-banner::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
  pointer-events: none;
}
.hero-banner::before {
  width: 260px; height: 260px;
  right: -60px; top: -80px;
}
.hero-banner::after {
  width: 160px; height: 160px;
  right: 120px; bottom: -80px;
  background: rgba(255,255,255,.05);
}

/*************************************************************
 * KPI CARDS
 *************************************************************/
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
@media (max-width: 900px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}
.kpi-card {
  background: linear-gradient(135deg, var(--kpi-a), var(--kpi-b));
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #fff;
  box-shadow: 0 3px 12px rgba(0,0,0,.10);
  transition: transform .15s, box-shadow .15s;
}
.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.15);
}
.kpi-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.kpi-icon {
  font-size: 1.65rem;
  line-height: 1;
  flex-shrink: 0;
}
.kpi-info { display: flex; flex-direction: column; }
.kpi-num  { font-size: 1.85rem; font-weight: 800; line-height: 1; }
.kpi-label { font-size: 0.76rem; opacity: .88; margin-top: 2px; font-weight: 500; }

.kpi-breakdown {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-top: 1px solid rgba(255,255,255,.18);
  padding-top: 8px;
}
.kpi-breakdown span {
  background: rgba(255,255,255,.15);
  border-radius: 20px;
  padding: 2px 9px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.kpi-breakdown span em {
  font-style: normal;
  font-weight: 400;
  opacity: .85;
}

/*************************************************************
 * GRID PRINCIPAL
 *************************************************************/
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
}
.panel {
  background: #ffffff;
  border-radius: 14px;
  padding: 20px 22px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  border: 1px solid #f1f5f9;
}
.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}
.panel-header h3 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
}
.link-ver-todas {
  font-size: 0.8rem;
  color: #295CBA;
  text-decoration: none;
  font-weight: 600;
}
.link-ver-todas:hover { text-decoration: underline; }

/*************************************************************
 * TABLA RECIENTES
 *************************************************************/
.panel-body-table { overflow-x: auto; }
.tabla-recientes {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.tabla-recientes th {
  text-align: left;
  padding: 7px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
  border-bottom: 1px solid #f1f5f9;
}
.tabla-recientes td {
  padding: 10px 10px;
  color: #334155;
  border-bottom: 1px solid #f8fafc;
  vertical-align: middle;
}
.tabla-recientes tr:last-child td { border-bottom: none; }
.tabla-recientes tr:hover td { background: #f8fafc; }

/* Chips de tipo */
.tipo-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.tipo-pedido   { background: #eff4ff; color: #295CBA; }
.tipo-traslado { background: #e0f2fe; color: #1D8FCE; }
.tipo-compra   { background: #e8f4fb; color: #007EA0; }
.tipo-merma    { background: #fef2f2; color: #CD2429; }
.tipo-otro     { background: #f1f5f9; color: #475569; }

/* Chips de estado */
.estado-chip {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}
.est-pendiente  { background: #fef9c3; color: #854d0e; }
.est-autorizado { background: #dcfce7; color: #166534; }
.est-enviado    { background: #dbeafe; color: #1e40af; }
.est-rechazado  { background: #fee2e2; color: #CD2429; }
.est-devuelto   { background: #ffedd5; color: #9a3412; }
.est-borrador   { background: #f1f5f9; color: #475569; }

/*************************************************************
 * ACCIONES RÁPIDAS
 *************************************************************/
.panel-acciones {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.acciones-grupo-titulo {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin: 6px 0 2px;
}
.accion-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 16px;
  background: var(--ac);
  color: #fff;
  border-radius: 10px;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 600;
  transition: filter .15s, transform .1s, box-shadow .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.10);
}
.accion-btn:hover {
  filter: brightness(1.12);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0,0,0,.15);
}
.accion-btn:active { transform: translateY(0); }
