/* Layout general */
.container{
  max-width: 1220px;
  margin: 18px auto 44px;
  padding: 0 16px;
}

#msg{ margin-top: 10px; }

/* Pills */
.pill{
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(37,99,235,.10);
  color: #1e3a8a;
  border: 1px solid rgba(37,99,235,.18);
  font-weight: 700;
}

/* Botones */
.btn{
  border: 1px solid rgba(37,99,235,.22);
  cursor:pointer;
  background: linear-gradient(180deg, rgba(37,99,235,1), rgba(29,78,216,1));
  color:#fff;
  font-weight: 800;
  padding: 10px 14px;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37,99,235,.18);
  transition: transform .08s ease, box-shadow .15s ease, filter .15s ease;
}
.btn:hover{
  filter: brightness(1.02);
  box-shadow: 0 12px 26px rgba(37,99,235,.22);
}
.btn:active{ transform: translateY(1px); }
.btn:focus{ outline:none; box-shadow: var(--focus), 0 12px 26px rgba(37,99,235,.22); }

/* Grid de KPIs */
.cards{
  display:grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}
@media (max-width:1100px){ .cards{ grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width:720px){ .cards{ grid-template-columns: repeat(2, minmax(0,1fr)); } }

/* KPI Card (más jerarquía) */
.cards .card{
  padding: 14px 14px 12px;
  position: relative;
  overflow: hidden;
  transition: transform .12s ease, box-shadow .15s ease;
}
.cards .card:hover{
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.label{
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 6px;
  display:flex;
  gap: 8px;
  align-items:center;
  font-weight: 700;
}
.value{
  font-size: 26px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1.05;
}
.sub{
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

/* Pequeño acento lateral por tarjeta (moderno y útil) */
.cards .card::before{
  content:"";
  position:absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: rgba(37,99,235,.55);
}
.cards .card:nth-child(2)::before{ background: rgba(99,102,241,.55); }
.cards .card:nth-child(3)::before{ background: rgba(168,85,247,.55); }
.cards .card:nth-child(4)::before{ background: rgba(34,197,94,.55); }
.cards .card:nth-child(5)::before{ background: rgba(244,63,94,.55); }

/* Panel */
.panel{
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.panelHead{
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid var(--line);
}
.panelHead{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:center;
  justify-content:space-between;
  padding: 14px;
  background: rgba(255,255,255,.05);
  border-bottom: 1px solid var(--line);
}
.panelHead h2{
  margin:0;
  font-size: 15px;
  letter-spacing: .2px;
}
.tools{
  display:flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items:center;
}

/* Search (mejor UX) */
.search{
  display:flex;
  align-items:center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(15,23,42,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.85);
  min-width: 320px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
  transition: box-shadow .15s ease, border-color .15s ease;
}
.search:focus-within{
  border-color: rgba(37,99,235,.35);
  box-shadow: var(--focus);
}
.search input{
  border:none;
  outline:none;
  width:100%;
  background:transparent;
  font-size: 14px;
}

/* Tabla */
table{ width:100%; border-collapse: separate; border-spacing: 0; }
thead th{
  background: rgba(255,255,255,.05);
  color: rgba(232,238,252,.78);
  border-bottom: 1px solid var(--line);
}
tbody td{
  padding: 12px 12px;
  border-bottom: 1px solid rgba(15,23,42,.08);
  font-size: 14px;
  vertical-align: top;
}
tbody tr{
  transition: background .12s ease;
}
tbody tr:hover{ background: rgba(59,130,246,.08); }

.muted{ color: var(--muted); font-size: 12px; }
.right{ text-align: right; }

/* Acción “Ver” estilo pill-link */
.action a{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 900;
  color: #1d4ed8;
  background: rgba(37,99,235,.10);
  border: 1px solid rgba(37,99,235,.16);
  transition: filter .15s ease, transform .08s ease;
}
.action a:hover{
  filter: brightness(1.02);
}
.action a:active{ transform: translateY(1px); }

.empty{
  padding: 18px;
  color: var(--muted);
  text-align:center;
}

.err{
  padding: 14px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  border-radius: 14px;
}

.tableWrap{
  overflow:auto;
}