/* =========================================================
   NOTIFICACIONES HISTORIAL
========================================================= */

.notif-history-layout {
  display: flex;
  flex-direction: column;
  gap: 18px;
  min-height: 0;
}

/* =========================================================
   HEADER
========================================================= */

.notif-history-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.notif-history-header-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notif-history-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notif-history-title {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: #111827;
}

.notif-history-subtitle {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #6b7280;
}

/* =========================================================
   FILTERS
========================================================= */

.notif-history-filter-select {
  height: 40px;
  min-width: 180px;
  padding: 0 14px;
  border: 1px solid #dbe4f0;
  border-radius: 12px;
  background: #ffffff;
  font-size: 13px;
  color: #111827;
  outline: none;
  transition: 0.2s ease;
}

.notif-history-filter-select:focus {
  border-color: var(--color_primario);
}

/* =========================================================
   KPIS
========================================================= */

.notif-history-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.notif-history-kpi-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 82px;
  padding: 14px;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  background: #ffffff;
}

.notif-history-kpi-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 18px;
}

.notif-history-kpi-icon-success {
  background: #ecfdf3;
  color: #027a48;
}

.notif-history-kpi-icon-warning {
  background: #fff7ed;
  color: #ea580c;
}

.notif-history-kpi-icon-danger {
  background: #fef2f2;
  color: #dc2626;
}

.notif-history-kpi-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.notif-history-kpi-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: #111827;
}

.notif-history-kpi-label {
  font-size: 12px;
  color: #6b7280;
}

/* =========================================================
   LIST WRAPPER
========================================================= */

.notif-history-list-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* =========================================================
   LIST
========================================================= */

.notif-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================================================
   ITEM
========================================================= */

.notif-history-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 14px;
  border: 1px solid #edf2f7;
  border-radius: 18px;
  background: #ffffff;
  transition: 0.2s ease;
}

.notif-history-item:hover {
  border-color: #dbe4f0;
  transform: translateY(-1px);
}

.notif-history-item-left {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  flex: 1;
  min-width: 0;
}

.notif-history-item-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  border-radius: 16px;
  font-size: 20px;
}

/* =========================================================
   PRIORITY COLORS
========================================================= */

.notif-history-priority-baja {
  background: #f3f4f6;
  color: #6b7280;
}

.notif-history-priority-media {
  background: #eff6ff;
  color: #2563eb;
}

.notif-history-priority-alta {
  background: #fff7ed;
  color: #ea580c;
}

.notif-history-priority-critica {
  background: #fef2f2;
  color: #dc2626;
}

/* =========================================================
   CONTENT
========================================================= */

.notif-history-item-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.notif-history-item-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.notif-history-item-title {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #111827;
}

.notif-history-item-message {
  font-size: 13px;
  line-height: 1.6;
  color: #4b5563;
  word-break: break-word;
}

.notif-history-item-bottom {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.notif-history-item-event,
.notif-history-item-date {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #6b7280;
}

/* =========================================================
   PRIORITY BADGES
========================================================= */

.notif-history-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  text-transform: capitalize;
}

.notif-history-badge-baja {
  background: #f3f4f6;
  color: #6b7280;
}

.notif-history-badge-media {
  background: #eff6ff;
  color: #2563eb;
}

.notif-history-badge-alta {
  background: #fff7ed;
  color: #ea580c;
}

.notif-history-badge-critica {
  background: #fef2f2;
  color: #dc2626;
}

/* =========================================================
   RIGHT
========================================================= */

.notif-history-item-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

/* =========================================================
   STATUS
========================================================= */

.notif-history-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.notif-history-status.success {
  background: #ecfdf3;
  color: #027a48;
}

.notif-history-status.pending {
  background: #fff7ed;
  color: #ea580c;
}

.notif-history-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
}

/* =========================================================
   SEND DATE
========================================================= */

.notif-history-send-date {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.notif-history-send-label {
  font-size: 10px;
  color: #9ca3af;
}

.notif-history-send-value {
  font-size: 11px;
  color: #6b7280;
}

.notif-history-send-pending {
  font-size: 11px;
  color: #ea580c;
}

/* =========================================================
   EMPTY
========================================================= */

.notif-history-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  min-height: 320px;
  padding: 40px 20px;
  text-align: center;
}

.notif-history-empty-icon {
  font-size: 54px;
  color: #cbd5e1;
}

.notif-history-empty-title {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

.notif-history-empty-text {
  max-width: 420px;
  font-size: 13px;
  line-height: 1.6;
  color: #6b7280;
}

/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 768px) {
  .notif-history-header {
    flex-direction: column;
    align-items: stretch;
  }

  .notif-history-header-right {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .notif-history-filter-select {
    width: 100%;
  }

  .notif-history-kpis {
    grid-template-columns: 1fr;
  }

  .notif-history-item {
    flex-direction: column;
    align-items: stretch;
  }

  .notif-history-item-right {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .notif-history-send-date {
    align-items: flex-start;
  }
}
