/* =============================================================
   PLAN DE TRABAJO — Dashboard Components
   Estilos para: perfil_tareas_dashboard, ultimas_tareas_finalizadas, pendientes
   ============================================================= */

/* ---------------------------------------------------------------
   VIGENTES / VENCIDOS  (tickets/ajax/perfil_tareas_dashboard.html)
--------------------------------------------------------------- */
.estado-card {
  border: 1px solid #e4e6ef;
  border-top: 4px solid #e4e6ef;
  border-radius: 8px;
  overflow: hidden;
}
.estado-card.vigentes { border-top-color: #28a745; }
.estado-card.vencidos { border-top-color: #dc3545; }

.estado-card .estado-header {
  padding: 0.8rem 1rem;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}

.estado-card .estado-titulo {
  font-size: 0.9rem;
  font-weight: 700;
  color: #2c2c2c;
  display: flex;
  align-items: center;
  gap: 6px;
}

.estado-card .estado-total {
  font-size: 1.1rem;
  font-weight: 800;
  border-radius: 20px;
  padding: 2px 12px;
  text-decoration: none;
}
.vigentes .estado-total { background: #e8f5e9; color: #28a745; }
.vencidos .estado-total { background: #fdecea; color: #dc3545; }
.vigentes .estado-total:hover { background: #28a745; color: #fff; text-decoration: none; }
.vencidos .estado-total:hover { background: #dc3545; color: #fff; text-decoration: none; }

.prio-fila {
  display: flex;
  align-items: center;
  padding: 0.55rem 1rem;
  border-bottom: 1px solid #f5f5f5;
  text-decoration: none;
  color: inherit;
  transition: background 0.12s;
}
.prio-fila:last-child { border-bottom: none; }
.prio-fila:hover { background: #fafafa; text-decoration: none; color: inherit; }

.prio-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-right: 10px;
}
.prio-dot.alta  { background: #dc3545; }
.prio-dot.media { background: #ff8400; }
.prio-dot.baja  { background: #28a745; }

.prio-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #3a3a3a;
  flex: 1;
}
.prio-sub {
  font-size: 0.73rem;
  color: #aaa;
  margin-left: 6px;
}

.prio-count {
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 12px;
  padding: 1px 10px;
  margin-left: auto;
  flex-shrink: 0;
}
.prio-count.alta  { background: #fdecea; color: #dc3545; }
.prio-count.media { background: #fff4de; color: #d76d2f; }
.prio-count.baja  { background: #e8f5e9; color: #28a745; }

.estado-vacio {
  padding: 2rem 1rem;
  text-align: center;
  color: #bbb;
  font-size: 0.85rem;
}

/* ---------------------------------------------------------------
   PANEL DE FILTROS / PLAN DE TRABAJO
   (tickets/components/perfil_tareas_dashboard.html)
--------------------------------------------------------------- */
.plan-trabajo-header {
  background-color: #002251;
  color: #ffffff;
  border-radius: 8px 8px 0 0;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.plan-trabajo-header h5,
.plan-trabajo-header h5 span {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ffffff !important;
}

.filtros-card {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0 0 8px 8px;
  padding: 0.75rem 1rem 0.5rem;
  margin-bottom: 1rem;
}
.filtros-card label {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4d4d4f;
  margin-bottom: 2px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.btn-exportar-pdf {
  border: 1px solid #ab492e;
  color: #ab492e;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  transition: background 0.15s, color 0.15s;
}
.btn-exportar-pdf:hover {
  background: #ab492e;
  color: #ffffff;
  text-decoration: none;
}
.btn-exportar-excel {
  border: 1px solid #28a745;
  color: #28a745;
  background: #ffffff;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 0.3rem 0.7rem;
  transition: background 0.15s, color 0.15s;
}
.btn-exportar-excel:hover {
  background: #28a745;
  color: #ffffff;
  text-decoration: none;
}

.chart-box {
  position: relative;
  width: 180px;
  height: 180px;
  margin: 0 auto;
}

.mobile-filter-toggle {
  border: 1px solid #dee2e6;
  background: #fff;
  color: #4d4d4f;
  font-size: 0.8rem;
  border-radius: 4px;
  padding: 0.35rem 0.65rem;
}
.mobile-filter-toggle:hover { background: #f8f9fa; }

input[type="date"]:disabled {
  background-color: #e9ecef;
  cursor: not-allowed;
  opacity: 0.7;
}

/* ---------------------------------------------------------------
   ÚLTIMAS TAREAS FINALIZADAS
   (dashboard/components/ultimas_tareas_finalizadas.html)
--------------------------------------------------------------- */
.utf-header {
  background-color: #002251;
  color: #ffffff;
  padding: 0.65rem 1rem;
  border-radius: 0;
}
.utf-header h6,
.utf-header h6 span {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: 0.02em;
  color: #ffffff !important;
}

.btn-utfaccion {
  font-size: 0.72rem;
  padding: 0.2rem 0.55rem;
  border-radius: 4px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.btn-utfaccion-primary {
  border-color: #e7be33;
  color: #e7be33;
  background: transparent;
}
.btn-utfaccion-primary:hover {
  background: #e7be33;
  color: #002251;
  text-decoration: none;
}
.btn-utfaccion-info {
  border-color: rgba(255,255,255,0.45);
  color: rgba(255,255,255,0.85);
  background: transparent;
}
.btn-utfaccion-info:hover {
  background: rgba(255,255,255,0.15);
  color: #ffffff;
  text-decoration: none;
}

.utf-row {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #f0f0f0;
  transition: background 0.12s;
  cursor: pointer;
}
.utf-row:last-child { border-bottom: none; }
.utf-row:hover { background-color: #f8f9fa; }

.utf-nombre {
  font-size: 0.8rem;
  font-weight: 600;
  color: #002251;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  margin-bottom: 1px;
}
.utf-nombre:hover { text-decoration: underline; }

.utf-meta {
  font-size: 0.72rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.badge-tipo {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2em 0.5em;
  border-radius: 3px;
  display: inline-block;
  white-space: nowrap;
}
.badge-cumplimiento {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2em 0.45em;
  border-radius: 3px;
  white-space: nowrap;
}

.badge-tipo-ticket           { background-color: #e1f0ff; color: #002251; }
.badge-tipo-acuerdo          { background-color: #f3e8ff; color: #6a0dad; }
.badge-tipo-accion           { background-color: #c9f7f5; color: #0d7a75; }
.badge-tipo-subtarea         { background-color: #ffe2e5; color: #ab492e; }
.badge-tipo-tarea-programada { background-color: #fff4de; color: #d76d2f; }

.badge-anticipacion { background-color: #d1f2eb; color: #1a8a6e; }
.badge-a_tiempo     { background-color: #d1ecf1; color: #0c6a80; }
.badge-retraso      { background-color: #ffe2e5; color: #ab492e; }

.utf-empty {
  padding: 2.5rem 1rem;
  text-align: center;
  color: #aaa;
}

/* ---------------------------------------------------------------
   TAREAS PENDIENTES
   (a3ceros/components/pendientes.html)
--------------------------------------------------------------- */
.pend-card {
  border: 1px solid #e4e6ef;
  border-top: 4px solid #ff691a;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.pend-header {
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #f0f0f0;
}
.pend-header-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: #2c2c2c;
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}
.pend-total {
  font-size: 0.82rem;
  font-weight: 700;
  background: #fff3ec;
  color: #ff691a;
  border-radius: 20px;
  padding: 2px 10px;
}

.pend-section-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  background: #f8f9fa;
  border: none;
  border-top: 1px solid #f0f0f0;
  font-size: 0.82rem;
  font-weight: 600;
  color: #444;
  cursor: pointer;
  transition: background 0.15s;
  text-align: left;
}
.pend-section-btn:hover { background: #fff3ec; color: #ff691a; }
.pend-section-btn:not(.collapsed) { background: #fff3ec; color: #ff691a; }
.pend-section-btn .pend-section-icon {
  width: 15px;
  height: 15px;
  margin-right: 7px;
  flex-shrink: 0;
}
.pend-section-btn .pend-chevron {
  font-size: 0.7rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}
.pend-section-btn:not(.collapsed) .pend-chevron {
  transform: rotate(180deg);
}

.pend-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem 0.45rem 1.4rem;
  border-top: 1px solid #f5f5f5;
  text-decoration: none;
  transition: background 0.12s;
}
.pend-item:hover { background: #fffaf7; text-decoration: none; }

.pend-item-label {
  font-size: 0.8rem;
  color: #3a3a3a;
  flex: 1;
  margin: 0;
}
.pend-item-count {
  font-size: 0.78rem;
  font-weight: 700;
  background: #fff3ec;
  color: #ff691a;
  border-radius: 12px;
  padding: 1px 9px;
  flex-shrink: 0;
  margin-left: 8px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.pend-item:hover .pend-item-count,
.pend-item-count:hover {
  background: #ff691a;
  color: #fff;
}

.pend-item-standalone {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem;
  border-top: 1px solid #f0f0f0;
  text-decoration: none;
  transition: background 0.12s;
}
.pend-item-standalone:hover { background: #fffaf7; text-decoration: none; }
